").append(lt.parseHTML(e)).find(r):e)}).complete(i&&function(e,t){a.each(i,s||[e.responseText,t,e])}),this},lt.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){lt.fn[t]=function(e){return this.on(t,e)}}),lt.each(["get","post"],function(e,n){lt[n]=function(e,i,r,s){return lt.isFunction(i)&&(s=s||r,r=i,i=t),lt.ajax({url:e,type:n,dataType:s,data:i,success:r})}}),lt.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Rn,type:"GET",isLocal:Hn.test(Mn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Wn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":lt.parseJSON,"text xml":lt.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?R(R(e,lt.ajaxSettings),t):R(lt.ajaxSettings,e)},ajaxPrefilter:D(Zn),ajaxTransport:D($n),ajax:function(e,n){function i(e,n,i,r){var s,u,v,b,_,C=n;2!==w&&(w=2,l&&clearTimeout(l),h=t,a=r||"",x.readyState=e>0?4:0,i&&(b=L(d,x,i)),e>=200&&300>e||304===e?(d.ifModified&&(_=x.getResponseHeader("Last-Modified"),_&&(lt.lastModified[o]=_),_=x.getResponseHeader("etag"),_&&(lt.etag[o]=_)),204===e?(s=!0,C="nocontent"):304===e?(s=!0,C="notmodified"):(s=z(d,b),C=s.state,u=s.data,v=s.error,s=!v)):(v=C,(e||!C)&&(C="error",0>e&&(e=0))),x.status=e,x.statusText=(n||C)+"",s?g.resolveWith(f,[u,C,x]):g.rejectWith(f,[x,C,v]),x.statusCode(y),y=t,c&&p.trigger(s?"ajaxSuccess":"ajaxError",[x,d,s?u:v]),m.fireWith(f,[x,C]),c&&(p.trigger("ajaxComplete",[x,d]),--lt.active||lt.event.trigger("ajaxStop")))}"object"==typeof e&&(n=e,e=t),n=n||{};var r,s,o,a,l,c,h,u,d=lt.ajaxSetup({},n),f=d.context||d,p=d.context&&(f.nodeType||f.jquery)?lt(f):lt.event,g=lt.Deferred(),m=lt.Callbacks("once memory"),y=d.statusCode||{},v={},b={},w=0,_="canceled",x={readyState:0,getResponseHeader:function(e){var t;if(2===w){if(!u)for(u={};t=In.exec(a);)u[t[1].toLowerCase()]=t[2];t=u[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===w?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return w||(e=b[n]=b[n]||e,v[e]=t),this},overrideMimeType:function(e){return w||(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>w)for(t in e)y[t]=[y[t],e[t]];else x.always(e[x.status]);return this},abort:function(e){var t=e||_;return h&&h.abort(t),i(0,t),this}};if(g.promise(x).complete=m.add,x.success=x.done,x.error=x.fail,d.url=((e||d.url||Rn)+"").replace(On,"").replace(Pn,Mn[1]+"//"),d.type=n.method||n.type||d.method||d.type,d.dataTypes=lt.trim(d.dataType||"*").toLowerCase().match(ht)||[""],null==d.crossDomain&&(r=Bn.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]===Mn[1]&&r[2]===Mn[2]&&(r[3]||("http:"===r[1]?80:443))==(Mn[3]||("http:"===Mn[1]?80:443)))),d.data&&d.processData&&"string"!=typeof d.data&&(d.data=lt.param(d.data,d.traditional)),M(Zn,d,n,x),2===w)return x;c=d.global,c&&0===lt.active++&<.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!jn.test(d.type),o=d.url,d.hasContent||(d.data&&(o=d.url+=(zn.test(o)?"&":"?")+d.data,delete d.data),d.cache===!1&&(d.url=Fn.test(o)?o.replace(Fn,"$1_="+Ln++):o+(zn.test(o)?"&":"?")+"_="+Ln++)),d.ifModified&&(lt.lastModified[o]&&x.setRequestHeader("If-Modified-Since",lt.lastModified[o]),lt.etag[o]&&x.setRequestHeader("If-None-Match",lt.etag[o])),(d.data&&d.hasContent&&d.contentType!==!1||n.contentType)&&x.setRequestHeader("Content-Type",d.contentType),x.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+Wn+"; q=0.01":""):d.accepts["*"]);for(s in d.headers)x.setRequestHeader(s,d.headers[s]);if(d.beforeSend&&(d.beforeSend.call(f,x,d)===!1||2===w))return x.abort();_="abort";for(s in{success:1,error:1,complete:1})x[s](d[s]);if(h=M($n,d,n,x)){x.readyState=1,c&&p.trigger("ajaxSend",[x,d]),d.async&&d.timeout>0&&(l=setTimeout(function(){x.abort("timeout")},d.timeout));try{w=1,h.send(v,i)}catch(C){if(!(2>w))throw C;i(-1,C)}}else i(-1,"No Transport");return x},getScript:function(e,n){return lt.get(e,t,n,"script")},getJSON:function(e,t,n){return lt.get(e,t,n,"json")}}),lt.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return lt.globalEval(e),e}}}),lt.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),lt.ajaxTransport("script",function(e){if(e.crossDomain){var n,i=X.head||lt("head")[0]||X.documentElement;return{send:function(t,r){n=X.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||r(200,"success"))},i.insertBefore(n,i.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var Vn=[],Xn=/(=)\?(?=&|$)|\?\?/;lt.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Vn.pop()||lt.expando+"_"+Ln++;return this[e]=!0,e}}),lt.ajaxPrefilter("json jsonp",function(n,i,r){var s,o,a,l=n.jsonp!==!1&&(Xn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Xn.test(n.data)&&"data");return l||"jsonp"===n.dataTypes[0]?(s=n.jsonpCallback=lt.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,l?n[l]=n[l].replace(Xn,"$1"+s):n.jsonp!==!1&&(n.url+=(zn.test(n.url)?"&":"?")+n.jsonp+"="+s),n.converters["script json"]=function(){return a||lt.error(s+" was not called"),a[0]},n.dataTypes[0]="json",o=e[s],e[s]=function(){a=arguments},r.always(function(){e[s]=o,n[s]&&(n.jsonpCallback=i.jsonpCallback,Vn.push(s)),a&<.isFunction(o)&&o(a[0]),a=o=t}),"script"):void 0});var Yn,Gn,Kn=0,Qn=e.ActiveXObject&&function(){var e;for(e in Yn)Yn[e](t,!0)};lt.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&O()||F()}:O,Gn=lt.ajaxSettings.xhr(),lt.support.cors=!!Gn&&"withCredentials"in Gn,Gn=lt.support.ajax=!!Gn,Gn&<.ajaxTransport(function(n){if(!n.crossDomain||lt.support.cors){var i;return{send:function(r,s){var o,a,l=n.xhr();if(n.username?l.open(n.type,n.url,n.async,n.username,n.password):l.open(n.type,n.url,n.async),n.xhrFields)for(a in n.xhrFields)l[a]=n.xhrFields[a];n.mimeType&&l.overrideMimeType&&l.overrideMimeType(n.mimeType),n.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");try{for(a in r)l.setRequestHeader(a,r[a])}catch(c){}l.send(n.hasContent&&n.data||null),i=function(e,r){var a,c,h,u;try{if(i&&(r||4===l.readyState))if(i=t,o&&(l.onreadystatechange=lt.noop,Qn&&delete Yn[o]),r)4!==l.readyState&&l.abort();else{u={},a=l.status,c=l.getAllResponseHeaders(),"string"==typeof l.responseText&&(u.text=l.responseText);try{h=l.statusText}catch(d){h=""}a||!n.isLocal||n.crossDomain?1223===a&&(a=204):a=u.text?200:404}}catch(f){r||s(-1,f)}u&&s(a,h,u,c)},n.async?4===l.readyState?setTimeout(i):(o=++Kn,Qn&&(Yn||(Yn={},lt(e).unload(Qn)),Yn[o]=i),l.onreadystatechange=i):i()},abort:function(){i&&i(t,!0)}}}});var Jn,ei,ti=/^(?:toggle|show|hide)$/,ni=new RegExp("^(?:([+-])=|)("+ct+")([a-z%]*)$","i"),ii=/queueHooks$/,ri=[B],si={"*":[function(e,t){var n,i,r=this.createTween(e,t),s=ni.exec(t),o=r.cur(),a=+o||0,l=1,c=20;if(s){if(n=+s[2],i=s[3]||(lt.cssNumber[e]?"":"px"),"px"!==i&&a){a=lt.css(r.elem,e,!0)||n||1;do l=l||".5",a/=l,lt.style(r.elem,e,a+i);while(l!==(l=r.cur()/o)&&1!==l&&--c)}r.unit=i,r.start=a,r.end=s[1]?a+(s[1]+1)*n:n}return r}]};lt.Animation=lt.extend(j,{tweener:function(e,t){lt.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var n,i=0,r=e.length;r>i;i++)n=e[i],si[n]=si[n]||[],si[n].unshift(t)},prefilter:function(e,t){t?ri.unshift(e):ri.push(e)}}),lt.Tween=q,q.prototype={constructor:q,init:function(e,t,n,i,r,s){this.elem=e,this.prop=n,this.easing=r||"swing",this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=s||(lt.cssNumber[n]?"":"px")},cur:function(){var e=q.propHooks[this.prop];return e&&e.get?e.get(this):q.propHooks._default.get(this)},run:function(e){var t,n=q.propHooks[this.prop];return this.pos=t=this.options.duration?lt.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):q.propHooks._default.set(this),this}},q.prototype.init.prototype=q.prototype,q.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=lt.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){lt.fx.step[e.prop]?lt.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[lt.cssProps[e.prop]]||lt.cssHooks[e.prop])?lt.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},q.propHooks.scrollTop=q.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},lt.each(["toggle","show","hide"],function(e,t){var n=lt.fn[t];lt.fn[t]=function(e,i,r){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(Z(t,!0),e,i,r)}}),lt.fn.extend({fadeTo:function(e,t,n,i){return this.filter(x).css("opacity",0).show().end().animate({opacity:t},e,n,i)},animate:function(e,t,n,i){var r=lt.isEmptyObject(e),s=lt.speed(t,n,i),o=function(){var t=j(this,lt.extend({},e),s);o.finish=function(){t.stop(!0)},(r||lt._data(this,"finish"))&&t.stop(!0)};return o.finish=o,r||s.queue===!1?this.each(o):this.queue(s.queue,o)},stop:function(e,n,i){var r=function(e){var t=e.stop;delete e.stop,t(i)};return"string"!=typeof e&&(i=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",s=lt.timers,o=lt._data(this);if(n)o[n]&&o[n].stop&&r(o[n]);else for(n in o)o[n]&&o[n].stop&&ii.test(n)&&r(o[n]);for(n=s.length;n--;)s[n].elem!==this||null!=e&&s[n].queue!==e||(s[n].anim.stop(i),t=!1,s.splice(n,1));(t||!i)&<.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=lt._data(this),i=n[e+"queue"],r=n[e+"queueHooks"],s=lt.timers,o=i?i.length:0;for(n.finish=!0,lt.queue(this,e,[]),r&&r.cur&&r.cur.finish&&r.cur.finish.call(this),t=s.length;t--;)s[t].elem===this&&s[t].queue===e&&(s[t].anim.stop(!0),s.splice(t,1));for(t=0;o>t;t++)i[t]&&i[t].finish&&i[t].finish.call(this);delete n.finish})}}),lt.each({slideDown:Z("show"),slideUp:Z("hide"),slideToggle:Z("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){lt.fn[e]=function(e,n,i){return this.animate(t,e,n,i)}}),lt.speed=function(e,t,n){var i=e&&"object"==typeof e?lt.extend({},e):{complete:n||!n&&t||lt.isFunction(e)&&e,duration:e,easing:n&&t||t&&!lt.isFunction(t)&&t};return i.duration=lt.fx.off?0:"number"==typeof i.duration?i.duration:i.duration in lt.fx.speeds?lt.fx.speeds[i.duration]:lt.fx.speeds._default,(null==i.queue||i.queue===!0)&&(i.queue="fx"),i.old=i.complete,i.complete=function(){lt.isFunction(i.old)&&i.old.call(this),i.queue&<.dequeue(this,i.queue)},i},lt.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},lt.timers=[],lt.fx=q.prototype.init,lt.fx.tick=function(){var e,n=lt.timers,i=0;for(Jn=lt.now();n.length>i;i++)e=n[i],e()||n[i]!==e||n.splice(i--,1);n.length||lt.fx.stop(),Jn=t},lt.fx.timer=function(e){e()&<.timers.push(e)&<.fx.start()},lt.fx.interval=13,lt.fx.start=function(){ei||(ei=setInterval(lt.fx.tick,lt.fx.interval))},lt.fx.stop=function(){clearInterval(ei),ei=null},lt.fx.speeds={slow:600,fast:200,_default:400},lt.fx.step={},lt.expr&<.expr.filters&&(lt.expr.filters.animated=function(e){return lt.grep(lt.timers,function(t){return e===t.elem}).length}),lt.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){lt.offset.setOffset(this,e,t)});var n,i,r={top:0,left:0},s=this[0],o=s&&s.ownerDocument;if(o)return n=o.documentElement,lt.contains(n,s)?(typeof s.getBoundingClientRect!==V&&(r=s.getBoundingClientRect()),i=$(o),{top:r.top+(i.pageYOffset||n.scrollTop)-(n.clientTop||0),left:r.left+(i.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):r},lt.offset={setOffset:function(e,t,n){var i=lt.css(e,"position");"static"===i&&(e.style.position="relative");var r,s,o=lt(e),a=o.offset(),l=lt.css(e,"top"),c=lt.css(e,"left"),h=("absolute"===i||"fixed"===i)&<.inArray("auto",[l,c])>-1,u={},d={};h?(d=o.position(),r=d.top,s=d.left):(r=parseFloat(l)||0,s=parseFloat(c)||0),lt.isFunction(t)&&(t=t.call(e,n,a)),null!=t.top&&(u.top=t.top-a.top+r),null!=t.left&&(u.left=t.left-a.left+s),"using"in t?t.using.call(e,u):o.css(u)}},lt.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},i=this[0];return"fixed"===lt.css(i,"position")?t=i.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),lt.nodeName(e[0],"html")||(n=e.offset()),n.top+=lt.css(e[0],"borderTopWidth",!0),n.left+=lt.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-lt.css(i,"marginTop",!0),left:t.left-n.left-lt.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||X.documentElement;e&&!lt.nodeName(e,"html")&&"static"===lt.css(e,"position");)e=e.offsetParent;return e||X.documentElement})}}),lt.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var i=/Y/.test(n);lt.fn[e]=function(r){return lt.access(this,function(e,r,s){var o=$(e);return s===t?o?n in o?o[n]:o.document.documentElement[r]:e[r]:(o?o.scrollTo(i?lt(o).scrollLeft():s,i?s:lt(o).scrollTop()):e[r]=s,void 0)},e,r,arguments.length,null)}}),lt.each({Height:"height",Width:"width"},function(e,n){lt.each({padding:"inner"+e,content:n,"":"outer"+e},function(i,r){lt.fn[r]=function(r,s){var o=arguments.length&&(i||"boolean"!=typeof r),a=i||(r===!0||s===!0?"margin":"border");return lt.access(this,function(n,i,r){var s;return lt.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(s=n.documentElement,Math.max(n.body["scroll"+e],s["scroll"+e],n.body["offset"+e],s["offset"+e],s["client"+e])):r===t?lt.css(n,i,a):lt.style(n,i,r,a)},n,o?r:t,o,null)}})}),e.jQuery=e.$=lt,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return lt})})(window),function(e,t){var n=function(){var t=e._data(document,"events");return t&&t.click&&e.grep(t.click,function(e){return"rails"===e.namespace}).length};n()&&e.error("jquery-ujs has already been loaded!");var i;e.rails=i={linkClickSelector:"a[data-confirm], a[data-method], a[data-remote], a[data-disable-with]",inputChangeSelector:"select[data-remote], input[data-remote], textarea[data-remote]",formSubmitSelector:"form",formInputClickSelector:"form input[type=submit], form input[type=image], form button[type=submit], form button:not([type])",disableSelector:"input[data-disable-with], button[data-disable-with], textarea[data-disable-with]",enableSelector:"input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled",requiredInputSelector:"input[name][required]:not([disabled]),textarea[name][required]:not([disabled])",fileInputSelector:"input[type=file]",linkDisableSelector:"a[data-disable-with]",CSRFProtection:function(t){var n=e('meta[name="csrf-token"]').attr("content");n&&t.setRequestHeader("X-CSRF-Token",n)},fire:function(t,n,i){var r=e.Event(n);return t.trigger(r,i),r.result!==!1},confirm:function(e){return confirm(e)},ajax:function(t){return e.ajax(t)},href:function(e){return e.attr("href")},handleRemote:function(n){var r,s,o,a,l,c,h,u;if(i.fire(n,"ajax:before")){if(a=n.data("cross-domain"),l=a===t?null:a,c=n.data("with-credentials")||null,h=n.data("type")||e.ajaxSettings&&e.ajaxSettings.dataType,n.is("form")){r=n.attr("method"),s=n.attr("action"),o=n.serializeArray();var d=n.data("ujs:submit-button");d&&(o.push(d),n.data("ujs:submit-button",null))}else n.is(i.inputChangeSelector)?(r=n.data("method"),s=n.data("url"),o=n.serialize(),n.data("params")&&(o=o+"&"+n.data("params"))):(r=n.data("method"),s=i.href(n),o=n.data("params")||null);u={type:r||"GET",data:o,dataType:h,beforeSend:function(e,r){return r.dataType===t&&e.setRequestHeader("accept","*/*;q=0.5, "+r.accepts.script),i.fire(n,"ajax:beforeSend",[e,r])},success:function(e,t,i){n.trigger("ajax:success",[e,t,i])},complete:function(e,t){n.trigger("ajax:complete",[e,t])},error:function(e,t,i){n.trigger("ajax:error",[e,t,i])},crossDomain:l},c&&(u.xhrFields={withCredentials:c}),s&&(u.url=s);var f=i.ajax(u);return n.trigger("ajax:send",f),f}return!1},handleMethod:function(n){var r=i.href(n),s=n.data("method"),o=n.attr("target"),a=e("meta[name=csrf-token]").attr("content"),l=e("meta[name=csrf-param]").attr("content"),c=e('
'),h='
';l!==t&&a!==t&&(h+='
'),o&&c.attr("target",o),c.hide().append(h).appendTo("body"),c.submit()},disableFormElements:function(t){t.find(i.disableSelector).each(function(){var t=e(this),n=t.is("button")?"html":"val";t.data("ujs:enable-with",t[n]()),t[n](t.data("disable-with")),t.prop("disabled",!0)})},enableFormElements:function(t){t.find(i.enableSelector).each(function(){var t=e(this),n=t.is("button")?"html":"val";t.data("ujs:enable-with")&&t[n](t.data("ujs:enable-with")),t.prop("disabled",!1)})},allowAction:function(e){var t,n=e.data("confirm"),r=!1;return n?(i.fire(e,"confirm")&&(r=i.confirm(n),t=i.fire(e,"confirm:complete",[r])),r&&t):!0},blankInputs:function(t,n,i){var r,s,o=e(),a=n||"input,textarea",l=t.find(a);return l.each(function(){if(r=e(this),s=r.is("input[type=checkbox],input[type=radio]")?r.is(":checked"):r.val(),!s==!i){if(r.is("input[type=radio]")&&l.filter('input[type=radio]:checked[name="'+r.attr("name")+'"]').length)return!0;o=o.add(r)}}),o.length?o:!1},nonBlankInputs:function(e,t){return i.blankInputs(e,t,!0)},stopEverything:function(t){return e(t.target).trigger("ujs:everythingStopped"),t.stopImmediatePropagation(),!1},callFormSubmitBindings:function(n,i){var r=n.data("events"),s=!0;return r!==t&&r.submit!==t&&e.each(r.submit,function(e,t){return"function"==typeof t.handler?s=t.handler(i):void 0}),s},disableElement:function(e){e.data("ujs:enable-with",e.html()),e.html(e.data("disable-with")),e.bind("click.railsDisable",function(e){return i.stopEverything(e)})},enableElement:function(e){e.data("ujs:enable-with")!==t&&(e.html(e.data("ujs:enable-with")),e.data("ujs:enable-with",!1)),e.unbind("click.railsDisable")}},i.fire(e(document),"rails:attachBindings")&&(e.ajaxPrefilter(function(e,t,n){e.crossDomain||i.CSRFProtection(n)}),e(document).delegate(i.linkDisableSelector,"ajax:complete",function(){i.enableElement(e(this))}),e(document).delegate(i.linkClickSelector,"click.rails",function(n){var r=e(this),s=r.data("method"),o=r.data("params");if(!i.allowAction(r))return i.stopEverything(n);if(r.is(i.linkDisableSelector)&&i.disableElement(r),r.data("remote")!==t){if(!(!n.metaKey&&!n.ctrlKey||s&&"GET"!==s||o))return!0;var a=i.handleRemote(r);return a===!1?i.enableElement(r):a.error(function(){i.enableElement(r)}),!1}return r.data("method")?(i.handleMethod(r),!1):void 0}),e(document).delegate(i.inputChangeSelector,"change.rails",function(t){var n=e(this);return i.allowAction(n)?(i.handleRemote(n),!1):i.stopEverything(t)}),e(document).delegate(i.formSubmitSelector,"submit.rails",function(n){var r=e(this),s=r.data("remote")!==t,o=i.blankInputs(r,i.requiredInputSelector),a=i.nonBlankInputs(r,i.fileInputSelector);if(!i.allowAction(r))return i.stopEverything(n);if(o&&r.attr("novalidate")==t&&i.fire(r,"ajax:aborted:required",[o]))return i.stopEverything(n);if(s){if(a){setTimeout(function(){i.disableFormElements(r)},13);var l=i.fire(r,"ajax:aborted:file",[a]);return l||setTimeout(function(){i.enableFormElements(r)},13),l}return!e.support.submitBubbles&&"1.7">e().jquery&&i.callFormSubmitBindings(r,n)===!1?i.stopEverything(n):(i.handleRemote(r),!1)}setTimeout(function(){i.disableFormElements(r)},13)}),e(document).delegate(i.formInputClickSelector,"click.rails",function(t){var n=e(this);if(!i.allowAction(n))return i.stopEverything(t);var r=n.attr("name"),s=r?{name:r,value:n.val()}:null;n.closest("form").data("ujs:submit-button",s)}),e(document).delegate(i.formSubmitSelector,"ajax:beforeSend.rails",function(t){this==t.target&&i.disableFormElements(e(this))}),e(document).delegate(i.formSubmitSelector,"ajax:complete.rails",function(t){this==t.target&&i.enableFormElements(e(this))}),e(function(){var t=e("meta[name=csrf-token]").attr("content"),n=e("meta[name=csrf-param]").attr("content");e('form input[name="'+n+'"]').val(t)}))}(jQuery);/**
- * @license wysihtml5 v0.3.0
- * https://github.com/xing/wysihtml5
- *
- * Author: Christopher Blum (https://github.com/tiff)
- *
- * Copyright (C) 2012 XING AG
- * Licensed under the MIT license (MIT)
- *
- */
-var wysihtml5={version:"0.3.0",commands:{},dom:{},quirks:{},toolbar:{},lang:{},selection:{},views:{},INVISIBLE_SPACE:"",EMPTY_FUNCTION:function(){},ELEMENT_NODE:1,TEXT_NODE:3,BACKSPACE_KEY:8,ENTER_KEY:13,ESCAPE_KEY:27,SPACE_KEY:32,DELETE_KEY:46};/**
- * @license Rangy, a cross-browser JavaScript range and selection library
- * http://code.google.com/p/rangy/
- *
- * Copyright 2011, Tim Down
- * Licensed under the MIT license.
- * Version: 1.2.2
- * Build date: 13 November 2011
- */
-window.rangy=function(){function e(e,t){var n=typeof e[t];return n==u||!(n!=h||!e[t])||"unknown"==n}function t(e,t){return!(typeof e[t]!=h||!e[t])}function n(e,t){return typeof e[t]!=d}function i(e){return function(t,n){for(var i=n.length;i--;)if(!e(t,n[i]))return!1;return!0}}function r(e){return e&&y(e,m)&&b(e,g)}function s(e){window.alert("Rangy not supported in your browser. Reason: "+e),w.initialized=!0,w.supported=!1}function o(e){var t="Rangy warning: "+e;w.config.alertOnWarn?window.alert(t):typeof window.console!=d&&typeof window.console.log!=d&&window.console.log(t)}function a(){if(!w.initialized){var n,i=!1,o=!1;e(document,"createRange")&&(n=document.createRange(),y(n,p)&&b(n,f)&&(i=!0),n.detach());var a=t(document,"body")?document.body:document.getElementsByTagName("body")[0];a&&e(a,"createTextRange")&&(n=a.createTextRange(),r(n)&&(o=!0)),i||o||s("Neither Range nor TextRange are implemented"),w.initialized=!0,w.features={implementsDomRange:i,implementsTextRange:o};for(var l=x.concat(_),c=0,h=l.length;h>c;++c)try{l[c](w)}catch(u){t(window,"console")&&e(window.console,"log")&&window.console.log("Init listener threw an exception. Continuing.",u)}}}function l(e){e=e||window,a();for(var t=0,n=C.length;n>t;++t)C[t](e)}function c(e){this.name=e,this.initialized=!1,this.supported=!1}var h="object",u="function",d="undefined",f=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer","START_TO_START","START_TO_END","END_TO_START","END_TO_END"],p=["setStart","setStartBefore","setStartAfter","setEnd","setEndBefore","setEndAfter","collapse","selectNode","selectNodeContents","compareBoundaryPoints","deleteContents","extractContents","cloneContents","insertNode","surroundContents","cloneRange","toString","detach"],g=["boundingHeight","boundingLeft","boundingTop","boundingWidth","htmlText","text"],m=["collapse","compareEndPoints","duplicate","getBookmark","moveToBookmark","moveToElementText","parentElement","pasteHTML","select","setEndPoint","getBoundingClientRect"],y=i(e),v=i(t),b=i(n),w={version:"1.2.2",initialized:!1,supported:!0,util:{isHostMethod:e,isHostObject:t,isHostProperty:n,areHostMethods:y,areHostObjects:v,areHostProperties:b,isTextRange:r},features:{},modules:{},config:{alertOnWarn:!1,preferTextRange:!1}};w.fail=s,w.warn=o,{}.hasOwnProperty?w.util.extend=function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])}:s("hasOwnProperty not supported");var _=[],x=[];w.init=a,w.addInitListener=function(e){w.initialized?e(w):_.push(e)};var C=[];w.addCreateMissingNativeApiListener=function(e){C.push(e)},w.createMissingNativeApi=l,c.prototype.fail=function(e){throw this.initialized=!0,this.supported=!1,new Error("Module '"+this.name+"' failed to load: "+e)},c.prototype.warn=function(e){w.warn("Module "+this.name+": "+e)},c.prototype.createError=function(e){return new Error("Error in Rangy "+this.name+" module: "+e)},w.createModule=function(e,t){var n=new c(e);w.modules[e]=n,x.push(function(e){t(e,n),n.initialized=!0,n.supported=!0})},w.requireModules=function(e){for(var t,n,i=0,r=e.length;r>i;++i){if(n=e[i],t=w.modules[n],!(t&&t instanceof c))throw new Error("Module '"+n+"' not found");if(!t.supported)throw new Error("Module '"+n+"' not supported")}};var T=!1,E=function(){T||(T=!0,w.initialized||a())};return typeof window==d?(s("No window found"),void 0):typeof document==d?(s("No document found"),void 0):(e(document,"addEventListener")&&document.addEventListener("DOMContentLoaded",E,!1),e(window,"addEventListener")?window.addEventListener("load",E,!1):e(window,"attachEvent")?window.attachEvent("onload",E):s("Window does not have required addEventListener or attachEvent method"),w)}(),rangy.createModule("DomUtil",function(e,t){function n(e){var t;return typeof e.namespaceURI==E||null===(t=e.namespaceURI)||"http://www.w3.org/1999/xhtml"==t}function i(e){var t=e.parentNode;return 1==t.nodeType?t:null}function r(e){for(var t=0;e=e.previousSibling;)t++;return t}function s(e){var t;return c(e)?e.length:(t=e.childNodes)?t.length:0}function o(e,t){var n,i=[];for(n=e;n;n=n.parentNode)i.push(n);for(n=t;n;n=n.parentNode)if(S(i,n))return n;return null}function a(e,t,n){for(var i=n?t:t.parentNode;i;){if(i===e)return!0;i=i.parentNode}return!1}function l(e,t,n){for(var i,r=n?e:e.parentNode;r;){if(i=r.parentNode,i===t)return r;r=i}return null}function c(e){var t=e.nodeType;return 3==t||4==t||8==t}function h(e,t){var n=t.nextSibling,i=t.parentNode;return n?i.insertBefore(e,n):i.appendChild(e),e}function u(e,t){var n=e.cloneNode(!1);return n.deleteData(0,t),e.deleteData(t,e.length-t),h(n,e),n}function d(e){if(9==e.nodeType)return e;if(typeof e.ownerDocument!=E)return e.ownerDocument;if(typeof e.document!=E)return e.document;if(e.parentNode)return d(e.parentNode);throw new Error("getDocument: no document found for node")}function f(e){var t=d(e);if(typeof t.defaultView!=E)return t.defaultView;if(typeof t.parentWindow!=E)return t.parentWindow;throw new Error("Cannot get a window object for node")}function p(e){if(typeof e.contentDocument!=E)return e.contentDocument;if(typeof e.contentWindow!=E)return e.contentWindow.document;throw new Error("getIframeWindow: No Document object found for iframe element")}function g(e){if(typeof e.contentWindow!=E)return e.contentWindow;if(typeof e.contentDocument!=E)return e.contentDocument.defaultView;throw new Error("getIframeWindow: No Window object found for iframe element")}function m(e){return k.isHostObject(e,"body")?e.body:e.getElementsByTagName("body")[0]}function y(e){for(var t;t=e.parentNode;)e=t;return e}function v(e,t,n,i){var s,a,c,h,u;if(e==n)return t===i?0:i>t?-1:1;if(s=l(n,e,!0))return r(s)>=t?-1:1;if(s=l(e,n,!0))return i>r(s)?-1:1;if(a=o(e,n),c=e===a?a:l(e,a,!0),h=n===a?a:l(n,a,!0),c===h)throw new Error("comparePoints got to case 4 and childA and childB are the same!");for(u=a.firstChild;u;){if(u===c)return-1;if(u===h)return 1;u=u.nextSibling}throw new Error("Should not be here!")}function b(e){for(var t,n=d(e).createDocumentFragment();t=e.firstChild;)n.appendChild(t);return n}function w(e){if(!e)return"[No node]";if(c(e))return'"'+e.data+'"';if(1==e.nodeType){var t=e.id?' id="'+e.id+'"':"";return"<"+e.nodeName+t+">["+e.childNodes.length+"]"}return e.nodeName}function _(e){this.root=e,this._next=e}function x(e){return new _(e)}function C(e,t){this.node=e,this.offset=t}function T(e){this.code=this[e],this.codeName=e,this.message="DOMException: "+this.codeName}var E="undefined",k=e.util;k.areHostMethods(document,["createDocumentFragment","createElement","createTextNode"])||t.fail("document missing a Node creation method"),k.isHostMethod(document,"getElementsByTagName")||t.fail("document missing getElementsByTagName method");var N=document.createElement("div");k.areHostMethods(N,["insertBefore","appendChild","cloneNode"]||!k.areHostObjects(N,["previousSibling","nextSibling","childNodes","parentNode"]))||t.fail("Incomplete Element implementation"),k.isHostProperty(N,"innerHTML")||t.fail("Element is missing innerHTML property");var A=document.createTextNode("test");k.areHostMethods(A,["splitText","deleteData","insertData","appendData","cloneNode"]||!k.areHostObjects(N,["previousSibling","nextSibling","childNodes","parentNode"])||!k.areHostProperties(A,["data"]))||t.fail("Incomplete Text Node implementation");var S=function(e,t){for(var n=e.length;n--;)if(e[n]===t)return!0;return!1};_.prototype={_current:null,hasNext:function(){return!!this._next},next:function(){var e,t,n=this._current=this._next;if(this._current)if(e=n.firstChild)this._next=e;else{for(t=null;n!==this.root&&!(t=n.nextSibling);)n=n.parentNode;this._next=t}return this._current},detach:function(){this._current=this._next=this.root=null}},C.prototype={equals:function(e){return this.node===e.node&this.offset==e.offset},inspect:function(){return"[DomPosition("+w(this.node)+":"+this.offset+")]"}},T.prototype={INDEX_SIZE_ERR:1,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INVALID_STATE_ERR:11},T.prototype.toString=function(){return this.message},e.dom={arrayContains:S,isHtmlNamespace:n,parentElement:i,getNodeIndex:r,getNodeLength:s,getCommonAncestor:o,isAncestorOf:a,getClosestAncestorIn:l,isCharacterDataNode:c,insertAfter:h,splitDataNode:u,getDocument:d,getWindow:f,getIframeWindow:g,getIframeDocument:p,getBody:m,getRootContainer:y,comparePoints:v,inspectNode:w,fragmentFromNodeChildren:b,createIterator:x,DomPosition:C},e.DOMException=T}),rangy.createModule("DomRange",function(e){function t(e,t){return 3!=e.nodeType&&(F.isAncestorOf(e,t.startContainer,!0)||F.isAncestorOf(e,t.endContainer,!0))}function n(e){return F.getDocument(e.startContainer)}function i(e,t,n){var i=e._listeners[t];if(i)for(var r=0,s=i.length;s>r;++r)i[r].call(e,{target:e,args:n})}function r(e){return new I(e.parentNode,F.getNodeIndex(e))}function s(e){return new I(e.parentNode,F.getNodeIndex(e)+1)}function o(e,t,n){var i=11==e.nodeType?e.firstChild:e;return F.isCharacterDataNode(t)?n==t.length?F.insertAfter(e,t):t.parentNode.insertBefore(e,0==n?t:F.splitDataNode(t,n)):n>=t.childNodes.length?t.appendChild(e):t.insertBefore(e,t.childNodes[n]),i}function a(e){for(var t,i,r,s=n(e.range).createDocumentFragment();i=e.next();){if(t=e.isPartiallySelectedSubtree(),i=i.cloneNode(!t),t&&(r=e.getSubtreeIterator(),i.appendChild(a(r)),r.detach(!0)),10==i.nodeType)throw new H("HIERARCHY_REQUEST_ERR");s.appendChild(i)}return s}function l(e,t,n){var i,r;n=n||{stop:!1};for(var s,o;s=e.next();)if(e.isPartiallySelectedSubtree()){if(t(s)===!1)return n.stop=!0,void 0;if(o=e.getSubtreeIterator(),l(o,t,n),o.detach(!0),n.stop)return}else for(i=F.createIterator(s);r=i.next();)if(t(r)===!1)return n.stop=!0,void 0}function c(e){for(var t;e.next();)e.isPartiallySelectedSubtree()?(t=e.getSubtreeIterator(),c(t),t.detach(!0)):e.remove()}function h(e){for(var t,i,r=n(e.range).createDocumentFragment();t=e.next();){if(e.isPartiallySelectedSubtree()?(t=t.cloneNode(!1),i=e.getSubtreeIterator(),t.appendChild(h(i)),i.detach(!0)):e.remove(),10==t.nodeType)throw new H("HIERARCHY_REQUEST_ERR");r.appendChild(t)}return r}function u(e,t,n){var i,r=!(!t||!t.length),s=!!n;r&&(i=new RegExp("^("+t.join("|")+")$"));var o=[];return l(new f(e,!1),function(e){r&&!i.test(e.nodeType)||s&&!n(e)||o.push(e)}),o}function d(e){var t="undefined"==typeof e.getName?"Range":e.getName();return"["+t+"("+F.inspectNode(e.startContainer)+":"+e.startOffset+", "+F.inspectNode(e.endContainer)+":"+e.endOffset+")]"}function f(e,t){if(this.range=e,this.clonePartiallySelectedTextNodes=t,!e.collapsed){this.sc=e.startContainer,this.so=e.startOffset,this.ec=e.endContainer,this.eo=e.endOffset;var n=e.commonAncestorContainer;this.sc===this.ec&&F.isCharacterDataNode(this.sc)?(this.isSingleCharacterDataNode=!0,this._first=this._last=this._next=this.sc):(this._first=this._next=this.sc!==n||F.isCharacterDataNode(this.sc)?F.getClosestAncestorIn(this.sc,n,!0):this.sc.childNodes[this.so],this._last=this.ec!==n||F.isCharacterDataNode(this.ec)?F.getClosestAncestorIn(this.ec,n,!0):this.ec.childNodes[this.eo-1])}}function p(e){this.code=this[e],this.codeName=e,this.message="RangeException: "+this.codeName}function g(e,t,n){this.nodes=u(e,t,n),this._next=this.nodes[0],this._position=0}function m(e){return function(t,n){for(var i,r=n?t:t.parentNode;r;){if(i=r.nodeType,F.arrayContains(e,i))return r;r=r.parentNode}return null}}function y(e,t){if(V(e,t))throw new p("INVALID_NODE_TYPE_ERR")}function v(e){if(!e.startContainer)throw new H("INVALID_STATE_ERR")}function b(e,t){if(!F.arrayContains(t,e.nodeType))throw new p("INVALID_NODE_TYPE_ERR")}function w(e,t){if(0>t||t>(F.isCharacterDataNode(e)?e.length:e.childNodes.length))throw new H("INDEX_SIZE_ERR")}function _(e,t){if(W(e,!0)!==W(t,!0))throw new H("WRONG_DOCUMENT_ERR")}function x(e){if(U(e,!0))throw new H("NO_MODIFICATION_ALLOWED_ERR")}function C(e,t){if(!e)throw new H(t)}function T(e){return!F.arrayContains(P,e.nodeType)&&!W(e,!0)}function E(e,t){return(F.isCharacterDataNode(e)?e.length:e.childNodes.length)>=t}function k(e){if(v(e),T(e.startContainer)||T(e.endContainer)||!E(e.startContainer,e.startOffset)||!E(e.endContainer,e.endOffset))throw new Error("Range error: Range is no longer valid after DOM mutation ("+e.inspect()+")")}function N(){}function A(e){e.START_TO_START=J,e.START_TO_END=et,e.END_TO_END=tt,e.END_TO_START=nt,e.NODE_BEFORE=it,e.NODE_AFTER=rt,e.NODE_BEFORE_AND_AFTER=st,e.NODE_INSIDE=ot}function S(e){A(e),A(e.prototype)}function D(e,t){return function(){k(this);var n,i,r=this.startContainer,o=this.startOffset,a=this.commonAncestorContainer,c=new f(this,!0);r!==a&&(n=F.getClosestAncestorIn(r,a,!0),i=s(n),r=i.node,o=i.offset),l(c,x),c.reset();var h=e(c);return c.detach(),t(this,r,o,r,o),h}}function M(n,i,o){function a(e,t){return function(n){v(this),b(n,j),b($(n),P);var i=(e?r:s)(n);(t?l:u)(this,i.node,i.offset)}}function l(e,t,n){var r=e.endContainer,s=e.endOffset;(t!==e.startContainer||n!==e.startOffset)&&(($(t)!=$(r)||1==F.comparePoints(t,n,r,s))&&(r=t,s=n),i(e,t,n,r,s))}function u(e,t,n){var r=e.startContainer,s=e.startOffset;(t!==e.endContainer||n!==e.endOffset)&&(($(t)!=$(r)||-1==F.comparePoints(t,n,r,s))&&(r=t,s=n),i(e,r,s,t,n))}function d(e,t,n){(t!==e.startContainer||n!==e.startOffset||t!==e.endContainer||n!==e.endOffset)&&i(e,t,n,t,n)}n.prototype=new N,e.util.extend(n.prototype,{setStart:function(e,t){v(this),y(e,!0),w(e,t),l(this,e,t)},setEnd:function(e,t){v(this),y(e,!0),w(e,t),u(this,e,t)},setStartBefore:a(!0,!0),setStartAfter:a(!1,!0),setEndBefore:a(!0,!1),setEndAfter:a(!1,!1),collapse:function(e){k(this),e?i(this,this.startContainer,this.startOffset,this.startContainer,this.startOffset):i(this,this.endContainer,this.endOffset,this.endContainer,this.endOffset)},selectNodeContents:function(e){v(this),y(e,!0),i(this,e,0,e,F.getNodeLength(e))},selectNode:function(e){v(this),y(e,!1),b(e,j);var t=r(e),n=s(e);i(this,t.node,t.offset,n.node,n.offset)},extractContents:D(h,i),deleteContents:D(c,i),canSurroundContents:function(){k(this),x(this.startContainer),x(this.endContainer);var e=new f(this,!0),n=e._first&&t(e._first,this)||e._last&&t(e._last,this);return e.detach(),!n},detach:function(){o(this)},splitBoundaries:function(){k(this);var e=this.startContainer,t=this.startOffset,n=this.endContainer,r=this.endOffset,s=e===n;F.isCharacterDataNode(n)&&r>0&&n.length>r&&F.splitDataNode(n,r),F.isCharacterDataNode(e)&&t>0&&e.length>t&&(e=F.splitDataNode(e,t),s?(r-=t,n=e):n==e.parentNode&&r>=F.getNodeIndex(e)&&r++,t=0),i(this,e,t,n,r)},normalizeBoundaries:function(){k(this);var e=this.startContainer,t=this.startOffset,n=this.endContainer,r=this.endOffset,s=function(e){var t=e.nextSibling;t&&t.nodeType==e.nodeType&&(n=e,r=e.length,e.appendData(t.data),t.parentNode.removeChild(t))},o=function(i){var s=i.previousSibling;if(s&&s.nodeType==i.nodeType){e=i;var o=i.length;if(t=s.length,i.insertData(0,s.data),s.parentNode.removeChild(s),e==n)r+=t,n=e;else if(n==i.parentNode){var a=F.getNodeIndex(i);r==a?(n=i,r=o):r>a&&r--}}},a=!0;if(F.isCharacterDataNode(n))n.length==r&&s(n);else{if(r>0){var l=n.childNodes[r-1];l&&F.isCharacterDataNode(l)&&s(l)}a=!this.collapsed}if(a){if(F.isCharacterDataNode(e))0==t&&o(e);else if(e.childNodes.length>t){var c=e.childNodes[t];c&&F.isCharacterDataNode(c)&&o(c)}}else e=n,t=r;i(this,e,t,n,r)},collapseToPoint:function(e,t){v(this),y(e,!0),w(e,t),d(this,e,t)}}),S(n)}function R(e){e.collapsed=e.startContainer===e.endContainer&&e.startOffset===e.endOffset,e.commonAncestorContainer=e.collapsed?e.startContainer:F.getCommonAncestor(e.startContainer,e.endContainer)}function L(e,t,n,r,s){var o=e.startContainer!==t||e.startOffset!==n,a=e.endContainer!==r||e.endOffset!==s;e.startContainer=t,e.startOffset=n,e.endContainer=r,e.endOffset=s,R(e),i(e,"boundarychange",{startMoved:o,endMoved:a})}function z(e){v(e),e.startContainer=e.startOffset=e.endContainer=e.endOffset=null,e.collapsed=e.commonAncestorContainer=null,i(e,"detach",null),e._listeners=null}function O(e){this.startContainer=e,this.startOffset=0,this.endContainer=e,this.endOffset=0,this._listeners={boundarychange:[],detach:[]},R(this)}e.requireModules(["DomUtil"]);var F=e.dom,I=F.DomPosition,H=e.DOMException;f.prototype={_current:null,_next:null,_first:null,_last:null,isSingleCharacterDataNode:!1,reset:function(){this._current=null,this._next=this._first},hasNext:function(){return!!this._next},next:function(){var e=this._current=this._next;return e&&(this._next=e!==this._last?e.nextSibling:null,F.isCharacterDataNode(e)&&this.clonePartiallySelectedTextNodes&&(e===this.ec&&(e=e.cloneNode(!0)).deleteData(this.eo,e.length-this.eo),this._current===this.sc&&(e=e.cloneNode(!0)).deleteData(0,this.so))),e},remove:function(){var e,t,n=this._current;!F.isCharacterDataNode(n)||n!==this.sc&&n!==this.ec?n.parentNode&&n.parentNode.removeChild(n):(e=n===this.sc?this.so:0,t=n===this.ec?this.eo:n.length,e!=t&&n.deleteData(e,t-e))},isPartiallySelectedSubtree:function(){var e=this._current;return t(e,this.range)},getSubtreeIterator:function(){var e;if(this.isSingleCharacterDataNode)e=this.range.cloneRange(),e.collapse();else{e=new O(n(this.range));var t=this._current,i=t,r=0,s=t,o=F.getNodeLength(t);F.isAncestorOf(t,this.sc,!0)&&(i=this.sc,r=this.so),F.isAncestorOf(t,this.ec,!0)&&(s=this.ec,o=this.eo),L(e,i,r,s,o)}return new f(e,this.clonePartiallySelectedTextNodes)},detach:function(e){e&&this.range.detach(),this.range=this._current=this._next=this._first=this._last=this.sc=this.so=this.ec=this.eo=null}},p.prototype={BAD_BOUNDARYPOINTS_ERR:1,INVALID_NODE_TYPE_ERR:2},p.prototype.toString=function(){return this.message},g.prototype={_current:null,hasNext:function(){return!!this._next},next:function(){return this._current=this._next,this._next=this.nodes[++this._position],this._current},detach:function(){this._current=this._next=this.nodes=null}};var j=[1,3,4,5,7,8,10],P=[2,9,11],B=[5,6,10,12],q=[1,3,4,5,7,8,10,11],Z=[1,3,4,5,7,8],$=F.getRootContainer,W=m([9,11]),U=m(B),V=m([6,10,12]),X=document.createElement("style"),Y=!1;try{X.innerHTML="
x",Y=3==X.firstChild.nodeType}catch(G){}e.features.htmlParsingConforms=Y;var K=Y?function(e){var t=this.startContainer,n=F.getDocument(t);if(!t)throw new H("INVALID_STATE_ERR");var i=null;return 1==t.nodeType?i=t:F.isCharacterDataNode(t)&&(i=F.parentElement(t)),i=null===i||"HTML"==i.nodeName&&F.isHtmlNamespace(F.getDocument(i).documentElement)&&F.isHtmlNamespace(i)?n.createElement("body"):i.cloneNode(!1),i.innerHTML=e,F.fragmentFromNodeChildren(i)}:function(e){v(this);var t=n(this),i=t.createElement("body");return i.innerHTML=e,F.fragmentFromNodeChildren(i)},Q=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer"],J=0,et=1,tt=2,nt=3,it=0,rt=1,st=2,ot=3;N.prototype={attachListener:function(e,t){this._listeners[e].push(t)},compareBoundaryPoints:function(e,t){k(this),_(this.startContainer,t.startContainer);var n,i,r,s,o=e==nt||e==J?"start":"end",a=e==et||e==J?"start":"end";return n=this[o+"Container"],i=this[o+"Offset"],r=t[a+"Container"],s=t[a+"Offset"],F.comparePoints(n,i,r,s)},insertNode:function(e){if(k(this),b(e,q),x(this.startContainer),F.isAncestorOf(e,this.startContainer,!0))throw new H("HIERARCHY_REQUEST_ERR");var t=o(e,this.startContainer,this.startOffset);this.setStartBefore(t)},cloneContents:function(){k(this);var e,t;if(this.collapsed)return n(this).createDocumentFragment();if(this.startContainer===this.endContainer&&F.isCharacterDataNode(this.startContainer))return e=this.startContainer.cloneNode(!0),e.data=e.data.slice(this.startOffset,this.endOffset),t=n(this).createDocumentFragment(),t.appendChild(e),t;var i=new f(this,!0);return e=a(i),i.detach(),e},canSurroundContents:function(){k(this),x(this.startContainer),x(this.endContainer);var e=new f(this,!0),n=e._first&&t(e._first,this)||e._last&&t(e._last,this);return e.detach(),!n},surroundContents:function(e){if(b(e,Z),!this.canSurroundContents())throw new p("BAD_BOUNDARYPOINTS_ERR");var t=this.extractContents();if(e.hasChildNodes())for(;e.lastChild;)e.removeChild(e.lastChild);o(e,this.startContainer,this.startOffset),e.appendChild(t),this.selectNode(e)},cloneRange:function(){k(this);for(var e,t=new O(n(this)),i=Q.length;i--;)e=Q[i],t[e]=this[e];return t},toString:function(){k(this);var e=this.startContainer;if(e===this.endContainer&&F.isCharacterDataNode(e))return 3==e.nodeType||4==e.nodeType?e.data.slice(this.startOffset,this.endOffset):"";var t=[],n=new f(this,!0);return l(n,function(e){(3==e.nodeType||4==e.nodeType)&&t.push(e.data)}),n.detach(),t.join("")},compareNode:function(e){k(this);var t=e.parentNode,n=F.getNodeIndex(e);if(!t)throw new H("NOT_FOUND_ERR");var i=this.comparePoint(t,n),r=this.comparePoint(t,n+1);return 0>i?r>0?st:it:r>0?rt:ot},comparePoint:function(e,t){return k(this),C(e,"HIERARCHY_REQUEST_ERR"),_(e,this.startContainer),0>F.comparePoints(e,t,this.startContainer,this.startOffset)?-1:F.comparePoints(e,t,this.endContainer,this.endOffset)>0?1:0},createContextualFragment:K,toHtml:function(){k(this);var e=n(this).createElement("div");return e.appendChild(this.cloneContents()),e.innerHTML},intersectsNode:function(e,t){if(k(this),C(e,"NOT_FOUND_ERR"),F.getDocument(e)!==n(this))return!1;var i=e.parentNode,r=F.getNodeIndex(e);C(i,"NOT_FOUND_ERR");var s=F.comparePoints(i,r,this.endContainer,this.endOffset),o=F.comparePoints(i,r+1,this.startContainer,this.startOffset);return t?0>=s&&o>=0:0>s&&o>0},isPointInRange:function(e,t){return k(this),C(e,"HIERARCHY_REQUEST_ERR"),_(e,this.startContainer),F.comparePoints(e,t,this.startContainer,this.startOffset)>=0&&0>=F.comparePoints(e,t,this.endContainer,this.endOffset)},intersectsRange:function(e,t){if(k(this),n(e)!=n(this))throw new H("WRONG_DOCUMENT_ERR");var i=F.comparePoints(this.startContainer,this.startOffset,e.endContainer,e.endOffset),r=F.comparePoints(this.endContainer,this.endOffset,e.startContainer,e.startOffset);return t?0>=i&&r>=0:0>i&&r>0},intersection:function(e){if(this.intersectsRange(e)){var t=F.comparePoints(this.startContainer,this.startOffset,e.startContainer,e.startOffset),n=F.comparePoints(this.endContainer,this.endOffset,e.endContainer,e.endOffset),i=this.cloneRange();return-1==t&&i.setStart(e.startContainer,e.startOffset),1==n&&i.setEnd(e.endContainer,e.endOffset),i}return null},union:function(e){if(this.intersectsRange(e,!0)){var t=this.cloneRange();return-1==F.comparePoints(e.startContainer,e.startOffset,this.startContainer,this.startOffset)&&t.setStart(e.startContainer,e.startOffset),1==F.comparePoints(e.endContainer,e.endOffset,this.endContainer,this.endOffset)&&t.setEnd(e.endContainer,e.endOffset),t}throw new p("Ranges do not intersect")},containsNode:function(e,t){return t?this.intersectsNode(e,!1):this.compareNode(e)==ot},containsNodeContents:function(e){return this.comparePoint(e,0)>=0&&0>=this.comparePoint(e,F.getNodeLength(e))},containsRange:function(e){return this.intersection(e).equals(e)},containsNodeText:function(e){var t=this.cloneRange();t.selectNode(e);var n=t.getNodes([3]);if(n.length>0){t.setStart(n[0],0);var i=n.pop();t.setEnd(i,i.length);var r=this.containsRange(t);return t.detach(),r}return this.containsNodeContents(e)},createNodeIterator:function(e,t){return k(this),new g(this,e,t)},getNodes:function(e,t){return k(this),u(this,e,t)},getDocument:function(){return n(this)},collapseBefore:function(e){v(this),this.setEndBefore(e),this.collapse(!1)},collapseAfter:function(e){v(this),this.setStartAfter(e),this.collapse(!0)},getName:function(){return"DomRange"},equals:function(e){return O.rangesEqual(this,e)},inspect:function(){return d(this)}},M(O,L,z),e.rangePrototype=N.prototype,O.rangeProperties=Q,O.RangeIterator=f,O.copyComparisonConstants=S,O.createPrototypeRange=M,O.inspect=d,O.getRangeDocument=n,O.rangesEqual=function(e,t){return e.startContainer===t.startContainer&&e.startOffset===t.startOffset&&e.endContainer===t.endContainer&&e.endOffset===t.endOffset},e.DomRange=O,e.RangeException=p}),rangy.createModule("WrappedRange",function(e){function t(e){var t=e.parentElement(),n=e.duplicate();n.collapse(!0);var i=n.parentElement();n=e.duplicate(),n.collapse(!1);var r=n.parentElement(),s=i==r?i:o.getCommonAncestor(i,r);return s==t?s:o.getCommonAncestor(t,s)}function n(e){return 0==e.compareEndPoints("StartToEnd",e)}function i(e,t,n,i){var r=e.duplicate();r.collapse(n);var s=r.parentElement();if(o.isAncestorOf(t,s,!0)||(s=t),!s.canHaveHTML)return new a(s.parentNode,o.getNodeIndex(s));var l,c,h,u,d,f=o.getDocument(s).createElement("span"),p=n?"StartToStart":"StartToEnd";do s.insertBefore(f,f.previousSibling),r.moveToElementText(f);while((l=r.compareEndPoints(p,e))>0&&f.previousSibling);if(d=f.nextSibling,-1==l&&d&&o.isCharacterDataNode(d)){r.setEndPoint(n?"EndToStart":"EndToEnd",e);var g;if(/[\r\n]/.test(d.data)){var m=r.duplicate(),y=m.text.replace(/\r\n/g,"\r").length;for(g=m.moveStart("character",y);-1==(l=m.compareEndPoints("StartToEnd",m));)g++,m.moveStart("character",1)}else g=r.text.length;u=new a(d,g)}else c=(i||!n)&&f.previousSibling,h=(i||n)&&f.nextSibling,u=h&&o.isCharacterDataNode(h)?new a(h,0):c&&o.isCharacterDataNode(c)?new a(c,c.length):new a(s,o.getNodeIndex(f));return f.parentNode.removeChild(f),u}function r(e,t){var n,i,r,s,a=e.offset,l=o.getDocument(e.node),c=l.body.createTextRange(),h=o.isCharacterDataNode(e.node);return h?(n=e.node,i=n.parentNode):(s=e.node.childNodes,n=s.length>a?s[a]:null,i=e.node),r=l.createElement("span"),r.innerHTML="feff;",n?i.insertBefore(r,n):i.appendChild(r),c.moveToElementText(r),c.collapse(!t),i.removeChild(r),h&&c[t?"moveStart":"moveEnd"]("character",a),c}e.requireModules(["DomUtil","DomRange"]);var s,o=e.dom,a=o.DomPosition,l=e.DomRange;if(!e.features.implementsDomRange||e.features.implementsTextRange&&e.config.preferTextRange){if(e.features.implementsTextRange){s=function(e){this.textRange=e,this.refresh()},s.prototype=new l(document),s.prototype.refresh=function(){var e,r,s=t(this.textRange);n(this.textRange)?r=e=i(this.textRange,s,!0,!0):(e=i(this.textRange,s,!0,!1),r=i(this.textRange,s,!1,!1)),this.setStart(e.node,e.offset),this.setEnd(r.node,r.offset)},l.copyComparisonConstants(s);var c=function(){return this}();"undefined"==typeof c.Range&&(c.Range=s),e.createNativeRange=function(e){return e=e||document,e.body.createTextRange()}}}else(function(){function t(e){for(var t,n=h.length;n--;)t=h[n],e[t]=e.nativeRange[t]}function n(e,t,n,i,r){var s=e.startContainer!==t||e.startOffset!=n,o=e.endContainer!==i||e.endOffset!=r;(s||o)&&(e.setEnd(i,r),e.setStart(t,n))}function i(e){e.nativeRange.detach(),e.detached=!0;for(var t,n=h.length;n--;)t=h[n],e[t]=null}var r,a,c,h=l.rangeProperties;s=function(e){if(!e)throw new Error("Range must be specified");this.nativeRange=e,t(this)},l.createPrototypeRange(s,n,i),r=s.prototype,r.selectNode=function(e){this.nativeRange.selectNode(e),t(this)},r.deleteContents=function(){this.nativeRange.deleteContents(),t(this)},r.extractContents=function(){var e=this.nativeRange.extractContents();return t(this),e},r.cloneContents=function(){return this.nativeRange.cloneContents()},r.surroundContents=function(e){this.nativeRange.surroundContents(e),t(this)},r.collapse=function(e){this.nativeRange.collapse(e),t(this)},r.cloneRange=function(){return new s(this.nativeRange.cloneRange())},r.refresh=function(){t(this)},r.toString=function(){return this.nativeRange.toString()};var u=document.createTextNode("test");o.getBody(document).appendChild(u);var d=document.createRange();d.setStart(u,0),d.setEnd(u,0);try{d.setStart(u,1),a=!0,r.setStart=function(e,n){this.nativeRange.setStart(e,n),t(this)},r.setEnd=function(e,n){this.nativeRange.setEnd(e,n),t(this)},c=function(e){return function(n){this.nativeRange[e](n),t(this)}}}catch(f){a=!1,r.setStart=function(e,n){try{this.nativeRange.setStart(e,n)}catch(i){this.nativeRange.setEnd(e,n),this.nativeRange.setStart(e,n)}t(this)},r.setEnd=function(e,n){try{this.nativeRange.setEnd(e,n)}catch(i){this.nativeRange.setStart(e,n),this.nativeRange.setEnd(e,n)}t(this)},c=function(e,n){return function(i){try{this.nativeRange[e](i)}catch(r){this.nativeRange[n](i),this.nativeRange[e](i)}t(this)}}}r.setStartBefore=c("setStartBefore","setEndBefore"),r.setStartAfter=c("setStartAfter","setEndAfter"),r.setEndBefore=c("setEndBefore","setStartBefore"),r.setEndAfter=c("setEndAfter","setStartAfter"),d.selectNodeContents(u),r.selectNodeContents=d.startContainer==u&&d.endContainer==u&&0==d.startOffset&&d.endOffset==u.length?function(e){this.nativeRange.selectNodeContents(e),t(this)}:function(e){this.setStart(e,0),this.setEnd(e,l.getEndOffset(e))},d.selectNodeContents(u),d.setEnd(u,3);var p=document.createRange();p.selectNodeContents(u),p.setEnd(u,4),p.setStart(u,2),r.compareBoundaryPoints=-1==d.compareBoundaryPoints(d.START_TO_END,p)&1==d.compareBoundaryPoints(d.END_TO_START,p)?function(e,t){return t=t.nativeRange||t,e==t.START_TO_END?e=t.END_TO_START:e==t.END_TO_START&&(e=t.START_TO_END),this.nativeRange.compareBoundaryPoints(e,t)}:function(e,t){return this.nativeRange.compareBoundaryPoints(e,t.nativeRange||t)},e.util.isHostMethod(d,"createContextualFragment")&&(r.createContextualFragment=function(e){return this.nativeRange.createContextualFragment(e)}),o.getBody(document).removeChild(u),d.detach(),p.detach()})(),e.createNativeRange=function(e){return e=e||document,e.createRange()};e.features.implementsTextRange&&(s.rangeToTextRange=function(e){if(e.collapsed){var t=r(new a(e.startContainer,e.startOffset),!0);return t}var n=r(new a(e.startContainer,e.startOffset),!0),i=r(new a(e.endContainer,e.endOffset),!1),s=o.getDocument(e.startContainer).body.createTextRange();return s.setEndPoint("StartToStart",n),s.setEndPoint("EndToEnd",i),s}),s.prototype.getName=function(){return"WrappedRange"},e.WrappedRange=s,e.createRange=function(t){return t=t||document,new s(e.createNativeRange(t))},e.createRangyRange=function(e){return e=e||document,new l(e)},e.createIframeRange=function(t){return e.createRange(o.getIframeDocument(t))},e.createIframeRangyRange=function(t){return e.createRangyRange(o.getIframeDocument(t))},e.addCreateMissingNativeApiListener(function(t){var n=t.document;"undefined"==typeof n.createRange&&(n.createRange=function(){return e.createRange(this)}),n=t=null})}),rangy.createModule("WrappedSelection",function(e,t){function n(e){return(e||window).getSelection()}function i(e){return(e||window).document.selection}function r(e,t,n){var i=n?"end":"start",r=n?"start":"end";e.anchorNode=t[i+"Container"],e.anchorOffset=t[i+"Offset"],e.focusNode=t[r+"Container"],e.focusOffset=t[r+"Offset"]}function s(e){var t=e.nativeSelection;e.anchorNode=t.anchorNode,e.anchorOffset=t.anchorOffset,e.focusNode=t.focusNode,e.focusOffset=t.focusOffset}function o(e){e.anchorNode=e.focusNode=null,e.anchorOffset=e.focusOffset=0,e.rangeCount=0,e.isCollapsed=!0,e._ranges.length=0}function a(t){var n;return t instanceof T?(n=t._selectionNativeRange,n||(n=e.createNativeRange(x.getDocument(t.startContainer)),n.setEnd(t.endContainer,t.endOffset),n.setStart(t.startContainer,t.startOffset),t._selectionNativeRange=n,t.attachListener("detach",function(){this._selectionNativeRange=null}))):t instanceof E?n=t.nativeRange:e.features.implementsDomRange&&t instanceof x.getWindow(t.startContainer).Range&&(n=t),n}function l(e){if(!e.length||1!=e[0].nodeType)return!1;for(var t=1,n=e.length;n>t;++t)if(!x.isAncestorOf(e[0],e[t]))return!1;return!0}function c(e){var t=e.getNodes();if(!l(t))throw new Error("getSingleElementFromRange: range "+e.inspect()+" did not consist of a single element");return t[0]}function h(e){return!!e&&"undefined"!=typeof e.text}function u(e,t){var n=new E(t);e._ranges=[n],r(e,n,!1),e.rangeCount=1,e.isCollapsed=n.collapsed}function d(t){if(t._ranges.length=0,"None"==t.docSelection.type)o(t);else{var n=t.docSelection.createRange();if(h(n))u(t,n);else{t.rangeCount=n.length;for(var i,s=x.getDocument(n.item(0)),a=0;t.rangeCount>a;++a)i=e.createRange(s),i.selectNode(n.item(a)),t._ranges.push(i);t.isCollapsed=1==t.rangeCount&&t._ranges[0].collapsed,r(t,t._ranges[t.rangeCount-1],!1)}}}function f(e,t){for(var n=e.docSelection.createRange(),i=c(t),r=x.getDocument(n.item(0)),s=x.getBody(r).createControlRange(),o=0,a=n.length;a>o;++o)s.add(n.item(o));try{s.add(i)}catch(l){throw new Error("addRange(): Element within the specified Range could not be added to control selection (does it have layout?)")}s.select(),d(e)}function p(e,t,n){this.nativeSelection=e,this.docSelection=t,this._ranges=[],this.win=n,this.refresh()}function g(e,t){for(var n,i=x.getDocument(t[0].startContainer),r=x.getBody(i).createControlRange(),s=0;rangeCount>s;++s){n=c(t[s]);try{r.add(n)}catch(o){throw new Error("setRanges(): Element within the one of the specified Ranges could not be added to control selection (does it have layout?)")
-}}r.select(),d(e)}function m(e,t){if(e.anchorNode&&x.getDocument(e.anchorNode)!==x.getDocument(t))throw new k("WRONG_DOCUMENT_ERR")}function y(e){var t=[],n=new N(e.anchorNode,e.anchorOffset),i=new N(e.focusNode,e.focusOffset),r="function"==typeof e.getName?e.getName():"Selection";if("undefined"!=typeof e.rangeCount)for(var s=0,o=e.rangeCount;o>s;++s)t[s]=T.inspect(e.getRangeAt(s));return"["+r+"(Ranges: "+t.join(", ")+")(anchor: "+n.inspect()+", focus: "+i.inspect()+"]"}e.requireModules(["DomUtil","DomRange","WrappedRange"]),e.config.checkSelectionRanges=!0;var v,b,w="boolean",_="_rangySelection",x=e.dom,C=e.util,T=e.DomRange,E=e.WrappedRange,k=e.DOMException,N=x.DomPosition,A="Control",S=e.util.isHostMethod(window,"getSelection"),D=e.util.isHostObject(document,"selection"),M=D&&(!S||e.config.preferTextRange);M?(v=i,e.isSelectionValid=function(e){var t=(e||window).document,n=t.selection;return"None"!=n.type||x.getDocument(n.createRange().parentElement())==t}):S?(v=n,e.isSelectionValid=function(){return!0}):t.fail("Neither document.selection or window.getSelection() detected."),e.getNativeSelection=v;var R=v(),L=e.createNativeRange(document),z=x.getBody(document),O=C.areHostObjects(R,["anchorNode","focusNode"]&&C.areHostProperties(R,["anchorOffset","focusOffset"]));e.features.selectionHasAnchorAndFocus=O;var F=C.isHostMethod(R,"extend");e.features.selectionHasExtend=F;var I="number"==typeof R.rangeCount;e.features.selectionHasRangeCount=I;var H=!1,j=!0;C.areHostMethods(R,["addRange","getRangeAt","removeAllRanges"])&&"number"==typeof R.rangeCount&&e.features.implementsDomRange&&function(){var e=document.createElement("iframe");z.appendChild(e);var t=x.getIframeDocument(e);t.open(),t.write("12"),t.close();var n=x.getIframeWindow(e).getSelection(),i=t.documentElement,r=i.lastChild,s=r.firstChild,o=t.createRange();o.setStart(s,1),o.collapse(!0),n.addRange(o),j=1==n.rangeCount,n.removeAllRanges();var a=o.cloneRange();o.setStart(s,0),a.setEnd(s,2),n.addRange(o),n.addRange(a),H=2==n.rangeCount,o.detach(),a.detach(),z.removeChild(e)}(),e.features.selectionSupportsMultipleRanges=H,e.features.collapsedNonEditableSelectionsSupported=j;var P,B=!1;z&&C.isHostMethod(z,"createControlRange")&&(P=z.createControlRange(),C.areHostProperties(P,["item","add"])&&(B=!0)),e.features.implementsControlRange=B,b=O?function(e){return e.anchorNode===e.focusNode&&e.anchorOffset===e.focusOffset}:function(e){return e.rangeCount?e.getRangeAt(e.rangeCount-1).collapsed:!1};var q;C.isHostMethod(R,"getRangeAt")?q=function(e,t){try{return e.getRangeAt(t)}catch(n){return null}}:O&&(q=function(t){var n=x.getDocument(t.anchorNode),i=e.createRange(n);return i.setStart(t.anchorNode,t.anchorOffset),i.setEnd(t.focusNode,t.focusOffset),i.collapsed!==this.isCollapsed&&(i.setStart(t.focusNode,t.focusOffset),i.setEnd(t.anchorNode,t.anchorOffset)),i}),e.getSelection=function(e){e=e||window;var t=e[_],n=v(e),r=D?i(e):null;return t?(t.nativeSelection=n,t.docSelection=r,t.refresh(e)):(t=new p(n,r,e),e[_]=t),t},e.getIframeSelection=function(t){return e.getSelection(x.getIframeWindow(t))};var Z=p.prototype;if(!M&&O&&C.areHostMethods(R,["removeAllRanges","addRange"])){Z.removeAllRanges=function(){this.nativeSelection.removeAllRanges(),o(this)};var $=function(t,n){var i=T.getRangeDocument(n),r=e.createRange(i);r.collapseToPoint(n.endContainer,n.endOffset),t.nativeSelection.addRange(a(r)),t.nativeSelection.extend(n.startContainer,n.startOffset),t.refresh()};Z.addRange=I?function(t,n){if(B&&D&&this.docSelection.type==A)f(this,t);else if(n&&F)$(this,t);else{var i;if(H?i=this.rangeCount:(this.removeAllRanges(),i=0),this.nativeSelection.addRange(a(t)),this.rangeCount=this.nativeSelection.rangeCount,this.rangeCount==i+1){if(e.config.checkSelectionRanges){var s=q(this.nativeSelection,this.rangeCount-1);s&&!T.rangesEqual(s,t)&&(t=new E(s))}this._ranges[this.rangeCount-1]=t,r(this,t,V(this.nativeSelection)),this.isCollapsed=b(this)}else this.refresh()}}:function(e,t){t&&F?$(this,e):(this.nativeSelection.addRange(a(e)),this.refresh())},Z.setRanges=function(e){if(B&&e.length>1)g(this,e);else{this.removeAllRanges();for(var t=0,n=e.length;n>t;++t)this.addRange(e[t])}}}else{if(!(C.isHostMethod(R,"empty")&&C.isHostMethod(L,"select")&&B&&M))return t.fail("No means of selecting a Range or TextRange was found"),!1;Z.removeAllRanges=function(){try{if(this.docSelection.empty(),"None"!=this.docSelection.type){var e;if(this.anchorNode)e=x.getDocument(this.anchorNode);else if(this.docSelection.type==A){var t=this.docSelection.createRange();t.length&&(e=x.getDocument(t.item(0)).body.createTextRange())}if(e){var n=e.body.createTextRange();n.select(),this.docSelection.empty()}}}catch(i){}o(this)},Z.addRange=function(e){this.docSelection.type==A?f(this,e):(E.rangeToTextRange(e).select(),this._ranges[0]=e,this.rangeCount=1,this.isCollapsed=this._ranges[0].collapsed,r(this,e,!1))},Z.setRanges=function(e){this.removeAllRanges();var t=e.length;t>1?g(this,e):t&&this.addRange(e[0])}}Z.getRangeAt=function(e){if(0>e||e>=this.rangeCount)throw new k("INDEX_SIZE_ERR");return this._ranges[e]};var W;if(M)W=function(t){var n;e.isSelectionValid(t.win)?n=t.docSelection.createRange():(n=x.getBody(t.win.document).createTextRange(),n.collapse(!0)),t.docSelection.type==A?d(t):h(n)?u(t,n):o(t)};else if(C.isHostMethod(R,"getRangeAt")&&"number"==typeof R.rangeCount)W=function(t){if(B&&D&&t.docSelection.type==A)d(t);else if(t._ranges.length=t.rangeCount=t.nativeSelection.rangeCount,t.rangeCount){for(var n=0,i=t.rangeCount;i>n;++n)t._ranges[n]=new e.WrappedRange(t.nativeSelection.getRangeAt(n));r(t,t._ranges[t.rangeCount-1],V(t.nativeSelection)),t.isCollapsed=b(t)}else o(t)};else{if(!O||typeof R.isCollapsed!=w||typeof L.collapsed!=w||!e.features.implementsDomRange)return t.fail("No means of obtaining a Range or TextRange from the user's selection was found"),!1;W=function(e){var t,n=e.nativeSelection;n.anchorNode?(t=q(n,0),e._ranges=[t],e.rangeCount=1,s(e),e.isCollapsed=b(e)):o(e)}}Z.refresh=function(e){var t=e?this._ranges.slice(0):null;if(W(this),e){var n=t.length;if(n!=this._ranges.length)return!1;for(;n--;)if(!T.rangesEqual(t[n],this._ranges[n]))return!1;return!0}};var U=function(e,t){var n=e.getAllRanges(),i=!1;e.removeAllRanges();for(var r=0,s=n.length;s>r;++r)i||t!==n[r]?e.addRange(n[r]):i=!0;e.rangeCount||o(e)};Z.removeRange=B?function(e){if(this.docSelection.type==A){for(var t,n=this.docSelection.createRange(),i=c(e),r=x.getDocument(n.item(0)),s=x.getBody(r).createControlRange(),o=!1,a=0,l=n.length;l>a;++a)t=n.item(a),t!==i||o?s.add(n.item(a)):o=!0;s.select(),d(this)}else U(this,e)}:function(e){U(this,e)};var V;!M&&O&&e.features.implementsDomRange?(V=function(e){var t=!1;return e.anchorNode&&(t=1==x.comparePoints(e.anchorNode,e.anchorOffset,e.focusNode,e.focusOffset)),t},Z.isBackwards=function(){return V(this)}):V=Z.isBackwards=function(){return!1},Z.toString=function(){for(var e=[],t=0,n=this.rangeCount;n>t;++t)e[t]=""+this._ranges[t];return e.join("")},Z.collapse=function(t,n){m(this,t);var i=e.createRange(x.getDocument(t));i.collapseToPoint(t,n),this.removeAllRanges(),this.addRange(i),this.isCollapsed=!0},Z.collapseToStart=function(){if(!this.rangeCount)throw new k("INVALID_STATE_ERR");var e=this._ranges[0];this.collapse(e.startContainer,e.startOffset)},Z.collapseToEnd=function(){if(!this.rangeCount)throw new k("INVALID_STATE_ERR");var e=this._ranges[this.rangeCount-1];this.collapse(e.endContainer,e.endOffset)},Z.selectAllChildren=function(t){m(this,t);var n=e.createRange(x.getDocument(t));n.selectNodeContents(t),this.removeAllRanges(),this.addRange(n)},Z.deleteFromDocument=function(){if(B&&D&&this.docSelection.type==A){for(var e,t=this.docSelection.createRange();t.length;)e=t.item(0),t.remove(e),e.parentNode.removeChild(e);this.refresh()}else if(this.rangeCount){var n=this.getAllRanges();this.removeAllRanges();for(var i=0,r=n.length;r>i;++i)n[i].deleteContents();this.addRange(n[r-1])}},Z.getAllRanges=function(){return this._ranges.slice(0)},Z.setSingleRange=function(e){this.setRanges([e])},Z.containsNode=function(e,t){for(var n=0,i=this._ranges.length;i>n;++n)if(this._ranges[n].containsNode(e,t))return!0;return!1},Z.toHtml=function(){var e="";if(this.rangeCount){for(var t=T.getRangeDocument(this._ranges[0]).createElement("div"),n=0,i=this._ranges.length;i>n;++n)t.appendChild(this._ranges[n].cloneContents());e=t.innerHTML}return e},Z.getName=function(){return"WrappedSelection"},Z.inspect=function(){return y(this)},Z.detach=function(){this.win[_]=null,this.win=this.anchorNode=this.focusNode=null},p.inspect=y,e.Selection=p,e.selectionPrototype=Z,e.addCreateMissingNativeApiListener(function(t){"undefined"==typeof t.getSelection&&(t.getSelection=function(){return e.getSelection(this)}),t=null})});/*
- Base.js, version 1.1a
- Copyright 2006-2010, Dean Edwards
- License: http://www.opensource.org/licenses/mit-license.php
-*/
-var Base=function(){};Base.extend=function(e,t){var n=Base.prototype.extend;Base._prototyping=!0;var i=new this;n.call(i,e),i.base=function(){},delete Base._prototyping;var r=i.constructor,s=i.constructor=function(){if(!Base._prototyping)if(this._constructing||this.constructor==s)this._constructing=!0,r.apply(this,arguments),delete this._constructing;else if(null!=arguments[0])return(arguments[0].extend||n).call(arguments[0],i)};return s.ancestor=this,s.extend=this.extend,s.forEach=this.forEach,s.implement=this.implement,s.prototype=i,s.toString=this.toString,s.valueOf=function(e){return"object"==e?s:r.valueOf()},n.call(s,t),"function"==typeof s.init&&s.init(),s},Base.prototype={extend:function(e,t){if(arguments.length>1){var n=this[e];if(n&&"function"==typeof t&&(!n.valueOf||n.valueOf()!=t.valueOf())&&/\bbase\b/.test(t)){var i=t.valueOf();t=function(){var e=this.base||Base.prototype.base;this.base=n;var t=i.apply(this,arguments);return this.base=e,t},t.valueOf=function(e){return"object"==e?t:i},t.toString=Base.toString}this[e]=t}else if(e){var r=Base.prototype.extend;Base._prototyping||"function"==typeof this||(r=this.extend||r);for(var s={toSource:null},o=["constructor","toString","valueOf"],a=Base._prototyping?0:1;l=o[a++];)e[l]!=s[l]&&r.call(this,l,e[l]);for(var l in e)s[l]||r.call(this,l,e[l])}return this}},Base=Base.extend({constructor:function(){this.extend(arguments[0])}},{ancestor:Object,version:"1.1",forEach:function(e,t,n){for(var i in e)void 0===this.prototype[i]&&t.call(n,e[i],i,e)},implement:function(){for(var e=0;arguments.length>e;e++)"function"==typeof arguments[e]?arguments[e](this.prototype):this.prototype.extend(arguments[e]);return this},toString:function(){return String(this.valueOf())}}),wysihtml5.browser=function(){function e(e){return(/ipad|iphone|ipod/.test(e)&&e.match(/ os (\d+).+? like mac os x/)||[,0])[1]}var t=navigator.userAgent,n=document.createElement("div"),i=-1!==t.indexOf("MSIE")&&-1===t.indexOf("Opera"),r=-1!==t.indexOf("Gecko")&&-1===t.indexOf("KHTML"),s=-1!==t.indexOf("AppleWebKit/"),o=-1!==t.indexOf("Chrome/"),a=-1!==t.indexOf("Opera/");return{USER_AGENT:t,supported:function(){var t=this.USER_AGENT.toLowerCase(),i="contentEditable"in n,r=document.execCommand&&document.queryCommandSupported&&document.queryCommandState,s=document.querySelector&&document.querySelectorAll,o=this.isIos()&&5>e(t)||-1!==t.indexOf("opera mobi")||-1!==t.indexOf("hpwos/");return i&&r&&s&&!o},isTouchDevice:function(){return this.supportsEvent("touchmove")},isIos:function(){var e=this.USER_AGENT.toLowerCase();return-1!==e.indexOf("webkit")&&-1!==e.indexOf("mobile")},supportsSandboxedIframes:function(){return i},throwsMixedContentWarningWhenIframeSrcIsEmpty:function(){return!("querySelector"in document)},displaysCaretInEmptyContentEditableCorrectly:function(){return!r},hasCurrentStyleProperty:function(){return"currentStyle"in n},insertsLineBreaksOnReturn:function(){return r},supportsPlaceholderAttributeOn:function(e){return"placeholder"in e},supportsEvent:function(e){return"on"+e in n||function(){return n.setAttribute("on"+e,"return;"),"function"==typeof n["on"+e]}()},supportsEventsInIframeCorrectly:function(){return!a},firesOnDropOnlyWhenOnDragOverIsCancelled:function(){return s||r},supportsDataTransfer:function(){try{return s&&(window.Clipboard||window.DataTransfer).prototype.getData}catch(e){return!1}},supportsHTML5Tags:function(e){var t=e.createElement("div"),n="
foo";return t.innerHTML=n,t.innerHTML.toLowerCase()===n},supportsCommand:function(){var e={formatBlock:i,insertUnorderedList:i||a||s,insertOrderedList:i||a||s},t={insertHTML:r};return function(n,i){var r=e[i];if(!r){try{return n.queryCommandSupported(i)}catch(s){}try{return n.queryCommandEnabled(i)}catch(o){return!!t[i]}}return!1}}(),doesAutoLinkingInContentEditable:function(){return i},canDisableAutoLinking:function(){return this.supportsCommand(document,"AutoUrlDetect")},clearsContentEditableCorrectly:function(){return r||a||s},supportsGetAttributeCorrectly:function(){var e=document.createElement("td");return"1"!=e.getAttribute("rowspan")},canSelectImagesInContentEditable:function(){return r||i||a},clearsListsInContentEditableCorrectly:function(){return r||i||s},autoScrollsToCaret:function(){return!s},autoClosesUnclosedTags:function(){var e,t,i=n.cloneNode(!1);return i.innerHTML="
",t=i.innerHTML.toLowerCase(),e="
"===t||"
"===t,this.autoClosesUnclosedTags=function(){return e},e},supportsNativeGetElementsByClassName:function(){return-1!==String(document.getElementsByClassName).indexOf("[native code]")},supportsSelectionModify:function(){return"getSelection"in window&&"modify"in window.getSelection()},supportsClassList:function(){return"classList"in n},needsSpaceAfterLineBreak:function(){return a},supportsSpeechApiOn:function(e){var n=t.match(/Chrome\/(\d+)/)||[,0];return n[1]>=11&&("onwebkitspeechchange"in e||"speech"in e)},crashesWhenDefineProperty:function(e){return i&&("XMLHttpRequest"===e||"XDomainRequest"===e)},doesAsyncFocus:function(){return i},hasProblemsSettingCaretAfterImg:function(){return i},hasUndoInContextMenu:function(){return r||o||a}}}(),wysihtml5.lang.array=function(e){return{contains:function(t){if(e.indexOf)return-1!==e.indexOf(t);for(var n=0,i=e.length;i>n;n++)if(e[n]===t)return!0;return!1},without:function(t){t=wysihtml5.lang.array(t);for(var n=[],i=0,r=e.length;r>i;i++)t.contains(e[i])||n.push(e[i]);return n},get:function(){for(var t=0,n=e.length,i=[];n>t;t++)i.push(e[t]);return i}}},wysihtml5.lang.Dispatcher=Base.extend({observe:function(e,t){return this.events=this.events||{},this.events[e]=this.events[e]||[],this.events[e].push(t),this},on:function(){return this.observe.apply(this,wysihtml5.lang.array(arguments).get())},fire:function(e,t){this.events=this.events||{};for(var n=this.events[e]||[],i=0;n.length>i;i++)n[i].call(this,t);return this},stopObserving:function(e,t){this.events=this.events||{};var n,i,r=0;if(e){for(n=this.events[e]||[],i=[];n.length>r;r++)n[r]!==t&&t&&i.push(n[r]);this.events[e]=i}else this.events={};return this}}),wysihtml5.lang.object=function(e){return{merge:function(t){for(var n in t)e[n]=t[n];return this},get:function(){return e},clone:function(){var t,n={};for(t in e)n[t]=e[t];return n},isArray:function(){return"[object Array]"===Object.prototype.toString.call(e)}}},function(){var e=/^\s+/,t=/\s+$/;wysihtml5.lang.string=function(n){return n=String(n),{trim:function(){return n.replace(e,"").replace(t,"")},interpolate:function(e){for(var t in e)n=this.replace("#{"+t+"}").by(e[t]);return n},replace:function(e){return{by:function(t){return n.split(e).join(t)}}}}}}(),function(e){function t(e){return s(e)?e:(e===e.ownerDocument.documentElement&&(e=e.ownerDocument.body),o(e))}function n(e){return e.replace(l,function(e,t){var n=(t.match(c)||[])[1]||"",i=u[n];t=t.replace(c,""),t.split(i).length>t.split(n).length&&(t+=n,n="");var r=t,s=t;return t.length>h&&(s=s.substr(0,h)+"..."),"www."===r.substr(0,4)&&(r="http://"+r),'
'+s+""+n})}function i(e){var t=e._wysihtml5_tempElement;return t||(t=e._wysihtml5_tempElement=e.createElement("div")),t}function r(e){var t=e.parentNode,r=i(t.ownerDocument);for(r.innerHTML="
"+n(e.data),r.removeChild(r.firstChild);r.firstChild;)t.insertBefore(r.firstChild,e);t.removeChild(e)}function s(e){for(var t;e.parentNode;){if(e=e.parentNode,t=e.nodeName,a.contains(t))return!0;if("body"===t)return!1}return!1}function o(t){if(!a.contains(t.nodeName)){if(t.nodeType===e.TEXT_NODE&&t.data.match(l))return r(t),void 0;for(var n=e.lang.array(t.childNodes).get(),i=n.length,s=0;i>s;s++)o(n[s]);return t}}var a=e.lang.array(["CODE","PRE","A","SCRIPT","HEAD","TITLE","STYLE"]),l=/((https?:\/\/|www\.)[^\s<]{3,})/gi,c=/([^\w\/\-](,?))$/i,h=100,u={")":"(","]":"[","}":"{"};e.dom.autoLink=t,e.dom.autoLink.URL_REG_EXP=l}(wysihtml5),function(e){var t=e.browser.supportsClassList(),n=e.dom;n.addClass=function(e,i){return t?e.classList.add(i):(n.hasClass(e,i)||(e.className+=" "+i),void 0)},n.removeClass=function(e,n){return t?e.classList.remove(n):(e.className=e.className.replace(new RegExp("(^|\\s+)"+n+"(\\s+|$)")," "),void 0)},n.hasClass=function(e,n){if(t)return e.classList.contains(n);var i=e.className;return i.length>0&&(i==n||new RegExp("(^|\\s)"+n+"(\\s|$)").test(i))}}(wysihtml5),wysihtml5.dom.contains=function(){var e=document.documentElement;return e.contains?function(e,t){return t.nodeType!==wysihtml5.ELEMENT_NODE&&(t=t.parentNode),e!==t&&e.contains(t)}:e.compareDocumentPosition?function(e,t){return!!(16&e.compareDocumentPosition(t))}:void 0}(),wysihtml5.dom.convertToList=function(){function e(e,t){var n=e.createElement("li");return t.appendChild(n),n}function t(e,t){return e.createElement(t)}function n(n,i){if("UL"===n.nodeName||"OL"===n.nodeName||"MENU"===n.nodeName)return n;var r,s,o,a,l,c,h,u,d,f=n.ownerDocument,p=t(f,i),g=n.querySelectorAll("br"),m=g.length;for(d=0;m>d;d++)for(a=g[d];(l=a.parentNode)&&l!==n&&l.lastChild===a;){if("block"===wysihtml5.dom.getStyle("display").from(l)){l.removeChild(a);break}wysihtml5.dom.insert(a).after(a.parentNode)}for(r=wysihtml5.lang.array(n.childNodes).get(),s=r.length,d=0;s>d;d++)u=u||e(f,p),o=r[d],c="block"===wysihtml5.dom.getStyle("display").from(o),h="BR"===o.nodeName,c?(u=u.firstChild?e(f,p):u,u.appendChild(o),u=null):h?u=u.firstChild?null:u:u.appendChild(o);return n.parentNode.replaceChild(p,n),p}return n}(),wysihtml5.dom.copyAttributes=function(e){return{from:function(t){return{to:function(n){for(var i,r=0,s=e.length;s>r;r++)i=e[r],"undefined"!=typeof t[i]&&""!==t[i]&&(n[i]=t[i]);return{andTo:arguments.callee}}}}}},function(e){var t=["-webkit-box-sizing","-moz-box-sizing","-ms-box-sizing","box-sizing"],n=function(t){return i(t)?parseInt(e.getStyle("width").from(t),10)
i;i++)if("border-box"===e.getStyle(t[i]).from(n))return t[i]};e.copyStyles=function(i){return{from:function(r){n(r)&&(i=wysihtml5.lang.array(i).without(t));for(var s,o="",a=i.length,l=0;a>l;l++)s=i[l],o+=s+":"+e.getStyle(s).from(r)+";";return{to:function(t){return e.setStyles(o).on(t),{andTo:arguments.callee}}}}}}}(wysihtml5.dom),function(e){e.dom.delegate=function(t,n,i,r){return e.dom.observe(t,i,function(i){for(var s=i.target,o=e.lang.array(t.querySelectorAll(n));s&&s!==t;){if(o.contains(s)){r.call(s,i);break}s=s.parentNode}})}}(wysihtml5),wysihtml5.dom.getAsDom=function(){var e=function(e,t){var n=t.createElement("div");n.style.display="none",t.body.appendChild(n);try{n.innerHTML=e}catch(i){}return t.body.removeChild(n),n},t=function(e){if(!e._wysihtml5_supportsHTML5Tags){for(var t=0,i=n.length;i>t;t++)e.createElement(n[t]);e._wysihtml5_supportsHTML5Tags=!0}},n=["abbr","article","aside","audio","bdi","canvas","command","datalist","details","figcaption","figure","footer","header","hgroup","keygen","mark","meter","nav","output","progress","rp","rt","ruby","svg","section","source","summary","time","track","video","wbr"];return function(n,i){i=i||document;var r;return"object"==typeof n&&n.nodeType?(r=i.createElement("div"),r.appendChild(n)):wysihtml5.browser.supportsHTML5Tags(i)?(r=i.createElement("div"),r.innerHTML=n):(t(i),r=e(n,i)),r}}(),wysihtml5.dom.getParentElement=function(){function e(e,t){return t&&t.length?"string"==typeof t?e===t:wysihtml5.lang.array(t).contains(e):!0}function t(e){return e.nodeType===wysihtml5.ELEMENT_NODE}function n(e,t,n){var i=(e.className||"").match(n)||[];return t?i[i.length-1]===t:!!i.length}function i(t,n,i){for(;i--&&t&&"BODY"!==t.nodeName;){if(e(t.nodeName,n))return t;t=t.parentNode}return null}function r(i,r,s,o,a){for(;a--&&i&&"BODY"!==i.nodeName;){if(t(i)&&e(i.nodeName,r)&&n(i,s,o))return i;i=i.parentNode}return null}return function(e,t,n){return n=n||50,t.className||t.classRegExp?r(e,t.nodeName,t.className,t.classRegExp,n):i(e,t.nodeName,n)}}(),wysihtml5.dom.getStyle=function(){function e(e){return e.replace(n,function(e){return e.charAt(1).toUpperCase()})}var t={"float":"styleFloat"in document.createElement("div").style?"styleFloat":"cssFloat"},n=/\-[a-z]/g;return function(n){return{from:function(i){if(i.nodeType===wysihtml5.ELEMENT_NODE){var r=i.ownerDocument,s=t[n]||e(n),o=i.style,a=i.currentStyle,l=o[s];if(l)return l;if(a)try{return a[s]}catch(c){}var h,u,d=r.defaultView||r.parentWindow,f=("height"===n||"width"===n)&&"TEXTAREA"===i.nodeName;return d.getComputedStyle?(f&&(h=o.overflow,o.overflow="hidden"),u=d.getComputedStyle(i,null).getPropertyValue(n),f&&(o.overflow=h||""),u):void 0}}}}}(),wysihtml5.dom.hasElementWithTagName=function(){function e(e){return e._wysihtml5_identifier||(e._wysihtml5_identifier=n++)}var t={},n=1;return function(n,i){var r=e(n)+":"+i,s=t[r];return s||(s=t[r]=n.getElementsByTagName(i)),s.length>0}}(),function(e){function t(e){return e._wysihtml5_identifier||(e._wysihtml5_identifier=i++)}var n={},i=1;e.dom.hasElementWithClassName=function(i,r){if(!e.browser.supportsNativeGetElementsByClassName())return!!i.querySelector("."+r);var s=t(i)+":"+r,o=n[s];return o||(o=n[s]=i.getElementsByClassName(r)),o.length>0}}(wysihtml5),wysihtml5.dom.insert=function(e){return{after:function(t){t.parentNode.insertBefore(e,t.nextSibling)},before:function(t){t.parentNode.insertBefore(e,t)},into:function(t){t.appendChild(e)}}},wysihtml5.dom.insertCSS=function(e){return e=e.join("\n"),{into:function(t){var n=t.head||t.getElementsByTagName("head")[0],i=t.createElement("style");i.type="text/css",i.styleSheet?i.styleSheet.cssText=e:i.appendChild(t.createTextNode(e)),n&&n.appendChild(i)}}},wysihtml5.dom.observe=function(e,t,n){t="string"==typeof t?[t]:t;for(var i,r,s=0,o=t.length;o>s;s++)r=t[s],e.addEventListener?e.addEventListener(r,n,!1):(i=function(t){"target"in t||(t.target=t.srcElement),t.preventDefault=t.preventDefault||function(){this.returnValue=!1},t.stopPropagation=t.stopPropagation||function(){this.cancelBubble=!0},n.call(e,t)},e.attachEvent("on"+r,i));return{stop:function(){for(var r,s=0,o=t.length;o>s;s++)r=t[s],e.removeEventListener?e.removeEventListener(r,n,!1):e.detachEvent("on"+r,i)}}},wysihtml5.dom.parse=function(){function e(e,n,i,r){wysihtml5.lang.object(u).merge(h).merge(n).get(),i=i||e.ownerDocument||document;var s,o,a,l=i.createDocumentFragment(),c="string"==typeof e;for(s=c?wysihtml5.dom.getAsDom(e,i):e;s.firstChild;)a=s.firstChild,s.removeChild(a),o=t(a,r),o&&l.appendChild(o);return s.innerHTML="",s.appendChild(l),c?wysihtml5.quirks.getCorrectInnerHTML(s):s}function t(e,n){var i,r=e.nodeType,s=e.childNodes,o=s.length,c=a[r],h=0;if(i=c&&c(e),!i)return null;for(h=0;o>h;h++)newChild=t(s[h],n),newChild&&i.appendChild(newChild);return n&&1>=i.childNodes.length&&i.nodeName.toLowerCase()===l&&!i.attributes.length?i.firstChild:i}function n(e){var t,n,r=u.tags,s=e.nodeName.toLowerCase(),o=e.scopeName;if(e._wysihtml5)return null;if(e._wysihtml5=1,"wysihtml5-temp"===e.className)return null;if(o&&"HTML"!=o&&(s=o+":"+s),"outerHTML"in e&&(wysihtml5.browser.autoClosesUnclosedTags()||"P"!==e.nodeName||""===e.outerHTML.slice(-4).toLowerCase()||(s="div")),s in r){if(t=r[s],!t||t.remove)return null;t="string"==typeof t?{rename_tag:t}:t}else{if(!e.firstChild)return null;t={rename_tag:l}}return n=e.ownerDocument.createElement(t.rename_tag||s),i(e,n,t),e=null,n}function i(e,t,n){var i,s,o,a,l,h,d,g={},m=n.set_class,y=n.add_class,v=n.set_attributes,b=n.check_attributes,w=u.classes,_=0,x=[],C=[],T=[],E=[];if(v&&(g=wysihtml5.lang.object(v).clone()),b)for(l in b)d=f[b[l]],d&&(h=d(r(e,l)),"string"==typeof h&&(g[l]=h));if(m&&x.push(m),y)for(l in y)d=p[y[l]],d&&(a=d(r(e,l)),"string"==typeof a&&x.push(a));for(w["_wysihtml5-temp-placeholder"]=1,E=e.getAttribute("class"),E&&(x=x.concat(E.split(c))),i=x.length;i>_;_++)o=x[_],w[o]&&C.push(o);for(s=C.length;s--;)o=C[s],wysihtml5.lang.array(T).contains(o)||T.unshift(o);T.length&&(g["class"]=T.join(" "));for(l in g)try{t.setAttribute(l,g[l])}catch(k){}g.src&&("undefined"!=typeof g.width&&t.setAttribute("width",g.width),"undefined"!=typeof g.height&&t.setAttribute("height",g.height))}function r(e,t){t=t.toLowerCase();var n=e.nodeName;if("IMG"==n&&"src"==t&&s(e)===!0)return e.src;if(d&&"outerHTML"in e){var i=e.outerHTML.toLowerCase(),r=-1!=i.indexOf(" "+t+"=");return r?e.getAttribute(t):null}return e.getAttribute(t)}function s(e){try{return e.complete&&!e.mozMatchesSelector(":-moz-broken")}catch(t){if(e.complete&&"complete"===e.readyState)return!0}}function o(e){return e.ownerDocument.createTextNode(e.data)}var a={1:n,3:o},l="span",c=/\s+/,h={tags:{},classes:{}},u={},d=!wysihtml5.browser.supportsGetAttributeCorrectly(),f={url:function(){var e=/^https?:\/\//i;return function(t){return t&&t.match(e)?t.replace(e,function(e){return e.toLowerCase()}):null}}(),alt:function(){var e=/[^ a-z0-9_\-]/gi;return function(t){return t?t.replace(e,""):""}}(),numbers:function(){var e=/\D/g;return function(t){return t=(t||"").replace(e,""),t||null}}()},p={align_img:function(){var e={left:"wysiwyg-float-left",right:"wysiwyg-float-right"};return function(t){return e[String(t).toLowerCase()]}}(),align_text:function(){var e={left:"wysiwyg-text-align-left",right:"wysiwyg-text-align-right",center:"wysiwyg-text-align-center",justify:"wysiwyg-text-align-justify"};return function(t){return e[String(t).toLowerCase()]}}(),clear_br:function(){var e={left:"wysiwyg-clear-left",right:"wysiwyg-clear-right",both:"wysiwyg-clear-both",all:"wysiwyg-clear-both"};return function(t){return e[String(t).toLowerCase()]}}(),size_font:function(){var e={1:"wysiwyg-font-size-xx-small",2:"wysiwyg-font-size-small",3:"wysiwyg-font-size-medium",4:"wysiwyg-font-size-large",5:"wysiwyg-font-size-x-large",6:"wysiwyg-font-size-xx-large",7:"wysiwyg-font-size-xx-large","-":"wysiwyg-font-size-smaller","+":"wysiwyg-font-size-larger"};return function(t){return e[String(t).charAt(0)]}}()};return e}(),wysihtml5.dom.removeEmptyTextNodes=function(e){for(var t,n=wysihtml5.lang.array(e.childNodes).get(),i=n.length,r=0;i>r;r++)t=n[r],t.nodeType===wysihtml5.TEXT_NODE&&""===t.data&&t.parentNode.removeChild(t)},wysihtml5.dom.renameElement=function(e,t){for(var n,i=e.ownerDocument.createElement(t);n=e.firstChild;)i.appendChild(n);return wysihtml5.dom.copyAttributes(["align","className"]).from(e).to(i),e.parentNode.replaceChild(i,e),i},wysihtml5.dom.replaceWithChildNodes=function(e){if(e.parentNode){if(!e.firstChild)return e.parentNode.removeChild(e),void 0;for(var t=e.ownerDocument.createDocumentFragment();e.firstChild;)t.appendChild(e.firstChild);e.parentNode.replaceChild(t,e),e=t=null}},function(e){function t(t){return"block"===e.getStyle("display").from(t)}function n(e){return"BR"===e.nodeName}function i(e){var t=e.ownerDocument.createElement("br");e.appendChild(t)}function r(e){if("MENU"===e.nodeName||"UL"===e.nodeName||"OL"===e.nodeName){var r,s,o,a,l,c=e.ownerDocument,h=c.createDocumentFragment(),u=e.previousElementSibling||e.previousSibling;for(u&&!t(u)&&i(h);l=e.firstChild;){for(s=l.lastChild;r=l.firstChild;)o=r===s,a=o&&!t(r)&&!n(r),h.appendChild(r),a&&i(h);l.parentNode.removeChild(l)}e.parentNode.replaceChild(h,e)}}e.resolveList=r}(wysihtml5.dom),function(e){var t=document,n=["parent","top","opener","frameElement","frames","localStorage","globalStorage","sessionStorage","indexedDB"],i=["open","close","openDialog","showModalDialog","alert","confirm","prompt","openDatabase","postMessage","XMLHttpRequest","XDomainRequest"],r=["referrer","write","open","close"];e.dom.Sandbox=Base.extend({constructor:function(t,n){this.callback=t||e.EMPTY_FUNCTION,this.config=e.lang.object({}).merge(n).get(),this.iframe=this._createIframe()},insertInto:function(e){"string"==typeof e&&(e=t.getElementById(e)),e.appendChild(this.iframe)},getIframe:function(){return this.iframe},getWindow:function(){this._readyError()},getDocument:function(){this._readyError()},destroy:function(){var e=this.getIframe();e.parentNode.removeChild(e)},_readyError:function(){throw new Error("wysihtml5.Sandbox: Sandbox iframe isn't loaded yet")},_createIframe:function(){var n=this,i=t.createElement("iframe");return i.className="wysihtml5-sandbox",e.dom.setAttributes({security:"restricted",allowtransparency:"true",frameborder:0,width:0,height:0,marginwidth:0,marginheight:0}).on(i),e.browser.throwsMixedContentWarningWhenIframeSrcIsEmpty()&&(i.src="javascript:''"),i.onload=function(){i.onreadystatechange=i.onload=null,n._onLoadIframe(i)},i.onreadystatechange=function(){/loaded|complete/.test(i.readyState)&&(i.onreadystatechange=i.onload=null,n._onLoadIframe(i))},i},_onLoadIframe:function(s){if(e.dom.contains(t.documentElement,s)){var o=this,a=s.contentWindow,l=s.contentWindow.document,c=t.characterSet||t.charset||"utf-8",h=this._getHtml({charset:c,stylesheets:this.config.stylesheets});if(l.open("text/html","replace"),l.write(h),l.close(),this.getWindow=function(){return s.contentWindow},this.getDocument=function(){return s.contentWindow.document},a.onerror=function(e,t,n){throw new Error("wysihtml5.Sandbox: "+e,t,n)},!e.browser.supportsSandboxedIframes()){var u,d;for(u=0,d=n.length;d>u;u++)this._unset(a,n[u]);for(u=0,d=i.length;d>u;u++)this._unset(a,i[u],e.EMPTY_FUNCTION);for(u=0,d=r.length;d>u;u++)this._unset(l,r[u]);this._unset(l,"cookie","",!0)}this.loaded=!0,setTimeout(function(){o.callback(o)},0)}},_getHtml:function(t){var n,i=t.stylesheets,r="",s=0;if(i="string"==typeof i?[i]:i)for(n=i.length;n>s;s++)r+='';return t.stylesheets=r,e.lang.string('#{stylesheets}').interpolate(t)},_unset:function(t,n,i,r){try{t[n]=i}catch(s){}try{t.__defineGetter__(n,function(){return i})}catch(s){}if(r)try{t.__defineSetter__(n,function(){})}catch(s){}if(!e.browser.crashesWhenDefineProperty(n))try{var o={get:function(){return i}};r&&(o.set=function(){}),Object.defineProperty(t,n,o)}catch(s){}}})}(wysihtml5),function(){var e={className:"class"};wysihtml5.dom.setAttributes=function(t){return{on:function(n){for(var i in t)n.setAttribute(e[i]||i,t[i])}}}}(),wysihtml5.dom.setStyles=function(e){return{on:function(t){var n=t.style;if("string"==typeof e)return n.cssText+=";"+e,void 0;for(var i in e)"float"===i?(n.cssFloat=e[i],n.styleFloat=e[i]):n[i]=e[i]}}},function(e){e.simulatePlaceholder=function(t,n,i){var r="placeholder",s=function(){n.hasPlaceholderSet()&&n.clear(),e.removeClass(n.element,r)},o=function(){n.isEmpty()&&(n.setValue(i),e.addClass(n.element,r))};t.observe("set_placeholder",o).observe("unset_placeholder",s).observe("focus:composer",s).observe("paste:composer",s).observe("blur:composer",o),o()}}(wysihtml5.dom),function(e){var t=document.documentElement;"textContent"in t?(e.setTextContent=function(e,t){e.textContent=t},e.getTextContent=function(e){return e.textContent}):"innerText"in t?(e.setTextContent=function(e,t){e.innerText=t},e.getTextContent=function(e){return e.innerText}):(e.setTextContent=function(e,t){e.nodeValue=t},e.getTextContent=function(e){return e.nodeValue})}(wysihtml5.dom),wysihtml5.quirks.cleanPastedHTML=function(){function e(e,n,i){n=n||t,i=i||e.ownerDocument||document;var r,s,o,a,l,c="string"==typeof e,h=0;r=c?wysihtml5.dom.getAsDom(e,i):e;for(l in n)for(o=r.querySelectorAll(l),s=n[l],a=o.length;a>h;h++)s(o[h]);return o=e=n=null,c?r.innerHTML:r}var t={"a u":wysihtml5.dom.replaceWithChildNodes};return e}(),function(e){var t=e.dom;e.quirks.ensureProperClearing=function(){var e=function(){var e=this;setTimeout(function(){var t=e.innerHTML.toLowerCase();("
"==t||"
"==t)&&(e.innerHTML="")},0)};return function(n){t.observe(n.element,["cut","keydown"],e)}}(),e.quirks.ensureProperClearingOfLists=function(){var n=["OL","UL","MENU"],i=function(i,r){if(r.firstChild&&e.lang.array(n).contains(r.firstChild.nodeName)){var s=t.getParentElement(i,{nodeName:n});if(s){var o=s==r.firstChild;if(o){var a=1>=s.childNodes.length;if(a){var l=s.firstChild?""===s.firstChild.innerHTML:!0;l&&s.parentNode.removeChild(s)}}}}};return function(n){t.observe(n.element,"keydown",function(t){if(t.keyCode===e.BACKSPACE_KEY){var r=n.selection.getSelectedNode();i(r,n.element)}})}}()}(wysihtml5),function(e){var t="%7E";e.quirks.getCorrectInnerHTML=function(n){var i=n.innerHTML;if(-1===i.indexOf(t))return i;var r,s,o,a,l=n.querySelectorAll("[href*='~'], [src*='~']");for(a=0,o=l.length;o>a;a++)r=l[a].href||l[a].src,s=e.lang.string(r).replace("~").by(t),i=e.lang.string(i).replace(s).by(r);return i}}(wysihtml5),function(e){var t=e.dom,n=["LI","P","H1","H2","H3","H4","H5","H6"],i=["UL","OL","MENU"];e.quirks.insertLineBreakOnReturn=function(r){function s(n){var i=t.getParentElement(n,{nodeName:["P","DIV"]},2);if(i){var s=document.createTextNode(e.INVISIBLE_SPACE);t.insert(s).before(i),t.replaceWithChildNodes(i),r.selection.selectNode(s)}}function o(o){var a=o.keyCode;if(!(o.shiftKey||a!==e.ENTER_KEY&&a!==e.BACKSPACE_KEY)){var l=(o.target,r.selection.getSelectedNode()),c=t.getParentElement(l,{nodeName:n},4);return c?("LI"!==c.nodeName||a!==e.ENTER_KEY&&a!==e.BACKSPACE_KEY?c.nodeName.match(/H[1-6]/)&&a===e.ENTER_KEY&&setTimeout(function(){s(r.selection.getSelectedNode())},0):setTimeout(function(){var e,n=r.selection.getSelectedNode();n&&(e=t.getParentElement(n,{nodeName:i},2),e||s(n))},0),void 0):(a!==e.ENTER_KEY||e.browser.insertsLineBreaksOnReturn()||(r.commands.exec("insertLineBreak"),o.preventDefault()),void 0)}}t.observe(r.element.ownerDocument,"keydown",o)}}(wysihtml5),function(e){var t="wysihtml5-quirks-redraw";e.quirks.redraw=function(n){e.dom.addClass(n,t),e.dom.removeClass(n,t);try{var i=n.ownerDocument;i.execCommand("italic",!1,null),i.execCommand("italic",!1,null)}catch(r){}}}(wysihtml5),function(e){function t(e){var t=0;if(e.parentNode)do t+=e.offsetTop||0,e=e.offsetParent;while(e);return t}var n=e.dom;e.Selection=Base.extend({constructor:function(e){window.rangy.init(),this.editor=e,this.composer=e.composer,this.doc=this.composer.doc},getBookmark:function(){var e=this.getRange();return e&&e.cloneRange()},setBookmark:function(e){e&&this.setSelection(e)},setBefore:function(e){var t=rangy.createRange(this.doc);return t.setStartBefore(e),t.setEndBefore(e),this.setSelection(t)},setAfter:function(e){var t=rangy.createRange(this.doc);return t.setStartAfter(e),t.setEndAfter(e),this.setSelection(t)},selectNode:function(t){var i=rangy.createRange(this.doc),r=t.nodeType===e.ELEMENT_NODE,s="canHaveHTML"in t?t.canHaveHTML:"IMG"!==t.nodeName,o=r?t.innerHTML:t.data,a=""===o||o===e.INVISIBLE_SPACE,l=n.getStyle("display").from(t),c="block"===l||"list-item"===l;if(a&&r&&s)try{t.innerHTML=e.INVISIBLE_SPACE}catch(h){}s?i.selectNodeContents(t):i.selectNode(t),s&&a&&r?i.collapse(c):s&&a&&(i.setStartAfter(t),i.setEndAfter(t)),this.setSelection(i)},getSelectedNode:function(e){var t,n;return e&&this.doc.selection&&"Control"===this.doc.selection.type&&(n=this.doc.selection.createRange(),n&&n.length)?n.item(0):(t=this.getSelection(this.doc),t.focusNode===t.anchorNode?t.focusNode:(n=this.getRange(this.doc),n?n.commonAncestorContainer:this.doc.body))},executeAndRestore:function(t,n){var i,r=this.doc.body,s=n&&r.scrollTop,o=n&&r.scrollLeft,a="_wysihtml5-temp-placeholder",l=''+e.INVISIBLE_SPACE+"",c=this.getRange(this.doc);if(!c)return t(r,r),void 0;var h=c.createContextualFragment(l);c.insertNode(h);try{t(c.startContainer,c.endContainer)}catch(u){setTimeout(function(){throw u},0)}caretPlaceholder=this.doc.querySelector("."+a),caretPlaceholder?(i=rangy.createRange(this.doc),i.selectNode(caretPlaceholder),i.deleteContents(),this.setSelection(i)):r.focus(),n&&(r.scrollTop=s,r.scrollLeft=o);try{caretPlaceholder.parentNode.removeChild(caretPlaceholder)}catch(d){}},executeAndRestoreSimple:function(e){var t,n,i,r,s,o=this.getRange(),a=this.doc.body;if(!o)return e(a,a),void 0;r=o.getNodes([3]),n=r[0]||o.startContainer,i=r[r.length-1]||o.endContainer,s={collapsed:o.collapsed,startContainer:n,startOffset:n===o.startContainer?o.startOffset:0,endContainer:i,endOffset:i===o.endContainer?o.endOffset:i.length};try{e(o.startContainer,o.endContainer)}catch(l){setTimeout(function(){throw l},0)}t=rangy.createRange(this.doc);try{t.setStart(s.startContainer,s.startOffset)}catch(c){}try{t.setEnd(s.endContainer,s.endOffset)}catch(h){}try{this.setSelection(t)}catch(u){}},insertHTML:function(e){var t=rangy.createRange(this.doc),n=t.createContextualFragment(e),i=n.lastChild;this.insertNode(n),i&&this.setAfter(i)},insertNode:function(e){var t=this.getRange();t&&t.insertNode(e)},surround:function(e){var t=this.getRange();if(t)try{t.surroundContents(e),this.selectNode(e)}catch(n){e.appendChild(t.extractContents()),t.insertNode(e)}},scrollIntoView:function(){var n,i=this.doc,r=i.documentElement.scrollHeight>i.documentElement.offsetHeight,s=i._wysihtml5ScrollIntoViewElement=i._wysihtml5ScrollIntoViewElement||function(){var t=i.createElement("span");return t.innerHTML=e.INVISIBLE_SPACE,t}();r&&(this.insertNode(s),n=t(s),s.parentNode.removeChild(s),n>i.body.scrollTop&&(i.body.scrollTop=n))},selectLine:function(){e.browser.supportsSelectionModify()?this._selectLine_W3C():this.doc.selection&&this._selectLine_MSIE()},_selectLine_W3C:function(){var e=this.doc.defaultView,t=e.getSelection();t.modify("extend","left","lineboundary"),t.modify("extend","right","lineboundary")},_selectLine_MSIE:function(){var e,t,n,i,r,s=this.doc.selection.createRange(),o=s.boundingTop,a=(s.boundingHeight,this.doc.body.scrollWidth);if(s.moveToPoint){for(0===o&&(n=this.doc.createElement("span"),this.insertNode(n),o=n.offsetTop,n.parentNode.removeChild(n)),o+=1,i=-10;a>i;i+=2)try{s.moveToPoint(i,o);break}catch(l){}for(e=o,t=this.doc.selection.createRange(),r=a;r>=0;r--)try{t.moveToPoint(r,e);break}catch(c){}s.setEndPoint("EndToEnd",t),s.select()}},getText:function(){var e=this.getSelection();return e?e.toString():""},getNodes:function(e,t){var n=this.getRange();return n?n.getNodes([e],t):[]},getRange:function(){var e=this.getSelection();return e&&e.rangeCount&&e.getRangeAt(0)},getSelection:function(){return rangy.getSelection(this.doc.defaultView||this.doc.parentWindow)},setSelection:function(e){var t=this.doc.defaultView||this.doc.parentWindow,n=rangy.getSelection(t);return n.setSingleRange(e)}})}(wysihtml5),function(e,t){function n(e,t,n){if(!e.className)return!1;var i=e.className.match(n)||[];return i[i.length-1]===t}function i(e,t,n){e.className?(r(e,n),e.className+=" "+t):e.className=t}function r(e,t){e.className&&(e.className=e.className.replace(t,""))}function s(e,t){return e.className.replace(f," ")==t.className.replace(f," ")}function o(e){for(var t=e.parentNode;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}function a(e,t){if(e.attributes.length!=t.attributes.length)return!1;for(var n,i,r,s=0,o=e.attributes.length;o>s;++s)if(n=e.attributes[s],r=n.name,"class"!=r){if(i=t.attributes.getNamedItem(r),n.specified!=i.specified)return!1;if(n.specified&&n.nodeValue!==i.nodeValue)return!1}return!0}function l(e,n){return t.dom.isCharacterDataNode(e)?0==n?!!e.previousSibling:n==e.length?!!e.nextSibling:!0:n>0&&e.childNodes.length>n}function c(e,n,i){var r;if(t.dom.isCharacterDataNode(n)&&(0==i?(i=t.dom.getNodeIndex(n),n=n.parentNode):i==n.length?(i=t.dom.getNodeIndex(n)+1,n=n.parentNode):r=t.dom.splitDataNode(n,i)),!r){r=n.cloneNode(!1),r.id&&r.removeAttribute("id");for(var s;s=n.childNodes[i];)r.appendChild(s);t.dom.insertAfter(r,n)}return n==e?r:c(e,r.parentNode,t.dom.getNodeIndex(r))}function h(t){this.isElementMerge=t.nodeType==e.ELEMENT_NODE,this.firstTextNode=this.isElementMerge?t.lastChild:t,this.textNodes=[this.firstTextNode]}function u(e,t,n,i){this.tagNames=e||[d],this.cssClass=t||"",this.similarClassRegExp=n,this.normalize=i,this.applyToAnyTagName=!1}var d="span",f=/\s+/g;h.prototype={doMerge:function(){for(var e,t,n,i=[],r=0,s=this.textNodes.length;s>r;++r)e=this.textNodes[r],t=e.parentNode,i[r]=e.data,r&&(t.removeChild(e),t.hasChildNodes()||t.parentNode.removeChild(t));return this.firstTextNode.data=n=i.join(""),n},getLength:function(){for(var e=this.textNodes.length,t=0;e--;)t+=this.textNodes[e].length;return t},toString:function(){for(var e=[],t=0,n=this.textNodes.length;n>t;++t)e[t]="'"+this.textNodes[t].data+"'";return"[Merge("+e.join(",")+")]"}},u.prototype={getAncestorWithClass:function(i){for(var r;i;){if(r=this.cssClass?n(i,this.cssClass,this.similarClassRegExp):!0,i.nodeType==e.ELEMENT_NODE&&t.dom.arrayContains(this.tagNames,i.tagName.toLowerCase())&&r)return i;i=i.parentNode}return!1},postApply:function(e,t){for(var n,i,r,s=e[0],o=e[e.length-1],a=[],l=s,c=o,u=0,d=o.length,f=0,p=e.length;p>f;++f)i=e[f],r=this.getAdjacentMergeableTextNode(i.parentNode,!1),r?(n||(n=new h(r),a.push(n)),n.textNodes.push(i),i===s&&(l=n.firstTextNode,u=l.length),i===o&&(c=n.firstTextNode,d=n.getLength())):n=null;
-var g=this.getAdjacentMergeableTextNode(o.parentNode,!0);if(g&&(n||(n=new h(o),a.push(n)),n.textNodes.push(g)),a.length){for(f=0,p=a.length;p>f;++f)a[f].doMerge();t.setStart(l,u),t.setEnd(c,d)}},getAdjacentMergeableTextNode:function(t,n){var i,r=t.nodeType==e.TEXT_NODE,s=r?t.parentNode:t,o=n?"nextSibling":"previousSibling";if(r){if(i=t[o],i&&i.nodeType==e.TEXT_NODE)return i}else if(i=s[o],i&&this.areElementsMergeable(t,i))return i[n?"firstChild":"lastChild"];return null},areElementsMergeable:function(e,n){return t.dom.arrayContains(this.tagNames,(e.tagName||"").toLowerCase())&&t.dom.arrayContains(this.tagNames,(n.tagName||"").toLowerCase())&&s(e,n)&&a(e,n)},createContainer:function(e){var t=e.createElement(this.tagNames[0]);return this.cssClass&&(t.className=this.cssClass),t},applyToTextNode:function(e){var n=e.parentNode;if(1==n.childNodes.length&&t.dom.arrayContains(this.tagNames,n.tagName.toLowerCase()))this.cssClass&&i(n,this.cssClass,this.similarClassRegExp);else{var r=this.createContainer(t.dom.getDocument(e));e.parentNode.insertBefore(r,e),r.appendChild(e)}},isRemovable:function(n){return t.dom.arrayContains(this.tagNames,n.tagName.toLowerCase())&&e.lang.string(n.className).trim()==this.cssClass},undoToTextNode:function(e,t,n){if(!t.containsNode(n)){var i=t.cloneRange();i.selectNode(n),i.isPointInRange(t.endContainer,t.endOffset)&&l(t.endContainer,t.endOffset)&&(c(n,t.endContainer,t.endOffset),t.setEndAfter(n)),i.isPointInRange(t.startContainer,t.startOffset)&&l(t.startContainer,t.startOffset)&&(n=c(n,t.startContainer,t.startOffset))}this.similarClassRegExp&&r(n,this.similarClassRegExp),this.isRemovable(n)&&o(n)},applyToRange:function(t){var n=t.getNodes([e.TEXT_NODE]);if(!n.length)try{var i=this.createContainer(t.endContainer.ownerDocument);return t.surroundContents(i),this.selectNode(t,i),void 0}catch(r){}if(t.splitBoundaries(),n=t.getNodes([e.TEXT_NODE]),n.length){for(var s,o=0,a=n.length;a>o;++o)s=n[o],this.getAncestorWithClass(s)||this.applyToTextNode(s);t.setStart(n[0],0),s=n[n.length-1],t.setEnd(s,s.length),this.normalize&&this.postApply(n,t)}},undoToRange:function(t){var n,i,r=t.getNodes([e.TEXT_NODE]);if(r.length)t.splitBoundaries(),r=t.getNodes([e.TEXT_NODE]);else{var s=t.endContainer.ownerDocument,o=s.createTextNode(e.INVISIBLE_SPACE);t.insertNode(o),t.selectNode(o),r=[o]}for(var a=0,l=r.length;l>a;++a)n=r[a],i=this.getAncestorWithClass(n),i&&this.undoToTextNode(n,t,i);1==l?this.selectNode(t,r[0]):(t.setStart(r[0],0),n=r[r.length-1],t.setEnd(n,n.length),this.normalize&&this.postApply(r,t))},selectNode:function(t,n){var i=n.nodeType===e.ELEMENT_NODE,r="canHaveHTML"in n?n.canHaveHTML:!0,s=i?n.innerHTML:n.data,o=""===s||s===e.INVISIBLE_SPACE;if(o&&i&&r)try{n.innerHTML=e.INVISIBLE_SPACE}catch(a){}t.selectNodeContents(n),o&&i?t.collapse(!1):o&&(t.setStartAfter(n),t.setEndAfter(n))},getTextSelectedByRange:function(e,t){var n=t.cloneRange();n.selectNodeContents(e);var i=n.intersection(t),r=i?i.toString():"";return n.detach(),r},isAppliedToRange:function(t){var n,i=[],r=t.getNodes([e.TEXT_NODE]);if(!r.length)return n=this.getAncestorWithClass(t.startContainer),n?[n]:!1;for(var s,o=0,a=r.length;a>o;++o){if(s=this.getTextSelectedByRange(r[o],t),n=this.getAncestorWithClass(r[o]),""!=s&&!n)return!1;i.push(n)}return i},toggleRange:function(e){this.isAppliedToRange(e)?this.undoToRange(e):this.applyToRange(e)}},e.selection.HTMLApplier=u}(wysihtml5,rangy),wysihtml5.Commands=Base.extend({constructor:function(e){this.editor=e,this.composer=e.composer,this.doc=this.composer.doc},support:function(e){return wysihtml5.browser.supportsCommand(this.doc,e)},exec:function(e,t){var n=wysihtml5.commands[e],i=wysihtml5.lang.array(arguments).get(),r=n&&n.exec,s=null;if(this.editor.fire("beforecommand:composer"),r)i.unshift(this.composer),s=r.apply(n,i);else try{s=this.doc.execCommand(e,!1,t)}catch(o){}return this.editor.fire("aftercommand:composer"),s},state:function(e){var t=wysihtml5.commands[e],n=wysihtml5.lang.array(arguments).get(),i=t&&t.state;if(i)return n.unshift(this.composer),i.apply(t,n);try{return this.doc.queryCommandState(e)}catch(r){return!1}},value:function(e){var t=wysihtml5.commands[e],n=t&&t.value;if(n)return n.call(t,this.composer,e);try{return this.doc.queryCommandValue(e)}catch(i){return null}}}),function(e){var t;e.commands.bold={exec:function(t,n){return e.commands.formatInline.exec(t,n,"b")},state:function(t,n){return e.commands.formatInline.state(t,n,"b")},value:function(){return t}}}(wysihtml5),function(e){function t(e,t){for(var n,i,r,o=t.length,a=0;o>a;a++)n=t[a],i=s.getParentElement(n,{nodeName:"code"}),r=s.getTextContent(n),r.match(s.autoLink.URL_REG_EXP)&&!i?i=s.renameElement(n,"code"):s.replaceWithChildNodes(n)}function n(t,n){var o,a,l,c,h,u,d,f,p,g=t.doc,m="_wysihtml5-temp-"+ +new Date,y=/non-matching-class/g,v=0;for(e.commands.formatInline.exec(t,i,r,m,y),a=g.querySelectorAll(r+"."+m),o=a.length;o>v;v++){l=a[v],l.removeAttribute("class");for(p in n)l.setAttribute(p,n[p])}u=l,1===o&&(d=s.getTextContent(l),c=!!l.querySelector("*"),h=""===d||d===e.INVISIBLE_SPACE,!c&&h&&(s.setTextContent(l,n.text||l.href),f=g.createTextNode(" "),t.selection.setAfter(l),t.selection.insertNode(f),u=f)),t.selection.setAfter(u)}var i,r="A",s=e.dom;e.commands.createLink={exec:function(e,i,r){var s=this.state(e,i);s?e.selection.executeAndRestore(function(){t(e,s)}):(r="object"==typeof r?r:{href:r},n(e,r))},state:function(t,n){return e.commands.formatInline.state(t,n,"A")},value:function(){return i}}}(wysihtml5),function(e){var t,n=/wysiwyg-font-size-[a-z\-]+/g;e.commands.fontSize={exec:function(t,i,r){return e.commands.formatInline.exec(t,i,"span","wysiwyg-font-size-"+r,n)},state:function(t,i,r){return e.commands.formatInline.state(t,i,"span","wysiwyg-font-size-"+r,n)},value:function(){return t}}}(wysihtml5),function(e){var t,n=/wysiwyg-color-[a-z]+/g;e.commands.foreColor={exec:function(t,i,r){return e.commands.formatInline.exec(t,i,"span","wysiwyg-color-"+r,n)},state:function(t,i,r){return e.commands.formatInline.state(t,i,"span","wysiwyg-color-"+r,n)},value:function(){return t}}}(wysihtml5),function(e){function t(e,t,i){e.className?(n(e,i),e.className+=" "+t):e.className=t}function n(e,t){e.className=e.className.replace(t,"")}function i(t){return t.nodeType===e.TEXT_NODE&&!e.lang.string(t.data).trim()}function r(e){for(var t=e.previousSibling;t&&i(t);)t=t.previousSibling;return t}function s(e){for(var t=e.nextSibling;t&&i(t);)t=t.nextSibling;return t}function o(e){var t=e.ownerDocument,n=s(e),i=r(e);n&&!h(n)&&e.parentNode.insertBefore(t.createElement("br"),n),i&&!h(i)&&e.parentNode.insertBefore(t.createElement("br"),e)}function a(e){var t=s(e),n=r(e);t&&c(t)&&t.parentNode.removeChild(t),n&&c(n)&&n.parentNode.removeChild(n)}function l(e){var t=e.lastChild;t&&c(t)&&t.parentNode.removeChild(t)}function c(e){return"BR"===e.nodeName}function h(e){return c(e)?!0:"block"===g.getStyle("display").from(e)?!0:!1}function u(t,n,i,r){if(r)var s=g.observe(t,"DOMNodeInserted",function(t){var n,i=t.target;i.nodeType===e.ELEMENT_NODE&&(n=g.getStyle("display").from(i),"inline"!==n.substr(0,6)&&(i.className+=" "+r))});t.execCommand(n,!1,i),s&&s.stop()}function d(e,t){e.selection.selectLine(),e.selection.surround(t),a(t),l(t),e.selection.selectNode(t)}function f(t){return!!e.lang.string(t.className).trim()}var p,g=e.dom,m="DIV",y=["H1","H2","H3","H4","H5","H6","P","BLOCKQUOTE",m];e.commands.formatBlock={exec:function(i,r,s,a,l){var c,h=i.doc,p=this.state(i,r,s,a,l);return s="string"==typeof s?s.toUpperCase():s,p?(i.selection.executeAndRestoreSimple(function(){l&&n(p,l);var e=f(p);e||p.nodeName!==(s||m)?e&&g.renameElement(p,m):(o(p),g.replaceWithChildNodes(p))}),void 0):(null===s||e.lang.array(y).contains(s))&&(c=i.selection.getSelectedNode(),p=g.getParentElement(c,{nodeName:y}))?(i.selection.executeAndRestoreSimple(function(){s&&(p=g.renameElement(p,s)),a&&t(p,a,l)}),void 0):i.commands.support(r)?(u(h,r,s||m,a),void 0):(p=h.createElement(s||m),a&&(p.className=a),d(i,p),void 0)},state:function(e,t,n,i,r){n="string"==typeof n?n.toUpperCase():n;var s=e.selection.getSelectedNode();return g.getParentElement(s,{nodeName:n,className:i,classRegExp:r})},value:function(){return p}}}(wysihtml5),function(e){function t(e){var t=r[e];return t?[e.toLowerCase(),t.toLowerCase()]:[e.toLowerCase()]}function n(n,i,r){var o=n+":"+i;return s[o]||(s[o]=new e.selection.HTMLApplier(t(n),i,r,!0)),s[o]}var i,r={strong:"b",em:"i",b:"strong",i:"em"},s={};e.commands.formatInline={exec:function(e,t,i,r,s){var o=e.selection.getRange();return o?(n(i,r,s).toggleRange(o),e.selection.setSelection(o),void 0):!1},state:function(t,i,s,o,a){var l,c=t.doc,h=r[s]||s;return e.dom.hasElementWithTagName(c,s)||e.dom.hasElementWithTagName(c,h)?o&&!e.dom.hasElementWithClassName(c,o)?!1:(l=t.selection.getRange(),l?n(s,o,a).isAppliedToRange(l):!1):!1},value:function(){return i}}}(wysihtml5),function(e){var t;e.commands.insertHTML={exec:function(e,t,n){e.commands.support(t)?e.doc.execCommand(t,!1,n):e.selection.insertHTML(n)},state:function(){return!1},value:function(){return t}}}(wysihtml5),function(e){var t="IMG";e.commands.insertImage={exec:function(n,i,r){r="object"==typeof r?r:{src:r};var s,o,a,l=n.doc,c=this.state(n);if(c)return n.selection.setBefore(c),a=c.parentNode,a.removeChild(c),e.dom.removeEmptyTextNodes(a),"A"!==a.nodeName||a.firstChild||(n.selection.setAfter(a),a.parentNode.removeChild(a)),e.quirks.redraw(n.element),void 0;c=l.createElement(t);for(o in r)c[o]=r[o];n.selection.insertNode(c),e.browser.hasProblemsSettingCaretAfterImg()?(s=l.createTextNode(e.INVISIBLE_SPACE),n.selection.insertNode(s),n.selection.setAfter(s)):n.selection.setAfter(c)},state:function(n){var i,r,s,o=n.doc;return e.dom.hasElementWithTagName(o,t)?(i=n.selection.getSelectedNode())?i.nodeName===t?i:i.nodeType!==e.ELEMENT_NODE?!1:(r=n.selection.getText(),(r=e.lang.string(r).trim())?!1:(s=n.selection.getNodes(e.ELEMENT_NODE,function(e){return"IMG"===e.nodeName}),1!==s.length?!1:s[0])):!1:!1},value:function(e){var t=this.state(e);return t&&t.src}}}(wysihtml5),function(e){var t,n="
"+(e.browser.needsSpaceAfterLineBreak()?" ":"");e.commands.insertLineBreak={exec:function(t,i){t.commands.support(i)?(t.doc.execCommand(i,!1,null),e.browser.autoScrollsToCaret()||t.selection.scrollIntoView()):t.commands.exec("insertHTML",n)},state:function(){return!1},value:function(){return t}}}(wysihtml5),function(e){var t;e.commands.insertOrderedList={exec:function(t,n){var i,r,s=t.doc,o=t.selection.getSelectedNode(),a=e.dom.getParentElement(o,{nodeName:"OL"}),l=e.dom.getParentElement(o,{nodeName:"UL"}),c="_wysihtml5-temp-"+(new Date).getTime();return t.commands.support(n)?(s.execCommand(n,!1,null),void 0):(a?t.selection.executeAndRestoreSimple(function(){e.dom.resolveList(a)}):l?t.selection.executeAndRestoreSimple(function(){e.dom.renameElement(l,"ol")}):(t.commands.exec("formatBlock","div",c),r=s.querySelector("."+c),i=""===r.innerHTML||r.innerHTML===e.INVISIBLE_SPACE,t.selection.executeAndRestoreSimple(function(){a=e.dom.convertToList(r,"ol")}),i&&t.selection.selectNode(a.querySelector("li"))),void 0)},state:function(t){var n=t.selection.getSelectedNode();return e.dom.getParentElement(n,{nodeName:"OL"})},value:function(){return t}}}(wysihtml5),function(e){var t;e.commands.insertUnorderedList={exec:function(t,n){var i,r,s=t.doc,o=t.selection.getSelectedNode(),a=e.dom.getParentElement(o,{nodeName:"UL"}),l=e.dom.getParentElement(o,{nodeName:"OL"}),c="_wysihtml5-temp-"+(new Date).getTime();return t.commands.support(n)?(s.execCommand(n,!1,null),void 0):(a?t.selection.executeAndRestoreSimple(function(){e.dom.resolveList(a)}):l?t.selection.executeAndRestoreSimple(function(){e.dom.renameElement(l,"ul")}):(t.commands.exec("formatBlock","div",c),r=s.querySelector("."+c),i=""===r.innerHTML||r.innerHTML===e.INVISIBLE_SPACE,t.selection.executeAndRestoreSimple(function(){a=e.dom.convertToList(r,"ul")}),i&&t.selection.selectNode(a.querySelector("li"))),void 0)},state:function(t){var n=t.selection.getSelectedNode();return e.dom.getParentElement(n,{nodeName:"UL"})},value:function(){return t}}}(wysihtml5),function(e){var t;e.commands.italic={exec:function(t,n){return e.commands.formatInline.exec(t,n,"i")},state:function(t,n){return e.commands.formatInline.state(t,n,"i")},value:function(){return t}}}(wysihtml5),function(e){var t,n="wysiwyg-text-align-center",i=/wysiwyg-text-align-[a-z]+/g;e.commands.justifyCenter={exec:function(t){return e.commands.formatBlock.exec(t,"formatBlock",null,n,i)},state:function(t){return e.commands.formatBlock.state(t,"formatBlock",null,n,i)},value:function(){return t}}}(wysihtml5),function(e){var t,n="wysiwyg-text-align-left",i=/wysiwyg-text-align-[a-z]+/g;e.commands.justifyLeft={exec:function(t){return e.commands.formatBlock.exec(t,"formatBlock",null,n,i)},state:function(t){return e.commands.formatBlock.state(t,"formatBlock",null,n,i)},value:function(){return t}}}(wysihtml5),function(e){var t,n="wysiwyg-text-align-right",i=/wysiwyg-text-align-[a-z]+/g;e.commands.justifyRight={exec:function(t){return e.commands.formatBlock.exec(t,"formatBlock",null,n,i)},state:function(t){return e.commands.formatBlock.state(t,"formatBlock",null,n,i)},value:function(){return t}}}(wysihtml5),function(e){var t;e.commands.underline={exec:function(t,n){return e.commands.formatInline.exec(t,n,"u")},state:function(t,n){return e.commands.formatInline.state(t,n,"u")},value:function(){return t}}}(wysihtml5),function(e){function t(e){for(var t;t=e.querySelector("._wysihtml5-temp");)t.parentNode.removeChild(t)}var n=90,i=89,r=8,s=46,o=40,a=''+e.INVISIBLE_SPACE+"",l=''+e.INVISIBLE_SPACE+"",c=e.dom;e.UndoManager=e.lang.Dispatcher.extend({constructor:function(e){this.editor=e,this.composer=e.composer,this.element=this.composer.element,this.history=[this.composer.getValue()],this.position=1,this.composer.commands.support("insertHTML")&&this._observe()},_observe:function(){var o,h=this,u=this.composer.sandbox.getDocument();if(c.observe(this.element,"keydown",function(e){if(!e.altKey&&(e.ctrlKey||e.metaKey)){var t=e.keyCode,r=t===n&&!e.shiftKey,s=t===n&&e.shiftKey||t===i;r?(h.undo(),e.preventDefault()):s&&(h.redo(),e.preventDefault())}}),c.observe(this.element,"keydown",function(e){var t=e.keyCode;t!==o&&(o=t,(t===r||t===s)&&h.transact())}),e.browser.hasUndoInContextMenu()){var d,f,p=function(){t(u),clearInterval(d)};c.observe(this.element,"contextmenu",function(){p(),h.composer.selection.executeAndRestoreSimple(function(){h.element.lastChild&&h.composer.selection.setAfter(h.element.lastChild),u.execCommand("insertHTML",!1,a),u.execCommand("insertHTML",!1,l),u.execCommand("undo",!1,null)}),d=setInterval(function(){u.getElementById("_wysihtml5-redo")?(p(),h.redo()):u.getElementById("_wysihtml5-undo")||(p(),h.undo())},400),f||(f=!0,c.observe(document,"mousedown",p),c.observe(u,["mousedown","paste","cut","copy"],p))})}this.editor.observe("newword:composer",function(){h.transact()}).observe("beforecommand:composer",function(){h.transact()})},transact:function(){var e=this.history[this.position-1],t=this.composer.getValue();if(t!=e){var n=this.history.length=this.position;n>o&&(this.history.shift(),this.position--),this.position++,this.history.push(t)}},undo:function(){this.transact(),1>=this.position||(this.set(this.history[--this.position-1]),this.editor.fire("undo:composer"))},redo:function(){this.position>=this.history.length||(this.set(this.history[++this.position-1]),this.editor.fire("redo:composer"))},set:function(e){this.composer.setValue(e),this.editor.focus(!0)}})}(wysihtml5),wysihtml5.views.View=Base.extend({constructor:function(e,t,n){this.parent=e,this.element=t,this.config=n,this._observeViewChange()},_observeViewChange:function(){var e=this;this.parent.observe("beforeload",function(){e.parent.observe("change_view",function(t){t===e.name?(e.parent.currentView=e,e.show(),setTimeout(function(){e.focus()},0)):e.hide()})})},focus:function(){if(this.element.ownerDocument.querySelector(":focus")!==this.element)try{this.element.focus()}catch(e){}},hide:function(){this.element.style.display="none"},show:function(){this.element.style.display=""},disable:function(){this.element.setAttribute("disabled","disabled")},enable:function(){this.element.removeAttribute("disabled")}}),function(e){var t=e.dom,n=e.browser;e.views.Composer=e.views.View.extend({name:"composer",CARET_HACK:"
",constructor:function(e,t,n){this.base(e,t,n),this.textarea=this.parent.textarea,this._initSandbox()},clear:function(){this.element.innerHTML=n.displaysCaretInEmptyContentEditableCorrectly()?"":this.CARET_HACK},getValue:function(t){var n=this.isEmpty()?"":e.quirks.getCorrectInnerHTML(this.element);return t&&(n=this.parent.parse(n)),n=e.lang.string(n).replace(e.INVISIBLE_SPACE).by("")},setValue:function(e,t){t&&(e=this.parent.parse(e)),this.element.innerHTML=e},show:function(){this.iframe.style.display=this._displayStyle||"",this.disable(),this.enable()},hide:function(){this._displayStyle=t.getStyle("display").from(this.iframe),"none"===this._displayStyle&&(this._displayStyle=null),this.iframe.style.display="none"},disable:function(){this.element.removeAttribute("contentEditable"),this.base()},enable:function(){this.element.setAttribute("contentEditable","true"),this.base()},focus:function(t){e.browser.doesAsyncFocus()&&this.hasPlaceholderSet()&&this.clear(),this.base();var n=this.element.lastChild;t&&n&&("BR"===n.nodeName?this.selection.setBefore(this.element.lastChild):this.selection.setAfter(this.element.lastChild))},getTextContent:function(){return t.getTextContent(this.element)},hasPlaceholderSet:function(){return this.getTextContent()==this.textarea.element.getAttribute("placeholder")},isEmpty:function(){var e=this.element.innerHTML,t="blockquote, ul, ol, img, embed, object, table, iframe, svg, video, audio, button, input, select, textarea";return""===e||e===this.CARET_HACK||this.hasPlaceholderSet()||""===this.getTextContent()&&!this.element.querySelector(t)},_initSandbox:function(){var e=this;this.sandbox=new t.Sandbox(function(){e._create()},{stylesheets:this.config.stylesheets}),this.iframe=this.sandbox.getIframe();var n=document.createElement("input");n.type="hidden",n.name="_wysihtml5_mode",n.value=1;var i=this.textarea.element;t.insert(this.iframe).after(i),t.insert(n).after(i)},_create:function(){var i=this;this.doc=this.sandbox.getDocument(),this.element=this.doc.body,this.textarea=this.parent.textarea,this.element.innerHTML=this.textarea.getValue(!0),this.enable(),this.selection=new e.Selection(this.parent),this.commands=new e.Commands(this.parent),t.copyAttributes(["className","spellcheck","title","lang","dir","accessKey"]).from(this.textarea.element).to(this.element),t.addClass(this.element,this.config.composerClassName),this.config.style&&this.style(),this.observe();var r=this.config.name;r&&(t.addClass(this.element,r),t.addClass(this.iframe,r));var s="string"==typeof this.config.placeholder?this.config.placeholder:this.textarea.element.getAttribute("placeholder");s&&t.simulatePlaceholder(this.parent,this,s),this.commands.exec("styleWithCSS",!1),this._initAutoLinking(),this._initObjectResizing(),this._initUndoManager(),(this.textarea.element.hasAttribute("autofocus")||document.querySelector(":focus")==this.textarea.element)&&setTimeout(function(){i.focus()},100),e.quirks.insertLineBreakOnReturn(this),n.clearsContentEditableCorrectly()||e.quirks.ensureProperClearing(this),n.clearsListsInContentEditableCorrectly()||e.quirks.ensureProperClearingOfLists(this),this.initSync&&this.config.sync&&this.initSync(),this.textarea.hide(),this.parent.fire("beforeload").fire("load")},_initAutoLinking:function(){var i=this,r=n.canDisableAutoLinking(),s=n.doesAutoLinkingInContentEditable();if(r&&this.commands.exec("autoUrlDetect",!1),this.config.autoLink){(!s||s&&r)&&this.parent.observe("newword:composer",function(){i.selection.executeAndRestore(function(e,n){t.autoLink(n.parentNode)})});var o=this.sandbox.getDocument().getElementsByTagName("a"),a=t.autoLink.URL_REG_EXP,l=function(n){var i=e.lang.string(t.getTextContent(n)).trim();return"www."===i.substr(0,4)&&(i="http://"+i),i};t.observe(this.element,"keydown",function(e){if(o.length){var n,r=i.selection.getSelectedNode(e.target.ownerDocument),s=t.getParentElement(r,{nodeName:"A"},4);s&&(n=l(s),setTimeout(function(){var e=l(s);e!==n&&e.match(a)&&s.setAttribute("href",e)},0))}})}},_initObjectResizing:function(){var i=["width","height"],r=i.length,s=this.element;this.commands.exec("enableObjectResizing",this.config.allowObjectResizing),this.config.allowObjectResizing?n.supportsEvent("resizeend")&&t.observe(s,"resizeend",function(t){for(var n,o=t.target||t.srcElement,a=o.style,l=0;r>l;l++)n=i[l],a[n]&&(o.setAttribute(n,parseInt(a[n],10)),a[n]="");e.quirks.redraw(s)}):n.supportsEvent("resizestart")&&t.observe(s,"resizestart",function(e){e.preventDefault()})},_initUndoManager:function(){new e.UndoManager(this.parent)}})}(wysihtml5),function(e){var t=e.dom,n=document,i=window,r=n.createElement("div"),s=["background-color","color","cursor","font-family","font-size","font-style","font-variant","font-weight","line-height","letter-spacing","text-align","text-decoration","text-indent","text-rendering","word-break","word-wrap","word-spacing"],o=["background-color","border-collapse","border-bottom-color","border-bottom-style","border-bottom-width","border-left-color","border-left-style","border-left-width","border-right-color","border-right-style","border-right-width","border-top-color","border-top-style","border-top-width","clear","display","float","margin-bottom","margin-left","margin-right","margin-top","outline-color","outline-offset","outline-width","outline-style","padding-left","padding-right","padding-top","padding-bottom","position","top","left","right","bottom","z-index","vertical-align","text-align","-webkit-box-sizing","-moz-box-sizing","-ms-box-sizing","box-sizing","-webkit-box-shadow","-moz-box-shadow","-ms-box-shadow","box-shadow","-webkit-border-top-right-radius","-moz-border-radius-topright","border-top-right-radius","-webkit-border-bottom-right-radius","-moz-border-radius-bottomright","border-bottom-right-radius","-webkit-border-bottom-left-radius","-moz-border-radius-bottomleft","border-bottom-left-radius","-webkit-border-top-left-radius","-moz-border-radius-topleft","border-top-left-radius","width","height"],a=["width","height","top","left","right","bottom"],l=["html { height: 100%; }","body { min-height: 100%; padding: 0; margin: 0; margin-top: -1px; padding-top: 1px; }","._wysihtml5-temp { display: none; }",e.browser.isGecko?"body.placeholder { color: graytext !important; }":"body.placeholder { color: #a9a9a9 !important; }","body[disabled] { background-color: #eee !important; color: #999 !important; cursor: default !important; }","img:-moz-broken { -moz-force-broken-image-icon: 1; height: 24px; width: 24px; }"],c=function(e){if(e.setActive)try{e.setActive()}catch(r){}else{var s=e.style,o=n.documentElement.scrollTop||n.body.scrollTop,a=n.documentElement.scrollLeft||n.body.scrollLeft,l={position:s.position,top:s.top,left:s.left,WebkitUserSelect:s.WebkitUserSelect};t.setStyles({position:"absolute",top:"-99999px",left:"-99999px",WebkitUserSelect:"none"}).on(e),e.focus(),t.setStyles(l).on(e),i.scrollTo&&i.scrollTo(a,o)}};e.views.Composer.prototype.style=function(){var h=this,u=n.querySelector(":focus"),d=this.textarea.element,f=d.hasAttribute("placeholder"),p=f&&d.getAttribute("placeholder");this.focusStylesHost=this.focusStylesHost||r.cloneNode(!1),this.blurStylesHost=this.blurStylesHost||r.cloneNode(!1),f&&d.removeAttribute("placeholder"),d===u&&d.blur(),t.copyStyles(o).from(d).to(this.iframe).andTo(this.blurStylesHost),t.copyStyles(s).from(d).to(this.element).andTo(this.blurStylesHost),t.insertCSS(l).into(this.element.ownerDocument),c(d),t.copyStyles(o).from(d).to(this.focusStylesHost),t.copyStyles(s).from(d).to(this.focusStylesHost);var g=e.lang.array(o).without(["display"]);if(u?u.focus():d.blur(),f&&d.setAttribute("placeholder",p),!e.browser.hasCurrentStyleProperty())var m=t.observe(i,"resize",function(){if(!t.contains(document.documentElement,h.iframe))return m.stop(),void 0;var e=t.getStyle("display").from(d),n=t.getStyle("display").from(h.iframe);d.style.display="",h.iframe.style.display="none",t.copyStyles(a).from(d).to(h.iframe).andTo(h.focusStylesHost).andTo(h.blurStylesHost),h.iframe.style.display=n,d.style.display=e});return this.parent.observe("focus:composer",function(){t.copyStyles(g).from(h.focusStylesHost).to(h.iframe),t.copyStyles(s).from(h.focusStylesHost).to(h.element)}),this.parent.observe("blur:composer",function(){t.copyStyles(g).from(h.blurStylesHost).to(h.iframe),t.copyStyles(s).from(h.blurStylesHost).to(h.element)}),this}}(wysihtml5),function(e){var t=e.dom,n=e.browser,i={66:"bold",73:"italic",85:"underline"};e.views.Composer.prototype.observe=function(){var r=this,s=this.getValue(),o=this.sandbox.getIframe(),a=this.element,l=n.supportsEventsInIframeCorrectly()?a:this.sandbox.getWindow(),c=n.supportsEvent("drop")?["drop","paste"]:["dragdrop","paste"];t.observe(o,"DOMNodeRemoved",function(){clearInterval(h),r.parent.fire("destroy:composer")});var h=setInterval(function(){t.contains(document.documentElement,o)||(clearInterval(h),r.parent.fire("destroy:composer"))},250);t.observe(l,"focus",function(){r.parent.fire("focus").fire("focus:composer"),setTimeout(function(){s=r.getValue()},0)}),t.observe(l,"blur",function(){s!==r.getValue()&&r.parent.fire("change").fire("change:composer"),r.parent.fire("blur").fire("blur:composer")}),e.browser.isIos()&&t.observe(a,"blur",function(){var e=a.ownerDocument.createElement("input"),t=document.documentElement.scrollTop||document.body.scrollTop,n=document.documentElement.scrollLeft||document.body.scrollLeft;try{r.selection.insertNode(e)}catch(i){a.appendChild(e)}e.focus(),e.parentNode.removeChild(e),window.scrollTo(n,t)}),t.observe(a,"dragenter",function(){r.parent.fire("unset_placeholder")}),n.firesOnDropOnlyWhenOnDragOverIsCancelled()&&t.observe(a,["dragover","dragenter"],function(e){e.preventDefault()}),t.observe(a,c,function(e){var t,i=e.dataTransfer;console.log("PASTED",e),i&&n.supportsDataTransfer()&&(t=i.getData("text/html")||i.getData("text/plain")),t?(a.focus(),r.commands.exec("insertHTML",t),r.parent.fire("paste").fire("paste:composer"),e.stopPropagation(),e.preventDefault()):setTimeout(function(){r.parent.fire("paste").fire("paste:composer")},0)}),t.observe(a,"keyup",function(t){var n=t.keyCode;(n===e.SPACE_KEY||n===e.ENTER_KEY)&&r.parent.fire("newword:composer")}),this.parent.observe("paste:composer",function(){setTimeout(function(){r.parent.fire("newword:composer")},0)}),n.canSelectImagesInContentEditable()||t.observe(a,"mousedown",function(e){var t=e.target;"IMG"===t.nodeName&&(r.selection.selectNode(t),e.preventDefault())}),t.observe(a,"keydown",function(e){var t=e.keyCode,n=i[t];(e.ctrlKey||e.metaKey)&&!e.altKey&&n&&(r.commands.exec(n),e.preventDefault())}),t.observe(a,"keydown",function(t){var n,i=r.selection.getSelectedNode(!0),s=t.keyCode;!i||"IMG"!==i.nodeName||s!==e.BACKSPACE_KEY&&s!==e.DELETE_KEY||(n=i.parentNode,n.removeChild(i),"A"!==n.nodeName||n.firstChild||n.parentNode.removeChild(n),setTimeout(function(){e.quirks.redraw(a)},0),t.preventDefault())});var u={IMG:"Image: ",A:"Link: "};t.observe(a,"mouseover",function(e){var t,n=e.target,i=n.nodeName;if("A"===i||"IMG"===i){var r=n.hasAttribute("title");r||(t=u[i]+(n.getAttribute("href")||n.getAttribute("src")),n.setAttribute("title",t))}})}}(wysihtml5),function(e){var t=400;e.views.Synchronizer=Base.extend({constructor:function(e,t,n){this.editor=e,this.textarea=t,this.composer=n,this._observe()},fromComposerToTextarea:function(t){this.textarea.setValue(e.lang.string(this.composer.getValue()).trim(),t)},fromTextareaToComposer:function(e){var t=this.textarea.getValue();t?this.composer.setValue(t,e):(this.composer.clear(),this.editor.fire("set_placeholder"))},sync:function(e){"textarea"===this.editor.currentView.name?this.fromTextareaToComposer(e):this.fromComposerToTextarea(e)},_observe:function(){var n,i=this,r=this.textarea.element.form,s=function(){n=setInterval(function(){i.fromComposerToTextarea()},t)},o=function(){clearInterval(n),n=null};s(),r&&(e.dom.observe(r,"submit",function(){i.sync(!0)}),e.dom.observe(r,"reset",function(){setTimeout(function(){i.fromTextareaToComposer()},0)})),this.editor.observe("change_view",function(e){"composer"!==e||n?"textarea"===e&&(i.fromComposerToTextarea(!0),o()):(i.fromTextareaToComposer(!0),s())}),this.editor.observe("destroy:composer",o)}})}(wysihtml5),wysihtml5.views.Textarea=wysihtml5.views.View.extend({name:"textarea",constructor:function(e,t,n){this.base(e,t,n),this._observe()},clear:function(){this.element.value=""},getValue:function(e){var t=this.isEmpty()?"":this.element.value;return e&&(t=this.parent.parse(t)),t},setValue:function(e,t){t&&(e=this.parent.parse(e)),this.element.value=e},hasPlaceholderSet:function(){var e=wysihtml5.browser.supportsPlaceholderAttributeOn(this.element),t=this.element.getAttribute("placeholder")||null,n=this.element.value,i=!n;return e&&i||n===t},isEmpty:function(){return!wysihtml5.lang.string(this.element.value).trim()||this.hasPlaceholderSet()},_observe:function(){var e=this.element,t=this.parent,n={focusin:"focus",focusout:"blur"},i=wysihtml5.browser.supportsEvent("focusin")?["focusin","focusout","change"]:["focus","blur","change"];t.observe("beforeload",function(){wysihtml5.dom.observe(e,i,function(e){var i=n[e.type]||e.type;t.fire(i).fire(i+":textarea")}),wysihtml5.dom.observe(e,["paste","drop"],function(){setTimeout(function(){t.fire("paste").fire("paste:textarea")},0)})})}}),function(e){var t=e.dom,n="wysihtml5-command-dialog-opened",i="input, select, textarea",r="[data-wysihtml5-dialog-field]",s="data-wysihtml5-dialog-field";e.toolbar.Dialog=e.lang.Dispatcher.extend({constructor:function(e,t){this.link=e,this.container=t},_observe:function(){if(!this._observed){var r=this,s=function(e){var t=r._serialize();t==r.elementToChange?r.fire("edit",t):r.fire("save",t),r.hide(),e.preventDefault(),e.stopPropagation()};t.observe(r.link,"click",function(){t.hasClass(r.link,n)&&setTimeout(function(){r.hide()},0)}),t.observe(this.container,"keydown",function(t){var n=t.keyCode;n===e.ENTER_KEY&&s(t),n===e.ESCAPE_KEY&&r.hide()}),t.delegate(this.container,"[data-wysihtml5-dialog-action=save]","click",s),t.delegate(this.container,"[data-wysihtml5-dialog-action=cancel]","click",function(e){r.fire("cancel"),r.hide(),e.preventDefault(),e.stopPropagation()});for(var o=this.container.querySelectorAll(i),a=0,l=o.length,c=function(){clearInterval(r.interval)};l>a;a++)t.observe(o[a],"change",c);this._observed=!0}},_serialize:function(){for(var e=this.elementToChange||{},t=this.container.querySelectorAll(r),n=t.length,i=0;n>i;i++)e[t[i].getAttribute(s)]=t[i].value;return e},_interpolate:function(e){for(var t,n,i,o=document.querySelector(":focus"),a=this.container.querySelectorAll(r),l=a.length,c=0;l>c;c++)t=a[c],t!==o&&(e&&"hidden"===t.type||(n=t.getAttribute(s),i=this.elementToChange?this.elementToChange[n]||"":t.defaultValue,t.value=i))},show:function(e){var r=this,s=this.container.querySelector(i);if(this.elementToChange=e,this._observe(),this._interpolate(),e&&(this.interval=setInterval(function(){r._interpolate(!0)},500)),t.addClass(this.link,n),this.container.style.display="",this.fire("show"),s&&!e)try{s.focus()}catch(o){}},hide:function(){clearInterval(this.interval),this.elementToChange=null,t.removeClass(this.link,n),this.container.style.display="none",this.fire("hide")}})}(wysihtml5),function(e){var t=e.dom,n={position:"relative"},i={left:0,margin:0,opacity:0,overflow:"hidden",padding:0,position:"absolute",top:0,zIndex:1},r={cursor:"inherit",fontSize:"50px",height:"50px",marginTop:"-25px",outline:0,padding:0,position:"absolute",right:"-4px",top:"50%"},s={"x-webkit-speech":"",speech:""};e.toolbar.Speech=function(o,a){var l=document.createElement("input");if(!e.browser.supportsSpeechApiOn(l))return a.style.display="none",void 0;var c=document.createElement("div");e.lang.object(i).merge({width:a.offsetWidth+"px",height:a.offsetHeight+"px"}),t.insert(l).into(c),t.insert(c).into(a),t.setStyles(r).on(l),t.setAttributes(s).on(l),t.setStyles(i).on(c),t.setStyles(n).on(a);var h="onwebkitspeechchange"in l?"webkitspeechchange":"speechchange";t.observe(l,h,function(){o.execCommand("insertText",l.value),l.value=""}),t.observe(l,"click",function(e){t.hasClass(a,"wysihtml5-command-disabled")&&e.preventDefault(),e.stopPropagation()})}}(wysihtml5),function(e){var t="wysihtml5-command-disabled",n="wysihtml5-commands-disabled",i="wysihtml5-command-active",r="wysihtml5-action-active",s=e.dom;
-e.toolbar.Toolbar=Base.extend({constructor:function(t,n){this.editor=t,this.container="string"==typeof n?document.getElementById(n):n,this.composer=t.composer,this._getLinks("command"),this._getLinks("action"),this._observe(),this.show();for(var i=this.container.querySelectorAll("[data-wysihtml5-command=insertSpeech]"),r=i.length,s=0;r>s;s++)new e.toolbar.Speech(this,i[s])},_getLinks:function(t){for(var n,i,r,s,o,a=this[t+"Links"]=e.lang.array(this.container.querySelectorAll("[data-wysihtml5-"+t+"]")).get(),l=a.length,c=0,h=this[t+"Mapping"]={};l>c;c++)n=a[c],r=n.getAttribute("data-wysihtml5-"+t),s=n.getAttribute("data-wysihtml5-"+t+"-value"),i=this.container.querySelector("[data-wysihtml5-"+t+"-group='"+r+"']"),o=this._getDialog(n,r),h[r+":"+s]={link:n,group:i,name:r,value:s,dialog:o,state:!1}},_getDialog:function(t,n){var i,r,s=this,o=this.container.querySelector("[data-wysihtml5-dialog='"+n+"']");return o&&(i=new e.toolbar.Dialog(t,o),i.observe("show",function(){r=s.composer.selection.getBookmark(),s.editor.fire("show:dialog",{command:n,dialogContainer:o,commandLink:t})}),i.observe("save",function(e){r&&s.composer.selection.setBookmark(r),s._execCommand(n,e),s.editor.fire("save:dialog",{command:n,dialogContainer:o,commandLink:t})}),i.observe("cancel",function(){s.editor.focus(!1),s.editor.fire("cancel:dialog",{command:n,dialogContainer:o,commandLink:t})})),i},execCommand:function(e,t){if(!this.commandsDisabled){var n=this.commandMapping[e+":"+t];n&&n.dialog&&!n.state?n.dialog.show():this._execCommand(e,t)}},_execCommand:function(e,t){this.editor.focus(!1),this.composer.commands.exec(e,t),this._updateLinkStates()},execAction:function(e){var t=this.editor;switch(e){case"change_view":t.currentView===t.textarea?t.fire("change_view","composer"):t.fire("change_view","textarea")}},_observe:function(){for(var e=this,t=this.editor,i=this.container,r=this.commandLinks.concat(this.actionLinks),o=r.length,a=0;o>a;a++)s.setAttributes({href:"javascript:;",unselectable:"on"}).on(r[a]);s.delegate(i,"[data-wysihtml5-command]","mousedown",function(e){e.preventDefault()}),s.delegate(i,"[data-wysihtml5-command]","click",function(t){var n=this,i=n.getAttribute("data-wysihtml5-command"),r=n.getAttribute("data-wysihtml5-command-value");e.execCommand(i,r),t.preventDefault()}),s.delegate(i,"[data-wysihtml5-action]","click",function(t){var n=this.getAttribute("data-wysihtml5-action");e.execAction(n),t.preventDefault()}),t.observe("focus:composer",function(){e.bookmark=null,clearInterval(e.interval),e.interval=setInterval(function(){e._updateLinkStates()},500)}),t.observe("blur:composer",function(){clearInterval(e.interval)}),t.observe("destroy:composer",function(){clearInterval(e.interval)}),t.observe("change_view",function(t){setTimeout(function(){e.commandsDisabled="composer"!==t,e._updateLinkStates(),e.commandsDisabled?s.addClass(i,n):s.removeClass(i,n)},0)})},_updateLinkStates:function(){var n,o,a,l,c=(this.composer.element,this.commandMapping),h=this.actionMapping;for(n in c)l=c[n],this.commandsDisabled?(o=!1,s.removeClass(l.link,i),l.group&&s.removeClass(l.group,i),l.dialog&&l.dialog.hide()):(o=this.composer.commands.state(l.name,l.value),e.lang.object(o).isArray()&&(o=1===o.length?o[0]:!0),s.removeClass(l.link,t),l.group&&s.removeClass(l.group,t)),l.state!==o&&(l.state=o,o?(s.addClass(l.link,i),l.group&&s.addClass(l.group,i),l.dialog&&("object"==typeof o?l.dialog.show(o):l.dialog.hide())):(s.removeClass(l.link,i),l.group&&s.removeClass(l.group,i),l.dialog&&l.dialog.hide()));for(n in h)a=h[n],"change_view"===a.name&&(a.state=this.editor.currentView===this.editor.textarea,a.state?s.addClass(a.link,r):s.removeClass(a.link,r))},show:function(){this.container.style.display=""},hide:function(){this.container.style.display="none"}})}(wysihtml5),function(e){var t,n={name:t,style:!0,toolbar:t,autoLink:!0,parserRules:{tags:{br:{},span:{},div:{},p:{}},classes:{}},parser:e.dom.parse,composerClassName:"wysihtml5-editor",bodyClassName:"wysihtml5-supported",stylesheets:[],placeholderText:t,allowObjectResizing:!0,supportTouchDevices:!0};e.Editor=e.lang.Dispatcher.extend({constructor:function(t,i){if(this.textareaElement="string"==typeof t?document.getElementById(t):t,this.config=e.lang.object({}).merge(n).merge(i).get(),this.textarea=new e.views.Textarea(this,this.textareaElement,this.config),this.currentView=this.textarea,this._isCompatible=e.browser.supported(),!this._isCompatible||!this.config.supportTouchDevices&&e.browser.isTouchDevice()){var r=this;return setTimeout(function(){r.fire("beforeload").fire("load")},0),void 0}e.dom.addClass(document.body,this.config.bodyClassName),this.composer=new e.views.Composer(this,this.textareaElement,this.config),this.currentView=this.composer,"function"==typeof this.config.parser&&this._initParser(),this.observe("beforeload",function(){this.synchronizer=new e.views.Synchronizer(this,this.textarea,this.composer),this.config.toolbar&&(this.toolbar=new e.toolbar.Toolbar(this,this.config.toolbar))});try{console.log("Heya! This page is using wysihtml5 for rich text editing. Check out https://github.com/xing/wysihtml5")}catch(s){}},isCompatible:function(){return this._isCompatible},clear:function(){return this.currentView.clear(),this},getValue:function(e){return this.currentView.getValue(e)},setValue:function(e,t){return e?(this.currentView.setValue(e,t),this):this.clear()},focus:function(e){return this.currentView.focus(e),this},disable:function(){return this.currentView.disable(),this},enable:function(){return this.currentView.enable(),this},isEmpty:function(){return this.currentView.isEmpty()},hasPlaceholderSet:function(){return this.currentView.hasPlaceholderSet()},parse:function(t){var n=this.config.parser(t,this.config.parserRules,this.composer.sandbox.getDocument(),!0);return"object"==typeof t&&e.quirks.redraw(t),n},_initParser:function(){this.observe("paste:composer",function(){var t=!0,n=this;n.composer.selection.executeAndRestore(function(){e.quirks.cleanPastedHTML(n.composer.element),n.parse(n.composer.element)},t)}),this.observe("paste:textarea",function(){var e,t=this.textarea.getValue();e=this.parse(t),this.textarea.setValue(e)})}})}(wysihtml5),function(e,t){function n(e){var t=pt[e]={};return Q.each(e.split(tt),function(e,n){t[n]=!0}),t}function i(e,n,i){if(i===t&&1===e.nodeType){var r="data-"+n.replace(mt,"-$1").toLowerCase();if(i=e.getAttribute(r),"string"==typeof i){try{i="true"===i?!0:"false"===i?!1:"null"===i?null:+i+""===i?+i:gt.test(i)?Q.parseJSON(i):i}catch(s){}Q.data(e,n,i)}else i=t}return i}function r(e){var t;for(t in e)if(("data"!==t||!Q.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function s(){return!1}function o(){return!0}function a(e){return!e||!e.parentNode||11===e.parentNode.nodeType}function l(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function c(e,t,n){if(t=t||0,Q.isFunction(t))return Q.grep(e,function(e,i){var r=!!t.call(e,i,e);return r===n});if(t.nodeType)return Q.grep(e,function(e){return e===t===n});if("string"==typeof t){var i=Q.grep(e,function(e){return 1===e.nodeType});if(Ft.test(t))return Q.filter(t,i,!n);t=Q.filter(t,i)}return Q.grep(e,function(e){return Q.inArray(e,t)>=0===n})}function h(e){var t=jt.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function u(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function d(e,t){if(1===t.nodeType&&Q.hasData(e)){var n,i,r,s=Q._data(e),o=Q._data(t,s),a=s.events;if(a){delete o.handle,o.events={};for(n in a)for(i=0,r=a[n].length;r>i;i++)Q.event.add(t,n,a[n][i])}o.data&&(o.data=Q.extend({},o.data))}}function f(e,t){var n;1===t.nodeType&&(t.clearAttributes&&t.clearAttributes(),t.mergeAttributes&&t.mergeAttributes(e),n=t.nodeName.toLowerCase(),"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),Q.support.html5Clone&&e.innerHTML&&!Q.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Yt.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.selected=e.defaultSelected:"input"===n||"textarea"===n?t.defaultValue=e.defaultValue:"script"===n&&t.text!==e.text&&(t.text=e.text),t.removeAttribute(Q.expando))}function p(e){return"undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName("*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll("*"):[]}function g(e){Yt.test(e.type)&&(e.defaultChecked=e.checked)}function m(e,t){if(t in e)return t;for(var n=t.charAt(0).toUpperCase()+t.slice(1),i=t,r=vn.length;r--;)if(t=vn[r]+n,t in e)return t;return i}function y(e,t){return e=t||e,"none"===Q.css(e,"display")||!Q.contains(e.ownerDocument,e)}function v(e,t){for(var n,i,r=[],s=0,o=e.length;o>s;s++)n=e[s],n.style&&(r[s]=Q._data(n,"olddisplay"),t?(!r[s]&&"none"===n.style.display&&(n.style.display=""),""===n.style.display&&y(n)&&(r[s]=Q._data(n,"olddisplay",x(n.nodeName)))):(i=nn(n,"display"),!r[s]&&"none"!==i&&Q._data(n,"olddisplay",i)));for(s=0;o>s;s++)n=e[s],n.style&&(t&&"none"!==n.style.display&&""!==n.style.display||(n.style.display=t?r[s]||"":"none"));return e}function b(e,t,n){var i=un.exec(t);return i?Math.max(0,i[1]-(n||0))+(i[2]||"px"):t}function w(e,t,n,i){for(var r=n===(i?"border":"content")?4:"width"===t?1:0,s=0;4>r;r+=2)"margin"===n&&(s+=Q.css(e,n+yn[r],!0)),i?("content"===n&&(s-=parseFloat(nn(e,"padding"+yn[r]))||0),"margin"!==n&&(s-=parseFloat(nn(e,"border"+yn[r]+"Width"))||0)):(s+=parseFloat(nn(e,"padding"+yn[r]))||0,"padding"!==n&&(s+=parseFloat(nn(e,"border"+yn[r]+"Width"))||0));return s}function _(e,t,n){var i="width"===t?e.offsetWidth:e.offsetHeight,r=!0,s=Q.support.boxSizing&&"border-box"===Q.css(e,"boxSizing");if(0>=i||null==i){if(i=nn(e,t),(0>i||null==i)&&(i=e.style[t]),dn.test(i))return i;r=s&&(Q.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+w(e,t,n||(s?"border":"content"),r)+"px"}function x(e){if(pn[e])return pn[e];var t=Q("<"+e+">").appendTo(B.body),n=t.css("display");return t.remove(),("none"===n||""===n)&&(rn=B.body.appendChild(rn||Q.extend(B.createElement("iframe"),{frameBorder:0,width:0,height:0})),sn&&rn.createElement||(sn=(rn.contentWindow||rn.contentDocument).document,sn.write(""),sn.close()),t=sn.body.appendChild(sn.createElement(e)),n=nn(t,"display"),B.body.removeChild(rn)),pn[e]=n,n}function C(e,t,n,i){var r;if(Q.isArray(t))Q.each(t,function(t,r){n||_n.test(e)?i(e,r):C(e+"["+("object"==typeof r?t:"")+"]",r,n,i)});else if(n||"object"!==Q.type(t))i(e,t);else for(r in t)C(e+"["+r+"]",t[r],n,i)}function T(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var i,r,s,o=t.toLowerCase().split(tt),a=0,l=o.length;if(Q.isFunction(n))for(;l>a;a++)i=o[a],s=/^\+/.test(i),s&&(i=i.substr(1)||"*"),r=e[i]=e[i]||[],r[s?"unshift":"push"](n)}}function E(e,n,i,r,s,o){s=s||n.dataTypes[0],o=o||{},o[s]=!0;for(var a,l=e[s],c=0,h=l?l.length:0,u=e===In;h>c&&(u||!a);c++)a=l[c](n,i,r),"string"==typeof a&&(!u||o[a]?a=t:(n.dataTypes.unshift(a),a=E(e,n,i,r,a,o)));return(u||!a)&&!o["*"]&&(a=E(e,n,i,r,"*",o)),a}function k(e,n){var i,r,s=Q.ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((s[i]?e:r||(r={}))[i]=n[i]);r&&Q.extend(!0,e,r)}function N(e,n,i){var r,s,o,a,l=e.contents,c=e.dataTypes,h=e.responseFields;for(s in h)s in i&&(n[h[s]]=i[s]);for(;"*"===c[0];)c.shift(),r===t&&(r=e.mimeType||n.getResponseHeader("content-type"));if(r)for(s in l)if(l[s]&&l[s].test(r)){c.unshift(s);break}if(c[0]in i)o=c[0];else{for(s in i){if(!c[0]||e.converters[s+" "+c[0]]){o=s;break}a||(a=s)}o=o||a}return o?(o!==c[0]&&c.unshift(o),i[o]):void 0}function A(e,t){var n,i,r,s,o=e.dataTypes.slice(),a=o[0],l={},c=0;if(e.dataFilter&&(t=e.dataFilter(t,e.dataType)),o[1])for(n in e.converters)l[n.toLowerCase()]=e.converters[n];for(;r=o[++c];)if("*"!==r){if("*"!==a&&a!==r){if(n=l[a+" "+r]||l["* "+r],!n)for(i in l)if(s=i.split(" "),s[1]===r&&(n=l[a+" "+s[0]]||l["* "+s[0]])){n===!0?n=l[i]:l[i]!==!0&&(r=s[0],o.splice(c--,0,r));break}if(n!==!0)if(n&&e["throws"])t=n(t);else try{t=n(t)}catch(h){return{state:"parsererror",error:n?h:"No conversion from "+a+" to "+r}}}a=r}return{state:"success",data:t}}function S(){try{return new e.XMLHttpRequest}catch(t){}}function D(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function M(){return setTimeout(function(){Xn=t},0),Xn=Q.now()}function R(e,t){Q.each(t,function(t,n){for(var i=(ei[t]||[]).concat(ei["*"]),r=0,s=i.length;s>r;r++)if(i[r].call(e,t,n))return})}function L(e,t,n){var i,r=0,s=Jn.length,o=Q.Deferred().always(function(){delete a.elem}),a=function(){for(var t=Xn||M(),n=Math.max(0,l.startTime+l.duration-t),i=n/l.duration||0,r=1-i,s=0,a=l.tweens.length;a>s;s++)l.tweens[s].run(r);return o.notifyWith(e,[l,r,n]),1>r&&a?n:(o.resolveWith(e,[l]),!1)},l=o.promise({elem:e,props:Q.extend({},t),opts:Q.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||M(),duration:n.duration,tweens:[],createTween:function(t,n){var i=Q.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(i),i},stop:function(t){for(var n=0,i=t?l.tweens.length:0;i>n;n++)l.tweens[n].run(1);return t?o.resolveWith(e,[l,t]):o.rejectWith(e,[l,t]),this}}),c=l.props;for(z(c,l.opts.specialEasing);s>r;r++)if(i=Jn[r].call(l,e,c,l.opts))return i;return R(l,c),Q.isFunction(l.opts.start)&&l.opts.start.call(e,l),Q.fx.timer(Q.extend(a,{anim:l,queue:l.opts.queue,elem:e})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function z(e,t){var n,i,r,s,o;for(n in e)if(i=Q.camelCase(n),r=t[i],s=e[n],Q.isArray(s)&&(r=s[1],s=e[n]=s[0]),n!==i&&(e[i]=s,delete e[n]),o=Q.cssHooks[i],o&&"expand"in o){s=o.expand(s),delete e[i];for(n in s)n in e||(e[n]=s[n],t[n]=r)}else t[i]=r}function O(e,t,n){var i,r,s,o,a,l,c,h,u,d=this,f=e.style,p={},g=[],m=e.nodeType&&y(e);n.queue||(h=Q._queueHooks(e,"fx"),null==h.unqueued&&(h.unqueued=0,u=h.empty.fire,h.empty.fire=function(){h.unqueued||u()}),h.unqueued++,d.always(function(){d.always(function(){h.unqueued--,Q.queue(e,"fx").length||h.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[f.overflow,f.overflowX,f.overflowY],"inline"===Q.css(e,"display")&&"none"===Q.css(e,"float")&&(Q.support.inlineBlockNeedsLayout&&"inline"!==x(e.nodeName)?f.zoom=1:f.display="inline-block")),n.overflow&&(f.overflow="hidden",Q.support.shrinkWrapBlocks||d.done(function(){f.overflow=n.overflow[0],f.overflowX=n.overflow[1],f.overflowY=n.overflow[2]}));for(i in t)if(s=t[i],Gn.exec(s)){if(delete t[i],l=l||"toggle"===s,s===(m?"hide":"show"))continue;g.push(i)}if(o=g.length){a=Q._data(e,"fxshow")||Q._data(e,"fxshow",{}),"hidden"in a&&(m=a.hidden),l&&(a.hidden=!m),m?Q(e).show():d.done(function(){Q(e).hide()}),d.done(function(){var t;Q.removeData(e,"fxshow",!0);for(t in p)Q.style(e,t,p[t])});for(i=0;o>i;i++)r=g[i],c=d.createTween(r,m?a[r]:0),p[r]=a[r]||Q.style(e,r),r in a||(a[r]=c.start,m&&(c.end=c.start,c.start="width"===r||"height"===r?1:0))}}function F(e,t,n,i,r){return new F.prototype.init(e,t,n,i,r)}function I(e,t){var n,i={height:e},r=0;for(t=t?1:0;4>r;r+=2-t)n=yn[r],i["margin"+n]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function H(e){return Q.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}var j,P,B=e.document,q=e.location,Z=e.navigator,$=e.jQuery,W=e.$,U=Array.prototype.push,V=Array.prototype.slice,X=Array.prototype.indexOf,Y=Object.prototype.toString,G=Object.prototype.hasOwnProperty,K=String.prototype.trim,Q=function(e,t){return new Q.fn.init(e,t,j)},J=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,et=/\S/,tt=/\s+/,nt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,it=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,rt=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,st=/^[\],:{}\s]*$/,ot=/(?:^|:|,)(?:\s*\[)+/g,at=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,lt=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,ct=/^-ms-/,ht=/-([\da-z])/gi,ut=function(e,t){return(t+"").toUpperCase()},dt=function(){B.addEventListener?(B.removeEventListener("DOMContentLoaded",dt,!1),Q.ready()):"complete"===B.readyState&&(B.detachEvent("onreadystatechange",dt),Q.ready())},ft={};Q.fn=Q.prototype={constructor:Q,init:function(e,n,i){var r,s,o;if(!e)return this;if(e.nodeType)return this.context=this[0]=e,this.length=1,this;if("string"==typeof e){if(r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:it.exec(e),r&&(r[1]||!n)){if(r[1])return n=n instanceof Q?n[0]:n,o=n&&n.nodeType?n.ownerDocument||n:B,e=Q.parseHTML(r[1],o,!0),rt.test(r[1])&&Q.isPlainObject(n)&&this.attr.call(e,n,!0),Q.merge(this,e);if(s=B.getElementById(r[2]),s&&s.parentNode){if(s.id!==r[2])return i.find(e);this.length=1,this[0]=s}return this.context=B,this.selector=e,this}return!n||n.jquery?(n||i).find(e):this.constructor(n).find(e)}return Q.isFunction(e)?i.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),Q.makeArray(e,this))},selector:"",jquery:"1.8.3",length:0,size:function(){return this.length},toArray:function(){return V.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e,t,n){var i=Q.merge(this.constructor(),e);return i.prevObject=this,i.context=this.context,"find"===t?i.selector=this.selector+(this.selector?" ":"")+n:t&&(i.selector=this.selector+"."+t+"("+n+")"),i},each:function(e,t){return Q.each(this,e,t)},ready:function(e){return Q.ready.promise().done(e),this},eq:function(e){return e=+e,-1===e?this.slice(e):this.slice(e,e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(V.apply(this,arguments),"slice",V.call(arguments).join(","))},map:function(e){return this.pushStack(Q.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:U,sort:[].sort,splice:[].splice},Q.fn.init.prototype=Q.fn,Q.extend=Q.fn.extend=function(){var e,n,i,r,s,o,a=arguments[0]||{},l=1,c=arguments.length,h=!1;for("boolean"==typeof a&&(h=a,a=arguments[1]||{},l=2),"object"!=typeof a&&!Q.isFunction(a)&&(a={}),c===l&&(a=this,--l);c>l;l++)if(null!=(e=arguments[l]))for(n in e)i=a[n],r=e[n],a!==r&&(h&&r&&(Q.isPlainObject(r)||(s=Q.isArray(r)))?(s?(s=!1,o=i&&Q.isArray(i)?i:[]):o=i&&Q.isPlainObject(i)?i:{},a[n]=Q.extend(h,o,r)):r!==t&&(a[n]=r));return a},Q.extend({noConflict:function(t){return e.$===Q&&(e.$=W),t&&e.jQuery===Q&&(e.jQuery=$),Q},isReady:!1,readyWait:1,holdReady:function(e){e?Q.readyWait++:Q.ready(!0)},ready:function(e){if(e===!0?!--Q.readyWait:!Q.isReady){if(!B.body)return setTimeout(Q.ready,1);Q.isReady=!0,e!==!0&&--Q.readyWait>0||(P.resolveWith(B,[Q]),Q.fn.trigger&&Q(B).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===Q.type(e)},isArray:Array.isArray||function(e){return"array"===Q.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?String(e):ft[Y.call(e)]||"object"},isPlainObject:function(e){if(!e||"object"!==Q.type(e)||e.nodeType||Q.isWindow(e))return!1;try{if(e.constructor&&!G.call(e,"constructor")&&!G.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var i;for(i in e);return i===t||G.call(e,i)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw new Error(e)},parseHTML:function(e,t,n){var i;return e&&"string"==typeof e?("boolean"==typeof t&&(n=t,t=0),t=t||B,(i=rt.exec(e))?[t.createElement(i[1])]:(i=Q.buildFragment([e],t,n?null:[]),Q.merge([],(i.cacheable?Q.clone(i.fragment):i.fragment).childNodes))):null},parseJSON:function(t){return t&&"string"==typeof t?(t=Q.trim(t),e.JSON&&e.JSON.parse?e.JSON.parse(t):st.test(t.replace(at,"@").replace(lt,"]").replace(ot,""))?new Function("return "+t)():(Q.error("Invalid JSON: "+t),void 0)):null},parseXML:function(n){var i,r;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(r=new DOMParser,i=r.parseFromString(n,"text/xml")):(i=new ActiveXObject("Microsoft.XMLDOM"),i.async="false",i.loadXML(n))}catch(s){i=t}return(!i||!i.documentElement||i.getElementsByTagName("parsererror").length)&&Q.error("Invalid XML: "+n),i},noop:function(){},globalEval:function(t){t&&et.test(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(ct,"ms-").replace(ht,ut)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,n,i){var r,s=0,o=e.length,a=o===t||Q.isFunction(e);if(i)if(a){for(r in e)if(n.apply(e[r],i)===!1)break}else for(;o>s&&n.apply(e[s++],i)!==!1;);else if(a){for(r in e)if(n.call(e[r],r,e[r])===!1)break}else for(;o>s&&n.call(e[s],s,e[s++])!==!1;);return e},trim:K&&!K.call(" ")?function(e){return null==e?"":K.call(e)}:function(e){return null==e?"":(e+"").replace(nt,"")},makeArray:function(e,t){var n,i=t||[];return null!=e&&(n=Q.type(e),null==e.length||"string"===n||"function"===n||"regexp"===n||Q.isWindow(e)?U.call(i,e):Q.merge(i,e)),i},inArray:function(e,t,n){var i;if(t){if(X)return X.call(t,e,n);for(i=t.length,n=n?0>n?Math.max(0,i+n):n:0;i>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var i=n.length,r=e.length,s=0;if("number"==typeof i)for(;i>s;s++)e[r++]=n[s];else for(;n[s]!==t;)e[r++]=n[s++];return e.length=r,e},grep:function(e,t,n){var i,r=[],s=0,o=e.length;for(n=!!n;o>s;s++)i=!!t(e[s],s),n!==i&&r.push(e[s]);return r},map:function(e,n,i){var r,s,o=[],a=0,l=e.length,c=e instanceof Q||l!==t&&"number"==typeof l&&(l>0&&e[0]&&e[l-1]||0===l||Q.isArray(e));if(c)for(;l>a;a++)r=n(e[a],a,i),null!=r&&(o[o.length]=r);else for(s in e)r=n(e[s],s,i),null!=r&&(o[o.length]=r);return o.concat.apply([],o)},guid:1,proxy:function(e,n){var i,r,s;return"string"==typeof n&&(i=e[n],n=e,e=i),Q.isFunction(e)?(r=V.call(arguments,2),s=function(){return e.apply(n,r.concat(V.call(arguments)))},s.guid=e.guid=e.guid||Q.guid++,s):t},access:function(e,n,i,r,s,o,a){var l,c=null==i,h=0,u=e.length;if(i&&"object"==typeof i){for(h in i)Q.access(e,n,h,i[h],1,o,r);s=1}else if(r!==t){if(l=a===t&&Q.isFunction(r),c&&(l?(l=n,n=function(e,t,n){return l.call(Q(e),n)}):(n.call(e,r),n=null)),n)for(;u>h;h++)n(e[h],i,l?r.call(e[h],h,n(e[h],i)):r,a);s=1}return s?e:c?n.call(e):u?n(e[0],i):o},now:function(){return(new Date).getTime()}}),Q.ready.promise=function(t){if(!P)if(P=Q.Deferred(),"complete"===B.readyState)setTimeout(Q.ready,1);else if(B.addEventListener)B.addEventListener("DOMContentLoaded",dt,!1),e.addEventListener("load",Q.ready,!1);else{B.attachEvent("onreadystatechange",dt),e.attachEvent("onload",Q.ready);var n=!1;try{n=null==e.frameElement&&B.documentElement}catch(i){}n&&n.doScroll&&function r(){if(!Q.isReady){try{n.doScroll("left")}catch(e){return setTimeout(r,50)}Q.ready()}}()}return P.promise(t)},Q.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(e,t){ft["[object "+t+"]"]=t.toLowerCase()}),j=Q(B);var pt={};Q.Callbacks=function(e){e="string"==typeof e?pt[e]||n(e):Q.extend({},e);var i,r,s,o,a,l,c=[],h=!e.once&&[],u=function(t){for(i=e.memory&&t,r=!0,l=o||0,o=0,a=c.length,s=!0;c&&a>l;l++)if(c[l].apply(t[0],t[1])===!1&&e.stopOnFalse){i=!1;break}s=!1,c&&(h?h.length&&u(h.shift()):i?c=[]:d.disable())},d={add:function(){if(c){var t=c.length;(function n(t){Q.each(t,function(t,i){var r=Q.type(i);"function"===r?(!e.unique||!d.has(i))&&c.push(i):i&&i.length&&"string"!==r&&n(i)})})(arguments),s?a=c.length:i&&(o=t,u(i))}return this},remove:function(){return c&&Q.each(arguments,function(e,t){for(var n;(n=Q.inArray(t,c,n))>-1;)c.splice(n,1),s&&(a>=n&&a--,l>=n&&l--)}),this},has:function(e){return Q.inArray(e,c)>-1},empty:function(){return c=[],this},disable:function(){return c=h=i=t,this},disabled:function(){return!c},lock:function(){return h=t,i||d.disable(),this},locked:function(){return!h},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],c&&(!r||h)&&(s?h.push(t):u(t)),this},fire:function(){return d.fireWith(this,arguments),this},fired:function(){return!!r}};return d},Q.extend({Deferred:function(e){var t=[["resolve","done",Q.Callbacks("once memory"),"resolved"],["reject","fail",Q.Callbacks("once memory"),"rejected"],["notify","progress",Q.Callbacks("memory")]],n="pending",i={state:function(){return n},always:function(){return r.done(arguments).fail(arguments),this},then:function(){var e=arguments;return Q.Deferred(function(n){Q.each(t,function(t,i){var s=i[0],o=e[t];r[i[1]](Q.isFunction(o)?function(){var e=o.apply(this,arguments);e&&Q.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[s+"With"](this===r?n:this,[e])}:n[s])}),e=null}).promise()},promise:function(e){return null!=e?Q.extend(e,i):i}},r={};return i.pipe=i.then,Q.each(t,function(e,s){var o=s[2],a=s[3];i[s[1]]=o.add,a&&o.add(function(){n=a},t[1^e][2].disable,t[2][2].lock),r[s[0]]=o.fire,r[s[0]+"With"]=o.fireWith}),i.promise(r),e&&e.call(r,r),r},when:function(e){var t,n,i,r=0,s=V.call(arguments),o=s.length,a=1!==o||e&&Q.isFunction(e.promise)?o:0,l=1===a?e:Q.Deferred(),c=function(e,n,i){return function(r){n[e]=this,i[e]=arguments.length>1?V.call(arguments):r,i===t?l.notifyWith(n,i):--a||l.resolveWith(n,i)}};if(o>1)for(t=new Array(o),n=new Array(o),i=new Array(o);o>r;r++)s[r]&&Q.isFunction(s[r].promise)?s[r].promise().done(c(r,i,s)).fail(l.reject).progress(c(r,n,t)):--a;return a||l.resolveWith(i,s),l.promise()}}),Q.support=function(){var t,n,i,r,s,o,a,l,c,h,u,d=B.createElement("div");if(d.setAttribute("className","t"),d.innerHTML=" a",n=d.getElementsByTagName("*"),i=d.getElementsByTagName("a")[0],!n||!i||!n.length)return{};r=B.createElement("select"),s=r.appendChild(B.createElement("option")),o=d.getElementsByTagName("input")[0],i.style.cssText="top:1px;float:left;opacity:.5",t={leadingWhitespace:3===d.firstChild.nodeType,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/top/.test(i.getAttribute("style")),hrefNormalized:"/a"===i.getAttribute("href"),opacity:/^0.5/.test(i.style.opacity),cssFloat:!!i.style.cssFloat,checkOn:"on"===o.value,optSelected:s.selected,getSetAttribute:"t"!==d.className,enctype:!!B.createElement("form").enctype,html5Clone:"<:nav>"!==B.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===B.compatMode,submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},o.checked=!0,t.noCloneChecked=o.cloneNode(!0).checked,r.disabled=!0,t.optDisabled=!s.disabled;try{delete d.test}catch(f){t.deleteExpando=!1}if(!d.addEventListener&&d.attachEvent&&d.fireEvent&&(d.attachEvent("onclick",u=function(){t.noCloneEvent=!1}),d.cloneNode(!0).fireEvent("onclick"),d.detachEvent("onclick",u)),o=B.createElement("input"),o.value="t",o.setAttribute("type","radio"),t.radioValue="t"===o.value,o.setAttribute("checked","checked"),o.setAttribute("name","t"),d.appendChild(o),a=B.createDocumentFragment(),a.appendChild(d.lastChild),t.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,t.appendChecked=o.checked,a.removeChild(o),a.appendChild(d),d.attachEvent)for(c in{submit:!0,change:!0,focusin:!0})l="on"+c,h=l in d,h||(d.setAttribute(l,"return;"),h="function"==typeof d[l]),t[c+"Bubbles"]=h;return Q(function(){var n,i,r,s,o="padding:0;margin:0;border:0;display:block;overflow:hidden;",a=B.getElementsByTagName("body")[0];a&&(n=B.createElement("div"),n.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",a.insertBefore(n,a.firstChild),i=B.createElement("div"),n.appendChild(i),i.innerHTML="",r=i.getElementsByTagName("td"),r[0].style.cssText="padding:0;margin:0;border:0;display:none",h=0===r[0].offsetHeight,r[0].style.display="",r[1].style.display="none",t.reliableHiddenOffsets=h&&0===r[0].offsetHeight,i.innerHTML="",i.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=4===i.offsetWidth,t.doesNotIncludeMarginInBodyOffset=1!==a.offsetTop,e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(i,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(i,null)||{width:"4px"}).width,s=B.createElement("div"),s.style.cssText=i.style.cssText=o,s.style.marginRight=s.style.width="0",i.style.width="1px",i.appendChild(s),t.reliableMarginRight=!parseFloat((e.getComputedStyle(s,null)||{}).marginRight)),"undefined"!=typeof i.style.zoom&&(i.innerHTML="",i.style.cssText=o+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===i.offsetWidth,i.style.display="block",i.style.overflow="visible",i.innerHTML="",i.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==i.offsetWidth,n.style.zoom=1),a.removeChild(n),n=i=r=s=null)}),a.removeChild(d),n=i=r=s=o=a=d=null,t}();var gt=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,mt=/([A-Z])/g;Q.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(Q.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?Q.cache[e[Q.expando]]:e[Q.expando],!!e&&!r(e)},data:function(e,n,i,r){if(Q.acceptData(e)){var s,o,a=Q.expando,l="string"==typeof n,c=e.nodeType,h=c?Q.cache:e,u=c?e[a]:e[a]&&a;if(u&&h[u]&&(r||h[u].data)||!l||i!==t)return u||(c?e[a]=u=Q.deletedIds.pop()||Q.guid++:u=a),h[u]||(h[u]={},c||(h[u].toJSON=Q.noop)),("object"==typeof n||"function"==typeof n)&&(r?h[u]=Q.extend(h[u],n):h[u].data=Q.extend(h[u].data,n)),s=h[u],r||(s.data||(s.data={}),s=s.data),i!==t&&(s[Q.camelCase(n)]=i),l?(o=s[n],null==o&&(o=s[Q.camelCase(n)])):o=s,o}},removeData:function(e,t,n){if(Q.acceptData(e)){var i,s,o,a=e.nodeType,l=a?Q.cache:e,c=a?e[Q.expando]:Q.expando;if(l[c]){if(t&&(i=n?l[c]:l[c].data)){Q.isArray(t)||(t in i?t=[t]:(t=Q.camelCase(t),t=t in i?[t]:t.split(" ")));for(s=0,o=t.length;o>s;s++)delete i[t[s]];if(!(n?r:Q.isEmptyObject)(i))return}(n||(delete l[c].data,r(l[c])))&&(a?Q.cleanData([e],!0):Q.support.deleteExpando||l!=l.window?delete l[c]:l[c]=null)}}},_data:function(e,t,n){return Q.data(e,t,n,!0)},acceptData:function(e){var t=e.nodeName&&Q.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),Q.fn.extend({data:function(e,n){var r,s,o,a,l,c=this[0],h=0,u=null;if(e===t){if(this.length&&(u=Q.data(c),1===c.nodeType&&!Q._data(c,"parsedAttrs"))){for(o=c.attributes,l=o.length;l>h;h++)a=o[h].name,a.indexOf("data-")||(a=Q.camelCase(a.substring(5)),i(c,a,u[a]));Q._data(c,"parsedAttrs",!0)}return u}return"object"==typeof e?this.each(function(){Q.data(this,e)}):(r=e.split(".",2),r[1]=r[1]?"."+r[1]:"",s=r[1]+"!",Q.access(this,function(n){return n===t?(u=this.triggerHandler("getData"+s,[r[0]]),u===t&&c&&(u=Q.data(c,e),u=i(c,e,u)),u===t&&r[1]?this.data(r[0]):u):(r[1]=n,this.each(function(){var t=Q(this);t.triggerHandler("setData"+s,r),Q.data(this,e,n),t.triggerHandler("changeData"+s,r)}),void 0)},null,n,arguments.length>1,null,!1))},removeData:function(e){return this.each(function(){Q.removeData(this,e)})}}),Q.extend({queue:function(e,t,n){var i;return e?(t=(t||"fx")+"queue",i=Q._data(e,t),n&&(!i||Q.isArray(n)?i=Q._data(e,t,Q.makeArray(n)):i.push(n)),i||[]):void 0},dequeue:function(e,t){t=t||"fx";var n=Q.queue(e,t),i=n.length,r=n.shift(),s=Q._queueHooks(e,t),o=function(){Q.dequeue(e,t)};"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===t&&n.unshift("inprogress"),delete s.stop,r.call(e,o,s)),!i&&s&&s.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Q._data(e,n)||Q._data(e,n,{empty:Q.Callbacks("once memory").add(function(){Q.removeData(e,t+"queue",!0),Q.removeData(e,n,!0)})})}}),Q.fn.extend({queue:function(e,n){var i=2;return"string"!=typeof e&&(n=e,e="fx",i--),i>arguments.length?Q.queue(this[0],e):n===t?this:this.each(function(){var t=Q.queue(this,e,n);Q._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&Q.dequeue(this,e)})},dequeue:function(e){return this.each(function(){Q.dequeue(this,e)})},delay:function(e,t){return e=Q.fx?Q.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var i=setTimeout(t,e);n.stop=function(){clearTimeout(i)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var i,r=1,s=Q.Deferred(),o=this,a=this.length,l=function(){--r||s.resolveWith(o,[o])};for("string"!=typeof e&&(n=e,e=t),e=e||"fx";a--;)i=Q._data(o[a],e+"queueHooks"),i&&i.empty&&(r++,i.empty.add(l));return l(),s.promise(n)}});var yt,vt,bt,wt=/[\t\r\n]/g,_t=/\r/g,xt=/^(?:button|input)$/i,Ct=/^(?:button|input|object|select|textarea)$/i,Tt=/^a(?:rea|)$/i,Et=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,kt=Q.support.getSetAttribute;
-Q.fn.extend({attr:function(e,t){return Q.access(this,Q.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){Q.removeAttr(this,e)})},prop:function(e,t){return Q.access(this,Q.prop,e,t,arguments.length>1)},removeProp:function(e){return e=Q.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,i,r,s,o,a;if(Q.isFunction(e))return this.each(function(t){Q(this).addClass(e.call(this,t,this.className))});if(e&&"string"==typeof e)for(t=e.split(tt),n=0,i=this.length;i>n;n++)if(r=this[n],1===r.nodeType)if(r.className||1!==t.length){for(s=" "+r.className+" ",o=0,a=t.length;a>o;o++)0>s.indexOf(" "+t[o]+" ")&&(s+=t[o]+" ");r.className=Q.trim(s)}else r.className=e;return this},removeClass:function(e){var n,i,r,s,o,a,l;if(Q.isFunction(e))return this.each(function(t){Q(this).removeClass(e.call(this,t,this.className))});if(e&&"string"==typeof e||e===t)for(n=(e||"").split(tt),a=0,l=this.length;l>a;a++)if(r=this[a],1===r.nodeType&&r.className){for(i=(" "+r.className+" ").replace(wt," "),s=0,o=n.length;o>s;s++)for(;i.indexOf(" "+n[s]+" ")>=0;)i=i.replace(" "+n[s]+" "," ");r.className=e?Q.trim(i):""}return this},toggleClass:function(e,t){var n=typeof e,i="boolean"==typeof t;return Q.isFunction(e)?this.each(function(n){Q(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n)for(var r,s=0,o=Q(this),a=t,l=e.split(tt);r=l[s++];)a=i?a:!o.hasClass(r),o[a?"addClass":"removeClass"](r);else("undefined"===n||"boolean"===n)&&(this.className&&Q._data(this,"__className__",this.className),this.className=this.className||e===!1?"":Q._data(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",n=0,i=this.length;i>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(wt," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,i,r,s=this[0];{if(arguments.length)return r=Q.isFunction(e),this.each(function(i){var s,o=Q(this);1===this.nodeType&&(s=r?e.call(this,i,o.val()):e,null==s?s="":"number"==typeof s?s+="":Q.isArray(s)&&(s=Q.map(s,function(e){return null==e?"":e+""})),n=Q.valHooks[this.type]||Q.valHooks[this.nodeName.toLowerCase()],n&&"set"in n&&n.set(this,s,"value")!==t||(this.value=s))});if(s)return n=Q.valHooks[s.type]||Q.valHooks[s.nodeName.toLowerCase()],n&&"get"in n&&(i=n.get(s,"value"))!==t?i:(i=s.value,"string"==typeof i?i.replace(_t,""):null==i?"":i)}}}),Q.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){for(var t,n,i=e.options,r=e.selectedIndex,s="select-one"===e.type||0>r,o=s?null:[],a=s?r+1:i.length,l=0>r?a:s?r:0;a>l;l++)if(n=i[l],!(!n.selected&&l!==r||(Q.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&Q.nodeName(n.parentNode,"optgroup"))){if(t=Q(n).val(),s)return t;o.push(t)}return o},set:function(e,t){var n=Q.makeArray(t);return Q(e).find("option").each(function(){this.selected=Q.inArray(Q(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attrFn:{},attr:function(e,n,i,r){var s,o,a,l=e.nodeType;if(e&&3!==l&&8!==l&&2!==l)return r&&Q.isFunction(Q.fn[n])?Q(e)[n](i):"undefined"==typeof e.getAttribute?Q.prop(e,n,i):(a=1!==l||!Q.isXMLDoc(e),a&&(n=n.toLowerCase(),o=Q.attrHooks[n]||(Et.test(n)?vt:yt)),i!==t?null===i?(Q.removeAttr(e,n),void 0):o&&"set"in o&&a&&(s=o.set(e,i,n))!==t?s:(e.setAttribute(n,i+""),i):o&&"get"in o&&a&&null!==(s=o.get(e,n))?s:(s=e.getAttribute(n),null===s?t:s))},removeAttr:function(e,t){var n,i,r,s,o=0;if(t&&1===e.nodeType)for(i=t.split(tt);i.length>o;o++)r=i[o],r&&(n=Q.propFix[r]||r,s=Et.test(r),s||Q.attr(e,r,""),e.removeAttribute(kt?r:n),s&&n in e&&(e[n]=!1))},attrHooks:{type:{set:function(e,t){if(xt.test(e.nodeName)&&e.parentNode)Q.error("type property can't be changed");else if(!Q.support.radioValue&&"radio"===t&&Q.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}},value:{get:function(e,t){return yt&&Q.nodeName(e,"button")?yt.get(e,t):t in e?e.value:null},set:function(e,t,n){return yt&&Q.nodeName(e,"button")?yt.set(e,t,n):(e.value=t,void 0)}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,i){var r,s,o,a=e.nodeType;if(e&&3!==a&&8!==a&&2!==a)return o=1!==a||!Q.isXMLDoc(e),o&&(n=Q.propFix[n]||n,s=Q.propHooks[n]),i!==t?s&&"set"in s&&(r=s.set(e,i,n))!==t?r:e[n]=i:s&&"get"in s&&null!==(r=s.get(e,n))?r:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):Ct.test(e.nodeName)||Tt.test(e.nodeName)&&e.href?0:t}}}}),vt={get:function(e,n){var i,r=Q.prop(e,n);return r===!0||"boolean"!=typeof r&&(i=e.getAttributeNode(n))&&i.nodeValue!==!1?n.toLowerCase():t},set:function(e,t,n){var i;return t===!1?Q.removeAttr(e,n):(i=Q.propFix[n]||n,i in e&&(e[i]=!0),e.setAttribute(n,n.toLowerCase())),n}},kt||(bt={name:!0,id:!0,coords:!0},yt=Q.valHooks.button={get:function(e,n){var i;return i=e.getAttributeNode(n),i&&(bt[n]?""!==i.value:i.specified)?i.value:t},set:function(e,t,n){var i=e.getAttributeNode(n);return i||(i=B.createAttribute(n),e.setAttributeNode(i)),i.value=t+""}},Q.each(["width","height"],function(e,t){Q.attrHooks[t]=Q.extend(Q.attrHooks[t],{set:function(e,n){return""===n?(e.setAttribute(t,"auto"),n):void 0}})}),Q.attrHooks.contenteditable={get:yt.get,set:function(e,t,n){""===t&&(t="false"),yt.set(e,t,n)}}),Q.support.hrefNormalized||Q.each(["href","src","width","height"],function(e,n){Q.attrHooks[n]=Q.extend(Q.attrHooks[n],{get:function(e){var i=e.getAttribute(n,2);return null===i?t:i}})}),Q.support.style||(Q.attrHooks.style={get:function(e){return e.style.cssText.toLowerCase()||t},set:function(e,t){return e.style.cssText=t+""}}),Q.support.optSelected||(Q.propHooks.selected=Q.extend(Q.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),Q.support.enctype||(Q.propFix.enctype="encoding"),Q.support.checkOn||Q.each(["radio","checkbox"],function(){Q.valHooks[this]={get:function(e){return null===e.getAttribute("value")?"on":e.value}}}),Q.each(["radio","checkbox"],function(){Q.valHooks[this]=Q.extend(Q.valHooks[this],{set:function(e,t){return Q.isArray(t)?e.checked=Q.inArray(Q(e).val(),t)>=0:void 0}})});var Nt=/^(?:textarea|input|select)$/i,At=/^([^\.]*|)(?:\.(.+)|)$/,St=/(?:^|\s)hover(\.\S+|)\b/,Dt=/^key/,Mt=/^(?:mouse|contextmenu)|click/,Rt=/^(?:focusinfocus|focusoutblur)$/,Lt=function(e){return Q.event.special.hover?e:e.replace(St,"mouseenter$1 mouseleave$1")};Q.event={add:function(e,n,i,r,s){var o,a,l,c,h,u,d,f,p,g,m;if(3!==e.nodeType&&8!==e.nodeType&&n&&i&&(o=Q._data(e))){for(i.handler&&(p=i,i=p.handler,s=p.selector),i.guid||(i.guid=Q.guid++),l=o.events,l||(o.events=l={}),a=o.handle,a||(o.handle=a=function(e){return"undefined"==typeof Q||e&&Q.event.triggered===e.type?t:Q.event.dispatch.apply(a.elem,arguments)},a.elem=e),n=Q.trim(Lt(n)).split(" "),c=0;n.length>c;c++)h=At.exec(n[c])||[],u=h[1],d=(h[2]||"").split(".").sort(),m=Q.event.special[u]||{},u=(s?m.delegateType:m.bindType)||u,m=Q.event.special[u]||{},f=Q.extend({type:u,origType:h[1],data:r,handler:i,guid:i.guid,selector:s,needsContext:s&&Q.expr.match.needsContext.test(s),namespace:d.join(".")},p),g=l[u],g||(g=l[u]=[],g.delegateCount=0,m.setup&&m.setup.call(e,r,d,a)!==!1||(e.addEventListener?e.addEventListener(u,a,!1):e.attachEvent&&e.attachEvent("on"+u,a))),m.add&&(m.add.call(e,f),f.handler.guid||(f.handler.guid=i.guid)),s?g.splice(g.delegateCount++,0,f):g.push(f),Q.event.global[u]=!0;e=null}},global:{},remove:function(e,t,n,i,r){var s,o,a,l,c,h,u,d,f,p,g,m=Q.hasData(e)&&Q._data(e);if(m&&(d=m.events)){for(t=Q.trim(Lt(t||"")).split(" "),s=0;t.length>s;s++)if(o=At.exec(t[s])||[],a=l=o[1],c=o[2],a){for(f=Q.event.special[a]||{},a=(i?f.delegateType:f.bindType)||a,p=d[a]||[],h=p.length,c=c?new RegExp("(^|\\.)"+c.split(".").sort().join("\\.(?:.*\\.|)")+"(\\.|$)"):null,u=0;p.length>u;u++)g=p[u],!(!r&&l!==g.origType||n&&n.guid!==g.guid||c&&!c.test(g.namespace)||i&&i!==g.selector&&("**"!==i||!g.selector)||(p.splice(u--,1),g.selector&&p.delegateCount--,!f.remove||!f.remove.call(e,g)));0===p.length&&h!==p.length&&((!f.teardown||f.teardown.call(e,c,m.handle)===!1)&&Q.removeEvent(e,a,m.handle),delete d[a])}else for(a in d)Q.event.remove(e,a+t[s],n,i,!0);Q.isEmptyObject(d)&&(delete m.handle,Q.removeData(e,"events",!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(n,i,r,s){if(!r||3!==r.nodeType&&8!==r.nodeType){var o,a,l,c,h,u,d,f,p,g,m=n.type||n,y=[];if(Rt.test(m+Q.event.triggered))return;if(m.indexOf("!")>=0&&(m=m.slice(0,-1),a=!0),m.indexOf(".")>=0&&(y=m.split("."),m=y.shift(),y.sort()),(!r||Q.event.customEvent[m])&&!Q.event.global[m])return;if(n="object"==typeof n?n[Q.expando]?n:new Q.Event(m,n):new Q.Event(m),n.type=m,n.isTrigger=!0,n.exclusive=a,n.namespace=y.join("."),n.namespace_re=n.namespace?new RegExp("(^|\\.)"+y.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,u=0>m.indexOf(":")?"on"+m:"",!r){o=Q.cache;for(l in o)o[l].events&&o[l].events[m]&&Q.event.trigger(n,i,o[l].handle.elem,!0);return}if(n.result=t,n.target||(n.target=r),i=null!=i?Q.makeArray(i):[],i.unshift(n),d=Q.event.special[m]||{},d.trigger&&d.trigger.apply(r,i)===!1)return;if(p=[[r,d.bindType||m]],!s&&!d.noBubble&&!Q.isWindow(r)){for(g=d.delegateType||m,c=Rt.test(g+m)?r:r.parentNode,h=r;c;c=c.parentNode)p.push([c,g]),h=c;h===(r.ownerDocument||B)&&p.push([h.defaultView||h.parentWindow||e,g])}for(l=0;p.length>l&&!n.isPropagationStopped();l++)c=p[l][0],n.type=p[l][1],f=(Q._data(c,"events")||{})[n.type]&&Q._data(c,"handle"),f&&f.apply(c,i),f=u&&c[u],f&&Q.acceptData(c)&&f.apply&&f.apply(c,i)===!1&&n.preventDefault();return n.type=m,!(s||n.isDefaultPrevented()||d._default&&d._default.apply(r.ownerDocument,i)!==!1||"click"===m&&Q.nodeName(r,"a")||!Q.acceptData(r)||!u||!r[m]||("focus"===m||"blur"===m)&&0===n.target.offsetWidth||Q.isWindow(r)||(h=r[u],h&&(r[u]=null),Q.event.triggered=m,r[m](),Q.event.triggered=t,!h||!(r[u]=h))),n.result}},dispatch:function(n){n=Q.event.fix(n||e.event);var i,r,s,o,a,l,c,h,u,d=(Q._data(this,"events")||{})[n.type]||[],f=d.delegateCount,p=V.call(arguments),g=!n.exclusive&&!n.namespace,m=Q.event.special[n.type]||{},y=[];if(p[0]=n,n.delegateTarget=this,!m.preDispatch||m.preDispatch.call(this,n)!==!1){if(f&&(!n.button||"click"!==n.type))for(s=n.target;s!=this;s=s.parentNode||this)if(s.disabled!==!0||"click"!==n.type){for(a={},c=[],i=0;f>i;i++)h=d[i],u=h.selector,a[u]===t&&(a[u]=h.needsContext?Q(u,this).index(s)>=0:Q.find(u,this,null,[s]).length),a[u]&&c.push(h);c.length&&y.push({elem:s,matches:c})}for(d.length>f&&y.push({elem:this,matches:d.slice(f)}),i=0;y.length>i&&!n.isPropagationStopped();i++)for(l=y[i],n.currentTarget=l.elem,r=0;l.matches.length>r&&!n.isImmediatePropagationStopped();r++)h=l.matches[r],(g||!n.namespace&&!h.namespace||n.namespace_re&&n.namespace_re.test(h.namespace))&&(n.data=h.data,n.handleObj=h,o=((Q.event.special[h.origType]||{}).handle||h.handler).apply(l.elem,p),o!==t&&(n.result=o,o===!1&&(n.preventDefault(),n.stopPropagation())));return m.postDispatch&&m.postDispatch.call(this,n),n.result}},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var i,r,s,o=n.button,a=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||B,r=i.documentElement,s=i.body,e.pageX=n.clientX+(r&&r.scrollLeft||s&&s.scrollLeft||0)-(r&&r.clientLeft||s&&s.clientLeft||0),e.pageY=n.clientY+(r&&r.scrollTop||s&&s.scrollTop||0)-(r&&r.clientTop||s&&s.clientTop||0)),!e.relatedTarget&&a&&(e.relatedTarget=a===e.target?n.toElement:a),!e.which&&o!==t&&(e.which=1&o?1:2&o?3:4&o?2:0),e}},fix:function(e){if(e[Q.expando])return e;var t,n,i=e,r=Q.event.fixHooks[e.type]||{},s=r.props?this.props.concat(r.props):this.props;for(e=Q.Event(i),t=s.length;t;)n=s[--t],e[n]=i[n];return e.target||(e.target=i.srcElement||B),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,r.filter?r.filter(e,i):e},special:{load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(e,t,n){Q.isWindow(this)&&(this.onbeforeunload=n)},teardown:function(e,t){this.onbeforeunload===t&&(this.onbeforeunload=null)}}},simulate:function(e,t,n,i){var r=Q.extend(new Q.Event,n,{type:e,isSimulated:!0,originalEvent:{}});i?Q.event.trigger(r,null,t):Q.event.dispatch.call(t,r),r.isDefaultPrevented()&&n.preventDefault()}},Q.event.handle=Q.event.dispatch,Q.removeEvent=B.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var i="on"+t;e.detachEvent&&("undefined"==typeof e[i]&&(e[i]=null),e.detachEvent(i,n))},Q.Event=function(e,t){return this instanceof Q.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?o:s):this.type=e,t&&Q.extend(this,t),this.timeStamp=e&&e.timeStamp||Q.now(),this[Q.expando]=!0,void 0):new Q.Event(e,t)},Q.Event.prototype={preventDefault:function(){this.isDefaultPrevented=o;var e=this.originalEvent;e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=o;var e=this.originalEvent;e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=o,this.stopPropagation()},isDefaultPrevented:s,isPropagationStopped:s,isImmediatePropagationStopped:s},Q.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){Q.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,i=this,r=e.relatedTarget,s=e.handleObj;return s.selector,(!r||r!==i&&!Q.contains(i,r))&&(e.type=s.origType,n=s.handler.apply(this,arguments),e.type=t),n}}}),Q.support.submitBubbles||(Q.event.special.submit={setup:function(){return Q.nodeName(this,"form")?!1:(Q.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,i=Q.nodeName(n,"input")||Q.nodeName(n,"button")?n.form:t;i&&!Q._data(i,"_submit_attached")&&(Q.event.add(i,"submit._submit",function(e){e._submit_bubble=!0}),Q._data(i,"_submit_attached",!0))}),void 0)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&Q.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return Q.nodeName(this,"form")?!1:(Q.event.remove(this,"._submit"),void 0)}}),Q.support.changeBubbles||(Q.event.special.change={setup:function(){return Nt.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(Q.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),Q.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),Q.event.simulate("change",this,e,!0)})),!1):(Q.event.add(this,"beforeactivate._change",function(e){var t=e.target;Nt.test(t.nodeName)&&!Q._data(t,"_change_attached")&&(Q.event.add(t,"change._change",function(e){this.parentNode&&!e.isSimulated&&!e.isTrigger&&Q.event.simulate("change",this.parentNode,e,!0)}),Q._data(t,"_change_attached",!0))}),void 0)},handle:function(e){var t=e.target;return this!==t||e.isSimulated||e.isTrigger||"radio"!==t.type&&"checkbox"!==t.type?e.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return Q.event.remove(this,"._change"),!Nt.test(this.nodeName)}}),Q.support.focusinBubbles||Q.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,i=function(e){Q.event.simulate(t,e.target,Q.event.fix(e),!0)};Q.event.special[t]={setup:function(){0===n++&&B.addEventListener(e,i,!0)},teardown:function(){0===--n&&B.removeEventListener(e,i,!0)}}}),Q.fn.extend({on:function(e,n,i,r,o){var a,l;if("object"==typeof e){"string"!=typeof n&&(i=i||n,n=t);for(l in e)this.on(l,n,i,e[l],o);return this}if(null==i&&null==r?(r=n,i=n=t):null==r&&("string"==typeof n?(r=i,i=t):(r=i,i=n,n=t)),r===!1)r=s;else if(!r)return this;return 1===o&&(a=r,r=function(e){return Q().off(e),a.apply(this,arguments)},r.guid=a.guid||(a.guid=Q.guid++)),this.each(function(){Q.event.add(this,e,r,i,n)})},one:function(e,t,n,i){return this.on(e,t,n,i,1)},off:function(e,n,i){var r,o;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,Q(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(i=n,n=t),i===!1&&(i=s),this.each(function(){Q.event.remove(this,e,i,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},live:function(e,t,n){return Q(this.context).on(e,this.selector,t,n),this},die:function(e,t){return Q(this.context).off(e,this.selector||"**",t),this},delegate:function(e,t,n,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each(function(){Q.event.trigger(e,t,this)})},triggerHandler:function(e,t){return this[0]?Q.event.trigger(e,t,this[0],!0):void 0},toggle:function(e){var t=arguments,n=e.guid||Q.guid++,i=0,r=function(n){var r=(Q._data(this,"lastToggle"+e.guid)||0)%i;return Q._data(this,"lastToggle"+e.guid,r+1),n.preventDefault(),t[r].apply(this,arguments)||!1};for(r.guid=n;t.length>i;)t[i++].guid=n;return this.click(r)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),Q.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){Q.fn[t]=function(e,n){return null==n&&(n=e,e=null),arguments.length>0?this.on(t,null,e,n):this.trigger(t)},Dt.test(t)&&(Q.event.fixHooks[t]=Q.event.keyHooks),Mt.test(t)&&(Q.event.fixHooks[t]=Q.event.mouseHooks)}),function(e,t){function n(e,t,n,i){n=n||[],t=t||M;var r,s,o,a,l=t.nodeType;if(!e||"string"!=typeof e)return n;if(1!==l&&9!==l)return[];if(o=_(t),!o&&!i&&(r=nt.exec(e)))if(a=r[1]){if(9===l){if(s=t.getElementById(a),!s||!s.parentNode)return n;if(s.id===a)return n.push(s),n}else if(t.ownerDocument&&(s=t.ownerDocument.getElementById(a))&&x(t,s)&&s.id===a)return n.push(s),n}else{if(r[2])return F.apply(n,I.call(t.getElementsByTagName(e),0)),n;if((a=r[3])&&dt&&t.getElementsByClassName)return F.apply(n,I.call(t.getElementsByClassName(a),0)),n}return g(e.replace(K,"$1"),t,n,i,o)}function i(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function r(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function s(e){return j(function(t){return t=+t,j(function(n,i){for(var r,s=e([],n.length,t),o=s.length;o--;)n[r=s[o]]&&(n[r]=!(i[r]=n[r]))})})}function o(e,t,n){if(e===t)return n;for(var i=e.nextSibling;i;){if(i===t)return-1;i=i.nextSibling}return 1}function a(e,t){var i,r,s,o,a,l,c,h=q[S][e+" "];if(h)return t?0:h.slice(0);for(a=e,l=[],c=b.preFilter;a;){(!i||(r=J.exec(a)))&&(r&&(a=a.slice(r[0].length)||a),l.push(s=[])),i=!1,(r=et.exec(a))&&(s.push(i=new D(r.shift())),a=a.slice(i.length),i.type=r[0].replace(K," "));for(o in b.filter)(r=at[o].exec(a))&&(!c[o]||(r=c[o](r)))&&(s.push(i=new D(r.shift())),a=a.slice(i.length),i.type=o,i.matches=r);if(!i)break}return t?a.length:a?n.error(e):q(e,l).slice(0)}function l(e,t,n){var i=t.dir,r=n&&"parentNode"===t.dir,s=z++;return t.first?function(t,n,s){for(;t=t[i];)if(r||1===t.nodeType)return e(t,n,s)}:function(t,n,o){if(o){for(;t=t[i];)if((r||1===t.nodeType)&&e(t,n,o))return t}else for(var a,l=L+" "+s+" ",c=l+y;t=t[i];)if(r||1===t.nodeType){if((a=t[S])===c)return t.sizset;if("string"==typeof a&&0===a.indexOf(l)){if(t.sizset)return t}else{if(t[S]=c,e(t,n,o))return t.sizset=!0,t;t.sizset=!1}}}}function c(e){return e.length>1?function(t,n,i){for(var r=e.length;r--;)if(!e[r](t,n,i))return!1;return!0}:e[0]}function h(e,t,n,i,r){for(var s,o=[],a=0,l=e.length,c=null!=t;l>a;a++)(s=e[a])&&(!n||n(s,i,r))&&(o.push(s),c&&t.push(a));return o}function u(e,t,n,i,r,s){return i&&!i[S]&&(i=u(i)),r&&!r[S]&&(r=u(r,s)),j(function(s,o,a,l){var c,u,d,f=[],g=[],m=o.length,y=s||p(t||"*",a.nodeType?[a]:a,[]),v=!e||!s&&t?y:h(y,f,e,a,l),b=n?r||(s?e:m||i)?[]:o:v;if(n&&n(v,b,a,l),i)for(c=h(b,g),i(c,[],a,l),u=c.length;u--;)(d=c[u])&&(b[g[u]]=!(v[g[u]]=d));if(s){if(r||e){if(r){for(c=[],u=b.length;u--;)(d=b[u])&&c.push(v[u]=d);r(null,b=[],c,l)}for(u=b.length;u--;)(d=b[u])&&(c=r?H.call(s,d):f[u])>-1&&(s[c]=!(o[c]=d))}}else b=h(b===o?b.splice(m,b.length):b),r?r(null,o,b,l):F.apply(o,b)})}function d(e){for(var t,n,i,r=e.length,s=b.relative[e[0].type],o=s||b.relative[" "],a=s?1:0,h=l(function(e){return e===t},o,!0),f=l(function(e){return H.call(t,e)>-1},o,!0),p=[function(e,n,i){return!s&&(i||n!==k)||((t=n).nodeType?h(e,n,i):f(e,n,i))}];r>a;a++)if(n=b.relative[e[a].type])p=[l(c(p),n)];else{if(n=b.filter[e[a].type].apply(null,e[a].matches),n[S]){for(i=++a;r>i&&!b.relative[e[i].type];i++);return u(a>1&&c(p),a>1&&e.slice(0,a-1).join("").replace(K,"$1"),n,i>a&&d(e.slice(a,i)),r>i&&d(e=e.slice(i)),r>i&&e.join(""))}p.push(n)}return c(p)}function f(e,t){var i=t.length>0,r=e.length>0,s=function(o,a,l,c,u){var d,f,p,g=[],m=0,v="0",w=o&&[],_=null!=u,x=k,C=o||r&&b.find.TAG("*",u&&a.parentNode||a),T=L+=null==x?1:Math.E;for(_&&(k=a!==M&&a,y=s.el);null!=(d=C[v]);v++){if(r&&d){for(f=0;p=e[f];f++)if(p(d,a,l)){c.push(d);break}_&&(L=T,y=++s.el)}i&&((d=!p&&d)&&m--,o&&w.push(d))}if(m+=v,i&&v!==m){for(f=0;p=t[f];f++)p(w,g,a,l);if(o){if(m>0)for(;v--;)!w[v]&&!g[v]&&(g[v]=O.call(c));g=h(g)}F.apply(c,g),_&&!o&&g.length>0&&m+t.length>1&&n.uniqueSort(c)}return _&&(L=T,k=x),w};return s.el=0,i?j(s):s}function p(e,t,i){for(var r=0,s=t.length;s>r;r++)n(e,t[r],i);return i}function g(e,t,n,i,r){var s,o,l,c,h,u=a(e);if(u.length,!i&&1===u.length){if(o=u[0]=u[0].slice(0),o.length>2&&"ID"===(l=o[0]).type&&9===t.nodeType&&!r&&b.relative[o[1].type]){if(t=b.find.ID(l.matches[0].replace(ot,""),t,r)[0],!t)return n;e=e.slice(o.shift().length)}for(s=at.POS.test(e)?-1:o.length-1;s>=0&&(l=o[s],!b.relative[c=l.type]);s--)if((h=b.find[c])&&(i=h(l.matches[0].replace(ot,""),it.test(o[0].type)&&t.parentNode||t,r))){if(o.splice(s,1),e=i.length&&o.join(""),!e)return F.apply(n,I.call(i,0)),n;break}}return C(e,u)(i,t,r,n,it.test(e)),n}function m(){}var y,v,b,w,_,x,C,T,E,k,N=!0,A="undefined",S=("sizcache"+Math.random()).replace(".",""),D=String,M=e.document,R=M.documentElement,L=0,z=0,O=[].pop,F=[].push,I=[].slice,H=[].indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(this[t]===e)return t;return-1},j=function(e,t){return e[S]=null==t||t,e},P=function(){var e={},t=[];return j(function(n,i){return t.push(n)>b.cacheLength&&delete e[t.shift()],e[n+" "]=i},e)},B=P(),q=P(),Z=P(),$="[\\x20\\t\\r\\n\\f]",W="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",U=W.replace("w","w#"),V="([*^$|!~]?=)",X="\\["+$+"*("+W+")"+$+"*(?:"+V+$+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+U+")|)|)"+$+"*\\]",Y=":("+W+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+X+")|[^:]|\\\\.)*|.*))\\)|)",G=":(even|odd|eq|gt|lt|nth|first|last)(?:\\("+$+"*((?:-\\d)?\\d*)"+$+"*\\)|)(?=[^-]|$)",K=new RegExp("^"+$+"+|((?:^|[^\\\\])(?:\\\\.)*)"+$+"+$","g"),J=new RegExp("^"+$+"*,"+$+"*"),et=new RegExp("^"+$+"*([\\x20\\t\\r\\n\\f>+~])"+$+"*"),tt=new RegExp(Y),nt=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,it=/[\x20\t\r\n\f]*[+~]/,rt=/h\d/i,st=/input|select|textarea|button/i,ot=/\\(?!\\)/g,at={ID:new RegExp("^#("+W+")"),CLASS:new RegExp("^\\.("+W+")"),NAME:new RegExp("^\\[name=['\"]?("+W+")['\"]?\\]"),TAG:new RegExp("^("+W.replace("w","w*")+")"),ATTR:new RegExp("^"+X),PSEUDO:new RegExp("^"+Y),POS:new RegExp(G,"i"),CHILD:new RegExp("^:(only|nth|first|last)-child(?:\\("+$+"*(even|odd|(([+-]|)(\\d*)n|)"+$+"*(?:([+-]|)"+$+"*(\\d+)|))"+$+"*\\)|)","i"),needsContext:new RegExp("^"+$+"*[>+~]|"+G,"i")},lt=function(e){var t=M.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}},ct=lt(function(e){return e.appendChild(M.createComment("")),!e.getElementsByTagName("*").length}),ht=lt(function(e){return e.innerHTML="",e.firstChild&&typeof e.firstChild.getAttribute!==A&&"#"===e.firstChild.getAttribute("href")}),ut=lt(function(e){e.innerHTML="";var t=typeof e.lastChild.getAttribute("multiple");return"boolean"!==t&&"string"!==t}),dt=lt(function(e){return e.innerHTML="",e.getElementsByClassName&&e.getElementsByClassName("e").length?(e.lastChild.className="e",2===e.getElementsByClassName("e").length):!1}),ft=lt(function(e){e.id=S+0,e.innerHTML="",R.insertBefore(e,R.firstChild);var t=M.getElementsByName&&M.getElementsByName(S).length===2+M.getElementsByName(S+0).length;return v=!M.getElementById(S),R.removeChild(e),t});try{I.call(R.childNodes,0)[0].nodeType}catch(pt){I=function(e){for(var t,n=[];t=this[e];e++)n.push(t);return n}}n.matches=function(e,t){return n(e,null,null,t)},n.matchesSelector=function(e,t){return n(t,null,null,[e]).length>0},w=n.getText=function(e){var t,n="",i=0,r=e.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=w(e)}else if(3===r||4===r)return e.nodeValue}else for(;t=e[i];i++)n+=w(t);return n},_=n.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},x=n.contains=R.contains?function(e,t){var n=9===e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e===i||!!(i&&1===i.nodeType&&n.contains&&n.contains(i))}:R.compareDocumentPosition?function(e,t){return t&&!!(16&e.compareDocumentPosition(t))}:function(e,t){for(;t=t.parentNode;)if(t===e)return!0;return!1},n.attr=function(e,t){var n,i=_(e);return i||(t=t.toLowerCase()),(n=b.attrHandle[t])?n(e):i||ut?e.getAttribute(t):(n=e.getAttributeNode(t),n?"boolean"==typeof e[t]?e[t]?t:null:n.specified?n.value:null:null)},b=n.selectors={cacheLength:50,createPseudo:j,match:at,attrHandle:ht?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},find:{ID:v?function(e,t,n){if(typeof t.getElementById!==A&&!n){var i=t.getElementById(e);return i&&i.parentNode?[i]:[]}}:function(e,n,i){if(typeof n.getElementById!==A&&!i){var r=n.getElementById(e);return r?r.id===e||typeof r.getAttributeNode!==A&&r.getAttributeNode("id").value===e?[r]:t:[]}},TAG:ct?function(e,t){return typeof t.getElementsByTagName!==A?t.getElementsByTagName(e):void 0}:function(e,t){var n=t.getElementsByTagName(e);if("*"===e){for(var i,r=[],s=0;i=n[s];s++)1===i.nodeType&&r.push(i);return r}return n},NAME:ft&&function(e,t){return typeof t.getElementsByName!==A?t.getElementsByName(name):void 0},CLASS:dt&&function(e,t,n){return typeof t.getElementsByClassName===A||n?void 0:t.getElementsByClassName(e)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(ot,""),e[3]=(e[4]||e[5]||"").replace(ot,""),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1]?(e[2]||n.error(e[0]),e[3]=+(e[3]?e[4]+(e[5]||1):2*("even"===e[2]||"odd"===e[2])),e[4]=+(e[6]+e[7]||"odd"===e[2])):e[2]&&n.error(e[0]),e},PSEUDO:function(e){var t,n;return at.CHILD.test(e[0])?null:(e[3]?e[2]=e[3]:(t=e[4])&&(tt.test(t)&&(n=a(t,!0))&&(n=t.indexOf(")",t.length-n)-t.length)&&(t=t.slice(0,n),e[0]=e[0].slice(0,n)),e[2]=t),e.slice(0,3))}},filter:{ID:v?function(e){return e=e.replace(ot,""),function(t){return t.getAttribute("id")===e}}:function(e){return e=e.replace(ot,""),function(t){var n=typeof t.getAttributeNode!==A&&t.getAttributeNode("id");return n&&n.value===e}},TAG:function(e){return"*"===e?function(){return!0}:(e=e.replace(ot,"").toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=B[S][e+" "];return t||(t=new RegExp("(^|"+$+")"+e+"("+$+"|$)"))&&B(e,function(e){return t.test(e.className||typeof e.getAttribute!==A&&e.getAttribute("class")||"")})},ATTR:function(e,t,i){return function(r){var s=n.attr(r,e);return null==s?"!="===t:t?(s+="","="===t?s===i:"!="===t?s!==i:"^="===t?i&&0===s.indexOf(i):"*="===t?i&&s.indexOf(i)>-1:"$="===t?i&&s.substr(s.length-i.length)===i:"~="===t?(" "+s+" ").indexOf(i)>-1:"|="===t?s===i||s.substr(0,i.length+1)===i+"-":!1):!0}},CHILD:function(e,t,n,i){return"nth"===e?function(e){var t,r,s=e.parentNode;if(1===n&&0===i)return!0;if(s)for(r=0,t=s.firstChild;t&&(1!==t.nodeType||(r++,e!==t));t=t.nextSibling);return r-=i,r===n||0===r%n&&r/n>=0}:function(t){var n=t;switch(e){case"only":case"first":for(;n=n.previousSibling;)if(1===n.nodeType)return!1;if("first"===e)return!0;n=t;case"last":for(;n=n.nextSibling;)if(1===n.nodeType)return!1;return!0}}},PSEUDO:function(e,t){var i,r=b.pseudos[e]||b.setFilters[e.toLowerCase()]||n.error("unsupported pseudo: "+e);return r[S]?r(t):r.length>1?(i=[e,e,"",t],b.setFilters.hasOwnProperty(e.toLowerCase())?j(function(e,n){for(var i,s=r(e,t),o=s.length;o--;)i=H.call(e,s[o]),e[i]=!(n[i]=s[o])}):function(e){return r(e,0,i)}):r}},pseudos:{not:j(function(e){var t=[],n=[],i=C(e.replace(K,"$1"));return i[S]?j(function(e,t,n,r){for(var s,o=i(e,null,r,[]),a=e.length;a--;)(s=o[a])&&(e[a]=!(t[a]=s))}):function(e,r,s){return t[0]=e,i(t,null,s,n),!n.pop()}}),has:j(function(e){return function(t){return n(e,t).length>0}}),contains:j(function(e){return function(t){return(t.textContent||t.innerText||w(t)).indexOf(e)>-1}}),enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},parent:function(e){return!b.pseudos.empty(e)},empty:function(e){var t;for(e=e.firstChild;e;){if(e.nodeName>"@"||3===(t=e.nodeType)||4===t)return!1;e=e.nextSibling}return!0},header:function(e){return rt.test(e.nodeName)},text:function(e){var t,n;return"input"===e.nodeName.toLowerCase()&&"text"===(t=e.type)&&(null==(n=e.getAttribute("type"))||n.toLowerCase()===t)},radio:i("radio"),checkbox:i("checkbox"),file:i("file"),password:i("password"),image:i("image"),submit:r("submit"),reset:r("reset"),button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},input:function(e){return st.test(e.nodeName)},focus:function(e){var t=e.ownerDocument;return e===t.activeElement&&(!t.hasFocus||t.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},active:function(e){return e===e.ownerDocument.activeElement},first:s(function(){return[0]}),last:s(function(e,t){return[t-1]}),eq:s(function(e,t,n){return[0>n?n+t:n]}),even:s(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:s(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:s(function(e,t,n){for(var i=0>n?n+t:n;--i>=0;)e.push(i);return e}),gt:s(function(e,t,n){for(var i=0>n?n+t:n;t>++i;)e.push(i);return e})}},T=R.compareDocumentPosition?function(e,t){return e===t?(E=!0,0):(e.compareDocumentPosition&&t.compareDocumentPosition?4&e.compareDocumentPosition(t):e.compareDocumentPosition)?-1:1}:function(e,t){if(e===t)return E=!0,0;if(e.sourceIndex&&t.sourceIndex)return e.sourceIndex-t.sourceIndex;var n,i,r=[],s=[],a=e.parentNode,l=t.parentNode,c=a;if(a===l)return o(e,t);if(!a)return-1;if(!l)return 1;for(;c;)r.unshift(c),c=c.parentNode;for(c=l;c;)s.unshift(c),c=c.parentNode;n=r.length,i=s.length;for(var h=0;n>h&&i>h;h++)if(r[h]!==s[h])return o(r[h],s[h]);return h===n?o(e,s[h],-1):o(r[h],t,1)},[0,0].sort(T),N=!E,n.uniqueSort=function(e){var t,n=[],i=1,r=0;if(E=N,e.sort(T),E){for(;t=e[i];i++)t===e[i-1]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return e},n.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},C=n.compile=function(e,t){var n,i=[],r=[],s=Z[S][e+" "];if(!s){for(t||(t=a(e)),n=t.length;n--;)s=d(t[n]),s[S]?i.push(s):r.push(s);s=Z(e,f(r,i))}return s},M.querySelectorAll&&function(){var e,t=g,i=/'|\\/g,r=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,s=[":focus"],o=[":active"],l=R.matchesSelector||R.mozMatchesSelector||R.webkitMatchesSelector||R.oMatchesSelector||R.msMatchesSelector;
-lt(function(e){e.innerHTML="",e.querySelectorAll("[selected]").length||s.push("\\["+$+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||s.push(":checked")}),lt(function(e){e.innerHTML="",e.querySelectorAll("[test^='']").length&&s.push("[*^$]="+$+"*(?:\"\"|'')"),e.innerHTML="",e.querySelectorAll(":enabled").length||s.push(":enabled",":disabled")}),s=new RegExp(s.join("|")),g=function(e,n,r,o,l){if(!o&&!l&&!s.test(e)){var c,h,u=!0,d=S,f=n,p=9===n.nodeType&&e;if(1===n.nodeType&&"object"!==n.nodeName.toLowerCase()){for(c=a(e),(u=n.getAttribute("id"))?d=u.replace(i,"\\$&"):n.setAttribute("id",d),d="[id='"+d+"'] ",h=c.length;h--;)c[h]=d+c[h].join("");f=it.test(e)&&n.parentNode||n,p=c.join(",")}if(p)try{return F.apply(r,I.call(f.querySelectorAll(p),0)),r}catch(g){}finally{u||n.removeAttribute("id")}}return t(e,n,r,o,l)},l&&(lt(function(t){e=l.call(t,"div");try{l.call(t,"[test!='']:sizzle"),o.push("!=",Y)}catch(n){}}),o=new RegExp(o.join("|")),n.matchesSelector=function(t,i){if(i=i.replace(r,"='$1']"),!_(t)&&!o.test(i)&&!s.test(i))try{var a=l.call(t,i);if(a||e||t.document&&11!==t.document.nodeType)return a}catch(c){}return n(i,null,null,[t]).length>0})}(),b.pseudos.nth=b.pseudos.eq,b.filters=m.prototype=b.pseudos,b.setFilters=new m,n.attr=Q.attr,Q.find=n,Q.expr=n.selectors,Q.expr[":"]=Q.expr.pseudos,Q.unique=n.uniqueSort,Q.text=n.getText,Q.isXMLDoc=n.isXML,Q.contains=n.contains}(e);var zt=/Until$/,Ot=/^(?:parents|prev(?:Until|All))/,Ft=/^.[^:#\[\.,]*$/,It=Q.expr.match.needsContext,Ht={children:!0,contents:!0,next:!0,prev:!0};Q.fn.extend({find:function(e){var t,n,i,r,s,o,a=this;if("string"!=typeof e)return Q(e).filter(function(){for(t=0,n=a.length;n>t;t++)if(Q.contains(a[t],this))return!0});for(o=this.pushStack("","find",e),t=0,n=this.length;n>t;t++)if(i=o.length,Q.find(e,this[t],o),t>0)for(r=i;o.length>r;r++)for(s=0;i>s;s++)if(o[s]===o[r]){o.splice(r--,1);break}return o},has:function(e){var t,n=Q(e,this),i=n.length;return this.filter(function(){for(t=0;i>t;t++)if(Q.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(c(this,e,!1),"not",e)},filter:function(e){return this.pushStack(c(this,e,!0),"filter",e)},is:function(e){return!!e&&("string"==typeof e?It.test(e)?Q(e,this.context).index(this[0])>=0:Q.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){for(var n,i=0,r=this.length,s=[],o=It.test(e)||"string"!=typeof e?Q(e,t||this.context):0;r>i;i++)for(n=this[i];n&&n.ownerDocument&&n!==t&&11!==n.nodeType;){if(o?o.index(n)>-1:Q.find.matchesSelector(n,e)){s.push(n);break}n=n.parentNode}return s=s.length>1?Q.unique(s):s,this.pushStack(s,"closest",e)},index:function(e){return e?"string"==typeof e?Q.inArray(this[0],Q(e)):Q.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(e,t){var n="string"==typeof e?Q(e,t):Q.makeArray(e&&e.nodeType?[e]:e),i=Q.merge(this.get(),n);return this.pushStack(a(n[0])||a(i[0])?i:Q.unique(i))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),Q.fn.andSelf=Q.fn.addBack,Q.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return Q.dir(e,"parentNode")},parentsUntil:function(e,t,n){return Q.dir(e,"parentNode",n)},next:function(e){return l(e,"nextSibling")},prev:function(e){return l(e,"previousSibling")},nextAll:function(e){return Q.dir(e,"nextSibling")},prevAll:function(e){return Q.dir(e,"previousSibling")},nextUntil:function(e,t,n){return Q.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return Q.dir(e,"previousSibling",n)},siblings:function(e){return Q.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return Q.sibling(e.firstChild)},contents:function(e){return Q.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:Q.merge([],e.childNodes)}},function(e,t){Q.fn[e]=function(n,i){var r=Q.map(this,t,n);return zt.test(e)||(i=n),i&&"string"==typeof i&&(r=Q.filter(i,r)),r=this.length>1&&!Ht[e]?Q.unique(r):r,this.length>1&&Ot.test(e)&&(r=r.reverse()),this.pushStack(r,e,V.call(arguments).join(","))}}),Q.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),1===t.length?Q.find.matchesSelector(t[0],e)?[t[0]]:[]:Q.find.matches(e,t)},dir:function(e,n,i){for(var r=[],s=e[n];s&&9!==s.nodeType&&(i===t||1!==s.nodeType||!Q(s).is(i));)1===s.nodeType&&r.push(s),s=s[n];return r},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});var jt="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",Pt=/ jQuery\d+="(?:null|\d+)"/g,Bt=/^\s+/,qt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Zt=/<([\w:]+)/,$t=/]","i"),Yt=/^(?:checkbox|radio)$/,Gt=/checked\s*(?:[^=]|=\s*.checked.)/i,Kt=/\/(java|ecma)script/i,Qt=/^\s*\s*$/g,Jt={option:[1,""],legend:[1,""],thead:[1,""],tr:[2,""],td:[3,""],col:[2,""],area:[1,""],_default:[0,"",""]},en=h(B),tn=en.appendChild(B.createElement("div"));Jt.optgroup=Jt.option,Jt.tbody=Jt.tfoot=Jt.colgroup=Jt.caption=Jt.thead,Jt.th=Jt.td,Q.support.htmlSerialize||(Jt._default=[1,"X","
"]),Q.fn.extend({text:function(e){return Q.access(this,function(e){return e===t?Q.text(this):this.empty().append((this[0]&&this[0].ownerDocument||B).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(Q.isFunction(e))return this.each(function(t){Q(this).wrapAll(e.call(this,t))});if(this[0]){var t=Q(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return Q.isFunction(e)?this.each(function(t){Q(this).wrapInner(e.call(this,t))}):this.each(function(){var t=Q(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=Q.isFunction(e);return this.each(function(n){Q(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){Q.nodeName(this,"body")||Q(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType)&&this.insertBefore(e,this.firstChild)})},before:function(){if(!a(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this)});if(arguments.length){var e=Q.clean(arguments);return this.pushStack(Q.merge(e,this),"before",this.selector)}},after:function(){if(!a(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this.nextSibling)});if(arguments.length){var e=Q.clean(arguments);return this.pushStack(Q.merge(this,e),"after",this.selector)}},remove:function(e,t){for(var n,i=0;null!=(n=this[i]);i++)(!e||Q.filter(e,[n]).length)&&(!t&&1===n.nodeType&&(Q.cleanData(n.getElementsByTagName("*")),Q.cleanData([n])),n.parentNode&&n.parentNode.removeChild(n));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)for(1===e.nodeType&&Q.cleanData(e.getElementsByTagName("*"));e.firstChild;)e.removeChild(e.firstChild);return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return Q.clone(this,e,t)})},html:function(e){return Q.access(this,function(e){var n=this[0]||{},i=0,r=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(Pt,""):t;if(!("string"!=typeof e||Ut.test(e)||!Q.support.htmlSerialize&&Xt.test(e)||!Q.support.leadingWhitespace&&Bt.test(e)||Jt[(Zt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(qt,"<$1>$2>");try{for(;r>i;i++)n=this[i]||{},1===n.nodeType&&(Q.cleanData(n.getElementsByTagName("*")),n.innerHTML=e);n=0}catch(s){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){return a(this[0])?this.length?this.pushStack(Q(Q.isFunction(e)?e():e),"replaceWith",e):this:Q.isFunction(e)?this.each(function(t){var n=Q(this),i=n.html();n.replaceWith(e.call(this,t,i))}):("string"!=typeof e&&(e=Q(e).detach()),this.each(function(){var t=this.nextSibling,n=this.parentNode;Q(this).remove(),t?Q(t).before(e):Q(n).append(e)}))},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,i){e=[].concat.apply([],e);var r,s,o,a,l=0,c=e[0],h=[],d=this.length;if(!Q.support.checkClone&&d>1&&"string"==typeof c&&Gt.test(c))return this.each(function(){Q(this).domManip(e,n,i)});if(Q.isFunction(c))return this.each(function(r){var s=Q(this);e[0]=c.call(this,r,n?s.html():t),s.domManip(e,n,i)});if(this[0]){if(r=Q.buildFragment(e,this,h),o=r.fragment,s=o.firstChild,1===o.childNodes.length&&(o=s),s)for(n=n&&Q.nodeName(s,"tr"),a=r.cacheable||d-1;d>l;l++)i.call(n&&Q.nodeName(this[l],"table")?u(this[l],"tbody"):this[l],l===a?o:Q.clone(o,!0,!0));o=s=null,h.length&&Q.each(h,function(e,t){t.src?Q.ajax?Q.ajax({url:t.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):Q.error("no ajax"):Q.globalEval((t.text||t.textContent||t.innerHTML||"").replace(Qt,"")),t.parentNode&&t.parentNode.removeChild(t)})}return this}}),Q.buildFragment=function(e,n,i){var r,s,o,a=e[0];return n=n||B,n=!n.nodeType&&n[0]||n,n=n.ownerDocument||n,1===e.length&&"string"==typeof a&&512>a.length&&n===B&&"<"===a.charAt(0)&&!Vt.test(a)&&(Q.support.checkClone||!Gt.test(a))&&(Q.support.html5Clone||!Xt.test(a))&&(s=!0,r=Q.fragments[a],o=r!==t),r||(r=n.createDocumentFragment(),Q.clean(e,n,r,i),s&&(Q.fragments[a]=o&&r)),{fragment:r,cacheable:s}},Q.fragments={},Q.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){Q.fn[e]=function(n){var i,r=0,s=[],o=Q(n),a=o.length,l=1===this.length&&this[0].parentNode;if((null==l||l&&11===l.nodeType&&1===l.childNodes.length)&&1===a)return o[t](this[0]),this;for(;a>r;r++)i=(r>0?this.clone(!0):this).get(),Q(o[r])[t](i),s=s.concat(i);return this.pushStack(s,e,o.selector)}}),Q.extend({clone:function(e,t,n){var i,r,s,o;if(Q.support.html5Clone||Q.isXMLDoc(e)||!Xt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(tn.innerHTML=e.outerHTML,tn.removeChild(o=tn.firstChild)),!(Q.support.noCloneEvent&&Q.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||Q.isXMLDoc(e)))for(f(e,o),i=p(e),r=p(o),s=0;i[s];++s)r[s]&&f(i[s],r[s]);if(t&&(d(e,o),n))for(i=p(e),r=p(o),s=0;i[s];++s)d(i[s],r[s]);return i=r=null,o},clean:function(e,t,n,i){var r,s,o,a,l,c,u,d,f,p,m,y=t===B&&en,v=[];for(t&&"undefined"!=typeof t.createDocumentFragment||(t=B),r=0;null!=(o=e[r]);r++)if("number"==typeof o&&(o+=""),o){if("string"==typeof o)if(Wt.test(o)){for(y=y||h(t),u=t.createElement("div"),y.appendChild(u),o=o.replace(qt,"<$1>$2>"),a=(Zt.exec(o)||["",""])[1].toLowerCase(),l=Jt[a]||Jt._default,c=l[0],u.innerHTML=l[1]+o+l[2];c--;)u=u.lastChild;if(!Q.support.tbody)for(d=$t.test(o),f="table"!==a||d?""!==l[1]||d?[]:u.childNodes:u.firstChild&&u.firstChild.childNodes,s=f.length-1;s>=0;--s)Q.nodeName(f[s],"tbody")&&!f[s].childNodes.length&&f[s].parentNode.removeChild(f[s]);!Q.support.leadingWhitespace&&Bt.test(o)&&u.insertBefore(t.createTextNode(Bt.exec(o)[0]),u.firstChild),o=u.childNodes,u.parentNode.removeChild(u)}else o=t.createTextNode(o);o.nodeType?v.push(o):Q.merge(v,o)}if(u&&(o=u=y=null),!Q.support.appendChecked)for(r=0;null!=(o=v[r]);r++)Q.nodeName(o,"input")?g(o):"undefined"!=typeof o.getElementsByTagName&&Q.grep(o.getElementsByTagName("input"),g);if(n)for(p=function(e){return!e.type||Kt.test(e.type)?i?i.push(e.parentNode?e.parentNode.removeChild(e):e):n.appendChild(e):void 0},r=0;null!=(o=v[r]);r++)Q.nodeName(o,"script")&&p(o)||(n.appendChild(o),"undefined"!=typeof o.getElementsByTagName&&(m=Q.grep(Q.merge([],o.getElementsByTagName("script")),p),v.splice.apply(v,[r+1,0].concat(m)),r+=m.length));return v},cleanData:function(e,t){for(var n,i,r,s,o=0,a=Q.expando,l=Q.cache,c=Q.support.deleteExpando,h=Q.event.special;null!=(r=e[o]);o++)if((t||Q.acceptData(r))&&(i=r[a],n=i&&l[i])){if(n.events)for(s in n.events)h[s]?Q.event.remove(r,s):Q.removeEvent(r,s,n.handle);l[i]&&(delete l[i],c?delete r[a]:r.removeAttribute?r.removeAttribute(a):r[a]=null,Q.deletedIds.push(i))}}}),function(){var e,t;Q.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||0>e.indexOf("compatible")&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e=Q.uaMatch(Z.userAgent),t={},e.browser&&(t[e.browser]=!0,t.version=e.version),t.chrome?t.webkit=!0:t.webkit&&(t.safari=!0),Q.browser=t,Q.sub=function(){function e(t,n){return new e.fn.init(t,n)}Q.extend(!0,e,this),e.superclass=this,e.fn=e.prototype=this(),e.fn.constructor=e,e.sub=this.sub,e.fn.init=function(n,i){return i&&i instanceof Q&&!(i instanceof e)&&(i=e(i)),Q.fn.init.call(this,n,i,t)},e.fn.init.prototype=e.fn;var t=e(B);return e}}();var nn,rn,sn,on=/alpha\([^)]*\)/i,an=/opacity=([^)]*)/,ln=/^(top|right|bottom|left)$/,cn=/^(none|table(?!-c[ea]).+)/,hn=/^margin/,un=new RegExp("^("+J+")(.*)$","i"),dn=new RegExp("^("+J+")(?!px)[a-z%]+$","i"),fn=new RegExp("^([-+])=("+J+")","i"),pn={BODY:"block"},gn={position:"absolute",visibility:"hidden",display:"block"},mn={letterSpacing:0,fontWeight:400},yn=["Top","Right","Bottom","Left"],vn=["Webkit","O","Moz","ms"],bn=Q.fn.toggle;Q.fn.extend({css:function(e,n){return Q.access(this,function(e,n,i){return i!==t?Q.style(e,n,i):Q.css(e,n)},e,n,arguments.length>1)},show:function(){return v(this,!0)},hide:function(){return v(this)},toggle:function(e,t){var n="boolean"==typeof e;return Q.isFunction(e)&&Q.isFunction(t)?bn.apply(this,arguments):this.each(function(){(n?e:y(this))?Q(this).show():Q(this).hide()})}}),Q.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=nn(e,"opacity");return""===n?"1":n}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":Q.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,i,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var s,o,a,l=Q.camelCase(n),c=e.style;if(n=Q.cssProps[l]||(Q.cssProps[l]=m(c,l)),a=Q.cssHooks[n]||Q.cssHooks[l],i===t)return a&&"get"in a&&(s=a.get(e,!1,r))!==t?s:c[n];if(o=typeof i,"string"===o&&(s=fn.exec(i))&&(i=(s[1]+1)*s[2]+parseFloat(Q.css(e,n)),o="number"),!(null==i||"number"===o&&isNaN(i)||("number"===o&&!Q.cssNumber[l]&&(i+="px"),a&&"set"in a&&(i=a.set(e,i,r))===t)))try{c[n]=i}catch(h){}}},css:function(e,n,i,r){var s,o,a,l=Q.camelCase(n);return n=Q.cssProps[l]||(Q.cssProps[l]=m(e.style,l)),a=Q.cssHooks[n]||Q.cssHooks[l],a&&"get"in a&&(s=a.get(e,!0,r)),s===t&&(s=nn(e,n)),"normal"===s&&n in mn&&(s=mn[n]),i||r!==t?(o=parseFloat(s),i||Q.isNumeric(o)?o||0:s):s},swap:function(e,t,n){var i,r,s={};for(r in t)s[r]=e.style[r],e.style[r]=t[r];i=n.call(e);for(r in t)e.style[r]=s[r];return i}}),e.getComputedStyle?nn=function(t,n){var i,r,s,o,a=e.getComputedStyle(t,null),l=t.style;return a&&(i=a.getPropertyValue(n)||a[n],""===i&&!Q.contains(t.ownerDocument,t)&&(i=Q.style(t,n)),dn.test(i)&&hn.test(n)&&(r=l.width,s=l.minWidth,o=l.maxWidth,l.minWidth=l.maxWidth=l.width=i,i=a.width,l.width=r,l.minWidth=s,l.maxWidth=o)),i}:B.documentElement.currentStyle&&(nn=function(e,t){var n,i,r=e.currentStyle&&e.currentStyle[t],s=e.style;return null==r&&s&&s[t]&&(r=s[t]),dn.test(r)&&!ln.test(t)&&(n=s.left,i=e.runtimeStyle&&e.runtimeStyle.left,i&&(e.runtimeStyle.left=e.currentStyle.left),s.left="fontSize"===t?"1em":r,r=s.pixelLeft+"px",s.left=n,i&&(e.runtimeStyle.left=i)),""===r?"auto":r}),Q.each(["height","width"],function(e,t){Q.cssHooks[t]={get:function(e,n,i){return n?0===e.offsetWidth&&cn.test(nn(e,"display"))?Q.swap(e,gn,function(){return _(e,t,i)}):_(e,t,i):void 0},set:function(e,n,i){return b(e,n,i?w(e,t,i,Q.support.boxSizing&&"border-box"===Q.css(e,"boxSizing")):0)}}}),Q.support.opacity||(Q.cssHooks.opacity={get:function(e,t){return an.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,i=e.currentStyle,r=Q.isNumeric(t)?"alpha(opacity="+100*t+")":"",s=i&&i.filter||n.filter||"";n.zoom=1,t>=1&&""===Q.trim(s.replace(on,""))&&n.removeAttribute&&(n.removeAttribute("filter"),i&&!i.filter)||(n.filter=on.test(s)?s.replace(on,r):s+" "+r)}}),Q(function(){Q.support.reliableMarginRight||(Q.cssHooks.marginRight={get:function(e,t){return Q.swap(e,{display:"inline-block"},function(){return t?nn(e,"marginRight"):void 0})}}),!Q.support.pixelPosition&&Q.fn.position&&Q.each(["top","left"],function(e,t){Q.cssHooks[t]={get:function(e,n){if(n){var i=nn(e,t);return dn.test(i)?Q(e).position()[t]+"px":i}}}})}),Q.expr&&Q.expr.filters&&(Q.expr.filters.hidden=function(e){return 0===e.offsetWidth&&0===e.offsetHeight||!Q.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||nn(e,"display"))},Q.expr.filters.visible=function(e){return!Q.expr.filters.hidden(e)}),Q.each({margin:"",padding:"",border:"Width"},function(e,t){Q.cssHooks[e+t]={expand:function(n){var i,r="string"==typeof n?n.split(" "):[n],s={};for(i=0;4>i;i++)s[e+yn[i]+t]=r[i]||r[i-2]||r[0];return s}},hn.test(e)||(Q.cssHooks[e+t].set=b)});var wn=/%20/g,_n=/\[\]$/,xn=/\r?\n/g,Cn=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,Tn=/^(?:select|textarea)/i;Q.fn.extend({serialize:function(){return Q.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?Q.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||Tn.test(this.nodeName)||Cn.test(this.type))}).map(function(e,t){var n=Q(this).val();return null==n?null:Q.isArray(n)?Q.map(n,function(e){return{name:t.name,value:e.replace(xn,"\r\n")}}):{name:t.name,value:n.replace(xn,"\r\n")}}).get()}}),Q.param=function(e,n){var i,r=[],s=function(e,t){t=Q.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=Q.ajaxSettings&&Q.ajaxSettings.traditional),Q.isArray(e)||e.jquery&&!Q.isPlainObject(e))Q.each(e,function(){s(this.name,this.value)});else for(i in e)C(i,e[i],n,s);return r.join("&").replace(wn,"+")};var En,kn,Nn=/#.*$/,An=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Sn=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,Dn=/^(?:GET|HEAD)$/,Mn=/^\/\//,Rn=/\?/,Ln=/