@webqit/oohtml 1.9.21 → 1.9.24

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.
@@ -1,2 +1,3 @@
1
- (()=>{"use strict";function e(e){return typeof e}function t(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 r(e){return Array.isArray(e)}function n(e){return"function"==typeof e}function s(e){return n(e)||e&&"[object function]"==={}.toString.call(e)}function i(e){return e instanceof Number||"number"==typeof e}function a(e){return i(e)||!0!==e&&!1!==e&&null!==e&&""!==e&&!isNaN(1*e)}function o(e){return!Array.isArray(e)&&"object"==typeof e&&e}function l(e){return e instanceof String||"string"==typeof e&&null!==e}function c(e){return Array.isArray(e)||"object"==typeof e&&e||n(e)}function u(e){return arguments.length&&(void 0===e||void 0===e)}function h(e,t=!0){return r(e)?e:!t&&o(e)?[e]:!1!==e&&0!==e&&function(e){return function(e){return null===e||""===e}(e)||u(e)||!1===e||0===e||c(e)&&!Object.keys(e).length}(e)?[]:function(e){return!l(e)&&!u(e.length)}(e)?Array.prototype.slice.call(e):o(e)?Object.values(e):[e]}function p(e,t,r=null){return r||!1!==r&&e.dotSafe&&t.dotSafe?e.join(".")===t.join("."):e.length===t.length&&e.reduce(((e,r,n)=>e&&r===t[n]),!0)}function f(e,t,n=null){return r(t)?e.filter((e=>n?t.filter((t=>n(e,t))).length:-1!==t.indexOf(e))):[]}function g(e){return(m(e)?e:h(e).length?[e]:[]).reduce(((e,t)=>e.concat([h(t)])),[]).map((e=>d.resolve(e)))}new Map;class d extends Array{static resolve(e){return e.every((e=>!(e+"").includes(".")))?(new d).concat(e):e}get dotSafe(){return!0}}function m(e){return h(e).reduce(((e,t)=>e||r(t)),!1)}function b(e){return e.filter((e=>e||0===e)).length!==e.length}class v{constructor(e){this.target=e,this.fireables=[],this.currentlyFiring=[]}add(e){return this.fireables.push(e),e}remove(e){this.fireables=this.fireables.filter((t=>t!==e))}removeMatches(e){this.match(e).forEach((e=>{this.fireables=this.fireables.filter((t=>t!==e))}))}match(e){return this.fireables.filter((t=>{var r=g(t.filter),n=h((t.params||{}).tags),s=g(e.filter),i=h((e.params||{}).tags);return(!e.originalHandler||t.handler===e.originalHandler)&&(!s.length||p(s,r))&&(!i.length||i.length===n.length&&f(n,i).length===i.length)}))}static _getFirebase(r,n,s=!0,i=this.__namespace){if(!c(n))throw new Error('Subject must be of type object; "'+e(n)+'" given!');var a=this;return i&&globalThis.WebQitObserverNamespaceRegistry.has(r+"-"+i)&&(a=globalThis.WebQitObserverNamespaceRegistry.get(r+"-"+i),r+="-"+i),!t(n,"firebases").has(r)&&s&&t(n,"firebases").set(r,new a(n)),t(n,"firebases").get(r)}static _namespace(e,t,r=null){if(e+="-"+t,2===arguments.length)return globalThis.WebQitObserverNamespaceRegistry.get(e);if(!(r.prototype instanceof this))throw new Error(`The implementation of the namespace ${this.name}.${t} must be a subclass of ${this.name}.`);globalThis.WebQitObserverNamespaceRegistry.set(e,r),r.__namespace=t}}globalThis.WebQitObserverNamespaceRegistry||(globalThis.WebQitObserverNamespaceRegistry=new Map);class y{constructor(e,t){this.target=e,this.handler=t.handler,this.filter=t.filter,this.params=t.params}disconnect(){this.disconnected=!0}}class w extends y{fire(e,t,r){return this.disconnected||this.filter&&!f(h(this.filter),[e.type]).length?t(...Array.prototype.slice.call(arguments,2)):this.handler(e,r,t)}}function O(e,t){var r=void 0;return c(e)&&Object.keys(e).forEach(((n,s)=>{!1!==r&&(r=t(a(n)?parseFloat(n):n,e[n],s))})),r}class j{constructor(e,t){if(this.target=e,!t.type)throw new Error("Action type must be given in definition!");O(t,((e,t)=>{Object.defineProperty(this,e,{value:t,enumerable:!0})})),Object.seal(this)}}class P extends v{add(e){return super.add(new w(this.target,e))}fire(e,t=null){if(e instanceof j||(e=new j(this.target,e)),this.currentlyFiring.filter((t=>t.type===e.type&&t.name===e.name)).length)return t?t():void 0;this.currentlyFiring.push(e);const r=(n,...s)=>{var i=this.fireables[n];return i?i.fire(e,((...e)=>r(n+1,...e)),...s):t?t(...s):s[0]};var n=r(0);return this.currentlyFiring.pop(),n}static getFirebase(e,t=!0,r=null){return super._getFirebase("interceptor",...arguments)}static namespace(e,t=null){return super._namespace("interceptor",...arguments)}}function E(e){return t(e,!1).get(e)||e}function k(e,t,r={},n={}){if(!t||!c(t))throw new Error("Target must be of type object!");t=E(t);var s,i=function(n){return arguments.length?n:Reflect[e](t,...Object.values(r))};return(s=P.getFirebase(t,!1,n.namespace))?s.fire({type:e,...r},i):i()}function C(e,t,r,n={}){return k("apply",e,{thisArgument:t,argumentsList:r},n)}function S(e,t,r=null,n={}){return k("construct",e,arguments.length>2?{argumentsList:t,newTarget:r}:{argumentsList:t},n)}function _(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 $(e,t=1){return arguments.length>1?_(e.slice().reverse(),t).reverse():_(e.slice().reverse())}function M(e,t){return e.reduce(((e,r,n)=>e||t(r,n)),!1)}function x(e,t,r=null){return r||!1!==r&&e.dotSafe&&t.dotSafe?(e.join(".")+".").startsWith(t.join(".")+"."):t.reduce(((t,r,n)=>t&&r===e[n]),!0)}function D(e,t,r=null,n=!1){var s=function(e,t,r=null,n=!1){return t.length>e.length?-1:("number"==typeof r?n?e.slice(0,r+1+(r<0?e.length:0)):e.slice(r):e).reduce(((e,r,s)=>{var[i,a,o]=e;if(!n&&i>-1)return[i,a,o];var l=o+1,c=r===t[l]?0===l?[s,0]:[a,l]:[-1,-1];return c[1]===t.length-1&&(c[1]=-1,c[0]>-1)?[c[0]].concat(c):[i].concat(c)}),[-1,-1,-1])[0]+(n||"number"!=typeof r?0:r>-1?r:e.length-r)}(e,t,r,n);return-1===s?[]:e.slice(s+t.length)}class A{constructor(e,t=!1){this._={},this._.target=e,this._.cancellable=t,this._.propagationStopped=!1,this._.defaultPrevented=!1,this._.promisesInstance=null,this._.promises=[]}get target(){return this._.target}get cancellable(){return this._.cancellable}stopPropagation(){this._.propagationStopped=!0}get propagationStopped(){return this._.propagationStopped}preventDefault(){this._.defaultPrevented=!0}get defaultPrevented(){return this._.defaultPrevented}waitUntil(e){e instanceof Promise&&(this._.promises.push(e),this._.promisesInstance=null)}get promises(){return!this._.promisesInstance&&this._.promises.length&&(this._.promisesInstance=Promise.all(this._.promises)),this._.promisesInstance}respondWith(e){var t,r=o(e)&&!u(e.propagationStopped)&&!u(e.defaultPrevented);!1===e||r&&e.propagationStopped?this.stopPropagation():!1===e||r&&e.defaultPrevented?this.preventDefault():(e instanceof Promise&&(t=e)||r&&(t=e.promises))&&this.waitUntil(t)}}class T extends y{constructor(e,t){if(super(e,t),this.filters2D=g(this.filter),this.filtersIsOriginally2D=m(this.filter),this.filtersIsDynamic=this.filters2D.filter((e=>b(h(e)))).length>0,this.filtersIsDynamic&&this.filters2D.length>1)throw new Error('Only one "Dynamic Filter" must be observed at a time! "'+this.filters2D.map((e=>"["+e.join(", ")+"]")).join(", ")+'" have been bound together.')}fire(e){if(this.disconnected||this.params.type&&!M(e,(e=>this.params.type===e.type)))return;const t=e=>!["set","def"].includes(e.type)||!this.params.diff||(s(this.params.diff)?this.params.diff(e.value,e.oldValue):e.value!==e.oldValue);var r=new A(this.target);if(this.filters2D.length){var n=e.filter((e=>this.filters2D.filter(((r,n)=>{var s=r.slice();return this.filtersIsDynamic&&e.path.forEach(((e,t)=>{s[t]=s[t]||0===s[t]?s[t]:e})),(!this.filtersIsDynamic||!b(s))&&t(e)&&(!this.params.subtree&&p(s,e.path)||this.params.suptree&&x(s,e.path)&&(!a(this.params.suptree)||D(s,e.path).length<=this.params.suptree)||this.params.subtree&&e.path.length>=s.length&&x(e.path,s)&&(!a(this.params.subtree)||D(e.path,s).length<=this.params.subtree))})).length));if(n.length)if(this.filtersIsOriginally2D||this.params.subtree){var i=n;o(this.filter)&&(i={...this.filter},n.forEach(((e,t)=>{i[e.name]=e}))),r.respondWith(this.handler(i,r))}else n.forEach(((e,t)=>{r.respondWith(this.handler(e,r))}))}else(this.params.subtree||e.filter((e=>p(e.path,[e.name]))).length===e.length)&&e.filter((e=>t(e))).length&&r.respondWith(this.handler(e,r));return r}}class N{constructor(e,t){if(this.target=e,t.originalSubject||(this.originalSubject=e),!("type"in t))throw new Error("Mutation type must be given in definition!");if(!("name"in t))throw new Error("Property name must be given in definition!");O(t,((e,t)=>{"path"===e&&(t=d.resolve(t)),Object.defineProperty(this,e,{value:t,enumerable:!0})})),this.path||Object.defineProperty(this,"path",{value:d.resolve([t.name]),enumerable:!0}),Object.seal(this)}}class R extends v{constructor(e){super(e),this.buffers=[]}add(e){return super.add(new T(this.target,e))}fire(e,t){var r=new A(this.target,t);return e=h(e,!1).map((e=>e instanceof N?e:new N(this.target,e))),this.buffers.length?($(this.buffers)(e),r):(this.currentlyFiring.filter((t=>e.filter((e=>t.type===e.type&&t.name===e.name)).length)).length,this.fireables.forEach((n=>{if(r.propagationStopped&&t)return r;r.respondWith(n.fire(e))})),r)}static getFirebase(e,t=!0,r=null){return super._getFirebase("observer",...arguments)}static namespace(e,t=null){return super._namespace("observer",...arguments)}}function F(e,n,s=null,i={}){if(!(e=s||e)||!c(e))throw new Error("Target must be of type object!");e=E(e);var a=h(n),o=a.map((r=>{var n,o=function(n){return arguments.length?n:t(e,"accessorizedProps").has(r)&&t(e,"accessorizedProps").get(r).touch(!0)?t(e,"accessorizedProps").get(r).get():s?Reflect.get(e,r,s):Reflect.get(e,r)};return(n=P.getFirebase(e,!0,i.namespace))?n.fire({type:"get",name:r,related:a,receiver:s},o):o()}));return r(n)?o:o[0]}function W(e,t,n=!1,i=!1,l=!1){var u=0,h=e.shift();if((a(h)||!0===h||!1===h)&&(u=h,h=e.shift()),!e.length)throw new Error("_merge() requires two or more array/objects.");return e.forEach(((e,p)=>{var f,g,d;(c(e)||s(e))&&(n?(f=e,d=[],function(e,t){t=(t=t||Object.prototype)&&!r(t)?[t]:t;var n=[];for(e=e;e&&(!t||t.indexOf(e)<0)&&"default"!==e.name;)n.push(e),e=e?Object.getPrototypeOf(e):null;return n}(f,g).forEach((e=>{!function(e,...t){t.forEach((t=>{e.indexOf(t)<0&&e.push(t)}))}(d,...Object.getOwnPropertyNames(e))})),d):Object.getOwnPropertyNames(e)).forEach((s=>{if(t(s,h,e,p)){var c=h[s],f=e[s];if((r(c)&&r(f)||o(c)&&o(f))&&(!0===u||u>0))h[s]=r(c)&&r(f)?[]:{},W([a(u)?u-1:u,h[s],c,f],t,n,i,l);else if(r(h)&&r(e))i?h[s]=f:h.push(f);else try{l?Object.defineProperty(h,s,Object.getOwnPropertyDescriptor(e,s)):h[s]=e[s]}catch(e){}}}))})),h}function q(...e){return W(e,((e,t,r)=>!0),!1,!1,!1)}function Q(t,r,n=null,i={}){if(!(t=E(t))||!c(t))throw new Error('Observable subjects must be of type object; "'+e(t)+'" given!');if(s(r)&&(i=arguments.length>2?n:{},n=r,r=null),!s(n))throw new Error('Handler must be a function; "'+e(n)+'" given!');var a,o=R.getFirebase(t,!0,i.namespace),l={filter:r,handler:n,params:i};if((l.filter||"*"===l.params.subtree||l.params.subtree&&V(t))&&L(t,l.filter,l.params.subtree,i.namespace),l.params.unique&&(a=o.match({filter:r,params:i})).length){if("replace"!==l.params.unique)return a[0];o.remove(a[0])}return o.add(l)}function I(e,t,r,n=null,s={}){var i;if(e!==r&&(Q(r,((r,n)=>{if(i=R.getFirebase(e,!1,s.namespace)){var a=r.map((r=>{var n=r;do{if(n.target===e)return}while(n=n.src);var s={};return O(r,((e,t)=>{"target"!==e&&"name"!==e&&"path"!==e&&"src"!==e&&(s[e]=t)})),s.name=t,s.path=[t].concat(r.path),s.originalSubject=r.originalSubject,s.src=r,new N(e,s)})).filter((e=>e));if(a.length)return i.fire(a,n.cancellable)}}),{subtree:!0,...s,unique:!0,tags:[z,t,e]}),o(n)&&(i=R.getFirebase(e,!1,s.namespace)))){var a=q({name:t,type:"set",value:r,related:[t]},n);let e=i.fire(a,s.cancellable);if(s.eventTypeReturn)return e}}const z={};function L(e,t=null,r=!1,n=null){if(!e||!c(e))throw new Error("Target must be of type object!");var s=R.getFirebase(e,!0,n);if(s&&!s.build){s.build=r;var i=g(t),a=!i.length||i.filter((e=>!e[0]&&0!==e[0])).length?Object.keys(e):i.map((e=>e[0])),o=i.length?i.map((e=>e.slice(1))).filter((e=>e.length)):null;s.subBuild=o&&o.length?o:null,a.forEach((t=>{var i=F(e,t,null,{namespace:n});try{c(i)&&(I(e,t,i,null,params),(s.subBuild&&V(i)||(_isFunction(r)?r(i):r&&V(i)))&&L(i,s.subBuild,r,n))}catch(e){}}))}}const V=e=>(e instanceof Object||e instanceof Array||e instanceof Function)&&("undefined"==typeof window||e!==window);function H(t,r,n=null,i={}){if(!(t=E(t))||!c(t))throw new Error('Observable subjects must be of type object; "'+e(t)+'" given!');if(s(r)&&(i=arguments.length>2?n:{},n=r,r=null),n&&!s(n))throw new Error('Handler must be a function; "'+e(n)+'" given!');var a;if(a=R.getFirebase(t,!1,i.namespace))return a.removeMatches({filter:r,originalHandler:n,params:i})}function B(e,t,r,n=null,s={}){var i;if(H(r,null,null,{...s,tags:[z,t,e]}),o(n)&&(i=R.getFirebase(e,!1,s.namespace))){var a=q({name:t,type:"del",oldValue:r,related:[t]},n);i.fire(a,s.cancellable)}}function U(e,t,r={}){return k("has",e,{name:t},r)}function G(e,n,s,a={}){n=s.receiver||n;var u=s.keysOrPayload,p=s.value;if(!n||!c(n))throw new Error("Target must be of type object!");o(u)&&(a=p||{},p=null),n=E(n);var f=P.getFirebase(n,!1,a.namespace),g=R.getFirebase(n,!1,a.namespace);const d=(r,i,o,l)=>{var u,h="set";e&&(h="defineProperty",i=(u=i||{}).value);var p,d=!1;U(n,r,a)&&(d=!0,p=F(n,r,s.receiver,a));var m={name:r,type:h,value:i,receiver:s.receiver,related:o,detail:l,isUpdate:d,oldValue:p},b=function(e){return arguments.length&&(u?u=e:i=e),u?!(t(n,"accessorizedProps",!1).has(r)&&!t(n,"accessorizedProps").get(r).restore()||(Object.defineProperty(n,r,u),0)):t(n,"accessorizedProps",!1).has(r)?t(n,"accessorizedProps").get(r).set(i):(n[r]=i,!0)};if(f){var v=u?{type:"defineProperty",name:r,descriptor:u,receiver:s.receiver,related:o,detail:l,isUpdate:d,oldValue:p}:{type:"set",name:r,value:i,receiver:s.receiver,related:o,detail:l,isUpdate:d,oldValue:p};m.success=f.fire(v,b)}else m.success=b();return m.success&&m.value!==m.oldValue&&(c(m.oldValue)&&B(n,r,m.oldValue,null,a),c(m.value)&&(I(n,r,m.value,null,a),g&&(g.subBuild||g.build&&V(m.value))&&L(m.value,g.subBuild,g.build,a.namespace))),m};var m,b=[];r(u)||(l(u)||i(u))&&(m=h(u))?b=m.map((e=>d(e,p,m,a.detail))):o(u)&&(m=Object.keys(u))&&(b=m.map((e=>d(e,u[e],m,a.detail))));var v,y=b.filter((e=>!1!==e.success));return g?(v=g.fire(y,a.cancellable)).successCount=y.length:a.eventTypeReturn&&(v=new A(n)),a.eventTypeReturn?v:y.length>0}function K(e,t,r=null,n={}){return G(!0,e,{keysOrPayload:t,value:r},n)}function J(e,r,n={}){if(!e||!c(e))throw new Error("Target must be of type object!");e=E(e);var s,i,a=h(r),o=a.map((r=>{var s;U(e,r,n)&&(s=F(e,r,null,n));var i,o={name:r,type:"deleteProperty",related:a,detail:n.detail,oldValue:s},l=function(n){return arguments.length?n:!(t(e,"accessorizedProps",!1).has(r)&&!t(e,"accessorizedProps").get(r).restore()||(delete e[r],0))};return(i=P.getFirebase(e,!1,n.namespace))?o.success=i.fire({type:"deleteProperty",name:r,oldValue:s,related:a},l):o.success=l(),o.success&&c(o.oldValue)&&B(e,r,o.oldValue,null,n),o})),l=o.filter((e=>!1!==e.success));return(s=R.getFirebase(e,!1,n.namespace))?(i=s.fire(l,n.cancellable)).successCount=l.length:n.eventTypeReturn&&(i=new A(e)),n.eventTypeReturn?i:l.length>0}function X(e,t,r={}){return k("getOwnPropertyDescriptor",e,{name:t},r)}function Y(e,t={}){return k("getPrototypeOf",e,{},t)}function Z(e,t={}){return k("isExtensible",e,{},t)}function ee(e,t={}){return k("ownKeys",e,{},t)}function te(e,t={}){return k("preventExtensions",e,{},t)}function re(e,t,r=null,n=null,s={}){return G(!1,e,arguments.length>3?{keysOrPayload:t,value:r,receiver:n}:{keysOrPayload:t,value:r},s)}function ne(e,t,r={}){return k("setPrototypeOf",e,{prototype:t},r)}function se(e,t=[],n=!0){var i=0;return a(arguments[0])&&c(arguments[1])&&(i=arguments[0],e=arguments[1],t=arguments[2]||[]),W([i,{},e],((e,n,i)=>s(t)?t(e):!r(t)||!t.length||t.indexOf(e)>-1),!1,!1,n)}const ie={apply:C,construct:S,defineProperty:K,deleteProperty:J,get:F,getOwnPropertyDescriptor:X,getPrototypeOf:Y,has:U,isExtensible:Z,ownKeys:ee,preventExtensions:te,set:re,setPrototypeOf:ne,accessorize:function(e,n=[],s={}){s=o(n)?n:s;var i=(1===arguments.length?Object.keys(e):h(n)).map((r=>{if(t(e,"accessorizedProps").has(r)&&t(e,"accessorizedProps").get(r).touch(!0))return!1;const n=()=>{for(var t,n=e;!t&&(n=Object.getPrototypeOf(n));)t=Object.getOwnPropertyDescriptor(n,r);return t};var i,a,o=Object.getOwnPropertyDescriptor(e,r);o||(i={writable:!0,enumerable:!(r in e),configurable:!1!==s.configurable});var l={...o||i};"value"in l&&delete l.value,"writable"in l&&delete l.writable,l.get=()=>{if(c.ongoingGets.length)return c.get();c.ongoingGets.push(1);var t=F(e,r,null,s);return c.ongoingGets.pop(),t},l.set=t=>{if(c.ongoingSets.length)return c.set(t);c.ongoingSets.push(1);var n=re(e,r,t,null,s);return c.ongoingSets.pop(),n};var c={ongoingGets:[],ongoingSets:[],get:function(){var t=o;return t||(t=a?i:n()||i),t.get?t.get.call(e):t.value},set:function(t){var r=o;return r||(a?r=i:(r=n())?"value"in r&&(r=i,a=!0):(r=i,a=!0)),r.set||r.get?!!r.set&&r.set.call(e,t):(r.value=t,!0)},restore:function(){try{return this.intact()&&(o||a?Object.defineProperty(e,r,o||i):delete e[r],t(e,"accessorizedProps").delete(r)),!0}catch(e){}return!1},intact:function(){return(Object.getOwnPropertyDescriptor(e,r)||{}).get===l.get},touch:function(e=!1){return this.intact()||!!e&&!this.restore()}};try{return Object.defineProperty(e,r,l),t(e,"accessorizedProps").set(r,c),!0}catch(e){}return!1}));return r(n)?i:i[0]},unaccessorize:function(e,n=[],s={}){s=o(n)?n:s;var i=(1===arguments.length?Object.keys(e):h(n)).map((r=>!t(e,"accessorizedProps",!1).has(r)||t(e,"accessorizedProps").get(r).restore()));return r(n)?i:i[0]},proxy:function(r,i={}){if(!c(r))throw new Error('Object must be of type target; "'+e(r)+'" given!');var a=new Proxy(r,{apply:(e,t,r)=>C(e,t,r,i),construct:(e,t,r=null)=>S(e,t,r,i),defineProperty:(e,t,r)=>K(e,t,r,i),deleteProperty:(e,t)=>J(e,t,i),get:(e,t,r=null)=>{var o=F(e,t,r,i);return!1!==i.proxyAutoBinding&&s(o)&&!function(e){return n(e)&&/^class\s?/.test(Function.prototype.toString.call(e))}(o)?o.bind(a):o},getOwnPropertyDescriptor:(e,t)=>X(e,t,i),getPrototypeOf:e=>Y(e,i),has:(e,t)=>U(e,t,i),isExtensible:e=>Z(e,i),ownKeys:e=>ee(e,i),preventExtensions:e=>te(e,i),set:(e,t,r,n=null)=>re(e,t,r,n,i),setPrototypeOf:(e,t)=>ne(e,t,i)});return t(a).set(a,r),a},unproxy:E,observe:Q,unobserve:H,intercept:function(t,r,n={}){if(!c(t=E(t)))throw new Error('Object must be of type target; "'+e(handler)+'" given!');var i={},a=!0;o(r)||(s(r)?r={"":r}:s(n)&&(r={[r]:n},n=arguments.length>3?arguments[3]:{}),a=!1);var l=P.getFirebase(t,!0,n.namespace);return Object.keys(r).forEach((t=>{if(!s(r[t]))throw new Error("Callback"+(null===t?"":" for "+t)+' must be a function; "'+e(r[t])+'" given!');var o,c={filter:t,handler:r[t],params:n};if(c.params.unique&&(o=l.match(c)).length){if("replace"!==c.params.unique)return o[0];l.remove(o[0])}a?i[t]=l.add(c):i=l.add(c)})),i},unintercept:function(t,r=null,n={}){if(!(t=E(t))||!c(t))throw new Error('Object must be of type target; "'+e(t)+'" given!');var i=P.getFirebase(t,!1,n.namespace);_isObject(r)||(s(r)?r={[null]:r}:s(n)&&(r={[r]:n},n=arguments.length>3?arguments[3]:{}),isOriginallyObj=!1),(i=P.getFirebase(t,!1,n.namespace))&&Object.keys(r).forEach((t=>{if(!s(r[t]))throw new Error("Callback"+(null===t?"":" for "+t)+' must be a function; "'+e(r[t])+'" given!');var a={filter:t,originalHandler:r[t],params:n};return i.removeMatches(a)}))},closure:function(e,...t){var n=t.map((e=>{if(!c(e=E(e)))throw new Error("Target must be of type object!");return{target:e,subjectCopy:r(e)?e.slice(0):se(e)}})),s=e(...t);const i=()=>{n.map((e=>{var t,r,n=Object.keys(e.subjectCopy),s=Object.keys(e.target),i=[],a=(t=n.concat(s),t.filter(((e,t,r)=>r.indexOf(e)===t))).map((t=>{if(e.subjectCopy[t]!==e.target[t]){i.push(t);var r={name:t,related:i,buffered:!0};return s.includes(t)?(r.type="set",r.value=e.target[t],n.includes(t)&&(r.isUpdate=!0)):r.type="del",n.includes(t)&&(r.oldValue=e.subjectCopy[t]),c(e.subjectCopy[t])&&B(e.target,t,e.subjectCopy[t]),c(e.target[t])&&I(e.target,t,e.target[t]),r}})).filter((e=>e));if(a.length&&(r=R.getFirebase(e.target,!1)))return r.fire(a)}))};return s instanceof Promise?s.then(i):i(),s},build:L,link:I,unlink:B,Observers:R,Interceptors:P};function ae(e){return!Array.isArray(e)&&"object"==typeof e&&e}function oe(){if(!(ae(this)&&this.window||"undefined"!=typeof window))throw new Error("A window context is required.");const e=ae(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,i=!s&&!!e.StyleMedia;return(t||n)&&e.CSS,i?"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}class le{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 i=r=>{this.cycle(e,t,r)};s instanceof Promise?s.then(i):i()}}))};n instanceof Promise?n.then(s):s()}}))}}function ce(e){return e instanceof String||"string"==typeof e&&null!==e}function ue(e){return Array.isArray(e)}function he(e){return arguments.length&&(void 0===e||void 0===e)}function pe(e){return null===e||""===e}function fe(e){return"function"==typeof e}function ge(e){return Array.isArray(e)||"object"==typeof e&&e||fe(e)}function de(e,t=!0){return ue(e)?e:!t&&ae(e)?[e]:!1!==e&&0!==e&&function(e){return pe(e)||he(e)||!1===e||0===e||ge(e)&&!Object.keys(e).length}(e)?[]:function(e){return!ce(e)&&!he(e.length)}(e)?Array.prototype.slice.call(e):ae(e)?Object.values(e):[e]}function me(e){const t=oe.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 be{constructor(e){this.window=e}onAdded(e,t,r={}){return r.on="added",this.onPresenceChange(e,((e,r,n,s,i)=>{t(e,r,n,s,i)}),r)}onRemoved(e,t,r={}){return r.on="removed",this.onPresenceChange(e,((e,r,n,s,i)=>{t(e,r,n,s,i)}),r)}onPresent(e,t,r={}){me.call(this.window,(()=>{this.window.MutationObserver&&this.onAdded(e,((e,r)=>{e.forEach((e=>t(e,r)))}),r),ce(e)?de(this.window.document.querySelectorAll(e)).forEach((e=>t(e,1))):e.parentNode&&t(e,1)}))}onAbsent(e,t,r={}){me.call(this.window,(()=>{this.window.MutationObserver&&onRemoved(e,((e,r)=>{e.forEach((e=>t(e,r)))}),r),ce(e)?0===de(this.window.document.querySelectorAll(e)).length&&t(null,0):e.parentNode||t(e,0)}))}onPresenceChange(e,t,r={}){e=de(e,!1);var n=new Set,s=new Set,i=(i,a,o)=>{a&&"removed"===r.on||!a&&"added"===r.on||(i=((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)),ce(e)){var n=t.filter((t=>t.matches(e)));if(!1!==r.observeIndirectMutation&&(n=t.reduce(((t,r)=>t.concat(de(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,ce(n))||[],t.$$searchCache.set(n,s)),e.concat(s)}),[])))(e,i)).length&&(r.maintainCallState?(i.forEach((e=>{a?(n.add(e),s.delete(e)):(n.delete(e),s.add(e))})),t(i,a,o,n,s)):t(i,a,o))},a=r.context||this.window.document.documentElement;return this._observe(a,((e,t,n,s)=>{r.ignoreTransients||(i(e,0,!0),i(e.concat(t),1,!0),i(t,0,!0)),i(s,0),i(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(!ve.has(e)){const t=new Set,r=new this.window.MutationObserver((e=>{if(t.size){var r=e.reduce(((e,t)=>e.concat(de(t.addedNodes))),[]),n=e.reduce(((e,t)=>e.concat(de(t.removedNodes))),[]),s=[],i=[];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):i.push(e))})),r=[...r],n=[...n],t.forEach((e=>e(s,i,r,n)))}}));r.observe(e,{childList:!0,subtree:!0}),ve.set(e,{callbacks:t,observer:r})}const r=ve.get(e);return r.callbacks.add(t),{disconnect(){r.callbacks.delete(t)},reconnect(){r.callbacks.add(t)}}}}const ve=new Map;function ye(e,t=null,r=!1){const n=oe.call(this);if(ce(e)){var s;if(e.trim().startsWith("<")){var i=n.window.document.createElement("div");i.innerHTML=e,s=r?de(i.children):i.firstChild}else s=r?de(je.call(this,e,t)):Oe.call(this,e,t);return s}return e instanceof n.window.Element?r?[e]:e:r?de(e):e}function we(e,t=null){return ye.call(this,e,t,!0)}function Oe(e,t=null,r=!1){const n=oe.call(this);t=t||n.window.document;var s,i=r?"querySelectorAll":"querySelector";try{s=t[i](e)}catch(r){try{s=t[i](e.replace(/\:is\(/g,":matches("))}catch(r){try{s=t[i](e.replace(/\:is\(/g,":-webkit-any("))}catch(r){try{s=t[i](e.replace(/\:is\(/g,":-moz-any("))}catch(e){throw e}}}}return s}function je(e,t=null){return Oe.call(this,e,t,!0)}function Pe(e){return function(e){return e instanceof Number||"number"==typeof e}(e)||!0!==e&&!1!==e&&null!==e&&""!==e&&!isNaN(1*e)}function Ee(e){return fe(e)||e&&"[object function]"==={}.toString.call(e)}function ke(e,t,r={},n={}){t=de(t).slice();for(var s=e;!he(s)&&!pe(s)&&t.length;){var i=t.shift();if(!(r.get?r.get(s,i):ge(s)?i in s:s[i]))return void(n.exists=!1);s=r.get?r.get(s,i):s[i]}return n.exists=!0,s}function Ce(e,t,r,n={},s={}){const i=(e,r,n)=>s.set?s.set(e,r,n):(Pe(t[o])&&ue(e)?e.push(n):e[r]=n,!0);t=de(t);for(var a=e,o=0;o<t.length;o++){if(!(o<t.length-1))return i(a,t[o],r);if(!a||!ge(a)&&!Ee(a))return!1;var l=ke(a,t[o],s);if(!ge(l)){if(!1===s.buildTree)return!1;if(l=Ee(s.buildTree)?s.buildTree(o):Pe(t[o+1])?[]:{},!i(a,t[o],l))return!1}a=l}}function Se(e,t,r=!1,n={}){t=de(t);var s=!1;do{var i=""===(i=t.pop())?0:i,a=e;t.length&&(a=ke(e,t,{},n)),(ge(a)||Ee(a))&&(n.has?n.has(a,i):i in a)&&(n.deleteProperty?s=n.deleteProperty(a,i):n.del?s=n.del(a,i):(delete a[i],s=!0))}while(s&&r&&t.length&&(ge(a)||Ee(a))&&!(n.keys?n.keys(a):Object.keys(a)).length);return s}function _e(e,t,r={}){var n={};return ke(e,t,r,n),n.exists}function $e(e,t=!1){const r=oe.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 Ce(e,r[0].split("."),"true"===r[1]||"false"!==r[1]&&(Pe(r[1])?parseInt(r[1]):r[1])),e}),{})),n.get=function(e){return ke(this.vars,e.split("."))},n.set=function(e,r=null,n=!1){var s=ae(e)?e:{[e]:!0===r?"true":r};if(n=arguments.length<3?r:n,Object.keys(s).forEach((e=>{if(!1===s[e])Se(this.vars,e.split("."));else if(ae(s[e]))Object.keys(s[e]).forEach((t=>{var r=(e+"."+t).split(".");n&&_e(this.vars,r)||Ce(this.vars,r,s[e][t])}));else{var t=e.split(".");n&&_e(this.vars,t)||Ce(this.vars,t,s[e])}})),t){const e=(t,r)=>Object.keys(r).reduce(((n,s)=>{var i=(t?t+".":"")+s;return ae(r[s])?n.push(...e(i,r[s])):n.push(i+"="+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 Me(){const e=oe.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 le(e.window),e.DOM.mutations=new be(e.window),e.DOM.meta=$e.bind(e.window),e.DOM.query=ye.bind(e.window),e.DOM.queryAll=we.bind(e.window),e.DOM.ready=me.bind(e.window)),e}const xe=function(e,t=1,n=!0){return!a(t)||t<=0?e:(!r(e)&&o(e)&&n&&(e=Object.values(e)),r(e)?e.reduce(((e,s)=>r(s)||o(s)&&n?e.concat(xe(r(s)?s:Object.values(s),t-1,n)):e.concat(s)),[]):e)},De=xe;function Ae(e){return o(e)&&Object.getPrototypeOf(e)===Object.prototype}function Te(e){return!0===e||!1===e}const Ne=function(e,t,n=!0,a=1){if(r(e)&&r(t)&&e.length!==t.length)return!n;if(o(e)&&o(t)){var l=Object.keys(e),u=Object.keys(t);if(!l.length&&!u.length)return Ae(e)&&Ae(t)?n:e===t===n;if(!Ne(l,u))return!n}if(a>0&&(r(e)&&r(t)||o(e)&&o(t))){var h=function(e,t,n=!0,s=!0,i=!1,a=!1){if(r(e)&&r(t)){var l=[],u=!0;return e.forEach((e=>{if(u){var h=!1;O(t,((t,i)=>{(!h||s&&c(e))&&((r(h=n(e,i))&&!h.length||o(h)&&!Object.keys(h).length)&&(h=!1),c(h)&&s&&(e=h))})),c(h)?l.push(s?h:e):Te(h)?i&&!h||!i&&h?l.push(e):a&&(u=!1):l.push(h)}})),l}if(o(e)&&o(t))return l={},u=!0,Object.keys(e).forEach((h=>{if(u){var p=n(e[h],t[h]);(r(p)&&!p.length||o(p)&&!Object.keys(p).length)&&(p=!1),c(p)?l[h]=s?p:e[h]:Te(p)?i&&!p||!i&&p?l[h]=e[h]:a&&(u=!1):l[h]=p}})),l}(e,t,((e,t)=>Ne(e,t,n,a-1)),!1,!1,!0);return r(h)?h.length===e.length&&h.length===t.length:o(h)&&o(e)?Object.keys(h).length===Object.keys(e).length&&Object.keys(h).length===Object.keys(t).length:h}return s(n)?n(e,t):i(e)&&i(t)&&isNaN(e)&&isNaN(t)?n:e===t===n},Re=Ne;function Fe(e,t=[]){return W([{},e],((e,n,i)=>{if(!s(i[e]))return s(t)?t(e):!r(t)||!t.length||t.indexOf(e)>-1}),!1,!1,!1)}class We{static lex(e,t,r={}){if(!l(e+=""))throw new Error("Argument1 must be a string!");var n=e=>({delims:e.delims.slice(),options:Fe(e.options),nesting:e.nesting.slice(),maxDepth:e.maxDepth,comments:e.comments.slice(),tokens:e.tokens.slice(),matches:e.matches.slice(),matchesi:Fe(e.matchesi)});if(We.$cache[e]&&!1!==r.cache)for(var s=0;s<We.$cache[e].length;s++){var i=We.$cache[e][s];if(Re(i.delims,t))return n(i)}var a=new We(e,r).lex(t);return!1!==r.cache&&(We.$cache[e]=We.$cache[e]||[],We.$cache[e].push(a)),n(a)}static split(e,t,r){return We.lex(e,t,r).tokens}static match(e,t,r){return We.lex(e,t,r).matches}constructor(e,t){if(!l(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=We.$blocks),this.$options.quotes||(this.$options.quotes=We.$quotes),this.$options.comments||(this.$options.comments=We.$comments)}lex(e,t){for(var r={delims:h(e),options:q(!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: "+De(r.nesting).join(", "));return r}_evalCharsAt(e,t){if(!(t>=this.$str.length)){var r=1,n={},s={},i={};if(e.openComment||(s=this._testQuotes(e,t)),e.openQuote||(n=this._testComments(e,t)),e.openComment||n.ending)e.nesting.length||i.ending?this._push(e,this.$str[t]):(r=(o=n.starting||n.ending||this.$str[t]).length,this._push(e,o,"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;i=this._testNesting(e,t),i=this._testNesting(e,t);var a=this._testChars(e.options.stopChars||[],e,t);if(!e.nesting.length&&!1!==a)return e.options.stopChar=a,void(e.options.stopCharForward=this.$str.substr(t));if(e.delims.length)if(e.nesting.length||i.ending){var o;r=(o=i.starting||i.ending||this.$str[t]).length,this._push(e,o)}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&&i.starting?(e.matches.push(null),this._push(e,i.starting),r=i.starting.length):!e.nesting.length&&i.ending?(this._push(e,i.ending),r=i.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($(n)===$(e.openComment)){var s=$(n);this.$str.substr(t).startsWith(s)&&(e.openComment=!1,r.ending=s)}}else{var i=_(n);this.$str.substr(t).startsWith(i)&&(e.openComment=n,r.starting=i)}})),r}_testNesting(e,t){var r={};return(e.options.blocks||[]).forEach((n=>{var s=_(n);if(this.$str.substr(t).startsWith(s))e.nesting=e.nesting.concat([n]),r.starting=s;else if(e.nesting.length&&$(n)===$($(e.nesting))){var i=$(n);this.$str.substr(t).startsWith(i)&&(e.nesting=e.nesting.slice(0,-1),r.ending=i)}})),e.maxDepth=Math.max(e.maxDepth,e.nesting.length),r}_testChars(e,t,r){for(var n=0;n<e.length;n++){var i=e[n];if(s(i)){var a=i(this.$str.substr(0,r),this.$str.substr(r),t.tokens.slice());if(!1!==a)return a}if(t.options.useRegex){var o=this.$str.substr(r).match(new RegExp("^"+i,!0!==t.options.useRegex?t.options.useRegex:""));if(o)return o[0]}if(!t.options.ci&&this.$str.substr(r,i.length)===i||t.options.ci&&this.$str.substr(r,i.length).toLowerCase()===i.toLowerCase())return i}return!1}_push(e,t,r="tokens",n=!1){var s=e.matches.length;if(u(e.tokens[s])&&(e.tokens[s]=""),"comments"===r){e.tokens[s].comments||(e.tokens[s]=new String(e.tokens[s]),e.tokens[s].comments=[]);var i=e.tokens[s].comments.length-(!e.tokens[s].comments.length||n?0:1);e.tokens[s].comments[i]=(e.tokens[s].comments[i]||"")+t}else e.tokens[s].comments,e.tokens[s]=e.tokens[s]+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,q({useRegex:!0},t||{}))}regSplit(e,t){return this.regParse(e,t).tokens}regMatch(e,t){return this.regParse(e,t).matches}}function qe(e,t={}){const r=Me.call(this);return r.OOHTML||(r.OOHTML={}),r.OOHTML.meta||(r.OOHTML.meta=r.DOM.meta("oohtml",!0)),r.OOHTML.meta.defaults(q(3,e,t)),r.OOHTML.meta}We.$blocks=[["(",")"],["[","]"],["{","}"]],We.$quotes=['"',"'","`"],We.$comments=[["/*","*/"],["//","\n"]],We.$cache=Object.create(null),function e(r={}){const n=Me.call(this);if(r.onDomReady)return void n.DOM.ready((()=>{e.call(this,{...r,onDomReady:!1})}));const s=n.window,i=n.window.document,a=n.DOM.mutations,o=[],c=qe.call(this,{attr:{namespace:"namespace",id:"id"},api:{namespace:"namespace"},eagermode:!0},r.params),u=function(e){if(!t(e,"oohtml").has("namespace")){const r=Object.create(null);t(e,"oohtml").set("namespace",r),ie.link&&ie.link(e,c.get("api.namespace"),r)}return t(e,"oohtml").get("namespace")},p=function(e){if(!t(e,"oohtml").has("publicNamespace")){const r=u(e);t(e,"oohtml").set("publicNamespace",c.get("eagermode")?new Proxy(r,{get(t,n){if(l(n)&&!r[n]){var a=h(e.querySelectorAll("["+s.CSS.escape(c.get("attr.id"))+'="'+n+'"]')).filter((t=>{var r=t.parentNode.closest("["+s.CSS.escape(c.get("attr.namespace"))+"]");return e===i?!r:r===e}))[0];a&&ie.set(r,n,a)}return r[n]}}):r)}return t(e,"oohtml").get("publicNamespace")};if(c.get("api.namespace")in s.Element.prototype)throw new Error('The "Element" class already has a "'+c.get("api.namespace")+'" property!');if(Object.defineProperty(s.Element.prototype,c.get("api.namespace"),{get:function(){return p(this)}}),c.get("api.namespace")in i)throw new Error('The "document" object already has a "'+c.get("api.namespace")+'" property!');Object.defineProperty(i,c.get("api.namespace"),{get:function(){return p(i)}}),a.onPresent("["+s.CSS.escape(c.get("attr.id"))+"]",(e=>{var r=t(e,"oohtml");if(!r.get("idAlreadyBeingWatched")&&!M(o,(t=>e.closest(t)))){var n=e.getAttribute(c.get("attr.id")),l=e.parentNode.closest("["+s.CSS.escape(c.get("attr.namespace"))+"]");l||(l=i);var h=u(l);h[n]!==e&&ie.set(h,n,e),r.set("idAlreadyBeingWatched",!0),a.onPresenceChange(e,((t,r)=>{r?h[n]!==e&&ie.set(h,n,e):h[n]===e&&ie.deleteProperty(h,n)}))}}))}.call(window)})();
2
- //# sourceMappingURL=namespaced-html.js.map
1
+ (()=>{function g(r){return!Array.isArray(r)&&typeof r=="object"&&r}function S(r){return typeof r}function v(r,...e){globalThis.WebQitInternalsRegistry||(globalThis.WebQitInternalsRegistry=new Map);var t=globalThis.WebQitInternalsRegistry.get(r);if(!t){if(t=new Map,e[0]===!1)return t;globalThis.WebQitInternalsRegistry.set(r,t)}for(var o,i;o=e.shift();)if((i=t)&&!(t=t.get(o))){if(t=new Map,e[0]===!1)return t;i.set(o,t)}return t}function h(r){return Array.isArray(r)}function ge(r){return r===!0||r===!1}function ee(r){return typeof r=="function"}function Ye(r){return ee(r)&&/^class\s?/.test(Function.prototype.toString.call(r))}function Se(r){return r===null||r===""}function A(r){return arguments.length&&(r===void 0||typeof r>"u")}function d(r){return Array.isArray(r)||typeof r=="object"&&r||ee(r)}function Ke(r){return Se(r)||A(r)||r===!1||r===0||d(r)&&!Object.keys(r).length}function _(r){return ee(r)||r&&{}.toString.call(r)==="[object function]"}function U(r){return r instanceof Number||typeof r=="number"}function F(r){return U(r)||r!==!0&&r!==!1&&r!==null&&r!==""&&!isNaN(r*1)}function Ce(r){return g(r)&&Object.getPrototypeOf(r)===Object.prototype}function W(r){return r instanceof String||typeof r=="string"&&r!==null}function ke(r){return!W(r)&&!A(r.length)}function L(r,e=1){var t=0;r.forEach(i=>{t++});var o=r.slice(r.length-t,e);return arguments.length>1?o:o[0]}function N(r,e=1){return arguments.length>1?L(r.slice().reverse(),e).reverse():L(r.slice().reverse())}function Fe(r,...e){return e.forEach(t=>{r.indexOf(t)<0&&r.push(t)}),r}function er(o,e){e=e||Object.prototype,e=e&&!h(e)?[e]:e;for(var t=[],o=o;o&&(!e||e.indexOf(o)<0)&&o.name!=="default";)t.push(o),o=o?Object.getPrototypeOf(o):null;return t}function rr(r,e){var t=[];return er(r,e).forEach(o=>{Fe(t,...Object.getOwnPropertyNames(o))}),t}function D(r,e,t=!1,o=!1,i=!1){var s=0,n=r.shift();if((F(n)||n===!0||n===!1)&&(s=n,n=r.shift()),!r.length)throw new Error("_merge() requires two or more array/objects.");return r.forEach((u,a)=>{!d(u)&&!_(u)||(t?rr(u):Object.getOwnPropertyNames(u)).forEach(f=>{if(!!e(f,n,u,a)){var p=n[f],m=u[f];if((h(p)&&h(m)||g(p)&&g(m))&&(s===!0||s>0))n[f]=h(p)&&h(m)?[]:{},D([F(s)?s-1:s,n[f],p,m],e,t,o,i);else if(h(n)&&h(u))o?n[f]=m:n.push(m);else try{i?Object.defineProperty(n,f,Object.getOwnPropertyDescriptor(u,f)):n[f]=u[f]}catch{}}})}),n}function q(r,e){var t=void 0;return d(r)&&Object.keys(r).forEach((o,i)=>{t!==!1&&(t=e(F(o)?parseFloat(o):o,r[o],i))}),t}function M(...r){return D(r,(e,t,o)=>!0,!1,!1,!1)}function ue(r,e,t=null,o=!1){return e.length>r.length?-1:(typeof t=="number"?o?r.slice(0,t+1+(t<0?r.length:0)):r.slice(t):r).reduce((i,s,n)=>{var[u,a,f]=i;if(!o&&u>-1)return[u,a,f];var p=f+1,m=s===e[p]?p===0?[n,0]:[a,p]:[-1,-1];return m[1]===e.length-1&&(m[1]=-1,m[0]>-1)?[m[0]].concat(m):[u].concat(m)},[-1,-1,-1])[0]+(o||typeof t!="number"?0:t>-1?t:r.length-t)}function me(r,e,t=null,o=!1){var i=ue(r,e,t,o);return i===-1?[]:r.slice(i+e.length)}function _e(r,e){return r.reduce((t,o,i)=>t||e(o,i),!1)}function y(r,e=!0){return h(r)?r:!e&&g(r)?[r]:r!==!1&&r!==0&&Ke(r)?[]:ke(r)?Array.prototype.slice.call(r):g(r)?Object.values(r):[r]}function H(r,e,t=null){return t||t!==!1&&r.dotSafe&&e.dotSafe?r.join(".")===e.join("."):r.length===e.length&&r.reduce((o,i,s)=>o&&i===e[s],!0)}var br=function(r,e=1,t=!0){return!F(e)||e<=0||(!h(r)&&g(r)&&t&&(r=Object.values(r)),!h(r))?r:r.reduce((o,i)=>h(i)||g(i)&&t?o.concat(br(h(i)?i:Object.values(i),e-1,t)):o.concat(i),[])},tr=br;function ve(r,e,t=null){return h(e)?r.filter(o=>t?e.filter(i=>t(o,i)).length:e.indexOf(o)!==-1):[]}function ye(r,e,t=null){return t||t!==!1&&r.dotSafe&&e.dotSafe?(r.join(".")+".").startsWith(e.join(".")+"."):e.reduce((o,i,s)=>o&&i===r[s],!0)}function or(r){let e=(t,o,i)=>i.indexOf(t)===o;return r.filter(e)}function re(r){return(ir(r)?r:y(r).length?[r]:[]).reduce((e,t)=>e.concat([y(t)]),[]).map(e=>G.resolve(e))}var G=class extends Array{static resolve(e){return e.every(t=>!(t+"").includes("."))?new G().concat(e):e}get dotSafe(){return!0}};function ir(r){return y(r).reduce((e,t)=>e||h(t),!1)}function nr(r){return r.filter(e=>e||e===0).length!==r.length}function xr(r){return r.filter(e=>nr(y(e))).length>0}var te=class{constructor(e){this.target=e,this.fireables=[],this.currentlyFiring=[]}add(e){return this.fireables.push(e),e}remove(e){this.fireables=this.fireables.filter(t=>t!==e)}removeMatches(e){this.match(e).forEach(t=>{this.fireables=this.fireables.filter(o=>o!==t)})}match(e){return this.fireables.filter(t=>{var o=re(t.filter),i=y((t.params||{}).tags),s=re(e.filter),n=y((e.params||{}).tags);return(!e.originalHandler||t.handler===e.originalHandler)&&(!s.length||H(s,o))&&(!n.length||n.length===i.length&&ve(i,n).length===n.length)})}static _getFirebase(e,t,o=!0,i=this.__namespace){if(!d(t))throw new Error('Subject must be of type object; "'+S(t)+'" given!');var s=this;return i&&globalThis.WebQitObserverNamespaceRegistry.has(e+"-"+i)&&(s=globalThis.WebQitObserverNamespaceRegistry.get(e+"-"+i),e+="-"+i),!v(t,"firebases").has(e)&&o&&v(t,"firebases").set(e,new s(t)),v(t,"firebases").get(e)}static _namespace(e,t,o=null){if(e+="-"+t,arguments.length===2)return globalThis.WebQitObserverNamespaceRegistry.get(e);if(!(o.prototype instanceof this))throw new Error(`The implementation of the namespace ${this.name}.${t} must be a subclass of ${this.name}.`);globalThis.WebQitObserverNamespaceRegistry.set(e,o),o.__namespace=t}};globalThis.WebQitObserverNamespaceRegistry||(globalThis.WebQitObserverNamespaceRegistry=new Map);var oe=class{constructor(e,t){this.target=e,this.handler=t.handler,this.filter=t.filter,this.params=t.params}disconnect(){this.disconnected=!0}};var be=class extends oe{fire(e,t,o){return this.disconnected||this.filter&&!ve(y(this.filter),[e.type]).length?t(...Array.prototype.slice.call(arguments,2)):this.handler(e,o,t)}};function ae(r,e,t=!0,o=!0,i=!1,s=!1){if(h(r)&&h(e)){var n=[],u=!0;return r.forEach(a=>{if(!!u){var f=!1;q(e,(p,m)=>{(!f||o&&d(a))&&(f=t(a,m),(h(f)&&!f.length||g(f)&&!Object.keys(f).length)&&(f=!1),d(f)&&o&&(a=f))}),d(f)?n.push(o?f:a):ge(f)?i&&!f||!i&&f?n.push(a):s&&(u=!1):n.push(f)}}),n}if(g(r)&&g(e)){var n={},u=!0;return Object.keys(r).forEach(p=>{if(!!u){var m=t(r[p],e[p]);(h(m)&&!m.length||g(m)&&!Object.keys(m).length)&&(m=!1),d(m)?n[p]=o?m:r[p]:ge(m)?i&&!m||!i&&m?n[p]=r[p]:s&&(u=!1):n[p]=m}}),n}}function Ae(r,e=[],t=!0){var o=0;return F(arguments[0])&&d(arguments[1])&&(o=arguments[0],r=arguments[1],e=arguments[2]||[]),D([o,{},r],(i,s,n)=>_(e)?e(i):h(e)&&e.length?e.indexOf(i)>-1:!0,!1,!1,t)}function Ne(r,e=[]){return D([{},r],(t,o,i)=>{if(!_(i[t]))return _(e)?e(t):h(e)&&e.length?e.indexOf(t)>-1:!0},!1,!1,!1)}var sr=function(r,e,t=!0,o=1){if(h(r)&&h(e)&&r.length!==e.length)return!t;if(g(r)&&g(e)){var i=Object.keys(r),s=Object.keys(e);if(!i.length&&!s.length)return Ce(r)&&Ce(e)?t:r===e===t;if(!sr(i,s))return!t}if(o>0&&(h(r)&&h(e)||g(r)&&g(e))){var n=ae(r,e,(u,a)=>sr(u,a,t,o-1),!1,!1,!0);return h(n)?n.length===r.length&&n.length===e.length:g(n)&&g(r)?Object.keys(n).length===Object.keys(r).length&&Object.keys(n).length===Object.keys(e).length:n}return _(t)?t(r,e):U(r)&&U(e)&&isNaN(r)&&isNaN(e)?t:r===e===t},fr=sr;var le=class{constructor(e,t){if(this.target=e,!t.type)throw new Error("Action type must be given in definition!");q(t,(o,i)=>{Object.defineProperty(this,o,{value:i,enumerable:!0})}),Object.seal(this)}};var P=class extends te{add(e){return super.add(new be(this.target,e))}fire(e,t=null){if(e instanceof le||(e=new le(this.target,e)),this.currentlyFiring.filter(s=>s.type===e.type&&s.name===e.name).length)return t?t():void 0;this.currentlyFiring.push(e);let o=(s,...n)=>{var u=this.fireables[s];return u?u.fire(e,(...a)=>o(s+1,...a),...n):t?t(...n):n[0]};var i=o(0);return this.currentlyFiring.pop(),i}static getFirebase(e,t=!0,o=null){return super._getFirebase("interceptor",...arguments)}static namespace(e,t=null){return super._namespace("interceptor",...arguments)}};function w(r){return v(r,!1).get(r)||r}function T(r,e,t={},o={}){if(!e||!d(e))throw new Error("Target must be of type object!");e=w(e);var i,s=function(n){return arguments.length?n:Reflect[r](e,...Object.values(t))};return(i=P.getFirebase(e,!1,o.namespace))?i.fire({type:r,...t},s):s()}function je(r,e,t,o={}){return T("apply",r,{thisArgument:e,argumentsList:t},o)}function De(r,e,t=null,o={}){return T("construct",r,arguments.length>2?{argumentsList:e,newTarget:t}:{argumentsList:e},o)}var R=class{constructor(e,t=!1){this._={},this._.target=e,this._.cancellable=t,this._.propagationStopped=!1,this._.defaultPrevented=!1,this._.promisesInstance=null,this._.promises=[]}get target(){return this._.target}get cancellable(){return this._.cancellable}stopPropagation(){this._.propagationStopped=!0}get propagationStopped(){return this._.propagationStopped}preventDefault(){this._.defaultPrevented=!0}get defaultPrevented(){return this._.defaultPrevented}waitUntil(e){e instanceof Promise&&(this._.promises.push(e),this._.promisesInstance=null)}get promises(){return!this._.promisesInstance&&this._.promises.length&&(this._.promisesInstance=Promise.all(this._.promises)),this._.promisesInstance}respondWith(e){var t,o=g(e)&&!A(e.propagationStopped)&&!A(e.defaultPrevented);e===!1||o&&e.propagationStopped?this.stopPropagation():e===!1||o&&e.defaultPrevented?this.preventDefault():(e instanceof Promise&&(t=e)||o&&(t=e.promises))&&this.waitUntil(t)}};var xe=class extends oe{constructor(e,t){if(super(e,t),this.filters2D=re(this.filter),this.filtersIsOriginally2D=ir(this.filter),this.filtersIsDynamic=xr(this.filters2D),this.filtersIsDynamic&&this.filters2D.length>1)throw new Error('Only one "Dynamic Filter" must be observed at a time! "'+this.filters2D.map(o=>"["+o.join(", ")+"]").join(", ")+'" have been bound together.')}fire(e){if(this.disconnected||this.params.type&&!_e(e,n=>this.params.type===n.type))return;let t=n=>!["set","def"].includes(n.type)||!this.params.diff||(_(this.params.diff)?this.params.diff(n.value,n.oldValue):n.value!==n.oldValue);var o=new R(this.target);if(this.filters2D.length){var i=e.filter(n=>this.filters2D.filter((u,a)=>{var f=u.slice();return this.filtersIsDynamic&&n.path.forEach((p,m)=>{f[m]=f[m]||f[m]===0?f[m]:p}),(!this.filtersIsDynamic||!nr(f))&&t(n)&&(!this.params.subtree&&H(f,n.path)||this.params.suptree&&ye(f,n.path)&&(!F(this.params.suptree)||me(f,n.path).length<=this.params.suptree)||this.params.subtree&&n.path.length>=f.length&&ye(n.path,f)&&(!F(this.params.subtree)||me(n.path,f).length<=this.params.subtree))}).length);if(i.length)if(this.filtersIsOriginally2D||this.params.subtree){var s=i;g(this.filter)&&(s={...this.filter},i.forEach((n,u)=>{s[n.name]=n})),o.respondWith(this.handler(s,o))}else i.forEach((n,u)=>{o.respondWith(this.handler(n,o))})}else(this.params.subtree||e.filter(n=>H(n.path,[n.name])).length===e.length)&&e.filter(n=>t(n)).length&&o.respondWith(this.handler(e,o));return o}};var J=class{constructor(e,t){if(this.target=e,t.originalSubject||(this.originalSubject=e),!("type"in t))throw new Error("Mutation type must be given in definition!");if(!("name"in t))throw new Error("Property name must be given in definition!");q(t,(o,i)=>{o==="path"&&(i=G.resolve(i)),Object.defineProperty(this,o,{value:i,enumerable:!0})}),this.path||Object.defineProperty(this,"path",{value:G.resolve([t.name]),enumerable:!0}),Object.seal(this)}};var x=class extends te{constructor(e){super(e),this.buffers=[]}add(e){return super.add(new xe(this.target,e))}fire(e,t){var o=new R(this.target,t);return e=y(e,!1).map(i=>i instanceof J?i:new J(this.target,i)),this.buffers.length?(N(this.buffers)(e),o):(this.currentlyFiring.filter(i=>e.filter(s=>i.type===s.type&&i.name===s.name).length).length,this.fireables.forEach(i=>{if(o.propagationStopped&&t)return o;o.respondWith(i.fire(e))}),o)}static getFirebase(e,t=!0,o=null){return super._getFirebase("observer",...arguments)}static namespace(e,t=null){return super._namespace("observer",...arguments)}};function $(r,e,t=null,o={}){if(r=t||r,!r||!d(r))throw new Error("Target must be of type object!");r=w(r);var i=y(e),s=i.map(n=>{var u,a=function(f){return arguments.length?f:v(r,"accessorizedProps").has(n)&&v(r,"accessorizedProps").get(n).touch(!0)?v(r,"accessorizedProps").get(n).get():t?Reflect.get(r,n,t):Reflect.get(r,n)};return(u=P.getFirebase(r,!0,o.namespace))?u.fire({type:"get",name:n,related:i,receiver:t},a):a()});return h(e)?s:s[0]}function Me(r,e,t=null,o={}){if(r=w(r),!r||!d(r))throw new Error('Observable subjects must be of type object; "'+S(r)+'" given!');if(_(e)&&(o=arguments.length>2?t:{},t=e,e=null),!_(t))throw new Error('Handler must be a function; "'+S(t)+'" given!');var i,s=x.getFirebase(r,!0,o.namespace),n={filter:e,handler:t,params:o};if((n.filter||n.params.subtree==="*"||n.params.subtree&&pe(r))&&Z(r,n.filter,n.params.subtree,o.namespace),n.params.unique&&(i=s.match({filter:e,params:o})).length){if(n.params.unique!=="replace")return i[0];s.remove(i[0])}return s.add(n)}function X(r,e,t,o=null,i={}){if(r!==t){var s;if(Me(t,(u,a)=>{if(s=x.getFirebase(r,!1,i.namespace)){var f=u.map(p=>{var m=p;do if(m.target===r)return;while(m=m.src);var l={};return q(p,(c,b)=>{c!=="target"&&c!=="name"&&c!=="path"&&c!=="src"&&(l[c]=b)}),l.name=e,l.path=[e].concat(p.path),l.originalSubject=p.originalSubject,l.src=p,new J(r,l)}).filter(p=>p);if(f.length)return s.fire(f,a.cancellable)}},{subtree:!0,...i,unique:!0,tags:[mr,e,r]}),g(o)&&(s=x.getFirebase(r,!1,i.namespace))){var n=M({name:e,type:"set",value:t,related:[e]},o);let u=s.fire(n,i.cancellable);if(i.eventTypeReturn)return u}}}var mr={};function Z(r,e=null,t=!1,o=null){if(!r||!d(r))throw new Error("Target must be of type object!");var i=x.getFirebase(r,!0,o);if(!(!i||i.build)){i.build=t;var s=re(e),n=!s.length||s.filter(a=>!a[0]&&a[0]!==0).length?Object.keys(r):s.map(a=>a[0]),u=s.length?s.map(a=>a.slice(1)).filter(a=>a.length):null;i.subBuild=u&&u.length?u:null,n.forEach(a=>{var f=$(r,a,null,{namespace:o});try{d(f)&&(X(r,a,f,null,params),(i.subBuild&&pe(f)||(_isFunction(t)?t(f):t&&pe(f)))&&Z(f,i.subBuild,t,o))}catch{}})}}var pe=r=>(r instanceof Object||r instanceof Array||r instanceof Function)&&(typeof window>"u"||r!==window);function $e(r,e,t=null,o={}){if(r=w(r),!r||!d(r))throw new Error('Observable subjects must be of type object; "'+S(r)+'" given!');if(_(e)&&(o=arguments.length>2?t:{},t=e,e=null),t&&!_(t))throw new Error('Handler must be a function; "'+S(t)+'" given!');var i;if(i=x.getFirebase(r,!1,o.namespace))return i.removeMatches({filter:e,originalHandler:t,params:o})}function Y(r,e,t,o=null,i={}){$e(t,null,null,{...i,tags:[mr,e,r]});var s;if(g(o)&&(s=x.getFirebase(r,!1,i.namespace))){var n=M({name:e,type:"del",oldValue:t,related:[e]},o);s.fire(n,i.cancellable)}}function K(r,e,t={}){return T("has",r,{name:e},t)}function Ie(r,e,t,o={}){e=t.receiver||e;var i=t.keysOrPayload,s=t.value;if(!e||!d(e))throw new Error("Target must be of type object!");g(i)&&(o=s||{},s=null),e=w(e);var n=P.getFirebase(e,!1,o.namespace),u=x.getFirebase(e,!1,o.namespace);let a=(c,b,E,de)=>{var hr="set",V;r&&(hr="defineProperty",V=b||{},b=V.value);var Pe=!1,Te;K(e,c,o)&&(Pe=!0,Te=$(e,c,t.receiver,o));var j={name:c,type:hr,value:b,receiver:t.receiver,related:E,detail:de,isUpdate:Pe,oldValue:Te},dr=function(gr){return arguments.length&&(V?V=gr:b=gr),V?v(e,"accessorizedProps",!1).has(c)&&!v(e,"accessorizedProps").get(c).restore()?!1:(Object.defineProperty(e,c,V),!0):v(e,"accessorizedProps",!1).has(c)?v(e,"accessorizedProps").get(c).set(b):(e[c]=b,!0)};if(n){var Rr=V?{type:"defineProperty",name:c,descriptor:V,receiver:t.receiver,related:E,detail:de,isUpdate:Pe,oldValue:Te}:{type:"set",name:c,value:b,receiver:t.receiver,related:E,detail:de,isUpdate:Pe,oldValue:Te};j.success=n.fire(Rr,dr)}else j.success=dr();return j.success&&j.value!==j.oldValue&&(d(j.oldValue)&&Y(e,c,j.oldValue,null,o),d(j.value)&&(X(e,c,j.value,null,o),u&&(u.subBuild||u.build&&pe(j.value))&&Z(j.value,u.subBuild,u.build,o.namespace))),j};var f,p=[];h(i)||(W(i)||U(i))&&(f=y(i))?p=f.map(c=>a(c,s,f,o.detail)):g(i)&&(f=Object.keys(i))&&(p=f.map(c=>a(c,i[c],f,o.detail)));var m=p.filter(c=>c.success!==!1),l;return u?(l=u.fire(m,o.cancellable),l.successCount=m.length):o.eventTypeReturn&&(l=new R(e)),o.eventTypeReturn?l:m.length>0}function We(r,e,t=null,o={}){return Ie(!0,r,{keysOrPayload:e,value:t},o)}function qe(r,e,t={}){if(!r||!d(r))throw new Error("Target must be of type object!");r=w(r);var o=y(e),i=o.map(a=>{var f;K(r,a,t)&&(f=$(r,a,null,t));var p={name:a,type:"deleteProperty",related:o,detail:t.detail,oldValue:f},m,l=function(c){return arguments.length?c:v(r,"accessorizedProps",!1).has(a)&&!v(r,"accessorizedProps").get(a).restore()?!1:(delete r[a],!0)};return(m=P.getFirebase(r,!1,t.namespace))?p.success=m.fire({type:"deleteProperty",name:a,oldValue:f,related:o},l):p.success=l(),p.success&&d(p.oldValue)&&Y(r,a,p.oldValue,null,t),p}),s=i.filter(a=>a.success!==!1),n,u;return(n=x.getFirebase(r,!1,t.namespace))?(u=n.fire(s,t.cancellable),u.successCount=s.length):t.eventTypeReturn&&(u=new R(r)),t.eventTypeReturn?u:s.length>0}function Re(r,e,t={}){return T("getOwnPropertyDescriptor",r,{name:e},t)}function Qe(r,e={}){return T("getPrototypeOf",r,{},e)}function Ue(r,e={}){return T("isExtensible",r,{},e)}function ze(r,e={}){return T("ownKeys",r,{},e)}function Be(r,e={}){return T("preventExtensions",r,{},e)}function ce(r,e,t=null,o=null,i={}){return Ie(!1,r,arguments.length>3?{keysOrPayload:e,value:t,receiver:o}:{keysOrPayload:e,value:t},i)}function Ve(r,e,t={}){return T("setPrototypeOf",r,{prototype:e},t)}function wr(r,e=[],t={}){t=g(e)?e:t;var o=(arguments.length===1?Object.keys(r):y(e)).map(i=>{if(v(r,"accessorizedProps").has(i)&&v(r,"accessorizedProps").get(i).touch(!0))return!1;let s=()=>{for(var l,c=r;!l&&(c=Object.getPrototypeOf(c));)l=Object.getOwnPropertyDescriptor(c,i);return l};var n=Object.getOwnPropertyDescriptor(r,i),u,a;n||(u={writable:!0,enumerable:!(i in r),configurable:t.configurable!==!1});var f={...n||u};"value"in f&&delete f.value,"writable"in f&&delete f.writable,f.get=()=>{if(m.ongoingGets.length)return m.get();m.ongoingGets.push(1);var l=$(r,i,null,t);return m.ongoingGets.pop(),l};var p;f.set=l=>{if(m.ongoingSets.length)return m.set(l);m.ongoingSets.push(1);var c=ce(r,i,l,null,t);return m.ongoingSets.pop(),c};var m={ongoingGets:[],ongoingSets:[],get:function(){var l=n;return l||(a?l=u:l=s()||u),l.get?l.get.call(r):l.value},set:function(l){var c=n;return c||(a?c=u:(c=s())?"value"in c&&(c=u,a=!0):(c=u,a=!0)),c.set||c.get?c.set?c.set.call(r,l):!1:(c.value=l,!0)},restore:function(){try{return this.intact()&&(n||a?Object.defineProperty(r,i,n||u):delete r[i],v(r,"accessorizedProps").delete(i)),!0}catch{}return!1},intact:function(){return(Object.getOwnPropertyDescriptor(r,i)||{}).get===f.get},touch:function(l=!1){return this.intact()||(l?!this.restore():!1)}};try{return Object.defineProperty(r,i,f),v(r,"accessorizedProps").set(i,m),!0}catch{}return!1});return h(e)?o:o[0]}function Er(r,e=[],t={}){t=g(e)?e:t;var o=(arguments.length===1?Object.keys(r):y(e)).map(i=>v(r,"accessorizedProps",!1).has(i)?v(r,"accessorizedProps").get(i).restore():!0);return h(e)?o:o[0]}function Pr(r,e={}){if(!d(r))throw new Error('Object must be of type target; "'+S(r)+'" given!');var t=new Proxy(r,{apply:(o,i,s)=>je(o,i,s,e),construct:(o,i,s=null)=>De(o,i,s,e),defineProperty:(o,i,s)=>We(o,i,s,e),deleteProperty:(o,i)=>qe(o,i,e),get:(o,i,s=null)=>{var n=$(o,i,s,e);return e.proxyAutoBinding!==!1&&_(n)&&!Ye(n)?n.bind(t):n},getOwnPropertyDescriptor:(o,i)=>Re(o,i,e),getPrototypeOf:o=>Qe(o,e),has:(o,i)=>K(o,i,e),isExtensible:o=>Ue(o,e),ownKeys:o=>ze(o,e),preventExtensions:o=>Be(o,e),set:(o,i,s,n=null)=>ce(o,i,s,n,e),setPrototypeOf:(o,i)=>Ve(o,i,e)});return v(t).set(t,r),t}function Tr(r,e,t={}){if(r=w(r),!d(r))throw new Error('Object must be of type target; "'+S(handler)+'" given!');var o={},i=!0;g(e)||(_(e)?e={"":e}:_(t)&&(e={[e]:t},t=arguments.length>3?arguments[3]:{}),i=!1);var s=P.getFirebase(r,!0,t.namespace);return Object.keys(e).forEach(n=>{if(!_(e[n]))throw new Error("Callback"+(n===null?"":" for "+n)+' must be a function; "'+S(e[n])+'" given!');var u={filter:n,handler:e[n],params:t},a;if(u.params.unique&&(a=s.match(u)).length){if(u.params.unique!=="replace")return a[0];s.remove(a[0])}i?o[n]=s.add(u):o=s.add(u)}),o}function Sr(r,e=null,t={}){if(r=w(r),!r||!d(r))throw new Error('Object must be of type target; "'+S(r)+'" given!');var o=P.getFirebase(r,!1,t.namespace);_isObject(e)||(_(e)?e={[null]:e}:_(t)&&(e={[e]:t},t=arguments.length>3?arguments[3]:{}),isOriginallyObj=!1),(o=P.getFirebase(r,!1,t.namespace))&&Object.keys(e).forEach(i=>{if(!_(e[i]))throw new Error("Callback"+(i===null?"":" for "+i)+' must be a function; "'+S(e[i])+'" given!');var s={filter:i,originalHandler:e[i],params:t};return o.removeMatches(s)})}function Cr(r,...e){var t=e.map(s=>{if(s=w(s),!d(s))throw new Error("Target must be of type object!");return{target:s,subjectCopy:h(s)?s.slice(0):Ae(s)}}),o=r(...e);let i=()=>{t.map(s=>{var n=Object.keys(s.subjectCopy),u=Object.keys(s.target),a=[],f=or(n.concat(u)).map(m=>{if(s.subjectCopy[m]!==s.target[m]){a.push(m);var l={name:m,related:a,buffered:!0};return u.includes(m)?(l.type="set",l.value=s.target[m],n.includes(m)&&(l.isUpdate=!0)):l.type="del",n.includes(m)&&(l.oldValue=s.subjectCopy[m]),d(s.subjectCopy[m])&&Y(s.target,m,s.subjectCopy[m]),d(s.target[m])&&X(s.target,m,s.target[m]),l}}).filter(m=>m),p;if(f.length&&(p=x.getFirebase(s.target,!1)))return p.fire(f)})};return o instanceof Promise?o.then(i):i(),o}var ie={apply:je,construct:De,defineProperty:We,deleteProperty:qe,get:$,getOwnPropertyDescriptor:Re,getPrototypeOf:Qe,has:K,isExtensible:Ue,ownKeys:ze,preventExtensions:Be,set:ce,setPrototypeOf:Ve,accessorize:wr,unaccessorize:Er,proxy:Pr,unproxy:w,observe:Me,unobserve:$e,intercept:Tr,unintercept:Sr,closure:Cr,build:Z,link:X,unlink:Y,Observers:x,Interceptors:P};function Q(r){return!Array.isArray(r)&&typeof r=="object"&&r}function Fr(r){var e=typeof r.InstallTrigger<"u";if(e)return"firefox";var t=/constructor/i.test(r.HTMLElement)||function(f){return f.toString()==="[object SafariRemoteNotification]"}(!r.safari||typeof r.safari<"u"&&r.safari.pushNotification);if(t)return"safari";var o=!!r.chrome&&(!!r.chrome.webstore||!!r.chrome.runtime),i=o&&r.navigator.userAgent.indexOf("Edg")!=-1,s=!!r.opr&&!!r.opr.addons||!!r.opera||r.navigator.userAgent.indexOf(" OPR/")>=0,n=!!r.document.documentMode,u=!n&&!!r.StyleMedia,a=(o||s)&&!!r.CSS;return u?"edge":n?"ie":s?"opera":i?"ie-chromium":o?"chrome":"unknown"}function Ar(r){var e=r.getComputedStyle(r.document.documentElement,""),t=(Array.prototype.slice.call(e).join("").match(/-(moz|webkit|ms)-/)||e.Olink===""&&["","o"])[1],o=("WebKit|Moz|Ms|O".match(new RegExp("("+t+")","i"))||[])[1];return{api:o,prefix:t,css:"-"+t+"-"}}function z(){if(!(Q(this)&&this.window)&&typeof window>"u")throw new Error("A window context is required.");let r=Q(this)&&this.window?this.window:window;if(r.WebQit||(r.WebQit={}),!r.WebQit.window){let e,t;Object.defineProperty(r.WebQit,"window",{get:()=>r}),Object.defineProperty(r.WebQit,"vendor",{value:{getName:()=>(e||(e=Fr(r)),e),getPrefix:()=>(t||(t=Ar(r)),t)}})}return r.WebQit}function Le(r){return typeof r=="function"}function I(r){return Array.isArray(r)||typeof r=="object"&&r||Le(r)}function Nr(r){return r instanceof Number||typeof r=="number"}function ne(r){return Nr(r)||r!==!0&&r!==!1&&r!==null&&r!==""&&!isNaN(r*1)}var Oe=class{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((o,i)=>{this.async===!1?e(o,i):this.readCallbacks.push(()=>{e(o,i)})});this.async===!1?e():this.readCallbacks.push(e)}onwrite(e,t=!1){if(t)return new Promise((o,i)=>{this.async===!1?e(o,i):this.writeCallbacks.push(()=>{e(o,i)})});this.async===!1?e():this.writeCallbacks.push(e)}cycle(e,t,o){this.onread(()=>{var i=e(o);if(i){var s=n=>{this.onwrite(()=>{var u=t(n,o);if(u){var a=f=>{this.cycle(e,t,f)};u instanceof Promise?u.then(a):a()}})};i instanceof Promise?i.then(s):s()}})}};function B(r){return r instanceof String||typeof r=="string"&&r!==null}function se(r){return Array.isArray(r)}function he(r){return arguments.length&&(r===void 0||typeof r>"u")}function jr(r){return!B(r)&&!he(r.length)}function He(r){return r===null||r===""}function Dr(r){return He(r)||he(r)||r===!1||r===0||I(r)&&!Object.keys(r).length}function C(r,e=!0){return se(r)?r:!e&&Q(r)?[r]:r!==!1&&r!==0&&Dr(r)?[]:jr(r)?Array.prototype.slice.call(r):Q(r)?Object.values(r):[r]}function we(r){let e=z.call(this);e.DOM.isDOMReady||e.window.document.readyState==="complete"?r(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(r))}var Ee=class{constructor(e){this.window=e}onAdded(e,t,o={}){return o.on="added",this.onPresenceChange(e,(i,s,n,u,a)=>{t(i,s,n,u,a)},o)}onRemoved(e,t,o={}){return o.on="removed",this.onPresenceChange(e,(i,s,n,u,a)=>{t(i,s,n,u,a)},o)}onPresent(e,t,o={}){we.call(this.window,()=>{this.window.MutationObserver&&this.onAdded(e,(i,s)=>{i.forEach(n=>t(n,s))},o),B(e)?C(this.window.document.querySelectorAll(e)).forEach(i=>t(i,1)):e.parentNode&&t(e,1)})}onAbsent(e,t,o={}){we.call(this.window,()=>{this.window.MutationObserver&&onRemoved(e,(i,s)=>{i.forEach(n=>t(n,s))},o),B(e)?C(this.window.document.querySelectorAll(e)).length===0&&t(null,0):e.parentNode||t(e,0)})}onPresenceChange(e,t,o={}){e=C(e,!1);var i=(m,l)=>{if(l=l.filter(E=>E.matches),B(m)){var c=l.filter(E=>E.matches(m));if(o.observeIndirectMutation!==!1&&(c=l.reduce((E,de)=>E.concat(C(de.querySelectorAll(m))),c),c.length))return c}else{if(l.includes(m))return[m];if(o.observeIndirectMutation!==!1&&l.length){for(var b=m;b=b.parentNode;)if(l.includes(b))return[m]}}},s=(m,l)=>(l.$$searchCache||(l.$$searchCache=new Map),m.reduce((c,b)=>{var E;return l.$$searchCache.has(b)?E=l.$$searchCache.get(b):(E=i(b,l,B(b))||[],l.$$searchCache.set(b,E)),c.concat(E)},[])),n=new Set,u=new Set,a=(m,l,c)=>{l&&o.on==="removed"||!l&&o.on==="added"||(m=s(e,m)).length&&(o.maintainCallState?(m.forEach(b=>{l?(n.add(b),u.delete(b)):(n.delete(b),u.add(b))}),t(m,l,c,n,u)):t(m,l,c))},f=o.context||this.window.document.documentElement,p=this._observe(f,(m,l,c,b)=>{o.ignoreTransients||(a(m,0,!0),a(m.concat(l),1,!0),a(l,0,!0)),a(b,0),a(c,1)});return p}onAttrChange(e,t,o=[]){var i=new this.window.MutationObserver(t),s={attributes:!0,attributeOldValue:!0};return o&&(s.attributeFilter=o),i.observe(e,s),i}onTreeChange(e,t,o=!1){var i=new this.window.MutationObserver(t),s={childList:!0,subtree:o};return i.observe(e,s),i}onMutation(e,t,o){var i=new this.window.MutationObserver(t);return i.observe(e,o),i}_observe(e,t){if(!ar.has(e)){let i=new Set,s=new this.window.MutationObserver(n=>{if(!!i.size){var u=n.reduce((m,l)=>m.concat(C(l.addedNodes)),[]),a=n.reduce((m,l)=>m.concat(C(l.removedNodes)),[]),f=[],p=[];u=new Set(u),a=new Set(a),u.forEach(m=>{a.has(m)&&(a.delete(m),u.delete(m),m.isConnected?f.push(m):p.push(m))}),u=[...u],a=[...a],i.forEach(m=>m(f,p,u,a))}});s.observe(e,{childList:!0,subtree:!0}),ar.set(e,{callbacks:i,observer:s})}let o=ar.get(e);return o.callbacks.add(t),{disconnect(){o.callbacks.delete(t)},reconnect(){o.callbacks.add(t)}}}},ar=new Map;function Mr(r){rt(r),tt(r),ot(r)}function rt(r){r.CSS||(r.CSS={}),r.CSS.escape||(r.CSS.escape=e=>e.replace(/([\:@\~\$\&])/g,"\\$1"))}function tt(r){"isConnected"in r.Node.prototype||Object.defineProperty(r.Node.prototype,"isConnected",{get:function(){return!this.ownerDocument||!(this.ownerDocument.compareDocumentPosition(this)&this.DOCUMENT_POSITION_DISCONNECTED)}})}function ot(r){r.Element.prototype.matches||(r.Element.prototype.matches=r.Element.prototype.matchesSelector||r.Element.prototype.mozMatchesSelector||r.Element.prototype.msMatchesSelector||r.Element.prototype.oMatchesSelector||r.Element.prototype.webkitMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),o=t.length;--o>=0&&t.item(o)!==this;);return o>-1})}function Ge(r,e=null,t=!1){let o=z.call(this);if(B(r)){var i;if(r.trim().startsWith("<")){var s=o.window.document.createElement("div");s.innerHTML=r,i=t?C(s.children):s.firstChild}else i=t?C(Ir.call(this,r,e)):lr.call(this,r,e);return i}return r instanceof o.window.Element?t?[r]:r:t?C(r):r}function $r(r,e=null){return Ge.call(this,r,e,!0)}function lr(r,e=null,t=!1){let o=z.call(this);e=e||o.window.document;var i,s=t?"querySelectorAll":"querySelector";try{i=e[s](r)}catch{try{i=e[s](r.replace(/\:is\(/g,":matches("))}catch{try{i=e[s](r.replace(/\:is\(/g,":-webkit-any("))}catch{try{i=e[s](r.replace(/\:is\(/g,":-moz-any("))}catch(f){throw f}}}}return i}function Ir(r,e=null){return lr.call(this,r,e,!0)}function fe(r){return Le(r)||r&&{}.toString.call(r)==="[object function]"}function k(r,e,t={},o={}){e=C(e).slice();for(var i=r;!he(i)&&!He(i)&&e.length;){var s=e.shift();if(!(t.get?t.get(i,s):I(i)?s in i:i[s])){o.exists=!1;return}i=t.get?t.get(i,s):i[s]}return o.exists=!0,i}function Je(r,e,t,o={},i={}){let s=(p,m,l)=>i.set?i.set(p,m,l):(ne(e[u])&&se(p)?p.push(l):p[m]=l,!0);e=C(e);for(var n=r,u=0;u<e.length;u++)if(u<e.length-1){if(!n||!I(n)&&!fe(n))return!1;var a=k(n,e[u],i);if(!I(a)){if(i.buildTree===!1)return!1;a=fe(i.buildTree)?i.buildTree(u):ne(e[u+1])?[]:{};var f=s(n,e[u],a);if(!f)return!1}n=a}else return s(n,e[u],t)}function Wr(r,e,t=!1,o={}){e=C(e);var i=!1;do{var s=e.pop(),s=s===""?0:s,n=r;e.length&&(n=k(r,e,{},o)),(I(n)||fe(n))&&(o.has?o.has(n,s):s in n)&&(o.deleteProperty?i=o.deleteProperty(n,s):o.del?i=o.del(n,s):(delete n[s],i=!0))}while(i&&t&&e.length&&(I(n)||fe(n))&&!(o.keys?o.keys(n):Object.keys(n)).length);return i}function pr(r,e,t={}){var o={};return k(r,e,t,o),o.exists}function cr(r,e=!1){let t=z.call(this);var o={};return!(o.el=t.window.document.head.querySelector('meta[name="oohtml"]'))&&e&&(o.el=t.window.document.createElement("meta"),o.el.setAttribute("name",r),t.window.document.head.append(o.el)),o.el&&(o.vars=(o.el.getAttribute("content")||"").split(";").filter(i=>i).reduce((i,s)=>{var n=s.split("=").map(u=>u.trim());return Je(i,n[0].split("."),n[1]==="true"?!0:n[1]==="false"?!1:ne(n[1])?parseInt(n[1]):n[1]),i},{})),o.get=function(i){return k(this.vars,i.split("."))},o.set=function(i,s=null,n=!1){var u=Q(i)?i:{[i]:s===!0?"true":s};if(n=arguments.length<3?s:n,Object.keys(u).forEach(a=>{if(u[a]===!1)Wr(this.vars,a.split("."));else if(Q(u[a]))Object.keys(u[a]).forEach(p=>{var m=(a+"."+p).split(".");(!n||!pr(this.vars,m))&&Je(this.vars,m,u[a][p])});else{var f=a.split(".");(!n||!pr(this.vars,f))&&Je(this.vars,f,u[a])}}),e){let a=(f,p)=>Object.keys(p).reduce((m,l)=>{var c=(f?f+".":"")+l;return Q(p[l])?m.push(...a(c,p[l])):m.push(c+"="+p[l]),m},[]);this.el.setAttribute("content",a("",this.vars).join(";"))}return!0},o.defaults=function(i,s=null){return this.set(i,s,!0)},o}function Ze(){let r=z.call(this);return r.DOM||(r.DOM={},Mr(r.window),r.DOM.reflow=new Oe(r.window),r.DOM.mutations=new Ee(r.window),r.DOM.meta=cr.bind(r.window),r.DOM.query=Ge.bind(r.window),r.DOM.queryAll=$r.bind(r.window),r.DOM.ready=we.bind(r.window)),r}var O=class{static lex(e,t,o={}){if(!W(e=e+""))throw new Error("Argument1 must be a string!");var i=f=>({delims:f.delims.slice(),options:Ne(f.options),nesting:f.nesting.slice(),maxDepth:f.maxDepth,comments:f.comments.slice(),tokens:f.tokens.slice(),matches:f.matches.slice(),matchesi:Ne(f.matchesi)});if(O.$cache[e]&&o.cache!==!1)for(var s=0;s<O.$cache[e].length;s++){var n=O.$cache[e][s];if(fr(n.delims,t))return i(n)}var u=new O(e,o),a=u.lex(t);return o.cache!==!1&&(O.$cache[e]=O.$cache[e]||[],O.$cache[e].push(a)),i(a)}static split(e,t,o){return O.lex(e,t,o).tokens}static match(e,t,o){return O.lex(e,t,o).matches}constructor(e,t){if(!W(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=O.$blocks),this.$options.quotes||(this.$options.quotes=O.$quotes),this.$options.comments||(this.$options.comments=O.$comments)}lex(e,t){for(var o={delims:y(e),options:M(!0,{},this.$options,t||{}),nesting:[],maxDepth:0,comments:[],tokens:[],matches:[],matchesi:{}},i=0;typeof i=="number";)i=this._evalCharsAt(o,i);if(o.nesting.length)throw new Error("Error parsing the string: "+this.$str+". Unterminated blocks: "+tr(o.nesting).join(", "));return o}_evalCharsAt(e,t){if(!(t>=this.$str.length)){var o=1,i={},s={},n={};if(e.openComment||(s=this._testQuotes(e,t)),e.openQuote||(i=this._testComments(e,t)),e.openComment||i.ending)if(!e.nesting.length&&!n.ending){var u=i.starting||i.ending||this.$str[t];o=u.length,this._push(e,u,"comments",i.starting)}else this._push(e,this.$str[t]);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;n=this._testNesting(e,t);var n=this._testNesting(e,t),a=this._testChars(e.options.stopChars||[],e,t);if(!e.nesting.length&&a!==!1){e.options.stopChar=a,e.options.stopCharForward=this.$str.substr(t);return}if(!e.delims.length)e.nesting.length===2&&n.starting?(e.matches.push(null),this._push(e,n.starting),o=n.starting.length):!e.nesting.length&&n.ending?(this._push(e,n.ending),o=n.ending.length,e.matches.push(null)):this._push(e,this.$str[t]);else if(!e.nesting.length&&!n.ending){this._push(e,"");var f=this._testChars(e.delims,e,t);if(f!==!1&&(e.matches.push(f),e.matchesi[t]=f,o=f.length||1,!e.options.preserveDelims)){var p=t+(f.length||1);return p===this.$str.length&&this._push(e,""),p}this._push(e,f||this.$str[t])}else{var u=n.starting||n.ending||this.$str[t];o=u.length,this._push(e,u)}}return t+o}}_testQuotes(e,t){var o={};return(e.options.quotes||[]).forEach(i=>{this.$str.substr(t,1)===i&&(e.openQuote?i===e.openQuote&&(e.openQuote=!1,o.ending=i):(e.openQuote=i,o.starting=i))}),o}_testComments(e,t){var o={};return(e.options.comments||[]).forEach(i=>{if(e.openComment){if(N(i)===N(e.openComment)){var n=N(i);this.$str.substr(t).startsWith(n)&&(e.openComment=!1,o.ending=n)}}else{var s=L(i);this.$str.substr(t).startsWith(s)&&(e.openComment=i,o.starting=s)}}),o}_testNesting(e,t){var o={};return(e.options.blocks||[]).forEach(i=>{var s=L(i);if(this.$str.substr(t).startsWith(s))e.nesting=e.nesting.concat([i]),o.starting=s;else if(e.nesting.length&&N(i)===N(N(e.nesting))){var n=N(i);this.$str.substr(t).startsWith(n)&&(e.nesting=e.nesting.slice(0,-1),o.ending=n)}}),e.maxDepth=Math.max(e.maxDepth,e.nesting.length),o}_testChars(e,t,o){for(var i=0;i<e.length;i++){var s=e[i];if(_(s)){var n=s(this.$str.substr(0,o),this.$str.substr(o),t.tokens.slice());if(n!==!1)return n}if(t.options.useRegex){var u=this.$str.substr(o).match(new RegExp("^"+s,t.options.useRegex!==!0?t.options.useRegex:""));if(u)return u[0]}if(!t.options.ci&&this.$str.substr(o,s.length)===s||t.options.ci&&this.$str.substr(o,s.length).toLowerCase()===s.toLowerCase())return s}return!1}_push(e,t,o="tokens",i=!1){var s=e.matches.length;if(A(e.tokens[s])&&(e.tokens[s]=""),o==="comments"){e.tokens[s].comments||(e.tokens[s]=new String(e.tokens[s]),e.tokens[s].comments=[]);var n=e.tokens[s].comments.length-(!e.tokens[s].comments.length||i?0:1);e.tokens[s].comments[n]=(e.tokens[s].comments[n]||"")+t}else{var u=e.tokens[s].comments;e.tokens[s]=e.tokens[s]+t}}split(e,t,o){return this.lex(t,o).tokens}match(e,t,o){return this.lex(t,o).matches}regParse(e,t){return this.lex(e,M({useRegex:!0},t||{}))}regSplit(e,t){return this.regParse(e,t).tokens}regMatch(e,t){return this.regParse(e,t).matches}};O.$blocks=[["(",")"],["[","]"],["{","}"]];O.$quotes=['"',"'","`"];O.$comments=[["/*","*/"],["//",`
2
+ `]];O.$cache=Object.create(null);function qr(r,e={}){let t=Ze.call(this);return t.OOHTML||(t.OOHTML={}),t.OOHTML.meta||(t.OOHTML.meta=t.DOM.meta("oohtml",!0)),t.OOHTML.meta.defaults(M(3,r,e)),t.OOHTML.meta}function Xe(r={}){let e=Ze.call(this);if(r.onDomReady){e.DOM.ready(()=>{Xe.call(this,{...r,onDomReady:!1})});return}let t=e.window,o=e.window.document,i=e.DOM.mutations,s=[],n=qr.call(this,{attr:{namespace:"namespace",id:"id"},api:{namespace:"namespace"},eagermode:!0},r.params),u=function(f){if(!v(f,"oohtml").has("namespace")){let p=Object.create(null);v(f,"oohtml").set("namespace",p),ie.link&&ie.link(f,n.get("api.namespace"),p)}return v(f,"oohtml").get("namespace")},a=function(f){if(!v(f,"oohtml").has("publicNamespace")){let p=u(f);v(f,"oohtml").set("publicNamespace",n.get("eagermode")?new Proxy(p,{get(m,l){if(W(l)&&!p[l]){var c=y(f.querySelectorAll("["+t.CSS.escape(n.get("attr.id"))+'="'+l+'"]')).filter(b=>{var E=b.parentNode.closest("["+t.CSS.escape(n.get("attr.namespace"))+"]");return f===o?!E:E===f})[0];c&&ie.set(p,l,c)}return p[l]}}):p)}return v(f,"oohtml").get("publicNamespace")};if(n.get("api.namespace")in t.Element.prototype)throw new Error('The "Element" class already has a "'+n.get("api.namespace")+'" property!');if(Object.defineProperty(t.Element.prototype,n.get("api.namespace"),{get:function(){return a(this)}}),n.get("api.namespace")in o)throw new Error('The "document" object already has a "'+n.get("api.namespace")+'" property!');Object.defineProperty(o,n.get("api.namespace"),{get:function(){return a(o)}}),i.onPresent("["+t.CSS.escape(n.get("attr.id"))+"]",f=>{var p=v(f,"oohtml");if(!(p.get("idAlreadyBeingWatched")||_e(s,b=>f.closest(b)))){var m=f.getAttribute(n.get("attr.id")),l=f.parentNode.closest("["+t.CSS.escape(n.get("attr.namespace"))+"]");l||(l=o);var c=u(l);c[m]!==f&&ie.set(c,m,f),p.set("idAlreadyBeingWatched",!0),i.onPresenceChange(f,(b,E)=>{E?c[m]!==f&&ie.set(c,m,f):c[m]===f&&ie.deleteProperty(c,m)})}})}Xe.call(window);})();
3
+ //# sourceMappingURL=namespaced-html.js.map