/* Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license*/varSF=function(){functiond(a){return(a=a.attributes?a.attributes.getNamedItem("class"):null)?a.value.split(" "):[]}functionc(a){vare=document.createAttribute("class");e.value=a.join(" ");returne}varb={attachListener:function(a,e,b){if(a.addEventListener)a.addEventListener(e,b,!1);elseif(a.attachEvent)a.attachEvent("on"+e,function(){b.apply(a,arguments)});elsethrowError("Could not attach event.");}};b.indexOf=function(){vara=Array.prototype.indexOf;return"function"===a?function(e,b){returna.call(e,b)}:function(a,b){for(varc=a.length,d=0;d<c;d++)if(a[d]===b)returnd;return-1}}();b.accept=function(a,e){varc;a.children?(c=a.children,e(a)):"number"===typeofa.length&&(c=a);for(vard=c?c.length||0:0;d--;)b.accept(c[d],e)};b.getByClass=function(){vara=document.getElementsByClassName;return"function"===typeofa?function(e,b){"string"===typeofe&&(b=e,e=document);returna.call(e,b)}:function(a,c){"string"===typeofa&&(c=a,a=document.getElementsByTagName("html")[0]);vard=[];b.accept(a,function(a){b.classList.contains(a,c)&&d.push(a)});returnd}}();b.classList={};b.classList.add=function(a,b){varf=d(a);f.push(b);a.attributes.setNamedItem(c(f))};b.classList.remove=function(a,e){varf=d(a,e),l=b.indexOf(f,e);-1!==l&&(f.splice(l,1),a.attributes.setNamedItem(c(f)))};b.classList.contains=function(a,c){return-1!==b.indexOf(d(a),c)};b.classList.toggle=function(a,b){this.contains(a,b)?this.remove(a,b):this.add(a,b)};returnb}();"use strict";(function(){functiond(c){for(varbinc)deletec[b]}SF.modal=function(c){functionb(a){27==a.keyCode&&f.close()}c.modalClass="modal content";c.closeClass="modal-close";c.modalStyles=d;c.closeStyles=d;vara=c.afterCreate,e=c.afterClose;c.afterCreate=function(c){a&&a(c);window.addEventListener("keydown",b)};c.afterClose=function(a){e&&e(a);window.removeEventListener("keydown",b)};varf=(newpicoModal(c)).afterCreate(c.afterCreate).afterClose(c.afterClose);returnf}})();"use strict";(function(){for(vard=SF.getByClass("toggler"),c=d.length;c--;)SF.attachListener(d[c],"click",function(){varb=SF.classList.contains(this,"icon-toggler-expanded")||SF.classList.contains(this,"icon-toggler-collapsed"),a=document.getElementById(this.getAttribute("data-for"));SF.classList.toggle(this,"collapsed");SF.classList.contains(this,"collapsed")?(SF.classList.add(a,"collapsed"),b&&(SF.classList.remove(this,"icon-toggler-expanded"),SF.classList.add(this,"icon-toggler-collapsed"))):(SF.classList.remove(a,"collapsed"),b&&(SF.classList.remove(this,"icon-toggler-collapsed"),SF.classList.add(this,"icon-toggler-expanded")))})})();"use strict";(function(){for(vard=SF.getByClass("tree-a"),c=d.length;c--;)SF.attachListener(d[c],"click",function(b){b=b.target||b.srcElement;"H2"===b.nodeName&&!SF.classList.contains(b,"tree-a-no-sub")&&SF.classList.toggle(b,"tree-a-active")})})();(function(d,c){functionb(a){return"object"===typeofNode?ainstanceofNode:a&&"object"===typeofa&&"number"===typeofa.nodeType}functiona(){vara=[];return{watch:a.push.bind(a),trigger:function(b){for(varc=!0,d={preventDefault:function(){c=!1}},e=0;e<a.length;e++)a[e](b,d);returnc}}}functione(a){this.elem=a}functionf(a,b){returne.div().clazz("pico-overlay").clazz(a("overlayClass","")).stylize({display:"block",position:"fixed",top:"0px",left:"0px",height:"100%",width:"100%",zIndex:1E4}).stylize(a("overlayStyles",{opacity:0.5,background:"#000"})).onClick(function(){a("overlayClose",!0)&&b()})}functionl(a,b){varc=a("width","auto");"number"===typeofc&&(c=""+c+"px");returne.div().clazz("pico-content").clazz(a("modalClass","")).stylize({display:"block",position:"fixed",zIndex:10001,left:"50%",top:"50px",width:c,"-ms-transform":"translateX(-50%)","-moz-transform":"translateX(-50%)","-webkit-transform":"translateX(-50%)","-o-transform":"translateX(-50%)",transform:"translateX(-50%)"}).stylize(a("modalStyles",{backgroundColor:"white",padding:"20px",borderRadius:"5px"})).html(a("content")).attr("role","dialog").onClick(function(a){(newe(a.target)).anyAncestor(function(a){return/\bpico-close\b/.test(a.elem.className)})&&b()})}functionn(a){returnfunction(){returna().elem}}functioni(c){functione(a,b){vard=c[a];"function"===typeofd&&(d=d(b));returnvoid0===d?b:d}functioni(){j().hide();k().hide();s.trigger(h)}functiono(){t.trigger(h)&&i()}functiong(a){returnfunction(){a.apply(this,arguments);returnh}}functionp(a){if(!q){varc=l(e,o),b=f(e,o),d;varm=e;m("closeButton",!0)&&(d=c.child().html(m("closeHtml","×")).clazz("pico-close").clazz(m("closeClass")).stylize(m("closeStyles",{borderRadius:"2px",cursor:"pointer",height:"15px",width:"15px",position:"absolute",top:"5px",right:"5px",fontSize:"16px",textAlign:"center",lineHeight:"15px",background:"#CCC"})));q={modal:c,overlay:b,close:d};u.trigger(h)}returnq[a]}if("string"===typeofc||b(c))c={content:c};varu=a(),v=a(),w=a(),t=a(),s=a(),q,k=p.bind(d,"modal"),j=p.bind(d,"overlay"),r=p.bind(d,"close"),h={modalElem:n(k),closeElem:n(r),overlayElem:n(j),show:function(){v.trigger(h)&&(j().show(),r(),k().show(),w.trigger(h));returnthis},close:g(o),forceClose:g(i),destroy:function(){k=k().destroy();j=j().destroy();r=void0},options:function(a){c=a},afterCreate:g(u.watch),beforeShow:g(v.watch),afterShow:g(w.watch),beforeClose:g(t.watch),afterClose:g(s.watch)};returnh}e.div=function(a){varb=c.createElement("div");(a||c.body).appendChild(b);returnnewe(b)};e.prototype={child:function(){returne.div(this.elem)},stylize:function(a){a=a||{};"undefined"!==typeofa.opacity&&(a.filter="alpha(opacity="+100*a.opacity+")");for(varbina)a.hasOwnProperty(b)&&(this.elem.style[b]=a[b]);returnthis},clazz:function(a){this.elem.className+=" "+a;returnthis},html:function(a){b(a)?this.elem.appendChild(a):this.elem.innerHTML=a;returnthis},onClick:function(a){this.elem.addEventListener("click",a);returnthis},destroy:function(){c.body.removeChild(this.elem)},hide:function(){this.elem.style.display="none"},show:function(){this.elem.style.display="block"},attr:function(a,b){this.elem.setAttribute(a,b);returnthis},anyAncestor:function(a){for(varb=this.elem;b;){if(a(newe(b)))return!0;b=b.parentNode}return!1}};"function"===typeofd.define&&d.define.amd?d.define(function(){returni}):d.picoModal=i})(window,document);