text: function SirclRequestProcessor(n){this._steps=[];this._steps=this._steps.concat(sircl._requestHandlers.beforeSend);this._sendIndex=this._steps.length;this._steps.push(this._send);this._steps=this._steps.concat(sircl._requestHandlers.afterSend);this._processIndex=this._steps.length;this._steps.push(this._process);this._steps=this._steps.concat(sircl._requestHandlers.beforeRender);this._renderIndex=this._steps.length;this._steps.push(this._render);this._steps=this._steps.concat(sircl._requestHandlers.afterRender);this._loadComplete=n}function $$(){arguments.length>=2?sircl.addContentReadyHandler(arguments[0],arguments[1]):sircl.addContentReadyHandler("process",arguments[0])}typeof jQuery=="undefined"&&console.error("Sircl requires jQuery to be executed before Sircl libraries. Please add the jQuery script or move it before Sircl scripts.");sircl_originalSubmit=HTMLFormElement.prototype.submit;HTMLFormElement.prototype.submit=function(n){var u;if($(this).is("FORM:not([download]):not([method=dialog])")){var t=this._formTrigger?$(this._formTrigger):$(this),i=null,r=$(this);t.hasAttr("formtarget")?(i=t.attr("formtarget"),r=t):t.closest("[target]").length>0&&(i=t.closest("[target]").attr("target"),r=t.closest("[target]"));i!=null&&sircl.ext.isInternalTarget(i)||i==null&&sircl.singlePageMode==!0?(u=i!=null?sircl.ext.$select(r,i):sircl.ext.$mainTarget(),sircl._submitForm(t,$(this),u,n)):sircl_originalSubmit.apply(this,arguments)}else sircl_originalSubmit.apply(this,arguments)};sircl_originalJqHtml=$.fn.html;$.fn.html=function(n){var t=this;if(n===undefined)return sircl_originalJqHtml.call(t);t.each(function(){sircl._beforeUnload(this)});sircl_originalJqHtml.call(t,n);n!==null&&t.each(function(){sircl._afterLoad(this)})};sircl_originalJqLoad=$.fn.load;$.fn.load=function(n,t,i){var r={$trigger:$(this),$initialTarget:$(this),action:n,method:"get",enctype:null,formData:t,isForeground:!1};sircl._processRequest(r,i)};$.fn.hasAttr=function(n){return this.attr(n)!==undefined};typeof sircl=="undefined"&&(sircl={});sircl.version=2;console.info("Sircl v."+sircl.version+" running.");sircl.html_spinner='<i class="sircl-spinner sircl-spinning"><\/i> ';sircl.max_redirects=20;sircl.mainTargetSelector$=".main-target";sircl.ext={};sircl.ext.firstOrNull=function(n){return n?n.length>0?n[0]:null:null};sircl.ext.visible=function(n,t){if(t===undefined)return!$(n).hasAttr("hidden");t?$(n).removeAttr("hidden"):$(n).attr("hidden","hidden")};sircl.ext.getId=function(n,t){var r=$(n),i;return r.length>0?(i=r[0].id,(i===""||i===undefined)&&t===!0&&(i=r[0].id="id-"+(new Date).getTime()),i):null};sircl.ext.effectiveValue=function(n){return n.tagName=="INPUT"&&n.getAttribute("type")=="checkbox"?n.checked?n.value:"":n.tagName=="INPUT"&&n.getAttribute("type")=="radio"?n.checked?n.value:"":$(n).val()||""};sircl.ext.$mainTarget=function(){return $(sircl.mainTargetSelector$)};sircl.ext.isInternalTarget=function(n){if(n==null||n.length==0)return!1;switch(n.charAt(0)){case"#":return!0;case".":return!0;case"*":return!0;case":":return!0;case"<":return!0;case">":return!0;case"&":return!0;case"[":return!0;case" ":return!0;default:return!1}};sircl.ext.isExternalTarget=function(n){return!sircl.ext.isInternalTarget(n)};sircl.ext.$select=function(n,t){var f,r,u,i,e;if(t===undefined||t===null)return $([]);for(f=t.split(","),r=$([]),u=0;u<f.length;u++)i=f[u].trim(),i.length==0||(i.indexOf("|")>=0&&i.indexOf("|=")<i.indexOf("|")?(e=i.indexOf("|"),r=r.add(sircl.ext.$select(sircl.ext.$select(n,i.substr(0,e)),i.substr(e+1)))):r=i===":this"?r.add(n):i===":parent"?r.add(n).parent():i===":form"?n.hasAttr("form")?r.add($("#"+n.attr("form"))):r.add(n.closest("FORM")):i.indexOf(">")===0?r.add(n.find(i.substr(1))):i.indexOf("&gt;")===0?r.add(n.find(i.substr(4))):i.indexOf("<")===0?r.add(n.closest(i.substr(1))):i.indexOf("&lt;")===0?r.add(n.closest(i.substr(4))):r.add($(i)));return r};sircl.ext.cssEscape=function(n){try{return CSS.escape(n)}catch(t){return n.replace(/\./g,"\\.").replace(/\,/g,"\\,").replace(/\:/g,"\\:").replace(/\*/g,"\\*").replace(/\#/g,"\\#").replace(/\(/g,"\\(").replace(/\)/g,"\\)").replace(/\[/g,"\\[").replace(/\\/g,"\\\\").replace(/\//g,"\\/").replace(/\%/g,"\\%").replace(/\]/g,"\\]")}};sircl.ext.scopedDo=function(n,t,i){var r,u;try{r=null;t.split(",").forEach(function(t){var u=t.split(" on ").map(function(n){return n.trim()});u.length===1?r==null?i(n,u[0]):i(sircl.ext.$select(n,u[0]),r):i(sircl.ext.$select(n,u[1]),r=u[0])})}catch(f){u=null;n!=null&&n.length>0&&(u=n[0]);sircl.handleError("S151",'Error evaluating class action value "'+t+'" : '+f,{exception:f,element:u})}};sircl.ext.addClass=function(n,t){sircl.ext.scopedDo(n,t,function(n,t){n.addClass(t)})};sircl.ext.removeClass=function(n,t){sircl.ext.scopedDo(n,t,function(n,t){n.removeClass(t)})};sircl.ext.toggleClass=function(n,t){sircl.ext.scopedDo(n,t,function(n,t){n.toggleClass(t)})};sircl.ext.alert=function(n,t){window.alert(t)};sircl.ext.confirm=function(n,t){return window.confirm(t)?!0:!1};sircl.ext.getUrlParameter=function(n){n=n.replace(/[\[]/g,"\\[").replace(/[\]]/g,"\\]");var i=new RegExp("[\\?&]"+n+"=([^&#]*)"),t=i.exec(location.search);return t===null?"":decodeURIComponent(t[1].replace(/\+/g," "))};sircl.urlParser=/^(.*?)(\?.*?)?(\#.*)?$/;sircl._requestHandlers={};sircl._requestHandlers.beforeSend=[];sircl._requestHandlers.afterSend=[];sircl._requestHandlers.onError=[];sircl._requestHandlers.beforeRender=[];sircl._requestHandlers.afterRender=[];sircl.addRequestHandler=function(n,t){this._requestHandlers[n].push(t)};sircl._loadUrl=function(n,t,i,r){var u={$trigger:n,$initialTarget:i,action:t,method:"get",accept:n.attr("type"),isForeground:!0};this._processRequest(u,r)};sircl._submitForm=function(n,t,i,r,u){var f={$form:t,$trigger:n,$initialTarget:i,event:r,action:n.attr("formaction")||t.attr("action")||window.location.href,method:(n.attr("formmethod")||t.attr("method")||"get").toLowerCase(),enctype:(n.attr("formenctype")||t.attr("enctype")||"application/x-www-form-urlencoded").toLowerCase(),charset:t.attr("accept-charset"),getAttr:function(n){return this.$trigger.attr(n)||this.$form.attr(n)},isForeground:!0},o=n!=null&&n.is("INPUT:not([type=submit]), SELECT, TEXTAREA"),s,e,h;if(f.method=="post")if(f.enctype=="multipart/form-data"){if(f.formData=new FormData(t[0]),o||n==null||n.attr("name")==null||f.formData.append(n.attr("name"),n.val()),n.length>0&&n[0]._files!=null)for(s=0;s<n[0]._files.length;s++)f.formData.append(n[0]._filesName,n[0]._files[s])}else f.enctype=="text/plain"?(f.formData=t.serialize(),o||n==null||n.attr("name")==null||(f.formData=encodeURIComponent(n.attr("name"))+"="+encodeURIComponent(n.val())+"&"+f.formData)):(f.formData=t.serialize(),o||n==null||n.attr("name")==null||(f.formData=encodeURIComponent(n.attr("name"))+"="+encodeURIComponent(n.val())+"&"+f.formData));else e=sircl.urlParser.exec(f.action),h=!o&&n!=null&&n.attr("name")!=null?encodeURIComponent(n.attr("name"))+"="+encodeURIComponent(n.val())+"&":"",f.action=e[1]+(e[2]?e[2]+"&":"?")+h+t.serialize()+(e[3]?e[3]:""),f.formData=null;this._processRequest(f,u)};sircl._processRequest=function(n,t){var i,r;n.$finalTarget=n.$initialTarget;n.targetHasChanged=!1;n.getAttr==null&&(n.getAttr=function(n){return this.$trigger!=null?this.$trigger.attr(n):null});i=!1;n.$trigger!=null&&n.$trigger.attr("browser-cache")!=null?i=n.$trigger.attr("browser-cache").toLowerCase()=="on":n.$form!=null&&n.$form.attr("browser-cache")!=null&&(i=n.$form.attr("browser-cache").toLowerCase()=="on");n.xhr=new XMLHttpRequest;n.xhr.open(n.method,n.action);typeof n.formData=="object"||(n.enctype==null&&n.charset==null?n.xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded"):n.enctype==null&&n.charset!=null?n.xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset="+n.charset):n.enctype!=null&&n.charset==null?n.xhr.setRequestHeader("Content-Type",n.enctype):n.xhr.setRequestHeader("Content-Type",n.enctype+"; charset="+rec.charset));i==!1&&(n.xhr.setRequestHeader("Cache-Control","no-cache, no-store, max-age=0"),n.xhr.setRequestHeader("Pragma","no-cache"));n.xhr.setRequestHeader("Accept",n.accept?n.accept:"text/html");n.xhr.setRequestHeader("X-Sircl-Request-Type","Partial");n.xhr.setRequestHeader("X-Sircl-Timezone-Offset",(new Date).getTimezoneOffset());r=new SirclRequestProcessor(t);r.next(n)};SirclRequestProcessor.prototype.send=function(n){if(arguments.length==0)return this._steps[this._sendIndex];this._steps[this._sendIndex]=n};SirclRequestProcessor.prototype.process=function(n){if(arguments.length==0)return this._steps[this._processIndex];this._steps[this._processIndex]=n};SirclRequestProcessor.prototype.render=function(n){if(arguments.length==0)return this._steps[this._renderIndex];this._steps[this._renderIndex]=n};SirclRequestProcessor.prototype._send=function(n){var t=this;if(n.abort==!0){n.succeeded=!1;n.aborted=!0;t.next(n);return}n.xhr.addEventListener("abort",function(i){n.loadEvent=i;n.status=n.xhr.status;n.statusText=n.xhr.statusText;n.responseText=n.xhr.responseText;n.aborted=!0;n.succeeded=!1;t.next(n)});n.xhr.addEventListener("error",function(i){n.loadEvent=i;n.status=n.xhr.status;n.statusText=n.xhr.statusText;n.responseText=n.xhr.responseText;n.aborted=!1;n.succeeded=!1;t.next(n)});n.xhr.addEventListener("load",function(i){var e,o,u,r,f;n.loadEvent=i;n.status=n.xhr.status;n.statusText=n.xhr.statusText;n.responseText=n.xhr.responseText;e=n.xhr.getResponseHeader("X-Sircl-Load");e!=null&&$(e).filter("[onload-load]").each(function(){$(this).load($(this).attr("onload-load"))});o=n.xhr.getResponseHeader("X-Sircl-Reload-After");o!=null&&parseFloat(o)<=0&&clearInterval(n.$initialTarget[0]._onloadInterval);u=n.xhr.getResponseHeader("Location");u!==null?n.xhr.getResponseHeader("X-Sircl-Target")=="_self"?window.location.href=u:(n.redirects===undefined&&(n.redirects=0),n.redirects++,n.redirects>sircl.max_redirects?(sircl.handleError("S141","Too many redirects.",{request:n}),n.aborted=!0,n.succeeded=!1,t.next(n)):(n.action=u,n.method="get",n.xhr.open(n.method,n.action),n.xhr.setRequestHeader("Accept",n.accept?n.accept:"text/html"),n.xhr.setRequestHeader("Cache-Control","no-cache, no-store, max-age=0"),n.xhr.setRequestHeader("Pragma","no-cache"),n.xhr.setRequestHeader("X-Sircl-Request-Type","Partial"),n.xhr.setRequestHeader("X-Sircl-Timezone-Offset",(new Date).getTimezoneOffset()),n.xhr.send())):(r=n.xhr.getResponseHeader("X-Sircl-Target"),r=="_self"?n.method=="get"?(n.$finalTarget=null,n.targetHasChanged=!0):console.warn("X-Sircl-Target response header value '_self' is only vaid for 'get' requests."):r=="main"?(n.$finalTarget=sircl.ext.$mainTarget(),n.targetHasChanged=!0):r!=null&&(n.$finalTarget=sircl.ext.$select(n.$trigger,r),n.targetHasChanged=!0),n.documentTitle=n.xhr.getResponseHeader("X-Sircl-Document-Title"),n.documentLanguage=n.xhr.getResponseHeader("X-Sircl-Document-Language"),n.alertMsg=n.xhr.getResponseHeader("X-Sircl-Alert-Message"),n.renderMode=n.xhr.getResponseHeader("X-Sircl-Render-Mode"),f=n.xhr.getResponseHeader("X-Sircl-History"),f=="back"?n.action="history:back":f=="back-uncached"?n.action="history:back-uncached":f=="refresh"&&(n.action="history:refresh"),n.historyReplace=n.xhr.getResponseHeader("X-Sircl-History-Replace"),n.xhr.status<=299?(n.aborted=!1,n.succeeded=!0,t.next(n)):(n.aborted=!1,n.succeeded=!1,t.error(n)))});n.xhr.send(n.formData)};SirclRequestProcessor.prototype._process=function(n){if(n.historyReplace){var t=window.history.state;t!=null&&(t.url=n.historyReplace);window.history.replaceState(t,document.title,n.historyReplace)}n.alertMsg&&sircl.ext.alert(n.$trigger,n.alertMsg,null,!1);n.succeeded?n.action=="history:back"?window.history.back():n.action=="history:back-uncached"?(sircl.ext.$mainTarget().addClass("sircl-history-nocache-once"),window.history.back()):n.action=="history:refresh"?sircl.singlePageMode==!1||n.$finalTarget==null?window.location.href=n.action:sircl._processRequest({$trigger:null,$initialTarget:sircl.ext.$mainTarget(),action:window.location.href,method:"get",isForeground:!0,_historyMode:"skip"}):n.status!="204"&&this.next(n):sircl.handleError("S111","Error processing request.",{request:n})};SirclRequestProcessor.prototype._render=function(n){var t=n.$finalTarget,i=n.responseText,r=n.getAttr("sub-target"),f=n.$finalTarget.find(r),e,u;r!=null&&f.length>0&&(e=$("<div/>").append(n.responseText),u=e.find(r).html(),u!=null&&(t=f,i=u));n.documentTitle!=null&&(window.document.title=n.documentTitle);n.documentLanguage!=null&&$("HTML").attr("lang",n.documentLanguage);n.renderMode==="append"?(t.append(i),t.each(function(){sircl._afterLoad(this)})):t.html(i);n.$finalTarget.each(function(){sircl.ext.visible(this,!0)});this.next(n)};SirclRequestProcessor.prototype.next=function(n){if(this._steps.length>0){var i=this._steps[0];this._steps.splice(0,1);try{i.apply(this,arguments)}catch(t){console.error(t);sircl.handleError("S131","Error executing a RequestProcessor step: "+t,{exception:t,fx:i});this.next(n)}}else this._loadComplete&&this._loadComplete(n.responseText,n.statusText,n.xhr)};SirclRequestProcessor.prototype.error=function(n){this._steps=sircl._requestHandlers.onError.concat(this._steps);this.next(n)};$(document).ready(function(){sircl.singlePageMode=$(sircl.mainTargetSelector$).length>0;console.info("sircl.singlePageMode = "+sircl.singlePageMode+"");$(document).on("click","*[href]:not([download]), [onclick-load]",function(n){var t,e,o,f,l,i,h,r,s,c,u;if(this.hasAttribute("onclick-load")?(t=this.getAttribute("onclick-load"),e=!1):(t=this.getAttribute("href"),e=this.tagName==="A"),o=!1,$(this).hasClass("substitute-fields")){f=$(this).closest("FORM");f.length==0&&(f=$(document));l=new RegExp(/(\[[a-z0-9\.\-\_]+?\])|(\%5B[a-z0-9\.\-\_]+?\%5D)/gi);i=[];do if(h=l.exec(t),h!==null)i.push(h[0]);else break;while(1);for(r=0;r<i.length;r++)o=!0,s=i[r].charAt(0)==="["?f.find("[name='"+i[r].substr(1,i[r].length-2)+"']").val():f.find("[name='"+i[r].substr(3,i[r].length-6)+"']").val(),t=s===undefined?t.replace(i[r],""):i[r].charAt(0)==="["?t.replace(i[r],s):t.replace(i[r],encodeURIComponent(s))}if(t!=="null"&&t!=="")if(t==="history:back")window.history.back();else if(t==="history:back-uncached")sircl.ext.$mainTarget().addClass("sircl-history-nocache-once"),window.history.back();else if(t==="history:refresh")location.reload();else if(t.indexOf("alert:")===0)sircl.ext.alert($(this),t.substr(6),null,!0);else if(t.indexOf("javascript:")===0)c=this.getAttribute("nonce"),c?jQuery.globalEval(t.substr(11),{nonce:c}):jQuery.globalEval(t.substr(11));else{if(e&&t.indexOf("#")===0)return;if(t.indexOf("#")===0)window.location.hash=t;else if(u=this.getAttribute("target"),u==null&&!sircl.singlePageMode||u!=null&&sircl.ext.isExternalTarget(u))if(o&&u===null)window.location.href=t;else if(o)window.open(t,u);else{if(e)return;u==null?window.location.href=t:window.open(t,u)}else sircl._loadUrl($(this),t,u!=null?sircl.ext.$select($(this),u):sircl.ext.$mainTarget())}n.preventDefault();n.stopPropagation()});$(document).on("click","form *:submit, *:submit[form]",function(){var n=this.hasAttribute("form")?document.getElementById(this.getAttribute("form")):$(this).closest("FORM")[0];clearTimeout(n._formTriggerTimer);n._formTrigger=this;n._formTriggerTimer=setTimeout(function(){n._formTrigger=null},700)});$(document).on("submit","form:not([download]):not([method=dialog])",function(n){this.submit();n.preventDefault();n.stopPropagation()});$(document).on("keydown","FORM[default-submit-button] INPUT",function(n){var t,i;n.keyCode==13?(n.preventDefault(),t=$(this).closest("FORM"),i=sircl.ext.$select(t,t.attr("default-submit-button")),i.length>0&&i[0].click()):n.keyCode==27&&(n.preventDefault(),t=$(this).closest("FORM"),i=sircl.ext.$select(t,t.attr("default-cancel-button")),i.length>0&&i[0].click())})});sircl._contentReadyHandlers={};sircl._contentReadyHandlers.before=[];sircl._contentReadyHandlers.content=[];sircl._contentReadyHandlers.enrich=[];sircl._contentReadyHandlers.process=[];sircl.addContentReadyHandler=function(n,t){this._contentReadyHandlers[n].push(t)};sircl.addAttributeAlias=function(n,t,i){sircl.addContentReadyHandler("enrich",function(){$(this).find(n).each(function(){$(this).attr(t,i)})})};sircl._beforeUnload=function(n){sircl._contentReadyHandlers.before.forEach(function(t){try{t.call(n)}catch(i){console.error(i);sircl.handleError("S121","Error executing a BeforeUnLoad handler: "+i,{exception:i,fx:t})}})};sircl._afterLoad=function(n){$(n).addClass("sircl-content-processing");sircl._contentReadyHandlers.content.forEach(function(t){try{t.call(n)}catch(i){console.error(i);sircl.handleError("S122","Error executing an AfterLoad content handler: "+i,{exception:i,fx:t})}});sircl._contentReadyHandlers.enrich.forEach(function(t){try{t.call(n)}catch(i){console.error(i);sircl.handleError("S123","Error executing an AfterLoad enrich handler: "+i,{exception:i,fx:t})}});sircl._contentReadyHandlers.process.forEach(function(t){try{t.call(n)}catch(i){console.error(i);sircl.handleError("S124","Error executing an AfterLoad process handler: "+i,{exception:i,fx:t})}});$(n).removeClass("sircl-content-processing")};$$("content",function(){$(this).find("*[onload-moveto]").each(function(){$($(this).attr("onload-moveto")).html($(this).html());$(this).html("")})});$$(function(){var n=$(this).find("[document-title]");n.length>0&&(document.title=n[0].getAttribute("document-title"));$(this).find("*[autofocus]:first").each(function(){try{this.focus()}catch(n){}try{this.select()}catch(n){}})});sircl.addAttributeAlias(".target","target",":this");sircl._errorHandlers=[];sircl.addErrorHandler=function(n){this._errorHandlers.push(n)};sircl.handleError=function(n,t,i){i=i||{};this._errorHandlers.forEach(function(r){try{r(n,t,i)}catch(u){}})};sircl.addErrorHandler(function(n,t,i){console.error("Sircl "+n+" - "+t,i)});sircl._afterHistoryHandlers=[];sircl.addAfterHistoryHandler=function(n){this._afterHistoryHandlers.push(n)};sircl._afterHistory=function(){this._afterHistoryHandlers.forEach(function(n){n()})};sircl.addRequestHandler("beforeRender",function(n){if(n._historyMode!="skip"&&n.method==="get"&&n.$finalTarget.is(sircl.ext.$mainTarget())){n._historyMode=n.getAttr("history")||"push";n._historyCached=n._historyMode.indexOf("cache")>=0;var t={url:window.location.href,html:n._historyCached?n.$finalTarget.html():"",cached:n._historyCached};window.history.replaceState(t,document.title,t.url)}this.next(n)});sircl.addRequestHandler("afterRender",function(n){if(n._historyMode){var t={url:n.action,html:"",cached:!1};n._historyMode.indexOf("push")>=0?(window.history.pushState(t,document.title,t.url),sircl._afterHistory()):n._historyMode.indexOf("replace")>=0&&(window.history.replaceState(t,document.title,t.url),sircl._afterHistory())}this.next(n)});$(function(){window.onpopstate=function(n){var t=n.state,i=null;t?(t.cached&&sircl.ext.$mainTarget().hasClass("sircl-history-nocache-once")?(sircl.ext.$mainTarget().removeClass("sircl-history-nocache-once"),t.cached=!1,i=function(){var n={url:window.location.href,html:sircl.ext.$mainTarget().html(),cached:!0};window.history.replaceState(n,document.title,n.url);sircl._afterHistory()}):i=function(){sircl._afterHistory()},t.cached?(sircl.ext.$mainTarget().html(t.html),sircl._afterHistory()):sircl._processRequest({$trigger:null,$initialTarget:sircl.ext.$mainTarget(),action:t.url,method:"get",isForeground:!0,_historyMode:"skip"},i)):window.history.go(0)};sircl._afterHistory()});sircl.addRequestHandler("beforeSend",function(n){if(n._spinner=!1,n.$trigger!=null&&n.$trigger.length==1&&n.$trigger[0].tagName!="FORM"){var t=n.$trigger.find(".spinner");t.length>0&&(n._spinner_to_restore=n.$trigger[0].innerHTML,t[0].outerHTML=sircl.html_spinner)}this.next(n)});sircl.addRequestHandler("afterSend",function(n){n._spinner_to_restore&&(n.$trigger[0].innerHTML=n._spinner_to_restore);this.next(n)});sircl.addRequestHandler("beforeSend",function(n){n.$initialTarget.find(".overlay").each(function(){$(this).parent().css("position","relative");sircl.ext.visible(this,!0)});this.next(n)});sircl.addRequestHandler("afterSend",function(n){n.$initialTarget.find(".overlay").each(function(){sircl.ext.visible(this,!1)});this.next(n)});sircl.addRequestHandler("beforeSend",function(n){$(document).addClass("body-loading");n.$initialTarget.addClass("loading");this.next(n)});sircl.addRequestHandler("afterSend",function(n){$(document).removeClass("body-loading");n.$initialTarget.removeClass("loading");this.next(n)});$(document).ready(function(){$(window).on("beforeunload",function(){$(document).addClass("body-loading")})});sircl.addRequestHandler("beforeSend",function(n){var t,i;n._progressToResetAfterSend=[];n._progressToHideAfterSend=[];n.xhr!=null&&(t=sircl.ext.$select(n.$initialTarget,n.$initialTarget.attr("upload-progress")).filter("PROGRESS"),t.length>0&&(t.each(function(){this.removeAttribute("value");n._progressToResetAfterSend.push(this);sircl.ext.visible(this)||(n._progressToHideAfterSend.push(this),sircl.ext.visible(this,!0))}),n.xhr.upload.addEventListener("progress",function(n){n.lengthComputable&&t.each(function(){this.value=n.loaded/n.total})})),i=sircl.ext.$select(n.$initialTarget,n.$initialTarget.attr("download-progress")).filter("PROGRESS"),i.length>0&&(i.each(function(){this.removeAttribute("value");n._progressToResetAfterSend.push(this);sircl.ext.visible(this)||(n._progressToHideAfterSend.push(this),sircl.ext.visible(this,!0))}),n.xhr.addEventListener("progress",function(n){n.lengthComputable&&i.each(function(){this.value=n.loaded/n.total})})));this.next(n)});sircl.addRequestHandler("afterSend",function(n){n._progressToHideAfterSend.forEach(function(n){sircl.ext.visible(n,!1)});n._progressToResetAfterSend.forEach(function(n){n.value=0});this.next(n)});sircl.addRequestHandler("afterRender",function(n){var t,i;n.xhr!=null&&(t=n.xhr.getResponseHeader("X-Sircl-Reload-After"),t&&(i=parseFloat(t),t>0&&n.method=="get"&&setTimeout(function(){n.$finalTarget.load(n.url)},i*1e3)));this.next(n)});sircl.addAttributeAlias(".onclick-closedialog","onclick-closedialog","<DIALOG");$(function(){$(document).on("click","[onclick-showdialog]",function(){var n=sircl.ext.$select($(this),$(this).attr("onclick-showdialog"));n.length>0&&(n.is(".dialog-exclusive")&&$("DIALOG[open]").each(function(){n.is($(this))||this.close()}),n.hasClass("dialog-modal")?n[0].showModal():n[0].show())});$(document).on("click","[onclick-closedialog]",function(){for(var t=sircl.ext.$select($(this),$(this).attr("onclick-closedialog")),n=0;n<t.length;n++)t[n].close()})});sircl.addRequestHandler("beforeSend",function(n){var t=this;n._dialogOpened=n.$initialTarget.closest("DIALOG.beforeload-showdialog:not([open])");n._dialogOpened.length>0&&(n._dialogOpened.is(".dialog-exclusive")&&$("DIALOG[open]").each(function(){$(this).is(n.$finalTarget)||this.close()}),n._dialogOpened.hasClass("dialog-modal")?n._dialogOpened[0].showModal():n._dialogOpened[0].show());t.next(n)});sircl.addRequestHandler("afterSend",function(n){var i=this,t;!n.succeeded&&n._dialogOpened.length>0?(n._dialogOpened[0].close(),n._dialogOpened=$([])):n.status=="204"&&(t=n.$initialTarget.closest("DIALOG[open]"),t.length>0&&t[0].close());i.next(n)});sircl.addRequestHandler("beforeRender",function(n){var i=this,t;n.targetHasChanged&&n._dialogOpened.length>0&&(n.$finalTarget.has(n._dialogOpened)||(n._dialogOpened[0].close(),n._dialogOpened=$([])));t=n.$finalTarget.closest("DIALOG");t.is(".dialog-exclusive")&&$("DIALOG[open]").each(function(){t.is($(this))||this.close()});i.next(n)});sircl.addRequestHandler("afterRender",function(n){var i=this,t=n.$finalTarget.closest("DIALOG:not([open])");t.length>0&&(t.hasClass("dialog-modal")?t[0].showModal():t[0].show());i.next(n)});$$(function(){$(this).find("DIALOG").each(function(n,t){t.addEventListener("cancel",function(n){$(this).is(".dialog-nocancel")&&n.preventDefault()})});$(this).find("DIALOG.onclose-restore").each(function(n,t){t._originalContent=$(t).html();t.addEventListener("close",function(){var n=this._originalContent;n!==undefined&&$(this).html(n)})});$(this).find("DIALOG[onload-showdialogafter]").each(function(){for(var n=0,i=$(this).attr("onload-showdialogafter").split(":"),t=0;t<i.length;t++)n=parseFloat(i[t])+60*n;setTimeout(function(n){var t=$(n);t.is(".dialog-exclusive")&&$("DIALOG[open]").each(function(){t.is($(this))||this.close()});t.hasClass("dialog-modal")?n.showModal():n.show()},n*1e3,this)})});sircl.addAttributeAlias(".oninput-change","oninput-changeafter","0.8");sircl.addAttributeAlias(".onchange-submit","onchange-submit",":form");$(function(){$(document).on("change","[onchange-submit]",function(n){if($(n.target).closest(".onchange-nosubmit").length==0&&$(n.target).closest(".sircl-content-processing").length==0){var t=sircl.ext.$select($(this),$(this).attr("onchange-submit"));t.length>0&&(t[0]._formTrigger=this,t[0]._formTriggerTimer=setTimeout(function(){t[0]._formTrigger=null},700),t[0].submit())}});$(document).on("input","INPUT[oninput-changeafter], TEXTAREA[oninput-changeafter]",function(){var n=1e3*$(this).attr("oninput-changeafter");this._oninput_changeafter_timeout&&clearTimeout(this._oninput_changeafter_timeout);this._oninput_changeafter_timeout=setTimeout(function(n){$(n).change()},n,this)});$(document.body).on("change","INPUT[oninput-changeafter], TEXTAREA[oninput-changeafter]",function(n){var t=$(this).val(),i=this._previousChangeValue;t===i?(n.preventDefault(),n.stopPropagation()):this._previousChangeValue=t})});sircl.addAttributeAlias(".onsubmit-disable","onsubmit-disable",">:submit");sircl.addRequestHandler("beforeSend",function(n){n.$form&&n.$form.hasAttr("onsubmit-disable")&&(n._formSubmitsToReenable=[],sircl.ext.$select(n.$form,n.$form.attr("onsubmit-disable")).filter(":enabled").each(function(){n._formSubmitsToReenable.push(this);this.disabled=!0}));this.next(n)});sircl.addRequestHandler("afterSend",function(n){n._formSubmitsToReenable&&n._formSubmitsToReenable.forEach(function(n){n.disabled=!1});this.next(n)});$(function(){$(document.body).on("click","*[onclick-propagate=off]",function(n){n.stopPropagation()});$(document.body).on("dblclick","*[ondblclick-propagate=off]",function(n){n.stopPropagation()});$(document.body).on("change","*[onchange-propagate=off]",function(n){n.stopPropagation()});$(document.body).on("input","*[oninput-propagate=off]",function(n){n.stopPropagation()})});sircl.addAttributeAlias(".onload-click","onload-click",":this");$$(function(){$(this).find("[onload-click]").each(function(){sircl.ext.$select($(this),$(this).attr("onload-click"))[0].click()});$(this).find("[onload-load]").each(function(){var r=$(this).attr("onload-load")+"",u=$(this).attr("onload-reloadafter"),i,n,t;if($(this).load(r.replace("{rnd}",Math.random())),u){for(i=u.split(":"),n=0,t=0;t<i.length;t++)n=parseFloat(i[t])+60*n;$(this)[0]._onloadInterval=window.setInterval(function(n){n.load(r.replace("{rnd}",Math.random()))},n*1e3,$(this))}});$(this).find("[onload-reload]").each(function(){$($(this).attr("onload-reload")).filter("[onload-load]").each(function(){var n=$(this).attr("onload-load")+"";$(this).load(n.replace("{rnd}",Math.random()))})})});$$(function(){$(this).find("FORM[onchange-set]").each(function(){var n=$(this).find("INPUT[name='"+$(this).attr("onchange-set")+"']");n.length>0&&["true","on"].indexOf((n.val()||"false").toLowerCase())>=0&&$(this).addClass("form-changed")})});$(function(){$(document).on("change","FORM[onchange-set]",function(n){if($(n.target).closest(".sircl-content-processing").length==0){$(this).addClass("form-changed");var t=$(this).find("INPUT[name='"+$(this).attr("onchange-set")+"']");t.length>0&&t.val(!0)}});$(document.body).on("click","*[href]:not(.onunloadchanged-allow):not([download])",function(n){var t=$("FORM.form-changed[onunloadchanged-confirm]"),i;t.length>0&&(i=t[0].getAttribute("onunloadchanged-confirm"),sircl.ext.confirm($(this),i,n)||(n.stopPropagation(),n.preventDefault()))});$(document.body).on("click","FORM.form-changed *[onclickchanged-confirm]",function(n){var t=$(this).attr("onclickchanged-confirm");sircl.ext.confirm($(this),t,n)||(n.stopPropagation(),n.preventDefault())})});$(document).ready(function(){setTimeout(function(n){$("BODY").addClass("sircl-content-processing");sircl._afterLoad(n);$("BODY").removeClass("sircl-content-processing")},0,this)});typeof sircl=="undefined"&&console.warn("The 'sircl-extended' component should be registered after the 'sircl' component. Please review order of script files.");sircl.addAttributeAlias(".beforeload-show","beforeload-show",":this");sircl.addAttributeAlias(".beforeload-hide","beforeload-hide",":this");sircl.addRequestHandler("beforeSend",function(n){n.$initialTarget.find("[beforeload-hide]").each(function(){sircl.ext.visible(sircl.ext.$select($(this),$(this).attr("beforeload-hide")),!1)});n.$initialTarget.find("[beforeload-show]").each(function(){sircl.ext.visible(sircl.ext.$select($(this),$(this).attr("beforeload-show")),!0)});n.$initialTarget.find("[beforeload-removeclass]").each(function(){sircl.ext.removeClass($(this),$(this).attr("beforeload-removeclass"))});n.$initialTarget.find("[beforeload-addclass]").each(function(){sircl.ext.addClass($(this),$(this).attr("beforeload-addclass"))});n.$initialTarget.find("[beforeload-toggleclass]").each(function(){sircl.ext.toggleClass($(this),$(this).attr("beforeload-toggleclass"))});this.next(n)});sircl.addAttributeAlias(".onload-show","onload-show",":this");sircl.addAttributeAlias(".onload-hide","onload-hide",":this");$$("enrich",function(){$(this).find(".onload-setvaluefromquery").each(function(){$(this).attr("onload-setvaluefromquery",this.name)})});$$(function(){$(this).find("[onload-hide]").each(function(){sircl.ext.visible(sircl.ext.$select($(this),$(this).attr("onload-hide")),!1)});$(this).find("[onload-show]").each(function(){sircl.ext.visible(sircl.ext.$select($(this),$(this).attr("onload-show")),!0)});$(this).find("[onload-removeclass]").each(function(){sircl.ext.removeClass($(this),$(this).attr("onload-removeclass"))});$(this).find("[onload-addclass]").each(function(){sircl.ext.addClass($(this),$(this).attr("onload-addclass"))});$(this).find("[onload-toggleclass]").each(function(){sircl.ext.toggleClass($(this),$(this).attr("onload-toggleclass"))});$(this).find("[onload-setvaluefromquery]").each(function(){$(this).attr("value",sircl.ext.getUrlParameter($(this).attr("onload-setvaluefromquery")));$(this).change()});$(this).find("SELECT[onload-defaultselect]").each(function(){var i,t,r,u,n;if($(this).val()=="")if(i=$(this).attr("onload-defaultselect")+"",t=$("option",this),i.toLowerCase()==":singleton"){for(r=-1,n=0;n<t.length;n++)if(t[n].value!=""&&r==-1)r=n;else if(t[n].value!="")return;r!=-1&&($(this).val(t[r].value),$(this).change())}else if(i.toLowerCase()==":first"){for(u=-1,n=0;n<t.length;n++)if(t[n].value!=""){$(this).val(t[n].value);$(this).change();break}}else for(n=0;n<t.length;n++)if(t[n].value==i){$(this).val(i);$(this).change();break}})});$(function(){$(document).on("change","[onchange-check]",function(){sircl.ext.$select($(this),$(this).attr("onchange-check")).each(function(){this.checked||(this.checked=!0,$(this).change())})});$(document).on("change","*[onchange-click]",function(){var n=$(this).attr("onchange-click");sircl.ext.$select($(this),n)[0].click()})});$(function(){$(document).on("click","*[onclick-click]",function(){var n=$(this).attr("onclick-click");sircl.ext.$select($(this),n)[0].click()});$(document).on("click","[onclick-clear]",function(){sircl.ext.$select($(this),$(this).attr("onclick-clear")).html("")});$(document).on("click","[onclick-hide]",function(){sircl.ext.visible(sircl.ext.$select($(this),$(this).attr("onclick-hide")),!1)});$(document).on("click","[onclick-show]",function(){sircl.ext.visible(sircl.ext.$select($(this),$(this).attr("onclick-show")),!0)});$(document).on("click","[onclick-toggleshow]",function(){sircl.ext.$select($(this),$(this).attr("onclick-toggleshow")).each(function(){sircl.ext.visible($(this),!sircl.ext.visible($(this)))})});$(document).on("click","[onclick-removeclass]",function(){sircl.ext.removeClass($(this),$(this).attr("onclick-removeclass"))});$(document).on("click","[onclick-addclass]",function(){sircl.ext.addClass($(this),$(this).attr("onclick-addclass"))});$(document).on("click","[onclick-toggleclass]",function(){sircl.ext.toggleClass($(this),$(this).attr("onclick-toggleclass"))});$(document).on("click","[onclick-disable]",function(){sircl.ext.$select($(this),$(this).attr("onclick-disable")).prop("disabled",!0)});$(document).on("click","[onclick-enable]",function(){sircl.ext.$select($(this),$(this).attr("onclick-enable")).prop("disabled",!1)});$(document).on("click","[onclick-readonly]",function(){sircl.ext.$select($(this),$(this).attr("onclick-readonly")).prop("readonly",!0)});$(document).on("click","[onclick-readwrite]",function(){sircl.ext.$select($(this),$(this).attr("onclick-readwrite")).prop("readonly",!1)});$(document).on("click","[onclick-clearvalue]",function(){sircl.ext.$select($(this),$(this).attr("onclick-clearvalue")).each(function(){$(this).val("");$(this).change()})});$(document).on("click","[onclick-uncheck]",function(){sircl.ext.$select($(this),$(this).attr("onclick-uncheck")).filter("INPUT[type=checkbox], INPUT[type=radio]").each(function(){this.checked=!1;$(this).change()})});$(document).on("click","[onclick-check]",function(){sircl.ext.$select($(this),$(this).attr("onclick-check")).filter("INPUT[type=checkbox], INPUT[type=radio]").each(function(){this.checked=!0;$(this).change()})});$(document).on("click","[onclick-togglecheck]",function(){sircl.ext.$select($(this),$(this).attr("onclick-togglecheck")).filter("INPUT[type=checkbox], INPUT[type=radio]").each(function(){this.checked=!this.checked;$(this).change()})});$(document).on("click","[onclick-scrollintoview]",function(){var n=sircl.ext.$select($(this),$(this).attr("onclick-scrollintoview"));n.length>0&&n[0].scrollIntoView()})});$(function(){$(document).on("dblclick","*[ondblclick-load]",function(n){var t=this.getAttribute("ondblclick-load"),r,i;t==="null"||t===""||(t==="history:back"?window.history.back():t==="history:back-uncached"?(sircl.ext.$mainTarget().addClass("sircl-history-nocache-once"),window.history.back()):t==="history:refresh"?location.reload():t.indexOf("alert:")===0?sircl.ext.alert($(this),t.substr(6),null,!0):t.indexOf("javascript:")===0?(r=this.getAttribute("nonce"),r?jQuery.globalEval(t.substr(11),{nonce:r}):jQuery.globalEval(t.substr(11))):t.indexOf("#")===0?window.location.hash=t:(i=this.getAttribute("target"),i==null&&!sircl.singlePageMode||i!=null&&sircl.ext.isExternalTarget(i)?i==null?window.location.href=t:window.open(t,i):sircl._loadUrl($(this),t,$(i))));n.preventDefault();n.stopPropagation()});$(document).on("dblclick","*[ondblclick-click]",function(){var n=$(this).attr("ondblclick-click");sircl.ext.$select($(this),n)[0].click()});$(document).on("dblclick","[ondblclick-clear]",function(){sircl.ext.$select($(this),$(this).attr("ondblclick-clear")).html("")});$(document).on("dblclick","[ondblclick-hide]",function(){sircl.ext.visible(sircl.ext.$select($(this),$(this).attr("ondblclick-hide")),!1)});$(document).on("dblclick","[ondblclick-show]",function(){sircl.ext.visible(sircl.ext.$select($(this),$(this).attr("ondblclick-show")),!0)});$(document).on("dblclick","[ondblclick-toggleshow]",function(){sircl.ext.$select($(this),$(this).attr("ondblclick-toggleshow")).each(function(){sircl.ext.visible($(this),!sircl.ext.visible($(this)))})});$(document).on("dblclick","[ondblclick-removeclass]",function(){sircl.ext.removeClass($(this),$(this).attr("ondblclick-removeclass"))});$(document).on("dblclick","[ondblclick-addclass]",function(){sircl.ext.addClass($(this),$(this).attr("ondblclick-addclass"))});$(document).on("dblclick","[ondblclick-toggleclass]",function(){sircl.ext.toggleClass($(this),$(this).attr("ondblclick-toggleclass"))});$(document).on("dblclick","[ondblclick-scrollintoview]",function(){var n=sircl.ext.$select($(this),$(this).attr("ondblclick-scrollintoview"));n.length>0&&n[0].scrollIntoView()})});$(function(){$(document).on("mouseenter","*[onhover-hide]",function(){sircl.ext.visible(sircl.ext.$select($(this),$(this).attr("onhover-hide")),!1)});$(document).on("mouseleave","*[onhover-hide]",function(){sircl.ext.visible(sircl.ext.$select($(this),$(this).attr("onhover-hide")),!0)});$(document).on("mouseenter","*[onhover-show]",function(){sircl.ext.visible(sircl.ext.$select($(this),$(this).attr("onhover-show")),!0)});$(document).on("mouseleave","*[onhover-show]",function(){sircl.ext.visible(sircl.ext.$select($(this),$(this).attr("onhover-show")),!1)});$(document).on("mouseenter","*[onhover-removeclass]",function(){sircl.ext.removeClass($(this),$(this).attr("onhover-removeclass"))});$(document).on("mouseleave","*[onhover-removeclass]",function(){sircl.ext.addClass($(this),$(this).attr("onhover-removeclass"))});$(document).on("mouseenter","*[onhover-addclass]",function(){sircl.ext.addClass($(this),$(this).attr("onhover-addclass"))});$(document).on("mouseleave","*[onhover-addclass]",function(){sircl.ext.removeClass($(this),$(this).attr("onhover-addclass"))});$(document).on("mouseenter","*[onhover-toggleclass]",function(){sircl.ext.toggleClass($(this),$(this).attr("onhover-toggleclass"))});$(document).on("mouseleave","*[onhover-toggleclass]",function(){sircl.ext.toggleClass($(this),$(this).attr("onhover-toggleclass"))})});$(function(){$(document).on("change","*[onchecked-click]:checked",function(){var n=this.getAttribute("onchecked-click");sircl.ext.$select($(this),n)[0].click()});$(document).on("change","[ifchecked-hide]",function(){sircl.ext.visible(sircl.ext.$select($(this),this.getAttribute("ifchecked-hide")),!this.checked)});$(document).on("change","[ifchecked-show]",function(){sircl.ext.visible(sircl.ext.$select($(this),this.getAttribute("ifchecked-show")),this.checked)});$(document).on("change","[ifchecked-disable]",function(){sircl.ext.$select($(this),this.getAttribute("ifchecked-disable")).prop("disabled",this.checked)});$(document).on("change","[ifchecked-enable]",function(){sircl.ext.$select($(this),this.getAttribute("ifchecked-enable")).prop("disabled",!this.checked)});$(document).on("change","[ifchecked-readonly]",function(){sircl.ext.$select($(this),this.getAttribute("ifchecked-readonly")).prop("readonly",this.checked)});$(document).on("change","[ifchecked-readwrite]",function(){sircl.ext.$select($(this),this.getAttribute("ifchecked-readwrite")).prop("readonly",!this.checked)});$(document).on("change","[ifchecked-removeclass]",function(){this.checked?sircl.ext.removeClass($(this),this.getAttribute("ifchecked-removeclass")):sircl.ext.addClass($(this),this.getAttribute("ifchecked-removeclass"))});$(document).on("change","[ifchecked-addclass]",function(){this.checked?sircl.ext.addClass($(this),this.getAttribute("ifchecked-addclass")):sircl.ext.removeClass($(this),this.getAttribute("ifchecked-addclass"))});$(document).on("change","[ifchecked-clearvalue]",function(){this.checked&&sircl.ext.$select($(this),this.getAttribute("ifchecked-clearvalue")).each(function(){$(this).val("");$(this).change()})});$(document).on("change","[ifunchecked-clearvalue]",function(){this.checked||sircl.ext.$select($(this),this.getAttribute("ifunchecked-clearvalue")).each(function(){$(this).val("");$(this).change()})});$(document).on("change","[ifchecked-uncheck]",function(){this.checked&&sircl.ext.$select($(this),this.getAttribute("ifchecked-uncheck")).filter(":checked").each(function(){$(this).prop("checked",!1);$(this).change()})});$(document).on("change","[ifchecked-check]",function(){this.checked&&sircl.ext.$select($(this),this.getAttribute("ifchecked-check")).filter(":not(:checked)").each(function(){$(this).prop("checked",!0);$(this).change()})});$(document).on("change","[ifunchecked-uncheck]",function(){this.checked||sircl.ext.$select($(this),this.getAttribute("ifunchecked-uncheck")).filter(":checked").each(function(){$(this).prop("checked",!1);$(this).change()})});$(document).on("change","[ifunchecked-check]",function(){this.checked||sircl.ext.$select($(this),this.getAttribute("ifunchecked-check")).filter(":not(:checked)").each(function(){$(this).prop("checked",!0);$(this).change()})});$(document).on("change",".ifvalue-events",function(){var t=$(this).closest("FORM"),u,f,e,r;$(this).hasAttr("ifvalue-scope")?t=sircl.ext.$select($(this),$(this).attr("ifvalue-scope")):t.length==0&&(t=$("BODY"));var o=($(this).is("INPUT[type=checkbox]")||$(this).is("INPUT[type=radio]"))&&this.checked==!1,n={toshow:[],tohide:[],toenable:[],todisable:[],toreadwrite:[],toreadonly:[],toclearvalue:[],tocheck:[],touncheck:[]},s=sircl.ext.cssEscape(this.name),i=".ifvalue"+s;if(t.find(i+"-hide").each(function(){sircl.ext.visible(this)&&n.tohide.push(this)}),t.find(i+"-show").each(function(){sircl.ext.visible(this)||n.toshow.push(this)}),t.find(i+"-disable").each(function(){$(this).prop("disabled")==!1&&n.todisable.push(this)}),t.find(i+"-enable").each(function(){$(this).prop("disabled")==!0&&n.toenable.push(this)}),t.find(i+"-readonly").each(function(){$(this).prop("readonly")==!1&&action.toreadonly.push(this)}),t.find(i+"-readwrite").each(function(){$(this).prop("readonly")==!0&&action.toreadwrite.push(this)}),t.find(i+"-clearvalue").each(function(){$(this).val()!=""&&action.toclearvalue.push(this)}),t.find(i+"-uncheck").each(function(){this.checked&&n.touncheck.push(this)}),t.find(i+"-check").each(function(){this.checked||n.tocheck.push(this)}),!o)for(u=sircl.ext.effectiveValue(this),u==null&&(u=[]),Array.isArray(u)||(u=[u]),f=0;f<u.length;f++)e=sircl.ext.cssEscape(u[f]),r=i+"is"+e,t.find(r+"-hide").each(function(){n.toshow.indexOf(this)>=0&&n.toshow.splice(n.toshow.indexOf(this),1);sircl.ext.visible(this)&&n.tohide.indexOf(this)===-1&&n.tohide.push(this)}),t.find(r+"-show").each(function(){n.tohide.indexOf(this)>=0&&n.tohide.splice(n.tohide.indexOf(this),1);sircl.ext.visible(this)||n.toshow.indexOf(this)!==-1||n.toshow.push(this)}),t.find(r+"-disable").each(function(){n.toenable.indexOf(this)>=0&&n.toenable.splice(n.toenable.indexOf(this),1);$(this).prop("disabled")==!1&&n.todisable.indexOf(this)===-1&&n.todisable.push(this)}),t.find(r+"-enable").each(function(){n.todisable.indexOf(this)>=0&&n.todisable.splice(n.todisable.indexOf(this),1);$(this).prop("disabled")==!0&&n.toenable.indexOf(this)===-1&&n.toenable.push(this)}),t.find(r+"-readonly").each(function(){n.toreadwrite.indexOf(this)>=0&&n.toreadwrite.splice(n.toreadwrite.indexOf(this),1);$(this).prop("readonly")==!1&&n.toreadonly.indexOf(this)===-1&&action.toreadonly.push(this)}),t.find(r+"-readwrite").each(function(){n.toreadonly.indexOf(this)>=0&&n.toreadonly.splice(n.toreadonly.indexOf(this),1);$(this).prop("readonly")==!0&&n.toreadwrite.indexOf(this)===-1&&action.toreadwrite.push(this)}),t.find(r+"-clearvalue").each(function(){$(this).val()!=""&&n.toclearvalue.indexOf(this)===-1&&action.toclearvalue.push(this)}),t.find(r+"-uncheck").each(function(){n.tocheck.indexOf(this)>=0&&n.tocheck.splice(n.tocheck.indexOf(this),1);this.checked&&n.touncheck.indexOf(this)===-1&&n.touncheck.push(this)}),t.find(r+"-check").each(function(){n.touncheck.indexOf(this)>=0&&n.touncheck.splice(n.touncheck.indexOf(this),1);this.checked||n.tocheck.indexOf(this)!==-1||n.tocheck.push(this)});n.toshow.forEach(function(n){sircl.ext.visible(n,!0)});n.tohide.forEach(function(n){sircl.ext.visible(n,!1)});n.toenable.forEach(function(n){$(n).prop("disabled",!1)});n.todisable.forEach(function(n){$(n).prop("disabled",!0)});n.toreadwrite.forEach(function(n){$(n).prop("readonly",!1)});n.toreadonly.forEach(function(n){$(n).prop("readonly",!0)});n.toclearvalue.forEach(function(n){$(n).val("");$(n).change()});n.tocheck.forEach(function(n){n.checked=!0;$(n).change()});n.touncheck.forEach(function(n){n.checked=!1;$(n).change()})})});$$(function(){$(this).find("[ifchecked-hide]").each(function(){sircl.ext.visible(sircl.ext.$select($(this),this.getAttribute("ifchecked-hide")),!this.checked)});$(this).find("[ifchecked-show]").each(function(){sircl.ext.visible(sircl.ext.$select($(this),this.getAttribute("ifchecked-show")),this.checked)});$(this).find("[ifchecked-disable]").each(function(){sircl.ext.$select($(this),this.getAttribute("ifchecked-disable")).prop("disabled",this.checked)});$(this).find("[ifchecked-enable]").each(function(){sircl.ext.$select($(this),this.getAttribute("ifchecked-enable")).prop("disabled",!this.checked)});$(this).find("[ifchecked-readonly]",function(){sircl.ext.$select($(this),this.getAttribute("ifchecked-readonly")).prop("readonly",this.checked)});$(this).find("[ifchecked-readwrite]",function(){sircl.ext.$select($(this),this.getAttribute("ifchecked-readwrite")).prop("readonly",!this.checked)});$(this).find("[ifchecked-removeclass]",function(){this.checked?sircl.ext.removeClass($(this),this.getAttribute("ifchecked-removeclass")):sircl.ext.addClass($(this),this.getAttribute("ifchecked-removeclass"))});$(this).find("[ifchecked-addclass]",function(){this.checked?sircl.ext.addClass($(this),this.getAttribute("ifchecked-addclass")):sircl.ext.removeClass($(this),this.getAttribute("ifchecked-addclass"))});$(this).find("[ifchecked-clearvalue]",function(){this.checked&&sircl.ext.$select($(this),this.getAttribute("ifchecked-clearvalue")).each(function(){$(this).val("");$(this).change()})});$(this).find("[ifunchecked-clearvalue]",function(){this.checked||sircl.ext.$select($(this),this.getAttribute("ifunchecked-clearvalue")).each(function(){$(this).val("");$(this).change()})});$(this).find("[ifchecked-uncheck]").each(function(){this.checked&&sircl.ext.$select($(this),this.getAttribute("ifchecked-uncheck")).filter(":checked").each(function(){$(this).prop("checked",!1);$(this).change()})});$(this).find("[ifchecked-check]").each(function(){this.checked&&sircl.ext.$select($(this),this.getAttribute("ifchecked-check")).filter(":not(:checked)").each(function(){$(this).prop("checked",!0);$(this).change()})});$(this).find("[ifunchecked-uncheck]").each(function(){this.checked||sircl.ext.$select($(this),this.getAttribute("ifunchecked-uncheck")).filter(":checked").each(function(){$(this).prop("checked",!1);$(this).change()})});$(this).find("[ifunchecked-check]").each(function(){this.checked||sircl.ext.$select($(this),this.getAttribute("ifunchecked-check")).filter(":not(:checked)").each(function(){$(this).prop("checked",!0);$(this).change()})});var n=[];$(this).find(".ifvalue-events").each(function(){var i=$(this).closest("FORM"),r,f,e,s,u;$(this).hasAttr("ifvalue-scope")?i=sircl.ext.$select($(this),$(this).attr("ifvalue-scope")):i.length==0&&(i=$("BODY"));var o=($(this).is("INPUT[type=checkbox]")||$(this).is("INPUT[type=radio]"))&&this.checked==!1,t={toshow:[],tohide:[],toenable:[],todisable:[],toreadwrite:[],toreadonly:[],toclearvalue:[],tocheck:[],touncheck:[]},h=sircl.ext.cssEscape(this.name);if(!o||!(n.indexOf(this.name)>-1)){if(n.push(this.name),r=".ifvalue"+h,i.find(r+"-hide").each(function(){sircl.ext.visible(this)&&t.tohide.push(this)}),i.find(r+"-show").each(function(){sircl.ext.visible(this)||t.toshow.push(this)}),i.find(r+"-disable").each(function(){$(this).prop("disabled")==!1&&t.todisable.push(this)}),i.find(r+"-enable").each(function(){$(this).prop("disabled")==!0&&t.toenable.push(this)}),i.find(r+"-readonly").each(function(){$(this).prop("readonly")==!1&&action.toreadonly.push(this)}),i.find(r+"-readwrite").each(function(){$(this).prop("readonly")==!0&&action.toreadwrite.push(this)}),i.find(r+"-clearvalue").each(function(){$(this).val()!=""&&action.toclearvalue.push(this)}),i.find(r+"-uncheck").each(function(){this.checked&&t.touncheck.push(this)}),i.find(r+"-check").each(function(){this.checked||t.tocheck.push(this)}),!o)for(f=sircl.ext.effectiveValue(this),f==null&&(f=[]),Array.isArray(f)||(f=[f]),e=0;e<f.length;e++)s=sircl.ext.cssEscape(f[e]),u=r+"is"+s,i.find(u+"-hide").each(function(){t.toshow.indexOf(this)>=0&&t.toshow.splice(t.toshow.indexOf(this),1);sircl.ext.visible(this)&&t.tohide.indexOf(this)===-1&&t.tohide.push(this)}),i.find(u+"-show").each(function(){t.tohide.indexOf(this)>=0&&t.tohide.splice(t.tohide.indexOf(this),1);sircl.ext.visible(this)||t.toshow.indexOf(this)!==-1||t.toshow.push(this)}),i.find(u+"-disable").each(function(){t.toenable.indexOf(this)>=0&&t.toenable.splice(t.toenable.indexOf(this),1);$(this).prop("disabled")==!1&&t.todisable.indexOf(this)===-1&&t.todisable.push(this)}),i.find(u+"-enable").each(function(){t.todisable.indexOf(this)>=0&&t.todisable.splice(t.todisable.indexOf(this),1);$(this).prop("disabled")==!0&&t.toenable.indexOf(this)===-1&&t.toenable.push(this)}),i.find(u+"-readonly").each(function(){t.toreadwrite.indexOf(this)>=0&&t.toreadwrite.splice(t.toreadwrite.indexOf(this),1);$(this).prop("readonly")==!1&&t.toreadonly.indexOf(this)===-1&&action.toreadonly.push(this)}),i.find(u+"-readwrite").each(function(){t.toreadonly.indexOf(this)>=0&&t.toreadonly.splice(t.toreadonly.indexOf(this),1);$(this).prop("readonly")==!0&&t.toreadwrite.indexOf(this)===-1&&action.toreadwrite.push(this)}),i.find(u+"-clearvalue").each(function(){$(this).val()!=""&&t.toclearvalue.indexOf(this)===-1&&action.toclearvalue.push(this)}),i.find(u+"-uncheck").each(function(){t.tocheck.indexOf(this)>=0&&t.tocheck.splice(t.tocheck.indexOf(this),1);this.checked&&t.touncheck.indexOf(this)===-1&&t.touncheck.push(this)}),i.find(u+"-check").each(function(){t.touncheck.indexOf(this)>=0&&t.touncheck.splice(t.touncheck.indexOf(this),1);this.checked||t.tocheck.indexOf(this)!==-1||t.tocheck.push(this)});t.toshow.forEach(function(n){sircl.ext.visible(n,!0)});t.tohide.forEach(function(n){sircl.ext.visible(n,!1)});t.toenable.forEach(function(n){$(n).prop("disabled",!1)});t.todisable.forEach(function(n){$(n).prop("disabled",!0)});t.toreadwrite.forEach(function(n){$(n).prop("readonly",!1)});t.toreadonly.forEach(function(n){$(n).prop("readonly",!0)});t.toclearvalue.forEach(function(n){$(n).val("");$(n).change()});t.tocheck.forEach(function(n){n.checked=!0;$(n).change()});t.touncheck.forEach(function(n){n.checked=!1;$(n).change()})}})});$$(function(){$(this).find("[hide-ifexists]").each(function(){var n=$(this),t=sircl.ext.$select(n,n.attr("hide-ifexists")).length>0;sircl.ext.visible(this,!t)});$(this).find("[show-ifexists]").each(function(){var n=$(this),t=sircl.ext.$select(n,n.attr("show-ifexists")).length>0;sircl.ext.visible(this,t)});$(this).find("[check-ifallchecked]").each(function(){var n=$(this),t=sircl.ext.$select(n,n.attr("check-ifallchecked")),i;sircl.ext.$select(n,n.attr("check-ifallchecked")).on("change",function(){var i=t.filter(":checked").length==t.length;n[0].checked!=i&&(n[0].checked=i,n.change())});i=t.filter(":checked").length==t.length;n[0].checked!=i&&(n[0].checked=i,n.change())});$(this).find("[check-ifanychecked]").each(function(){var n=$(this),i=sircl.ext.$select(n,n.attr("check-ifanychecked")),t;sircl.ext.$select(n,n.attr("check-ifanychecked")).on("change",function(){var t=i.filter(":checked").length>0;n[0].checked!=t&&(n[0].checked=t,n.change())});t=i.filter(":checked").length>0;n[0].checked!=t&&(n[0].checked=t,n.change())});$(this).find("[enable-ifallchecked]").each(function(){var n=$(this),t=sircl.ext.$select(n,n.attr("enable-ifallchecked"));sircl.ext.$select(n,n.attr("enable-ifallchecked")).on("change",function(){n.prop("disabled",t.filter(":checked").length<t.length)});n.prop("disabled",t.filter(":checked").length<t.length)});$(this).find("[enable-ifanychecked]").each(function(){var n=$(this),t=sircl.ext.$select(n,n.attr("enable-ifanychecked"));sircl.ext.$select(n,n.attr("enable-ifanychecked")).on("change",function(){n.prop("disabled",!t.filter(":checked").length>0)});n.prop("disabled",!t.filter(":checked").length>0)});$(this).find("[show-ifallchecked]").each(function(){var n=$(this),t=sircl.ext.$select(n,n.attr("show-ifallchecked"));sircl.ext.$select(n,n.attr("show-ifallchecked")).on("change",function(){sircl.ext.visible(n,t.filter(":checked").length==t.length)});sircl.ext.visible(n,t.filter(":checked").length==t.length)});$(this).find("[show-ifanychecked]").each(function(){var n=$(this),t=sircl.ext.$select(n,n.attr("show-ifanychecked"));sircl.ext.$select(n,n.attr("show-ifanychecked")).on("change",function(){sircl.ext.visible(n,$all.filter(":checked").length>0)});sircl.ext.visible(n,$all.filter(":checked").length>0)})});sircl.ext.isValid=function(n){for(var r,i,u=["BUTTON","FIELDSET","INPUT","OUTPUT","SELECT","TEXTAREA"],t=0;t<n.length;t++)if(u.indexOf(n[t].tagName)>=0){if(!n[t].validity.valid)return!1}else for(r=$(n[t]).find("BUTTON,FIELDSET,INPUT,OUTPUT,SELECT,TEXTAREA"),i=0;i<r.length;i++)if(!r[i].validity.valid)return!1;return!0};$$(function(){$(this).find("[ifvalid-show]").each(function(){sircl.ext.visible(sircl.ext.$select($(this),this.getAttribute("ifvalid-show")),sircl.ext.isValid($(this)))});$(this).find("[ifinvalid-show]").each(function(){sircl.ext.visible(sircl.ext.$select($(this),this.getAttribute("ifinvalid-show")),!sircl.ext.isValid($(this)))});$(this).find("[ifvalid-addclass]").each(function(){sircl.ext.isValid($(this))?sircl.ext.addClass($(this),this.getAttribute("ifvalid-addclass")):sircl.ext.removeClass($(this),this.getAttribute("ifvalid-addclass"))});$(this).find("[ifinvalid-addclass]").each(function(){sircl.ext.isValid($(this))?sircl.ext.removeClass($(this),this.getAttribute("ifinvalid-addclass")):sircl.ext.addClass($(this),this.getAttribute("ifinvalid-addclass"))});$(this).find("[ifvalid-enable]").each(function(){sircl.ext.$select($(this),this.getAttribute("ifvalid-enable")).prop("disabled",!sircl.ext.isValid($(this)))});$(this).find("[ifinvalid-enable]").each(function(){sircl.ext.$select($(this),this.getAttribute("ifinvalid-enable")).prop("disabled",sircl.ext.isValid($(this)))})});$(function(){$(document).on("change","[ifvalid-show]",function(){sircl.ext.visible(sircl.ext.$select($(this),this.getAttribute("ifvalid-show")),sircl.ext.isValid($(this)))});$(document).on("change","[ifinvalid-show]",function(){sircl.ext.visible(sircl.ext.$select($(this),this.getAttribute("ifinvalid-show")),!sircl.ext.isValid($(this)))});$(document).on("change","[ifvalid-addclass]",function(){sircl.ext.isValid($(this))?sircl.ext.addClass($(this),this.getAttribute("ifvalid-addclass")):sircl.ext.removeClass($(this),this.getAttribute("ifvalid-addclass"))});$(document).on("change","[ifinvalid-addclass]",function(){sircl.ext.isValid($(this))?sircl.ext.removeClass($(this),this.getAttribute("ifinvalid-addclass")):sircl.ext.addClass($(this),this.getAttribute("ifinvalid-addclass"))});$(document).on("change","[ifvalid-enable]",function(){sircl.ext.$select($(this),this.getAttribute("ifvalid-enable")).prop("disabled",!sircl.ext.isValid($(this)))});$(document).on("change","[ifinvalid-enable]",function(){sircl.ext.$select($(this),this.getAttribute("ifinvalid-enable")).prop("disabled",sircl.ext.isValid($(this)))})});$(document).on("focus","INPUT.onfocus-select:not([type=checkbox]):not([type=radio]):not([type=button])",function(){$(this)[0].select()});$(document.body).on("change","INPUT.onfocusout-trim:not([type=checkbox]):not([type=radio]):not([type=button])",function(){$(this)[0].value=($(this)[0].value+"").trim()});sircl.isElementInView=function(n){var t=n.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)};$(function(){$(window).on("DOMContentLoaded load resize scroll",function(){$(this).scrollTop()>100?($.isFunction($.fn.fadeIn)&&$(".onscrolltop-fade").fadeIn(800),sircl.ext.visible($(".onscrolltop-fade"),!0)):($.isFunction($.fn.fadeOut)&&$(".onscrolltop-fade").fadeOut(400),sircl.ext.visible($(".onscrolltop-fade"),!1));$("[ifinview-load]").each(function(){if(sircl.isElementInView(this)){var n=$(this).attr("ifinview-load");$(this).removeAttr("ifinview-load");$(this).load(n)}})});$(document).on("click",".onclick-scrolltop",function(){return $.isFunction($.fn.animate)?$("body,html").animate({scrollTop:0},500):window.scrollTo(0,0),!1})});$$(function(){$("[ifinview-load]").each(function(){if(sircl.isElementInView(this)){var n=$(this).attr("ifinview-load");$(this).removeAttr("ifinview-load");$(this).load(n)}})});$(function(){$(document.body).on("click","*[onclick-confirm]",function(n){var t=$(this).attr("onclick-confirm");t&&(sircl.ext.confirm($(this),t,n)||(n.stopPropagation(),n.preventDefault()))});$(document.body).on("change","INPUT[onchange-confirm][type='checkbox']",function(n){var t=$(this).attr("onchange-confirm");t&&(sircl.ext.confirm($(this),t,n)||($this.prop("checked",!$this.prop("checked")),n.stopPropagation(),n.preventDefault()))});$(document.body).on("change","INPUT[onchange-confirm]:not([type='checkbox']):not([type='radio']),SELECT[onchange-confirm]",function(n){var t=$(this).attr("onchange-confirm");t&&(sircl.ext.confirm($(this),t,n)?this._beforeConfirmValue=$(this).val():($(this).val(this._beforeConfirmValue),n.stopPropagation(),n.preventDefault()))})});$$(function(){$(this).find("INPUT[onchange-confirm]:not([type='checkbox']):not([type='radio']),SELECT[onchange-confirm]").each(function(){this._beforeConfirmValue=$(this).val()})});$(function(){$(document.body).on("dragover","[ondropfile-accept]",function(n){if(n.originalEvent.dataTransfer.types.length>0&&n.originalEvent.dataTransfer.types[0]=="Files"){n.preventDefault();var t=$(this).closest("[ondragover-addclass]");t.length>0&&sircl.ext.addClass(t,t.attr("ondragover-addclass"))}});$(document).on("drop","[ondropfile-accept]",function(n){var e,o,s,r,a,v,u,h,y,c;n.preventDefault();var t=$(this),p=t.attr("ondropfile-accept").split(" "),f=(t.attr("dropfile-maxsize")||"1024 MB").toUpperCase();f=f.indexOf("KB")>0?parseFloat(f.replace("KB","").trim())*1024:f.indexOf("MB")>0?parseFloat(f.replace("MB","").trim())*1048576:parseFloat(f);var l=parseInt(t.attr("dropfile-maxcount")||"99"),w=t.attr("ondropinvalidfile-alert"),b=t.attr("ondroptoomanyfiles-alert"),i=[];for(e=0;e<n.originalEvent.dataTransfer.files.length;e++)if(o=n.originalEvent.dataTransfer.files[e],!(o.size>f))for(s=0;s<p.length;s++)(r=p[s].trim().toLowerCase(),r!="")&&(r.indexOf("*")==0?i.push(e):r.indexOf("*")==r.length-1?o.type.toLowerCase().indexOf(r.substr(0,r.length-1))==0&&i.push(e):o.type.toLowerCase()==r&&i.push(e));if(i.length>l&&b!=null?sircl.ext.alert(t,b,n,!1):i.length!=n.originalEvent.dataTransfer.files.length&&w!=null&&sircl.ext.alert(t,w,n,!1),i.length>0&&(i.length>l&&(i=i.slice(0,l)),t.hasClass("ondropfile-submit")&&(a=t.hasAttr("form")?$("#"+t.attr("form")):t.closest("FORM"),a.length>0))){for(n.preventDefault(),v="sircl-autoid-"+(new Date).getTime(),u='<input hidden id="'+v+'" type="submit" ',t.hasAttr("formaction")&&(u+='formaction="'+t.attr("formaction")+'" '),t.hasAttr("formenctype")&&(u+='formenctype="'+t.attr("formenctype")+'" '),t.hasAttr("formmethod")&&(u+='formmethod="'+t.attr("formmethod")+'" '),t.hasAttr("formnovalidate")&&(u+='formnovalidate="'+t.attr("formnovalidate")+'" '),t.hasAttr("formtarget")&&(u+='formtarget="'+t.attr("formtarget")+'" '),u+="/>",a.append(u),h=$("#"+v),y=[],c=0;c<i.length;c++)y.push(n.originalEvent.dataTransfer.files[i[c]]);h[0]._files=y;h[0]._filesName=t.attr("name")||"files";h.click()}})});$(function(){$(document).on("dragstart","[draggable]",function(n){var i,t;if($(this).hasAttr("drop-type"))for(i=$(this).attr("drop-type").split(" "),t=0;t<i.length;t++)i[t].trim()!=""&&n.originalEvent.dataTransfer.setData(i[t].trim(),!0);n.originalEvent.dataTransfer.setData("__id",sircl.ext.getId(this,!0));n.originalEvent.dataTransfer.setData("any",$(this).attr("drop-value"))});$(document.body).on("dragover","[ondrop-accept]",function(n){for(var t,i,u=$(this).attr("ondrop-accept").split(" "),r=0;r<u.length;r++)for(t=0;t<n.originalEvent.dataTransfer.types.length;t++)u[r].trim().toLowerCase()==n.originalEvent.dataTransfer.types[t]&&(n.preventDefault(),i=$(this).closest("[ondragover-addclass]"),i.length>0&&sircl.ext.addClass(i,i.attr("ondragover-addclass")))});$(document).on("dragleave","[ondragover-addclass]",function(){sircl.ext.removeClass($(this),$(this).attr("ondragover-addclass"))});$(document).on("drop","[ondragover-addclass]",function(){sircl.ext.removeClass($(this),$(this).attr("ondragover-addclass"))});$(document).on("drop",".ondrop-move",function(n){n.preventDefault();var t=n.originalEvent.dataTransfer.getData("__id");n.originalEvent.target.appendChild(document.getElementById(t))});$(document).on("drop",".ondrop-copy",function(n){n.preventDefault();var t=n.originalEvent.dataTransfer.getData("__id");$(n.originalEvent.target).append(document.getElementById(t).outerHTML.replace('id="'+t+'"',""))});$(document).on("drop",".ondrop-submit",function(n){var t=$(this),r=t.hasAttr("form")?$("#"+t.attr("form")):t.closest("FORM"),u,i;r.length>0&&(r.find("INPUT.drop-value").each(function(){$(this).val(n.originalEvent.dataTransfer.getData("any"))}),n.preventDefault(),u="sircl-autoid-"+(new Date).getTime(),i='<input hidden id="'+u+'" type="submit" ',t.hasAttr("formaction")&&(i+='formaction="'+t.attr("formaction")+'" '),t.hasAttr("formenctype")&&(i+='formenctype="'+t.attr("formenctype")+'" '),t.hasAttr("formmethod")&&(i+='formmethod="'+t.attr("formmethod")+'" '),t.hasAttr("formnovalidate")&&(i+='formnovalidate="'+t.attr("formnovalidate")+'" '),t.hasAttr("formtarget")&&(i+='formtarget="'+t.attr("formtarget")+'" '),i+="/>",r.append(i),$("#"+u).click())})});$$(function(){navigator.share||$("[onclick-share]").each(function(){sircl.ext.visible(this,!1)})});$(function(){$(document).on("click","[onclick-share]",function(){if(navigator.share){var n=sircl.ext.$select($(this),$(this).attr("onclick-share")),t=n.attr("data-share-title")||n.attr("title")||(n.hasAttr("data-share-title")?undefined:document.title),i=n.attr("data-share-url")||n.attr("href")||(n.hasAttr("data-share-url")?undefined:window.location.href),r=n.attr("data-share-text")||n.text();navigator.share({title:t,text:r,url:i}).then(function(){}).catch(function(){})}})});typeof sircl=="undefined"&&console.warn("The 'sircl-changeactions' component should be registered after the 'sircl' component. Please review order of script files.");sircl.disableOnAction=!1;sircl._changeActionHandlers={};sircl._changeActionHandlers.beforeSend=[];sircl._changeActionHandlers.afterSend=[];sircl._changeActionHandlers.onError=[];sircl._changeActionHandlers.beforeRender=[];sircl._changeActionHandlers.afterRender=[];sircl.addChangeActionHandler=function(n,t){sircl._changeActionHandlers[n].push(t)};sircl._runChangeActionHandlers=function(n,t,i){sircl._changeActionHandlers[n].forEach(function(n){n.apply(t,[i])})};sircl._actionCall=function(n,t,i,r,u,f,e,o,s,h,c,l){var g,v,d,rt,tt,y,nt,w,k,b,p,it,a;if(!($(o.target).closest(".sircl-content-processing").length>0)){if(g=($(n).closest("[method]").attr("method")||"get").toUpperCase()=="POST"?"POST":"GET",r=r.replace("{rnd}",Math.random()),v=[],i.hasClass("substitute-fields")){d=$(n).closest("FORM");d.length==0&&(d=$(document));rt=new RegExp(/(\[[a-z0-9\.\-\_]+?\])|(\%5B[a-z0-9\.\-\_]+?\%5D)/gi);do if(tt=rt.exec(r),tt!==null)v.push(tt[0]);else break;while(1);for(y=0;y<v.length;y++)nt=v[y].charAt(0)==="["?d.find("[name='"+v[y].substr(1,v[y].length-2)+"']").val():d.find("[name='"+v[y].substr(3,v[y].length-6)+"']").val(),r=nt===undefined?r.replace(v[y],""):v[y].charAt(0)==="["?r.replace(v[y],nt):r.replace(v[y],encodeURIComponent(nt))}for((f===null||f===undefined)&&(f=[]),Array.isArray(f)||(f=[f]),w=[],k=[],u!=null&&u!=""&&u.toLowerCase()!="name"&&(w.push("name"),k.push(encodeURIComponent(u))),p=0;p<f.length;p++)w.push("value"),k.push(encodeURIComponent(f[p])),e===null&&u!=null&&u!=""&&u.toLowerCase()!="value"&&(w.push(encodeURIComponent(u)),k.push(encodeURIComponent(f[p])));for(e!=null&&v.indexOf("checked")==-1&&(w.push("checked"),k.push(e)),b="",p=0;p<w.length;p++)p>0&&(b+="&"),b+=w[p]+"="+k[p];g==="GET"&&b.length>0&&(r=r+(r.indexOf("?")<0?"?":"&")+b,b=null);it=!1;$(n).attr("browser-cache")!=null&&(it=$(n).attr("browser-cache").toLowerCase()=="on");a={$trigger:$(n),$subjects:t,$scope:i,event:o};a.xhr=new XMLHttpRequest;a.xhr.open(g,r);g!=="GET"&&a.xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded");it==!1&&(a.xhr.setRequestHeader("Cache-Control","no-cache, no-store, max-age=0"),a.xhr.setRequestHeader("Pragma","no-cache"));a.xhr.setRequestHeader("X-Sircl-Request-Type","ChangeAction");a.xhr.setRequestHeader("X-Sircl-Timezone-Offset",(new Date).getTimezoneOffset());var ft=function(t){a.loadEvent=t;a.succeeded=a.xhr.status<=299?!0:!1;var i=a.xhr.getResponseHeader("Content-Type")||"";a.data=i.indexOf("json")>=0?JSON.parse(a.xhr.responseText):i.indexOf("html")>=0?a.xhr.responseText:null;sircl._runChangeActionHandlers("afterSend",n,a);sircl._runChangeActionHandlers("beforeRender",n,a);a.succeeded||sircl._runChangeActionHandlers("onError",n,a);a.succeeded?i.indexOf("json")>=0?s&&s.apply(n,[a]):i.indexOf("html")>=0&&h&&h.apply(n,[a]):c&&c.apply(n);sircl._runChangeActionHandlers("afterRender",n,a);a.succeeded||sircl.handleError("S311","Change action request failed.",{request:a})},ut=function(t){a.loadEvent=t;a.succeeded=!1;a.data=null;sircl._runChangeActionHandlers("afterSend",n,a);sircl._runChangeActionHandlers("beforeRender",n,a);a.succeeded||sircl._runChangeActionHandlers("onError",n,a);a.succeeded?(a.xhr.getResponseHeader("Content-Type")||"").indexOf("text/html")==0?h&&h.apply(n,[a]):s&&s.apply(n,[a]):c&&c.apply(n);sircl._runChangeActionHandlers("afterRender",n,a);a.succeeded||sircl.handleError("S311","Change action request failed.",{request:a})},et=function(){l&&l.apply(n)};a.xhr.addEventListener("abort",ut);a.xhr.addEventListener("error",ut);a.xhr.addEventListener("load",ft);a.xhr.addEventListener("loadend",et);sircl._runChangeActionHandlers("beforeSend",n,a);a.xhr.send(b)}};$(function(){$(document).on("change","INPUT[type=radio][onchange-action]",function(n){var t=$(this);sircl._actionCall(this,t,t,t.attr("onchange-action"),this.name,t.attr("value"),t.prop("checked"),n,function(){this._previousActionValue=t.prop("checked")},function(n){sircl.ext.$select(n.$scope,n.$scope.attr("target")).html(n.data)},function(){t.prop("checked",!t.prop("checked"))})});$(document).on("change","[onchange-action] INPUT[type=radio]:not([onchange-action])",function(n){var r=$(this),i=r.closest("[onchange-action]"),t=i.find("INPUT[type=radio][name='"+this.name+"']:not([onchange-action])");sircl._actionCall(this,t,i,i.attr("onchange-action"),this.name,jQuery.makeArray(t.filter(":checked")).map(function(n){return n.value}),null,n,function(n){var i=n.data;Array.isArray(i)&&i.length>0&&(i=i[0]);i===undefined?t[0]._previousActionValue=this.value:i==null||i==""?(t.prop("checked",!1),t[0]._previousActionValue=null):(t.filter("[value='"+i+"']").prop("checked",!0),t[0]._previousActionValue=i)},function(n){sircl.ext.$select(n.$scope,n.$scope.attr("target")).html(n.data)},function(){var n=i.find("INPUT[type=radio][name='"+this.name+"']:not([onchange-action]):first")[0]._previousActionValue;n?i.find("INPUT[type=radio][name='"+this.name+"'][value='"+n+"']:not([onchange-action])").prop("checked",!0):i.find("INPUT[type=radio][name='"+this.name+"']:not([onchange-action])").prop("checked",!1)})});$(document).on("change","INPUT[type=checkbox][onchange-action]",function(n){var t=$(this);sircl._actionCall(this,t,t,t.attr("onchange-action"),this.name,t.attr("value"),t.prop("checked"),n,function(){this._previousActionValue=t.prop("checked")},function(n){sircl.ext.$select(n.$scope,n.$scope.attr("target")).html(n.data)},function(){t.prop("checked",!t.prop("checked"))})});$(document).on("change","[onchange-action] INPUT[type=checkbox]:not([onchange-action])",function(n){var t=$(this),i=t.closest("[onchange-action]"),r=i.find("INPUT[type=checkbox][name='"+this.name+"']:not([onchange-action])");sircl._actionCall(this,r,i,i.attr("onchange-action"),this.name,jQuery.makeArray(i.find("INPUT[type=checkbox][name='"+this.name+"']:checked:not([onchange-action])")).map(function(n){return n.value}),null,n,function(n){var i=n.data;typeof i=="string"&&(i=[i]);Array.isArray(i)?r.each(function(){var n=i.indexOf(this.value)>=0;$(this).prop("checked",n);this._previousActionValue=n}):this._previousActionValue=t.prop("checked")},function(n){sircl.ext.$select(n.$scope,n.$scope.attr("target")).html(n.data)},function(){t.prop("checked",!t.prop("checked"))})});$(document).on("change","INPUT[onchange-action]:not([type=checkbox]):not([type=radio]):not([type=button]), [onchange-action] INPUT:not([type=checkbox]):not([type=radio]):not([type=button]):not([onchange-action]), SELECT[onchange-action], [onchange-action] SELECT:not([onchange-action]), TEXTAREA[onchange-action], [onchange-action] TEXTAREA:not([onchange-action])",function(n){var t=$(this),i=t.closest("[onchange-action]");sircl._actionCall(this,t,i,i.attr("onchange-action"),this.name,t.val(),null,n,function(n){var i=n.data;i&&t.val(i);this._previousActionValue=t.val()},function(n){sircl.ext.$select(n.$scope,n.$scope.attr("target")).html(n.data)},function(){t.val(this._previousActionValue)})});$(document).on("focusin","INPUT[onfocus-action]:not([type=checkbox]):not([type=radio]):not([type=button]), TEXTAREA[onfocus-action]",function(n){var t=$(this),i=t.closest("[onfocus-action]");sircl._actionCall(this,t,i,i.attr("onfocus-action"),this.name,t.val(),null,n,function(n){var i=n.data;if(i){t.val(i);try{this.select()}catch(r){}}},function(n){sircl.ext.$select(n.$scope,n.$scope.attr("target")).html(n.data)})});$(document).on("focusout","INPUT[onfocusout-action]:not([type=checkbox]):not([type=radio]):not([type=button]), TEXTAREA[onfocusout-action]",function(n){var t=$(this),i=t.closest("[onfocusout-action]");sircl._actionCall(this,t,i,i.attr("onfocusout-action"),this.name,t.val(),null,n,function(n){var i=n.data;i&&t.val(i)},function(n){sircl.ext.$select(n.$scope,n.$scope.attr("target")).html(n.data)})})});$$(function(){$(this).find("INPUT[onchange-action]").each(function(){this._previousActionValue=$(this).is("[type=radio]")?$(this).prop("checked"):$(this).is("[type=checkbox]")?$(this).prop("checked"):$(this).val()});$(this).find("[onchange-action] INPUT:not([onchange-action])").each(function(){var n=$(this).closest("[onchange-action]");$(this).is("[type=radio]")?n.find("INPUT[type=radio][name='"+this.name+"']:not([onchange-action]):first")[0]._previousActionValue=$("INPUT[type=radio][name='"+this.name+"']:not([onchange-action]):checked").val():this._previousActionValue=$(this).is("[type=checkbox]")?$(this).prop("checked"):$(this).val()});$(this).find("TEXTAREA[onchange-action], [onchange-action] TEXTAREA:not([onchange-action])").each(function(){this._previousActionValue=$(this).val()});$(this).find("SELECT[onchange-action], [onchange-action] SELECT:not([onchange-action])").each(function(){this._previousActionValue=$(this).val()})});sircl.addChangeActionHandler("afterSend",function(n){var t=n.xhr.getResponseHeader("X-Sircl-Alert-Message");t&&sircl.ext.alert(n.$trigger,t,null,!0)});sircl.addChangeActionHandler("beforeSend",function(n){n._elemetsDisabled=sircl.disableOnAction&&n.event.type!="focusin"&&n.event.type!="focusout"&&n.event.type!="input"?n.$subjects.filter(":not(:disabled)"):$(null);n._elemetsDisabled.prop("disabled",!0)});sircl.addChangeActionHandler("afterSend",function(n){n._elemetsDisabled.prop("disabled",!1)});sircl.addChangeActionHandler("beforeSend",function(n){n.$scope.addClass("action-pending")});sircl.addChangeActionHandler("afterSend",function(n){n.$scope.removeClass("action-pending")});typeof sircl=="undefined"&&console.warn("The 'sircl-contextmenu' component should be registered after the 'sircl' component. Please review order of script files.");sircl.addRequestHandler("beforeSend",function(n){$(".contextmenu").css("display","none");this.next(n)});$$(function(){$(this).find(".contextmenu").each(function(){var t=$(this),n=$($(this).attr("contextmenu-for"));n.length==0&&(n=$(this).parent());n.on("contextmenu",function(n){var i=!1;$(".contextmenu").each(function(){$(this).css("display")!="none"&&($(this).css("display","none"),i=!0)});i||t.css("top",n.pageY-window.pageYOffset+"px").css("left",n.pageX-window.pageXOffset+"px").css("position","fixed").css("display","block");n.stopPropagation();n.preventDefault()});n.on("click",function(){$(".contextmenu").each(function(){$(this).css("display")!="none"&&$(this).css("display","none")})})})});