@webqit/oohtml 1.8.35 → 1.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Binary file
@@ -1,2 +1,2 @@
1
- !function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=76)}([function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return s.a})),n.d(e,"d",(function(){return a.a})),n.d(e,"e",(function(){return c.a})),n.d(e,"f",(function(){return u.a})),n.d(e,"g",(function(){return l.a})),n.d(e,"h",(function(){return r.a})),n.d(e,"i",(function(){return h.a})),n.d(e,"j",(function(){return d.a})),n.d(e,"k",(function(){return f.a}));var r=n(2),o=function(t){return typeof t};function i(t,...e){globalThis.WebQitInternalsRegistry||(globalThis.WebQitInternalsRegistry=new Map);var n,r,o=globalThis.WebQitInternalsRegistry.get(t);if(!o){if(o=new Map,!1===e[0])return o;globalThis.WebQitInternalsRegistry.set(t,o)}for(;n=e.shift();)if((r=o)&&!(o=o.get(n))){if(o=new Map,!1===e[0])return o;r.set(n,o)}return o}var s=n(1),a=(n(25),n(50)),c=(n(41),n(3)),u=(n(24),n(18)),l=n(10),h=(n(33),n(14)),d=(n(42),n(21),n(5)),f=n(6);n(7),n(9),n(20);new Map;n(19)},function(t,e,n){"use strict";e.a=function(t){return Array.isArray(t)}},function(t,e,n){"use strict";e.a=function(t){return!Array.isArray(t)&&"object"==typeof t&&t}},function(t,e,n){"use strict";var r=n(21);e.a=function(t){return Object(r.a)(t)||t&&"[object function]"==={}.toString.call(t)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r.a})),n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return s.a})),n.d(e,"d",(function(){return a})),n.d(e,"e",(function(){return i.a})),n.d(e,"f",(function(){return u.a})),n.d(e,"g",(function(){return l.a})),n.d(e,"h",(function(){return c.a})),n.d(e,"i",(function(){return h.a})),n.d(e,"j",(function(){return d.a}));var r=n(36);var o=function(t,e){return t.reduce((t,n,r)=>t||e(n,r),!1)};n(32),n(22);n(6),n(3),n(28);var i=n(8),s=n(55);function a(t,e,n=null){return n||!1!==n&&t.dotSafe&&e.dotSafe?t.join(".")===e.join("."):t.length===e.length&&t.reduce((t,n,r)=>t&&n===e[r],!0)}var c=n(37),u=(n(16),n(29),n(1),n(2),n(25),n(18),n(52)),l=n(7);n(34),n(20),n(14);var h=n(48),d=n(47)},function(t,e,n){"use strict";var r=n(21);e.a=function(t){return Array.isArray(t)||"object"==typeof t&&t||Object(r.a)(t)}},function(t,e,n){"use strict";e.a=function(t){return arguments.length&&(void 0===t||void 0===t)}},function(t,e,n){"use strict";var r=n(16);e.a=function(t,e=1){return arguments.length>1?Object(r.a)(t.slice().reverse(),e).reverse():Object(r.a)(t.slice().reverse())}},function(t,e,n){"use strict";var r=n(1),o=n(42),i=n(41),s=n(2);e.a=function(t,e=!0){return Object(r.a)(t)?t:!e&&Object(s.a)(t)?[t]:!1!==t&&0!==t&&Object(i.a)(t)?[]:Object(o.a)(t)?Array.prototype.slice.call(t):Object(s.a)(t)?Object.values(t):[t]}},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var r=n(1),o=n(3),i=n(2),s=n(5),a=n(10),c=n(43);function u(t,e,n=!1,l=!1,h=!1){var d=0,f=t.shift();if((Object(a.a)(f)||!0===f||!1===f)&&(d=f,f=t.shift()),!t.length)throw new Error("_merge() requires two or more array/objects.");return t.forEach((t,p)=>{(Object(s.a)(t)||Object(o.a)(t))&&(n?Object(c.a)(t):Object.getOwnPropertyNames(t)).forEach(o=>{if(e(o,f,t,p)){var s=f[o],c=t[o];if((Object(r.a)(s)&&Object(r.a)(c)||Object(i.a)(s)&&Object(i.a)(c))&&(!0===d||d>0))f[o]=Object(r.a)(s)&&Object(r.a)(c)?[]:{},u([Object(a.a)(d)?d-1:d,f[o],s,c],e,n,l,h);else if(Object(r.a)(f)&&Object(r.a)(t))l?f[o]=c:f.push(c);else try{h?Object.defineProperty(f,o,Object.getOwnPropertyDescriptor(t,o)):f[o]=t[o]}catch(t){}}})}),f}},function(t,e,n){"use strict";var r=n(18);e.a=function(t){return Object(r.a)(t)||!0!==t&&!1!==t&&null!==t&&""!==t&&!isNaN(1*t)}},,function(t,e,n){"use strict";n.d(e,"a",(function(){return r.a})),n.d(e,"b",(function(){return o.a})),n.d(e,"c",(function(){return u})),n.d(e,"d",(function(){return l.a}));n(17);var r=n(40);n(35),n(1),n(2),n(3);var o=n(20),i=(n(38),n(5)),s=n(8);n(16),n(14);var a=n(6),c=n(24),u=function(t,e,n={},r={}){e=Object(s.a)(e).slice();for(var o=t;!Object(a.a)(o)&&!Object(c.a)(o)&&e.length;){var u=e.shift();if(!(n.get?n.get(o,u):Object(i.a)(o)?u in o:o[u]))return void(r.exists=!1);o=n.get?n.get(o,u):o[u]}return r.exists=!0,o};n(43),n(44),n(9),n(7);var l=n(19);n(34),n(10)},function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var r=n(14),o=n(6),i=n(3),s=n(8),a=n(29),c=n(16),u=n(7),l=n(19),h=n(38),d=n(35);class f{static lex(t,e,n={}){if(!Object(r.a)(t+=""))throw new Error("Argument1 must be a string!");var o=t=>({delims:t.delims.slice(),options:Object(d.a)(t.options),nesting:t.nesting.slice(),maxDepth:t.maxDepth,comments:t.comments.slice(),tokens:t.tokens.slice(),matches:t.matches.slice(),matchesi:Object(d.a)(t.matchesi)});if(f.$cache[t]&&!1!==n.cache)for(var i=0;i<f.$cache[t].length;i++){var s=f.$cache[t][i];if(Object(h.a)(s.delims,e))return o(s)}var a=new f(t,n).lex(e);return!1!==n.cache&&(f.$cache[t]=f.$cache[t]||[],f.$cache[t].push(a)),o(a)}static split(t,e,n){return f.lex(t,e,n).tokens}static match(t,e,n){return f.lex(t,e,n).matches}constructor(t,e){if(!Object(r.a)(t))throw new Error("Lexer requires the first argument to be a string.");this.$str=t,this.$options=e||{},this.$options.blocks||(this.$options.blocks=f.$blocks),this.$options.quotes||(this.$options.quotes=f.$quotes),this.$options.comments||(this.$options.comments=f.$comments)}lex(t,e){for(var n={delims:Object(s.a)(t),options:Object(l.a)(!0,{},this.$options,e||{}),nesting:[],maxDepth:0,comments:[],tokens:[],matches:[],matchesi:{}},r=0;"number"==typeof r;)r=this._evalCharsAt(n,r);if(n.nesting.length)throw new Error("Error parsing the string: "+this.$str+". Unterminated blocks: "+Object(a.a)(n.nesting).join(", "));return n}_evalCharsAt(t,e){if(!(e>=this.$str.length)){var n=1,r={},o={},i={};if(t.openComment||(o=this._testQuotes(t,e)),t.openQuote||(r=this._testComments(t,e)),t.openComment||r.ending)if(t.nesting.length||i.ending)this._push(t,this.$str[e]);else n=(a=r.starting||r.ending||this.$str[e]).length,this._push(t,a,"comments",r.starting);else if(t.openQuote||o.ending)this._push(t,this.$str[e]);else{if(t.options.limit&&t.matches.length===t.options.limit)return this._push(t,this.$str[e]),e+1;i=this._testNesting(t,e);i=this._testNesting(t,e);var s=this._testChars(t.options.stopChars||[],t,e);if(!t.nesting.length&&!1!==s)return t.options.stopChar=s,void(t.options.stopCharForward=this.$str.substr(e));if(t.delims.length)if(t.nesting.length||i.ending){var a;n=(a=i.starting||i.ending||this.$str[e]).length,this._push(t,a)}else{this._push(t,"");var c=this._testChars(t.delims,t,e);if(!1!==c&&(t.matches.push(c),t.matchesi[e]=c,n=c.length||1,!t.options.preserveDelims)){var u=e+(c.length||1);return u===this.$str.length&&this._push(t,""),u}this._push(t,c||this.$str[e])}else 2===t.nesting.length&&i.starting?(t.matches.push(null),this._push(t,i.starting),n=i.starting.length):!t.nesting.length&&i.ending?(this._push(t,i.ending),n=i.ending.length,t.matches.push(null)):this._push(t,this.$str[e])}return e+n}}_testQuotes(t,e){var n={};return(t.options.quotes||[]).forEach(r=>{this.$str.substr(e,1)===r&&(t.openQuote?r===t.openQuote&&(t.openQuote=!1,n.ending=r):(t.openQuote=r,n.starting=r))}),n}_testComments(t,e){var n={};return(t.options.comments||[]).forEach(r=>{if(t.openComment){if(Object(u.a)(r)===Object(u.a)(t.openComment)){var o=Object(u.a)(r);this.$str.substr(e).startsWith(o)&&(t.openComment=!1,n.ending=o)}}else{var i=Object(c.a)(r);this.$str.substr(e).startsWith(i)&&(t.openComment=r,n.starting=i)}}),n}_testNesting(t,e){var n={};return(t.options.blocks||[]).forEach(r=>{var o=Object(c.a)(r);if(this.$str.substr(e).startsWith(o))t.nesting=t.nesting.concat([r]),n.starting=o;else if(t.nesting.length&&Object(u.a)(r)===Object(u.a)(Object(u.a)(t.nesting))){var i=Object(u.a)(r);this.$str.substr(e).startsWith(i)&&(t.nesting=t.nesting.slice(0,-1),n.ending=i)}}),t.maxDepth=Math.max(t.maxDepth,t.nesting.length),n}_testChars(t,e,n){for(var r=0;r<t.length;r++){var o=t[r];if(Object(i.a)(o)){var s=o(this.$str.substr(0,n),this.$str.substr(n),e.tokens.slice());if(!1!==s)return s}if(e.options.useRegex){var a=this.$str.substr(n).match(new RegExp("^"+o,!0!==e.options.useRegex?e.options.useRegex:""));if(a)return a[0]}if(!e.options.ci&&this.$str.substr(n,o.length)===o||e.options.ci&&this.$str.substr(n,o.length).toLowerCase()===o.toLowerCase())return o}return!1}_push(t,e,n="tokens",r=!1){var i=t.matches.length;if(Object(o.a)(t.tokens[i])&&(t.tokens[i]=""),"comments"===n){t.tokens[i].comments||(t.tokens[i]=new String(t.tokens[i]),t.tokens[i].comments=[]);var s=t.tokens[i].comments.length-(!t.tokens[i].comments.length||r?0:1);t.tokens[i].comments[s]=(t.tokens[i].comments[s]||"")+e}else{t.tokens[i].comments;t.tokens[i]=t.tokens[i]+e}}split(t,e,n){return this.lex(e,n).tokens}match(t,e,n){return this.lex(e,n).matches}regParse(t,e){return this.lex(t,Object(l.a)({useRegex:!0},e||{}))}regSplit(t,e){return this.regParse(t,e).tokens}regMatch(t,e){return this.regParse(t,e).matches}}f.$blocks=[["(",")"],["[","]"],["{","}"]],f.$quotes=['"',"'","`"],f.$comments=[["/*","*/"],["//","\n"]],f.$cache=Object.create(null)},function(t,e,n){"use strict";e.a=function(t){return t instanceof String||"string"==typeof t&&null!==t}},,function(t,e,n){"use strict";e.a=function(t,e=1){var n=0;t.forEach(t=>{n++});var r=t.slice(t.length-n,e);return arguments.length>1?r:r[0]}},function(t,e,n){"use strict";var r=n(1),o=n(2),i=n(5),s=n(25),a=n(20);e.a=function(t,e,n=!0,c=!0,u=!1,l=!1){if(Object(r.a)(t)&&Object(r.a)(e)){var h=[],d=!0;return t.forEach(t=>{if(d){var f=!1;Object(a.a)(e,(e,s)=>{(!f||c&&Object(i.a)(t))&&(f=n(t,s),(Object(r.a)(f)&&!f.length||Object(o.a)(f)&&!Object.keys(f).length)&&(f=!1),Object(i.a)(f)&&c&&(t=f))}),Object(i.a)(f)?h.push(c?f:t):Object(s.a)(f)?u&&!f||!u&&f?h.push(t):l&&(d=!1):h.push(f)}}),h}if(Object(o.a)(t)&&Object(o.a)(e)){h={},d=!0;return Object.keys(t).forEach(a=>{if(d){var f=n(t[a],e[a]);(Object(r.a)(f)&&!f.length||Object(o.a)(f)&&!Object.keys(f).length)&&(f=!1),Object(i.a)(f)?h[a]=c?f:t[a]:Object(s.a)(f)?u&&!f||!u&&f?h[a]=t[a]:l&&(d=!1):h[a]=f}}),h}}},function(t,e,n){"use strict";e.a=function(t){return t instanceof Number||"number"==typeof t}},function(t,e,n){"use strict";var r=n(9);e.a=function(...t){return Object(r.a)(t,(t,e,n)=>!0,!1,!1,!1)}},function(t,e,n){"use strict";var r=n(5),o=n(10);e.a=function(t,e){var n=void 0;return Object(r.a)(t)&&Object.keys(t).forEach((r,i)=>{!1!==n&&(n=e(Object(o.a)(r)?parseFloat(r):r,t[r],i))}),n}},function(t,e,n){"use strict";e.a=function(t){return"function"==typeof t}},function(t,e,n){"use strict";function r(t,e,n=null,r=!1){return e.length>t.length?-1:("number"==typeof n?r?t.slice(0,n+1+(n<0?t.length:0)):t.slice(n):t).reduce((t,n,o)=>{var[i,s,a]=t;if(!r&&i>-1)return[i,s,a];var c=a+1,u=n===e[c]?0===c?[o,0]:[s,c]:[-1,-1];return u[1]===e.length-1&&(u[1]=-1,u[0]>-1)?[u[0]].concat(u):[i].concat(u)},[-1,-1,-1])[0]+(r||"number"!=typeof n?0:n>-1?n:t.length-n)}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";e.a=function(t,e,n=!1){if(""==e)return t;var r=n?t.lastIndexOf(e):t.indexOf(e);return-1===r?"":t.substr(r+e.length)}},function(t,e,n){"use strict";e.a=function(t){return null===t||""===t}},function(t,e,n){"use strict";e.a=function(t){return!0===t||!1===t}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r.a})),n.d(e,"b",(function(){return o.a})),n.d(e,"c",(function(){return i.a})),n.d(e,"d",(function(){return s.a})),n.d(e,"e",(function(){return a.a}));var r=n(23),o=n(32),i=n(45),s=n(30),a=n(27)},function(t,e,n){"use strict";e.a=function(t,e,n){return t.startsWith(e)&&t.endsWith(n)}},function(t,e,n){"use strict";e.a=function(t,...e){return e.forEach(e=>{t.indexOf(e)<0&&t.push(e)}),t}},function(t,e,n){"use strict";var r=n(1),o=n(2),i=n(10);const s=function(t,e=1,n=!0){return!Object(i.a)(e)||e<=0?t:(!Object(r.a)(t)&&Object(o.a)(t)&&n&&(t=Object.values(t)),Object(r.a)(t)?t.reduce((t,i)=>Object(r.a)(i)||Object(o.a)(i)&&n?t.concat(s(Object(r.a)(i)?i:Object.values(i),e-1,n)):t.concat(i),[]):t)};e.a=s},function(t,e,n){"use strict";var r=n(23),o=n(45);e.a=function(t,e,n){return Object(o.a)(Object(r.a)(t,e),n)}},function(t,e,n){"use strict";var r=function(t){return!Array.isArray(t)&&"object"==typeof t&&t};var o=function(){if(!(r(this)&&this.window||"undefined"!=typeof window))throw new Error("A window context is required.");const t=r(this)&&this.window?this.window:window;if(t.WebQit||(t.WebQit={}),!t.WebQit.window){let e,n;Object.defineProperty(t.WebQit,"window",{get:()=>t}),Object.defineProperty(t.WebQit,"vendor",{value:{getName:()=>(e||(e=function(t){if(void 0!==t.InstallTrigger)return"firefox";if(/constructor/i.test(t.HTMLElement)||"[object SafariRemoteNotification]"===(!t.safari||void 0!==t.safari&&t.safari.pushNotification).toString())return"safari";var e=!(!t.chrome||!t.chrome.webstore&&!t.chrome.runtime),n=e&&-1!=t.navigator.userAgent.indexOf("Edg"),r=!!t.opr&&!!t.opr.addons||!!t.opera||t.navigator.userAgent.indexOf(" OPR/")>=0,o=!!t.document.documentMode,i=!o&&!!t.StyleMedia;return(e||r)&&t.CSS,i?"edge":o?"ie":r?"opera":n?"ie-chromium":e?"chrome":"unknown"}(t)),e),getPrefix:()=>(n||(n=function(t){var e=t.getComputedStyle(t.document.documentElement,""),n=(Array.prototype.slice.call(e).join("").match(/-(moz|webkit|ms)-/)||""===e.Olink&&["","o"])[1];return{api:("WebKit|Moz|Ms|O".match(new RegExp("("+n+")","i"))||[])[1],prefix:n,css:"-"+n+"-"}}(t)),n)}})}return t.WebQit},i=function(t){return"function"==typeof t},s=function(t){return Array.isArray(t)||"object"==typeof t&&t||i(t)},a=function(t){return function(t){return t instanceof Number||"number"==typeof t}(t)||!0!==t&&!1!==t&&null!==t&&""!==t&&!isNaN(1*t)};class c{constructor(t,e=!0){this.window=t,this.async=e,this.readCallbacks=[],this.writeCallbacks=[],this._run()}_run(){this.window.requestAnimationFrame(()=>{this.readCallbacks.forEach((t,e)=>{t&&!t()&&(this.readCallbacks[e]=null)}),this.writeCallbacks.forEach((t,e)=>{t&&!t()&&(this.writeCallbacks[e]=null)}),this._run()})}onread(t,e=!1){if(e)return new Promise((e,n)=>{!1===this.async?t(e,n):this.readCallbacks.push(()=>{t(e,n)})});!1===this.async?t():this.readCallbacks.push(t)}onwrite(t,e=!1){if(e)return new Promise((e,n)=>{!1===this.async?t(e,n):this.writeCallbacks.push(()=>{t(e,n)})});!1===this.async?t():this.writeCallbacks.push(t)}cycle(t,e,n){this.onread(()=>{var r=t(n);if(r){var o=r=>{this.onwrite(()=>{var o=e(r,n);if(o){var i=n=>{this.cycle(t,e,n)};o instanceof Promise?o.then(i):i()}})};r instanceof Promise?r.then(o):o()}})}}var u=function(t){return t instanceof String||"string"==typeof t&&null!==t},l=function(t){return Array.isArray(t)},h=function(t){return arguments.length&&(void 0===t||void 0===t)},d=function(t){return null===t||""===t},f=function(t,e=!0){return l(t)?t:!e&&r(t)?[t]:!1!==t&&0!==t&&function(t){return d(t)||h(t)||!1===t||0===t||s(t)&&!Object.keys(t).length}(t)?[]:function(t){return!u(t)&&!h(t.length)}(t)?Array.prototype.slice.call(t):r(t)?Object.values(t):[t]},p=function(t){const e=o.call(this);e.DOM.isDOMReady||"complete"===e.window.document.readyState?t(e.window):(e.window.domReadyCallbacks||(e.window.domReadyCallbacks=[],e.window.document.addEventListener("DOMContentLoaded",()=>{e.DOM.isDOMReady=!0,e.window.domReadyCallbacks.splice(0).forEach(t=>t(e.window))},!1)),e.window.domReadyCallbacks.push(t))};class m{constructor(t){this.window=t}onAdded(t,e,n={}){return n.on="added",this.onPresenceChange(t,(t,n,r,o,i)=>{e(t,n,r,o,i)},n)}onRemoved(t,e,n={}){return n.on="removed",this.onPresenceChange(t,(t,n,r,o,i)=>{e(t,n,r,o,i)},n)}onPresent(t,e,n={}){p.call(this.window,()=>{this.window.MutationObserver&&this.onAdded(t,(t,n)=>{t.forEach(t=>e(t,n))},n),u(t)?f(this.window.document.querySelectorAll(t)).forEach(t=>e(t,1)):t.parentNode&&e(t,1)})}onAbsent(t,e,n={}){p.call(this.window,()=>{this.window.MutationObserver&&onRemoved(t,(t,n)=>{t.forEach(t=>e(t,n))},n),u(t)?0===f(this.window.document.querySelectorAll(t)).length&&e(null,0):t.parentNode||e(t,0)})}onPresenceChange(t,e,n={}){t=f(t,!1);var r=(t,e)=>(e.$$searchCache||(e.$$searchCache=new Map),t.reduce((t,r)=>{var o;return e.$$searchCache.has(r)?o=e.$$searchCache.get(r):(o=((t,e)=>{if(e=e.filter(t=>t.matches),u(t)){var r=e.filter(e=>e.matches(t));if(!1!==n.observeIndirectMutation&&(r=e.reduce((e,n)=>e.concat(f(n.querySelectorAll(t))),r)).length)return r}else{if(e.includes(t))return[t];if(!1!==n.observeIndirectMutation&&e.length)for(var o=t;o=o.parentNode;)if(e.includes(o))return[t]}})(r,e,u(r))||[],e.$$searchCache.set(r,o)),t.concat(o)},[])),o=new Set,i=new Set,s=(s,a,c)=>{a&&"removed"===n.on||!a&&"added"===n.on||(s=r(t,s)).length&&(n.maintainCallState?(s.forEach(t=>{a?(o.add(t),i.delete(t)):(o.delete(t),i.add(t))}),e(s,a,c,o,i)):e(s,a,c))},a=n.context||this.window.document.documentElement;return this._observe(a,(t,e,r,o)=>{n.ignoreTransients||(s(t,0,!0),s(t.concat(e),1,!0),s(e,0,!0)),s(o,0),s(r,1)})}onAttrChange(t,e,n=[]){var r=new this.window.MutationObserver(e),o={attributes:!0,attributeOldValue:!0};return n&&(o.attributeFilter=n),r.observe(t,o),r}onTreeChange(t,e,n=!1){var r=new this.window.MutationObserver(e),o={childList:!0,subtree:n};return r.observe(t,o),r}onMutation(t,e,n){var r=new this.window.MutationObserver(e);return r.observe(t,n),r}_observe(t,e){if(!b.has(t)){const e=new Set,n=new this.window.MutationObserver(t=>{if(e.size){var n=t.reduce((t,e)=>t.concat(f(e.addedNodes)),[]),r=t.reduce((t,e)=>t.concat(f(e.removedNodes)),[]),o=[],i=[];n=new Set(n),r=new Set(r),n.forEach(t=>{r.has(t)&&(r.delete(t),n.delete(t),t.isConnected?o.push(t):i.push(t))}),n=[...n],r=[...r],e.forEach(t=>t(o,i,n,r))}});n.observe(t,{childList:!0,subtree:!0}),b.set(t,{callbacks:e,observer:n})}const n=b.get(t);return n.callbacks.add(e),{disconnect(){n.callbacks.delete(e)},reconnect(){n.callbacks.add(e)}}}}const b=new Map;var g=function(t){!function(t){t.CSS||(t.CSS={});t.CSS.escape||(t.CSS.escape=t=>t.replace(/([\:@\~\$\&])/g,"\\$1"))}(t),function(t){"isConnected"in t.Node.prototype||Object.defineProperty(t.Node.prototype,"isConnected",{get:function(){return!(this.ownerDocument&&this.ownerDocument.compareDocumentPosition(this)&this.DOCUMENT_POSITION_DISCONNECTED)}})}(t),function(t){t.Element.prototype.matches||(t.Element.prototype.matches=t.Element.prototype.matchesSelector||t.Element.prototype.mozMatchesSelector||t.Element.prototype.msMatchesSelector||t.Element.prototype.oMatchesSelector||t.Element.prototype.webkitMatchesSelector||function(t){for(var e=(this.document||this.ownerDocument).querySelectorAll(t),n=e.length;--n>=0&&e.item(n)!==this;);return n>-1})}(t)};function O(t,e=null,n=!1){const r=o.call(this);if(u(t)){var i;if(t.trim().startsWith("<")){var s=r.window.document.createElement("div");s.innerHTML=t,i=n?f(s.children):s.firstChild}else i=n?f(w.call(this,t,e)):j.call(this,t,e);return i}return t instanceof r.window.Element?n?[t]:t:n?f(t):t}function v(t,e=null){return O.call(this,t,e,!0)}function j(t,e=null,n=!1){const r=o.call(this);e=e||r.window.document;var i,s=n?"querySelectorAll":"querySelector";try{i=e[s](t)}catch(n){try{i=e[s](t.replace(/\:is\(/g,":matches("))}catch(n){try{i=e[s](t.replace(/\:is\(/g,":-webkit-any("))}catch(n){try{i=e[s](t.replace(/\:is\(/g,":-moz-any("))}catch(t){throw t}}}}return i}function w(t,e=null){return j.call(this,t,e,!0)}var y=function(t){return i(t)||t&&"[object function]"==={}.toString.call(t)};var E=function(t,e,n={},r={}){e=f(e).slice();for(var o=t;!h(o)&&!d(o)&&e.length;){var i=e.shift();if(!(n.get?n.get(o,i):s(o)?i in o:o[i]))return void(r.exists=!1);o=n.get?n.get(o,i):o[i]}return r.exists=!0,o},x=function(t,e,n,r={},o={}){const i=(t,n,r)=>o.set?o.set(t,n,r):(a(e[u])&&l(t)?t.push(r):t[n]=r,!0);e=f(e);for(var c=t,u=0;u<e.length;u++){if(!(u<e.length-1))return i(c,e[u],n);if(!c||!s(c)&&!y(c))return!1;var h=E(c,e[u],o);if(!s(h)){if(!1===o.buildTree)return!1;if(h=y(o.buildTree)?o.buildTree(u):a(e[u+1])?[]:{},!i(c,e[u],h))return!1}c=h}},k=function(t,e,n=!1,r={}){e=f(e);var o=!1;do{var i=""===(i=e.pop())?0:i,a=t;e.length&&(a=E(t,e,{},r)),(s(a)||y(a))&&(r.has?r.has(a,i):i in a)&&(r.deleteProperty?o=r.deleteProperty(a,i):r.del?o=r.del(a,i):(delete a[i],o=!0))}while(o&&n&&e.length&&(s(a)||y(a))&&!(r.keys?r.keys(a):Object.keys(a)).length);return o},C=function(t,e,n={}){var r={};return E(t,e,n,r),r.exists};function M(t,e=!1){const n=o.call(this);var i={};return!(i.el=n.window.document.head.querySelector('meta[name="oohtml"]'))&&e&&(i.el=n.window.document.createElement("meta"),i.el.setAttribute("name",t),n.window.document.head.append(i.el)),i.el&&(i.vars=(i.el.getAttribute("content")||"").split(";").filter(t=>t).reduce((t,e)=>{var n=e.split("=").map(t=>t.trim());return x(t,n[0].split("."),"true"===n[1]||"false"!==n[1]&&(a(n[1])?parseInt(n[1]):n[1])),t},{})),i.get=function(t){return E(this.vars,t.split("."))},i.set=function(t,n=null,o=!1){var i=r(t)?t:{[t]:!0===n?"true":n};if(o=arguments.length<3?n:o,Object.keys(i).forEach(t=>{if(!1===i[t])k(this.vars,t.split("."));else if(r(i[t]))Object.keys(i[t]).forEach(e=>{var n=(t+"."+e).split(".");o&&C(this.vars,n)||x(this.vars,n,i[t][e])});else{var e=t.split(".");o&&C(this.vars,e)||x(this.vars,e,i[t])}}),e){const t=(e,n)=>Object.keys(n).reduce((o,i)=>{var s=(e?e+".":"")+i;return r(n[i])?o.push(...t(s,n[i])):o.push(s+"="+n[i]),o},[]);this.el.setAttribute("content",t("",this.vars).join(";"))}return!0},i.defaults=function(t,e=null){return this.set(t,e,!0)},i}e.a=function(){const t=o.call(this);return t.DOM||(t.DOM={},g(t.window),t.DOM.reflow=new c(t.window),t.DOM.mutations=new m(t.window),t.DOM.meta=M.bind(t.window),t.DOM.query=O.bind(t.window),t.DOM.queryAll=v.bind(t.window),t.DOM.ready=p.bind(t.window)),t}},function(t,e,n){"use strict";e.a=function(t,e,n=!1){if(""==e)return t;var r=n?t.lastIndexOf(e):t.indexOf(e);return-1===r?t:t.substr(0,r)}},function(t,e,n){"use strict";var r=n(2);e.a=function(t){return Object(r.a)(t)&&Object.getPrototypeOf(t)===Object.prototype}},function(t,e,n){"use strict";e.a=function(t,e=1){for(var n=[],r=null;n.length<e&&(r=t[Math.floor(Math.random()*t.length)])&&-1===n.indexOf(r);)n.push(r);return arguments.length>1?n:n[0]}},function(t,e,n){"use strict";var r=n(1),o=n(3),i=n(9);e.a=function(t,e=[]){return Object(i.a)([{},t],(t,n,i)=>{if(!Object(o.a)(i[t]))return Object(o.a)(e)?e(t):!Object(r.a)(e)||!e.length||e.indexOf(t)>-1},!1,!1,!1)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));n(23);var r=n(22);function o(t,e,n=null,o=!1){var i=Object(r.a)(t,e,n,o);return-1===i?[]:t.slice(i+e.length)}},function(t,e,n){"use strict";e.a=function(t,e,n=!1){for(var r=t.indexOf(e);r>-1&&(n||!1===n);)t.splice(r,1),n>0&&n--,r=t.indexOf(e);return t}},function(t,e,n){"use strict";var r=n(18),o=n(1),i=n(2),s=(n(5),n(3)),a=n(33),c=n(17);const u=function(t,e,n=!0,l=1){if(Object(o.a)(t)&&Object(o.a)(e)&&t.length!==e.length)return!n;if(Object(i.a)(t)&&Object(i.a)(e)){var h=Object.keys(t),d=Object.keys(e);if(!h.length&&!d.length)return Object(a.a)(t)&&Object(a.a)(e)?n:t===e===n;if(!u(h,d))return!n}if(l>0&&(Object(o.a)(t)&&Object(o.a)(e)||Object(i.a)(t)&&Object(i.a)(e))){var f=Object(c.a)(t,e,(t,e)=>u(t,e,n,l-1),!1,!1,!0);return Object(o.a)(f)?f.length===t.length&&f.length===e.length:Object(i.a)(f)&&Object(i.a)(t)?Object.keys(f).length===Object.keys(t).length&&Object.keys(f).length===Object.keys(e).length:f}return Object(s.a)(n)?n(t,e):Object(r.a)(t)&&Object(r.a)(e)&&isNaN(t)&&isNaN(e)?n:t===e===n};e.a=u},function(t,e,n){"use strict";n.d(e,"a",(function(){return c})),n.d(e,"d",(function(){return u})),n.d(e,"b",(function(){return l})),n.d(e,"c",(function(){return h}));var r=n(31),o=n(26),i=n(4),s=(n(0),n(12)),a=n(13);function c(t,e={}){const n=r.a.call(this);return n.OOHTML||(n.OOHTML={}),n.OOHTML.meta||(n.OOHTML.meta=n.DOM.meta("oohtml",!0)),n.OOHTML.meta.defaults(Object(s.d)(3,t,e)),n.OOHTML.meta}function u(t,e,n,r=null){var o=e.split("#")[0].split("/").map(t=>t.trim()).filter(t=>t);return p(t,o,n,r)}function l(t){var e=a.a.split(t.trim(),[":"]);return[t=e.shift(),e.reduce((t,e)=>{var[n,r]=a.a.split(e.trim(),[]);return t[n]=Object(o.d)(r,"(",")"),t},{})]}function h(t,e){return e=e.split("#")[0].split("/").map(t=>t.trim()).filter(t=>t),!!(t=t.split("#")[0].split("/").map(t=>t.trim()).filter(t=>t)).length&&t.reduce((t,n,r)=>!!t&&a.a.split(n.trim(),["|","+"]).reduce((t,n)=>{var[n,o]=l(n),i=(n=n.trim())===e[r];if(!i&&("deep"in o||"deepest"in o)){var s=e.slice(r+1).reduce((t,e,r)=>t>-1&&"deep"in o?t:e===n?r:t,-1);if(s>-1){e.splice(r,s+1);i=!0}}return t||i},!1),!0)}const d=(t,e)=>a.a.split(t.trim(),["|","+"],{preserveDelims:!0}).reduce((t,n)=>{var r;return(n.startsWith("|")||n.startsWith("+"))&&(r=n.substr(0,1),n=n.substr(1).trim()),t.theEnd||"|"===r&&t.length?(t.theEnd=!0,t):t.concat(e(n.trim()))},[]).filter(t=>t),f=(t,e,n)=>{const r=t=>t.reduce((t,e)=>t.concat(...n(e).values()),[]);return d(e,e=>{var[e,s]=l(e);return t.reduce((t,a)=>{var c=n(a);"*"===e&&(e="("+c.keys().join("+")+")");var u=Object(o.e)(e,"(",")")?f([a],Object(o.d)(e,"(",")"),n):Object(i.e)(c.get(e),!1),l=[];return Object.keys(s).forEach(t=>{if("deep"===t||"deepest"===t)for(var o=[a];("deepest"===t||!u.length)&&(o=r(o)).length;){var i=f(o,`${e}${l.map(t=>`:${t}(${s[t]})`).join("")}`,n);i.length&&(u=i)}else"having"!==t&&"not-having"!==t||(u=u.filter(e=>{var r=d(s[t],t=>n(e,t));return"not-having"===t?!r.length:r.length})),l.push(t)}),t.concat(u)},[])})},p=function(t,e,n,r=null,o=0){if(!e.length)return[];var i,s=e.shift();s.endsWith(".")&&(i=!0,s=s.substr(0,s.length-1).trim());var a=f(t,s,n);if(a.length&&i)return a;if(e.length){var c=p(a,e.slice(),n,r,o+1);return-1===c?r(a,o,!0):c}return r?r(a,o):a}},function(t,e,n){"use strict";var r=n(1),o=n(3),i=n(10),s=n(5),a=n(9);e.a=function(t,e=[],n=!0){var c=0;return Object(i.a)(arguments[0])&&Object(s.a)(arguments[1])&&(c=arguments[0],t=arguments[1],e=arguments[2]||[]),Object(a.a)([c,{},t],(t,n,i)=>Object(o.a)(e)?e(t):!Object(r.a)(e)||!e.length||e.indexOf(t)>-1,!1,!1,n)}},function(t,e,n){"use strict";var r=n(24),o=n(6),i=n(5);e.a=function(t){return Object(r.a)(t)||Object(o.a)(t)||!1===t||0===t||Object(i.a)(t)&&!Object.keys(t).length}},function(t,e,n){"use strict";var r=n(14),o=n(6);e.a=function(t){return!Object(r.a)(t)&&!Object(o.a)(t.length)}},function(t,e,n){"use strict";var r=n(28),o=n(44);e.a=function(t,e){var n=[];return Object(o.a)(t,e).forEach(t=>{Object(r.a)(n,...Object.getOwnPropertyNames(t))}),n}},function(t,e,n){"use strict";var r=n(1);e.a=function(t,e){e=(e=e||Object.prototype)&&!Object(r.a)(e)?[e]:e;var n=[];for(t=t;t&&(!e||e.indexOf(t)<0)&&"default"!==t.name;)n.push(t),t=t?Object.getPrototypeOf(t):null;return n}},function(t,e,n){"use strict";var r=n(32);e.a=function(t,e){return Object(r.a)(t,e,!0)}},,function(t,e,n){"use strict";e.a=function(t){return t.filter((t,e,n)=>n.indexOf(t)===e)}},function(t,e,n){"use strict";function r(t,e,n=null){return n||!1!==n&&t.dotSafe&&e.dotSafe?(t.join(".")+".").startsWith(e.join(".")+"."):e.reduce((e,n,r)=>e&&n===t[r],!0)}n.d(e,"a",(function(){return r}))},,function(t,e,n){"use strict";var r=n(21);e.a=function(t){return Object(r.a)(t)&&/^class\s?/.test(Function.prototype.toString.call(t))}},,function(t,e,n){"use strict";var r=n(1);e.a=function(t,e,n=null){return Object(r.a)(e)?t.filter(t=>n?e.filter(e=>n(t,e)).length:-1!==e.indexOf(t)):[]}},,,function(t,e,n){"use strict";var r=n(1);e.a=function(t,e,n=null){return Object(r.a)(e)?t.filter(t=>n?e.filter(e=>n(t,e)).length:-1===e.indexOf(t)):[]}},,,,,,,,,,,,,,function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(0),o=n(4),i=(n(12),n(31)),s=n(39);function a(t=null,e=!1){const n=i.a.call(this);if(e)return void n.DOM.ready(()=>{a.call(this,t,!1)});const c=n.window,u=n.window.document,l=n.DOM.mutations,h=s.a.call(this,{element:{template:"",export:"export",import:"import"},attr:{moduleid:"name",moduleref:"template",exportid:"name",exportgroup:"exportgroup"},api:{templateClass:"",templates:"templates",exports:"exports",moduleref:"template"}},t),d="template"+(h.get("element.template")?'[is="'+h.get("element.template")+'"]':"")+"["+c.CSS.escape(h.get("attr.moduleid"))+"]";var f=c.HTMLTemplateElement;if(h.get("api.templateClass")){if(!c[h.get("api.templateClass")])throw new Error('The custom element class "'+h.get("api.templateClass")+'" is not defined!');f=c[h.get("api.templateClass")]}const p=(t,e,n)=>{"templatemutation"===t&&(["addedExports","removedExports"].forEach(t=>{Object.defineProperty(e,t,{value:Object.keys(e[t]).map(n=>({name:n,items:e[t][n]}))})}),["addedTemplates","removedTemplates"].forEach(t=>{Object.defineProperty(e,t,{value:Object.keys(e[t]).map(n=>({name:n,item:e[t][n]}))})})),Object.defineProperty(e,"path",{value:n}),u.dispatchEvent(new c.CustomEvent(t,{detail:e}))},m=(t,e)=>{const n=n=>{t.dispatchEvent(new c.CustomEvent(n,{detail:{path:e}}))};var r=t.getAttribute("src");return new Promise((o,i)=>{c.fetch?c.fetch(r).then(t=>t.ok?t.text():Promise.reject(t.statusText)).then(r=>{t.innerHTML=r,n("load"),p("templatecontentloaded",{template:t},e),o(t)}).catch(i=>{console.error("Error fetching the bundle at "+r+". ("+i+")"),t.innerHTML="",n("loaderror"),p("templatecontentloaderror",{template:t},e),o(t)}):(o(),console.error("Error fetching the bundle at "+r+". (window.fetch() not supported by browser.)"))})},b=(t,e,n,i=null,s=!0)=>{const a=(t,i,s,a)=>{var c;if(t.matches)if(t.matches(d)&&(c=t.getAttribute(h.get("attr.moduleid")))&&v(c)){var u=(n?n+"/":"")+c;"removed"===s?(Object(r.b)(e,"oohtml","templates").delete(c),Object(r.b)(e,"oohtml").get("parentTemplate")===e&&Object(r.b)(e,"oohtml").delete("parentTemplate"),i&&(i.removedTemplates[c]=t)):"added"===s&&(Object(r.b)(e,"oohtml","templates").set(c,t),Object(r.b)(t,"oohtml").set("parentTemplate",e),i&&(i.addedTemplates[c]=t)),b(t.content,t,u,s,a)}else{const n=t=>{var n=t.getAttribute(h.get("attr.exportgroup"))||"default";"removed"===s?Object(r.b)(e,"oohtml","exports").has(n)&&(Object(o.h)(Object(r.b)(e,"oohtml","exports").get(n),t),Object(r.b)(e,"oohtml","exports").has(n).length||Object(r.b)(e,"oohtml","exports").delete(n),i&&(i.removedExports[n]||(i.removedExports[n]=[]),i.removedExports[n].push(t))):"added"===s&&(Object(r.b)(e,"oohtml","exports").has(n)||Object(r.b)(e,"oohtml","exports").set(n,[]),Object(r.b)(e,"oohtml","exports").get(n).push(t),i&&(i.addedExports[n]||(i.addedExports[n]=[]),i.addedExports[n].push(t)))};if(t.matches(h.get("element.export"))){var l=t.getAttribute(h.get("attr.exportid"))||"default";Object(o.e)(t.children).forEach(t=>{t.setAttribute(h.get("attr.exportgroup"),l),n(t)})}else n(t)}};e.modulemutationsType=i;const u={addedTemplates:Object.create(null),removedTemplates:Object.create(null),addedExports:Object.create(null),removedExports:Object.create(null)};(Object(o.e)(t.children).forEach(t=>a(t,u,i,s)),s&&p("templatemutation",u,n),"added"!==i||Object(r.b)(e,"oohtml").get("onLiveMode"))||(Object(r.b)(e,"oohtml").set("onLiveMode",!0),e.getAttribute("src")&&!e.content.children.length&&g.push(m(e,n)),l.onAttrChange(e,t=>{t[0].target.getAttribute(t[0].attributeName)!==t[0].oldValue&&m(e,n)},["src"]),new c.MutationObserver(t=>{const e={addedTemplates:Object.create(null),removedTemplates:Object.create(null),addedExports:Object.create(null),removedExports:Object.create(null)};t.forEach(t=>{t.addedNodes.forEach(t=>a(t,e,"added",!0)),t.removedNodes.forEach(t=>a(t,e,"removed",!0))}),p("templatemutation",e,n)}).observe(t,{childList:!0}))};if(h.get("api.templates")in u)throw new Error('document already has a "'+h.get("api.templates")+'" property!');const g=[];if(Object.defineProperty(u,h.get("api.templates"),{get:function(){return O(Object(r.b)(u,"oohtml","templates"))}}),h.get("api.templates")in f.prototype)throw new Error('The "HTMLTemplateElement" class already has a "'+h.get("api.templates")+'" property!');if(Object.defineProperty(f.prototype,h.get("api.templates"),{get:function(){return O(Object(r.b)(this,"oohtml","templates"))}}),h.get("api.exports")in f.prototype)throw new Error('The "HTMLTemplateElement" class already has a "'+h.get("api.exports")+'" property!');Object.defineProperty(f.prototype,h.get("api.exports"),{get:function(){return O(Object(r.b)(this,"oohtml","exports"))}});const O=t=>Object.defineProperties({},Array.from(t.keys()).reduce((e,n)=>(e[n]={get:()=>t.get(n)},e),{})),v=t=>{var e;return!(e=t.match(/([^a-zA-Z0-9\_\-\@])/))||(console.error(`Invalid character "${e}" in the module name: ${t}.`),!1)};if(Object(o.e)(u.querySelectorAll(d)).forEach(async t=>{var e=t.getAttribute(h.get("attr.moduleid"));!t.closest(h.get("element.import"))&&v(e)&&(Object(r.b)(u,"oohtml","templates").set(e,t),b(t.content,t,e,"added",!1))}),l.onPresenceChange(d,async(t,e)=>{const n={addedTemplates:Object.create(null),removedTemplates:Object.create(null),addedExports:Object.create(null),removedExports:Object.create(null)};t.forEach(t=>{var o=t.getAttribute(h.get("attr.moduleid"));!t.closest(h.get("element.import"))&&v(o)&&(e?(Object(r.b)(u,"oohtml","templates").set(o,t),b(t.content,t,o,"added"),n.addedTemplates[o]=t):(Object(r.b)(u,"oohtml","templates").get(o)===t&&Object(r.b)(u,"oohtml","templates").delete(o),b(t.content,t,o,"removed"),n.removedTemplates[o]=t))}),p("templatemutation",n,"")}),l.onPresent(h.get("element.import"),t=>{b(t,t,"","added",!1)}),h.get("api.moduleref")in c.Element.prototype)throw new Error('The "Element" class already has a "'+h.get("api.moduleref")+'" property!');Object.defineProperty(c.Element.prototype,h.get("api.moduleref"),{get:function(){var t;if(!Object(r.b)(this,"oohtml").has("module")&&(t=this.getAttribute(h.get("attr.moduleref")))){var e=(t=>{var e=u.createElement("template");return Object(s.d)([u],t,(function(t,e){var n=Object(r.b)(t,"oohtml","templates");return 1===arguments.length?n:e.startsWith(":")?Object(r.b)(t,"oohtml","exports").get(e.substr(1)):n.get(e)})).forEach(t=>{Object(r.b)(t,"oohtml","templates").forEach((t,n)=>{Object(r.b)(e,"oohtml","templates").set(n,t)}),Object(r.b)(t,"oohtml","exports").forEach((t,n)=>{Object(r.b)(e,"oohtml","exports").has(n)||Object(r.b)(e,"oohtml","exports").set(n,[]),Object(r.b)(e,"oohtml","exports").get(n).push(...t)})}),e})(t);Object(r.b)(this,"oohtml").set("module",e)}return Object(r.b)(this,"oohtml").get("module")}});var j=g.length?"loading":"indeterminate";Object.defineProperty(u,"templatesReadyState",{get:()=>j}),n.DOM.ready.call(n,()=>(g.forEach(t=>{t.catch(t=>{console.warn(t)})}),Promise.all(g).then(()=>{j="complete",u.dispatchEvent(new c.Event("templatesreadystatechange"))})))}},,,,,,,function(t,e,n){"use strict";n.r(e),n(69).a.call(window)}]);
1
+ (()=>{"use strict";function e(e,...t){globalThis.WebQitInternalsRegistry||(globalThis.WebQitInternalsRegistry=new Map);var r,n,s=globalThis.WebQitInternalsRegistry.get(e);if(!s){if(s=new Map,!1===t[0])return s;globalThis.WebQitInternalsRegistry.set(e,s)}for(;r=t.shift();)if((n=s)&&!(s=s.get(r))){if(s=new Map,!1===t[0])return s;n.set(r,s)}return s}function t(e){return Array.isArray(e)}function r(e){return e instanceof String||"string"==typeof e&&null!==e}function n(e){return arguments.length&&(void 0===e||void 0===e)}function s(e){return"function"==typeof e}function o(e){return Array.isArray(e)||"object"==typeof e&&e||s(e)}function i(e){return!Array.isArray(e)&&"object"==typeof e&&e}function a(e,s=!0){return t(e)?e:!s&&i(e)?[e]:!1!==e&&0!==e&&function(e){return function(e){return null===e||""===e}(e)||n(e)||!1===e||0===e||o(e)&&!Object.keys(e).length}(e)?[]:function(e){return!r(e)&&!n(e.length)}(e)?Array.prototype.slice.call(e):i(e)?Object.values(e):[e]}function l(e){return!Array.isArray(e)&&"object"==typeof e&&e}function c(){if(!(l(this)&&this.window||"undefined"!=typeof window))throw new Error("A window context is required.");const e=l(this)&&this.window?this.window:window;if(e.WebQit||(e.WebQit={}),!e.WebQit.window){let t,r;Object.defineProperty(e.WebQit,"window",{get:()=>e}),Object.defineProperty(e.WebQit,"vendor",{value:{getName:()=>(t||(t=function(e){if(void 0!==e.InstallTrigger)return"firefox";if(/constructor/i.test(e.HTMLElement)||"[object SafariRemoteNotification]"===(!e.safari||void 0!==e.safari&&e.safari.pushNotification).toString())return"safari";var t=!(!e.chrome||!e.chrome.webstore&&!e.chrome.runtime),r=t&&-1!=e.navigator.userAgent.indexOf("Edg"),n=!!e.opr&&!!e.opr.addons||!!e.opera||e.navigator.userAgent.indexOf(" OPR/")>=0,s=!!e.document.documentMode,o=!s&&!!e.StyleMedia;return(t||n)&&e.CSS,o?"edge":s?"ie":n?"opera":r?"ie-chromium":t?"chrome":"unknown"}(e)),t),getPrefix:()=>(r||(r=function(e){var t=e.getComputedStyle(e.document.documentElement,""),r=(Array.prototype.slice.call(t).join("").match(/-(moz|webkit|ms)-/)||""===t.Olink&&["","o"])[1];return{api:("WebKit|Moz|Ms|O".match(new RegExp("("+r+")","i"))||[])[1],prefix:r,css:"-"+r+"-"}}(e)),r)}})}return e.WebQit}new Map;class h{constructor(e,t=!0){this.window=e,this.async=t,this.readCallbacks=[],this.writeCallbacks=[],this._run()}_run(){this.window.requestAnimationFrame((()=>{this.readCallbacks.forEach(((e,t)=>{e&&!e()&&(this.readCallbacks[t]=null)})),this.writeCallbacks.forEach(((e,t)=>{e&&!e()&&(this.writeCallbacks[t]=null)})),this._run()}))}onread(e,t=!1){if(t)return new Promise(((t,r)=>{!1===this.async?e(t,r):this.readCallbacks.push((()=>{e(t,r)}))}));!1===this.async?e():this.readCallbacks.push(e)}onwrite(e,t=!1){if(t)return new Promise(((t,r)=>{!1===this.async?e(t,r):this.writeCallbacks.push((()=>{e(t,r)}))}));!1===this.async?e():this.writeCallbacks.push(e)}cycle(e,t,r){this.onread((()=>{var n=e(r);if(n){var s=n=>{this.onwrite((()=>{var s=t(n,r);if(s){var o=r=>{this.cycle(e,t,r)};s instanceof Promise?s.then(o):o()}}))};n instanceof Promise?n.then(s):s()}}))}}function u(e){return e instanceof String||"string"==typeof e&&null!==e}function d(e){return Array.isArray(e)}function m(e){return arguments.length&&(void 0===e||void 0===e)}function p(e){return null===e||""===e}function f(e){return"function"==typeof e}function g(e){return Array.isArray(e)||"object"==typeof e&&e||f(e)}function v(e,t=!0){return d(e)?e:!t&&l(e)?[e]:!1!==e&&0!==e&&function(e){return p(e)||m(e)||!1===e||0===e||g(e)&&!Object.keys(e).length}(e)?[]:function(e){return!u(e)&&!m(e.length)}(e)?Array.prototype.slice.call(e):l(e)?Object.values(e):[e]}function b(e){const t=c.call(this);t.DOM.isDOMReady||"complete"===t.window.document.readyState?e(t.window):(t.window.domReadyCallbacks||(t.window.domReadyCallbacks=[],t.window.document.addEventListener("DOMContentLoaded",(()=>{t.DOM.isDOMReady=!0,t.window.domReadyCallbacks.splice(0).forEach((e=>e(t.window)))}),!1)),t.window.domReadyCallbacks.push(e))}class w{constructor(e){this.window=e}onAdded(e,t,r={}){return r.on="added",this.onPresenceChange(e,((e,r,n,s,o)=>{t(e,r,n,s,o)}),r)}onRemoved(e,t,r={}){return r.on="removed",this.onPresenceChange(e,((e,r,n,s,o)=>{t(e,r,n,s,o)}),r)}onPresent(e,t,r={}){b.call(this.window,(()=>{this.window.MutationObserver&&this.onAdded(e,((e,r)=>{e.forEach((e=>t(e,r)))}),r),u(e)?v(this.window.document.querySelectorAll(e)).forEach((e=>t(e,1))):e.parentNode&&t(e,1)}))}onAbsent(e,t,r={}){b.call(this.window,(()=>{this.window.MutationObserver&&onRemoved(e,((e,r)=>{e.forEach((e=>t(e,r)))}),r),u(e)?0===v(this.window.document.querySelectorAll(e)).length&&t(null,0):e.parentNode||t(e,0)}))}onPresenceChange(e,t,r={}){e=v(e,!1);var n=new Set,s=new Set,o=(o,i,a)=>{i&&"removed"===r.on||!i&&"added"===r.on||(o=((e,t)=>(t.$$searchCache||(t.$$searchCache=new Map),e.reduce(((e,n)=>{var s;return t.$$searchCache.has(n)?s=t.$$searchCache.get(n):(s=((e,t)=>{if(t=t.filter((e=>e.matches)),u(e)){var n=t.filter((t=>t.matches(e)));if(!1!==r.observeIndirectMutation&&(n=t.reduce(((t,r)=>t.concat(v(r.querySelectorAll(e)))),n)).length)return n}else{if(t.includes(e))return[e];if(!1!==r.observeIndirectMutation&&t.length)for(var s=e;s=s.parentNode;)if(t.includes(s))return[e]}})(n,t,u(n))||[],t.$$searchCache.set(n,s)),e.concat(s)}),[])))(e,o)).length&&(r.maintainCallState?(o.forEach((e=>{i?(n.add(e),s.delete(e)):(n.delete(e),s.add(e))})),t(o,i,a,n,s)):t(o,i,a))},i=r.context||this.window.document.documentElement;return this._observe(i,((e,t,n,s)=>{r.ignoreTransients||(o(e,0,!0),o(e.concat(t),1,!0),o(t,0,!0)),o(s,0),o(n,1)}))}onAttrChange(e,t,r=[]){var n=new this.window.MutationObserver(t),s={attributes:!0,attributeOldValue:!0};return r&&(s.attributeFilter=r),n.observe(e,s),n}onTreeChange(e,t,r=!1){var n=new this.window.MutationObserver(t),s={childList:!0,subtree:r};return n.observe(e,s),n}onMutation(e,t,r){var n=new this.window.MutationObserver(t);return n.observe(e,r),n}_observe(e,t){if(!y.has(e)){const t=new Set,r=new this.window.MutationObserver((e=>{if(t.size){var r=e.reduce(((e,t)=>e.concat(v(t.addedNodes))),[]),n=e.reduce(((e,t)=>e.concat(v(t.removedNodes))),[]),s=[],o=[];r=new Set(r),n=new Set(n),r.forEach((e=>{n.has(e)&&(n.delete(e),r.delete(e),e.isConnected?s.push(e):o.push(e))})),r=[...r],n=[...n],t.forEach((e=>e(s,o,r,n)))}}));r.observe(e,{childList:!0,subtree:!0}),y.set(e,{callbacks:t,observer:r})}const r=y.get(e);return r.callbacks.add(t),{disconnect(){r.callbacks.delete(t)},reconnect(){r.callbacks.add(t)}}}}const y=new Map;function O(e,t=null,r=!1){const n=c.call(this);if(u(e)){var s;if(e.trim().startsWith("<")){var o=n.window.document.createElement("div");o.innerHTML=e,s=r?v(o.children):o.firstChild}else s=r?v(k.call(this,e,t)):x.call(this,e,t);return s}return e instanceof n.window.Element?r?[e]:e:r?v(e):e}function E(e,t=null){return O.call(this,e,t,!0)}function x(e,t=null,r=!1){const n=c.call(this);t=t||n.window.document;var s,o=r?"querySelectorAll":"querySelector";try{s=t[o](e)}catch(r){try{s=t[o](e.replace(/\:is\(/g,":matches("))}catch(r){try{s=t[o](e.replace(/\:is\(/g,":-webkit-any("))}catch(r){try{s=t[o](e.replace(/\:is\(/g,":-moz-any("))}catch(e){throw e}}}}return s}function k(e,t=null){return x.call(this,e,t,!0)}function j(e){return function(e){return e instanceof Number||"number"==typeof e}(e)||!0!==e&&!1!==e&&null!==e&&""!==e&&!isNaN(1*e)}function C(e){return f(e)||e&&"[object function]"==={}.toString.call(e)}function $(e,t,r={},n={}){t=v(t).slice();for(var s=e;!m(s)&&!p(s)&&t.length;){var o=t.shift();if(!(r.get?r.get(s,o):g(s)?o in s:s[o]))return void(n.exists=!1);s=r.get?r.get(s,o):s[o]}return n.exists=!0,s}function M(e,t,r,n={},s={}){const o=(e,r,n)=>s.set?s.set(e,r,n):(j(t[a])&&d(e)?e.push(n):e[r]=n,!0);t=v(t);for(var i=e,a=0;a<t.length;a++){if(!(a<t.length-1))return o(i,t[a],r);if(!i||!g(i)&&!C(i))return!1;var l=$(i,t[a],s);if(!g(l)){if(!1===s.buildTree)return!1;if(l=C(s.buildTree)?s.buildTree(a):j(t[a+1])?[]:{},!o(i,t[a],l))return!1}i=l}}function T(e,t,r=!1,n={}){t=v(t);var s=!1;do{var o=""===(o=t.pop())?0:o,i=e;t.length&&(i=$(e,t,{},n)),(g(i)||C(i))&&(n.has?n.has(i,o):o in i)&&(n.deleteProperty?s=n.deleteProperty(i,o):n.del?s=n.del(i,o):(delete i[o],s=!0))}while(s&&r&&t.length&&(g(i)||C(i))&&!(n.keys?n.keys(i):Object.keys(i)).length);return s}function A(e,t,r={}){var n={};return $(e,t,r,n),n.exists}function S(e,t=!1){const r=c.call(this);var n={};return!(n.el=r.window.document.head.querySelector('meta[name="oohtml"]'))&&t&&(n.el=r.window.document.createElement("meta"),n.el.setAttribute("name",e),r.window.document.head.append(n.el)),n.el&&(n.vars=(n.el.getAttribute("content")||"").split(";").filter((e=>e)).reduce(((e,t)=>{var r=t.split("=").map((e=>e.trim()));return M(e,r[0].split("."),"true"===r[1]||"false"!==r[1]&&(j(r[1])?parseInt(r[1]):r[1])),e}),{})),n.get=function(e){return $(this.vars,e.split("."))},n.set=function(e,r=null,n=!1){var s=l(e)?e:{[e]:!0===r?"true":r};if(n=arguments.length<3?r:n,Object.keys(s).forEach((e=>{if(!1===s[e])T(this.vars,e.split("."));else if(l(s[e]))Object.keys(s[e]).forEach((t=>{var r=(e+"."+t).split(".");n&&A(this.vars,r)||M(this.vars,r,s[e][t])}));else{var t=e.split(".");n&&A(this.vars,t)||M(this.vars,t,s[e])}})),t){const e=(t,r)=>Object.keys(r).reduce(((n,s)=>{var o=(t?t+".":"")+s;return l(r[s])?n.push(...e(o,r[s])):n.push(o+"="+r[s]),n}),[]);this.el.setAttribute("content",e("",this.vars).join(";"))}return!0},n.defaults=function(e,t=null){return this.set(e,t,!0)},n}function P(){const e=c.call(this);return e.DOM||(e.DOM={},function(e){!function(e){e.CSS||(e.CSS={}),e.CSS.escape||(e.CSS.escape=e=>e.replace(/([\:@\~\$\&])/g,"\\$1"))}(e),function(e){"isConnected"in e.Node.prototype||Object.defineProperty(e.Node.prototype,"isConnected",{get:function(){return!(this.ownerDocument&&this.ownerDocument.compareDocumentPosition(this)&this.DOCUMENT_POSITION_DISCONNECTED)}})}(e),function(e){e.Element.prototype.matches||(e.Element.prototype.matches=e.Element.prototype.matchesSelector||e.Element.prototype.mozMatchesSelector||e.Element.prototype.msMatchesSelector||e.Element.prototype.oMatchesSelector||e.Element.prototype.webkitMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),r=t.length;--r>=0&&t.item(r)!==this;);return r>-1})}(e)}(e.window),e.DOM.reflow=new h(e.window),e.DOM.mutations=new w(e.window),e.DOM.meta=S.bind(e.window),e.DOM.query=O.bind(e.window),e.DOM.queryAll=E.bind(e.window),e.DOM.ready=b.bind(e.window)),e}function _(e,t,r){return function(e,t){return function(e,t,r=!1){if(""==t)return e;var n=r?e.lastIndexOf(t):e.indexOf(t);return-1===n?e:e.substr(0,n)}(e,t,!0)}(function(e,t,r=!1){if(""==t)return e;var n=r?e.lastIndexOf(t):e.indexOf(t);return-1===n?"":e.substr(n+t.length)}(e,t),r)}function D(e){return s(e)||e&&"[object function]"==={}.toString.call(e)}function N(e){return e instanceof Number||"number"==typeof e}function L(e){return N(e)||!0!==e&&!1!==e&&null!==e&&""!==e&&!isNaN(1*e)}function W(e,r,n=!1,s=!1,a=!1){var l=0,c=e.shift();if((L(c)||!0===c||!1===c)&&(l=c,c=e.shift()),!e.length)throw new Error("_merge() requires two or more array/objects.");return e.forEach(((e,h)=>{var u,d,m;(o(e)||D(e))&&(n?(u=e,m=[],function(e,r){r=(r=r||Object.prototype)&&!t(r)?[r]:r;var n=[];for(e=e;e&&(!r||r.indexOf(e)<0)&&"default"!==e.name;)n.push(e),e=e?Object.getPrototypeOf(e):null;return n}(u,d).forEach((e=>{!function(e,...t){t.forEach((t=>{e.indexOf(t)<0&&e.push(t)}))}(m,...Object.getOwnPropertyNames(e))})),m):Object.getOwnPropertyNames(e)).forEach((o=>{if(r(o,c,e,h)){var u=c[o],d=e[o];if((t(u)&&t(d)||i(u)&&i(d))&&(!0===l||l>0))c[o]=t(u)&&t(d)?[]:{},W([L(l)?l-1:l,c[o],u,d],r,n,s,a);else if(t(c)&&t(e))s?c[o]=d:c.push(d);else try{a?Object.defineProperty(c,o,Object.getOwnPropertyDescriptor(e,o)):c[o]=e[o]}catch(e){}}}))})),c}function R(...e){return W(e,((e,t,r)=>!0),!1,!1,!1)}const q=function(e,r=1,n=!0){return!L(r)||r<=0?e:(!t(e)&&i(e)&&n&&(e=Object.values(e)),t(e)?e.reduce(((e,s)=>t(s)||i(s)&&n?e.concat(q(t(s)?s:Object.values(s),r-1,n)):e.concat(s)),[]):e)},Q=q;function I(e,t=1){var r=0;e.forEach((e=>{r++}));var n=e.slice(e.length-r,t);return arguments.length>1?n:n[0]}function H(e,t=1){return arguments.length>1?I(e.slice().reverse(),t).reverse():I(e.slice().reverse())}function z(e){return i(e)&&Object.getPrototypeOf(e)===Object.prototype}function F(e){return!0===e||!1===e}const U=function(e,r,n=!0,s=1){if(t(e)&&t(r)&&e.length!==r.length)return!n;if(i(e)&&i(r)){var a=Object.keys(e),l=Object.keys(r);if(!a.length&&!l.length)return z(e)&&z(r)?n:e===r===n;if(!U(a,l))return!n}if(s>0&&(t(e)&&t(r)||i(e)&&i(r))){var c=function(e,r,n=!0,s=!0,a=!1,l=!1){if(t(e)&&t(r)){var c=[],h=!0;return e.forEach((e=>{if(h){var u,d,m,p=!1;d=(r,a)=>{(!p||s&&o(e))&&((t(p=n(e,a))&&!p.length||i(p)&&!Object.keys(p).length)&&(p=!1),o(p)&&s&&(e=p))},m=void 0,o(u=r)&&Object.keys(u).forEach(((e,t)=>{!1!==m&&(m=d(L(e)&&parseFloat(e),u[e]))})),o(p)?c.push(s?p:e):F(p)?a&&!p||!a&&p?c.push(e):l&&(h=!1):c.push(p)}})),c}if(i(e)&&i(r))return c={},h=!0,Object.keys(e).forEach((u=>{if(h){var d=n(e[u],r[u]);(t(d)&&!d.length||i(d)&&!Object.keys(d).length)&&(d=!1),o(d)?c[u]=s?d:e[u]:F(d)?a&&!d||!a&&d?c[u]=e[u]:l&&(h=!1):c[u]=d}})),c}(e,r,((e,t)=>U(e,t,n,s-1)),!1,!1,!0);return t(c)?c.length===e.length&&c.length===r.length:i(c)&&i(e)?Object.keys(c).length===Object.keys(e).length&&Object.keys(c).length===Object.keys(r).length:c}return D(n)?n(e,r):N(e)&&N(r)&&isNaN(e)&&isNaN(r)?n:e===r===n},V=U;function K(e,r=[]){return W([{},e],((e,n,s)=>{if(!D(s[e]))return D(r)?r(e):!t(r)||!r.length||r.indexOf(e)>-1}),!1,!1,!1)}class Z{static lex(e,t,n={}){if(!r(e+=""))throw new Error("Argument1 must be a string!");var s=e=>({delims:e.delims.slice(),options:K(e.options),nesting:e.nesting.slice(),maxDepth:e.maxDepth,comments:e.comments.slice(),tokens:e.tokens.slice(),matches:e.matches.slice(),matchesi:K(e.matchesi)});if(Z.$cache[e]&&!1!==n.cache)for(var o=0;o<Z.$cache[e].length;o++){var i=Z.$cache[e][o];if(V(i.delims,t))return s(i)}var a=new Z(e,n).lex(t);return!1!==n.cache&&(Z.$cache[e]=Z.$cache[e]||[],Z.$cache[e].push(a)),s(a)}static split(e,t,r){return Z.lex(e,t,r).tokens}static match(e,t,r){return Z.lex(e,t,r).matches}constructor(e,t){if(!r(e))throw new Error("Lexer requires the first argument to be a string.");this.$str=e,this.$options=t||{},this.$options.blocks||(this.$options.blocks=Z.$blocks),this.$options.quotes||(this.$options.quotes=Z.$quotes),this.$options.comments||(this.$options.comments=Z.$comments)}lex(e,t){for(var r={delims:a(e),options:R(!0,{},this.$options,t||{}),nesting:[],maxDepth:0,comments:[],tokens:[],matches:[],matchesi:{}},n=0;"number"==typeof n;)n=this._evalCharsAt(r,n);if(r.nesting.length)throw new Error("Error parsing the string: "+this.$str+". Unterminated blocks: "+Q(r.nesting).join(", "));return r}_evalCharsAt(e,t){if(!(t>=this.$str.length)){var r=1,n={},s={},o={};if(e.openComment||(s=this._testQuotes(e,t)),e.openQuote||(n=this._testComments(e,t)),e.openComment||n.ending)e.nesting.length||o.ending?this._push(e,this.$str[t]):(r=(a=n.starting||n.ending||this.$str[t]).length,this._push(e,a,"comments",n.starting));else if(e.openQuote||s.ending)this._push(e,this.$str[t]);else{if(e.options.limit&&e.matches.length===e.options.limit)return this._push(e,this.$str[t]),t+1;o=this._testNesting(e,t),o=this._testNesting(e,t);var i=this._testChars(e.options.stopChars||[],e,t);if(!e.nesting.length&&!1!==i)return e.options.stopChar=i,void(e.options.stopCharForward=this.$str.substr(t));if(e.delims.length)if(e.nesting.length||o.ending){var a;r=(a=o.starting||o.ending||this.$str[t]).length,this._push(e,a)}else{this._push(e,"");var l=this._testChars(e.delims,e,t);if(!1!==l&&(e.matches.push(l),e.matchesi[t]=l,r=l.length||1,!e.options.preserveDelims)){var c=t+(l.length||1);return c===this.$str.length&&this._push(e,""),c}this._push(e,l||this.$str[t])}else 2===e.nesting.length&&o.starting?(e.matches.push(null),this._push(e,o.starting),r=o.starting.length):!e.nesting.length&&o.ending?(this._push(e,o.ending),r=o.ending.length,e.matches.push(null)):this._push(e,this.$str[t])}return t+r}}_testQuotes(e,t){var r={};return(e.options.quotes||[]).forEach((n=>{this.$str.substr(t,1)===n&&(e.openQuote?n===e.openQuote&&(e.openQuote=!1,r.ending=n):(e.openQuote=n,r.starting=n))})),r}_testComments(e,t){var r={};return(e.options.comments||[]).forEach((n=>{if(e.openComment){if(H(n)===H(e.openComment)){var s=H(n);this.$str.substr(t).startsWith(s)&&(e.openComment=!1,r.ending=s)}}else{var o=I(n);this.$str.substr(t).startsWith(o)&&(e.openComment=n,r.starting=o)}})),r}_testNesting(e,t){var r={};return(e.options.blocks||[]).forEach((n=>{var s=I(n);if(this.$str.substr(t).startsWith(s))e.nesting=e.nesting.concat([n]),r.starting=s;else if(e.nesting.length&&H(n)===H(H(e.nesting))){var o=H(n);this.$str.substr(t).startsWith(o)&&(e.nesting=e.nesting.slice(0,-1),r.ending=o)}})),e.maxDepth=Math.max(e.maxDepth,e.nesting.length),r}_testChars(e,t,r){for(var n=0;n<e.length;n++){var s=e[n];if(D(s)){var o=s(this.$str.substr(0,r),this.$str.substr(r),t.tokens.slice());if(!1!==o)return o}if(t.options.useRegex){var i=this.$str.substr(r).match(new RegExp("^"+s,!0!==t.options.useRegex?t.options.useRegex:""));if(i)return i[0]}if(!t.options.ci&&this.$str.substr(r,s.length)===s||t.options.ci&&this.$str.substr(r,s.length).toLowerCase()===s.toLowerCase())return s}return!1}_push(e,t,r="tokens",s=!1){var o=e.matches.length;if(n(e.tokens[o])&&(e.tokens[o]=""),"comments"===r){e.tokens[o].comments||(e.tokens[o]=new String(e.tokens[o]),e.tokens[o].comments=[]);var i=e.tokens[o].comments.length-(!e.tokens[o].comments.length||s?0:1);e.tokens[o].comments[i]=(e.tokens[o].comments[i]||"")+t}else e.tokens[o].comments,e.tokens[o]=e.tokens[o]+t}split(e,t,r){return this.lex(t,r).tokens}match(e,t,r){return this.lex(t,r).matches}regParse(e,t){return this.lex(e,R({useRegex:!0},t||{}))}regSplit(e,t){return this.regParse(e,t).tokens}regMatch(e,t){return this.regParse(e,t).matches}}function B(e,t={}){const r=P.call(this);return r.OOHTML||(r.OOHTML={}),r.OOHTML.meta||(r.OOHTML.meta=r.DOM.meta("oohtml",!0)),r.OOHTML.meta.defaults(R(3,e,t)),r.OOHTML.meta}Z.$blocks=[["(",")"],["[","]"],["{","}"]],Z.$quotes=['"',"'","`"],Z.$comments=[["/*","*/"],["//","\n"]],Z.$cache=Object.create(null);const G=(e,t)=>Z.split(e.trim(),["|","+"],{preserveDelims:!0}).reduce(((e,r)=>{var n;return(r.startsWith("|")||r.startsWith("+"))&&(n=r.substr(0,1),r=r.substr(1).trim()),e.theEnd||"|"===n&&e.length?(e.theEnd=!0,e):e.concat(t(r.trim()))}),[]).filter((e=>e)),J=(e,t,r)=>{const n=e=>e.reduce(((e,t)=>e.concat(...r(t).values())),[]);return G(t,(t=>{var s,o,[t,i]=(s=t,o=Z.split(s.trim(),[":"]),[s=o.shift(),o.reduce(((e,t)=>{var[r,n]=Z.split(t.trim(),[]);return e[r]=_(n,"(",")"),e}),{})]);return e.reduce(((e,s)=>{var o=r(s);"*"===t&&(t="("+o.keys().join("+")+")");var l,c=("(",")",(l=t).startsWith("(")&&l.endsWith(")")?J([s],_(t,"(",")"),r):a(o.get(t),!1)),h=[];return Object.keys(i).forEach((e=>{if("deep"===e||"deepest"===e)for(var o=[s];("deepest"===e||!c.length)&&(o=n(o)).length;){var a=J(o,`${t}${h.map((e=>`:${e}(${i[e]})`)).join("")}`,r);a.length&&(c=a)}else"having"!==e&&"not-having"!==e||(c=c.filter((t=>{var n=G(i[e],(e=>r(t,e)));return"not-having"===e?!n.length:n.length}))),h.push(e)})),e.concat(c)}),[])}))},X=function(e,t,r,n=null,s=0){if(!t.length)return[];var o,i=t.shift();i.endsWith(".")&&(o=!0,i=i.substr(0,i.length-1).trim());var a=J(e,i,r);if(a.length&&o)return a;if(t.length){var l=X(a,t.slice(),r,n,s+1);return-1===l?n(a,s,!0):l}return n?n(a,s):a};(function t(r=null,n=!1){const s=P.call(this);if(n)return void s.DOM.ready((()=>{t.call(this,r,!1)}));const o=s.window,i=s.window.document,l=s.DOM.mutations,c=B.call(this,{element:{template:"",export:"export",import:"import"},attr:{moduleid:"name",moduleref:"template",exportid:"name",exportgroup:"exportgroup"},api:{templateClass:"",templates:"templates",exports:"exports",moduleref:"template"}},r),h="template"+(c.get("element.template")?'[is="'+c.get("element.template")+'"]':"")+"["+o.CSS.escape(c.get("attr.moduleid"))+"]";var u=o.HTMLTemplateElement;if(c.get("api.templateClass")){if(!o[c.get("api.templateClass")])throw new Error('The custom element class "'+c.get("api.templateClass")+'" is not defined!');u=o[c.get("api.templateClass")]}const d=(e,t,r)=>{"templatemutation"===e&&(["addedExports","removedExports"].forEach((e=>{Object.defineProperty(t,e,{value:Object.keys(t[e]).map((r=>({name:r,items:t[e][r]})))})})),["addedTemplates","removedTemplates"].forEach((e=>{Object.defineProperty(t,e,{value:Object.keys(t[e]).map((r=>({name:r,item:t[e][r]})))})}))),Object.defineProperty(t,"path",{value:r}),i.dispatchEvent(new o.CustomEvent(e,{detail:t}))},m=(e,t)=>{const r=r=>{e.dispatchEvent(new o.CustomEvent(r,{detail:{path:t}}))};var n=e.getAttribute("src");return new Promise(((s,i)=>{o.fetch?o.fetch(n).then((e=>e.ok?e.text():Promise.reject(e.statusText))).then((n=>{e.innerHTML=n,r("load"),d("templatecontentloaded",{template:e},t),s(e)})).catch((o=>{console.error("Error fetching the bundle at "+n+". ("+o+")"),e.innerHTML="",r("loaderror"),d("templatecontentloaderror",{template:e},t),s(e)})):(s(),console.error("Error fetching the bundle at "+n+". (window.fetch() not supported by browser.)"))}))},p=(t,r,n,s=null,i=!0)=>{const u=(t,s,o,i)=>{var l;if(t.matches)if(t.matches(h)&&(l=t.getAttribute(c.get("attr.moduleid")))&&v(l)){var u=(n?n+"/":"")+l;"removed"===o?(e(r,"oohtml","templates").delete(l),e(r,"oohtml").get("parentTemplate")===r&&e(r,"oohtml").delete("parentTemplate"),s&&(s.removedTemplates[l]=t)):"added"===o&&(e(r,"oohtml","templates").set(l,t),e(t,"oohtml").set("parentTemplate",r),s&&(s.addedTemplates[l]=t)),p(t.content,t,u,o,i)}else{const n=t=>{var n=t.getAttribute(c.get("attr.exportgroup"))||"default";"removed"===o?e(r,"oohtml","exports").has(n)&&(function(e,t,r=!1){for(var n=e.indexOf(t);n>-1&&(r||!1===r);)e.splice(n,1),r>0&&r--,n=e.indexOf(t)}(e(r,"oohtml","exports").get(n),t),e(r,"oohtml","exports").has(n).length||e(r,"oohtml","exports").delete(n),s&&(s.removedExports[n]||(s.removedExports[n]=[]),s.removedExports[n].push(t))):"added"===o&&(e(r,"oohtml","exports").has(n)||e(r,"oohtml","exports").set(n,[]),e(r,"oohtml","exports").get(n).push(t),s&&(s.addedExports[n]||(s.addedExports[n]=[]),s.addedExports[n].push(t)))};if(t.matches(c.get("element.export"))){var d=t.getAttribute(c.get("attr.exportid"))||"default";a(t.children).forEach((e=>{e.setAttribute(c.get("attr.exportgroup"),d),n(e)}))}else n(t)}};r.modulemutationsType=s;const g={addedTemplates:Object.create(null),removedTemplates:Object.create(null),addedExports:Object.create(null),removedExports:Object.create(null)};if(a(t.children).forEach((e=>u(e,g,s,i))),i&&d("templatemutation",g,n),"added"===s&&!e(r,"oohtml").get("onLiveMode")){e(r,"oohtml").set("onLiveMode",!0),r.getAttribute("src")&&!r.content.children.length&&f.push(m(r,n)),l.onAttrChange(r,(e=>{e[0].target.getAttribute(e[0].attributeName)!==e[0].oldValue&&m(r,n)}),["src"]);var b=new o.MutationObserver((e=>{const t={addedTemplates:Object.create(null),removedTemplates:Object.create(null),addedExports:Object.create(null),removedExports:Object.create(null)};e.forEach((e=>{e.addedNodes.forEach((e=>u(e,t,"added",!0))),e.removedNodes.forEach((e=>u(e,t,"removed",!0)))})),d("templatemutation",t,n)}));b.observe(t,{childList:!0})}};if(c.get("api.templates")in i)throw new Error('document already has a "'+c.get("api.templates")+'" property!');const f=[];if(Object.defineProperty(i,c.get("api.templates"),{get:function(){return g(e(i,"oohtml","templates"))}}),c.get("api.templates")in u.prototype)throw new Error('The "HTMLTemplateElement" class already has a "'+c.get("api.templates")+'" property!');if(Object.defineProperty(u.prototype,c.get("api.templates"),{get:function(){return g(e(this,"oohtml","templates"))}}),c.get("api.exports")in u.prototype)throw new Error('The "HTMLTemplateElement" class already has a "'+c.get("api.exports")+'" property!');Object.defineProperty(u.prototype,c.get("api.exports"),{get:function(){return g(e(this,"oohtml","exports"))}});const g=e=>Object.defineProperties({},Array.from(e.keys()).reduce(((t,r)=>(t[r]={get:()=>e.get(r)},t)),{})),v=e=>{var t;return!(t=e.match(/([^a-zA-Z0-9\_\-\@])/))||(console.error(`Invalid character "${t}" in the module name: ${e}.`),!1)};if(a(i.querySelectorAll(h)).forEach((async t=>{var r=t.getAttribute(c.get("attr.moduleid"));!t.closest(c.get("element.import"))&&v(r)&&(e(i,"oohtml","templates").set(r,t),p(t.content,t,r,"added",!1))})),l.onPresenceChange(h,(async(t,r)=>{const n={addedTemplates:Object.create(null),removedTemplates:Object.create(null),addedExports:Object.create(null),removedExports:Object.create(null)};t.forEach((t=>{var s=t.getAttribute(c.get("attr.moduleid"));!t.closest(c.get("element.import"))&&v(s)&&(r?(e(i,"oohtml","templates").set(s,t),p(t.content,t,s,"added"),n.addedTemplates[s]=t):(e(i,"oohtml","templates").get(s)===t&&e(i,"oohtml","templates").delete(s),p(t.content,t,s,"removed"),n.removedTemplates[s]=t))})),d("templatemutation",n,"")})),l.onPresent(c.get("element.import"),(e=>{p(e,e,"","added",!1)})),c.get("api.moduleref")in o.Element.prototype)throw new Error('The "Element" class already has a "'+c.get("api.moduleref")+'" property!');Object.defineProperty(o.Element.prototype,c.get("api.moduleref"),{get:function(){var t;if(!e(this,"oohtml").has("module")&&(t=this.getAttribute(c.get("attr.moduleref")))){var r=(t=>{var r=i.createElement("template");return function(e,t,r,n=null){var s=t.split("#")[0].split("/").map((e=>e.trim())).filter((e=>e));return X(e,s,r,n)}([i],t,(function(t,r){var n=e(t,"oohtml","templates");return 1===arguments.length?n:r.startsWith(":")?e(t,"oohtml","exports").get(r.substr(1)):n.get(r)})).forEach((t=>{e(t,"oohtml","templates").forEach(((t,n)=>{e(r,"oohtml","templates").set(n,t)})),e(t,"oohtml","exports").forEach(((t,n)=>{e(r,"oohtml","exports").has(n)||e(r,"oohtml","exports").set(n,[]),e(r,"oohtml","exports").get(n).push(...t)}))})),r})(t);e(this,"oohtml").set("module",r)}return e(this,"oohtml").get("module")}});var b=f.length?"loading":"indeterminate";Object.defineProperty(i,"templatesReadyState",{get:()=>b}),s.DOM.ready.call(s,(()=>(f.forEach((e=>{e.catch((e=>{console.warn(e)}))})),Promise.all(f).then((()=>{b="complete",i.dispatchEvent(new o.Event("templatesreadystatechange"))})))))}).call(window)})();
2
2
  //# sourceMappingURL=html-modules.js.map
Binary file