1!function(){"use strict";var t="object"==typeof global&&global&&global.Object===Object&&global,e="object"==typeof self&&self&&self.Object===Object&&self,i=t||e||Function("return this")(),s=i.Symbol,n=Object.prototype,o=n.hasOwnProperty,r=n.toString,a=s?s.toStringTag:void 0;var l=Object.prototype.toString;var h=s?s.toStringTag:void 0;function c(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":h&&h in Object(t)?function(t){var e=o.call(t,a),i=t[a];try{t[a]=void 0;var s=!0}catch(t){}var n=r.call(t);return s&&(e?t[a]=i:delete t[a]),n}(t):function(t){return l.call(t)}(t)}function d(t){return null!=t&&"object"==typeof t}function u(t){return"symbol"==typeof t||d(t)&&"[object Symbol]"==c(t)}function p(t,e){for(var i=-1,s=null==t?0:t.length,n=Array(s);++i<s;)n[i]=e(t[i],i,t);return n}var m=Array.isArray,f=s?s.prototype:void 0,g=f?f.toString:void 0;function v(t){if("string"==typeof t)return t;if(m(t))return p(t,v)+"";if(u(t))return g?g.call(t):"";var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e}var b=/\s/;var w=/^\s+/;function y(t){return t?t.slice(0,function(t){for(var e=t.length;e--&&b.test(t.charAt(e)););return e}(t)+1).replace(w,""):t}function x(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var E=/^[-+]0x[0-9a-f]+$/i,_=/^0b[01]+$/i,C=/^0o[0-7]+$/i,T=parseInt;function I(t){if("number"==typeof t)return t;if(u(t))return NaN;if(x(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=x(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=y(t);var i=_.test(t);return i||C.test(t)?T(t.slice(2),i?2:8):E.test(t)?NaN:+t}function S(t){return t}function k(t){if(!x(t))return!1;var e=c(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}var A,P=i["__core-js_shared__"],j=(A=/[^.]+$/.exec(P&&P.keys&&P.keys.IE_PROTO||""))?"Symbol(src)_1."+A:"";var O=Function.prototype.toString;function M(t){if(null!=t){try{return O.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var H=/^\[object .+?Constructor\]$/,z=Function.prototype,W=Object.prototype,R=z.toString,$=W.hasOwnProperty,D=RegExp("^"+R.call($).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function F(t){return!(!x(t)||function(t){return!!j&&j in t}(t))&&(k(t)?D:H).test(M(t))}function N(t,e){var i=function(t,e){return null==t?void 0:t[e]}(t,e);return F(i)?i:void 0}var U=N(i,"WeakMap");function B(t,e,i){switch(i.length){case 0:return t.call(e);case 1:return t.call(e,i[0]);case 2:return t.call(e,i[0],i[1]);case 3:return t.call(e,i[0],i[1],i[2])}return t.apply(e,i)}var q=Date.now;function V(t){return function(){return t}}var X=function(){try{var t=N(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),Z=X,J=Z?function(t,e){return Z(t,"toString",{configurable:!0,enumerable:!1,value:V(e),writable:!0})}:S,G=function(t){var e=0,i=0;return function(){var s=q(),n=16-(s-i);if(i=s,0<n){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(J),Y=G;function K(t){return t!=t}function Q(t,e,i){return e==e?function(t,e,i){for(var s=i-1,n=t.length;++s<n;)if(t[s]===e)return s;return-1}(t,e,i):function(t,e,i,s){for(var n=t.length,o=i+(s?1:-1);s?o--:++o<n;)if(e(t[o],o,t))return o;return-1}(t,K,i)}var tt=/^(?:0|[1-9]\d*)$/;function et(t,e){var i=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==i||"symbol"!=i&&tt.test(t))&&-1<t&&0==t%1&&t<e}function it(t,e){return t===e||t!=t&&e!=e}var st=Math.max;function nt(t){return"number"==typeof t&&-1<t&&0==t%1&&t<=9007199254740991}function ot(t){return null!=t&&nt(t.length)&&!k(t)}var rt=Object.prototype;function at(t){return d(t)&&"[object Arguments]"==c(t)}var lt=Object.prototype,ht=lt.hasOwnProperty,ct=lt.propertyIsEnumerable,dt=at(function(){return arguments}())?at:function(t){return d(t)&&ht.call(t,"callee")&&!ct.call(t,"callee")},ut=dt;var pt="object"==typeof exports&&exports&&!exports.nodeType&&exports,mt=pt&&"object"==typeof module&&module&&!module.nodeType&&module,ft=mt&&mt.exports===pt?i.Buffer:void 0,gt=(ft?ft.isBuffer:void 0)||function(){return!1},vt={};function bt(t){return function(e){return t(e)}}
1vt["[object Float32Array]"]=vt["[object Float64Array]"]=vt["[object Int8Array]"]=vt["[object Int16Array]"]=vt["[object Int32Array]"]=vt["[object Uint8Array]"]=vt["[object Uint8ClampedArray]"]=vt["[object Uint16Array]"]=vt["[object Uint32Array]"]=!0,vt["[object Arguments]"]=vt["[object Array]"]=vt["[object ArrayBuffer]"]=vt["[object Boolean]"]=vt["[object DataView]"]=vt["[object Date]"]=vt["[object Error]"]=vt["[object Function]"]=vt["[object Map]"]=vt["[object Number]"]=vt["[object Object]"]=vt["[object RegExp]"]=vt["[object Set]"]=vt["[object String]"]=vt["[object WeakMap]"]=!1;var wt="object"==typeof exports&&exports&&!exports.nodeType&&exports,yt=wt&&"object"==typeof module&&module&&!module.nodeType&&module,xt=yt&&yt.exports===wt&&t.process,Et=function(){try{var t=yt&&yt.require&&yt.require("util").types;return t||xt&&xt.binding&&xt.binding("util")}catch(t){}}(),Lt=Et&&Et.isTypedArray,_t=Lt?bt(Lt):function(t){return d(t)&&nt(t.length)&&!!vt[c(t)]},Ct=_t,Tt=Object.prototype.hasOwnProperty;function It(t,e){var i=m(t),s=!i&&ut(t),n=!i&&!s&>(t),o=!i&&!s&&!n&&Ct(t),r=i||s||n||o,a=r?function(t,e){for(var i=-1,s=Array(t);++i<t;)s[i]=e(i);return s}(t.length,String):[],l=a.length;for(var h in t)(e||Tt.call(t,h))&&(!r||!("length"==h||n&&("offset"==h||"parent"==h)||o&&("buffer"==h||"byteLength"==h||"byteOffset"==h)||et(h,l)))&&a.push(h);return a}var St=function(t,e){return function(i){return t(e(i))}}(Object.keys,Object),kt=St,At=Object.prototype.hasOwnProperty;function Pt(t){if(!function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||rt)}(t))return kt(t);var e=[];for(var i in Object(t))At.call(t,i)&&"constructor"!=i&&e.push(i);return e}function jt(t){return ot(t)?It(t):Pt(t)}var Ot=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Mt=/^\w*$/;function Ht(t,e){if(m(t))return!1;var i=typeof t;return!("number"!=i&&"symbol"!=i&&"boolean"!=i&&null!=t&&!u(t))||Mt.test(t)||!Ot.test(t)||null!=e&&t in Object(e)}var zt=N(Object,"create");var Wt=Object.prototype.hasOwnProperty;var Rt=Object.prototype.hasOwnProperty;function $t(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var s=t[e];this.set(s[0],s[1])}}function Dt(t,e){for(var i=t.length;i--;)if(it(t[i][0],e))return i;return-1}$t.prototype.clear=function(){this.__data__=zt?zt(null):{},this.size=0},$t.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},$t.prototype.get=function(t){var e=this.__data__;if(zt){var i=e[t];return"__lodash_hash_undefined__"===i?void 0:i}return Wt.call(e,t)?e[t]:void 0},$t.prototype.has=function(t){var e=this.__data__;return zt?void 0!==e[t]:Rt.call(e,t)},$t.prototype.set=function(t,e){var i=this.__data__;return this.size+=this.has(t)?0:1,i[t]=zt&&void 0===e?"__lodash_hash_undefined__":e,this};var Ft=Array.prototype.splice;function Nt(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var s=t[e];this.set(s[0],s[1])}}Nt.prototype.clear=function(){this.__data__=[],this.size=0},Nt.prototype.delete=function(t){var e=this.__data__,i=Dt(e,t);return!(0>i)&&(i==e.length-1?e.pop():Ft.call(e,i,1),--this.size,!0)},Nt.prototype.get=function(t){var e=this.__data__,i=Dt(e,t);return 0>i?void 0:e[i][1]},Nt.prototype.has=function(t){return-1<Dt(this.__data__,t)},Nt.prototype.set=function(t,e){var i=this.__data__,s=Dt(i,t);return 0>s?(++this.size,i.push([t,e])):i[s][1]=e,this};var Ut=N(i,"Map");function Bt(t,e){var i=t.__data__;return function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}(e)?i["string"==typeof e?"string":"hash"]:i.map}function qt(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var s=t[e];this.set(s[0],s[1])}}qt.prototype.clear=function(){this.size=0,this.__data__={hash:new $t,map:new(Ut||Nt),string:new $t}},qt.prototype.delete=function(t){var e=Bt(this,t).delete(t);return this.size-=e?1:0,e},qt.prototype.get=function(t){return Bt(this,t).get(t)},qt.prototype.has=function(t){return Bt(this,t).has(t)},qt.prototype.set=function(t,e){var i=Bt(this,t),s=i.size;return i.set(t,e),this.size+=i.size==s?0:1,this};function Vt(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var i=function(){var s=arguments,n=e?e.apply(this,s):s[0],o=i.cache;if(o.has(n))return o.get(n);var r=t.apply(this,s);return i.cache=o.set(n,r)||o,r};return i.cache=new(Vt.Cache||qt),i}Vt.Cache=qt;var Xt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Zt=/\\(\\)?/g,Jt=function(t){var e=Vt(t,(function(t){return 500===i.size&&i.clear(),t})),i=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Xt,(function(t,i,s,n){e.push(s?n.replace(Zt,"$1"):i||t)})),e})),Gt=Jt;function Yt(t){return null==t?"":v(t)}function Kt(t,e){return m(t)?t:Ht(t,e)?[t]:Gt(Yt(t))}function Qt(t){if("string"==typeof t||u(t))return t;var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e}function te(t,e){for(var i=0,s=(e=Kt(e,t)).length;null!=t&&i<s;)t=t[Qt(e[i++])];return i&&i==s?t:void 0}function ee(t){var e=this.__data__=new Nt(t);this.size=e.size}ee.prototype.clear=function(){this.__data__=new Nt,this.size=0},ee.prototype.delete=function(t){var e=this.__data__,i=e.delete(t);return this.size=e.size,i},ee.prototype.get=function(t){return this.__data__.get(t)},ee.prototype.has=function(t){return this.__data__.has(t)},ee.prototype.set=function(t,e){var i=this.__data__;if(i instanceof Nt){var s=i.__data__;if(!Ut||199>s.length)return s.push([t,e]),this.size=++i.size,this;i=this.__data__=new qt(s)}return i.set(t,e),this.size=i.size,this};var ie=Object.prototype.propertyIsEnumerable,se=Object.getOwnPropertySymbols,ne=se?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var i=-1,s=null==t?0:t.length,n=0,o=[];++i<s;){var r=t[i];e(r,i,t)&&(o[n++]=r)}return o}(se(t),(function(e){return ie.call(t,e)})))}:function(){return[]},oe=ne;
1function re(t){return function(t,e,i){var s=e(t);return m(t)?s:function(t,e){for(var i=-1,s=e.length,n=t.length;++i<s;)t[n+i]=e[i];return t}(s,i(t))}(t,jt,oe)}var ae=N(i,"DataView"),le=N(i,"Promise"),he=N(i,"Set"),ce="[object DataView]",de=M(ae),ue=M(Ut),pe=M(le),me=M(he),fe=M(U),ge=c;(ae&&ge(new ae(new ArrayBuffer(1)))!=ce||Ut&&"[object Map]"!=ge(new Ut)||le&&"[object Promise]"!=ge(le.resolve())||he&&"[object Set]"!=ge(new he)||U&&"[object WeakMap]"!=ge(new U))&&(ge=function(t){var e=c(t),i="[object Object]"==e?t.constructor:void 0,s=i?M(i):"";if(s)switch(s){case de:return ce;case ue:return"[object Map]";case pe:return"[object Promise]";case me:return"[object Set]";case fe:return"[object WeakMap]"}return e});var ve=ge,be=i.Uint8Array;function we(t){var e=-1,i=null==t?0:t.length;for(this.__data__=new qt;++e<i;)this.add(t[e])}function ye(t,e){for(var i=-1,s=null==t?0:t.length;++i<s;)if(e(t[i],i,t))return!0;return!1}function xe(t,e){return t.has(e)}we.prototype.add=we.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},we.prototype.has=function(t){return this.__data__.has(t)};function Ee(t,e,i,s,n,o){var r=1&i,a=t.length,l=e.length;if(a!=l&&!(r&&l>a))return!1;var h=o.get(t),c=o.get(e);if(h&&c)return h==e&&c==t;var d=-1,u=!0,p=2&i?new we:void 0;for(o.set(t,e),o.set(e,t);++d<a;){var m=t[d],f=e[d];if(s)var g=r?s(f,m,d,e,t,o):s(m,f,d,t,e,o);if(void 0!==g){if(g)continue;u=!1;break}if(p){if(!ye(e,(function(t,e){if(!xe(p,e)&&(m===t||n(m,t,i,s,o)))return p.push(e)}))){u=!1;break}}else if(m!==f&&!n(m,f,i,s,o)){u=!1;break}}return o.delete(t),o.delete(e),u}function Le(t){var e=-1,i=Array(t.size);return t.forEach((function(t,s){i[++e]=[s,t]})),i}function _e(t){var e=-1,i=Array(t.size);return t.forEach((function(t){i[++e]=t})),i}var Ce=s?s.prototype:void 0,Te=Ce?Ce.valueOf:void 0;var Ie=Object.prototype.hasOwnProperty;var Se="[object Arguments]",ke="[object Array]",Ae="[object Object]",Pe=Object.prototype.hasOwnProperty;function je(t,e,i,s,n,o){var r=m(t),a=m(e),l=r?ke:ve(t),h=a?ke:ve(e),c=(l=l==Se?Ae:l)==Ae,d=(h=h==Se?Ae:h)==Ae,u=l==h;if(u&>(t)){if(!gt(e))return!1;r=!0,c=!1}if(u&&!c)return o||(o=new ee),r||Ct(t)?Ee(t,e,i,s,n,o):function(t,e,i,s,n,o,r){switch(i){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!o(new be(t),new be(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return it(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var a=Le;case"[object Set]":var l=1&s;if(a||(a=_e),t.size!=e.size&&!l)return!1;var h=r.get(t);if(h)return h==e;s|=2,r.set(t,e);var c=Ee(a(t),a(e),s,n,o,r);return r.delete(t),c;case"[object Symbol]":if(Te)return Te.call(t)==Te.call(e)}return!1}(t,e,l,i,s,n,o);if(!(1&i)){var p=c&&Pe.call(t,"__wrapped__"),f=d&&Pe.call(e,"__wrapped__");
1if(p||f){var g=p?t.value():t,v=f?e.value():e;return o||(o=new ee),n(g,v,i,s,o)}}return!!u&&(o||(o=new ee),function(t,e,i,s,n,o){var r=1&i,a=re(t),l=a.length;if(l!=re(e).length&&!r)return!1;for(var h,c=l;c--;)if(h=a[c],r?!(h in e):!Ie.call(e,h))return!1;var d=o.get(t),u=o.get(e);if(d&&u)return d==e&&u==t;var p=!0;o.set(t,e),o.set(e,t);for(var m=r;++c<l;){var f=t[h=a[c]],g=e[h];if(s)var v=r?s(g,f,h,e,t,o):s(f,g,h,t,e,o);if(void 0===v?f!==g&&!n(f,g,i,s,o):!v){p=!1;break}m||(m="constructor"==h)}if(p&&!m){var b=t.constructor,w=e.constructor;b!=w&&"constructor"in t&&"constructor"in e&&!("function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w)&&(p=!1)}return o.delete(t),o.delete(e),p}(t,e,i,s,n,o))}function Oe(t,e,i,s,n){return!(t!==e)||(null!=t&&null!=e&&(d(t)||d(e))?je(t,e,i,s,Oe,n):t!=t&&e!=e)}function Me(t){return t==t&&!x(t)}function He(t,e){return function(i){return null!=i&&i[t]===e&&(void 0!==e||t in Object(i))}}function ze(t){var e=function(t){for(var e=jt(t),i=e.length;i--;){var s=e[i],n=t[s];e[i]=[s,n,Me(n)]}return e}(t);return 1==e.length&&e[0][2]?He(e[0][0],e[0][1]):function(i){return i===t||function(t,e,i,s){var n=i.length,o=n,r=!s;if(null==t)return!o;for(t=Object(t);n--;){var a=i[n];if(r&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++n<o;){var l=(a=i[n])[0],h=t[l],c=a[1];if(r&&a[2]){if(void 0===h&&!(l in t))return!1}else{var d=new ee;if(s)var u=s(h,c,l,t,e,d);if(void 0===u?!Oe(c,h,3,s,d):!u)return!1}}return!0}(i,t,e)}}function We(t,e){return null!=t&&e in Object(t)}function Re(t,e){return null!=t&&function(t,e,i){for(var s,n=-1,o=(e=Kt(e,t)).length,r=!1;++n<o&&(s=Qt(e[n]),r=null!=t&&i(t,s));)t=t[s];return r||++n!=o?r:!!(o=null==t?0:t.length)&&nt(o)&&et(s,o)&&(m(t)||ut(t))}(t,e,We)}function $e(t,e){return Ht(t)&&Me(e)?He(Qt(t),e):function(i){var s=function(t,e,i){var s=null==t?void 0:te(t,e);return void 0===s?i:s}(i,t);return void 0===s&&s===e?Re(i,t):Oe(e,s,3)}}function De(t){return Ht(t)?function(t){return function(e){return null==e?void 0:e[t]}}(Qt(t)):function(t){return function(e){return te(e,t)}}(t)}var Fe=function(t){return function(e,i,s){for(var n=-1,o=Object(e),r=s(e),a=r.length;a--;){var l=r[t?a:++n];if(!1===i(o[l],l,o))break}return e}}(),Ne=Fe;var Ue=function(t,e){return function(i,s){if(null==i)return i;if(!ot(i))return t(i,s);for(var n=i.length,o=e?n:-1,r=Object(i);(e?o--:++o<n)&&!1!==s(r[o],o,r););return i}}((function(t,e){return t&&Ne(t,e,jt)})),Be=Ue,qe=function(){return i.Date.now()},Ve=Math.max,Xe=Math.min;function Ze(t,e,i){function s(e){var i=h,s=c;return h=c=void 0,f=e,u=t.apply(s,i)}function n(t){return f=t,p=setTimeout(r,e),g?s(t):u}function o(t){var i=t-m;return void 0===m||i>=e||0>i||v&&t-f>=d}function r(){var t=qe();return o(t)?a(t):void(p=setTimeout(r,function(t){var i=e-(t-m);return v?Xe(i,d-(t-f)):i}(t)))}function a(t){return p=void 0,b&&h?s(t):(h=c=void 0,u)}function l(){var t=qe(),i=o(t);if(h=arguments,c=this,m=t,i){if(void 0===p)return n(m);if(v)return clearTimeout(p),p=setTimeout(r,e),s(m)}return void 0===p&&(p=setTimeout(r,e)),u}var h,c,d,u,p,m,f=0,g=!1,v=!1,b=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return e=I(e)||0,x(i)&&(g=!!i.leading,d=(v="maxWait"in i)?Ve(I(i.maxWait)||0,e):d,b="trailing"in i?!!i.trailing:b),l.cancel=function(){void 0!==p&&clearTimeout(p),f=0,h=m=c=p=void 0},l.flush=function(){return void 0===p?u:a(qe())},l}var Je=function(t){return function(e){return null==t?void 0:t[e]}}({"&":"&","<":"<",">":">",'"':""","'":"'"}),Ge=Je,Ye=/[&<>"']/g,Ke=RegExp(Ye.source);function Qe(t){return(t=Yt(t))&&Ke.test(t)?t.replace(Ye,Ge):t}function ti(t,e){var i=-1,s=ot(t)?Array(t.length):[];return Be(t,(function(t,n,o){s[++i]=e(t,n,o)})),s}function ei(t,e){return(m(t)?p:ti)(t,function(t){return"function"==typeof t?t:null==t?S:"object"==typeof t?m(t)?$e(t[0],t[1]):ze(t):De(t)}(e))}function ii(t){return"string"==typeof t||!m(t)&&d(t)&&"[object String]"==c(t)}function si(t,e,i,s){for(var n=i-1,o=t.length;++n<o;)if(s(t[n],e))return n;return-1}var ni=Array.prototype.splice;function oi(t,e,i,s){var n=s?si:Q,o=-1,r=e.length,a=t;for(t===e&&(e=function(t,e){var i=-1,s=t.length;for(e||(e=Array(s));++i<s;)e[i]=t[i];return e}(e)),i&&(a=p(t,bt(i)));++o<r;)for(var l=0,h=e[o],c=i?i(h):h;-1<(l=n(a,c,l,s));)a!==t&&ni.call(a,l,1),ni.call(t,l,1);return t}
1var ri=function(t,e){return Y(function(t,e,i){return e=st(void 0===e?t.length-1:e,0),function(){for(var s=arguments,n=-1,o=st(s.length-e,0),r=Array(o);++n<o;)r[n]=s[e+n];n=-1;for(var a=Array(e+1);++n<e;)a[n]=s[n];return a[e]=i(r),B(t,this,a)}}(t,e,S),t+"")}((function(t,e){return t&&t.length&&e&&e.length?oi(t,e):t})),ai=ri;function li(t,e,i){var s=!0,n=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return x(i)&&(s="leading"in i?!!i.leading:s,n="trailing"in i?!!i.trailing:n),Ze(t,e,{leading:s,maxWait:e,trailing:n})}function hi(t){let e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;return null===e?window.getComputedStyle(t):window.getComputedStyle(t).getPropertyValue(e)}function ci(t){return t instanceof NodeList||t instanceof HTMLCollection||t instanceof Array&&t.every((t=>t instanceof Element))}function di(t,e){ci(t)?t.forEach((t=>{t.classList&&t.classList.add(e)})):t instanceof Element&&t.classList.add(e)}function ui(t,e){ci(t)?t.forEach((t=>{t.classList&&t.classList.remove(e)})):t instanceof Element&&t.classList.remove(e)}function pi(t,e,i){return ci(t)?t.forEach((t=>{t.setAttribute(e,i)})):t instanceof Element&&t.setAttribute(e,i),t}function mi(t,e){return ci(t)?t.forEach((t=>{t.removeAttribute(e)})):t instanceof Element&&t.removeAttribute(e),t}function fi(t){const e=t.toString().match(/^(?<eventType>[a-z]+):relay[(](?<selector>.+)[)]$/i)?.groups;return e&&e.eventType&&e.selector?e:null}function gi(t,e,i){let s=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{};const n=fi(e);if(console.log("addDelegatedEvent",n),n&&n.eventType&&n.selector){const o=Fi(i,n.selector,!0);t.__cowtoolsRelayedEvents=t.__cowtoolsRelayedEvents||[],t.__cowtoolsRelayedEvents[e]=t.__cowtoolsRelayedEvents[e]||[],t.__cowtoolsRelayedEvents[e].push([i,o]),t.addEventListener(n.eventType,o,s)}return t}function vi(t,e,i){let s=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{};const n=fi(e);return n&&n.eventType,n.selector&&t.__cowtoolsRelayedEvents&&t.__cowtoolsRelayedEvents[e]&&t.__cowtoolsRelayedEvents[e].forEach(((e,o)=>{e[0]===i&&t.removeEventListener(n.eventType,e[1],s),t.__cowtoolsRelayedEvents.splice(o,1)})),t}function bi(t,e,i){let s=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{};const n=fi(e);return ii(t)&&(t=document.getElementById(t)),n?ci(t)?t.forEach((t=>{gi(t,e,i,s)})):t instanceof EventTarget&&gi(t,e,i,s):ci(t)?t.forEach((t=>{t.addEventListener(e,i,s)})):t instanceof EventTarget&&t.addEventListener(e,i,s),t}function wi(t,e,i){let s=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{};const n=fi(e);return n?ci(t)?t.forEach((t=>{vi(t,e,i,s)})):t instanceof EventTarget&&vi(t,e,i,s):ci(t)?t.forEach((t=>{t.removeEventListener(e,i,s)})):t instanceof EventTarget&&t.removeEventListener(e,i,s),t}function yi(t,e,i){if(ci(t))for(const s of t)s.style.setProperty(e,i);else t instanceof Element&&t.style.setProperty(e,i);return t}function xi(t){let e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},i=!!(2<arguments.length&&void 0!==arguments[2])&&arguments[2];if(ci(t))for(const s of t)for(const t in e)s.style.setProperty(t,e[t],i?"important":void 0);else if(t instanceof Element)for(const s in e)t.style.setProperty(s,e[s],i?"important":void 0);return t}function Ei(t){let e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if(ci(t))for(const i of t)for(const t in e)i.style.setProperty(t,null);else if(t instanceof Element)for(const i in e)t.style.setProperty(i,null);return t}function Li(t){return t instanceof Element||"children"in t?Array.from(t.children):[]}function _i(t,e){return ci(t)?Array.from(t).filter((t=>t.matches(e))):t instanceof DocumentFragment||t instanceof Document?Array.from(t.querySelectorAll(e)):Array.from(t.querySelectorAll(":scope "+e))}function Ci(t,e){return ci(t)?Array.from(t).find((t=>t.matches(e))):t instanceof Element?"~"==e[0]||"+"==e[0]?Pi(t,e.substring(1)):t.querySelector(":scope "+e):null}function Ti(t){const e=function(t,i){return null===t.parentNode?i:e(t.parentNode,i.concat([t]))};return e(t.parentNode,[])}function Ii(t,e){let i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"bottom";return e instanceof Element&&("bottom"===i||"inside"===i||0==e.children.length&&"top"==i?e.appendChild(t):"top"===i?e.insertBefore(t,e.firstElementChild):"after"===i?e.nextElementSibling?e.parentNode.insertBefore(t,e.nextElementSibling):e.parentNode.appendChild(t):"before"===i?e.parentNode.insertBefore(t,e):"around"===i&&Si(t,e)),t}function Si(t,e){return e.parentNode.insertBefore(t,e),t.appendChild(e),t}function ki(t){let e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;const i=Array.from(t.parentNode.children);return e?void i.filter((i=>i!==t&&i.matches(e))):i}function Ai(t){let e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;if(e)for(const i of t.parentNode.children)if(i!==t&&i.matches(e))return i;return null}function Pi(t,e){let i=Array.from(t.parentNode.children),s=i.indexOf(t);if(-1<s&&s<i.length-1){i=i.slice(s+1);for(const s of i)if(s!==t&&s.matches(e))return s}return null}function ji(t,e){let i=Array.from(t.parentNode.children),s=i.indexOf(t);if(0<s){i=i.slice(0,s),i.reverse();for(const s of i)if(s!==t&&s.matches(e))return s}return null}function Oi(t){return t.offsetHeight+t.offsetWidth}function Mi(t,e,i){return!t instanceof Number&&(t=parseInt(t)),Math.min(Math.max(t,e),i)}const Hi=function(t){if("none"!=hi(t,"display"))return function(){};const e=t.style.cssText;return t.style.display="block",t.style.visibility="hidden",t.style.margin=0,function(){this.style.cssText=e}.bind(t)};function zi(t){return Oi(t),function(t,e){if(!t||t.offsetHeight||t.offsetWidth)return e.call(t);for(var i=t.parentNode,s=[];i&&!i.offsetHeight&&!i.offsetWidth&&i!=document.body;)s.push(Hi(i)),i=i.parentNode;var n=Hi(t),o=e.call(t);
1return n(),s.forEach((function(t){t()})),o}(t,function(){const t=this,e=hi(this),i=t.getBoundingClientRect();return{width:Math.ceil(i.width),height:Math.ceil(i.height),scrollWidth:t.scrollWidth,scrollHeight:t.scrollHeight,boundingRect:i,margin:{top:e?parseInt(e.marginTop):0,right:e?parseInt(e.marginRight):0,bottom:e?parseInt(e.marginBottom):0,left:e?parseInt(e.marginLeft):0},padding:{top:e?parseInt(e.paddingTop):0,right:e?parseInt(e.paddingRight):0,bottom:e?parseInt(e.paddingBottom):0,left:e?parseInt(e.paddingLeft):0},border:{top:e?parseInt(e.borderTopWidth):0,right:e?parseInt(e.borderRightWidth):0,bottom:e?parseInt(e.borderBottomWidth):0,left:e?parseInt(e.borderLeftWidth):0}}}.bind(t))}function Wi(t){let{transitionDuration:e,transitionDelay:i}=hi(t);return e||i?(e=e.toString()==e?Math.max(...e.split(",").map(parseFloat)):parseFloat(e),i=e.toString()==e?Math.max(...i.split(",").map(parseFloat)):parseFloat(i),1e3*(e+i)):0}function Ri(t){const e=t.getBoundingClientRect();let i={top:0>e.top||e.top>(window.innerHeight||document.documentElement.clientHeight),bottom:0>e.bottom||e.bottom>(window.innerHeight||document.documentElement.clientHeight),left:0>e.left||e.left>(window.innerWidth||document.documentElement.clientWidth),right:0>e.right||e.right>(window.innerWidth||document.documentElement.clientWidth),bbox:e};return i.any=i.top||i.left||i.bottom||i.right,i.all=i.top&&i.bottom&&i.right&&i.left||0>e.bottom||e.top>(window.innerHeight||document.documentElement.clientHeight)||0>e.right||e.left>(window.innerHeight||document.documentElement.clientHeight),i}function $i(t,e,i){switch(e.offsetParent!==t.offsetParent&&e.offsetParent.appendChild(t),xi(t,{top:null,left:null,right:null,bottom:null,position:"absolute"}),Oi(t),i.toLowerCase()){case"top":xi(t,{left:e.offsetLeft-parseInt((t.offsetWidth-e.offsetWidth)/2)+"px",top:e.offsetTop-t.offsetHeight+"px"});break;case"top-start":xi(t,{left:e.offsetLeft+"px",top:e.offsetTop-t.offsetHeight+"px"});break;case"top-end":xi(t,{left:e.offsetLeft-(t.offsetWidth-e.offsetWidth)+"px",top:e.offsetTop-t.offsetHeight+"px"});break;case"bottom":xi(t,{left:e.offsetLeft-parseInt((t.offsetWidth-e.offsetWidth)/2)+"px",top:e.offsetTop+e.offsetHeight+"px"});break;case"bottom-start":xi(t,{left:e.offsetLeft+"px",top:e.offsetTop+e.offsetHeight+"px"});break;case"bottom-end":xi(t,{left:e.offsetLeft-(t.offsetWidth-e.offsetWidth)+"px",top:e.offsetTop+e.offsetHeight+"px"});break;case"right":xi(t,{left:e.offsetLeft+e.offsetWidth+"px",top:e.offsetTop-parseInt((t.offsetHeight-e.offsetHeight)/2)+"px"});break;case"right-start":xi(t,{left:e.offsetLeft+e.offsetWidth+"px",top:e.offsetTop+"px"});break;case"right-end":xi(t,{left:e.offsetLeft+e.offsetWidth+"px",top:e.offsetTop-(t.offsetHeight-e.offsetHeight)+"px"});break;case"left":xi(t,{left:e.offsetLeft-t.offsetWidth+"px",top:e.offsetTop-parseInt((t.offsetHeight-e.offsetHeight)/2)+"px"});break;case"left-start":xi(t,{left:e.offsetLeft-t.offsetWidth+"px",top:e.offsetTop+"px"});break;case"left-end":xi(t,{left:e.offsetLeft-t.offsetWidth+"px",top:e.offsetTop-(t.offsetHeight-e.offsetHeight)+"px"})}}function Di(){let t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"div",e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},s=3<arguments.length&&void 0!==arguments[3]?arguments[3]:"",n=document.createElement(t);return Object.keys(e).forEach((t=>{"class"==t.toLowerCase()||"classname"==t.toLowerCase()?n.className=e[t]:"text"==t.toLowerCase()||"innertext"==t.toLowerCase()?""==s&&(s=ts(e[t])):"html"==t.toLowerCase()||"innerhtml"==t.toLowerCase()?""==s&&(s=e[t]):null!==e[t]&&void 0!==e[t]&&n.setAttribute(t,e[t])}
1)),Object.keys(i).forEach((t=>n.style[t]=i[t])),""!=s&&(n.innerHTML=s),n}function Fi(t,e){let i=!(2<arguments.length&&void 0!==arguments[2])||arguments[2],s=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{stopPropagation:!1,preventDefault:!1};return function(){let n=this,o=Array.from(arguments),r=o&&o[0]&&o[0].target;if(!r.matches(e)){if(!i)return;r=r.closest(e)}r&&o[0]instanceof Event&&(s.stopPropagation&&o[0].stopPropagation(),s.preventDefault&&o[0].preventDefault(),o[0].delegateTarget=r,o.push(r),t.apply(n,o))}}function Ni(t){let e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if(!t)return e;if(t.matches('script[rel="setup"][type="application/json"]')||(t=Ci(t,'script[rel="setup"][type="application/json"]')),!t)return e;let i=t.textContent.trim();return t.remove(),Ui(i)||e}function Ui(t){if(ii(t)){if(""==t.trim())return{};try{return JSON.parse(t)}catch(e){return console.error("Unable to parse invalid JSON"),void console.trace(t)}}}function Bi(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]||window[t.charAt(0).toLowerCase()+t.slice(1)]}function qi(t,e){if(window.requestAnimationFrame)return window.requestAnimationFrame.call(window,t.bind(e));let i=Bi("RequestAnimationFrame")||function(){};return i===function(){}?(t.call(e),null):i.call(window,t.bind(e))}function Vi(t,e){return e?"+"==(e=e.trim())||"~"==e?t.nextElementSibling:"!+"==e||"!~"==e?t.previousElementSibling:"!~"==e.substring(0,2)?ji(t,e.substring(2)):"~"==e[0]?Pi(t,e.substring(1)):">"==e[0]?0<t.children.length?t.children.item(0):void 0:"<"==e[0]?t.closest(e.substring(1)):"+"==e[0]&&t.nextElementSibling.matches(e.substring(1))?t.nextElementSibling:"?"==e[0]?Ai(t,e.substring(1)):Ci(document.body,e):void 0}async function Xi(){let t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return await(await Zi(t,"GET",e,{Accept:"application/json"})).json()}async function Zi(){let t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"GET",i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null,s=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{"Content-Type":"application/json"},n=4<arguments.length&&void 0!==arguments[4]?arguments[4]:"cors",o=5<arguments.length&&void 0!==arguments[5]?arguments[5]:"same-origin";const r=["POST","GET"].includes(e.toUpperCase())?e.toUpperCase():"GET",a="GET"==e&&null!==i?`${t}?${is(i)}`:t,l=s,h=["cors","navigate","no-cors","same-origin"].includes(n.toLowerCase())?n.toLowerCase():"cors",c=["include","omit","same-origin"].includes(o.toLowerCase())?o.toLowerCase():"same-origin";(x(l)||m(l))&&(l["X-Requested-With"]="xmlhttprequest");const d={method:r,headers:l,mode:h,cache:"no-cache",credentials:c,redirect:"follow",referrerPolicy:"same-origin"};if("POST"==e&&null!==i)switch(s["Content-Type"]){case"multipart/form-data":d.body=rs(i);break;case"application/x-www-form-urlencoded":d.body=is(i);break;default:d.body=JSON.stringify(i)}return fetch(a,d)}function Ji(t){const e=t.toString().trim().match(/^([0-9.-]+)(cm|mm|Q|in|pc|pt|px|em|ex|ch|rem|lh|rlh|vw|vh|vmin|vmax|vb|vi|svw|svh|lvw|lvh|dvw|dvh|%|)$/);return null===e?null:{value:parseFloat(e[1]),unit:e[2]}}function Gi(t){let e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:document.body,i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"width";const s=Ji(t);if(null!==s){if(""==s.unit||"px"==s.unit)return s.value;if("%"==s.unit){return(e===document.body?document.body.innerWidth:zi(e)[i])*(s.value/100)}if("em"==s.unit||"rem"==s.unit)return s.value*parseInt(hi(e,"font-size"));if("vmin"==s.unit)return s.value/100*Math.min(window.innerWidth,window.innerHeight);if("vmax"==s.unit)return s.value/100*Math.max(window.innerWidth,window.innerHeight);if("vh"==s.unit||"dvh"==s.unit||"svh"==s.unit||"lvh"==s.unit)return s.value/100*window.innerHeight;if("vw"==s.unit||"dvw"==s.unit||"svw"==s.unit||"lvw"==s.unit)return s.value/100*window.innerWidth}let n=Di("span",{id:"__toPixelsElement"},{visibility:"hidden",position:"absolute","font-size":t});Ii(n,e,"bottom");const o=hi(n,"font-size");return e.removeChild(n),parseFloat(o)}async function Yi(t){let e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:document.body,i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;const s=Di("style",{id:i});return s.innerText=t,e.appendChild(s),s}function Ki(t){for(;t.firstChild;)t.removeChild(t.firstChild);return t}function Qi(t,e){let i=Di("div",{},{},e);return i.firstElementChild&&i.firstElementChild instanceof HTMLElement&&Ii(i.firstElementChild,t,"bottom"),i.remove(),i=null,i}function ts(t){var e={"&":"&","'":"'",'"':""","<":"<",">":">"};return t.replace(/[&<>'"]/g,(t=>e[t]||t))}function es(t,e,i){return function(t){return void 0===t}
1(i)&&(i=!0),m(e)?ei(e,(function(e,s){return es(i?s:t+"[]",e,!1)})).join("&"):x(e)?ei(e,(function(e,s){return es(i?s:t+"["+s+"]",e,!1)})).join("&"):encodeURIComponent(t)+"="+encodeURIComponent(e)}function is(t){return es("",t,void 0)}function ss(){return"ontouchstart"in window||0<navigator.maxTouchPoints||0<navigator.maxTouchPoints}function ns(){var t=window.devicePixelRatio,e={height:window.innerHeight||window.screen.height,width:window.innerWidth||window.screen.width};const i={viewport:{width:parseInt(window.innerWidth),height:parseInt(window.innerHeight),nativeWidth:parseInt(window.innerWidth*t),nativeHeight:parseInt(window.innerHeight*t),vmin:parseInt(Math.min(e.width,e.height)),vmax:parseInt(Math.max(e.width,e.height)),nativeVmin:parseInt(Math.min(e.width,e.height)*t),nativeVmax:parseInt(Math.max(e.width,e.height)*t)},window:{width:parseInt(window.outerWidth*t),height:parseInt(window.outerHeight*t)},screen:{pixelRatio:t,availWidth:parseInt(window.screen.availWidth*t),availHeight:parseInt(window.screen.availHeight*t),width:parseInt(window.screen.width*t),height:parseInt(window.screen.height*t)}};return i.window.toolbarHeight=i.window.height-i.viewport.nativeHeight,i}function os(t,e,i){if(!e||"object"!=typeof e||e instanceof Date||e instanceof File){const s=null==e?"":e;t.append(i,s)}else Object.keys(e).forEach((s=>{os(t,e[s],i?`${i}[${s}]`:s)}))}function rs(t){const e=new FormData;return os(e,t),e}async function as(t){let e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null,i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null,s=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;const n=["js","script","style","css","application/javascript","text/css"];if(null!==i&&!i instanceof HTMLElement)throw new DOMException("Invalid argument(s) for loadAsset",{parent:i});if(s=null==s||""==s?"ð"+t.toLowerCase().replace(/[^a-z0-9-]+/gi,"_"):s,null==e){const i=t.matchAll(/\.(js|css)\b/gi);i&&(e=i.next().value.pop())}return new Promise((function(o,r){let a;if(a=document.getElementById(s),!a){switch(e){case"js":case"script":case"application/javascript":a=Di("script",{async:!1,src:t,id:s}),i=i||document.body;break;case"css":case"style":case"text/css":a=Di("link",{type:"text/css",rel:"stylesheet",href:t,id:s}),i=i||document.head;break;default:throw new DOMException(`Invalid argument(s) for loadAsset - permitted types are '${n.join("', '")}'."`,{type:e})}i.appendChild(a)}a.addEventListener("load",(()=>o(t))),a.addEventListener("error",(()=>r(t)))}))}function ls(t){return Promise.allSettled(t.map((t=>as(t))))}function hs(t,e,i){return(e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var s=i.call(t,e||"default");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}class cs extends EventTarget{static get uiRole(){}static attach(){let t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:document.body;if(!t instanceof Element)throw typeof this+".attach - delegationParent not an element.";t.querySelectorAll('[data-ui-role="'+this.uiRole+'"]:not([mounted])').forEach(function(t){try{t.__widgetinstance||(t.__widgetinstance=new this(t,Ni(t)),t.dataset.ref&&(this.namedInstances[t.dataset.ref]=t.__widgetinstance))}catch(t){console.error(t)}}.bind(this))}static getInstance(t){return ii(t)?this.namedInstances[t]||void 0:t instanceof Element?t.closest('[data-ui-role="'+this.uiRole+'"][mounted]').__widgetinstance?t.__widgetinstance:null:void 0}getPrefixedClass(t){return this.o.className?`${this.o.className}-${t}`:t}}hs(cs,"namedInstances",[]);const ds=Math.floor,us=t=>t.toString();class ps extends EventTarget{constructor(){super(),this.delegationRoot=document.body,this.eventHandlers={toggle:Fi(this.toggle.bind(this),"[data-class-toggle][data-class-toggle-target]",!0,{stopPropagation:!0,preventDefault:!0}),cancel:Fi(this.cancel.bind(this),"[data-class-cancel][data-class-cancel-target]",!0,{stopPropagation:!0,preventDefault:!0})},this.delegationRoot.addEventListener("click",this.eventHandlers.toggle),this.delegationRoot.addEventListener("click",this.eventHandlers.cancel)}toggle(t){let e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null,i=e.dataset.classToggle;if(i){let s=Vi(e,e.dataset.classToggleTarget);if(!(s instanceof Element))return;t.preventDefault(),t.stopPropagation();let n=s.classList.contains(i);n?(ui(s,i),this.clearTriggerState(s)):(di(s,i),e.dataset.classToggleState="on",this.trackTriggerState(e,s)),document.body.dispatchEvent(new CustomEvent("classtoggle",{detail:{state:!n,target:s,trigger:e}}))}}cancel(t){let e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null,i=[],s=e.dataset.classCancel;if(s){if(i=Array.from(document.querySelectorAll(e.dataset.classCancelTarget)),0===i.length){let t=Vi(e,e.dataset.classCancelTarget);t instanceof Element&&i.push(t)}if(0===i.length)return;
1t.preventDefault(),t.stopPropagation(),i.forEach((t=>{ui(t,s),this.clearTriggerState(t),document.body.dispatchEvent(new CustomEvent("classtoggle",{detail:{state:!1,target:t,trigger:e}}))})),delete e.dataset.classToggleState}}clearTriggerState(t){t.__CowTools_classToggleTriggers&&0<t.__CowTools_classToggleTriggers.length?t.__CowTools_classToggleTriggers.forEach((t=>{delete t.dataset.classToggleState})):!t.__CowTools_classToggleTriggers&&(t.__CowTools_classToggleTriggers=[])}trackTriggerState(t,e){t.dataset.classToggleState="on",e.__CowTools_classToggleTriggers||(e.__CowTools_classToggleTriggers=[]),e.__CowTools_classToggleTriggers.push(t)}static attach(){document.body.__classToggleInstance||(document.body.__classToggleInstance=new this)}static getInstance(){return document.body.__classToggleInstance?document.body.__classToggleInstance:null}}class ms extends cs{static get uiRole(){return"tabs"}constructor(t,e){return super(),this.o={startIndex:0,keyboardExplicitSwitch:!1,doAriaIds:!0,scrollIntoView:!0,saveIndex:!1,tabContainer:'[role="tablist"],[aria-role="tablist"]',panelContainer:null,panelHiddenStyles:{paddingTop:"0","padding-bottom":"0","margin-top":"0","margin-bottom":"0","border-top-width":"0","border-bottom-width":"0",overflow:"hidden","max-height":"0",visibility:"hidden","pointer-events":"none",position:"static"}},Object.assign(this.o,e),this.element=t,this.tabContainer=Ci(this.element,this.o.tabContainer),this.tabs=null!==this.o.tabContainer&&Ci(this.element,this.o.tabContainer)?Array.from(_i(this.tabContainer,">*")):Array.from(_i(this.element,'[role="tablist"]>*, [aria-role="tablist"]>*')),this.panels=null!==this.o.panelContainer&&Ci(this.element,this.o.panelContainer)?_i(Ci(this.element,this.o.panelContainer),'[role="tabpanel"], [aria-role="tabpanel"]'):_i(this.element,'>[role="tabpanel"], :scope>[aria-role="tabpanel"]'),this.tabs.length!=this.panels.length||0==this.tabs.length||0==this.panels.length?void console.error("Unable to initialise tabs on element.",this.tabs,this.panels):(this.o.doAriaIds&&this.element.id&&this.tabs.forEac
1h(function(t,e){let i=this.panels[e];t.id=this.getUniqueId(),i.id=this.getUniqueId(),t.setAttribute("aria-controls",i.id),i.setAttribute("aria-labelledby",t.id)}.bind(this)),pi(this.tabs,"aria-selected","false"),pi(this.tabs,"tabindex","0"),pi(this.panels,"aria-hidden","true"),xi(this.panels,this.o.panelHiddenStyles||{}),this.element.addEventListener("click",this.selectTab.bind(this)),this.tabContainer.addEventListener("keydown",function(t){32==t.keyCode||13==t.keyCode?this.selectTab(t):"ArrowLeft"==t.key||"ArrowUp"==t.key?this.o.keyboardExplicitSwitch?t.target.previousElementSibling&&t.target.previousElementSibling.focus():this.select(this.currentIndex-1):("ArrowRight"==t.key||"ArrowDown"==t.key)&&(this.o.keyboardExplicitSwitch?t.target.nextElementSibling&&t.target.nextElementSibling.focus():this.select(this.currentIndex+1))}.bind(this)),this.o.saveIndex&&window.sessionStorage&&""!=this.element.id&&(this.o.startIndex=parseInt(window.sessionStorage.getItem(`${window.location.pathname}-${this.element.id}`))),this.currentIndex=Math.floor(this.o.startIndex||
10),this.select(this.currentIndex),void pi(this.element,"mounted",(performance.now()||!0).toString()))}selectTab(t){let e=t.target.closest('[role="tablist"]>*,[aria-role="tablist"]>*')||t.target;const i=this.tabs.indexOf(e);0<=i&&!t.key&&(t.preventDefault(),this.select(i),this.currentTab.focus(),this.o.scrollIntoView&&Ri(this.currentPanel).all&&this.currentPanel.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"}))}showTab(t){this.tabs[t].setAttribute("aria-selected","true"),this.panels[t].setAttribute("aria-hidden","false"),Ei(this.panels[t],this.o.panelHiddenStyles||{}),this.o.saveIndex&&window.sessionStorage&&""!=this.element.id&&window.sessionStorage.setItem(`${window.location.pathname}-${this.element.id}`,t),this.element.dataset.currentTab=t}hideTab(t){this.tabs[t].setAttribute("aria-selected","false"),this.panels[t].setAttribute("aria-hidden","true"),xi(this.panels[t],this.o.panelHiddenStyles||{})}select(t){0>t&&(t=0),t>this.tabs.length-1&&(t=this.tabs.length-1),this.hideTab(this.currentIndex),this.showTab(t),this.currentIndex=t,this.element.dispatchEvent(new CustomEvent("change",{detail:{index:this.currentIndex,tab:this.currentTab,panel:this.currentPanel}}))}getUniqueId(){return"cowtab_"+(++ms.serial).toString(35)}get currentTab(){return this.tabs[this.currentIndex]}get currentPanel(){return this.panels[this.currentIndex]}}class fs extends EventTarget{constructor(t,e){if(super(),this.o={mapOptions:{minZoom:3,maxZoom:17,center:[-33.753,151.241],scrollWheelZoom:ss(),draggable:!ss(),attributionControl:!1,wheelDebounceTime:100,zoomSnap:1},clustererOptions:{polygonOptions:{dashArray:"4 4",color:"RGBA(0,0,0,0.5)",weight:"1",fillOpacity:0}},popupOptions:{alignBottom:!0,maxWidth:280,closeButton:!0,offset:[0,-30]},pathStyles:{color:"#000",opacity:.5,weight:2,fill:"#000",fillOpacity:.05},tileLayers:[{url:"https://maptiles-{s}.pushcreative.com.au/gmapland/{z}/{x}/{y}.webp",options:{attribution:'© <a target="_blank" rel="nofollow" href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors',maxZoom:17,maxNativeZoom:16}},{url:"https://maptiles-{s}.pushcreative.com.au/gmaplabels/{z}/{x}/{y}.webp",options:{attribution:'© <a target="_blank" rel="nofollow" href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors',maxZoom:17,maxNativeZoom:16}},{url:"https://maptiles-{s}.pushcreative.com.au/cadastre/{z}/{x}/{y}.webp",options:{attribution:'© <a target="_blank" rel="nofollow" href="https://spatial.nsw.gov.au/">Spatial Services</a>',minZoom:16,maxZoom:17,maxNativeZoom:17}}],features:!1,includeInBounds:["markers"],fitBoundsPadding:32},e)for(const[t,i]of Object.entries(e))m(i)?this.o[t]=i:x(i)&&x(this.o[t])?Object.assign(this.o[t],i):this.o[t]=i;this.o.mapOptions.scrollWheelZoom=!ss(),this.o.mapOptions.scrollWheelZoom=ss(),this.element=t,this.element.classList.add("leafletmap"),this.markerContainer=Ci(this.element,".leafletmap-markers"),yi(this.markerContainer,"display","none"),this.addedMarkerContainer=Ii(Di("div",{},{display:"none"}),this.element,"bottom"),this.initialiseMap()}initialiseMap(){return ls(["/js/cowtools/vendor/leaflet.css","/js/cowtools/vendor/leaflet.js"]).then((()=>{this.map=new L.map(this.element,this.o.mapOptions),L.control.attribution({prefix:!1}).addTo(this.map),this.featureLayer=L.layerGroup().addTo(this.map),this.clusterManager=L.markerClusterGroup(this.o.clustererOptions),this.markerLayer=L.layerGroup().addTo(this.map),this.popup=new L.popup(this.o.popupOptions),this.map.addLayer(this.clusterManager),this.popup.bindPopup(this.clusterManager),this.bounds=L.latLngBounds(),this.map.on("resize",Ze(function(){this.map.closePopup()}.bind(this),200,{trailing:!0})),this.element._mapInstance=this.map,this.markerObjects=[],this.loadTiles(),this.loadMarkers(),this.features=this.o.features,this.element.setAttribute("mounted",performance.now()||!0)})),this}loadTiles(){this.o.tileLayers.forEach((t=>{let e=JSON.parse(JSON.stringify(t.options));e.detectRetina=e.detectRetina||!1,L.tileLayer(t.url,e).addTo(this.map)}))}loadMarkers(){let t=!!(0<arguments.length&&void 0!==arguments[0])&&arguments[0],e=Li(this.markerContainer);if(t||(this.clusterManager.clearLayers(),this.markerLayer.clearLayers(),Ki(this.addedMarkerContainer),this.markerObjects=[],this.bounds=L.latLngBounds()),e&&0!=e.length){var i=[],s=this.o.includeInBounds.includes("markers");e.forEach((t=>{let e={},n=!1;if(!t.dataset.lat||!t.dataset.lng)return;var o=L.latLng(parseFloat(t.dataset.lat),parseFloat(t.dataset.lng));if(!t.dataset.nobounds&&s&&this.bounds.extend(L.latLng(t.dataset.lat,t.dataset.lng)),t.dataset.class&&(e.className=t.dataset.class||""),t.dataset.imageSize){var r=t.dataset.imageSize.split("x");
1e.iconSize=L.point(parseInt(r[0]),parseInt(r[1])),e.iconAnchor=L.point(e.iconSize.x/2,e.iconSize.y)}if(t.dataset.imageAnchor){var a=t.dataset.imageAnchor.split(",");e.iconAnchor=L.point(parseInt(a[0]),parseInt(a[1]))}t.dataset.image?(e.iconUrl=t.dataset.image||"/img/map_marker.png",n=L.icon(e)):t.dataset.html&&(e.html=t.dataset.html),n||(n=L.divIcon(e));var l=L.marker(o,{icon:n,interactive:!t.dataset.nointeraction});this.markerObjects.push(l),t.dataset.nocluster?l.addTo(this.markerLayer):i.push(l);let h=Ci(t,".leafletmap-popup, figcaption");h&&(h.classList.add("mapbox"),l.on("click",function(){this.popup.closePopup(),this.popup.setLatLng(l.getLatLng()).setContent(h).openOn(this.map)}.bind(this))),Ii(t,this.addedMarkerContainer)})),1==i.length?this.markerLayer.addLayer(i[0]):1<i.length&&this.clusterManager.addLayers(i),0<this.markerObjects.length&&(this.map.fitBounds(this.bounds,{animate:!1,padding:[parseInt(this.o.fitBoundsPadding),parseInt(this.o.fitBoundsPadding)]}),1<this.markerObjects.length&&this.map.setMaxBounds(this.bounds.pad(3))),1==this.markerObjects.length&&this.map.setZoom(this.element.dataset.zoom||12)}}loadFeatures(){let t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null;if(null===t&&(t=this.o.features||!1),t&&{}!==t&&[]!==t){if(this.featureLayer.clearLayers(),m(t))t.forEach((t=>{let e=L.geoJSON(t,{smoothFactor:2,interactive:!1,style:t.style||this.o.pathStyles});e.addTo(this.featureLayer),this.o.includeInBounds.includes("features")&&this.bounds.extend(e.getBounds())}));else{let e=L.geoJSON(t,{interactive:!1,style:this.o.pathStyles});e.addTo(this.featureLayer),this.o.includeInBounds.includes("features")&&this.bounds.extend(e.getBounds())}this.map.fitBounds(this.bounds,{animate:!1,padding:[parseInt(this.o.fitBoundsPadding),parseInt(this.o.fitBoundsPadding)]})}}set markers(t){x(t)||(this.markerContainer.innerHTML=t,this.loadMarkers(!1))}set features(t){ii(t)?this.loadFeatures(Ui(t)):this.loadFeatures(t)}static attach(){(0<arguments.length&&void 0!==arguments[0]?arguments[0]:document.body).querySelectorAll('[data-ui-role="leafletmap"]:not([mounted])').forEach(function(t){try{t.__widgetinstance||(t.__widgetinstance=new this(t,Ni(t)))}catch(t){console.error(t)}}.bind(this))}static getInstance(t){if(!t instanceof Element)return!1;return t.closest('[data-ui-role="leafletmap"][mounted]').__widgetinstance?t.__widgetinstance:null}static getMapInstance(t){return this.getInstance(t).map||null}}function gs(t){let e=!!(1<arguments.length&&void 0!==arguments[1])&&arguments[1];if(t){t._fx_transitionTimer&&clearTimeout(t._fx_transitionTimer),Oi(t);const i=t.scrollHeight;t.style.height=`${i}px`,t._transitioning=!0,t.classList.add("transitioning-y"),Oi(t),xi(t,{height:"0",opacity:"0",overflow:"hidden","padding-top":"0","padding-bottom":"0","margin-top":"0","margin-bottom":"0","border-top-width":"0","border-bottom-width":"0"},!0),t._fx_transitionTimer=setTimeout((function(){t.classList.remove("transitioning-y"),t._transitioning=!1,t._fx_transitionTimer=null,e&&(t.remove(),t=null)}),Wi(t)+10)}}class vs extends EventTarget{constructor(){let t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:document.body;super(),this.delegationRoot=t,this.eventHandlers={toggle:Fi(this.toggle.bind(this),"[collapse-target]")},this.delegationRoot.addEventListener("click",this.eventHandlers.toggle),_i(document.body,"[collapse-target]").forEach((t=>{if(t.hasAttribute("aria-expanded")){let e=Vi(t,t.getAttribute("collapse-target"));e&&e.matches("[collapsible]")&&("false"==t.getAttribute("aria-expanded").toLowerCase()?function(t){t.classList.remove("transitioning-y"),xi(t,{height:"0",opacity:"0",overflow:"hidden",visibility:"hidden","padding-top":"0","padding-bottom":"0","margin-top":"0","margin-bottom":"0","border-top-width":"0","border-bottom-width":"0"},!0),t._transitioning=!1}(e):function(t){t.classList.remove("transitioning-y"),t._transitioning=!1,Oi(t);const e=t.scrollHeight;t.classList.add("transitioning-y"),xi(t,{height:`${e}px`,visibility:"visible",opacity:null,"padding-top":null,"padding-bottom":null,"margin-top":null,"margin-bottom":null,"border-top-width":null,"border-bottom-width":null})}(e))}}))}toggle(t,e){let i=Vi(e,e.getAttribute("collapse-target"));if(i&&i.matches("[collapsible]"))if(t.preventDefault(),t.stopPropagation(),e.matches('[aria-expanded="false"]')){(function(t){if(t){t._fx_transitionTimer&&clearTimeout(t._fx_transitionTimer),t._transitioning=!0,Oi(t);const e=t.scrollHeight;t.classList.add("transitioning-y"),xi(t,{height:`${e}px`,visibility:"visible",opacity:null,"padding-top":null,"padding-bottom":null,"margin-top":null,"margin-bottom":null,"border-top-width":null,"border-bottom-width":null}),t._fx_transitionTimer=setTimeout((function(){t.classList.remove("transitioning-y"),t._transitioning=!1,t.style.height=null,t._fx_transitionTimer=null}),Wi(t)+50)}})(i),e.setAttribute("aria-expanded","true");let t=e.getAttribute("collapse-group")||!1;if(t){var s=_i(document.body,'[collapse-target][collapse-group="'+t+'"]')||[];for(let t of s)t!=e&&(gs(Vi(t,"collapse-target")),t.setAttribute("aria-expanded","fal
1se"))}}else gs(i),e.setAttribute("aria-expanded","false")}static attach(){document.body.__collapsiblesInstance||(document.body.__collapsiblesInstance=new this)}static getInstance(){return document.body.__collapsiblesInstance?document.body.__collapsiblesInstance:null}}class bs extends EventTarget{constructor(t,e){return super(),this.o={elements:"[scrollinout]",threshold:[0,.1],inOnly:!0,scrolledInClass:"scrolledin"},Object.assign(this.o,e),this.element=t,this.elements=_i(t,this.o.elements),this.observer=new IntersectionObserver(this.monitor.bind(this),{threshold:this.o.threshold}),this.elements.forEach((t=>this.observer.observe(t))),this.element.addEventListener("resize",this.checkIntersections.bind(this),{passive:!0}),this.checkIntersections(),this}add(t){t instanceof HTMLElement&&(this.elements.push(t),this.observer.unobserve(t))}remove(t){if(t instanceof HTMLElement){const e=this.elements.indexOf(t);-1!=e&&(this.elements.splice(e,1),this.observer.unobserve(t))}}monitor(t){t.forEach((t=>{const e=t.target,i=t.intersectionRatio;i>e.__CowScrollInOut__PrevRatio?(""!=this.scrolledInClass&&e.classList.add(this.scrolledInClass),this.dispatchEvent(new CustomEvent("scrolledin",{cancelable:!1,bubbles:!1,detail:{ratio:i,target:e,instance:this}})),e.dispatchEvent(new CustomEvent("scrolledin",{cancelable:!1,bubbles:!1,detail:{ratio:i,target:e,instance:this}}))):(!this.o.inOnly&&""!=this.scrolledInClass&&e.classList.remove(this.scrolledInClass),this.dispatchEvent(new CustomEvent("scrolledout",{cancelable:!1,bubbles:!1,detail:{ratio:i,target:e,instance:this}})),e.dispatchEvent(new CustomEvent("scrolledout",{cancelable:!1,bubbles:!1,detail:{ratio:i,target:e,instance:this}}))),e.__CowScrollInOut__PrevRatio=i}))}checkIntersections(){return this.element?void this.elements.forEach((t=>{t.__CowScrollInOut__PrevRatio=0,Ri(t).all?t.classList.remove(this.scrolledInClass):t.classList.add(this.scrolledInClass)})):void this.element.removeEventListener("resize",this.checkIntersections.bind(this))}get scrolledInClass(){return this.o.scrolledInClass}static attach(){document.body.__scrollinoutInstance||(document.body.__scrollinoutInstance=new bs(document.body))}static getInstance(){return document.body.__scrollinoutInstance?document.body.__scrollinoutInstance:null}}
1class ws extends EventTarget{static get uiRole(){return"htmlform"}constructor(t,e){return super(),this.o={action:void 0,successUrl:void 0,useReturnedSuccessUrl:!0,delayBeforeRedirect:200,method:"post",debounceInterval:500,contentType:"multipart/form-data",notificationArea:"output",fetchOptions:{mode:"same-origin",cache:"no-cache",headers:{},credentials:"same-origin",redirect:"follow",referrerPolicy:"same-origin"}},Object.assign(this.o,e),!t instanceof HTMLFormElement?void console.error("CowCmsForm must be mounted on a HTMLFormElement node."):(this.formElement=t,void 0===this.o.action&&(this.o.action=this.formElement.action||window.location.toString()),bi(_i(this.formElement,"input, textarea, select"),"input",(function(){try{if(this.validity.valid){const t=this.closest("[data-validation-message]");t&&(t.classList.remove("htmlform-validation-failed"),t.dataset.validationMessage=null)}}catch(t){console.error(t)}})),void this.formElement.addEventListener("submit",(async t=>(t.preventDefault(),this.lastSend=Date.now(),await this.submit(t)))))}success(t){let e;window.dispatchEvent(new CustomEvent("htmlformSuccess",{detail:{instance:this,result:t,url:t.url||void 0,form:this.form},cancelable:!1,bubbles:!1})),this.form.dispatchEvent(new CustomEvent("htmlformSuccess",{detail:{instance:this,result:t,url:t.url||void 0,form:this.form},cancelable:!1,bubbles:!1})),this.formElement.reset(),this.resetReCaptcha(),this.setMessage(t.message);try{this.o.useReturnedSuccessUrl&&t.url?e=new URL(t.url,window.location.origin):this.o.successUrl&&""!=this.o.successUrl&&(e=new URL(this.o.successUrl,window.location.origin))}catch{e=void 0}e&&window.setTimeout((()=>{window.location.href=e.toString()}),this.o.delayBeforeRedirect)}validation(t){this.setMessage(t.message),this.resetReCaptcha(),window.dispatchEvent(new CustomEvent("htmlformValidation",{detail:{instance:this,result:t,form:this.form},cancelable:!1,bubbles:!1})),this.form.dispatchEvent(new CustomEvent("htmlformValidation",{detail:{instance:this,result:t,form:this.form},cancelable:!1,bubbles:!1})),t.validationids.forEach(((e,i)=>{const s=Ci(this.form,`[name="${e}"]`);if(s){s.setCustomValidity(t.validation[i]);const e=s.closest("[data-validation-message]");e&&(e.classList.add("htmlform-validation-failed"),e.dataset.validationMessage=t.validation[i]||"")}}))}resetReCaptcha(){_i(this.form,"div.g-recaptcha").forEach((t=>{void 0!==t.grecaptcha_instance&&grecaptcha.reset(t.grecaptcha_instance)}))}error(t){this.setMessage("There was an error processing the form submission. Please try again later."),this.resetReCaptcha(),window.dispatchEvent(new CustomEvent("htmlformError",{detail:{instance:this,statusCode:t.status,form:this.form},cancelable:!1,bubbles:!1})),this.form.dispatchEvent(new CustomEvent("htmlformError",{detail:{instance:this,statusCode:t.status,form:this.form},cancelable:!1,bubbles:!1}))}setMessage(t){const e=this.form.querySelector(this.o.notificationArea);e&&(e.innerHTML=t.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"\x3c!-- script tag removed --\x3e"))}set method(t){this.o.method=t}get method(){return this.o.method.toLowerCase()}set fetchUrl(t){this.o.action=t}get form(){return this.formElement}get fetchUrl(){const t=new URL(this.o.action,window.location.origin);if("get"==this.method){const e=new URLSearchParams([...Array.from(t.searchParams.entries()),...this.formdata.entries()]);t.URLSearchParams=e}return t}get formdata(){const t=new FormData(this.formElement);if("multipart/form-data"==this.o.contentType)return t;var e={};return t.forEach(((t,i)=>Reflect&&!Reflect.has(e,i)?void(e[i]=t):(e[i]&&!Array.isArray(e[i])&&(e[i]=[e[i]]),void e[i].push(t)))),JSON.stringify(e)}get contentType(){return"multipart/form-data"==this.o.contentType?"multipart/form-data":"application/json"}get fetchOptions(){const t=this.o.fetchOptions||{};return"application/json"==this.contentType&&(t.headers["Content-Type"]=this.contentType),t.method=this.method,"post"==this.method&&(t.body=this.formdata),t}set loading(t){return t?this.form.classList.add("htmlform-loading"):this.form.classList.remove("htmlform-loading")}get loading(){return this.form.classList.contains("htmlform-loading")}async submit(t){this.form.dispatchEvent(new CustomEvent("htmlformBeforeRequest",{detail:{instance:this,submitEvent:t,form:this.form},cancelable:!1,bubbles:!1}));let e={},i={};this.loading=!0,await fetch(this.fetchUrl,this.fetchOptions).then((async t=>{e=await t.json(),i=t})).catch((t=>{e={},i=t})),this.loading=!1,i.status&&2==parseInt(i.status/100)?Array.isArray(e.validation)&&0<e.validation.length?this.validation(e):this.success(e):this.error(i)}static attach(){let t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:document.body;document.querySelector('[data-ui-role="htmlform"] div.g-recaptcha')&&!this.recaptchaLoaded?(window.CowCmsForm_renderRecaptcha=this.renderRecaptcha,Promise.allSettled([as("https://www.google.com/recaptcha/api.js?onload=CowCmsForm_renderRecaptcha&render=explicit","js")]).then((()=>{this.recaptchaLoaded=!0,this.attachForms(t)}))):this.attachForms(t)}static attachForms(t){t.querySelectorAll('[data-ui-role="htmlform"]:not([mounted])').forEach((t=>{try{t.__widgetinstance||(t.__widgetinstance=new this(t,Ni(t)))}catch(t){console.error(t)}}))}static loadRecaptcha(){}static renderRecaptcha(){_i(document.body,'[data-ui-role="htmlform"] div.g-recaptcha').forEach((t=>{t.grecaptcha_instance||(t.grecaptcha_instance=grecaptcha.render(t))}))}}
1class ys extends EventTarget{constructor(){let t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:document;return super(),this.frameRequested=null,this.scrollParent=document,this.scrollParent=t,this.frameRequested=!1,this.eventHandlers={onscroll:this.monitor.bind(this),onresize:li(this.monitor.bind(this),100,{leading:!0,trailing:!0})},this.scrollParent&&(this.scrollParent.addEventListener("scroll",this.eventHandlers.onscroll,{passive:!0}),window.addEventListener("resize",this.eventHandlers.onresize,{passive:!0})),setTimeout(this.eventHandlers.onscroll,50),this}monitor(){null===this.frameRequested&&(this.frameRequested=window.requestAnimationFrame((()=>{this.dispatchEvent(new CustomEvent("scrolled",{detail:{scrollY:window.scrollY,instance:this},cancelable:!1,bubbles:!1})),this.frameRequested=null})))}}class xs extends EventTarget{constructor(){let t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:document.documentElement;return super(),this.o={elements:'[data-bg-src], img[data-src]:not([data-src=""]):not([src=""]), img[data-src]:not([src])',threshold:[.001,.1,.2,.3,.4,.5,.6,.7,.8,.9,1],acceptableSizes:[160,320,640,800,1024,1280,1600,1920,2560]},this.element=t,this.elements=_i(t,this.o.elements),_i(t,"img:not([data-loaded])").forEach((t=>{t.addEventListener("load",(t=>{t.target.dataset.loaded=""}),{passive:!0,once:!0})})),this.observer=new IntersectionObserver(this.monitor.bind(this),{threshold:this.o.threshold}),this.elements.forEach((t=>this.observer.observe(t))),this}monitor(t){t.forEach((t=>{t.target,(0<t.intersectionRatio||t.isIntersecting)&&this.loadImage(t.target)}))}getAcceptableSize(t){return this.o.acceptableSizes.find((e=>1.05*e>t||e==this.o.acceptableSizes[this.o.acceptableSizes.length-1]))}loadImage(t){var e=t instanceof HTMLImageElement?t.getAttribute("data-src"):t.getAttribute("data-bg-src");if(""===e.toString()||"true"==t.dataset.loading)return;t.dataset.loading="true",this.observer.unobserve(t);const i=zi(t),s=ns(),n=new Image;n.addEventListener("load",(()=>{setTimeout((()=>{t instanceof HTMLImageElement?(t.src=n.src,t.setAttribute("data-src",""),t.dataset.loading=null):(t.style.setProperty("background-image","url("+n.src+")"),t.setAttribute("data-bg-src",""),t.dataset.loading=null)}),50)}),{passive:!0});const o=e.replace(/\[\[(\d*)width\]\]/g,((t,e)=>this.getAcceptableSize(i.width*((parseInt(e)||100)/100)))).replace(/\[\[(\d*)height\]\]/g,((t,e)=>this.getAcceptableSize(i.height*((parseInt(e)||100)/100)))).replace(/\[\[(\d*)size\]\]/g,((t,e)=>this.getAcceptableSize((i.height+i.width)/2*(s.screen.pixelRatio||1)*((parseInt(e)||100)/100)))).replace(/\[\[(\d*)longside\]\]/g,((t,e)=>this.getAcceptableSize(Math.max(i.height,i.width)*(s.screen.pixelRatio||1)*((parseInt(e)||100)/100)))).replace(/\[\[(\d*)vmax\]\]/g,((t,e)=>this.getAcceptableSize(s.viewport.nativeVmax*((parseInt(e)||100)/100)))).replace(/\[\[(\d*)vmin\]\]/g,((t,e)=>this.getAcceptableSize(s.viewport.nativeVmin*((parseInt(e)||100)/100)))).replace(/\[\[(\d*)vw\]\]/g,((t,e)=>this.getAcceptableSize(s.viewport.nativeWidth*((parseInt(e)||100)/100)))).replace(/\[\[(\d*)vh\]\]/g,((t,e)=>this.getAcceptableSize(s.viewport.nativeHeight*((parseInt(e)||100)/100))));n.src=o}static attach(){document.body.__lazyloaderInstance||(document.body.__lazyloaderInstance=new xs(document.body))}static getInstance(){return document.body.__lazyloaderInstance?document.body.__lazyloaderInstance:null}}
1class Es extends EventTarget{constructor(){super(),document.body.__mutexInstance instanceof Es||(this.eventHandlers={toggle:this.toggle.bind(this)},document.body.addEventListener("click",this.eventHandlers.toggle))}toggle(t){var e=t.target;if(e.dataset.mutexTrigger||(e=e.closest("[data-mutex-trigger]")||e),e.dataset.mutexTrigger){if(e.classList.contains("mutex-on"))this.hide();else{this.hide();var i=document.querySelector(e.dataset.mutexTrigger);i&&i.classList.add("mutex-on"),e.classList.add("mutex-on")}t.preventDefault()}else{if(e.closest(".mutex-on[data-mutex-content]")&&"a"!=e.tagName.toLowerCase())return;this.hide()}}hide(){document.body.querySelectorAll("[data-mutex-trigger]").forEach((t=>{const e=document.querySelector(t.dataset.mutexTrigger);e&&e.classList.remove("mutex-on"),t.classList.remove("mutex-on")}))}static attach(){document.body.__mutexInstance=new Es}}window.CowTools={LeafletMap:fs,Carousel:class extends cs{static get uiRole(){return"carousel"}constructor(t,e){super(),this.o={className:"carousel",advanceMode:"single",autoPlayInterval:0,colWidth:360,doThumbs:!0,dragThreshold:20,gap:20,nextClicker:".carousel-next",overflowStyle:"hidden",prevClicker:".carousel-prev",startIndex:0,thumbnailHolder:".carousel-thumbs",thumbnailTemplate:"<span></span>",transitionDuration:"0.3s"},Object.assign(this.o,e),this.o.colWidth=Math.floor(this.o.colWidth),this.wrap=t,this.container=Ci(t,".carousel-items"),this.columns=-1,this.currentIndex=this.o.startIndex||
10,this.setup(),this.layoutElements(),this.moveTo(this.o.startIndex),0<this.o.autoPlayInterval&&this.autoPlay(this.o.autoPlayInterval),this.container.setAttribute("mounted",(performance.now()||!0).toString())}unmount(){wi(this.container,"click",this.eventHandlers.stopClick),wi(this.container,"pointerdown",this.eventHandlers.dragStart),wi(window,"resize",this.eventHandlers.resize),this.thumbs&&wi(this.thumbs,"click",this.eventHandlers.thumbClick)}setup(){this.container.classList.add("carousel-items"),xi(this.container,{"touch-action":"pan-y",position:"relative",display:"grid","grid-auto-flow":"column","grid-auto-columns":this.o.colWidth,"transition-property":"transform","transition-duration":this.o.transitionDuration,"user-select":"none"}),this.items=Li(this.container),this.wrapwrap||(this.wrapwrap=Di("div",{class:"carousel"},{overflow:this.o.overflowStyle||"hidden"}),Si(this.wrapwrap,this.wrap));return this.eventHandlers={resize:Ze(this.layoutElements.bind(this),100,{trailing:!0}),stopClick:function(t){Math.abs(this.delta.x)>this.o.dragThreshold&&(t.preventDefault(),t.stopPropagation())}.bind(this),dragStart:this.dragStart.bind(this),dragMove:this.dragMove.bind(this),dragEnd:this.dragEnd.bind(this),prevClick:Fi(function(){this.prev()}.bind(this),this.o.prevClicker),nextClick:Fi(function(){this.next()}.bind(this),this.o.nextClicker),thumbClick:Fi(function(t,e){this.moveTo(Li(this.thumbs).indexOf(e))}.bind(this),"*")},bi(this.container,"click",this.eventHandlers.stopClick),bi(this.container,"pointerdown",this.eventHandlers.dragStart),bi(window,"resize",this.eventHandlers.resize,{passive:!0}),bi(this.wrapwrap,"click",this.eventHandlers.prevClick),bi(this.wrapwrap,"click",this.eventHandlers.nextClick),Ii(this.container,this.wrap,"top"),this.o.thumbnailHolder&&this.o.doThumbs&&(!this.thumbs&&(this.thumbs=Ci(this.wrapwrap,this.o.thumbnailHolder)),this.thumbs&&(this.thumbs.classList.add("carousel-thumbs"),bi(this.thumbs,"click",this.eventHandlers.thumbClick,{passive:!0}))),this}layoutElements(){Oi(this.container),this.gapInPixels=Gi(this.o.gap),yi(this.container,"gap",`${this.gapInPixels}px`),this.dispatchEvent(new CustomEvent("beforeLayout",{detail:{instance:this,columns:this.columns,itemPixelWidth:this.itemPixelWidth,itemTotalWidth:this.itemTotalWidth}}));let t=zi(this.wrap).width,e=this.columns;this.columns=Math.max(1,Math.min(Math.floor(t/(this.o.colWidth+this.gapInPixels)),this.items.length)),this.idealcolumns=Math.max(1,Math.floor(t/(this.o.colWidth+this.gapInPixels))),this.idealcolumns>this.columns?(this.itemPixelWidth=this.o.colWidth,this.itemTotalWidth=this.itemPixelWidth+this.gapInPixels,yi(this.container,"grid-template-columns",`repeat(${this.idealcolumns}, ${this.o.colWidth}px)`),yi(this.container,"grid-auto-columns",`${this.o.colWidth}px`)):(this.itemPixelWidth=Math.floor((t-this.gapInPixels*(this.columns-1))/this.columns+.5),this.itemTotalWidth=this.itemPixelWidth+this.gapInPixels,yi(this.container,"grid-template-columns",`repeat(${this.columns}, ${this.itemPixelWidth}px)`),yi(this.container,"grid-auto-columns",`${this.itemPixelWidth}px`)),this.columns>=this.items.length&&this.itemPixelWidth>Math.floor(this.o.colWidth)&&(this.itemPixelWidth=Math.floor(this.o.colWidth)),this.wrap.setAttribute("data-slide-count",this.items.length.toString()),this.thumbs&&this.columns!=e&&("single"===this.o.advanceMode&&this.items.length>this.columns?this.thumbs.innerHTML=this.o.thumbnailTemplate.repeat(this.items.length-this.columns+1):"single"!==this.o.advanceMode&&1<this.items.length/this.columns?this.thumbs.innerHTML=this.o.thumbnailTemplate.repeat(Math.ceil(this.items.length/this.columns)):this.thumbs.innerHTML=""),this.moveTo(this.currentIndex),this.dispatchEvent(new CustomEvent("afterLayout",{detail:{instance:this,columns:this.columns,itemPixelWidth:this.itemPixelWidth,itemTotalWidth:this.itemTotalWidth}}))}dragMove(t){this.dragging&&null!==this.startpoint&&(this.delta={x:t.screenX-this.startpoint.x,y:t.screenY-this.startpoint.y},Math.abs(this.delta.x)>this.o.dragThreshold&&(t.preventDefault(),qi(function(){if(this.dragging){let t=-this.itemTotalWidth*this.currentIndex+this.delta.x;this.container.style.transform="translate3d("+t+"px, 0, 0)"}this.dispatchEvent(new CustomEvent("swipeMove",{detail:{instance:this,delta:this.delta,startpoint:this.startpoint}}))}.bind(this))))}dragStart(t){t.preventDefault(),this.wrap.focus(),this.dragging=!0,xi(this.container,{"transition-duration":"0s"}),xi(this.wrap,{cursor:"grabbing"}),this.startpoint={x:t.screenX,y:t.screenY},this.delta={x:0,y:0},bi(document,"pointermove",this.eventHandlers.dragMove),bi(document,"pointerup",this.eventHandlers.dragEnd),this.dispatchEvent(new CustomEvent("swipeStart",{detail:{instance:this,delta:this.delta,startpoint:this.startpoint}}))}dragEnd(t){if(this.dragging){let i=this.delta.x;xi(this.container,{"transition-duration":this.o.transitionDuration}),xi(this.wrap,{cursor:"grab"}),this.dragging=!1;var e="single"==this.o.advanceMode?Math.round(Math.abs(i)/this.itemTotalWidth+.5):Math.max(Math.round(Math.abs(i)/this.itemTotalWidth+.5),this.columns);i<-this.o.dragThreshold?(t.preventDefault(),this.moveTo(this.currentIndex+e)):i>this.o.dragThreshold?(t.preventDefault(),this.moveTo(this.currentIndex-e)):this.moveTo(this.currentIndex),wi(document,"pointermove",this.eventHandlers.dragMove),wi(document,"pointerup",this.eventHandlers.dragEnd),this.dispatchEvent(new CustomEvent("swipeEnd",{detail:{instance:this,delta:this.delta,startpoint:this.startpoint}}))}}moveTo(t){const e=this.currentIndex;"string"==typeof t&&("next"==t?t=this.currentIndex+("single"==this.o.advanceMode?1:this.columns):"prev"==t&&(t=this.currentIndex-("single"==this.o.advanceMode?1:this.columns))),t=Math.max(0,Math.min(parseInt(t),this.items.length-this.columns)),this.currentIndex=t,1==this.columns?this.wrap.setAttribute("data-current-slide",(t+1).toString()):this.wrap.setAttribute("data-current-slide",t+1+"â"+(t+this.columns)),this.items.length==this.columns?this.wrapwrap.setAttribute("data-status","allvisible"):this.items.length-this.columns==t?this.wrapwrap.setAttribute("data-status","end"):0==t?this.wrapwrap.setAttribute("data-status","start"):this.wrapwrap.removeAttribute("data-status");var i=Math.round(-this.itemTotalWidth*this.currentIndex);this.container.style.transform="translate3d("+i+"px, 0, 0)",this.thumbs&&this.thumbs.children&&0<this.thumbs.children.length&&(ui(Li(this.thumbs),"current"),"single"==this.o.advanceMode?this.thumbs.children.item(this.currentIndex).classList.add("current"):this.thumbs.children.item(Math.ceil(this.currentIndex/this.columns)).classList.add("current")),null!==this.timer&&this.stop(),this.dispatchEvent(new CustomEvent("change",{detail:{instance:this,newIndex:this.currentIndex,oldIndex:e,columns:this.columns,itemPixelWidth:this.itemPixelWidth,itemTotalWidth:this.itemTotalWidth}}))}next(){this.moveTo("next"),null!==this.timer&&this.stop()}prev(){this.moveTo("prev"),null!==this.timer&&this.stop()}autoPlay(t){this.timer=window.setInterval(function(){this.moveTo("next")}.bind(this),t||this.o.autoPlayInterval)}start(t){this.autoPlay(t)}stop(){clearInterval(this.timer),this.timer=null}},CarouselLoop:class extends cs{static get uiRole(){return"carouselloop"}constructor(t,e){return super(),this.o={className:"carouselloop",autoPlayInterval:0,doThumbs:!0,dragLimit:.9,dragThreshold:20,nextClicker:".carouselloop-next",overflowStyle:"visible",prevClicker:".carouselloop-prev",startIndex:0,thumbnailHolder:".carouselloop-thumbs",thumbnailTemplate:"<span></span>",transitionDuration:"0.3s"},Object.assign(this.o,e),this.wrap=t,this.wrap.classList.add("carouselloop-wrap"),this.container=Ci(t,".carouselloop-items"),this.currentIndex=this.o.startIndex||
10,this.delta={x:0,y:0},this.setupCarousel(),xi(this.container,{"touch-action":"pan-y",display:"block",position:"relative","transition-property":"transform","transition-duration":this.o.transitionDuration,"user-select":"none"}),this.layoutElements(),this.moveTo(this.o.startIndex),0<this.o.autoPlayInterval&&this.autoPlay(this.o.autoPlayInterval),this.wrap.setAttribute("mounted",us(performance.now()||!0)),this}detach(){window.removeEventListener("resize",this.eventHandlers.resize)}setupCarousel(){if(this.elements=Li(this.container)||[],0!=this.elements.length){this.wrap||(this.wrap=Di("div",{tabindex:0},{"outline-style":"none"}),this.wrap.classList.add("carouselloop"),xi(this.wrap,{display:"block",margin:0,padding:0,touchAction:"pan-x pan-y"}),this.wrap.style.overflow=this.o.overflowStyle||"hidden",Si(this.wrap,this.container));this.eventHandlers={resize:Ze(this.layoutElements.bind(this),50,{leading:!0,trailing:!0}).bind(this),stopClick:function(t){1==this.elementCount||Math.abs(this.delta.x)>this.o.dragThreshold&&(t.preventDefault(),t.stopPropagation())}.bind(this),dragStart:this.dragStart.bind(this),dragMove:this.dragMove.bind(this),dragEnd:this.dragEnd.bind(this),prevClick:Fi(function(){this.prev()}.bind(this),this.o.prevClicker),nextClick:Fi(function(){this.next()}.bind(this),this.o.nextClicker),thumbClick:Fi(function(t,e){this.moveTo(Li(this.thumbs).indexOf(e))}.bind(this),"span").bind(this)},this.wrap.addEventListener("click",this.eventHandlers.stopClick),this.wrap.addEventListener("pointerdown",this.eventHandlers.dragStart),window.addEventListener("resize",this.eventHandlers.resize,{passive:!0}),this.container.remove();for(let t of _i(this.container,".carouselloop-cloned"))t.remove(),t=null;if(this.elementCount=this.elements.length,5>this.elements.length){var t=Math.ceil(5/this.elementCount)-1;let s=this.elements;for(var e=0;e<t;e++)for(var i=0;i<this.elementCount;i++)Ii(s[i].cloneNode(!0),this.container,"bottom").classList.add("carouselloop-cloned")}return this.elements=Li(this.container),this.elements.forEach(function(t,e){t.setAttribute("data-idx",e%this.elementCount+1)}.bind(this)),Ii(this.container,this.wrap,"top"),this.o.nextClicker&&!this.nextClicker&&(this.nextClicker=Ci(this.wrap,this.o.nextClicker),this.nextClicker&&(this.nextClicker.addEventListener("click",this.eventHandlers.nextClick),this.nextClicker.classList.add("carouselloop-nextClicker"))),this.o.prevClicker&&!this.prevClicker&&(this.prevClicker=Ci(this.wrap,this.o.prevClicker),this.prevClicker&&(this.prevClicker.addEventListener("click",this.eventHandlers.prevClick),this.prevClicker.classList.add("carouselloop-prevClicker"))),this.o.thumbnailHolder&&this.o.doThumbs&&(!this.thumbs&&(this.thumbs=Ci(this.wrap,this.o.thumbnailHolder)),this.thumbs&&(this.thumbs.classList.add("carouselloop-thumbs"),this.thumbs.addEventListener("click",this.eventHandlers.thumbClick),0==this.thumbs.children.length&&(this.thumbs.innerHTML=this.o.thumbnailTemplate.repeat(this.elementCount)))),this}}layoutElements(){return this.dispatchEvent(new CustomEvent("beforeLayout",{detail:{instance:this}})),0!=this.elements.length&&(1==this.elementCount?(this.wrap.setAttribute("data-status","allvisible"),xi(this.container,{cursor:null,"touch-action":"pan-x pan-y pinch-zoom"})):(this.wrap.setAttribute("data-status",null),xi(this.container,{cursor:"grab","touch-action":"pan-y"})),this.elements.forEach(function(t,e){t.setAttribute("data-idx",e%this.elementCount+1),xi(t,{width:"100%",display:"block",position:"absolute",top:"0",left:100*e+"%"}),this.moveTo(this.currentIndex)}.bind(this)),yi(this.container,"transition-duration",this.o.transitionDuration),this.wrap.style.height=zi(this.elements[this.translateIndex(this.currentIndex)]).height+"px",void this.dispatchEvent(new CustomEvent("afterLayout",{detail:{instance:this}})))}dragMove(t){let e=zi(this.wrap).width;this.dragging&&null!==this.startpoint&&(this.delta={x:Mi(t.clientX-this.startpoint.x,this.o.dragLimit*-e,this.o.dragLimit*e),y:t.clientY-this.startpoint.y},Math.abs(this.delta.x)>this.o.dragThreshold&&(t.preventDefault(),qi(function(){this.dragging&&(this.container.style.transform="translate3d("+(-this.currentIndex*e+this.delta.x)+"px, 0, 0)"),this.dispatchEvent(new CustomEvent("swipeMove",{detail:{instance:this,delta:this.delta,startpoint:this.startpoint}}))}.bind(this))))}dragStart(t){1==this.elementCount||(t.preventDefault(),this.wrap.focus(),this.dragging=!0,xi(this.container,{"transition-duration":"0s",cursor:"grabbing"}),this.startpoint={x:t.clientX,y:t.clientY},this.delta={x:0,y:0},bi(document,"pointermove",this.eventHandlers.dragMove),bi(document,"pointerup",this.eventHandlers.dragEnd),this.dispatchEvent(new CustomEvent("swipeStart",{detail:{instance:this,delta:this.delta,startpoint:this.startpoint}})))}dragEnd(t){this.dragging&&(this.dragging=!1,xi(this.container,{"transition-duration":this.o.transitionDuration,cursor:"grab"}),wi(document,"pointermove",this.eventHandlers.dragMove),wi(document,"pointerup",this.eventHandlers.dragEnd),this.delta.x<-this.o.dragThreshold?this.moveTo("next"):this.delta.x>this.o.dragThreshold&&this.moveTo("prev"),Math.abs(this.delta.x)>this.o.dragThreshold&&(t.preventDefault(),t.stopPropagation()),null!==this.timer&&this.stop(),this.dispatchEvent(new CustomEvent("swipeEnd",{detail:{instance:this,delta:this.delta,startpoint:this.startpoint}})))}translateIndex(){let t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0;return 0>t?(this.elements.length-Math.abs(t)%this.elements.length)%this.elements.length:t%this.elements.length}getCurrentBaseIndex(){return ds(this.currentIndex/this.elementCount)*this.elementCount}moveTo(t){let e=!!(1<arguments.length&&void 0!==arguments[1])&&arguments[1];const i=this.currentIndex;"next"==t?this.currentIndex++:"prev"==t?this.currentIndex--:this.currentIndex=this.getCurrentBaseIndex()+this.translateIndex(parseInt(t));for(var s=-ds(this.elements.length/2);s<=ds(this.elements.length/2);s++)xi(this.elements[this.translateIndex(this.currentIndex+s)],{left:(this.currentIndex+s)*zi(this.wrap).width+"px"});if(e&&yi(this.container,"transition-duration","0s"),this.wrap.setAttribute("data-current-slide",us(this.translateIndex(this.currentIndex)%this.elementCount+1)),this.wrap.setAttribute("data-sli
1de-count",us(this.elements.length)),this.container.style.transform="translate3d("+-zi(this.wrap).width*this.currentIndex+"px, 0, 0)",this.wrap.style.height=zi(this.elements[this.translateIndex(this.currentIndex)]).height+"px",this.container.style.height=zi(this.elements[this.translateIndex(this.currentIndex)]).height+"px",e&&yi(this.container,"transition-duration",this.o.transitionDuration),this.thumbs&&this.thumbs.children&&0<this.thumbs.children.length){for(let t of this.thumbs.children)t.classList.remove("current");this.thumbs.children.item(this.translateIndex(this.translateIndex(this.currentIndex)%this.elementCount)).classList.add("current")}this.dispatchEvent(new CustomEvent("change",{detail:{instance:this,newIndex:this.currentIndex,oldIndex:i}}))}next(){this.moveTo("next"),null!==this.timer&&this.stop()}prev(){this.moveTo("prev"),null!==this.timer&&this.stop()}autoPlay(t){this.timer=window.setInterval(function(){this.moveTo("next")}.bind(this),t||this.o.autoPlayInterval)}start(t){this.autoPlay(t)}stop(){clearInterval(this.timer),this.timer=null}},Collapsibles:vs,ClassToggle:ps,Tabs:ms,DoubleSlider:class extends cs{static get uiRole(){return"doubleslider"}constructor(t,e){return super(),hs(this,"inputs",null),this.o={scale:{XXS:0,XS:1,S:2,M:3,L:4,XL:5,XXL:6},stopSize:"3rem",stopAspectRatio:1},Object.assign(this.o,e),this.container=t,this.container.setAttribute("unselectable","on"),this.container.classList.add("doubleslider"),this.wrap=Si(Di("div"),this.container),this.wrap.classList.add("doubleslider-wrap"),this.range=Di("div",{class:"doubleslider-range"},{position:"relative"}),this.activerange=Ii(Di("div",{class:"doubleslider-activerange"},{position:"absolute"}),this.container),this.inputs=Array.from(_i(this.container,"input")),2==this.inputs.length?(pi(this.inputs,"type","hidden"),this.scalevalues=Object.values(this.o.scale).map((t=>t.toString())),this.scalekeys=Object.keys(this.o.scale),(-1==this.scalevalues.indexOf(this.inputs[1].value)||this.inputs[1].value==this.inputs[0].value||this.scalevalues.indexOf(this.inputs[1].value)<=this.scalevalues.indexOf(this.inputs[0].value))&&(this.inputs[1].value=this.scalevalues[this.scalevalues.length-1]),(-1==this.scalevalues.indexOf(this.inputs[0].value)||this.scalevalues.indexOf(this.inputs[1].value)<=this.scalevalues.indexOf(this.inputs[0].value))&&(this.inputs[0].value=this.scalevalues[0]),this.stops=[Ii(Di("span",{class:"doubleslider-stop-min","touch-action":"none"},{display:"block",cursor:"ew-resize",position:"absolute","z-index":3}),this.container),Ii(Di("span",{class:"doubleslider-stop-max","touch-action":"none"},{display:"block",cursor:"ew-resize",position:"absolute","z-index":3}),this.container)],this.eventHandlers={dragStart:this.dragStart.bind(this),dragMove:this.dragMove.bind(this),dragEnd:this.dragEnd.bind(this),reflow:li(this.layoutElements.bind(this),200,{leading:!1,trailing:!0})},Ii(this.range,this.container,"top"),this.layoutElements(),this.updateLabels(),ResizeObserver?(this.resizeObserver=new ResizeObserver(this.eventHandlers.reflow),this.resizeObserver.observe(this.wrap)):window.addEventListener("resize",this.eventHandlers.reflow),this.wrap.addEventListener("pointerdown",this.eventHandlers.dragStart),void this.container.setAttribute("initialised",(performance.now()||!0).toString())):void console.error("Doubleslider needs 2 inputs - "+this.inputs.length+" found.")}layoutElements(){Oi(this.container),this.stopSizeInPixels=null===this.o.stopSize||void 0===this.o.stopSize?zi(this.container).height:Gi(this.o.stopSize,this.wrap),xi(this.container,{position:"relative",height:this.stopHeight+"px"}),xi(this.wrap,{height:this.stopHeight+"px",overflow:"visible",position:"relative",width:"100%","touch-action":"none"}),xi(this.stops[0],{left:Mi(this.valueToPixelOffset(this.inputs[0].value),0,this.rangeWidth)+"px",width:this.stopWidth+"px",height:this.stopHeight+"px"}),xi(this.stops[1],{left:Mi(this.valueToPixelOffset(this.inputs[1].value),this.stopWidth,this.rangeWidth+this.stopWidth)+"px",width:this.stopWidth+"px",height:this.stopHeight+"px"}),xi(this.activerange,{left:this.stops[0].style.left,right:this.rangeWidth-parseInt(this.stops[1].style.left)+this.stopWidth+"px"})}
1valueToPixelOffset(t){let e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null,i=this.scalevalues.indexOf(t.toString());return i=-1==i?e:i,Math.floor((0>i?0:i)/(this.scalevalues.length-1)*(this.rangeWidth+this.stopWidth))}pixelOffsetToValue(t){let e=Object.values(this.o.scale);return e[Mi(Math.round(t/(this.rangeWidth+this.stopWidth)*(e.length-1)),0,e.length)]}updateFields(){this.inputs[0].value=this.pixelOffsetToValue(this.stops[0].offsetLeft),this.inputs[1].value=this.pixelOffsetToValue(this.stops[1].offsetLeft),this.parentForm&&this.parentForm.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!1})),this.dispatchEvent(new CustomEvent("change",{detail:{instance:this,value:this.value}}))}updateLabels(){this.stops[0].setAttribute("data-label",this.scalekeys[this.scalevalues.indexOf(this.inputs[0].value.toString())]),this.stops[1].setAttribute("data-label",this.scalekeys[this.scalevalues.indexOf(this.inputs[1].value.toString())]),this.wrap.setAttribute("data-min-label",this.scalekeys[this.scalevalues.indexOf(this.inputs[0].value.toString())]),this.wrap.setAttribute("data-max-label",this.scalekeys[this.scalevalues.indexOf(this.inputs[1].value.toString())]),xi(this.activerange,{left:this.stops[0].style.left,right:this.rangeWidth-parseInt(this.stops[1].style.left)+this.stopWidth+"px"})}dragMove(t){t.preventDefault();var e=t.pageX-this.pointerstart;qi((function(){this.dragging==this.stops[0]?this.dragging.style.left=Mi(e+this.startpos,0,this.stops[1].offsetLeft-this.stopWidth)+"px":this.dragging==this.stops[1]&&(this.dragging.style.left=Mi(e+this.startpos,this.stops[0].offsetLeft+this.stopWidth,this.rangeWidth+this.stopWidth)+"px"),this.updateFields(),this.updateLabels()}),this)}dragStart(t){-1==this.stops.indexOf(t.target)||(t.preventDefault(),t.stopPropagation(),this.dragging=t.target,this.pointerstart=t.pageX,this.startpos=this.dragging.offsetLeft,t.target.addEventListener("pointermove",this.eventHandlers.dragMove),t.target.addEventListener("pointerup",this.eventHandlers.dragEnd,{once:!0}),t.target.setPointerCapture(t.pointerId))}dragEnd(t){t.stopPropagation(),t.preventDefault(),-1!=this.stops.indexOf(t.target)&&this.dragging&&(document.body.removeEventListener("pointermove",this.eventHandlers.dragMove),t.target.releasePointerCapture(t.pointerId),this.dragging=!1,this.startpos=null,this.updateFields(),this.updateLabels())}get stopWidth(){return Math.floor(this.stopSizeInPixels*(this.o.stopAspectRatio||1))}get stopHeight(){return this.stopSizeInPixels}get rangeWidth(){return Math.ceil(this.range.offsetWidth-2*this.stopWidth)}get value(){return[this.inputs[0].value,this.inputs[1].value]}get parentForm(){return this.wrap.closest("form")}set value(t){this.inputs[0].value=t[0],this.inputs[1].value=t[1],this.layoutElements(),this.updateLabels()}},PropertyTagbox:class extends cs{static get uiRole(){return"propertytagbox"}constructor(t,e){return super(),this.o={maxTags:10,className:"tagbox",action:null,param:"search",method:"get",minlength:1,input:">input"},Object.assign(this.o,e),t instanceof HTMLElement?(this.inputElement=Ci(t,this.o.input),this.inputElement?(this.wrap=t,this.wrap.classList.add(this.o.className),this.inputElement.setAttribute("type","hidden"),xi(this.wrap,{position:"relative",overflow:"visible"}),this.parentForm=this.wrap.closest("form"),this.id=this.wrap.getAttribute("id"),this.tags=[],this.cache=[],this.entryElement=Di("input",{type:"text",placeholder:this.o.placeholder||this.inputElement.getAttribute("placeholder")||"",autocomplete:"off",class:t.className+"-entry"}),Ii(this.entryElement,this.wrap),this.tagContainer=Di("div",{class:this.getPrefixedClass("items")}),Ii(this.tagContainer,this.entryElement,"before"),this.dropdownList=Di("div",{class:this.o.className+"-listbox"},{margin:0,display:"none",position:"absolute"}),Ii(this.dropdownList,this.wrap,"bottom"),this.dropdownList.addEventListener("pointerdown",Fi(function(t,e){this.chooseItem(e)}.bind(this),"."+this.getPrefixedClass("listbox-item"))),this.positionDropdown(!1),this.dropdownList.addEventListener("pointermove",(t=>{let e=document.elementFromPoint(t.clientX,t.clientY);if(e&&(e.matches("."+this.getPrefixedClass("listbox-item"))||(e=e.closest("."+this.getPrefixedClass("listbox-item"))),!this._lastOver||this._lastOver!==e)&&e){ui(ki(e),"selected"),mi(ki(e),"aria-selected"),e.classList.add("selected"),pi(e,"aria-selected","true"),this._lastOver=e}})),this.wrap.addEventListener("click",Fi(function(t,e){var i=e.closest(`.${this.getPrefixedClass("item")}`);
1ai(this.tags,i),i.remove(),i=null,this.updateValue(),this.fireChangeEvents()}.bind(this),`.${this.getPrefixedClass("item-delete")}`)),this.entryElement.addEventListener("keydown",this.keydownEvent.bind(this)),this.entryElement.addEventListener("keyup",this.keyupEvent.bind(this)),this.entryElement.addEventListener("blur",Ze(this.blurEvent,350,{leading:!1,trailing:!0}).bind(this)),this.entryElement.addEventListener("focus",Ze(this.focusEvent,150,{leading:!1,trailing:!0}).bind(this)),this.entryElement.addEventListener("dblclick",this.getSuggestions.bind(this)),this.entryElement.addEventListener("click",this.getSuggestions.bind(this)),window.addEventListener("resize",this.positionDropdown.bind(this,!1),{passive:!0}),this.wrap.setAttribute("mounted",(performance.now()||!0).toString()),void(this.value=this.inputElement.value)):void console.error("Unable to attach PropertyTagBox instance - no input element")):void console.error("Unable to attach PropertyTagBox instance - no parent element")}keydownEvent(t){if(this.tags.length>=this.o.maxTags&&!["Backspace","Tab","Enter"].includes(t.key))t.preventDefault();else if("Enter"!=t.key||this.isListVisible||""==this.entryElement.value||t.preventDefault(),!this.isListVisible&&this.tags.length>=this.o.maxTags&&!["Backspace","Enter"].includes(t.key))t.preventDefault();else{if(["ArrowDown"].includes(t.key)&&(t.stopPropagation(),t.preventDefault(),!this.isListVisible&&this.getSuggestions()),this.isListVisible&&["ArrowUp","ArrowDown","Enter"].includes(t.key)){var e=this.selectItem(t.key);this.entryElement.value=e?e.textContent:"",this.isListVisible&&("Enter"==t.key&&this.chooseItem(e),t.stopPropagation(),t.preventDefault())}if("Escape"==t.key)return this.chooseItem(null),!1;if(""==this.entryElement.value&&"Backspace"==t.key&&0<this.tags.length)this.tags.pop().remove(),this.updateValue()}}keyupEvent(t){["ArrowDown"," "].includes(t.key)&&(t.stopPropagation(),t.preventDefault(),!this.isListVisible&&this.getSuggestions()),["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Tab","Enter","Esc","Shift","Control"].includes(t.key)||this.getSuggestions()}blurEvent(){this.wrap.classList.remove("focus"),this.positionDropdown(!1)}focusEvent(){this.wrap.classList.add("focus")}chooseItem(t){null!==t&&this.addTag(t.getAttribute("title"),JSON.parse(t.dataset.value)),this.entryElement.value="",yi(this.dropdownList,"display","none"),this.updateValue(),this.fireChangeEvents(),setTimeout((()=>{this.entryElement.focus()}),50)}updateValue(){var t=[];
1this.valuesArray=[],this.tags.forEach((e=>{t.push(e.dataset.type+":"+e.dataset.value),this.valuesArray.push(e.dataset.value)})),this.inputElement.value=t.join(";")}fireChangeEvents(){}addTag(t,e){if(t&&!this.tags.some((e=>e.textContent==t))){var i=Di("div",{"data-type":e.type,"data-value":t,class:this.o.className+"-item ",title:t,html:`<span class="${this.getPrefixedClass("item-caption")}">${Qe(t)}</span>`},{"user-select":"none"});Ii(Di("span",{class:this.o.className+"-item-delete"},{},"×"),i,"bottom"),this.tags.push(i),Ii(i,this.tagContainer,"bottom")}}selectItem(t){var e=null,i=Array.from(_i(this.dropdownList,"[data-type]"));if(0==i.length)return!1;if(1==i.length)return i[0];if("Escape"==t)return null;i.forEach((function(s){!e&&s.matches(".selected")&&("ArrowUp"==t&&(s.classList.remove("selected"),s.removeAttribute("aria-selected"),e=null===ji(s,"[data-type]")?s||Ci(i,"[data-type]"):ji(s,"[data-type]")),"ArrowDown"==t&&(s.classList.remove("selected"),s.removeAttribute("aria-selected"),e=null===Pi(s,"[data-type]")?s||Ci(i,"[data-type]"):Pi(s,"[data-type]")),("Tab"==t||"Enter"==t)&&(e=s))})),e||(e=i[0]),e.classList.add("selected"),pi(e,"aria-selected","true");var s=zi(e).boundingRect.y-zi(this.dropdownList).boundingRect.y+this.dropdownList.scrollTop,n=zi(this.dropdownList).height,o=zi(e).height;return s<n-o?s<n/2?this.dropdownList.scrollTo(0,0):this.dropdownList.scrollTo(0,s-o):s>n-o&&this.dropdownList.scrollTo(0,s-2*o),e}getSuggestions(){if(this.entryElement.value.length>this.o.minlength&&this.tags.length<this.o.maxTags){if(!this.suggestions||this.suggestions[0]!=this.entryElement.value.trim())if(this.cache[this.o.action+"::"+this.entryElement.value.trim()])this.showSuggestions(this.cache[this.o.action+"::"+this.entryElement.value.trim()]);else{let t={};t[this.o.param||"search"]=this.entryElement.value.trim(),Xi(this.o.action,t).then((t=>{this.suggestions=t,this.cache[this.entryElement.value.trim()]=t,this.showSuggestions(this.suggestions)}))}}else this.dropdownList.innerHTML="",this.positionDropdown(!1)}showSuggestions(t){if(this.dropdownList.innerHTML="",0<Object.keys(t).length){if(Object.keys(t).forEach((e=>{const i=t[e].filter((t=>!this.valuesArray.includes(t.text)));0==i.length||(Ii(this.createHeaderItem(e),this.dropdownList,"bottom"),i.forEach((t=>{Ii(this.createListItem(t),this.dropdownList,"bottom")})))})),0==this.dropdownList.children.length)return void yi(this.dropdownList,"display","none");Ci(this.dropdownList,"[data-type]").classList.add("selected"),this.positionDropdown(!0),this.dropdownList.scrollTo(0,0),yi(this.dropdownList,"display","block"),this.dropdownList.scrollTo(0,0)}else yi(this.dropdownList,"display","none")}positionDropdown(t){var e=this.wrap.getBoundingClientRect(),i=zi(this.dropdownList);yi(this.dropdownList,"width",e.width+"px"),e.top+e.height+i.height<(window.innerHeight||document.documentElement.clientHeight)?$i(this.dropdownList,this.wrap,"bottom-start"):$i(this.dropdownList,this.wrap,"top-start"),xi(this.dropdownList,t?{display:"block",visibility:"visible"}:{display:"none",visibility:"hidden"})}get value(){return this.inputElement.value}set value(t){const e=t.trim().split(";");
1this.tags.forEach((t=>t.remove())),e.forEach(function(t){var e=t.trim().split(":",2),i={text:e[1],type:e[0]};this.addTag(e[1],i)}.bind(this)),this.inputElement.value="",this.updateValue()}getValue(){return this.inputElement.value}createListItem(t){const e=this.entryElement.value,i=t.text;return Di("div",{"data-value":JSON.stringify(t),"data-type":t.type,title:t.text,class:this.o.className+"-listbox-item"},{},i.replace(new RegExp(e,"i"),"<mark>"+i.substr(i.toLowerCase().indexOf(e.toLowerCase()),e.length)+"</mark>"))}createHeaderItem(t){return Di("div",{class:this.o.className+"-listbox-header"},{},Qe(t))}get isListVisible(){return"none"!=this.dropdownList.style.display}},ScrollInOut:bs,CmsForm:ws,FileUpload:class extends cs{static get uiRole(){return"fileupload"}constructor(t,e){super(),this.uploadElement=void 0,this.o={className:"fileupload",max_image_side:2560,thumbnail_side:256,jpg_quality:.85,maxUploads:10,maxFileSize:15728640,maxResizableFileSize:15728640,maxTotalUploadSize:15728640,closeIcon:"×"},Object.assign(this.o,e),"undefined"==typeof FileReader||(this.wrap=t,this.uploadElement=Ci(this.wrap,'input[type="file"][name]'),this.uploadElement.dataset.fieldname=this.uploadElement.getAttribute("name"),this.uploadElement.removeAttribute("name"),xi(this.uploadElement,{opacity:0,position:"absolute",width:0}),this.label=Di("label",{class:this.getPrefixedClass("label")}),Ii(this.label,this.wrap),this.uploadElement.hasAttribute("multiple")?(!this.uploadElement.dataset.maxFiles&&(this.uploadElement.dataset.maxFiles="10"),this.button=Di("button",{class:"button"},{},"Attach Files"),Ii(this.button,this.wrap,"bottom")):(this.button=Di("button",{class:"button"},{},"Attach File"),this.uploadElement.dataset.maxFiles="1",this.o.maxUploads=1,Ii(this.button,this.wrap,"bottom")),this.button.addEventListener("click",function(t){t.preventDefault(),this.uploadElement.click()}.bind(this)),this.thumbnails=Di("div",{class:this.getPrefixedClass("thumbnails")}),Ii(this.thumbnails,this.wrap,"bottom"),this.wrap.addEventListener("click",Fi((function(t,e){t.preventDefault(),e.closest("div").remove()}),"."+this.getPrefixedClass("close"))),this.uploadElement.addEventListener("change",function(){this.addFiles(this.uploadElement,this.thumbnails)}.bind(this)),this.wrap.addEventListener("drop",this.handleFileDrop.bind(this)),this.wrap.addEventListener("dragenter",(()=>{this.wrap.classList.add("dragover")}),!1),this.wrap.addEventListener("dragover",(()=>{this.wrap.classList.add("dragover")}),!1),this.wrap.addEventListener("dragleave",(()=>{this.wrap.classList.remove("dragover")}),!1),["dragover","drop"].forEach((t=>{this.wrap.addEventListener(t,(t=>{t.preventDefault(),t.stopPropagation()}),!1)})))}addFiles(t,e){if(Array.from(t.files).forEach((t=>{if(0!==this.o.maxUploads&&this.count==this.o.maxUploads)return Qi(this.wrap,`<div class="${this.getPrefixedClass("error")}"><div>No more than ${this.o.maxUploads} files can be uploaded at a time using this form.</div><a class="${this.getPrefixedClass("close")}">${this.o.closeIcon}</a></div>`),!1;var i=Math.floor(this.o.maxUploads);if(_i(e,"input[name]").length>=i)return Qi(this.wrap,`<div class="${this.getPrefixedClass("error")}"><div>No more than ${Math.floor(this.o.maxUploads)} files can be uploaded at a time using this form.</div><a class="${this.getPrefixedClass("close")}">${this.o.closeIcon}</a></div>`),!1;var s=new FileReader;s.readAsDataURL(t),s.onload=function(i){var s=ts(t.name),n=ts(t.name.split(".",2).pop());if(t.type.match(/(application\/.*(word|excel|rtf|pdf).*)|text\/.*(plain|excel).*/i))t.size>=this.o.maxFileSize?Qi(this.wrap,`<div class="${this.getPrefixedClass("error")}" data-nice-filesize="Too Large"><div>${s} is too large to accept.</div><a class="${this.getPrefixedClass("close")}">${this.o.closeIcon}</a></div>`):t.size+this.countTotalFileSize()>=this.o.maxTotalUploadSize?Qi(this.wrap,`<div class="${this.getPrefixedClass("error")}" data-nice-filesize="Too Large"><div>The combined size of all your files is too large to accept.</div><a class="${this.getPrefixedClass("close")}">${this.o.closeIcon}</a></div>`):Qi(e,`<div class="${this.getPrefixedClass("file")}" data-filesize="${t.size}" data-nice-filesize="${(t.size/1048576).toFixed(2)}M"><div class="${this.getPrefixedClass("preview-file")}">${n}</div><div class="preview-filename">${s}</div><a class="${this.getPrefixedClass("close")}">${this.o.closeIcon}</a>
1<input type="hidden" name="${this.uploadElement.dataset.fieldname}[]" value="${s}|${i.target.result}"></div>`);else if(t.type.match(/image\/(png|jpe?g|gif)/i))if(t.size>=this.o.maxResizableFileSize)Qi(this.wrap,`<div class="${this.getPrefixedClass("error")}" data-nice-filesize="Too Large"><div>${s} is too large to accept.</div><a class="${this.getPrefixedClass("close")}">${this.o.closeIcon}</a></div>`);else{var o=new Image;o.src=i.target.result;var r=Di("div",{class:`${this.getPrefixedClass("pending")}`,"data-nice-filesize":""},{},`<div class="preview" style="background-color: #ccc;"></div><div class="${this.getPrefixedClass("caption")}">Processing ${s}</div>`);Ii(r,e,"bottom"),o.addEventListener("load",function(){var i=this._resizeImage(o,this.o.max_image_side||2560,t.type),n=this._resizeImage(o,this.o.thumbnail_side||256,t.type);(r.remove(),i.length+this.countTotalFileSize()>=this.o.maxTotalUploadSize)?Qi(this.wrap,`<div class="${this.getPrefixedClass("error")}" data-nice-filesize="Too Large"><div>The combined size of all selected files is too large to accept.</div><a class="${this.getPrefixedClass("close")}">${this.o.closeIcon}</a></div>`):Ii(Di("div",{class:`${this.getPrefixedClass("image")}`,title:s,"data-nice-filesize":(i.length/1048576).toFixed(1)+"MB","data-filesize":i.length},{},`<img class="${this.getPrefixedClass("preview-image")}" src="${n}"></div><div class="${this.getPrefixedClass("caption")}">${s}</div><a class="${this.getPrefixedClass("close")}">${this.o.closeIcon}</a><input type="hidden" name="${this.uploadElement.dataset.fieldname}[]" value="${s}|${i}"></div>`),e,"bottom");o=null}.bind(this))}else Qi(this.wrap,`<div class="${this.getPrefixedClass("error")}"><div>${s} is not a supported file type.</div><a class="${this.getPrefixedClass("close")}">${this.o.closeIcon}</a></div>`)}.bind(this)})),this.uploadElement.value=null,t instanceof HTMLInputElement&&0<t.files.length)throw"Assertion Failed: File input still contains files."}get count(){return _i(this.wrap,'input[type="hidden"][name]').length}countTotalFileSize(){var t=_i(this.wrap,"."+this.o.className+"-thumbnails [data-filesize]"),e=0;return t.forEach((function(t){e+=parseInt(t.dataset.filesize)})),e}handleFileDrop(t){t.preventDefault(),t.stopPropagation(),this.addFiles(t.dataTransfer,this.thumbnails),this.wrap.classList.remove("dragover")}calcSize(t,e,i){var s=Math.max(t/i,e/i);return 1<s?{w:t/s,h:e/s}:{w:t,h:e}}_resizeImage(t,e,i){var s=document.createElement("canvas"),n=this.calcSize(t.width,t.height,e);return s.width=n.w,s.height=n.h,s.getContext("2d").drawImage(t,0,0,n.w,n.h),s.toDataURL({"image/jpeg":"image/jpeg","image/jpg":"image/jpg","image/webp":"image/webp","image/png":"image/png","image/gif":"image/png"}[i]||"image/jpeg",this.o.jpg_quality)}},ScrollMonitor:ys,LazyLoader:xs,Autocomplete:class extends cs{static get uiRole(){return"autocomplete"}constructor(t,e){super(),this.ghostElement=void 0,this.inputElement=null,this._lastSelection=null,this.o={datalist:null,dataurl:null,searchparam:null,minlength:3,className:"typeahead",preserveEnteredCase:!1,forceChoice:!1},Object.assign(this.o,e),this.inputElement=Ci(t,"input"),this.inputElement.setAttribute("autocomplete","off"),this.wrap=Di("div",{class:this.o.className},{position:"relative"}),Si(this.wrap,this.inputElement),this.ghostElement=this.inputElement.cloneNode(!0),function(t){for(var e=arguments.length,i=Array(1<e?e-1:0),s=1;s<e;s++)i[s-1]=arguments[s];if(ci(t))t.forEach((t=>{for(const e of i)t.removeAttribute(e)}));else if(t instanceof Element)for(const e of i)t.removeAttribute(e)}(this.ghostElement,"name","id","data-ui-role","placeholder","value"),this.ghostElement.setAttribute("readonly",""),this.ghostElement.setAttribute("disabled",!0),this.ghostElement.setAttribute("tabindex","-1"),xi(this.ghostElement,{"background-color":"transparent","border-color":"transparent",position:"absolute",top:"0px",disabled:"true",left:"0px",width:"100%","pointer-events":"none",opacity:.3}),Ii(this.ghostElement,this.wrap),this.listElement=Di("div",{class:this.listClassName}),Ii(this.listElement,this.wrap,"bottom"),this.hideList(),m(this.o.datalist)?this.get
1Suggestions=this.getStaticSuggestions:null===this.o.dataurl?this.getSuggestions=function(){}:(this.cache=[],this.getSuggestions=li(this.getRemoteSuggestions.bind(this),300,{leading:!1,trailing:!0})),this.eventHandlers={keyDown:this.keyDown.bind(this),keyUp:this.keyUp.bind(this),mouseEnter:this.hoverItem.bind(this),mouseLeave:this.unhoverItem.bind(this),blur:li((()=>{this.showingList&&this.hideList(!1)}),400,{leading:!1,trailing:!0}).bind(this),reflow:li((()=>{this.showingList&&this.showList()}),150,{leading:!0,trailing:!0}).bind(this)},this.inputElement.addEventListener("keydown",this.eventHandlers.keyDown),this.inputElement.addEventListener("keyup",this.eventHandlers.keyUp),this.inputElement.addEventListener("blur",this.eventHandlers.blur),this.listElement.addEventListener("click",Fi((function(t,e){this.chooseItem(e)}),"*."+this.itemClassName).bind(this)),window.addEventListener("resize",this.eventHandlers.reflow),this.inputElement.setAttribute("initialised",performance.now().toString()||"1")}detach(){window.removeEventListener("resize",this.eventHandlers.reflow)}keyDown(t){const e=t.key.toLowerCase();if("escape"==e)return this.o.forceChoice&&(this.inputElement.value=""),void this.hideList();if("arrowup"==e&&t.preventDefault(),this.showingList&&-1!=["arrowup","arrowdown","tab","enter"].indexOf(e)&&!t.shiftKey){t.stopPropagation(),t.preventDefault();var i=this.highlightItem(e);this._lastSelection=i,i&&-1!=["enter","tab"].indexOf(e)&&this.chooseItem(i)}}keyUp(t){const e=t.key.toLowerCase();this.inputElement.value.length<this.o.minlength&&this.showingList&&this.hideList(),this.inputElement.value.length>=this.o.minlength&&-1==["arrowup","arrowleft","arrowright","tab","enter","escape","home","end"].indexOf(e)&&("arrowdown"!=e||"arrowdown"==e&&!this.showingList)&&this.getSuggestions()}hoverItem(t){const e=t.target;e&&(mi(Array.from(this.listElement.children),"aria-selected"),ui(Array.from(this.listElement.children),"selected"),e.classList.add("selected"),e.setAttribute("aria-selected","true"),this.ghostElement.value=e.textContent&&e.textContent.toLowerCase().startsWith(this.value.toLowerCase())?this.value+e.textContent.substring(this.value.length):""),this._lastSelection=e}unhoverItem(t){const e=t.target;e&&(e.classList.remove("selected"),e.removeAttribute("aria-selected","true"))}highlightItem(t){let e=null;var i=Li(this.listElement);return 0!=i.length&&(i.forEach((s=>{!e&&s.classList.contains("selected")&&(["arrowup","arrowdown"].includes(t)&&(s.classList.remove("selected"),s.removeAttribute("aria-selected")),"arrowup"===t?e=s==i[0]?null:ji(s,"."+this.itemClassName)||i[0]:"arrowdown"===t?e=Pi(s,"."+this.itemClassName)||i[i.length-1]:("tab"===t||"enter"===t)&&(e=s))})),e||"arrowdown"!=t||(e=i[0]),e&&(this.listElement&&(mi(Array.from(this.listElement.children),"aria-selected"),ui(Array.from(this.listElement.children),"selected")),e.classList.add("selected"),e.setAttribute("aria-selected","true"),(this.listElement.scrollTop>e.offsetTop||this.listElement.scrollTop+this.listElement.offsetHeight<e.offsetTop+e.offsetHeight)&&this.listElement.scrollTo(0,e.offsetTop),this.ghostElement.value=e.textContent&&e.textContent.toLowerCase().startsWith(this.value.toLowerCase())?this.value+e.textContent.substring(this.value.length):""),e)}hideList(){let t=!(0<arguments.length&&void 0!==arguments[0])||arguments[0];Ki(this.listElement),!t&&this.o.forceChoice&&(null==this._lastSelection?this.inputElement.value="":(this.chooseItem(this._lastSelection,!1),this._lastSelection=null)),this.showingList=!1,xi(this.listElement,{visibility:"hidden",left:"-99vw",top:null,bottom:null}),this.ghostElement.value=""}chooseItem(t){let e=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];this.inputElement.value=this.o.preserveEnteredCase&&t.textContent.toLowerCase().startsWith(this.value.toLowerCase)?this.value+t.textContent.substring(this.value.length):t.getAttribute("data-value"),e&&this.hideList(!1),this.inputElement.focus(),this.inputElement.dispatchEvent(new Event("change"))}getStaticSuggestions(){this.buildList(this.o.datalist)}async getRemoteSuggestions(){if(!this.loadingSuggestions)if(this.cache[this.value.toLowerCase()])this.buildList(this.cache[this.value.toLowerCase()]);else{let t={};null!==this.o.searchparam&&(t[this.o.searchparam]=this.value),this.loadingSuggestions=!0;const e=await Xi(this.o.dataurl,t);this.loadingSuggestions=!1,this.cache[this.value.toLowerCase()]=e,this.buildList(e)}}buildList(t){let e=new DocumentFragment,i=new RegExp("("+this.value+")","gi");null===this.o.searchparam&&(t=t.filter((t=>t.match(i)))),t.forEach((t=>{const s=Di("div",{class:this.itemClassName,"data-value":t},{},t.replace(i,"<mark>$1</mark>"));e.appendChild(s),s.addEventListener("mouseenter",this.eventHandlers.mouseEnter),s.addEventListener("mouseleave",this.eventHandlers.mouseLeave)})),0<t.length?(Ki(this.listElement),this.listElement.appendChild(e),this.showList()):this.hideList()}
1showList(){xi(this.listElement,{bottom:"auto",top:"100%",left:0}),zi(this.listElement).boundingRect.bottom>(window.innerHeight||document.documentElement.clientHeight)&&xi(this.listElement,{bottom:"100%",top:"auto"}),this.listElement.style.visibility=null,this.showingList=!0}get listClassName(){return this.o.className+"-list"}get itemClassName(){return this.o.className+"-list-item"}get value(){return this.inputElement.value}},Mutex:Es,Metrics:{},basePath:window.cowtools_basepath||"/js/cowtools",env:window.cowtools_env||"prod"},window.Util={addClass:di,addEvent:bi,asEventDelegate:Fi,cancelFrame:function(t){if(window.cancelAnimationFrame)return window.cancelAnimationFrame.call(window,t);let e=Bi("CancelAnimationFrame")||Bi("CancelRequestAnimationFrame")||{};t&&e.call(window,t)},clamp:function(t,e,i){return!e instanceof Number&&(e=parseInt(e)),Math.min(Math.max(e,t),i)},createElement:Di,findElement:Vi,forceReflow:Oi,getAncestors:Ti,getChildren:Li,getDimensions:zi,getElement:Ci,getElements:_i,getNextSibling:Pi,getPreceedingSibling:ji,getScrollParent:function(t){let e=function(t){return hi(t,"overflow").toString()+hi(t,"overflow-y").toString()+hi(t,"overflow-x").toString()};for(var i=Ti(t),s=0;s<i.length;s++)if(/(auto|scroll)/.test(e(i[s])))return i[s];return document.scrollingElement||document.documentElement},getSibling:Ai,getSiblings:ki,getTransitionDuration:Wi,inject:Ii,inlineCss:Yi,isOffScreen:Ri,limit:Mi,loadCss:async function(t,e){let i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:document.head,s=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return await as(t,"css",i,s).then((()=>{e()}))},loadJs:async function(t,e){let i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:document.head,s=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return await as(t,"js",i,s).then((()=>{e()}))},loadAsset:as,loadAssets:ls,metrics:ns,positionElement:$i,removeAll:Ki,removeAttribute:mi,removeClass:ui,removeEvent:wi,replaceElement:function(t,e){return t.parentNode.insertBefore(e,t),t.parentNode.removeChild(t),t},requestFrame:qi,setAttribute:pi,setAttributes:function(t){let e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if(ci(t))t.forEach((t=>{e.foreach((i=>{t.setAttribute(i,e[i]+"")}))}));else if(t instanceof Element)for(const i in e)t.setAttribute(i,e[i]+"");return t},setStyles:xi,throttle:li,toPixels:Gi,unsetStyles:Ei,wrapElement:Si},window.addEventListener("DOMContentLoaded",(()=>{Yi(':root{--popup-background:#fff;--popup-text:#000;--highlighted-item:rgba(102,187,204,0.1)}.carousel{user-select:none}.carousel-thumbs>*{cursor:pointer}.carouselloop-wrap{user-select:none}.carouselloop-thumbs>*{cursor:pointer}.doubleslider-stop-min,.doubleslider-stop-max{top:0}.doubleslider-stop-min::after,.doubleslider-stop-max::after{content:attr(data-label)}[collapsible]{overflow:hidden}[collapsible].transitioning-y{height:0;overflow:hidden;visibility:visible;transition-property:height,padding,margin,border-width,opacity;transition-duration:.3s}[collapse-target]{user-select:none;cursor:pointer}.fileupload-thumbnails{display:block}.fileupload-image,.fileupload-file{border:1px solid #ccc;margin-bottom:.25rem;display:grid;gap:.5rem;grid-template-columns:80px 1fr 3rem;grid-template-rows:minmax(3rem, min-content);place-content:center}.fileupload-thumbnails .preview-file{display:grid;place-content:center center;height:auto;aspect-ratio:1.33333333;background:#ccc;position:relative;color:#fff}.fileupload-preview-file{text-align:center;display:flex;align-items:center;justify-content:center;text-transform:uppercase;font-size:.8em}.fileupload-thumbnails .preview-filename{overflow:hidden;display:flex;align-items:center;justify-content:space-between}.fileupload-image img{display:block;width:100%;height:auto;aspect-ratio:1.33333333;object-fit:cover}.fileupload-caption,.fileupload-close{overflow:hidden;display:flex;align-items:center;justify-content:space-between}.fileupload-error{display:grid;gap:.5rem;grid-template-columns:1fr 3rem;grid-template-rows:minmax(3rem, min-content);place-content:center center;width:100%;height:auto;background:#c00;position:relative}.fileupload-error>div{display:flex;align-items:center;padding-left:.5rem}.fileupload-error+.fileupload-error{margin-top:.25rem}.fileupload-caption{padding:0 1rem 0}.fileupload-close{justify-content:center;font-size:2em;color:inherit;font-style:inherit;line-height:1;width:100%;cursor:pointer}.fileupload-close i.delete{font-style:inherit}.panbox-loading{opacity:.5}.panbox-loading::before{content:attr(data-loading);position:absolute;top:50%;left:50%;width:100%}.cke_widget_element [data-bg-src],.cke_widget_element[data-bg-src],.cke_widget_element img[data-src]{opacity:1}[data-bg-src],img[data-src][src],img[data-src]:not([src]){transition:opacity .5s;opacity:0}
1[data-bg-src=""],img[data-src=""][src],img[src][data-loadstate="loaded"]{transition:opacity .5s;opacity:1}.typeahead .typeahead-list{position:absolute;background-color:var(--popup-background, #fff);color:var(--popup-text, #000);padding:.5rem}.typeahead .typeahead-list-item{display:block;padding:.25rem 1rem}.typeahead .typeahead-list-item[aria-selected="true"]{background-color:var(--highlighted-item, AccentColor)}'),Oi(document.body),Object.values(window.CowTools).forEach((t=>{t.attach instanceof Function&&(t.attach(),"dev"===window.CowTools.env&&console.info("attach",t,performance.now()))}));const t=()=>{window.CowTools.Metrics=ns()};t(),window.addEventListener("resize",t),window.dispatchEvent(new CustomEvent("cowtoolsReady",{bubbles:!1,cancelable:!1})),document.documentElement.classList.add("ð")}))}();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.