# HG changeset patch # User Thierry Florac # Date 1548326276 -3600 # Node ID 824f546d4a672c966d36ae6210c03a0813370914 # Parent 39d19a6997e5545d561132c8ddede76da250d92e Version 0.1.32 diff -r 39d19a6997e5 -r 824f546d4a67 .installed.cfg --- a/.installed.cfg Wed Jan 23 10:24:22 2019 +0100 +++ b/.installed.cfg Thu Jan 24 11:37:56 2019 +0100 @@ -98,3 +98,27 @@ location = /home/tflorac/Dropbox/src/PyAMS/pyams_skin/parts/test recipe = zc.recipe.testrunner script = /home/tflorac/Dropbox/src/PyAMS/pyams_skin/bin/test + +[buildout] +installed_develop_eggs = /home/tflorac/Dropbox/src/PyAMS/pyams_skin/develop-eggs/pyams-template.egg-link + /home/tflorac/Dropbox/src/PyAMS/pyams_skin/develop-eggs/pyams-form.egg-link + /home/tflorac/Dropbox/src/PyAMS/pyams_skin/develop-eggs/lingua.egg-link + /home/tflorac/Dropbox/src/PyAMS/pyams_skin/develop-eggs/pyams-pagelet.egg-link + /home/tflorac/Dropbox/src/PyAMS/pyams_skin/develop-eggs/pyams-catalog.egg-link + /home/tflorac/Dropbox/src/PyAMS/pyams_skin/develop-eggs/pyams-viewlet.egg-link + /home/tflorac/Dropbox/src/PyAMS/pyams_skin/develop-eggs/pyams-utils.egg-link + /home/tflorac/Dropbox/src/PyAMS/pyams_skin/develop-eggs/pyams-file.egg-link + /home/tflorac/Dropbox/src/PyAMS/pyams_skin/develop-eggs/pyams-skin.egg-link + /home/tflorac/Dropbox/src/PyAMS/pyams_skin/develop-eggs/pyams-i18n.egg-link + +[buildout] +parts = i18n pyflakes test package + +[buildout] +parts = pyflakes test package i18n + +[buildout] +parts = test package i18n pyflakes + +[buildout] +parts = package i18n pyflakes test diff -r 39d19a6997e5 -r 824f546d4a67 buildout.cfg --- a/buildout.cfg Wed Jan 23 10:24:22 2019 +0100 +++ b/buildout.cfg Thu Jan 24 11:37:56 2019 +0100 @@ -80,4 +80,4 @@ eggs = pyams_skin [test] [versions] -pyams_skin = 0.1.31 +pyams_skin = 0.1.32 diff -r 39d19a6997e5 -r 824f546d4a67 docs/HISTORY.txt --- a/docs/HISTORY.txt Wed Jan 23 10:24:22 2019 +0100 +++ b/docs/HISTORY.txt Thu Jan 24 11:37:56 2019 +0100 @@ -1,6 +1,10 @@ History ======= +0.1.32 +------ + - escape HTML characters in page metas headers + 0.1.31 ------ - added settings on Google extension to be able to disable an extension if cookies are refused diff -r 39d19a6997e5 -r 824f546d4a67 docs/README.txt --- a/docs/README.txt Wed Jan 23 10:24:22 2019 +0100 +++ b/docs/README.txt Thu Jan 24 11:37:56 2019 +0100 @@ -1,4 +1,4 @@ -PyAMS (Python/Pyramid Application Management Skin) is a small set of packages used +PyAMS (Python/Pyramid Application Management Suite) is a small set of packages used to build web applications and web content management tools. The "PyAMS skin" package provides a complete set of base classes, views, resources and templates used to diff -r 39d19a6997e5 -r 824f546d4a67 setup.py --- a/setup.py Wed Jan 23 10:24:22 2019 +0100 +++ b/setup.py Thu Jan 24 11:37:56 2019 +0100 @@ -25,7 +25,7 @@ README = os.path.join(DOCS, 'README.txt') HISTORY = os.path.join(DOCS, 'HISTORY.txt') -version = '0.1.31' +version = '0.1.32' long_description = open(README).read() + '\n\n' + open(HISTORY).read() tests_require = [] diff -r 39d19a6997e5 -r 824f546d4a67 src/pyams_skin.egg-info/PKG-INFO --- a/src/pyams_skin.egg-info/PKG-INFO Wed Jan 23 10:24:22 2019 +0100 +++ b/src/pyams_skin.egg-info/PKG-INFO Thu Jan 24 11:37:56 2019 +0100 @@ -1,12 +1,12 @@ Metadata-Version: 2.1 Name: pyams-skin -Version: 0.1.31 +Version: 0.1.32 Summary: PyAMS base skin interfaces and classes Home-page: http://hg.ztfy.org/pyams/pyams_skin Author: Thierry Florac Author-email: tflorac@ulthar.net License: ZPL -Description: PyAMS (Python/Pyramid Application Management Skin) is a small set of packages used +Description: PyAMS (Python/Pyramid Application Management Suite) is a small set of packages used to build web applications and web content management tools. The "PyAMS skin" package provides a complete set of base classes, views, resources and templates used to @@ -22,6 +22,10 @@ History ======= + 0.1.32 + ------ + - escape HTML characters in page metas headers + 0.1.31 ------ - added settings on Google extension to be able to disable an extension if cookies are refused diff -r 39d19a6997e5 -r 824f546d4a67 src/pyams_skin/resources/js/myams-core.min.js --- a/src/pyams_skin/resources/js/myams-core.min.js Wed Jan 23 10:24:22 2019 +0100 +++ b/src/pyams_skin/resources/js/myams-core.min.js Thu Jan 24 11:37:56 2019 +0100 @@ -1,1 +1,1 @@ -"use strict";!function(s,e){var t=e.console;String.prototype.startsWith=function(t){var e=this.length,r=t.length;return!(e
').appendTo("body"),e=t.children(),r=e.innerWidth()-e.height(99).innerWidth();return t.remove(),r}),s.fn.extend({exists:function(){return 0").attr("data-ams-id",e).text('@import "'+c.getSource(t)+'";'),r)var a=setInterval(function(){try{o[0].sheet.cssRules;r.call(window,!0,n),clearInterval(a)}catch(t){}},10);o.appendTo(i)}else r&&r.call(window,!1,n)}}(jQuery,this); +"use strict";!function(t,e){var r=e.console;String.prototype.startsWith=function(t){var e=this.length,r=t.length;return!(e0},void 0===t.scrollbarWidth&&(t.scrollbarWidth=function(){var e=t('
').appendTo("body"),r=e.children(),n=r.innerWidth()-r.height(99).innerWidth();return e.remove(),n}),t.fn.extend({exists:function(){return t(this).length>0},objectOrParentWithClass:function(t){return this.hasClass(t)?this:this.parents("."+t)},listattr:function(e){var r=[];return this.each(function(){r.push(t(this).attr(e))}),r},style:function(t,e,r){if(void 0!==this.get(0)){var n=this.get(0).style;return void 0!==t?void 0!==e?(r=void 0!==r?r:"",n.setProperty(t,e,r),this):n.getPropertyValue(t):n}},removeClassPrefix:function(e){return this.each(function(r,n){var i=n.className.split(" ").map(function(t){return t.startsWith(e)?"":t});n.className=t.trim(i.join(" "))}),this}}),void 0===e.MyAMS&&(e.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=e.MyAMS,i=n;n.baseURL=function(){var e=t('script[src*="/myams.js"], script[src*="/myams.min.js"], script[src*="/myams-core.js"], script[src*="/myams-core.min.js"], script[src*="/myams-require.js"], script[src*="/myams-require.min.js"]').attr("src");return i.devmode=e.indexOf(".min.js")<0,i.devext=i.devmode?"":".min",e.substring(0,e.lastIndexOf("/")+1)}(),n.log=function(){r&&r.debug&&r.debug(this,arguments)},n.getQueryVar=function(t,e){if(t.indexOf("?")<0)return!1;t.endsWith("&")||(t+="&");var r=new RegExp(".*?[&\\?]"+e+"=(.*?)&.*"),n=t.replace(r,"$1");return n!==t&&n},n.rgb2hex=function(e){return"#"+t.map(e.match(/\b(\d+)\b/g),function(t){return("0"+parseInt(t).toString(16)).slice(-2)}).join("")},n.generateId=function(){function t(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return t()+t()+t()+t()},n.generateUUID=function(){var t=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var r=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?r:3&r|8).toString(16)})},n.getObject=function(t,e){if(t){if("string"!=typeof t)return t;var r=t.split(".");e=void 0===e||null===e?window:e;for(var n=0;n").attr("data-ams-id",r).text('@import "'+i.getSource(e)+'";'),n)var c=setInterval(function(){try{s[0].sheet.cssRules;n.call(window,!0,o),clearInterval(c)}catch(t){}},10);s.appendTo(a)}else n&&n.call(window,!1,o)}}(jQuery,this); diff -r 39d19a6997e5 -r 824f546d4a67 src/pyams_skin/resources/js/myams-require.min.js --- a/src/pyams_skin/resources/js/myams-require.min.js Wed Jan 23 10:24:22 2019 +0100 +++ b/src/pyams_skin/resources/js/myams-require.min.js Thu Jan 24 11:37:56 2019 +0100 @@ -1,1 +1,1 @@ -"use strict";!function(s,t){var e=t.console;String.prototype.startsWith=function(e){var t=this.length,r=e.length;return!(t
').appendTo("body"),t=e.children(),r=t.innerWidth()-t.height(99).innerWidth();return e.remove(),r}),s.fn.extend({exists:function(){return 0").attr("data-ams-id",t).text('@import "'+c.getSource(e)+'";'),r)var a=setInterval(function(){try{i[0].sheet.cssRules;r.call(window,!0,n),clearInterval(a)}catch(e){}},10);i.appendTo(o)}else r&&r.call(window,!1,n)}}(jQuery,this),function(e,t){t.MyAMS.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"}}(jQuery,this),function(a,e){var s=e.MyAMS,c=[];s.require=function(e,t){for(var r=[],n=0;n0},void 0===e.scrollbarWidth&&(e.scrollbarWidth=function(){var t=e('
').appendTo("body"),r=t.children(),n=r.innerWidth()-r.height(99).innerWidth();return t.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(t){var r=[];return this.each(function(){r.push(e(this).attr(t))}),r},style:function(e,t,r){if(void 0!==this.get(0)){var n=this.get(0).style;return void 0!==e?void 0!==t?(r=void 0!==r?r:"",n.setProperty(e,t,r),this):n.getPropertyValue(e):n}},removeClassPrefix:function(t){return this.each(function(r,n){var o=n.className.split(" ").map(function(e){return e.startsWith(t)?"":e});n.className=e.trim(o.join(" "))}),this}}),void 0===t.MyAMS&&(t.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=t.MyAMS,o=n;n.baseURL=function(){var t=e('script[src*="/myams.js"], script[src*="/myams.min.js"], script[src*="/myams-core.js"], script[src*="/myams-core.min.js"], script[src*="/myams-require.js"], script[src*="/myams-require.min.js"]').attr("src");return o.devmode=t.indexOf(".min.js")<0,o.devext=o.devmode?"":".min",t.substring(0,t.lastIndexOf("/")+1)}(),n.log=function(){r&&r.debug&&r.debug(this,arguments)},n.getQueryVar=function(e,t){if(e.indexOf("?")<0)return!1;e.endsWith("&")||(e+="&");var r=new RegExp(".*?[&\\?]"+t+"=(.*?)&.*"),n=e.replace(r,"$1");return n!==e&&n},n.rgb2hex=function(t){return"#"+e.map(t.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(t){var r=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"===t?r:3&r|8).toString(16)})},n.getObject=function(e,t){if(e){if("string"!=typeof e)return e;var r=e.split(".");t=void 0===t||null===t?window:t;for(var n=0;n").attr("data-ams-id",r).text('@import "'+o.getSource(t)+'";'),n)var c=setInterval(function(){try{s[0].sheet.cssRules;n.call(window,!0,i),clearInterval(c)}catch(e){}},10);s.appendTo(a)}else n&&n.call(window,!1,i)}}(jQuery,this),function(e,t){t.MyAMS.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"}}(jQuery,this),function(e,t){var r=t.MyAMS,n=[];r.require=function(t,o){for(var i=[],a=0;a0?e.when.apply(e,i).then(function(){o()}):o()}}(jQuery,this); diff -r 39d19a6997e5 -r 824f546d4a67 src/pyams_skin/resources/js/myams.min.js --- a/src/pyams_skin/resources/js/myams.min.js Wed Jan 23 10:24:22 2019 +0100 +++ b/src/pyams_skin/resources/js/myams.min.js Thu Jan 24 11:37:56 2019 +0100 @@ -1,1 +1,1 @@ -"use strict";!function(r,a){var e=a.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}),r.fn.extend({exists:function(){return 0").attr("data-ams-id",a).text('@import "'+c.getSource(e)+'";'),t)var o=setInterval(function(){try{i[0].sheet.cssRules;t.call(window,!0,n),clearInterval(o)}catch(e){}},10);i.appendTo(s)}else t&&t.call(window,!1,n)}}(jQuery,this),function(e,a){a.MyAMS.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"}}(jQuery,this),jQuery.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',openedSign:''},e),t=c(this);t.find("LI").each(function(){var e=c(this);if(0"+r.closedSign+"");var a=e.find("A:first");"#"===a.attr("href")&&a.click(function(){return!1})}}),t.find("LI.active").each(function(){var e=c(this).parents("UL"),a=e.parent("LI");e.slideDown(r.speed),a.find("b:first").html(r.openedSign),a.addClass("open")}),t.find("LI A").on("click",function(){var e=c(this);if(!e.hasClass("active")){var n=e.attr("href").replace(/^#/,""),s=e.parent().find("UL");if(r.accordion){var i=e.parent().parents("UL"),o=t.find("UL:visible");o.each(function(a){var t=!0;if(i.each(function(e){if(i[e]===o[a])return t=!1}),t&&s!==o[a]){var e=c(o[a]);!n&&e.hasClass("active")||e.slideUp(r.speed,function(){c(this).parent("LI").removeClass("open").find("B:first").delay(r.speed).html(r.closedSign)})}})}var a=e.parent().find("UL:first");n||!a.is(":visible")||a.hasClass("active")?a.slideDown(r.speed,function(){e.parent("LI").addClass("open").find("B:first").delay(r.speed).html(r.openedSign)}):a.slideUp(r.speed,function(){e.parent("LI").removeClass("open").find("B:first").delay(r.speed).html(r.closedSign)})}})}})}(jQuery,this),function(e,a){a.MyAMS.event={stop:function(e){e||(e=window.event),e&&"string"!=typeof e&&(e.stopPropagation?(e.stopPropagation(),e.preventDefault()):(e.cancelBubble=!0,e.returnValue=!1))}}}(jQuery,this),function(n,s){var i=s.MyAMS;i.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(n("body")),t.get(0).select();try{document.execCommand("copy"),a=!0}catch(e){console&&console.warn&&console.warn("Copy to clipboard failed.",e)}finally{t.remove()}}a?i.skin&&i.skin.smallBox("success",{title:1"+s+"

"+(i||"")+"

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

"+n.error_message+"

",icon:"fa fa-warning animated shake",timeout:1e4});break;case"modal":i(this).data("select2").dropdown.hide(),o.dialog&&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=i(this),a=e.data(),t=i(a.amsSelect2HelperTarget);switch(a.amsSelect2HelperType){case"html":t.html('
');var n={};n[a.amsSelect2HelperArgument||"value"]=e.val(),i.get(a.amsSelect2HelperUrl,n,o.getFunctionByName(a.amsSelect2HelperCallback)||function(e){e?(t.html(e),o.initContent&&o.initContent(t)):t.empty()}).fail(function(){t.empty()});break;case"json-rpc":t.html('
'),o.jsonrpc&&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&&o.initContent(t)):t.empty()});break;default:var s=a.amsSelect2HelperCallback;s&&o.executeFunctionByName(s,e,a)}},contextMenuHandler:function(e,a){"A"!==a.get(0).tagName&&(a=a.parents("a").first());var t=a.data();if("modal"===t.toggle)o.dialog&&o.dialog.open(a);else{var n=a.attr("href")||t.amsUrl;if(!n||n.startsWith("javascript")||a.attr("target"))return;o.event&&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&&o.form.confirmChangedForm(e,function(){o.skin&&o.skin.loadURL(n,e,a.data("ams-link-options"),a.data("ams-link-callback"))}):o.form&&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(){i(".datepicker, .timepicker, .datetimepicker",this).datetimepicker("destroy")},clearSearchTarget:function(){var e=i(this);if(!e.val()){var a=i(e).parents("form").first();i(a.data("ams-form-submit-target")).empty()}},setSEOStatus:function(){var e=i(this),a=e.siblings(".progress").children(".progress-bar"),t=Math.min(e.val().length,100),n="success";t<20||80').prependTo(x(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"),x(".fa",n).removeClass(i.amsSwitcherPlusClass||"fa-plus").addClass(i.amsSwitcherMinusClass||"fa-minus"),n.trigger("ams.switcher.opened",[n]);var t=n.attr("id");t&&x('legend.switcher[data-ams-switcher-sync="'+t+'"]',s).each(function(){var e=x(this);e.parents("fieldset").hasClass("switched")&&e.click()})}else s.addClass("switched"),x(".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){x("LEGEND.checker",e).each(function(){var s=x(this),i=s.parent("fieldset"),o=s.data();if(!o.amsChecker){var e=x(''),a=o.amsCheckerFieldname||"checker_"+y.generateId(),t=a.replace(/\./,"_"),n=o.amsCheckerHiddenPrefix,r=null,c=o.amsCheckerHiddenValueOn||"true",l=o.amsCheckerHiddenValueOff||"false",d=o.amsCheckerMarker||!1;n?r=x('').attr("name",n+a).val("on"===o.amsCheckerState?c:l).prependTo(s):d&&x('').attr("name",d).attr("value",1).prependTo(s);var m=x('').attr("name",a).attr("id",t).data("ams-checker-hidden-input",r).data("ams-checker-init",!0).val(o.amsCheckerValue||!0).attr("checked","on"===o.amsCheckerState?"checked":null);o.amsCheckerReadonly?m.attr("disabled","disabled"):m.on("change",function(e){e.preventDefault();var a={},t=x(this).is(":checked");if(s.trigger("ams.checker.before-switch",[s,a]),a.veto)x(this).prop("checked",!t);else if(y.executeFunctionByName(o.amsCheckerChangeHandler,s,t),!o.amsCheckerCancelDefault){var n=m.data("ams-checker-hidden-input");t?("disable"===o.amsCheckerMode?(i.removeAttr("disabled"),x(".select2",i).removeAttr("disabled")):i.removeClass("switched"),n&&n.val(c),x("[data-required]",i).attr("required","required"),s.trigger("ams.checker.opened",[s])):("disable"===o.amsCheckerMode?(i.prop("disabled","disabled"),x(".select2",i).attr("disabled","disabled")):i.addClass("switched"),n&&n.val(l),x("[data-required]",i).removeAttr("required"),s.trigger("ams.checker.closed",[s]))}}),m.appendTo(e),x(">label",s).attr("for",m.attr("id")),e.append("").prependTo(s);var u=x("[required]",i);u.attr("data-required",!0),"on"===o.amsCheckerState?m.attr("checked",!0):("disable"===o.amsCheckerMode?(i.attr("disabled","disabled"),x(".select2",i).attr("disabled","disabled")):i.addClass("switched"),u.removeAttr("required")),s.data("ams-checker","on")}})},slider:function(e){var a=x(".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=x.extend({},d,f.amsDatatableOptions),g=[],b=[],v=[];if(0",{position:"absolute",width:e.width(),height:e.height(),class:e.attr("class")}).insertBefore(e);e.css("display","none");var o=ace.edit(i[0]),r={mode:s,tabSize:4,useSoftTabs:!1,showGutter:!0,showLineNumbers:!0,printMargin:132,showInvisibles:!0},c=x.extend({},r,t.amsEditorOptions);c=y.executeFunctionByName(t.amsEditorInitCallback,e,c)||c,o.setOptions(c),o.session.setValue(e.val()),o.session.on("change",function(){e.val(o.session.getValue())}),a.data("editor",o),y.executeFunctionByName(t.amsEditorAfterInitCallback,e,o,c)})};e?(ace.config.set("basePath",y.baseURL+"ext/ace"),y.ajax.check(n.ace_loaded,[y.baseURL+"ext/ace/ext-modelist.js"],a)):a()})},imgareaselect:function(e){var a=x(".imgareaselect",e);0  '+r.i18n.DELETE_WARNING,status:"info",buttons:r.i18n.BTN_OK_CANCEL},function(e){if(e===r.i18n.BTN_OK){var t=o.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");r.ajax&&r.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&&r.ajax&&r.ajax.handleJSON(e)):r.ajax&&r.ajax.handleJSON(e)})}})}},switchElementVisibility:function(){return function(){var t=i(this),e=t.parents("td").first(),a=t.parents("tr").first(),n=a.parents("table");i("i",t).attr("class","fa fa-fw fa-spinner fa-pulse"),r.ajax&&r.ajax.post(n.data("ams-location")+"/"+(e.data("ams-attribute-switcher")||n.data("ams-attribute-switcher")),{object_name:a.data("ams-element-name")},function(e,a){e.visible?i("i",t).attr("class","fa fa-fw fa-eye"):i("i",t).attr("class","fa fa-fw fa-eye-slash text-danger")})}},switchElementAttribute:function(){return function(){var t=i(this),e=t.parents("td").first(),n=e.data("ams-switcher-attribute-name"),a=t.parents("tr").first(),s=a.parents("table");i("i",t).attr("class","fa fa-fw fa-spinner fa-pulse"),r.ajax&&r.ajax.post(s.data("ams-location")+"/"+(e.data("ams-attribute-switcher")||s.data("ams-attribute-switcher")),{object_name:a.data("ams-element-name")},function(e,a){e[n]||e.on?i("i",t).attr("class",s.data("ams-"+n+"-icon-on")||"fa fa-fw fa-check-square-o"):i("i",t).attr("class",s.data("ams-"+n+"-icon-off")||"fa fa-fw fa-check-square txt-color-silver opacity-75")})}},exportTableToTSV:function(){return function(){var s=i(this);r.ajax&&r.ajax.check(e.saveAs,r.baseURL+"ext/js-filesaver"+r.devext+".js",function(){var e=i("table.datatable",s.parents(".ams-widget:first")),a=e.dataTable(),t="";i("th",e).each(function(e){0span");0'),d.ajax&&d.ajax.post(o.data("ams-location")+"/"+a.data("ams-switch-handler"),{object_name:i.data("ams-element-name")},function(e){s.html(e),e&&(d.initContent&&d.initContent(s),t.removeClass("fa-plus-square-o").addClass("fa-minus-square-o"))})}else d.skin.cleanContainer(s),s.empty(),t.removeClass("fa-minus-square-o").addClass("fa-plus-square-o")},_initDesktopWidgets:function(e){if(d.enableWidgets){var a=l(".ams-widget",e);0

'+t+"

"+(s?"

"+s+"

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

    '+d.i18n.ERROR+t+"

    "+e.responseText),r&&r.afterErrorCallback&&d.executeFunctionByName(r.afterErrorCallback,this)},async:void 0===r.async||r.async},t=l.extend({},a,r);l.ajax(t)},setLanguage:function(e,a){var t=a.lang;switch(a.handler_type||"json"){case"json":var n=a.method||"setUserLanguage";d.jsonrpc&&d.jsonrpc.post(n,{lang:t},function(){window.location.reload(!0)});break;case"ajax":var s=a.href||"setUserLanguage";d.ajax&&d.ajax.post(s,{lang:t},function(){window.location.reload(!0)})}},logout:function(){window.location=d.loginURL}}}(jQuery,this),function(e,n){n.MyAMS.stats={logPageview:function(e){if(void 0!==n._gaq){var a=n.window.location;n._gaq.push(["_trackPageview",e||a.pathname+a.hash])}},logEvent:function(e,a,t){void 0!==n._gaq&&("object"==typeof e&&(a=e.action,t=e.label,e=e.category),n._gaq.push(["_trackEvent",e,a,t]))}}}(jQuery,this),function(l,s){var d=s.MyAMS;d.initPage=function(){var a=l("body");d.root=a,d.leftPanel=l("#left-panel"),d.shortcuts=l("#shortcuts"),d.plugins.initData(a);var t=l.ajaxSettings.xhr;l.ajaxSetup({beforeSend:function(e,a){if(d.safeMethods.indexOf(a.type)<0&&void 0!==s.Cookies){var t=Cookies.get(d.csrfCookieName);t&&e.setRequestHeader(d.csrfHeaderName,t)}},progress:d.ajax&&d.ajax.progress,progressUpload:d.ajax&&d.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}}),l(document).ajaxStart(d.ajax&&d.ajax.start),l(document).ajaxStop(d.ajax&&d.ajax.stop),l(document).ajaxError(d.error&&d.error.ajax);var e=s.localStorage&&s.localStorage.getItem("window-state");e&&a.addClass(e),d.isMobile?(d.root.addClass("mobile-detected"),d.device="mobile",d.enableFastclick&&d.ajax&&d.ajax.check(l.fn.noClickDelay,d.baseURL+"/ext/jquery-smartclick"+d.devext+".js",function(){l("NAV UL A").noClickDelay(),l("A","#hide-menu").noClickDelay()})):(d.root.addClass("desktop-detected"),d.device="desktop"),l("#show-shortcuts").click(function(e){d.shortcuts.is(":visible")?d.skin&&d.skin._hideShortcutButtons():d.skin&&d.skin._showShortcutButtons(),e.preventDefault()}),d.shortcuts.click(function(e){d.skin&&d.skin._hideShortcutButtons()}),l(document).mouseup(function(e){d.shortcuts.is(e.target)||0!==d.shortcuts.has(e.target).length||d.skin&&d.skin._hideShortcutButtons()}),l("#search-mobile").click(function(){d.root.addClass("search-mobile")}),l("#cancel-search-js").click(function(){d.root.removeClass("search-mobile")}),l(".activity-button","#user-activity").click(function(e){var a=l("#user-activity"),t=l(".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()}),d.skin&&d.skin.checkNotification(),l(document).mouseup(function(e){var a=l(".ajax-dropdown");a.is(e.target)||0!==a.has(e.target).length||a.fadeOut(150).prev().removeClass("active")}),l('input[name="activity"]').change(function(e){var a=l(this).data("ams-url");if(a){e.preventDefault(),e.stopPropagation();var t=d.getFunctionByName(a);if("function"==typeof t&&(a=t.call(this)),"function"==typeof a)a.call(this);else{var n=l(".ajax-notifications");d.skin&&d.skin.loadURL(a,n)}}}),l("a","#user-menu LI.logout").click(function(e){e.preventDefault(),e.stopPropagation(),d.loginURL=l(this).attr("href"),d.skin&&d.skin.bigBox({title:" "+d.i18n.LOGOUT+" "+l("#show-shortcut").text()+" ?",content:d.i18n.LOGOUT_COMMENT,buttons:d.i18n.BTN_YES_NO},function(e){e===d.i18n.BTN_YES&&(d.root.addClass("animated fadeOutUp"),setTimeout(d.skin.logout,1e3))})});var n=l("nav");l("UL",n).myams_menu({accordion:!1!==n.data("ams-menu-accordion"),speed:d.menuSpeed}),l("#hide-menu").find(">:first-child >A").click(function(e){a.toggleClass("hidden-menu"),s.localStorage&&(a.hasClass("hidden-menu")?s.localStorage.setItem("window-state","hidden-menu"):s.localStorage.setItem("window-state","")),e.preventDefault()}),l(".minifyme").click(function(e){a.toggleClass("minified"),s.localStorage&&(a.hasClass("minified")?s.localStorage.setItem("window-state","minified"):s.localStorage.setItem("window-state","")),l(this).effect("highlight",{},500),e.preventDefault()}),l("#refresh").click(function(e){d.skin&&d.skin.bigBox({title:" "+d.i18n.CLEAR_STORAGE_TITLE,content:d.i18n.CLEAR_STORAGE_CONTENT,buttons:"["+d.i18n.BTN_CANCEL+"]["+d.i18n.BTN_OK+"]"},function(e){e===d.i18n.BTN_OK&&localStorage&&(localStorage.clear(),location.reload())}),e.preventDefault()}),a.on("click",function(e){var a=l(this);a.is(e.target)||0!==a.has(e.target).length||0!==l(".popover").has(e.target).length||a.popover("hide")}),d.ajax&&d.ajax.check(l.resize,d.baseURL+"ext/jquery-resize"+d.devext+".js",function(){l("#main").resize(function(){d.skin._setPageHeight(),d.skin._checkMobileWidth()}),n.resize(function(){d.skin._setPageHeight()})}),d.ajaxNav&&(l(document).on("click",'a[href="#"]',function(e){e.preventDefault()}),l(document).on("click",'a[href!="#"]:not([data-toggle]), [data-ams-url]:not([data-toggle])',function(e){var a=l(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,o;e.preventDefault(),e.stopPropagation(),0<=n.indexOf("?")?(i=(s=n.split("?"))[0],o=s[1].unserialize()):(i=n,o=void 0);var r=d.getFunctionByName(i);if("function"==typeof r&&(n=r.call(a,o)),"function"==typeof n)n.call(a,o);else if(n=n.replace(/\%23/,"#"),e.ctrlKey)window.open(n);else{var c=a.data("ams-target");c?"_blank"===c?window.open(n):d.form&&d.form.confirmChangedForm(c,function(){d.skin&&d.skin.loadURL(n,c,a.data("ams-link-options"),a.data("ams-link-callback"))}):d.form&&d.form.confirmChangedForm(function(){n.startsWith("#")?n!==location.hash&&(d.root.hasClass("mobile-view-activated")?(d.root.removeClass("hidden-menu"),window.setTimeout(function(){window.location.hash=n},50)):window.location.hash=n):window.location=n})}}}}),l(document).on("click",'a[target="_blank"]',function(e){e.preventDefault();var a=l(e.currentTarget);window.open(a.attr("href")),d.stats&&d.stats.logEvent(a.data("ams-stats-category")||"Navigation",a.data("ams-stats-action")||"External",a.data("ams-stats-label")||a.attr("href"))}),l(document).on("click",'a[target="_top"]',function(e){e.preventDefault(),d.form&&d.form.confirmChangedForm(function(){window.location=l(e.currentTarget).attr("href")})}),l(window).on("hashchange",d.skin&&d.skin.checkURL)),l(document).off("click.modal").on("click",'[data-toggle="modal"]',function(e){var a=l(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(),d.dialog&&d.dialog.open(a),a.parents("#shortcut").exists()&&setTimeout(d.skin._hideShortcutButtons,300))}),l(document).on("click",'button[type="submit"], button.submit',function(){var e=l(this);l(e.get(0).form).data("ams-submit-button",e)}),l(document).on("click",'input[type="checkbox"][readonly]',function(){return!1}),l(document).on("click","[data-ams-click-handler]",function(e){var a=l(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'),d.skin&&d.skin.loadURL(t.amsUrl,a.attr("href"),{afterLoadCallback:function(){t.amsTabLoadOnce&&a.data("ams-tab-loaded",!0),l("i",a).remove()},afterErrorCallback:function(){l("i",a).remove()}})}}),l(document).on("hide.bs.modal",function(e){var a=l(e.target);d.form&&d.form.confirmChangedForm(a,function(){var e=a.data("modal")||a.data("bs.modal");return e&&(e.isShown=!0),!0},function(){return e.preventDefault(),!1})}),l(document).on("myams.refresh",function(e,a){d.executeFunctionByName(a.handler||d.skin&&d.skin.refreshContent,e.target,a)}),d.initContent(document),d.ajaxNav&&n.exists()&&d.skin&&d.skin.checkURL(),d.form&&d.form.setFocus(document),l(window).on("beforeunload",d.form&&d.form.checkBeforeUnload)},d.initContent=function(e){l(".tipsy").remove(),l("[rel=tooltip]",e).tooltip(),l("[rel=popover]",e).popover(),l("[rel=popover-hover]",e).popover({trigger:"hover"}),d.plugins&&d.plugins.init(e),d.callbacks&&d.callbacks.init(e),d.events&&d.events.init(e),d.form&&d.form.init(e),"desktop"===d.device?d.skin&&d.skin._initDesktopWidgets(e):d.skin&&d.skin._initMobileWidgets(e),d.skin&&d.skin._setPageHeight()},l(document).ready(function(){var e=(l=jQuery.noConflict())("HTML");e.removeClass("no-js").addClass("js");var a=e.attr("lang")||e.attr("xml:lang");a&&!a.startsWith("en")?(d.lang=a,d.getScript(d.baseURL+"i18n/myams_"+a.substr(0,2)+d.devext+".js",function(){d.initPage()})):d.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}}),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"], script[src*="/myams-core.js"], script[src*="/myams-core.min.js"], script[src*="/myams-require.js"], script[src*="/myams-require.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)}}(jQuery,this),function(e,a){a.MyAMS.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"}}(jQuery,this),jQuery.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}},function(e,a){var t=a.MyAMS;e.fn.extend({contextMenu:function(a){function n(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)})}})}})}(jQuery,this),function(e,a){a.MyAMS.event={stop:function(e){e||(e=window.event),e&&"string"!=typeof e&&(e.stopPropagation?(e.stopPropagation(),e.preventDefault()):(e.cancelBubble=!0,e.returnValue=!1))}}}(jQuery,this),function(e,a){var t=a.MyAMS;t.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(n){function s(n){var s=!1;if(window.clipboardData&&window.clipboardData.setData)s=clipboardData.setData("Text",n);else if(document.queryCommandSupported&&document.queryCommandSupported("copy")){var i=e("