/* Copyright (c) 2003-2016, 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),n=b.indexOf(f,e);-1!==n&&(f.splice(n,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:.5,background:"#000"})).onClick(function(){a("overlayClose",!0)&&b()})}functionn(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()})}functionp(a){returnfunction(){returna().elem}}functionk(c){functione(a,b){vard=c[a];"function"===typeofd&&(d=d(b));returnvoid0===d?b:d}functionk(){l().hide();m().hide();v.trigger(h)}functionq(){w.trigger(h)&&k()}functiong(a){returnfunction(){a.apply(this,arguments);returnh}}functionr(a){if(!t){varc=n(e,q),b=f(e,q),d;d=e("closeButton",!0)?c.child().html(e("closeHtml","\x26#xD7;")).clazz("pico-close").clazz(e("closeClass")).stylize(e("closeStyles",{borderRadius:"2px",cursor:"pointer",height:"15px",width:"15px",position:"absolute",top:"5px",right:"5px",fontSize:"16px",textAlign:"center",lineHeight:"15px",background:"#CCC"})):void0;t={modal:c,overlay:b,close:d};x.trigger(h)}returnt[a]}if("string"===typeofc||b(c))c={content:c};varx=a(),y=a(),z=a(),w=a(),v=a(),t,m=r.bind(d,"modal"),l=r.bind(d,"overlay"),u=r.bind(d,"close"),h={modalElem:p(m),closeElem:p(u),overlayElem:p(l),show:function(){y.trigger(h)&&(l().show(),u(),m().show(),z.trigger(h));returnthis},close:g(q),forceClose:g(k),destroy:function(){m=m().destroy();l=l().destroy();u=void0},options:function(a){c=a},afterCreate:g(x.watch),beforeShow:g(y.watch),afterShow:g(z.watch),beforeClose:g(w.watch),afterClose:g(v.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\x3d"+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(){returnk}):d.picoModal=k})(window,document);