# HG changeset patch # User Thierry Florac # Date 1530856815 -7200 # Node ID baf764fa893a3a26a5649a5af03ce7de86bc842e # Parent e1c1c57c2d4c8e97d2bb1d97c2e9635407df058c Updated SVG container size diff -r e1c1c57c2d4c -r baf764fa893a src/pyams_skin/resources/js/myams.js --- a/src/pyams_skin/resources/js/myams.js Thu Jul 05 12:41:22 2018 +0200 +++ b/src/pyams_skin/resources/js/myams.js Fri Jul 06 08:00:15 2018 +0200 @@ -3060,7 +3060,9 @@ svgs.each(function() { var container = $(this); var svg = $('svg', container); - svg.get(0).setAttribute('viewBox', '0 0 ' + Math.round(svg.attr('width')) + ' ' + Math.round(svg.attr('height'))); + svg.get(0).setAttribute('viewBox', + '0 0 ' + Math.round(parseFloat(svg.attr('width'))) + ' ' + + Math.round(parseFloat(svg.attr('height')))); svg.attr('width', '100%') .attr('height', 'auto'); }) diff -r e1c1c57c2d4c -r baf764fa893a src/pyams_skin/resources/js/myams.min.js --- a/src/pyams_skin/resources/js/myams.min.js Thu Jul 05 12:41:22 2018 +0200 +++ b/src/pyams_skin/resources/js/myams.min.js Fri Jul 06 08:00:15 2018 +0200 @@ -1,1 +1,1 @@ -"use strict";!function(F,R){var h=R.console;String.prototype.startsWith=function(e){var a=this.length,t=e.length;return!(a
').appendTo("body"),a=e.children(),t=a.innerWidth()-a.height(99).innerWidth();return e.remove(),t}),F.fn.extend({exists:function(){return 0',openedSign:''},e),t=F(this);t.find("LI").each(function(){var e=F(this);if(0"+o.closedSign+"");var a=e.find("A:first");"#"===a.attr("href")&&a.click(function(){return!1})}}),t.find("LI.active").each(function(){var e=F(this).parents("UL"),a=e.parent("LI");e.slideDown(o.speed),a.find("b:first").html(o.openedSign),a.addClass("open")}),t.find("LI A").on("click",function(){var e=F(this);if(!e.hasClass("active")){var n=e.attr("href").replace(/^#/,""),s=e.parent().find("UL");if(o.accordion){var i=e.parent().parents("UL"),r=t.find("UL:visible");r.each(function(a){var t=!0;if(i.each(function(e){if(i[e]===r[a])return t=!1}),t&&s!==r[a]){var e=F(r[a]);!n&&e.hasClass("active")||e.slideUp(o.speed,function(){F(this).parent("LI").removeClass("open").find("B:first").delay(o.speed).html(o.closedSign)})}})}var a=e.parent().find("UL:first");n||!a.is(":visible")||a.hasClass("active")?a.slideDown(o.speed,function(){e.parent("LI").addClass("open").find("B:first").delay(o.speed).html(o.openedSign)}):a.slideUp(o.speed,function(){e.parent("LI").removeClass("open").find("B:first").delay(o.speed).html(o.closedSign)})}})}}),F.UTF8={encode:function(e){e=e.replace(/\r\n/g,"\n");for(var a="",t=0;t>6|192):(a+=String.fromCharCode(n>>12|224),a+=String.fromCharCode(n>>6&63|128)),a+=String.fromCharCode(63&n|128))}return a},decode:function(e){for(var a="",t=0,n=0,s=0,i=0;t").attr("data-ams-id",a).text('@import "'+O.getSource(e)+'";'),t)var r=setInterval(function(){try{i[0].sheet.cssRules;t.call(window,!0,n),clearInterval(r)}catch(e){}},10);i.appendTo(s)}else t&&t.call(window,!1,n)},l.event={stop:function(e){e||(e=window.event),e&&"string"!=typeof e&&(e.stopPropagation?(e.stopPropagation(),e.preventDefault()):(e.cancelBubble=!0,e.returnValue=!1))}},l.browser={getInternetExplorerVersion:function(){var e=-1;if("Microsoft Internet Explorer"===navigator.appName){var a=navigator.userAgent;null!==new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})").exec(a)&&(e=parseFloat(RegExp.$1))}return e},checkVersion:function(){var e="You're not using Windows Internet Explorer.",a=this.getInternetExplorerVersion();-1");t.val(e),t.css("position","fixed"),t.appendTo(F("body")),t.get(0).select();try{document.execCommand("copy"),a=!0}catch(e){h&&h.warn&&h.warn("Copy to clipboard failed.",e)}finally{t.remove()}}a?O.skin.smallBox("success",{title:1"+s+"

"+(i||"")+"

",icon:"fa fa-warning animated shake",timeout:1e4})}h&&(h.error&&h.error(e),h.debug&&h.debug(a))}},show:function(e,a,t){if(t){var n=O.ajax.getResponse(e);"json"===n.contentType?O.ajax.handleJSON(n.data):O.skin.messageBox("error",{title:O.i18n.ERRORS_OCCURED,content:"

"+a+"

"+t+"

",icon:"fa fa-warning animated shake",timeout:1e4}),h&&(h.error&&h.error(t),h.debug&&h.debug(e))}}},l.ajax={check:function(e,a,s,t){function n(e,a){if(void 0!==s){s instanceof Array||(s=[s]);for(var t=0;t=e.total||h&&h.log&&h.log(parseInt(e.loaded/e.total*100,10)+"%"))},getJSON:function(){return function(e){var a=e.url;delete e.url,O.ajax.post(a,e,function(e,a,t){O.ajax.handleJSON(e)})}},post:function(e,a,t,n){var s,i;s=e.startsWith(window.location.protocol)?e:this.getAddr()+e,"function"==typeof t?(n=t,t={}):t||(t={}),void 0===n&&(n=t.callback),"string"==typeof n&&(n=O.getFunctionByName(n)),delete t.callback;var r={url:s,type:"post",cache:!1,async:"function"==typeof n,data:F.param(a),dataType:"json",beforeSend:function(e,a){if(void 0!==R.Cookies){var t=Cookies.get(O.csrfCookieName);t&&e.setRequestHeader(O.csrfHeaderName,t)}},success:n||function(e){i=e.result}},o=F.extend({},r,t);return F.ajax(o),i},getResponse:function(a){var t,n,e=a.getResponseHeader("content-type");if(e)if(e.startsWith("application/javascript"))t="script",n=a.responseText;else if(e.startsWith("text/html"))t="html",n=a.responseText;else if(e.startsWith("text/xml"))t="xml",n=a.responseText;else if(n=a.responseJSON)t="json";else try{n=JSON.parse(a.responseText),t="json"}catch(e){n=a.responseText,t="text"}else t="json",n={status:"alert",alert:{title:O.i18n.ERROR_OCCURED,content:O.i18n.NO_SERVER_RESPONSE}};return{contentType:t,data:n}},handleJSON:function(e,a,t){var n,s,i,r,o,l,c,d=e.status;switch(d){case"alert":R.alert&&R.alert(e.alert.title+"\n\n"+e.alert.content);break;case"error":O.form.showErrors(a,e);break;case"info":case"success":void 0!==a&&(O.form.resetChanged(a),!1!==e.close_form&&O.dialog.close(a));break;case"message":case"messagebox":break;case"notify":case"callback":case"callbacks":void 0!==a&&(O.form.resetChanged(a),!1!==e.close_form&&O.dialog.close(a));break;case"modal":O.dialog.open(e.location);break;case"reload":void 0!==a&&(O.form.resetChanged(a),!1!==e.close_form&&O.dialog.close(a)),(n=e.location||window.location.hash).startsWith("#")&&(n=n.substr(1));var m=F(e.target||t||"#content");O.skin.loadURL(n,m,{preLoadCallback:O.getFunctionByName(e.pre_reload)||function(){F("[data-ams-pre-reload]",m).each(function(){O.executeFunctionByName(F(this).data("ams-pre-reload"))})},afterLoadCallback:O.getFunctionByName(e.post_reload)||function(){F("[data-ams-post-reload]",m).each(function(){O.executeFunctionByName(F(this).data("ams-post-reload"))})}});break;case"redirect":void 0!==a&&(O.form.resetChanged(a),!0===e.close_form&&O.dialog.close(a)),n=e.location||window.location.href,e.window?window.open(n,e.window,e.options):window.location.href===n?window.location.reload(!0):window.location.href=n;break;default:h&&h.log&&h.log("Unhandled status: "+d)}if(e.content&&(i=e.content,r=F(i.target||t||a||"#content"),!0===i.raw?r.text(i.text):(r.html(i.html),O.initContent(r)),i.keep_hidden||r.removeClass("hidden")),e.contents){var u=e.contents;for(s=0;s  '+O.i18n.FORM_CHANGED_WARNING,buttons:O.i18n.BTN_OK_CANCEL},function(e){e===O.i18n.BTN_OK&&t.call(a)}):t.call(a)},setChanged:function(e){e.attr("data-ams-form-changed",!0)},resetChanged:function(e){void 0!==e&&F(e).removeAttr("data-ams-form-changed")},submit:function(t,T,N){if(!(t=F(t)).exists())return!1;if("object"==typeof T&&(N=T,T=void 0),t.data("submitted"))return t.data("ams-form-hide-submitted")||O.skin.messageBox("warning",{title:O.i18n.WAIT,content:O.i18n.FORM_SUBMITTED,icon:"fa fa-save shake animated",timeout:t.data("ams-form-alert-timeout")||5e3}),!1;if(!O.form._checkSubmitValidators(t))return!1;F(".alert-danger, SPAN.state-error",t).not(".persistent").remove(),F(".state-error",t).removeClassPrefix("state-");var e=F(t.data("ams-submit-button"));return e&&!e.data("ams-form-hide-loading")&&(e.data("ams-progress-content",e.html()),e.button("loading")),O.ajax.check(F.fn.ajaxSubmit,O.baseURL+"ext/jquery-form-3.49"+O.devext+".js",function(){function e(s,e){var i,a,t,n,r,o,l,c,d,m,u=s.data(),f=u.amsFormOptions;if(N&&(r=N.formDataInitCallback),r?delete N.formDataInitCallback:r=u.amsFormDataInitCallback,r){var h={};if(n="function"==typeof r?r.call(s,h):O.executeFunctionByName(r,s,h),h.veto)return(i=s.data("ams-submit-button"))&&i.button("reset"),O.form.finalizeSubmitFooter.call(s),!1}else n=u.amsFormData||{};(i=F(s.data("ams-submit-button")))&&i.exists()?t=(a=i.data()).amsFormSubmitTarget:a={};var p=T||a.amsFormHandler||u.amsFormHandler||"";if(p.startsWith(window.location.protocol))m=p;else{var g=a.amsFormAction||s.attr("action").replace(/#/,"");m=g.startsWith(window.location.protocol)?g:O.ajax.getAddr()+g,m+=p}o=a.amsProgressHandler||u.amsProgressHandler||"",l=a.amsProgressInterval||u.amsProgressInterval||1e3,c=a.amsProgressCallback||u.amsProgressCallback,d=a.amsProgressEndCallback||u.amsProgressEndCallback;var b,v=null;N&&N.initSubmitTarget?O.executeFunctionByName(N.initSubmitTarget,s):u.amsFormInitSubmitTarget?(v=F(t||u.amsFormSubmitTarget||"#content"),O.executeFunctionByName(u.amsFormInitSubmit||"MyAMS.form.initSubmit",s,v)):u.amsFormHideSubmitFooter||O.executeFunctionByName(u.amsFormInitSubmit||"MyAMS.form.initSubmitFooter",s),N&&(n=F.extend({},n,N.form_data)),o?n.progress_id=O.generateUUID():(b=void 0!==e.uuid)&&(m.indexOf("X-Progress-ID")<0&&(m+="?X-Progress-ID="+e.uuid),delete e.uuid);var x={url:m,type:"post",cache:!1,data:n,dataType:u.amsFormDatatype,beforeSerialize:function(){void 0!==R.tinyMCE&&R.tinyMCE.triggerSave()},beforeSubmit:function(e,a){a.data("submitted",!0)},error:function(e,a,t,n){v&&O.executeFunctionByName(u.amsFormSubmitError||"MyAMS.form.finalizeSubmitOnError",n,v),O.form.resetAfterSubmit(n)},iframe:b},y=N&&N.downloadTarget||u.amsFormDownloadTarget;if(y){var C=F('iframe[name="'+y+'"]');C.exists()||(C=F("").hide().attr("name",y).appendTo(F("body"))),x=F.extend({},x,{iframe:!0,iframeTarget:C,success:function(e,a,t,n){if(F(n).parents(".modal-dialog").exists())O.dialog.close(n);else{var s,i=n.data("ams-submit-button");i&&(s=i.data("ams-form-submit-callback")),s||(s=O.getFunctionByName(u.amsFormSubmitCallback)||O.form._submitCallback);try{s.call(n,e,a,t,n)}finally{O.form.resetAfterSubmit(n),O.form.resetChanged(n)}}}})}else x=F.extend({},x,{error:function(e,a,t,n){v&&O.executeFunctionByName(u.amsFormSubmitError||"MyAMS.form.finalizeSubmitOnError",n,v),O.form.resetAfterSubmit(n)},success:function(e,a,t,n){var s,i=n.data("ams-submit-button");i&&(s=i.data("ams-form-submit-callback")),s||(s=O.getFunctionByName(u.amsFormSubmitCallback)||O.form._submitCallback);try{s.call(n,e,a,t,n)}finally{O.form.resetAfterSubmit(n),O.form.resetChanged(n)}},iframe:b});var k=F.extend({},x,e,f,N);if(o&&function(e,a){var t;function n(){clearInterval(t),O.form.resetAfterSubmit(s,i),i.html(i.data("ams-progress-content")),O.executeFunctionByName(d,s,i),O.form.resetChanged(s)}i.button("loading"),t=setInterval(function(){O.ajax.post(e,{progress_id:a},{error:n},O.getFunctionByName(c)||function(e,a){if("success"===a)if("running"===e.status)if(e.message)i.text(e.message);else{var t=i.data("ams-progress-text")||O.i18n.PROGRESS;e.current?t+=": "+e.current+"/ "+(e.length||100):t+="...",i.text(t)}else"finished"===e.status&&n();else n()})},l)}(o,n.progress_id),F(s).ajaxSubmit(k),y){var S=F(s).parents(".modal-dialog"),w=S.exists()&&i.exists()&&i.data("ams-keep-modal");S.exists()&&!0!==w?O.dialog.close(s):o||setTimeout(function(){O.form.resetAfterSubmit(s,i),O.form.resetChanged(s)},i.data("ams-form-reset-timeout")||2e3)}}if(!0!==t.data("ams-form-ignore-uploads")&&0';a||(a=t.data("ams-form-submit-message")),a&&(n+=""+a+""),F(e).html('
'+n+"
"),F(e).parents(".hidden").removeClass("hidden")},resetAfterSubmit:function(e){if(e.is(":visible")){var a=e.data("ams-submit-button");a&&a.button("reset"),O.form.finalizeSubmitFooter.call(e)}e.data("submitted",!1),e.removeData("ams-submit-button")},finalizeSubmitOnError:function(e){F("i",e).removeClass("fa-spin").removeClass("fa-gear").addClass("fa-ambulance")},initSubmitFooter:function(e){var a=F(this),t='';e||(e=F(this).data("ams-form-submit-message")),e&&(t+=''+e+"");var n=F("footer",a);F("button",n).hide(),n.append('
'+t+"
")},finalizeSubmitFooter:function(){var e=F(this),a=F("footer",e);a&&(F(".row",a).remove(),F("button",a).show())},_submitCallback:function(e,a,t,n){var s;n.is(":visible")&&(O.form.finalizeSubmitFooter.call(n),(s=n.data("ams-submit-button"))&&s.button("reset"));var i,r,o=n.data();if(o.amsFormDatatype)i=o.amsFormDatatype;else{var l=O.ajax.getResponse(t);i=l.contentType,e=l.data}switch(r=F(s?s.data("ams-form-submit-target")||o.amsFormSubmitTarget||"#content":o.amsFormSubmitTarget||"#content"),i){case"json":O.ajax.handleJSON(e,n,r);break;case"script":case"xml":break;case"html":case"text":default:O.form.resetChanged(n),s&&!0!==s.data("ams-keep-modal")&&O.dialog.close(n),r.exists()||(r=F("body")),r.parents(".hidden").removeClass("hidden"),F(".alert",r.parents(".alerts-container")).remove(),r.css({opacity:"0.0"}).html(e).delay(50).animate({opacity:"1.0"},300),O.initContent(r),O.form.setFocus(r)}var c=t.getResponseHeader("X-AMS-Callback");if(c){var d=t.getResponseHeader("X-AMS-Callback-Options");O.executeFunctionByName(c,n,void 0===d?{}:JSON.parse(d),t)}},_getSubmitValidators:function(e){var a=[],t=e.data("ams-form-validator");return t&&a.push([e,t]),F("[data-ams-form-validator]",e).each(function(){var e=F(this);a.push([e,e.data("ams-form-validator")])}),a},_checkSubmitValidators:function(e){var a=O.form._getSubmitValidators(e);if(!a.length)return!0;for(var t=[],n=!0,s=0;s"+i.header+"
"+i.message):s.push(i.message||i)}if(a.widgets)for(n=0;n'+r.message+""):r.label&&s.push(r.label+" : "+r.message);var l=o.parents(".tab-pane").index()+1;if(0
'),"string"==typeof f)m={},u=f;else{m=f.data(),u=f.attr("href")||m.amsUrl;var a=O.getFunctionByName(u);"function"==typeof a&&(u=a.call(f))}u&&(F("body").modalmanager("loading"),0===u.indexOf("#")?F(u).modal("show"):F.ajax({url:u,type:"get",cache:void 0!==m.amsAllowCache&&m.amsAllowCache,data:t,success:function(e,a,t){F("body").modalmanager("removeLoading");var n=O.ajax.getResponse(t),s=n.contentType,i=n.data;switch(s){case"json":O.ajax.handleJSON(i,F(F(f).data("ams-json-target")||"#content"));break;case"script":case"xml":break;case"html":case"text":default:var r=F(i),o=F(".modal-dialog",r.wrap("
").parent()),l=o.data(),c={backdrop:"static",overflow:l.amsModalOverflow||".modal-viewport",maxHeight:void 0===l.amsModalMaxHeight?function(){return F(window).height()-F(".modal-header",r).outerHeight(!0)-F("footer",r).outerHeight(!0)-85}:O.getFunctionByName(l.amsModalMaxHeight)},d=F.extend({},c,l.amsModalOptions);d=O.executeFunctionByName(l.amsModalInitCallback,o,d)||d,F("
").addClass("modal fade").append(r).modal(d).on("shown",O.dialog.shown).on("hidden",O.dialog.hidden),O.initContent(r),!1!==m.amsLogEvent&&O.stats.logPageview(u)}}}))})})},shown:function(e){function a(e){var a=F(".scrollmarker.top",s),t=s.scrollTop();0=s.get(0).scrollHeight?n.hide():n.show()}var t,n=e.target,s=F(".modal-viewport",n);if(s.exists()){var i=parseInt(s.css("max-height")),r=F.scrollbarWidth();"hidden"!==s.css("overflow")&&s.height()===i?(F("
").addClass("scrollmarker").addClass("top").css("top",0).css("width",s.width()-r).hide().appendTo(s),F("
").addClass("scrollmarker").addClass("bottom").css("top",i-20).css("width",s.width()-r).appendTo(s),s.scroll(a),s.off("resize").on("resize",a)):F(".scrollmarker",s).remove()}F("[data-ams-shown-callback]",n).each(function(){var e=O.getFunctionByName(F(this).data("ams-shown-callback"));e&&e.call(n,this)});var o=F(".modal-dialog",n).data("shown-callbacks");if(o)for(t=0;t"+e.error_message+"",icon:"fa fa-warning animated shake",timeout:1e4});break;case"modal":F(this).data("select2").dropdown.hide(),O.dialog.open(e.location);break;default:return{results:e.results||e,more:e.has_more||!1,context:e.context}}},select2QueryMethodSuccessCallback:function(e,a,t){var n=e.result;if("string"==typeof n)try{n=JSON.parse(n)}catch(e){}switch(n.status){case"error":O.skin.messageBox("error",{title:O.i18n.ERROR_OCCURED,content:"

"+n.error_message+"

",icon:"fa fa-warning animated shake",timeout:1e4});break;case"modal":F(this).data("select2").dropdown.hide(),O.dialog.open(n.location);break;default:t.callback({results:n.results||n,more:n.has_more||!1,context:n.context})}},select2ChangeHelper:function(){var e=F(this),a=e.data(),t=F(a.amsSelect2HelperTarget);switch(a.amsSelect2HelperType){case"html":t.html('
');var n={};n[a.amsSelect2HelperArgument||"value"]=e.val(),F.get(a.amsSelect2HelperUrl,n,O.getFunctionByName(a.amsSelect2HelperCallback)||function(e){e?(t.html(e),O.initContent(t)):t.empty()}).fail(function(){t.empty()});break;case"json-rpc":t.html('
'),O.jsonrpc.post(a.amsSelect2HelperMethod,{value:e.val()},{url:a.amsSelect2HelperUrl},O.getFunctionByName(a.amsSelect2HelperCallback)||function(e){e.result?(t.html(e.result),O.initContent(t)):t.empty()});break;default:var s=a.amsSelect2HelperCallback;s&&O.executeFunctionByName(s,e,a)}},contextMenuHandler:function(e,a){var t=a.data();if("modal"===t.toggle)O.dialog.open(a);else{var n=a.attr("href")||t.amsUrl;if(!n||n.startsWith("javascript")||a.attr("target"))return;O.event.stop();var s=O.getFunctionByName(n);"function"==typeof s&&(n=s.call(a,e)),"function"==typeof n?n.call(a,e):(n=n.replace(/\%23/,"#"),(e=a.data("ams-target"))?O.form.confirmChangedForm(e,function(){O.skin.loadURL(n,e,a.data("ams-link-options"),a.data("ams-link-callback"))}):O.form.confirmChangedForm(function(){n.startsWith("#")?n!==location.hash&&(O.root.hasClass("mobile-view-activated")?(O.root.removeClass("hidden-menu"),window.setTimeout(function(){window.location.hash=n},150)):window.location.hash=n):window.location=n}))}},datetimepickerDialogHiddenCallback:function(){F(".datepicker, .timepicker, .datetimepicker",this).datetimepicker("destroy")},clearSearchTarget:function(){var e=F(this);if(!e.val()){var a=F(e).parents("form").first();F(a.data("ams-form-submit-target")).empty()}},setSEOStatus:function(){var e=F(this),a=e.siblings(".progress").children(".progress-bar"),t=Math.min(e.val().length,100),n="success";t<20||80').prependTo(F(this)).addClass("open"===i.amsSwitcherState?i.amsSwitcherMinusClass||"fa-minus":i.amsSwitcherPlusClass||"fa-plus"),n.on("click",function(e){e.preventDefault();var a={};if(n.trigger("ams.switcher.before-switch",[n,a]),!a.veto)if(s.hasClass("switched")){s.removeClass("switched"),F(".fa",n).removeClass(i.amsSwitcherPlusClass||"fa-plus").addClass(i.amsSwitcherMinusClass||"fa-minus"),n.trigger("ams.switcher.opened",[n]);var t=n.attr("id");t&&F('legend.switcher[data-ams-switcher-sync="'+t+'"]',s).each(function(){var e=F(this);e.parents("fieldset").hasClass("switched")&&e.click()})}else s.addClass("switched"),F(".fa",n).removeClass(i.amsSwitcherMinusClass||"fa-minus").addClass(i.amsSwitcherPlusClass||"fa-plus"),n.trigger("ams.switcher.closed",[n])}),"open"!==i.amsSwitcherState&&s.addClass("switched"),n.data("ams-switcher","on"))})},checker:function(e){F("LEGEND.checker",e).each(function(){var s=F(this),i=s.parent("fieldset"),r=s.data();if(!r.amsChecker){var e=F(''),a=r.amsCheckerFieldname||"checker_"+O.generateId(),t=a.replace(/\./,"_"),n=r.amsCheckerHiddenPrefix,o=null,l=r.amsCheckerHiddenValueOn||"true",c=r.amsCheckerHiddenValueOff||"false",d=r.amsCheckerMarker||!1;n?o=F('').attr("name",n+a).val("on"===r.amsCheckerState?l:c).prependTo(s):d&&F('').attr("name",d).attr("value",1).prependTo(s);var m=F('').attr("name",a).attr("id",t).data("ams-checker-hidden-input",o).data("ams-checker-init",!0).val(r.amsCheckerValue||!0).attr("checked","on"===r.amsCheckerState?"checked":null);r.amsCheckerReadonly?m.attr("disabled","disabled"):m.on("change",function(e){e.preventDefault();var a={},t=F(this).is(":checked");if(s.trigger("ams.checker.before-switch",[s,a]),a.veto)F(this).prop("checked",!t);else if(O.executeFunctionByName(r.amsCheckerChangeHandler,s,t),!r.amsCheckerCancelDefault){var n=m.data("ams-checker-hidden-input");t?("disable"===r.amsCheckerMode?(i.removeAttr("disabled"),F(".select2",i).removeAttr("disabled")):i.removeClass("switched"),n&&n.val(l),F("[data-required]",i).attr("required","required"),s.trigger("ams.checker.opened",[s])):("disable"===r.amsCheckerMode?(i.prop("disabled","disabled"),F(".select2",i).attr("disabled","disabled")):i.addClass("switched"),n&&n.val(c),F("[data-required]",i).removeAttr("required"),s.trigger("ams.checker.closed",[s]))}}),m.appendTo(e),F(">label",s).attr("for",m.attr("id")),e.append("").prependTo(s);var u=F("[required]",i);u.attr("data-required",!0),"on"===r.amsCheckerState?m.attr("checked",!0):("disable"===r.amsCheckerMode?(i.attr("disabled","disabled"),F(".select2",i).attr("disabled","disabled")):i.addClass("switched"),u.removeAttr("required")),s.data("ams-checker","on")}})},slider:function(e){var a=F(".slider",e);0r<'dt-wrapper't"+(0<=h.indexOf("scroller")?"S":"")+"><'dt-row dt-bottom-row'<'row'<'col-sm-6'"+(!1===f.amsDatatableInformation?"":"i")+"><'col-sm-6 text-right'p>>",a=f.amsDatatableSorting;if("string"==typeof a){var t=a.split(";");for(a=[],m=0;m')}},p=F.extend({},d,f.amsDatatableOptions),g=[],b=[],v=[];if(0  '+O.i18n.DELETE_WARNING,status:"info",buttons:O.i18n.BTN_OK_CANCEL},function(e){if(e===O.i18n.BTN_OK){var t=r.parents("tr").first(),n=t.parents("table").first(),a=t.data("ams-location")||n.data("ams-location")||"";a&&(a+="/");var s=t.data("ams-delete-target")||n.data("ams-delete-target")||"delete-element.json",i=t.data("ams-element-name");l.ajax.post(a+s,{object_name:i},function(e,a){"success"===e.status?(n.hasClass("datatable")?n.dataTable().fnDeleteRow(t[0]):t.remove(),e.handle_json&&l.ajax.handleJSON(e)):l.ajax.handleJSON(e)})}})}},switchElementVisibility:function(){return function(){var t=F(this),e=t.parents("tr").first(),a=e.parents("table");O.ajax.post(a.data("ams-location")+"/"+a.data("ams-visibility-switcher"),{object_name:e.data("ams-element-name")},function(e,a){e.visible?F("i",t).attr("class","fa fa-fw fa-eye"):F("i",t).attr("class","fa fa-fw fa-eye-slash text-danger")})}}},l.tree={switchTableNode:function(){var e=F(this),i=F("i.switch",e),r=e.parents("tr").first(),o=r.parents("table").first();if(i.hasClass("fa-minus-square-o"))!function a(e){F('tr[data-ams-tree-node-parent-id="'+e+'"]').each(function(){var e=F(this);a(e.data("ams-tree-node-id")),e.remove()})}(r.data("ams-tree-node-id")),i.removeClass("fa-minus-square-o").addClass("fa-plus-square-o");else{var a=r.data("ams-location")||o.data("ams-location")||"",t=r.data("ams-tree-nodes-target")||o.data("ams-tree-nodes-target")||"get-tree-nodes.json",n=r.data("ams-element-name");i.removeClass("fa-plus-square-o").addClass("fa-cog fa-spin"),l.ajax.post(a+"/"+n+"/"+t,{can_sort:!F("td.sorter",r).is(":empty")},function(e,a){if(0span");0'),l.ajax.post(r.data("ams-location")+"/"+a.data("ams-switch-handler"),{object_name:i.data("ams-element-name")},function(e){s.html(e),e&&(l.initContent(s),t.removeClass("fa-plus-square-o").addClass("fa-minus-square-o"))})}else l.skin.cleanContainer(s),s.empty(),t.removeClass("fa-minus-square-o").addClass("fa-plus-square-o")},_initDesktopWidgets:function(e){if(O.enableWidgets){var a=F(".ams-widget",e);0

'+t+"

"+(s?"

"+s+"

":"");if("string"==typeof n)r+="
  • "+n+"
";else if(n){for(var o in r+="
    ",n)F.isNumeric(o)&&(r+="
  • "+n[o]+"
  • ");r+="
"}F(r+="
").insertBefore(e),e.exists&&O.skin.scrollTo(e,{offset:{top:-50}})},bigBox:function(e,a){O.ajax.check(O.notify,O.baseURL+"myams-notify"+O.devext+".js",function(){O.notify.messageBox(e,a)})},messageBox:function(e,a,t){"object"==typeof e&&(t=a,a=e||{},e="info"),O.ajax.check(O.notify,O.baseURL+"myams-notify"+O.devext+".js",function(){switch(e){case"error":case"danger":a.color="#C46A69";break;case"warning":a.color="#C79121";break;case"success":a.color="#739E73";break;default:a.color=a.color||"#3276B1"}a.sound=!1,O.notify.bigBox(a,t)})},smallBox:function(e,a,t){"object"==typeof e&&(t=a,a=e||{},e="info"),O.ajax.check(O.notify,O.baseURL+"myams-notify"+O.devext+".js",function(){switch(e){case"error":case"danger":a.color="#C46A69";break;case"warning":a.color="#C79121";break;case"success":a.color="#739E73";break;default:a.color=a.color||"#3276B1"}a.sound=!1,O.notify.smallBox(a,t)})},scrollTo:function(t,n){O.ajax.check(F.scrollTo,O.baseURL+"ext/jquery-scrollto-2.1.2"+O.devext+".js",function(){var e=F("body"),a=n.offset||0;e.hasClass("fixed-header")&&(a-=F("#header").height()),e.hasClass("fixed-ribbon")&&(a-=F("#ribbon").height()),n=F.extend({},n,{offset:a}),F.scrollTo(t,n)})},_drawBreadCrumb:function(){var n=F("OL.breadcrumb","#ribbon");F("li",n).not(".parent").remove(),F("li",n).exists()||n.append(F("
  • ").append(F("").text(O.i18n.HOME).addClass("padding-right-5").attr("href",F('nav a[href!="#"]:first').attr("href")))),F("LI.active >A","nav").each(function(){var e=F(this),a=F.trim(e.clone().children(".badge").remove().end().text()),t=F("
  • ").append(e.attr("href").replace(/^#/,"")?F("").html(a).attr("href",e.attr("href")):a);n.append(t)})},checkURL:function(){function e(e){F(".active",t).removeClass("active"),e.addClass("open").addClass("active"),e.parents("li").addClass("open active").children("ul").addClass("active").show(),e.parents("li:first").removeClass("open"),e.parents("ul").addClass(e.attr("href").replace(/^#/,"")?"active":"").show()}var a,t=F("nav"),n=location.hash,s=n.replace(/^#/,"");if(s){var i=F("#content");i.exists()||(i=F("body")),(a=F('A[href="'+n+'"]',t)).exists()&&e(a),O.skin.loadURL(s,i,{afterLoadCallback:function(){var e=F("html head title").data("ams-title-prefix");document.title=(e?e+" > ":"")+(F("[data-ams-page-title]:first",i).data("ams-page-title")||a.attr("title")||document.title)}})}else{var r=F("[data-ams-active-menu]").data("ams-active-menu");(a=r?F('A[href="'+r+'"]',t):F('>UL >LI >A[href!="#"]',t).first()).exists()&&(e(a),r?O.skin._drawBreadCrumb():window.location.hash=a.attr("href"))}},_clean_callbacks:[],registerCleanCallback:function(e){var a=O.skin._clean_callbacks;a.indexOf(e)<0&&a.push(e)},unregisterCleanCallback:function(e){var a=O.skin._clean_callbacks,t=a.indexOf(e);0<=t&&a.splice(t,1)},cleanContainer:function(e){for(var a=O.skin._clean_callbacks,t=0;t '+O.i18n.LOADING+" "),r[0]===F("#content")[0]){O.skin._drawBreadCrumb();var e=F("html head title").data("ams-title-prefix");document.title=(e?e+" > ":"")+F(".breadcrumb LI:last-child").text(),F("html, body").animate({scrollTop:0},"fast")}else r.animate({scrollTop:0},"fast")},success:function(e,a,t){if(l)O.executeFunctionByName(l,this,e,a,t,o);else{var n=O.ajax.getResponse(t),s=n.contentType,i=n.data;switch(F(".loading",r).remove(),s){case"json":O.ajax.handleJSON(i,r);break;case"script":case"xml":break;case"html":case"text":default:r.parents(".hidden").removeClass("hidden"),F(".alert",r.parents(".alerts-container")).remove(),r.css({opacity:"0.0"}).html(e).removeClass("hidden").delay(50).animate({opacity:"1.0"},300),O.initContent(r),O.form.setFocus(r)}o&&o.afterLoadCallback&&O.executeFunctionByName(o.afterLoadCallback,this),O.stats.logPageview()}},error:function(e,a,t){r.html('

    '+O.i18n.ERROR+t+"

    "+e.responseText),o&&o.afterErrorCallback&&O.executeFunctionByName(o.afterErrorCallback,this)},async:void 0===o.async||o.async},t=F.extend({},a,o);F.ajax(t)},setLanguage:function(e,a){var t=a.lang;switch(a.handler_type||"json"){case"json":var n=a.method||"setUserLanguage";O.jsonrpc.post(n,{lang:t},function(){window.location.reload(!0)});break;case"ajax":var s=a.href||"setUserLanguage";O.ajax.post(s,{lang:t},function(){window.location.reload(!0)})}},logout:function(){window.location=O.loginURL}},l.stats={logPageview:function(e){if(void 0!==R._gaq){var a=R.window.location;R._gaq.push(["_trackPageview",e||a.pathname+a.hash])}},logEvent:function(e,a,t){void 0!==R._gaq&&("object"==typeof e&&(a=e.action,t=e.label,e=e.category),R._gaq.push(["_trackEvent",e,a,t]))}},l.initPage=function(){var a=F("body");O.root=a,O.leftPanel=F("#left-panel"),O.shortcuts=F("#shortcuts"),O.plugins.initData(a);var t=F.ajaxSettings.xhr;F.ajaxSetup({beforeSend:function(e,a){if(O.safeMethods.indexOf(a.type)<0&&void 0!==R.Cookies){var t=Cookies.get(O.csrfCookieName);t&&e.setRequestHeader(O.csrfHeaderName,t)}},progress:O.ajax.progress,progressUpload:O.ajax.progress,xhr:function(){var e=t();if(e&&"function"==typeof e.addEventListener){var a=this;a&&a.progress&&e.addEventListener("progress",function(e){a.progress(e)},!1)}return e}}),F(document).ajaxStart(O.ajax.start),F(document).ajaxStop(O.ajax.stop),F(document).ajaxError(O.error.ajax),O.isMobile?(O.root.addClass("mobile-detected"),O.device="mobile",O.enableFastclick&&O.ajax.check(F.fn.noClickDelay,O.baseURL+"/ext/jquery-smartclick"+O.devext+".js",function(){F("NAV UL A").noClickDelay(),F("A","#hide-menu").noClickDelay()})):(O.root.addClass("desktop-detected"),O.device="desktop"),F("#hide-menu").find(">:first-child >A").click(function(e){a.toggleClass("hidden-menu"),e.preventDefault()}),F("#show-shortcuts").click(function(e){O.shortcuts.is(":visible")?O.skin._hideShortcutButtons():O.skin._showShortcutButtons(),e.preventDefault()}),O.shortcuts.click(function(e){O.skin._hideShortcutButtons()}),F(document).mouseup(function(e){O.shortcuts.is(e.target)||0!==O.shortcuts.has(e.target).length||O.skin._hideShortcutButtons()}),F("#search-mobile").click(function(){O.root.addClass("search-mobile")}),F("#cancel-search-js").click(function(){O.root.removeClass("search-mobile")}),F(".activity-button","#user-activity").click(function(e){var a=F("#user-activity"),t=F(".ajax-dropdown",a);t.is(":visible")?(t.fadeOut(150),a.removeClass("active")):(t.css("left",-t.innerWidth()+a.innerWidth()).fadeIn(150),a.addClass("active")),e.preventDefault()}),O.skin.checkNotification(),F(document).mouseup(function(e){var a=F(".ajax-dropdown");a.is(e.target)||0!==a.has(e.target).length||a.fadeOut(150).prev().removeClass("active")}),F('input[name="activity"]').change(function(e){var a=F(this).data("ams-url");if(a){e.preventDefault(),e.stopPropagation();var t=O.getFunctionByName(a);if("function"==typeof t&&(a=t.call(this)),"function"==typeof a)a.call(this);else{var n=F(".ajax-notifications");O.skin.loadURL(a,n)}}}),F("a","#user-menu LI.logout").click(function(e){e.preventDefault(),e.stopPropagation(),O.loginURL=F(this).attr("href"),O.skin.bigBox({title:" "+O.i18n.LOGOUT+" "+F("#show-shortcut").text()+" ?",content:O.i18n.LOGOUT_COMMENT,buttons:O.i18n.BTN_YES_NO},function(e){e===O.i18n.BTN_YES&&(O.root.addClass("animated fadeOutUp"),setTimeout(O.skin.logout,1e3))})});var e=F("nav");F("UL",e).myams_menu({accordion:!1!==e.data("ams-menu-accordion"),speed:O.menuSpeed}),F(".minifyme").click(function(e){F("BODY").toggleClass("minified"),F(this).effect("highlight",{},500),e.preventDefault()}),F("#refresh").click(function(e){O.skin.bigBox({title:" "+O.i18n.CLEAR_STORAGE_TITLE,content:O.i18n.CLEAR_STORAGE_CONTENT,buttons:"["+O.i18n.BTN_CANCEL+"]["+O.i18n.BTN_OK+"]"},function(e){e===O.i18n.BTN_OK&&localStorage&&(localStorage.clear(),location.reload())}),e.preventDefault()}),a.on("click",function(e){var a=F(this);a.is(e.target)||0!==a.has(e.target).length||0!==F(".popover").has(e.target).length||a.popover("hide")}),O.ajax.check(F.resize,O.baseURL+"ext/jquery-resize"+O.devext+".js",function(){F("#main").resize(function(){O.skin._setPageHeight(),O.skin._checkMobileWidth()}),e.resize(function(){O.skin._setPageHeight()})}),O.ajaxNav&&(F(document).on("click",'a[href="#"]',function(e){e.preventDefault()}),F(document).on("click",'a[href!="#"]:not([data-toggle]), [data-ams-url]:not([data-toggle])',function(e){var a=F(e.currentTarget),t=a.data("ams-disabled-handlers");if(!0!==t&&"click"!==t&&"all"!==t){var n=a.attr("href")||a.data("ams-url");if(n&&!n.startsWith("javascript")&&!a.attr("target")&&!0!==a.data("ams-context-menu")){var s,i;e.preventDefault(),e.stopPropagation(),0<=n.indexOf("?")?(s=n.split("?"),r=s[0],i=s[1].unserialize()):(r=n,i=void 0);var r,o=O.getFunctionByName(r);if("function"==typeof o&&(n=o.call(a,i)),"function"==typeof n)n.call(a,i);else if(n=n.replace(/\%23/,"#"),e.ctrlKey)window.open(n);else(r=a.data("ams-target"))?O.form.confirmChangedForm(r,function(){O.skin.loadURL(n,r,a.data("ams-link-options"),a.data("ams-link-callback"))}):O.form.confirmChangedForm(function(){n.startsWith("#")?n!==location.hash&&(O.root.hasClass("mobile-view-activated")?(O.root.removeClass("hidden-menu"),window.setTimeout(function(){window.location.hash=n},50)):window.location.hash=n):window.location=n})}}}),F(document).on("click",'a[target="_blank"]',function(e){e.preventDefault();var a=F(e.currentTarget);window.open(a.attr("href")),O.stats.logEvent(a.data("ams-stats-category")||"Navigation",a.data("ams-stats-action")||"External",a.data("ams-stats-label")||a.attr("href"))}),F(document).on("click",'a[target="_top"]',function(e){e.preventDefault(),O.form.confirmChangedForm(function(){window.location=F(e.currentTarget).attr("href")})}),F(window).on("hashchange",O.skin.checkURL)),F(document).off("click.modal").on("click",'[data-toggle="modal"]',function(e){var a=F(this),t=a.data("ams-disabled-handlers");!0!==t&&"click"!==t&&"all"!==t&&!0!==a.data("ams-context-menu")&&(!0===a.data("ams-stop-propagation")&&e.stopPropagation(),e.preventDefault(),O.dialog.open(a),a.parents("#shortcut").exists()&&setTimeout(O.skin._hideShortcutButtons,300))}),F(document).on("click",'button[type="submit"], button.submit',function(){var e=F(this);F(e.get(0).form).data("ams-submit-button",e)}),F(document).on("click",'input[type="checkbox"][readonly]',function(){return!1}),F(document).on("click","[data-ams-click-handler]",function(e){var a=F(this),t=a.data("ams-disabled-handlers");if(!0!==t&&"click"!==t&&"all"!==t){var n=a.data();if(n.amsClickHandler){!0!==n.amsStopPropagation&&!0!==n.amsClickStopPropagation||e.stopPropagation(),!0!==n.amsClickKeepDefault&&e.preventDefault();for(var s=n.amsClickHandler.split(/\s+/),i=0;i'),O.skin.loadURL(t.amsUrl,a.attr("href"),{afterLoadCallback:function(){t.amsTabLoadOnce&&a.data("ams-tab-loaded",!0),F("i",a).remove()},afterErrorCallback:function(){F("i",a).remove()}})}}),F(document).on("hide.bs.modal",function(e){var a=F(e.target);O.form.confirmChangedForm(a,function(){return a.data("modal").isShown=!0},function(){return e.preventDefault(),!1})}),F(document).on("myams.refresh",function(e,a){l.executeFunctionByName(a.handler||l.skin.refreshContent,e.target,a)}),O.initContent(document),O.ajaxNav&&e.exists()&&O.skin.checkURL(),O.form.setFocus(document),F(window).on("beforeunload",O.form.checkBeforeUnload)},l.initContent=function(e){F(".tipsy").remove(),F("[rel=tooltip]",e).tooltip(),F("[rel=popover]",e).popover(),F("[rel=popover-hover]",e).popover({trigger:"hover"}),O.plugins.init(e),O.callbacks.init(e),O.events.init(e),O.form.init(e),"desktop"===O.device?O.skin._initDesktopWidgets(e):O.skin._initMobileWidgets(e),O.skin._setPageHeight()},l.i18n={INFO:"Information",WARNING:"!! WARNING !!",ERROR:"ERROR: ",LOADING:"Loading...",PROGRESS:"Processing",WAIT:"Please wait!",FORM_SUBMITTED:"This form was already submitted...",NO_SERVER_RESPONSE:"No response from server!",ERROR_OCCURED:"An error occured!",ERRORS_OCCURED:"Some errors occured!",BAD_LOGIN_TITLE:"Bad login!",BAD_LOGIN_MESSAGE:"Your anthentication credentials didn't allow you to open a session; please check your credentials or contact administrator.",CONFIRM:"Confirm",CONFIRM_REMOVE:"Removing this content can't be undone. Do you confirm?",CLEAR_STORAGE_TITLE:"Clear Local Storage",CLEAR_STORAGE_CONTENT:"Would you like to RESET all your saved widgets and clear LocalStorage?",BTN_OK:"OK",BTN_CANCEL:"Cancel",BTN_OK_CANCEL:"[OK][Cancel]",BTN_YES:"Yes",BTN_NO:"No",BTN_YES_NO:"[Yes][No]",CLIPBOARD_COPY:"Copy to clipboard with Ctrl+C, and Enter",CLIPBOARD_CHARACTER_COPY_OK:"Character copied to clipboard",CLIPBOARD_TEXT_COPY_OK:"Text copied to clipboard",FORM_CHANGED_WARNING:"Some changes were not saved. These updates will be lost if you leave this page.",DELETE_WARNING:"This change can't be undone. Are you sure that you want to delete this element?",NO_UPDATE:"No changes were applied.",DATA_UPDATED:"Data successfully updated.",HOME:"Home",LOGOUT:"Logout?",LOGOUT_COMMENT:"You can improve your security further after logging out by closing this opened browser",SELECT2_PLURAL:"s",SELECT2_MATCH:"One result is available, press enter to select it.",SELECT2_MATCHES:" results are available, use up and down arrow keys to navigate.",SELECT2_NOMATCHES:"No matches found",SELECT2_SEARCHING:"Searching...",SELECT2_LOADMORE:"Loading more results...",SELECT2_INPUT_TOOSHORT:"Please enter {0} more character{1}",SELECT2_INPUT_TOOLONG:"Please delete {0} character{1}",SELECT2_SELECTION_TOOBIG:"You can only select {0} item{1}",SELECT2_FREETAG_PREFIX:"Free text: ",DT_COLUMNS:"Columns"},l.plugins.i18n={widgets:{},validate:{},datatables:{},fancybox:{ERROR:"Can't load requested content.",RETRY:"Please check URL or try again later.",CLOSE:"Close",NEXT:"Next",PREVIOUS:"Previous"},dndupload:{FILES_SELECTED:"{count} files selected",CHOOSE_FILE:"Select file(s)",ADD_INFO:"to add them to current folder,",DRAG_FILE:"or drag and drop them here!",UPLOAD:"Upload",UPLOADING:"Uploading…",DONE:"Done!",UPLOAD_MORE:"Upload more?",ERROR:"Error!",TRY_AGAIN:"Try again?"}},F(document).ready(function(){var e=(F=jQuery.noConflict())("HTML");e.removeClass("no-js").addClass("js");var a=e.attr("lang")||e.attr("xml:lang");a&&!a.startsWith("en")?(l.lang=a,l.getScript(l.baseURL+"i18n/myams_"+a.substr(0,2)+".js",function(){l.initPage()})):l.initPage()})}(jQuery,this); +"use strict";!function(e,a){var t=a.console;String.prototype.startsWith=function(e){var a=this.length,t=e.length;return!(a0},void 0===e.scrollbarWidth&&(e.scrollbarWidth=function(){var a=e('
    ').appendTo("body"),t=a.children(),n=t.innerWidth()-t.height(99).innerWidth();return a.remove(),n}),e.fn.extend({exists:function(){return e(this).length>0},objectOrParentWithClass:function(e){return this.hasClass(e)?this:this.parents("."+e)},listattr:function(a){var t=[];return this.each(function(){t.push(e(this).attr(a))}),t},style:function(e,a,t){if(void 0!==this.get(0)){var n=this.get(0).style;return void 0!==e?void 0!==a?(t=void 0!==t?t:"",n.setProperty(e,a,t),this):n.getPropertyValue(e):n}},removeClassPrefix:function(a){return this.each(function(t,n){var s=n.className.split(" ").map(function(e){return e.startsWith(a)?"":e});n.className=e.trim(s.join(" "))}),this},contextMenu:function(a){function t(t,n,s){var i=e(window)[n](),r=e(a.menuSelector)[n](),o=t;return t+r>i&&r',openedSign:''},a),n=e(this);n.find("LI").each(function(){var a=e(this);if(a.find("UL").size()>0){a.find("A:first").append(""+t.closedSign+"");var n=a.find("A:first");"#"===n.attr("href")&&n.click(function(){return!1})}}),n.find("LI.active").each(function(){var a=e(this).parents("UL"),n=a.parent("LI");a.slideDown(t.speed),n.find("b:first").html(t.openedSign),n.addClass("open")}),n.find("LI A").on("click",function(){var a=e(this);if(!a.hasClass("active")){var s=a.attr("href").replace(/^#/,""),i=a.parent().find("UL");if(t.accordion){var r=a.parent().parents("UL"),o=n.find("UL:visible");o.each(function(a){var n=!0;if(r.each(function(e){if(r[e]===o[a])return n=!1,!1}),n&&i!==o[a]){var c=e(o[a]);!s&&c.hasClass("active")||c.slideUp(t.speed,function(){e(this).parent("LI").removeClass("open").find("B:first").delay(t.speed).html(t.closedSign)})}})}var c=a.parent().find("UL:first");s||!c.is(":visible")||c.hasClass("active")?c.slideDown(t.speed,function(){a.parent("LI").addClass("open").find("B:first").delay(t.speed).html(t.openedSign)}):c.slideUp(t.speed,function(){a.parent("LI").removeClass("open").find("B:first").delay(t.speed).html(t.closedSign)})}})}}),e.UTF8={encode:function(e){e=e.replace(/\r\n/g,"\n");for(var a="",t=0;t127&&n<2048?(a+=String.fromCharCode(n>>6|192),a+=String.fromCharCode(63&n|128)):(a+=String.fromCharCode(n>>12|224),a+=String.fromCharCode(n>>6&63|128),a+=String.fromCharCode(63&n|128))}return a},decode:function(e){for(var a="",t=0,n=0,s=0,i=0;t191&&n<224?(s=e.charCodeAt(t+1),a+=String.fromCharCode((31&n)<<6|63&s),t+=2):(s=e.charCodeAt(t+1),i=e.charCodeAt(t+2),a+=String.fromCharCode((15&n)<<12|(63&s)<<6|63&i),t+=3);return a}},void 0===a.MyAMS&&(a.MyAMS={devmode:!0,devext:"",lang:"en",throttleDelay:350,menuSpeed:235,navbarHeight:49,ajaxNav:!0,safeMethods:["GET","HEAD","OPTIONS","TRACE"],csrfCookieName:"csrf_token",csrfHeaderName:"X-CSRF-Token",enableWidgets:!0,enableMobile:!1,enableFastclick:!1,warnOnFormChange:!1,ismobile:/iphone|ipad|ipod|android|blackberry|mini|windows\sce|palm/i.test(navigator.userAgent.toLowerCase())});var n=a.MyAMS,s=n;n.baseURL=function(){var a=e('script[src*="/myams.js"], script[src*="/myams.min.js"]').attr("src");return s.devmode=a.indexOf(".min.js")<0,s.devext=s.devmode?"":".min",a.substring(0,a.lastIndexOf("/")+1)}(),n.log=function(){t&&t.debug&&t.debug(this,arguments)},n.getQueryVar=function(e,a){if(e.indexOf("?")<0)return!1;e.endsWith("&")||(e+="&");var t=new RegExp(".*?[&\\?]"+a+"=(.*?)&.*"),n=e.replace(t,"$1");return n!==e&&n},n.rgb2hex=function(a){return"#"+e.map(a.match(/\b(\d+)\b/g),function(e){return("0"+parseInt(e).toString(16)).slice(-2)}).join("")},n.generateId=function(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return e()+e()+e()+e()},n.generateUUID=function(){var e=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){var t=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"===a?t:3&t|8).toString(16)})},n.getObject=function(e,a){if(e){if("string"!=typeof e)return e;var t=e.split(".");a=void 0===a||null===a?window:a;for(var n=0;n").attr("data-ams-id",t).text('@import "'+s.getSource(a)+'";'),n)var c=setInterval(function(){try{o[0].sheet.cssRules;n.call(window,!0,i),clearInterval(c)}catch(e){}},10);o.appendTo(r)}else n&&n.call(window,!1,i)},n.event={stop:function(e){e||(e=window.event),e&&"string"!=typeof e&&(e.stopPropagation?(e.stopPropagation(),e.preventDefault()):(e.cancelBubble=!0,e.returnValue=!1))}},n.browser={getInternetExplorerVersion:function(){var e=-1;if("Microsoft Internet Explorer"===navigator.appName){var a=navigator.userAgent;null!==new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})").exec(a)&&(e=parseFloat(RegExp.$1))}return e},checkVersion:function(){var e="You're not using Windows Internet Explorer.",t=this.getInternetExplorerVersion();t>-1&&(e=t>=8?"You're using a recent copy of Windows Internet Explorer.":"You should upgrade your copy of Windows Internet Explorer."),a.alert&&a.alert(e)},isIE8orlower:function(){var e="0",a=this.getInternetExplorerVersion();return a>-1&&(e=a>=9?0:1),e},copyToClipboard:function(i){function r(i){var r=!1;if(window.clipboardData&&window.clipboardData.setData)r=clipboardData.setData("Text",i);else if(document.queryCommandSupported&&document.queryCommandSupported("copy")){var o=e("