diff --git a/Gemfile b/Gemfile index 1233e6f59..ee282d49c 100644 --- a/Gemfile +++ b/Gemfile @@ -6,9 +6,6 @@ gem "rails", "8.1.0.beta1" gem 'sprockets-rails', '~> 3.2.2' gem 'trilogy' -# gem "activerecord-trilogy-adapter" # no longer needed for rails 7.1+ -gem 'bootstrap-sass' -gem "sassc-rails" gem 'uglifier' gem 'coffee-rails' gem "feature_flipper" @@ -17,8 +14,6 @@ gem 'jquery-rails' gem 'jbuilder', '~> 2.0' gem 'devise', '~> 4.9.4' -gem 'neat', '1.7.1' -gem 'bourbon', '~> 4.2.2' gem 'draper' gem "kt-paperclip", "~> 7.1.1" gem 'aws-sdk-s3' diff --git a/Gemfile.lock b/Gemfile.lock index e95ecdc2d..0151ddee2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -84,8 +84,6 @@ GEM apipie-rails (1.5.0) actionpack (>= 5.0) activesupport (>= 5.0) - autoprefixer-rails (10.4.21.0) - execjs (~> 2) aws-eventstream (1.4.0) aws-partitions (1.1159.0) aws-sdk-core (3.232.0) @@ -115,14 +113,8 @@ GEM bigdecimal (3.2.3) binding_of_caller (1.0.1) debug_inspector (>= 1.2.0) - bootstrap-sass (3.4.1) - autoprefixer-rails (>= 5.2.1) - sassc (>= 2.0.0) bootstrap-will_paginate (1.0.0) will_paginate - bourbon (4.2.3) - sass (~> 3.4) - thor brakeman (7.1.0) racc builder (3.3.0) @@ -263,9 +255,6 @@ GEM minitest (5.25.5) multi_xml (0.7.2) bigdecimal (~> 3.1) - neat (1.7.1) - bourbon (>= 4.0) - sass (>= 3.3) net-imap (0.4.22) date net-protocol @@ -383,19 +372,6 @@ GEM logger ruby2_keywords (0.0.5) rubyzip (3.1.0) - sass (3.7.4) - sass-listen (~> 4.0.0) - sass-listen (4.0.0) - rb-fsevent (~> 0.9, >= 0.9.4) - rb-inotify (~> 0.9, >= 0.9.7) - sassc (2.4.0) - ffi (~> 1.9) - sassc-rails (2.1.2) - railties (>= 4.0.0) - sassc (>= 2.0) - sprockets (> 3.0) - sprockets-rails - tilt search_cop (1.0.9) treetop securerandom (0.4.1) @@ -428,7 +404,6 @@ GEM terrapin (0.6.0) climate_control (>= 0.0.3, < 1.0) thor (1.4.0) - tilt (2.4.0) timeout (0.4.3) treetop (1.6.14) polyglot (~> 0.3) @@ -465,9 +440,7 @@ DEPENDENCIES bcrypt (= 3.1.16) better_errors binding_of_caller - bootstrap-sass bootstrap-will_paginate - bourbon (~> 4.2.2) brakeman bundler-audit capybara (~> 3.36) @@ -493,14 +466,12 @@ DEPENDENCIES jwt (~> 1.2.1) kt-paperclip (~> 7.1.1) listen - neat (= 1.7.1) premailer-rails pry-rails puma (~> 6.0) rack-cors rails (= 8.1.0.beta1) rspec-rails - sassc-rails search_cop (~> 1.0.6) selenium-webdriver shoulda-matchers diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index c1f0705c7..79ec8dad4 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -12,7 +12,7 @@ // //= require jquery //= require jquery_ujs -//= require bootstrap +//= require bootstrap.min //= require cocoon //= require annotator-full.min //= require ckeditor/init diff --git a/app/assets/javascripts/awbw/application-20250913.js b/app/assets/javascripts/awbw/application-20250913.js new file mode 100644 index 000000000..0e111b35b --- /dev/null +++ b/app/assets/javascripts/awbw/application-20250913.js @@ -0,0 +1,30 @@ +function scroll_here(e){var t=$(e);t.css("border","1px solid red");var n=navbar.height()+120,i=t.offset().top-n,o=window.pageYOffset-n;if(o"!==u[1]||Ye.test(a)?0:l:l.firstChild)&&a.childNodes.length;r--;)fe.nodeName(d=a.childNodes[r],"tbody")&&!d.childNodes.length&&a.removeChild(d);for(fe.merge(p,l.childNodes),l.textContent="";l.firstChild;)l.removeChild(l.firstChild);l=f.lastChild}else p.push(t.createTextNode(a));for(l&&f.removeChild(l),ue.appendChecked||fe.grep(E(p,"input"),C),g=0;a=p[g++];)if(i&&-1")).appendTo(t.documentElement))[0].contentWindow||dt[0].contentDocument).document).write(),t.close(),n=k(e,t),dt.detach()),ut[e]=n),n}function S(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}function x(e){if(e in Rt)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),n=Dt.length;n--;)if((e=Dt[n]+t)in Rt)return e}function N(e,t){for(var n,i,o,r=[],a=0,s=e.length;ay.cacheLength&&delete n[i.shift()],n[e+" "]=t}var i=[];return n}function l(e){return e[B]=!0,e}function o(e){var t=x.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function t(e,t){for(var n=e.split("|"),i=n.length;i--;)y.attrHandle[n[i]]=t}function c(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||V)-(~e.sourceIndex||V);if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function i(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function r(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function a(a){return l(function(r){return r=+r,l(function(e,t){for(var n,i=a([],e.length,r),o=i.length;o--;)e[n=i[o]]&&(e[n]=!(t[n]=e[n]))})})}function g(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function s(){}function m(e){for(var t=0,n=e.length,i="";t+~]|"+ne+")"+ne+"*"),de=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),ue=new RegExp(re),he=new RegExp("^"+ie+"$"),fe={ID:new RegExp("^#("+ie+")"),CLASS:new RegExp("^\\.("+ie+")"),TAG:new RegExp("^("+ie+"|[*])"),ATTR:new RegExp("^"+oe),PSEUDO:new RegExp("^"+re),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},pe=/^(?:input|select|textarea|button)$/i,ge=/^h\d$/i,me=/^[^{]+\{\s*\[native \w/,Ee=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Te=/[+~]/,Ce=/'|\\/g,ve=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),be=function(e,t,n){var i="0x"+t-65536;return i!=i||n?t:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},ye=function(){S()};try{Q.apply(X=Z.call(M.childNodes),M.childNodes),X[M.childNodes.length].nodeType}catch(Ie){Q={apply:X.length?function(e,t){J.apply(e,Z.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}for(p in E=v.support={},O=v.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},S=v.setDocument=function(e){var t,n,i=e?e.ownerDocument||e:M;return i!==x&&9===i.nodeType&&i.documentElement&&(N=(x=i).documentElement,A=!O(x),(n=x.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",ye,!1):n.attachEvent&&n.attachEvent("onunload",ye)),E.attributes=o(function(e){return e.className="i",!e.getAttribute("className")}),E.getElementsByTagName=o(function(e){return e.appendChild(x.createComment("")),!e.getElementsByTagName("*").length}),E.getElementsByClassName=me.test(x.getElementsByClassName),E.getById=o(function(e){return N.appendChild(e).id=B,!x.getElementsByName||!x.getElementsByName(B).length}),E.getById?(y.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&A){var n=t.getElementById(e);return n?[n]:[]}},y.filter.ID=function(e){var t=e.replace(ve,be);return function(e){return e.getAttribute("id")===t}}):(delete y.find.ID,y.filter.ID=function(e){var n=e.replace(ve,be);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}}),y.find.TAG=E.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):E.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,i=[],o=0,r=t.getElementsByTagName(e);if("*"!==e)return r;for(;n=r[o++];)1===n.nodeType&&i.push(n);return i},y.find.CLASS=E.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&A)return t.getElementsByClassName(e)},F=[],L=[],(E.qsa=me.test(x.querySelectorAll))&&(o(function(e){N.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&L.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||L.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+B+"-]").length||L.push("~="),e.querySelectorAll(":checked").length||L.push(":checked"),e.querySelectorAll("a#"+B+"+*").length||L.push(".#.+[+~]")}),o(function(e){var t=x.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&L.push("name"+ne+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||L.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),L.push(",.*:")})),(E.matchesSelector=me.test(P=N.matches||N.webkitMatchesSelector||N.mozMatchesSelector||N.oMatchesSelector||N.msMatchesSelector))&&o(function(e){E.disconnectedMatch=P.call(e,"div"),P.call(e,"[s!='']:x"),F.push("!=",re)}),L=L.length&&new RegExp(L.join("|")),F=F.length&&new RegExp(F.join("|")),t=me.test(N.compareDocumentPosition),$=t||me.test(N.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):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},W=t?function(e,t){if(e===t)return w=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!E.sortDetached&&t.compareDocumentPosition(e)===n?e===x||e.ownerDocument===M&&$(M,e)?-1:t===x||t.ownerDocument===M&&$(M,t)?1:k?ee(k,e)-ee(k,t):0:4&n?-1:1)}:function(e,t){if(e===t)return w=!0,0;var n,i=0,o=e.parentNode,r=t.parentNode,a=[e],s=[t];if(!o||!r)return e===x?-1:t===x?1:o?-1:r?1:k?ee(k,e)-ee(k,t):0;if(o===r)return c(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;a[i]===s[i];)i++;return i?c(a[i],s[i]):a[i]===M?-1:s[i]===M?1:0}),x},v.matches=function(e,t){return v(e,null,null,t)},v.matchesSelector=function(e,t){if((e.ownerDocument||e)!==x&&S(e),t=t.replace(de,"='$1']"),E.matchesSelector&&A&&!U[t+" "]&&(!F||!F.test(t))&&(!L||!L.test(t)))try{var n=P.call(e,t);if(n||E.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(Ie){}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(ve,be),e[3]=(e[3]||e[4]||e[5]||"").replace(ve,be),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(), +"nth"===e[1].slice(0,3)?(e[3]||v.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&v.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return fe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&ue.test(n)&&(t=D(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(ve,be).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=j[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&j(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,i,o){return function(e){var t=v.attr(e,n);return null==t?"!="===i:!i||(t+="","="===i?t===o:"!="===i?t!==o:"^="===i?o&&0===t.indexOf(o):"*="===i?o&&-1(?:<\/\1>|)$/,Ie=/^.[^:#\[\.,]*$/;fe.filter=function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?fe.find.matchesSelector(i,e)?[i]:[]:fe.find.matches(e,fe.grep(t,function(e){return 1===e.nodeType}))},fe.fn.extend({find:function(e){var t,n=[],i=this,o=i.length;if("string"!=typeof e)return this.pushStack(fe(e).filter(function(){for(t=0;t)[^>]*|#([\w-]*))$/;(fe.fn.init=function(e,t,n){var i,o;if(!e)return this;if(n=n||Oe,"string"!=typeof e)return e.nodeType?(this.context=this[0]=e,this.length=1,this):fe.isFunction(e)?"undefined"!=typeof n.ready?n.ready(e):e(fe):(e.selector!==undefined&&(this.selector=e.selector,this.context=e.context),fe.makeArray(e,this));if(!(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&3<=e.length?[null,e,null]:De.exec(e))||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof fe?t[0]:t,fe.merge(this,fe.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:ie,!0)),ye.test(i[1])&&fe.isPlainObject(t))for(i in t)fe.isFunction(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}if((o=ie.getElementById(i[2]))&&o.parentNode){if(o.id!==i[2])return Oe.find(e);this.length=1,this[0]=o}return this.context=ie,this.selector=e,this}).prototype=fe.fn,Oe=fe(ie);var Re=/^(?:parents|prev(?:Until|All))/,_e={children:!0,contents:!0,next:!0,prev:!0};fe.fn.extend({has:function(e){var t,n=fe(e,this),i=n.length;return this.filter(function(){for(t=0;t
a",ue.leadingWhitespace=3===Le.firstChild.nodeType,ue.tbody=!Le.getElementsByTagName("tbody").length,ue.htmlSerialize=!!Le.getElementsByTagName("link").length,ue.html5Clone="<:nav>"!==ie.createElement("nav").cloneNode(!0).outerHTML,Pe.type="checkbox",Pe.checked=!0,Fe.appendChild(Pe),ue.appendChecked=Pe.checked,Le.innerHTML="",ue.noCloneChecked=!!Le.cloneNode(!0).lastChild.defaultValue,Fe.appendChild(Le),(Pe=ie.createElement("input")).setAttribute("type","radio"),Pe.setAttribute("checked","checked"),Pe.setAttribute("name","t"),Le.appendChild(Pe),ue.checkClone=Le.cloneNode(!0).cloneNode(!0).lastChild.checked,ue.noCloneEvent=!!Le.addEventListener,Le[fe.expando]=1,ue.attributes=!Le.getAttribute(fe.expando);var Ge={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:ue.htmlSerialize?[0,"",""]:[1,"X
","
"]};Ge.optgroup=Ge.option,Ge.tbody=Ge.tfoot=Ge.colgroup=Ge.caption=Ge.thead,Ge.th=Ge.td;var Xe=/<|&#?\w+;/,Ye=/]","i"),ot=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,rt=/\s*$/g,ct=m(ie).appendChild(ie.createElement("div"));fe.extend({htmlPrefilter:function(e){return e.replace(ot,"<$1>")},clone:function(e,t,n){var i,o,r,a,s,l=fe.contains(e.ownerDocument,e);if(ue.html5Clone||fe.isXMLDoc(e)||!it.test("<"+e.nodeName+">")?r=e.cloneNode(!0):(ct.innerHTML=e.outerHTML,ct.removeChild(r=ct.firstChild)),!(ue.noCloneEvent&&ue.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||fe.isXMLDoc(e)))for(i=E(r),s=E(e),a=0;null!=(o=s[a]);++a)i[a]&&R(o,i[a]);if(t)if(n)for(s=s||E(e),i=i||E(r),a=0;null!=(o=s[a]);a++)D(o,i[a]);else D(e,r);return 0<(i=E(r,"script")).length&&T(i,!l&&E(e,"script")),i=s=o=null,r},cleanData:function(e,t){for(var n,i,o,r,a=0,s=fe.expando,l=fe.cache,c=ue.attributes,d=fe.event.special;null!=(n=e[a]);a++)if((t||xe(n))&&(r=(o=n[s])&&l[o])){if(r.events)for(i in r.events)d[i]?fe.event.remove(n,i):fe.removeEvent(n,i,r.handle);l[o]&&(delete l[o],c||"undefined"==typeof n.removeAttribute?n[s]=undefined:n.removeAttribute(s),ne.push(o))}}}),fe.fn.extend({domManip:_,detach:function(e){return K(this,e,!0)},remove:function(e){return K(this,e)},text:function(e){return qe(this,function(e){return e===undefined?fe.text(this):this.empty().append((this[0]&&this[0].ownerDocument||ie).createTextNode(e))},null,e,arguments.length)},append:function(){return _(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||b(this,e).appendChild(e)})},prepend:function(){return _(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=b(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return _(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return _(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&fe.cleanData(E(e,!1) +);e.firstChild;)e.removeChild(e.firstChild);e.options&&fe.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return fe.clone(this,e,t)})},html:function(e){return qe(this,function(e){var t=this[0]||{},n=0,i=this.length;if(e===undefined)return 1===t.nodeType?t.innerHTML.replace(nt,""):undefined;if("string"==typeof e&&!rt.test(e)&&(ue.htmlSerialize||!it.test(e))&&(ue.leadingWhitespace||!We.test(e))&&!Ge[(ze.exec(e)||["",""])[1].toLowerCase()]){e=fe.htmlPrefilter(e);try{for(;nt",d.childNodes[0].style.borderCollapse="separate",(e=d.getElementsByTagName("td"))[0].style.cssText="margin:0;border:0;padding:0;display:none",(a=0===e[0].offsetHeight)&&(e[0].style.display="",e[1].style.display="none",a=0===e[0].offsetHeight)),n.removeChild(c)}var i,o,r,a,s,l,c=ie.createElement("div"),d=ie.createElement("div");d.style&&(d.style.cssText="float:left;opacity:.5",ue.opacity="0.5"===d.style.opacity,ue.cssFloat=!!d.style.cssFloat,d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",ue.clearCloneStyle="content-box"===d.style.backgroundClip,(c=ie.createElement("div")).style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",d.innerHTML="",c.appendChild(d),ue.boxSizing=""===d.style.boxSizing||""===d.style.MozBoxSizing||""===d.style.WebkitBoxSizing,fe.extend(ue,{reliableHiddenOffsets:function(){return null==i&&e(),a},boxSizingReliable:function(){return null==i&&e(),r},pixelMarginRight:function(){return null==i&&e(),o},pixelPosition:function(){return null==i&&e(),i},reliableMarginRight:function(){return null==i&&e(),s},reliableMarginLeft:function(){return null==i&&e(),l}}))}();var mt,Et,Tt=/^(top|right|bottom|left)$/;I.getComputedStyle?(mt=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=I),t.getComputedStyle(e)},Et=function(e,t,n){var i,o,r,a,s=e.style;return""!==(a=(n=n||mt(e))?n.getPropertyValue(t)||n[t]:undefined)&&a!==undefined||fe.contains(e.ownerDocument,e)||(a=fe.style(e,t)),n&&!ue.pixelMarginRight()&&ft.test(a)&&ht.test(t)&&(i=s.width,o=s.minWidth,r=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=i,s.minWidth=o,s.maxWidth=r),a===undefined?a:a+""}):gt.currentStyle&&(mt=function(e){return e.currentStyle},Et=function(e,t,n){var i,o,r,a,s=e.style;return null==(a=(n=n||mt(e))?n[t]:undefined)&&s&&s[t]&&(a=s[t]),ft.test(a)&&!Tt.test(t)&&(i=s.left,(r=(o=e.runtimeStyle)&&o.left)&&(o.left=e.currentStyle.left),s.left="fontSize"===t?"1em":a,a=s.pixelLeft+"px",s.left=i,r&&(o.left=r)),a===undefined?a:a+""||"auto"});var Ct=/alpha\([^)]*\)/i,vt=/opacity\s*=\s*([^)]*)/i,bt=/^(none|table(?!-c[ea]).+)/,yt=new RegExp("^("+$e+")(.*)$","i"),It={position:"absolute",visibility:"hidden",display:"block"},Ot={letterSpacing:"0",fontWeight:"400"},Dt=["Webkit","O","Moz","ms"],Rt=ie.createElement("div").style;fe.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Et(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":ue.cssFloat?"cssFloat":"styleFloat"},style:function(e,t,n,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,r,a,s=fe.camelCase(t),l=e.style;if(t=fe.cssProps[s]||(fe.cssProps[s]=x(s)||s),a=fe.cssHooks[t]||fe.cssHooks[s],n===undefined)return a&&"get"in a&&(o=a.get(e,!1,i))!==undefined?o:l[t];if("string"===(r=typeof n)&&(o=Be.exec(n))&&o[1]&&(n=u(e,t,o),r="number"),null!=n&&n==n&&("number"===r&&(n+=o&&o[3]||(fe.cssNumber[s]?"":"px")),ue.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),!(a&&"set"in a&&(n=a.set(e,n,i))===undefined)))try{l[t]=n}catch(c){}}},css:function(e,t,n,i){var o,r,a,s=fe.camelCase(t);return t=fe.cssProps[s]||(fe.cssProps[s]=x(s)||s),(a=fe.cssHooks[t]||fe.cssHooks[s])&&"get"in a&&(r=a.get(e,!0,n)),r===undefined&&(r=Et(e,t,i)),"normal"===r&&t in Ot&&(r=Ot[t]),""===n||n?(o=parseFloat(r),!0===n||isFinite(o)?o||0:r):r}}),fe.each(["height","width"],function(e,o){fe.cssHooks[o]={get:function(e,t,n){if(t)return bt.test(fe.css(e,"display"))&&0===e.offsetWidth?pt(e,It,function(){return F(e,o,n)}):F(e,o,n)},set:function(e,t,n){var i=n&&mt(e);return A(e,t,n?L(e,o,n,ue.boxSizing&&"border-box"===fe.css(e,"boxSizing",!1,i),i):0)}}}),ue.opacity||(fe.cssHooks.opacity={get:function(e,t){return vt.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,o=fe.isNumeric(t)?"alpha(opacity="+100*t+")":"",r=i&&i.filter||n.filter||"";((n.zoom=1)<=t||""===t)&&""===fe.trim(r.replace(Ct,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||i&&!i.filter)||(n.filter=Ct.test(r)?r.replace(Ct,o):r+" "+o)}}),fe.cssHooks.marginRight=S(ue.reliableMarginRight,function(e,t){if(t)return pt(e,{display:"inline-block"},Et,[e,"marginRight"])}),fe.cssHooks.marginLeft=S(ue.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Et(e,"marginLeft"))||(fe.contains(e.ownerDocument,e)?e.getBoundingClientRect().left-pt(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}):0))+"px"}),fe.each({margin:"",padding:"",border:"Width"},function(o,r){fe.cssHooks[o+r]={expand:function(e){for(var t=0,n={},i="string"==typeof e?e.split(" "):[e];t<4;t++)n[o+Me[t]+r]=i[t]||i[t-2]||i[0];return n}},ht.test(o)||(fe.cssHooks[o+r].set=A)}),fe.fn.extend({css:function(e,t){return qe(this,function(e,t,n){var i,o,r={},a=0;if(fe.isArray(t)){for(i=mt(e),o=t.length;a
a",kt=St.getElementsByTagName("a")[0],wt.setAttribute("type","checkbox"),St.appendChild(wt),(kt=St.getElementsByTagName("a")[0]).style.cssText="top:1px",ue.getSetAttribute="t"!==St.className,ue.style=/top/.test(kt.getAttribute("style")),ue.hrefNormalized="/a"===kt.getAttribute("href"),ue.checkOn=!!wt.value,ue.optSelected=Nt.selected,ue.enctype=!!ie.createElement("form").enctype,xt.disabled=!0,ue.optDisabled=!Nt.disabled,(wt=ie.createElement("input")).setAttribute("value",""),ue.input=""===wt.getAttribute("value"),wt.value="t",wt.setAttribute("type","radio"),ue.radioValue="t"===wt.value;var Ft=/\r/g,Pt=/[\x20\t\r\n\f]+/g;fe.fn.extend({val:function(n){var i,e,o,t=this[0];return arguments.length?(o=fe.isFunction(n),this.each(function(e){var t;1===this.nodeType&&(null==(t=o?n.call(this,e,fe(this).val()):n)?t="":"number"==typeof t?t+="":fe.isArray(t)&&(t=fe.map(t,function(e){return null==e?"":e+""})),(i=fe.valHooks[this.type]||fe.valHooks[this.nodeName.toLowerCase()])&&"set"in i&&i.set(this,t,"value")!==undefined||(this.value=t))})):t?(i=fe.valHooks[t.type]||fe.valHooks[t.nodeName.toLowerCase()])&&"get"in i&&(e=i.get(t,"value"))!==undefined?e:"string"==typeof(e=t.value)?e.replace(Ft,""):null==e?"":e:void 0}}),fe.extend({valHooks:{option:{get:function(e){var t=fe.find.attr(e,"value");return null!=t?t:fe.trim(fe.text(e)).replace(Pt," ")}},select:{get:function(e){for(var t,n,i=e.options,o=e.selectedIndex,r="select-one"===e.type||o<0,a=r?null:[],s=r?o+1:i.length,l=o<0?s:r?o:0;l").append(fe.parseHTML(e)).find(i):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,r||[e.responseText,t,e])})}),this},fe.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){fe.fn[t]=function(e){return this.on(t,e)}}),fe.expr.filters.animated=function(t){return fe.grep(fe.timers,function(e){return t===e.elem}).length},fe.offset={setOffset:function(e,t,n){var i,o,r,a,s,l,c=fe.css(e,"position"),d=fe(e),u={};"static"===c&&(e.style.position="relative"),s=d.offset(),r=fe.css(e,"top"),l=fe.css(e,"left"),("absolute"===c||"fixed"===c)&&-1'),s='';r===l||o===l||c.isCrossDomain(t)||(s+=''),i&&a.attr("target",i),a.hide().append(s).appendTo("body"),a.submit()},formElements:function(e,t){return e.is("form")?d(e[0].elements).filter(t):e.find(t)},disableFormElements:function(e){c.formElements(e,c.disableSelector).each(function(){c.disableFormElement(d(this))})},disableFormElement:function(e){var t,n;t=e.is("button")?"html":"val",(n=e.data("disable-with"))!==l&&(e.data("ujs:enable-with",e[t]()),e[t](n)),e.prop("disabled",!0),e.data("ujs:disabled",!0)},enableFormElements:function(e){c.formElements(e,c.enableSelector).each(function(){c.enableFormElement(d(this))})},enableFormElement:function(e){var t=e.is("button")?"html":"val";e.data("ujs:enable-with")!==l&&(e[t](e.data("ujs:enable-with")),e.removeData("ujs:enable-with")),e.prop("disabled",!1),e.removeData("ujs:disabled")},allowAction:function(e){var t,n=e.data("confirm"),i=!1;if(!n)return!0;if(c.fire(e,"confirm")){try{i=c.confirm(n)}catch(o){(console.error||console.log).call(console,o.stack||o)}t=c.fire(e,"confirm:complete",[i])}return i&&t},blankInputs:function(e,t,n){var i,o,r,a=d(),s=t||"input,textarea",l=e.find(s),c={};return l.each(function(){(i=d(this)).is("input[type=radio]")?(r=i.attr("name"),c[r]||(0===e.find('input[type=radio]:checked[name="'+r+'"]').length&&(o=e.find('input[type=radio][name="'+r+'"]'),a=a.add(o)),c[r]=r)):(i.is("input[type=checkbox],input[type=radio]")?i.is(":checked"):!!i.val())===n&&(a=a.add(i))}),!!a.length&&a},nonBlankInputs:function(e,t){return c.blankInputs(e,t,!0)},stopEverything:function(e){return d(e.target).trigger("ujs:everythingStopped"),e.stopImmediatePropagation(),!1},disableElement:function(e){var t=e.data("disable-with");t!==l&&(e.data("ujs:enable-with",e.html()),e.html(t)),e.bind("click.railsDisable",function(e){return c.stopEverything(e)}),e.data("ujs:disabled",!0)},enableElement:function(e){e.data("ujs:enable-with")!==l&&(e.html(e.data("ujs:enable-with")),e.removeData("ujs:enable-with")),e.unbind("click.railsDisable"),e.removeData("ujs:disabled")}},c.fire(e,"rails:attachBindings")&&(d.ajaxPrefilter(function(e,t,n){e.crossDomain||c.CSRFProtection(n)}),d(window).on("pageshow.rails",function(){d(d.rails.enableSelector).each(function(){var e=d(this);e.data("ujs:disabled")&&d.rails.enableFormElement(e)}),d(d.rails.linkDisableSelector).each(function(){var e=d(this);e.data("ujs:disabled")&&d.rails.enableElement(e)})}),e.on("ajax:complete",c.linkDisableSelector,function(){c.enableElement(d(this))}),e.on("ajax:complete",c.buttonDisableSelector,function(){c.enableFormElement(d(this))}),e.on("click.rails",c.linkClickSelector,function(e){var t=d(this),n=t.data("method"),i=t.data("params"),o=e.metaKey||e.ctrlKey;if(!c.allowAction(t))return c.stopEverything(e);if(!o&&t.is(c.linkDisableSelector)&&c.disableElement(t),c.isRemote(t)){if(o&&(!n||"GET"===n)&&!i)return!0;var r=c.handleRemote(t);return!1===r?c.enableElement(t):r.fail(function(){c.enableElement(t)}),!1}return n?(c.handleMethod(t),!1):void 0}),e.on("click.rails",c.buttonClickSelector,function(e){var t=d(this);if(!c.allowAction(t)||!c.isRemote(t))return c.stopEverything(e);t.is(c.buttonDisableSelector)&&c.disableFormElement(t);var n=c.handleRemote(t);return!1===n?c.enableFormElement(t):n.fail(function(){c.enableFormElement(t)}),!1}),e.on("change.rails",c.inputChangeSelector,function(e){var t=d(this);return c.allowAction(t)&&c.isRemote(t)?(c.handleRemote(t),!1):c.stopEverything(e)}),e.on("submit.rails",c.formSubmitSelector,function(e){var t,n,i=d(this),o=c.isRemote(i);if(!c.allowAction(i))return c.stopEverything(e);if(i.attr("novalidate")===l)if(i.data("ujs:formnovalidate-button")===l){if((t=c.blankInputs(i,c.requiredInputSelector,!1))&&c.fire(i,"ajax:aborted:required",[t]))return c.stopEverything(e)}else i.data("ujs:formnovalidate-button",l);if(o){if(n=c.nonBlankInputs(i,c.fileInputSelector)){setTimeout(function(){c.disableFormElements(i)},13);var r=c.fire(i,"ajax:aborted:file",[n]);return r||setTimeout(function(){c.enableFormElements(i)},13),r}return c.handleRemote(i),!1}setTimeout(function(){c.disableFormElements(i)},13)}),e.on("click.rails",c.formInputClickSelector,function(e){var t=d(this);if(!c.allowAction(t))return c.stopEverything(e);var n=t.attr("name"),i=n?{name:n,value:t.val()}:null,o=t.closest("form");0===o.length&&(o=d("#"+t.attr("form"))),o.data("ujs:submit-button",i),o.data("ujs:formnovalidate-button",t.attr("formnovalidate")),o.data("ujs:submit-button-formaction",t.attr("formaction")),o.data("ujs:submit-button-formmethod",t.attr("formmethod"))}),e.on("ajax:send.rails",c.formSubmitSelector,function(e){this===e.target&&c.disableFormElements(d(this))}),e.on("ajax:complete.rails",c.formSubmitSelector,function(e){this===e.target&&c.enableFormElements(d(this))}),d(function(){c.refreshCSRFTokens()}))}(jQuery),"undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");!function(){"use strict";var e=jQuery.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1==e[0]&&9==e[1]&&e[2]<1||3this.$items.length-1||e<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){t.to(e)}):n==e?this.pause().cycle():this.slide(ndocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&e?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!e?this.scrollbarWidth:""})},s.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},s.prototype.checkScrollbar=function(){var e=window.innerWidth;if(!e){var t=document.documentElement.getBoundingClientRect();e=t.right-Math.abs(t.left)}this.bodyIsOverflowing=document.body.clientWidth
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},m.prototype.init=function(e,t,n){if(this.enabled=!0,this.type=e,this.$element=g(t),this.options=this.getOptions(n),this.$viewport=this.options.viewport&&g(g.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var i=this.options.trigger.split(" "),o=i.length;o--;){var r=i[o];if("click"==r)this.$element.on("click."+this.type,this.options.selector,g.proxy(this.toggle,this));else if("manual"!=r){var a="hover"==r?"mouseenter":"focusin",s="hover"==r?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,g.proxy(this.enter,this)),this.$element.on(s+"."+this.type,this.options.selector,g.proxy(this.leave,this))}}this.options.selector?this._options=g.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},m.prototype.getDefaults=function(){return m.DEFAULTS},m.prototype.getOptions=function(e){return(e=g.extend({},this.getDefaults(),this.$element.data(),e)).delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},m.prototype.getDelegateOptions=function(){var n={},i=this.getDefaults();return this._options&&g.each(this._options,function(e,t){i[e]!=t&&(n[e]=t)}),n},m.prototype.enter=function(e){var t=e instanceof this.constructor?e:g(e.currentTarget).data("bs."+this.type);if(t||(t=new this.constructor(e.currentTarget,this.getDelegateOptions()),g(e.currentTarget).data("bs."+this.type,t)),e instanceof g.Event&&(t.inState["focusin"==e.type?"focus":"hover"]=!0),t.tip().hasClass("in" +)||"in"==t.hoverState)t.hoverState="in";else{if(clearTimeout(t.timeout),t.hoverState="in",!t.options.delay||!t.options.delay.show)return t.show();t.timeout=setTimeout(function(){"in"==t.hoverState&&t.show()},t.options.delay.show)}},m.prototype.isInStateTrue=function(){for(var e in this.inState)if(this.inState[e])return!0;return!1},m.prototype.leave=function(e){var t=e instanceof this.constructor?e:g(e.currentTarget).data("bs."+this.type);if(t||(t=new this.constructor(e.currentTarget,this.getDelegateOptions()),g(e.currentTarget).data("bs."+this.type,t)),e instanceof g.Event&&(t.inState["focusout"==e.type?"focus":"hover"]=!1),!t.isInStateTrue()){if(clearTimeout(t.timeout),t.hoverState="out",!t.options.delay||!t.options.delay.hide)return t.hide();t.timeout=setTimeout(function(){"out"==t.hoverState&&t.hide()},t.options.delay.hide)}},m.prototype.show=function(){var e=g.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var t=g.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!t)return;var n=this,i=this.tip(),o=this.getUID(this.type);this.setContent(),i.attr("id",o),this.$element.attr("aria-describedby",o),this.options.animation&&i.addClass("fade");var r="function"==typeof this.options.placement?this.options.placement.call(this,i[0],this.$element[0]):this.options.placement,a=/\s?auto?\s?/i,s=a.test(r);s&&(r=r.replace(a,"")||"top"),i.detach().css({top:0,left:0,display:"block"}).addClass(r).data("bs."+this.type,this),this.options.container?i.appendTo(this.options.container):i.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var l=this.getPosition(),c=i[0].offsetWidth,d=i[0].offsetHeight;if(s){var u=r,h=this.getPosition(this.$viewport);r="bottom"==r&&l.bottom+d>h.bottom?"top":"top"==r&&l.top-dh.width?"left":"left"==r&&l.left-ca.top+a.height&&(o.top=a.top+a.height-l)}else{var c=t.left-r,d=t.left+r+n;ca.right&&(o.left=a.left+a.width-d)}return o},m.prototype.getTitle=function(){var e=this.$element,t=this.options;return e.attr("data-original-title")||("function"==typeof t.title?t.title.call(e[0]):t.title)},m.prototype.getUID=function(e){for(;e+=~~(1e6*Math.random()),document.getElementById(e););return e},m.prototype.tip=function(){if(!this.$tip&&(this.$tip=g(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},m.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},m.prototype.enable=function(){this.enabled=!0},m.prototype.disable=function(){this.enabled=!1},m.prototype.toggleEnabled=function(){this.enabled=!this.enabled},m.prototype.toggle=function(e){var t=this;e&&((t=g(e.currentTarget).data("bs."+this.type))||(t=new this.constructor(e.currentTarget,this.getDelegateOptions()),g(e.currentTarget).data("bs."+this.type,t))),e?(t.inState.click=!t.inState.click,t.isInStateTrue()?t.enter(t):t.leave(t)):t.tip().hasClass("in")?t.leave(t):t.enter(t)},m.prototype.destroy=function(){var e=this;clearTimeout(this.timeout),this.hide(function(){e.$element.off("."+e.type).removeData("bs."+e.type),e.$tip&&e.$tip.detach(),e.$tip=null,e.$arrow=null,e.$viewport=null,e.$element=null})};var t=g.fn.tooltip;g.fn.tooltip=e,g.fn.tooltip.Constructor=m,g.fn.tooltip.noConflict=function(){return g.fn.tooltip=t,this}}(jQuery),function(o){"use strict";function e(i){return this.each(function(){var e=o(this),t=e.data("bs.popover"),n="object"==typeof i&&i;!t&&/destroy|hide/.test(i)||(t||e.data("bs.popover",t=new r(this,n)),"string"==typeof i&&t[i]())})}var r=function(e,t){this.init("popover",e,t)};if(!o.fn.tooltip)throw new Error("Popover requires tooltip.js");r.VERSION="3.3.7",r.DEFAULTS=o.extend({},o.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),r.prototype=o.extend({},o.fn.tooltip.Constructor.prototype),(r.prototype.constructor=r).prototype.getDefaults=function(){return r.DEFAULTS},r.prototype.setContent=function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();e.find(".popover-title")[this.options.html?"html":"text"](t),e.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof n?"html":"append":"text"](n),e.removeClass("fade top bottom left right in"),e.find(".popover-title").html()||e.find(".popover-title").hide()},r.prototype.hasContent=function(){return this.getTitle()||this.getContent()},r.prototype.getContent=function(){var e=this.$element,t=this.options;return e.attr("data-content")||("function"==typeof t.content?t.content.call(e[0]):t.content)},r.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var t=o.fn.popover;o.fn.popover=e,o.fn.popover.Constructor=r,o.fn.popover.noConflict=function(){return o.fn.popover=t,this}}(jQuery),function(r){"use strict";function o(e,t){this.$body=r(document.body),this.$scrollElement=r(e).is(document.body)?r(window):r(e),this.options=r.extend({},o.DEFAULTS,t),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",r.proxy(this.process,this)),this.refresh(),this.process()}function t(i){return this.each(function(){var e=r(this),t=e.data("bs.scrollspy"),n="object"==typeof i&&i;t||e.data("bs.scrollspy",t=new o(this,n)),"string"==typeof i&&t[i]()})}o.VERSION="3.3.7",o.DEFAULTS={offset:10},o.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},o.prototype.refresh=function(){var e=this,i="offset",o=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),r.isWindow(this.$scrollElement[0])||(i="position",o=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var e=r(this),t=e.data("target")||e.attr("href"),n=/^#./.test(t)&&r(t);return n&&n.length&&n.is(":visible")&&[[n[i]().top+o,t]]||null}).sort(function(e,t){return e[0]-t[0]}).each(function(){e.offsets.push(this[0]),e.targets.push(this[1])})},o.prototype.process=function(){var e,t=this.$scrollElement.scrollTop()+this.options.offset,n=this.getScrollHeight(),i=this.options.offset+n-this.$scrollElement.height(),o=this.offsets,r=this.targets,a=this.activeTarget;if(this.scrollHeight!=n&&this.refresh(),i<=t)return a!=(e=r[r.length-1])&&this.activate(e);if(a&&t=o[e]&&(o[e+1]===undefined||t .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),r?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu").length&&e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),n&&n()}var o=t.find("> .active"),r=n&&s.support.transition&&(o.length&&o.hasClass("fade")||!!t.find("> .fade").length);o.length&&r?o.one("bsTransitionEnd",i).emulateTransitionEnd(a.TRANSITION_DURATION):i(),o.removeClass("in")};var e=s.fn.tab;s.fn.tab=t,s.fn.tab.Constructor=a,s.fn.tab.noConflict=function(){return s.fn.tab=e,this};var n=function(e){e.preventDefault(),t.call(s(this),"show")};s(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',n).on("click.bs.tab.data-api",'[data-toggle="pill"]',n)}(jQuery),function(l){"use strict";function n(i){return this.each(function(){var e=l(this),t=e.data("bs.affix"),n="object"==typeof i&&i;t||e.data("bs.affix",t=new c(this,n)),"string"==typeof i&&t[i]()})}var c=function(e,t){this.options=l.extend({},c.DEFAULTS,t),this.$target=l(this.options.target).on("scroll.bs.affix.data-api",l.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",l.proxy(this.checkPositionWithEventLoop,this)),this.$element=l(e),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.7",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(e,t,n,i){var o=this.$target.scrollTop(),r=this.$element.offset(),a=this.$target.height();if(null!=n&&"top"==this.affixed)return o/g,">").replace(/"/g,""")}}).uuid=(K=0,function(){return K++}),E.getGlobal=function(){return function(){return this}()},E.maxZIndex=function(i){var e,o;return e=function(){var e,t,n;for(n=[],e=0,t=i.length;ei.startOffset?n.start=i.start.splitText(i.startOffset):n.start=i.start.nextSibling:n.start=i.start,i.start===i.end?(n.start.nodeValue.length>i.endOffset-i.startOffset&&n.start.splitText(i.endOffset-i.startOffset),n.end=n.start):(i.end.nodeValue.length>i.endOffset&&i.end.splitText(i.endOffset),n.end=i.end),n.commonAncestor=this.commonAncestorContainer;n.commonAncestor.nodeType!==Node.ELEMENT_NODE;)n.commonAncestor=n.commonAncestor.parentNode;return new m.NormalizedRange(n)},e.prototype.serialize=function(e,t){return this.normalize(e).serialize(e,t)},e}(),m.NormalizedRange=function(){function e(e){this.commonAncestor=e.commonAncestor,this.start=e.start,this.end=e.end}return e.prototype.normalize=function(){return this},e.prototype.limit=function(t){var e,n,i,o,r,a;if(!(e=T.grep(this.textNodes(),function(e){return e.parentNode===t||T.contains(t,e.parentNode)})).length)return null;for(this.start=e[0],this.end=e[e.length-1],i=T(this.start).parents(),o=0,r=(a=T(this.end).parents()).length;os){a[r+"Container"]=l,a[r+"Offset"]=this[r+"Offset"]-i;break}i+=l.nodeValue.length}if(null==a[r+"Offset"])throw new m.RangeError(r+"offset","Couldn't find offset "+this[r+"Offset"]+" in element "+this[r])}return t=null==document.compareDocumentPosition?function(e,t){return e.contains(t)}:function(e,t){return 16&e.compareDocumentPosition(t)},T(a.startContainer).parents().each(function(){if(t(this,a.endContainer))return a.commonAncestorContainer=this,!1}),new m.BrowserRange(a).normalize(e)},e.prototype.serialize=function(e,t){return this.normalize(e).serialize(e,t)},e.prototype.toObject=function(){return{start:this.start,startOffset:this.startOffset,end:this.end,endOffset:this.endOffset}},e}(),g=this.Annotator,(d=function(){function o(e,t){if(this.onDeleteAnnotation=A(this.onDeleteAnnotation,this),this.onEditAnnotation=A(this.onEditAnnotation,this),this.onAdderClick=A(this.onAdderClick,this),this.onAdderMousedown=A(this.onAdderMousedown,this),this.onHighlightMouseover=A(this.onHighlightMouseover,this),this.checkForEndSelection=A(this.checkForEndSelection,this),this.checkForStartSelection=A(this.checkForStartSelection,this),this.clearViewerHideTimer=A(this.clearViewerHideTimer,this),this.startViewerHideTimer=A(this.startViewerHideTimer,this),this.showViewer=A(this.showViewer,this),this.onEditorSubmit=A(this.onEditorSubmit,this),this.onEditorHide=A(this.onEditorHide,this),this.showEditor=A(this.showEditor,this),o.__super__.constructor.apply(this,arguments),this.plugins={},!o.supported())return this;this.options.readOnly||this._setupDocumentEvents(),this._setupWrapper()._setupViewer()._setupEditor(),this._setupDynamicStyle(),this.adder=T(this.html.adder).appendTo(this.wrapper).hide(),o._instances.push(this)}return N(o,i),o.prototype.events={".annotator-adder button click":"onAdderClick",".annotator-adder button mousedown":"onAdderMousedown",".annotator-hl mouseover":"onHighlightMouseover",".annotator-hl mouseout":"startViewerHideTimer"},o.prototype.html={adder:'
",wrapper:'
'},o.prototype.options={readOnly:!1},o.prototype.plugins={},o.prototype.editor=null,o.prototype.viewer=null,o.prototype.selectedRanges=null,o.prototype.mouseIsDown=!1,o.prototype.ignoreMouseup=!1,o.prototype.viewerHideTimer=null,o.prototype._setupWrapper=function(){return this.wrapper=T(this.html.wrapper),this.element.find("script").remove(),this.element.wrapInner(this.wrapper),this.wrapper=this.element.find(".annotator-wrapper"),this},o.prototype._setupViewer=function(){var n=this;return this.viewer=new o.Viewer({readOnly:this.options.readOnly}),this.viewer.hide().on("edit",this.onEditAnnotation).on("delete",this.onDeleteAnnotation).addField({load:function(e,t){return t.text?T(e).html(E.escape(t.text)):T(e).html(""+_("No Comment")+""),n.publish("annotationViewerTextField",[e,t])}}).element.appendTo(this.wrapper).bind({mouseover:this.clearViewerHideTimer,mouseout:this.startViewerHideTimer}),this},o.prototype._setupEditor=function(){return this.editor=new o.Editor,this.editor.hide().on("hide",this.onEditorHide).on("save",this.onEditorSubmit).addField({type:"textarea",label:_("Comments")+"\u2026",load:function(e,t){return T(e).find("textarea").val(t.text||"")},submit:function(e,t){return t.text=T(e).find("textarea").val()}}),this.editor.element.appendTo(this.wrapper),this},o.prototype._setupDocumentEvents=function(){return T(document).bind({mouseup:this.checkForEndSelection,mousedown:this.checkForStartSelection}),this},o.prototype._setupDynamicStyle=function(){var e,t,n,o;return(n=T("#annotator-dynamic-style")).length||(n=T('').appendTo(document.head)),t="*"+function(){var e,t,n,i +;for(i=[],e=0,t=(n=["adder","outer","notice","filter"]).length;e"),l=[],r=0,a=(s=e.textNodes()).length;r tag?")),this},o.prototype.showEditor=function(e,t){return this.editor.element.css(t),this.editor.load(e),this.publish("annotationEditorShown",[this.editor,e]),this},o.prototype.onEditorHide=function(){return this.publish("annotationEditorHidden",[this.editor]),this.ignoreMouseup=!1},o.prototype.onEditorSubmit=function(e){return this.publish("annotationEditorSubmit",[this.editor,e])},o.prototype.showViewer=function(e,t){return this.viewer.element.css(t),this.viewer.load(e),this.publish("annotationViewerShown",[this.viewer,e])},o.prototype.startViewerHideTimer=function(){if(!this.viewerHideTimer)return this.viewerHideTimer=setTimeout(this.viewer.hide,250)},o.prototype.clearViewerHideTimer=function(){return clearTimeout(this.viewerHideTimer),this.viewerHideTimer=!1},o.prototype.checkForStartSelection=function(e){return e&&this.isAnnotator(e.target)||this.startViewerHideTimer(),this.mouseIsDown=!0},o.prototype.checkForEndSelection=function(e){var t,n,i,o;if(this.mouseIsDown=!1,!this.ignoreMouseup){for(this.selectedRanges=this.getSelectedRanges(),n=0,i=(o=this.selectedRanges).length;n\n
\n
    \n \n
    \n",n.prototype.options={},n.prototype.show=function(e){return d.Util.preventEventDefault(e),this.element.removeClass(this.classes.hide),this.element.find(".annotator-save").addClass(this.classes.focus),this.checkOrientation(),this.element.find(":input:first").focus(),this.setupDraggables(),this.publish("show")},n.prototype.hide=function(e){return d.Util.preventEventDefault(e),this.element.addClass(this.classes.hide),this.publish("hide")},n.prototype.load=function(e){var t,n,i,o;for(this.annotation=e,this.publish("load",[this.annotation]),n=0,i=(o=this.fields).length;n'),n.element=t[0],n.type){case"textarea":i=T(""),""+encodeURIComponent(e)+""})}function l(e){return e.replace(w,function(e,t){return decodeURIComponent(t)})}function c(e){return e.replace(/\x3c!--(?!{cke_protected})[\s\S]+?--\x3e/g,function(e){return""})}function g(e){return e.replace(/\x3c!--\{cke_protected\}\{C\}([\s\S]+?)--\x3e/g,function(e,t){return decodeURIComponent(t)})}function m(e,t){var n=t._.dataStore;return e.replace(/\x3c!--\{cke_protected\}([\s\S]+?)--\x3e/g,function(e,t){return decodeURIComponent(t)}).replace(/\{cke_protected_(\d+)\}/g,function(e,t){return n&&n[t]||""})}function E(e,o){var i=[],t=o.config.protectedSource,n=o._.dataStore||(o._.dataStore={id:1}),r=/<\!--\{cke_temp(comment)?\}(\d*?)--\x3e/g;t=[/|$)/gi,//gi,//gi].concat(t);e=e.replace(/\x3c!--[\s\S]*?--\x3e/g,function(e){return""});for(var a=0;a"});return(e=(e=e.replace(r,function(e,t,n){return""})).replace(/<\w+(?:\s+(?:(?:[^\s=>]+\s*=\s*(?:[^'"\s>]+|'[^']*'|"[^"]*"))|[^\s=\/>]+))+\s*\/?>/g,function(e){return e.replace(/\x3c!--\{cke_protected\}([^>]*)--\x3e/g,function(e,t){return n[n.id]=decodeURIComponent(t),"{cke_protected_"+n.id+++"}"})})).replace(/<(title|iframe|textarea)([^>]*)>([\s\S]*?)<\/\1>/g,function(e,t,n,i){return"<"+t+n+">"+m(g(i),o)+""})}CKEDITOR.htmlDataProcessor=function(o){var e,t,i=this;this.editor=o,this.dataFilter=e=new CKEDITOR.htmlParser.filter,this.htmlFilter=t=new CKEDITOR.htmlParser.filter,this.writer=new CKEDITOR.htmlParser.basicWriter,e.addRules(y),e.addRules(I,{applyToAll:!0}),e.addRules(n(o,"data"),{applyToAll:!0}),t.addRules(O),t.addRules(D,{applyToAll:!0}),t.addRules(n(o,"html"),{applyToAll:!0}),o.on("toHtml",function(e){var t,n,i=(i=(i=(i=(i=s(i=a(i=s(i=E(i=(e=e.data).dataValue,o),k)),K)).replace(S,"$1cke:$2")).replace(N,"")).replace(/(]*>)(\r\n|\n)/g,"$1$2$2")).replace(/([^a-z0-9<\-])(on\w{3,})(?!>)/gi,"$1data-cke-"+CKEDITOR.rnd+"-$2");t=e.context||o.editable().getName(),CKEDITOR.env.ie&&CKEDITOR.env.version<9&&"pre"==t&&(t="div",i="
    "+i+"
    ",n=1),(t=o.document.createElement(t)).setHtml("a"+i),i=(i=t.getHtml().substr(1)).replace(new RegExp("data-cke-"+CKEDITOR.rnd+"-","ig"),""),n&&(i=i.replace(/^
    |<\/pre>$/gi,"")),i=g(i=l(i=i.replace(x,"$1$2"))),t=!1!==e.fixForBody&&r(e.enterMode,o.config.autoParagraph),i=CKEDITOR.htmlParser.fragment.fromHtml(i,e.context,t),t&&(!(n=i).children.length&&CKEDITOR.dtd[n.name][t]&&(t=new CKEDITOR.htmlParser.element(t),n.add(t))),e.dataValue=i},null,null,5),o.on("toHtml",function(e){e.data.filter.applyTo(e.data.dataValue,!0,e.data.dontFilter,e.data.enterMode)&&o.fire("dataFiltered")},null,null,6),o.on("toHtml",function(e){e.data.dataValue.filterChildren(i.dataFilter,!0)},null,null,10),o.on("toHtml",function(e){var t=(e=e.data).dataValue,n=new CKEDITOR.htmlParser.basicWriter;t.writeChildrenHtml(n),t=n.getHtml(!0),e.dataValue=c(t)},null,null,15),o.on("toDataFormat",function(e){var t=e.data.dataValue;e.data.enterMode!=CKEDITOR.ENTER_BR&&(t=t.replace(/^
    /i,"")),e.data.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(t,e.data.context,r(e.data.enterMode,o.config.autoParagraph))},null,null,5),o.on("toDataFormat",function(e){e.data.dataValue.filterChildren(i.htmlFilter,!0)},null,null,10),o.on("toDataFormat",function(e){ +e.data.filter.applyTo(e.data.dataValue,!1,!0)},null,null,11),o.on("toDataFormat",function(e){var t=e.data.dataValue,n=i.writer;n.reset(),t.writeChildrenHtml(n),t=m(t=g(t=n.getHtml(!0)),o),e.data.dataValue=t},null,null,15)},CKEDITOR.htmlDataProcessor.prototype={toHtml:function(e,t,n,i){var o,r,a,s,l=this.editor;return t&&"object"==typeof t?(o=t.context,n=t.fixForBody,i=t.dontFilter,r=t.filter,a=t.enterMode,s=t.protectedWhitespaces):o=t,o||null===o||(o=l.editable().getName()),l.fire("toHtml",{dataValue:e,context:o,fixForBody:n,dontFilter:i,filter:r||l.filter,enterMode:a||l.enterMode,protectedWhitespaces:s}).dataValue},toDataFormat:function(e,t){var n,i,o;return t&&(n=t.context,i=t.filter,o=t.enterMode),n||null===n||(n=this.editor.editable().getName()),this.editor.fire("toDataFormat",{dataValue:e,filter:i||this.editor.filter,context:n,enterMode:o||this.editor.enterMode}).dataValue}};var T=/(?: |\xa0)$/,C="{cke_protected}",v=CKEDITOR.dtd,o="caption colgroup col thead tfoot tbody".split(" "),b=CKEDITOR.tools.extend({},v.$blockLimit,v.$block),y={elements:{input:e,textarea:e}},I={attributeNames:[[/^on/,"data-cke-pa-on"],[/^srcdoc/,"data-cke-pa-srcdoc"],[/^data-cke-expando$/,""]],elements:{iframe:function(e){if(e.attributes&&e.attributes.src){var t=e.attributes.src.toLowerCase().replace(/[^a-z]/gi,"");0!==t.indexOf("javascript")&&0!==t.indexOf("data")||(e.attributes["data-cke-pa-src"]=e.attributes.src,delete e.attributes.src)}}}},O={elements:{embed:function(e){if((n=e.parent)&&"object"==n.name){var t=n.attributes.width,n=n.attributes.height;t&&(e.attributes.width=t),n&&(e.attributes.height=n)}},a:function(e){var t=e.attributes;if(!(e.children.length||t.name||t.id||e.attributes["data-cke-saved-name"]))return!1}}},D={elementNames:[[/^cke:/,""],[/^\?xml:namespace$/,""]],attributeNames:[[/^data-cke-(saved|pa)-/,""],[/^data-cke-.*/,""],["hidefocus",""]],elements:{$:function(e){var t=e.attributes;if(t){if(t["data-cke-temp"])return!1;for(var n=["name","href","src"],i=0;i]*)>/gi,R=/([\w-:]+)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,_=/^(href|src|name)$/i,K=/(?:])[^>]*>[\s\S]*?<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,k=/(])[^>]*>)([\s\S]*?)(?:<\/textarea>)/gi,w=/([^<]*)<\/cke:encoded>/gi,S=/(<\/?)((?:object|embed|param|html|body|head|title)[^>]*>)/gi,x=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,N=/]*?)\/?>(?!\s*<\/cke:\1)/gi}(),CKEDITOR.htmlParser.element=function(e,t){this.name=e,this.attributes=t||{},this.children=[];var n=e||"",i=n.match(/^cke:(.*)/);i&&(n=i[1]),n=!!(CKEDITOR.dtd.$nonBodyContent[n]||CKEDITOR.dtd.$block[n]||CKEDITOR.dtd.$listItem[n]||CKEDITOR.dtd.$tableContent[n]||CKEDITOR.dtd.$nonEditable[n]||"br"==n),this.isEmpty=!!CKEDITOR.dtd.$empty[e],this.isUnknown=!CKEDITOR.dtd[e],this._={isBlockLike:n,hasInlineStarted:this.isEmpty||!n}},CKEDITOR.htmlParser.cssStyle=function(e){var i={};return((e instanceof CKEDITOR.htmlParser.element?e.attributes.style:e)||"").replace(/"/g,'"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(e,t,n){"font-family"==t&&(n=n.replace(/["']/g,"")),i[t.toLowerCase()]=n}),{rules:i,populate:function(e){var t=this.toString();t&&(e instanceof CKEDITOR.dom.element?e.setAttribute("style",t):e instanceof CKEDITOR.htmlParser.element?e.attributes.style=t:e.style=t)},toString:function(){var e,t=[];for(e in i)i[e]&&t.push(e,":",i[e],";");return t.join("")}}},function(){function i(t){return function(e){return e.type==CKEDITOR.NODE_ELEMENT&&("string"==typeof t?e.name==t:e.name in t)}}var s=function(e,t){return(e=e[0])<(t=t[0])?-1:t'+i.getValue()+"",CKEDITOR.document)).insertAfter(i),i.hide(),i.$.form&&n._attachToForm()):n.setData(e.getHtml(),null,!0),n.on("loaded",function(){n.fire("uiReady"),n.editable(e),n.container=e,n.ui.contentsElement=e,n.setData(n.getData(1)),n.resetDirty(),n.fire("contentDom"),n.mode="wysiwyg",n.fire("mode"),n.status="ready",n.fireOnce("instanceReady"),CKEDITOR.fire("instanceReady",null,n)},null,null,1e4),n.on("destroy",function(){i&&(n.container.clearCustomData(),n.container.remove(),i.show()),n.element.clearCustomData(),delete n.element}),n},CKEDITOR.inlineAll=function(){var e,t,n;for(n in CKEDITOR.dtd.$editable)for(var i=CKEDITOR.document.getElementsByTag(n),o=0,r=i.count();o"+(e.title?'{voiceLabel}':"")+'<{outerEl} class="cke_inner cke_reset" role="presentation">{topHtml}<{outerEl} id="{contentId}" class="cke_contents cke_reset" role="presentation">{bottomHtml}');t=CKEDITOR.dom.element.createFromHtml(a.output({id:e.id,name:t,langDir:e.lang.dir,langCode:e.langCode,voiceLabel:e.title,topHtml:o?''+o+"":"",contentId:e.ui.spaceId("contents"),bottomHtml:r?''+r+"":"",outerEl:CKEDITOR.env.ie?"span":"div"}));i==CKEDITOR.ELEMENT_MODE_REPLACE?(n.hide(),t.insertAfter(n)):n.append(t),e.container=t,e.ui.contentsElement=e.ui.space("contents"),o&&e.ui.space("top").unselectable(),r&&e.ui.space("bottom").unselectable(),n=e.config.width,i=e.config.height,n&&t.setStyle("width",CKEDITOR.tools.cssLength(n)),i&&e.ui.space("contents").setStyle("height",CKEDITOR.tools.cssLength(i)),t.disableContextMenu(),CKEDITOR.env.webkit&&t.on("focus",function(){e.focus()}),e.fireOnce("uiReady")}CKEDITOR.replace=function(e,t){return i(e,t,null,CKEDITOR.ELEMENT_MODE_REPLACE)},CKEDITOR.appendTo=function(e,t,n){return i(e,t,n,CKEDITOR.ELEMENT_MODE_APPENDTO)},CKEDITOR.replaceAll=function(e){for(var t=document.getElementsByTagName("textarea"),n=0;n'+i+"");t.append(i),e.changeAttr("aria-describedby",n)}}})}),CKEDITOR.addCss(".cke_editable{cursor:text}.cke_editable img,.cke_editable input,.cke_editable textarea{cursor:default}"),h=CKEDITOR.dom.walker.whitespaces(!0),c=CKEDITOR.dom.walker.bookmark(!1,!0),d=CKEDITOR.dom.walker.empty(),f=CKEDITOR.dom.walker.bogus(),p=/(^|]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:]*>| |\u00A0| )?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi,g=function(){function R(e){return e.type==CKEDITOR.NODE_ELEMENT}function _(e,t){var n,i,o,r,a=[],s=t.range.startContainer;n=t.range.startPath();s=N[s.getName()];for(var l=0,c=e.getChildren(),d=c.count(),u=-1,h=-1,f=0,p=n.contains(N.$list);l ",t.document),t.insertNode(a),t.setStartAfter(a)),r=new CKEDITOR.dom.elementPath(t.startContainer),e.endPath=C=new CKEDITOR.dom.elementPath(t.endContainer),!t.collapsed){o=C.block||C.blockLimit;var c=t.getCommonAncestor();o&&!o.equals(c)&&!o.contains(c)&&t.checkEndOfBlock()&&e.zombies.push(o),t.deleteContents()}for(;(s=k(t))&&R(s)&&s.isBlockBoundary()&&r.contains(s);)t.moveToPosition(s,CKEDITOR.POSITION_BEFORE_END);for(S(t,e.blockLimit,r,C),a&&(t.setEndBefore(a),t.collapse(),a.remove()),(o=(a=t.startPath()).contains(w,!1,1))&&(t.splitElement(o),e.inlineStylesRoot=o,e.inlineStylesPeak=a.lastElement),(o=(a=t.createBookmark()).startNode.getPrevious(F))&&R(o)&&w(o)&&i.push(o),(o=a.startNode.getNext(F))&&R(o)&&w(o)&&i.push(o),o=a.startNode;(o=o.getParent())&&w(o);)i.push(o);if(t.moveToBookmark(a),a=n){if(a=e.range,"text"==e.type&&e.inlineStylesRoot){for(t=(s=e.inlineStylesPeak).getDocument().createText("{cke-peak}"),i=e.inlineStylesRoot.getParent();!s.equals(i);)t=t.appendTo(s.clone()),s=s.getParent();n=t.getOuterHtml().split("{cke-peak}").join(n)}if(s=e.blockLimit.getName(),/^\s+|\s+$/.test(n)&&"span"in CKEDITOR.dtd[s])n=(E=' ')+n+E;if(n=e.editor.dataProcessor.toHtml(n,{context:null,fixForBody:!1,protectedWhitespaces:!!E,dontFilter:e.dontFilter,filter:e.editor.activeFilter,enterMode:e.editor.activeEnterMode}),(s=a.document.createElement("body")).setHtml(n),E&&(s.getFirst().remove(),s.getLast().remove()),(E=a.startPath().block)&&(1!=E.getChildCount()||!E.getBogus()))e:{var d;if(1==s.getChildCount()&&R(d=s.getFirst())&&d.is(A)&&!d.hasAttribute("contenteditable")){for(a=0,i=(E=d.getElementsByTag("*")).count();ar&&o&&o.intersectsNode(n.$)){var a=[{node:i.anchorNode,offset:i.anchorOffset},{node:i.focusNode,offset:i.focusOffset}];i.anchorNode==n.$&&i.anchorOffset>r&&(a[0].offset-=r),i.focusNode==n.$&&i.focusOffset>r&&(a[1].offset-=r)}}n.setText(C(n.getText(),1)),a&&(i=(n=e.getDocument().$).getSelection(),(n=n.createRange()).setStart(a[0].node,a[0].offset),n.collapse(!0),i.removeAllRanges(),i.addRange(n),i.extend(a[1].node,a[1].offset))}}function C(e,t){return t?e.replace(n,function(e,t){return t?"\xa0":""}):e.replace(c,"")}function s(e,t){var n=t&&CKEDITOR.tools.htmlEncode(t)||" ";n=CKEDITOR.dom.element.createFromHtml('
    '+n+"
    ",e.document);e.fire("lockSnapshot"),e.editable().append(n);var i=e.getSelection(1),o=e.createRange(),r=i.root.on("selectionchange",function(e){e.cancel()},null,null,0);o.setStartAt(n,CKEDITOR.POSITION_AFTER_START),o.setEndAt(n,CKEDITOR.POSITION_BEFORE_END),i.selectRanges([o]),r.removeListener(),e.fire("unlockSnapshot"),e._.hiddenSelectionContainer=n}function v(o){var r={37:1,39:1,8:1,46:1};return function(e){var t=e.data.getKeystroke();if(r[t]){var n=o.getSelection().getRanges(),i=n[0];1==n.length&&i.collapsed&&(t=i[t<38?"getPreviousEditableNode":"getNextEditableNode"]())&&t.type==CKEDITOR.NODE_ELEMENT&&"false"==t.getAttribute("contenteditable")&&(o.getSelection().fake(t),e.data.preventDefault(),e.cancel())}}}function o(n){for(var i=0;i=t.getLength()?s.setStartAfter(t):s.setStartBefore(t)),e&&e.type==CKEDITOR.NODE_TEXT&&(a?s.setEndAfter(e):s.setEndBefore(e)),(t=new CKEDITOR.dom.walker(s)).evaluator=function(e){if(e.type==CKEDITOR.NODE_ELEMENT&&e.isReadOnly()){var t=o.clone();return o.setEndBefore(e),o.collapsed&&n.splice(i--,1),e.getPosition(s.endContainer)&CKEDITOR.POSITION_CONTAINS||(t.setStartAfter(e),t.collapsed||n.splice(i+1,0,t)),!0}return!1},t.next()}}return n}var b,y,t,I="function"!=typeof window.getSelection,l=1,c=CKEDITOR.tools.repeat("\u200b",7),n=new RegExp(c+"( )?","g"),u=CKEDITOR.dom.walker.invisible(1),O=function(){function e(n){return function(e){var t=e.editor.createRange();return t.moveToClosestEditablePosition(e.selected,n)&&e.editor.getSelection().selectRanges([t]),!1}}function t(o){return function(e){var t,n=e.editor,i=n.createRange();if(!n.readOnly)return(t=i.moveToClosestEditablePosition(e.selected,o))||(t=i.moveToClosestEditablePosition(e.selected,!o)),t&&n.getSelection().selectRanges([i]),n.fire("saveSnapshot"),e.selected.remove(),t||(i.moveToElementEditablePosition(n.editable()),n.getSelection().selectRanges([i])),n.fire("saveSnapshot"),!1}}var n=e(),i=e(1);return{37:n,38:n,39:i,40:i,8:t(),46:t(1)}}();CKEDITOR.on("instanceCreated",function(e){function t(){var e=g.getSelection();e&&e.removeAllRanges()}var g=e.editor;g.on("contentDom",function(){function e(){(o=new CKEDITOR.dom.selection(g.getSelection())).lock()}function n(){l.removeListener("mouseup",n),u.removeListener("mouseup",n);var e=CKEDITOR.document.$.selection,t=e.createRange();"None"!=e.type&&t.parentElement()&&t.parentElement().ownerDocument==s.$&&t.select()}function i(e){if(CKEDITOR.env.ie){var t=(e=e.getRanges()[0])?e.startContainer.getAscendant(function(e){return e.type==CKEDITOR.NODE_ELEMENT&&("false"==e.getAttribute("contenteditable")||"true"==e.getAttribute("contenteditable"))},!0):null;return e&&"false"==t.getAttribute("contenteditable")&&t}}var t,o,r,a,s=g.document,l=CKEDITOR.document,c=g.editable(),d=s.getBody(),u=s.getDocumentElement(),h=c.isInline();if((CKEDITOR.env.gecko&&c.attachListener(c,"focus",function(e){e.removeListener(),0!==t&&(e=g.getSelection().getNative())&&e.isCollapsed&&e.anchorNode==c.$&&((e=g.createRange()).moveToElementEditStart(c),e.select())},null,null,-2),c.attachListener(c,CKEDITOR.env.webkit?"DOMFocusIn":"focus",function(){t&&CKEDITOR.env.webkit&&(t=g._.previousActive&&g._.previousActive.equals(s.getActive()))&&null!=g._.previousScrollTop&&g._.previousScrollTop!=c.$.scrollTop&&(c.$.scrollTop=g._.previousScrollTop),g.unlockSelection(t),t=0},null,null,-1),c.attachListener(c,"mousedown",function(){t=0}),(CKEDITOR.env.ie||h)&&(I?c.attachListener(c,"beforedeactivate",e,null,null,-1):c.attachListener(g,"selectionCheck",e,null,null,-1),c.attachListener(c,CKEDITOR.env.webkit?"DOMFocusOut":"blur",function(){g.lockSelection(o),t=1},null,null,-1),c.attachListener(c,"mousedown",function(){t=0})),CKEDITOR.env.ie&&!h)&&(c.attachListener(c,"mousedown",function(e){2==e.data.$.button&&((e=g.document.getSelection())&&e.getType()!=CKEDITOR.SELECTION_NONE||(r=g.window.getScrollPosition()))}),c.attachListener(c,"mouseup",function(e){2==e.data.$.button&&r&&(g.document.$.documentElement.scrollLeft=r.x,g.document.$.documentElement.scrollTop=r.y),r=null}),"BackCompat"!=s.$.compatMode)){var f,p;if(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)u.on("mousedown",function(e){function t(e){if(e=e.data.$,f){var t=d.$.createTextRange();try{t.moveToPoint(e.clientX,e.clientY)}catch(i){}f.setEndPoint(p.compareEndPoints("StartToStart",t)<0?"EndToEnd":"StartToStart",t),f.select()}}function n(){u.removeListener("mousemove",t),l.removeListener("mouseup",n),u.removeListener("mouseup",n),f.select()}if((e=e.data).getTarget().is("html")&&e.$.y]*>)[ \t\r\n]*/gi,"$1")).replace(/([ \t\n\r]+| )/g," ")).replace(/]*>/gi,"\n"),CKEDITOR.env.ie){var s=e.getDocument().createElement("div");s.append(r),r.$.outerHTML="
    "+a+"
    ",r.copyAttributes(s.getFirst()),r=s.getFirst().remove()}else r.setHtml(a);t=r}else a?t=d(n?[e.getHtml()]:l(e),t):e.moveChildren(t);(t.replace(e),o)?(i=(n=t).getPrevious(I))&&i.type==CKEDITOR.NODE_ELEMENT&&i.is("pre")&&(o=c(i.getHtml(),/\n$/,"")+"\n\n"+c(n.getHtml(),/^\n/,""),CKEDITOR.env.ie?n.$.outerHTML="
    "+o+"
    ":n.setHtml(o),i.remove()):n&&u(t)}function l(e){var n=[];return c(e.getOuterHtml(),/(\S\s*)\n(?:\s|(]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,function(e,t,n){return t+"
    "+n+"
    "}).replace(/([\s\S]*?)<\/pre>/gi,function(e,t){n.push(t)}),n}function c(e,t,n){var i="",o="";return e=e.replace(/(^]+data-cke-bookmark.*?\/span>)|(]+data-cke-bookmark.*?\/span>$)/gi,function(e,t,n){return t&&(i=t),n&&(o=n),""}),i+e.replace(t,n)+o}function d(e,t){var n;1")).replace(/[ \t]{2,}/g,function(e){return CKEDITOR.tools.repeat(" ",e.length-1)+" "});if(n){var r=t.clone();r.setHtml(o),n.append(r)}else t.setHtml(o)}return n||t}function h(e,t){var n,i=(o=this._.definition).attributes,o=o.styles,r=g(this)[e.getName()],a=CKEDITOR.tools.isEmpty(i)&&CKEDITOR.tools.isEmpty(o);for(n in i)("class"!=n&&!this._.definition.fullMatch||e.getAttribute(n)==m(n,i[n]))&&(t&&"data-"==n.slice(0,5)||(a=e.hasAttribute(n),e.removeAttribute(n)));for(var s in o)this._.definition.fullMatch&&e.getStyle(s)!=m(s,o[s],!0)||(a=a||!!e.getStyle(s),e.removeStyle(s));f(e,r,C[e.getName()]),a&&(this._.definition.alwaysRemoveElement?u(e,1):!CKEDITOR.dtd.$block[e.getName()]||this._.enterMode==CKEDITOR.ENTER_BR&&!e.hasAttributes()?u(e):e.renameNode(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))}function w(e){for(var t,n=g(this),i=e.getElementsByTag(this.element),o=i.count();0<=--o;)(t=i.getItem(o)).isReadOnly()||h.call(this,t,!0);for(var r in n)if(r!=this.element)for(o=(i=e.getElementsByTag(r)).count()-1;0<=o;o--)(t=i.getItem(o)).isReadOnly()||f(t,n[r])}function f(e,t,n){if(t=t&&t.attributes)for(var i=0;i",e||t.name,""),n.join("")},getDefinition:function(){return this._.definition}},CKEDITOR.style.getStyleText=function(e){if(t=e._ST)return t;var t=e.styles,n=e.attributes&&e.attributes.style||"",i="";for(var o in n.length&&(n=n.replace(b,";")),t){var r=t[o],a=(o+":"+r).replace(b,";");"inherit"==r?i+=a:n+=a}return n.length&&(n=CKEDITOR.tools.normalizeCssText(n,!0)),e._ST=n+i},CKEDITOR.style.customHandlers={},CKEDITOR.style.addCustomHandler=function(e){var t=function(e){this._={definition:e},this.setup&&this.setup(e)};return t.prototype=CKEDITOR.tools.extend(CKEDITOR.tools.prototypedCopy(CKEDITOR.style.prototype),{assignedTo:CKEDITOR.STYLE_OBJECT},e,!0),this.customHandlers[e.type]=t};var N=CKEDITOR.POSITION_PRECEDING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED,A=CKEDITOR.POSITION_FOLLOWING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED}(),CKEDITOR.styleCommand=function(e,t){this.requiredContent=this.allowedContent=this.style=e,CKEDITOR.tools.extend(this,t,!0)},CKEDITOR.styleCommand.prototype.exec=function(e){e.focus(),this.state==CKEDITOR.TRISTATE_OFF?e.applyStyle(this.style):this.state==CKEDITOR.TRISTATE_ON&&e.removeStyle(this.style)},CKEDITOR.stylesSet=new CKEDITOR.resourceManager("","stylesSet"),CKEDITOR.addStylesSet=CKEDITOR.tools.bind(CKEDITOR.stylesSet.add,CKEDITOR.stylesSet),CKEDITOR.loadStylesSet=function(e,t,n){CKEDITOR.stylesSet.addExternal(e,t,""),CKEDITOR.stylesSet.load(e,n)},CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{attachStyleStateChange:function(e,t){var o=this._.styleStateChangeCallbacks;o||(o=this._.styleStateChangeCallbacks=[],this.on("selectionChange",function(e){for(var t=0;t"}}),function(){var e,d={},u={};for(e in CKEDITOR.dtd.$blockLimit)e in CKEDITOR.dtd.$list||(d[e]=1);for(e in CKEDITOR.dtd.$block)e in CKEDITOR.dtd.$blockLimit||e in CKEDITOR.dtd.$empty||(u[e]=1);CKEDITOR.dom.elementPath=function(e,t){var n,i=null,o=null,r=[],a=e;t=t||e.getDocument().getBody(),a||(a=t);do{if(a.type==CKEDITOR.NODE_ELEMENT){if(r.push(a),!this.lastElement&&((this.lastElement=a).is(CKEDITOR.dtd.$object)||"false"==a.getAttribute("contenteditable")))continue;if(a.equals(t))break;if(!o&&(n=a.getName(),"true"==a.getAttribute("contenteditable")?o=a:!i&&u[n]&&(i=a),d[n])){if(n=!i&&"div"==n){e:{for(var s=0,l=(n=a.getChildren()).count();s',CKEDITOR.document);e.appendTo(CKEDITOR.document.getHead());try{var t=e.getComputedStyle("border-top-color"),n=e.getComputedStyle("border-right-color");CKEDITOR.env.hc=!(!t||t!=n)}catch(i){CKEDITOR.env.hc=!1}e.remove()}if(CKEDITOR.env.hc&&(CKEDITOR.env.cssClass+=" cke_hc"),CKEDITOR.document.appendStyleText(".cke{visibility:hidden;}"),CKEDITOR.status="loaded",CKEDITOR.fireOnce("loaded"),e=CKEDITOR._.pending)for(delete CKEDITOR._.pending,t=0;t",i.label,"",'"):(t={type:"hbox",widths:i.widths,padding:0,children:[{type:"html",html:'"},{type:"html",html:'"+o.call(this,n,i)+""}]},CKEDITOR.dialog._.uiElementBuilders.hbox.build(n,t,e)),e.join("")})}},textInput:function(t,n,e){if(!(arguments.length<3)){d.call(this,n);var i=this._.inputId=CKEDITOR.tools.getNextId()+"_textInput",o={"class":"cke_dialog_ui_input_"+n.type,id:i,type:n.type};n.validate&&(this.validate=n.validate),n.maxLength&&(o.maxlength=n.maxLength),n.size&&(o.size=n.size),n.inputStyle&&(o.style=n.inputStyle);var r=this,a=!1;t.on("load",function(){r.getInputElement().on("keydown",function(e){13==e.data.getKeystroke()&&(a=!0)}),r.getInputElement().on("keyup",function(e){13==e.data.getKeystroke()&&a&&(t.getButton("ok")&&setTimeout(function(){t.getButton("ok").click()},0),a=!1),r.bidi&&u.call(r,e)},null,null,1e3)}),CKEDITOR.ui.dialog.labeledElement.call(this,t,n,e,function(){var e=['"),e.join("")})}},textarea:function(e,t,n){if(!(arguments.length<3)){d.call(this,t);var i=this,o=this._.inputId=CKEDITOR.tools.getNextId()+"_textarea",r={};t.validate&&(this.validate=t.validate),r.rows=t.rows||5,r.cols=t.cols||20,r["class"]="cke_dialog_ui_input_textarea "+(t["class"]||""),"undefined"!=typeof t.inputStyle&&(r.style=t.inputStyle),t.dir&&(r.dir=t.dir),i.bidi&&e.on("load",function(){i.getInputElement().on("keyup",u)},i),CKEDITOR.ui.dialog.labeledElement.call(this,e,t,n,function(){r["aria-labelledby"]=this._.labelId,this._.required&&(r["aria-required"]=this._.required);var e,t=['"),t.join("")})}},checkbox:function(o,r,e){if(!(arguments.length<3)){var a=d.call(this,r,{"default":!!r["default"]});r.validate&&(this.validate=r.validate),CKEDITOR.ui.dialog.uiElement.call(this,o,r,e,"span",null,null,function(){var e=CKEDITOR.tools.extend({},r,{id:r.id?r.id+"_checkbox":CKEDITOR.tools.getNextId()+"_checkbox"},!0),t=[],n=CKEDITOR.tools.getNextId()+"_label",i={"class":"cke_dialog_ui_checkbox_input",type:"checkbox","aria-labelledby":n};return g(e),r["default"]&&(i.checked="checked"),"undefined"!=typeof e.inputStyle&&(e.style=e.inputStyle),a.checkbox=new CKEDITOR.ui.dialog.uiElement(o,e,t,"input",null,i),t.push(' "),t.join("")})}},radio:function(u,h,e){if(!(arguments.length<3)){d.call(this,h),this._["default"]||(this._["default"]=this._.initValue=h.items[0][1]),h.validate&&(this.validate=h.validate);var f=[],p=this;h.role="radiogroup",h.includeLabel=!0,CKEDITOR.ui.dialog.labeledElement.call(this,u,h,e,function(){for(var e=[],t=[],n=(h.id?h.id:CKEDITOR.tools.getNextId())+"_radio",i=0;i'+CKEDITOR.tools.htmlEncode(t.label)+"")}},select:function(a,s,e){if(!(arguments.length<3)){var l=d.call(this,s);s.validate&&(this.validate=s.validate),l.inputId=CKEDITOR.tools.getNextId()+"_select",CKEDITOR.ui.dialog.labeledElement.call(this,a,s,e,function(){var e=CKEDITOR.tools.extend({},s,{id:s.id?s.id+"_select":CKEDITOR.tools.getNextId()+"_select"},!0),t=[],n=[],i={id:l.inputId,"class":"cke_dialog_ui_input_select","aria-labelledby":this._.labelId};t.push('"),t.join("")})}},file:function(e,t,n){if(!(arguments.length<3)){void 0===t["default"]&&(t["default"]="");var i=CKEDITOR.tools.extend(d.call(this,t),{definition:t,buttons:[]});t.validate&&(this.validate=t.validate),e.on("load",function(){CKEDITOR.document.getById(i.frameId).getParent().addClass("cke_dialog_ui_input_file")}),CKEDITOR.ui.dialog.labeledElement.call(this,e,t,n,function(){i.frameId=CKEDITOR.tools.getNextId()+"_fileInput";var e=[''),e.join("")})}},fileButton:function(n,i,e){var t=this;if(!(arguments.length<3)){d.call(this,i),i.validate&&(this.validate=i.validate);var o=CKEDITOR.tools.extend({},i),r=o.onClick;o.className=(o.className?o.className+" ":"")+"cke_dialog_ui_button",o.onClick=function(e){var t=i["for"];!1!==(e=!!r&&r.call(this,e))&&("xhr"!==e&&n.getContentElement(t[0],t[1]).submit(),this.disable())},n.on("load",function(){n.getContentElement(i["for"][0],i["for"][1])._.buttons.push(t)}),CKEDITOR.ui.dialog.button.call(this,n,o,e)}},html:(s=/^\s*<[\w:]+\s+([^>]*)?>/,l=/^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/,c=/\/$/,function(e,t,n){if(!(arguments.length<3)){var i=[],o=t.html;"<"!=o.charAt(0)&&(o=""+o+"");var r=t.focus;if(r){var a=this.focus;this.focus=function(){("function"==typeof r?r:a).call(this),this.fire("focus")},t.isFocusable&&(this.isFocusable=this.isFocusable),this.keyboardFocusable=!0}CKEDITOR.ui.dialog.uiElement.call(this,e,t,i,"span",null,null,""),i=i.join("").match(s),o=o.match(l)||["","",""],c.test(o[1])&&(o[1]=o[1].slice(0,-1),o[2]="/"+o[2]),n.push([o[1]," ",i[1]||"",o[2]].join(""))}}),fieldset:function(e,t,n,i,o){var r=o.label;this._={children:t},CKEDITOR.ui.dialog.uiElement.call(this,e,o,i,"fieldset",null,null,function(){var e=[];r&&e.push(""+r+"");for(var t=0;t','
    "].join("")),i.$.close(),e=0;e').appendTo(n.getParent())),i.unselectable(),o.unselectable(),{element:t,parts:{dialog:t.getChild(0),title:i,close:o,tabs:n.getChild(2),contents:n.getChild([3,0,0,0]),footer:n.getChild([3,0,1,0])}}}function i(e,t,n){this.element=t,this.focusIndex=n,this.tabIndex=0,this.isFocusable=function(){return!t.getAttribute("disabled")&&t.isVisible()},this.focus=function(){e._.currentFocusIndex=this.focusIndex,this.element.focus()},t.on("keydown",function(e){e.data.getKeystroke()in{32:1,13:1}&&this.fire("click")}),t.on("focus",function(){this.fire("mouseover")}),t.on("blur",function(){this.fire("mouseout")})}function l(e){function t(){e.layout()}var n=CKEDITOR.document.getWindow();n.on("resize",t),e.on("hide",function(){n.removeListener("resize",t)})}function a(e,t){this._={dialog:e},CKEDITOR.tools.extend(this,t)}function y(s){function n(e){var t=s.getSize(),n=CKEDITOR.document.getWindow().getViewPaneSize(),i=e.data.$.screenX,o=e.data.$.screenY,r=i-l.x,a=o-l.y;l={x:i,y:o},c.x+=r,c.y+=a,s.move(c.x+h[3]n.width-t.width-u?n.width-t.width+("rtl"==d.lang.dir?0:h[1]):c.x,c.y+h[0]n.height-t.height-u?n.height-t.height+h[2]:c.y,1),e.data.preventDefault()}function i(){if(CKEDITOR.document.removeListener("mousemove",n),CKEDITOR.document.removeListener("mouseup",i),CKEDITOR.env.ie6Compat){var e=R.getChild(0).getFrameDocument();e.removeListener("mousemove",n),e.removeListener("mouseup",i)}}var l=null,c=null,d=s.getParentEditor(),u=d.config.dialog_magnetDistance,h=CKEDITOR.skin.margins||[0,0,0,0];void 0===u&&(u=20),s.parts.title.on("mousedown",function(e){if(l={x:e.data.$.screenX,y:e.data.$.screenY},CKEDITOR.document.on("mousemove",n),CKEDITOR.document.on("mouseup",i),c=s.getPosition(),CKEDITOR.env.ie6Compat){var t=R.getChild(0).getFrameDocument();t.on("mousemove",n),t.on("mouseup",i)}e.data.preventDefault()},s)}function I(l){function n(e){var t="rtl"==m.lang.dir,n=g.width,i=g.height,o=n+(e.data.$.screenX-p.x)*(t?-1:1)*(l._.moved?1:2),r=i+(e.data.$.screenY-p.y)*(l._.moved?1:2),a=l._.element.getFirst(),s=(a=t&&a.getComputedStyle("right"),l.getPosition());s.y+r>f.height&&(r=f.height-s.y),(t?a:s.x)+o>f.width&&(o=f.width-(t?a:s.x)),d!=CKEDITOR.DIALOG_RESIZE_WIDTH&&d!=CKEDITOR.DIALOG_RESIZE_BOTH||(n=Math.max(c.minWidth||0,o-u)),d!=CKEDITOR.DIALOG_RESIZE_HEIGHT&&d!=CKEDITOR.DIALOG_RESIZE_BOTH||(i=Math.max(c.minHeight||0,r-h)),l.resize(n,i),l._.moved||l.layout(),e.data.preventDefault()}function i(){if(CKEDITOR.document.removeListener("mouseup",i),CKEDITOR.document.removeListener("mousemove",n),o&&(o.remove(),o=null),CKEDITOR.env.ie6Compat){var e=R.getChild(0).getFrameDocument();e.removeListener("mouseup",i),e.removeListener("mousemove",n)}}var c=l.definition,d=c.resizable;if(d!=CKEDITOR.DIALOG_RESIZE_NONE){var u,h,f,p,g,o,m=l.getParentEditor(),t=CKEDITOR.tools.addFunction(function(e){g=l.getSize();var t=l.parts.contents;t.$.getElementsByTagName("iframe").length&&(o=CKEDITOR.dom.element.createFromHtml('
    '),t.append(o)),h=g.height-l.parts.contents.getSize("height",!(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.quirks)),u=g.width-l.parts.contents.getSize("width",1),p={x:e.screenX,y:e.screenY},f=CKEDITOR.document.getWindow().getViewPaneSize(),CKEDITOR.document.on("mousemove",n),CKEDITOR.document.on("mouseup",i),CKEDITOR.env.ie6Compat&&((t=R.getChild(0).getFrameDocument()).on("mousemove",n),t.on("mouseup",i)),e.preventDefault&&e.preventDefault()});l.on("load",function(){var e="";d==CKEDITOR.DIALOG_RESIZE_WIDTH?e=" cke_resizer_horizontal":d==CKEDITOR.DIALOG_RESIZE_HEIGHT&&(e=" cke_resizer_vertical"),e=CKEDITOR.dom.element.createFromHtml('
    '+("ltr"==m.lang.dir?"\u25e2":"\u25e3")+"
    "),l.parts.footer.append(e,1)}),m.on("destroy",function(){CKEDITOR.tools.removeFunction(t)})}}function c(e){e.data.preventDefault(1)}function d(e){var n=CKEDITOR.document.getWindow(),t=e.config,i=CKEDITOR.skinName||e.config.skin,o=t.dialog_backgroundCoverColor||("moono-lisa"==i?"black":"white"),r=(i=t.dialog_backgroundCoverOpacity,t.baseFloatZIndex),a=(t=CKEDITOR.tools.genKey(o,i,r),N[t]);a?a.show():(r=['
    '],CKEDITOR.env.ie6Compat&&(o="",r.push('')),r.push("
    "),(a=CKEDITOR.dom.element.createFromHtml(r.join(""))).setOpacity(void 0!==i?i:.5),a.on("keydown",c),a.on("keypress",c),a.on("keyup",c),a.appendTo(CKEDITOR.document.getBody()),N[t]=a),e.focusManager.add(a),R=a;var s=function(){var e=n.getScrollPosition(),t=CKEDITOR.dialog._.currentTop;if(a.setStyles({left:e.x+"px",top:e.y+"px"}),t)for(;e=t.getPosition(),t.move(e.x,e.y),t=t._.parentDialog;);};if(m=e=function(){var e=n.getViewPaneSize();a.setStyles({width:e.width+"px",height:e.height+"px"})},n.on("resize",e),e(),CKEDITOR.env.mac&&CKEDITOR.env.webkit||a.focus(),CKEDITOR.env.ie6Compat){var l=function(){s(),arguments.callee.prevScrollHandler.apply(this,arguments)};n.$.setTimeout(function(){l.prevScrollHandler=window.onscroll||function(){},window.onscroll=l},0),s()}}function o(e){R&&(e.focusManager.remove(R),e=CKEDITOR.document.getWindow(),R.hide(),e.removeListener("resize",m),CKEDITOR.env.ie6Compat&&e.$.setTimeout(function(){window.onscroll=window.onscroll&&window.onscroll.prevScrollHandler||null},0),m=null)}var e,n,s,u=CKEDITOR.tools.cssLength,h='';CKEDITOR.dialog=function(o,e){function t(){var e=p._.focusList;e.sort(function(e,t){return e.tabIndex!=t.tabIndex?t.tabIndex-e.tabIndex:e.focusIndex-t.focusIndex});for(var t=e.length,n=0;nn.height||t.width+(0n.width?e.setStyle("position","absolute"):e.setStyle("position","fixed")),this.move(this._.moved?this._.position.x:i,this._.moved?this._.position.y:o)},foreach:function(e){for(var t in this._.contents)for(var n in this._.contents[t])e.call(this,this._.contents[t][n]);return this},reset:(e=function(e){e.reset&&e.reset(1)},function(){return this.foreach(e),this}),setupContent:function(){var t=arguments;this.foreach(function(e){e.setup&&e.setup.apply(e,t)})},commitContent:function(){var t=arguments;this.foreach(function(e){CKEDITOR.env.ie&&this._.currentFocusIndex==e.focusIndex&&e.getInputElement().$.blur(),e.commit&&e.commit.apply(e,t)})},hide:function(){if(this.parts.dialog.isVisible()){this.fire("hide",{}),this._.editor.fire("dialogHide",this),this.selectPage(this._.tabIdList[0]);var e=this._.element;for(e.setStyle("display","none"),this.parts.dialog.setStyle("visibility","hidden"),$(this);CKEDITOR.dialog._.currentTop!=this;)CKEDITOR.dialog._.currentTop.hide();if(this._.parentDialog){var t=this._.parentDialog.getElement().getFirst();t.setStyle("z-index",parseInt(t.$.style.zIndex,10)+Math.floor(this._.editor.config.baseFloatZIndex/2))}else o(this._.editor);if(CKEDITOR.dialog._.currentTop=this._.parentDialog)CKEDITOR.dialog._.currentZIndex-=10;else{CKEDITOR.dialog._.currentZIndex=null,e.removeListener("keydown",L),e.removeListener("keyup",F);var n=this._.editor;n.focus(),setTimeout(function(){n.focusManager.unlock(),CKEDITOR.env.iOS&&n.window.focus()},0)}delete this._.parentDialog,this.foreach(function(e){e.resetInitValue&&e.resetInitValue()}),this.setState(CKEDITOR.DIALOG_STATE_IDLE)}},addPage:function(e){if(!e.requiredContent||this._.editor.filter.check(e.requiredContent)){for(var t=[],n=e.label?' title="'+CKEDITOR.tools.htmlEncode(e.label)+'"':"",i=CKEDITOR.dialog._.uiElementBuilders.vbox.build(this,{type:"vbox",className:"cke_dialog_page_contents",children:e.elements,expand:!!e.expand,padding:e.padding,style:e.style||"width: 100%;"},t),o=this._.contents[e.id]={},r=i.getChild(),a=0;i=r.shift();)i.notAllowed||"hbox"==i.type||"vbox"==i.type||a++,"function"==typeof(o[i.id]=i).getChild&&r.push.apply(r,i.getChild());a||(e.hidden=!0),(t=CKEDITOR.dom.element.createFromHtml(t.join(""))).setAttribute("role","tabpanel"),i=CKEDITOR.env,o="cke_"+e.id+"_"+CKEDITOR.tools.getNextNumber(),n=CKEDITOR.dom.element.createFromHtml(['"].join("")),t.setAttribute("aria-labelledby",o),this._.tabs[e.id]=[n,t],this._.tabIdList.push(e.id),!e.hidden&&this._.pageCount++,this._.lastTab=n,this.updateStyle(),t.setAttribute("name",e.id),t.appendTo(this.parts.contents),n.unselectable(),this.parts.tabs.append(n),e.accessKey&&(P(this,this,"CTRL+"+e.accessKey,M,B),this._.accessKeyMap["CTRL+"+e.accessKey]=e.id)}},selectPage:function(e){if(this._.currentTabId!=e&&!this._.tabs[e][0].hasClass("cke_dialog_tab_disabled")&&!1!==this.fire("selectPage",{page:e,currentPage:this._.currentTabId})){for(var t in this._.tabs){var n=this._.tabs[t][0],i=this._.tabs[t][1];t!=e&&(n.removeClass("cke_dialog_tab_selected"),i.hide()),i.setAttribute("aria-hidden",t!=e)}var o=this._.tabs[e];o[0].addClass("cke_dialog_tab_selected"),CKEDITOR.env.ie6Compat||CKEDITOR.env.ie7Compat?(r(o[1]),o[1].show(),setTimeout(function(){r(o[1],1)},0)):o[1].show(),this._.currentTabId=e,this._.currentTabIndex=CKEDITOR.tools.indexOf(this._.tabIdList,e)}},updateStyle:function(){this.parts.dialog[(1===this._.pageCount?"add":"remove")+"Class"]("cke_single_page")},hidePage:function(e){var t=this._.tabs[e]&&this._.tabs[e][0];t&&1!=this._.pageCount&&t.isVisible()&&(e==this._.currentTabId&&this.selectPage(E.call(this)),t.hide(),this._.pageCount--,this.updateStyle())},showPage:function(e){(e=this._.tabs[e]&&this._.tabs[e][0])&&(e.show(),this._.pageCount++,this.updateStyle())},getElement:function(){return this._.element},getName:function(){return this._.name},getContentElement:function(e,t){var n=this._.contents[e];return n&&n[t]},getValueOf:function(e,t){return this.getContentElement(e,t).getValue()},setValueOf:function(e,t,n){return this.getContentElement(e,t).setValue(n)},getButton:function(e){return this._.buttons[e]},click:function(e){return this._.buttons[e].click()},disableButton:function(e){return this._.buttons[e].disable()},enableButton:function(e){return this._.buttons[e].enable()},getPageCount:function(){return this._.pageCount},getParentEditor:function(){return this._.editor},getSelectedElement:function(){return this.getParentEditor().getSelection().getSelectedElement()},addFocusable:function(e,t){if(void 0===t)t=this._.focusList.length,this._.focusList.push(new i(this,e,t));else{this._.focusList.splice(t,0,new i(this,e,t));for(var n=t+1;n",u,""),e.push(l.join("")),(this._||(this._={})).dialog=n,"boolean"==typeof i.isChanged&&(this.isChanged=function(){return i.isChanged}),"function"==typeof i.isChanged&&(this.isChanged=i.isChanged),"function"==typeof i.setValue&&(this.setValue=CKEDITOR.tools.override(this.setValue,function(t){return function(e){t.call(this,i.setValue.call(this,e))}})),"function"==typeof i.getValue&&(this.getValue=CKEDITOR.tools.override(this.getValue,function(e){return function(){return i.getValue.call(this,e.call(this))}})),CKEDITOR.event.implementOn(this),this.registerEvents(i),this.accessKeyUp&&this.accessKeyDown&&i.accessKey&&P(this,n,"CTRL+"+i.accessKey);var g=this;n.on("load",function(){var e=g.getInputElement();if(e){var t=g.type in{checkbox:1,ratio:1}&&CKEDITOR.env.ie&&CKEDITOR.env.version<8?"cke_dialog_ui_focused":"";e.on("focus",function(){n._.tabBarMode=!1,n._.hasFocus=!0,g.fire("focus"),t&&this.addClass(t)}),e.on("blur",function(){g.fire("blur"),t&&this.removeClass(t)})}}),CKEDITOR.tools.extend(this,i),this.keyboardFocusable&&(this.tabIndex=i.tabIndex||0,this.focusIndex=n._.focusList.push(this)-1,this.on("focus",function(){n._.currentFocusIndex=g.focusIndex}))}},hbox:function(e,t,i,n,o){if(!(arguments.length<4)){this._||(this._={});var r,a=this._.children=t,s=o&&o.widths||null,l=o&&o.height||null,c={role:"presentation"};o&&o.align&&(c.align=o.align),CKEDITOR.ui.dialog.uiElement.call(this,e,o||{type:"hbox"},n,"table",{},c,function(){var e=[''];for(r=0;r",i[r],"")}return e.push(""),e.join("")})}},vbox:function(i,e,o,t,r){if(!(arguments.length<3)){this._||(this._={});var a=this._.children=e,s=r&&r.width||null,l=r&&r.heights||null;CKEDITOR.ui.dialog.uiElement.call(this,i,r||{type:"vbox"},t,"div",null,{role:"presentation"},function(){var e=['");for(var t=0;t")}return e.push("
    "),e.join("")})}}},CKEDITOR.ui.dialog.uiElement.prototype={getElement:function(){return CKEDITOR.document.getById(this.domId)},getInputElement:function(){return this.getElement()},getDialog:function(){return this._.dialog},setValue:function(e,t){return this.getInputElement().setValue(e),!t&&this.fire("change",{value:e}),this},getValue:function(){return this.getInputElement().getValue()},isChanged:function(){return!1},selectParentTab:function(){for(var e=this.getInputElement();(e=e.getParent())&&-1==e.$.className.search("cke_dialog_page_contents"););return e&&(e=e.getAttribute("name"),this._.dialog._.currentTabId!=e&&this._.dialog.selectPage(e)),this},focus:function(){return this.selectParentTab().getInputElement().focus(),this},registerEvents:function(e){var t,n,i=/^on([A-Z]\w+)/,o=function(e,t,n,i){t.on("load",function(){e.getInputElement().on(n,i,e)})};for(n in e)(t=n.match(i))&&(this.eventProcessors[n]?this.eventProcessors[n].call(this,this._.dialog,e[n]):o(this,this._.dialog,t[1].toLowerCase(),e[n]));return this},eventProcessors:{onLoad:function(e,t){e.on("load",t,this)},onShow:function(e,t){e.on("show",t,this)},onHide:function(e,t){e.on("hide",t,this)}},accessKeyDown:function(){this.focus()},accessKeyUp:function(){},disable:function(){var e=this.getElement();this.getInputElement().setAttribute("disabled","true"),e.addClass("cke_disabled")},enable:function(){var e=this.getElement();this.getInputElement().removeAttribute("disabled"),e.removeClass("cke_disabled")},isEnabled:function(){return!this.getElement().hasClass("cke_disabled")},isVisible:function(){return this.getInputElement().isVisible()},isFocusable:function(){return!(!this.isEnabled()||!this.isVisible())}},CKEDITOR.ui.dialog.hbox.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{getChild:function(e){return arguments.length<1?this._.children.concat():(e.splice||(e=[e]),e.length<2?this._.children[e[0]]:this._.children[e[0]]&&this._.children[e[0]].getChild?this._.children[e[0]].getChild(e.slice(1,e.length)):null)}},!0),CKEDITOR.ui.dialog.vbox.prototype=new CKEDITOR.ui.dialog.hbox,t={build:function(e,t,n){for(var i,o=t.children,r=[],a=[],s=0;sX'),e.append(t),t.on("click",function(){n.editor.focus(),n.hide()}),e},_getClass:function(){return"progress"==this.type?"cke_notification_info":"cke_notification_"+this.type},_createProgressElement:function(){var e=new CKEDITOR.dom.element("span");return e.addClass("cke_notification_progress"),e.setStyle("width",this._getPercentageProgress()),e},_getPercentageProgress:function(){return Math.round(100*(this.progress||0))+"%"},_hideAfterTimeout:function(){var e,t=this;this._hideTimeoutId&&clearTimeout(this._hideTimeoutId),"number"==typeof this.duration?e=this.duration:"info"!=this.type&&"success"!=this.type||(e="number"==typeof this.editor.config.notification_duration?this.editor.config.notification_duration:5e3),e&&(t._hideTimeoutId=setTimeout(function(){t.hide()},e))}},t.prototype={add:function(e){this.notifications.push(e),this.element.append(e.element),1==this.element.getChildCount()&&(CKEDITOR.document.getBody().append(this.element),this._attachListeners()),this._layout()},remove:function(e){var t=CKEDITOR.tools.indexOf(this.notifications,e);t<0||(this.notifications.splice(t,1),e.element.remove(),this.element.getChildCount()||(this._removeListeners(),this.element.remove()))},_createElement:function(){var e=this.editor,t=e.config,n=new CKEDITOR.dom.element("div");return n.addClass("cke_notifications_area"),n.setAttribute("id","cke_notifications_area_"+e.name),n.setStyle("z-index",t.baseFloatZIndex-2),n},_attachListeners:function(){var e=CKEDITOR.document.getWindow(),t=this.editor;e.on("scroll",this._uiBuffer.input),e.on("resize",this._uiBuffer.input),t.on("change",this._changeBuffer.input),t.on("floatingSpaceLayout",this._layout,this,null,20),t.on("blur",this._layout,this,null,20)},_removeListeners:function(){var e=CKEDITOR.document.getWindow(),t=this.editor;e.removeListener("scroll",this._uiBuffer.input),e.removeListener("resize",this._uiBuffer.input),t.removeListener("change",this._changeBuffer.input),t.removeListener("floatingSpaceLayout",this._layout),t.removeListener("blur",this._layout)},_layout:function(){function e(){o.setStyle("left",g(m+a.width-c-d))}var t,n,i,o=this.element,r=this.editor,a=r.ui.contentsElement.getClientRect(),s=r.ui.contentsElement.getDocumentPosition(),l=o.getClientRect(),c=this._notificationWidth,d=this._notificationMargin,u=(i=CKEDITOR.document.getWindow()).getScrollPosition(),h=i.getViewPaneSize(),f=CKEDITOR.document.getBody(),p=f.getDocumentPosition(),g=CKEDITOR.tools.cssLength;c&&d||(i=this.element.getChild(0),c=this._notificationWidth=i.getClientRect().width,d=this._notificationMargin=parseInt(i.getComputedStyle("margin-left"),10)+parseInt(i.getComputedStyle("margin-right"),10)),r.toolbar&&(n=(t=r.ui.space("top")).getClientRect()),t&&t.isVisible()&&n.bottom>a.top&&n.bottomu.y?o.setStyles({position:"fixed",top:0}):o.setStyles({position:"absolute",top:g(s.y+a.height-l.height)});var m="fixed"==o.getStyle("position")?a.left:"static"!=f.getComputedStyle("position")?s.x-p.x:s.x;a.widthu.x+h.width?e():o.setStyle("left",g(m)):s.x+c+d>u.x+h.width?o.setStyle("left",g(m)):s.x+a.width/2+c/2+d>u.x+h.width?o.setStyle("left",g(m-s.x+u.x+h.width-c-d)):a.left+a.width-c-d<0?e():a.left+a.width/2-c/2<0?o.setStyle("left",g(m-s.x+u.x)):o.setStyle("left",g(m+a.width/2-c/2-d/2))}},CKEDITOR.plugins.notification=e}(),function(){var e=' {label}{ariaShortcut}{arrowHtml}';var T=CKEDITOR.addTemplate("buttonArrow",''+(CKEDITOR.env.hc?"▼":"")+""),C=CKEDITOR.addTemplate("button",e);CKEDITOR.plugins.add("button",{beforeInit:function(e){e.ui.addHandler(CKEDITOR.UI_BUTTON,CKEDITOR.ui.button.handler)}}),CKEDITOR.UI_BUTTON="button",CKEDITOR.ui.button=function(t){CKEDITOR.tools.extend(this,t,{title:t.label,click:t.click||function(e){e.execCommand(t.command)}}),this._={}},CKEDITOR.ui.button.handler={create:function(e){return new CKEDITOR.ui.button(e)}},CKEDITOR.ui.button.prototype={render:function(i,e){function t(){var e=i.mode;e&&(e=this.modes[e]?void 0!==a[e]?a[e]:CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,e=i.readOnly&&!this.readOnly?CKEDITOR.TRISTATE_DISABLED:e,this.setState(e),this.refresh&&this.refresh())}var n,o,r,a=null,s=CKEDITOR.env,l=this._.id=CKEDITOR.tools.getNextId(),c="",d=this.command;this._.editor=i;var u,h={id:l,button:this,editor:i,focus:function(){CKEDITOR.document.getById(l).focus()},execute:function(){this.button.click(i)},attach:function(e){this.button.attach(e)}},f=CKEDITOR.tools.addFunction(function(e){if(h.onkey)return e=new CKEDITOR.dom.event(e),!1!==h.onkey(h,e.getKeystroke())}),p=CKEDITOR.tools.addFunction(function(e){var t;return h.onfocus&&(t=!1!==h.onfocus(h,new CKEDITOR.dom.event(e))),t}),g=0;h.clickFn=n=CKEDITOR.tools.addFunction(function(){g&&(i.unlockSelection(1),g=0),h.execute(),s.iOS&&i.focus()}),this.modes?(a={},i.on("beforeModeUnload",function(){i.mode&&this._.state!=CKEDITOR.TRISTATE_DISABLED&&(a[i.mode]=this._.state)},this),i.on("activeFilterChange",t,this),i.on("mode",t,this),!this.readOnly&&i.on("readOnly",t,this)):d&&(d=i.getCommand(d))&&(d.on("state",function(){this.setState(d.state)},this),c+=d.state==CKEDITOR.TRISTATE_ON?"on":d.state==CKEDITOR.TRISTATE_DISABLED?"disabled":"off"),this.directional&&i.on("contentDirChanged",function(e){var t=CKEDITOR.document.getById(this._.id),n=t.getFirst();(e=e.data)!=i.lang.dir?t.addClass("cke_"+e):t.removeClass("cke_ltr").removeClass("cke_rtl"),n.setAttribute("style",CKEDITOR.skin.getIconStyle(u,"rtl"==e,this.icon,this.iconOffset))},this),d?(o=i.getCommandKeystroke(d))&&(r=CKEDITOR.tools.keystrokeToString(i.lang.common.keyboard,o)):c+="off",o=this.name||this.command;var m=null,E=this.icon;return u=o,this.icon&&!/\./.test(this.icon)?(u=this.icon,E=null):(this.icon&&(m=this.icon),CKEDITOR.env.hidpi&&this.iconHiDpi&&(m=this.iconHiDpi)),m?(CKEDITOR.skin.addIcon(m,m),E=null):m=u,c={id:l,name:o,iconName:u,label:this.label,cls:this.className||"",state:c,ariaDisabled:"disabled"==c?"true":"false",title:this.title+(r?" ("+r.display+")":""),ariaShortcut:r?i.lang.common.keyboardShortcut+" "+r.aria:"",titleJs:s.gecko&&!s.hc?"":(this.title||"").replace("'",""),hasArrow:this.hasArrow?"true":"false",keydownFn:f,focusFn:p,clickFn:n,style:CKEDITOR.skin.getIconStyle(m,"rtl"==i.lang.dir,E,this.iconOffset),arrowHtml:this.hasArrow?T.output():""},C.output(c,e),this.onRender&&this.onRender(),h},setState:function(e){if(this._.state==e)return!1;this._.state=e;var t=CKEDITOR.document.getById(this._.id);return!!t&&(t.setState(e,"cke_button"),e==CKEDITOR.TRISTATE_DISABLED?t.setAttribute("aria-disabled",!0):t.removeAttribute("aria-disabled"),this.hasArrow?(e=e==CKEDITOR.TRISTATE_ON?this._.editor.lang.button.selectedLabel.replace(/%1/g,this.label):this.label,CKEDITOR.document.getById(this._.id+"_label").setText(e)):e==CKEDITOR.TRISTATE_ON?t.setAttribute("aria-pressed",!0):t.removeAttribute("aria-pressed"),!0)},getState:function(){return this._.state},toFeature:function(e){if(this._.feature)return this._.feature;var t=this;return this.allowedContent||this.requiredContent||!this.command||(t=e.getCommand(this.command)||t),this._.feature=t}},CKEDITOR.ui.prototype.addButton=function(e,t){this.add(e,CKEDITOR.UI_BUTTON,t)}}(),function(){function I(s){function e(){for(var e=l(),t=CKEDITOR.tools.clone(s.config.toolbarGroups)||d(s),n=0;n',b.lang.toolbar.toolbars,"",''],o=!1!==b.config.toolbarStartupExpanded;b.config.toolbarCanCollapse&&b.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE&&i.push('":' style="display:none">'));for(var r=b.toolbox.toolbars,a=I(b),s=a.length,l=0;l"),n=t=0),"/"===f)i.push('');else{u=f.items||f;for(var g=0;g'),d&&i.push('',d,""),i.push('');var C=r.push(h)-1;0'),t=1):t&&(i.push(""),t=0),n&&(T(n),n=0),T(E)}}}t&&(i.push(""),n=t=0),h&&i.push('')}}if(b.config.toolbarCanCollapse&&i.push(""),b.config.toolbarCanCollapse&&b.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var v=CKEDITOR.tools.addFunction(function(){b.execCommand("toolbarCollapse")});b.on("destroy",function(){CKEDITOR.tools.removeFunction(v)}),b.addCommand("toolbarCollapse",{readOnly:1,exec:function(e){var t=e.ui.space("toolbar_collapser"),n=t.getPrevious(),i=e.ui.space("contents"),o=n.getParent(),r=parseInt(i.$.style.height,10),a=o.$.offsetHeight,s=t.hasClass("cke_toolbox_collapser_min");s?(n.show(),t.removeClass("cke_toolbox_collapser_min"),t.setAttribute("title",e.lang.toolbar.toolbarCollapse)):(n.hide(),t.addClass("cke_toolbox_collapser_min"),t.setAttribute("title",e.lang.toolbar.toolbarExpand)),t.getFirst().setText(s?"\u25b2":"\u25c0"),i.setStyle("height",r-(o.$.offsetHeight-a)+"px"),e.fire("resize",{outerHeight:e.container.$.offsetHeight,contentsHeight:i.$.offsetHeight,outerWidth:e.container.$.offsetWidth})},modes:{wysiwyg:1,source:1}}),b.setKeystroke(CKEDITOR.ALT+(CKEDITOR.env.ie||CKEDITOR.env.webkit?189:109),"toolbarCollapse"),i.push('','',"")}i.push(""),e.data.html+=i.join("")}}),b.on("destroy",function(){if(this.toolbox){var e,t,n,i,o=0;for(e=this.toolbox.toolbars;o'),{}}}}})}}),CKEDITOR.ui.prototype.addToolbarGroup=function(e,t,n){var i=d(this.editor),o=0===t,r={name:e};if(n){if(n=CKEDITOR.tools.search(i,function(e){return e.name==n}))return!n.groups&&(n.groups=[]),t&&0<=(t=CKEDITOR.tools.indexOf(n.groups,t))?void n.groups.splice(t+1,0,e):void(o?n.groups.splice(0,0,e):n.groups.push(e));t=null}t&&(t=CKEDITOR.tools.indexOf(i,function(e){return e.name==t})),o?i.splice(0,0,e):"number"==typeof t?i.splice(t+1,0,r):i.push(e)}}(),CKEDITOR.UI_SEPARATOR="separator",CKEDITOR.config.toolbarLocation="top",function(){function T(e,t,n){return t.type||(t.type="auto"),!(n&&!1===e.fire("beforePaste",t)||!t.dataValue&&t.dataTransfer.isEmpty())&&(t.dataValue||(t.dataValue=""),CKEDITOR.env.gecko&&"drop"==t.method&&e.toolbox&&e.once("afterPaste",function(){e.toolbox.focus()}),e.fire("paste",t))}function t(h){function e(){var e,t=h.editable();if(CKEDITOR.plugins.clipboard.isCustomCopyCutSupported){var n=function(e){h.getSelection().isCollapsed()||(h.readOnly&&"cut"==e.name||p.initPasteDataTransfer(e,h),e.data.preventDefault())};t.on("copy",n),t.on("cut",n),t.on("cut",function(){h.readOnly||h.extractSelectedHtml()},null,null,999)}t.on(p.mainPasteEvent,function(e){"beforepaste"==p.mainPasteEvent&&g||d(e)}),"beforepaste"==p.mainPasteEvent&&(t.on("paste",function(e){m||(i(),e.data.preventDefault(),d(e),r("paste"))}),t.on("contextmenu",o,null,null,0),t.on("beforepaste",function(e){!e.data||e.data.$.ctrlKey||e.data.$.shiftKey||o()},null,null,0)),t.on("beforecut",function(){!g&&a(h)}),t.attachListener(CKEDITOR.env.ie?t:h.document.getDocumentElement(),"mouseup",function(){e=setTimeout(function(){u()},0)}),h.on("destroy",function(){clearTimeout(e)}),t.on("keyup",u)}function t(e){return{type:e,canUndo:"cut"==e,startDisabled:!0,fakeKeystroke:"cut"==e?CKEDITOR.CTRL+88:CKEDITOR.CTRL+67,exec:function(){var e;"cut"==this.type&&a();var t=this.type;if(CKEDITOR.env.ie)e=r(t);else try{e=h.document.$.execCommand(t,!1,null)}catch(n){e=!1}return e||h.showNotification(h.lang.clipboard[this.type+"Error"]),e}}}function n(){return{canUndo:!1,async:!0,fakeKeystroke:CKEDITOR.CTRL+86,exec:function(n,e){function t(e,t){t=void 0===t||t,e?(e.method="paste",e.dataTransfer||(e.dataTransfer=p.initPasteDataTransfer()),T(n,e,t)):o&&!n._.forcePasteDialog&&n.showNotification(s,"info",n.config.clipboard_notificationDuration),n._.forcePasteDialog=!1,n.fire("afterCommandExec",{name:"paste",command:i,returnValue:!!e})}var i=this,o="undefined"==typeof(e=null!=e?e:{}).notification||e.notification,r=e.type,a=CKEDITOR.tools.keystrokeToString(n.lang.common.keyboard,n.getCommandKeystroke(this)),s="string"==typeof o?o:n.lang.clipboard.pasteNotification.replace(/%1/,''+a.display+"");a="string"==typeof e?e:e.dataValue;r&&!0!==n.config.forcePasteAsPlainText&&"allow-word"!==n.config.forcePasteAsPlainText?n._.nextPasteType=r:delete n._.nextPasteType,"string"==typeof a?t({dataValue:a}):n.getClipboardData(t)}}}function i(){m=1,setTimeout(function(){m=0},100)}function o(){g=1,setTimeout(function(){g=0},10)}function r(e){var t=h.document,n=t.getBody(),i=!1,o=function(){i=!0};return n.on(e,o),7]+data-cke-bookmark[^<]*?<\/span>/gi,""),n&&T(h,t)})}function u(){if("wysiwyg"==h.mode){var e=f("paste");h.getCommand("cut").setState(f("cut")),h.getCommand("copy").setState(f("copy")),h.getCommand("paste").setState(e),h.fire("pasteState",e)}}function f(e){if(E&&e in{paste:1,cut:1})return CKEDITOR.TRISTATE_DISABLED;if("paste"==e)return CKEDITOR.TRISTATE_OFF;var t=(e=h.getSelection()).getRanges();return e.getType()==CKEDITOR.SELECTION_NONE||1==t.length&&t[0].collapsed?CKEDITOR.TRISTATE_DISABLED:CKEDITOR.TRISTATE_OFF}var p=CKEDITOR.plugins.clipboard,g=0,m=0,E=0;!function(){if(h.on("key",c),h.on("contentDom",e),h.on("selectionChange",function(e){E=e.data.selection.getRanges()[0].checkReadOnly(),u()}),h.contextMenu){h.contextMenu.addListener(function(e,t){return E=t.getRanges()[0].checkReadOnly(),{cut:f("cut"),copy:f("copy"),paste:f("paste")}});var t=null;h.on("menuShow",function(){t&&(t.removeListener(),t=null);var e=h.contextMenu.findItemByCommandName("paste");e&&e.element&&(t=e.element.on("touchend",function(){h._.forcePasteDialog=!0}))})}h.ui.addButton&&h.once("instanceReady",function(){h._.pasteButtons&&CKEDITOR.tools.array.forEach(h._.pasteButtons,function(e){(e=h.ui.get(e))&&CKEDITOR.document.getById(e._.id).on("touchend",function(){h._.forcePasteDialog=!0})})})}(),function(){function e(e,t,n,i,o){var r=h.lang.clipboard[t];h.addCommand(t,n),h.ui.addButton&&h.ui.addButton(e,{label:r,command:t,toolbar:"clipboard,"+i}),h.addMenuItems&&h.addMenuItem(t,{label:r,command:t,group:"clipboard",order:o})}e("Cut","cut",t("cut"),10,1),e("Copy","copy",t("copy"),20,4),e("Paste","paste",n(),30,8),h._.pasteButtons||(h._.pasteButtons=[]),h._.pasteButtons.push("Paste")}(),h.getClipboardData=function(e,t){function n(e){e.removeListener(),e.cancel(),t(e.data)}function i(e){e.removeListener(),e.cancel(),t({type:r,dataValue:e.data.dataValue,dataTransfer:e.data.dataTransfer,method:"paste"})}var o=!1,r="auto";t||(t=e,e=null),h.on("beforePaste",function(e){e.removeListener(),o=!0,r=e.data.type},null,null,1e3),h.on("paste",n,null,null,0),!1===l()&&(h.removeListener("paste",n),h._.forcePasteDialog&&o&&h.fire("pasteDialog")?(h.on("pasteDialogCommit",i),h.on("dialogHide",function(e){e.removeListener(),e.data.removeListener("pasteDialogCommit",i),e.data._.committed||t(null)})):t(null))}}function c(e){if(CKEDITOR.env.webkit){if(!e.match(/^[^<]*$/g)&&!e.match(/^(
    <\/div>|
    [^<]*<\/div>)*$/gi))return"html"}else if(CKEDITOR.env.ie){if(!e.match(/^([^<]|)*$/gi)&&!e.match(/^(

    ([^<]|)*<\/p>|(\r\n))*$/gi))return"html"}else{if(!CKEDITOR.env.gecko)return"html";if(!e.match(/^([^<]|)*$/gi))return"html"}return"htmlifiedtext"}function d(e,t){function n(e){return CKEDITOR.tools.repeat("

    ",~~(e/2))+(1==e%2?"
    ":"")}return(t=(t=t.replace(/(?!\u3000)\s+/g," ").replace(/> +<").replace(/
    /gi,"
    ")).replace(/<\/?[A-Z]+>/g,function(e){return e.toLowerCase()})).match(/^[^<]$/)?t:(CKEDITOR.env.webkit&&-1")&&((t=t.replace(/^(

    (
    |)<\/div>)(?!$|(
    (
    |)<\/div>))/g,"
    ").replace(/^(
    (
    |)<\/div>){2}(?!$)/g,"
    ")).match(/
    (
    |)<\/div>/)&&(t="

    "+t.replace(/(

    (
    |)<\/div>)+/g,function(e){return n(e.split("
    ").length+1)})+"

    "),t=(t=t.replace(/<\/div>
    /g,"
    ")).replace(/<\/?div>/g,"")), +CKEDITOR.env.gecko&&e.enterMode!=CKEDITOR.ENTER_BR&&(CKEDITOR.env.gecko&&(t=t.replace(/^

    $/,"
    ")),-1
    ")&&(t="

    "+t.replace(/(
    ){2,}/g,function(e){return n(e.length/4)})+"

    ")),i(e,t))}function n(){function t(){var e,t={};for(e in CKEDITOR.dtd)"$"!=e.charAt(0)&&"div"!=e&&"span"!=e&&(t[e]=1);return t}var n={};return{get:function(e){return"plain-text"==e?n.plainText||(n.plainText=new CKEDITOR.filter("br")):"semantic-content"==e?((e=n.semanticContent)||((e=new CKEDITOR.filter).allow({$1:{elements:t(),attributes:!0,styles:!1,classes:!1}}),e=n.semanticContent=e),e):e?new CKEDITOR.filter(e):null}}}function u(e,t,n){t=CKEDITOR.htmlParser.fragment.fromHtml(t);var i=new CKEDITOR.htmlParser.basicWriter;return n.applyTo(t,!0,!1,e.activeEnterMode),t.writeHtml(i),i.getHtml()}function i(e,t){return e.enterMode==CKEDITOR.ENTER_BR?t=t.replace(/(<\/p>

    )+/g,function(e){return CKEDITOR.tools.repeat("
    ",e.length/7*2)}).replace(/<\/?p>/g,""):e.enterMode==CKEDITOR.ENTER_DIV&&(t=t.replace(/<(\/)?p>/g,"<$1div>")),t}function o(e){e.data.preventDefault(),e.data.$.dataTransfer.dropEffect="none"}function a(l){var c=CKEDITOR.plugins.clipboard;l.on("contentDom",function(){function o(e,t,n){t.select(),T(l,{dataTransfer:n,method:"drop"},1),n.sourceEditor.fire("saveSnapshot"),n.sourceEditor.editable().extractHtmlFromRange(e),n.sourceEditor.getSelection().selectRanges([e]),n.sourceEditor.fire("saveSnapshot")}function r(e,t){e.select(),T(l,{dataTransfer:t,method:"drop"},1),c.resetDragDataTransfer()}function i(e,t,n){var i={$:e.data.$,target:e.data.getTarget()};t&&(i.dragRange=t),n&&(i.dropRange=n),!1===l.fire(e.name,i)&&e.data.preventDefault()}function t(e){return e.type!=CKEDITOR.NODE_ELEMENT&&(e=e.getParent()),e.getChildCount()}var e=l.editable(),n=CKEDITOR.plugins.clipboard.getDropTarget(l),a=l.ui.space("top"),s=l.ui.space("bottom");c.preventDefaultDropOnElement(a),c.preventDefaultDropOnElement(s),e.attachListener(n,"dragstart",i),e.attachListener(l,"dragstart",c.resetDragDataTransfer,c,null,1),e.attachListener(l,"dragstart",function(e){c.initDragDataTransfer(e,l)},null,null,2),e.attachListener(l,"dragstart",function(){var e=c.dragRange=l.getSelection().getRanges()[0];CKEDITOR.env.ie&&CKEDITOR.env.version<10&&(c.dragStartContainerChildCount=e?t(e.startContainer):null,c.dragEndContainerChildCount=e?t(e.endContainer):null)},null,null,100),e.attachListener(n,"dragend",i),e.attachListener(l,"dragend",c.initDragDataTransfer,c,null,1),e.attachListener(l,"dragend",c.resetDragDataTransfer,c,null,100),e.attachListener(n,"dragover",function(e){if(CKEDITOR.env.edge)e.data.preventDefault();else{var t=e.data.getTarget();t&&t.is&&t.is("html")?e.data.preventDefault():CKEDITOR.env.ie&&CKEDITOR.plugins.clipboard.isFileApiSupported&&e.data.$.dataTransfer.types.contains("Files")&&e.data.preventDefault()}}),e.attachListener(n,"drop",function(e){if(!e.data.$.defaultPrevented&&(e.data.preventDefault(),!(t=e.data.getTarget()).isReadOnly()||t.type==CKEDITOR.NODE_ELEMENT&&t.is("html"))){var t=c.getRangeAtDropPosition(e,l),n=c.dragRange;t&&i(e,n,t)}},null,null,9999),e.attachListener(l,"drop",c.initDragDataTransfer,c,null,1),e.attachListener(l,"drop",function(e){if(e=e.data){var t=e.dropRange,n=e.dragRange,i=e.dataTransfer;i.getTransferType(l)==CKEDITOR.DATA_TRANSFER_INTERNAL?setTimeout(function(){c.internalDrop(n,t,i,l)},0):i.getTransferType(l)==CKEDITOR.DATA_TRANSFER_CROSS_EDITORS?o(n,t,i):r(t,i)}},null,null,9999)})}var g;CKEDITOR.plugins.add("clipboard",{requires:"dialog,notification,toolbar",init:function(s){var e,l=n();if(s.config.forcePasteAsPlainText?e="plain-text":s.config.pasteFilter?e=s.config.pasteFilter:!CKEDITOR.env.webkit||"pasteFilter"in s.config||(e="semantic-content"),s.pasteFilter=l.get(e),t(s),a(s),CKEDITOR.dialog.add("paste",CKEDITOR.getUrl(this.path+"dialogs/paste.js")),CKEDITOR.env.gecko){var o,r=["image/png","image/jpeg","image/gif"];s.on("paste",function(e){var t=e.data,n=t.dataTransfer;if(!t.dataValue&&"paste"==t.method&&n&&1==n.getFilesCount()&&o!=n.id&&(n=n.getFile(0),-1!=CKEDITOR.tools.indexOf(r,n.type))){var i=new FileReader;i.addEventListener("load",function(){e.data.dataValue='',s.fire("paste",e.data)},!1),i.addEventListener("abort",function(){s.fire("paste",e.data)},!1),i.addEventListener("error",function(){s.fire("paste",e.data)},!1),i.readAsDataURL(n),o=t.dataTransfer.id,e.stop()}},null,null,1)}s.on("paste",function(e){if(e.data.dataTransfer||(e.data.dataTransfer=new CKEDITOR.plugins.clipboard.dataTransfer),!e.data.dataValue){var t=e.data.dataTransfer,n=t.getData("text/html");n?(e.data.dataValue=n,e.data.type="html"):(n=t.getData("text/plain"))&&(e.data.dataValue=s.editable().transformPlainTextToHtml(n),e.data.type="text")}},null,null,1),s.on("paste",function(n){var e=n.data.dataValue,i=CKEDITOR.dtd.$block;if(-1 <\/span>/gi," "),"html"!=n.data.type&&(e=e.replace(/]*>([^<]*)<\/span>/gi,function(e,t){return t.replace(/\t/g,"    ")})),-1')&&(n.data.startsWithEOL=1,n.data.preSniffing="html",e=e.replace(/
    /,"")),e=e.replace(/(<[^>]+) class="Apple-[^"]*"/gi,"$1")),e.match(/^<[^<]+cke_(editable|contents)/i)){var t,o,r=new CKEDITOR.dom.element("div");for(r.setHtml(e);1==r.getChildCount()&&(t=r.getFirst())&&t.type==CKEDITOR.NODE_ELEMENT&&(t.hasClass("cke_editable")||t.hasClass("cke_contents"));)r=o=t;o&&(e=o.getHtml().replace(/
    $/i,""))}CKEDITOR.env.ie?e=e.replace(/^ (?: |\r\n)?<(\w+)/g,function(e,t){return t.toLowerCase()in i?(n.data.preSniffing="html","<"+t):e}):CKEDITOR.env.webkit?e=e.replace(/<\/(\w+)>


    <\/div>$/,function(e,t){return t in i?(n.data.endsWithEOL=1,""):e}):CKEDITOR.env.gecko&&(e=e.replace(/(\s)
    $/,"$1")),n.data.dataValue=e},null,null,3),s.on("paste",function(e){e=e.data;var t,n=s._.nextPasteType||e.type,i=e.dataValue,o=s.config.clipboard_defaultContentType||"html",r=e.dataTransfer.getTransferType(s)==CKEDITOR.DATA_TRANSFER_EXTERNAL,a=!0===s.config.forcePasteAsPlainText;t="html"==n||"html"==e.preSniffing?"html":c(i),delete s._.nextPasteType,"htmlifiedtext"==t&&(i=d(s.config,i)),"text"==n&&"html"==t?i=u(s,i,l.get("plain-text")):(r&&s.pasteFilter&&!e.dontFilter||a)&&(i=u(s,i,s.pasteFilter)),e.startsWithEOL&&(i='
    '+i),e.endsWithEOL&&(i+='
    '),"auto"==n&&(n="html"==t||"html"==o?"html":"text"),e.type=n,e.dataValue=i,delete e.preSniffing,delete e.startsWithEOL,delete e.endsWithEOL},null,null,6),s.on("paste",function(e){(e=e.data).dataValue&&(s.insertHtml(e.dataValue,e.type,e.range),setTimeout(function(){s.fire("afterPaste")},0))},null,null,1e3),s.on("pasteDialog",function(e){setTimeout(function(){s.openDialog("paste",e.data)},0)})}}),CKEDITOR.plugins.clipboard={isCustomCopyCutSupported:(!CKEDITOR.env.ie||16<=CKEDITOR.env.version)&&!CKEDITOR.env.iOS,isCustomDataTypesSupported:!CKEDITOR.env.ie||16<=CKEDITOR.env.version,isFileApiSupported:!CKEDITOR.env.ie||9\u200b');var d=t.document.getById(c);a.moveToPosition(d,CKEDITOR.POSITION_BEFORE_START),d.remove()}else{var u=t.document.$.elementFromPoint(i,o),h=new CKEDITOR.dom.element(u);if(h.equals(t.editable())||"html"==h.getName())return r&&r.startContainer&&!r.startContainer.equals(t.editable())?r:null;i/i,bodyRegExp:/([\s\S]*)<\/body>/i,fragmentRegExp:/\x3c!--(?:Start|End)Fragment--\x3e/g,data:{},files:[],nativeHtmlCache:"",normalizeType:function(e){return"text"==(e=e.toLowerCase())||"text/plain"==e?"Text":"url"==e?"URL":e}},this._.fallbackDataTransfer=new CKEDITOR.plugins.clipboard.fallbackDataTransfer(this),this.id=this.getData(g),this.id||(this.id="Text"==g?"":"cke-"+CKEDITOR.tools.getUniqueId()),t&&(this.sourceEditor=t,this.setData("text/html",t.getSelectedHtml(1)),"Text"==g||this.getData("text/plain")||this.setData("text/plain",t.getSelection().getSelectedText()))},CKEDITOR.DATA_TRANSFER_INTERNAL=1,CKEDITOR.DATA_TRANSFER_CROSS_EDITORS=2,CKEDITOR.DATA_TRANSFER_EXTERNAL=3,CKEDITOR.plugins.clipboard.dataTransfer.prototype={getData:function(e,t){if(null==(i="text/html"==(e=this._.normalizeType(e))&&t?this._.nativeHtmlCache:this._.data[e])||""===i){if(this._.fallbackDataTransfer.isRequired())i=this._.fallbackDataTransfer.getData(e,t);else try{i=this.$.getData(e)||""}catch(o){i=""}"text/html"!=e||t||(i=this._stripHtml(i))}if("Text"==e&&CKEDITOR.env.gecko&&this.getFilesCount()&&"file://"==i.substring(0,7)&&(i=""),"string"==typeof i)var n=i.indexOf(""),i=-1!==n?i.substring(0,n+7):i;return i},setData:function(e,t){if("text/html"==(e=this._.normalizeType(e))?(this._.data[e]=this._stripHtml(t),this._.nativeHtmlCache=t):this._.data[e]=t,CKEDITOR.plugins.clipboard.isCustomDataTypesSupported||"URL"==e||"Text"==e)if("Text"==g&&"Text"==e&&(this.id=t),this._.fallbackDataTransfer.isRequired())this._.fallbackDataTransfer.setData(e,t);else try{this.$.setData(e,t)}catch(n){}},storeId:function(){"Text"!==g&&this.setData(g,this.id)},getTransferType:function(e){return this.sourceEditor?this.sourceEditor==e?CKEDITOR.DATA_TRANSFER_INTERNAL:CKEDITOR.DATA_TRANSFER_CROSS_EDITORS:CKEDITOR.DATA_TRANSFER_EXTERNAL},cacheData:function(){function e(e){e=i._.normalizeType(e);var t=i.getData(e);"text/html"==e&&(i._.nativeHtmlCache=i.getData(e,!0),t=i._stripHtml(t)),t&&(i._.data[e]=t)}if(this.$){var t,n,i=this;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported){if(this.$.types)for(t=0;t"),n+(e&&e.length?e:"")}}}(),CKEDITOR.config.clipboard_notificationDuration=1e4,CKEDITOR.plugins.add("panelbutton",{requires:"button",onLoad:function(){function n(e){var t=this._;t.state!=CKEDITOR.TRISTATE_DISABLED&&(this.createPanel(e),t.on?t.panel.hide():t.panel.showBlock(this._.id,this.document.getById(this._.id),4))}CKEDITOR.ui.panelButton=CKEDITOR.tools.createClass({base:CKEDITOR.ui.button,$:function(e){var t=e.panel||{};delete e.panel,this.base(e),this.document=t.parent&&t.parent.getDocument()||CKEDITOR.document,t.block={attributes:t.attributes},this.hasArrow=t.toolbarRelated=!0,this.click=n,this._={panelDefinition:t}},statics:{handler:{create:function(e){return new CKEDITOR.ui.panelButton(e)}}},proto:{createPanel:function(t){var n=this._;if(!n.panel){var e=this._.panelDefinition,i=this._.panelDefinition.block,o=e.parent||CKEDITOR.document.getBody(),r=this._.panel=new CKEDITOR.ui.floatPanel(t,o,e),a=(e=r.addBlock(n.id,i),this);r.onShow=function(){a.className&&this.element.addClass(a.className+"_panel"),a.setState(CKEDITOR.TRISTATE_ON),n.on=1,a.editorFocus&&t.focus(),a.onOpen&&a.onOpen()},r.onHide=function(e){a.className&&this.element.getFirst().removeClass(a.className+"_panel"),a.setState(a.modes&&a.modes[t.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED),n.on=0,!e&&a.onClose&&a.onClose()},r.onEscape=function(){r.hide(1),a.document.getById(n.id).focus()},this.onBlock&&this.onBlock(r,e),e.onHide=function(){n.on=0,a.setState(CKEDITOR.TRISTATE_OFF)}}}}})},beforeInit:function(e){e.ui.addHandler(CKEDITOR.UI_PANELBUTTON,CKEDITOR.ui.panelButton.handler)}}),CKEDITOR.UI_PANELBUTTON="panelbutton",function(){CKEDITOR.plugins.add("panel",{beforeInit:function(e){e.ui.addHandler(CKEDITOR.UI_PANEL,CKEDITOR.ui.panel.handler)}}),CKEDITOR.UI_PANEL="panel",CKEDITOR.ui.panel=function(e,t){t&&CKEDITOR.tools.extend(this,t),CKEDITOR.tools.extend(this,{className:"",css:[]}),this.id=CKEDITOR.tools.getNextId(),this.document=e,this.isFramed=this.forceIFrame||this.css.length,this._={blocks:{}}},CKEDITOR.ui.panel.handler={create:function(e){return new CKEDITOR.ui.panel(e)}};var o=CKEDITOR.addTemplate("panel",''),r=CKEDITOR.addTemplate("panel-frame",''),a=CKEDITOR.addTemplate("panel-frame-inner",'{css}');CKEDITOR.ui.panel.prototype={render:function(e,t){this.getHolderElement=function(){if(!(t=this._.holder)){if(this.isFramed){var e=(t=this.document.getById(this.id+"_frame")).getParent(),t=t.getFrameDocument();CKEDITOR.env.iOS&&e.setStyles({overflow:"scroll","-webkit-overflow-scrolling":"touch"}),e=CKEDITOR.tools.addFunction(CKEDITOR.tools.bind(function(){this.isLoaded=!0,this.onLoad&&this.onLoad()},this)),t.write(a.output(CKEDITOR.tools.extend({css:CKEDITOR.tools.buildStyleHtml(this.css),onload:"window.parent.CKEDITOR.tools.callFunction("+e+");"},n))),t.getWindow().$.CKEDITOR=CKEDITOR,t.on("keydown",function(e){var t=e.data.getKeystroke(),n=this.document.getById(this.id).getAttribute("dir");this._.onKeyDown&&!1===this._.onKeyDown(t)?e.data.preventDefault():(27==t||t==("rtl"==n?39:37))&&this.onEscape&&!1===this.onEscape(t)&&e.data.preventDefault()},this),(t=t.getBody()).unselectable(),CKEDITOR.env.air&&CKEDITOR.tools.callFunction(e)}else t=this.document.getById(this.id);this._.holder=t}return t};var n={editorId:e.id,id:this.id,langCode:e.langCode,dir:e.lang.dir,cls:this.className,frame:"",env:CKEDITOR.env.cssClass,"z-index":e.config.baseFloatZIndex+1};if(this.isFramed){var i=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie?"javascript:void(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"}())":"";n.frame=r.output({id:this.id+"_frame",src:i})}return i=o.output(n),t&&t.push(i),i},addBlock:function(e,t){return t=this._.blocks[e]=t instanceof CKEDITOR.ui.panel.block?t:new CKEDITOR.ui.panel.block(this.getHolderElement(),t),this._.currentBlock||this.showBlock(e),t},getBlock:function(e){return this._.blocks[e]},showBlock:function(e){e=this._.blocks[e];var t=this._.currentBlock,n=!this.forceIFrame||CKEDITOR.env.ie?this._.holder:this.document.getById(this.id+"_frame");return t&&t.hide(),this._.currentBlock=e,CKEDITOR.fire("ariaWidget",n),e._.focusIndex=-1,this._.onKeyDown=e.onKeyDown&&CKEDITOR.tools.bind(e.onKeyDown,e),e.show(),e},destroy:function(){this.element&&this.element.remove()}},CKEDITOR.ui.panel.block=CKEDITOR.tools.createClass({$:function(e,t){this.element=e.append(e.getDocument().createElement("div",{attributes:{tabindex:-1,"class":"cke_panel_block"},styles:{display:"none"}})),t&&CKEDITOR.tools.extend(this,t),this.element.setAttributes({role:this.attributes.role||"presentation","aria-label":this.attributes["aria-label"],title:this.attributes.title||this.attributes["aria-label"]}),this.keys={},this._.focusIndex=-1,this.element.disableContextMenu()},_:{markItem:function(e){-1!=e&&(e=this.element.getElementsByTag("a").getItem(this._.focusIndex=e),CKEDITOR.env.webkit&&e.getDocument().getWindow().focus(),e.focus(),this.onMark&&this.onMark(e))},markFirstDisplayed:function(e){for(var t,n,i=function(e){return e.type==CKEDITOR.NODE_ELEMENT&&"none"==e.getStyle("display")},o=this._.getItems(),r=o.count()-1;0<=r;r--)if((t=o.getItem(r)).getAscendant(i)||(n=t,this._.focusIndex=r),"true"==t.getAttribute("aria-selected")){n=t,this._.focusIndex=r;break}n&&(e&&e(),CKEDITOR.env.webkit&&n.getDocument().getWindow().focus(),n.focus(),this.onMark&&this.onMark(n))},getItems:function(){return this.element.getElementsByTag("a")}},proto:{show:function(){this.element.setStyle("display","")},hide:function(){this.onHide&&!0===this.onHide.call(this)||this.element.setStyle("display","none")},onKeyDown:function(e,t){switch(o=this.keys[e]){case"next":for(var n,i=this._.focusIndex,o=this.element.getElementsByTag("a");n=o.getItem(++i);)if(n.getAttribute("_cke_focus")&&n.$.offsetWidth){this._.focusIndex=i,n.focus();break}return!n&&!t&&(this._.focusIndex=-1,this.onKeyDown(e,1));case"prev":for(i=this._.focusIndex,o=this.element.getElementsByTag("a");0i?p-n.left:p-n.right+e.width):ri?p-n.right+e.width:p-n.left),i=n.top,e.height-n.topo?g-n.bottom+e.height:g-n.top),CKEDITOR.env.ie&&("html"==(e=n=new CKEDITOR.dom.element(d.$.offsetParent)).getName()&&(e=e.getDocument().getBody()),"rtl"==e.getComputedStyle("direction")&&(p=CKEDITOR.env.ie8Compat?p-2*d.getDocument().getDocumentElement().$.scrollLeft:p-(n.$.scrollWidth-n.$.clientWidth))),(t=(n=d.getFirst()).getCustomData("activePanel"))&&t.onHide&&t.onHide.call(this,1),n.setCustomData("activePanel",this),d.setStyles({top:g+"px",left:p+"px"}),d.setOpacity(1),s&&s()},this);l.isLoaded?e():l.onLoad=e,CKEDITOR.tools.setTimeout(function(){var e=CKEDITOR.env.webkit&&CKEDITOR.document.getWindow().getScrollPosition().y;this.focus(),c.element.focus(),CKEDITOR.env.webkit&&(CKEDITOR.document.getBody().$.scrollTop=e),this.allowBlur(!0),CKEDITOR.env.ie?CKEDITOR.tools.setTimeout(function(){c.markFirstDisplayed?c.markFirstDisplayed():c._.markFirstDisplayed()},0):c.markFirstDisplayed?c.markFirstDisplayed():c._.markFirstDisplayed(),this._.editor.fire("panelShow",this)},0,this)},CKEDITOR.env.air?200:0,this),this.visible=1,this.onShow&&this.onShow.call(this)},reposition:function(){var e=this._.showBlockParams;this.visible&&this._.showBlockParams&&(this.hide(),this.showBlock.apply(this,e))},focus:function(){if(CKEDITOR.env.webkit){var e=CKEDITOR.document.getActive();e&&!e.equals(this._.iframe)&&e.$.blur()}(this._.lastFocused||this._.iframe.getFrameDocument().getWindow()).focus()},blur:function(){var e=this._.iframe.getFrameDocument().getActive();e&&e.is("a")&&(this._.lastFocused=e)},hide:function(e){!this.visible||this.onHide&&!0===this.onHide.call(this)||(this.hideChild(),CKEDITOR.env.gecko&&this._.iframe.getFrameDocument().$.activeElement.blur(),this.element.setStyle("display","none"),this.visible=0,this.element.getFirst().removeCustomData("activePanel"),(e=e&&this._.returnFocus)&&(CKEDITOR.env.webkit&&e.type&&e.getWindow().$.focus(),e.focus()),delete this._.lastFocused,this._.showBlockParams=null,this._.editor.fire("panelHide",this))},allowBlur:function(e){var t=this._.panel;return void 0!==e&&(t.allowBlur=e),t.allowBlur},showAsChild:function(e,t,n,i,o,r){this._.activeChild==e&&e._.panel._.offsetParentId==n.getId()||(this.hideChild(),e.onHide=CKEDITOR.tools.bind(function(){CKEDITOR.tools.setTimeout(function(){this._.focused||this.hide()},0,this)},this),this._.activeChild=e,this._.focused=!1,e.showBlock(t,n,i,o,r),this.blur(),(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&setTimeout(function(){e.element.getChild(0).$.style.cssText+=""},100))},hideChild:function(e){var t=this._.activeChild;t&&(delete t.onHide,delete this._.activeChild,t.hide(),e&&this.focus())}}}),CKEDITOR.on("instanceDestroyed",function(){var e,t=CKEDITOR.tools.isEmpty(CKEDITOR.instances);for(e in a){var n=a[e];t?n.destroy():n.element.hide()}t&&(a={})})}(),CKEDITOR.plugins.add("colorbutton",{requires:"panelbutton,floatpanel",init:function(u){function e(e,r,t,n,i){var a,o=new CKEDITOR.style(f["colorButton_"+r+"Style"]),s=CKEDITOR.tools.getNextId()+"_colorBox";i=i||{},u.ui.add(e,CKEDITOR.UI_PANELBUTTON,{label:t,title:t,modes:{wysiwyg:1},editorFocus:0,toolbar:"colors,"+n,allowedContent:o,requiredContent:o,contentTransformations:i.contentTransformations,panel:{css:CKEDITOR.skin.getPath("editor"),attributes:{role:"listbox","aria-label":p.panelTitle}},onBlock:function(e,t){(a=t).autoSize=!0,t.element.addClass("cke_colorblock"),t.element.setHtml(l(e,r,s)),t.element.getDocument().getBody().setStyle("overflow","hidden"),CKEDITOR.ui.fire("ready",this);var n=t.keys,i="rtl"==u.lang.dir;n[i?37:39]="next",n[40]="next",n[9]="next",n[i?39:37]="prev",n[38]="prev",n[CKEDITOR.SHIFT+9]="prev",n[32]="click"},refresh:function(){u.activeFilter.check(o)||this.setState(CKEDITOR.TRISTATE_DISABLED)},onOpen:function(){var e=(n=u.getSelection())&&n.getStartElement(),t=u.elementPath(e);if(t){for(e=t.block||t.blockLimit||u.document.getBody();t=e&&e.getComputedStyle("back"==r?"background-color":"color")||"transparent","back"==r&&"transparent"==t&&e&&(e=e.getParent()););if(t&&"transparent"!=t||(t="#ffffff"),!1!==f.colorButton_enableAutomatic&&this._.panel._.iframe.getFrameDocument().getById(s).setStyle("background-color",t),e=n&&n.getRanges()[0]){var n=new CKEDITOR.dom.walker(e),i=e.collapsed?e.startContainer:n.next();for(e="";i;){if(i.type===CKEDITOR.NODE_TEXT&&(i=i.getParent()),i=c(i.getComputedStyle("back"==r?"background-color":"color")),(e=e||i)!==i){e="";break}i=n.next()}for(n=e,e=a._.getItems(),i=0;i
    ',p.auto,"
    "),e.push(''),n=0;n");var l=i[n].split("/"),c=l[0],d=l[1]||c;l[1]||(c="#"+c.replace(/^(.)(.)(.)$/,"$1$1$2$2$3$3")),l=u.lang.colorbutton.colors[d]||d,e.push('')}return r&&e.push('"),e.push("
    ',p.more,"
    "),e.join("")}function h(e){return"false"==e.getAttribute("contentEditable")||e.getAttribute("data-nostyle")}function c(e){return CKEDITOR.tools.normalizeHex("#"+CKEDITOR.tools.convertRgbToHex(e||"")).replace(/#/g,"")}var f=u.config,p=u.lang.colorbutton;if(!CKEDITOR.env.hc){e("TextColor","fore",p.textColorTitle,10,{contentTransformations:[[{element:"font",check:"span{color}",left:function(e){return!!e.attributes.color},right:function(e){e.name="span",e.attributes.color&&(e.styles.color=e.attributes.color),delete e.attributes.color}}]]});var t={},n=u.config.colorButton_normalizeBackground;(void 0===n||n)&&(t.contentTransformations=[[{element:"span",left:function(e){var t=CKEDITOR.tools;return!("span"!=e.name||!e.styles||!e.styles.background)&&((e=t.style.parse.background(e.styles.background)).color&&1===t.objectKeys(e).length)},right:function(e){var t=new CKEDITOR.style(u.config.colorButton_backStyle,{color:e.styles.background}).getDefinition();return e.name=t.element,e.styles=t.styles,e.attributes=t.attributes||{},e}}]]),e("BGColor","back",p.bgColorTitle,20,t)}}}),CKEDITOR.config.colorButton_colors="1ABC9C,2ECC71,3498DB,9B59B6,4E5F70,F1C40F,16A085,27AE60,2980B9,8E44AD,2C3E50,F39C12,E67E22,E74C3C,ECF0F1,95A5A6,DDD,FFF,D35400,C0392B,BDC3C7,7F8C8D,999,000",CKEDITOR.config.colorButton_foreStyle={element:"span",styles:{color:"#(color)"},overrides:[{element:"font",attributes:{color:null}}]},CKEDITOR.config.colorButton_backStyle={element:"span",styles:{"background-color":"#(color)"}},CKEDITOR.plugins.colordialog={requires:"dialog",init:function(e){var t=new CKEDITOR.dialogCommand("colordialog");t.editorFocus=!1,e.addCommand("colordialog",t),CKEDITOR.dialog.add("colordialog",this.path+"dialogs/colordialog.js"),e.getColorFromDialog=function(t,n){var i,o,r;i=function(e){o(this),e="ok"==e.name?this.getValueOf("picker","selectedColor"):null,/^[0-9a-f]{3}([0-9a-f]{3})?$/i.test(e)&&(e="#"+e),t.call(n,e)},o=function(e){e.removeListener("ok",i),e.removeListener("cancel",i)},r=function(e){e.on("ok",i),e.on("cancel",i)},e.execCommand("colordialog"),e._.storedDialogs&&e._.storedDialogs.colordialog?r(e._.storedDialogs.colordialog):CKEDITOR.on("dialogDefinition",function(e){if("colordialog"==e.data.name){var t=e.data.definition;e.removeListener(),t.onLoad=CKEDITOR.tools.override(t.onLoad,function(e){return function(){r(this),"function"==typeof(t.onLoad=e)&&e.call(this)}})}})}}},CKEDITOR.plugins.add("colordialog",CKEDITOR.plugins.colordialog),function(){CKEDITOR.plugins.add("templates",{requires:"dialog",init:function(e){CKEDITOR.dialog.add("templates",CKEDITOR.getUrl(this.path+"dialogs/templates.js")),e.addCommand("templates",new CKEDITOR.dialogCommand("templates")),e.ui.addButton&&e.ui.addButton("Templates",{label:e.lang.templates.button,command:"templates",toolbar:"doctools,10"})}});var n={},r={};CKEDITOR.addTemplates=function(e,t){n[e]=t},CKEDITOR.getTemplates=function(e){return n[e]},CKEDITOR.loadTemplates=function(e,t){for(var n=[],i=0,o=e.length;it.group?1:e.ordert.order?1:0})}var e='';var p=CKEDITOR.addTemplate("menuItem",e+'{label}{shortcutHtml}{arrowHtml}{ariaShortcut}'),g=CKEDITOR.addTemplate("menuArrow",'{label}'),m=CKEDITOR.addTemplate("menuShortcut",'{shortcut}');CKEDITOR.menu=CKEDITOR.tools.createClass({$:function(e,t){t=this._.definition=t||{},this.id=CKEDITOR.tools.getNextId(),this.editor=e,this.items=[],this._.listeners=[],this._.level=t.level||1;var n=CKEDITOR.tools.extend({},t.panel,{css:[CKEDITOR.skin.getPath("editor")],level:this._.level-1,block:{}}),i=n.block.attributes=n.attributes||{};!i.role&&(i.role="menu"),this._.panelDefinition=n},_:{onShow:function(){var e=this.editor.getSelection(),t=e&&e.getStartElement(),n=this.editor.elementPath(),i=this._.listeners;this.removeAll();for(var o=0;o'],c=o.length,d=c&&o[0].group,u=0;u
    '),d=h.group),h.render(this,u,l)}l.push("
    "),s.setHtml(l.join("")),CKEDITOR.ui.fire("ready",this),this.parent?this.parent._.panel.showAsChild(a,this.id,e,t,n,i):a.showBlock(this.id,e,t,n,i),r.fire("menuShow",[a])}},addListener:function(e){this._.listeners.push(e)},hide:function(e){this._.onHide&&this._.onHide(),this._.panel&&this._.panel.hide(e)},findItemByCommandName:function(t){var e=CKEDITOR.tools.array.filter(this.items,function(e){return t===e.command});return e.length?{item:e=e[0],element:this._.element.findOne("."+e.className)}:null}}}),CKEDITOR.menuItem=CKEDITOR.tools.createClass({$:function(e,t,n){CKEDITOR.tools.extend(this,n,{order:0,className:"cke_menubutton__"+t}),this.group=e._.menuGroups[this.group],this.editor=e,this.name=t},proto:{render:function(e,t,n){var i,o,r=e.id+String(t),a="undefined"==typeof this.state?CKEDITOR.TRISTATE_OFF:this.state,s="",l=this.editor,c=a==CKEDITOR.TRISTATE_ON?"on":a==CKEDITOR.TRISTATE_DISABLED?"disabled":"off";this.role in{menuitemcheckbox:1,menuitemradio:1}&&(s=' aria-checked="'+(a==CKEDITOR.TRISTATE_ON?"true":"false")+'"');var d=this.getItems,u="&#"+("rtl"==this.editor.lang.dir?"9668":"9658")+";",h=this.name;this.icon&&!/\./.test(this.icon)&&(h=this.icon),this.command&&(i=l.getCommand(this.command),(i=l.getCommandKeystroke(i))&&(o=CKEDITOR.tools.keystrokeToString(l.lang.common.keyboard,i))),e={id:r,name:this.name,iconName:h,label:this.label,cls:this.className||"",state:c,hasPopup:d?"true":"false",disabled:a==CKEDITOR.TRISTATE_DISABLED,title:this.label+(o?" ("+o.display+")":""),ariaShortcut:o?l.lang.common.keyboardShortcut+" "+o.aria:"",href:"javascript:void('"+(this.label||"").replace("'")+"')",hoverFn:e._.itemOverFn,moveOutFn:e._.itemOutFn,clickFn:e._.itemClickFn,index:t,iconStyle:CKEDITOR.skin.getIconStyle(h,"rtl"==this.editor.lang.dir,h==this.icon?null:this.icon,this.iconOffset),shortcutHtml:o?m.output({shortcut:o.display}):"",arrowHtml:d?g.output({label:u}):"",role:this.role?this.role:"menuitem",ariaChecked:s},p.output(e,n)}}})}(),CKEDITOR.config.menu_groups="clipboard,form,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,flash,checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea,div",CKEDITOR.plugins.add("contextmenu",{requires:"menu",onLoad:function(){CKEDITOR.plugins.contextMenu=CKEDITOR.tools.createClass({base:CKEDITOR.menu,$:function(e){this.base.call(this,e,{panel:{className:"cke_menu_panel",attributes:{"aria-label":e.lang.contextmenu.options}}})},proto:{addTarget:function(e,a){if(e.on("contextmenu",function(e){e=e.data;var t=CKEDITOR.env.webkit?s:CKEDITOR.env.mac?e.$.metaKey:e.$.ctrlKey;if(!a||!t){if(e.preventDefault(),CKEDITOR.env.mac&&CKEDITOR.env.webkit){t=this.editor;(n=new CKEDITOR.dom.elementPath(e.getTarget(),t.editable()).contains(function(e){return e.hasAttribute("contenteditable")},!0))&&"false"==n.getAttribute("contenteditable")&&t.getSelection().fake(n)}var n=e.getTarget().getDocument(),i=e.getTarget().getDocument().getDocumentElement(),o=(t=!n.equals(CKEDITOR.document),n=n.getWindow().getScrollPosition(),t?e.$.clientX:e.$.pageX||n.x+e.$.clientX),r=t?e.$.clientY:e.$.pageY||n.y+e.$.clientY;CKEDITOR.tools.setTimeout(function(){this.open(i,null,o,r)},CKEDITOR.env.ie?200:0,this)}},this),CKEDITOR.env.webkit){var s,t=function(){s=0};e.on("keydown",function(e){s=CKEDITOR.env.mac?e.data.$.metaKey:e.data.$.ctrlKey}),e.on("keyup",t),e.on("contextmenu",t)}},open:function(e,t,n,i){!1!==this.editor.config.enableContextMenu&&(this.editor.focus(),e=e||CKEDITOR.document.getDocumentElement(),this.editor.selectionChange(1),this.show(e,t,n,i))}}})},beforeInit:function(e){var t=e.contextMenu=new CKEDITOR.plugins.contextMenu(e);e.on("contentDom",function(){t.addTarget(e.editable(),!1!==e.config.browserContextMenuOnCtrl)}),e.addCommand("contextMenu",{exec:function(){e.contextMenu.open(e.document.getBody())}}),e.setKeystroke(CKEDITOR.SHIFT+121,"contextMenu"),e.setKeystroke(CKEDITOR.CTRL+CKEDITOR.SHIFT+121,"contextMenu")}}),function(){function s(e,t,n,i){var o=new CKEDITOR.dom.walker(e);if(!(e=e.startContainer.getAscendant(t,!0)||e.endContainer.getAscendant(t,!0))||(n(e),!i))for(;(e=o.next())&&(!(e=e.getAscendant(t,!0))||(n(e),!i)););}function l(t,e){var n={ul:"ol",ol:"ul"};return-1!==h(e,function(e){return e.element===t||e.element===n[t]})}function e(e){this.styles=null,this.sticky=!1,this.editor=e,this.filter=new CKEDITOR.filter(e.config.copyFormatting_allowRules),!0===e.config.copyFormatting_allowRules&&(this.filter.disabled=!0),e.config.copyFormatting_disallowRules&&this.filter.disallow(e.config.copyFormatting_disallowRules)}var h=CKEDITOR.tools.indexOf,i=CKEDITOR.tools.getMouseButton,t=!1;CKEDITOR.plugins.add("copyformatting",{lang:"az,de,en,it,ja,nb,nl,oc,pl,pt-br,ru,sv,tr,zh,zh-cn",icons:"copyformatting",hidpi:!0,init:function(a){var s=CKEDITOR.plugins.copyformatting;s._addScreenReaderContainer(),t||(CKEDITOR.document.appendStyleSheet(this.path+"styles/copyformatting.css"),t=!0),a.addContentsCss&&a.addContentsCss(this.path+"styles/copyformatting.css"),a.copyFormatting=new s.state(a),a.addCommand("copyFormatting",s.commands.copyFormatting),a.addCommand("applyFormatting",s.commands.applyFormatting),a.ui.addButton("CopyFormatting",{label:a.lang.copyformatting.label,command:"copyFormatting",toolbar:"cleanup,0"}),a.on("contentDom",function(){var n=a.editable(),e=n.isInline()?n:a.document,t=a.ui.get("CopyFormatting");n.attachListener(e,"mouseup",function(e){i(e)===CKEDITOR.MOUSE_BUTTON_LEFT&&a.execCommand("applyFormatting")}),n.attachListener(CKEDITOR.document,"mouseup",function(e){var t=a.getCommand("copyFormatting");i(e)!==CKEDITOR.MOUSE_BUTTON_LEFT||t.state!==CKEDITOR.TRISTATE_ON||n.contains(e.data.getTarget())||a.execCommand("copyFormatting")}),t&&(e=CKEDITOR.document.getById(t._.id),n.attachListener(e,"dblclick",function(){a.execCommand("copyFormatting",{sticky:!0})}),n.attachListener(e,"mouseup",function(e){e.data.stopPropagation()}))}),a.config.copyFormatting_keystrokeCopy&&a.setKeystroke(a.config.copyFormatting_keystrokeCopy,"copyFormatting"),a.on("key",function(e){var t=a.getCommand("copyFormatting");(e=e.data.domEvent).getKeystroke&&27===e.getKeystroke()&&t.state===CKEDITOR.TRISTATE_ON&&a.execCommand("copyFormatting")}),a.copyFormatting.on("extractFormatting",function(e){var t=e.data.element;return t.contains(a.editable())||t.equals(a.editable())?e.cancel():(t=s._convertElementToStyleDef(t),a.copyFormatting.filter.check(new CKEDITOR.style(t),!0,!0)?void(e.data.styleDef=t):e.cancel())}),a.copyFormatting.on("applyFormatting",function(e){if(!e.data.preventFormatStripping){var t,n,i=e.data.range,o=s._extractStylesFromRange(a,i),r=s._determineContext(i);if(a.copyFormatting._isContextAllowed(r))for(n=0;n <\/span>/g,"")).replace(/<.*?>/g,""):e.getText()}function u(e,t){var n,i,o=e,r=/\s/g,a="p br ol ul li td th div caption body".split(" "),s=!1,l=!1;do{for(n=c(o,t);!n&&o.getParent();){if(o=o.getParent(),-1!==h(a,o.getName())){l=s=!0;break}n=c(o,t)}if(n&&n.getName&&-1!==h(a,n.getName())){s=!0;break}o=n}while(o&&o.getStyle&&("none"==o.getStyle("display")||!o.getText()));for(o||(o=e);o.type!==CKEDITOR.NODE_TEXT;)o=!s||t||l?o.getChild(0):o.getChild(o.getChildCount()-1);for(a=d(o);null!=(l=r.exec(a))&&(i=l.index,t););if("number"!=typeof i&&!s)return u(o,t);if(s)t?i=0:i=(l=(r=/([\.\b]*$)/).exec(a))?l.index:a.length;else if(t&&(i+=1)>a.length)return u(o);return{node:o,offset:i}}var t,n,i,o,r,a=/\b\w+\b/gi;for(t=d(i=o=r=e.startContainer);null!=(n=a.exec(t));)if(n.index+n[0].length>=e.startOffset)return e=n.index,a=n.index+n[0].length,0===n.index&&(o=(n=u(i,!0)).node,e=n.offset),a>=t.length&&(r=(t=u(i)).node,a=t.offset),{startNode:o,startOffset:e,endNode:r,endOffset:a};return null},_filterStyles:function(e){var t,n,i=CKEDITOR.tools.isEmpty,o=[];for(n=0;n
    ')).getChild(0)},_getScreenReaderContainer:function(){if(!CKEDITOR.env.ie6Compat&&!CKEDITOR.env.ie7Compat)return CKEDITOR.document.getBody().findOne(".cke_copyformatting_notification div[aria-live]")},_attachPasteKeystrokeHandler:function(e){var t=e.config.copyFormatting_keystrokePaste;t&&(this._initialKeystrokePasteCommand=e.keystrokeHandler.keystrokes[t],e.setKeystroke(t,"applyFormatting"))},_detachPasteKeystrokeHandler:function(e){var t=e.config.copyFormatting_keystrokePaste;t&&e.setKeystroke(t,this._initialKeystrokePasteCommand||!1)}},CKEDITOR.config.copyFormatting_outerCursor=!0,CKEDITOR.config.copyFormatting_allowRules="b s u i em strong span p div td th ol ul li(*)[*]{*}",CKEDITOR.config.copyFormatting_disallowRules="*[data-cke-widget*,data-widget*,data-cke-realelement](cke_widget*)",CKEDITOR.config.copyFormatting_allowedContexts=!0,CKEDITOR.config.copyFormatting_keystrokeCopy=CKEDITOR.CTRL+CKEDITOR.SHIFT+67,CKEDITOR.config.copyFormatting_keystrokePaste=CKEDITOR.CTRL+CKEDITOR.SHIFT+86}(),CKEDITOR.plugins.add("div",{requires:"dialog",init:function(t){if(!t.blockless){var e=t.lang.div,n="div(*)";CKEDITOR.dialog.isTabEnabled(t,"editdiv","advanced")&&(n+=";div[dir,id,lang,title]{*}"),t.addCommand("creatediv",new CKEDITOR.dialogCommand("creatediv",{allowedContent:n,requiredContent:"div",contextSensitive:!0,contentTransformations:[["div: alignmentToStyle"]],refresh:function(e,t){this.setState("div"in(e.config.div_wrapTable?t.root:t.blockLimit).getDtd()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}})),t.addCommand("editdiv",new CKEDITOR.dialogCommand("editdiv",{requiredContent:"div"})),t.addCommand("removediv",{requiredContent:"div",exec:function(t){function e(e){(e=CKEDITOR.plugins.div.getSurroundDiv(t,e))&&!e.data("cke-div-added")&&(a.push(e),e.data("cke-div-added"))}for(var n,i=t.getSelection(),o=i&&i.getRanges(),r=i.createBookmarks(),a=[],s=0;sl.width&&(r.resize_minWidth=l.width),r.resize_minHeight>l.height&&(r.resize_minHeight=l.height),CKEDITOR.document.on("mousemove",t),CKEDITOR.document.on("mouseup",n),o.document&&(o.document.on("mousemove",t),o.document.on("mouseup",n)),e.preventDefault&&e.preventDefault()});o.on("destroy",function(){CKEDITOR.tools.removeFunction(h)}),o.on("uiSpace",function(e){if("bottom"==e.data.space){var t="";d&&!u&&(t=" cke_resizer_horizontal"),!d&&u&&(t=" cke_resizer_vertical");var n=''+("ltr"==a?"\u25e2":"\u25e3")+"";"ltr"==a&&"ltr"==t?e.data.html+=n:e.data.html=n+e.data.html}},o,null,100),o.on("maximize",function(e){o.ui.space("resizer")[e.data==CKEDITOR.TRISTATE_ON?"hide":"show"]()})}}}),function(){function n(h,e){function o(e){var t;(e=g.list[e]).equals(h.editable())||"true"==e.getAttribute("contenteditable")?((t=h.createRange()).selectNodeContents(e),t=t.select()):(t=h.getSelection()).selectElement(e),CKEDITOR.env.ie&&h.fire("selectionChange",{selection:t,path:new CKEDITOR.dom.elementPath(e)}),h.focus()}function t(){f&&f.setHtml(' '),delete g.list}var f,p=h.ui.spaceId("path"),g=h._.elementsPath,m=g.idBase;e.html+=''+h.lang.elementspath.eleLabel+' ',h.on("uiReady",function(){var e=h.ui.space("path");e&&h.focusManager.add(e,1)}),g.onClick=o;var E=CKEDITOR.tools.addFunction(o),T=CKEDITOR.tools.addFunction(function(e,t){var n,i=g.idBase;switch(t=new CKEDITOR.dom.event(t),n="rtl"==h.lang.dir,t.getKeystroke()){case n?39:37:case 9:return(n=CKEDITOR.document.getById(i+(e+1)))||(n=CKEDITOR.document.getById(i+"0")),n.focus(),!1;case n?37:39:case CKEDITOR.SHIFT+9:return(n=CKEDITOR.document.getById(i+(e-1)))||(n=CKEDITOR.document.getById(i+(g.list.length-1))),n.focus(),!1;case 27:return h.focus(),!1;case 13:case 32:return o(e),!1}return!0});h.on("selectionChange",function(e){for(var t=[],n=g.list=[],i=[],o=g.filters,r=!0,a=e.data.path.elements,s=a.length;s--;){var l=a[s],c=0;e=l.data("cke-display-name")?l.data("cke-display-name"):l.data("cke-real-element-type")?l.data("cke-real-element-type"):l.getName(),(r=l.hasAttribute("contenteditable")?"true"==l.getAttribute("contenteditable"):r)||l.hasAttribute("contenteditable")||(c=1);for(var d=0;d '),h.fire("elementsPathUpdate",{space:i})}),h.on("readOnly",t),h.on("contentDomUnload",t),h.addCommand("elementsPathFocus",i.toolbarFocus),h.setKeystroke(CKEDITOR.ALT+122,"elementsPathFocus")}var i={toolbarFocus:{editorFocus:!1,readOnly:1,exec:function(e){(e=CKEDITOR.document.getById(e._.elementsPath.idBase+"0"))&&e.focus(CKEDITOR.env.ie||CKEDITOR.env.air)}}},e="";CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(e+=' onkeypress="return false;"'),CKEDITOR.env.gecko&&(e+=' onblur="this.style.cssText = this.style.cssText;"');var C=CKEDITOR.addTemplate("pathItem",'{text}');CKEDITOR.plugins.add("elementspath",{init:function(t){t._.elementsPath={idBase:"cke_elementspath_"+CKEDITOR.tools.getNextNumber()+"_",filters:[]},t.on("uiSpace",function(e){"bottom"==e.data.space&&n(t,e.data)})}})}(),function(){function t(e,t,n){if(n=e.config.forceEnterMode||n,"wysiwyg"==e.mode){t||(t=e.activeEnterMode);var i=e.elementPath();i&&!i.isContextFor("p")&&(t=CKEDITOR.ENTER_BR,n=1),e.fire("saveSnapshot"),t==CKEDITOR.ENTER_BR?C(e,t,null,n):c(e,t,null,n),e.fire("saveSnapshot")}}function g(e){for(var t=(e=e.getSelection().getRanges(!0)).length-1;0",lt:"<",amp:"&",apos:"'",quot:'"'};if(e=e.replace(/\b(nbsp|shy|gt|lt|amp|apos|quot)(?:,|$)/g,function(e,t){var n=i?"&"+t+";":a[t];return o[n]=i?a[t]:"&"+t+";",r.push(n),""}),!i&&e){e=e.split(",");var t,n=document.createElement("div");for(n.innerHTML="&"+e.join(";&")+";",t=n.innerHTML,n=null,n=0;nl.height-s.bottom?i("pin"):i("bottom"),e=l.width/2,e=m.floatSpacePreferRight?"right":0a.width?"rtl"==m.contentsLangDirection?"right":"left":e-s.left>s.right-e?"left":"right",a.width>l.width?(e="left",t=0):(t="left"==e?0l.width&&(e="left"==e?"right":"left",t=0),T.setStyle(e,v(("pin"==o?f:u)+t+("pin"==o?0:"left"==e?d:-d)))):(i(o="pin"),E(e))}}}();if(e){var t=new CKEDITOR.template('
    "+(g.title?'{voiceLabel}':" ")+'
    '),T=CKEDITOR.document.getBody().append(CKEDITOR.dom.element.createFromHtml(t.output({content:e,id:g.id,langDir:g.lang.dir,langCode:g.langCode,name:g.name,style:"display:none;z-index:"+(m.baseFloatZIndex-1),topId:g.ui.spaceId("top"),voiceLabel:g.title}))),n=CKEDITOR.tools.eventsBuffer(500,E),i=CKEDITOR.tools.eventsBuffer(100,E);T.unselectable(),T.on("mousedown",function(e){(e=e.data).getTarget().hasAscendant("a",1)||e.preventDefault()}),g.on("focus",function(e){E(e),g.on("change",n.input),C.on("scroll",i.input),C.on("resize",i.input)}),g.on("blur",function(){T.hide(),g.removeListener("change",n.input),C.removeListener("scroll",i.input),C.removeListener("resize",i.input)}),g.on("destroy",function(){C.removeListener("scroll",i.input),C.removeListener("resize",i.input),T.clearCustomData(),T.remove()}),g.focusManager.hasFocus&&T.show(),g.focusManager.add(T,1)}}var C=CKEDITOR.document.getWindow(),v=CKEDITOR.tools.cssLength;CKEDITOR.plugins.add("floatingspace",{init:function(e){e.on("loaded",function(){t(this)},null,null,20)}})}(),CKEDITOR.plugins.add("listblock",{requires:"panel",onLoad:function(){var t=CKEDITOR.addTemplate("panel-list",''),o=CKEDITOR.addTemplate("panel-list-item",''),n=CKEDITOR.addTemplate("panel-list-group",'

    {label}

    '),r=/\'/g;CKEDITOR.ui.panel.prototype.addListBlock=function(e,t){return this.addBlock(e,new CKEDITOR.ui.listBlock(this.getHolderElement(),t))},CKEDITOR.ui.listBlock=CKEDITOR.tools.createClass({base:CKEDITOR.ui.panel.block,$:function(e,t){var n=(t=t||{}).attributes||(t.attributes={});(this.multiSelect=!!t.multiSelect)&&(n["aria-multiselectable"]=!0),!n.role&&(n.role="listbox"),this.base.apply(this,arguments),this.element.setAttribute("role",n.role),(n=this.keys)[40]="next",n[9]="next",n[38]="prev",n[CKEDITOR.SHIFT+9]="prev",n[32]=CKEDITOR.env.ie?"mouseup":"click",CKEDITOR.env.ie&&(n[13]="mouseup"),this._.pendingHtml=[],this._.pendingList=[],this._.items={},this._.groups={}},_:{close:function(){if(this._.started){var e=t.output({items:this._.pendingList.join("")});this._.pendingList=[],this._.pendingHtml.push(e),delete this._.started}},getClick:function(){return this._.click||(this._.click=CKEDITOR.tools.addFunction(function(e){var t=this.toggle(e);this.onClick&&this.onClick(e,t)},this)),this._.click}},proto:{add:function(e,t,n){var i=CKEDITOR.tools.getNextId();this._.started||(this._.started=1,this._.size=this._.size||0),e={id:this._.items[e]=i,val:CKEDITOR.tools.htmlEncodeAttr(e).replace(r,"\\'"),onclick:CKEDITOR.env.ie?'onclick="return false;" onmouseup':"onclick",clickFn:this._.getClick(),title:CKEDITOR.tools.htmlEncodeAttr(n||e),text:t||e},this._.pendingList.push(o.output(e))},startGroup:function(e){this._.close();var t=CKEDITOR.tools.getNextId();this._.groups[e]=t,this._.pendingHtml.push(n.output({id:t,label:e}))},commit:function(){this._.close(),this.element.appendHtml(this._.pendingHtml.join("")),delete this._.size,this._.pendingHtml=[]},toggle:function(e){var t=this.isMarked(e);return t?this.unmark(e):this.mark(e),!t},hideGroup:function(e){var t=(e=this.element.getDocument().getById(this._.groups[e]))&&e.getNext();e&&(e.setStyle("display","none"),t&&"ul"==t.getName()&&t.setStyle("display","none"))},hideItem:function(e){this.element.getDocument().getById(this._.items[e]).setStyle("display","none")},showAll:function(){var e,t=this._.items,n=this._.groups,i=this.element.getDocument();for(e in t)i.getById(t[e]).setStyle("display","");for(var o in n)e=(t=i.getById(n[o])).getNext(),t.setStyle("display",""),e&&"ul"==e.getName()&&e.setStyle("display","")},mark:function(e){this.multiSelect||this.unmarkAll(),e=this._.items[e];var t=this.element.getDocument().getById(e);t.addClass("cke_selected"),this.element.getDocument().getById(e+"_option").setAttribute("aria-selected",!0),this.onMark&&this.onMark(t)},markFirstDisplayed:function(){var e=this;this._.markFirstDisplayed(function(){e.multiSelect||e.unmarkAll()})},unmark:function(e){var t=this.element.getDocument();e=this._.items[e];var n=t.getById(e);n.removeClass("cke_selected"),t.getById(e+"_option").removeAttribute("aria-selected"),this.onUnmark&&this.onUnmark(n)},unmarkAll:function(){var e,t=this._.items,n=this.element.getDocument();for(e in t){var i=t[e];n.getById(i).removeClass("cke_selected"),n.getById(i+"_option").removeAttribute("aria-selected")}this.onUnmark&&this.onUnmark()},isMarked:function(e){return this.element.getDocument().getById(this._.items[e]).hasClass("cke_selected")},focus:function(e){this._.focusIndex=-1;var t,n=this.element.getElementsByTag("a"),i=-1;if(e){for(t=this.element.getDocument().getById(this._.items[e]).getFirst();e=n.getItem(++i);)if(e.equals(t)){this._.focusIndex=i;break}}else this.element.focus();t&&setTimeout(function(){t.focus()},0)}}})}}),CKEDITOR.plugins.add("richcombo",{requires:"floatpanel,listblock,button",beforeInit:function(e){e.ui.addHandler(CKEDITOR.UI_RICHCOMBO,CKEDITOR.ui.richCombo.handler)}}),function(){var e='{label}{label}'+(CKEDITOR.env.hc?"▼":CKEDITOR.env.air?" ":"")+"";var u=CKEDITOR.addTemplate("combo",e);CKEDITOR.UI_RICHCOMBO="richcombo",CKEDITOR.ui.richCombo=CKEDITOR.tools.createClass({$:function(e){CKEDITOR.tools.extend(this,e,{canGroup:!1,title:e.label,modes:{wysiwyg:1},editorFocus:1}),e=this.panel||{},delete this.panel,this.id=CKEDITOR.tools.getNextNumber(),this.document=e.parent&&e.parent.getDocument()||CKEDITOR.document,e.className="cke_combopanel",e.block={multiSelect:e.multiSelect,attributes:e.attributes},e.toolbarRelated=!0,this._={panelDefinition:e,items:{}}},proto:{renderHtml:function(e){var t=[];return this.render(e,t),t.join("")},render:function(i,e){function t(){if(this.getState()!=CKEDITOR.TRISTATE_ON){var e=this.modes[i.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED;i.readOnly&&!this.readOnly&&(e=CKEDITOR.TRISTATE_DISABLED),this.setState(e),this.setValue(""), +e!=CKEDITOR.TRISTATE_DISABLED&&this.refresh&&this.refresh()}}var n=CKEDITOR.env,o="cke_"+this.id,r=CKEDITOR.tools.addFunction(function(e){d&&(i.unlockSelection(1),d=0),s.execute(e)},this),a=this,s={id:o,combo:this,focus:function(){CKEDITOR.document.getById(o).getChild(1).focus()},execute:function(e){var t=a._;if(t.state!=CKEDITOR.TRISTATE_DISABLED)if(a.createPanel(i),t.on)t.panel.hide();else{a.commit();var n=a.getValue();n?t.list.mark(n):t.list.unmarkAll(),t.panel.showBlock(a.id,new CKEDITOR.dom.element(e),4)}},clickFn:r};i.on("activeFilterChange",t,this),i.on("mode",t,this),i.on("selectionChange",t,this),!this.readOnly&&i.on("readOnly",t,this);var l=CKEDITOR.tools.addFunction(function(e,t){var n=(e=new CKEDITOR.dom.event(e)).getKeystroke();switch(n){case 13:case 32:case 40:CKEDITOR.tools.callFunction(r,t);break;default:s.onkey(s,n)}e.preventDefault()}),c=CKEDITOR.tools.addFunction(function(){s.onfocus&&s.onfocus()}),d=0;return s.keyDownFn=l,n={id:o,name:this.name||this.command,label:this.label,title:this.title,cls:this.className||"",titleJs:n.gecko&&!n.hc?"":(this.title||"").replace("'",""),keydownFn:l,focusFn:c,clickFn:r},u.output(n,e),this.onRender&&this.onRender(),s},createPanel:function(t){if(!this._.panel){var e=this._.panelDefinition,n=this._.panelDefinition.block,i=e.parent||CKEDITOR.document.getBody(),o="cke_combopanel__"+this.name,r=new CKEDITOR.ui.floatPanel(t,i,e),a=(e=r.addListBlock(this.id,n),this);r.onShow=function(){this.element.addClass(o),a.setState(CKEDITOR.TRISTATE_ON),a._.on=1,a.editorFocus&&!t.focusManager.hasFocus&&t.focus(),a.onOpen&&a.onOpen()},r.onHide=function(e){this.element.removeClass(o),a.setState(a.modes&&a.modes[t.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED),a._.on=0,!e&&a.onClose&&a.onClose()},r.onEscape=function(){r.hide(1)},e.onClick=function(e,t){a.onClick&&a.onClick.call(a,e,t),r.hide()},this._.panel=r,this._.list=e,r.getBlock(this.id).onHide=function(){a._.on=0,a.setState(CKEDITOR.TRISTATE_OFF)},this.init&&this.init()}},setValue:function(e,t){this._.value=e;var n=this.document.getById("cke_"+this.id+"_text");n&&(e||t?n.removeClass("cke_combo_inlinelabel"):(t=this.label,n.addClass("cke_combo_inlinelabel")),n.setText(void 0!==t?t:e))},getValue:function(){return this._.value||""},unmarkAll:function(){this._.list.unmarkAll()},mark:function(e){this._.list.mark(e)},hideItem:function(e){this._.list.hideItem(e)},hideGroup:function(e){this._.list.hideGroup(e)},showAll:function(){this._.list.showAll()},add:function(e,t,n){this._.items[e]=n||e,this._.list.add(e,t,n)},startGroup:function(e){this._.list.startGroup(e)},commit:function(){this._.committed||(this._.list.commit(),this._.committed=1,CKEDITOR.ui.fire("ready",this)),this._.committed=1},setState:function(e){if(this._.state!=e){var t=this.document.getById("cke_"+this.id);t.setState(e,"cke_combo"),e==CKEDITOR.TRISTATE_DISABLED?t.setAttribute("aria-disabled",!0):t.removeAttribute("aria-disabled"),this._.state=e}},getState:function(){return this._.state},enable:function(){this._.state==CKEDITOR.TRISTATE_DISABLED&&this.setState(this._.lastState)},disable:function(){this._.state!=CKEDITOR.TRISTATE_DISABLED&&(this._.lastState=this._.state,this.setState(CKEDITOR.TRISTATE_DISABLED))}},statics:{handler:{create:function(e){return new CKEDITOR.ui.richCombo(e)}}}}),CKEDITOR.ui.prototype.addRichCombo=function(e,t){this.add(e,CKEDITOR.UI_RICHCOMBO,t)}}(),function(){function n(l,e,t,n,i,r,o,a){var s=l.config,c=new CKEDITOR.style(o),d=i.split(";");i=[];for(var u={},h=0;h",this.lineBreakChars="\n",this.sortAttributes=1,this._.indent=0,this._.indentation="",this._.inPre=0,this._.rules={};var e,t=CKEDITOR.dtd;for(e in CKEDITOR.tools.extend({},t.$nonBodyContent,t.$block,t.$listItem,t.$tableContent))this.setRules(e,{indent:!t[e]["#"],breakBeforeOpen:1,breakBeforeClose:!t[e]["#"],breakAfterClose:1,needsSpace:e in t.$block&&!(e in{li:1,dt:1,dd:1})});this.setRules("br",{breakAfterOpen:1}),this.setRules("title",{indent:0,breakAfterOpen:0}),this.setRules("style",{indent:0,breakBeforeClose:1}),this.setRules("pre",{breakAfterOpen:1,indent:0})},proto:{openTag:function(e){var t=this._.rules[e];this._.afterCloser&&t&&t.needsSpace&&this._.needsSpace&&this._.output.push("\n"),this._.indent?this.indentation():t&&t.breakBeforeOpen&&(this.lineBreak(),this.indentation()),this._.output.push("<",e),this._.afterCloser=0},openTagClose:function(e,t){var n=this._.rules[e];t?(this._.output.push(this.selfClosingEnd),n&&n.breakAfterClose&&(this._.needsSpace=n.needsSpace)):(this._.output.push(">"),n&&n.indent&&(this._.indentation+=this.indentationChars)),n&&n.breakAfterOpen&&this.lineBreak(),"pre"==e&&(this._.inPre=1)},attribute:function(e,t){"string"==typeof t&&(this.forceSimpleAmpersand&&(t=t.replace(/&/g,"&")),t=CKEDITOR.tools.htmlEncodeAttr(t)),this._.output.push(" ",e,'="',t,'"')},closeTag:function(e){var t=this._.rules[e];t&&t.indent&&(this._.indentation=this._.indentation.substr(this.indentationChars.length)),this._.indent?this.indentation():t&&t.breakBeforeClose&&(this.lineBreak(),this.indentation()),this._.output.push(""),"pre"==e&&(this._.inPre=0),t&&t.breakAfterClose&&(this.lineBreak(),this._.needsSpace=t.needsSpace),this._.afterCloser=1},text:function(e){this._.indent&&(this.indentation(),!this._.inPre&&(e=CKEDITOR.tools.ltrim(e))),this._.output.push(e)},comment:function(e){this._.indent&&this.indentation(),this._.output.push("")},lineBreak:function(){!this._.inPre&&0this.$.offsetHeight){var n=i.createRange();n[33==t?"moveToElementEditStart":"moveToElementEditEnd"](this),n.select(),e.data.preventDefault()}}),CKEDITOR.env.ie&&this.attachListener(o,"blur",function(){try{o.$.selection.empty()}catch(e){}}),CKEDITOR.env.iOS&&this.attachListener(o,"touchend",function(){e.focus()}),(n=i.document.getElementsByTag("title").getItem(0)).data("cke-title",n.getText()),CKEDITOR.env.ie&&(i.document.$.title=this._.docTitle),CKEDITOR.tools.setTimeout(function(){"unloaded"==this.status&&(this.status="ready"),i.fire("contentDom"),this._.isPendingFocus&&(i.focus(),this._.isPendingFocus=!1),setTimeout(function(){i.fire("dataReady")},0)},0,this)}function l(n){function e(){var t;n.editable().attachListener(n,"selectionChange",function(){var e=n.getSelection().getSelectedElement();e&&(t&&(t.detachEvent("onresizestart",i),t=null),e.$.attachEvent("onresizestart",i),t=e.$)})}function i(e){e.returnValue=!1}if(CKEDITOR.env.gecko)try{var t=n.document.$;t.execCommand("enableObjectResizing",!1,!n.config.disableObjectResizing),t.execCommand("enableInlineTableEditing",!1,!n.config.disableNativeTableHandles)}catch(o){}else CKEDITOR.env.ie&&CKEDITOR.env.version<11&&n.config.disableObjectResizing&&e(n)}function c(){var e=[];if(8<=CKEDITOR.document.$.documentMode){e.push("html.CSS1Compat [contenteditable=false]{min-height:0 !important}");var t,n=[];for(t in CKEDITOR.dtd.$removeEmpty)n.push("html.CSS1Compat "+t+"[contenteditable=false]");e.push(n.join(",")+"{display:inline-block}")}else CKEDITOR.env.gecko&&(e.push("html{height:100% !important}"),e.push("img:-moz-broken{-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}"));return e.push("html{cursor:text;*cursor:auto}"),e.push("img,input,textarea{cursor:default}"),e.join("\n")}var d;CKEDITOR.plugins.add("wysiwygarea",{init:function(l){l.config.fullPage&&l.addFeature({allowedContent:"html head title; style [media,type]; body (*)[id]; meta link [*]",requiredContent:"body"}),l.addMode("wysiwyg",function(t){function e(e){e&&e.removeListener(),l.editable(new d(l,i.$.contentWindow.document.body)),l.setData(l.getData(1),t)}var n="document.open();"+(CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+")();":"")+"document.close();",i=(n=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie&&!CKEDITOR.env.edge?"javascript:void(function(){"+encodeURIComponent(n)+"}())":"",CKEDITOR.dom.element.createFromHtml(''));i.setStyles({width:"100%",height:"100%"}),i.addClass("cke_wysiwyg_frame").addClass("cke_reset"),(n=l.ui.space("contents")).append(i);var o=CKEDITOR.env.ie&&!CKEDITOR.env.edge||CKEDITOR.env.gecko;o&&i.on("load",e);var r=l.title,a=l.fire("ariaEditorHelpLabel",{}).label;if(r&&(CKEDITOR.env.ie&&a&&(r+=", "+a),i.setAttribute("title",r)),a){r=CKEDITOR.tools.getNextId();var s=CKEDITOR.dom.element.createFromHtml(''+a+"");n.append(s,1),i.setAttribute("aria-describedby",r)}l.on("beforeModeUnload",function(e){e.removeListener(),s&&s.remove()}),i.setAttributes({tabIndex:l.tabIndex,allowTransparency:"true"}),!o&&e(),l.fire("ariaWidget",i)})}}),CKEDITOR.editor.prototype.addContentsCss=function(e){var t=this.config,n=t.contentsCss;CKEDITOR.tools.isArray(n)||(t.contentsCss=n?[n]:[]),t.contentsCss.push(e)},d=CKEDITOR.tools.createClass({$:function(){this.base.apply(this,arguments),this._.frameLoadedHandler=CKEDITOR.tools.addFunction(function(e){CKEDITOR.tools.setTimeout(t,0,this,e)},this),this._.docTitle=this.getWindow().getFrame().getAttribute("title")},base:CKEDITOR.editable,proto:{setData:function(e,t){var n=this.editor;if(t)this.setHtml(e),this.fixInitialSelection(),n.fire("dataReady");else{this._.isLoadingData=!0,n._.dataStore={id:1};var i=n.config,o=i.fullPage,r=i.docType,a=CKEDITOR.tools.buildStyleHtml(c()).replace(/").appendTo(a)),r.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",r.opacity)),r.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",r.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!n)for(i=this.containers.length-1;0<=i;i--)this.containers[i]._trigger("activate",e,this._uiHash(this));return p.ui.ddmanager&&(p.ui.ddmanager.current=this),p.ui.ddmanager&&!r.dropBehaviour&&p.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var t,n,i,a,r=this.options,s=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageYe[this.floating?"width":"height"]?p:r",n.document[0]).addClass(i||n.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tbody"===e?n._createTrPlaceholder(n.currentItem.find("tr").eq(0),p("",n.document[0]).appendTo(t)):"tr"===e?n._createTrPlaceholder(n.currentItem,t):"img"===e&&t.attr("src",n.currentItem.attr("src")),i||t.css("visibility","hidden"),t},update:function(e,t){i&&!a.forcePlaceholderSize||(t.height()||t.height(n.currentItem.innerHeight()-parseInt(n.currentItem.css("paddingTop")||0,10)-parseInt(n.currentItem.css("paddingBottom")||0,10)),t.width()||t.width(n.currentItem.innerWidth()-parseInt(n.currentItem.css("paddingLeft")||0,10)-parseInt(n.currentItem.css("paddingRight")||0,10)))}}),n.placeholder=p(a.placeholder.element.call(n.element,n.currentItem)),n.currentItem.after(n.placeholder),a.placeholder.update(n,n.placeholder)},_createTrPlaceholder:function(e,t){var n=this;e.children().each(function(){p(" ",n.document[0]).attr("colspan",p(this).attr("colspan")||1).appendTo(t)})},_contactContainers:function(e){var t,n,i,a,r,s,o,l,d,u,c=null,h=null;for(t=this.containers.length-1;0<=t;t--)if(!p.contains(this.currentItem[0],this.containers[t].element[0]))if(this._intersectsWith(this.containers[t].containerCache)){if(c&&p.contains(this.containers[t].element[0],c.element[0]))continue;c=this.containers[t],h=t}else this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",e,this._uiHash(this)),this.containers[t].containerCache.over=0);if(c)if(1===this.containers.length)this.containers[h].containerCache.over||(this.containers[h]._trigger("over",e,this._uiHash(this)),this.containers[h].containerCache.over=1);else{for(i=1e4,a=null,r=(d=c.floating||this._isFloating(this.currentItem))?"left":"top",s=d?"width":"height",u=d?"clientX":"clientY",n=this.items.length-1;0<=n;n--)p.contains(this.containers[h].element[0],this.items[n].item[0])&&this.items[n].item[0]!==this.currentItem[0]&&(o=this.items[n].item.offset()[r],l=!1,e[u]-o>this.items[n][s]/2&&(l=!0),Math.abs(e[u]-o)this.containment[2]&&(a=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(r=this.containment[3]+this.offset.click.top)),i.grid&&(t=this.originalPageY+Math.round((r-this.originalPageY)/i.grid[1])*i.grid[1],r=this.containment?t-this.offset.click.top>=this.containment[1]&&t-this.offset.click.top<=this.containment[3]?t:t-this.offset.click.top>=this.containment[1]?t-i.grid[1]:t+i.grid[1]:t,n=this.originalPageX+Math.round((a-this.originalPageX)/i.grid[0])*i.grid[0],a=this.containment?n-this.offset.click.left>=this.containment[0]&&n-this.offset.click.left<=this.containment[2]?n:n-this.offset.click.left>=this.containment[0]?n-i.grid[0]:n+i.grid[0]:n)),{top:r-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:s.scrollTop()),left:a-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:s.scrollLeft())}},_rearrange:function(e,t,n,i){n?n[0].appendChild(this.placeholder[0]):t.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?t.item[0]:t.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var a=this.counter;this._delay(function(){a===this.counter&&this.refreshPositions(!i)})},_clear:function(e,t){function n(t,n,i){return function(e){i._trigger(t,e,n._uiHash(n))}}this.reverting=!1;var i,a=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)"auto"!==this._storedCSS[i]&&"static"!==this._storedCSS[i]||(this._storedCSS[i]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!t&&a.push(function(e){this._trigger("receive",e,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||t||a.push(function(e){this._trigger("update",e,this._uiHash())}),this!==this.currentContainer&&(t||(a.push(function(e){this._trigger("remove",e,this._uiHash())}),a.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),a.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),i=this.containers.length-1;0<=i;i--)t||a.push(n("deactivate",this,this.containers[i])),this.containers[i].containerCache.over&&(a.push(n("out",this,this.containers[i])),this.containers[i].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,t||this._trigger("beforeStop",e,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!t){for(i=0;i
    "),i=n.children()[0];return x("body").append(n),e=i.offsetWidth,n.css("overflow","scroll"),e===(t=i.offsetWidth)&&(t=n[0].clientWidth),n.remove(),a=e-t},getScrollInfo:function(e){var t=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),n=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),i="scroll"===t||"auto"===t&&e.widthY(D(i),D(a))?r.important="horizontal":r.important="vertical",c.using.call(this,e,r)}),s.offset(x.extend(d,{using:e}))})},x.ui.position={fit:{left:function(e,t){var n,i=t.within,a=i.isWindow?i.scrollLeft:i.offset.left,r=i.width,s=e.left-t.collisionPosition.marginLeft,o=a-s,l=s+t.collisionWidth-r-a;t.collisionWidth>r?0r?0",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},items:"> *",menus:"ul",position:{my:"left-1 top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item":function(e){e.preventDefault()},"click .ui-menu-item":function(e){var t=o(e.target);!this.mouseHandled&&t.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),t.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&o(this.document[0].activeElement).closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){if(!this.previousFilter){var t=o(e.currentTarget);t.siblings(".ui-state-active").removeClass("ui-state-active"),this.focus(e,t)}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(e,t){var n=this.active||this.element.find(this.options.items).eq(0);t||this.focus(e,n)},blur:function(e){this._delay(function(){o.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){this._closeOnDocumentClick(e)&&this.collapseAll(e),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-menu-icons ui-front").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").removeUniqueId().removeClass("ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var e=o(this);e.data("ui-menu-submenu-carat")&&e.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(e){var t,n,i,a,r=!0;switch(e.keyCode){case o.ui.keyCode.PAGE_UP:this.previousPage(e);break;case o.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case o.ui.keyCode.HOME:this._move("first","first",e);break;case o.ui.keyCode.END:this._move("last","last",e);break;case o.ui.keyCode.UP:this.previous(e);break;case o.ui.keyCode.DOWN:this.next(e);break;case o.ui.keyCode.LEFT:this.collapse(e);break;case o.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case o.ui.keyCode.ENTER:case o.ui.keyCode.SPACE:this._activate(e);break;case o.ui.keyCode.ESCAPE:this.collapse(e);break;default:r=!1,n=this.previousFilter||"",i=String.fromCharCode(e.keyCode),a=!1,clearTimeout(this.filterTimer),i===n?a=!0:i=n+i,t=this._filterMenuItems(i),(t=a&&-1!==t.index(this.active.next())?this.active.nextAll(".ui-menu-item"):t).length||(i=String.fromCharCode(e.keyCode),t=this._filterMenuItems(i)),t.length?(this.focus(e,t),this.previousFilter=i,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}r&&e.preventDefault()},_activate:function(e){this.active.is(".ui-state-disabled")||(this.active.is("[aria-haspopup='true']")?this.expand(e):this.select(e))},refresh:function(){var e,t=this,i=this.options.icons.submenu,n=this.element.find(this.options.menus);this.element.toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length),n.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-front").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=o(this),t=e.parent(),n=o("").addClass("ui-menu-icon ui-icon "+i).data("ui-menu-submenu-carat",!0);t.attr("aria-haspopup","true").prepend(n),e.attr("aria-labelledby",t.attr("id"))}),(e=n.add(this.element).find(this.options.items)).not(".ui-menu-item").each(function(){var e=o(this);t._isDivider(e)&&e.addClass("ui-widget-content ui-menu-divider")}),e.not(".ui-menu-item, .ui-menu-divider").addClass("ui-menu-item").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),e.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!o.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(e,t){"icons"===e&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(t.submenu),"disabled"===e&&this.element.toggleClass("ui-state-disabled",!!t).attr("aria-disabled",t),this._super(e,t)},focus:function(e,t){var n,i;this.blur(e,e&&"focus"===e.type),this._scrollIntoView(t),this.active=t.first(),i=this.active.addClass("ui-state-focus").removeClass("ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",i.attr("id")),this.active.parent().closest(".ui-menu-item").addClass("ui-state-active"),e&&"keydown"===e.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),(n=t.children(".ui-menu")).length&&e&&/^mouse/.test(e.type)&&this._startOpening(n),this.activeMenu=t.parent(),this._trigger("focus",e,{item:t})},_scrollIntoView:function(e){var t,n,i,a,r,s;this._hasScroll()&&(t=parseFloat(o.css(this.activeMenu[0],"borderTopWidth"))||0,n=parseFloat(o.css(this.activeMenu[0],"paddingTop"))||0,i=e.offset().top-this.activeMenu.offset().top-t-n,a=this.activeMenu.scrollTop(),r=this.activeMenu.height(),s=e.outerHeight(),i<0?this.activeMenu.scrollTop(a+i):r",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var n,i,a,e=this.element[0].nodeName.toLowerCase(),t="textarea"===e,r="input"===e;this.isMultiLine=!!t||!r&&this.element.prop("isContentEditable"),this.valueMethod=this.element[t||r?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(e){if(this.element.prop("readOnly"))i=a=n=!0;else{i=a=n=!1;var t=s.ui.keyCode;switch(e.keyCode){case t.PAGE_UP:n=!0,this._move("previousPage",e);break;case t.PAGE_DOWN:n=!0,this._move("nextPage",e);break;case t.UP:n=!0,this._keyEvent("previous",e);break;case t.DOWN:n=!0,this._keyEvent("next",e);break;case t.ENTER:this.menu.active&&(n=!0,e.preventDefault(),this.menu.select(e));break;case t.TAB:this.menu.active&&this.menu.select(e);break;case t.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(e),e.preventDefault());break;default:i=!0,this._searchTimeout(e)}}},keypress:function(e){if(n)return n=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||e.preventDefault());if(!i){var t=s.ui.keyCode;switch(e.keyCode){case t.PAGE_UP:this._move("previousPage",e);break;case t.PAGE_DOWN:this._move("nextPage",e);break;case t.UP:this._keyEvent("previous",e);break;case t.DOWN:this._keyEvent("next",e)}}},input:function(e){if(a)return a=!1,void e.preventDefault();this._searchTimeout(e)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){this.cancelBlur?delete this.cancelBlur:(clearTimeout(this.searching),this.close(e),this._change(e))}}),this._initSource(),this.menu=s("