@graview/guest 0.1.40 → 0.1.42
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.
- package/README.md +50 -1
- package/client.js +1 -1
- package/dist/client.generated.js +2 -2
- package/dist/headless/index.d.ts.map +1 -1
- package/dist/headless/index.js +18 -2
- package/dist/headless/index.js.map +1 -1
- package/dist/headless/protocol.d.ts +5 -0
- package/dist/headless/protocol.d.ts.map +1 -1
- package/dist/headless/runtime.generated.d.ts.map +1 -1
- package/dist/headless/runtime.generated.js +1 -1
- package/dist/headless/runtime.generated.js.map +1 -1
- package/dist/headless/runtime.js +2 -0
- package/dist/headless/runtime.js.map +1 -1
- package/dist/host/code-of.d.ts +16 -0
- package/dist/host/code-of.d.ts.map +1 -0
- package/dist/host/code-of.js +16 -0
- package/dist/host/code-of.js.map +1 -0
- package/dist/host/gestures.d.ts +20 -0
- package/dist/host/gestures.d.ts.map +1 -0
- package/dist/host/gestures.js +210 -0
- package/dist/host/gestures.js.map +1 -0
- package/dist/host/manifest.d.ts +11 -0
- package/dist/host/manifest.d.ts.map +1 -1
- package/dist/host/manifest.js +2 -0
- package/dist/host/manifest.js.map +1 -1
- package/dist/host/session.d.ts +2 -0
- package/dist/host/session.d.ts.map +1 -1
- package/dist/host/session.js +4 -0
- package/dist/host/session.js.map +1 -1
- package/dist/host/theme.d.ts +3 -2
- package/dist/host/theme.d.ts.map +1 -1
- package/dist/host/theme.js +5 -2
- package/dist/host/theme.js.map +1 -1
- package/dist/host/view-runtime.generated.d.ts.map +1 -1
- package/dist/host/view-runtime.generated.js +1 -1
- package/dist/host/view-runtime.generated.js.map +1 -1
- package/dist/host/view.d.ts +3 -6
- package/dist/host/view.d.ts.map +1 -1
- package/dist/host/view.js +78 -22
- package/dist/host/view.js.map +1 -1
- package/dist/host/views.d.ts +1 -1
- package/dist/host/views.d.ts.map +1 -1
- package/dist/host/worker-react.d.ts +11 -3
- package/dist/host/worker-react.d.ts.map +1 -1
- package/dist/host/worker-react.js +4 -0
- package/dist/host/worker-react.js.map +1 -1
- package/dist/host/worker.d.ts +1 -1
- package/dist/host/worker.d.ts.map +1 -1
- package/dist/protocol.d.ts +57 -1
- package/dist/protocol.d.ts.map +1 -1
- package/dist/protocol.js +18 -0
- package/dist/protocol.js.map +1 -1
- package/dist/worker/view-global.d.ts +29 -0
- package/dist/worker/view-global.d.ts.map +1 -1
- package/dist/worker/view-global.js +40 -5
- package/dist/worker/view-global.js.map +1 -1
- package/dist/worker/view.d.ts.map +1 -1
- package/dist/worker/view.js +2 -1
- package/dist/worker/view.js.map +1 -1
- package/package.json +3 -3
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
* it in front of a view's own source, for an isolate the host picked.
|
|
5
5
|
* Carries Remote DOM (MIT, Shopify Inc.).
|
|
6
6
|
*/
|
|
7
|
-
export const HEADLESS_RUNTIME = "\"use strict\";\n/*! @remote-dom/core and @remote-dom/polyfill — Copyright 2020-present, Shopify Inc. — MIT License.\n * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * @graview/guest's worker runtime — Elastic License 2.0. */\n\"use strict\";(()=>{var k=Symbol(\"name\"),Ee=Symbol(\"prefix\"),Ne=Symbol(\"value\"),C=Symbol(\"ns\"),X=Symbol(\"owner\"),L=Symbol(\"owner_document\"),le=Symbol(\"attributes\"),H=Symbol(\"prev\"),v=Symbol(\"next\"),P=Symbol(\"child\"),K=Symbol(\"parent\"),we=Symbol(\"host\"),ee=Symbol(\"data\"),Re=Symbol(\"listeners\"),Gn=Symbol(\"isTrusted\"),Ve=Symbol(\"path\"),je=Symbol(\"stop_immediate_propagation\"),Ge=Symbol(\"dispatching\"),fe=Symbol(\"content\"),$=Symbol(\"hooks\"),Dt=Symbol(\"extensions\"),ke=Symbol(\"hooks_dispatch\"),z=Symbol(\"is_connected\"),ze=Symbol(\"create_element\"),Gr=0,J=1,Fe=2,Be=3,Ye=8,Ce=9,zr=10,Te=11,D=\"http://www.w3.org/1999/xhtml\",te=\"http://www.w3.org/2000/svg\",Fr=\"http://www.w3.org/XML/1998/namespace\",ft=\"http://www.w3.org/2000/xmlns/\";function Mt(t){return t.split(/[\\t\\n\\f\\r ]+/).filter(Boolean)}function V(t){return t.replace(/[A-Z]/g,e=>String.fromCharCode(e.charCodeAt(0)+32))}function Br(t){return t.replace(/[a-z]/g,e=>String.fromCharCode(e.charCodeAt(0)-32))}function M(t,e){let n=globalThis.DOMException;if(typeof n==\"function\")return new n(t,e);let r=new Error(t);return r.name=e,r}var Yr=/^(?:[A-Za-z][^\\0\\t\\n\\f\\r\\u0020/>]*|[:_\\u0080-\\u{10FFFF}][A-Za-z0-9-.:_\\u0080-\\u{10FFFF}]*)$/u,qr=/[\\0\\t\\n\\f\\r />=]/u,_s=/[\\0\\t\\n\\f\\r />]/u;function me(t){if(t==null)return null;let e=String(t);return e===\"\"?null:e}function Wr(t){Yr.test(t)||Fn(t)}function zn(t){(t===\"\"||qr.test(t))&&Fn(t)}function Lt(t,e,n){let r=me(t),o=String(e),s=o.indexOf(\":\"),i=s<0?null:o.slice(0,s),l=s<0?o:o.slice(s+1);if((i!=null&&(i===\"\"||_s.test(i))||(n===\"element\"?!Yr.test(l):l===\"\"||qr.test(l)))&&Fn(o),i!=null&&r==null)throw M(`A namespace is required for the prefix in \"${o}\"`,\"NamespaceError\");if(i===\"xml\"&&r!==Fr)throw M(\"The xml prefix requires the XML namespace\",\"NamespaceError\");if((o===\"xmlns\"||i===\"xmlns\")&&r!==ft)throw M(\"The xmlns name requires the XMLNS namespace\",\"NamespaceError\");if(r===ft&&o!==\"xmlns\"&&i!==\"xmlns\")throw M(\"The XMLNS namespace requires the xmlns name or prefix\",\"NamespaceError\");return{namespace:r,qualifiedName:o,prefix:i,localName:l}}function Fn(t){throw M(`Invalid name: \"${t}\"`,\"InvalidCharacterError\")}var Ht=0,$t=1,Xr=2,Bn=3,Is=typeof performance>\"u\"?Date.now:performance.now.bind(performance),F=class{static NONE=Ht;static CAPTURING_PHASE=$t;static AT_TARGET=Xr;static BUBBLING_PHASE=Bn;timeStamp=Is();target=null;currentTarget=null;srcElement=null;bubbles=!1;cancelable=!1;composed=!1;defaultPrevented=!1;cancelBubble=!1;eventPhase=Ht;[Ve]=[];[je]=!1;[Ge]=!1;constructor(e,n){this.type=e,Object.defineProperty(this,Gn,{writable:!0,value:!1}),n&&(n.bubbles&&(this.bubbles=n.bubbles),n.cancelable&&(this.cancelable=n.cancelable),n.composed&&(this.composed=n.composed))}get isTrusted(){return this[Gn]}composedPath(){return[...this[Ve]]}stopPropagation(){this.cancelBubble=!0}stopImmediatePropagation(){this[je]=!0,this.cancelBubble=!0}preventDefault(){this.cancelable&&(this.defaultPrevented=!0)}set returnValue(e){e||this.preventDefault()}get returnValue(){return!this.defaultPrevented}initEvent(e,n,r){this.type=e,this.bubbles=!!n,this.cancelable=!!r}};function Yn(t,e,n){if(t.cancelBubble)return;let o=e[Re]?.get(t.type)?.[n===$t?\"capture\":\"bubble\"];if(o)for(let s of[...o]){if(!o.has(s)||s.signal?.aborted)continue;t.eventPhase=t.target===e?Xr:n,t.currentTarget=e;let i=s.normalizedListener;try{typeof i==\"object\"?i.handleEvent(t):i.call(e,t)}catch(l){setTimeout(Ds,0,l)}if(t[je])break}}function Ds(t){throw t}var mt=[],Ut=new WeakMap;function Vt(t,e){let n=Ut.get(t);n?n.push(e):Ut.set(t,[e]),mt[mt.length-1].push(t)}function B(t){let e=[];mt.push(e);let n;try{n=t()}catch(r){mt.pop();try{Kr(e)}catch{}throw r}return mt.pop(),Kr(e),n}function Kr(t){let e,n=!1;for(let r of t){let o=Ut.get(r);if(o){for(;o.length>0;){let s=o.shift();try{s()}catch(i){n||(e=i,n=!0)}}Ut.delete(r)}}if(n)throw e}var jt=[],pt=[],qn=!1;function Pe(t){for(let e of t)jt.push(e),e[1]&&pt.push(e[1]);if(!qn){qn=!0;try{let e,n=!1;for(let r=0;r<jt.length;r++){let[o,s]=jt[r];s&&pt.splice(pt.indexOf(s),1);try{o()}catch(i){n||(e=i,n=!0)}}if(n)throw e}finally{jt.length=0,pt.length=0,qn=!1}}}function ht(t){let e=t;for(;e;){if(pt.includes(e))return!0;e=e[K]??e[we]}return!1}var gt=Symbol(\"listenerRegistrations\"),xe=class{[Re]=void 0;[gt]=void 0;[L]=void 0;addEventListener(e,n,r){if(n==null)return;let o=r===!0||typeof r==\"object\"&&r.capture===!0,s=typeof r==\"object\"&&r.once===!0,i=typeof r==\"object\"?r.signal:void 0;if(i?.aborted)return;let l=Wn(o),c=this[gt];c||(c=new Map,this[gt]=c);let u=c.get(e);u||(u={},c.set(e,u));let h=u[l];if(h||(h=new Map,u[l]=h),h.has(n))return;let w=this,d={type:e,listener:n,capture:o,once:s,normalizedListener:n,signal:i};(s||i)&&(d.normalizedListener=function(...a){if(d.signal?.aborted){Gt(w,d);return}return d.once&&Gt(w,d),typeof d.listener==\"object\"?d.listener.handleEvent(...a):d.listener.call(this,...a)});let E=this[Re];E||(E=new Map,this[Re]=E);let N=E.get(e);N||(N={},E.set(e,N));let S=N[l];if(S||(S=new Set,N[l]=S),h.set(n,d),S.add(d),i){let y=()=>{Gt(w,d)};d.abortListener=y,i.addEventListener(\"abort\",y,{once:!0})}this[L]?.defaultView[ke].addEventListener?.(this,e,n,r)}removeEventListener(e,n,r){return Ms.call(this,e,n,r)}dispatchEvent(e){if(e[Ge])throw M(\"Failed to execute 'dispatchEvent' on 'EventTarget': The event is already being dispatched.\",\"InvalidStateError\");e[Ge]=!0;try{let n=[],r=this;for(;r!=null;)n.push(r),r=r.parentNode;e.target=this,e.srcElement=this,e[Ve]=n;for(let s=n.length;s--;)if(Yn(e,n[s],$t),e.cancelBubble)return!e.defaultPrevented;let o=e.bubbles?n:n.slice(0,1);for(let s=0;s<o.length;s++)if(Yn(e,o[s],Bn),e.cancelBubble)return!e.defaultPrevented;return!e.defaultPrevented}finally{e[Ge]=!1,e.cancelBubble=!1,e[je]=!1,e.eventPhase=Ht,e.currentTarget=null,e[Ve]=[]}}};function Ms(t,e,n){if(e==null)return;let r=n===!0||n&&n.capture===!0,o=Wn(!!r),s=this[gt]?.get(t)?.[o]?.get(e);s&&Gt(this,s)}function Wn(t){return t?\"capture\":\"bubble\"}function Gt(t,e){let n=Wn(e.capture),r=t[gt],o=r?.get(e.type);if(!o)return;let s=o[n];if(!s||s.get(e.listener)!==e)return;s.delete(e.listener),s.size===0&&delete o[n],!o.bubble&&!o.capture&&r?.delete(e.type),e.signal&&e.abortListener&&e.signal.removeEventListener(\"abort\",e.abortListener);let i=t[Re],l=i?.get(e.type);if(!l)return;let c=l[n];c?.delete(e)&&(c.size===0&&delete l[n],!l.bubble&&!l.capture&&i?.delete(e.type),t[L]?.defaultView[ke].removeEventListener?.(t,e.type,e.listener,e.capture))}var ne=class extends Array{item(e){return this[e]??null}};var bt=0,Zr=1,Zn=2,Jn=3,Et=4,Jr=0,Qr=1,Bt=2,Yt=3,eo=4,Kn=5,to=6,no=7,zt=/^(?:--|-?[A-Za-z_\\u0080-\\u{10FFFF}])[A-Za-z0-9_\\u0080-\\u{10FFFF}-]*$/u;function Ls(t,e){let n=1,r=null;for(let o=e;o<t.length;o++){let s=t[o];if(r){s===\"\\\\\"?o++:s===r&&(r=null);continue}if(s==='\"'||s===\"'\")r=s;else if(s===\"(\")n++;else if(s===\")\"&&--n===0)return[t.slice(e,o),o+1]}return[t.slice(e),t.length]}function Z(t){throw M(`Invalid or unsupported selector: \"${t}\"`,\"SyntaxError\")}function qt(t,e){let n=typeof e==\"string\"?Nt(e):[{combinator:Et,matchers:e}],r=null,o=t[P];return o&&n[0].matchers.length&&Qn(o,n,s=>(r=s,!1)),r}function Wt(t,e){let n=typeof e==\"string\"?Nt(e):[{combinator:Et,matchers:e}],r=new ne,o=t[P];return o&&n[0].matchers.length&&Qn(o,n,s=>{r.push(s)}),r}function Nt(t,e=!1,n=!1){let r={combinator:Et,matchers:[]},o=[r],s=/[\\t\\n\\f\\r ]*?([>\\t\\n\\f\\r +~]?)[\\t\\n\\f\\r ]*?(?:(?:\\[[\\t\\n\\f\\r ]*([^\\]=\\t\\n\\f\\r ]+)[\\t\\n\\f\\r ]*(?:=[\\t\\n\\f\\r ]*(?:(['\"])(.*?)\\3|([^\\]\\t\\n\\f\\r ]+)))?[\\t\\n\\f\\r ]*(?:\\]|$))|([#.]?)([^\\t\\n\\f\\r #.[>:+~()]+)|:(\\w+)(\\()?)/gi,i=t.replace(/^[\\t\\n\\f\\r ]+|[\\t\\n\\f\\r ]+$/g,\"\");i===\"\"&&Z(t);let l=0,c;for(;c=s.exec(i);){c.index!==l&&Z(t),c[1]&&(r.matchers.length===0&&!(n&&o.length===1)&&Z(t),c[1]===\">\"?r.combinator=Zr:c[1]===\"+\"?r.combinator=Jn:c[1]===\"~\"?r.combinator=Zn:r.combinator=bt,r={combinator:Et,matchers:[]},o.push(r));let u=c[8]?V(c[8]):c[2]||c[7];c[7]!=null&&!c[6]&&r.matchers.length>0&&Z(t);let w,d=c[4]??c[5]??c[7];if(c[2]){zt.test(u)||Z(t);let E=c[5],N=E?.[0];if(c[3]==null&&(N==='\"'||N===\"'\")){let S=c[0].lastIndexOf(E);d=i.slice(c.index+S+1),s.lastIndex=i.length}else E!=null&&!zt.test(E)&&Z(t);w=eo}else c[6]?(zt.test(u)||Z(t),w=c[6]===\"#\"?Bt:Yt):c[8]?w=c[9]==null?Kn:to:c[7]===\"*\"?w=Jr:c[7]&&zt.test(c[7])?w=Qr:Z(t);c[9]?([d,s.lastIndex]=Ls(i,s.lastIndex),u!==\"has\"&&u!==\"not\"&&Z(t),u===\"has\"&&e&&Z(t),Nt(d,e||u===\"has\",u===\"has\")):w===Kn&&Z(t),r.matchers.push({type:w,name:u,value:d}),l=s.lastIndex}return(l!==i.length||r.matchers.length===0)&&Z(t),o}function Hs(t,e){let n=Nt(e);return n[0]?.matchers.length?yt(t,n):!1}function $s(t,e){let n=Nt(e,!0,!0),r=n[0];if(n.length===1&&r.matchers.length===0)return!1;let o=bt,s={type:no,name:\":scope\"};if(r.matchers.length===0?(o=r.combinator,r.matchers.push(s)):n.unshift({combinator:bt,matchers:[s]}),n.some(({matchers:c})=>c.length===0))return!1;let i=o===Jn||o===Zn?t[v]:t[P];if(!i)return!1;let l=!1;return Qn(i,n,()=>(l=!0,!1),t),l}function Qn(t,e,n,r){let o=[],s=t;for(;s;){if(W(s)){if(yt(s,e,r)&&n(s)===!1)return!1;let i=s[P];if(i){let l=s[v];l&&o.push(l),s=i;continue}}s=s[v]??o.pop()??null}return!0}function yt(t,e,n){let{combinator:r,matchers:o}=e[e.length-1];if(r===Et){if(!Ft(t,o,n))return!1;let l=e.slice(0,-1);return l.length===0||yt(t,l,n)}let s=r===Zr||r===bt?K:H,i=t[s];if(!i)return!1;if(r===bt||r===Zn){for(;i;){if(W(i)&&Ft(i,o,n)){let l=e.slice(0,-1);if(l.length===0||yt(i,l,n))return!0}i=i[s]}return!1}else{if(r===Jn&&!W(i)){for(;i&&!W(i);)i=i[s];if(!i)return!1}if(!W(i)||!Ft(i,o,n))return!1;let l=e.slice(0,-1);return l.length===0||yt(i,l,n)}}function Xn(t,e){return t.getAttributeNS(null,t.namespaceURI===D?V(e):e)}function Ft(t,e,n){if(!t)return!1;if(Array.isArray(e)){for(let i of e)if(Ft(t,i,n)===!1)return!1;return!0}let{type:r,name:o,value:s}=e;switch(r){case Jr:return o===\"*\";case Qr:return t.namespaceURI===D?t.localName===V(o):t.localName===o;case Bt:return Xn(t,\"id\")===o;case Yt:let i=Xn(t,\"class\");return i?Mt(i).includes(o):!1;case eo:let l=Xn(t,o);return s==null?l!=null:l===s;case no:return t===n;case Kn:Z(`:${o}`);case to:switch(o){case\"has\":return $s(t,s||\"\");case\"not\":return!Hs(t,s||\"\");default:Z(`:${o}(${s})`)}}return!1}function Us(t){return t.nodeType===Fe}function wt(t){return ee in t}function tr(t){return t.nodeType===Be}function Vs(t){return t.nodeType===Ye}function W(t){return t.nodeType===J}function er(t){return t.nodeType===Te}function io(t){return\"appendChild\"in t}function Xt(t){let e=[],n=[t],r=new Set(n),o=new Set,s;for(;n.length>0;){let i=n.pop();if(r.delete(i),o.has(i))continue;let l=[];for(let c of xt(i)){if(o.has(c)||(o.add(c),e.push(c),l.push(c),!W(c)))continue;let u=c[le];if(u)for(let w of u)o.has(w)||(o.add(w),e.push(w));let h=c[fe];h&&!o.has(h)&&!r.has(h)&&(r.add(h),n.push(h))}s??=l}return{nodes:e,treeNodes:s}}function Tt(t,e){for(let n of t)n[L]=e}function ro(t,e){let n=t.constructor,r=new n(t.name,t.value,t.namespaceURI);return r[L]=e,r}function oo(t,e){if(tr(t))return e.createTextNode(t.data);if(Vs(t))return e.createComment(t.data);if(Us(t))return ro(t,e);if(W(t)){let n=e[ze](t[k],t.namespaceURI,t[Ee],t.localName);if(t[le])for(let r=0;r<t[le].length;r++){let o=t[le].item(r);n.attributes.setNamedItem(ro(o,e))}return n}else{if(er(t))return e.createDocumentFragment();{let n=new t.constructor;return n[L]=e,n}}}function Kt(t,e,n=t.ownerDocument){if(t.nodeType===Ce)throw M(\"Cannot clone a document node\",\"NotSupportedError\");let r=oo(t,n);if(!e||!W(t)&&!er(t))return r;let o=new Set([t]),s=[{source:t,destination:r,childIndex:0,cloningContent:!1}];for(;s.length>0;){let i=s[s.length-1],l,c;if(i.cloningContent)if(i.contentSource&&i.contentDestination)l=i.contentSource.childNodes[i.childIndex++],c=i.contentDestination;else{s.pop(),i.appendTo&&i.appendTo.appendChild(i.destination);continue}else if(l=i.source.childNodes[i.childIndex++],c=i.destination,!l){if(i.cloningContent=!0,i.childIndex=0,W(i.source)&&i.source.namespaceURI===D&&i.source.localName===\"template\"){let h=i.source[fe];h&&(o.has(h)&&so(),o.add(h),i.contentSource=h,i.contentDestination=i.destination.content)}continue}if(!l){s.pop(),i.appendTo&&i.appendTo.appendChild(i.destination);continue}o.has(l)&&so(),o.add(l);let u=oo(l,n);W(l)||er(l)?s.push({source:l,destination:u,appendTo:c,childIndex:0,cloningContent:!1}):c.appendChild(u)}return r}function so(){throw new Error(\"Cannot clone a cyclic or repeated node graph\")}function Zt(t,e){let n=String(e);return n===\"\"?null:qt(t,[{type:Bt,name:n}])}function Jt(t,e){let n=[...new Set(Mt(String(e)))];return Wt(t,n.map(r=>({type:Yt,name:r})))}function Qt(t,e){let n=String(e),r=V(n),o=[];for(let s of en(t))W(s)&&(n===\"*\"||(s.namespaceURI===D?s[k]===r:s[k]===n))&&o.push(s);return o}function en(t){let e=[],n=[],r=t[P];for(;r;){e.push(r);let o=r[P],s=r[v];o?(s&&n.push(s),r=o):r=s??n.pop()??null}return e}function xt(t){let e=en(t);return e.unshift(t),e}var re=class extends xe{nodeType=Gr;[k]=\"\";[K]=null;[we]=null;[P]=null;[H]=null;[v]=null;[z]=!1;get[$](){return this[L].defaultView[ke]}get localName(){return this[k]}get nodeName(){return this[k]}get ownerDocument(){return this[L]}get isConnected(){return this[z]}isDefaultNamespace(e){let n=me(e);return js(this)===n}get parentNode(){return this[K]}set parentNode(e){}get parentElement(){let e=this[K];return!e||e.nodeType!==1?null:e}set parentElement(e){}get previousSibling(){return this[H]}set previousSibling(e){}get nextSibling(){return this[v]}set nextSibling(e){}get previousElementSibling(){let e=this[H];for(;e&&e.nodeType!==1;)e=e[H];return e}set previousElementSibling(e){}get nextElementSibling(){let e=this[v];for(;e&&e.nodeType!==1;)e=e[v];return e}set nextElementSibling(e){}get firstChild(){return this[P]}set firstChild(e){}get lastChild(){let e=this[P];for(;e;){let n=e[v];if(n==null)break;e=n}return e}set lastChild(e){}get nodeValue(){return wt(this)?this.data:null}set nodeValue(e){wt(this)&&(this.data=e)}get textContent(){if(wt(this))return this.data;let e=\"\";for(let n of en(this))tr(n)&&(e+=n.data);return e}set textContent(e){if(wt(this))this.data=e;else if(io(this)){let n=e==null?\"\":String(e);n===\"\"?this.replaceChildren():this.replaceChildren(n)}}cloneNode(e){return Kt(this,e)}contains(e){let n=e;for(;n!=null;){if(n===this)return!0;n=n.parentNode}return!1}};function js(t){let e=t;for(;e;)switch(e.nodeType){case J:{let n=e;if(n.prefix==null&&n.namespaceURI!=null)return n.namespaceURI;let r=n.attributes.getNamedItemNS(ft,\"xmlns\");if(r!=null&&r.prefix==null)return me(r.value);e=n.parentElement;break}case Ce:e=e.documentElement;break;case zr:case Te:return null;case Fe:e=e.ownerElement;break;default:e=e.parentElement}return null}var oe=Symbol(\"insertNode\"),or=Symbol(\"preflightInsertions\"),tn=Symbol(\"replaceNode\"),ve=class extends re{remove(){let e=this.parentNode;e&&e.removeChild(this)}replaceWith(...e){let n=_e(e),r=this.parentNode;if(r)return nr(o=>{pe(r,n);let s=this[v];for(;s&&n.includes(s);)s=s[v];let i=rr(r,n,o);this.parentNode===r?r[tn](i,this,o):r[oe](i,s,o)})}before(...e){let n=_e(e),r=this.parentNode;if(r)return nr(o=>{pe(r,n);let s=this[H];for(;s&&n.includes(s);)s=s[H];let i=rr(r,n,o);r[oe](i,s?s[v]:r.firstChild,o)})}after(...e){let n=_e(e),r=this.parentNode;if(r)return nr(o=>{pe(r,n);let s=this[v];for(;s&&n.includes(s);)s=s[v];let i=rr(r,n,o);r[oe](i,s,o)})}};function nr(t){return B(()=>{let e=[];try{t(e)}catch(n){try{Pe(e)}catch{}throw n}Pe(e)})}function _e(t){return t.map(e=>e instanceof re?e:String(e))}function vt(t,e){return e instanceof re?e:t.ownerDocument.createTextNode(String(e))}function pe(t,e){for(let n of e){if(!(n instanceof re))continue;let r=t;for(;r;){if(r===n)throw M(\"Cannot insert a node into itself or one of its descendants\",\"HierarchyRequestError\");r=r[K]??r[we]}}}function rr(t,e,n){let r=[];for(let s of e)r.push(vt(t,s));if(r.length===1)return r[0];let o=t.ownerDocument.createDocumentFragment();o[or](r);for(let s of r)o[oe](s,null,n);return o}var nn,sr=0,ao=0,lo=0,co=0,qe=!1,ar=!1,St=!1,rn=class{#t;#n=[];#e=new Set;#r=!1;constructor(e){if(typeof e!=\"function\")throw new TypeError(\"MutationObserver callback must be a function\");this.#t=e}observe(e,n={}){let r=Gs(n),o=nn??=new WeakMap,s=o.get(e);s==null&&(s=new Map,o.set(e,s));let i=s.get(this);i==null?sr++:ir(i,-1),s.set(this,r),ir(r,1),this.#e.add(e)}disconnect(){let e=nn;if(e!=null){for(let n of this.#e){let r=e.get(n),o=r?.get(this);o!=null&&(r.delete(this),sr--,ir(o,-1)),r?.size===0&&e.delete(n)}this.#e.clear(),this.#n.length=0,sr===0&&(nn=void 0)}}takeRecords(){return this.#n.splice(0)}enqueue(e){this.#n.push(e),!this.#r&&(this.#r=!0,queueMicrotask(()=>{this.#r=!1;let n=this.takeRecords();n.length>0&&this.#t.call(this,n,this)}))}};function se(t){let e=nn;if(e==null)return;let n=new Map,r=t.target;for(;r;){let o=e.get(r);if(o)for(let[s,i]of o){if(r!==t.target&&!i.subtree)continue;let l=!1;if(t.type===\"attributes\"){if(!i.attributes||i.attributeFilter&&!i.attributeFilter.has(t.attributeName??\"\"))continue;l=i.attributeOldValue}else if(t.type===\"characterData\"){if(!i.characterData)continue;l=i.characterDataOldValue}else if(!i.childList)continue;n.set(s,n.get(s)===!0||l)}r=r.parentNode}for(let[o,s]of n)o.enqueue({addedNodes:t.addedNodes??new ne,attributeName:t.attributeName??null,attributeNamespace:t.attributeNamespace??null,nextSibling:t.nextSibling??null,oldValue:s?t.oldValue??null:null,previousSibling:t.previousSibling??null,removedNodes:t.removedNodes??new ne,target:t.target,type:t.type})}function on(...t){let e=new ne;return e.push(...t),e}function Gs(t){if(t.attributes===!1&&(t.attributeOldValue||t.attributeFilter!=null))throw new TypeError(\"attributeOldValue and attributeFilter require attributes to be enabled\");if(t.characterData===!1&&t.characterDataOldValue)throw new TypeError(\"characterDataOldValue requires characterData to be enabled\");let e=t.attributes??(t.attributeOldValue===!0||t.attributeFilter!=null),n=t.characterData??t.characterDataOldValue===!0,r=t.childList===!0;if(!e&&!n&&!r)throw new TypeError(\"MutationObserver options must enable childList, attributes, or characterData\");return{attributes:e,attributeFilter:t.attributeFilter==null?void 0:new Set(t.attributeFilter.map(String)),attributeOldValue:t.attributeOldValue===!0,characterData:n,characterDataOldValue:t.characterDataOldValue===!0,childList:r,subtree:t.subtree===!0}}function ir(t,e){t.attributes&&(ao+=e),t.characterData&&(lo+=e),t.childList&&(co+=e),qe=ao>0,ar=lo>0,St=co>0}var ce=class extends ve{childNodes=new ne;children=new ne;appendChild(e){return B(()=>this[oe](e,null))}insertBefore(e,n){return B(()=>this[oe](e,n||null))}append(...e){return B(()=>{let n=_e(e.filter(r=>r!=null));n.length>1&&pe(this,n);for(let r of n)this[oe](vt(this,r),null)})}prepend(...e){return B(()=>{let n=_e(e.filter(o=>o!=null));n.length>1&&pe(this,n);let r=this.firstChild;for(let o of n)this[oe](vt(this,o),r)})}replaceChildren(...e){return B(()=>{let n=_e(e.filter(o=>o!=null));pe(this,n);let r;for(;r=this.firstChild;)this.removeChildImmediately(r);for(let o of n)this[oe](vt(this,o),null)})}removeChild(e){return B(()=>(this.removeChildImmediately(e),e))}removeChildImmediately(e){if(e.parentNode!==this)throw M(\"The node is not a child of this node\",\"NotFoundError\");let n=this[z]?xt(e):void 0,r=e[H],o=e[v],s=sn(this,e);if(n)for(let i of n)i[z]=!1;this.queueRemovalMutationRecord(this,e,r,o),n&&this.enqueueTreeReactions(n,\"disconnectedCallback\"),Pe(this.collectRemovalHookEffects(e,s))}replaceChild(e,n){return B(()=>this[tn](e,n))}[tn](e,n,r){if(pe(this,[e]),n.parentNode!==this)throw M(\"The reference node is not a child of this parent\",\"NotFoundError\");let o=n[H],s=n[v],i=this.prepareInsertion(e),l=this[z]?xt(n):void 0,c=new Set(i.map(({node:d})=>d)),u=s;for(;u&&c.has(u);)u=u[v];let h=sn(this,n);if(l){for(let E of l)E[z]=!1;let d=new Set(l);for(let E of i)d.has(E.node)&&(E.shouldDisconnect=!1)}this.commitInsertion(i,u);let w=this[z];return this.queueRemovalMutationRecord(this,n,o,s),this.queueInsertionMutationRecords(i),l&&this.enqueueTreeReactions(l,\"disconnectedCallback\"),this.enqueueInsertionReactions(i,w),this.performOrCollectHookEffects([...this.collectRemovalHookEffects(n,h),...this.collectInsertionHookEffects(i)],r),n}querySelectorAll(e){return Wt(this,e)}querySelector(e){return qt(this,e)}[oe](e,n,r){return this.validateInsertion(e,n),this.insertIntoValidated(e,n,r),e}[or](e){for(let n of e)this.validateInsertion(n,null),this.prepareInsertion(n)}validateInsertion(e,n){if(pe(this,[e]),n&&n.parentNode!==this)throw M(\"The reference node is not a child of this parent\",\"NotFoundError\")}insertIntoValidated(e,n,r){e===n&&(n=e[v]);let o=this.prepareInsertion(e);this.commitInsertion(o,n);let s=this[z];this.queueInsertionMutationRecords(o),this.enqueueInsertionReactions(o,s),this.performOrCollectHookEffects(this.collectInsertionHookEffects(o),r)}performOrCollectHookEffects(e,n){n?n.push(...e):Pe(e)}prepareInsertion(e){let n=[];if(e.nodeType===Te){let i=e[P];for(;i;)n.push(i),i=i[v]}else n.push(e);let r=this[z],o=this[L],s=[];for(let i of n){let l=i[z],c=l||r,u,h;if(i[L]===o)c&&(u=xt(i));else{let w=Xt(i);h=w.nodes,c&&(u=w.treeNodes)}s.push({node:i,nodes:u,adoption:h,shouldDisconnect:l})}return s}commitInsertion(e,n){for(let s of e){let i=s.node[K];if(i){let l=s.node[H],c=s.node[v];s.source={parent:i,index:sn(i,s.node),previousSibling:l,nextSibling:c}}}for(let s of e){let i=this.attachChild(s.node,n);s.insertIndex=i.index,s.previousSibling=i.previousSibling,s.nextSibling=i.nextSibling}let r=this[L];for(let{adoption:s}of e)s&&Tt(s,r);let o=this[z];for(let{nodes:s}of e)if(s)for(let i of s)i[z]=o}attachChild(e,n){if(n){let s=n[H];e[v]=n,e[H]=s,s?s[v]=e:this[P]=e,n[H]=e}else{e[v]=null;let s=this[P];if(s){let i;for(;i=s[v];)s=i;s[v]=e,e[H]=s}else this[P]=e,e[H]=null}let r=W(e);e[K]=this;let o;if(n){if(o=this.childNodes.indexOf(n),this.childNodes.splice(o,0,e),r){let s=n;for(;s&&!W(s);)s=s[v];s?this.children.splice(this.children.indexOf(s),0,e):this.children.push(e)}}else o=this.childNodes.length,this.childNodes.push(e),r&&this.children.push(e);return{index:o,previousSibling:e[H],nextSibling:e[v]}}queueRemovalMutationRecord(e,n,r,o){St&&se({type:\"childList\",target:e,removedNodes:on(n),previousSibling:r,nextSibling:o})}queueInsertionMutationRecords(e){if(St)for(let n of e){let{node:r,source:o}=n;o&&this.queueRemovalMutationRecord(o.parent,r,o.previousSibling,o.nextSibling),se({type:\"childList\",target:this,addedNodes:on(r),previousSibling:n.previousSibling,nextSibling:n.nextSibling})}}collectRemovalHookEffects(e,n){return this.nodeType!==J||ht(this)?[]:[[()=>this[$].removeChild?.(this,e,n)]]}collectInsertionHookEffects(e){let n=[];for(let r of e){let{node:o,source:s}=r;s?.parent.nodeType===J&&!ht(s.parent)&&n.push([()=>s.parent[$].removeChild?.(s.parent,o,s.index)]),this.nodeType===J&&!ht(this)&&n.push([()=>this[$].insertChild?.(this,o,r.insertIndex),o])}return n}enqueueInsertionReactions(e,n){for(let r of e){let{nodes:o}=r;o&&(r.shouldDisconnect&&this.enqueueTreeReactions(o,\"disconnectedCallback\"),n&&this.enqueueTreeReactions(o,\"connectedCallback\"))}}enqueueTreeReactions(e,n){fo(e,n)}};function uo(t,e,n,r){if(e.parentNode!==t)throw Error(\"not a child of this node\");let o=t[z]?n.treeNodes:void 0,s=e[H],i=e[v],l=sn(t,e);if(o)for(let u of o)u[z]=!1;Tt(n.nodes,r),St&&se({type:\"childList\",target:t,removedNodes:on(e),previousSibling:s,nextSibling:i}),o&&fo(o,\"disconnectedCallback\");let c=[];t.nodeType===J&&!ht(t)&&c.push([()=>t[$].removeChild?.(t,e,l)]),Pe(c)}function sn(t,e){let n=e[H],r=e[v];n?n[v]=r:t[P]=r,r&&(r[H]=n);let o=t.childNodes.indexOf(e);return t.childNodes.splice(o,1),W(e)&&t.children.splice(t.children.indexOf(e),1),e[K]=null,e[v]=null,e[H]=null,o}function fo(t,e){for(let n of t){let r=n[e];typeof r==\"function\"&&Vt(n,()=>r.call(n))}}function Ot(t,e,n,r,o){let{observedAttributes:s}=t.constructor,{attributeChangedCallback:i}=t;i==null||s==null||!s.includes(e)||Vt(t,()=>i.call(t,e,n,r,o))}var an=class{[P]=null;constructor(e){this[X]=e}getNamedItem(e){let n=String(e),r=this[X][C]===D?V(n):n,o=this[P];for(;o;){if(o.name===r)return o;o=o[v]}return null}getNamedItemNS(e,n){let r=me(e),o=String(n),s=this[P];for(;s;){if(s.localName===o&&s[C]===r)return s;s=s[v]}return null}item(e){let n=this[P],r=0;for(;n;){if(r++===e)return n;n=n[v]}return null}get length(){let e=0,n=this[P];for(;n;)e++,n=n[v];return e}removeNamedItem(e){let n=String(e),r=this[X][C]===D?V(n):n;return B(()=>this.removeNamedItemImmediately(o=>o.name===r))}removeNamedItemNS(e,n){let r=me(e),o=String(n);return B(()=>this.removeNamedItemImmediately(s=>s.localName===o&&s[C]===r))}removeNamedItemImmediately(e){let n=this[X],r=this[P],o=null;for(;r!=null;){if(e(r)){o&&(o[v]=r[v]),this[P]===r&&(this[P]=r[v]);let s=r.value;return r[v]=null,r[X]=null,qe&&se({type:\"attributes\",target:n,attributeName:r.name,attributeNamespace:r[C],oldValue:s}),n[$].removeAttribute?.(n,r.name,r[C]),Ot(n,r.localName,s,null,r[C]),r}o=r,r=r[v]}return null}setNamedItem(e){return B(()=>this.setNamedItemImmediately(e))}setNamedItemImmediately(e){let n=this[X],r=e[X];if(r!=null&&r!==n)throw M(\"The attribute is already in use by another element.\",\"InUseAttributeError\");let o=null,s=this[P],i=null;for(;s;){if(s.localName===e.localName&&s[C]===e[C]){if(s===e)return s;i?i[v]=e:this[P]=e,e[v]=s[v],s[v]=null,o=s;break}i=s,s=s[v]}o==null&&(i?i[v]=e:this[P]=e),e[X]=n,e[L]=n[L],o&&(o[X]=null);let l=o==null||o.value!==e.value,c=o!=null&&o.name!==e.name;return l&&qe&&se({type:\"attributes\",target:n,attributeName:e.name,attributeNamespace:e[C],oldValue:o?.value??null}),c&&n[$].removeAttribute?.(n,o.name,o[C]),(l||c)&&n[$].setAttribute?.(n,e.name,e.value,e[C]),l&&Ot(n,e.localName,o?.value??null,e.value,e[C]),o}setNamedItemNS(e){return this.setNamedItem(e)}*[Symbol.iterator](){let e=this[P];for(;e;)yield e,e=e[v]}};var Ie=class extends re{nodeType=Fe;[C]=null;[v]=null;[X]=null;constructor(e,n,r){super(),this[k]=e,this[Ne]=n,r&&(this[C]=r)}get nodeName(){return this[k]}set nodeName(e){}get name(){return this[k]}set name(e){}get localName(){if(this[C]==null)return this[k];let e=this[k].indexOf(\":\");return e<0?this[k]:this[k].slice(e+1)}get prefix(){if(this[C]==null)return null;let e=this[k].indexOf(\":\");return e<0?null:this[k].slice(0,e)}get value(){return this[Ne]}set value(e){let n=String(e),r=this[X];if(!r){this[Ne]=n;return}B(()=>{let o=this[Ne];this[Ne]=n,qe&&o!==n&&se({type:\"attributes\",target:r,attributeName:this[k],attributeNamespace:this[C],oldValue:o}),this[$].setAttribute?.(r,this[k],n,this[C]),Ot(r,this.localName,o,n,this[C])})}get nodeValue(){return this.value}set nodeValue(e){this.value=e}get ownerElement(){return this[X]}get namespaceURI(){return this[C]}get specified(){return!0}};var zs={amp:\"&\",AMP:\"&\",apos:\"'\",gt:\">\",GT:\">\",lt:\"<\",LT:\"<\",quot:'\"',QUOT:'\"'},Fs=new Set([\"area\",\"base\",\"br\",\"col\",\"embed\",\"hr\",\"img\",\"input\",\"link\",\"meta\",\"param\",\"source\",\"track\",\"wbr\"]),Bs=/(?:<([a-z][a-z0-9-:]*)((?:[\\s]+[^<>'\"=/\\s]+(?:=(['\"])[^]*?\\3|=[^>'\"\\s]*|))*)[\\s]*(\\/?)\\s*>|<\\/([a-z][a-z0-9-:]*)>|<!--(.*?)-->|([^<>]+))/gi,ho=/\\s([^<>'\"=/\\n\\s]+)(?:=([\"'])([\\s\\S]*?)\\2|=([^>'\"\\n\\s]*)|)/g,Ys=\"|b|big|blockquote|body|br|center|code|dd|div|dl|dt|em|embed|h1|h2|h3|h4|h5|h6|head|hr|i|img|li|listing|menu|meta|nobr|ol|p|pre|ruby|s|small|span|strong|strike|sub|sup|table|tt|u|ul|var|\",qs=/^(?:color|face|size)$/i;function mo(t){return t.replace(/&(?:(amp|AMP|apos|gt|GT|lt|LT|quot|QUOT)|#(\\d+)|#[xX]([\\da-fA-F]+));/g,(e,n,r,o)=>{if(n)return zs[n];let s=Number.parseInt(r??o,r?10:16);try{return String.fromCodePoint(s)}catch{return e}})}function go(t){return t.namespaceURI===D&&Fs.has(t.localName)}function po(t){let e=t.localName;return t[C]===te&&(e===\"foreignObject\"||e===\"desc\"||e===\"title\")}function Ws(t,e){if(Ys.includes(`|${t}|`))return!0;if(t!==\"font\")return!1;for(let n of e.matchAll(ho))if(qs.test(n[1]))return!0;return!1}function ln(t,e){let n=e.ownerDocument,r=n.createDocumentFragment(),o=[],s=r;for(let i of t.matchAll(Bs)){let l=i[1];if(l){let c=i[2],u=V(l),h=o[o.length-1]?.element??e,w=h[C]===te?te:D;if(u===\"svg\")w=te;else if(w===te){if(po(h))w=D;else if(Ws(u,c)){for(;o.length>0;){let N=o[o.length-1];if(N.element[C]!==te||po(N.element))break;o.pop(),s=N.target}w=D}}let d=w===D?u:l,E=n[ze](d,w,null,d);for(let N of c.matchAll(ho))E.setAttribute(N[1],mo(N[3]||N[4]||\"\"));if(s.append(E),go(E)||w!==D&&i[4])continue;o.push({element:E,target:s}),s=w===D&&u===\"template\"?E.content:E}else if(i[5]){let c=V(i[5]);for(let u=o.length-1;u>=0;u--){let h=o[u],w=V(h.element[k]);if(w===c){s=h.target,o.length=u;break}if(h.element[C]===D&&w===\"template\")break}}else i[6]?s.append(n.createComment(i[6])):s.append(mo(i[7]))}return r}function cn(t){return bo([{type:\"content\",child:t[P]}])}function yo(t){return bo([{type:\"opening\",node:t}])}function bo(t){let e=[],n;for(;n=t.pop();)switch(n.type){case\"opening\":{let r=n.node;switch(r.nodeType){case J:{let o=r;e.push(`<${o[k]}`);let s=o[le]?.[P];for(;s;){e.push(` ${s[k]}`);let l=s[Ne];l!==\"\"&&(l=String(l).replace(/&/g,\"&\").replace(/\"/g,\""\"),e.push(`=\"${l}\"`)),s=s[v]}if(e.push(\">\"),go(o))break;let i=o.namespaceURI===D&&o.localName===\"template\"?o[fe]:o;t.push({type:\"closing\",name:o[k]}),t.push({type:\"content\",child:i?.[P]??null});break}case Be:{let o=r;e.push(o[ee].replace(/&/g,\"&\").replace(/\"/g,\""\").replace(/</g,\"<\").replace(/>/g,\">\"));break}case Ye:{let o=r;e.push(`<!--${o[ee]}-->`);break}}break}case\"content\":{let r=n.child;r&&(t.push({type:\"content\",child:r[v]}),t.push({type:\"opening\",node:r}));break}case\"closing\":e.push(`</${n.name}>`);break}return e.join(\"\")}var j=class extends ce{nodeType=J;[C]=D;[Ee]=null;get namespaceURI(){return this[C]}get prefix(){return this[Ee]}get localName(){let e=this[Ee];return e==null?this[k]:this[k].slice(e.length+1)}get nodeName(){return this[C]===D?Br(this[k]):this[k]}get tagName(){return this.nodeName}get id(){return this.getAttributeNS(null,\"id\")??\"\"}set id(e){this.setAttribute(\"id\",String(e))}get slot(){return this.getAttributeNS(null,\"slot\")??\"\"}set slot(e){let n=String(e);this.getAttributeNS(null,\"slot\")!==n&&this.attributes.setNamedItem(new Ie(\"slot\",n))}get attributes(){let e=this[le];return e||(e=new an(this),this[le]=e),e}getAttributeNames(){return[...this.attributes].map(e=>e.name)}getElementsByTagName(e){return Qt(this,e)}get firstElementChild(){return this.children[0]??null}getElementsByClassName(e){return Jt(this,e)}get lastElementChild(){return this.children[this.children.length-1]??null}get nextElementSibling(){let e=this.nextSibling;for(;e&&e.nodeType!==1;)e=e.nextSibling;return e}get previousElementSibling(){let e=this.previousSibling;for(;e&&e.nodeType!==1;)e=e.previousSibling;return e}setAttribute(e,n){let r=String(e),o=String(n);zn(r);let s=this[C]===D?V(r):r,i=this.attributes.getNamedItemNS(null,s);i?i.value=o:this.attributes.setNamedItem(new Ie(s,o))}setAttributeNS(e,n,r){let o=me(e),s=String(n),i=String(r),l=Lt(o,s,\"attribute\"),c=this.attributes.getNamedItemNS(l.namespace,l.localName);c?c.value=i:this.attributes.setNamedItemNS(new Ie(l.qualifiedName,i,l.namespace))}toggleAttribute(e,n){let r=String(e);zn(r);let o=this[C]===D?V(r):r,s=this.attributes.getNamedItemNS(null,o),i=n===void 0?void 0:!!n;return s==null?i===!1?!1:(this.attributes.setNamedItem(new Ie(o,\"\")),!0):i===!0?!0:(this.attributes.removeNamedItemNS(null,o),!1)}getAttribute(e){let n=this.attributes.getNamedItem(e);return n&&n.value}getAttributeNS(e,n){let r=this.attributes.getNamedItemNS(e,n);return r&&r.value}hasAttribute(e){return this.attributes.getNamedItem(e)!=null}hasAttributeNS(e,n){return this.attributes.getNamedItemNS(e,n)!=null}removeAttribute(e){let n=String(e),r=this[C]===D?V(n):n;this.attributes.removeNamedItemNS(null,r)}removeAttributeNS(e,n){this.attributes.removeNamedItemNS(e,n)}get outerHTML(){return yo(this)}get innerHTML(){return cn(this)}set innerHTML(e){if(e==null||e===\"\")this.replaceChildren();else{let n=ln(String(e),this);this.replaceChildren(n)}}};var We=class t extends j{[C]=te;get ownerSVGElement(){let e=null,n=this.parentNode;for(;n instanceof t;)e=n,n=n.parentNode;return e}};var Se=class extends ve{[ee]=\"\";constructor(e){super(),this[ee]=e==null?\"\":String(e)}setData(e){let n=ar,r=n?this[ee]:null,o=\"\";e!=null&&(o=typeof e==\"string\"?e:String(e)),this[ee]=o,n&&r!==o&&se({type:\"characterData\",target:this,oldValue:r}),this[$].setText?.(this,o)}get data(){return this[ee]}set data(e){this.setData(e)}};var Xe=class extends Se{nodeType=Be;[k]=\"#text\"};var Ke=class extends Se{nodeType=Ye;[k]=\"#comment\"};var Ze=class extends ce{nodeType=Te;[k]=\"#document-fragment\";[L]=typeof window<\"u\"?window.document:null;getElementById(e){return Zt(this,e)}};var Je=class extends j{get content(){let e=this[fe];return e||(e=this.ownerDocument.createDocumentFragment(),e[we]=this,this[fe]=e),e}set content(e){}set innerHTML(e){this.content.replaceChildren(ln(String(e),this))}get innerHTML(){let e=this[fe];return e?cn(e):\"\"}};var un=class extends j{};var dn=class extends j{};var fn=class extends j{};var At=class extends ce{nodeType=Ce;[k]=\"#document\";[z]=!0;constructor(e){super(),this.defaultView=e,this[L]=this,this.documentElement=pn(new fn,this,\"html\"),this.body=pn(new un,this,\"body\"),this.head=pn(new dn,this,\"head\"),this.appendChild(this.documentElement),this.documentElement.appendChild(this.head),this.documentElement.appendChild(this.body)}get textContent(){return null}set textContent(e){}getElementsByClassName(e){return Jt(this,e)}createElement(e){let n=String(e);return Wr(n),lr(this,V(n))}createElementNS(e,n){let r=Lt(e,n,\"element\");return lr(this,r.qualifiedName,r.namespace,r.prefix,r.localName)}[ze](e,n,r,o){return lr(this,e,n,r,o)}createTextNode(e){let n=mn(new Xe(e),this);return this[$].createText?.(n,n.data),n}createComment(e){return mn(new Ke(e),this)}createDocumentFragment(){return mn(new Ze,this)}createEvent(){return new F(\"\")}getElementById(e){return Zt(this,e)}getElementsByTagName(e){return Qt(this,e)}importNode(e,n){if(e.nodeType===Ce)throw M(\"Cannot import a document node\",\"NotSupportedError\");return Kt(e,n,this)}adoptNode(e){if(e[L]===this)return e;let n=Xt(e);return B(()=>{let r=e.parentNode;return r?uo(r,e,n,this):Tt(n.nodes,this),e})}};function mn(t,e){return Object.defineProperty(t,L,{value:e,writable:!0,enumerable:!1}),t}function lr(t,e,n=D,r=null,o=e){let s;if(n===te)s=new We;else if(n===D&&o===\"template\")s=new Je;else if(n===D){let i=t.defaultView.customElements.get(o);s=i?new i:new j}else s=new j;return pn(s,t,e,n,r)}function pn(t,e,n,r=D,o=null){return mn(t,e),Object.defineProperties(t,{[k]:{value:n},[C]:{value:r},[Ee]:{value:o}}),e[$].createElement?.(t,r),t}var hn=class extends F{constructor(e,n){super(e,n),this.detail=n?.detail??null}initCustomEvent(e,n,r,o){super.initEvent(e,n,r),this.detail=o??null}};var gn=class extends F{constructor(e,n){super(e,n),this.message=n.message,this.filename=n.filename,this.lineno=n.lineno,this.colno=n.colno,this.error=n.error}};var yn=class extends F{constructor(e,n){super(e,n),this.promise=n.promise,this.reason=n.reason}};var bn=class extends F{constructor(e,n){super(e,n),this.oldState=n.oldState,this.newState=n.newState}};var En=class extends F{constructor(e,n={}){super(e,n),this.relatedTarget=n.relatedTarget??null}};var Nn=class extends F{constructor(e,n={}){super(e,n),this.clipboardData=n.clipboardData??null}};var wn=class extends j{};var Xs=/^[a-z][^A-Z\\u0000\\t\\n\\f\\r />]*-[^A-Z\\u0000\\t\\n\\f\\r />]*$/u,Ks=new Set([\"annotation-xml\",\"color-profile\",\"font-face\",\"font-face-src\",\"font-face-uri\",\"font-face-format\",\"font-face-name\",\"missing-glyph\"]);function Eo(t){return Xs.test(t)&&!Ks.has(t)}function No(t){return M(`Invalid custom element name: \"${t}\"`,\"SyntaxError\")}var Tn=class{registry=new Map;listenersByName=new Map;define(e,n,r){if(!Eo(e))throw No(e);if(this.registry.has(e))throw M(`A custom element named \"${e}\" has already been defined`,\"NotSupportedError\");if(this.getName(n)!=null)throw M(\"This constructor has already been registered in this custom element registry\",\"NotSupportedError\");this.registry.set(e,n);let o=this.listenersByName.get(e);if(o!=null){this.listenersByName.delete(e);for(let s of o)s(n)}}get(e){return this.registry.get(e)}getName(e){for(let[n,r]of this.registry)if(r===e)return n;return null}whenDefined(e){if(!Eo(e))return Promise.reject(No(e));let n=this.registry.get(e);if(n!=null)return Promise.resolve(n);let r=this.listenersByName.get(e);return r==null&&(r=[],this.listenersByName.set(e,r)),new Promise(o=>{r.push(o)})}upgrade(e){}initialize(e){}};var Zs=[\"onerror\",\"onunhandledrejection\"],To=Symbol.for(\"@remote-dom/polyfill/global-property\");function xo(t){return Object.getOwnPropertyDescriptors(t)}function vo(t){let e={};for(let[n,r]of Object.entries(Object.getOwnPropertyDescriptors(xe.prototype)))n!==\"constructor\"&&typeof r.value==\"function\"&&(r.value=cr(r.value.bind(t)),e[n]=r);return e}function So(t){let e={};for(let n of Zs)e[n]={configurable:!0,enumerable:!0,get:cr(()=>t[n]),set:cr(r=>{t[n]=r})};return e}function Js(t){return Object.assign(xo(t),vo(t),So(t))}function cr(t){return Object.defineProperty(t,To,{value:!0}),t}function wo(t,e){for(let n of Reflect.ownKeys(e)){let r=Qs(t,n);(r==null||ei(r))&&Object.defineProperty(t,n,e[n])}}function Qs(t,e){let n=t;for(;n;){let r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function ei(t){return[t.value,t.get,t.set].some(e=>typeof e==\"function\"&&e[To]===!0)}var De=class extends xe{[$]={};[Dt]=[];[ke]=ni(this);name=\"\";window=this;parent=this;self=this;top=this;document=new At(this);customElements=new Tn;location=globalThis.location;navigator=globalThis.navigator;Event=F;ErrorEvent=gn;PromiseRejectionEvent=yn;ToggleEvent=bn;FocusEvent=En;ClipboardEvent=Nn;EventTarget=xe;CustomEvent=hn;Node=re;ParentNode=ce;ChildNode=ve;DocumentFragment=Ze;Document=At;CharacterData=Se;Comment=Ke;Text=Xe;Element=j;HTMLElement=wn;SVGElement=We;HTMLTemplateElement=Je;MutationObserver=rn;#t=null;#n=null;#e=null;static with(...e){let n=this;return class extends n{constructor(){super();for(let o of e)ti(this,o)}}}get onerror(){return this.#n}set onerror(e){this.#t&&this.removeEventListener(\"error\",this.#t),e&&typeof e==\"function\"?(this.#n=e,this.#t=n=>{e(n.message??\"Error\",n.filename,n.lineno,n.colno,n.error)},this.addEventListener(\"error\",this.#t)):(this.#t=null,this.#n=null)}get onunhandledrejection(){return this.#e}set onunhandledrejection(e){this.#e&&this.removeEventListener(\"unhandledrejection\",this.#e),e&&typeof e==\"function\"?(this.#e=e,this.addEventListener(\"unhandledrejection\",this.#e)):this.#e=null}static setGlobal(e){let n=globalThis.self,r=globalThis.window,o=xo(e),s=Object.assign(vo(e),So(e));delete o.self,Object.defineProperties(globalThis,o),wo(globalThis,s),typeof n>\"u\"||n===r&&n!==globalThis?Object.defineProperty(globalThis,\"self\",{value:e,configurable:!0,writable:!0,enumerable:!0}):n!==globalThis&&(Object.defineProperties(n,o),wo(n,s))}static setGlobalThis(e){for(let n in e)e[n]===e&&(e[n]=globalThis);Object.defineProperties(globalThis,Js(e))}};function ti(t,e){t[Dt].push(e(t)??{})}function ni(t){return{createElement:he.bind(null,t,\"createElement\"),setAttribute:he.bind(null,t,\"setAttribute\"),removeAttribute:he.bind(null,t,\"removeAttribute\"),createText:he.bind(null,t,\"createText\"),setText:he.bind(null,t,\"setText\"),insertChild:he.bind(null,t,\"insertChild\"),removeChild:he.bind(null,t,\"removeChild\"),addEventListener:he.bind(null,t,\"addEventListener\"),removeEventListener:he.bind(null,t,\"removeEventListener\")}}function he(t,e,...n){for(let s of t[Dt])s[e]?.apply(s,n);let r=t[$];r[e]?.apply(r,n)}var xn=new De;var ur=\"~\";var Oe=new WeakMap;function Qe(t){return Oe.get(t)}var pr=new WeakMap,oi=0;function ie(t){let e=pr.get(t);return e==null&&(e=String(oi++),vn(t,e)),e}function vn(t,e){pr.set(t,e)}var fr=new WeakMap;function si(t){return fr.get(t)}var mr=new WeakMap;function ii(t){let e=mr.get(t);if(e!=null)return e;if(!(!(t instanceof Element)||t.tagName.includes(\"-\"))){e={};for(let{name:n,value:r}of t.attributes)e[n]=r;return e}}var ai=new WeakMap;function li(t){return ai.get(t)}function hr(t,e,n){let r=fr.get(t);if(r==null&&(r={},fr.set(t,r)),r[e]===n)return;r[e]=n;let o=Oe.get(t);o?.mutate([[3,ie(t),e,n,1]])}function Ae(t,e,n){let r=mr.get(t);if(r==null&&(r={},mr.set(t,r)),r[e]===n)return;n==null?delete r[e]:r[e]=String(n);let o=Oe.get(t);o?.mutate([[3,ie(t),e,n,2]])}function et(t,e){if(Oe.get(t)!==e&&(Oe.set(t,e),t.childNodes))for(let r=0;r<t.childNodes.length;r++)et(t.childNodes[r],e)}function Sn(t){if(Oe.get(t)!=null&&(Oe.delete(t),t.childNodes))for(let n=0;n<t.childNodes.length;n++)Sn(t.childNodes[n])}function tt(t){let{nodeType:e}=t;switch(e){case 1:return{id:ie(t),type:e,element:t.localName,properties:dr(si(t)),attributes:dr(ii(t)),eventListeners:dr(li(t)),children:Array.from(t.childNodes).map(tt)};case 3:case 8:return{id:ie(t),type:e,data:t.data};default:throw new Error(`Cannot serialize node of type ${t.nodeType} (${typeof t.nodeType})`)}}function dr(t){return t?{...t}:void 0}function gr(t,e,...n){let r=pr.get(t),o=Oe.get(t);if(r==null||o==null)throw new Error(`Cannot call method ${e} on an unconnected node`);return o.call(r,e,...n)}var nt=xn[$];nt.insertChild=(t,e,n)=>{let r=Qe(t);r!=null&&(et(e,r),r.mutate([[0,ie(t),tt(e),n]]))};nt.removeChild=(t,e,n)=>{let r=Qe(t);r!=null&&(Sn(e),r.mutate([[1,ie(t),n]]))};nt.setText=(t,e)=>{let n=Qe(t);n?.mutate([[2,ie(t),e]])};nt.setAttribute=(t,e,n)=>{t.tagName.includes(\"-\")||Ae(t,e,n)};nt.removeAttribute=(t,e)=>{t.tagName.includes(\"-\")||Ae(t,e)};De.setGlobal(xn);var Ro=[\"globalThis\",\"Infinity\",\"NaN\",\"undefined\",\"isFinite\",\"isNaN\",\"parseFloat\",\"parseInt\",\"decodeURI\",\"decodeURIComponent\",\"encodeURI\",\"encodeURIComponent\",\"escape\",\"unescape\",\"Object\",\"Function\",\"Array\",\"Number\",\"Boolean\",\"String\",\"Symbol\",\"BigInt\",\"Date\",\"Promise\",\"RegExp\",\"Math\",\"JSON\",\"Reflect\",\"Proxy\",\"Intl\",\"Error\",\"AggregateError\",\"EvalError\",\"RangeError\",\"ReferenceError\",\"SyntaxError\",\"TypeError\",\"URIError\",\"SuppressedError\",\"Map\",\"Set\",\"WeakMap\",\"WeakSet\",\"WeakRef\",\"FinalizationRegistry\",\"Iterator\",\"AsyncIterator\",\"DisposableStack\",\"AsyncDisposableStack\",\"ArrayBuffer\",\"SharedArrayBuffer\",\"DataView\",\"Atomics\",\"Int8Array\",\"Uint8Array\",\"Uint8ClampedArray\",\"Int16Array\",\"Uint16Array\",\"Int32Array\",\"Uint32Array\",\"Float16Array\",\"Float32Array\",\"Float64Array\",\"BigInt64Array\",\"BigUint64Array\"],ko=[\"window\",\"parent\",\"top\",\"document\",\"customElements\",\"Event\",\"ErrorEvent\",\"PromiseRejectionEvent\",\"ToggleEvent\",\"FocusEvent\",\"ClipboardEvent\",\"CustomEvent\",\"EventTarget\",\"Node\",\"ParentNode\",\"ChildNode\",\"DocumentFragment\",\"Document\",\"CharacterData\",\"Comment\",\"Text\",\"Element\",\"HTMLElement\",\"SVGElement\",\"HTMLTemplateElement\",\"MutationObserver\"],Co=[\"self\",\"postMessage\",\"setTimeout\",\"clearTimeout\",\"setInterval\",\"clearInterval\",\"queueMicrotask\",\"structuredClone\",\"crypto\",\"console\",\"DOMException\"],Po=[\"TEMPORARY\",\"PERSISTENT\"],Eu=Object.freeze([...Ro,...ko,...Co,...Po]),Nu=Object.freeze([\"constructor\",\"__defineGetter__\",\"__defineSetter__\",\"hasOwnProperty\",\"__lookupGetter__\",\"__lookupSetter__\",\"isPrototypeOf\",\"propertyIsEnumerable\",\"toString\",\"valueOf\",\"__proto__\",\"toLocaleString\"]),Ao=t=>typeof t==\"symbol\"?`[${t.description??\"symbol\"}]`:t;function _o(t=globalThis,e=[],n={}){let r=[],o=[],s=new Set([...Ro,...ko,...Co,...e,\"constructor\",Symbol.toStringTag]),i=(p,m)=>{let b=Reflect.getOwnPropertyDescriptor(p,m);return b===void 0||!(\"value\"in b)||b.writable||b.configurable?!1:n.primitivesStay&&typeof m==\"symbol\"&&(typeof b.value!=\"object\"||b.value===null)&&typeof b.value!=\"function\"?!0:Po.includes(m)&&typeof b.value==\"number\"},l=t,c=l.setTimeout,u=l.setInterval,h=l.crypto,w=(p,m)=>function(b,A,...f){if(typeof b!=\"function\")throw new TypeError(`${m} takes a function: a guest view cannot run code from text`);return p.call(t,b,A,...f)},d=h?Object.freeze({getRandomValues:p=>h.getRandomValues(p)}):void 0,E=l.document?.defaultView;if(E&&E!==l)for(let p of Reflect.ownKeys(E))typeof p==\"symbol\"||s.has(p)||Reflect.deleteProperty(E,p)||o.push(`window.${p}`);let N=[];for(let p=t;p&&p!==Object.prototype;p=Object.getPrototypeOf(p))N.push(p);for(let p of N)for(let m of Reflect.ownKeys(p))s.has(m)||(Reflect.deleteProperty(p,m)?r.push(Ao(m)):i(p,m)||o.push(Ao(m)));let S=()=>function(){throw new EvalError(\"A guest view cannot make code from text.\")},y=[Function.prototype,Object.getPrototypeOf(async function(){}),Object.getPrototypeOf(function*(){}),Object.getPrototypeOf(async function*(){})];for(let p of y){let m=S();Object.defineProperty(m,\"prototype\",{value:p,writable:!1,enumerable:!1,configurable:!1}),Reflect.defineProperty(p,\"constructor\",{value:m,writable:!1,enumerable:!1,configurable:!1})||o.push(\"Function.prototype.constructor\"),p===Function.prototype&&Reflect.defineProperty(t,\"Function\",{value:m,writable:!0,enumerable:!1,configurable:!0})}let a=(p,m)=>{Reflect.defineProperty(t,p,{value:m,writable:!0,enumerable:!0,configurable:!0})||o.push(p)};a(\"setTimeout\",w(c,\"setTimeout\")),a(\"setInterval\",w(u,\"setInterval\")),d&&a(\"crypto\",d);for(let p of N.slice(1))Object.freeze(p);for(let p of Reflect.ownKeys(t)){let m=Reflect.getOwnPropertyDescriptor(t,p);Reflect.defineProperty(t,p,\"value\"in m?{...m,writable:!1,configurable:!1}:{...m,configurable:!1})}let g;try{g=Reflect.preventExtensions(t)}catch{g=!1}return{removed:r,stuck:o,sealed:g}}var Rt=class extends HTMLElement{constructor(){super(),vn(this,ur)}connect(e){if(Qe(this)===e||(et(this,e),this.childNodes.length===0))return;let n=[];for(let r=0;r<this.childNodes.length;r++){let o=this.childNodes[r];n.push([0,ur,tt(o),r])}e.mutate(n)}updateRemoteProperty(e,n){hr(this,e,n)}callRemoteMethod(e,...n){return gr(this,e,...n)}};var T={},On={empty:!0},ci={id:\"text\",class:\"text\",title:\"text\",lang:\"text\",dir:{oneOf:[\"ltr\",\"rtl\",\"auto\"]},hidden:\"text\",tabindex:{oneOf:[\"-1\",\"0\"]},role:\"text\",style:\"style\",translate:{oneOf:[\"yes\",\"no\"]},spellcheck:{oneOf:[\"true\",\"false\"]},draggable:{oneOf:[\"true\",\"false\"]},inert:\"boolean\"},ot={div:T,section:T,article:T,aside:T,header:T,footer:T,nav:T,hgroup:T,search:T,address:T,figure:T,figcaption:T,blockquote:T,p:T,pre:T,hr:On,br:On,wbr:On,h1:T,h2:T,h3:T,h4:T,h5:T,h6:T,span:T,strong:T,em:T,b:T,i:T,u:T,s:T,small:T,mark:T,abbr:T,cite:T,q:T,code:T,kbd:T,samp:T,var:T,sub:T,sup:T,dfn:T,bdi:T,bdo:T,ruby:T,rt:T,rp:T,time:{attributes:{datetime:\"text\"}},data:{attributes:{value:\"text\"}},del:{attributes:{datetime:\"text\"}},ins:{attributes:{datetime:\"text\"}},a:T,ul:T,menu:T,dl:T,dt:T,dd:T,ol:{attributes:{start:\"number\",reversed:\"boolean\",type:{oneOf:[\"1\",\"a\",\"A\",\"i\",\"I\"]}}},li:{attributes:{value:\"number\"}},table:T,caption:T,thead:T,tbody:T,tfoot:T,tr:T,colgroup:{attributes:{span:\"number\"}},col:{attributes:{span:\"number\"},empty:!0},th:{attributes:{colspan:\"number\",rowspan:\"number\",headers:\"text\",scope:{oneOf:[\"row\",\"col\",\"rowgroup\",\"colgroup\"]},abbr:\"text\"}},td:{attributes:{colspan:\"number\",rowspan:\"number\",headers:\"text\"}},details:{attributes:{open:\"boolean\",name:\"text\"}},summary:T,button:{attributes:{type:{oneOf:[\"button\"]},disabled:\"boolean\",name:\"text\",value:\"text\"}},input:{empty:!0,attributes:{type:{oneOf:[\"text\",\"search\",\"number\",\"range\",\"checkbox\",\"radio\",\"date\",\"time\",\"datetime-local\",\"month\",\"week\",\"color\",\"email\",\"tel\",\"url\"]},name:\"text\",value:\"text\",placeholder:\"text\",min:\"text\",max:\"text\",step:\"text\",checked:\"boolean\",disabled:\"boolean\",readonly:\"boolean\",required:\"boolean\",maxlength:\"number\",minlength:\"number\",size:\"number\",pattern:\"text\",multiple:\"boolean\",inputmode:\"text\",enterkeyhint:\"text\"}},select:{attributes:{name:\"text\",disabled:\"boolean\",multiple:\"boolean\",required:\"boolean\",size:\"number\"}},option:{attributes:{value:\"text\",selected:\"boolean\",disabled:\"boolean\",label:\"text\"}},optgroup:{attributes:{label:\"text\",disabled:\"boolean\"}},textarea:{attributes:{name:\"text\",placeholder:\"text\",rows:\"number\",cols:\"number\",disabled:\"boolean\",readonly:\"boolean\",required:\"boolean\",maxlength:\"number\",minlength:\"number\",wrap:{oneOf:[\"soft\",\"hard\",\"off\"]}}},label:{attributes:{for:\"text\"}},fieldset:{attributes:{disabled:\"boolean\",name:\"text\"}},legend:T,output:T,meter:{attributes:{value:\"number\",min:\"number\",max:\"number\",low:\"number\",high:\"number\",optimum:\"number\"}},progress:{attributes:{value:\"number\",max:\"number\"}},img:{empty:!0,attributes:{src:\"image\",alt:\"text\",width:\"number\",height:\"number\",decoding:{oneOf:[\"async\",\"sync\",\"auto\"]}}},\"graview-video\":On},ui=[\"fill\",\"fill-opacity\",\"fill-rule\",\"stroke\",\"stroke-width\",\"stroke-linecap\",\"stroke-linejoin\",\"stroke-dasharray\",\"stroke-dashoffset\",\"stroke-opacity\",\"stroke-miterlimit\",\"opacity\",\"color\",\"display\",\"visibility\",\"transform-origin\",\"clip-path\",\"clip-rule\",\"marker-start\",\"marker-mid\",\"marker-end\",\"font-family\",\"font-size\",\"font-weight\",\"font-style\",\"text-anchor\",\"dominant-baseline\",\"alignment-baseline\",\"letter-spacing\",\"text-decoration\",\"paint-order\",\"vector-effect\",\"shape-rendering\",\"pointer-events\",\"stop-color\",\"stop-opacity\",\"overflow\",\"mask\"],di={id:\"text\",class:\"text\",style:\"style\",lang:\"text\",role:\"text\",tabindex:{oneOf:[\"-1\",\"0\"]},transform:\"geometry\",...Object.fromEntries(ui.map(t=>[t,\"css\"]))},rt={x:\"geometry\",y:\"geometry\",width:\"geometry\",height:\"geometry\"},An={viewBox:\"geometry\",preserveAspectRatio:\"geometry\"},Io={gradientUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},gradientTransform:\"geometry\",spreadMethod:{oneOf:[\"pad\",\"reflect\",\"repeat\"]},href:\"fragment\"},Rn={svg:{attributes:{...rt,...An}},g:T,defs:T,symbol:{attributes:{...rt,...An,refX:\"geometry\",refY:\"geometry\"}},use:{attributes:{...rt,href:\"fragment\"}},title:T,desc:T,path:{attributes:{d:\"geometry\",pathLength:\"number\"}},rect:{attributes:{...rt,rx:\"geometry\",ry:\"geometry\",pathLength:\"number\"}},circle:{attributes:{cx:\"geometry\",cy:\"geometry\",r:\"geometry\",pathLength:\"number\"}},ellipse:{attributes:{cx:\"geometry\",cy:\"geometry\",rx:\"geometry\",ry:\"geometry\",pathLength:\"number\"}},line:{attributes:{x1:\"geometry\",y1:\"geometry\",x2:\"geometry\",y2:\"geometry\",pathLength:\"number\"}},polyline:{attributes:{points:\"geometry\",pathLength:\"number\"}},polygon:{attributes:{points:\"geometry\",pathLength:\"number\"}},text:{attributes:{x:\"geometry\",y:\"geometry\",dx:\"geometry\",dy:\"geometry\",rotate:\"geometry\",textLength:\"geometry\",lengthAdjust:{oneOf:[\"spacing\",\"spacingAndGlyphs\"]}}},tspan:{attributes:{x:\"geometry\",y:\"geometry\",dx:\"geometry\",dy:\"geometry\",rotate:\"geometry\",textLength:\"geometry\"}},textPath:{attributes:{href:\"fragment\",startOffset:\"geometry\",method:{oneOf:[\"align\",\"stretch\"]},spacing:{oneOf:[\"auto\",\"exact\"]},side:{oneOf:[\"left\",\"right\"]}}},linearGradient:{attributes:{x1:\"geometry\",y1:\"geometry\",x2:\"geometry\",y2:\"geometry\",...Io}},radialGradient:{attributes:{cx:\"geometry\",cy:\"geometry\",r:\"geometry\",fx:\"geometry\",fy:\"geometry\",fr:\"geometry\",...Io}},stop:{attributes:{offset:\"geometry\"}},clipPath:{attributes:{clipPathUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]}}},mask:{attributes:{...rt,maskUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},maskContentUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]}}},pattern:{attributes:{...rt,...An,patternUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},patternContentUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},patternTransform:\"geometry\",href:\"fragment\"}},marker:{attributes:{...An,markerWidth:\"geometry\",markerHeight:\"geometry\",refX:\"geometry\",refY:\"geometry\",orient:\"geometry\",markerUnits:{oneOf:[\"strokeWidth\",\"userSpaceOnUse\"]}}}};var Do=[\"alert\",\"alertdialog\",\"dialog\",\"banner\",\"main\",\"navigation\",\"contentinfo\",\"complementary\",\"search\",\"form\",\"region\",\"application\",\"status\",\"log\",\"marquee\",\"timer\"],kt={nav:\"div\",header:\"div\",footer:\"div\",aside:\"div\",search:\"div\",output:\"span\"},kn={section:[\"aria-label\",\"aria-labelledby\",\"title\"]};function fi(t){return/^aria-[a-z]+$/.test(t)}function mi(t){return/^data-[a-z0-9][a-z0-9_.-]*$/.test(t)}var Mo=[\"all\",\"display\",\"position\",\"top\",\"right\",\"bottom\",\"left\",\"inset\",\"inset-block\",\"inset-inline\",\"inset-block-start\",\"inset-block-end\",\"inset-inline-start\",\"inset-inline-end\",\"width\",\"height\",\"min-width\",\"min-height\",\"max-width\",\"max-height\",\"inline-size\",\"block-size\",\"min-inline-size\",\"min-block-size\",\"max-inline-size\",\"max-block-size\",\"margin\",\"margin-top\",\"margin-right\",\"margin-bottom\",\"margin-left\",\"margin-block\",\"margin-inline\",\"margin-block-start\",\"margin-block-end\",\"margin-inline-start\",\"margin-inline-end\",\"padding\",\"padding-top\",\"padding-right\",\"padding-bottom\",\"padding-left\",\"padding-block\",\"padding-inline\",\"padding-block-start\",\"padding-block-end\",\"padding-inline-start\",\"padding-inline-end\",\"box-sizing\",\"overflow\",\"overflow-x\",\"overflow-y\",\"overflow-wrap\",\"float\",\"clear\",\"z-index\",\"aspect-ratio\",\"object-fit\",\"object-position\",\"vertical-align\",\"isolation\",\"contain\",\"container\",\"container-type\",\"container-name\",\"content-visibility\",\"flex\",\"flex-direction\",\"flex-wrap\",\"flex-flow\",\"flex-grow\",\"flex-shrink\",\"flex-basis\",\"order\",\"grid\",\"grid-template\",\"grid-template-columns\",\"grid-template-rows\",\"grid-template-areas\",\"grid-auto-columns\",\"grid-auto-rows\",\"grid-auto-flow\",\"grid-area\",\"grid-column\",\"grid-row\",\"grid-column-start\",\"grid-column-end\",\"grid-row-start\",\"grid-row-end\",\"gap\",\"row-gap\",\"column-gap\",\"align-items\",\"align-content\",\"align-self\",\"justify-items\",\"justify-content\",\"justify-self\",\"place-items\",\"place-content\",\"place-self\",\"columns\",\"column-count\",\"column-width\",\"column-rule\",\"column-rule-color\",\"column-rule-style\",\"column-rule-width\",\"column-span\",\"column-fill\",\"color\",\"background\",\"background-color\",\"background-image\",\"background-position\",\"background-position-x\",\"background-position-y\",\"background-size\",\"background-repeat\",\"background-origin\",\"background-clip\",\"background-attachment\",\"background-blend-mode\",\"border\",\"border-top\",\"border-right\",\"border-bottom\",\"border-left\",\"border-block\",\"border-inline\",\"border-block-start\",\"border-block-end\",\"border-inline-start\",\"border-inline-end\",\"border-width\",\"border-style\",\"border-color\",\"border-top-width\",\"border-right-width\",\"border-bottom-width\",\"border-left-width\",\"border-top-style\",\"border-right-style\",\"border-bottom-style\",\"border-left-style\",\"border-top-color\",\"border-right-color\",\"border-bottom-color\",\"border-left-color\",\"border-radius\",\"border-top-left-radius\",\"border-top-right-radius\",\"border-bottom-right-radius\",\"border-bottom-left-radius\",\"border-start-start-radius\",\"border-start-end-radius\",\"border-end-start-radius\",\"border-end-end-radius\",\"border-collapse\",\"border-spacing\",\"outline\",\"outline-width\",\"outline-style\",\"outline-color\",\"outline-offset\",\"box-shadow\",\"opacity\",\"visibility\",\"mix-blend-mode\",\"filter\",\"backdrop-filter\",\"clip-path\",\"accent-color\",\"caret-color\",\"color-scheme\",\"appearance\",\"-webkit-appearance\",\"font\",\"font-family\",\"font-size\",\"font-weight\",\"font-style\",\"font-stretch\",\"font-variant\",\"font-variant-numeric\",\"font-variant-caps\",\"font-variant-ligatures\",\"font-feature-settings\",\"font-variation-settings\",\"font-kerning\",\"font-optical-sizing\",\"font-size-adjust\",\"font-synthesis\",\"line-height\",\"letter-spacing\",\"word-spacing\",\"text-align\",\"text-align-last\",\"text-indent\",\"text-transform\",\"text-decoration\",\"text-decoration-line\",\"text-decoration-color\",\"text-decoration-style\",\"text-decoration-thickness\",\"text-underline-offset\",\"text-underline-position\",\"text-shadow\",\"text-overflow\",\"text-wrap\",\"text-wrap-mode\",\"text-wrap-style\",\"white-space\",\"white-space-collapse\",\"word-break\",\"line-break\",\"hyphens\",\"tab-size\",\"direction\",\"unicode-bidi\",\"writing-mode\",\"text-orientation\",\"text-rendering\",\"-webkit-font-smoothing\",\"-webkit-line-clamp\",\"-webkit-box-orient\",\"line-clamp\",\"-webkit-text-fill-color\",\"-webkit-background-clip\",\"list-style\",\"list-style-type\",\"list-style-position\",\"content\",\"quotes\",\"counter-reset\",\"counter-increment\",\"counter-set\",\"table-layout\",\"caption-side\",\"empty-cells\",\"transform\",\"transform-origin\",\"transform-box\",\"transform-style\",\"translate\",\"rotate\",\"scale\",\"perspective\",\"perspective-origin\",\"backface-visibility\",\"transition\",\"transition-property\",\"transition-duration\",\"transition-timing-function\",\"transition-delay\",\"transition-behavior\",\"animation\",\"animation-name\",\"animation-duration\",\"animation-timing-function\",\"animation-delay\",\"animation-iteration-count\",\"animation-direction\",\"animation-fill-mode\",\"animation-play-state\",\"animation-composition\",\"will-change\",\"cursor\",\"pointer-events\",\"user-select\",\"-webkit-user-select\",\"touch-action\",\"resize\",\"scroll-behavior\",\"overscroll-behavior\",\"overscroll-behavior-x\",\"overscroll-behavior-y\",\"scroll-snap-type\",\"scroll-snap-align\",\"scroll-snap-stop\",\"scroll-margin\",\"scroll-padding\",\"scrollbar-width\",\"scrollbar-color\",\"scrollbar-gutter\",\"fill\",\"fill-opacity\",\"fill-rule\",\"stroke\",\"stroke-width\",\"stroke-linecap\",\"stroke-linejoin\",\"stroke-dasharray\",\"stroke-dashoffset\",\"stroke-opacity\",\"stroke-miterlimit\",\"stop-color\",\"stop-opacity\",\"clip-rule\",\"marker\",\"marker-start\",\"marker-mid\",\"marker-end\",\"paint-order\",\"vector-effect\",\"shape-rendering\",\"text-anchor\",\"dominant-baseline\",\"alignment-baseline\",\"r\",\"cx\",\"cy\",\"rx\",\"ry\",\"x\",\"y\",\"d\",\"mask\"],Lo=[\"var\",\"env\",\"calc\",\"min\",\"max\",\"clamp\",\"round\",\"mod\",\"rem\",\"abs\",\"sign\",\"sin\",\"cos\",\"tan\",\"asin\",\"acos\",\"atan\",\"atan2\",\"pow\",\"sqrt\",\"hypot\",\"log\",\"exp\",\"rgb\",\"rgba\",\"hsl\",\"hsla\",\"hwb\",\"lab\",\"lch\",\"oklab\",\"oklch\",\"color\",\"color-mix\",\"light-dark\",\"linear-gradient\",\"radial-gradient\",\"conic-gradient\",\"repeating-linear-gradient\",\"repeating-radial-gradient\",\"repeating-conic-gradient\",\"translate\",\"translatex\",\"translatey\",\"translatez\",\"translate3d\",\"rotate\",\"rotatex\",\"rotatey\",\"rotatez\",\"rotate3d\",\"scale\",\"scalex\",\"scaley\",\"scalez\",\"scale3d\",\"skew\",\"skewx\",\"skewy\",\"matrix\",\"matrix3d\",\"perspective\",\"cubic-bezier\",\"steps\",\"linear\",\"repeat\",\"minmax\",\"fit-content\",\"blur\",\"brightness\",\"contrast\",\"drop-shadow\",\"grayscale\",\"hue-rotate\",\"invert\",\"saturate\",\"sepia\",\"opacity\",\"circle\",\"ellipse\",\"inset\",\"polygon\",\"path\",\"xywh\",\"rect\",\"counter\",\"counters\"],Ho=[\"fill\",\"stroke\",\"clip-path\",\"mask\",\"marker\",\"marker-start\",\"marker-mid\",\"marker-end\"],$o=[\"media\",\"supports\",\"container\",\"keyframes\"],Uo={position:[\"static\",\"relative\",\"absolute\",\"sticky\"],all:[],appearance:[\"auto\",\"none\",\"menulist-button\",\"textfield\"],\"-webkit-appearance\":[\"auto\",\"none\",\"menulist-button\",\"textfield\"]},Vo=[\"host\",\"host-context\",\"slotted\",\"part\",\"backdrop\",\"picker\",\"view-transition\",\"view-transition-group\",\"view-transition-image-pair\",\"view-transition-old\",\"view-transition-new\"],yr=64e3,br=4e3,jo=1e5,Ct=512e3,Er=1e4,Go=\"http://www.w3.org/1999/xhtml\",zo=\"http://www.w3.org/2000/svg\",pi=new Map(Object.keys(Rn).map(t=>[t.toLowerCase(),t]));function Cn(t){return pi.get(t.toLowerCase())}function Pn(t,e,n){let r=n.toLowerCase(),o=t===\"html\"?[ot[e]?.attributes,ci]:[Rn[e]?.attributes,di],s=t===\"svg\"&&r===\"xlink:href\"?\"href\":r;for(let i of o)if(i){for(let[l,c]of Object.entries(i))if(l.toLowerCase()===s)return{name:l,kind:c}}if(fi(r)||mi(r))return{name:r,kind:\"text\"}}function Fo(t){if(typeof t==\"string\")return{type:\"navigate\",to:t};let{place:e,record:n,where:r,section:o}=t??{},s={...r===void 0?{}:{where:r},...o===void 0?{}:{section:String(o)}};return typeof e==\"string\"?{type:\"navigate\",place:e,...s}:typeof n==\"string\"?{type:\"navigate\",to:n,...s}:void 0}var Bo=\"~\",_n=t=>typeof t==\"object\"&&t!==null&&!Array.isArray(t),ue=(t,e=0)=>{if(t===null||typeof t==\"string\"||typeof t==\"number\"||typeof t==\"boolean\"||t===void 0)return t;if(!(e>64||typeof t!=\"object\"))return Array.isArray(t)?t.map(n=>ue(n,e+1)):Object.fromEntries(Object.entries(t).map(([n,r])=>[n,ue(r,e+1)]))};function Yo(){let t=new Map,e=new Map,n=new Map([[Bo,{children:[],listeners:new Map}]]),r=0,o=u=>{let h=e.get(u);return h===void 0&&(h=r+=1,e.set(u,h),t.set(h,{listener:u,count:0})),t.get(h).count+=1,h},s=u=>{let h=t.get(u);h&&(h.count-=1,!(h.count>0)&&(t.delete(u),e.delete(h.listener)))},i=u=>{let h=n.get(u);if(h){n.delete(u);for(let w of h.listeners.values())s(w);for(let w of h.children)i(w)}},l=(u,h,w=0)=>{if(!_n(u)||w>64)return ue(u);let d=typeof u.id==\"string\"?u.id:void 0,E=h&&d!==void 0&&d!==Bo;E&&i(d);let N={children:[],listeners:new Map};E&&n.set(d,N);let S={};for(let[y,a]of Object.entries(u))y===\"children\"&&Array.isArray(a)?S[y]=a.map(g=>{let p=l(g,E,w+1);return E&&_n(g)&&typeof g.id==\"string\"&&N.children.push(g.id),p}):y===\"eventListeners\"&&_n(a)?S[y]=Object.fromEntries(Object.entries(a).map(([g,p])=>{if(typeof p!=\"function\"||!E)return[g,void 0];let m=o(p);return N.listeners.set(g,m),[g,{listener:m}]})):S[y]=ue(a,w+1);return S},c=u=>{if(!Array.isArray(u))return ue(u);let[h,w]=u,d=typeof w==\"string\"?n.get(w):void 0;if(h===0){let E=l(u[2],d!==void 0),N=_n(u[2])?u[2].id:void 0;if(d&&typeof N==\"string\"&&n.has(N)){let S=Number(u[3]);d.children.splice(Number.isInteger(S)&&S>=0&&S<=d.children.length?S:d.children.length,0,N)}return[h,ue(w),E,ue(u[3])]}if(h===1){let E=Number(u[2]);return d&&Number.isInteger(E)&&E>=0&&E<d.children.length&&i(d.children.splice(E,1)[0]),ue(u)}if(h===3&&u[4]===3){let E=String(u[2]),N=u[3],S=d&&typeof N==\"function\"?o(N):void 0,y=d?.listeners.get(E);return y!==void 0&&s(y),S===void 0?d?.listeners.delete(E):d.listeners.set(E,S),[h,ue(w),E,S===void 0?void 0:{listener:S},3]}return ue(u)};return{encode:u=>u.map(c),listener:u=>t.get(u)?.listener,get listening(){return t.size},get nodes(){return n.size-1}}}var Nr=\"graview-view-root\",hi=t=>t.replace(/&/g,\"&\").replace(/</g,\"<\").replace(/>/g,\">\").replace(/\"/g,\""\").replace(/'/g,\"'\"),gi=t=>Object.freeze({html:t,toString:()=>t}),qo=t=>typeof t==\"object\"&&t!==null&&typeof t.html==\"string\"&&Object.isFrozen(t),Wo=t=>t==null||t===!1?\"\":Array.isArray(t)?t.map(Wo).join(\"\"):qo(t)?t.html:hi(String(t));function Xo(t){customElements.get(Nr)||customElements.define(Nr,Rt);let e=Event,n=Yo(),r=new Set,o=new Set,s,i=[],l=new Set;for(let f of[\"closest\",\"matches\",\"dataset\"]){let x=()=>{throw new TypeError(`A view's element has no ${f}: graview.on hands event.element, the element its selector matched; read event.element.getAttribute(\"data-\\u2026\").`)};f in Element.prototype||Object.defineProperty(Element.prototype,f,f===\"dataset\"?{get:x}:{value:x})}let c=document.createElement(Nr),u=f=>{let x=O=>{for(let R of Array.from(O.childNodes)){if(R.nodeType!==1)continue;if(ie(R)===f)return R;let _=x(R);if(_)return _}};return x(c)},h=f=>{let x=u(f.target);if(!x)return;let O=new e(f.event,{bubbles:!0});for(let R of[\"value\",\"checked\",\"key\",\"pressed\",\"files\",\"refused\"])f[R]!==void 0&&Object.defineProperty(O,R,{value:f[R],enumerable:!0});x.dispatchEvent(O);for(let R of o){if(R.type!==f.event)continue;let _;try{_=new Set(Array.from(c.querySelectorAll(R.selector)))}catch{continue}for(let I=x;I&&I!==c;I=I.parentNode)if(_.has(I)){R.listener(Object.freeze({type:f.event,target:x,element:I,...f.value!==void 0?{value:f.value}:{},...f.checked!==void 0?{checked:f.checked}:{},...f.key!==void 0?{key:f.key}:{},...f.pressed!==void 0?{pressed:f.pressed}:{},...f.files!==void 0?{files:f.files}:{},...f.refused!==void 0?{refused:f.refused}:{}}));break}}},w=f=>{if(f.type===\"dom-event\"&&typeof f.target==\"string\")return h(f);if(f.type===\"notice\")return t.warn(f.text);if(f.type!==\"props\")return;s=f.props;let x=t.now();for(let _ of r)try{_(f.props)}catch(I){t.threw(I)}let O=t.now()-x,R=f.push;typeof R==\"number\"&&t.microtask(()=>t.microtask(()=>t.send({type:\"pushed\",push:R,ms:O})))},d;c.connect({mutate(f){d||(d=[],t.microtask(()=>{let x=d??[];d=void 0,t.send({type:\"render\",records:n.encode(x)})})),d.push(...f)},call:()=>{}});let E=f=>f.nodeType===1?f.getAttribute(\"data-key\")??f.getAttribute(\"id\"):null,N=(f,x)=>f.nodeType===x.nodeType&&(f.nodeType!==1||f.localName===x.localName&&f.namespaceURI===x.namespaceURI&&E(f)===E(x));function S(f,x){let O=Array.from(x.childNodes),R=0;for(let _ of O){let I=f.childNodes[R]??null;if(I&&N(I,_)){y(I,_),R+=1;continue}if(E(_)!==null){let be=Array.from(f.childNodes).slice(R+1).find(dt=>N(dt,_));if(be){f.insertBefore(be,I),y(be,_),R+=1;continue}}f.insertBefore(_,I),R+=1}for(;f.childNodes.length>R;)f.removeChild(f.lastChild)}function y(f,x){if(f.nodeType!==1){f.data!==x.data&&(f.data=x.data);return}let O=f,R=x,_=a(O);for(let I of O.getAttributeNames())R.hasAttribute(I)||(O.removeAttribute(I),_&&Ae(O,I,void 0));for(let I of R.getAttributeNames()){let de=R.getAttribute(I);O.getAttribute(I)!==de&&O.setAttribute(I,de),_&&Ae(O,I,de)}S(O,R)}let a=f=>f.localName.includes(\"-\");function g(f){for(let x of Array.from(f.childNodes)){if(x.nodeType!==1)continue;let O=x;if(a(O))for(let R of O.getAttributeNames())Ae(O,R,O.getAttribute(R)??void 0);g(O)}}function p(f,x,O){for(let R of Array.from(f.childNodes)){if(R.nodeType!==1)continue;let _=R,I=_.localName,de=x||I.toLowerCase()===\"svg\",be=de?Cn(I):Object.prototype.hasOwnProperty.call(ot,I.toLowerCase())?I.toLowerCase():void 0;if(!be){O.add(`<${I}>`);continue}for(let dt of _.getAttributeNames())(!Pn(de?\"svg\":\"html\",be,dt)||!de&&kn[be]?.includes(dt.toLowerCase()))&&O.add(`${be} ${dt}`);p(_,de,O)}}function m(f){let x=document.createElement(\"div\"),O=Array.isArray(f)?f:[f];for(let _ of O)if(_!=null)if(typeof _==\"string\"||qo(_)){let I=document.createElement(\"div\");I.innerHTML=typeof _==\"string\"?_:_.html,x.append(...Array.from(I.childNodes))}else x.append(_);let R=new Set;p(x,!1,R),i=[...R],i.length>0&&t.warn(`The host will not draw: ${i.join(\", \")}`),g(x),S(c,x)}let b;return{view:Object.freeze({get props(){return s},onProps(f){return r.add(f),s&&f(s),()=>void r.delete(f)},render:m,style(f){typeof f!=\"string\"||f===b||(b=f,t.send({type:\"style\",css:f}))},on(f,x,O){let R={type:f,selector:x,listener:O};return o.add(R),typeof f==\"string\"&&!l.has(f)&&(l.add(f),t.send({type:\"hears\",events:[f]})),()=>void o.delete(R)},act:(f,x={})=>t.act(f,x),navigate(f){if(typeof f==\"string\")return t.navigate(f);let x=Fo(f);x&&t.send(x)},html(f,...x){return gi(f.reduce((O,R,_)=>O+R+(_<x.length?Wo(x[_]):\"\"),\"\"))},get refused(){return i},get hardening(){return t.hardening()}}),hear:w}}var Ko=t=>t.toLowerCase().replace(/[^a-z0-9]+/g,\"-\").replace(/^-|-$/g,\"\");function Pt(t,e){let n=t.find(s=>s.as===e);if(n)return n;let r=e.trim().toLowerCase(),o=Ko(e);return t.find(s=>s.title!==void 0&&s.title.trim().toLowerCase()===r)??(o?t.find(s=>s.as===o||s.title!==void 0&&Ko(s.title)===o):void 0)}var st=t=>` Its places: ${t.map(e=>typeof e==\"string\"?`\"${e}\"`:e.title&&e.title!==e.as?`\"${e.as}\" (${e.title})`:`\"${e.as}\"`).join(\", \")||\"none\"}.`,wr=t=>`\"${t.length>80?`${t.slice(0,79)}\\u2026`:t}\"`;var Y=t=>t>=48&&t<=57,Zo=t=>Y(t)||t>=65&&t<=70||t>=97&&t<=102,Ar=t=>t>=65&&t<=90||t>=97&&t<=122,Rr=t=>t>=128,In=t=>Ar(t)||Rr(t)||t===95,Jo=t=>In(t)||Y(t)||t===45,Qo=t=>t===10,ge=t=>t===10||t===9||t===32,yi=t=>t>=0&&t<=8||t===11||t>=14&&t<=31||t===127,ae=-1;function bi(t){let e=[];for(let n=0;n<t.length;n+=1){let r=t.codePointAt(n);r>65535&&(n+=1),r===13?(t.charCodeAt(n+1)===10&&(n+=1),r=10):r===12?r=10:(r===0||r>=55296&&r<=57343)&&(r=65533),e.push(r)}return e}function Ei(t){let e=bi(t),n=0,r=(y=0)=>n+y<e.length?e[n+y]:ae,o=[],s=(y,a)=>y===92&&a!==10&&a!==ae,i=(y,a,g)=>y===45?In(a)||a===45||s(a,g):In(y)?!0:s(y,a),l=(y,a,g)=>y===43||y===45?Y(a)||a===46&&Y(g):Y(y===46?a:y),c=()=>{let y=r();if(n+=1,y===ae)return 65533;if(Zo(y)){let a=String.fromCodePoint(y);for(;a.length<6&&Zo(r());)a+=String.fromCodePoint(r()),n+=1;ge(r())&&(n+=1);let g=parseInt(a,16);return g===0||g>=55296&&g<=57343||g>1114111?65533:g}return y},u=()=>{let y=\"\";for(;;){let a=r();if(Jo(a))y+=String.fromCodePoint(a),n+=1;else if(s(a,r(1)))n+=1,y+=String.fromCodePoint(c());else return y}},h=()=>{let y=\"\";for((r()===43||r()===45)&&(y+=String.fromCodePoint(e[n++]));Y(r());)y+=String.fromCodePoint(e[n++]);if(r()===46&&Y(r(1)))for(y+=String.fromCodePoint(e[n++],e[n++]);Y(r());)y+=String.fromCodePoint(e[n++]);if((r()===69||r()===101)&&(Y(r(1))||(r(1)===43||r(1)===45)&&Y(r(2))))for(y+=String.fromCodePoint(e[n++]),Y(r())||(y+=String.fromCodePoint(e[n++]));Y(r());)y+=String.fromCodePoint(e[n++]);return y},w=()=>{let y=h();return i(r(),r(1),r(2))?{type:\"dimension\",repr:y,unit:u()}:r()===37?(n+=1,{type:\"percentage\",repr:y}):{type:\"number\",repr:y}},d=()=>{for(;;){let y=r();if(n+=1,y===41||y===ae)return;s(y,r())&&c()}},E=()=>{let y=\"\";for(;ge(r());)n+=1;for(;;){let a=r();if(n+=1,a===41)return{type:\"url\",value:y};if(a===ae)return{type:\"url\",value:y};if(ge(a)){for(;ge(r());)n+=1;return r()===41||r()===ae?(r()===41&&(n+=1),{type:\"url\",value:y}):(d(),{type:\"bad-url\"})}if(a===34||a===39||a===40||yi(a))return d(),{type:\"bad-url\"};if(a===92){if(s(a,r()))y+=String.fromCodePoint(c());else return d(),{type:\"bad-url\"};continue}y+=String.fromCodePoint(a)}},N=()=>{let y=u();if(y.toLowerCase()===\"url\"&&r()===40){for(n+=1;ge(r())&&ge(r(1));)n+=1;let a=ge(r())?r(1):r();return a===34||a===39?{type:\"function\",value:y}:E()}return r()===40?(n+=1,{type:\"function\",value:y}):{type:\"ident\",value:y}},S=y=>{let a=\"\";for(;;){let g=r();if(n+=1,g===y||g===ae)return{type:\"string\",value:a};if(Qo(g))return n-=1,{type:\"bad-string\"};if(g===92){if(r()===ae)continue;if(Qo(r())){n+=1;continue}a+=String.fromCodePoint(c());continue}a+=String.fromCodePoint(g)}};for(;;){for(;r()===47&&r(1)===42;){for(n+=2;r()!==ae&&!(r()===42&&r(1)===47);)n+=1;r()!==ae&&(n+=2)}let y=r();if(y===ae)return o;if(ge(y)){for(;ge(r());)n+=1;o.push({type:\"whitespace\"});continue}switch(n+=1,y){case 34:case 39:o.push(S(y));continue;case 35:if(Jo(r())||s(r(),r(1))){let a=i(r(),r(1),r(2));o.push({type:\"hash\",value:u(),id:a})}else o.push({type:\"delim\",value:\"#\"});continue;case 40:o.push({type:\"(\"});continue;case 41:o.push({type:\")\"});continue;case 43:case 46:l(y,r(),r(1))?(n-=1,o.push(w())):o.push({type:\"delim\",value:String.fromCodePoint(y)});continue;case 44:o.push({type:\",\"});continue;case 45:l(y,r(),r(1))?(n-=1,o.push(w())):r()===45&&r(1)===62?(n+=2,o.push({type:\"CDC\"})):i(y,r(),r(1))?(n-=1,o.push(N())):o.push({type:\"delim\",value:\"-\"});continue;case 58:o.push({type:\":\"});continue;case 59:o.push({type:\";\"});continue;case 60:r()===33&&r(1)===45&&r(2)===45?(n+=3,o.push({type:\"CDO\"})):o.push({type:\"delim\",value:\"<\"});continue;case 64:i(r(),r(1),r(2))?o.push({type:\"at-keyword\",value:u()}):o.push({type:\"delim\",value:\"@\"});continue;case 91:o.push({type:\"[\"});continue;case 92:s(y,r())?(n-=1,o.push(N())):o.push({type:\"delim\",value:\"\\\\\"});continue;case 93:o.push({type:\"]\"});continue;case 123:o.push({type:\"{\"});continue;case 125:o.push({type:\"}\"});continue;default:Y(y)?(n-=1,o.push(w())):In(y)?(n-=1,o.push(N())):o.push({type:\"delim\",value:String.fromCodePoint(y)})}}}var os={\"{\":\"}\",\"[\":\"]\",\"(\":\")\"},ss=32,xr=class{constructor(e){this.tokens=e}i=0;peek(){return this.tokens[this.i]}next(){return this.tokens[this.i++]}};function is(t,e){let n=t.next();return n.type===\"{\"||n.type===\"[\"||n.type===\"(\"?{type:\"block\",open:n.type,value:es(t,os[n.type],e+1)}:n.type===\"function\"?{type:\"func\",name:n.value,value:es(t,\")\",e+1)}:n}function es(t,e,n){let r=[];for(;;){let o=t.peek();if(!o)return r;if(o.type===e)return t.next(),r;if(n>ss){t.next(),r.push({type:\"bad-string\"});continue}r.push(is(t,n))}}function it(t,e){let n=[],r=0;for(;r<t.length;){let o=t[r];if(o.type===\"whitespace\"||e&&(o.type===\"CDO\"||o.type===\"CDC\")){r+=1;continue}if(o.type===\"at-keyword\"){let l=[];r+=1;let c;for(;r<t.length;){let u=t[r];if(r+=1,u.type===\";\")break;if(u.type===\"block\"&&u.open===\"{\"){c=u.value;break}l.push(u)}n.push({type:\"at-rule\",name:o.value,prelude:l,...c?{block:c}:{}});continue}let s=[],i;for(;r<t.length;){let l=t[r];if(r+=1,l.type===\"block\"&&l.open===\"{\"){i=l.value;break}s.push(l)}i&&n.push({type:\"qualified\",prelude:s,block:i})}return n}function kr(t){let e=[],n=0;for(;n<t.length;){let r=t[n];if(r.type===\"whitespace\"||r.type===\";\"){n+=1;continue}if(r.type===\"at-keyword\"){let s=(()=>{for(let i=n+1;i<t.length;i+=1){let l=t[i];if(l.type===\";\"||l.type===\"block\"&&l.open===\"{\")return i+1}return t.length})();e.push(...it(t.slice(n,s),!1)),n=s;continue}if(r.type===\"ident\"){let s=n+1;for(;t[s]?.type===\"whitespace\";)s+=1;if(t[s]?.type===\":\"){let i=s+1;for(;i<t.length&&t[i].type!==\";\";)i+=1;let l=as(r.value,t.slice(s+1,i));if(l.value.some(c=>c.type===\"block\"&&c.open===\"{\")){let c=t.findIndex((u,h)=>h>n&&u.type===\"block\"&&u.open===\"{\");e.push(...it(t.slice(n,c+1),!1)),n=c+1;continue}e.push(l),n=i+1;continue}}let o=n;for(;o<t.length&&!(t[o].type===\"block\"&&t[o].open===\"{\")&&t[o].type!==\";\";)o+=1;o<t.length&&t[o].type===\"block\"&&e.push(...it(t.slice(n,o+1),!1)),n=o+1}return e}function as(t,e){let n=[...e];for(;n[0]?.type===\"whitespace\";)n.shift();for(;n.at(-1)?.type===\"whitespace\";)n.pop();let r=!1,s=n.length-1;if(n[s]?.type===\"ident\"&&n[s].value.toLowerCase()===\"important\"){for(s-=1;n[s]?.type===\"whitespace\";)s-=1;let i=n[s];if(i?.type===\"delim\"&&i.value===\"!\")for(r=!0,n.length=s;n.at(-1)?.type===\"whitespace\";)n.pop()}return{type:\"declaration\",name:t,value:n,important:r}}function Cr(t){let e=new xr(Ei(t)),n=[];for(;e.peek();)n.push(is(e,0));return n}function Dn(t){let e=\"\",n=[...t].map(r=>r.codePointAt(0));return n.forEach((r,o)=>{r===0?e+=\"\\uFFFD\":r>=1&&r<=31||r===127||o===0&&Y(r)||o===1&&Y(r)&&n[0]===45?e+=`\\\\${r.toString(16)} `:o===0&&r===45&&n.length===1?e+=\"\\\\-\":Rr(r)||r===45||r===95||Y(r)||Ar(r)?e+=String.fromCodePoint(r):e+=`\\\\${String.fromCodePoint(r)}`}),e}function Mn(t){let e=\"\";for(let n of t){let r=n.codePointAt(0);Rr(r)||r===45||r===95||Y(r)||Ar(r)?e+=n:r>=1&&r<=31||r===127?e+=`\\\\${r.toString(16)} `:e+=`\\\\${n}`}return e}function vr(t){let e='\"';for(let n of t){let r=n.codePointAt(0);r===0?e+=\"\\uFFFD\":r>=1&&r<=31||r===127||r===60||r===62?e+=`\\\\${r.toString(16)} `:r===34||r===92?e+=`\\\\${n}`:e+=n}return`${e}\"`}function Ni(t){let e=Mn(t);return/^[eE]([0-9]|[+-][0-9])/.test(t)?`\\\\${t.codePointAt(0).toString(16)} ${Mn(t.slice(1))}`:e}var ts=t=>{switch(t.type){case\"ident\":case\"url\":case\"bad-url\":case\"number\":case\"percentage\":case\"dimension\":case\"CDC\":case\"hash\":case\"at-keyword\":return t.type;case\"func\":case\"function\":return\"function\";case\"block\":return t.open===\"(\"?\"(\":\"other\";case\"(\":return\"(\";case\"delim\":return`delim${t.value}`;default:return\"other\"}};function wi(t,e){let n=[\"ident\",\"function\",\"url\",\"bad-url\",\"delim-\",\"number\",\"percentage\",\"dimension\",\"CDC\"];return t===\"ident\"?[...n,\"(\"].includes(e):t===\"at-keyword\"||t===\"hash\"||t===\"dimension\"||t===\"delim#\"||t===\"delim-\"?n.includes(e):t===\"number\"?[\"ident\",\"function\",\"url\",\"bad-url\",\"number\",\"percentage\",\"dimension\",\"delim%\"].includes(e):t===\"delim@\"?[\"ident\",\"function\",\"url\",\"bad-url\",\"delim-\",\"CDC\"].includes(e):t===\"delim.\"||t===\"delim+\"?[\"number\",\"percentage\",\"dimension\"].includes(e):t===\"delim/\"?e===\"delim*\":!1}function Ti(t){switch(t.type){case\"whitespace\":return\" \";case\"ident\":return Dn(t.value);case\"at-keyword\":return`@${Dn(t.value)}`;case\"hash\":return`#${Mn(t.value)}`;case\"string\":return vr(t.value);case\"url\":return`url(${vr(t.value)})`;case\"delim\":return t.value===\"\\\\\"?`\\\\\n`:t.value;case\"CDO\":return\"<!--\";case\"CDC\":return\"-->\";case\"number\":return t.repr;case\"percentage\":return`${t.repr}%`;case\"dimension\":return`${t.repr}${Ni(t.unit)}`;case\"func\":return`${Dn(t.name)}(${at(t.value)})`;case\"block\":return`${t.open}${at(t.value)}${os[t.open]}`;case\":\":case\";\":case\",\":case\"[\":case\"]\":case\"(\":case\")\":case\"{\":case\"}\":return t.type;default:return\"\"}}function at(t){let e=\"\",n;for(let r of t)r.type===\"whitespace\"&&n?.type===\"whitespace\"||(n&&wi(ts(n),ts(r))&&(e+=\"/**/\"),e+=Ti(r),n=r);return e}var xi=new Set(Mo),ls=new Set(Lo),ns=new Set(Ho),vi=new Set($o),Si=new Set(Vo),rs=/^#[A-Za-z_][A-Za-z0-9_.:-]*$/,ye=t=>t.replace(/[A-Z]/g,e=>e.toLowerCase()),Oi=t=>ye(t);function Sr(t,e,n){let r=[];for(let o of e){if(o.type===\"bad-url\"||o.type===\"bad-string\"){n({reason:\"unreadable\",...t?{name:t}:{}});return}if(o.type===\"url\"){if(t&&ns.has(t)&&rs.test(o.value)){r.push({type:\"func\",name:\"url\",value:[{type:\"string\",value:o.value}]});continue}n({reason:\"url\",...t?{name:t}:{}});return}if(o.type===\"func\"){let s=ye(o.name);if(s===\"url\"||s===\"src\"){let l=o.value.filter(u=>u.type!==\"whitespace\"),c=l[0];if(s===\"url\"&&l.length===1&&c?.type===\"string\"&&t&&ns.has(t)&&rs.test(c.value)){r.push({type:\"func\",name:\"url\",value:[{type:\"string\",value:c.value}]});continue}n({reason:\"url\",...t?{name:t}:{}});return}if(!ls.has(s)){n({reason:\"function\",name:s});return}let i=Sr(t,o.value,n);if(!i)return;s===\"var\"?r.push({type:\"whitespace\"},{type:\"func\",name:s,value:i},{type:\"whitespace\"}):r.push({type:\"func\",name:s,value:i});continue}if(o.type===\"block\"){if(o.open===\"{\"||o.open===\"(\"&&r.at(-1)?.type===\"ident\"){n({reason:\"unreadable\",...t?{name:t}:{}});return}let s=Sr(t,o.value,n);if(!s)return;r.push({type:\"block\",open:o.open,value:s});continue}if(o.type===\"at-keyword\"||o.type===\"CDO\"||o.type===\"CDC\"||o.type===\"{\"||o.type===\"}\"||o.type===\";\"||o.type===\"delim\"&&o.value===\"\\\\\"){n({reason:\"unreadable\",...t?{name:t}:{}});return}r.push(o)}return r}function Hn(t,e){let n=t.name.startsWith(\"--\"),r=n?t.name:Oi(t.name);if(!n&&!xi.has(r)){e({reason:\"property\",name:r});return}let o=Uo[r];if(o){let l=t.value.filter(h=>h.type!==\"whitespace\"),c=l[0],u=l.length===1&&c?.type===\"ident\"?ye(c.value):void 0;if(!u||![...o,\"inherit\",\"initial\",\"unset\",\"revert\"].includes(u)){e({reason:\"value\",name:r});return}return`${r}: ${u}${t.important?\" !important\":\"\"}`}let s=Sr(n?void 0:r,t.value,e);if(!s)return;let i=at(s).trim();return`${n?`--${Mn(t.name.slice(2))}`:r}: ${i}${t.important?\" !important\":\"\"}`}function cs(t,e){let n=r=>{for(let o=0;o<r.length;o+=1){let s=r[o];if(o>0&&r[o-1].type===\":\"&&(s.type===\"ident\"||s.type===\"func\")){let l=ye(s.type===\"ident\"?s.value:s.name);if(Si.has(l)||l.startsWith(\"-webkit-\")||l.startsWith(\"-moz-\"))return e({reason:\"selector\",name:l}),!1}if(s.type===\"url\"||s.type===\"bad-url\"||s.type===\"bad-string\"||s.type===\"at-keyword\"||s.type===\"CDO\"||s.type===\"CDC\"||s.type===\"block\"&&s.open===\"{\")return e({reason:\"unreadable\",name:\"selector\"}),!1;if(s.type===\"func\"&&!n(s.value)||s.type===\"block\"&&!n(s.value))return!1}return!0};return n(t)}function Tr(t,e,n){let r=[];for(let o of kr(t))if(o.type===\"declaration\"){let s=Hn(o,e);s&&r.push(`${s};`)}else{let s=Ln(o,e,n+1,\"style\");s&&r.push(s)}return r.join(\" \")}function Ai(t,e,n){let r=o=>o.every(s=>{if(s.type===\"url\"||s.type===\"bad-url\"||s.type===\"bad-string\"||s.type===\"block\"&&s.open===\"{\")return n({reason:s.type===\"url\"?\"url\":\"unreadable\",name:`@${e}`}),!1;if(s.type===\"func\"){let i=ye(s.name);return e===\"supports\"&&i===\"selector\"?cs(s.value,n):ls.has(i)?r(s.value):(n({reason:\"function\",name:i}),!1)}if(s.type===\"block\"){if(e===\"supports\"){let i=kr(s.value);if(i.length===1&&i[0].type===\"declaration\")return Hn(i[0],n)!==void 0}return r(s.value)}return!0});return r(t)?at(t).trim():void 0}function Or(t){return t.map((e,n)=>{let r=t[n-1],o=r?.type===\":\"||r?.type===\"delim\"&&(r.value===\".\"||r.value===\"|\");return e.type===\"ident\"&&!o&&Object.prototype.hasOwnProperty.call(kt,ye(e.value))?{type:\"block\",open:\"[\",value:[{type:\"ident\",value:\"data-graview-as\"},{type:\"delim\",value:\"=\"},{type:\"string\",value:ye(e.value)}]}:e.type===\"func\"?{type:\"func\",name:e.name,value:Or(e.value)}:e.type===\"block\"&&e.open===\"(\"?{type:\"block\",open:\"(\",value:Or(e.value)}:e})}function Ln(t,e,n,r){if(n>ss){e({reason:\"unreadable\",name:\"nesting\"});return}if(t.type===\"qualified\"){if(r===\"keyframes\"){if(!t.prelude.every(h=>h.type===\"whitespace\"||h.type===\",\"||h.type===\"percentage\"||h.type===\"ident\"&&[\"from\",\"to\"].includes(ye(h.value)))){e({reason:\"unreadable\",name:\"keyframe\"});return}return`${at(t.prelude).trim()} { ${Tr(t.block,e,n)} }`}if(!cs(t.prelude,e))return;let c=at(Or(t.prelude)).trim();if(c===\"\"){e({reason:\"unreadable\",name:\"selector\"});return}return`${c} { ${Tr(t.block,e,n)} }`}let o=ye(t.name),s=o===\"-webkit-keyframes\"?\"keyframes\":o;if(!vi.has(s)||r===\"keyframes\"){e({reason:\"at-rule\",name:`@${o}`});return}if(!t.block){e({reason:\"unreadable\",name:`@${o}`});return}if(s===\"keyframes\"){if(r!==\"sheet\"){e({reason:\"at-rule\",name:\"@keyframes\"});return}let c=t.prelude.filter(d=>d.type!==\"whitespace\"),u=c[0];if(c.length!==1||!u||u.type!==\"ident\"&&u.type!==\"string\"){e({reason:\"unreadable\",name:\"@keyframes\"});return}let h=it(t.block,!1).map(d=>Ln(d,e,n+1,\"keyframes\")).filter(d=>d!==void 0);return`@keyframes ${u.type===\"ident\"?Dn(u.value):vr(u.value)} { ${h.join(\" \")} }`}let i=Ai(t.prelude,s,e);if(i===void 0)return;let l=r===\"style\"?Tr(t.block,e,n):it(t.block,!1).map(c=>Ln(c,e,n+1,\"sheet\")).filter(c=>c!==void 0).join(\" \");return`@${s} ${i} { ${l} }`}function us(t,e=yr){let n=[];if(t.length>e)return{css:\"\",refused:[{reason:\"size\"}]};let r=s=>void n.push(s);return{css:it(Cr(t),!0).map(s=>Ln(s,r,0,\"sheet\")).filter(s=>s!==void 0).join(`\n`),refused:n}}function ds(t,e=yr){let n=[];if(t.length>e)return{css:\"\",refused:[{reason:\"size\"}]};let r=s=>void n.push(s),o=[];for(let s of kr(Cr(t))){if(s.type!==\"declaration\"){r({reason:\"unreadable\",name:\"a rule in a style attribute\"});continue}let i=Hn(s,r);i&&o.push(i)}return{css:o.join(\"; \"),refused:n}}function fs(t,e){let n,r=Hn(as(t,Cr(e)),o=>n??=o);return r===void 0||n?{refused:n??{reason:\"unreadable\",name:t}}:{value:r.slice(r.indexOf(\":\")+1).trim()}}function ms(t,e){if(e===\"svg\"){let r=Cn(t);return r?{namespace:\"svg\",name:r}:{refused:{reason:\"element\",element:t}}}let n=t.toLowerCase();return n===\"svg\"?{namespace:\"svg\",name:\"svg\"}:Object.prototype.hasOwnProperty.call(ot,n)?Object.prototype.hasOwnProperty.call(kt,n)?{namespace:\"html\",name:kt[n],as:n}:{namespace:\"html\",name:n}:{refused:{reason:\"element\",element:t}}}function Pr(t,e){return(t===\"html\"?ot[e]:Rn[e])?.empty===!0}var Ri=/^[+-]?(\\d+\\.?\\d*|\\.\\d+)([eE][+-]?\\d+)?$/,ki=/^[0-9A-Za-z\\s.,+\\-%()]*$/,Ci=/^#[A-Za-z_][A-Za-z0-9_.:-]*$/,Pi=/^data:image\\/(png|gif|jpeg|webp|avif|bmp|svg\\+xml)(;[A-Za-z0-9=._+-]+)*,/i,_i=/^\\/graview\\/assets\\/[0-9a-f]{64}\\.(png|gif|jpe?g|webp|avif|svg|ico)$/,ps=/\\/graview\\/assets\\/[0-9a-f]{64}\\.(png|gif|jpe?g|webp|avif|svg|ico)$/,Ii=/^\\/(?!\\/)(?!(?:.*\\/)?\\.\\.?(?:\\/|$))(?!.*%(?:2e|2f|5c))[^\\\\\\s?#\"'<>]*$/i;function Di(t,e){if(_i.test(t))return t;let n=t;if(/^https?:\\/\\//i.test(t))try{let r=new URL(t);if(e===\"null\"||r.origin!==e||r.username!==\"\"||r.password!==\"\"||r.search!==\"\"||r.hash!==\"\")return;n=t.slice(r.origin.length)}catch{return}if(Ii.test(n))return ps.exec(n)?.[0]}function hs(t,e={},n){let r=t.length>120?`${t.slice(0,119)}\\u2026`:t,o=gs(e.origins),s=ps.exec(t.split(/[?#]/)[0])?.[0],i=n!==void 0&&n>Ct?` It is a data: image of ${n.toLocaleString(\"en-US\")} characters, more than the ${Ct.toLocaleString(\"en-US\")} a view's own data: image may be. A picture on a record is drawn at any size by the src the host hands the view (pictures in its manifest), used as it was handed.`:s?e.assets?` It is the app's own image only by its path, or under the app's base on this page's origin: write it as its path, ${s}.`:\" This host has not said where the app's own images live (asset, on the view's definition), so a view here cannot draw one by its path.\":/^https:\\/\\//i.test(t)?o.length>0?` Its origin is not one the host lists for images (${o.join(\", \")}).`:\" The host lists no origin a view's images may come from (images.origins, on the view's definition).\":\"\",l=[\"a data: image\",...e.assets?[\"the app's own image by the path add_image answered (/graview/assets/<sha256>.<ext>)\"]:[],\"a picture on a record (pictures in its manifest)\",...o.length>0?[`an https: image from ${o.join(\", \")}`]:[]];return`The image \"${r}\" was not drawn.${i} A view here shows ${l.slice(0,-1).join(\", \")} or ${l[l.length-1]}.`}function gs(t){return(t??[]).flatMap(e=>{try{let n=new URL(e);return n.protocol===\"https:\"&&n.hostname!==\"\"&&n.username===\"\"&&n.password===\"\"?[n.origin]:[]}catch{return[]}})}function Mi(t,e){if(!(!e||e.length===0||!/^https:\\/\\//i.test(t)))try{let n=new URL(t);return n.protocol!==\"https:\"||n.username!==\"\"||n.password!==\"\"?void 0:gs(e).includes(n.origin)?n.href:void 0}catch{return}}function _r(t,e,n,r,o){let s=Pn(t,e,n);if(!s)return{refused:{reason:\"attribute\",element:e,name:n}};if(t===\"html\"&&kn[e]?.includes(s.name))return{refused:{reason:\"attribute\",element:e,name:n}};if(r===null)return{name:s.name,value:null};let i=Li(s.name,s.kind,r,o);return\"refused\"in i?{refused:{...i.refused,element:e,...s.kind===\"image\"&&i.refused.reason===\"url\"?{address:r.slice(0,200),...r.length>Ct?{length:r.length}:{}}:{}}}:s.name===\"role\"&&i.value.split(/\\s+/).some(l=>Do.includes(l.toLowerCase()))?{refused:{reason:\"value\",element:e,name:n}}:s.name===\"aria-live\"&&![\"polite\",\"off\"].includes(i.value.toLowerCase())?{refused:{reason:\"value\",element:e,name:n}}:{name:s.name,value:i.value,...i.dropped?{dropped:i.dropped.map(l=>({reason:l.reason===\"url\"?\"url\":\"css\",element:e,name:s.name,css:l}))}:{}}}function Li(t,e,n,r){let o=(s,i)=>({refused:{reason:s,name:t,...i?{css:i}:{}}});if(e===\"geometry\")return n.length>jo||!ki.test(n)||/url/i.test(n)?o(\"value\"):{value:n};if(e===\"image\"){let s=r.picture?.(n);if(s!==void 0)return{value:s};if(n.length>Ct)return o(\"url\");if(Pi.test(n))return{value:n};if(n.startsWith(`blob:${r.origin}/`)&&/^blob:[^\\s\"'<>]+$/.test(n))return{value:n};let i=r.asset?Di(n,r.origin):void 0;if(i!==void 0){let c=r.asset(i);if(c)return{value:c}}let l=Mi(n,r.imageOrigins);return l?{value:l}:o(\"url\")}if(n.length>br)return o(\"value\");if(typeof e==\"object\"){let s=e.oneOf.find(i=>i.toLowerCase()===n.toLowerCase());return s===void 0?o(\"value\"):{value:s}}switch(e){case\"text\":return{value:n};case\"number\":return Ri.test(n.trim())&&Number.isFinite(Number(n))?{value:n.trim()}:o(\"value\");case\"boolean\":return{value:\"\"};case\"fragment\":return Ci.test(n)?{value:n}:o(\"url\");case\"style\":{let s=ds(n,br);return s.refused.length>0&&s.css===\"\"?o(s.refused[0].reason===\"url\"?\"url\":\"css\",s.refused[0]):{value:s.css,...s.refused.length>0?{dropped:s.refused}:{}}}case\"css\":{let s=fs(t,n);return\"refused\"in s?o(s.refused.reason===\"url\"?\"url\":\"css\",s.refused):{value:s.value}}}}var Hi=\"http://www.w3.org/1999/xhtml\",lt=class{constructor(e){this.ownerDocument=e}parentNode=null;childNodes=[];get firstChild(){return this.childNodes[0]??null}get parentElement(){return this.parentNode instanceof Le?this.parentNode:null}get textContent(){return this.childNodes.map(e=>e.textContent).join(\"\")}insertBefore(e,n){e.parentNode&&e.parentNode.removeChild(e);let r=n?this.childNodes.indexOf(n):-1;return r<0?this.childNodes.push(e):this.childNodes.splice(r,0,e),e.parentNode=this,e}appendChild(e){return this.insertBefore(e,null)}removeChild(e){let n=this.childNodes.indexOf(e);return n>=0&&this.childNodes.splice(n,1),e.parentNode=null,e}},Me=class extends lt{constructor(n,r){super(n);this.data=r}nodeType=3;get textContent(){return this.data}},Ir=class extends lt{nodeType=8;get textContent(){return\"\"}},Le=class extends lt{constructor(n,r,o){super(n);this.namespaceURI=r;this.localName=o}nodeType=1;attributes=new Map;value=\"\";checked=!1;selected=!1;setAttribute(n,r){this.attributes.set(n,String(r))}removeAttribute(n){this.attributes.delete(n)}getAttribute(n){return this.attributes.get(n)??null}hasAttribute(n){return this.attributes.has(n)}closest(n){for(let r=this;r;r=r.parentElement)if(r.localName===n)return r;return null}},Dr=class extends lt{nodeType=9;constructor(){super(null)}createElementNS(e,n){return new Le(this,e,n)}createElement(e){return new Le(this,Hi,e)}createTextNode(e){return new Me(this,e)}createComment(e){return new Ir(this)}};function ys(){let t=new Dr,e=t.createElement(\"div\");return e.setAttribute(\"data-graview-view-root\",\"\"),t.appendChild(e),{document:t,root:e}}var Mr={h1:1,h2:2,h3:3,h4:4,h5:5,h6:6},bs=new Set([\"a\",\"abbr\",\"b\",\"bdi\",\"bdo\",\"br\",\"cite\",\"code\",\"data\",\"del\",\"dfn\",\"em\",\"i\",\"ins\",\"kbd\",\"q\",\"s\",\"samp\",\"small\",\"span\",\"strong\",\"sub\",\"sup\",\"time\",\"u\",\"var\",\"wbr\",\"label\"]),Es=new Set([\"style\",\"template\",\"datalist\",\"option\"]),U=t=>t.replace(/\\s+/g,\" \").trim();function $i(t){let e=t.duration===void 0?0:Math.round(t.duration);if(e<1)return\"a video\";if(e<60)return`a ${e}-second video`;let n=Math.round(e/60);return n<60?`a ${n}-minute video`:`a ${Math.floor(n/60)}-hour${n%60>0?` ${n%60}-minute`:\"\"} video`}var Q=t=>t instanceof Le,_t=t=>t.hasAttribute(\"hidden\")||t.getAttribute(\"aria-hidden\")===\"true\";function q(t){return t instanceof Me?t.data:!Q(t)||_t(t)||Es.has(t.localName)?\"\":t.localName===\"br\"?\" \":t.localName===\"img\"?t.getAttribute(\"alt\")??\"\":t.childNodes.map(q).join(t.localName===\"td\"||t.localName===\"th\"?\" \":\"\")}function*He(t){for(let e of t.childNodes)Q(e)&&(yield e,yield*He(e))}function Ui(t){let e=t.getAttribute(\"data-save\"),n=t.getAttribute(\"data-debounce\");if(e===null&&n===null)return[];let r=`drawing <${t.localName}${e!==null?` data-save=\"${e}\"`:` data-debounce=\"${n}\"`}>`,o=[];if(e===null)return[{at:r,says:'data-debounce is read only on a field that saves as it is typed (data-save=\"input\").'}];if(![\"input\",\"textarea\",\"select\"].includes(t.localName))o.push({at:r,says:\"Only a field saves as it is typed: an input, a textarea or a select. A button is pressed (data-act alone).\"});else if(e!==\"input\"&&e!==\"change\")o.push({at:r,says:`data-save is \"input\" (saved as the person types, once they pause, and when they leave it) or \"change\" (saved when they leave it or pick), not \"${e}\".`});else if(t.getAttribute(\"data-act\")===null)o.push({at:r,says:'It saves through no act: a field saved as it is typed names its act itself, data-act=\"\\u2026\", one in the manifest.'});else if(!t.getAttribute(\"name\"))o.push({at:r,says:\"It has no name: the host sends a field as the act's argument its name says.\"});else{let s=!1,i=!1;for(let l=t;l;l=l.parentElement)l.getAttribute(\"data-record\")!==null&&(i=!0),l!==t&&(l.localName===\"fieldset\"||l.getAttribute(\"role\")===\"group\")&&(s=!0);(!s||!i)&&o.push({at:r,says:'It is in no fieldset bound to a record: the host saves a field inside <fieldset data-record=\"\\u2026\">, with the fields beside it, to the record the fieldset names.'})}return n!==null&&e!==\"input\"?o.push({at:r,says:'data-debounce is read only with data-save=\"input\": a \"change\" saves at once.'}):n!==null&&!(n.trim()!==\"\"&&Number.isFinite(Number(n))&&Number(n)>=250&&Number(n)<=1e4)&&o.push({at:r,says:`data-debounce is how long the host waits for the person to pause, in milliseconds from 250 to 10 000, not \"${n}\"; left out, it waits 1 000.`}),o}function Vi(t,e,n){let r=t.getAttribute(\"data-drop\");if(r===null)return[];let o=`drawing <${t.localName} data-drop=\"${r}\">`,s=[],i=(e.accepts??[]).filter(u=>u.kind===r),l=t.getAttribute(\"data-drop-field\");i.length===0?s.push({at:o,says:`The view's accepts names no field of \"${r}\", so the host offers no drop target here: say the field files go in, accepts: [{ \"kind\": \"${r}\", \"field\": \"<its image, video or file field>\" }].`}):l!==null&&!i.some(u=>u.field===l)&&s.push({at:o,says:`data-drop-field names \"${l}\", which the view's accepts does not name for \"${r}\" (${i.map(u=>`\"${u.field}\"`).join(\", \")}): the host offers no drop target here.`});let c=t.getAttribute(\"data-drop-connect\");if(c!==null){let u=c.indexOf(\":\"),h=u>0?c.slice(u+1):\"\";u<=0||h===\"\"||n.has(c)?s.push({at:o,says:`data-drop-connect is \"<relation>:<record id>\" \\u2014 \"takenOn:day:saturday\" \\u2014 not \"${c}\"${n.has(c)?\", which names a record and no relation\":\"\"}.`}):n.has(h)||s.push({at:o,says:`data-drop-connect names \"${h}\", which this seat was not shown: the host offers no drop target here.`})}return s}function Ns(t,e){let n=[],r=new Set,o=new Set,s=new Map;for(let d of[...e.props.node?[e.props.node]:[],...e.props.nodes??[]])s.set(d.id,d);let i=d=>Pt(e.places,d)!==void 0;for(let d of He(t)){let E=d.getAttribute(\"data-act\");E!==null&&r.add(E);let N=d.getAttribute(\"data-record\");N!==null&&(o.add(N),!s.has(N)&&!i(N)&&n.push({at:`drawing <${d.localName} data-record=\"${N}\">`,says:`It names \"${N}\", which this seat was not shown and is no place of this app: the host will not follow it. A view goes to a record by its id, or to a place by its slug.${st(e.places)}`}));let S=d.getAttribute(\"data-place\");S!==null&&!i(S)&&n.push({at:`drawing <${d.localName} data-place=\"${S}\">`,says:`It names the place \"${S}\", which this app does not have.${st(e.places)}`}),n.push(...Ui(d)),n.push(...Vi(d,e,s))}let l=d=>{if(d.localName===\"graview-video\")return;let E=d.getAttribute(\"data-record\");if(E!==null)return E;let N=d.getAttribute(\"data-key\")??d.getAttribute(\"id\");if(N!==null&&s.has(N))return N;let S=new Set;for(let y of He(d)){let a=y.getAttribute(\"data-record\");a!==null&&y.localName!==\"graview-video\"&&S.add(a)}return S.size===1?[...S][0]:void 0},c=(d,E)=>{let N=s.get(E),S=N?.kind??(E.includes(\":\")?E.slice(0,E.indexOf(\":\")):\"\"),y=[...He(d)],a=y.find(m=>m.localName in Mr)??y.find(m=>m.localName===\"a\"&&m.getAttribute(\"data-record\")===E)??y.find(m=>m.localName===\"strong\"||m.localName===\"b\"),g=U(a?q(a):\"\")||N?.label||E,p=h(d,a);return!a&&p[0]?.t===\"text\"&&U(p[0].text)===g&&p.shift(),{id:E,kind:S,title:g,parts:p}},u=d=>{let E=[...He(d)].filter(a=>a.localName===\"tr\"&&!_t(a)),N=E.find(a=>a.parentElement?.localName===\"thead\"||a.childNodes.every(g=>!Q(g)||g.localName===\"th\")),S=N?N.childNodes.filter(Q).map(a=>U(q(a))):[];return{t:\"list\",as:\"row\",columns:1,groups:[{items:E.filter(a=>a!==N).map(a=>{let g=a.childNodes.filter(Q),p=l(a),m=p?s.get(p):void 0;return{id:p??\"\",kind:m?.kind??\"\",title:U(q(g[0]??a)),parts:g.slice(1).map((b,A)=>({t:\"field\",label:S[A+1]??\"\",text:U(q(b))}))}})}]}};function h(d,E){let N=[],S=\"\",y=()=>{let g=U(S);S=\"\",g&&N.push({t:\"text\",text:g})},a=d.childNodes;for(let g=0;g<a.length;g+=1){let p=a[g];if(p===E)continue;if(p instanceof Me){S+=p.data;continue}if(!Q(p)||_t(p)||Es.has(p.localName))continue;if(E&&[...He(p)].includes(E)){y(),N.push(...h(p,E));continue}let m=[];for(let b=g;b<a.length;b+=1){let A=a[b];if(A instanceof Me&&U(A.data)===\"\")continue;if(!Q(A)||_t(A)||bs.has(A.localName)||A.localName in Mr)break;let f=l(A);if(!f)break;m.push({element:A,id:f}),g=b}if(m.length>0){y();let b=m.every(A=>A.element.localName===\"li\"||A.element.localName===\"tr\");N.push({t:\"list\",as:b?\"row\":\"card\",columns:1,groups:[{items:m.map(A=>c(A.element,A.id))}]});continue}N.push(...w(p,b=>S+=b,y))}return y(),N}function w(d,E,N){let S=d.localName;if(bs.has(S)&&S!==\"label\")return E(q(d)),[];if(S===\"mark\"){N();let a=U(q(d));return a?[{t:\"badge\",text:a}]:[]}N();let y=Mr[S]??(d.getAttribute(\"role\")===\"heading\"?Number(d.getAttribute(\"aria-level\")??2):void 0);if(y!==void 0){let a=U(q(d));return a?[{t:\"heading\",level:y,text:a}]:[]}switch(S){case\"ul\":case\"ol\":case\"menu\":return[{t:\"list\",as:\"row\",columns:1,groups:[{items:d.childNodes.filter(g=>Q(g)&&g.localName===\"li\"&&!_t(g)).map(g=>{let p=l(g);if(p)return c(g,p);let m=h(g),b=m[0],A=b&&(b.t===\"text\"||b.t===\"heading\")?b.text:\"\";return{id:\"\",kind:\"\",title:A,parts:A?m.slice(1):m}})}]}];case\"table\":return[u(d)];case\"dl\":{let a=[],g=\"\";for(let p of d.childNodes.filter(Q))if(p.localName===\"dt\")g=U(q(p));else if(p.localName===\"dd\")a.push({t:\"field\",label:g,text:U(q(p))});else if(p.localName===\"div\")for(let m of p.childNodes.filter(Q))m.localName===\"dt\"?g=U(q(m)):m.localName===\"dd\"&&a.push({t:\"field\",label:g,text:U(q(m))});return a}case\"figure\":{let a=d.childNodes.find(m=>Q(m)&&m.localName===\"figcaption\"),g=U(d.childNodes.filter(m=>m!==a).map(q).join(\" \")),p=a?U(q(a)):\"\";return g?[{t:\"figure\",text:g,...p?{label:p}:{}}]:p?[{t:\"text\",text:p}]:[]}case\"meter\":case\"progress\":{let a=Number(d.getAttribute(\"value\")??0),g=Number(d.getAttribute(\"max\")??1)||1;return[{t:\"progress\",label:d.getAttribute(\"aria-label\")??d.getAttribute(\"title\")??\"\",text:`${Math.round(a/g*100)}%`}]}case\"svg\":{let a=d.childNodes.find(m=>Q(m)&&m.localName===\"title\"),g=U(d.getAttribute(\"aria-label\")??(a?q(a):\"\"));if(g)return[{t:\"text\",text:g,tone:\"picture\"}];let p=[...He(d)].filter(m=>m.localName===\"text\").map(m=>U(q(m))).filter(Boolean);return p.length>0?[{t:\"text\",text:p.join(\" \\xB7 \"),tone:\"picture\"}]:[]}case\"img\":{let a=U(d.getAttribute(\"alt\")??\"\");return a?[{t:\"text\",text:a,tone:\"picture\"}]:[]}case\"graview-video\":{let a=d.getAttribute(\"data-field\")??\"\",g=s.get(d.getAttribute(\"data-record\")??\"\"),p=g&&a&&Object.hasOwn(g,a)?g[a]:void 0,m=(Array.isArray(p)?p:[p])[Number(d.getAttribute(\"data-index\")??\"0\")];return!m||typeof m.name!=\"string\"||typeof m.type!=\"string\"||!m.type.startsWith(\"video/\")?(n.push({at:`drawing <graview-video data-field=\"${a}\">`,says:\"It names no video on a record this seat was shown: the host draws no player there. A <graview-video> names a record the view was shown (data-record) and its video field (data-field).\"}),[]):[{t:\"text\",text:`${typeof m.caption==\"string\"&&m.caption.trim()?m.caption.trim():m.name}, ${$i(typeof m.duration==\"number\"?{duration:m.duration}:{})}`,tone:\"picture\"}]}case\"button\":{let a=U(q(d));return a?[{t:\"text\",text:a,tone:\"button\"}]:[]}case\"input\":case\"textarea\":case\"select\":{let a=U(d.getAttribute(\"aria-label\")??d.getAttribute(\"placeholder\")??d.getAttribute(\"name\")??\"\"),g=S===\"select\"?U(q(d.childNodes.find(p=>Q(p)&&p.localName===\"option\"&&p.selected)??d)):d.value;return[{t:\"field\",label:a,text:g}]}case\"label\":return h(d);default:return h(d)}}return{parts:h(t),problems:n,acts:[...r],records:[...o]}}var ji=0,Gi=1,zi=2,Fi=3,ws=1,Bi=2,Ts=3,Yi=1,qi=3,Wi=8,xs=\"~\",$n=t=>typeof t==\"object\"&&t!==null&&!Array.isArray(t),vs=new Set([\"input\",\"select\",\"textarea\",\"option\"]),Xi=new Set([\"value\",\"checked\",\"selected\"]);function Ss(t,e){let n=t.ownerDocument??t,r=e.maxNodes??5e3,o=[],s=new Map,i=new WeakMap,l={dom:t,name:\"div\",namespace:\"html\",children:[],id:xs};s.set(xs,l);let c=0,u=!1,h=a=>{o.push(a),o.length>200&&o.shift(),e.onRefused?.(a)},w=()=>({dom:n.createComment(\"\"),children:[],refused:!0}),d=(a,g)=>{if(a.namespace===\"html\"&&a.name&&vs.has(a.name))return a.dom;if(g?.namespace===\"html\"&&g.name===\"textarea\")return g.dom},E=(a,g,p)=>{let m=a.dom;if(p!=null&&typeof p!=\"string\")return h({reason:\"value\",element:a.name,name:g});let b=_r(a.namespace,a.name,g,p??null,e);if(\"refused\"in b){let O=_r(a.namespace,a.name,g,null,e);return\"refused\"in O||m.removeAttribute(O.name),h(b.refused)}for(let O of b.dropped??[])h(O);let A=a.namespace===\"html\"&&Xi.has(b.name)&&vs.has(a.name),f=m,x=A?b.name===\"value\"?f.value:b.name===\"checked\"?f.checked:f.selected:void 0;b.value===null?m.removeAttribute(b.name):m.setAttribute(b.name,b.value),e.onAttribute?.(m,b.name),A&&(b.name===\"value\"&&\"value\"in f?(f.value=b.value??\"\",x!==f.value&&e.onFieldSet?.(m)):b.name===\"checked\"&&\"checked\"in f?(f.checked=b.value!==null,x!==f.checked&&e.onFieldSet?.(m)):b.name===\"selected\"&&\"selected\"in f&&(f.selected=b.value!==null,x!==f.selected&&e.onFieldSet?.(m.parentElement?.closest(\"select\")??m)))},N=a=>{if(!a.refused){c-=1,a.id!==void 0&&s.delete(a.id);for(let g of a.children)N(g)}},S=(a,g)=>{if(!$n(a)||typeof a.id!=\"string\"||s.has(a.id))return h({reason:\"record\"}),w();if(c>=r)return h({reason:\"budget\"}),u||(u=!0,e.onOverBudget?.()),w();let p=a.id;if(a.type===Wi)return w();if(a.type===qi){if(Pr(g.namespace,g.name))return h({reason:\"child\",element:g.name}),w();let x=n.createTextNode(String(a.data??\"\").slice(0,Er)),O={dom:x,children:[],text:!0,id:p,parent:g};return s.set(p,O),i.set(x,p),c+=1,O}if(a.type!==Yi)return h({reason:\"record\"}),w();let m=String(a.element);if(Pr(g.namespace,g.name))return h({reason:\"child\",element:m}),w();let b=ms(m,g.namespace);if(\"refused\"in b)return h(b.refused),w();let A=n.createElementNS(b.namespace===\"svg\"?zo:Go,b.name);b.as&&A.setAttribute(\"data-graview-as\",b.as),b.namespace===\"html\"&&b.name===\"img\"&&A.setAttribute(\"referrerpolicy\",\"no-referrer\");let f={dom:A,name:b.name,namespace:b.namespace,children:[],id:p,parent:g};if(s.set(p,f),i.set(A,p),c+=1,$n(a.attributes))for(let[x,O]of Object.entries(a.attributes))E(f,x,O);if(e.decorate?.(A,b.name,b.namespace),$n(a.properties))for(let x of Object.keys(a.properties))h({reason:\"attribute\",element:b.name,name:x});if($n(a.eventListeners))for(let x of Object.keys(a.eventListeners))a.eventListeners[x]!=null&&h({reason:\"attribute\",element:b.name,name:`on${x}`});if(Array.isArray(a.children))for(let x of a.children){let O=S(x,f);f.children.push(O),A.appendChild(O.dom)}return f},y=a=>{if(!Array.isArray(a))return h({reason:\"record\"});let[g,p]=a,m=typeof p==\"string\"?s.get(p):void 0;if(!m)return h({reason:\"record\"});switch(g){case ji:{if(m.text)return h({reason:\"record\"});let b=Number(a[3]),A=Number.isInteger(b)&&b>=0&&b<=m.children.length?b:m.children.length,f=S(a[2],m);m.dom.insertBefore(f.dom,m.children[A]?.dom??null),m.children.splice(A,0,f),m.namespace===\"html\"&&m.name===\"textarea\"&&e.onFieldSet?.(m.dom);return}case Gi:{let b=Number(a[2]),A=m.children[b];if(!A)return h({reason:\"record\"});m.children.splice(b,1),A.dom.parentNode?.removeChild(A.dom),N(A);return}case zi:{if(!m.text)return h({reason:\"record\"});m.dom.data=String(a[2]??\"\").slice(0,Er);let b=d(m,m.parent);b&&e.onFieldSet?.(b);return}case Fi:{if(m===l||m.text)return h({reason:\"record\"});let b=String(a[2]),A=a[4]??ws;return A===Bi?E(m,b,a[3]):h(A===ws||A===Ts?{reason:\"attribute\",element:m.name,name:A===Ts?`on${b}`:b}:{reason:\"record\"})}default:return h({reason:\"record\"})}};return{apply(a,g){if(!Array.isArray(a))return h({reason:\"record\"}),!0;for(let p=0;p<a.length;p+=1){if(g&&p%32===0&&g())return!1;y(a[p])}return!0},get refused(){return o},get size(){return c},idOf:a=>i.get(a),elementOf(a){let g=s.get(a);return g&&!g.text&&g!==l?g.dom:void 0},dispose(){for(let a of l.children)N(a);for(l.children.length=0;t.firstChild;)t.removeChild(t.firstChild)}}}function Os(t,e,n){let{root:r}=ys(),o=!1,s=Ss(r,{origin:n.origin??\"null\",...n.imageOrigins?{imageOrigins:n.imageOrigins}:{},...n.asset?{asset:n.asset}:{},maxNodes:n.maxNodes,onOverBudget:()=>o=!0});for(let c of t)s.apply(c);let i=[...s.refused],l=\"\";if(typeof e==\"string\"){let c=us(e);l=c.css;for(let u of c.refused)i.push({reason:\"css\",name:\"stylesheet\",css:u})}return{root:r,refused:i,size:s.size,over:o,css:l}}function Ki(t,e={}){let n=\"element\"in t&&t.element?`<${t.element}>`:\"\",r=t.name?` ${t.name}`:\"\";switch(t.reason){case\"element\":return{at:`drawing ${n}`,says:`Not drawn: ${n} is not in the open kit.`};case\"attribute\":return{at:`drawing ${n}${r}`,says:`Not drawn: ${n||\"an element\"} does not take${r}.`};case\"value\":return{at:`drawing ${n}${r}`,says:`Not drawn: the value of${r} is not one the open kit takes.`};case\"url\":return{at:`drawing ${n}${r}`,says:t.address!==void 0&&\"element\"in t&&t.element===\"img\"?`Not drawn: ${hs(t.address,e,\"length\"in t?t.length:void 0)}`:\"Not drawn: an address. A view loads nothing; an image is a data: image.\"};case\"child\":return{at:`drawing ${n}`,says:`Not drawn: ${n} holds nothing.`};case\"record\":return{at:\"drawing\",says:\"Not drawn: a record the drawing's format does not know.\"};case\"budget\":return{at:\"drawing\",says:\"Not drawn: more nodes than a view may draw.\"};case\"css\":return{at:`stylesheet${r===\" stylesheet\"?\"\":r}`,says:`Not drawn: CSS the open kit leaves out${t.css?` (${t.css.reason}${t.css.name?` ${t.css.name}`:\"\"})`:\"\"}.`}}}function As(t,e){let{limits:n}=e;if(t.messages>n.messages)return{ok:!1,reason:\"flood\",detail:`It sent ${t.messages} messages, more than the ${n.messages} a view may send in a second.`};let r=new Set(e.acts);for(let c of t.asked)if(!r.has(c.name))return{ok:!1,reason:\"act\",detail:`It asks for the act \"${c.name}\", which its manifest does not name.`};let o=Os(t.renders,t.css,{maxNodes:n.maxNodes,...e.origin?{origin:e.origin}:{},...e.imageOrigins?{imageOrigins:e.imageOrigins}:{},...e.assets?{asset:c=>c}:{}});if(o.over)return{ok:!1,reason:\"nodes\",detail:`It drew more than the ${n.maxNodes.toLocaleString(\"en-US\")} things a view may draw.`};let s=[...e.places,...(e.lists??[]).filter(c=>!e.places.some(u=>u.as===c)).map(c=>({as:c}))],i=Ns(o.root,{props:e.props,places:s,...e.accepts?{accepts:e.accepts}:{}});for(let c of i.acts)if(!r.has(c))return{ok:!1,reason:\"act\",detail:`It binds a press to the act \"${c}\" (data-act), which its manifest does not name.`};let l=[...o.refused.map(c=>Ki(c,{...e.imageOrigins?{origins:e.imageOrigins}:{},assets:e.assets===!0})),...i.problems];for(let c of t.went)\"record\"in c&&!(e.props.node?.id===c.record||(e.props.nodes??[]).some(u=>u.id===c.record)||Pt(s,c.record))&&l.push({at:\"navigate\",says:`It goes to ${wr(c.record)}, which this seat was not shown and is no place of this app: the host will not follow it. A view goes to a record by its id, or to a place by its slug.${st(s)}`}),\"place\"in c&&!Pt(s,c.place)&&l.push({at:\"navigate\",says:`It goes to the place ${wr(c.place)}, which this app does not have.${st(s)}`});return{ok:!0,parts:i.parts,problems:l}}var Lr=\"graviewHeadless\",Hr=\"graviewHeadlessView\";var Cs=globalThis,Zi=Promise.prototype.then,Ji=Promise.resolve(),Ur=t=>void Zi.call(Ji,t),Un=Cs.performance,It=Un&&typeof Un.now==\"function\"?Un.now.bind(Un):Date.now,$e=JSON.stringify,Ps=JSON.parse,Qi=Object.defineProperty,Vr=t=>(t instanceof Error?`${t.name}: ${t.message}`:String(t)).slice(0,500),Vn=t=>{try{return Ps($e(t??null))}catch{return null}},G={renders:[],asked:[],went:[],ms:0,logs:[],messages:0},Ue,jn=(t,e)=>{Ue??={reason:t,detail:e}},ct=t=>{G.logs.length<50&&G.logs.push(t.slice(0,500))},ut={removed:[],stuck:[],sealed:!1},jr=Xo({send(t){G.messages+=1,t.type===\"render\"?G.renders.push(Vn(t.records)):t.type===\"style\"?G.css=String(t.css):t.type===\"navigate\"&&\"place\"in t?G.went.push({place:String(t.place),...t.where!==void 0?{where:Vn(t.where)}:{},...t.section!==void 0?{section:String(t.section)}:{}}):t.type===\"navigate\"&&\"to\"in t&&G.went.push({record:String(t.to),...t.where!==void 0?{where:Vn(t.where)}:{},...t.section!==void 0?{section:String(t.section)}:{}})},act(t,e){return G.messages+=1,G.asked.push({name:String(t),args:Vn(e)}),Promise.resolve({type:\"answer\",id:G.asked.length,ok:!1,reason:\"refused\",message:\"Nothing is applied in a headless run.\"})},navigate(t){G.messages+=1,G.went.push({record:String(t)})},microtask:Ur,now:It,threw:t=>jn(\"error\",`It threw: ${Vr(t)}`),warn:ct,hardening:()=>ut}),Rs=!1,$r=!1;function ea(t){if($r||typeof t!=\"function\"||($r=!0,Ue))return;let e=It();try{t.call(void 0,jr.view)}catch(n){jn(\"error\",`It threw: ${Vr(n)}`)}G.ms+=It()-e}async function ta(t){if(Rs)return $e({ok:!1,reason:\"refused\",detail:\"A headless script runs one view, once: something called its entry before the host did.\"});Rs=!0;let e;try{e=Ps(String(t))}catch{return $e({ok:!1,reason:\"isolate\",detail:\"The run was not handed its input as JSON.\"})}if(!$r&&!Ue)return $e({ok:!1,reason:\"isolate\",detail:\"The script held no view.\"});let n=It();Ue||jr.hear({type:\"props\",props:e.props,push:1}),G.ms+=It()-n,G.ms>=e.limits.pushMs&&jn(\"slow\",`It took longer than ${e.limits.pushMs.toLocaleString(\"en-US\")} ms to draw what it was shown.`);for(let o=0;o<64&&!Ue;o+=1)await new Promise(s=>Ur(s));if(Ue)return $e({ok:!1,...Ue,transcript:G});let r=As(G,e);return r.ok?$e({ok:!0,transcript:G,drawn:{parts:r.parts,problems:r.problems},hardening:{removed:ut.removed.length,sealed:ut.sealed}}):$e({ok:!1,reason:r.reason,detail:r.detail,transcript:G})}var na=Object.freeze({log:(...t)=>ct(t.map(String).join(\" \")),info:(...t)=>ct(t.map(String).join(\" \")),debug:(...t)=>ct(t.map(String).join(\" \")),warn:(...t)=>ct(t.map(String).join(\" \")),error:(...t)=>ct(t.map(Vr).join(\" \"))}),ra=0,ks=()=>ra+=1,oa=[[\"console\",na],[\"setTimeout\",ks],[\"setInterval\",ks],[\"clearTimeout\",()=>{}],[\"clearInterval\",()=>{}],[\"queueMicrotask\",Ur],[\"graview\",jr.view],[Hr,ea],[Lr,t=>ta(t)]];for(let[t,e]of oa)Qi(Cs,t,{value:e,writable:!0,enumerable:!1,configurable:!0});ut=_o(globalThis,[\"graview\",Hr,Lr],{primitivesStay:!0});ut.stuck.length>0&&jn(\"refused\",`This isolate could not be hardened: ${ut.stuck.join(\", \")} would not go.`);})();\n";
|
|
7
|
+
export const HEADLESS_RUNTIME = "\"use strict\";\n/*! @remote-dom/core and @remote-dom/polyfill — Copyright 2020-present, Shopify Inc. — MIT License.\n * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * @graview/guest's worker runtime — Elastic License 2.0. */\n\"use strict\";(()=>{var C=Symbol(\"name\"),Te=Symbol(\"prefix\"),xe=Symbol(\"value\"),P=Symbol(\"ns\"),Q=Symbol(\"owner\"),H=Symbol(\"owner_document\"),fe=Symbol(\"attributes\"),$=Symbol(\"prev\"),x=Symbol(\"next\"),_=Symbol(\"child\"),ee=Symbol(\"parent\"),ve=Symbol(\"host\"),oe=Symbol(\"data\"),Pe=Symbol(\"listeners\"),Bn=Symbol(\"isTrusted\"),ze=Symbol(\"path\"),Fe=Symbol(\"stop_immediate_propagation\"),Be=Symbol(\"dispatching\"),he=Symbol(\"content\"),G=Symbol(\"hooks\"),$t=Symbol(\"extensions\"),_e=Symbol(\"hooks_dispatch\"),B=Symbol(\"is_connected\"),Ye=Symbol(\"create_element\"),Br=0,ne=1,We=2,qe=3,Xe=8,Ie=9,Yr=10,Se=11,I=\"http://www.w3.org/1999/xhtml\",se=\"http://www.w3.org/2000/svg\",Wr=\"http://www.w3.org/XML/1998/namespace\",ht=\"http://www.w3.org/2000/xmlns/\";function Gt(t){return t.split(/[\\t\\n\\f\\r ]+/).filter(Boolean)}function z(t){return t.replace(/[A-Z]/g,e=>String.fromCharCode(e.charCodeAt(0)+32))}function qr(t){return t.replace(/[a-z]/g,e=>String.fromCharCode(e.charCodeAt(0)-32))}function L(t,e){let n=globalThis.DOMException;if(typeof n==\"function\")return new n(t,e);let r=new Error(t);return r.name=e,r}var Xr=/^(?:[A-Za-z][^\\0\\t\\n\\f\\r\\u0020/>]*|[:_\\u0080-\\u{10FFFF}][A-Za-z0-9-.:_\\u0080-\\u{10FFFF}]*)$/u,Kr=/[\\0\\t\\n\\f\\r />=]/u,Ls=/[\\0\\t\\n\\f\\r />]/u;function ge(t){if(t==null)return null;let e=String(t);return e===\"\"?null:e}function Zr(t){Xr.test(t)||Wn(t)}function Yn(t){(t===\"\"||Kr.test(t))&&Wn(t)}function Ut(t,e,n){let r=ge(t),o=String(e),s=o.indexOf(\":\"),i=s<0?null:o.slice(0,s),l=s<0?o:o.slice(s+1);if((i!=null&&(i===\"\"||Ls.test(i))||(n===\"element\"?!Xr.test(l):l===\"\"||Kr.test(l)))&&Wn(o),i!=null&&r==null)throw L(`A namespace is required for the prefix in \"${o}\"`,\"NamespaceError\");if(i===\"xml\"&&r!==Wr)throw L(\"The xml prefix requires the XML namespace\",\"NamespaceError\");if((o===\"xmlns\"||i===\"xmlns\")&&r!==ht)throw L(\"The xmlns name requires the XMLNS namespace\",\"NamespaceError\");if(r===ht&&o!==\"xmlns\"&&i!==\"xmlns\")throw L(\"The XMLNS namespace requires the xmlns name or prefix\",\"NamespaceError\");return{namespace:r,qualifiedName:o,prefix:i,localName:l}}function Wn(t){throw L(`Invalid name: \"${t}\"`,\"InvalidCharacterError\")}var Vt=0,jt=1,Jr=2,qn=3,Hs=typeof performance>\"u\"?Date.now:performance.now.bind(performance),Y=class{static NONE=Vt;static CAPTURING_PHASE=jt;static AT_TARGET=Jr;static BUBBLING_PHASE=qn;timeStamp=Hs();target=null;currentTarget=null;srcElement=null;bubbles=!1;cancelable=!1;composed=!1;defaultPrevented=!1;cancelBubble=!1;eventPhase=Vt;[ze]=[];[Fe]=!1;[Be]=!1;constructor(e,n){this.type=e,Object.defineProperty(this,Bn,{writable:!0,value:!1}),n&&(n.bubbles&&(this.bubbles=n.bubbles),n.cancelable&&(this.cancelable=n.cancelable),n.composed&&(this.composed=n.composed))}get isTrusted(){return this[Bn]}composedPath(){return[...this[ze]]}stopPropagation(){this.cancelBubble=!0}stopImmediatePropagation(){this[Fe]=!0,this.cancelBubble=!0}preventDefault(){this.cancelable&&(this.defaultPrevented=!0)}set returnValue(e){e||this.preventDefault()}get returnValue(){return!this.defaultPrevented}initEvent(e,n,r){this.type=e,this.bubbles=!!n,this.cancelable=!!r}};function Xn(t,e,n){if(t.cancelBubble)return;let o=e[Pe]?.get(t.type)?.[n===jt?\"capture\":\"bubble\"];if(o)for(let s of[...o]){if(!o.has(s)||s.signal?.aborted)continue;t.eventPhase=t.target===e?Jr:n,t.currentTarget=e;let i=s.normalizedListener;try{typeof i==\"object\"?i.handleEvent(t):i.call(e,t)}catch(l){setTimeout($s,0,l)}if(t[Fe])break}}function $s(t){throw t}var gt=[],zt=new WeakMap;function Ft(t,e){let n=zt.get(t);n?n.push(e):zt.set(t,[e]),gt[gt.length-1].push(t)}function W(t){let e=[];gt.push(e);let n;try{n=t()}catch(r){gt.pop();try{Qr(e)}catch{}throw r}return gt.pop(),Qr(e),n}function Qr(t){let e,n=!1;for(let r of t){let o=zt.get(r);if(o){for(;o.length>0;){let s=o.shift();try{s()}catch(i){n||(e=i,n=!0)}}zt.delete(r)}}if(n)throw e}var Bt=[],yt=[],Kn=!1;function De(t){for(let e of t)Bt.push(e),e[1]&&yt.push(e[1]);if(!Kn){Kn=!0;try{let e,n=!1;for(let r=0;r<Bt.length;r++){let[o,s]=Bt[r];s&&yt.splice(yt.indexOf(s),1);try{o()}catch(i){n||(e=i,n=!0)}}if(n)throw e}finally{Bt.length=0,yt.length=0,Kn=!1}}}function bt(t){let e=t;for(;e;){if(yt.includes(e))return!0;e=e[ee]??e[ve]}return!1}var Et=Symbol(\"listenerRegistrations\"),Oe=class{[Pe]=void 0;[Et]=void 0;[H]=void 0;addEventListener(e,n,r){if(n==null)return;let o=r===!0||typeof r==\"object\"&&r.capture===!0,s=typeof r==\"object\"&&r.once===!0,i=typeof r==\"object\"?r.signal:void 0;if(i?.aborted)return;let l=Zn(o),c=this[Et];c||(c=new Map,this[Et]=c);let u=c.get(e);u||(u={},c.set(e,u));let p=u[l];if(p||(p=new Map,u[l]=p),p.has(n))return;let w=this,d={type:e,listener:n,capture:o,once:s,normalizedListener:n,signal:i};(s||i)&&(d.normalizedListener=function(...a){if(d.signal?.aborted){Yt(w,d);return}return d.once&&Yt(w,d),typeof d.listener==\"object\"?d.listener.handleEvent(...a):d.listener.call(this,...a)});let E=this[Pe];E||(E=new Map,this[Pe]=E);let N=E.get(e);N||(N={},E.set(e,N));let v=N[l];if(v||(v=new Set,N[l]=v),p.set(n,d),v.add(d),i){let g=()=>{Yt(w,d)};d.abortListener=g,i.addEventListener(\"abort\",g,{once:!0})}this[H]?.defaultView[_e].addEventListener?.(this,e,n,r)}removeEventListener(e,n,r){return Gs.call(this,e,n,r)}dispatchEvent(e){if(e[Be])throw L(\"Failed to execute 'dispatchEvent' on 'EventTarget': The event is already being dispatched.\",\"InvalidStateError\");e[Be]=!0;try{let n=[],r=this;for(;r!=null;)n.push(r),r=r.parentNode;e.target=this,e.srcElement=this,e[ze]=n;for(let s=n.length;s--;)if(Xn(e,n[s],jt),e.cancelBubble)return!e.defaultPrevented;let o=e.bubbles?n:n.slice(0,1);for(let s=0;s<o.length;s++)if(Xn(e,o[s],qn),e.cancelBubble)return!e.defaultPrevented;return!e.defaultPrevented}finally{e[Be]=!1,e.cancelBubble=!1,e[Fe]=!1,e.eventPhase=Vt,e.currentTarget=null,e[ze]=[]}}};function Gs(t,e,n){if(e==null)return;let r=n===!0||n&&n.capture===!0,o=Zn(!!r),s=this[Et]?.get(t)?.[o]?.get(e);s&&Yt(this,s)}function Zn(t){return t?\"capture\":\"bubble\"}function Yt(t,e){let n=Zn(e.capture),r=t[Et],o=r?.get(e.type);if(!o)return;let s=o[n];if(!s||s.get(e.listener)!==e)return;s.delete(e.listener),s.size===0&&delete o[n],!o.bubble&&!o.capture&&r?.delete(e.type),e.signal&&e.abortListener&&e.signal.removeEventListener(\"abort\",e.abortListener);let i=t[Pe],l=i?.get(e.type);if(!l)return;let c=l[n];c?.delete(e)&&(c.size===0&&delete l[n],!l.bubble&&!l.capture&&i?.delete(e.type),t[H]?.defaultView[_e].removeEventListener?.(t,e.type,e.listener,e.capture))}var ie=class extends Array{item(e){return this[e]??null}};var wt=0,eo=1,er=2,tr=3,Tt=4,to=0,no=1,Xt=2,Kt=3,ro=4,Qn=5,oo=6,so=7,Wt=/^(?:--|-?[A-Za-z_\\u0080-\\u{10FFFF}])[A-Za-z0-9_\\u0080-\\u{10FFFF}-]*$/u;function Us(t,e){let n=1,r=null;for(let o=e;o<t.length;o++){let s=t[o];if(r){s===\"\\\\\"?o++:s===r&&(r=null);continue}if(s==='\"'||s===\"'\")r=s;else if(s===\"(\")n++;else if(s===\")\"&&--n===0)return[t.slice(e,o),o+1]}return[t.slice(e),t.length]}function te(t){throw L(`Invalid or unsupported selector: \"${t}\"`,\"SyntaxError\")}function Zt(t,e){let n=typeof e==\"string\"?xt(e):[{combinator:Tt,matchers:e}],r=null,o=t[_];return o&&n[0].matchers.length&&nr(o,n,s=>(r=s,!1)),r}function Jt(t,e){let n=typeof e==\"string\"?xt(e):[{combinator:Tt,matchers:e}],r=new ie,o=t[_];return o&&n[0].matchers.length&&nr(o,n,s=>{r.push(s)}),r}function xt(t,e=!1,n=!1){let r={combinator:Tt,matchers:[]},o=[r],s=/[\\t\\n\\f\\r ]*?([>\\t\\n\\f\\r +~]?)[\\t\\n\\f\\r ]*?(?:(?:\\[[\\t\\n\\f\\r ]*([^\\]=\\t\\n\\f\\r ]+)[\\t\\n\\f\\r ]*(?:=[\\t\\n\\f\\r ]*(?:(['\"])(.*?)\\3|([^\\]\\t\\n\\f\\r ]+)))?[\\t\\n\\f\\r ]*(?:\\]|$))|([#.]?)([^\\t\\n\\f\\r #.[>:+~()]+)|:(\\w+)(\\()?)/gi,i=t.replace(/^[\\t\\n\\f\\r ]+|[\\t\\n\\f\\r ]+$/g,\"\");i===\"\"&&te(t);let l=0,c;for(;c=s.exec(i);){c.index!==l&&te(t),c[1]&&(r.matchers.length===0&&!(n&&o.length===1)&&te(t),c[1]===\">\"?r.combinator=eo:c[1]===\"+\"?r.combinator=tr:c[1]===\"~\"?r.combinator=er:r.combinator=wt,r={combinator:Tt,matchers:[]},o.push(r));let u=c[8]?z(c[8]):c[2]||c[7];c[7]!=null&&!c[6]&&r.matchers.length>0&&te(t);let w,d=c[4]??c[5]??c[7];if(c[2]){Wt.test(u)||te(t);let E=c[5],N=E?.[0];if(c[3]==null&&(N==='\"'||N===\"'\")){let v=c[0].lastIndexOf(E);d=i.slice(c.index+v+1),s.lastIndex=i.length}else E!=null&&!Wt.test(E)&&te(t);w=ro}else c[6]?(Wt.test(u)||te(t),w=c[6]===\"#\"?Xt:Kt):c[8]?w=c[9]==null?Qn:oo:c[7]===\"*\"?w=to:c[7]&&Wt.test(c[7])?w=no:te(t);c[9]?([d,s.lastIndex]=Us(i,s.lastIndex),u!==\"has\"&&u!==\"not\"&&te(t),u===\"has\"&&e&&te(t),xt(d,e||u===\"has\",u===\"has\")):w===Qn&&te(t),r.matchers.push({type:w,name:u,value:d}),l=s.lastIndex}return(l!==i.length||r.matchers.length===0)&&te(t),o}function Vs(t,e){let n=xt(e);return n[0]?.matchers.length?Nt(t,n):!1}function js(t,e){let n=xt(e,!0,!0),r=n[0];if(n.length===1&&r.matchers.length===0)return!1;let o=wt,s={type:so,name:\":scope\"};if(r.matchers.length===0?(o=r.combinator,r.matchers.push(s)):n.unshift({combinator:wt,matchers:[s]}),n.some(({matchers:c})=>c.length===0))return!1;let i=o===tr||o===er?t[x]:t[_];if(!i)return!1;let l=!1;return nr(i,n,()=>(l=!0,!1),t),l}function nr(t,e,n,r){let o=[],s=t;for(;s;){if(Z(s)){if(Nt(s,e,r)&&n(s)===!1)return!1;let i=s[_];if(i){let l=s[x];l&&o.push(l),s=i;continue}}s=s[x]??o.pop()??null}return!0}function Nt(t,e,n){let{combinator:r,matchers:o}=e[e.length-1];if(r===Tt){if(!qt(t,o,n))return!1;let l=e.slice(0,-1);return l.length===0||Nt(t,l,n)}let s=r===eo||r===wt?ee:$,i=t[s];if(!i)return!1;if(r===wt||r===er){for(;i;){if(Z(i)&&qt(i,o,n)){let l=e.slice(0,-1);if(l.length===0||Nt(i,l,n))return!0}i=i[s]}return!1}else{if(r===tr&&!Z(i)){for(;i&&!Z(i);)i=i[s];if(!i)return!1}if(!Z(i)||!qt(i,o,n))return!1;let l=e.slice(0,-1);return l.length===0||Nt(i,l,n)}}function Jn(t,e){return t.getAttributeNS(null,t.namespaceURI===I?z(e):e)}function qt(t,e,n){if(!t)return!1;if(Array.isArray(e)){for(let i of e)if(qt(t,i,n)===!1)return!1;return!0}let{type:r,name:o,value:s}=e;switch(r){case to:return o===\"*\";case no:return t.namespaceURI===I?t.localName===z(o):t.localName===o;case Xt:return Jn(t,\"id\")===o;case Kt:let i=Jn(t,\"class\");return i?Gt(i).includes(o):!1;case ro:let l=Jn(t,o);return s==null?l!=null:l===s;case so:return t===n;case Qn:te(`:${o}`);case oo:switch(o){case\"has\":return js(t,s||\"\");case\"not\":return!Vs(t,s||\"\");default:te(`:${o}(${s})`)}}return!1}function zs(t){return t.nodeType===We}function vt(t){return oe in t}function or(t){return t.nodeType===qe}function Fs(t){return t.nodeType===Xe}function Z(t){return t.nodeType===ne}function rr(t){return t.nodeType===Se}function co(t){return\"appendChild\"in t}function Qt(t){let e=[],n=[t],r=new Set(n),o=new Set,s;for(;n.length>0;){let i=n.pop();if(r.delete(i),o.has(i))continue;let l=[];for(let c of Ot(i)){if(o.has(c)||(o.add(c),e.push(c),l.push(c),!Z(c)))continue;let u=c[fe];if(u)for(let w of u)o.has(w)||(o.add(w),e.push(w));let p=c[he];p&&!o.has(p)&&!r.has(p)&&(r.add(p),n.push(p))}s??=l}return{nodes:e,treeNodes:s}}function St(t,e){for(let n of t)n[H]=e}function io(t,e){let n=t.constructor,r=new n(t.name,t.value,t.namespaceURI);return r[H]=e,r}function ao(t,e){if(or(t))return e.createTextNode(t.data);if(Fs(t))return e.createComment(t.data);if(zs(t))return io(t,e);if(Z(t)){let n=e[Ye](t[C],t.namespaceURI,t[Te],t.localName);if(t[fe])for(let r=0;r<t[fe].length;r++){let o=t[fe].item(r);n.attributes.setNamedItem(io(o,e))}return n}else{if(rr(t))return e.createDocumentFragment();{let n=new t.constructor;return n[H]=e,n}}}function en(t,e,n=t.ownerDocument){if(t.nodeType===Ie)throw L(\"Cannot clone a document node\",\"NotSupportedError\");let r=ao(t,n);if(!e||!Z(t)&&!rr(t))return r;let o=new Set([t]),s=[{source:t,destination:r,childIndex:0,cloningContent:!1}];for(;s.length>0;){let i=s[s.length-1],l,c;if(i.cloningContent)if(i.contentSource&&i.contentDestination)l=i.contentSource.childNodes[i.childIndex++],c=i.contentDestination;else{s.pop(),i.appendTo&&i.appendTo.appendChild(i.destination);continue}else if(l=i.source.childNodes[i.childIndex++],c=i.destination,!l){if(i.cloningContent=!0,i.childIndex=0,Z(i.source)&&i.source.namespaceURI===I&&i.source.localName===\"template\"){let p=i.source[he];p&&(o.has(p)&&lo(),o.add(p),i.contentSource=p,i.contentDestination=i.destination.content)}continue}if(!l){s.pop(),i.appendTo&&i.appendTo.appendChild(i.destination);continue}o.has(l)&&lo(),o.add(l);let u=ao(l,n);Z(l)||rr(l)?s.push({source:l,destination:u,appendTo:c,childIndex:0,cloningContent:!1}):c.appendChild(u)}return r}function lo(){throw new Error(\"Cannot clone a cyclic or repeated node graph\")}function tn(t,e){let n=String(e);return n===\"\"?null:Zt(t,[{type:Xt,name:n}])}function nn(t,e){let n=[...new Set(Gt(String(e)))];return Jt(t,n.map(r=>({type:Kt,name:r})))}function rn(t,e){let n=String(e),r=z(n),o=[];for(let s of on(t))Z(s)&&(n===\"*\"||(s.namespaceURI===I?s[C]===r:s[C]===n))&&o.push(s);return o}function on(t){let e=[],n=[],r=t[_];for(;r;){e.push(r);let o=r[_],s=r[x];o?(s&&n.push(s),r=o):r=s??n.pop()??null}return e}function Ot(t){let e=on(t);return e.unshift(t),e}var ae=class extends Oe{nodeType=Br;[C]=\"\";[ee]=null;[ve]=null;[_]=null;[$]=null;[x]=null;[B]=!1;get[G](){return this[H].defaultView[_e]}get localName(){return this[C]}get nodeName(){return this[C]}get ownerDocument(){return this[H]}get isConnected(){return this[B]}isDefaultNamespace(e){let n=ge(e);return Bs(this)===n}get parentNode(){return this[ee]}set parentNode(e){}get parentElement(){let e=this[ee];return!e||e.nodeType!==1?null:e}set parentElement(e){}get previousSibling(){return this[$]}set previousSibling(e){}get nextSibling(){return this[x]}set nextSibling(e){}get previousElementSibling(){let e=this[$];for(;e&&e.nodeType!==1;)e=e[$];return e}set previousElementSibling(e){}get nextElementSibling(){let e=this[x];for(;e&&e.nodeType!==1;)e=e[x];return e}set nextElementSibling(e){}get firstChild(){return this[_]}set firstChild(e){}get lastChild(){let e=this[_];for(;e;){let n=e[x];if(n==null)break;e=n}return e}set lastChild(e){}get nodeValue(){return vt(this)?this.data:null}set nodeValue(e){vt(this)&&(this.data=e)}get textContent(){if(vt(this))return this.data;let e=\"\";for(let n of on(this))or(n)&&(e+=n.data);return e}set textContent(e){if(vt(this))this.data=e;else if(co(this)){let n=e==null?\"\":String(e);n===\"\"?this.replaceChildren():this.replaceChildren(n)}}cloneNode(e){return en(this,e)}contains(e){let n=e;for(;n!=null;){if(n===this)return!0;n=n.parentNode}return!1}};function Bs(t){let e=t;for(;e;)switch(e.nodeType){case ne:{let n=e;if(n.prefix==null&&n.namespaceURI!=null)return n.namespaceURI;let r=n.attributes.getNamedItemNS(ht,\"xmlns\");if(r!=null&&r.prefix==null)return ge(r.value);e=n.parentElement;break}case Ie:e=e.documentElement;break;case Yr:case Se:return null;case We:e=e.ownerElement;break;default:e=e.parentElement}return null}var le=Symbol(\"insertNode\"),ar=Symbol(\"preflightInsertions\"),sn=Symbol(\"replaceNode\"),Ae=class extends ae{remove(){let e=this.parentNode;e&&e.removeChild(this)}replaceWith(...e){let n=Me(e),r=this.parentNode;if(r)return sr(o=>{ye(r,n);let s=this[x];for(;s&&n.includes(s);)s=s[x];let i=ir(r,n,o);this.parentNode===r?r[sn](i,this,o):r[le](i,s,o)})}before(...e){let n=Me(e),r=this.parentNode;if(r)return sr(o=>{ye(r,n);let s=this[$];for(;s&&n.includes(s);)s=s[$];let i=ir(r,n,o);r[le](i,s?s[x]:r.firstChild,o)})}after(...e){let n=Me(e),r=this.parentNode;if(r)return sr(o=>{ye(r,n);let s=this[x];for(;s&&n.includes(s);)s=s[x];let i=ir(r,n,o);r[le](i,s,o)})}};function sr(t){return W(()=>{let e=[];try{t(e)}catch(n){try{De(e)}catch{}throw n}De(e)})}function Me(t){return t.map(e=>e instanceof ae?e:String(e))}function At(t,e){return e instanceof ae?e:t.ownerDocument.createTextNode(String(e))}function ye(t,e){for(let n of e){if(!(n instanceof ae))continue;let r=t;for(;r;){if(r===n)throw L(\"Cannot insert a node into itself or one of its descendants\",\"HierarchyRequestError\");r=r[ee]??r[ve]}}}function ir(t,e,n){let r=[];for(let s of e)r.push(At(t,s));if(r.length===1)return r[0];let o=t.ownerDocument.createDocumentFragment();o[ar](r);for(let s of r)o[le](s,null,n);return o}var an,lr=0,uo=0,fo=0,mo=0,Ke=!1,ur=!1,Rt=!1,ln=class{#t;#n=[];#e=new Set;#r=!1;constructor(e){if(typeof e!=\"function\")throw new TypeError(\"MutationObserver callback must be a function\");this.#t=e}observe(e,n={}){let r=Ys(n),o=an??=new WeakMap,s=o.get(e);s==null&&(s=new Map,o.set(e,s));let i=s.get(this);i==null?lr++:cr(i,-1),s.set(this,r),cr(r,1),this.#e.add(e)}disconnect(){let e=an;if(e!=null){for(let n of this.#e){let r=e.get(n),o=r?.get(this);o!=null&&(r.delete(this),lr--,cr(o,-1)),r?.size===0&&e.delete(n)}this.#e.clear(),this.#n.length=0,lr===0&&(an=void 0)}}takeRecords(){return this.#n.splice(0)}enqueue(e){this.#n.push(e),!this.#r&&(this.#r=!0,queueMicrotask(()=>{this.#r=!1;let n=this.takeRecords();n.length>0&&this.#t.call(this,n,this)}))}};function ce(t){let e=an;if(e==null)return;let n=new Map,r=t.target;for(;r;){let o=e.get(r);if(o)for(let[s,i]of o){if(r!==t.target&&!i.subtree)continue;let l=!1;if(t.type===\"attributes\"){if(!i.attributes||i.attributeFilter&&!i.attributeFilter.has(t.attributeName??\"\"))continue;l=i.attributeOldValue}else if(t.type===\"characterData\"){if(!i.characterData)continue;l=i.characterDataOldValue}else if(!i.childList)continue;n.set(s,n.get(s)===!0||l)}r=r.parentNode}for(let[o,s]of n)o.enqueue({addedNodes:t.addedNodes??new ie,attributeName:t.attributeName??null,attributeNamespace:t.attributeNamespace??null,nextSibling:t.nextSibling??null,oldValue:s?t.oldValue??null:null,previousSibling:t.previousSibling??null,removedNodes:t.removedNodes??new ie,target:t.target,type:t.type})}function cn(...t){let e=new ie;return e.push(...t),e}function Ys(t){if(t.attributes===!1&&(t.attributeOldValue||t.attributeFilter!=null))throw new TypeError(\"attributeOldValue and attributeFilter require attributes to be enabled\");if(t.characterData===!1&&t.characterDataOldValue)throw new TypeError(\"characterDataOldValue requires characterData to be enabled\");let e=t.attributes??(t.attributeOldValue===!0||t.attributeFilter!=null),n=t.characterData??t.characterDataOldValue===!0,r=t.childList===!0;if(!e&&!n&&!r)throw new TypeError(\"MutationObserver options must enable childList, attributes, or characterData\");return{attributes:e,attributeFilter:t.attributeFilter==null?void 0:new Set(t.attributeFilter.map(String)),attributeOldValue:t.attributeOldValue===!0,characterData:n,characterDataOldValue:t.characterDataOldValue===!0,childList:r,subtree:t.subtree===!0}}function cr(t,e){t.attributes&&(uo+=e),t.characterData&&(fo+=e),t.childList&&(mo+=e),Ke=uo>0,ur=fo>0,Rt=mo>0}var me=class extends Ae{childNodes=new ie;children=new ie;appendChild(e){return W(()=>this[le](e,null))}insertBefore(e,n){return W(()=>this[le](e,n||null))}append(...e){return W(()=>{let n=Me(e.filter(r=>r!=null));n.length>1&&ye(this,n);for(let r of n)this[le](At(this,r),null)})}prepend(...e){return W(()=>{let n=Me(e.filter(o=>o!=null));n.length>1&&ye(this,n);let r=this.firstChild;for(let o of n)this[le](At(this,o),r)})}replaceChildren(...e){return W(()=>{let n=Me(e.filter(o=>o!=null));ye(this,n);let r;for(;r=this.firstChild;)this.removeChildImmediately(r);for(let o of n)this[le](At(this,o),null)})}removeChild(e){return W(()=>(this.removeChildImmediately(e),e))}removeChildImmediately(e){if(e.parentNode!==this)throw L(\"The node is not a child of this node\",\"NotFoundError\");let n=this[B]?Ot(e):void 0,r=e[$],o=e[x],s=un(this,e);if(n)for(let i of n)i[B]=!1;this.queueRemovalMutationRecord(this,e,r,o),n&&this.enqueueTreeReactions(n,\"disconnectedCallback\"),De(this.collectRemovalHookEffects(e,s))}replaceChild(e,n){return W(()=>this[sn](e,n))}[sn](e,n,r){if(ye(this,[e]),n.parentNode!==this)throw L(\"The reference node is not a child of this parent\",\"NotFoundError\");let o=n[$],s=n[x],i=this.prepareInsertion(e),l=this[B]?Ot(n):void 0,c=new Set(i.map(({node:d})=>d)),u=s;for(;u&&c.has(u);)u=u[x];let p=un(this,n);if(l){for(let E of l)E[B]=!1;let d=new Set(l);for(let E of i)d.has(E.node)&&(E.shouldDisconnect=!1)}this.commitInsertion(i,u);let w=this[B];return this.queueRemovalMutationRecord(this,n,o,s),this.queueInsertionMutationRecords(i),l&&this.enqueueTreeReactions(l,\"disconnectedCallback\"),this.enqueueInsertionReactions(i,w),this.performOrCollectHookEffects([...this.collectRemovalHookEffects(n,p),...this.collectInsertionHookEffects(i)],r),n}querySelectorAll(e){return Jt(this,e)}querySelector(e){return Zt(this,e)}[le](e,n,r){return this.validateInsertion(e,n),this.insertIntoValidated(e,n,r),e}[ar](e){for(let n of e)this.validateInsertion(n,null),this.prepareInsertion(n)}validateInsertion(e,n){if(ye(this,[e]),n&&n.parentNode!==this)throw L(\"The reference node is not a child of this parent\",\"NotFoundError\")}insertIntoValidated(e,n,r){e===n&&(n=e[x]);let o=this.prepareInsertion(e);this.commitInsertion(o,n);let s=this[B];this.queueInsertionMutationRecords(o),this.enqueueInsertionReactions(o,s),this.performOrCollectHookEffects(this.collectInsertionHookEffects(o),r)}performOrCollectHookEffects(e,n){n?n.push(...e):De(e)}prepareInsertion(e){let n=[];if(e.nodeType===Se){let i=e[_];for(;i;)n.push(i),i=i[x]}else n.push(e);let r=this[B],o=this[H],s=[];for(let i of n){let l=i[B],c=l||r,u,p;if(i[H]===o)c&&(u=Ot(i));else{let w=Qt(i);p=w.nodes,c&&(u=w.treeNodes)}s.push({node:i,nodes:u,adoption:p,shouldDisconnect:l})}return s}commitInsertion(e,n){for(let s of e){let i=s.node[ee];if(i){let l=s.node[$],c=s.node[x];s.source={parent:i,index:un(i,s.node),previousSibling:l,nextSibling:c}}}for(let s of e){let i=this.attachChild(s.node,n);s.insertIndex=i.index,s.previousSibling=i.previousSibling,s.nextSibling=i.nextSibling}let r=this[H];for(let{adoption:s}of e)s&&St(s,r);let o=this[B];for(let{nodes:s}of e)if(s)for(let i of s)i[B]=o}attachChild(e,n){if(n){let s=n[$];e[x]=n,e[$]=s,s?s[x]=e:this[_]=e,n[$]=e}else{e[x]=null;let s=this[_];if(s){let i;for(;i=s[x];)s=i;s[x]=e,e[$]=s}else this[_]=e,e[$]=null}let r=Z(e);e[ee]=this;let o;if(n){if(o=this.childNodes.indexOf(n),this.childNodes.splice(o,0,e),r){let s=n;for(;s&&!Z(s);)s=s[x];s?this.children.splice(this.children.indexOf(s),0,e):this.children.push(e)}}else o=this.childNodes.length,this.childNodes.push(e),r&&this.children.push(e);return{index:o,previousSibling:e[$],nextSibling:e[x]}}queueRemovalMutationRecord(e,n,r,o){Rt&&ce({type:\"childList\",target:e,removedNodes:cn(n),previousSibling:r,nextSibling:o})}queueInsertionMutationRecords(e){if(Rt)for(let n of e){let{node:r,source:o}=n;o&&this.queueRemovalMutationRecord(o.parent,r,o.previousSibling,o.nextSibling),ce({type:\"childList\",target:this,addedNodes:cn(r),previousSibling:n.previousSibling,nextSibling:n.nextSibling})}}collectRemovalHookEffects(e,n){return this.nodeType!==ne||bt(this)?[]:[[()=>this[G].removeChild?.(this,e,n)]]}collectInsertionHookEffects(e){let n=[];for(let r of e){let{node:o,source:s}=r;s?.parent.nodeType===ne&&!bt(s.parent)&&n.push([()=>s.parent[G].removeChild?.(s.parent,o,s.index)]),this.nodeType===ne&&!bt(this)&&n.push([()=>this[G].insertChild?.(this,o,r.insertIndex),o])}return n}enqueueInsertionReactions(e,n){for(let r of e){let{nodes:o}=r;o&&(r.shouldDisconnect&&this.enqueueTreeReactions(o,\"disconnectedCallback\"),n&&this.enqueueTreeReactions(o,\"connectedCallback\"))}}enqueueTreeReactions(e,n){ho(e,n)}};function po(t,e,n,r){if(e.parentNode!==t)throw Error(\"not a child of this node\");let o=t[B]?n.treeNodes:void 0,s=e[$],i=e[x],l=un(t,e);if(o)for(let u of o)u[B]=!1;St(n.nodes,r),Rt&&ce({type:\"childList\",target:t,removedNodes:cn(e),previousSibling:s,nextSibling:i}),o&&ho(o,\"disconnectedCallback\");let c=[];t.nodeType===ne&&!bt(t)&&c.push([()=>t[G].removeChild?.(t,e,l)]),De(c)}function un(t,e){let n=e[$],r=e[x];n?n[x]=r:t[_]=r,r&&(r[$]=n);let o=t.childNodes.indexOf(e);return t.childNodes.splice(o,1),Z(e)&&t.children.splice(t.children.indexOf(e),1),e[ee]=null,e[x]=null,e[$]=null,o}function ho(t,e){for(let n of t){let r=n[e];typeof r==\"function\"&&Ft(n,()=>r.call(n))}}function kt(t,e,n,r,o){let{observedAttributes:s}=t.constructor,{attributeChangedCallback:i}=t;i==null||s==null||!s.includes(e)||Ft(t,()=>i.call(t,e,n,r,o))}var dn=class{[_]=null;constructor(e){this[Q]=e}getNamedItem(e){let n=String(e),r=this[Q][P]===I?z(n):n,o=this[_];for(;o;){if(o.name===r)return o;o=o[x]}return null}getNamedItemNS(e,n){let r=ge(e),o=String(n),s=this[_];for(;s;){if(s.localName===o&&s[P]===r)return s;s=s[x]}return null}item(e){let n=this[_],r=0;for(;n;){if(r++===e)return n;n=n[x]}return null}get length(){let e=0,n=this[_];for(;n;)e++,n=n[x];return e}removeNamedItem(e){let n=String(e),r=this[Q][P]===I?z(n):n;return W(()=>this.removeNamedItemImmediately(o=>o.name===r))}removeNamedItemNS(e,n){let r=ge(e),o=String(n);return W(()=>this.removeNamedItemImmediately(s=>s.localName===o&&s[P]===r))}removeNamedItemImmediately(e){let n=this[Q],r=this[_],o=null;for(;r!=null;){if(e(r)){o&&(o[x]=r[x]),this[_]===r&&(this[_]=r[x]);let s=r.value;return r[x]=null,r[Q]=null,Ke&&ce({type:\"attributes\",target:n,attributeName:r.name,attributeNamespace:r[P],oldValue:s}),n[G].removeAttribute?.(n,r.name,r[P]),kt(n,r.localName,s,null,r[P]),r}o=r,r=r[x]}return null}setNamedItem(e){return W(()=>this.setNamedItemImmediately(e))}setNamedItemImmediately(e){let n=this[Q],r=e[Q];if(r!=null&&r!==n)throw L(\"The attribute is already in use by another element.\",\"InUseAttributeError\");let o=null,s=this[_],i=null;for(;s;){if(s.localName===e.localName&&s[P]===e[P]){if(s===e)return s;i?i[x]=e:this[_]=e,e[x]=s[x],s[x]=null,o=s;break}i=s,s=s[x]}o==null&&(i?i[x]=e:this[_]=e),e[Q]=n,e[H]=n[H],o&&(o[Q]=null);let l=o==null||o.value!==e.value,c=o!=null&&o.name!==e.name;return l&&Ke&&ce({type:\"attributes\",target:n,attributeName:e.name,attributeNamespace:e[P],oldValue:o?.value??null}),c&&n[G].removeAttribute?.(n,o.name,o[P]),(l||c)&&n[G].setAttribute?.(n,e.name,e.value,e[P]),l&&kt(n,e.localName,o?.value??null,e.value,e[P]),o}setNamedItemNS(e){return this.setNamedItem(e)}*[Symbol.iterator](){let e=this[_];for(;e;)yield e,e=e[x]}};var Le=class extends ae{nodeType=We;[P]=null;[x]=null;[Q]=null;constructor(e,n,r){super(),this[C]=e,this[xe]=n,r&&(this[P]=r)}get nodeName(){return this[C]}set nodeName(e){}get name(){return this[C]}set name(e){}get localName(){if(this[P]==null)return this[C];let e=this[C].indexOf(\":\");return e<0?this[C]:this[C].slice(e+1)}get prefix(){if(this[P]==null)return null;let e=this[C].indexOf(\":\");return e<0?null:this[C].slice(0,e)}get value(){return this[xe]}set value(e){let n=String(e),r=this[Q];if(!r){this[xe]=n;return}W(()=>{let o=this[xe];this[xe]=n,Ke&&o!==n&&ce({type:\"attributes\",target:r,attributeName:this[C],attributeNamespace:this[P],oldValue:o}),this[G].setAttribute?.(r,this[C],n,this[P]),kt(r,this.localName,o,n,this[P])})}get nodeValue(){return this.value}set nodeValue(e){this.value=e}get ownerElement(){return this[Q]}get namespaceURI(){return this[P]}get specified(){return!0}};var Ws={amp:\"&\",AMP:\"&\",apos:\"'\",gt:\">\",GT:\">\",lt:\"<\",LT:\"<\",quot:'\"',QUOT:'\"'},qs=new Set([\"area\",\"base\",\"br\",\"col\",\"embed\",\"hr\",\"img\",\"input\",\"link\",\"meta\",\"param\",\"source\",\"track\",\"wbr\"]),Xs=/(?:<([a-z][a-z0-9-:]*)((?:[\\s]+[^<>'\"=/\\s]+(?:=(['\"])[^]*?\\3|=[^>'\"\\s]*|))*)[\\s]*(\\/?)\\s*>|<\\/([a-z][a-z0-9-:]*)>|<!--(.*?)-->|([^<>]+))/gi,bo=/\\s([^<>'\"=/\\n\\s]+)(?:=([\"'])([\\s\\S]*?)\\2|=([^>'\"\\n\\s]*)|)/g,Ks=\"|b|big|blockquote|body|br|center|code|dd|div|dl|dt|em|embed|h1|h2|h3|h4|h5|h6|head|hr|i|img|li|listing|menu|meta|nobr|ol|p|pre|ruby|s|small|span|strong|strike|sub|sup|table|tt|u|ul|var|\",Zs=/^(?:color|face|size)$/i;function go(t){return t.replace(/&(?:(amp|AMP|apos|gt|GT|lt|LT|quot|QUOT)|#(\\d+)|#[xX]([\\da-fA-F]+));/g,(e,n,r,o)=>{if(n)return Ws[n];let s=Number.parseInt(r??o,r?10:16);try{return String.fromCodePoint(s)}catch{return e}})}function Eo(t){return t.namespaceURI===I&&qs.has(t.localName)}function yo(t){let e=t.localName;return t[P]===se&&(e===\"foreignObject\"||e===\"desc\"||e===\"title\")}function Js(t,e){if(Ks.includes(`|${t}|`))return!0;if(t!==\"font\")return!1;for(let n of e.matchAll(bo))if(Zs.test(n[1]))return!0;return!1}function fn(t,e){let n=e.ownerDocument,r=n.createDocumentFragment(),o=[],s=r;for(let i of t.matchAll(Xs)){let l=i[1];if(l){let c=i[2],u=z(l),p=o[o.length-1]?.element??e,w=p[P]===se?se:I;if(u===\"svg\")w=se;else if(w===se){if(yo(p))w=I;else if(Js(u,c)){for(;o.length>0;){let N=o[o.length-1];if(N.element[P]!==se||yo(N.element))break;o.pop(),s=N.target}w=I}}let d=w===I?u:l,E=n[Ye](d,w,null,d);for(let N of c.matchAll(bo))E.setAttribute(N[1],go(N[3]||N[4]||\"\"));if(s.append(E),Eo(E)||w!==I&&i[4])continue;o.push({element:E,target:s}),s=w===I&&u===\"template\"?E.content:E}else if(i[5]){let c=z(i[5]);for(let u=o.length-1;u>=0;u--){let p=o[u],w=z(p.element[C]);if(w===c){s=p.target,o.length=u;break}if(p.element[P]===I&&w===\"template\")break}}else i[6]?s.append(n.createComment(i[6])):s.append(go(i[7]))}return r}function mn(t){return wo([{type:\"content\",child:t[_]}])}function No(t){return wo([{type:\"opening\",node:t}])}function wo(t){let e=[],n;for(;n=t.pop();)switch(n.type){case\"opening\":{let r=n.node;switch(r.nodeType){case ne:{let o=r;e.push(`<${o[C]}`);let s=o[fe]?.[_];for(;s;){e.push(` ${s[C]}`);let l=s[xe];l!==\"\"&&(l=String(l).replace(/&/g,\"&\").replace(/\"/g,\""\"),e.push(`=\"${l}\"`)),s=s[x]}if(e.push(\">\"),Eo(o))break;let i=o.namespaceURI===I&&o.localName===\"template\"?o[he]:o;t.push({type:\"closing\",name:o[C]}),t.push({type:\"content\",child:i?.[_]??null});break}case qe:{let o=r;e.push(o[oe].replace(/&/g,\"&\").replace(/\"/g,\""\").replace(/</g,\"<\").replace(/>/g,\">\"));break}case Xe:{let o=r;e.push(`<!--${o[oe]}-->`);break}}break}case\"content\":{let r=n.child;r&&(t.push({type:\"content\",child:r[x]}),t.push({type:\"opening\",node:r}));break}case\"closing\":e.push(`</${n.name}>`);break}return e.join(\"\")}var F=class extends me{nodeType=ne;[P]=I;[Te]=null;get namespaceURI(){return this[P]}get prefix(){return this[Te]}get localName(){let e=this[Te];return e==null?this[C]:this[C].slice(e.length+1)}get nodeName(){return this[P]===I?qr(this[C]):this[C]}get tagName(){return this.nodeName}get id(){return this.getAttributeNS(null,\"id\")??\"\"}set id(e){this.setAttribute(\"id\",String(e))}get slot(){return this.getAttributeNS(null,\"slot\")??\"\"}set slot(e){let n=String(e);this.getAttributeNS(null,\"slot\")!==n&&this.attributes.setNamedItem(new Le(\"slot\",n))}get attributes(){let e=this[fe];return e||(e=new dn(this),this[fe]=e),e}getAttributeNames(){return[...this.attributes].map(e=>e.name)}getElementsByTagName(e){return rn(this,e)}get firstElementChild(){return this.children[0]??null}getElementsByClassName(e){return nn(this,e)}get lastElementChild(){return this.children[this.children.length-1]??null}get nextElementSibling(){let e=this.nextSibling;for(;e&&e.nodeType!==1;)e=e.nextSibling;return e}get previousElementSibling(){let e=this.previousSibling;for(;e&&e.nodeType!==1;)e=e.previousSibling;return e}setAttribute(e,n){let r=String(e),o=String(n);Yn(r);let s=this[P]===I?z(r):r,i=this.attributes.getNamedItemNS(null,s);i?i.value=o:this.attributes.setNamedItem(new Le(s,o))}setAttributeNS(e,n,r){let o=ge(e),s=String(n),i=String(r),l=Ut(o,s,\"attribute\"),c=this.attributes.getNamedItemNS(l.namespace,l.localName);c?c.value=i:this.attributes.setNamedItemNS(new Le(l.qualifiedName,i,l.namespace))}toggleAttribute(e,n){let r=String(e);Yn(r);let o=this[P]===I?z(r):r,s=this.attributes.getNamedItemNS(null,o),i=n===void 0?void 0:!!n;return s==null?i===!1?!1:(this.attributes.setNamedItem(new Le(o,\"\")),!0):i===!0?!0:(this.attributes.removeNamedItemNS(null,o),!1)}getAttribute(e){let n=this.attributes.getNamedItem(e);return n&&n.value}getAttributeNS(e,n){let r=this.attributes.getNamedItemNS(e,n);return r&&r.value}hasAttribute(e){return this.attributes.getNamedItem(e)!=null}hasAttributeNS(e,n){return this.attributes.getNamedItemNS(e,n)!=null}removeAttribute(e){let n=String(e),r=this[P]===I?z(n):n;this.attributes.removeNamedItemNS(null,r)}removeAttributeNS(e,n){this.attributes.removeNamedItemNS(e,n)}get outerHTML(){return No(this)}get innerHTML(){return mn(this)}set innerHTML(e){if(e==null||e===\"\")this.replaceChildren();else{let n=fn(String(e),this);this.replaceChildren(n)}}};var Ze=class t extends F{[P]=se;get ownerSVGElement(){let e=null,n=this.parentNode;for(;n instanceof t;)e=n,n=n.parentNode;return e}};var Re=class extends Ae{[oe]=\"\";constructor(e){super(),this[oe]=e==null?\"\":String(e)}setData(e){let n=ur,r=n?this[oe]:null,o=\"\";e!=null&&(o=typeof e==\"string\"?e:String(e)),this[oe]=o,n&&r!==o&&ce({type:\"characterData\",target:this,oldValue:r}),this[G].setText?.(this,o)}get data(){return this[oe]}set data(e){this.setData(e)}};var Je=class extends Re{nodeType=qe;[C]=\"#text\"};var Qe=class extends Re{nodeType=Xe;[C]=\"#comment\"};var et=class extends me{nodeType=Se;[C]=\"#document-fragment\";[H]=typeof window<\"u\"?window.document:null;getElementById(e){return tn(this,e)}};var tt=class extends F{get content(){let e=this[he];return e||(e=this.ownerDocument.createDocumentFragment(),e[ve]=this,this[he]=e),e}set content(e){}set innerHTML(e){this.content.replaceChildren(fn(String(e),this))}get innerHTML(){let e=this[he];return e?mn(e):\"\"}};var pn=class extends F{};var hn=class extends F{};var gn=class extends F{};var Ct=class extends me{nodeType=Ie;[C]=\"#document\";[B]=!0;constructor(e){super(),this.defaultView=e,this[H]=this,this.documentElement=bn(new gn,this,\"html\"),this.body=bn(new pn,this,\"body\"),this.head=bn(new hn,this,\"head\"),this.appendChild(this.documentElement),this.documentElement.appendChild(this.head),this.documentElement.appendChild(this.body)}get textContent(){return null}set textContent(e){}getElementsByClassName(e){return nn(this,e)}createElement(e){let n=String(e);return Zr(n),dr(this,z(n))}createElementNS(e,n){let r=Ut(e,n,\"element\");return dr(this,r.qualifiedName,r.namespace,r.prefix,r.localName)}[Ye](e,n,r,o){return dr(this,e,n,r,o)}createTextNode(e){let n=yn(new Je(e),this);return this[G].createText?.(n,n.data),n}createComment(e){return yn(new Qe(e),this)}createDocumentFragment(){return yn(new et,this)}createEvent(){return new Y(\"\")}getElementById(e){return tn(this,e)}getElementsByTagName(e){return rn(this,e)}importNode(e,n){if(e.nodeType===Ie)throw L(\"Cannot import a document node\",\"NotSupportedError\");return en(e,n,this)}adoptNode(e){if(e[H]===this)return e;let n=Qt(e);return W(()=>{let r=e.parentNode;return r?po(r,e,n,this):St(n.nodes,this),e})}};function yn(t,e){return Object.defineProperty(t,H,{value:e,writable:!0,enumerable:!1}),t}function dr(t,e,n=I,r=null,o=e){let s;if(n===se)s=new Ze;else if(n===I&&o===\"template\")s=new tt;else if(n===I){let i=t.defaultView.customElements.get(o);s=i?new i:new F}else s=new F;return bn(s,t,e,n,r)}function bn(t,e,n,r=I,o=null){return yn(t,e),Object.defineProperties(t,{[C]:{value:n},[P]:{value:r},[Te]:{value:o}}),e[G].createElement?.(t,r),t}var En=class extends Y{constructor(e,n){super(e,n),this.detail=n?.detail??null}initCustomEvent(e,n,r,o){super.initEvent(e,n,r),this.detail=o??null}};var Nn=class extends Y{constructor(e,n){super(e,n),this.message=n.message,this.filename=n.filename,this.lineno=n.lineno,this.colno=n.colno,this.error=n.error}};var wn=class extends Y{constructor(e,n){super(e,n),this.promise=n.promise,this.reason=n.reason}};var Tn=class extends Y{constructor(e,n){super(e,n),this.oldState=n.oldState,this.newState=n.newState}};var xn=class extends Y{constructor(e,n={}){super(e,n),this.relatedTarget=n.relatedTarget??null}};var vn=class extends Y{constructor(e,n={}){super(e,n),this.clipboardData=n.clipboardData??null}};var Sn=class extends F{};var Qs=/^[a-z][^A-Z\\u0000\\t\\n\\f\\r />]*-[^A-Z\\u0000\\t\\n\\f\\r />]*$/u,ei=new Set([\"annotation-xml\",\"color-profile\",\"font-face\",\"font-face-src\",\"font-face-uri\",\"font-face-format\",\"font-face-name\",\"missing-glyph\"]);function To(t){return Qs.test(t)&&!ei.has(t)}function xo(t){return L(`Invalid custom element name: \"${t}\"`,\"SyntaxError\")}var On=class{registry=new Map;listenersByName=new Map;define(e,n,r){if(!To(e))throw xo(e);if(this.registry.has(e))throw L(`A custom element named \"${e}\" has already been defined`,\"NotSupportedError\");if(this.getName(n)!=null)throw L(\"This constructor has already been registered in this custom element registry\",\"NotSupportedError\");this.registry.set(e,n);let o=this.listenersByName.get(e);if(o!=null){this.listenersByName.delete(e);for(let s of o)s(n)}}get(e){return this.registry.get(e)}getName(e){for(let[n,r]of this.registry)if(r===e)return n;return null}whenDefined(e){if(!To(e))return Promise.reject(xo(e));let n=this.registry.get(e);if(n!=null)return Promise.resolve(n);let r=this.listenersByName.get(e);return r==null&&(r=[],this.listenersByName.set(e,r)),new Promise(o=>{r.push(o)})}upgrade(e){}initialize(e){}};var ti=[\"onerror\",\"onunhandledrejection\"],So=Symbol.for(\"@remote-dom/polyfill/global-property\");function Oo(t){return Object.getOwnPropertyDescriptors(t)}function Ao(t){let e={};for(let[n,r]of Object.entries(Object.getOwnPropertyDescriptors(Oe.prototype)))n!==\"constructor\"&&typeof r.value==\"function\"&&(r.value=fr(r.value.bind(t)),e[n]=r);return e}function Ro(t){let e={};for(let n of ti)e[n]={configurable:!0,enumerable:!0,get:fr(()=>t[n]),set:fr(r=>{t[n]=r})};return e}function ni(t){return Object.assign(Oo(t),Ao(t),Ro(t))}function fr(t){return Object.defineProperty(t,So,{value:!0}),t}function vo(t,e){for(let n of Reflect.ownKeys(e)){let r=ri(t,n);(r==null||oi(r))&&Object.defineProperty(t,n,e[n])}}function ri(t,e){let n=t;for(;n;){let r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function oi(t){return[t.value,t.get,t.set].some(e=>typeof e==\"function\"&&e[So]===!0)}var He=class extends Oe{[G]={};[$t]=[];[_e]=ii(this);name=\"\";window=this;parent=this;self=this;top=this;document=new Ct(this);customElements=new On;location=globalThis.location;navigator=globalThis.navigator;Event=Y;ErrorEvent=Nn;PromiseRejectionEvent=wn;ToggleEvent=Tn;FocusEvent=xn;ClipboardEvent=vn;EventTarget=Oe;CustomEvent=En;Node=ae;ParentNode=me;ChildNode=Ae;DocumentFragment=et;Document=Ct;CharacterData=Re;Comment=Qe;Text=Je;Element=F;HTMLElement=Sn;SVGElement=Ze;HTMLTemplateElement=tt;MutationObserver=ln;#t=null;#n=null;#e=null;static with(...e){let n=this;return class extends n{constructor(){super();for(let o of e)si(this,o)}}}get onerror(){return this.#n}set onerror(e){this.#t&&this.removeEventListener(\"error\",this.#t),e&&typeof e==\"function\"?(this.#n=e,this.#t=n=>{e(n.message??\"Error\",n.filename,n.lineno,n.colno,n.error)},this.addEventListener(\"error\",this.#t)):(this.#t=null,this.#n=null)}get onunhandledrejection(){return this.#e}set onunhandledrejection(e){this.#e&&this.removeEventListener(\"unhandledrejection\",this.#e),e&&typeof e==\"function\"?(this.#e=e,this.addEventListener(\"unhandledrejection\",this.#e)):this.#e=null}static setGlobal(e){let n=globalThis.self,r=globalThis.window,o=Oo(e),s=Object.assign(Ao(e),Ro(e));delete o.self,Object.defineProperties(globalThis,o),vo(globalThis,s),typeof n>\"u\"||n===r&&n!==globalThis?Object.defineProperty(globalThis,\"self\",{value:e,configurable:!0,writable:!0,enumerable:!0}):n!==globalThis&&(Object.defineProperties(n,o),vo(n,s))}static setGlobalThis(e){for(let n in e)e[n]===e&&(e[n]=globalThis);Object.defineProperties(globalThis,ni(e))}};function si(t,e){t[$t].push(e(t)??{})}function ii(t){return{createElement:be.bind(null,t,\"createElement\"),setAttribute:be.bind(null,t,\"setAttribute\"),removeAttribute:be.bind(null,t,\"removeAttribute\"),createText:be.bind(null,t,\"createText\"),setText:be.bind(null,t,\"setText\"),insertChild:be.bind(null,t,\"insertChild\"),removeChild:be.bind(null,t,\"removeChild\"),addEventListener:be.bind(null,t,\"addEventListener\"),removeEventListener:be.bind(null,t,\"removeEventListener\")}}function be(t,e,...n){for(let s of t[$t])s[e]?.apply(s,n);let r=t[G];r[e]?.apply(r,n)}var An=new He;var mr=\"~\";var ke=new WeakMap;function nt(t){return ke.get(t)}var yr=new WeakMap,li=0;function ue(t){let e=yr.get(t);return e==null&&(e=String(li++),Rn(t,e)),e}function Rn(t,e){yr.set(t,e)}var hr=new WeakMap;function ci(t){return hr.get(t)}var gr=new WeakMap;function ui(t){let e=gr.get(t);if(e!=null)return e;if(!(!(t instanceof Element)||t.tagName.includes(\"-\"))){e={};for(let{name:n,value:r}of t.attributes)e[n]=r;return e}}var di=new WeakMap;function fi(t){return di.get(t)}function br(t,e,n){let r=hr.get(t);if(r==null&&(r={},hr.set(t,r)),r[e]===n)return;r[e]=n;let o=ke.get(t);o?.mutate([[3,ue(t),e,n,1]])}function Ce(t,e,n){let r=gr.get(t);if(r==null&&(r={},gr.set(t,r)),r[e]===n)return;n==null?delete r[e]:r[e]=String(n);let o=ke.get(t);o?.mutate([[3,ue(t),e,n,2]])}function rt(t,e){if(ke.get(t)!==e&&(ke.set(t,e),t.childNodes))for(let r=0;r<t.childNodes.length;r++)rt(t.childNodes[r],e)}function kn(t){if(ke.get(t)!=null&&(ke.delete(t),t.childNodes))for(let n=0;n<t.childNodes.length;n++)kn(t.childNodes[n])}function ot(t){let{nodeType:e}=t;switch(e){case 1:return{id:ue(t),type:e,element:t.localName,properties:pr(ci(t)),attributes:pr(ui(t)),eventListeners:pr(fi(t)),children:Array.from(t.childNodes).map(ot)};case 3:case 8:return{id:ue(t),type:e,data:t.data};default:throw new Error(`Cannot serialize node of type ${t.nodeType} (${typeof t.nodeType})`)}}function pr(t){return t?{...t}:void 0}function Er(t,e,...n){let r=yr.get(t),o=ke.get(t);if(r==null||o==null)throw new Error(`Cannot call method ${e} on an unconnected node`);return o.call(r,e,...n)}var st=An[G];st.insertChild=(t,e,n)=>{let r=nt(t);r!=null&&(rt(e,r),r.mutate([[0,ue(t),ot(e),n]]))};st.removeChild=(t,e,n)=>{let r=nt(t);r!=null&&(kn(e),r.mutate([[1,ue(t),n]]))};st.setText=(t,e)=>{let n=nt(t);n?.mutate([[2,ue(t),e]])};st.setAttribute=(t,e,n)=>{t.tagName.includes(\"-\")||Ce(t,e,n)};st.removeAttribute=(t,e)=>{t.tagName.includes(\"-\")||Ce(t,e)};He.setGlobal(An);var Po=[\"globalThis\",\"Infinity\",\"NaN\",\"undefined\",\"isFinite\",\"isNaN\",\"parseFloat\",\"parseInt\",\"decodeURI\",\"decodeURIComponent\",\"encodeURI\",\"encodeURIComponent\",\"escape\",\"unescape\",\"Object\",\"Function\",\"Array\",\"Number\",\"Boolean\",\"String\",\"Symbol\",\"BigInt\",\"Date\",\"Promise\",\"RegExp\",\"Math\",\"JSON\",\"Reflect\",\"Proxy\",\"Intl\",\"Error\",\"AggregateError\",\"EvalError\",\"RangeError\",\"ReferenceError\",\"SyntaxError\",\"TypeError\",\"URIError\",\"SuppressedError\",\"Map\",\"Set\",\"WeakMap\",\"WeakSet\",\"WeakRef\",\"FinalizationRegistry\",\"Iterator\",\"AsyncIterator\",\"DisposableStack\",\"AsyncDisposableStack\",\"ArrayBuffer\",\"SharedArrayBuffer\",\"DataView\",\"Atomics\",\"Int8Array\",\"Uint8Array\",\"Uint8ClampedArray\",\"Int16Array\",\"Uint16Array\",\"Int32Array\",\"Uint32Array\",\"Float16Array\",\"Float32Array\",\"Float64Array\",\"BigInt64Array\",\"BigUint64Array\"],_o=[\"window\",\"parent\",\"top\",\"document\",\"customElements\",\"Event\",\"ErrorEvent\",\"PromiseRejectionEvent\",\"ToggleEvent\",\"FocusEvent\",\"ClipboardEvent\",\"CustomEvent\",\"EventTarget\",\"Node\",\"ParentNode\",\"ChildNode\",\"DocumentFragment\",\"Document\",\"CharacterData\",\"Comment\",\"Text\",\"Element\",\"HTMLElement\",\"SVGElement\",\"HTMLTemplateElement\",\"MutationObserver\"],Io=[\"self\",\"postMessage\",\"setTimeout\",\"clearTimeout\",\"setInterval\",\"clearInterval\",\"queueMicrotask\",\"structuredClone\",\"crypto\",\"console\",\"DOMException\"],Do=[\"TEMPORARY\",\"PERSISTENT\"],Su=Object.freeze([...Po,..._o,...Io,...Do]),Ou=Object.freeze([\"constructor\",\"__defineGetter__\",\"__defineSetter__\",\"hasOwnProperty\",\"__lookupGetter__\",\"__lookupSetter__\",\"isPrototypeOf\",\"propertyIsEnumerable\",\"toString\",\"valueOf\",\"__proto__\",\"toLocaleString\"]),Co=t=>typeof t==\"symbol\"?`[${t.description??\"symbol\"}]`:t;function Mo(t=globalThis,e=[],n={}){let r=[],o=[],s=new Set([...Po,..._o,...Io,...e,\"constructor\",Symbol.toStringTag]),i=(m,f)=>{let b=Reflect.getOwnPropertyDescriptor(m,f);return b===void 0||!(\"value\"in b)||b.writable||b.configurable?!1:n.primitivesStay&&typeof f==\"symbol\"&&(typeof b.value!=\"object\"||b.value===null)&&typeof b.value!=\"function\"?!0:Do.includes(f)&&typeof b.value==\"number\"},l=t,c=l.setTimeout,u=l.setInterval,p=l.crypto,w=(m,f)=>function(b,O,...D){if(typeof b!=\"function\")throw new TypeError(`${f} takes a function: a guest view cannot run code from text`);return m.call(t,b,O,...D)},d=p?Object.freeze({getRandomValues:m=>p.getRandomValues(m)}):void 0,E=l.document?.defaultView;if(E&&E!==l)for(let m of Reflect.ownKeys(E))typeof m==\"symbol\"||s.has(m)||Reflect.deleteProperty(E,m)||o.push(`window.${m}`);let N=[];for(let m=t;m&&m!==Object.prototype;m=Object.getPrototypeOf(m))N.push(m);for(let m of N)for(let f of Reflect.ownKeys(m))s.has(f)||(Reflect.deleteProperty(m,f)?r.push(Co(f)):i(m,f)||o.push(Co(f)));let v=()=>function(){throw new EvalError(\"A guest view cannot make code from text.\")},g=[Function.prototype,Object.getPrototypeOf(async function(){}),Object.getPrototypeOf(function*(){}),Object.getPrototypeOf(async function*(){})];for(let m of g){let f=v();Object.defineProperty(f,\"prototype\",{value:m,writable:!1,enumerable:!1,configurable:!1}),Reflect.defineProperty(m,\"constructor\",{value:f,writable:!1,enumerable:!1,configurable:!1})||o.push(\"Function.prototype.constructor\"),m===Function.prototype&&Reflect.defineProperty(t,\"Function\",{value:f,writable:!0,enumerable:!1,configurable:!0})}let a=(m,f)=>{Reflect.defineProperty(t,m,{value:f,writable:!0,enumerable:!0,configurable:!0})||o.push(m)};a(\"setTimeout\",w(c,\"setTimeout\")),a(\"setInterval\",w(u,\"setInterval\")),d&&a(\"crypto\",d);for(let m of N.slice(1))Object.freeze(m);for(let m of Reflect.ownKeys(t)){let f=Reflect.getOwnPropertyDescriptor(t,m);Reflect.defineProperty(t,m,\"value\"in f?{...f,writable:!1,configurable:!1}:{...f,configurable:!1})}let h;try{h=Reflect.preventExtensions(t)}catch{h=!1}return{removed:r,stuck:o,sealed:h}}var Pt=class extends HTMLElement{constructor(){super(),Rn(this,mr)}connect(e){if(nt(this)===e||(rt(this,e),this.childNodes.length===0))return;let n=[];for(let r=0;r<this.childNodes.length;r++){let o=this.childNodes[r];n.push([0,mr,ot(o),r])}e.mutate(n)}updateRemoteProperty(e,n){br(this,e,n)}callRemoteMethod(e,...n){return Er(this,e,...n)}};var T={},Cn={empty:!0},mi={id:\"text\",class:\"text\",title:\"text\",lang:\"text\",dir:{oneOf:[\"ltr\",\"rtl\",\"auto\"]},hidden:\"text\",tabindex:{oneOf:[\"-1\",\"0\"]},role:\"text\",style:\"style\",translate:{oneOf:[\"yes\",\"no\"]},spellcheck:{oneOf:[\"true\",\"false\"]},draggable:{oneOf:[\"true\",\"false\"]},inert:\"boolean\"},at={div:T,section:T,article:T,aside:T,header:T,footer:T,nav:T,hgroup:T,search:T,address:T,figure:T,figcaption:T,blockquote:T,p:T,pre:T,hr:Cn,br:Cn,wbr:Cn,h1:T,h2:T,h3:T,h4:T,h5:T,h6:T,span:T,strong:T,em:T,b:T,i:T,u:T,s:T,small:T,mark:T,abbr:T,cite:T,q:T,code:T,kbd:T,samp:T,var:T,sub:T,sup:T,dfn:T,bdi:T,bdo:T,ruby:T,rt:T,rp:T,time:{attributes:{datetime:\"text\"}},data:{attributes:{value:\"text\"}},del:{attributes:{datetime:\"text\"}},ins:{attributes:{datetime:\"text\"}},a:T,ul:T,menu:T,dl:T,dt:T,dd:T,ol:{attributes:{start:\"number\",reversed:\"boolean\",type:{oneOf:[\"1\",\"a\",\"A\",\"i\",\"I\"]}}},li:{attributes:{value:\"number\"}},table:T,caption:T,thead:T,tbody:T,tfoot:T,tr:T,colgroup:{attributes:{span:\"number\"}},col:{attributes:{span:\"number\"},empty:!0},th:{attributes:{colspan:\"number\",rowspan:\"number\",headers:\"text\",scope:{oneOf:[\"row\",\"col\",\"rowgroup\",\"colgroup\"]},abbr:\"text\"}},td:{attributes:{colspan:\"number\",rowspan:\"number\",headers:\"text\"}},details:{attributes:{open:\"boolean\",name:\"text\"}},summary:T,button:{attributes:{type:{oneOf:[\"button\"]},disabled:\"boolean\",name:\"text\",value:\"text\"}},input:{empty:!0,attributes:{type:{oneOf:[\"text\",\"search\",\"number\",\"range\",\"checkbox\",\"radio\",\"date\",\"time\",\"datetime-local\",\"month\",\"week\",\"color\",\"email\",\"tel\",\"url\"]},name:\"text\",value:\"text\",placeholder:\"text\",min:\"text\",max:\"text\",step:\"text\",checked:\"boolean\",disabled:\"boolean\",readonly:\"boolean\",required:\"boolean\",maxlength:\"number\",minlength:\"number\",size:\"number\",pattern:\"text\",multiple:\"boolean\",inputmode:\"text\",enterkeyhint:\"text\"}},select:{attributes:{name:\"text\",disabled:\"boolean\",multiple:\"boolean\",required:\"boolean\",size:\"number\"}},option:{attributes:{value:\"text\",selected:\"boolean\",disabled:\"boolean\",label:\"text\"}},optgroup:{attributes:{label:\"text\",disabled:\"boolean\"}},textarea:{attributes:{name:\"text\",placeholder:\"text\",rows:\"number\",cols:\"number\",disabled:\"boolean\",readonly:\"boolean\",required:\"boolean\",maxlength:\"number\",minlength:\"number\",wrap:{oneOf:[\"soft\",\"hard\",\"off\"]}}},label:{attributes:{for:\"text\"}},fieldset:{attributes:{disabled:\"boolean\",name:\"text\"}},legend:T,output:T,meter:{attributes:{value:\"number\",min:\"number\",max:\"number\",low:\"number\",high:\"number\",optimum:\"number\"}},progress:{attributes:{value:\"number\",max:\"number\"}},img:{empty:!0,attributes:{src:\"image\",alt:\"text\",width:\"number\",height:\"number\",decoding:{oneOf:[\"async\",\"sync\",\"auto\"]}}},\"graview-video\":Cn},pi=[\"fill\",\"fill-opacity\",\"fill-rule\",\"stroke\",\"stroke-width\",\"stroke-linecap\",\"stroke-linejoin\",\"stroke-dasharray\",\"stroke-dashoffset\",\"stroke-opacity\",\"stroke-miterlimit\",\"opacity\",\"color\",\"display\",\"visibility\",\"transform-origin\",\"clip-path\",\"clip-rule\",\"marker-start\",\"marker-mid\",\"marker-end\",\"font-family\",\"font-size\",\"font-weight\",\"font-style\",\"text-anchor\",\"dominant-baseline\",\"alignment-baseline\",\"letter-spacing\",\"text-decoration\",\"paint-order\",\"vector-effect\",\"shape-rendering\",\"pointer-events\",\"stop-color\",\"stop-opacity\",\"overflow\",\"mask\"],hi={id:\"text\",class:\"text\",style:\"style\",lang:\"text\",role:\"text\",tabindex:{oneOf:[\"-1\",\"0\"]},transform:\"geometry\",...Object.fromEntries(pi.map(t=>[t,\"css\"]))},it={x:\"geometry\",y:\"geometry\",width:\"geometry\",height:\"geometry\"},Pn={viewBox:\"geometry\",preserveAspectRatio:\"geometry\"},Lo={gradientUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},gradientTransform:\"geometry\",spreadMethod:{oneOf:[\"pad\",\"reflect\",\"repeat\"]},href:\"fragment\"},_n={svg:{attributes:{...it,...Pn}},g:T,defs:T,symbol:{attributes:{...it,...Pn,refX:\"geometry\",refY:\"geometry\"}},use:{attributes:{...it,href:\"fragment\"}},title:T,desc:T,path:{attributes:{d:\"geometry\",pathLength:\"number\"}},rect:{attributes:{...it,rx:\"geometry\",ry:\"geometry\",pathLength:\"number\"}},circle:{attributes:{cx:\"geometry\",cy:\"geometry\",r:\"geometry\",pathLength:\"number\"}},ellipse:{attributes:{cx:\"geometry\",cy:\"geometry\",rx:\"geometry\",ry:\"geometry\",pathLength:\"number\"}},line:{attributes:{x1:\"geometry\",y1:\"geometry\",x2:\"geometry\",y2:\"geometry\",pathLength:\"number\"}},polyline:{attributes:{points:\"geometry\",pathLength:\"number\"}},polygon:{attributes:{points:\"geometry\",pathLength:\"number\"}},text:{attributes:{x:\"geometry\",y:\"geometry\",dx:\"geometry\",dy:\"geometry\",rotate:\"geometry\",textLength:\"geometry\",lengthAdjust:{oneOf:[\"spacing\",\"spacingAndGlyphs\"]}}},tspan:{attributes:{x:\"geometry\",y:\"geometry\",dx:\"geometry\",dy:\"geometry\",rotate:\"geometry\",textLength:\"geometry\"}},textPath:{attributes:{href:\"fragment\",startOffset:\"geometry\",method:{oneOf:[\"align\",\"stretch\"]},spacing:{oneOf:[\"auto\",\"exact\"]},side:{oneOf:[\"left\",\"right\"]}}},linearGradient:{attributes:{x1:\"geometry\",y1:\"geometry\",x2:\"geometry\",y2:\"geometry\",...Lo}},radialGradient:{attributes:{cx:\"geometry\",cy:\"geometry\",r:\"geometry\",fx:\"geometry\",fy:\"geometry\",fr:\"geometry\",...Lo}},stop:{attributes:{offset:\"geometry\"}},clipPath:{attributes:{clipPathUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]}}},mask:{attributes:{...it,maskUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},maskContentUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]}}},pattern:{attributes:{...it,...Pn,patternUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},patternContentUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},patternTransform:\"geometry\",href:\"fragment\"}},marker:{attributes:{...Pn,markerWidth:\"geometry\",markerHeight:\"geometry\",refX:\"geometry\",refY:\"geometry\",orient:\"geometry\",markerUnits:{oneOf:[\"strokeWidth\",\"userSpaceOnUse\"]}}}};var Ho=[\"alert\",\"alertdialog\",\"dialog\",\"banner\",\"main\",\"navigation\",\"contentinfo\",\"complementary\",\"search\",\"form\",\"region\",\"application\",\"status\",\"log\",\"marquee\",\"timer\"],_t={nav:\"div\",header:\"div\",footer:\"div\",aside:\"div\",search:\"div\",output:\"span\"},In={section:[\"aria-label\",\"aria-labelledby\",\"title\"]};function gi(t){return/^aria-[a-z]+$/.test(t)}function yi(t){return/^data-[a-z0-9][a-z0-9_.-]*$/.test(t)}var $o=[\"all\",\"display\",\"position\",\"top\",\"right\",\"bottom\",\"left\",\"inset\",\"inset-block\",\"inset-inline\",\"inset-block-start\",\"inset-block-end\",\"inset-inline-start\",\"inset-inline-end\",\"width\",\"height\",\"min-width\",\"min-height\",\"max-width\",\"max-height\",\"inline-size\",\"block-size\",\"min-inline-size\",\"min-block-size\",\"max-inline-size\",\"max-block-size\",\"margin\",\"margin-top\",\"margin-right\",\"margin-bottom\",\"margin-left\",\"margin-block\",\"margin-inline\",\"margin-block-start\",\"margin-block-end\",\"margin-inline-start\",\"margin-inline-end\",\"padding\",\"padding-top\",\"padding-right\",\"padding-bottom\",\"padding-left\",\"padding-block\",\"padding-inline\",\"padding-block-start\",\"padding-block-end\",\"padding-inline-start\",\"padding-inline-end\",\"box-sizing\",\"overflow\",\"overflow-x\",\"overflow-y\",\"overflow-wrap\",\"float\",\"clear\",\"z-index\",\"aspect-ratio\",\"object-fit\",\"object-position\",\"vertical-align\",\"isolation\",\"contain\",\"container\",\"container-type\",\"container-name\",\"content-visibility\",\"flex\",\"flex-direction\",\"flex-wrap\",\"flex-flow\",\"flex-grow\",\"flex-shrink\",\"flex-basis\",\"order\",\"grid\",\"grid-template\",\"grid-template-columns\",\"grid-template-rows\",\"grid-template-areas\",\"grid-auto-columns\",\"grid-auto-rows\",\"grid-auto-flow\",\"grid-area\",\"grid-column\",\"grid-row\",\"grid-column-start\",\"grid-column-end\",\"grid-row-start\",\"grid-row-end\",\"gap\",\"row-gap\",\"column-gap\",\"align-items\",\"align-content\",\"align-self\",\"justify-items\",\"justify-content\",\"justify-self\",\"place-items\",\"place-content\",\"place-self\",\"columns\",\"column-count\",\"column-width\",\"column-rule\",\"column-rule-color\",\"column-rule-style\",\"column-rule-width\",\"column-span\",\"column-fill\",\"color\",\"background\",\"background-color\",\"background-image\",\"background-position\",\"background-position-x\",\"background-position-y\",\"background-size\",\"background-repeat\",\"background-origin\",\"background-clip\",\"background-attachment\",\"background-blend-mode\",\"border\",\"border-top\",\"border-right\",\"border-bottom\",\"border-left\",\"border-block\",\"border-inline\",\"border-block-start\",\"border-block-end\",\"border-inline-start\",\"border-inline-end\",\"border-width\",\"border-style\",\"border-color\",\"border-top-width\",\"border-right-width\",\"border-bottom-width\",\"border-left-width\",\"border-top-style\",\"border-right-style\",\"border-bottom-style\",\"border-left-style\",\"border-top-color\",\"border-right-color\",\"border-bottom-color\",\"border-left-color\",\"border-radius\",\"border-top-left-radius\",\"border-top-right-radius\",\"border-bottom-right-radius\",\"border-bottom-left-radius\",\"border-start-start-radius\",\"border-start-end-radius\",\"border-end-start-radius\",\"border-end-end-radius\",\"border-collapse\",\"border-spacing\",\"outline\",\"outline-width\",\"outline-style\",\"outline-color\",\"outline-offset\",\"box-shadow\",\"opacity\",\"visibility\",\"mix-blend-mode\",\"filter\",\"backdrop-filter\",\"clip-path\",\"accent-color\",\"caret-color\",\"color-scheme\",\"appearance\",\"-webkit-appearance\",\"font\",\"font-family\",\"font-size\",\"font-weight\",\"font-style\",\"font-stretch\",\"font-variant\",\"font-variant-numeric\",\"font-variant-caps\",\"font-variant-ligatures\",\"font-feature-settings\",\"font-variation-settings\",\"font-kerning\",\"font-optical-sizing\",\"font-size-adjust\",\"font-synthesis\",\"line-height\",\"letter-spacing\",\"word-spacing\",\"text-align\",\"text-align-last\",\"text-indent\",\"text-transform\",\"text-decoration\",\"text-decoration-line\",\"text-decoration-color\",\"text-decoration-style\",\"text-decoration-thickness\",\"text-underline-offset\",\"text-underline-position\",\"text-shadow\",\"text-overflow\",\"text-wrap\",\"text-wrap-mode\",\"text-wrap-style\",\"white-space\",\"white-space-collapse\",\"word-break\",\"line-break\",\"hyphens\",\"tab-size\",\"direction\",\"unicode-bidi\",\"writing-mode\",\"text-orientation\",\"text-rendering\",\"-webkit-font-smoothing\",\"-webkit-line-clamp\",\"-webkit-box-orient\",\"line-clamp\",\"-webkit-text-fill-color\",\"-webkit-background-clip\",\"list-style\",\"list-style-type\",\"list-style-position\",\"content\",\"quotes\",\"counter-reset\",\"counter-increment\",\"counter-set\",\"table-layout\",\"caption-side\",\"empty-cells\",\"transform\",\"transform-origin\",\"transform-box\",\"transform-style\",\"translate\",\"rotate\",\"scale\",\"perspective\",\"perspective-origin\",\"backface-visibility\",\"transition\",\"transition-property\",\"transition-duration\",\"transition-timing-function\",\"transition-delay\",\"transition-behavior\",\"animation\",\"animation-name\",\"animation-duration\",\"animation-timing-function\",\"animation-delay\",\"animation-iteration-count\",\"animation-direction\",\"animation-fill-mode\",\"animation-play-state\",\"animation-composition\",\"will-change\",\"cursor\",\"pointer-events\",\"user-select\",\"-webkit-user-select\",\"touch-action\",\"resize\",\"scroll-behavior\",\"overscroll-behavior\",\"overscroll-behavior-x\",\"overscroll-behavior-y\",\"scroll-snap-type\",\"scroll-snap-align\",\"scroll-snap-stop\",\"scroll-margin\",\"scroll-padding\",\"scrollbar-width\",\"scrollbar-color\",\"scrollbar-gutter\",\"fill\",\"fill-opacity\",\"fill-rule\",\"stroke\",\"stroke-width\",\"stroke-linecap\",\"stroke-linejoin\",\"stroke-dasharray\",\"stroke-dashoffset\",\"stroke-opacity\",\"stroke-miterlimit\",\"stop-color\",\"stop-opacity\",\"clip-rule\",\"marker\",\"marker-start\",\"marker-mid\",\"marker-end\",\"paint-order\",\"vector-effect\",\"shape-rendering\",\"text-anchor\",\"dominant-baseline\",\"alignment-baseline\",\"r\",\"cx\",\"cy\",\"rx\",\"ry\",\"x\",\"y\",\"d\",\"mask\"],Go=[\"var\",\"env\",\"calc\",\"min\",\"max\",\"clamp\",\"round\",\"mod\",\"rem\",\"abs\",\"sign\",\"sin\",\"cos\",\"tan\",\"asin\",\"acos\",\"atan\",\"atan2\",\"pow\",\"sqrt\",\"hypot\",\"log\",\"exp\",\"rgb\",\"rgba\",\"hsl\",\"hsla\",\"hwb\",\"lab\",\"lch\",\"oklab\",\"oklch\",\"color\",\"color-mix\",\"light-dark\",\"linear-gradient\",\"radial-gradient\",\"conic-gradient\",\"repeating-linear-gradient\",\"repeating-radial-gradient\",\"repeating-conic-gradient\",\"translate\",\"translatex\",\"translatey\",\"translatez\",\"translate3d\",\"rotate\",\"rotatex\",\"rotatey\",\"rotatez\",\"rotate3d\",\"scale\",\"scalex\",\"scaley\",\"scalez\",\"scale3d\",\"skew\",\"skewx\",\"skewy\",\"matrix\",\"matrix3d\",\"perspective\",\"cubic-bezier\",\"steps\",\"linear\",\"repeat\",\"minmax\",\"fit-content\",\"blur\",\"brightness\",\"contrast\",\"drop-shadow\",\"grayscale\",\"hue-rotate\",\"invert\",\"saturate\",\"sepia\",\"opacity\",\"circle\",\"ellipse\",\"inset\",\"polygon\",\"path\",\"xywh\",\"rect\",\"counter\",\"counters\"],Uo=[\"fill\",\"stroke\",\"clip-path\",\"mask\",\"marker\",\"marker-start\",\"marker-mid\",\"marker-end\"],Vo=[\"media\",\"supports\",\"container\",\"keyframes\"],jo={position:[\"static\",\"relative\",\"absolute\",\"sticky\"],all:[],appearance:[\"auto\",\"none\",\"menulist-button\",\"textfield\"],\"-webkit-appearance\":[\"auto\",\"none\",\"menulist-button\",\"textfield\"]},zo=[\"host\",\"host-context\",\"slotted\",\"part\",\"backdrop\",\"picker\",\"view-transition\",\"view-transition-group\",\"view-transition-image-pair\",\"view-transition-old\",\"view-transition-new\"],Nr=64e3,wr=4e3,Fo=1e5,It=512e3,Tr=1e4,Bo=\"http://www.w3.org/1999/xhtml\",Yo=\"http://www.w3.org/2000/svg\",bi=new Map(Object.keys(_n).map(t=>[t.toLowerCase(),t]));function Dn(t){return bi.get(t.toLowerCase())}function Mn(t,e,n){let r=n.toLowerCase(),o=t===\"html\"?[at[e]?.attributes,mi]:[_n[e]?.attributes,hi],s=t===\"svg\"&&r===\"xlink:href\"?\"href\":r;for(let i of o)if(i){for(let[l,c]of Object.entries(i))if(l.toLowerCase()===s)return{name:l,kind:c}}if(gi(r)||yi(r))return{name:r,kind:\"text\"}}function Wo(t){if(typeof t==\"string\")return{type:\"navigate\",to:t};let{place:e,record:n,where:r,section:o}=t??{},s={...r===void 0?{}:{where:r},...o===void 0?{}:{section:String(o)}};return typeof e==\"string\"?{type:\"navigate\",place:e,...s}:typeof n==\"string\"?{type:\"navigate\",to:n,...s}:void 0}var qo=[\"wheel\",\"drag\",\"pinch\"];var Xo=\"~\",Ln=t=>typeof t==\"object\"&&t!==null&&!Array.isArray(t),pe=(t,e=0)=>{if(t===null||typeof t==\"string\"||typeof t==\"number\"||typeof t==\"boolean\"||t===void 0)return t;if(!(e>64||typeof t!=\"object\"))return Array.isArray(t)?t.map(n=>pe(n,e+1)):Object.fromEntries(Object.entries(t).map(([n,r])=>[n,pe(r,e+1)]))};function Ko(){let t=new Map,e=new Map,n=new Map([[Xo,{children:[],listeners:new Map}]]),r=0,o=u=>{let p=e.get(u);return p===void 0&&(p=r+=1,e.set(u,p),t.set(p,{listener:u,count:0})),t.get(p).count+=1,p},s=u=>{let p=t.get(u);p&&(p.count-=1,!(p.count>0)&&(t.delete(u),e.delete(p.listener)))},i=u=>{let p=n.get(u);if(p){n.delete(u);for(let w of p.listeners.values())s(w);for(let w of p.children)i(w)}},l=(u,p,w=0)=>{if(!Ln(u)||w>64)return pe(u);let d=typeof u.id==\"string\"?u.id:void 0,E=p&&d!==void 0&&d!==Xo;E&&i(d);let N={children:[],listeners:new Map};E&&n.set(d,N);let v={};for(let[g,a]of Object.entries(u))g===\"children\"&&Array.isArray(a)?v[g]=a.map(h=>{let m=l(h,E,w+1);return E&&Ln(h)&&typeof h.id==\"string\"&&N.children.push(h.id),m}):g===\"eventListeners\"&&Ln(a)?v[g]=Object.fromEntries(Object.entries(a).map(([h,m])=>{if(typeof m!=\"function\"||!E)return[h,void 0];let f=o(m);return N.listeners.set(h,f),[h,{listener:f}]})):v[g]=pe(a,w+1);return v},c=u=>{if(!Array.isArray(u))return pe(u);let[p,w]=u,d=typeof w==\"string\"?n.get(w):void 0;if(p===0){let E=l(u[2],d!==void 0),N=Ln(u[2])?u[2].id:void 0;if(d&&typeof N==\"string\"&&n.has(N)){let v=Number(u[3]);d.children.splice(Number.isInteger(v)&&v>=0&&v<=d.children.length?v:d.children.length,0,N)}return[p,pe(w),E,pe(u[3])]}if(p===1){let E=Number(u[2]);return d&&Number.isInteger(E)&&E>=0&&E<d.children.length&&i(d.children.splice(E,1)[0]),pe(u)}if(p===3&&u[4]===3){let E=String(u[2]),N=u[3],v=d&&typeof N==\"function\"?o(N):void 0,g=d?.listeners.get(E);return g!==void 0&&s(g),v===void 0?d?.listeners.delete(E):d.listeners.set(E,v),[p,pe(w),E,v===void 0?void 0:{listener:v},3]}return pe(u)};return{encode:u=>u.map(c),listener:u=>t.get(u)?.listener,get listening(){return t.size},get nodes(){return n.size-1}}}var xr=\"graview-view-root\",Ei=[\"value\",\"checked\",\"key\",\"pressed\",\"files\",\"refused\",\"x\",\"y\",\"width\",\"height\",\"deltaX\",\"deltaY\",\"deltaMode\",\"ctrlKey\",\"metaKey\",\"phase\",\"pointerId\",\"button\",\"pressure\",\"dx\",\"dy\",\"scale\",\"rotation\"],Ni=t=>t.replace(/&/g,\"&\").replace(/</g,\"<\").replace(/>/g,\">\").replace(/\"/g,\""\").replace(/'/g,\"'\"),wi=t=>Object.freeze({html:t,toString:()=>t}),Zo=t=>typeof t==\"object\"&&t!==null&&typeof t.html==\"string\"&&Object.isFrozen(t),Jo=t=>t==null||t===!1?\"\":Array.isArray(t)?t.map(Jo).join(\"\"):Zo(t)?t.html:Ni(String(t));function Qo(t){customElements.get(xr)||customElements.define(xr,Pt);let e=Event,n=Ko(),r=new Set,o=new Set,s,i=[],l=new Set;for(let y of[\"closest\",\"matches\",\"dataset\"]){let S=()=>{throw new TypeError(`A view's element has no ${y}: graview.on hands event.element, the element its selector matched; read event.element.getAttribute(\"data-\\u2026\").`)};y in Element.prototype||Object.defineProperty(Element.prototype,y,y===\"dataset\"?{get:S}:{value:S})}let c=document.createElement(xr),u=y=>{let S=A=>{for(let R of Array.from(A.childNodes)){if(R.nodeType!==1)continue;if(ue(R)===y)return R;let k=S(R);if(k)return k}};return S(c)},p=y=>{let S=u(y.target);if(!S)return;let A=new e(y.event,{bubbles:!0}),R={};for(let k of Ei)y[k]!==void 0&&(R[k]=y[k]);for(let k of Object.keys(R))Object.defineProperty(A,k,{value:R[k],enumerable:!0});S.dispatchEvent(A);for(let k of o){if(k.type!==y.event)continue;let M;try{M=new Set(Array.from(c.querySelectorAll(k.selector)))}catch{continue}for(let K=S;K&&K!==c;K=K.parentNode)if(M.has(K)){k.listener(Object.freeze({type:y.event,target:S,element:K,...R}));break}}},w=y=>{if(y.type===\"dom-event\"&&typeof y.target==\"string\")return p(y);if(y.type===\"notice\")return t.warn(y.text);if(y.type!==\"props\")return;s=y.props;let S=t.now();for(let k of r)try{k(y.props)}catch(M){t.threw(M)}let A=t.now()-S,R=y.push;typeof R==\"number\"&&t.microtask(()=>t.microtask(()=>t.send({type:\"pushed\",push:R,ms:A})))},d;c.connect({mutate(y){d||(d=[],t.microtask(()=>{let S=d??[];d=void 0,t.send({type:\"render\",records:n.encode(S)})})),d.push(...y)},call:()=>{}});let E=y=>y.nodeType===1?y.getAttribute(\"data-key\")??y.getAttribute(\"id\"):null,N=(y,S)=>y.nodeType===S.nodeType&&(y.nodeType!==1||y.localName===S.localName&&y.namespaceURI===S.namespaceURI&&E(y)===E(S));function v(y,S){let A=Array.from(S.childNodes),R=0;for(let k of A){let M=y.childNodes[R]??null;if(M&&N(M,k)){g(M,k),R+=1;continue}if(E(k)!==null){let we=Array.from(y.childNodes).slice(R+1).find(pt=>N(pt,k));if(we){y.insertBefore(we,M),g(we,k),R+=1;continue}}y.insertBefore(k,M),R+=1}for(;y.childNodes.length>R;)y.removeChild(y.lastChild)}function g(y,S){if(y.nodeType!==1){y.data!==S.data&&(y.data=S.data);return}let A=y,R=S,k=a(A);for(let M of A.getAttributeNames())R.hasAttribute(M)||(A.removeAttribute(M),k&&Ce(A,M,void 0));for(let M of R.getAttributeNames()){let K=R.getAttribute(M);A.getAttribute(M)!==K&&A.setAttribute(M,K),k&&Ce(A,M,K)}v(A,R)}let a=y=>y.localName.includes(\"-\");function h(y){for(let S of Array.from(y.childNodes)){if(S.nodeType!==1)continue;let A=S;if(a(A))for(let R of A.getAttributeNames())Ce(A,R,A.getAttribute(R)??void 0);h(A)}}function m(y,S,A){for(let R of Array.from(y.childNodes)){if(R.nodeType!==1)continue;let k=R,M=k.localName,K=S||M.toLowerCase()===\"svg\",we=K?Dn(M):Object.prototype.hasOwnProperty.call(at,M.toLowerCase())?M.toLowerCase():void 0;if(!we){A.add(`<${M}>`);continue}for(let pt of k.getAttributeNames())(!Mn(K?\"svg\":\"html\",we,pt)||!K&&In[we]?.includes(pt.toLowerCase()))&&A.add(`${we} ${pt}`);m(k,K,A)}}function f(y){let S=document.createElement(\"div\"),A=Array.isArray(y)?y:[y];for(let k of A)if(k!=null)if(typeof k==\"string\"||Zo(k)){let M=document.createElement(\"div\");M.innerHTML=typeof k==\"string\"?k:k.html,S.append(...Array.from(M.childNodes))}else S.append(k);let R=new Set;m(S,!1,R),i=[...R],i.length>0&&t.warn(`The host will not draw: ${i.join(\", \")}`),h(S),v(c,S)}let b,O=new Set(qo),D=\"[]\",j=!1,J=()=>{j||(j=!0,t.microtask(()=>{j=!1;let y=[...new Map([...o].filter(A=>O.has(A.type)).map(A=>[`${A.type} ${A.selector}`,{event:A.type,selector:A.selector}])).entries()].sort(([A],[R])=>A<R?-1:A>R?1:0).map(([,A])=>A),S=JSON.stringify(y);S!==D&&(D=S,t.send({type:\"gestures\",bound:y}))}))};return{view:Object.freeze({get props(){return s},onProps(y){return r.add(y),s&&y(s),()=>void r.delete(y)},render:f,style(y){typeof y!=\"string\"||y===b||(b=y,t.send({type:\"style\",css:y}))},on(y,S,A){let R={type:y,selector:S,listener:A};return o.add(R),typeof y==\"string\"&&!l.has(y)&&(l.add(y),t.send({type:\"hears\",events:[y]})),O.has(y)&&J(),()=>{o.delete(R),O.has(y)&&J()}},act:(y,S={})=>t.act(y,S),navigate(y){if(typeof y==\"string\")return t.navigate(y);let S=Wo(y);S&&t.send(S)},html(y,...S){return wi(y.reduce((A,R,k)=>A+R+(k<S.length?Jo(S[k]):\"\"),\"\"))},get refused(){return i},get hardening(){return t.hardening()}}),hear:w}}var es=t=>t.toLowerCase().replace(/[^a-z0-9]+/g,\"-\").replace(/^-|-$/g,\"\");function Dt(t,e){let n=t.find(s=>s.as===e);if(n)return n;let r=e.trim().toLowerCase(),o=es(e);return t.find(s=>s.title!==void 0&&s.title.trim().toLowerCase()===r)??(o?t.find(s=>s.as===o||s.title!==void 0&&es(s.title)===o):void 0)}var lt=t=>` Its places: ${t.map(e=>typeof e==\"string\"?`\"${e}\"`:e.title&&e.title!==e.as?`\"${e.as}\" (${e.title})`:`\"${e.as}\"`).join(\", \")||\"none\"}.`,vr=t=>`\"${t.length>80?`${t.slice(0,79)}\\u2026`:t}\"`;var q=t=>t>=48&&t<=57,ts=t=>q(t)||t>=65&&t<=70||t>=97&&t<=102,Cr=t=>t>=65&&t<=90||t>=97&&t<=122,Pr=t=>t>=128,Hn=t=>Cr(t)||Pr(t)||t===95,ns=t=>Hn(t)||q(t)||t===45,rs=t=>t===10,Ee=t=>t===10||t===9||t===32,Ti=t=>t>=0&&t<=8||t===11||t>=14&&t<=31||t===127,de=-1;function xi(t){let e=[];for(let n=0;n<t.length;n+=1){let r=t.codePointAt(n);r>65535&&(n+=1),r===13?(t.charCodeAt(n+1)===10&&(n+=1),r=10):r===12?r=10:(r===0||r>=55296&&r<=57343)&&(r=65533),e.push(r)}return e}function vi(t){let e=xi(t),n=0,r=(g=0)=>n+g<e.length?e[n+g]:de,o=[],s=(g,a)=>g===92&&a!==10&&a!==de,i=(g,a,h)=>g===45?Hn(a)||a===45||s(a,h):Hn(g)?!0:s(g,a),l=(g,a,h)=>g===43||g===45?q(a)||a===46&&q(h):q(g===46?a:g),c=()=>{let g=r();if(n+=1,g===de)return 65533;if(ts(g)){let a=String.fromCodePoint(g);for(;a.length<6&&ts(r());)a+=String.fromCodePoint(r()),n+=1;Ee(r())&&(n+=1);let h=parseInt(a,16);return h===0||h>=55296&&h<=57343||h>1114111?65533:h}return g},u=()=>{let g=\"\";for(;;){let a=r();if(ns(a))g+=String.fromCodePoint(a),n+=1;else if(s(a,r(1)))n+=1,g+=String.fromCodePoint(c());else return g}},p=()=>{let g=\"\";for((r()===43||r()===45)&&(g+=String.fromCodePoint(e[n++]));q(r());)g+=String.fromCodePoint(e[n++]);if(r()===46&&q(r(1)))for(g+=String.fromCodePoint(e[n++],e[n++]);q(r());)g+=String.fromCodePoint(e[n++]);if((r()===69||r()===101)&&(q(r(1))||(r(1)===43||r(1)===45)&&q(r(2))))for(g+=String.fromCodePoint(e[n++]),q(r())||(g+=String.fromCodePoint(e[n++]));q(r());)g+=String.fromCodePoint(e[n++]);return g},w=()=>{let g=p();return i(r(),r(1),r(2))?{type:\"dimension\",repr:g,unit:u()}:r()===37?(n+=1,{type:\"percentage\",repr:g}):{type:\"number\",repr:g}},d=()=>{for(;;){let g=r();if(n+=1,g===41||g===de)return;s(g,r())&&c()}},E=()=>{let g=\"\";for(;Ee(r());)n+=1;for(;;){let a=r();if(n+=1,a===41)return{type:\"url\",value:g};if(a===de)return{type:\"url\",value:g};if(Ee(a)){for(;Ee(r());)n+=1;return r()===41||r()===de?(r()===41&&(n+=1),{type:\"url\",value:g}):(d(),{type:\"bad-url\"})}if(a===34||a===39||a===40||Ti(a))return d(),{type:\"bad-url\"};if(a===92){if(s(a,r()))g+=String.fromCodePoint(c());else return d(),{type:\"bad-url\"};continue}g+=String.fromCodePoint(a)}},N=()=>{let g=u();if(g.toLowerCase()===\"url\"&&r()===40){for(n+=1;Ee(r())&&Ee(r(1));)n+=1;let a=Ee(r())?r(1):r();return a===34||a===39?{type:\"function\",value:g}:E()}return r()===40?(n+=1,{type:\"function\",value:g}):{type:\"ident\",value:g}},v=g=>{let a=\"\";for(;;){let h=r();if(n+=1,h===g||h===de)return{type:\"string\",value:a};if(rs(h))return n-=1,{type:\"bad-string\"};if(h===92){if(r()===de)continue;if(rs(r())){n+=1;continue}a+=String.fromCodePoint(c());continue}a+=String.fromCodePoint(h)}};for(;;){for(;r()===47&&r(1)===42;){for(n+=2;r()!==de&&!(r()===42&&r(1)===47);)n+=1;r()!==de&&(n+=2)}let g=r();if(g===de)return o;if(Ee(g)){for(;Ee(r());)n+=1;o.push({type:\"whitespace\"});continue}switch(n+=1,g){case 34:case 39:o.push(v(g));continue;case 35:if(ns(r())||s(r(),r(1))){let a=i(r(),r(1),r(2));o.push({type:\"hash\",value:u(),id:a})}else o.push({type:\"delim\",value:\"#\"});continue;case 40:o.push({type:\"(\"});continue;case 41:o.push({type:\")\"});continue;case 43:case 46:l(g,r(),r(1))?(n-=1,o.push(w())):o.push({type:\"delim\",value:String.fromCodePoint(g)});continue;case 44:o.push({type:\",\"});continue;case 45:l(g,r(),r(1))?(n-=1,o.push(w())):r()===45&&r(1)===62?(n+=2,o.push({type:\"CDC\"})):i(g,r(),r(1))?(n-=1,o.push(N())):o.push({type:\"delim\",value:\"-\"});continue;case 58:o.push({type:\":\"});continue;case 59:o.push({type:\";\"});continue;case 60:r()===33&&r(1)===45&&r(2)===45?(n+=3,o.push({type:\"CDO\"})):o.push({type:\"delim\",value:\"<\"});continue;case 64:i(r(),r(1),r(2))?o.push({type:\"at-keyword\",value:u()}):o.push({type:\"delim\",value:\"@\"});continue;case 91:o.push({type:\"[\"});continue;case 92:s(g,r())?(n-=1,o.push(N())):o.push({type:\"delim\",value:\"\\\\\"});continue;case 93:o.push({type:\"]\"});continue;case 123:o.push({type:\"{\"});continue;case 125:o.push({type:\"}\"});continue;default:q(g)?(n-=1,o.push(w())):Hn(g)?(n-=1,o.push(N())):o.push({type:\"delim\",value:String.fromCodePoint(g)})}}}var ls={\"{\":\"}\",\"[\":\"]\",\"(\":\")\"},cs=32,Or=class{constructor(e){this.tokens=e}i=0;peek(){return this.tokens[this.i]}next(){return this.tokens[this.i++]}};function us(t,e){let n=t.next();return n.type===\"{\"||n.type===\"[\"||n.type===\"(\"?{type:\"block\",open:n.type,value:os(t,ls[n.type],e+1)}:n.type===\"function\"?{type:\"func\",name:n.value,value:os(t,\")\",e+1)}:n}function os(t,e,n){let r=[];for(;;){let o=t.peek();if(!o)return r;if(o.type===e)return t.next(),r;if(n>cs){t.next(),r.push({type:\"bad-string\"});continue}r.push(us(t,n))}}function ct(t,e){let n=[],r=0;for(;r<t.length;){let o=t[r];if(o.type===\"whitespace\"||e&&(o.type===\"CDO\"||o.type===\"CDC\")){r+=1;continue}if(o.type===\"at-keyword\"){let l=[];r+=1;let c;for(;r<t.length;){let u=t[r];if(r+=1,u.type===\";\")break;if(u.type===\"block\"&&u.open===\"{\"){c=u.value;break}l.push(u)}n.push({type:\"at-rule\",name:o.value,prelude:l,...c?{block:c}:{}});continue}let s=[],i;for(;r<t.length;){let l=t[r];if(r+=1,l.type===\"block\"&&l.open===\"{\"){i=l.value;break}s.push(l)}i&&n.push({type:\"qualified\",prelude:s,block:i})}return n}function _r(t){let e=[],n=0;for(;n<t.length;){let r=t[n];if(r.type===\"whitespace\"||r.type===\";\"){n+=1;continue}if(r.type===\"at-keyword\"){let s=(()=>{for(let i=n+1;i<t.length;i+=1){let l=t[i];if(l.type===\";\"||l.type===\"block\"&&l.open===\"{\")return i+1}return t.length})();e.push(...ct(t.slice(n,s),!1)),n=s;continue}if(r.type===\"ident\"){let s=n+1;for(;t[s]?.type===\"whitespace\";)s+=1;if(t[s]?.type===\":\"){let i=s+1;for(;i<t.length&&t[i].type!==\";\";)i+=1;let l=ds(r.value,t.slice(s+1,i));if(l.value.some(c=>c.type===\"block\"&&c.open===\"{\")){let c=t.findIndex((u,p)=>p>n&&u.type===\"block\"&&u.open===\"{\");e.push(...ct(t.slice(n,c+1),!1)),n=c+1;continue}e.push(l),n=i+1;continue}}let o=n;for(;o<t.length&&!(t[o].type===\"block\"&&t[o].open===\"{\")&&t[o].type!==\";\";)o+=1;o<t.length&&t[o].type===\"block\"&&e.push(...ct(t.slice(n,o+1),!1)),n=o+1}return e}function ds(t,e){let n=[...e];for(;n[0]?.type===\"whitespace\";)n.shift();for(;n.at(-1)?.type===\"whitespace\";)n.pop();let r=!1,s=n.length-1;if(n[s]?.type===\"ident\"&&n[s].value.toLowerCase()===\"important\"){for(s-=1;n[s]?.type===\"whitespace\";)s-=1;let i=n[s];if(i?.type===\"delim\"&&i.value===\"!\")for(r=!0,n.length=s;n.at(-1)?.type===\"whitespace\";)n.pop()}return{type:\"declaration\",name:t,value:n,important:r}}function Ir(t){let e=new Or(vi(t)),n=[];for(;e.peek();)n.push(us(e,0));return n}function $n(t){let e=\"\",n=[...t].map(r=>r.codePointAt(0));return n.forEach((r,o)=>{r===0?e+=\"\\uFFFD\":r>=1&&r<=31||r===127||o===0&&q(r)||o===1&&q(r)&&n[0]===45?e+=`\\\\${r.toString(16)} `:o===0&&r===45&&n.length===1?e+=\"\\\\-\":Pr(r)||r===45||r===95||q(r)||Cr(r)?e+=String.fromCodePoint(r):e+=`\\\\${String.fromCodePoint(r)}`}),e}function Gn(t){let e=\"\";for(let n of t){let r=n.codePointAt(0);Pr(r)||r===45||r===95||q(r)||Cr(r)?e+=n:r>=1&&r<=31||r===127?e+=`\\\\${r.toString(16)} `:e+=`\\\\${n}`}return e}function Ar(t){let e='\"';for(let n of t){let r=n.codePointAt(0);r===0?e+=\"\\uFFFD\":r>=1&&r<=31||r===127||r===60||r===62?e+=`\\\\${r.toString(16)} `:r===34||r===92?e+=`\\\\${n}`:e+=n}return`${e}\"`}function Si(t){let e=Gn(t);return/^[eE]([0-9]|[+-][0-9])/.test(t)?`\\\\${t.codePointAt(0).toString(16)} ${Gn(t.slice(1))}`:e}var ss=t=>{switch(t.type){case\"ident\":case\"url\":case\"bad-url\":case\"number\":case\"percentage\":case\"dimension\":case\"CDC\":case\"hash\":case\"at-keyword\":return t.type;case\"func\":case\"function\":return\"function\";case\"block\":return t.open===\"(\"?\"(\":\"other\";case\"(\":return\"(\";case\"delim\":return`delim${t.value}`;default:return\"other\"}};function Oi(t,e){let n=[\"ident\",\"function\",\"url\",\"bad-url\",\"delim-\",\"number\",\"percentage\",\"dimension\",\"CDC\"];return t===\"ident\"?[...n,\"(\"].includes(e):t===\"at-keyword\"||t===\"hash\"||t===\"dimension\"||t===\"delim#\"||t===\"delim-\"?n.includes(e):t===\"number\"?[\"ident\",\"function\",\"url\",\"bad-url\",\"number\",\"percentage\",\"dimension\",\"delim%\"].includes(e):t===\"delim@\"?[\"ident\",\"function\",\"url\",\"bad-url\",\"delim-\",\"CDC\"].includes(e):t===\"delim.\"||t===\"delim+\"?[\"number\",\"percentage\",\"dimension\"].includes(e):t===\"delim/\"?e===\"delim*\":!1}function Ai(t){switch(t.type){case\"whitespace\":return\" \";case\"ident\":return $n(t.value);case\"at-keyword\":return`@${$n(t.value)}`;case\"hash\":return`#${Gn(t.value)}`;case\"string\":return Ar(t.value);case\"url\":return`url(${Ar(t.value)})`;case\"delim\":return t.value===\"\\\\\"?`\\\\\n`:t.value;case\"CDO\":return\"<!--\";case\"CDC\":return\"-->\";case\"number\":return t.repr;case\"percentage\":return`${t.repr}%`;case\"dimension\":return`${t.repr}${Si(t.unit)}`;case\"func\":return`${$n(t.name)}(${ut(t.value)})`;case\"block\":return`${t.open}${ut(t.value)}${ls[t.open]}`;case\":\":case\";\":case\",\":case\"[\":case\"]\":case\"(\":case\")\":case\"{\":case\"}\":return t.type;default:return\"\"}}function ut(t){let e=\"\",n;for(let r of t)r.type===\"whitespace\"&&n?.type===\"whitespace\"||(n&&Oi(ss(n),ss(r))&&(e+=\"/**/\"),e+=Ai(r),n=r);return e}var Ri=new Set($o),fs=new Set(Go),is=new Set(Uo),ki=new Set(Vo),Ci=new Set(zo),as=/^#[A-Za-z_][A-Za-z0-9_.:-]*$/,Ne=t=>t.replace(/[A-Z]/g,e=>e.toLowerCase()),Pi=t=>Ne(t);function Rr(t,e,n){let r=[];for(let o of e){if(o.type===\"bad-url\"||o.type===\"bad-string\"){n({reason:\"unreadable\",...t?{name:t}:{}});return}if(o.type===\"url\"){if(t&&is.has(t)&&as.test(o.value)){r.push({type:\"func\",name:\"url\",value:[{type:\"string\",value:o.value}]});continue}n({reason:\"url\",...t?{name:t}:{}});return}if(o.type===\"func\"){let s=Ne(o.name);if(s===\"url\"||s===\"src\"){let l=o.value.filter(u=>u.type!==\"whitespace\"),c=l[0];if(s===\"url\"&&l.length===1&&c?.type===\"string\"&&t&&is.has(t)&&as.test(c.value)){r.push({type:\"func\",name:\"url\",value:[{type:\"string\",value:c.value}]});continue}n({reason:\"url\",...t?{name:t}:{}});return}if(!fs.has(s)){n({reason:\"function\",name:s});return}let i=Rr(t,o.value,n);if(!i)return;s===\"var\"?r.push({type:\"whitespace\"},{type:\"func\",name:s,value:i},{type:\"whitespace\"}):r.push({type:\"func\",name:s,value:i});continue}if(o.type===\"block\"){if(o.open===\"{\"||o.open===\"(\"&&r.at(-1)?.type===\"ident\"){n({reason:\"unreadable\",...t?{name:t}:{}});return}let s=Rr(t,o.value,n);if(!s)return;r.push({type:\"block\",open:o.open,value:s});continue}if(o.type===\"at-keyword\"||o.type===\"CDO\"||o.type===\"CDC\"||o.type===\"{\"||o.type===\"}\"||o.type===\";\"||o.type===\"delim\"&&o.value===\"\\\\\"){n({reason:\"unreadable\",...t?{name:t}:{}});return}r.push(o)}return r}function Vn(t,e){let n=t.name.startsWith(\"--\"),r=n?t.name:Pi(t.name);if(!n&&!Ri.has(r)){e({reason:\"property\",name:r});return}let o=jo[r];if(o){let l=t.value.filter(p=>p.type!==\"whitespace\"),c=l[0],u=l.length===1&&c?.type===\"ident\"?Ne(c.value):void 0;if(!u||![...o,\"inherit\",\"initial\",\"unset\",\"revert\"].includes(u)){e({reason:\"value\",name:r});return}return`${r}: ${u}${t.important?\" !important\":\"\"}`}let s=Rr(n?void 0:r,t.value,e);if(!s)return;let i=ut(s).trim();return`${n?`--${Gn(t.name.slice(2))}`:r}: ${i}${t.important?\" !important\":\"\"}`}function ms(t,e){let n=r=>{for(let o=0;o<r.length;o+=1){let s=r[o];if(o>0&&r[o-1].type===\":\"&&(s.type===\"ident\"||s.type===\"func\")){let l=Ne(s.type===\"ident\"?s.value:s.name);if(Ci.has(l)||l.startsWith(\"-webkit-\")||l.startsWith(\"-moz-\"))return e({reason:\"selector\",name:l}),!1}if(s.type===\"url\"||s.type===\"bad-url\"||s.type===\"bad-string\"||s.type===\"at-keyword\"||s.type===\"CDO\"||s.type===\"CDC\"||s.type===\"block\"&&s.open===\"{\")return e({reason:\"unreadable\",name:\"selector\"}),!1;if(s.type===\"func\"&&!n(s.value)||s.type===\"block\"&&!n(s.value))return!1}return!0};return n(t)}function Sr(t,e,n){let r=[];for(let o of _r(t))if(o.type===\"declaration\"){let s=Vn(o,e);s&&r.push(`${s};`)}else{let s=Un(o,e,n+1,\"style\");s&&r.push(s)}return r.join(\" \")}function _i(t,e,n){let r=o=>o.every(s=>{if(s.type===\"url\"||s.type===\"bad-url\"||s.type===\"bad-string\"||s.type===\"block\"&&s.open===\"{\")return n({reason:s.type===\"url\"?\"url\":\"unreadable\",name:`@${e}`}),!1;if(s.type===\"func\"){let i=Ne(s.name);return e===\"supports\"&&i===\"selector\"?ms(s.value,n):fs.has(i)?r(s.value):(n({reason:\"function\",name:i}),!1)}if(s.type===\"block\"){if(e===\"supports\"){let i=_r(s.value);if(i.length===1&&i[0].type===\"declaration\")return Vn(i[0],n)!==void 0}return r(s.value)}return!0});return r(t)?ut(t).trim():void 0}function kr(t){return t.map((e,n)=>{let r=t[n-1],o=r?.type===\":\"||r?.type===\"delim\"&&(r.value===\".\"||r.value===\"|\");return e.type===\"ident\"&&!o&&Object.prototype.hasOwnProperty.call(_t,Ne(e.value))?{type:\"block\",open:\"[\",value:[{type:\"ident\",value:\"data-graview-as\"},{type:\"delim\",value:\"=\"},{type:\"string\",value:Ne(e.value)}]}:e.type===\"func\"?{type:\"func\",name:e.name,value:kr(e.value)}:e.type===\"block\"&&e.open===\"(\"?{type:\"block\",open:\"(\",value:kr(e.value)}:e})}function Un(t,e,n,r){if(n>cs){e({reason:\"unreadable\",name:\"nesting\"});return}if(t.type===\"qualified\"){if(r===\"keyframes\"){if(!t.prelude.every(p=>p.type===\"whitespace\"||p.type===\",\"||p.type===\"percentage\"||p.type===\"ident\"&&[\"from\",\"to\"].includes(Ne(p.value)))){e({reason:\"unreadable\",name:\"keyframe\"});return}return`${ut(t.prelude).trim()} { ${Sr(t.block,e,n)} }`}if(!ms(t.prelude,e))return;let c=ut(kr(t.prelude)).trim();if(c===\"\"){e({reason:\"unreadable\",name:\"selector\"});return}return`${c} { ${Sr(t.block,e,n)} }`}let o=Ne(t.name),s=o===\"-webkit-keyframes\"?\"keyframes\":o;if(!ki.has(s)||r===\"keyframes\"){e({reason:\"at-rule\",name:`@${o}`});return}if(!t.block){e({reason:\"unreadable\",name:`@${o}`});return}if(s===\"keyframes\"){if(r!==\"sheet\"){e({reason:\"at-rule\",name:\"@keyframes\"});return}let c=t.prelude.filter(d=>d.type!==\"whitespace\"),u=c[0];if(c.length!==1||!u||u.type!==\"ident\"&&u.type!==\"string\"){e({reason:\"unreadable\",name:\"@keyframes\"});return}let p=ct(t.block,!1).map(d=>Un(d,e,n+1,\"keyframes\")).filter(d=>d!==void 0);return`@keyframes ${u.type===\"ident\"?$n(u.value):Ar(u.value)} { ${p.join(\" \")} }`}let i=_i(t.prelude,s,e);if(i===void 0)return;let l=r===\"style\"?Sr(t.block,e,n):ct(t.block,!1).map(c=>Un(c,e,n+1,\"sheet\")).filter(c=>c!==void 0).join(\" \");return`@${s} ${i} { ${l} }`}function ps(t,e=Nr){let n=[];if(t.length>e)return{css:\"\",refused:[{reason:\"size\"}]};let r=s=>void n.push(s);return{css:ct(Ir(t),!0).map(s=>Un(s,r,0,\"sheet\")).filter(s=>s!==void 0).join(`\n`),refused:n}}function hs(t,e=Nr){let n=[];if(t.length>e)return{css:\"\",refused:[{reason:\"size\"}]};let r=s=>void n.push(s),o=[];for(let s of _r(Ir(t))){if(s.type!==\"declaration\"){r({reason:\"unreadable\",name:\"a rule in a style attribute\"});continue}let i=Vn(s,r);i&&o.push(i)}return{css:o.join(\"; \"),refused:n}}function gs(t,e){let n,r=Vn(ds(t,Ir(e)),o=>n??=o);return r===void 0||n?{refused:n??{reason:\"unreadable\",name:t}}:{value:r.slice(r.indexOf(\":\")+1).trim()}}function ys(t,e){if(e===\"svg\"){let r=Dn(t);return r?{namespace:\"svg\",name:r}:{refused:{reason:\"element\",element:t}}}let n=t.toLowerCase();return n===\"svg\"?{namespace:\"svg\",name:\"svg\"}:Object.prototype.hasOwnProperty.call(at,n)?Object.prototype.hasOwnProperty.call(_t,n)?{namespace:\"html\",name:_t[n],as:n}:{namespace:\"html\",name:n}:{refused:{reason:\"element\",element:t}}}function Dr(t,e){return(t===\"html\"?at[e]:_n[e])?.empty===!0}var Ii=/^[+-]?(\\d+\\.?\\d*|\\.\\d+)([eE][+-]?\\d+)?$/,Di=/^[0-9A-Za-z\\s.,+\\-%()]*$/,Mi=/^#[A-Za-z_][A-Za-z0-9_.:-]*$/,Li=/^data:image\\/(png|gif|jpeg|webp|avif|bmp|svg\\+xml)(;[A-Za-z0-9=._+-]+)*,/i,Hi=/^\\/graview\\/assets\\/[0-9a-f]{64}\\.(png|gif|jpe?g|webp|avif|svg|ico)$/,bs=/\\/graview\\/assets\\/[0-9a-f]{64}\\.(png|gif|jpe?g|webp|avif|svg|ico)$/,$i=/^\\/(?!\\/)(?!(?:.*\\/)?\\.\\.?(?:\\/|$))(?!.*%(?:2e|2f|5c))[^\\\\\\s?#\"'<>]*$/i;function Gi(t,e){if(Hi.test(t))return t;let n=t;if(/^https?:\\/\\//i.test(t))try{let r=new URL(t);if(e===\"null\"||r.origin!==e||r.username!==\"\"||r.password!==\"\"||r.search!==\"\"||r.hash!==\"\")return;n=t.slice(r.origin.length)}catch{return}if($i.test(n))return bs.exec(n)?.[0]}function Es(t,e={},n){let r=t.length>120?`${t.slice(0,119)}\\u2026`:t,o=Ns(e.origins),s=bs.exec(t.split(/[?#]/)[0])?.[0],i=n!==void 0&&n>It?` It is a data: image of ${n.toLocaleString(\"en-US\")} characters, more than the ${It.toLocaleString(\"en-US\")} a view's own data: image may be. A picture on a record is drawn at any size by the src the host hands the view (pictures in its manifest), used as it was handed.`:s?e.assets?` It is the app's own image only by its path, or under the app's base on this page's origin: write it as its path, ${s}.`:\" This host has not said where the app's own images live (asset, on the view's definition), so a view here cannot draw one by its path.\":/^https:\\/\\//i.test(t)?o.length>0?` Its origin is not one the host lists for images (${o.join(\", \")}).`:\" The host lists no origin a view's images may come from (images.origins, on the view's definition).\":\"\",l=[\"a data: image\",...e.assets?[\"the app's own image by the path add_image answered (/graview/assets/<sha256>.<ext>)\"]:[],\"a picture on a record (pictures in its manifest)\",...o.length>0?[`an https: image from ${o.join(\", \")}`]:[]];return`The image \"${r}\" was not drawn.${i} A view here shows ${l.slice(0,-1).join(\", \")} or ${l[l.length-1]}.`}function Ns(t){return(t??[]).flatMap(e=>{try{let n=new URL(e);return n.protocol===\"https:\"&&n.hostname!==\"\"&&n.username===\"\"&&n.password===\"\"?[n.origin]:[]}catch{return[]}})}function Ui(t,e){if(!(!e||e.length===0||!/^https:\\/\\//i.test(t)))try{let n=new URL(t);return n.protocol!==\"https:\"||n.username!==\"\"||n.password!==\"\"?void 0:Ns(e).includes(n.origin)?n.href:void 0}catch{return}}function Mr(t,e,n,r,o){let s=Mn(t,e,n);if(!s)return{refused:{reason:\"attribute\",element:e,name:n}};if(t===\"html\"&&In[e]?.includes(s.name))return{refused:{reason:\"attribute\",element:e,name:n}};if(r===null)return{name:s.name,value:null};let i=Vi(s.name,s.kind,r,o);return\"refused\"in i?{refused:{...i.refused,element:e,...s.kind===\"image\"&&i.refused.reason===\"url\"?{address:r.slice(0,200),...r.length>It?{length:r.length}:{}}:{}}}:s.name===\"role\"&&i.value.split(/\\s+/).some(l=>Ho.includes(l.toLowerCase()))?{refused:{reason:\"value\",element:e,name:n}}:s.name===\"aria-live\"&&![\"polite\",\"off\"].includes(i.value.toLowerCase())?{refused:{reason:\"value\",element:e,name:n}}:{name:s.name,value:i.value,...i.dropped?{dropped:i.dropped.map(l=>({reason:l.reason===\"url\"?\"url\":\"css\",element:e,name:s.name,css:l}))}:{}}}function Vi(t,e,n,r){let o=(s,i)=>({refused:{reason:s,name:t,...i?{css:i}:{}}});if(e===\"geometry\")return n.length>Fo||!Di.test(n)||/url/i.test(n)?o(\"value\"):{value:n};if(e===\"image\"){let s=r.picture?.(n);if(s!==void 0)return{value:s};if(n.length>It)return o(\"url\");if(Li.test(n))return{value:n};if(n.startsWith(`blob:${r.origin}/`)&&/^blob:[^\\s\"'<>]+$/.test(n))return{value:n};let i=r.asset?Gi(n,r.origin):void 0;if(i!==void 0){let c=r.asset(i);if(c)return{value:c}}let l=Ui(n,r.imageOrigins);return l?{value:l}:o(\"url\")}if(n.length>wr)return o(\"value\");if(typeof e==\"object\"){let s=e.oneOf.find(i=>i.toLowerCase()===n.toLowerCase());return s===void 0?o(\"value\"):{value:s}}switch(e){case\"text\":return{value:n};case\"number\":return Ii.test(n.trim())&&Number.isFinite(Number(n))?{value:n.trim()}:o(\"value\");case\"boolean\":return{value:\"\"};case\"fragment\":return Mi.test(n)?{value:n}:o(\"url\");case\"style\":{let s=hs(n,wr);return s.refused.length>0&&s.css===\"\"?o(s.refused[0].reason===\"url\"?\"url\":\"css\",s.refused[0]):{value:s.css,...s.refused.length>0?{dropped:s.refused}:{}}}case\"css\":{let s=gs(t,n);return\"refused\"in s?o(s.refused.reason===\"url\"?\"url\":\"css\",s.refused):{value:s.value}}}}var ji=\"http://www.w3.org/1999/xhtml\",dt=class{constructor(e){this.ownerDocument=e}parentNode=null;childNodes=[];get firstChild(){return this.childNodes[0]??null}get parentElement(){return this.parentNode instanceof Ge?this.parentNode:null}get textContent(){return this.childNodes.map(e=>e.textContent).join(\"\")}insertBefore(e,n){e.parentNode&&e.parentNode.removeChild(e);let r=n?this.childNodes.indexOf(n):-1;return r<0?this.childNodes.push(e):this.childNodes.splice(r,0,e),e.parentNode=this,e}appendChild(e){return this.insertBefore(e,null)}removeChild(e){let n=this.childNodes.indexOf(e);return n>=0&&this.childNodes.splice(n,1),e.parentNode=null,e}},$e=class extends dt{constructor(n,r){super(n);this.data=r}nodeType=3;get textContent(){return this.data}},Lr=class extends dt{nodeType=8;get textContent(){return\"\"}},Ge=class extends dt{constructor(n,r,o){super(n);this.namespaceURI=r;this.localName=o}nodeType=1;attributes=new Map;value=\"\";checked=!1;selected=!1;setAttribute(n,r){this.attributes.set(n,String(r))}removeAttribute(n){this.attributes.delete(n)}getAttribute(n){return this.attributes.get(n)??null}hasAttribute(n){return this.attributes.has(n)}closest(n){for(let r=this;r;r=r.parentElement)if(r.localName===n)return r;return null}},Hr=class extends dt{nodeType=9;constructor(){super(null)}createElementNS(e,n){return new Ge(this,e,n)}createElement(e){return new Ge(this,ji,e)}createTextNode(e){return new $e(this,e)}createComment(e){return new Lr(this)}};function ws(){let t=new Hr,e=t.createElement(\"div\");return e.setAttribute(\"data-graview-view-root\",\"\"),t.appendChild(e),{document:t,root:e}}var $r={h1:1,h2:2,h3:3,h4:4,h5:5,h6:6},Ts=new Set([\"a\",\"abbr\",\"b\",\"bdi\",\"bdo\",\"br\",\"cite\",\"code\",\"data\",\"del\",\"dfn\",\"em\",\"i\",\"ins\",\"kbd\",\"q\",\"s\",\"samp\",\"small\",\"span\",\"strong\",\"sub\",\"sup\",\"time\",\"u\",\"var\",\"wbr\",\"label\"]),xs=new Set([\"style\",\"template\",\"datalist\",\"option\"]),U=t=>t.replace(/\\s+/g,\" \").trim();function zi(t){let e=t.duration===void 0?0:Math.round(t.duration);if(e<1)return\"a video\";if(e<60)return`a ${e}-second video`;let n=Math.round(e/60);return n<60?`a ${n}-minute video`:`a ${Math.floor(n/60)}-hour${n%60>0?` ${n%60}-minute`:\"\"} video`}var re=t=>t instanceof Ge,Mt=t=>t.hasAttribute(\"hidden\")||t.getAttribute(\"aria-hidden\")===\"true\";function X(t){return t instanceof $e?t.data:!re(t)||Mt(t)||xs.has(t.localName)?\"\":t.localName===\"br\"?\" \":t.localName===\"img\"?t.getAttribute(\"alt\")??\"\":t.childNodes.map(X).join(t.localName===\"td\"||t.localName===\"th\"?\" \":\"\")}function*Ue(t){for(let e of t.childNodes)re(e)&&(yield e,yield*Ue(e))}function Fi(t){let e=t.getAttribute(\"data-save\"),n=t.getAttribute(\"data-debounce\");if(e===null&&n===null)return[];let r=`drawing <${t.localName}${e!==null?` data-save=\"${e}\"`:` data-debounce=\"${n}\"`}>`,o=[];if(e===null)return[{at:r,says:'data-debounce is read only on a field that saves as it is typed (data-save=\"input\").'}];if(![\"input\",\"textarea\",\"select\"].includes(t.localName))o.push({at:r,says:\"Only a field saves as it is typed: an input, a textarea or a select. A button is pressed (data-act alone).\"});else if(e!==\"input\"&&e!==\"change\")o.push({at:r,says:`data-save is \"input\" (saved as the person types, once they pause, and when they leave it) or \"change\" (saved when they leave it or pick), not \"${e}\".`});else if(t.getAttribute(\"data-act\")===null)o.push({at:r,says:'It saves through no act: a field saved as it is typed names its act itself, data-act=\"\\u2026\", one in the manifest.'});else if(!t.getAttribute(\"name\"))o.push({at:r,says:\"It has no name: the host sends a field as the act's argument its name says.\"});else{let s=!1,i=!1;for(let l=t;l;l=l.parentElement)l.getAttribute(\"data-record\")!==null&&(i=!0),l!==t&&(l.localName===\"fieldset\"||l.getAttribute(\"role\")===\"group\")&&(s=!0);(!s||!i)&&o.push({at:r,says:'It is in no fieldset bound to a record: the host saves a field inside <fieldset data-record=\"\\u2026\">, with the fields beside it, to the record the fieldset names.'})}return n!==null&&e!==\"input\"?o.push({at:r,says:'data-debounce is read only with data-save=\"input\": a \"change\" saves at once.'}):n!==null&&!(n.trim()!==\"\"&&Number.isFinite(Number(n))&&Number(n)>=250&&Number(n)<=1e4)&&o.push({at:r,says:`data-debounce is how long the host waits for the person to pause, in milliseconds from 250 to 10 000, not \"${n}\"; left out, it waits 1 000.`}),o}function Bi(t,e,n){let r=t.getAttribute(\"data-drop\");if(r===null)return[];let o=`drawing <${t.localName} data-drop=\"${r}\">`,s=[],i=(e.accepts??[]).filter(u=>u.kind===r),l=t.getAttribute(\"data-drop-field\");i.length===0?s.push({at:o,says:`The view's accepts names no field of \"${r}\", so the host offers no drop target here: say the field files go in, accepts: [{ \"kind\": \"${r}\", \"field\": \"<its image, video or file field>\" }].`}):l!==null&&!i.some(u=>u.field===l)&&s.push({at:o,says:`data-drop-field names \"${l}\", which the view's accepts does not name for \"${r}\" (${i.map(u=>`\"${u.field}\"`).join(\", \")}): the host offers no drop target here.`});let c=t.getAttribute(\"data-drop-connect\");if(c!==null){let u=c.indexOf(\":\"),p=u>0?c.slice(u+1):\"\";u<=0||p===\"\"||n.has(c)?s.push({at:o,says:`data-drop-connect is \"<relation>:<record id>\" \\u2014 \"takenOn:day:saturday\" \\u2014 not \"${c}\"${n.has(c)?\", which names a record and no relation\":\"\"}.`}):n.has(p)||s.push({at:o,says:`data-drop-connect names \"${p}\", which this seat was not shown: the host offers no drop target here.`})}return s}function vs(t,e){let n=[],r=new Set,o=new Set,s=new Map;for(let d of[...e.props.node?[e.props.node]:[],...e.props.nodes??[]])s.set(d.id,d);let i=d=>Dt(e.places,d)!==void 0;for(let d of Ue(t)){let E=d.getAttribute(\"data-act\");E!==null&&r.add(E);let N=d.getAttribute(\"data-record\");N!==null&&(o.add(N),!s.has(N)&&!i(N)&&n.push({at:`drawing <${d.localName} data-record=\"${N}\">`,says:`It names \"${N}\", which this seat was not shown and is no place of this app: the host will not follow it. A view goes to a record by its id, or to a place by its slug.${lt(e.places)}`}));let v=d.getAttribute(\"data-place\");v!==null&&!i(v)&&n.push({at:`drawing <${d.localName} data-place=\"${v}\">`,says:`It names the place \"${v}\", which this app does not have.${lt(e.places)}`}),n.push(...Fi(d)),n.push(...Bi(d,e,s))}let l=d=>{if(d.localName===\"graview-video\")return;let E=d.getAttribute(\"data-record\");if(E!==null)return E;let N=d.getAttribute(\"data-key\")??d.getAttribute(\"id\");if(N!==null&&s.has(N))return N;let v=new Set;for(let g of Ue(d)){let a=g.getAttribute(\"data-record\");a!==null&&g.localName!==\"graview-video\"&&v.add(a)}return v.size===1?[...v][0]:void 0},c=(d,E)=>{let N=s.get(E),v=N?.kind??(E.includes(\":\")?E.slice(0,E.indexOf(\":\")):\"\"),g=[...Ue(d)],a=g.find(f=>f.localName in $r)??g.find(f=>f.localName===\"a\"&&f.getAttribute(\"data-record\")===E)??g.find(f=>f.localName===\"strong\"||f.localName===\"b\"),h=U(a?X(a):\"\")||N?.label||E,m=p(d,a);return!a&&m[0]?.t===\"text\"&&U(m[0].text)===h&&m.shift(),{id:E,kind:v,title:h,parts:m}},u=d=>{let E=[...Ue(d)].filter(a=>a.localName===\"tr\"&&!Mt(a)),N=E.find(a=>a.parentElement?.localName===\"thead\"||a.childNodes.every(h=>!re(h)||h.localName===\"th\")),v=N?N.childNodes.filter(re).map(a=>U(X(a))):[];return{t:\"list\",as:\"row\",columns:1,groups:[{items:E.filter(a=>a!==N).map(a=>{let h=a.childNodes.filter(re),m=l(a),f=m?s.get(m):void 0;return{id:m??\"\",kind:f?.kind??\"\",title:U(X(h[0]??a)),parts:h.slice(1).map((b,O)=>({t:\"field\",label:v[O+1]??\"\",text:U(X(b))}))}})}]}};function p(d,E){let N=[],v=\"\",g=()=>{let h=U(v);v=\"\",h&&N.push({t:\"text\",text:h})},a=d.childNodes;for(let h=0;h<a.length;h+=1){let m=a[h];if(m===E)continue;if(m instanceof $e){v+=m.data;continue}if(!re(m)||Mt(m)||xs.has(m.localName))continue;if(E&&[...Ue(m)].includes(E)){g(),N.push(...p(m,E));continue}let f=[];for(let b=h;b<a.length;b+=1){let O=a[b];if(O instanceof $e&&U(O.data)===\"\")continue;if(!re(O)||Mt(O)||Ts.has(O.localName)||O.localName in $r)break;let D=l(O);if(!D)break;f.push({element:O,id:D}),h=b}if(f.length>0){g();let b=f.every(O=>O.element.localName===\"li\"||O.element.localName===\"tr\");N.push({t:\"list\",as:b?\"row\":\"card\",columns:1,groups:[{items:f.map(O=>c(O.element,O.id))}]});continue}N.push(...w(m,b=>v+=b,g))}return g(),N}function w(d,E,N){let v=d.localName;if(Ts.has(v)&&v!==\"label\")return E(X(d)),[];if(v===\"mark\"){N();let a=U(X(d));return a?[{t:\"badge\",text:a}]:[]}N();let g=$r[v]??(d.getAttribute(\"role\")===\"heading\"?Number(d.getAttribute(\"aria-level\")??2):void 0);if(g!==void 0){let a=U(X(d));return a?[{t:\"heading\",level:g,text:a}]:[]}switch(v){case\"ul\":case\"ol\":case\"menu\":return[{t:\"list\",as:\"row\",columns:1,groups:[{items:d.childNodes.filter(h=>re(h)&&h.localName===\"li\"&&!Mt(h)).map(h=>{let m=l(h);if(m)return c(h,m);let f=p(h),b=f[0],O=b&&(b.t===\"text\"||b.t===\"heading\")?b.text:\"\";return{id:\"\",kind:\"\",title:O,parts:O?f.slice(1):f}})}]}];case\"table\":return[u(d)];case\"dl\":{let a=[],h=\"\";for(let m of d.childNodes.filter(re))if(m.localName===\"dt\")h=U(X(m));else if(m.localName===\"dd\")a.push({t:\"field\",label:h,text:U(X(m))});else if(m.localName===\"div\")for(let f of m.childNodes.filter(re))f.localName===\"dt\"?h=U(X(f)):f.localName===\"dd\"&&a.push({t:\"field\",label:h,text:U(X(f))});return a}case\"figure\":{let a=d.childNodes.find(f=>re(f)&&f.localName===\"figcaption\"),h=U(d.childNodes.filter(f=>f!==a).map(X).join(\" \")),m=a?U(X(a)):\"\";return h?[{t:\"figure\",text:h,...m?{label:m}:{}}]:m?[{t:\"text\",text:m}]:[]}case\"meter\":case\"progress\":{let a=Number(d.getAttribute(\"value\")??0),h=Number(d.getAttribute(\"max\")??1)||1;return[{t:\"progress\",label:d.getAttribute(\"aria-label\")??d.getAttribute(\"title\")??\"\",text:`${Math.round(a/h*100)}%`}]}case\"svg\":{let a=d.childNodes.find(f=>re(f)&&f.localName===\"title\"),h=U(d.getAttribute(\"aria-label\")??(a?X(a):\"\"));if(h)return[{t:\"text\",text:h,tone:\"picture\"}];let m=[...Ue(d)].filter(f=>f.localName===\"text\").map(f=>U(X(f))).filter(Boolean);return m.length>0?[{t:\"text\",text:m.join(\" \\xB7 \"),tone:\"picture\"}]:[]}case\"img\":{let a=U(d.getAttribute(\"alt\")??\"\");return a?[{t:\"text\",text:a,tone:\"picture\"}]:[]}case\"graview-video\":{let a=d.getAttribute(\"data-field\")??\"\",h=s.get(d.getAttribute(\"data-record\")??\"\"),m=h&&a&&Object.hasOwn(h,a)?h[a]:void 0,f=(Array.isArray(m)?m:[m])[Number(d.getAttribute(\"data-index\")??\"0\")];return!f||typeof f.name!=\"string\"||typeof f.type!=\"string\"||!f.type.startsWith(\"video/\")?(n.push({at:`drawing <graview-video data-field=\"${a}\">`,says:\"It names no video on a record this seat was shown: the host draws no player there. A <graview-video> names a record the view was shown (data-record) and its video field (data-field).\"}),[]):[{t:\"text\",text:`${typeof f.caption==\"string\"&&f.caption.trim()?f.caption.trim():f.name}, ${zi(typeof f.duration==\"number\"?{duration:f.duration}:{})}`,tone:\"picture\"}]}case\"button\":{let a=U(X(d));return a?[{t:\"text\",text:a,tone:\"button\"}]:[]}case\"input\":case\"textarea\":case\"select\":{let a=U(d.getAttribute(\"aria-label\")??d.getAttribute(\"placeholder\")??d.getAttribute(\"name\")??\"\"),h=v===\"select\"?U(X(d.childNodes.find(m=>re(m)&&m.localName===\"option\"&&m.selected)??d)):d.value;return[{t:\"field\",label:a,text:h}]}case\"label\":return p(d);default:return p(d)}}return{parts:p(t),problems:n,acts:[...r],records:[...o]}}var Yi=0,Wi=1,qi=2,Xi=3,Ss=1,Ki=2,Os=3,Zi=1,Ji=3,Qi=8,As=\"~\",jn=t=>typeof t==\"object\"&&t!==null&&!Array.isArray(t),Rs=new Set([\"input\",\"select\",\"textarea\",\"option\"]),ea=new Set([\"value\",\"checked\",\"selected\"]);function ks(t,e){let n=t.ownerDocument??t,r=e.maxNodes??5e3,o=[],s=new Map,i=new WeakMap,l={dom:t,name:\"div\",namespace:\"html\",children:[],id:As};s.set(As,l);let c=0,u=!1,p=a=>{o.push(a),o.length>200&&o.shift(),e.onRefused?.(a)},w=()=>({dom:n.createComment(\"\"),children:[],refused:!0}),d=(a,h)=>{if(a.namespace===\"html\"&&a.name&&Rs.has(a.name))return a.dom;if(h?.namespace===\"html\"&&h.name===\"textarea\")return h.dom},E=(a,h,m)=>{let f=a.dom;if(m!=null&&typeof m!=\"string\")return p({reason:\"value\",element:a.name,name:h});let b=Mr(a.namespace,a.name,h,m??null,e);if(\"refused\"in b){let J=Mr(a.namespace,a.name,h,null,e);return\"refused\"in J||f.removeAttribute(J.name),p(b.refused)}for(let J of b.dropped??[])p(J);let O=a.namespace===\"html\"&&ea.has(b.name)&&Rs.has(a.name),D=f,j=O?b.name===\"value\"?D.value:b.name===\"checked\"?D.checked:D.selected:void 0;b.value===null?f.removeAttribute(b.name):f.setAttribute(b.name,b.value),e.onAttribute?.(f,b.name),O&&(b.name===\"value\"&&\"value\"in D?(D.value=b.value??\"\",j!==D.value&&e.onFieldSet?.(f)):b.name===\"checked\"&&\"checked\"in D?(D.checked=b.value!==null,j!==D.checked&&e.onFieldSet?.(f)):b.name===\"selected\"&&\"selected\"in D&&(D.selected=b.value!==null,j!==D.selected&&e.onFieldSet?.(f.parentElement?.closest(\"select\")??f)))},N=a=>{if(!a.refused){c-=1,a.id!==void 0&&s.delete(a.id);for(let h of a.children)N(h)}},v=(a,h)=>{if(!jn(a)||typeof a.id!=\"string\"||s.has(a.id))return p({reason:\"record\"}),w();if(c>=r)return p({reason:\"budget\"}),u||(u=!0,e.onOverBudget?.()),w();let m=a.id;if(a.type===Qi)return w();if(a.type===Ji){if(Dr(h.namespace,h.name))return p({reason:\"child\",element:h.name}),w();let j=n.createTextNode(String(a.data??\"\").slice(0,Tr)),J={dom:j,children:[],text:!0,id:m,parent:h};return s.set(m,J),i.set(j,m),c+=1,J}if(a.type!==Zi)return p({reason:\"record\"}),w();let f=String(a.element);if(Dr(h.namespace,h.name))return p({reason:\"child\",element:f}),w();let b=ys(f,h.namespace);if(\"refused\"in b)return p(b.refused),w();let O=n.createElementNS(b.namespace===\"svg\"?Yo:Bo,b.name);b.as&&O.setAttribute(\"data-graview-as\",b.as),b.namespace===\"html\"&&b.name===\"img\"&&O.setAttribute(\"referrerpolicy\",\"no-referrer\");let D={dom:O,name:b.name,namespace:b.namespace,children:[],id:m,parent:h};if(s.set(m,D),i.set(O,m),c+=1,jn(a.attributes))for(let[j,J]of Object.entries(a.attributes))E(D,j,J);if(e.decorate?.(O,b.name,b.namespace),jn(a.properties))for(let j of Object.keys(a.properties))p({reason:\"attribute\",element:b.name,name:j});if(jn(a.eventListeners))for(let j of Object.keys(a.eventListeners))a.eventListeners[j]!=null&&p({reason:\"attribute\",element:b.name,name:`on${j}`});if(Array.isArray(a.children))for(let j of a.children){let J=v(j,D);D.children.push(J),O.appendChild(J.dom)}return D},g=a=>{if(!Array.isArray(a))return p({reason:\"record\"});let[h,m]=a,f=typeof m==\"string\"?s.get(m):void 0;if(!f)return p({reason:\"record\"});switch(h){case Yi:{if(f.text)return p({reason:\"record\"});let b=Number(a[3]),O=Number.isInteger(b)&&b>=0&&b<=f.children.length?b:f.children.length,D=v(a[2],f);f.dom.insertBefore(D.dom,f.children[O]?.dom??null),f.children.splice(O,0,D),f.namespace===\"html\"&&f.name===\"textarea\"&&e.onFieldSet?.(f.dom);return}case Wi:{let b=Number(a[2]),O=f.children[b];if(!O)return p({reason:\"record\"});f.children.splice(b,1),O.dom.parentNode?.removeChild(O.dom),N(O);return}case qi:{if(!f.text)return p({reason:\"record\"});f.dom.data=String(a[2]??\"\").slice(0,Tr);let b=d(f,f.parent);b&&e.onFieldSet?.(b);return}case Xi:{if(f===l||f.text)return p({reason:\"record\"});let b=String(a[2]),O=a[4]??Ss;return O===Ki?E(f,b,a[3]):p(O===Ss||O===Os?{reason:\"attribute\",element:f.name,name:O===Os?`on${b}`:b}:{reason:\"record\"})}default:return p({reason:\"record\"})}};return{apply(a,h){if(!Array.isArray(a))return p({reason:\"record\"}),!0;for(let m=0;m<a.length;m+=1){if(h&&m%32===0&&h())return!1;g(a[m])}return!0},get refused(){return o},get size(){return c},idOf:a=>i.get(a),elementOf(a){let h=s.get(a);return h&&!h.text&&h!==l?h.dom:void 0},dispose(){for(let a of l.children)N(a);for(l.children.length=0;t.firstChild;)t.removeChild(t.firstChild)}}}function Cs(t,e,n){let{root:r}=ws(),o=!1,s=ks(r,{origin:n.origin??\"null\",...n.imageOrigins?{imageOrigins:n.imageOrigins}:{},...n.asset?{asset:n.asset}:{},maxNodes:n.maxNodes,onOverBudget:()=>o=!0});for(let c of t)s.apply(c);let i=[...s.refused],l=\"\";if(typeof e==\"string\"){let c=ps(e);l=c.css;for(let u of c.refused)i.push({reason:\"css\",name:\"stylesheet\",css:u})}return{root:r,refused:i,size:s.size,over:o,css:l}}function ta(t,e={}){let n=\"element\"in t&&t.element?`<${t.element}>`:\"\",r=t.name?` ${t.name}`:\"\";switch(t.reason){case\"element\":return{at:`drawing ${n}`,says:`Not drawn: ${n} is not in the open kit.`};case\"attribute\":return{at:`drawing ${n}${r}`,says:`Not drawn: ${n||\"an element\"} does not take${r}.`};case\"value\":return{at:`drawing ${n}${r}`,says:`Not drawn: the value of${r} is not one the open kit takes.`};case\"url\":return{at:`drawing ${n}${r}`,says:t.address!==void 0&&\"element\"in t&&t.element===\"img\"?`Not drawn: ${Es(t.address,e,\"length\"in t?t.length:void 0)}`:\"Not drawn: an address. A view loads nothing; an image is a data: image.\"};case\"child\":return{at:`drawing ${n}`,says:`Not drawn: ${n} holds nothing.`};case\"record\":return{at:\"drawing\",says:\"Not drawn: a record the drawing's format does not know.\"};case\"budget\":return{at:\"drawing\",says:\"Not drawn: more nodes than a view may draw.\"};case\"css\":return{at:`stylesheet${r===\" stylesheet\"?\"\":r}`,says:`Not drawn: CSS the open kit leaves out${t.css?` (${t.css.reason}${t.css.name?` ${t.css.name}`:\"\"})`:\"\"}.`}}}function Ps(t,e){let{limits:n}=e;if(t.messages>n.messages)return{ok:!1,reason:\"flood\",detail:`It sent ${t.messages} messages, more than the ${n.messages} a view may send in a second.`};let r=new Set(e.acts);for(let c of t.asked)if(!r.has(c.name))return{ok:!1,reason:\"act\",detail:`It asks for the act \"${c.name}\", which its manifest does not name.`};let o=Cs(t.renders,t.css,{maxNodes:n.maxNodes,...e.origin?{origin:e.origin}:{},...e.imageOrigins?{imageOrigins:e.imageOrigins}:{},...e.assets?{asset:c=>c}:{}});if(o.over)return{ok:!1,reason:\"nodes\",detail:`It drew more than the ${n.maxNodes.toLocaleString(\"en-US\")} things a view may draw.`};let s=[...e.places,...(e.lists??[]).filter(c=>!e.places.some(u=>u.as===c)).map(c=>({as:c}))],i=vs(o.root,{props:e.props,places:s,...e.accepts?{accepts:e.accepts}:{}});for(let c of i.acts)if(!r.has(c))return{ok:!1,reason:\"act\",detail:`It binds a press to the act \"${c}\" (data-act), which its manifest does not name.`};let l=[...o.refused.map(c=>ta(c,{...e.imageOrigins?{origins:e.imageOrigins}:{},assets:e.assets===!0})),...i.problems];for(let c of t.went)\"record\"in c&&!(e.props.node?.id===c.record||(e.props.nodes??[]).some(u=>u.id===c.record)||Dt(s,c.record))&&l.push({at:\"navigate\",says:`It goes to ${vr(c.record)}, which this seat was not shown and is no place of this app: the host will not follow it. A view goes to a record by its id, or to a place by its slug.${lt(s)}`}),\"place\"in c&&!Dt(s,c.place)&&l.push({at:\"navigate\",says:`It goes to the place ${vr(c.place)}, which this app does not have.${lt(s)}`});return{ok:!0,parts:i.parts,problems:l}}var Gr=\"graviewHeadless\",Ur=\"graviewHeadlessView\";var Ds=globalThis,na=Promise.prototype.then,ra=Promise.resolve(),jr=t=>void na.call(ra,t),zn=Ds.performance,Ht=zn&&typeof zn.now==\"function\"?zn.now.bind(zn):Date.now,Ve=JSON.stringify,Ms=JSON.parse,oa=Object.defineProperty,zr=t=>(t instanceof Error?`${t.name}: ${t.message}`:String(t)).slice(0,500),Lt=t=>{try{return Ms(Ve(t??null))}catch{return null}},V={renders:[],asked:[],went:[],ms:0,logs:[],messages:0},je,Fn=(t,e)=>{je??={reason:t,detail:e}},ft=t=>{V.logs.length<50&&V.logs.push(t.slice(0,500))},mt={removed:[],stuck:[],sealed:!1},Fr=Qo({send(t){V.messages+=1,t.type===\"render\"?V.renders.push(Lt(t.records)):t.type===\"style\"?V.css=String(t.css):t.type===\"gestures\"?V.gestures=Lt(t.bound):t.type===\"navigate\"&&\"place\"in t?V.went.push({place:String(t.place),...t.where!==void 0?{where:Lt(t.where)}:{},...t.section!==void 0?{section:String(t.section)}:{}}):t.type===\"navigate\"&&\"to\"in t&&V.went.push({record:String(t.to),...t.where!==void 0?{where:Lt(t.where)}:{},...t.section!==void 0?{section:String(t.section)}:{}})},act(t,e){return V.messages+=1,V.asked.push({name:String(t),args:Lt(e)}),Promise.resolve({type:\"answer\",id:V.asked.length,ok:!1,reason:\"refused\",message:\"Nothing is applied in a headless run.\"})},navigate(t){V.messages+=1,V.went.push({record:String(t)})},microtask:jr,now:Ht,threw:t=>Fn(\"error\",`It threw: ${zr(t)}`),warn:ft,hardening:()=>mt}),_s=!1,Vr=!1;function sa(t){if(Vr||typeof t!=\"function\"||(Vr=!0,je))return;let e=Ht();try{t.call(void 0,Fr.view)}catch(n){Fn(\"error\",`It threw: ${zr(n)}`)}V.ms+=Ht()-e}async function ia(t){if(_s)return Ve({ok:!1,reason:\"refused\",detail:\"A headless script runs one view, once: something called its entry before the host did.\"});_s=!0;let e;try{e=Ms(String(t))}catch{return Ve({ok:!1,reason:\"isolate\",detail:\"The run was not handed its input as JSON.\"})}if(!Vr&&!je)return Ve({ok:!1,reason:\"isolate\",detail:\"The script held no view.\"});let n=Ht();je||Fr.hear({type:\"props\",props:e.props,push:1}),V.ms+=Ht()-n,V.ms>=e.limits.pushMs&&Fn(\"slow\",`It took longer than ${e.limits.pushMs.toLocaleString(\"en-US\")} ms to draw what it was shown.`);for(let o=0;o<64&&!je;o+=1)await new Promise(s=>jr(s));if(je)return Ve({ok:!1,...je,transcript:V});let r=Ps(V,e);return r.ok?Ve({ok:!0,transcript:V,drawn:{parts:r.parts,problems:r.problems},hardening:{removed:mt.removed.length,sealed:mt.sealed}}):Ve({ok:!1,reason:r.reason,detail:r.detail,transcript:V})}var aa=Object.freeze({log:(...t)=>ft(t.map(String).join(\" \")),info:(...t)=>ft(t.map(String).join(\" \")),debug:(...t)=>ft(t.map(String).join(\" \")),warn:(...t)=>ft(t.map(String).join(\" \")),error:(...t)=>ft(t.map(zr).join(\" \"))}),la=0,Is=()=>la+=1,ca=[[\"console\",aa],[\"setTimeout\",Is],[\"setInterval\",Is],[\"clearTimeout\",()=>{}],[\"clearInterval\",()=>{}],[\"queueMicrotask\",jr],[\"graview\",Fr.view],[Ur,sa],[Gr,t=>ia(t)]];for(let[t,e]of ca)oa(Ds,t,{value:e,writable:!0,enumerable:!1,configurable:!0});mt=Mo(globalThis,[\"graview\",Ur,Gr],{primitivesStay:!0});mt.stuck.length>0&&Fn(\"refused\",`This isolate could not be hardened: ${mt.stuck.join(\", \")} would not go.`);})();\n";
|
|
8
8
|
//# sourceMappingURL=runtime.generated.js.map
|