package assets var CpScriptsJs = []byte(`!function(e,t){void 0===e&&void 0!==window&&(e=window),"function"==typeof define&&define.amd?define(["jquery"],function(e){return t(e)}):"object"==typeof module&&module.exports?module.exports=t(require("jquery")):t(e.jQuery)}(this,function(e){!function(z){"use strict";var d=["sanitize","whiteList","sanitizeFn"],r=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],e={"*":["class","dir","id","lang","role","tabindex","style",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},a=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,l=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;function v(e,t){var i=e.nodeName.toLowerCase();if(-1!==z.inArray(i,t))return-1===z.inArray(i,r)||Boolean(e.nodeValue.match(a)||e.nodeValue.match(l));for(var n=z(t).filter(function(e,t){return t instanceof RegExp}),s=0,o=n.length;s]+>/g,"")),n&&(l=w(l)),l=l.toUpperCase(),o="contains"===i?0<=l.indexOf(t):l.startsWith(t)))break}return o}function L(e){return parseInt(e,10)||0}z.fn.triggerNative=function(e){var t,i=this[0];i.dispatchEvent?(u?t=new Event(e,{bubbles:!0}):(t=document.createEvent("Event")).initEvent(e,!0,!1),i.dispatchEvent(t)):i.fireEvent?((t=document.createEventObject()).eventType=e,i.fireEvent("on"+e,t)):this.trigger(e)};var f={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"},m=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,g=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\u1ab0-\\u1aff\\u1dc0-\\u1dff]","g");function b(e){return f[e]}function w(e){return(e=e.toString())&&e.replace(m,b).replace(g,"")}var x,y,I,k,E,T=(x={"&":"&","<":"<",">":">",'"':""","'":"'","` + "`" + `":"`"},y=function(e){return x[e]},I="(?:"+Object.keys(x).join("|")+")",k=RegExp(I),E=RegExp(I,"g"),function(e){return e=null==e?"":""+e,k.test(e)?e.replace(E,y):e}),A={32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",65:"A",66:"B",67:"C",68:"D",69:"E",70:"F",71:"G",72:"H",73:"I",74:"J",75:"K",76:"L",77:"M",78:"N",79:"O",80:"P",81:"Q",82:"R",83:"S",84:"T",85:"U",86:"V",87:"W",88:"X",89:"Y",90:"Z",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9"},O=27,H=13,D=32,N=9,W=38,P=40,B={success:!1,major:"3"};try{B.full=(z.fn.dropdown.Constructor.VERSION||"").split(" ")[0].split("."),B.major=B.full[0],B.success=!0}catch(e){}var R=0,U=".bs.select",F={DISABLED:"disabled",DIVIDER:"divider",SHOW:"open",DROPUP:"dropup",MENU:"dropdown-menu",MENURIGHT:"dropdown-menu-right",MENULEFT:"dropdown-menu-left",BUTTONCLASS:"btn-default",POPOVERHEADER:"popover-title",ICONBASE:"glyphicon",TICKICON:"glyphicon-ok"},j={MENU:"."+F.MENU},V={span:document.createElement("span"),i:document.createElement("i"),subtext:document.createElement("small"),a:document.createElement("a"),li:document.createElement("li"),whitespace:document.createTextNode(" "),fragment:document.createDocumentFragment()};V.a.setAttribute("role","option"),V.subtext.className="text-muted",V.text=V.span.cloneNode(!1),V.text.className="text",V.checkMark=V.span.cloneNode(!1);var _=new RegExp(W+"|"+P),q=new RegExp("^"+N+"$|"+O),G=function(e,t,i){var n=V.li.cloneNode(!1);return e&&(1===e.nodeType||11===e.nodeType?n.appendChild(e):n.innerHTML=e),void 0!==t&&""!==t&&(n.className=t),null!=i&&n.classList.add("optgroup-"+i),n},K=function(e,t,i){var n=V.a.cloneNode(!0);return e&&(11===e.nodeType?n.appendChild(e):n.insertAdjacentHTML("beforeend",e)),void 0!==t&&""!==t&&(n.className=t),"4"===B.major&&n.classList.add("dropdown-item"),i&&n.setAttribute("style",i),n},Y=function(e,t){var i,n,s=V.text.cloneNode(!1);if(e.content)s.innerHTML=e.content;else{if(s.textContent=e.text,e.icon){var o=V.whitespace.cloneNode(!1);(n=(!0===t?V.i:V.span).cloneNode(!1)).className=e.iconBase+" "+e.icon,V.fragment.appendChild(n),V.fragment.appendChild(o)}e.subtext&&((i=V.subtext.cloneNode(!1)).textContent=e.subtext,s.appendChild(i))}if(!0===t)for(;0'},maxOptions:!1,mobile:!1,selectOnTab:!1,dropdownAlignRight:!1,windowPadding:0,virtualScroll:600,display:!1,sanitize:!0,sanitizeFn:null,whiteList:e},J.prototype={constructor:J,init:function(){var i=this,e=this.$element.attr("id");this.selectId=R++,this.$element[0].classList.add("bs-select-hidden"),this.multiple=this.$element.prop("multiple"),this.autofocus=this.$element.prop("autofocus"),this.options.showTick=this.$element[0].classList.contains("show-tick"),this.$newElement=this.createDropdown(),this.$element.after(this.$newElement).prependTo(this.$newElement),this.$button=this.$newElement.children("button"),this.$menu=this.$newElement.children(j.MENU),this.$menuInner=this.$menu.children(".inner"),this.$searchbox=this.$menu.find("input"),this.$element[0].classList.remove("bs-select-hidden"),!0===this.options.dropdownAlignRight&&this.$menu[0].classList.add(F.MENURIGHT),void 0!==e&&this.$button.attr("data-id",e),this.checkDisabled(),this.clickListener(),this.options.liveSearch&&this.liveSearchListener(),this.setStyle(),this.render(),this.setWidth(),this.options.container?this.selectPosition():this.$element.on("hide"+U,function(){if(i.isVirtual()){var e=i.$menuInner[0],t=e.firstChild.cloneNode(!1);e.replaceChild(t,e.firstChild),e.scrollTop=0}}),this.$menu.data("this",this),this.$newElement.data("this",this),this.options.mobile&&this.mobile(),this.$newElement.on({"hide.bs.dropdown":function(e){i.$menuInner.attr("aria-expanded",!1),i.$element.trigger("hide"+U,e)},"hidden.bs.dropdown":function(e){i.$element.trigger("hidden"+U,e)},"show.bs.dropdown":function(e){i.$menuInner.attr("aria-expanded",!0),i.$element.trigger("show"+U,e)},"shown.bs.dropdown":function(e){i.$element.trigger("shown"+U,e)}}),i.$element[0].hasAttribute("required")&&this.$element.on("invalid"+U,function(){i.$button[0].classList.add("bs-invalid"),i.$element.on("shown"+U+".invalid",function(){i.$element.val(i.$element.val()).off("shown"+U+".invalid")}).on("rendered"+U,function(){this.validity.valid&&i.$button[0].classList.remove("bs-invalid"),i.$element.off("rendered"+U)}),i.$button.on("blur"+U,function(){i.$element.trigger("focus").trigger("blur"),i.$button.off("blur"+U)})}),setTimeout(function(){i.createLi(),i.$element.trigger("loaded"+U)})},createDropdown:function(){var e=this.multiple||this.options.showTick?" show-tick":"",t="",i=this.autofocus?" autofocus":"";B.major<4&&this.$element.parent().hasClass("input-group")&&(t=" input-group-btn");var n,s="",o="",r="",a="";return this.options.header&&(s='
'+this.options.header+"
"),this.options.liveSearch&&(o=''),this.multiple&&this.options.actionsBox&&(r='
"),this.multiple&&this.options.doneButton&&(a='
"),n='",z(n)},setPositionData:function(){this.selectpicker.view.canHighlight=[];for(var e=0;e=this.options.virtualScroll||!0===this.options.virtualScroll},createView:function(A,e){e=e||0;var O=this;this.selectpicker.current=A?this.selectpicker.search:this.selectpicker.main;var H,D,N=[];function i(e,t){var i,n,s,o,r,a,l,c,d,h,p=O.selectpicker.current.elements.length,u=[],f=!0,m=O.isVirtual();O.selectpicker.view.scrollTop=e,!0===m&&O.sizeInfo.hasScrollBar&&O.$menu[0].offsetWidth>O.sizeInfo.totalMenuWidth&&(O.sizeInfo.menuWidth=O.$menu[0].offsetWidth,O.sizeInfo.totalMenuWidth=O.sizeInfo.menuWidth+O.sizeInfo.scrollBarWidth,O.$menu.css("min-width",O.sizeInfo.menuWidth)),i=Math.ceil(O.sizeInfo.menuInnerHeight/O.sizeInfo.liHeight*1.5),n=Math.round(p/i)||1;for(var v=0;vp-1?0:O.selectpicker.current.data[p-1].position-O.selectpicker.current.data[O.selectpicker.view.position1-1].position,x.firstChild.style.marginTop=b+"px",x.firstChild.style.marginBottom=w+"px"),x.firstChild.appendChild(y)}if(O.prevActiveIndex=O.activeIndex,O.options.liveSearch){if(A&&t){var z,L=0;O.selectpicker.view.canHighlight[L]||(L=1+O.selectpicker.view.canHighlight.slice(1).indexOf(!0)),z=O.selectpicker.view.visibleElements[L],O.selectpicker.view.currentActive&&(O.selectpicker.view.currentActive.classList.remove("active"),O.selectpicker.view.currentActive.firstChild&&O.selectpicker.view.currentActive.firstChild.classList.remove("active")),z&&(z.classList.add("active"),z.firstChild&&z.firstChild.classList.add("active")),O.activeIndex=(O.selectpicker.current.data[L]||{}).index}}else O.$menuInner.trigger("focus")}this.setPositionData(),i(e,!0),this.$menuInner.off("scroll.createView").on("scroll.createView",function(e,t){O.noScroll||i(this.scrollTop,t),O.noScroll=!1}),z(window).off("resize"+U+"."+this.selectId+".createView").on("resize"+U+"."+this.selectId+".createView",function(){O.$newElement.hasClass(F.SHOW)&&i(O.$menuInner[0].scrollTop)})},setPlaceholder:function(){var e=!1;if(this.options.title&&!this.multiple){this.selectpicker.view.titleOption||(this.selectpicker.view.titleOption=document.createElement("option")),e=!0;var t=this.$element[0],i=!1,n=!this.selectpicker.view.titleOption.parentNode;if(n)this.selectpicker.view.titleOption.className="bs-title-option",this.selectpicker.view.titleOption.value="",i=void 0===z(t.options[t.selectedIndex]).attr("selected")&&void 0===this.$element.data("selected");(n||0!==this.selectpicker.view.titleOption.index)&&t.insertBefore(this.selectpicker.view.titleOption,t.firstChild),i&&(t.selectedIndex=0)}return e},createLi:function(){var l=this,f=this.options.iconBase,m=':not([hidden]):not([data-hidden="true"])',v=[],g=[],c=0,b=0,e=this.setPlaceholder()?1:0;this.options.hideDisabled&&(m+=":not(:disabled)"),!l.options.showTick&&!l.multiple||V.checkMark.parentNode||(V.checkMark.className=f+" "+l.options.tickIcon+" check-mark",V.a.appendChild(V.checkMark));var t=this.$element[0].querySelectorAll("select > *"+m);function w(e){var t=g[g.length-1];t&&"divider"===t.type&&(t.optID||e.optID)||((e=e||{}).type="divider",v.push(G(!1,F.DIVIDER,e.optID?e.optID+"div":void 0)),g.push(e))}function x(e,t){if((t=t||{}).divider="true"===e.getAttribute("data-divider"),t.divider)w({optID:t.optID});else{var i=g.length,n=e.style.cssText,s=n?T(n):"",o=(e.className||"")+(t.optgroupClass||"");t.optID&&(o="opt "+o),t.text=e.textContent,t.content=e.getAttribute("data-content"),t.tokens=e.getAttribute("data-tokens"),t.subtext=e.getAttribute("data-subtext"),t.icon=e.getAttribute("data-icon"),t.iconBase=f;var r=Y(t);v.push(G(K(r,o,s),"",t.optID)),e.liIndex=i,t.display=t.content||t.text,t.type="option",t.index=i,t.option=e,t.disabled=t.disabled||e.disabled,g.push(t);var a=0;t.display&&(a+=t.display.length),t.subtext&&(a+=t.subtext.length),t.icon&&(a+=1),c li")},render:function(){this.setPlaceholder();var e,t,i=this,n=this.$element[0].selectedOptions,s=n.length,o=this.$button[0],r=o.querySelector(".filter-option-inner-inner"),a=document.createTextNode(this.options.multipleSeparator),l=V.fragment.cloneNode(!1),c=!1;if(this.togglePlaceholder(),this.tabIndex(),"static"===this.options.selectedTextFormat)l=Y({text:this.options.title},!0);else if((e=this.multiple&&-1!==this.options.selectedTextFormat.indexOf("count")&&1")).length&&s>t[1]||1===t.length&&2<=s),!1===e){for(var d=0;d option"+f+", optgroup"+f+" option"+f).length,v="function"==typeof this.options.countSelectedText?this.options.countSelectedText(s,m):this.options.countSelectedText;l=Y({text:v.replace("{0}",s.toString()).replace("{1}",m.toString())},!0)}if(null==this.options.title&&(this.options.title=this.$element.attr("title")),l.childNodes.length||(l=Y({text:void 0!==this.options.title?this.options.title:this.options.noneSelectedText},!0)),o.title=l.textContent.replace(/<[^>]*>?/g,"").trim(),this.options.sanitize&&c&&M([l],i.options.whiteList,i.options.sanitizeFn),r.innerHTML="",r.appendChild(l),B.major<4&&this.$newElement[0].classList.contains("bs3-has-addon")){var g=o.querySelector(".filter-expand"),b=r.cloneNode(!0);b.className="filter-expand",g?o.replaceChild(b,g):o.appendChild(b)}this.$element.trigger("rendered"+U)},setStyle:function(e,t){var i,n=this.$button[0],s=this.$newElement[0],o=this.options.style.trim();this.$element.attr("class")&&this.$newElement.addClass(this.$element.attr("class").replace(/selectpicker|mobile-device|bs-select-hidden|validate\[.*\]/gi,"")),B.major<4&&(s.classList.add("bs3"),s.parentNode.classList.contains("input-group")&&(s.previousElementSibling||s.nextElementSibling)&&(s.previousElementSibling||s.nextElementSibling).classList.contains("input-group-addon")&&s.classList.add("bs3-has-addon")),i=e?e.trim():o,"add"==t?i&&n.classList.add.apply(n.classList,i.split(" ")):"remove"==t?i&&n.classList.remove.apply(n.classList,i.split(" ")):(o&&n.classList.remove.apply(n.classList,o.split(" ")),i&&n.classList.add.apply(n.classList,i.split(" ")))},liHeight:function(e){if(e||!1!==this.options.size&&!this.sizeInfo){this.sizeInfo||(this.sizeInfo={});var t=document.createElement("div"),i=document.createElement("div"),n=document.createElement("div"),s=document.createElement("ul"),o=document.createElement("li"),r=document.createElement("li"),a=document.createElement("li"),l=document.createElement("a"),c=document.createElement("span"),d=this.options.header&&0this.sizeInfo.menuExtras.vert&&a+this.sizeInfo.menuExtras.vert+50>this.sizeInfo.selectOffsetBot)),"auto"===this.options.size)s=3this.options.size){for(var g=0;gthis.sizeInfo.selectOffsetRight&&this.sizeInfo.selectOffsetRightthis.sizeInfo.menuInnerHeight&&(this.sizeInfo.hasScrollBar=!0,this.sizeInfo.totalMenuWidth=this.sizeInfo.menuWidth+this.sizeInfo.scrollBarWidth,this.$menu.css("min-width",this.sizeInfo.totalMenuWidth)),this.dropdown&&this.dropdown._popper&&this.dropdown._popper.update()},setSize:function(e){if(this.liHeight(e),this.options.header&&this.$menu.css("padding-top",0),!1!==this.options.size){var t,i=this,n=z(window),s=0;if(this.setMenuSize(),this.options.liveSearch&&this.$searchbox.off("input.setMenuSize propertychange.setMenuSize").on("input.setMenuSize propertychange.setMenuSize",function(){return i.setMenuSize()}),"auto"===this.options.size?n.off("resize"+U+"."+this.selectId+".setMenuSize scroll"+U+"."+this.selectId+".setMenuSize").on("resize"+U+"."+this.selectId+".setMenuSize scroll"+U+"."+this.selectId+".setMenuSize",function(){return i.setMenuSize()}):this.options.size&&"auto"!=this.options.size&&this.selectpicker.current.elements.length>this.options.size&&n.off("resize"+U+"."+this.selectId+".setMenuSize scroll"+U+"."+this.selectId+".setMenuSize"),e)s=this.$menuInner[0].scrollTop;else if(!i.multiple){var o=i.$element[0];"number"==typeof(t=(o.options[o.selectedIndex]||{}).liIndex)&&!1!==i.options.size&&(s=(s=i.sizeInfo.liHeight*t)-i.sizeInfo.menuInnerHeight/2+i.sizeInfo.liHeight/2)}i.createView(!1,s)}},setWidth:function(){var i=this;"auto"===this.options.width?requestAnimationFrame(function(){i.$menu.css("min-width","0"),i.$element.on("loaded"+U,function(){i.liHeight(),i.setMenuSize();var e=i.$newElement.clone().appendTo("body"),t=e.css("width","auto").children("button").outerWidth();e.remove(),i.sizeInfo.selectWidth=Math.max(i.sizeInfo.totalMenuWidth,t),i.$newElement.css("width",i.sizeInfo.selectWidth+"px")})}):"fit"===this.options.width?(this.$menu.css("min-width",""),this.$newElement.css("width","").addClass("fit-width")):this.options.width?(this.$menu.css("min-width",""),this.$newElement.css("width",this.options.width)):(this.$menu.css("min-width",""),this.$newElement.css("width","")),this.$newElement.hasClass("fit-width")&&"fit"!==this.options.width&&this.$newElement[0].classList.remove("fit-width")},selectPosition:function(){this.$bsContainer=z('
');var n,s,o,r=this,a=z(this.options.container),e=function(e){var t={},i=r.options.display||!!z.fn.dropdown.Constructor.Default&&z.fn.dropdown.Constructor.Default.display;r.$bsContainer.addClass(e.attr("class").replace(/form-control|fit-width/gi,"")).toggleClass(F.DROPUP,e.hasClass(F.DROPUP)),n=e.offset(),a.is("body")?s={top:0,left:0}:((s=a.offset()).top+=parseInt(a.css("borderTopWidth"))-a.scrollTop(),s.left+=parseInt(a.css("borderLeftWidth"))-a.scrollLeft()),o=e.hasClass(F.DROPUP)?0:e[0].offsetHeight,(B.major<4||"static"===i)&&(t.top=n.top-s.top+o,t.left=n.left-s.left),t.width=e[0].offsetWidth,r.$bsContainer.css(t)};this.$button.on("click.bs.dropdown.data-api",function(){r.isDisabled()||(e(r.$newElement),r.$bsContainer.appendTo(r.options.container).toggleClass(F.SHOW,!r.$button.hasClass(F.SHOW)).append(r.$menu))}),z(window).off("resize"+U+"."+this.selectId+" scroll"+U+"."+this.selectId).on("resize"+U+"."+this.selectId+" scroll"+U+"."+this.selectId,function(){r.$newElement.hasClass(F.SHOW)&&e(r.$newElement)}),this.$element.on("hide"+U,function(){r.$menu.data("height",r.$menu.height()),r.$bsContainer.detach()})},setOptionStatus:function(){var e=this;if(e.noScroll=!1,e.selectpicker.view.visibleElements&&e.selectpicker.view.visibleElements.length)for(var t=0;t
');y[2]&&(I=I.replace("{var}",y[2][1"+I+"")),l=!1,E.$element.trigger("maxReached"+U)),v&&b&&(k.append(z("
"+$+"
")),l=!1,E.$element.trigger("maxReachedGrp"+U)),setTimeout(function(){E.setSelected(o,!1)},10),k.delay(750).fadeOut(300,function(){z(this).remove()})}}}else c.prop("selected",!1),d.selected=!0,E.setSelected(o,!0);!E.multiple||E.multiple&&1===E.options.maxOptions?E.$button.trigger("focus"):E.options.liveSearch&&E.$searchbox.trigger("focus"),l&&(r!=S(E.$element[0])&&E.multiple||a!=E.$element.prop("selectedIndex")&&!E.multiple)&&(C=[d.index,h.prop("selected"),r],E.$element.triggerNative("change"))}}),this.$menu.on("click","li."+F.DISABLED+" a, ."+F.POPOVERHEADER+", ."+F.POPOVERHEADER+" :not(.close)",function(e){e.currentTarget==this&&(e.preventDefault(),e.stopPropagation(),E.options.liveSearch&&!z(e.target).hasClass("close")?E.$searchbox.trigger("focus"):E.$button.trigger("focus"))}),this.$menuInner.on("click",".divider, .dropdown-header",function(e){e.preventDefault(),e.stopPropagation(),E.options.liveSearch?E.$searchbox.trigger("focus"):E.$button.trigger("focus")}),this.$menu.on("click","."+F.POPOVERHEADER+" .close",function(){E.$button.trigger("click")}),this.$searchbox.on("click",function(e){e.stopPropagation()}),this.$menu.on("click",".actions-btn",function(e){E.options.liveSearch?E.$searchbox.trigger("focus"):E.$button.trigger("focus"),e.preventDefault(),e.stopPropagation(),z(this).hasClass("bs-select-all")?E.selectAll():E.deselectAll()}),this.$element.on("change"+U,function(){E.render(),E.$element.trigger("changed"+U,C),C=null}).on("focus"+U,function(){E.options.mobile||E.$button.trigger("focus")})},liveSearchListener:function(){var u=this,f=document.createElement("li");this.$button.on("click.bs.dropdown.data-api",function(){u.$searchbox.val()&&u.$searchbox.val("")}),this.$searchbox.on("click.bs.dropdown.data-api focus.bs.dropdown.data-api touchend.bs.dropdown.data-api",function(e){e.stopPropagation()}),this.$searchbox.on("input propertychange",function(){var e=u.$searchbox.val();if(u.selectpicker.search.elements=[],u.selectpicker.search.data=[],e){var t=[],i=e.toUpperCase(),n={},s=[],o=u._searchStyle(),r=u.options.liveSearchNormalize;r&&(i=w(i)),u._$lisSelected=u.$menuInner.find(".selected");for(var a=0;a=l.selectpicker.view.canHighlight.length&&(t=0),l.selectpicker.view.canHighlight[t+m]||(t=t+1+l.selectpicker.view.canHighlight.slice(t+m+1).indexOf(!0))),e.preventDefault();var v=m+t;e.which===W?0===m&&t===c.length-1?(l.$menuInner[0].scrollTop=l.$menuInner[0].scrollHeight,v=l.selectpicker.current.elements.length-1):d=(o=(s=l.selectpicker.current.data[v]).position-s.height)u+l.sizeInfo.menuInnerHeight),(n=l.selectpicker.main.elements[g]).classList.add("active"),n.firstChild&&n.firstChild.classList.add("active"),l.activeIndex=w[I],n.firstChild.focus(),d&&(l.$menuInner[0].scrollTop=o),r.trigger("focus")}}i&&(e.which===D&&!l.selectpicker.keydown.keyHistory||e.which===H||e.which===N&&l.options.selectOnTab)&&(e.which!==D&&e.preventDefault(),l.options.liveSearch&&e.which===D||(l.$menuInner.find(".active a").trigger("click",!0),r.trigger("focus"),l.options.liveSearch||(e.preventDefault(),z(document).data("spaceSelect",!0))))}},mobile:function(){this.$element[0].classList.add("mobile-device")},refresh:function(){var e=z.extend({},this.options,this.$element.data());this.options=e,this.checkDisabled(),this.setStyle(),this.render(),this.createLi(),this.setWidth(),this.setSize(!0),this.$element.trigger("refreshed"+U)},hide:function(){this.$newElement.hide()},show:function(){this.$newElement.show()},remove:function(){this.$newElement.remove(),this.$element.remove()},destroy:function(){this.$newElement.before(this.$element).remove(),this.$bsContainer?this.$bsContainer.remove():this.$menu.remove(),this.$element.off(U).removeData("selectpicker").removeClass("bs-select-hidden selectpicker"),z(window).off(U+"."+this.selectId)}};var Z=z.fn.selectpicker;z.fn.selectpicker=Q,z.fn.selectpicker.Constructor=J,z.fn.selectpicker.noConflict=function(){return z.fn.selectpicker=Z,this},z(document).off("keydown.bs.dropdown.data-api").on("keydown"+U,'.bootstrap-select [data-toggle="dropdown"], .bootstrap-select [role="listbox"], .bootstrap-select .bs-searchbox input',J.prototype.keydown).on("focusin.modal",'.bootstrap-select [data-toggle="dropdown"], .bootstrap-select [role="listbox"], .bootstrap-select .bs-searchbox input',function(e){e.stopPropagation()}),z(window).on("load"+U+".data-api",function(){z(".selectpicker").each(function(){var e=z(this);Q.call(e,e.data())})})}(e)}),function(e,t){if("function"==typeof define&&define.amd)define(["module","exports"],t);else if("undefined"!=typeof exports)t(module,exports);else{var i={exports:{}};t(i,i.exports),e.autosize=i.exports}}(this,function(e,t){"use strict";var i,n,h="function"==typeof Map?new Map:(i=[],n=[],{has:function(e){return-1'+e+" "+t+''}function ShowSystemMsg(e,t,i){var n=$(".modal.show .sys-messages");n.length||(n=$("form.alert-here .sys-messages")),n.length&&n.html(GetModalAlertTmpl(e,t,i))}function AjaxDone(data){try{eval(data)}catch(e){e instanceof SyntaxError&&(console.log(data),console.log("Error: JavaScript code eval error",e.message))}}function AjaxFail(e,t,i){console.log("Error: data sending error, page will be reloaded",e,t,i),setTimeout(function(){window.location.reload(!1)},1e3)}function FormToAjax(i){i.submit(function(e){if(i.hasClass("loading"))e.preventDefault();else{i.addClass("loading").addClass("alert-here");var t=i.find("button[type=submit]");t.addClass("progress-bar-striped").addClass("progress-bar-animated"),""!=t.attr("data-target")&&$("#"+t.attr("data-target")).addClass("progress-bar-striped").addClass("progress-bar-animated"),i.find(".sys-messages").html(""),$.ajax({type:"POST",url:i.attr("action"),data:i.serialize()}).done(function(e){FormDataWasChanged=!1,AjaxDone(e)}).fail(function(e,t,i){AjaxFail(e.responseText,t,i)}).always(function(){setTimeout(function(){i.removeClass("loading").removeClass("alert-here"),t.removeClass("progress-bar-striped").removeClass("progress-bar-animated"),""!=t.attr("data-target")&&$("#"+t.attr("data-target")).removeClass("progress-bar-striped").removeClass("progress-bar-animated")},100)}),e.preventDefault()}});var e=i.find("button[type=submit]");""!=e.attr("data-target")&&$("#"+e.attr("data-target")).click(function(){e.click()}),i.hasClass("prev-data-lost")&&i.find("input, textarea, select").on("input",function(){FormDataWasChanged||(FormDataWasChanged=!0)})}function HtmlDecode(e){return(new DOMParser).parseFromString(e,"text/html").documentElement.textContent}function HtmlFixEditorHtml(e){return newValue=e,newValue=newValue.replace(/ /gi,""),newValue}function AllFormsToAjax(){$("form").each(function(){FormToAjax($(this))})}function BindWindowBeforeUnload(){$(window).bind("beforeunload",function(){if(FormDataWasChanged)return"Some data was changed and not saved. Are you sure want to leave page?"})}function MakeTextAreasAutoSized(){autosize($("textarea.autosize"))}function MakeTextAreasWysiwyg(){$("textarea.wysiwyg").each(function(){var t=$(this)[0],e=t.id,i=t.name,n=t.innerHTML;$(t).wrap('
').remove();var s=document.getElementById(e+"_wysiwyg");s.id=e;var o=window.pell.init({element:s,onChange:function(e){t.innerHTML=HtmlFixEditorHtml(e),$(t).val(HtmlFixEditorHtml(e)),FormDataWasChanged||(FormDataWasChanged=!0)},defaultParagraphSeparator:"p",styleWithCSS:!1,actions:["paragraph","heading1","heading2","bold","italic","underline","strikethrough","ulist","olist","link",{name:"htmlcode",icon:"HTML",title:"HTML Source",result:function(e,t,i){var n=$(e),s=$(t),o=$(i);if(o.hasClass("pell-button-html-pressed")){o.removeClass("pell-button-html-pressed"),n.removeClass("pell-html-mode"),n.find(".pell-actionbar .pell-button").prop("disabled",!1);var r=n.find("textarea.form-control").val();t.innerHTML=HtmlFixEditorHtml(r),$(t).val(HtmlFixEditorHtml(r)),setTimeout(function(){s.focus()},0)}else o.addClass("pell-button-html-pressed"),n.addClass("pell-html-mode"),n.find(".pell-actionbar .pell-button").prop("disabled",!0),o.prop("disabled",!1),setTimeout(function(){n.find("textarea.form-control").focus()},0)}}],classes:{actionbar:"pell-actionbar",button:"pell-button",content:"pell-content",selected:"pell-button-selected"}});o.onfocusin=function(){$(s).addClass("focused")},o.onfocusout=function(){$(s).find(".pell-actionbar button.pell-button-selected").removeClass("pell-button-selected"),$(s).removeClass("focused")},$(s).append(''),t=document.getElementById(e+"_wysiwyg"),$(t).on("input",function(){FormDataWasChanged||(FormDataWasChanged=!0)}),t.innerHTML=HtmlFixEditorHtml(HtmlDecode(n)),$(t).val(HtmlFixEditorHtml(HtmlDecode(n))),o.content.innerHTML=HtmlFixEditorHtml(HtmlDecode(n))})}function Initialize(){"function"==typeof $?(AllFormsToAjax(),BindWindowBeforeUnload(),MakeTextAreasAutoSized(),MakeTextAreasWysiwyg()):console.log("Error: jQuery is not loaded!")}return window.addEventListener?window.addEventListener("load",Initialize,!1):window.attachEvent&&window.attachEvent("onload",Initialize),{ShowMsgSuccess:function(e,t){ShowSystemMsg(e,t,!1)},ShowMsgError:function(e,t){ShowSystemMsg(e,t,!0)},ModalUserProfile:function(){var e='';$("#sys-modal-user-settings-placeholder").html(e),$("#sys-modal-user-settings").modal({backdrop:"static",keyboard:!1,show:!1}),$("#sys-modal-user-settings").on("hidden.bs.modal",function(e){$("#sys-modal-user-settings-placeholder").html("")}),FormToAjax($("#sys-modal-user-settings form")),$("#sys-modal-user-settings").modal("show")},ActionLogout:function(e){confirm(e)&&$.ajax({type:"POST",url:"/cp/",data:{action:"index-user-logout"}}).done(function(e){AjaxDone(e)}).fail(function(e,t,i){AjaxFail(e.responseText,t,i)})},ActionDataTableDelete:function(e,t,i,n){confirm(n)&&$.ajax({type:"POST",url:"/cp/",data:{action:t,id:i}}).done(function(e){AjaxDone(e)}).fail(function(e,t,i){AjaxFail(e.responseText,t,i)})}}}(window,$);window.fave=fave}(window,jQuery);`)