@graview/guest 0.1.44 → 0.1.45
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 +45 -7
- package/dist/cli.d.ts +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +11 -4
- package/dist/cli.js.map +1 -1
- package/dist/headless/describe.d.ts.map +1 -1
- package/dist/headless/describe.js +5 -0
- package/dist/headless/describe.js.map +1 -1
- package/dist/headless/draw.d.ts +5 -2
- package/dist/headless/draw.d.ts.map +1 -1
- package/dist/headless/draw.js +6 -5
- package/dist/headless/draw.js.map +1 -1
- package/dist/headless/index.d.ts +24 -0
- package/dist/headless/index.d.ts.map +1 -1
- package/dist/headless/index.js +19 -7
- package/dist/headless/index.js.map +1 -1
- package/dist/headless/judge.d.ts +8 -2
- package/dist/headless/judge.d.ts.map +1 -1
- package/dist/headless/judge.js +8 -3
- package/dist/headless/judge.js.map +1 -1
- package/dist/headless/press.d.ts +51 -0
- package/dist/headless/press.d.ts.map +1 -0
- package/dist/headless/press.js +135 -0
- package/dist/headless/press.js.map +1 -0
- package/dist/headless/protocol.d.ts +21 -2
- 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 +18 -1
- package/dist/headless/runtime.js.map +1 -1
- package/dist/host/css.d.ts +7 -0
- package/dist/host/css.d.ts.map +1 -1
- package/dist/host/css.js +23 -0
- package/dist/host/css.js.map +1 -1
- package/dist/host/external-links.d.ts +20 -0
- package/dist/host/external-links.d.ts.map +1 -0
- package/dist/host/external-links.js +102 -0
- package/dist/host/external-links.js.map +1 -0
- package/dist/host/links.d.ts +6 -2
- package/dist/host/links.d.ts.map +1 -1
- package/dist/host/links.js +37 -13
- package/dist/host/links.js.map +1 -1
- 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/open-draw.d.ts +12 -5
- package/dist/host/open-draw.d.ts.map +1 -1
- package/dist/host/open-draw.js +13 -4
- package/dist/host/open-draw.js.map +1 -1
- package/dist/host/open-judge.d.ts +9 -1
- package/dist/host/open-judge.d.ts.map +1 -1
- package/dist/host/open-judge.js +5 -1
- package/dist/host/open-judge.js.map +1 -1
- package/dist/host/open-render.d.ts.map +1 -1
- package/dist/host/open-render.js +6 -0
- package/dist/host/open-render.js.map +1 -1
- package/dist/host/press.d.ts +15 -1
- package/dist/host/press.d.ts.map +1 -1
- package/dist/host/press.js +42 -3
- package/dist/host/press.js.map +1 -1
- package/dist/host/pressable.d.ts +37 -0
- package/dist/host/pressable.d.ts.map +1 -0
- package/dist/host/pressable.js +113 -0
- package/dist/host/pressable.js.map +1 -0
- package/dist/host/session.d.ts +2 -2
- package/dist/host/session.d.ts.map +1 -1
- package/dist/host/session.js +2 -2
- package/dist/host/session.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 +13 -0
- package/dist/host/view.d.ts.map +1 -1
- package/dist/host/view.js +32 -11
- package/dist/host/view.js.map +1 -1
- package/dist/host/worker-react.d.ts +4 -0
- package/dist/host/worker-react.d.ts.map +1 -1
- package/dist/host/worker-react.js +19 -3
- package/dist/host/worker-react.js.map +1 -1
- package/dist/open-kit.d.ts +6 -2
- package/dist/open-kit.d.ts.map +1 -1
- package/dist/open-kit.js +9 -3
- package/dist/open-kit.js.map +1 -1
- package/dist/protocol.d.ts +3 -3
- package/dist/protocol.d.ts.map +1 -1
- package/dist/protocol.js +1 -1
- package/dist/worker/view-global.d.ts +3 -0
- package/dist/worker/view-global.d.ts.map +1 -1
- package/dist/worker/view-global.js +15 -5
- package/dist/worker/view-global.js.map +1 -1
- package/dist/worker/view.js +2 -2
- 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 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";
|
|
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\"),xe=Symbol(\"prefix\"),ve=Symbol(\"value\"),P=Symbol(\"ns\"),Q=Symbol(\"owner\"),H=Symbol(\"owner_document\"),fe=Symbol(\"attributes\"),$=Symbol(\"prev\"),v=Symbol(\"next\"),_=Symbol(\"child\"),ee=Symbol(\"parent\"),Se=Symbol(\"host\"),se=Symbol(\"data\"),_e=Symbol(\"listeners\"),Xn=Symbol(\"isTrusted\"),ze=Symbol(\"path\"),Fe=Symbol(\"stop_immediate_propagation\"),Be=Symbol(\"dispatching\"),he=Symbol(\"content\"),G=Symbol(\"hooks\"),Gt=Symbol(\"extensions\"),Ie=Symbol(\"hooks_dispatch\"),B=Symbol(\"is_connected\"),Ye=Symbol(\"create_element\"),Yr=0,ne=1,We=2,qe=3,Xe=8,De=9,Wr=10,Oe=11,I=\"http://www.w3.org/1999/xhtml\",ie=\"http://www.w3.org/2000/svg\",qr=\"http://www.w3.org/XML/1998/namespace\",gt=\"http://www.w3.org/2000/xmlns/\";function Ut(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 Xr(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 Kr=/^(?:[A-Za-z][^\\0\\t\\n\\f\\r\\u0020/>]*|[:_\\u0080-\\u{10FFFF}][A-Za-z0-9-.:_\\u0080-\\u{10FFFF}]*)$/u,Zr=/[\\0\\t\\n\\f\\r />=]/u,Fs=/[\\0\\t\\n\\f\\r />]/u;function ge(t){if(t==null)return null;let e=String(t);return e===\"\"?null:e}function Jr(t){Kr.test(t)||Zn(t)}function Kn(t){(t===\"\"||Zr.test(t))&&Zn(t)}function jt(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===\"\"||Fs.test(i))||(n===\"element\"?!Kr.test(l):l===\"\"||Zr.test(l)))&&Zn(o),i!=null&&r==null)throw L(`A namespace is required for the prefix in \"${o}\"`,\"NamespaceError\");if(i===\"xml\"&&r!==qr)throw L(\"The xml prefix requires the XML namespace\",\"NamespaceError\");if((o===\"xmlns\"||i===\"xmlns\")&&r!==gt)throw L(\"The xmlns name requires the XMLNS namespace\",\"NamespaceError\");if(r===gt&&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 Zn(t){throw L(`Invalid name: \"${t}\"`,\"InvalidCharacterError\")}var Vt=0,zt=1,Qr=2,Jn=3,Bs=typeof performance>\"u\"?Date.now:performance.now.bind(performance),Y=class{static NONE=Vt;static CAPTURING_PHASE=zt;static AT_TARGET=Qr;static BUBBLING_PHASE=Jn;timeStamp=Bs();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,Xn,{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[Xn]}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 Qn(t,e,n){if(t.cancelBubble)return;let o=e[_e]?.get(t.type)?.[n===zt?\"capture\":\"bubble\"];if(o)for(let s of[...o]){if(!o.has(s)||s.signal?.aborted)continue;t.eventPhase=t.target===e?Qr:n,t.currentTarget=e;let i=s.normalizedListener;try{typeof i==\"object\"?i.handleEvent(t):i.call(e,t)}catch(l){setTimeout(Ys,0,l)}if(t[Fe])break}}function Ys(t){throw t}var yt=[],Ft=new WeakMap;function Bt(t,e){let n=Ft.get(t);n?n.push(e):Ft.set(t,[e]),yt[yt.length-1].push(t)}function W(t){let e=[];yt.push(e);let n;try{n=t()}catch(r){yt.pop();try{eo(e)}catch{}throw r}return yt.pop(),eo(e),n}function eo(t){let e,n=!1;for(let r of t){let o=Ft.get(r);if(o){for(;o.length>0;){let s=o.shift();try{s()}catch(i){n||(e=i,n=!0)}}Ft.delete(r)}}if(n)throw e}var Yt=[],bt=[],er=!1;function Me(t){for(let e of t)Yt.push(e),e[1]&&bt.push(e[1]);if(!er){er=!0;try{let e,n=!1;for(let r=0;r<Yt.length;r++){let[o,s]=Yt[r];s&&bt.splice(bt.indexOf(s),1);try{o()}catch(i){n||(e=i,n=!0)}}if(n)throw e}finally{Yt.length=0,bt.length=0,er=!1}}}function Et(t){let e=t;for(;e;){if(bt.includes(e))return!0;e=e[ee]??e[Se]}return!1}var wt=Symbol(\"listenerRegistrations\"),Ae=class{[_e]=void 0;[wt]=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=tr(o),d=this[wt];d||(d=new Map,this[wt]=d);let c=d.get(e);c||(c={},d.set(e,c));let f=c[l];if(f||(f=new Map,c[l]=f),f.has(n))return;let w=this,u={type:e,listener:n,capture:o,once:s,normalizedListener:n,signal:i};(s||i)&&(u.normalizedListener=function(...a){if(u.signal?.aborted){Wt(w,u);return}return u.once&&Wt(w,u),typeof u.listener==\"object\"?u.listener.handleEvent(...a):u.listener.call(this,...a)});let E=this[_e];E||(E=new Map,this[_e]=E);let N=E.get(e);N||(N={},E.set(e,N));let x=N[l];if(x||(x=new Set,N[l]=x),f.set(n,u),x.add(u),i){let h=()=>{Wt(w,u)};u.abortListener=h,i.addEventListener(\"abort\",h,{once:!0})}this[H]?.defaultView[Ie].addEventListener?.(this,e,n,r)}removeEventListener(e,n,r){return Ws.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(Qn(e,n[s],zt),e.cancelBubble)return!e.defaultPrevented;let o=e.bubbles?n:n.slice(0,1);for(let s=0;s<o.length;s++)if(Qn(e,o[s],Jn),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 Ws(t,e,n){if(e==null)return;let r=n===!0||n&&n.capture===!0,o=tr(!!r),s=this[wt]?.get(t)?.[o]?.get(e);s&&Wt(this,s)}function tr(t){return t?\"capture\":\"bubble\"}function Wt(t,e){let n=tr(e.capture),r=t[wt],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[_e],l=i?.get(e.type);if(!l)return;let d=l[n];d?.delete(e)&&(d.size===0&&delete l[n],!l.bubble&&!l.capture&&i?.delete(e.type),t[H]?.defaultView[Ie].removeEventListener?.(t,e.type,e.listener,e.capture))}var ae=class extends Array{item(e){return this[e]??null}};var Tt=0,to=1,or=2,sr=3,xt=4,no=0,ro=1,Kt=2,Zt=3,oo=4,rr=5,so=6,io=7,qt=/^(?:--|-?[A-Za-z_\\u0080-\\u{10FFFF}])[A-Za-z0-9_\\u0080-\\u{10FFFF}-]*$/u;function qs(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 Jt(t,e){let n=typeof e==\"string\"?vt(e):[{combinator:xt,matchers:e}],r=null,o=t[_];return o&&n[0].matchers.length&&ir(o,n,s=>(r=s,!1)),r}function Qt(t,e){let n=typeof e==\"string\"?vt(e):[{combinator:xt,matchers:e}],r=new ae,o=t[_];return o&&n[0].matchers.length&&ir(o,n,s=>{r.push(s)}),r}function vt(t,e=!1,n=!1){let r={combinator:xt,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,d;for(;d=s.exec(i);){d.index!==l&&te(t),d[1]&&(r.matchers.length===0&&!(n&&o.length===1)&&te(t),d[1]===\">\"?r.combinator=to:d[1]===\"+\"?r.combinator=sr:d[1]===\"~\"?r.combinator=or:r.combinator=Tt,r={combinator:xt,matchers:[]},o.push(r));let c=d[8]?z(d[8]):d[2]||d[7];d[7]!=null&&!d[6]&&r.matchers.length>0&&te(t);let w,u=d[4]??d[5]??d[7];if(d[2]){qt.test(c)||te(t);let E=d[5],N=E?.[0];if(d[3]==null&&(N==='\"'||N===\"'\")){let x=d[0].lastIndexOf(E);u=i.slice(d.index+x+1),s.lastIndex=i.length}else E!=null&&!qt.test(E)&&te(t);w=oo}else d[6]?(qt.test(c)||te(t),w=d[6]===\"#\"?Kt:Zt):d[8]?w=d[9]==null?rr:so:d[7]===\"*\"?w=no:d[7]&&qt.test(d[7])?w=ro:te(t);d[9]?([u,s.lastIndex]=qs(i,s.lastIndex),c!==\"has\"&&c!==\"not\"&&te(t),c===\"has\"&&e&&te(t),vt(u,e||c===\"has\",c===\"has\")):w===rr&&te(t),r.matchers.push({type:w,name:c,value:u}),l=s.lastIndex}return(l!==i.length||r.matchers.length===0)&&te(t),o}function Xs(t,e){let n=vt(e);return n[0]?.matchers.length?Nt(t,n):!1}function Ks(t,e){let n=vt(e,!0,!0),r=n[0];if(n.length===1&&r.matchers.length===0)return!1;let o=Tt,s={type:io,name:\":scope\"};if(r.matchers.length===0?(o=r.combinator,r.matchers.push(s)):n.unshift({combinator:Tt,matchers:[s]}),n.some(({matchers:d})=>d.length===0))return!1;let i=o===sr||o===or?t[v]:t[_];if(!i)return!1;let l=!1;return ir(i,n,()=>(l=!0,!1),t),l}function ir(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[v];l&&o.push(l),s=i;continue}}s=s[v]??o.pop()??null}return!0}function Nt(t,e,n){let{combinator:r,matchers:o}=e[e.length-1];if(r===xt){if(!Xt(t,o,n))return!1;let l=e.slice(0,-1);return l.length===0||Nt(t,l,n)}let s=r===to||r===Tt?ee:$,i=t[s];if(!i)return!1;if(r===Tt||r===or){for(;i;){if(Z(i)&&Xt(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===sr&&!Z(i)){for(;i&&!Z(i);)i=i[s];if(!i)return!1}if(!Z(i)||!Xt(i,o,n))return!1;let l=e.slice(0,-1);return l.length===0||Nt(i,l,n)}}function nr(t,e){return t.getAttributeNS(null,t.namespaceURI===I?z(e):e)}function Xt(t,e,n){if(!t)return!1;if(Array.isArray(e)){for(let i of e)if(Xt(t,i,n)===!1)return!1;return!0}let{type:r,name:o,value:s}=e;switch(r){case no:return o===\"*\";case ro:return t.namespaceURI===I?t.localName===z(o):t.localName===o;case Kt:return nr(t,\"id\")===o;case Zt:let i=nr(t,\"class\");return i?Ut(i).includes(o):!1;case oo:let l=nr(t,o);return s==null?l!=null:l===s;case io:return t===n;case rr:te(`:${o}`);case so:switch(o){case\"has\":return Ks(t,s||\"\");case\"not\":return!Xs(t,s||\"\");default:te(`:${o}(${s})`)}}return!1}function Zs(t){return t.nodeType===We}function St(t){return se in t}function lr(t){return t.nodeType===qe}function Js(t){return t.nodeType===Xe}function Z(t){return t.nodeType===ne}function ar(t){return t.nodeType===Oe}function uo(t){return\"appendChild\"in t}function en(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 d of At(i)){if(o.has(d)||(o.add(d),e.push(d),l.push(d),!Z(d)))continue;let c=d[fe];if(c)for(let w of c)o.has(w)||(o.add(w),e.push(w));let f=d[he];f&&!o.has(f)&&!r.has(f)&&(r.add(f),n.push(f))}s??=l}return{nodes:e,treeNodes:s}}function Ot(t,e){for(let n of t)n[H]=e}function ao(t,e){let n=t.constructor,r=new n(t.name,t.value,t.namespaceURI);return r[H]=e,r}function lo(t,e){if(lr(t))return e.createTextNode(t.data);if(Js(t))return e.createComment(t.data);if(Zs(t))return ao(t,e);if(Z(t)){let n=e[Ye](t[C],t.namespaceURI,t[xe],t.localName);if(t[fe])for(let r=0;r<t[fe].length;r++){let o=t[fe].item(r);n.attributes.setNamedItem(ao(o,e))}return n}else{if(ar(t))return e.createDocumentFragment();{let n=new t.constructor;return n[H]=e,n}}}function tn(t,e,n=t.ownerDocument){if(t.nodeType===De)throw L(\"Cannot clone a document node\",\"NotSupportedError\");let r=lo(t,n);if(!e||!Z(t)&&!ar(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,d;if(i.cloningContent)if(i.contentSource&&i.contentDestination)l=i.contentSource.childNodes[i.childIndex++],d=i.contentDestination;else{s.pop(),i.appendTo&&i.appendTo.appendChild(i.destination);continue}else if(l=i.source.childNodes[i.childIndex++],d=i.destination,!l){if(i.cloningContent=!0,i.childIndex=0,Z(i.source)&&i.source.namespaceURI===I&&i.source.localName===\"template\"){let f=i.source[he];f&&(o.has(f)&&co(),o.add(f),i.contentSource=f,i.contentDestination=i.destination.content)}continue}if(!l){s.pop(),i.appendTo&&i.appendTo.appendChild(i.destination);continue}o.has(l)&&co(),o.add(l);let c=lo(l,n);Z(l)||ar(l)?s.push({source:l,destination:c,appendTo:d,childIndex:0,cloningContent:!1}):d.appendChild(c)}return r}function co(){throw new Error(\"Cannot clone a cyclic or repeated node graph\")}function nn(t,e){let n=String(e);return n===\"\"?null:Jt(t,[{type:Kt,name:n}])}function rn(t,e){let n=[...new Set(Ut(String(e)))];return Qt(t,n.map(r=>({type:Zt,name:r})))}function on(t,e){let n=String(e),r=z(n),o=[];for(let s of sn(t))Z(s)&&(n===\"*\"||(s.namespaceURI===I?s[C]===r:s[C]===n))&&o.push(s);return o}function sn(t){let e=[],n=[],r=t[_];for(;r;){e.push(r);let o=r[_],s=r[v];o?(s&&n.push(s),r=o):r=s??n.pop()??null}return e}function At(t){let e=sn(t);return e.unshift(t),e}var le=class extends Ae{nodeType=Yr;[C]=\"\";[ee]=null;[Se]=null;[_]=null;[$]=null;[v]=null;[B]=!1;get[G](){return this[H].defaultView[Ie]}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 Qs(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[v]}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[v];for(;e&&e.nodeType!==1;)e=e[v];return e}set nextElementSibling(e){}get firstChild(){return this[_]}set firstChild(e){}get lastChild(){let e=this[_];for(;e;){let n=e[v];if(n==null)break;e=n}return e}set lastChild(e){}get nodeValue(){return St(this)?this.data:null}set nodeValue(e){St(this)&&(this.data=e)}get textContent(){if(St(this))return this.data;let e=\"\";for(let n of sn(this))lr(n)&&(e+=n.data);return e}set textContent(e){if(St(this))this.data=e;else if(uo(this)){let n=e==null?\"\":String(e);n===\"\"?this.replaceChildren():this.replaceChildren(n)}}cloneNode(e){return tn(this,e)}contains(e){let n=e;for(;n!=null;){if(n===this)return!0;n=n.parentNode}return!1}};function Qs(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(gt,\"xmlns\");if(r!=null&&r.prefix==null)return ge(r.value);e=n.parentElement;break}case De:e=e.documentElement;break;case Wr:case Oe:return null;case We:e=e.ownerElement;break;default:e=e.parentElement}return null}var ce=Symbol(\"insertNode\"),ur=Symbol(\"preflightInsertions\"),an=Symbol(\"replaceNode\"),ke=class extends le{remove(){let e=this.parentNode;e&&e.removeChild(this)}replaceWith(...e){let n=Le(e),r=this.parentNode;if(r)return cr(o=>{ye(r,n);let s=this[v];for(;s&&n.includes(s);)s=s[v];let i=dr(r,n,o);this.parentNode===r?r[an](i,this,o):r[ce](i,s,o)})}before(...e){let n=Le(e),r=this.parentNode;if(r)return cr(o=>{ye(r,n);let s=this[$];for(;s&&n.includes(s);)s=s[$];let i=dr(r,n,o);r[ce](i,s?s[v]:r.firstChild,o)})}after(...e){let n=Le(e),r=this.parentNode;if(r)return cr(o=>{ye(r,n);let s=this[v];for(;s&&n.includes(s);)s=s[v];let i=dr(r,n,o);r[ce](i,s,o)})}};function cr(t){return W(()=>{let e=[];try{t(e)}catch(n){try{Me(e)}catch{}throw n}Me(e)})}function Le(t){return t.map(e=>e instanceof le?e:String(e))}function kt(t,e){return e instanceof le?e:t.ownerDocument.createTextNode(String(e))}function ye(t,e){for(let n of e){if(!(n instanceof le))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[Se]}}}function dr(t,e,n){let r=[];for(let s of e)r.push(kt(t,s));if(r.length===1)return r[0];let o=t.ownerDocument.createDocumentFragment();o[ur](r);for(let s of r)o[ce](s,null,n);return o}var ln,fr=0,fo=0,po=0,mo=0,Ke=!1,mr=!1,Rt=!1,cn=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=ei(n),o=ln??=new WeakMap,s=o.get(e);s==null&&(s=new Map,o.set(e,s));let i=s.get(this);i==null?fr++:pr(i,-1),s.set(this,r),pr(r,1),this.#e.add(e)}disconnect(){let e=ln;if(e!=null){for(let n of this.#e){let r=e.get(n),o=r?.get(this);o!=null&&(r.delete(this),fr--,pr(o,-1)),r?.size===0&&e.delete(n)}this.#e.clear(),this.#n.length=0,fr===0&&(ln=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 de(t){let e=ln;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 ae,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 ae,target:t.target,type:t.type})}function dn(...t){let e=new ae;return e.push(...t),e}function ei(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 pr(t,e){t.attributes&&(fo+=e),t.characterData&&(po+=e),t.childList&&(mo+=e),Ke=fo>0,mr=po>0,Rt=mo>0}var pe=class extends ke{childNodes=new ae;children=new ae;appendChild(e){return W(()=>this[ce](e,null))}insertBefore(e,n){return W(()=>this[ce](e,n||null))}append(...e){return W(()=>{let n=Le(e.filter(r=>r!=null));n.length>1&&ye(this,n);for(let r of n)this[ce](kt(this,r),null)})}prepend(...e){return W(()=>{let n=Le(e.filter(o=>o!=null));n.length>1&&ye(this,n);let r=this.firstChild;for(let o of n)this[ce](kt(this,o),r)})}replaceChildren(...e){return W(()=>{let n=Le(e.filter(o=>o!=null));ye(this,n);let r;for(;r=this.firstChild;)this.removeChildImmediately(r);for(let o of n)this[ce](kt(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]?At(e):void 0,r=e[$],o=e[v],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\"),Me(this.collectRemovalHookEffects(e,s))}replaceChild(e,n){return W(()=>this[an](e,n))}[an](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[v],i=this.prepareInsertion(e),l=this[B]?At(n):void 0,d=new Set(i.map(({node:u})=>u)),c=s;for(;c&&d.has(c);)c=c[v];let f=un(this,n);if(l){for(let E of l)E[B]=!1;let u=new Set(l);for(let E of i)u.has(E.node)&&(E.shouldDisconnect=!1)}this.commitInsertion(i,c);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,f),...this.collectInsertionHookEffects(i)],r),n}querySelectorAll(e){return Qt(this,e)}querySelector(e){return Jt(this,e)}[ce](e,n,r){return this.validateInsertion(e,n),this.insertIntoValidated(e,n,r),e}[ur](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[v]);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):Me(e)}prepareInsertion(e){let n=[];if(e.nodeType===Oe){let i=e[_];for(;i;)n.push(i),i=i[v]}else n.push(e);let r=this[B],o=this[H],s=[];for(let i of n){let l=i[B],d=l||r,c,f;if(i[H]===o)d&&(c=At(i));else{let w=en(i);f=w.nodes,d&&(c=w.treeNodes)}s.push({node:i,nodes:c,adoption:f,shouldDisconnect:l})}return s}commitInsertion(e,n){for(let s of e){let i=s.node[ee];if(i){let l=s.node[$],d=s.node[v];s.source={parent:i,index:un(i,s.node),previousSibling:l,nextSibling:d}}}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&&Ot(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[v]=n,e[$]=s,s?s[v]=e:this[_]=e,n[$]=e}else{e[v]=null;let s=this[_];if(s){let i;for(;i=s[v];)s=i;s[v]=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[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[$],nextSibling:e[v]}}queueRemovalMutationRecord(e,n,r,o){Rt&&de({type:\"childList\",target:e,removedNodes:dn(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),de({type:\"childList\",target:this,addedNodes:dn(r),previousSibling:n.previousSibling,nextSibling:n.nextSibling})}}collectRemovalHookEffects(e,n){return this.nodeType!==ne||Et(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&&!Et(s.parent)&&n.push([()=>s.parent[G].removeChild?.(s.parent,o,s.index)]),this.nodeType===ne&&!Et(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){go(e,n)}};function ho(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[v],l=un(t,e);if(o)for(let c of o)c[B]=!1;Ot(n.nodes,r),Rt&&de({type:\"childList\",target:t,removedNodes:dn(e),previousSibling:s,nextSibling:i}),o&&go(o,\"disconnectedCallback\");let d=[];t.nodeType===ne&&!Et(t)&&d.push([()=>t[G].removeChild?.(t,e,l)]),Me(d)}function un(t,e){let n=e[$],r=e[v];n?n[v]=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[v]=null,e[$]=null,o}function go(t,e){for(let n of t){let r=n[e];typeof r==\"function\"&&Bt(n,()=>r.call(n))}}function Ct(t,e,n,r,o){let{observedAttributes:s}=t.constructor,{attributeChangedCallback:i}=t;i==null||s==null||!s.includes(e)||Bt(t,()=>i.call(t,e,n,r,o))}var fn=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[v]}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[v]}return null}item(e){let n=this[_],r=0;for(;n;){if(r++===e)return n;n=n[v]}return null}get length(){let e=0,n=this[_];for(;n;)e++,n=n[v];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[v]=r[v]),this[_]===r&&(this[_]=r[v]);let s=r.value;return r[v]=null,r[Q]=null,Ke&&de({type:\"attributes\",target:n,attributeName:r.name,attributeNamespace:r[P],oldValue:s}),n[G].removeAttribute?.(n,r.name,r[P]),Ct(n,r.localName,s,null,r[P]),r}o=r,r=r[v]}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[v]=e:this[_]=e,e[v]=s[v],s[v]=null,o=s;break}i=s,s=s[v]}o==null&&(i?i[v]=e:this[_]=e),e[Q]=n,e[H]=n[H],o&&(o[Q]=null);let l=o==null||o.value!==e.value,d=o!=null&&o.name!==e.name;return l&&Ke&&de({type:\"attributes\",target:n,attributeName:e.name,attributeNamespace:e[P],oldValue:o?.value??null}),d&&n[G].removeAttribute?.(n,o.name,o[P]),(l||d)&&n[G].setAttribute?.(n,e.name,e.value,e[P]),l&&Ct(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[v]}};var He=class extends le{nodeType=We;[P]=null;[v]=null;[Q]=null;constructor(e,n,r){super(),this[C]=e,this[ve]=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[ve]}set value(e){let n=String(e),r=this[Q];if(!r){this[ve]=n;return}W(()=>{let o=this[ve];this[ve]=n,Ke&&o!==n&&de({type:\"attributes\",target:r,attributeName:this[C],attributeNamespace:this[P],oldValue:o}),this[G].setAttribute?.(r,this[C],n,this[P]),Ct(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 ti={amp:\"&\",AMP:\"&\",apos:\"'\",gt:\">\",GT:\">\",lt:\"<\",LT:\"<\",quot:'\"',QUOT:'\"'},ni=new Set([\"area\",\"base\",\"br\",\"col\",\"embed\",\"hr\",\"img\",\"input\",\"link\",\"meta\",\"param\",\"source\",\"track\",\"wbr\"]),ri=/(?:<([a-z][a-z0-9-:]*)((?:[\\s]+[^<>'\"=/\\s]+(?:=(['\"])[^]*?\\3|=[^>'\"\\s]*|))*)[\\s]*(\\/?)\\s*>|<\\/([a-z][a-z0-9-:]*)>|<!--(.*?)-->|([^<>]+))/gi,Eo=/\\s([^<>'\"=/\\n\\s]+)(?:=([\"'])([\\s\\S]*?)\\2|=([^>'\"\\n\\s]*)|)/g,oi=\"|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|\",si=/^(?:color|face|size)$/i;function yo(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 ti[n];let s=Number.parseInt(r??o,r?10:16);try{return String.fromCodePoint(s)}catch{return e}})}function wo(t){return t.namespaceURI===I&&ni.has(t.localName)}function bo(t){let e=t.localName;return t[P]===ie&&(e===\"foreignObject\"||e===\"desc\"||e===\"title\")}function ii(t,e){if(oi.includes(`|${t}|`))return!0;if(t!==\"font\")return!1;for(let n of e.matchAll(Eo))if(si.test(n[1]))return!0;return!1}function pn(t,e){let n=e.ownerDocument,r=n.createDocumentFragment(),o=[],s=r;for(let i of t.matchAll(ri)){let l=i[1];if(l){let d=i[2],c=z(l),f=o[o.length-1]?.element??e,w=f[P]===ie?ie:I;if(c===\"svg\")w=ie;else if(w===ie){if(bo(f))w=I;else if(ii(c,d)){for(;o.length>0;){let N=o[o.length-1];if(N.element[P]!==ie||bo(N.element))break;o.pop(),s=N.target}w=I}}let u=w===I?c:l,E=n[Ye](u,w,null,u);for(let N of d.matchAll(Eo))E.setAttribute(N[1],yo(N[3]||N[4]||\"\"));if(s.append(E),wo(E)||w!==I&&i[4])continue;o.push({element:E,target:s}),s=w===I&&c===\"template\"?E.content:E}else if(i[5]){let d=z(i[5]);for(let c=o.length-1;c>=0;c--){let f=o[c],w=z(f.element[C]);if(w===d){s=f.target,o.length=c;break}if(f.element[P]===I&&w===\"template\")break}}else i[6]?s.append(n.createComment(i[6])):s.append(yo(i[7]))}return r}function mn(t){return To([{type:\"content\",child:t[_]}])}function No(t){return To([{type:\"opening\",node:t}])}function To(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[ve];l!==\"\"&&(l=String(l).replace(/&/g,\"&\").replace(/\"/g,\""\"),e.push(`=\"${l}\"`)),s=s[v]}if(e.push(\">\"),wo(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[se].replace(/&/g,\"&\").replace(/\"/g,\""\").replace(/</g,\"<\").replace(/>/g,\">\"));break}case Xe:{let o=r;e.push(`<!--${o[se]}-->`);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 F=class extends pe{nodeType=ne;[P]=I;[xe]=null;get namespaceURI(){return this[P]}get prefix(){return this[xe]}get localName(){let e=this[xe];return e==null?this[C]:this[C].slice(e.length+1)}get nodeName(){return this[P]===I?Xr(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 He(\"slot\",n))}get attributes(){let e=this[fe];return e||(e=new fn(this),this[fe]=e),e}getAttributeNames(){return[...this.attributes].map(e=>e.name)}getElementsByTagName(e){return on(this,e)}get firstElementChild(){return this.children[0]??null}getElementsByClassName(e){return rn(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);Kn(r);let s=this[P]===I?z(r):r,i=this.attributes.getNamedItemNS(null,s);i?i.value=o:this.attributes.setNamedItem(new He(s,o))}setAttributeNS(e,n,r){let o=ge(e),s=String(n),i=String(r),l=jt(o,s,\"attribute\"),d=this.attributes.getNamedItemNS(l.namespace,l.localName);d?d.value=i:this.attributes.setNamedItemNS(new He(l.qualifiedName,i,l.namespace))}toggleAttribute(e,n){let r=String(e);Kn(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 He(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=pn(String(e),this);this.replaceChildren(n)}}};var Ze=class t extends F{[P]=ie;get ownerSVGElement(){let e=null,n=this.parentNode;for(;n instanceof t;)e=n,n=n.parentNode;return e}};var Re=class extends ke{[se]=\"\";constructor(e){super(),this[se]=e==null?\"\":String(e)}setData(e){let n=mr,r=n?this[se]:null,o=\"\";e!=null&&(o=typeof e==\"string\"?e:String(e)),this[se]=o,n&&r!==o&&de({type:\"characterData\",target:this,oldValue:r}),this[G].setText?.(this,o)}get data(){return this[se]}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 pe{nodeType=Oe;[C]=\"#document-fragment\";[H]=typeof window<\"u\"?window.document:null;getElementById(e){return nn(this,e)}};var tt=class extends F{get content(){let e=this[he];return e||(e=this.ownerDocument.createDocumentFragment(),e[Se]=this,this[he]=e),e}set content(e){}set innerHTML(e){this.content.replaceChildren(pn(String(e),this))}get innerHTML(){let e=this[he];return e?mn(e):\"\"}};var hn=class extends F{};var gn=class extends F{};var yn=class extends F{};var Pt=class extends pe{nodeType=De;[C]=\"#document\";[B]=!0;constructor(e){super(),this.defaultView=e,this[H]=this,this.documentElement=En(new yn,this,\"html\"),this.body=En(new hn,this,\"body\"),this.head=En(new gn,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 rn(this,e)}createElement(e){let n=String(e);return Jr(n),hr(this,z(n))}createElementNS(e,n){let r=jt(e,n,\"element\");return hr(this,r.qualifiedName,r.namespace,r.prefix,r.localName)}[Ye](e,n,r,o){return hr(this,e,n,r,o)}createTextNode(e){let n=bn(new Je(e),this);return this[G].createText?.(n,n.data),n}createComment(e){return bn(new Qe(e),this)}createDocumentFragment(){return bn(new et,this)}createEvent(){return new Y(\"\")}getElementById(e){return nn(this,e)}getElementsByTagName(e){return on(this,e)}importNode(e,n){if(e.nodeType===De)throw L(\"Cannot import a document node\",\"NotSupportedError\");return tn(e,n,this)}adoptNode(e){if(e[H]===this)return e;let n=en(e);return W(()=>{let r=e.parentNode;return r?ho(r,e,n,this):Ot(n.nodes,this),e})}};function bn(t,e){return Object.defineProperty(t,H,{value:e,writable:!0,enumerable:!1}),t}function hr(t,e,n=I,r=null,o=e){let s;if(n===ie)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 En(s,t,e,n,r)}function En(t,e,n,r=I,o=null){return bn(t,e),Object.defineProperties(t,{[C]:{value:n},[P]:{value:r},[xe]:{value:o}}),e[G].createElement?.(t,r),t}var wn=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 Tn=class extends Y{constructor(e,n){super(e,n),this.promise=n.promise,this.reason=n.reason}};var xn=class extends Y{constructor(e,n){super(e,n),this.oldState=n.oldState,this.newState=n.newState}};var vn=class extends Y{constructor(e,n={}){super(e,n),this.relatedTarget=n.relatedTarget??null}};var Sn=class extends Y{constructor(e,n={}){super(e,n),this.clipboardData=n.clipboardData??null}};var On=class extends F{};var ai=/^[a-z][^A-Z\\u0000\\t\\n\\f\\r />]*-[^A-Z\\u0000\\t\\n\\f\\r />]*$/u,li=new Set([\"annotation-xml\",\"color-profile\",\"font-face\",\"font-face-src\",\"font-face-uri\",\"font-face-format\",\"font-face-name\",\"missing-glyph\"]);function xo(t){return ai.test(t)&&!li.has(t)}function vo(t){return L(`Invalid custom element name: \"${t}\"`,\"SyntaxError\")}var An=class{registry=new Map;listenersByName=new Map;define(e,n,r){if(!xo(e))throw vo(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(!xo(e))return Promise.reject(vo(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 ci=[\"onerror\",\"onunhandledrejection\"],Oo=Symbol.for(\"@remote-dom/polyfill/global-property\");function Ao(t){return Object.getOwnPropertyDescriptors(t)}function ko(t){let e={};for(let[n,r]of Object.entries(Object.getOwnPropertyDescriptors(Ae.prototype)))n!==\"constructor\"&&typeof r.value==\"function\"&&(r.value=gr(r.value.bind(t)),e[n]=r);return e}function Ro(t){let e={};for(let n of ci)e[n]={configurable:!0,enumerable:!0,get:gr(()=>t[n]),set:gr(r=>{t[n]=r})};return e}function di(t){return Object.assign(Ao(t),ko(t),Ro(t))}function gr(t){return Object.defineProperty(t,Oo,{value:!0}),t}function So(t,e){for(let n of Reflect.ownKeys(e)){let r=ui(t,n);(r==null||fi(r))&&Object.defineProperty(t,n,e[n])}}function ui(t,e){let n=t;for(;n;){let r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function fi(t){return[t.value,t.get,t.set].some(e=>typeof e==\"function\"&&e[Oo]===!0)}var $e=class extends Ae{[G]={};[Gt]=[];[Ie]=mi(this);name=\"\";window=this;parent=this;self=this;top=this;document=new Pt(this);customElements=new An;location=globalThis.location;navigator=globalThis.navigator;Event=Y;ErrorEvent=Nn;PromiseRejectionEvent=Tn;ToggleEvent=xn;FocusEvent=vn;ClipboardEvent=Sn;EventTarget=Ae;CustomEvent=wn;Node=le;ParentNode=pe;ChildNode=ke;DocumentFragment=et;Document=Pt;CharacterData=Re;Comment=Qe;Text=Je;Element=F;HTMLElement=On;SVGElement=Ze;HTMLTemplateElement=tt;MutationObserver=cn;#t=null;#n=null;#e=null;static with(...e){let n=this;return class extends n{constructor(){super();for(let o of e)pi(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=Ao(e),s=Object.assign(ko(e),Ro(e));delete o.self,Object.defineProperties(globalThis,o),So(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),So(n,s))}static setGlobalThis(e){for(let n in e)e[n]===e&&(e[n]=globalThis);Object.defineProperties(globalThis,di(e))}};function pi(t,e){t[Gt].push(e(t)??{})}function mi(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[Gt])s[e]?.apply(s,n);let r=t[G];r[e]?.apply(r,n)}var kn=new $e;var yr=\"~\";var Ce=new WeakMap;function nt(t){return Ce.get(t)}var Nr=new WeakMap,gi=0;function oe(t){let e=Nr.get(t);return e==null&&(e=String(gi++),Rn(t,e)),e}function Rn(t,e){Nr.set(t,e)}var Er=new WeakMap;function yi(t){return Er.get(t)}var wr=new WeakMap;function bi(t){let e=wr.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 Ei=new WeakMap;function wi(t){return Ei.get(t)}function Tr(t,e,n){let r=Er.get(t);if(r==null&&(r={},Er.set(t,r)),r[e]===n)return;r[e]=n;let o=Ce.get(t);o?.mutate([[3,oe(t),e,n,1]])}function Pe(t,e,n){let r=wr.get(t);if(r==null&&(r={},wr.set(t,r)),r[e]===n)return;n==null?delete r[e]:r[e]=String(n);let o=Ce.get(t);o?.mutate([[3,oe(t),e,n,2]])}function rt(t,e){if(Ce.get(t)!==e&&(Ce.set(t,e),t.childNodes))for(let r=0;r<t.childNodes.length;r++)rt(t.childNodes[r],e)}function Cn(t){if(Ce.get(t)!=null&&(Ce.delete(t),t.childNodes))for(let n=0;n<t.childNodes.length;n++)Cn(t.childNodes[n])}function ot(t){let{nodeType:e}=t;switch(e){case 1:return{id:oe(t),type:e,element:t.localName,properties:br(yi(t)),attributes:br(bi(t)),eventListeners:br(wi(t)),children:Array.from(t.childNodes).map(ot)};case 3:case 8:return{id:oe(t),type:e,data:t.data};default:throw new Error(`Cannot serialize node of type ${t.nodeType} (${typeof t.nodeType})`)}}function br(t){return t?{...t}:void 0}function xr(t,e,...n){let r=Nr.get(t),o=Ce.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=kn[G];st.insertChild=(t,e,n)=>{let r=nt(t);r!=null&&(rt(e,r),r.mutate([[0,oe(t),ot(e),n]]))};st.removeChild=(t,e,n)=>{let r=nt(t);r!=null&&(Cn(e),r.mutate([[1,oe(t),n]]))};st.setText=(t,e)=>{let n=nt(t);n?.mutate([[2,oe(t),e]])};st.setAttribute=(t,e,n)=>{t.tagName.includes(\"-\")||Pe(t,e,n)};st.removeAttribute=(t,e)=>{t.tagName.includes(\"-\")||Pe(t,e)};$e.setGlobal(kn);var _o=[\"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\"],Io=[\"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\"],Do=[\"self\",\"postMessage\",\"setTimeout\",\"clearTimeout\",\"setInterval\",\"clearInterval\",\"queueMicrotask\",\"structuredClone\",\"crypto\",\"console\",\"DOMException\"],Mo=[\"TEMPORARY\",\"PERSISTENT\"],Gd=Object.freeze([..._o,...Io,...Do,...Mo]),Ud=Object.freeze([\"constructor\",\"__defineGetter__\",\"__defineSetter__\",\"hasOwnProperty\",\"__lookupGetter__\",\"__lookupSetter__\",\"isPrototypeOf\",\"propertyIsEnumerable\",\"toString\",\"valueOf\",\"__proto__\",\"toLocaleString\"]),Po=t=>typeof t==\"symbol\"?`[${t.description??\"symbol\"}]`:t;function Lo(t=globalThis,e=[],n={}){let r=[],o=[],s=new Set([..._o,...Io,...Do,...e,\"constructor\",Symbol.toStringTag]),i=(m,p)=>{let b=Reflect.getOwnPropertyDescriptor(m,p);return b===void 0||!(\"value\"in b)||b.writable||b.configurable?!1:n.primitivesStay&&typeof p==\"symbol\"&&(typeof b.value!=\"object\"||b.value===null)&&typeof b.value!=\"function\"?!0:Mo.includes(p)&&typeof b.value==\"number\"},l=t,d=l.setTimeout,c=l.setInterval,f=l.crypto,w=(m,p)=>function(b,O,...D){if(typeof b!=\"function\")throw new TypeError(`${p} takes a function: a guest view cannot run code from text`);return m.call(t,b,O,...D)},u=f?Object.freeze({getRandomValues:m=>f.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 p of Reflect.ownKeys(m))s.has(p)||(Reflect.deleteProperty(m,p)?r.push(Po(p)):i(m,p)||o.push(Po(p)));let x=()=>function(){throw new EvalError(\"A guest view cannot make code from text.\")},h=[Function.prototype,Object.getPrototypeOf(async function(){}),Object.getPrototypeOf(function*(){}),Object.getPrototypeOf(async function*(){})];for(let m of h){let p=x();Object.defineProperty(p,\"prototype\",{value:m,writable:!1,enumerable:!1,configurable:!1}),Reflect.defineProperty(m,\"constructor\",{value:p,writable:!1,enumerable:!1,configurable:!1})||o.push(\"Function.prototype.constructor\"),m===Function.prototype&&Reflect.defineProperty(t,\"Function\",{value:p,writable:!0,enumerable:!1,configurable:!0})}let a=(m,p)=>{Reflect.defineProperty(t,m,{value:p,writable:!0,enumerable:!0,configurable:!0})||o.push(m)};a(\"setTimeout\",w(d,\"setTimeout\")),a(\"setInterval\",w(c,\"setInterval\")),u&&a(\"crypto\",u);for(let m of N.slice(1))Object.freeze(m);for(let m of Reflect.ownKeys(t)){let p=Reflect.getOwnPropertyDescriptor(t,m);Reflect.defineProperty(t,m,\"value\"in p?{...p,writable:!1,configurable:!1}:{...p,configurable:!1})}let g;try{g=Reflect.preventExtensions(t)}catch{g=!1}return{removed:r,stuck:o,sealed:g}}var _t=class extends HTMLElement{constructor(){super(),Rn(this,yr)}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,yr,ot(o),r])}e.mutate(n)}updateRemoteProperty(e,n){Tr(this,e,n)}callRemoteMethod(e,...n){return xr(this,e,...n)}};var T={},Pn={empty:!0},Ni={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:Pn,br:Pn,wbr:Pn,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:{attributes:{href:\"link\"}},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\":Pn},Ti=[\"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\"],xi={id:\"text\",class:\"text\",style:\"style\",lang:\"text\",role:\"text\",tabindex:{oneOf:[\"-1\",\"0\"]},transform:\"geometry\",...Object.fromEntries(Ti.map(t=>[t,\"css\"]))},it={x:\"geometry\",y:\"geometry\",width:\"geometry\",height:\"geometry\"},_n={viewBox:\"geometry\",preserveAspectRatio:\"geometry\"},Ho={gradientUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},gradientTransform:\"geometry\",spreadMethod:{oneOf:[\"pad\",\"reflect\",\"repeat\"]},href:\"fragment\"},In={svg:{attributes:{...it,..._n}},g:T,defs:T,symbol:{attributes:{...it,..._n,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\",...Ho}},radialGradient:{attributes:{cx:\"geometry\",cy:\"geometry\",r:\"geometry\",fx:\"geometry\",fy:\"geometry\",fr:\"geometry\",...Ho}},stop:{attributes:{offset:\"geometry\"}},clipPath:{attributes:{clipPathUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]}}},mask:{attributes:{...it,maskUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},maskContentUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]}}},pattern:{attributes:{...it,..._n,patternUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},patternContentUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},patternTransform:\"geometry\",href:\"fragment\"}},marker:{attributes:{..._n,markerWidth:\"geometry\",markerHeight:\"geometry\",refX:\"geometry\",refY:\"geometry\",orient:\"geometry\",markerUnits:{oneOf:[\"strokeWidth\",\"userSpaceOnUse\"]}}}};var $o=[\"alert\",\"alertdialog\",\"dialog\",\"banner\",\"main\",\"navigation\",\"contentinfo\",\"complementary\",\"search\",\"form\",\"region\",\"application\",\"status\",\"log\",\"marquee\",\"timer\"],It={nav:\"div\",header:\"div\",footer:\"div\",aside:\"div\",search:\"div\",output:\"span\"},Dn={section:[\"aria-label\",\"aria-labelledby\",\"title\"]};function vi(t){return/^aria-[a-z]+$/.test(t)}function Si(t){return/^data-[a-z0-9][a-z0-9_.-]*$/.test(t)}var Go=[\"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\"],Uo=[\"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\"],jo=[\"fill\",\"stroke\",\"clip-path\",\"mask\",\"marker\",\"marker-start\",\"marker-mid\",\"marker-end\"],Vo=[\"media\",\"supports\",\"container\",\"keyframes\"],zo={position:[\"static\",\"relative\",\"absolute\",\"sticky\"],all:[],appearance:[\"auto\",\"none\",\"menulist-button\",\"textfield\"],\"-webkit-appearance\":[\"auto\",\"none\",\"menulist-button\",\"textfield\"]},Fo=[\"host\",\"host-context\",\"slotted\",\"part\",\"backdrop\",\"picker\",\"view-transition\",\"view-transition-group\",\"view-transition-image-pair\",\"view-transition-old\",\"view-transition-new\"],Mn=64e3,vr=4e3,Bo=1e5,Dt=512e3,Sr=1e4,Yo=\"http://www.w3.org/1999/xhtml\",Wo=\"http://www.w3.org/2000/svg\",Oi=new Map(Object.keys(In).map(t=>[t.toLowerCase(),t]));function Ln(t){return Oi.get(t.toLowerCase())}function Hn(t,e,n){let r=n.toLowerCase(),o=t===\"html\"?[at[e]?.attributes,Ni]:[In[e]?.attributes,xi],s=t===\"svg\"&&r===\"xlink:href\"?\"href\":r;for(let i of o)if(i){for(let[l,d]of Object.entries(i))if(l.toLowerCase()===s)return{name:l,kind:d}}if(vi(r)||Si(r))return{name:r,kind:\"text\"}}function qo(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 Xo=[\"wheel\",\"drag\",\"pinch\"];var Ko=\"~\",$n=t=>typeof t==\"object\"&&t!==null&&!Array.isArray(t),me=(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=>me(n,e+1)):Object.fromEntries(Object.entries(t).map(([n,r])=>[n,me(r,e+1)]))};function Zo(){let t=new Map,e=new Map,n=new Map([[Ko,{children:[],listeners:new Map}]]),r=0,o=c=>{let f=e.get(c);return f===void 0&&(f=r+=1,e.set(c,f),t.set(f,{listener:c,count:0})),t.get(f).count+=1,f},s=c=>{let f=t.get(c);f&&(f.count-=1,!(f.count>0)&&(t.delete(c),e.delete(f.listener)))},i=c=>{let f=n.get(c);if(f){n.delete(c);for(let w of f.listeners.values())s(w);for(let w of f.children)i(w)}},l=(c,f,w=0)=>{if(!$n(c)||w>64)return me(c);let u=typeof c.id==\"string\"?c.id:void 0,E=f&&u!==void 0&&u!==Ko;E&&i(u);let N={children:[],listeners:new Map};E&&n.set(u,N);let x={};for(let[h,a]of Object.entries(c))h===\"children\"&&Array.isArray(a)?x[h]=a.map(g=>{let m=l(g,E,w+1);return E&&$n(g)&&typeof g.id==\"string\"&&N.children.push(g.id),m}):h===\"eventListeners\"&&$n(a)?x[h]=Object.fromEntries(Object.entries(a).map(([g,m])=>{if(typeof m!=\"function\"||!E)return[g,void 0];let p=o(m);return N.listeners.set(g,p),[g,{listener:p}]})):x[h]=me(a,w+1);return x},d=c=>{if(!Array.isArray(c))return me(c);let[f,w]=c,u=typeof w==\"string\"?n.get(w):void 0;if(f===0){let E=l(c[2],u!==void 0),N=$n(c[2])?c[2].id:void 0;if(u&&typeof N==\"string\"&&n.has(N)){let x=Number(c[3]);u.children.splice(Number.isInteger(x)&&x>=0&&x<=u.children.length?x:u.children.length,0,N)}return[f,me(w),E,me(c[3])]}if(f===1){let E=Number(c[2]);return u&&Number.isInteger(E)&&E>=0&&E<u.children.length&&i(u.children.splice(E,1)[0]),me(c)}if(f===3&&c[4]===3){let E=String(c[2]),N=c[3],x=u&&typeof N==\"function\"?o(N):void 0,h=u?.listeners.get(E);return h!==void 0&&s(h),x===void 0?u?.listeners.delete(E):u.listeners.set(E,x),[f,me(w),E,x===void 0?void 0:{listener:x},3]}return me(c)};return{encode:c=>c.map(d),listener:c=>t.get(c)?.listener,get listening(){return t.size},get nodes(){return n.size-1}}}var Or=\"graview-view-root\",Ai=[\"value\",\"checked\",\"key\",\"pressed\",\"files\",\"refused\",\"x\",\"y\",\"width\",\"height\",\"deltaX\",\"deltaY\",\"deltaMode\",\"ctrlKey\",\"metaKey\",\"phase\",\"pointerId\",\"button\",\"pressure\",\"dx\",\"dy\",\"scale\",\"rotation\"],ki=t=>t.replace(/&/g,\"&\").replace(/</g,\"<\").replace(/>/g,\">\").replace(/\"/g,\""\").replace(/'/g,\"'\"),Ri=t=>Object.freeze({html:t,toString:()=>t}),Jo=t=>typeof t==\"object\"&&t!==null&&typeof t.html==\"string\"&&Object.isFrozen(t),Qo=t=>t==null||t===!1?\"\":Array.isArray(t)?t.map(Qo).join(\"\"):Jo(t)?t.html:ki(String(t));function es(t){customElements.get(Or)||customElements.define(Or,_t);let e=Event,n=Zo(),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 d=document.createElement(Or),c=y=>{let S=A=>{for(let k of Array.from(A.childNodes)){if(k.nodeType!==1)continue;if(oe(k)===y)return k;let R=S(k);if(R)return R}};return S(d)},f=y=>{let S=c(y.target);if(!S)return;let A=new e(y.event,{bubbles:!0}),k={};for(let R of Ai)y[R]!==void 0&&(k[R]=y[R]);for(let R of Object.keys(k))Object.defineProperty(A,R,{value:k[R],enumerable:!0});S.dispatchEvent(A);for(let R of o){if(R.type!==y.event)continue;let M;try{M=new Set(Array.from(d.querySelectorAll(R.selector)))}catch{continue}for(let K=S;K&&K!==d;K=K.parentNode)if(M.has(K)){R.listener(Object.freeze({type:y.event,target:S,element:K,...k}));break}}},w=y=>{if(y.type===\"dom-event\"&&typeof y.target==\"string\")return f(y);if(y.type===\"notice\")return t.warn(y.text);if(y.type!==\"props\")return;s=y.props;let S=t.now();for(let R of r)try{R(y.props)}catch(M){t.threw(M)}let A=t.now()-S,k=y.push;typeof k==\"number\"&&t.microtask(()=>t.microtask(()=>t.send({type:\"pushed\",push:k,ms:A})))},u;d.connect({mutate(y){u||(u=[],t.microtask(()=>{let S=u??[];u=void 0,t.send({type:\"render\",records:n.encode(S)})})),u.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 x(y,S){let A=Array.from(S.childNodes),k=0;for(let R of A){let M=y.childNodes[k]??null;if(M&&N(M,R)){h(M,R),k+=1;continue}if(E(R)!==null){let Te=Array.from(y.childNodes).slice(k+1).find(ht=>N(ht,R));if(Te){y.insertBefore(Te,M),h(Te,R),k+=1;continue}}y.insertBefore(R,M),k+=1}for(;y.childNodes.length>k;)y.removeChild(y.lastChild)}function h(y,S){if(y.nodeType!==1){y.data!==S.data&&(y.data=S.data);return}let A=y,k=S,R=a(A);for(let M of A.getAttributeNames())k.hasAttribute(M)||(A.removeAttribute(M),R&&Pe(A,M,void 0));for(let M of k.getAttributeNames()){let K=k.getAttribute(M);A.getAttribute(M)!==K&&A.setAttribute(M,K),R&&Pe(A,M,K)}x(A,k)}let a=y=>y.localName.includes(\"-\");function g(y){for(let S of Array.from(y.childNodes)){if(S.nodeType!==1)continue;let A=S;if(a(A))for(let k of A.getAttributeNames())Pe(A,k,A.getAttribute(k)??void 0);g(A)}}function m(y,S,A){for(let k of Array.from(y.childNodes)){if(k.nodeType!==1)continue;let R=k,M=R.localName,K=S||M.toLowerCase()===\"svg\",Te=K?Ln(M):Object.prototype.hasOwnProperty.call(at,M.toLowerCase())?M.toLowerCase():void 0;if(!Te){A.add(`<${M}>`);continue}for(let ht of R.getAttributeNames())(!Hn(K?\"svg\":\"html\",Te,ht)||!K&&Dn[Te]?.includes(ht.toLowerCase()))&&A.add(`${Te} ${ht}`);m(R,K,A)}}function p(y){let S=document.createElement(\"div\"),A=Array.isArray(y)?y:[y];for(let R of A)if(R!=null)if(typeof R==\"string\"||Jo(R)){let M=document.createElement(\"div\");M.innerHTML=typeof R==\"string\"?R:R.html,S.append(...Array.from(M.childNodes))}else S.append(R);let k=new Set;m(S,!1,k),i=[...k],i.length>0&&t.warn(`The host will not draw: ${i.join(\", \")}`),g(S),x(d,S)}let b=[],O=new Set(Xo),D=\"[]\",V=!1,J=()=>{V||(V=!0,t.microtask(()=>{V=!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],[k])=>A<k?-1:A>k?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:p,style(y){typeof y!=\"string\"||b.includes(y)||(b.push(y),t.send({type:\"style\",sheets:[...b]}))},on(y,S,A){let k={type:y,selector:S,listener:A};return o.add(k),typeof y==\"string\"&&!l.has(y)&&(l.add(y),t.send({type:\"hears\",events:[y]})),O.has(y)&&J(),()=>{o.delete(k),O.has(y)&&J()}},act:(y,S={})=>t.act(y,S),navigate(y){if(typeof y==\"string\")return t.navigate(y);let S=qo(y);S&&t.send(S)},html(y,...S){return Ri(y.reduce((A,k,R)=>A+k+(R<S.length?Qo(S[R]):\"\"),\"\"))},get refused(){return i},get hardening(){return t.hardening()}}),hear:w,find:y=>{try{let S=d.querySelectorAll(y)[0];return S?oe(S):void 0}catch{return}}}}var ts=t=>t.toLowerCase().replace(/[^a-z0-9]+/g,\"-\").replace(/^-|-$/g,\"\");function Mt(t,e){let n=t.find(s=>s.as===e);if(n)return n;let r=e.trim().toLowerCase(),o=ts(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&&ts(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\"}.`,Ar=t=>`\"${t.length>80?`${t.slice(0,79)}\\u2026`:t}\"`;var ns=[\"https:\",\"mailto:\",\"tel:\"];function rs(t){if(!(typeof t!=\"string\"||t.length>2e3||/[\\s<>\"]/.test(t.trim())||t.trim()!==t))try{let e=new URL(t);return!ns.includes(e.protocol)||e.protocol===\"https:\"&&(e.hostname===\"\"||e.username!==\"\"||e.password!==\"\")?void 0:e.href}catch{return}}function os(t){let e=new Set,n=r=>{if(typeof r!=\"string\"||!/^(https|mailto|tel):/i.test(r))return;let o=rs(r);o&&e.add(o)};for(let r of[...t?.node?[t.node]:[],...t?.nodes??[]])for(let[o,s]of Object.entries(r))o===\"id\"||o===\"kind\"||(Array.isArray(s)?s.forEach(n):n(s));return e}function ss(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 is(t,e){let n=rs(t);if(n&&(e.handed.has(n)||n.startsWith(\"https:\")&&ss(e.origins).includes(new URL(n).origin)))return n}function as(t,e){let n=t.length>120?`${t.slice(0,119)}\\u2026`:t,r=\"\";try{r=new URL(t).protocol}catch{r=\"\"}if(!ns.includes(r))return`The link \"${n}\" was not drawn: a view links only to an https:, mailto: or tel: address.`;let o=ss(e);return`The link \"${n}\" was not drawn: it is no address this view was handed. A view links out only to an address a record it was shown holds (a url field), as the record holds it${o.length>0?`, or an https: address on ${o.join(\", \")}`:\"\"}; a record or a place of this app is <a data-record> or <a data-place>.`}var q=t=>t>=48&&t<=57,ls=t=>q(t)||t>=65&&t<=70||t>=97&&t<=102,Ir=t=>t>=65&&t<=90||t>=97&&t<=122,Dr=t=>t>=128,Gn=t=>Ir(t)||Dr(t)||t===95,cs=t=>Gn(t)||q(t)||t===45,ds=t=>t===10,Ee=t=>t===10||t===9||t===32,Ci=t=>t>=0&&t<=8||t===11||t>=14&&t<=31||t===127,ue=-1;function Pi(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 _i(t){let e=Pi(t),n=0,r=(h=0)=>n+h<e.length?e[n+h]:ue,o=[],s=(h,a)=>h===92&&a!==10&&a!==ue,i=(h,a,g)=>h===45?Gn(a)||a===45||s(a,g):Gn(h)?!0:s(h,a),l=(h,a,g)=>h===43||h===45?q(a)||a===46&&q(g):q(h===46?a:h),d=()=>{let h=r();if(n+=1,h===ue)return 65533;if(ls(h)){let a=String.fromCodePoint(h);for(;a.length<6&&ls(r());)a+=String.fromCodePoint(r()),n+=1;Ee(r())&&(n+=1);let g=parseInt(a,16);return g===0||g>=55296&&g<=57343||g>1114111?65533:g}return h},c=()=>{let h=\"\";for(;;){let a=r();if(cs(a))h+=String.fromCodePoint(a),n+=1;else if(s(a,r(1)))n+=1,h+=String.fromCodePoint(d());else return h}},f=()=>{let h=\"\";for((r()===43||r()===45)&&(h+=String.fromCodePoint(e[n++]));q(r());)h+=String.fromCodePoint(e[n++]);if(r()===46&&q(r(1)))for(h+=String.fromCodePoint(e[n++],e[n++]);q(r());)h+=String.fromCodePoint(e[n++]);if((r()===69||r()===101)&&(q(r(1))||(r(1)===43||r(1)===45)&&q(r(2))))for(h+=String.fromCodePoint(e[n++]),q(r())||(h+=String.fromCodePoint(e[n++]));q(r());)h+=String.fromCodePoint(e[n++]);return h},w=()=>{let h=f();return i(r(),r(1),r(2))?{type:\"dimension\",repr:h,unit:c()}:r()===37?(n+=1,{type:\"percentage\",repr:h}):{type:\"number\",repr:h}},u=()=>{for(;;){let h=r();if(n+=1,h===41||h===ue)return;s(h,r())&&d()}},E=()=>{let h=\"\";for(;Ee(r());)n+=1;for(;;){let a=r();if(n+=1,a===41)return{type:\"url\",value:h};if(a===ue)return{type:\"url\",value:h};if(Ee(a)){for(;Ee(r());)n+=1;return r()===41||r()===ue?(r()===41&&(n+=1),{type:\"url\",value:h}):(u(),{type:\"bad-url\"})}if(a===34||a===39||a===40||Ci(a))return u(),{type:\"bad-url\"};if(a===92){if(s(a,r()))h+=String.fromCodePoint(d());else return u(),{type:\"bad-url\"};continue}h+=String.fromCodePoint(a)}},N=()=>{let h=c();if(h.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:h}:E()}return r()===40?(n+=1,{type:\"function\",value:h}):{type:\"ident\",value:h}},x=h=>{let a=\"\";for(;;){let g=r();if(n+=1,g===h||g===ue)return{type:\"string\",value:a};if(ds(g))return n-=1,{type:\"bad-string\"};if(g===92){if(r()===ue)continue;if(ds(r())){n+=1;continue}a+=String.fromCodePoint(d());continue}a+=String.fromCodePoint(g)}};for(;;){for(;r()===47&&r(1)===42;){for(n+=2;r()!==ue&&!(r()===42&&r(1)===47);)n+=1;r()!==ue&&(n+=2)}let h=r();if(h===ue)return o;if(Ee(h)){for(;Ee(r());)n+=1;o.push({type:\"whitespace\"});continue}switch(n+=1,h){case 34:case 39:o.push(x(h));continue;case 35:if(cs(r())||s(r(),r(1))){let a=i(r(),r(1),r(2));o.push({type:\"hash\",value:c(),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(h,r(),r(1))?(n-=1,o.push(w())):o.push({type:\"delim\",value:String.fromCodePoint(h)});continue;case 44:o.push({type:\",\"});continue;case 45:l(h,r(),r(1))?(n-=1,o.push(w())):r()===45&&r(1)===62?(n+=2,o.push({type:\"CDC\"})):i(h,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:c()}):o.push({type:\"delim\",value:\"@\"});continue;case 91:o.push({type:\"[\"});continue;case 92:s(h,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(h)?(n-=1,o.push(w())):Gn(h)?(n-=1,o.push(N())):o.push({type:\"delim\",value:String.fromCodePoint(h)})}}}var hs={\"{\":\"}\",\"[\":\"]\",\"(\":\")\"},gs=32,Rr=class{constructor(e){this.tokens=e}i=0;peek(){return this.tokens[this.i]}next(){return this.tokens[this.i++]}};function ys(t,e){let n=t.next();return n.type===\"{\"||n.type===\"[\"||n.type===\"(\"?{type:\"block\",open:n.type,value:us(t,hs[n.type],e+1)}:n.type===\"function\"?{type:\"func\",name:n.value,value:us(t,\")\",e+1)}:n}function us(t,e,n){let r=[];for(;;){let o=t.peek();if(!o)return r;if(o.type===e)return t.next(),r;if(n>gs){t.next(),r.push({type:\"bad-string\"});continue}r.push(ys(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 d;for(;r<t.length;){let c=t[r];if(r+=1,c.type===\";\")break;if(c.type===\"block\"&&c.open===\"{\"){d=c.value;break}l.push(c)}n.push({type:\"at-rule\",name:o.value,prelude:l,...d?{block:d}:{}});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 Mr(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=bs(r.value,t.slice(s+1,i));if(l.value.some(d=>d.type===\"block\"&&d.open===\"{\")){let d=t.findIndex((c,f)=>f>n&&c.type===\"block\"&&c.open===\"{\");e.push(...ct(t.slice(n,d+1),!1)),n=d+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 bs(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 Lr(t){let e=new Rr(_i(t)),n=[];for(;e.peek();)n.push(ys(e,0));return n}function Un(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+=\"\\\\-\":Dr(r)||r===45||r===95||q(r)||Ir(r)?e+=String.fromCodePoint(r):e+=`\\\\${String.fromCodePoint(r)}`}),e}function jn(t){let e=\"\";for(let n of t){let r=n.codePointAt(0);Dr(r)||r===45||r===95||q(r)||Ir(r)?e+=n:r>=1&&r<=31||r===127?e+=`\\\\${r.toString(16)} `:e+=`\\\\${n}`}return e}function Cr(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 Ii(t){let e=jn(t);return/^[eE]([0-9]|[+-][0-9])/.test(t)?`\\\\${t.codePointAt(0).toString(16)} ${jn(t.slice(1))}`:e}var fs=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 Di(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 Mi(t){switch(t.type){case\"whitespace\":return\" \";case\"ident\":return Un(t.value);case\"at-keyword\":return`@${Un(t.value)}`;case\"hash\":return`#${jn(t.value)}`;case\"string\":return Cr(t.value);case\"url\":return`url(${Cr(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}${Ii(t.unit)}`;case\"func\":return`${Un(t.name)}(${dt(t.value)})`;case\"block\":return`${t.open}${dt(t.value)}${hs[t.open]}`;case\":\":case\";\":case\",\":case\"[\":case\"]\":case\"(\":case\")\":case\"{\":case\"}\":return t.type;default:return\"\"}}function dt(t){let e=\"\",n;for(let r of t)r.type===\"whitespace\"&&n?.type===\"whitespace\"||(n&&Di(fs(n),fs(r))&&(e+=\"/**/\"),e+=Mi(r),n=r);return e}var Li=new Set(Go),Es=new Set(Uo),ps=new Set(jo),Hi=new Set(Vo),$i=new Set(Fo),ms=/^#[A-Za-z_][A-Za-z0-9_.:-]*$/,we=t=>t.replace(/[A-Z]/g,e=>e.toLowerCase()),Gi=t=>we(t);function Pr(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&&ps.has(t)&&ms.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=we(o.name);if(s===\"url\"||s===\"src\"){let l=o.value.filter(c=>c.type!==\"whitespace\"),d=l[0];if(s===\"url\"&&l.length===1&&d?.type===\"string\"&&t&&ps.has(t)&&ms.test(d.value)){r.push({type:\"func\",name:\"url\",value:[{type:\"string\",value:d.value}]});continue}n({reason:\"url\",...t?{name:t}:{}});return}if(!Es.has(s)){n({reason:\"function\",name:s});return}let i=Pr(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=Pr(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 zn(t,e){let n=t.name.startsWith(\"--\"),r=n?t.name:Gi(t.name);if(!n&&!Li.has(r)){e({reason:\"property\",name:r});return}let o=zo[r];if(o){let l=t.value.filter(f=>f.type!==\"whitespace\"),d=l[0],c=l.length===1&&d?.type===\"ident\"?we(d.value):void 0;if(!c||![...o,\"inherit\",\"initial\",\"unset\",\"revert\"].includes(c)){e({reason:\"value\",name:r});return}return`${r}: ${c}${t.important?\" !important\":\"\"}`}let s=Pr(n?void 0:r,t.value,e);if(!s)return;let i=dt(s).trim();return`${n?`--${jn(t.name.slice(2))}`:r}: ${i}${t.important?\" !important\":\"\"}`}function ws(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=we(s.type===\"ident\"?s.value:s.name);if($i.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 kr(t,e,n){let r=[];for(let o of Mr(t))if(o.type===\"declaration\"){let s=zn(o,e);s&&r.push(`${s};`)}else{let s=Vn(o,e,n+1,\"style\");s&&r.push(s)}return r.join(\" \")}function Ui(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=we(s.name);return e===\"supports\"&&i===\"selector\"?ws(s.value,n):Es.has(i)?r(s.value):(n({reason:\"function\",name:i}),!1)}if(s.type===\"block\"){if(e===\"supports\"){let i=Mr(s.value);if(i.length===1&&i[0].type===\"declaration\")return zn(i[0],n)!==void 0}return r(s.value)}return!0});return r(t)?dt(t).trim():void 0}function _r(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(It,we(e.value))?{type:\"block\",open:\"[\",value:[{type:\"ident\",value:\"data-graview-as\"},{type:\"delim\",value:\"=\"},{type:\"string\",value:we(e.value)}]}:e.type===\"func\"?{type:\"func\",name:e.name,value:_r(e.value)}:e.type===\"block\"&&e.open===\"(\"?{type:\"block\",open:\"(\",value:_r(e.value)}:e})}function Vn(t,e,n,r){if(n>gs){e({reason:\"unreadable\",name:\"nesting\"});return}if(t.type===\"qualified\"){if(r===\"keyframes\"){if(!t.prelude.every(f=>f.type===\"whitespace\"||f.type===\",\"||f.type===\"percentage\"||f.type===\"ident\"&&[\"from\",\"to\"].includes(we(f.value)))){e({reason:\"unreadable\",name:\"keyframe\"});return}return`${dt(t.prelude).trim()} { ${kr(t.block,e,n)} }`}if(!ws(t.prelude,e))return;let d=dt(_r(t.prelude)).trim();if(d===\"\"){e({reason:\"unreadable\",name:\"selector\"});return}return`${d} { ${kr(t.block,e,n)} }`}let o=we(t.name),s=o===\"-webkit-keyframes\"?\"keyframes\":o;if(!Hi.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 d=t.prelude.filter(u=>u.type!==\"whitespace\"),c=d[0];if(d.length!==1||!c||c.type!==\"ident\"&&c.type!==\"string\"){e({reason:\"unreadable\",name:\"@keyframes\"});return}let f=ct(t.block,!1).map(u=>Vn(u,e,n+1,\"keyframes\")).filter(u=>u!==void 0);return`@keyframes ${c.type===\"ident\"?Un(c.value):Cr(c.value)} { ${f.join(\" \")} }`}let i=Ui(t.prelude,s,e);if(i===void 0)return;let l=r===\"style\"?kr(t.block,e,n):ct(t.block,!1).map(d=>Vn(d,e,n+1,\"sheet\")).filter(d=>d!==void 0).join(\" \");return`@${s} ${i} { ${l} }`}function ji(t,e=Mn){let n=[];if(t.length>e)return{css:\"\",refused:[{reason:\"size\"}]};let r=s=>void n.push(s);return{css:ct(Lr(t),!0).map(s=>Vn(s,r,0,\"sheet\")).filter(s=>s!==void 0).join(`\n`),refused:n}}function Ns(t,e=Mn){let n=[],r=[],o=0;for(let s of t){if(o+s.length>e){r.push({reason:\"size\"});continue}o+=s.length;let i=ji(s,e);i.css&&n.push(i.css),r.push(...i.refused)}return{css:n.join(`\n`),refused:r}}function Ts(t,e=Mn){let n=[];if(t.length>e)return{css:\"\",refused:[{reason:\"size\"}]};let r=s=>void n.push(s),o=[];for(let s of Mr(Lr(t))){if(s.type!==\"declaration\"){r({reason:\"unreadable\",name:\"a rule in a style attribute\"});continue}let i=zn(s,r);i&&o.push(i)}return{css:o.join(\"; \"),refused:n}}function xs(t,e){let n,r=zn(bs(t,Lr(e)),o=>n??=o);return r===void 0||n?{refused:n??{reason:\"unreadable\",name:t}}:{value:r.slice(r.indexOf(\":\")+1).trim()}}function vs(t,e){if(e===\"svg\"){let r=Ln(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(It,n)?{namespace:\"html\",name:It[n],as:n}:{namespace:\"html\",name:n}:{refused:{reason:\"element\",element:t}}}function Hr(t,e){return(t===\"html\"?at[e]:In[e])?.empty===!0}var Vi=/^[+-]?(\\d+\\.?\\d*|\\.\\d+)([eE][+-]?\\d+)?$/,zi=/^[0-9A-Za-z\\s.,+\\-%()]*$/,Fi=/^#[A-Za-z_][A-Za-z0-9_.:-]*$/,Bi=/^data:image\\/(png|gif|jpeg|webp|avif|bmp|svg\\+xml)(;[A-Za-z0-9=._+-]+)*,/i,Yi=/^\\/graview\\/assets\\/[0-9a-f]{64}\\.(png|gif|jpe?g|webp|avif|svg|ico)$/,Ss=/\\/graview\\/assets\\/[0-9a-f]{64}\\.(png|gif|jpe?g|webp|avif|svg|ico)$/,Wi=/^\\/(?!\\/)(?!(?:.*\\/)?\\.\\.?(?:\\/|$))(?!.*%(?:2e|2f|5c))[^\\\\\\s?#\"'<>]*$/i;function qi(t,e){if(Yi.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(Wi.test(n))return Ss.exec(n)?.[0]}function Os(t,e={},n){let r=t.length>120?`${t.slice(0,119)}\\u2026`:t,o=As(e.origins),s=Ss.exec(t.split(/[?#]/)[0])?.[0],i=n!==void 0&&n>Dt?` It is a data: image of ${n.toLocaleString(\"en-US\")} characters, more than the ${Dt.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 As(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 Xi(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:As(e).includes(n.origin)?n.href:void 0}catch{return}}function $r(t,e,n,r,o){let s=Hn(t,e,n);if(!s)return{refused:{reason:\"attribute\",element:e,name:n}};if(t===\"html\"&&Dn[e]?.includes(s.name))return{refused:{reason:\"attribute\",element:e,name:n}};if(r===null)return{name:s.name,value:null};let i=Ki(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>Dt?{length:r.length}:{}}:{},...s.kind===\"link\"?{address:r.slice(0,200)}:{}}}:s.name===\"role\"&&i.value.split(/\\s+/).some(l=>$o.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 Ki(t,e,n,r){let o=(s,i)=>({refused:{reason:s,name:t,...i?{css:i}:{}}});if(e===\"geometry\")return n.length>Bo||!zi.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>Dt)return o(\"url\");if(Bi.test(n))return{value:n};if(n.startsWith(`blob:${r.origin}/`)&&/^blob:[^\\s\"'<>]+$/.test(n))return{value:n};let i=r.asset?qi(n,r.origin):void 0;if(i!==void 0){let d=r.asset(i);if(d)return{value:d}}let l=Xi(n,r.imageOrigins);return l?{value:l}:o(\"url\")}if(e===\"link\"){let s=r.link?.(n);return s===void 0?o(\"url\"):{value:s}}if(n.length>vr)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 Vi.test(n.trim())&&Number.isFinite(Number(n))?{value:n.trim()}:o(\"value\");case\"boolean\":return{value:\"\"};case\"fragment\":return Fi.test(n)?{value:n}:o(\"url\");case\"style\":{let s=Ts(n,vr);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=xs(t,n);return\"refused\"in s?o(s.refused.reason===\"url\"?\"url\":\"css\",s.refused):{value:s.value}}}}var Zi=\"http://www.w3.org/1999/xhtml\",Ji=new Set([\"button\",\"submit\",\"reset\",\"checkbox\",\"radio\",\"image\"]);var Fn=(t,...e)=>t.namespaceURI===Zi&&e.includes(t.localName),Qi=t=>(t.getAttribute(\"type\")??\"text\").toLowerCase(),ea=t=>Fn(t,\"textarea\",\"select\")||Fn(t,\"input\")&&!Ji.has(Qi(t));function ks(t){if(Fn(t,\"option\",\"optgroup\",\"datalist\"))return'An option is never pressed by itself: put data-act on its select, with data-save=\"change\", or on a button.';if(Fn(t,\"label\"))return\"A press on a label presses its field too, and would ask for the act twice: put data-act on a button, or on the field.\";if(ea(t)&&!t.hasAttribute(\"data-save\"))return'A click into a field to type or to pick is not a press: give it data-save (\"input\" or \"change\") to save it as it is typed, or put data-act on a button beside it.'}var ta=\"http://www.w3.org/1999/xhtml\",ut=class{constructor(e){this.ownerDocument=e}parentNode=null;childNodes=[];get firstChild(){return this.childNodes[0]??null}get parentElement(){return this.parentNode instanceof Ue?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}},Ge=class extends ut{constructor(n,r){super(n);this.data=r}nodeType=3;get textContent(){return this.data}},Gr=class extends ut{nodeType=8;get textContent(){return\"\"}},Ue=class extends ut{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}},Ur=class extends ut{nodeType=9;constructor(){super(null)}createElementNS(e,n){return new Ue(this,e,n)}createElement(e){return new Ue(this,ta,e)}createTextNode(e){return new Ge(this,e)}createComment(e){return new Gr(this)}};function Rs(){let t=new Ur,e=t.createElement(\"div\");return e.setAttribute(\"data-graview-view-root\",\"\"),t.appendChild(e),{document:t,root:e}}var jr={h1:1,h2:2,h3:3,h4:4,h5:5,h6:6},Cs=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\"]),Ps=new Set([\"style\",\"template\",\"datalist\",\"option\"]),j=t=>t.replace(/\\s+/g,\" \").trim();function na(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 Ue,Lt=t=>t.hasAttribute(\"hidden\")||t.getAttribute(\"aria-hidden\")===\"true\";function X(t){return t instanceof Ge?t.data:!re(t)||Lt(t)||Ps.has(t.localName)?\"\":t.localName===\"br\"?\" \":t.localName===\"img\"?t.getAttribute(\"alt\")??\"\":t.childNodes.map(X).join(t.localName===\"td\"||t.localName===\"th\"?\" \":\"\")}function*je(t){for(let e of t.childNodes)re(e)&&(yield e,yield*je(e))}function ra(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 oa(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(c=>c.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(c=>c.field===l)&&s.push({at:o,says:`data-drop-field names \"${l}\", which the view's accepts does not name for \"${r}\" (${i.map(c=>`\"${c.field}\"`).join(\", \")}): the host offers no drop target here.`});let d=t.getAttribute(\"data-drop-connect\");if(d!==null){let c=d.indexOf(\":\"),f=c>0?d.slice(c+1):\"\";c<=0||f===\"\"||n.has(d)?s.push({at:o,says:`data-drop-connect is \"<relation>:<record id>\" \\u2014 \"takenOn:day:saturday\" \\u2014 not \"${d}\"${n.has(d)?\", which names a record and no relation\":\"\"}.`}):n.has(f)||s.push({at:o,says:`data-drop-connect names \"${f}\", which this seat was not shown: the host offers no drop target here.`})}return s}function _s(t,e){let n=[],r=new Set,o=new Set,s=new Map;for(let u of[...e.props.node?[e.props.node]:[],...e.props.nodes??[]])s.set(u.id,u);let i=u=>Mt(e.places,u)!==void 0;for(let u of je(t)){let E=u.getAttribute(\"data-act\");E!==null&&r.add(E);let N=E!==null&&u.getAttribute(\"data-debounce\")===null?ks(u):void 0;N&&n.push({at:`drawing <${u.localName} data-act=\"${E}\">`,says:N});let x=u.getAttribute(\"data-record\");x!==null&&(o.add(x),!s.has(x)&&!i(x)&&n.push({at:`drawing <${u.localName} data-record=\"${x}\">`,says:`It names \"${x}\", 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 h=u.getAttribute(\"data-place\");h!==null&&!i(h)&&n.push({at:`drawing <${u.localName} data-place=\"${h}\">`,says:`It names the place \"${h}\", which this app does not have.${lt(e.places)}`}),n.push(...ra(u)),n.push(...oa(u,e,s))}let l=u=>{if(u.localName===\"graview-video\")return;let E=u.getAttribute(\"data-record\");if(E!==null)return E;let N=u.getAttribute(\"data-key\")??u.getAttribute(\"id\");if(N!==null&&s.has(N))return N;let x=new Set;for(let h of je(u)){let a=h.getAttribute(\"data-record\");a!==null&&h.localName!==\"graview-video\"&&x.add(a)}return x.size===1?[...x][0]:void 0},d=(u,E)=>{let N=s.get(E),x=N?.kind??(E.includes(\":\")?E.slice(0,E.indexOf(\":\")):\"\"),h=[...je(u)],a=h.find(p=>p.localName in jr)??h.find(p=>p.localName===\"a\"&&p.getAttribute(\"data-record\")===E)??h.find(p=>p.localName===\"strong\"||p.localName===\"b\"),g=j(a?X(a):\"\")||N?.label||E,m=f(u,a);return!a&&m[0]?.t===\"text\"&&j(m[0].text)===g&&m.shift(),{id:E,kind:x,title:g,parts:m}},c=u=>{let E=[...je(u)].filter(a=>a.localName===\"tr\"&&!Lt(a)),N=E.find(a=>a.parentElement?.localName===\"thead\"||a.childNodes.every(g=>!re(g)||g.localName===\"th\")),x=N?N.childNodes.filter(re).map(a=>j(X(a))):[];return{t:\"list\",as:\"row\",columns:1,groups:[{items:E.filter(a=>a!==N).map(a=>{let g=a.childNodes.filter(re),m=l(a),p=m?s.get(m):void 0;return{id:m??\"\",kind:p?.kind??\"\",title:j(X(g[0]??a)),parts:g.slice(1).map((b,O)=>({t:\"field\",label:x[O+1]??\"\",text:j(X(b))}))}})}]}};function f(u,E){let N=[],x=\"\",h=()=>{let g=j(x);x=\"\",g&&N.push({t:\"text\",text:g})},a=u.childNodes;for(let g=0;g<a.length;g+=1){let m=a[g];if(m===E)continue;if(m instanceof Ge){x+=m.data;continue}if(!re(m)||Lt(m)||Ps.has(m.localName))continue;if(E&&[...je(m)].includes(E)){h(),N.push(...f(m,E));continue}let p=[];for(let b=g;b<a.length;b+=1){let O=a[b];if(O instanceof Ge&&j(O.data)===\"\")continue;if(!re(O)||Lt(O)||Cs.has(O.localName)||O.localName in jr)break;let D=l(O);if(!D)break;p.push({element:O,id:D}),g=b}if(p.length>0){h();let b=p.every(O=>O.element.localName===\"li\"||O.element.localName===\"tr\");N.push({t:\"list\",as:b?\"row\":\"card\",columns:1,groups:[{items:p.map(O=>d(O.element,O.id))}]});continue}N.push(...w(m,b=>x+=b,h))}return h(),N}function w(u,E,N){let x=u.localName;if(Cs.has(x)&&x!==\"label\")return E(X(u)),[];if(x===\"mark\"){N();let a=j(X(u));return a?[{t:\"badge\",text:a}]:[]}N();let h=jr[x]??(u.getAttribute(\"role\")===\"heading\"?Number(u.getAttribute(\"aria-level\")??2):void 0);if(h!==void 0){let a=j(X(u));return a?[{t:\"heading\",level:h,text:a}]:[]}switch(x){case\"ul\":case\"ol\":case\"menu\":return[{t:\"list\",as:\"row\",columns:1,groups:[{items:u.childNodes.filter(g=>re(g)&&g.localName===\"li\"&&!Lt(g)).map(g=>{let m=l(g);if(m)return d(g,m);let p=f(g),b=p[0],O=b&&(b.t===\"text\"||b.t===\"heading\")?b.text:\"\";return{id:\"\",kind:\"\",title:O,parts:O?p.slice(1):p}})}]}];case\"table\":return[c(u)];case\"dl\":{let a=[],g=\"\";for(let m of u.childNodes.filter(re))if(m.localName===\"dt\")g=j(X(m));else if(m.localName===\"dd\")a.push({t:\"field\",label:g,text:j(X(m))});else if(m.localName===\"div\")for(let p of m.childNodes.filter(re))p.localName===\"dt\"?g=j(X(p)):p.localName===\"dd\"&&a.push({t:\"field\",label:g,text:j(X(p))});return a}case\"figure\":{let a=u.childNodes.find(p=>re(p)&&p.localName===\"figcaption\"),g=j(u.childNodes.filter(p=>p!==a).map(X).join(\" \")),m=a?j(X(a)):\"\";return g?[{t:\"figure\",text:g,...m?{label:m}:{}}]:m?[{t:\"text\",text:m}]:[]}case\"meter\":case\"progress\":{let a=Number(u.getAttribute(\"value\")??0),g=Number(u.getAttribute(\"max\")??1)||1;return[{t:\"progress\",label:u.getAttribute(\"aria-label\")??u.getAttribute(\"title\")??\"\",text:`${Math.round(a/g*100)}%`}]}case\"svg\":{let a=u.childNodes.find(p=>re(p)&&p.localName===\"title\"),g=j(u.getAttribute(\"aria-label\")??(a?X(a):\"\"));if(g)return[{t:\"text\",text:g,tone:\"picture\"}];let m=[...je(u)].filter(p=>p.localName===\"text\").map(p=>j(X(p))).filter(Boolean);return m.length>0?[{t:\"text\",text:m.join(\" \\xB7 \"),tone:\"picture\"}]:[]}case\"img\":{let a=j(u.getAttribute(\"alt\")??\"\");return a?[{t:\"text\",text:a,tone:\"picture\"}]:[]}case\"graview-video\":{let a=u.getAttribute(\"data-field\")??\"\",g=s.get(u.getAttribute(\"data-record\")??\"\"),m=g&&a&&Object.hasOwn(g,a)?g[a]:void 0,p=(Array.isArray(m)?m:[m])[Number(u.getAttribute(\"data-index\")??\"0\")];return!p||typeof p.name!=\"string\"||typeof p.type!=\"string\"||!p.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 p.caption==\"string\"&&p.caption.trim()?p.caption.trim():p.name}, ${na(typeof p.duration==\"number\"?{duration:p.duration}:{})}`,tone:\"picture\"}]}case\"button\":{let a=j(X(u));return a?[{t:\"text\",text:a,tone:\"button\"}]:[]}case\"input\":case\"textarea\":case\"select\":{let a=j(u.getAttribute(\"aria-label\")??u.getAttribute(\"placeholder\")??u.getAttribute(\"name\")??\"\"),g=x===\"select\"?j(X(u.childNodes.find(m=>re(m)&&m.localName===\"option\"&&m.selected)??u)):u.value;return[{t:\"field\",label:a,text:g}]}case\"label\":return f(u);default:return f(u)}}return{parts:f(t),problems:n,acts:[...r],records:[...o]}}var sa=0,ia=1,aa=2,la=3,Is=1,ca=2,Ds=3,da=1,ua=3,fa=8,Ms=\"~\",Bn=t=>typeof t==\"object\"&&t!==null&&!Array.isArray(t),Ls=new Set([\"input\",\"select\",\"textarea\",\"option\"]),pa=new Set([\"value\",\"checked\",\"selected\"]);function Hs(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:Ms};s.set(Ms,l);let d=0,c=!1,f=a=>{o.push(a),o.length>200&&o.shift(),e.onRefused?.(a)},w=()=>({dom:n.createComment(\"\"),children:[],refused:!0}),u=(a,g)=>{if(a.namespace===\"html\"&&a.name&&Ls.has(a.name))return a.dom;if(g?.namespace===\"html\"&&g.name===\"textarea\")return g.dom},E=(a,g,m)=>{let p=a.dom;if(m!=null&&typeof m!=\"string\")return f({reason:\"value\",element:a.name,name:g});let b=$r(a.namespace,a.name,g,m??null,e);if(\"refused\"in b){let J=$r(a.namespace,a.name,g,null,e);return\"refused\"in J||p.removeAttribute(J.name),f(b.refused)}for(let J of b.dropped??[])f(J);let O=a.namespace===\"html\"&&pa.has(b.name)&&Ls.has(a.name),D=p,V=O?b.name===\"value\"?D.value:b.name===\"checked\"?D.checked:D.selected:void 0;b.value===null?p.removeAttribute(b.name):p.setAttribute(b.name,b.value),e.onAttribute?.(p,b.name),O&&(b.name===\"value\"&&\"value\"in D?(D.value=b.value??\"\",V!==D.value&&e.onFieldSet?.(p)):b.name===\"checked\"&&\"checked\"in D?(D.checked=b.value!==null,V!==D.checked&&e.onFieldSet?.(p)):b.name===\"selected\"&&\"selected\"in D&&(D.selected=b.value!==null,V!==D.selected&&e.onFieldSet?.(p.parentElement?.closest(\"select\")??p)))},N=a=>{if(!a.refused){d-=1,a.id!==void 0&&s.delete(a.id);for(let g of a.children)N(g)}},x=(a,g)=>{if(!Bn(a)||typeof a.id!=\"string\"||s.has(a.id))return f({reason:\"record\"}),w();if(d>=r)return f({reason:\"budget\"}),c||(c=!0,e.onOverBudget?.()),w();let m=a.id;if(a.type===fa)return w();if(a.type===ua){if(Hr(g.namespace,g.name))return f({reason:\"child\",element:g.name}),w();let V=n.createTextNode(String(a.data??\"\").slice(0,Sr)),J={dom:V,children:[],text:!0,id:m,parent:g};return s.set(m,J),i.set(V,m),d+=1,J}if(a.type!==da)return f({reason:\"record\"}),w();let p=String(a.element);if(Hr(g.namespace,g.name))return f({reason:\"child\",element:p}),w();let b=vs(p,g.namespace);if(\"refused\"in b)return f(b.refused),w();let O=n.createElementNS(b.namespace===\"svg\"?Wo:Yo,b.name);b.as&&O.setAttribute(\"data-graview-as\",b.as),b.namespace===\"html\"&&b.name===\"img\"&&O.setAttribute(\"referrerpolicy\",\"no-referrer\"),b.namespace===\"html\"&&b.name===\"a\"&&(O.setAttribute(\"target\",\"_blank\"),O.setAttribute(\"rel\",\"noopener noreferrer\"),O.setAttribute(\"referrerpolicy\",\"no-referrer\"));let D={dom:O,name:b.name,namespace:b.namespace,children:[],id:m,parent:g};if(s.set(m,D),i.set(O,m),d+=1,Bn(a.attributes))for(let[V,J]of Object.entries(a.attributes))E(D,V,J);if(e.decorate?.(O,b.name,b.namespace),Bn(a.properties))for(let V of Object.keys(a.properties))f({reason:\"attribute\",element:b.name,name:V});if(Bn(a.eventListeners))for(let V of Object.keys(a.eventListeners))a.eventListeners[V]!=null&&f({reason:\"attribute\",element:b.name,name:`on${V}`});if(Array.isArray(a.children))for(let V of a.children){let J=x(V,D);D.children.push(J),O.appendChild(J.dom)}return D},h=a=>{if(!Array.isArray(a))return f({reason:\"record\"});let[g,m]=a,p=typeof m==\"string\"?s.get(m):void 0;if(!p)return f({reason:\"record\"});switch(g){case sa:{if(p.text)return f({reason:\"record\"});let b=Number(a[3]),O=Number.isInteger(b)&&b>=0&&b<=p.children.length?b:p.children.length,D=x(a[2],p);p.dom.insertBefore(D.dom,p.children[O]?.dom??null),p.children.splice(O,0,D),p.namespace===\"html\"&&p.name===\"textarea\"&&e.onFieldSet?.(p.dom);return}case ia:{let b=Number(a[2]),O=p.children[b];if(!O)return f({reason:\"record\"});p.children.splice(b,1),O.dom.parentNode?.removeChild(O.dom),N(O);return}case aa:{if(!p.text)return f({reason:\"record\"});p.dom.data=String(a[2]??\"\").slice(0,Sr);let b=u(p,p.parent);b&&e.onFieldSet?.(b);return}case la:{if(p===l||p.text)return f({reason:\"record\"});let b=String(a[2]),O=a[4]??Is;return O===ca?E(p,b,a[3]):f(O===Is||O===Ds?{reason:\"attribute\",element:p.name,name:O===Ds?`on${b}`:b}:{reason:\"record\"})}default:return f({reason:\"record\"})}};return{apply(a,g){if(!Array.isArray(a))return f({reason:\"record\"}),!0;for(let m=0;m<a.length;m+=1){if(g&&m%32===0&&g())return!1;h(a[m])}return!0},get refused(){return o},get size(){return d},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 $s(t,e,n){let{root:r}=Rs(),o=!1,s=Hs(r,{origin:n.origin??\"null\",...n.imageOrigins?{imageOrigins:n.imageOrigins}:{},...n.asset?{asset:n.asset}:{},...n.link?{link:n.link}:{},maxNodes:n.maxNodes,onOverBudget:()=>o=!0});for(let d of t)s.apply(d);let i=[...s.refused],l=\"\";if(e){let d=Ns(e);l=d.css;for(let c of d.refused)i.push({reason:\"css\",name:\"stylesheet\",css:c})}return{root:r,refused:i,size:s.size,over:o,css:l,elementOf:d=>s.elementOf(d)}}function ma(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\"element\"in t&&t.element===\"a\"&&t.address!==void 0?{at:`drawing ${n}${r}`,says:`Not drawn: ${as(t.address,e.linkOrigins)}`}:{at:`drawing ${n}${r}`,says:t.address!==void 0&&\"element\"in t&&t.element===\"img\"?`Not drawn: ${Os(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 Gs(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(e.props),s=$s(t.renders,t.sheets,{maxNodes:n.maxNodes,...e.origin?{origin:e.origin}:{},...e.imageOrigins?{imageOrigins:e.imageOrigins}:{},...e.assets?{asset:c=>c}:{},link:c=>is(c,{handed:o,...e.linkOrigins?{origins:e.linkOrigins}:{}})});if(s.over)return{ok:!1,reason:\"nodes\",detail:`It drew more than the ${n.maxNodes.toLocaleString(\"en-US\")} things a view may draw.`};let i=[...e.places,...(e.lists??[]).filter(c=>!e.places.some(f=>f.as===c)).map(c=>({as:c}))],l=_s(s.root,{props:e.props,places:i,...e.accepts?{accepts:e.accepts}:{}});for(let c of l.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 d=[...s.refused.map(c=>ma(c,{...e.imageOrigins?{origins:e.imageOrigins}:{},assets:e.assets===!0,...e.linkOrigins?{linkOrigins:e.linkOrigins}:{}})),...l.problems];for(let c of t.went)\"record\"in c&&!(e.props.node?.id===c.record||(e.props.nodes??[]).some(f=>f.id===c.record)||Mt(i,c.record))&&d.push({at:\"navigate\",says:`It goes to ${Ar(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(i)}`}),\"place\"in c&&!Mt(i,c.place)&&d.push({at:\"navigate\",says:`It goes to the place ${Ar(c.place)}, which this app does not have.${lt(i)}`});return{ok:!0,parts:l.parts,problems:d,drawn:s}}var Vr=\"graviewHeadless\",zr=\"graviewHeadlessView\";var Vs=globalThis,ha=Promise.prototype.then,ga=Promise.resolve(),Wn=t=>void ha.call(ga,t),Yn=Vs.performance,$t=Yn&&typeof Yn.now==\"function\"?Yn.now.bind(Yn):Date.now,Ve=JSON.stringify,zs=JSON.parse,ya=Object.defineProperty,Br=t=>(t instanceof Error?`${t.name}: ${t.message}`:String(t)).slice(0,500),ft=t=>{try{return zs(Ve(t??null))}catch{return null}},U={renders:[],asked:[],went:[],ms:0,logs:[],messages:0},Ne,qn=(t,e)=>{Ne??={reason:t,detail:e}},pt=t=>{U.logs.length<50&&U.logs.push(t.slice(0,500))},mt={removed:[],stuck:[],sealed:!1},Ht=es({send(t){U.messages+=1,t.type===\"render\"?U.renders.push(ft(t.records)):t.type===\"style\"?U.sheets=(ft(t.sheets)??[]).map(String):t.type===\"gestures\"?U.gestures=ft(t.bound):t.type===\"navigate\"&&\"place\"in t?U.went.push({place:String(t.place),...t.where!==void 0?{where:ft(t.where)}:{},...t.section!==void 0?{section:String(t.section)}:{}}):t.type===\"navigate\"&&\"to\"in t&&U.went.push({record:String(t.to),...t.where!==void 0?{where:ft(t.where)}:{},...t.section!==void 0?{section:String(t.section)}:{}})},act(t,e){return U.messages+=1,U.asked.push({name:String(t),args:ft(e)}),Promise.resolve({type:\"answer\",id:U.asked.length,ok:!1,reason:\"refused\",message:\"Nothing is applied in a headless run.\"})},navigate(t){U.messages+=1,U.went.push({record:String(t)})},microtask:Wn,now:$t,threw:t=>qn(\"error\",`It threw: ${Br(t)}`),warn:pt,hardening:()=>mt}),Us=!1,Fr=!1;function ba(t){if(Fr||typeof t!=\"function\"||(Fr=!0,Ne))return;let e=$t();try{t.call(void 0,Ht.view)}catch(n){qn(\"error\",`It threw: ${Br(n)}`)}U.ms+=$t()-e}async function Ea(t){if(Us)return Ve({ok:!1,reason:\"refused\",detail:\"A headless script runs one view, once: something called its entry before the host did.\"});Us=!0;let e;try{e=zs(String(t))}catch{return Ve({ok:!1,reason:\"isolate\",detail:\"The run was not handed its input as JSON.\"})}if(!Fr&&!Ne)return Ve({ok:!1,reason:\"isolate\",detail:\"The script held no view.\"});let n=$t();Ne||Ht.hear({type:\"props\",props:e.props,push:1}),U.ms+=$t()-n,U.ms>=e.limits.pushMs&&qn(\"slow\",`It took longer than ${e.limits.pushMs.toLocaleString(\"en-US\")} ms to draw what it was shown.`);for(let o=0;o<64&&!Ne;o+=1)await new Promise(s=>Wn(s));if(e.press&&typeof e.press.selector==\"string\"&&!Ne){let o=Ht.find(e.press.selector);if(U.pressed={selector:e.press.selector.slice(0,200),...o!==void 0?{target:o}:{},asked:U.asked.length,went:U.went.length,renders:U.renders.length},o!==void 0){Ht.hear({type:\"dom-event\",target:o,event:\"click\"});for(let s=0;s<64&&!Ne;s+=1)await new Promise(i=>Wn(i))}}if(Ne)return Ve({ok:!1,...Ne,transcript:U});let r=Gs(U,e);return r.ok?Ve({ok:!0,transcript:U,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:U})}var wa=Object.freeze({log:(...t)=>pt(t.map(String).join(\" \")),info:(...t)=>pt(t.map(String).join(\" \")),debug:(...t)=>pt(t.map(String).join(\" \")),warn:(...t)=>pt(t.map(String).join(\" \")),error:(...t)=>pt(t.map(Br).join(\" \"))}),Na=0,js=()=>Na+=1,Ta=[[\"console\",wa],[\"setTimeout\",js],[\"setInterval\",js],[\"clearTimeout\",()=>{}],[\"clearInterval\",()=>{}],[\"queueMicrotask\",Wn],[\"graview\",Ht.view],[zr,ba],[Vr,t=>Ea(t)]];for(let[t,e]of Ta)ya(Vs,t,{value:e,writable:!0,enumerable:!1,configurable:!0});mt=Lo(globalThis,[\"graview\",zr,Vr],{primitivesStay:!0});mt.stuck.length>0&&qn(\"refused\",`This isolate could not be hardened: ${mt.stuck.join(\", \")} would not go.`);})();\n";
|
|
8
8
|
//# sourceMappingURL=runtime.generated.js.map
|