!function(n,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define("underscore",r):(n="undefined"!=typeof globalThis?globalThis:n||self,function(){var t=n._,e=n._=r();e.noConflict=function(){return n._=t,e}}())}(this,(function(){var n="1.13.1",r="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||Function("return this")()||{},t=Array.prototype,e=Object.prototype,u="undefined"!=typeof Symbol?Symbol.prototype:null,o=t.push,i=t.slice,a=e.toString,f=e.hasOwnProperty,c="undefined"!=typeof ArrayBuffer,l="undefined"!=typeof DataView,s=Array.isArray,p=Object.keys,v=Object.create,h=c&&ArrayBuffer.isView,y=isNaN,d=isFinite,g=!{toString:null}.propertyIsEnumerable("toString"),b=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],m=Math.pow(2,53)-1;function j(n,r){return r=null==r?n.length-1:+r,function(){for(var t=Math.max(arguments.length-r,0),e=Array(t),u=0;u=0&&t<=m}}function J(n){return function(r){return null==r?void 0:r[n]}}var G=J("byteLength"),H=K(G),Q=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;var X=c?function(n){return h?h(n)&&!q(n):H(n)&&Q.test(a.call(n))}:C(!1),Y=J("length");function Z(n,r){r=function(n){for(var r={},t=n.length,e=0;e":">",'"':""","'":"'","`":"`"},Cn=Ln($n),Kn=Ln(_n($n)),Jn=tn.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},Gn=/(.)^/,Hn={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},Qn=/\\|'|\r|\n|\u2028|\u2029/g;function Xn(n){return"\\"+Hn[n]}var Yn=/^\s*(\w|\$)+\s*$/;var Zn=0;function nr(n,r,t,e,u){if(!(e instanceof r))return n.apply(t,u);var o=Mn(n.prototype),i=n.apply(o,u);return _(i)?i:o}var rr=j((function(n,r){var t=rr.placeholder,e=function(){for(var u=0,o=r.length,i=Array(o),a=0;a1)ur(a,r-1,t,e),u=e.length;else for(var f=0,c=a.length;f0&&(t=r.apply(this,arguments)),n<=1&&(r=null),t}}var lr=rr(cr,2);function sr(n,r,t){r=qn(r,t);for(var e,u=nn(n),o=0,i=u.length;o0?0:u-1;o>=0&&o0?a=o>=0?o:Math.max(o+f,a):f=o>=0?Math.min(o+1,f):o+f+1;else if(t&&o&&f)return e[o=t(e,u)]===u?o:-1;if(u!=u)return(o=r(i.call(e,a,f),$))>=0?o+a:-1;for(o=n>0?a:f-1;o>=0&&o0?0:i-1;for(u||(e=r[o?o[a]:a],a+=n);a>=0&&a=3;return r(n,Fn(t,u,4),e,o)}}var Ar=wr(1),xr=wr(-1);function Sr(n,r,t){var e=[];return r=qn(r,t),jr(n,(function(n,t,u){r(n,t,u)&&e.push(n)})),e}function Or(n,r,t){r=qn(r,t);for(var e=!er(n)&&nn(n),u=(e||n).length,o=0;o=0}var Br=j((function(n,r,t){var e,u;return D(r)?u=r:(r=Nn(r),e=r.slice(0,-1),r=r[r.length-1]),_r(n,(function(n){var o=u;if(!o){if(e&&e.length&&(n=In(n,e)),null==n)return;o=n[r]}return null==o?o:o.apply(n,t)}))}));function Nr(n,r){return _r(n,Rn(r))}function Ir(n,r,t){var e,u,o=-1/0,i=-1/0;if(null==r||"number"==typeof r&&"object"!=typeof n[0]&&null!=n)for(var a=0,f=(n=er(n)?n:jn(n)).length;ao&&(o=e);else r=qn(r,t),jr(n,(function(n,t,e){((u=r(n,t,e))>i||u===-1/0&&o===-1/0)&&(o=n,i=u)}));return o}function Tr(n,r,t){if(null==r||t)return er(n)||(n=jn(n)),n[Wn(n.length-1)];var e=er(n)?En(n):jn(n),u=Y(e);r=Math.max(Math.min(r,u),0);for(var o=u-1,i=0;i1&&(e=Fn(e,r[1])),r=an(n)):(e=qr,r=ur(r,!1,!1),n=Object(n));for(var u=0,o=r.length;u1&&(t=r[1])):(r=_r(ur(r,!1,!1),String),e=function(n,t){return!Er(r,t)}),Ur(n,e,t)}));function zr(n,r,t){return i.call(n,0,Math.max(0,n.length-(null==r||t?1:r)))}function Lr(n,r,t){return null==n||n.length<1?null==r||t?void 0:[]:null==r||t?n[0]:zr(n,n.length-r)}function $r(n,r,t){return i.call(n,null==r||t?1:r)}var Cr=j((function(n,r){return r=ur(r,!0,!0),Sr(n,(function(n){return!Er(r,n)}))})),Kr=j((function(n,r){return Cr(n,r)}));function Jr(n,r,t,e){A(r)||(e=t,t=r,r=!1),null!=t&&(t=qn(t,e));for(var u=[],o=[],i=0,a=Y(n);ir?(e&&(clearTimeout(e),e=null),a=c,i=n.apply(u,o),e||(u=o=null)):e||!1===t.trailing||(e=setTimeout(f,l)),i};return c.cancel=function(){clearTimeout(e),a=0,e=u=o=null},c},debounce:function(n,r,t){var e,u,o,i,a,f=function(){var c=zn()-u;r>c?e=setTimeout(f,r-c):(e=null,t||(i=n.apply(a,o)),e||(o=a=null))},c=j((function(c){return a=this,o=c,u=zn(),e||(e=setTimeout(f,r),t&&(i=n.apply(a,o))),i}));return c.cancel=function(){clearTimeout(e),e=o=a=null},c},wrap:function(n,r){return rr(r,n)},negate:fr,compose:function(){var n=arguments,r=n.length-1;return function(){for(var t=r,e=n[r].apply(this,arguments);t--;)e=n[t].call(this,e);return e}},after:function(n,r){return function(){if(--n<1)return r.apply(this,arguments)}},before:cr,once:lr,findKey:sr,findIndex:vr,findLastIndex:hr,sortedIndex:yr,indexOf:gr,lastIndexOf:br,find:mr,detect:mr,findWhere:function(n,r){return mr(n,Dn(r))},each:jr,forEach:jr,map:_r,collect:_r,reduce:Ar,foldl:Ar,inject:Ar,reduceRight:xr,foldr:xr,filter:Sr,select:Sr,reject:function(n,r,t){return Sr(n,fr(qn(r)),t)},every:Or,all:Or,some:Mr,any:Mr,contains:Er,includes:Er,include:Er,invoke:Br,pluck:Nr,where:function(n,r){return Sr(n,Dn(r))},max:Ir,min:function(n,r,t){var e,u,o=1/0,i=1/0;if(null==r||"number"==typeof r&&"object"!=typeof n[0]&&null!=n)for(var a=0,f=(n=er(n)?n:jn(n)).length;ae||void 0===t)return 1;if(t+~]|"+ge+")"+ge+"*"),x=new RegExp(ge+"|>"),j=new RegExp(g),A=new RegExp("^"+t+"$"),D={ID:new RegExp("^#("+t+")"),CLASS:new RegExp("^\\.("+t+")"),TAG:new RegExp("^("+t+"|[*])"),ATTR:new RegExp("^"+p),PSEUDO:new RegExp("^"+g),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ge+"*(even|odd|(([+-]|)(\\d*)n|)"+ge+"*(?:([+-]|)"+ge+"*(\\d+)|))"+ge+"*\\)|)","i"),bool:new RegExp("^(?:"+f+")$","i"),needsContext:new RegExp("^"+ge+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ge+"*((?:-\\d)?\\d*)"+ge+"*\\)|)(?=[^-]|$)","i")},N=/^(?:input|select|textarea|button)$/i,q=/^h\d$/i,L=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,H=/[+~]/,O=new RegExp("\\\\[\\da-fA-F]{1,6}"+ge+"?|\\\\([^\\r\\n\\f])","g"),P=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},M=function(){V()},R=J(function(e){return!0===e.disabled&&fe(e,"fieldset")},{dir:"parentNode",next:"legend"});try{k.apply(oe=ae.call(ye.childNodes),ye.childNodes),oe[ye.childNodes.length].nodeType}catch(e){k={apply:function(e,t){me.apply(e,ae.call(t))},call:function(e){me.apply(e,ae.call(arguments,1))}}}function I(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(V(e),e=e||T,C)){if(11!==p&&(u=L.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return k.call(n,a),n}else if(f&&(a=f.getElementById(i))&&I.contains(e,a)&&a.id===i)return k.call(n,a),n}else{if(u[2])return k.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&e.getElementsByClassName)return k.apply(n,e.getElementsByClassName(i)),n}if(!(h[t+" "]||d&&d.test(t))){if(c=t,f=e,1===p&&(x.test(t)||m.test(t))){(f=H.test(t)&&U(e.parentNode)||e)==e&&le.scope||((s=e.getAttribute("id"))?s=ce.escapeSelector(s):e.setAttribute("id",s=S)),o=(l=Y(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+Q(l[o]);c=l.join(",")}try{return k.apply(n,f.querySelectorAll(c)),n}catch(e){h(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return re(t.replace(ve,"$1"),e,n,r)}function W(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function F(e){return e[S]=!0,e}function $(e){var t=T.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function B(t){return function(e){return fe(e,"input")&&e.type===t}}function _(t){return function(e){return(fe(e,"input")||fe(e,"button"))&&e.type===t}}function z(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&R(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function X(a){return F(function(o){return o=+o,F(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function U(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function V(e){var t,n=e?e.ownerDocument||e:ye;return n!=T&&9===n.nodeType&&n.documentElement&&(r=(T=n).documentElement,C=!ce.isXMLDoc(T),i=r.matches||r.webkitMatchesSelector||r.msMatchesSelector,r.msMatchesSelector&&ye!=T&&(t=T.defaultView)&&t.top!==t&&t.addEventListener("unload",M),le.getById=$(function(e){return r.appendChild(e).id=ce.expando,!T.getElementsByName||!T.getElementsByName(ce.expando).length}),le.disconnectedMatch=$(function(e){return i.call(e,"*")}),le.scope=$(function(){return T.querySelectorAll(":scope")}),le.cssHas=$(function(){try{return T.querySelector(":has(*,:jqfake)"),!1}catch(e){return!0}}),le.getById?(b.filter.ID=function(e){var t=e.replace(O,P);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&C){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(O,P);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&C){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},b.find.CLASS=function(e,t){if("undefined"!=typeof t.getElementsByClassName&&C)return t.getElementsByClassName(e)},d=[],$(function(e){var t;r.appendChild(e).innerHTML="",e.querySelectorAll("[selected]").length||d.push("\\["+ge+"*(?:value|"+f+")"),e.querySelectorAll("[id~="+S+"-]").length||d.push("~="),e.querySelectorAll("a#"+S+"+*").length||d.push(".#.+[+~]"),e.querySelectorAll(":checked").length||d.push(":checked"),(t=T.createElement("input")).setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),r.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&d.push(":enabled",":disabled"),(t=T.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||d.push("\\["+ge+"*name"+ge+"*="+ge+"*(?:''|\"\")")}),le.cssHas||d.push(":has"),d=d.length&&new RegExp(d.join("|")),l=function(e,t){if(e===t)return a=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!le.sortDetached&&t.compareDocumentPosition(e)===n?e===T||e.ownerDocument==ye&&I.contains(ye,e)?-1:t===T||t.ownerDocument==ye&&I.contains(ye,t)?1:o?se.call(o,e)-se.call(o,t):0:4&n?-1:1)}),T}for(e in I.matches=function(e,t){return I(e,null,null,t)},I.matchesSelector=function(e,t){if(V(e),C&&!h[t+" "]&&(!d||!d.test(t)))try{var n=i.call(e,t);if(n||le.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){h(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(O,P),e[3]=(e[3]||e[4]||e[5]||"").replace(O,P),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||I.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&I.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return D.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&j.test(n)&&(t=Y(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(O,P).toLowerCase();return"*"===e?function(){return!0}:function(e){return fe(e,t)}},CLASS:function(e){var t=s[e+" "];return t||(t=new RegExp("(^|"+ge+")"+e+"("+ge+"|$)"))&&s(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=I.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function T(e,n,r){return v(n)?ce.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?ce.grep(e,function(e){return e===n!==r}):"string"!=typeof n?ce.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(ce.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||k,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:S.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof ce?t[0]:t,ce.merge(this,ce.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:C,!0)),w.test(r[1])&&ce.isPlainObject(t))for(r in t)v(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=C.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):v(e)?void 0!==n.ready?n.ready(e):e(ce):ce.makeArray(e,this)}).prototype=ce.fn,k=ce(C);var E=/^(?:parents|prev(?:Until|All))/,j={children:!0,contents:!0,next:!0,prev:!0};function A(e,t){while((e=e[t])&&1!==e.nodeType);return e}ce.fn.extend({has:function(e){var t=ce(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,Ce=/^$|^module$|\/(?:java|ecma)script/i;xe=C.createDocumentFragment().appendChild(C.createElement("div")),(be=C.createElement("input")).setAttribute("type","radio"),be.setAttribute("checked","checked"),be.setAttribute("name","t"),xe.appendChild(be),le.checkClone=xe.cloneNode(!0).cloneNode(!0).lastChild.checked,xe.innerHTML="",le.noCloneChecked=!!xe.cloneNode(!0).lastChild.defaultValue,xe.innerHTML="",le.option=!!xe.lastChild;var ke={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function Se(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&fe(e,t)?ce.merge([e],n):n}function Ee(e,t){for(var n=0,r=e.length;n",""]);var je=/<|&#?\w+;/;function Ae(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function Re(e,t){return fe(e,"table")&&fe(11!==t.nodeType?t:t.firstChild,"tr")&&ce(e).children("tbody")[0]||e}function Ie(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function We(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Fe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(_.hasData(e)&&(s=_.get(e).events))for(i in _.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),C.head.appendChild(r[0])},abort:function(){i&&i()}}});var Jt,Kt=[],Zt=/(=)\?(?=&|$)|\?\?/;ce.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Kt.pop()||ce.expando+"_"+jt.guid++;return this[e]=!0,e}}),ce.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Zt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Zt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=v(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Zt,"$1"+r):!1!==e.jsonp&&(e.url+=(At.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||ce.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=ie[r],ie[r]=function(){o=arguments},n.always(function(){void 0===i?ce(ie).removeProp(r):ie[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Kt.push(r)),o&&v(i)&&i(o[0]),o=i=void 0}),"script"}),le.createHTMLDocument=((Jt=C.implementation.createHTMLDocument("").body).innerHTML="
",2===Jt.childNodes.length),ce.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(le.createHTMLDocument?((r=(t=C.implementation.createHTMLDocument("")).createElement("base")).href=C.location.href,t.head.appendChild(r)):t=C),o=!n&&[],(i=w.exec(e))?[t.createElement(i[1])]:(i=Ae([e],t,o),o&&o.length&&ce(o).remove(),ce.merge([],i.childNodes)));var r,i,o},ce.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(ce.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},ce.expr.pseudos.animated=function(t){return ce.grep(ce.timers,function(e){return t===e.elem}).length},ce.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=ce.css(e,"position"),c=ce(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=ce.css(e,"top"),u=ce.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),v(t)&&(t=t.call(e,n,ce.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},ce.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){ce.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===ce.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===ce.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=ce(e).offset()).top+=ce.css(e,"borderTopWidth",!0),i.left+=ce.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-ce.css(r,"marginTop",!0),left:t.left-i.left-ce.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===ce.css(e,"position"))e=e.offsetParent;return e||J})}}),ce.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;ce.fn[t]=function(e){return M(this,function(e,t,n){var r;if(y(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),ce.each(["top","left"],function(e,n){ce.cssHooks[n]=Ye(le.pixelPosition,function(e,t){if(t)return t=Ge(e,n),_e.test(t)?ce(e).position()[n]+"px":t})}),ce.each({Height:"height",Width:"width"},function(a,s){ce.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){ce.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return M(this,function(e,t,n){var r;return y(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?ce.css(e,t,i):ce.style(e,t,n,i)},s,n?e:void 0,n)}})}),ce.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){ce.fn[t]=function(e){return this.on(t,e)}}),ce.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.on("mouseenter",e).on("mouseleave",t||e)}}),ce.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){ce.fn[n]=function(e,t){return 0\x20\t\r\n\f]*)[^>]*)\/>/gi;s.UNSAFE_restoreLegacyHtmlPrefilter=function(){s.migrateEnablePatches("self-closed-tags")},i(s,"htmlPrefilter",function(e){var t,r;return(r=(t=e).replace(F,"<$1>"))!==t&&T(t)!==T(r)&&u("self-closed-tags","HTML tags must be properly nested and closed: "+t),e.replace(F,"<$1>")},"self-closed-tags"),s.migrateDisablePatches("self-closed-tags");var D,W,_,I=s.fn.offset;return i(s.fn,"offset",function(){var e=this[0];return!e||e.nodeType&&e.getBoundingClientRect?I.apply(this,arguments):(u("offset-valid-elem","jQuery.fn.offset() requires a valid DOM element"),arguments.length?this:void 0)},"offset-valid-elem"),s.ajax&&(D=s.param,i(s,"param",function(e,t){var r=s.ajaxSettings&&s.ajaxSettings.traditional;return void 0===t&&r&&(u("param-ajax-traditional","jQuery.param() no longer uses jQuery.ajaxSettings.traditional"),t=r),D.call(this,e,t)},"param-ajax-traditional")),c(s.fn,"andSelf",s.fn.addBack,"andSelf","jQuery.fn.andSelf() is deprecated and removed, use jQuery.fn.addBack()"),s.Deferred&&(W=s.Deferred,_=[["resolve","done",s.Callbacks("once memory"),s.Callbacks("once memory"),"resolved"],["reject","fail",s.Callbacks("once memory"),s.Callbacks("once memory"),"rejected"],["notify","progress",s.Callbacks("memory"),s.Callbacks("memory")]],i(s,"Deferred",function(e){var a=W(),i=a.promise();function t(){var o=arguments;return s.Deferred(function(n){s.each(_,function(e,t){var r="function"==typeof o[e]&&o[e];a[t[1]](function(){var e=r&&r.apply(this,arguments);e&&"function"==typeof e.promise?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[t[0]+"With"](this===i?n.promise():this,r?[e]:arguments)})}),o=null}).promise()}return c(a,"pipe",t,"deferred-pipe","deferred.pipe() is deprecated"),c(i,"pipe",t,"deferred-pipe","deferred.pipe() is deprecated"),e&&e.call(a,a),a},"deferred-pipe"),s.Deferred.exceptionHook=W.exceptionHook),s});; !function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},n=i[t]=i[t]||[];return-1==n.indexOf(e)&&n.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},n=i[t]=i[t]||{};return n[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=i.indexOf(e);return-1!=n&&i.splice(n,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=0,o=i[n];e=e||[];for(var r=this._onceEvents&&this._onceEvents[t];o;){var s=r&&r[o];s&&(this.off(t,o),delete r[o]),o.apply(this,e),n+=s?0:1,o=i[n]}return this}},t}),function(t,e){"use strict";"function"==typeof define&&define.amd?define(["ev-emitter/ev-emitter"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter")):t.imagesLoaded=e(t,t.EvEmitter)}(window,function(t,e){function i(t,e){for(var i in e)t[i]=e[i];return t}function n(t){var e=[];if(Array.isArray(t))e=t;else if("number"==typeof t.length)for(var i=0;i":">",'"':""","'":"'","/":"/","`":"`","=":"="};function escapeHtml(string){return String(string).replace(/[&<>"'`=\/]/g,function fromEntityMap(s){return entityMap[s]})}var whiteRe=/\s*/;var spaceRe=/\s+/;var equalsRe=/\s*=/;var curlyRe=/\s*\}/;var tagRe=/#|\^|\/|>|\{|&|=|!/;function parseTemplate(template,tags){if(!template)return[];var lineHasNonSpace=false;var sections=[];var tokens=[];var spaces=[];var hasTag=false;var nonSpace=false;var indentation="";var tagIndex=0;function stripSpace(){if(hasTag&&!nonSpace){while(spaces.length)delete tokens[spaces.pop()]}else{spaces=[]}hasTag=false;nonSpace=false}var openingTagRe,closingTagRe,closingCurlyRe;function compileTags(tagsToCompile){if(typeof tagsToCompile==="string")tagsToCompile=tagsToCompile.split(spaceRe,2);if(!isArray(tagsToCompile)||tagsToCompile.length!==2)throw new Error("Invalid tags: "+tagsToCompile);openingTagRe=new RegExp(escapeRegExp(tagsToCompile[0])+"\\s*");closingTagRe=new RegExp("\\s*"+escapeRegExp(tagsToCompile[1]));closingCurlyRe=new RegExp("\\s*"+escapeRegExp("}"+tagsToCompile[1]))}compileTags(tags||mustache.tags);var scanner=new Scanner(template);var start,type,value,chr,token,openSection;while(!scanner.eos()){start=scanner.pos;value=scanner.scanUntil(openingTagRe);if(value){for(var i=0,valueLength=value.length;i"){token=[type,value,start,scanner.pos,indentation,tagIndex,lineHasNonSpace]}else{token=[type,value,start,scanner.pos]}tagIndex++;tokens.push(token);if(type==="#"||type==="^"){sections.push(token)}else if(type==="/"){openSection=sections.pop();if(!openSection)throw new Error('Unopened section "'+value+'" at '+start);if(openSection[1]!==value)throw new Error('Unclosed section "'+openSection[1]+'" at '+start)}else if(type==="name"||type==="{"||type==="&"){nonSpace=true}else if(type==="="){compileTags(value)}}stripSpace();openSection=sections.pop();if(openSection)throw new Error('Unclosed section "'+openSection[1]+'" at '+scanner.pos);return nestTokens(squashTokens(tokens))}function squashTokens(tokens){var squashedTokens=[];var token,lastToken;for(var i=0,numTokens=tokens.length;i0?sections[sections.length-1][4]:nestedTokens;break;default:collector.push(token)}}return nestedTokens}function Scanner(string){this.string=string;this.tail=string;this.pos=0}Scanner.prototype.eos=function eos(){return this.tail===""};Scanner.prototype.scan=function scan(re){var match=this.tail.match(re);if(!match||match.index!==0)return"";var string=match[0];this.tail=this.tail.substring(string.length);this.pos+=string.length;return string};Scanner.prototype.scanUntil=function scanUntil(re){var index=this.tail.search(re),match;switch(index){case-1:match=this.tail;this.tail="";break;case 0:match="";break;default:match=this.tail.substring(0,index);this.tail=this.tail.substring(index)}this.pos+=match.length;return match};function Context(view,parentContext){this.view=view;this.cache={".":this.view};this.parent=parentContext}Context.prototype.push=function push(view){return new Context(view,this)};Context.prototype.lookup=function lookup(name){var cache=this.cache;var value;if(cache.hasOwnProperty(name)){value=cache[name]}else{var context=this,intermediateValue,names,index,lookupHit=false;while(context){if(name.indexOf(".")>0){intermediateValue=context.view;names=name.split(".");index=0;while(intermediateValue!=null&&index")value=this.renderPartial(token,context,partials,config);else if(symbol==="&")value=this.unescapedValue(token,context);else if(symbol==="name")value=this.escapedValue(token,context,config);else if(symbol==="text")value=this.rawValue(token);if(value!==undefined)buffer+=value}return buffer};Writer.prototype.renderSection=function renderSection(token,context,partials,originalTemplate,config){var self=this;var buffer="";var value=context.lookup(token[1]);function subRender(template){return self.render(template,context,partials,config)}if(!value)return;if(isArray(value)){for(var j=0,valueLength=value.length;j0||!lineHasNonSpace)){partialByNl[i]=filteredIndentation+partialByNl[i]}}return partialByNl.join("\n")};Writer.prototype.renderPartial=function renderPartial(token,context,partials,config){if(!partials)return;var tags=this.getConfigTags(config);var value=isFunction(partials)?partials(token[1]):partials[token[1]];if(value!=null){var lineHasNonSpace=token[6];var tagIndex=token[5];var indentation=token[4];var indentedValue=value;if(tagIndex==0&&indentation){indentedValue=this.indentPartial(value,indentation,lineHasNonSpace)}var tokens=this.parse(indentedValue,tags);return this.renderTokens(tokens,context,partials,indentedValue,config)}};Writer.prototype.unescapedValue=function unescapedValue(token,context){var value=context.lookup(token[1]);if(value!=null)return value};Writer.prototype.escapedValue=function escapedValue(token,context,config){var escape=this.getConfigEscape(config)||mustache.escape;var value=context.lookup(token[1]);if(value!=null)return typeof value==="number"&&escape===mustache.escape?String(value):escape(value)};Writer.prototype.rawValue=function rawValue(token){return token[1]};Writer.prototype.getConfigTags=function getConfigTags(config){if(isArray(config)){return config}else if(config&&typeof config==="object"){return config.tags}else{return undefined}};Writer.prototype.getConfigEscape=function getConfigEscape(config){if(config&&typeof config==="object"&&!isArray(config)){return config.escape}else{return undefined}};var mustache={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:undefined,escape:undefined,parse:undefined,render:undefined,Scanner:undefined,Context:undefined,Writer:undefined,set templateCache(cache){defaultWriter.templateCache=cache},get templateCache(){return defaultWriter.templateCache}};var defaultWriter=new Writer;mustache.clearCache=function clearCache(){return defaultWriter.clearCache()};mustache.parse=function parse(template,tags){return defaultWriter.parse(template,tags)};mustache.render=function render(template,view,partials,config){if(typeof template!=="string"){throw new TypeError('Invalid template! Template should be a "string" '+'but "'+typeStr(template)+'" was given as the first '+"argument for mustache#render(template, view, partials)")}return defaultWriter.render(template,view,partials,config)};mustache.escape=escapeHtml;mustache.Scanner=Scanner;mustache.Context=Context;mustache.Writer=Writer;return mustache});; var Debug=Debug||{};;(function($,_,undefined){"use strict";Debug=function(){var options={enabled:false,level:1,adapters:[]};var LEVEL={DEBUG:1,INFO:2,WARN:3,ERROR:4};var debug=function(msg){logMessage(LEVEL.DEBUG,msg);return Debug;},info=function(msg){logMessage(LEVEL.INFO,msg);return Debug;},warn=function(msg){logMessage(LEVEL.WARN,msg);return Debug;},error=function(msg){logMessage(LEVEL.ERROR,msg);return Debug;},logMessage=function(level,message){if(options.enabled&&level>=options.level&&options.adapters.length){for(let i=0;i{const form=e.target;if(e instanceof SubmitEvent&&form instanceof HTMLFormElement&&form.method.toUpperCase()==='POST'&&!getSetting('memberID')&&getCsrfKeyExpiry(){Debug.log(`Got a new CSRF key, resuming the form submission`);let submitButton=(e instanceof SubmitEvent||e.submitter instanceof Element)?e.submitter:form.querySelector('button[type="submit"], button:not([type]), input[type="submit"]');if(submitButton){submitButton.click();}else{const ev=new CustomSubmitEvent(e);form.dispatchEvent(ev);if(ev.defaultPrevented){return;} form.submit();}});}},{capture:true});if(!(HTMLElement.prototype.showPopover instanceof Function)){Debug.log(`Loading popover polyfill`);setTimeout(()=>{ips.loader.getStatic('/applications/core/interface/static/popover/popover.min.js');});} $.fn.animationComplete=function(callback){if('getAnimations'in Element.prototype){const elements=[...this];(new Promise(resolve=>setTimeout(resolve,0))).then(()=>Promise.allSettled((elements.map(el=>el.getAnimations()).flat()).map(anim=>anim.finished))).then(()=>callback.apply(this));return $(this);} return $(this).one('webkitAnimationEnd animationend',function(e){if(e.target==this){callback.apply(this);}});};$.fn.identify=function(){return this.each(function(){if(!this.id){this.id='ips_uid_'+urand+'_'+(++uid);}});};var oldProp=$.fn.prop;var newProp=function(){var retFunc=oldProp.apply(this,arguments);this.trigger('propChanged',this);return retFunc;};$.fn.prop=newProp;Function.prototype.method=function(name,func){this.prototype[name]=func;return this;};_.templateSettings={interpolate:/\{\{(.+?)\}\}/g };if(!Debug.isEnabled()&&window.console){window.console.log("%cThis is a browser feature intended for developers. Do not paste any code here given to you by someone else. It may compromise your account or have other negative side effects.","font-weight: bold; font-size: 14px;");} $(document).trigger('doneBooting').ready(function(){_location=$('body').attr('data-pageLocation')||'front';});},getAjax=function(){const wrap=method=>(...args)=>{let options={},url;if(typeof args[0]==='string'){url=args[0];options=args[1]||{};}else if(typeof args[0]==='object'&&args[0]){options=args[0];} if(options?.bypassRedirect==='none'){options.headers=options.headers||{};options.headers['x-bypass-ajax-redirect']='1';} if((options.method||options.type)?.toLowerCase()!=='post'||getSetting('memberID')||getCsrfKeyExpiry()>=Date.now()/1000){return method(...args);} let requestInstance;const decoratorQueues={};const properties={};let thenResolve,thenReject,mimeTypeOverride;const uploadEventListeners=new Map();const uploadDispatchedEvents=[];const proxyXHRObject={_promise:new Promise((resolve,reject)=>{thenResolve=resolve;thenReject=reject}),then(cb){this._promise.then(cb);},catch(...args){this._promise.catch(...args)},finally(...args){this._promise.finally(...args);},_aborted:false,get aborted(){return this._aborted;},_abortedStatusText:undefined,get abortedStatusText(){return this._abortedStatusText;},abort(statusText){this._aborted=true;this._abortedStatusText=statusText;requestInstance?.abort(statusText);},getAllResponseHeaders(){return requestInstance?.getAllResponseHeaders()||null;},getResponseHeader(header){return requestInstance?.getResponseHeader(header)||null;},overrideMimeType(mimeType){if(requestInstance){requestInstance.overrideMimeType(mimeType);return;} mimeTypeOverride=mimeType;},get readyState(){return requestInstance?requestInstance.readyState:0;},get response(){return requestInstance?('response'in requestInstance?requestInstance.response:null):null;},get responseText(){if(typeof requestInstance?.responseText==='string'){return requestInstance.responseText;} return"";},get responseType(){if(typeof requestInstance?.responseType==='string'){return requestInstance.responseType;} return"";},get responseURL(){return requestInstance?requestInstance.responseURL:(url||options.url||window.location.href);},get responseXML(){return requestInstance?requestInstance.responseXML:null;},get status(){return requestInstance?requestInstance.status:0;},get statusText(){return requestInstance?requestInstance.statusText:"";},get timeout(){return properties.timeout||0;},set timeout(val){properties.timeout=val;if(requestInstance){requestInstance.timeout=val;}},get withCredentials(){return!!(requestInstance?requestInstance.withCredentials:properties.withCredentials);},set withCredentials(val){val=!!val;properties.withCredentials=val;if(requestInstance){requestInstance.withCredentials=val;}},_upload:{_getEventCollection(event,options){const path=[event,(options&&options.capture)?"true":"false"];let collection=uploadEventListeners;for(let i=0;i{Debug.log(`Intercepted Fetch request and get fresh CSRF Key`);requestInstance=method(url,options);if(requestInstance.upload){if(Object.keys(uploadEventListeners).length){function evalCollection(collection){for(const[key,childCollection]of collection.entries()){if(key instanceof Function){requestInstance.upload.addEventListener(childCollection.event,key,childCollection.options);}else{evalCollection(childCollection);}}} evalCollection(uploadEventListeners);} for(const args of uploadDispatchedEvents){requestInstance.upload.dispatchEvent(...args);}} if(mimeTypeOverride){requestInstance.overrideMimeType(mimeTypeOverride);} for(const queue in decoratorQueues){requestInstance[queue](...decoratorQueues[queue]);} for(const property in properties){requestInstance[property]=properties[property];} requestInstance.then((...result)=>{thenResolve(...result);}).catch(err=>{thenReject(err);});if(proxyXHRObject.aborted){proxyXHRObject.abortedStatusText?requestInstance.abort(proxyXHRObject.abortedStatusText):requestInstance.abort();}});return proxyXHRObject;} if(getSetting('mock_ajax')){return wrap(getSetting('mock_ajax'));} return wrap($.ajax);},fetch=function(url,settings={}){return new Promise((resolve,reject)=>{const options={};if(typeof settings==='object'){Object.assign(options,settings)}else if(settings){return resolve(new TypeError(`Could not generate an ajax request because the settings is supposed to be of type object. Got a(n) ${typeof settings}`));} if(typeof url==='string'){options.url=url;}else if(typeof url==='object'){Object.assign(options,url)}else{return reject(new TypeError(`Could not generate an ajax request because url is supposed to be a string or an object. Got a ${typeof url}`));} options.async=true const getXHRHook=options.getXHRHook;delete options.getXHRHook;delete options.error delete options.success delete options.complete delete options.contents delete options.context delete options.converters delete options.dataFilter delete options.global delete options.isLocal delete options.jsonp delete options.jsonpCallback delete options.scriptAttrs delete options.statusCode delete options.traditional delete options.xhr delete options.xhrFields if(options.type&&!options.method){options.method=options.type;delete options.type;} let jqxhr;jqxhr=getAjax()(options).done(resolve).fail((e,...args)=>{try{if(e instanceof Error||typeof e==='object'){e.jqxhr=jqxhr;e.additionalArgs=args;reject(e);}else{throw new Error("Expected the first argument of the fail method to be an Error or a writable Object");}}catch(anotherError){let finalError=new Error("Got a really weird type passed to the fail method of a jquery ajax call");finalError.additionalArgs=args;finalError.jqxhr=jqxhr;finalError.additionalError=anotherError;Debug.error(anotherError);reject(anotherError);}});if(getXHRHook instanceof Function){try{getXHRHook(jqxhr);}catch(e){e.message=`Something went wrong when assigning the jqxhr hook - ${e.message}`;Debug.error(e);}}})},getContainer=function(){var tryThis=$(getSetting('container'));return(tryThis.length)?tryThis:$('body');},_refreshCsrfKey=async function(){setSetting('csrfKeyExpiry',Math.floor(Date.now()/1000+20));try{const response=await window.fetch(getSetting('baseURL').toString().replace(/\/+$/,'')+'/?app=core&module=system&controller=ajax&do=getCsrfKey&path='+window.location.pathname);const data=await response.json();Debug.log(`Got new CSRF Key: ${data.key}`);setSetting('csrfKey',data.key);setSetting('csrfKeyExpiry',typeof data.expiry==="number"?data.expiry:Math.floor(Date.now()/1000+500));_setAjaxConfig();document.querySelectorAll(`form input[name="csrfKey"]`).forEach(input=>{input.value=data.key;});document.querySelectorAll(`form:is([action*="?csrfKey="],[action*="&csrfKey="])`).forEach(form=>{const url=new URL(form.action);if((url.toString().startsWith('https:'+ips.getSetting('baseURL'))||url.toString().startsWith('http:'+ips.getSetting('baseURL')))&&(url.searchParams.has('csrfKey')||form.method.toLowerCase()!=='get')){url.updateSearchParams({param:'csrfKey',value:data.key});form.action=url.toString();}});document.querySelectorAll(`[href*="?csrfKey="], [href*="&csrfKey="]`).forEach(linkLikeEl=>{const url=new URL(linkLikeEl.href||linkLikeEl.getAttribute('href'));if((url.toString().startsWith('https:'+ips.getSetting('baseURL'))||url.toString().startsWith('http:'+ips.getSetting('baseURL')))&&url.searchParams.has('csrfKey')){url.updateSearchParams({param:'csrfKey',value:data.key});linkLikeEl.setAttribute('href',url.toString());}});document.dispatchEvent(new CustomEvent('ips:csrfKeyUpdated'));}catch(e){Debug.warn(e);}},getCsrfKeyExpiry=function(){const setting=getSetting('csrfKeyExpiry');if(typeof setting==="number"&&!Number.isNaN(setting)&&getSetting('csrfKey')){return setting;} return 0;},getFreshCsrfKey=async function(){if(getSetting('memberID')&&getSetting('csrfKey')){return getSetting('csrfKey');} if(Date.now()/1000>=getCsrfKeyExpiry()){await _refreshCsrfKey();} return getSetting('csrfKey');},_setAjaxConfig=function(){var data={csrfKey:getSetting('csrfKey')};$.ajaxSetup({data:data,cache:true});},_setAjaxEventListeners=function(){var count=0;$(document).ajaxSend(function(event,request,settings){if(!_.isUndefined(settings)&&settings.showLoading===true){if(!$('#elAjaxLoading').length){getContainer().append(templates.render('core.general.ajax'));} count++;ips.utils.anim.go('fadeIn fast',$('#elAjaxLoading'));}}).ajaxComplete(function(event,request,settings){if(!_.isUndefined(settings)&&settings.showLoading===true){count--;if(count===0){ips.utils.anim.go('fadeOut fast',$('#elAjaxLoading'));}} if(!_.isUndefined(settings)&&!settings.bypassRedirect){var responseJson=null;if(!_.isUndefined(request.responseJSON)&&!_.isUndefined(request.responseJSON.redirect)){responseJson=request.responseJSON;} else if(!_.isUndefined(request.responseText)){try {var jsonResponse=$.parseJSON(request.responseText);if(jsonResponse&&!_.isUndefined(jsonResponse.redirect)){responseJson=jsonResponse;}} catch(err){}} if(responseJson){if(!_.isUndefined(responseJson.message)&&responseJson.message!=''){ips.utils.cookie.set('flmsg',responseJson.message);} if(responseJson.redirect.match(/#/)){window.location.href=responseJson.redirect;window.location.reload();}else{window.location=responseJson.redirect;}}} ips.utils.cookie.init();});},getSetting=function(key){return _settings[key];},getAllSettings=function(){return _settings;},setSetting=function(key,value){_settings[key]=value;},setString=function(strings){if(_.isString(strings)&&arguments.length==2&&_.isString(arguments[1])){strings={};strings[arguments[0]]=arguments[1];}else if(!_.isObject(strings)){Debug.warn("Invalid strings object passed to addString");return;} $.each(strings,function(key,value){_strings[key]=value;});},haveString=function(key){return!_.isUndefined(_strings[key]);},getString=function(key,values,showMissingError=true){if(!(key in _strings)){Debug.warn("The string '"+key+"' doesn't exist");return Debug.isEnabled()&&showMissingError?`[${key}]`:'';} let thisString=_strings[key];values=values||{};if(thisString.indexOf('{{')===-1){return thisString;} Object.assign(values,{baseURL:ips.getSetting('baseURL')});try{return _.template(thisString)(values);}catch(err){Debug.error(err);return Debug.isEnabled()?"[Error using language string "+key+"]":"";}},setGraphQlData=function(key,value){_graphData[key]=value;},getGraphQlData=function(key){return _graphData[key];},getLocation=function(){return _location;},createModule=function(name,fn){var bits=name.split('.'),currentPath=window;var tmpName=[];if(bits.length){for(var i=0;i{options=(options&&typeof options==='object')?options:{};const defaults=_defaults[key]||{};options={...defaults,...options};return compiled(options,...otherArgs);};} return $.noop;},_lang=function(){return function(text,render){return ips.getString(render(text));}};return{set,get,render,compile};}();function cleanContentsOf(elem){elem=$(elem) if(!elem.length){Debug.log(`Skipped the cleaning of IPS modules and controllers from an empty content selection`) return} Debug.log('Cleaning up IPS modules and controllers from content');window.ips.controller.cleanContentsOf(elem,false) window.ips.ui.destructAllWidgets($(elem));elem.each(function(){const elem=$(this) for(const group of['ui','utils']){for(const module in window.ips[group]){if(window.ips[group][module].onCleanup instanceof Function){try{window.ips[group][module].onCleanup(elem);}catch(e){e.message=`An error occurred when calling ips[${JSON.stringify(group)}][${JSON.stringify(module)}].onCleanup() an an element` e.cleanupTarget=elem Debug.error(e)}}}}}) $(document).trigger('contentCleanup',[elem])} return{boot,createModule,getSetting,getAllSettings,setSetting,getGraphQlData,setGraphQlData,getAjax,fetch,getContainer,setString,haveString,getString,pluralize,getLocation,templates,testConsole,cleanContentsOf,uid(){return`${Math.round(Math.random() * Math.pow(16, 5)).toString(16)}-${Math.round(Math.random() * Math.pow(16, 5)).toString(16)}-${Math.round(Math.random() * Math.pow(16, 5)).toString(16)}-${Math.round(Math.random() * Math.pow(16, 5)).toString(16)}`},logTime(cb,message="Done timing code",{threshold=0}={}){const stack=(new Error()).stack;const lastLine=stack.split('\n').slice(0,3).pop().trim().replace(/^at\s*/,'');logTimeIndent++;const now=window.performance.now instanceof Function?()=>window.performance.now():Date.now;const start=now();const doneExecuting=()=>{const end=now();if(message instanceof Function){try{message=message(end-start);}catch(e){e.message="\t".repeat(Math.max(0,logTimeIndent-1))+e.message;Debug.warn(e);message="Done timing code, but a message generator failed";}} if((end-start>=threshold)&&Debug.isEnabled()){if(typeof message==="string"){console.log(`${"\t".repeat(Math.max(0, logTimeIndent - 1))}${end - start}ms: ${message}\n${"\t".repeat(Math.max(1, logTimeIndent))}${lastLine}`);}else{console.log(`${"\t".repeat(Math.max(0, logTimeIndent - 1))}${end - start}ms: `,message,`\n${"\t".repeat(Math.max(1, logTimeIndent))}${lastLine}`);}} logTimeIndent--;} const res=cb();if(res instanceof Promise){return res.then((result)=>{doneExecuting();return result;})} doneExecuting();return res;}};}());ips.boot(ipsSettings);}(jQuery,_));!function(){var lastBtn=null document.addEventListener('click',function(e){if(!e.target.closest)return;lastBtn=e.target.closest('button, input[type=submit]');},true);document.addEventListener('submit',function(e){if('submitter'in e)return;var canditates=[document.activeElement,lastBtn];lastBtn=null;for(var i=0;i{});}}; !function(){"use strict";var t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(e){function n(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=Object.create(t.prototype);for(var a in n)o[a]=n[a];return o.constructor=e,e.prototype=o,e}function o(t){t=t||{},this.defaultProtocol=t.defaultProtocol||h.defaultProtocol,this.events=t.events||h.events,this.format=t.format||h.format,this.formatHref=t.formatHref||h.formatHref,this.nl2br=t.nl2br||h.nl2br,this.tagName=t.tagName||h.tagName,this.target=t.target||h.target,this.validate=t.validate||h.validate,this.ignoreTags=[],this.attributes=t.attributes||t.linkAttributes||h.attributes,this.className=t.className||t.linkClass||h.className;for(var e=t.ignoreTags||h.ignoreTags,n=0;n=r)return[];for(;a1&&void 0!==arguments[1]?arguments[1]:null,n=this.next(new t(""));return n===this.defaultTransition?(n=new this.constructor(e),this.on(t,n)):e&&(n.T=e),n},test:function(t,e){return t instanceof e}}),b=l();b.prototype={toString:function(){return this.v+""}};var v=u(),y=u("@"),k=u(":"),w=u("."),j=u(),x=u(),z=u("\n"),O=u(),S=u("+"),N=u("#"),T=u(),A=u("mailto:"),L=u("?"),E=u("/"),C=u("_"),P=u(),R=u(),q=u(),H=u("{"),B=u("["),U=u("<"),M=u("("),D=u("}"),I=u("]"),K=u(">"),_=u(")"),G=u("&"),Y=Object.freeze({Base:b,DOMAIN:v,AT:y,COLON:k,DOT:w,PUNCTUATION:j,LOCALHOST:x,NL:z,NUM:O,PLUS:S,POUND:N,QUERY:L,PROTOCOL:T,MAILTO:A,SLASH:E,UNDERSCORE:C,SYM:P,TLD:R,WS:q,OPENBRACE:H,OPENBRACKET:B,OPENANGLEBRACKET:U,OPENPAREN:M,CLOSEBRACE:D,CLOSEBRACKET:I,CLOSEANGLEBRACKET:K,CLOSEPAREN:_,AMPERSAND:G}),Q="aaa|aarp|abb|abbott|abogado|ac|academy|accenture|accountant|accountants|aco|active|actor|ad|adac|ads|adult|ae|aeg|aero|af|afl|ag|agency|ai|aig|airforce|airtel|al|alibaba|alipay|allfinanz|alsace|am|amica|amsterdam|an|analytics|android|ao|apartments|app|apple|aq|aquarelle|ar|aramco|archi|army|arpa|arte|as|asia|associates|at|attorney|au|auction|audi|audio|author|auto|autos|avianca|aw|ax|axa|az|azure|ba|baidu|band|bank|bar|barcelona|barclaycard|barclays|bargains|bauhaus|bayern|bb|bbc|bbva|bcg|bcn|bd|be|beats|beer|bentley|berlin|best|bet|bf|bg|bh|bharti|bi|bible|bid|bike|bing|bingo|bio|biz|bj|black|blackfriday|bloomberg|blue|bm|bms|bmw|bn|bnl|bnpparibas|bo|boats|boehringer|bom|bond|boo|book|boots|bosch|bostik|bot|boutique|br|bradesco|bridgestone|broadway|broker|brother|brussels|bs|bt|budapest|bugatti|build|builders|business|buy|buzz|bv|bw|by|bz|bzh|ca|cab|cafe|cal|call|camera|camp|cancerresearch|canon|capetown|capital|car|caravan|cards|care|career|careers|cars|cartier|casa|cash|casino|cat|catering|cba|cbn|cc|cd|ceb|center|ceo|cern|cf|cfa|cfd|cg|ch|chanel|channel|chase|chat|cheap|chloe|christmas|chrome|church|ci|cipriani|circle|cisco|citic|city|cityeats|ck|cl|claims|cleaning|click|clinic|clinique|clothing|cloud|club|clubmed|cm|cn|co|coach|codes|coffee|college|cologne|com|commbank|community|company|compare|computer|comsec|condos|construction|consulting|contact|contractors|cooking|cool|coop|corsica|country|coupon|coupons|courses|cr|credit|creditcard|creditunion|cricket|crown|crs|cruises|csc|cu|cuisinella|cv|cw|cx|cy|cymru|cyou|cz|dabur|dad|dance|date|dating|datsun|day|dclk|de|dealer|deals|degree|delivery|dell|deloitte|delta|democrat|dental|dentist|desi|design|dev|diamonds|diet|digital|direct|directory|discount|dj|dk|dm|dnp|do|docs|dog|doha|domains|download|drive|dubai|durban|dvag|dz|earth|eat|ec|edeka|edu|education|ee|eg|email|emerck|energy|engineer|engineering|enterprises|epson|equipment|er|erni|es|esq|estate|et|eu|eurovision|eus|events|everbank|exchange|expert|exposed|express|fage|fail|fairwinds|faith|family|fan|fans|farm|fashion|fast|feedback|ferrero|fi|film|final|finance|financial|firestone|firmdale|fish|fishing|fit|fitness|fj|fk|flickr|flights|florist|flowers|flsmidth|fly|fm|fo|foo|football|ford|forex|forsale|forum|foundation|fox|fr|fresenius|frl|frogans|frontier|fund|furniture|futbol|fyi|ga|gal|gallery|gallup|game|garden|gb|gbiz|gd|gdn|ge|gea|gent|genting|gf|gg|ggee|gh|gi|gift|gifts|gives|giving|gl|glass|gle|global|globo|gm|gmail|gmbh|gmo|gmx|gn|gold|goldpoint|golf|goo|goog|google|gop|got|gov|gp|gq|gr|grainger|graphics|gratis|green|gripe|group|gs|gt|gu|gucci|guge|guide|guitars|guru|gw|gy|hamburg|hangout|haus|hdfcbank|health|healthcare|help|helsinki|here|hermes|hiphop|hitachi|hiv|hk|hm|hn|hockey|holdings|holiday|homedepot|homes|honda|horse|host|hosting|hoteles|hotmail|house|how|hr|hsbc|ht|hu|hyundai|ibm|icbc|ice|icu|id|ie|ifm|iinet|il|im|immo|immobilien|in|industries|infiniti|info|ing|ink|institute|insurance|insure|int|international|investments|io|ipiranga|iq|ir|irish|is|iselect|ist|istanbul|it|itau|iwc|jaguar|java|jcb|je|jetzt|jewelry|jlc|jll|jm|jmp|jo|jobs|joburg|jot|joy|jp|jpmorgan|jprs|juegos|kaufen|kddi|ke|kerryhotels|kerrylogistics|kerryproperties|kfh|kg|kh|ki|kia|kim|kinder|kitchen|kiwi|km|kn|koeln|komatsu|kp|kpn|kr|krd|kred|kuokgroup|kw|ky|kyoto|kz|la|lacaixa|lamborghini|lamer|lancaster|land|landrover|lanxess|lasalle|lat|latrobe|law|lawyer|lb|lc|lds|lease|leclerc|legal|lexus|lgbt|li|liaison|lidl|life|lifeinsurance|lifestyle|lighting|like|limited|limo|lincoln|linde|link|live|living|lixil|lk|loan|loans|local|locus|lol|london|lotte|lotto|love|lr|ls|lt|ltd|ltda|lu|lupin|luxe|luxury|lv|ly|ma|madrid|maif|maison|makeup|man|management|mango|market|marketing|markets|marriott|mba|mc|md|me|med|media|meet|melbourne|meme|memorial|men|menu|meo|mg|mh|miami|microsoft|mil|mini|mk|ml|mm|mma|mn|mo|mobi|mobily|moda|moe|moi|mom|monash|money|montblanc|mormon|mortgage|moscow|motorcycles|mov|movie|movistar|mp|mq|mr|ms|mt|mtn|mtpc|mtr|mu|museum|mutuelle|mv|mw|mx|my|mz|na|nadex|nagoya|name|natura|navy|nc|ne|nec|net|netbank|network|neustar|new|news|nexus|nf|ng|ngo|nhk|ni|nico|nikon|ninja|nissan|nl|no|nokia|norton|nowruz|np|nr|nra|nrw|ntt|nu|nyc|nz|obi|office|okinawa|om|omega|one|ong|onl|online|ooo|oracle|orange|org|organic|origins|osaka|otsuka|ovh|pa|page|pamperedchef|panerai|paris|pars|partners|parts|party|passagens|pe|pet|pf|pg|ph|pharmacy|philips|photo|photography|photos|physio|piaget|pics|pictet|pictures|pid|pin|ping|pink|pizza|pk|pl|place|play|playstation|plumbing|plus|pm|pn|pohl|poker|porn|post|pr|praxi|press|pro|prod|productions|prof|promo|properties|property|protection|ps|pt|pub|pw|pwc|py|qa|qpon|quebec|quest|racing|re|read|realtor|realty|recipes|red|redstone|redumbrella|rehab|reise|reisen|reit|ren|rent|rentals|repair|report|republican|rest|restaurant|review|reviews|rexroth|rich|ricoh|rio|rip|ro|rocher|rocks|rodeo|room|rs|rsvp|ru|ruhr|run|rw|rwe|ryukyu|sa|saarland|safe|safety|sakura|sale|salon|samsung|sandvik|sandvikcoromant|sanofi|sap|sapo|sarl|sas|saxo|sb|sbs|sc|sca|scb|schaeffler|schmidt|scholarships|school|schule|schwarz|science|scor|scot|sd|se|seat|security|seek|select|sener|services|seven|sew|sex|sexy|sfr|sg|sh|sharp|shell|shia|shiksha|shoes|show|shriram|si|singles|site|sj|sk|ski|skin|sky|skype|sl|sm|smile|sn|sncf|so|soccer|social|softbank|software|sohu|solar|solutions|song|sony|soy|space|spiegel|spot|spreadbetting|sr|srl|st|stada|star|starhub|statefarm|statoil|stc|stcgroup|stockholm|storage|store|studio|study|style|su|sucks|supplies|supply|support|surf|surgery|suzuki|sv|swatch|swiss|sx|sy|sydney|symantec|systems|sz|tab|taipei|taobao|tatamotors|tatar|tattoo|tax|taxi|tc|tci|td|team|tech|technology|tel|telecity|telefonica|temasek|tennis|tf|tg|th|thd|theater|theatre|tickets|tienda|tiffany|tips|tires|tirol|tj|tk|tl|tm|tmall|tn|to|today|tokyo|tools|top|toray|toshiba|total|tours|town|toyota|toys|tp|tr|trade|trading|training|travel|travelers|travelersinsurance|trust|trv|tt|tube|tui|tunes|tushu|tv|tvs|tw|tz|ua|ubs|ug|uk|unicom|university|uno|uol|us|uy|uz|va|vacations|vana|vc|ve|vegas|ventures|verisign|versicherung|vet|vg|vi|viajes|video|viking|villas|vin|vip|virgin|vision|vista|vistaprint|viva|vlaanderen|vn|vodka|volkswagen|vote|voting|voto|voyage|vu|vuelos|wales|walter|wang|wanggou|watch|watches|weather|weatherchannel|webcam|weber|website|wed|wedding|weir|wf|whoswho|wien|wiki|williamhill|win|windows|wine|wme|wolterskluwer|work|works|world|ws|wtc|wtf|xbox|xerox|xin|xperia|xxx|xyz|yachts|yahoo|yamaxun|yandex|ye|yodobashi|yoga|yokohama|youtube|yt|za|zara|zero|zip|zm|zone|zuerich|zw".split("|"),W="0123456789".split(""),X="0123456789abcdefghijklmnopqrstuvwxyz".split(""),Z=[" ","\f","\r","\t","\x0B"," "," ","᠎"],F=[],J=function(t){return new m(t)},V=J(),$=J(O),tt=J(v),et=J(),nt=J(q);V.on("@",J(y)).on(".",J(w)).on("+",J(S)).on("#",J(N)).on("?",J(L)).on("/",J(E)).on("_",J(C)).on(":",J(k)).on("{",J(H)).on("[",J(B)).on("<",J(U)).on("(",J(M)).on("}",J(D)).on("]",J(I)).on(">",J(K)).on(")",J(_)).on("&",J(G)).on([",",";","!",'"',"'"],J(j)),V.on("\n",J(z)).on(Z,nt),nt.on(Z,nt);for(var ot=0;ot=0&&u++,c++,a++;if(!(u<0)){a-=u,c-=u;var p=l.emit();o.push(new p(t.substr(a-c,c)))}}return o},yt=V,kt=Object.freeze({State:m,TOKENS:Y,run:vt,start:yt}),wt=l();wt.prototype={type:"token",isLink:!1,toString:function(){for(var t=[],e=0;e0&&void 0!==arguments[0]?arguments[0]:"http";return{type:this.type,value:this.toString(),href:this.toHref(t)}}};var jt=n(wt,l(),{type:"email",isLink:!0}),xt=n(wt,l(),{type:"email",isLink:!0,toHref:function(){this.v;return"mailto:"+this.toString()}}),zt=n(wt,l(),{type:"text"}),Ot=n(wt,l(),{type:"nl"}),St=n(wt,l(),{type:"url",isLink:!0,toHref:function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"http",e=!1,n=!1,o=this.v,a=[],r=0;o[r]instanceof T;)e=!0,a.push(o[r].toString().toLowerCase()),r++;for(;o[r]instanceof E;)n=!0,a.push(o[r].toString()),r++;for(;p(o[r]);)a.push(o[r].toString().toLowerCase()),r++;for(;r=0&&u++,n++,c++;if(u<0)for(var p=n-c;p0&&(o.push(new zt(a)),a=[]),n-=u,c-=u;var h=l.emit();o.push(new h(t.slice(n-c,n)))}}return a.length>0&&o.push(new zt(a)),o},fe=Object.freeze({State:d,TOKENS:Nt,run:ge,start:At});Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)});var me=function(t){return ge(vt(t))},de=function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=me(t),o=[],a=0;a1&&void 0!==arguments[1]?arguments[1]:null,n=me(t);return 1===n.length&&n[0].isLink&&(!e||n[0].type===e)};e.find=de,e.inherits=n,e.options=g,e.parser=fe,e.scanner=kt,e.test=be,e.tokenize=me}(self.linkify=self.linkify||{})}();; "use strict";!function(e,t,n){var i=function(t,n){function i(e,t,n){var i=n[n.length-1];e.replaceChild(i,t);for(var r=n.length-2;r>=0;r--)e.insertBefore(n[r],i),i=n[r]}function r(e,t,n){for(var i=[],r=e,a=Array.isArray(r),o=0,r=a?r:r[Symbol.iterator]();;){var l;if(a){if(o>=r.length)break;l=r[o++]}else{if(o=r.next(),o.done)break;l=o.value}var f=l;if("nl"===f.type&&t.nl2br)i.push(n.createElement("br"));else if(f.isLink&&t.check(f)){var s=t.resolve(f),c=s.formatted,u=s.formattedHref,d=s.tagName,m=s.className,y=s.target,h=s.events,k=s.attributes,v=n.createElement(d);if(v.setAttribute("href",u),m&&v.setAttribute("class",m),y&&v.setAttribute("target",y),k)for(var g in k)v.setAttribute(g,k[g]);if(h)for(var b in h)v.addEventListener?v.addEventListener(b,h[b]):v.attachEvent&&v.attachEvent("on"+b,h[b]);v.appendChild(n.createTextNode(c)),i.push(v)}else i.push(n.createTextNode(f.toString()))}return i}function a(e,t,n){if(!e||e.nodeType!==d)throw new Error("Cannot linkify "+e+" - Invalid DOM Node type");var o=t.ignoreTags;if("A"===e.tagName||s.contains(o,e.tagName))return e;for(var l=e.firstChild;l;){switch(l.nodeType){case d:a(l,t,n);break;case m:var c=l.nodeValue,y=f(c);if(0===y.length||1===y.length&&y[0]instanceof u)break;var h=r(y,t,n);i(e,l,h),l=h[h.length-1]}l=l.nextSibling}return e}function o(t,n){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];try{i=i||document||e&&e.document||global&&global.document}catch(r){}if(!i)throw new Error("Cannot find document implementation. If you are in a non-browser environment like Node.js, pass the document implementation as the third argument to linkifyElement.");return n=new c(n),a(t,n,i)}function l(t){function n(e){return e=o.normalize(e),this.each(function(){o.helper(this,e,i)})}var i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t.fn=t.fn||{};try{i=i||document||e&&e.document||global&&global.document}catch(r){}if(!i)throw new Error("Cannot find document implementation. If you are in a non-browser environment like Node.js, pass the document implementation as the second argument to linkify/jquery");"function"!=typeof t.fn.linkify&&(t.fn.linkify=n,t(i).ready(function(){t("[data-linkify]").each(function(){var e=t(this),n=e.data(),i=n.linkify,r=n.linkifyNlbr,a={attributes:n.linkifyAttributes,defaultProtocol:n.linkifyDefaultProtocol,events:n.linkifyEvents,format:n.linkifyFormat,formatHref:n.linkifyFormatHref,nl2br:!!r&&0!==r&&"false"!==r,tagName:n.linkifyTagname,target:n.linkifyTarget,className:n.linkifyClassName||n.linkifyLinkclass,validate:n.linkifyValidate,ignoreTags:n.linkifyIgnoreTags},o="this"===i?e:e.find(i);o.linkify(a)})}))}t="default"in t?t["default"]:t;var f=n.tokenize,s=n.options,c=s.Options,u=n.parser.TOKENS.TEXT,d=1,m=3;o.helper=a,o.normalize=function(e){return new c(e)};try{!define&&(e.linkifyElement=o)}catch(y){}return l}(n,t);"function"!=typeof n.fn.linkify&&i(n)}(window,linkify,jQuery);; "use strict";function eventSuppressor(e){e.preventDefault();e.stopPropagation();} let uuid=0;const METHODS={ipsHide(){this.setAttribute('hidden','true')},ipsShow(){this.removeAttribute('hidden') this.classList.remove('ipsHide');if(this.style.display==='none'){this.style.display=''}},ipsEnable(){this.style.filter='';this.style.cursor='';if(this.dataset.disabledOriginalStyles){for(const[k,v]of Object.entries(JSON.parse(this.dataset.disabledOriginalStyles))){if(v){this.style[k]=v;}else{delete this.style[k];}}} delete this.dataset.disabledOriginalStyles;this.removeEventListener('click',eventSuppressor);this.removeEventListener('mousedown',eventSuppressor);this.removeEventListener('mouseup',eventSuppressor);this.removeEventListener('focus',eventSuppressor);if('ipstooltip'in this.dataset&&this.dataset.disableTitle&&this.dataset.disableTitle===(this.getAttribute('title')||this.getAttribute('_title'))){const originalTitle=this.dataset.originalTitle;delete this.dataset.disableTitle;if(!originalTitle){this.removeAttribute('title');this.removeAttribute('_title');delete this.dataset.ipstooltip;}else{this.setAttribute('title',originalTitle);this.setAttribute('_title',originalTitle);}}},ipsDisable(options={}){let{message,opacity}=options;if(!this.dataset.disabledOriginalStyles){const originals={filter:this.style.filter,cursor:this.style.cursor};this.dataset.disabledOriginalStyles=JSON.stringify(originals);} opacity=Number(opacity);opacity=(opacity>0&&opacity<1)?opacity:0.6;this.style.filter=`grayscale(1) opacity(${opacity * 100}%)`;this.style.cursor=(message?'default':'not-allowed');this.addEventListener('click',eventSuppressor);this.addEventListener('mousedown',eventSuppressor);this.addEventListener('mouseup',eventSuppressor);this.addEventListener('focus',eventSuppressor);if(typeof message==='string'){const originalMessage=('ipstooltip'in this.dataset)?(this.getAttribute('title')||this.getAttribute('_title')):false;if(originalMessage){this.dataset.originalTitle=originalMessage;} this.removeAttribute('_title');delete this.dataset.ipstooltip;this.setAttribute('title',message);this.dataset.disableTitle=message;this.setAttribute('data-ipstooltip','')}}};for(const[name,func]of Object.entries(METHODS)){Element.prototype[name]=function(...args){func.bind(this)(...args);return this;} NodeList.prototype[name]=function(...args){this.forEach(e=>{if(e instanceof Element){e[name](...args)}}) return this;}} const ilang=(str,...values)=>{const raw=String.raw({raw:str},...values) return ips.getString(raw)||raw}; (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.XRegExp=f()}})(function(){var define,module,exports;return(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o-1;var inlineFlags=/^\(\?([\w$]+)\)/.exec(pattern);if(inlineFlags){flags=XRegExp._clipDuplicates(flags+inlineFlags[1]);} var data={};for(var p in subs){if(subs.hasOwnProperty(p)){var sub=asXRegExp(subs[p],addFlagX);data[p]={pattern:deanchor(sub.source),names:sub[REGEX_DATA].captureNames||[]};}} var patternAsRegex=asXRegExp(pattern,addFlagX);var numCaps=0;var numPriorCaps;var numOuterCaps=0;var outerCapsMap=[0];var outerCapNames=patternAsRegex[REGEX_DATA].captureNames||[];var output=patternAsRegex.source.replace(parts,function($0,$1,$2,$3,$4){var subName=$1||$2;var capName;var intro;var localCapIndex;if(subName){if(!data.hasOwnProperty(subName)){throw new ReferenceError('Undefined property '+$0);} if($1){capName=outerCapNames[numOuterCaps];outerCapsMap[++numOuterCaps]=++numCaps;intro='(?<'+(capName||subName)+'>';}else{intro='(?:';} numPriorCaps=numCaps;return intro+data[subName].pattern.replace(subParts,function(match,paren,backref){if(paren){capName=data[subName].names[numCaps-numPriorCaps];++numCaps;if(capName){return'(?<'+capName+'>';}}else if(backref){localCapIndex=+backref-1;return data[subName].names[localCapIndex]?'\\k<'+data[subName].names[localCapIndex]+'>':'\\'+(+backref+numPriorCaps);} return match;})+')';} if($3){capName=outerCapNames[numOuterCaps];outerCapsMap[++numOuterCaps]=++numCaps;if(capName){return'(?<'+capName+'>';}}else if($4){localCapIndex=+$4-1;return outerCapNames[localCapIndex]?'\\k<'+outerCapNames[localCapIndex]+'>':'\\'+outerCapsMap[+$4];} return $0;});return XRegExp(output,flags);};};},{}],2:[function(require,module,exports){module.exports=function(XRegExp){'use strict';function row(name,value,start,end){return{name:name,value:value,start:start,end:end};} XRegExp.matchRecursive=function(str,left,right,flags,options){flags=flags||'';options=options||{};var global=flags.indexOf('g')>-1;var sticky=flags.indexOf('y')>-1;var basicFlags=flags.replace(/y/g,'');var escapeChar=options.escapeChar;var vN=options.valueNames;var output=[];var openTokens=0;var delimStart=0;var delimEnd=0;var lastOuterEnd=0;var outerStart;var innerStart;var leftMatch;var rightMatch;var esc;left=XRegExp(left,basicFlags);right=XRegExp(right,basicFlags);if(escapeChar){if(escapeChar.length>1){throw new Error('Cannot use more than one escape character');} escapeChar=XRegExp.escape(escapeChar);esc=new RegExp('(?:'+escapeChar+'[\\S\\s]|(?:(?!'+ XRegExp.union([left,right],'',{conjunction:'or'}).source+ ')[^'+escapeChar+'])+)+',flags.replace(/[^imu]+/g,''));} while(true){if(escapeChar){delimEnd+=(XRegExp.exec(str,esc,delimEnd,'sticky')||[''])[0].length;} leftMatch=XRegExp.exec(str,left,delimEnd);rightMatch=XRegExp.exec(str,right,delimEnd);if(leftMatch&&rightMatch){if(leftMatch.index<=rightMatch.index){rightMatch=null;}else{leftMatch=null;}} if(leftMatch||rightMatch){delimStart=(leftMatch||rightMatch).index;delimEnd=delimStart+(leftMatch||rightMatch)[0].length;}else if(!openTokens){break;} if(sticky&&!openTokens&&delimStart>lastOuterEnd){break;} if(leftMatch){if(!openTokens){outerStart=delimStart;innerStart=delimEnd;} ++openTokens;}else if(rightMatch&&openTokens){if(!--openTokens){if(vN){if(vN[0]&&outerStart>lastOuterEnd){output.push(row(vN[0],str.slice(lastOuterEnd,outerStart),lastOuterEnd,outerStart));} if(vN[1]){output.push(row(vN[1],str.slice(outerStart,innerStart),outerStart,innerStart));} if(vN[2]){output.push(row(vN[2],str.slice(innerStart,delimStart),innerStart,delimStart));} if(vN[3]){output.push(row(vN[3],str.slice(delimStart,delimEnd),delimStart,delimEnd));}}else{output.push(str.slice(innerStart,delimStart));} lastOuterEnd=delimEnd;if(!global){break;}}}else{throw new Error('Unbalanced delimiter found in string');} if(delimStart===delimEnd){++delimEnd;}} if(global&&!sticky&&vN&&vN[0]&&str.length>lastOuterEnd){output.push(row(vN[0],str.slice(lastOuterEnd),lastOuterEnd,str.length));} return output;};};},{}],3:[function(require,module,exports){module.exports=function(XRegExp){'use strict';var unicode={};var dec=XRegExp._dec;var hex=XRegExp._hex;var pad4=XRegExp._pad4;function normalize(name){return name.replace(/[- _]+/g,'').toLowerCase();} function charCode(chr){var esc=/^\\[xu](.+)/.exec(chr);return esc?dec(esc[1]):chr.charCodeAt(chr.charAt(0)==='\\'?1:0);} function invertBmp(range){var output='';var lastEnd=-1;XRegExp.forEach(range,/(\\x..|\\u....|\\?[\s\S])(?:-(\\x..|\\u....|\\?[\s\S]))?/,function(m){var start=charCode(m[1]);if(start>(lastEnd+1)){output+='\\u'+pad4(hex(lastEnd+1));if(start>(lastEnd+2)){output+='-\\u'+pad4(hex(start-1));}} lastEnd=charCode(m[2]||m[1]);});if(lastEnd<0xFFFF){output+='\\u'+pad4(hex(lastEnd+1));if(lastEnd<0xFFFE){output+='-\\uFFFF';}} return output;} function cacheInvertedBmp(slug){var prop='b!';return(unicode[slug][prop]||(unicode[slug][prop]=invertBmp(unicode[slug].bmp)));} function buildAstral(slug,isNegated){var item=unicode[slug];var combined='';if(item.bmp&&!item.isBmpLast){combined='['+item.bmp+']'+(item.astral?'|':'');} if(item.astral){combined+=item.astral;} if(item.isBmpLast&&item.bmp){combined+=(item.astral?'|':'')+'['+item.bmp+']';} return isNegated?'(?:(?!'+combined+')(?:[\uD800-\uDBFF][\uDC00-\uDFFF]|[\0-\uFFFF]))':'(?:'+combined+')';} function cacheAstral(slug,isNegated){var prop=isNegated?'a!':'a=';return(unicode[slug][prop]||(unicode[slug][prop]=buildAstral(slug,isNegated)));} XRegExp.addToken(/\\([pP])(?:{(\^?)([^}]*)}|([A-Za-z]))/,function(match,scope,flags){var ERR_DOUBLE_NEG='Invalid double negation ';var ERR_UNKNOWN_NAME='Unknown Unicode token ';var ERR_UNKNOWN_REF='Unicode token missing data ';var ERR_ASTRAL_ONLY='Astral mode required for Unicode token ';var ERR_ASTRAL_IN_CLASS='Astral mode does not support Unicode tokens within character classes';var isNegated=match[1]==='P'||!!match[2];var isAstralMode=flags.indexOf('A')>-1;var slug=normalize(match[4]||match[3]);var item=unicode[slug];if(match[1]==='P'&&match[2]){throw new SyntaxError(ERR_DOUBLE_NEG+match[0]);} if(!unicode.hasOwnProperty(slug)){throw new SyntaxError(ERR_UNKNOWN_NAME+match[0]);} if(item.inverseOf){slug=normalize(item.inverseOf);if(!unicode.hasOwnProperty(slug)){throw new ReferenceError(ERR_UNKNOWN_REF+match[0]+' -> '+item.inverseOf);} item=unicode[slug];isNegated=!isNegated;} if(!(item.bmp||isAstralMode)){throw new SyntaxError(ERR_ASTRAL_ONLY+match[0]);} if(isAstralMode){if(scope==='class'){throw new SyntaxError(ERR_ASTRAL_IN_CLASS);} return cacheAstral(slug,isNegated);} return scope==='class'?(isNegated?cacheInvertedBmp(slug):item.bmp):(isNegated?'[^':'[')+item.bmp+']';},{scope:'all',optionalFlags:'A',leadChar:'\\'});XRegExp.addUnicodeData=function(data){var ERR_NO_NAME='Unicode token requires name';var ERR_NO_DATA='Unicode token has no character data ';var item;for(var i=0;i-1?['\\s',lineCommentPattern,inlineCommentPattern]:[inlineCommentPattern];return nativ.test.call(new RegExp('^(?:'+patternsToIgnore.join('|')+')*(?:'+needlePattern+')'),pattern.slice(pos));} function isType(value,type){return toString.call(value)==='[object '+type+']';} function pad4(str){while(str.length<4){str='0'+str;} return str;} function prepareFlags(pattern,flags){var i;if(clipDuplicates(flags)!==flags){throw new SyntaxError('Invalid duplicate regex flag '+flags);} pattern=nativ.replace.call(pattern,/^\(\?([\w$]+)\)/,function($0,$1){if(nativ.test.call(/[gy]/,$1)){throw new SyntaxError('Cannot use flag g or y in mode modifier '+$0);} flags=clipDuplicates(flags+$1);return'';});for(i=0;i';}}else if(backref){return'\\'+(+backref+numPriorCaptures);} return match;} if(!(isType(patterns,'Array')&&patterns.length)){throw new TypeError('Must provide a nonempty array of patterns to merge');} var parts=/(\()(?!\?)|\\([1-9]\d*)|\\[\s\S]|\[(?:[^\\\]]|\\[\s\S])*\]/g;var output=[];var pattern;for(var i=0;i1&&indexOf(match,'')>-1){r2=copyRegex(this,{removeG:true,isInternalOnly:true});nativ.replace.call(String(str).slice(match.index),r2,function(){var len=arguments.length;var i;for(i=1;imatch.index)){this.lastIndex=match.index;}} if(!this.global){this.lastIndex=origLastIndex;} return match;};fixed.test=function(str){return!!fixed.exec.call(this,str);};fixed.match=function(regex){var result;if(!XRegExp.isRegExp(regex)){regex=new RegExp(regex);}else if(regex.global){result=nativ.match.apply(this,arguments);regex.lastIndex=0;return result;} return fixed.exec.call(regex,toObject(this));};fixed.replace=function(search,replacement){var isRegex=XRegExp.isRegExp(search);var origLastIndex;var captureNames;var result;if(isRegex){if(search[REGEX_DATA]){captureNames=search[REGEX_DATA].captureNames;} origLastIndex=search.lastIndex;}else{search+='';} if(isType(replacement,'Function')){result=nativ.replace.call(String(this),search,function(){var args=arguments;var i;if(captureNames){args[0]=new String(args[0]);for(i=0;iargs.length-3){throw new SyntaxError('Backreference to undefined group '+$0);} return args[$2]||'';} throw new SyntaxError('Invalid token '+$0);});});} if(isRegex){if(search.global){search.lastIndex=0;}else{search.lastIndex=origLastIndex;}} return result;};fixed.split=function(separator,limit){if(!XRegExp.isRegExp(separator)){return nativ.split.apply(this,arguments);} var str=String(this);var output=[];var origLastIndex=separator.lastIndex;var lastLastIndex=0;var lastLength;limit=(limit===undefined?-1:limit)>>>0;XRegExp.forEach(str,separator,function(match){if((match.index+match[0].length)>lastLastIndex){output.push(str.slice(lastLastIndex,match.index));if(match.length>1&&match.indexlimit?output.slice(0,limit):output;};XRegExp.addToken(/\\([ABCE-RTUVXYZaeg-mopqyz]|c(?![A-Za-z])|u(?![\dA-Fa-f]{4}|{[\dA-Fa-f]+})|x(?![\dA-Fa-f]{2}))/,function(match,scope){if(match[1]==='B'&&scope===defaultScope){return match[0];} throw new SyntaxError('Invalid escape '+match[0]);},{scope:'all',leadChar:'\\'});XRegExp.addToken(/\\u{([\dA-Fa-f]+)}/,function(match,scope,flags){var code=dec(match[1]);if(code>0x10FFFF){throw new SyntaxError('Invalid Unicode code point '+match[0]);} if(code<=0xFFFF){return'\\u'+pad4(hex(code));} if(hasNativeU&&flags.indexOf('u')>-1){return match[0];} throw new SyntaxError('Cannot use Unicode code point above \\u{FFFF} without flag u');},{scope:'all',leadChar:'\\'});XRegExp.addToken(/\[(\^?)\]/,function(match){return match[1]?'[\\s\\S]':'\\b\\B';},{leadChar:'['});XRegExp.addToken(/\(\?#[^)]*\)/,getContextualTokenSeparator,{leadChar:'('});XRegExp.addToken(/\s+|#[^\n]*\n?/,getContextualTokenSeparator,{flag:'x'});XRegExp.addToken(/\./,function(){return'[\\s\\S]';},{flag:'s',leadChar:'.'});XRegExp.addToken(/\\k<([\w$]+)>/,function(match){var index=isNaN(match[1])?(indexOf(this.captureNames,match[1])+1):+match[1];var endIndex=match.index+match[0].length;if(!index||index>this.captureNames.length){throw new SyntaxError('Backreference to undefined group '+match[0]);} return'\\'+index+(endIndex===match.input.length||isNaN(match.input.charAt(endIndex))?'':'(?:)');},{leadChar:'\\'});XRegExp.addToken(/\\(\d+)/,function(match,scope){if(!(scope===defaultScope&&/^[1-9]/.test(match[1])&&+match[1]<=this.captureNames.length)&&match[1]!=='0'){throw new SyntaxError('Cannot use octal escape or backreference to undefined group '+ match[0]);} return match[0];},{scope:'all',leadChar:'\\'});XRegExp.addToken(/\(\?P?<([\w$]+)>/,function(match){if(!isNaN(match[1])){throw new SyntaxError('Cannot use integer as capture name '+match[0]);} if(match[1]==='length'||match[1]==='__proto__'){throw new SyntaxError('Cannot use reserved word as capture name '+match[0]);} if(indexOf(this.captureNames,match[1])>-1){throw new SyntaxError('Cannot use same name for multiple groups '+match[0]);} this.captureNames.push(match[1]);this.hasNamedCapture=true;return'(';},{leadChar:'('});XRegExp.addToken(/\((?!\?)/,function(match,scope,flags){if(flags.indexOf('n')>-1){return'(?:';} this.captureNames.push(null);return'(';},{optionalFlags:'n',leadChar:'('});module.exports=XRegExp;},{}]},{},[8])(8)});;