@reventlessdev/reventless-host-shell 3.0.0-alpha.80 → 3.0.0-alpha.82
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/dist/assets/{Geocoder.res-BOdySsJH.js → Geocoder.res-z8tCIOga.js} +2 -2
- package/dist/assets/GraphMode.res-DQyjf3gO.js +1 -0
- package/dist/assets/{GraphView.res-CRcyg6hQ.js → GraphView.res-Dxy6YZhM.js} +16 -16
- package/dist/assets/{MapMode.res-CwUDCE7P.js → MapMode.res-zJ9MEr0o.js} +7 -7
- package/dist/assets/{StateMachineDiagram.res-BNdLprCN.js → StateMachineDiagram.res-sxKvDawb.js} +1 -1
- package/dist/assets/{index-DMFzPDvN.js → index-C5R5wdF3.js} +1 -1
- package/dist/assets/index-CWhOYx3H.js +133 -0
- package/dist/mf-entry-bootstrap-0.js +1 -1
- package/package.json +5 -5
- package/dist/assets/GraphMode.res-DKdroqtc.js +0 -1
- package/dist/assets/index-pVLf0Xc0.js +0 -133
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/GraphMode.res-DQyjf3gO.js","assets/GraphView.res-Dxy6YZhM.js","assets/StateMachineDiagram.res-sxKvDawb.js","assets/MapMode.res-zJ9MEr0o.js","assets/Geocoder.res-z8tCIOga.js","assets/index-C5R5wdF3.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import"./virtualExposes-DN39MDG_.js";import{d as rO}from"./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__reventless_host_shell__remoteEntry-_hash_-C8lRAcSv.js";import{_ as rh}from"./preload-helper-BlTxHScW.js";import{_ as Wq}from"./_virtual_mf___mfe_internal__reventless_host_shell__loadShare__react_mf_2_dom_mf_1_client__loadShare__.mjs-BzAfciYp.js";import{_ as L,a as _,b as Bt}from"./_virtual_mf___mfe_internal__reventless_host_shell__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.mjs-hre-5-8f.js";import{a as ce,b as Ae,c as Zt,d as ur,e as Jq,f as St,g as $r,h as De,i as Pt,j as Nv,k as Qq,l as nO,m as _o,n as Yq,o as Xq,p as Zq,q as eV}from"./_virtual_mf___mfe_internal__reventless_host_shell__loadShare__react__loadShare__.mjs-CuPed97e.js";import{a as iO,b as Fm}from"./_virtual_mf___mfe_internal__reventless_host_shell__loadShare__react_mf_2_dom__loadShare__.mjs-Bp_g55i_.js";import{c as v0,_ as Nt}from"./__virtual_mf___mfe_internal__reventless_host_shell__loadShare__react__loadShare__.mjs_commonjs-proxy-CfkhEoF5.js";function tV(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}import"./__virtual_mf___mfe_internal__reventless_host_shell__loadShare__react_mf_2_dom__loadShare__.mjs_commonjs-proxy-BUE6rcGI.js";function rV(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(n,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function r(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=r(i);fetch(i.href,o)}})();function Dt(e){return e===void 0?{BS_PRIVATE_NESTED_SOME_NONE:0}:e!==null&&e.BS_PRIVATE_NESTED_SOME_NONE!==void 0?{BS_PRIVATE_NESTED_SOME_NONE:e.BS_PRIVATE_NESTED_SOME_NONE+1|0}:e}function Mi(e){if(e!=null)return Dt(e)}function Rt(e){if(e===null||e.BS_PRIVATE_NESTED_SOME_NONE===void 0)return e;let t=e.BS_PRIVATE_NESTED_SOME_NONE;if(t!==0)return{BS_PRIVATE_NESTED_SOME_NONE:t-1|0}}let Dv="JsExn";function nV(e){if(e.RE_EXN_ID===Dv)return Dt(e._1)}function iV(e){return e==null?!1:typeof e.RE_EXN_ID=="string"}function Ns(e){return iV(e)?e:{RE_EXN_ID:"JsExn",_1:e}}let oV=["map","graph"];async function aV(e,t){switch(e){case"graph":return(await rh(()=>import("./GraphMode.res-DQyjf3gO.js"),__vite__mapDeps([0,1])).then(a=>a.init))(t.graphLayout,void 0),(await rh(()=>import("./StateMachineDiagram.res-sxKvDawb.js"),__vite__mapDeps([2,1])).then(a=>a.init))();case"map":let i=await rh(()=>import("./MapMode.res-zJ9MEr0o.js"),__vite__mapDeps([3])).then(a=>a.init),o=await rh(()=>import("./Geocoder.res-z8tCIOga.js"),__vite__mapDeps([4])).then(a=>a.fromShell);return i(t.mapStyle,o(),void 0);default:console.error('[host-shell] config.json viewModes: unknown mode "'+e+'" — known modes: '+oV.join(", "));return}}async function sV(e){await Promise.all(e.viewModes.map(async t=>{try{return await aV(t,e)}catch(r){let n=Ns(r);if(n.RE_EXN_ID===Dv){console.error('[host-shell] view mode "'+t+'" failed to load: '+String(n._1));return}throw n}}))}function mi(e,t){if(e!==void 0&&t(Rt(e)))return e}function ee(e,t){if(e!==void 0)return t(Rt(e))}function ne(e,t,r){return e!==void 0?r(Rt(e)):t}function q(e,t){if(e!==void 0)return Dt(t(Rt(e)))}function k(e,t){if(e!==void 0)return t(Rt(e))}function D(e,t){return e!==void 0?Rt(e):t}function Wn(e,t){return e!==void 0?e:t}function Ee(e){return e!==void 0}function ir(e){return e===void 0}function lV(e){if(typeof Event=="function")return new Event(e);let t=document.createEvent("Event");return t.initEvent(e,!0,!0),t}function FR(e){switch(e){case"":case"/":return 0;default:let t=e.slice(1),n=t[t.length-1|0]==="/"?t.slice(0,-1):t,i=n.split("?",2),a=(i.length!==2?n:i[0]).split("/").filter(c=>c.length!==0),s=a.length-1|0,l=0;for(;;){let c=l,d=s;if(d<0)return c;l={hd:a[d],tl:c},s=d-1|0}}}function uV(e,t){let r=globalThis.window;return e!==void 0?FR(e):r!==void 0?FR(Rt(r).location.pathname):0}function cV(){let e=globalThis.window;if(e===void 0)return"";let t=Rt(e).location.hash;switch(t){case"":case"#":return"";default:return t.slice(1)}}function IR(e){switch(e){case"":case"?":return"";default:let t=e.split("?",2);return t.length!==2?"":t[1]}}function dV(e,t){let r=globalThis.window;return e!==void 0?IR(e):r!==void 0?IR(Rt(r).location.search):""}function ua(e){let t=globalThis.history,r=globalThis.window;if(t!==void 0&&r!==void 0){Rt(t).pushState(null,"",e),Rt(r).dispatchEvent(lV("popstate"));return}}function fV(e,t){if(e.hash!==t.hash||e.search!==t.search)return!0;{let r=e.path,n=t.path;for(;;){let i=n,o=r;if(o===0)return i!==0;if(i===0||o.hd!==i.hd)return!0;n=i.tl,r=o.tl}}}function b0(e,t){return{path:uV(e),hash:cV(),search:dV(e)}}function hV(e){let t=globalThis.window;if(t===void 0)return()=>{};let r=()=>e(b0(void 0));return Rt(t).addEventListener("popstate",r),r}function pV(e){let t=globalThis.window;if(t!==void 0){Rt(t).removeEventListener("popstate",e);return}}function mV(e,t){let r=ce(()=>b0(void 0)),n=r[1],i=r[0];return Ae(()=>{let o=hV(s=>n(l=>s)),a=b0(void 0);return fV(a,i)&&n(s=>a),()=>pV(o)},[]),i}let gV=b0,Fv=Zt({prefix:"",path:""});function oO(e,t){return e===""||t.startsWith(e)?t:e+t}let vV=Fv.Provider;function bV(e){return ur(vV,{value:e.value,children:e.children})}let _V=bV,PR="popstate";function yV(){let e=globalThis.window;return e!==void 0?Rt(e).location.pathname:""}function xV(e){let t=globalThis.window;if(t===void 0)return()=>{};let r=Rt(t);return r.addEventListener(PR,e),()=>{r.removeEventListener(PR,e)}}function Iv(e,t){return Jq(xV,yV,()=>D(e,""))}function Ls(){let t=St(Fv).prefix;return r=>ua(oO(t,r))}function aO(){let t=St(Fv).path,r=Iv(void 0);return t===""?r:t}function Lt(e,t){return e.catch(r=>t(Ns(r)))}function wd(e,t){return e===t?0:e<t?-1:1}function yw(e,t){return e<t?-1:e===t?0:1}function Fo(e,t){if(t===0)throw{RE_EXN_ID:"Division_by_zero",Error:new Error};return e%t}function sO(e,t){if(e<=0)return[];let r=new Array(e);return r.fill(t),r}function Fl(e,t){if(e<=0)return[];let r=new Array(e);for(let n=0;n<e;++n)r[n]=t(n);return r}function nt(e,t,r){return e.reduce(r,t)}function SV(e,t){let r=e.findIndex(t);if(r!==-1)return r}function Q(e,t){let r=e.length,n=new Array(r),i=0;for(let o=0;o<r;++o){let a=e[o],s=t(a);s!==void 0&&(n[i]=Rt(s),i=i+1|0)}return n.length=i,n}function xw(e,t){let r=e.length,n=new Array(r),i=0;for(let o=0;o<r;++o){let a=e[o],s=t(a,o);s!==void 0&&(n[i]=Rt(s),i=i+1|0)}return n.length=i,n}function wV(e,t){let r=0;for(;;){let n=r;if(n===e.length)return;let i=t(e[n]);if(i!==void 0)return i;r=n+1|0}}function lO(e,t){let r=parseInt(e);if(!(Number.isNaN(r)||r>2147483647||r<-2147483648))return r|0}function EV(e,t){for(;;){let r=t,n=e;if(n===0)return r;let i={hd:n.hd,tl:0};r.tl=i,t=i,e=n.tl}}function kV(e,t){if(e===0)return t;let r={hd:e.hd,tl:0};return EV(e.tl,r).tl=t,r}function CV(e){let t=e,r=0;for(;;){let n=r,i=t;if(i===0)return n;r=n+1|0,t=i.tl}}function RV(e,t,r){for(;;){let n=r,i=t;if(n===0)return;e[i]=n.hd,r=n.tl,t=i+1|0}}function Pv(e){let t=e.length-1|0,r=0;for(;;){let n=r,i=t;if(i<0)return n;r={hd:e[i],tl:n},t=i-1|0}}function Ov(e){let t=CV(e),r=new Array(t);return RV(r,0,e),r}function AV(e,t){for(;;){let r=t,n=e;if(n===0)return r;t={hd:n.hd,tl:r},e=n.tl}}function uO(e){return AV(e,0)}function TV(e,t){for(;;){let r=e;if(r===0)return;t(r.hd),e=r.tl}}function cO(e,t,r){for(;;){let n=t,i=e;if(i===0)return n;t=r(n,i.hd),e=i.tl}}function $V(e){let t=e.length,r=0;for(let i=0;i<t;++i)r=r+e[i].length|0;let n=new Array(r);r=0;for(let i=0;i<t;++i){let o=e[i];for(let a=0,s=o.length;a<s;++a)n[r]=o[a],r=r+1|0}return n}function NV(e,t,r){let n=t;for(let i=0,o=e.length;i<o;++i)n=r(n,e[i]);return n}let dO=NV;function Jc(e){return e!==void 0?e.h:0}function ka(e,t,r,n){let i=Jc(e),o=Jc(n);return{k:t,v:r,h:i>=o?i+1|0:o+1|0,l:e,r:n}}function DV(e,t){return{k:e,v:t,h:1,l:void 0,r:void 0}}function FV(e,t){return e.v===t?e:{k:e.k,v:t,h:e.h,l:e.l,r:e.r}}function OR(e,t,r,n){let i=e!==void 0?e.h:0,o=n!==void 0?n.h:0;if(i>(o+2|0)){let l=e.l,c=e.r;return Jc(l)>=Jc(c)?ka(l,e.k,e.v,ka(c,t,r,n)):ka(ka(l,e.k,e.v,c.l),c.k,c.v,ka(c.r,t,r,n))}if(o<=(i+2|0))return{k:t,v:r,h:i>=o?i+1|0:o+1|0,l:e,r:n};let a=n.l,s=n.r;return Jc(s)>=Jc(a)?ka(ka(e,t,r,a),n.k,n.v,s):ka(ka(e,t,r,a.l),a.k,a.v,ka(a.r,n.k,n.v,s))}function IV(e,t){for(;;){let r=e;if(r===void 0)return;let n=r.k;if(t===n)return Dt(r.v);e=t<n?r.l:r.r}}function lx(e,t,r){if(e===void 0)return DV(t,r);let n=e.k;if(t===n)return FV(e,r);let i=e.v;return t<n?OR(lx(e.l,t,r),n,i,e.r):OR(e.l,n,i,lx(e.r,t,r))}let fO=IV;function hO(e){let t=n=>{switch(n){case"":case"/":return 0;default:let i=Pv(n.split("/"));return i!==0&&i.hd===""?i.tl:i}},r=e.indexOf("?");return r===-1?t(e):r===0?0:t(e.slice(0,r))}let ux={parsers:0,children:void 0,capture:void 0,wildcard:!1};function PV(e,t){let r=e,n=t;for(;;){let i=n,o=r,a=o.parsers,s=0;if(a!==0)s=1;else{if(i===0)return 0;s=1}if(s===1){let l=o.capture,c=0;if(i===0)return a;if(i.hd===""){if(i.tl===0)return a;c=2}else c=2;if(c===2){if(o.wildcard)return a;let d=i.tl,f=fO(o.children,i.hd);if(f!==void 0){n=d,r=f;continue}if(l===void 0)return 0;n=d,r=l;continue}}}}function OV(e,t,r){let n=(i,o)=>{if(i===0)return{parsers:{hd:t,tl:o.parsers},children:o.children,capture:o.capture,wildcard:o.wildcard};let a=o.capture,s=o.children,l=i.tl,c=i.hd;if(typeof c!="object"){if(c!=="Capture")return{parsers:{hd:t,tl:o.parsers},children:o.children,capture:o.capture,wildcard:!0};let f=n(l,a!==void 0?a:ux);return{parsers:o.parsers,children:o.children,capture:f,wildcard:o.wildcard}}else{let d=c._0,f=fO(s,d),p=n(l,f!==void 0?f:ux);return{parsers:o.parsers,children:lx(s,d,p),capture:o.capture,wildcard:o.wildcard}}};return n(e,r)}function MV(e){return{prefix:0,matched:hO(e)}}function LV(e){return Ov({hd:"",tl:e.matched}).join("/")}function zV(e){return Ov({hd:"",tl:e.prefix}).join("/")}function UV(e,t){return{TAG:"Route",_0:e,_1:t,_2:r=>r}}function _0(e,t){return{TAG:"Match",_0:e,_1:t}}function cx(e){return typeof e!="object"?e==="End"?0:{hd:"Wildcard",tl:0}:e.TAG==="Match"?{hd:{TAG:"Match",_0:e._0},tl:cx(e._1)}:{hd:"Capture",tl:cx(e._1)}}function BV(e,t){let r=i=>e("/"+Ov(i).join("/")),n=(i,o)=>{for(;;){let a=o,s=i;if(typeof a!="object")return a==="End"?s(0):d=>s(kV(d.matched,0));if(a.TAG==="Match"){let d=a._0;o=a._1,i=f=>s({hd:d,tl:f});continue}let l=a._1,c=a._0.to_;return d=>n(f=>s({hd:c(d),tl:f}),l)}};return n(r,t)}function jV(e){return BV(t=>t,e)}function qV(e,t,r){let n=e,i=t,o=0,a=r;for(;;){let s=a,l=o,c=i,d=n;if(typeof d!="object")return d==="End"?s!==0?s.hd===""&&s.tl===0?{TAG:"MatchWithTrailingSlash",_0:c}:"NoMatch":{TAG:"FullMatch",_0:c}:{TAG:"FullMatch",_0:c({prefix:uO(l),matched:s})};if(d.TAG==="Match"){if(s===0)return"NoMatch";let p=s.hd;if(d._0!==p)return"NoMatch";a=s.tl,o={hd:p,tl:l},n=d._1;continue}if(s===0)return"NoMatch";let f=s.hd,h=d._0.from_(f);if(h===void 0)return"NoMatch";a=s.tl,o={hd:f,tl:l},i=c(Rt(h)),n=d._1}}function VV(e){let t=uO(e);return cO(t,ux,(r,n)=>{let i=cx(n._0);return OV(i,n,r)})}function GV(e,t){let r=hO(t),i=PV(e,r);for(;;){let o=i;if(o===0)return"NoMatch";let a=o.hd,s=a._2,l=qV(a._0,a._1,r);if(typeof l=="object")return l.TAG==="FullMatch"?{TAG:"FullMatch",_0:s(l._0)}:{TAG:"MatchWithTrailingSlash",_0:s(l._0)};i=o.tl}}function KV(e,t){let r=GV(e,t);if(typeof r=="object")return Dt(r._0)}function pO(e){return e("End")}let mO={prefix:zV,wildcard_match:LV,of_parts:MV},HV="Wildcard",vs=jV,Uc=UV;function Pu(){return{}}let gO=Zt({});function WV(e,t){return e+("."+t)}function JV(e,t,r,n){return e[WV(t,r)]=vs(n),e}function dx(e,t){return Object.assign(Object.assign({},e),t)}function Ap(){return St(gO)}let QV=gO.Provider;function YV(e){return ur(QV,{value:e.registry,children:e.children})}let XV={make:YV},vO={contents:{}};function ZV(e){vO.contents=e}function eG(e){return e.startsWith("/")?e.slice(1):e}function tG(e){let t=eG(e);return q(nt(Object.entries(vO.contents),void 0,(r,n)=>{let i=n[0];if(!t.startsWith(i+"/"))return r;let o=n[1];return r!==void 0&&r[0].length>=i.length?r:[i,o]}),r=>r[1])}function Ou(e){if(e.startsWith("http://")||e.startsWith("https://"))return e;let t=tG(e);if(t===void 0)return e;let r=e.startsWith("/")?e:"/"+e;return(t.endsWith("/")?t.slice(0,t.length-1|0):t)+r}let rG=((e,t)=>{for(var r in e)t(e[r],r)});function nG(e){if(typeof e=="boolean")return e}function iG(e){if(e===null)return null}function oG(e){if(typeof e=="string")return e}function aG(e){if(typeof e=="number")return e}function sG(e){if(typeof e=="object"&&e!==null&&!Array.isArray(e))return e}function lG(e){if(Array.isArray(e))return e}let me={bool:nG,$$null:iG,string:oG,float:aG,object:sG,array:lG};function F(e,t){if(t in e)return Dt(e[t])}function $e(e){let t=Object.keys(e),r=t.length,n=new Array(r);for(let i=0;i<r;++i){let o=t[i];n[i]=[o,e[o]]}return n}function Tp(e){let t=Object.keys(e),r=t.length,n=new Array(r);for(let i=0;i<r;++i)n[i]=e[t[i]];return n}function Oe(e){let t={},r=e.length;for(let n=0;n<r;++n){let i=e[n];t[i[0]]=i[1]}return t}let uG=/[^aeiou]y$/i;function cG(e){return uG.test(e)?e.slice(0,e.length-1|0)+"ies":e.endsWith("s")||e.endsWith("x")||e.endsWith("z")||e.endsWith("ch")||e.endsWith("sh")?e+"es":e+"s"}function Eo(e){return e.endsWith("ies")?e.slice(0,e.length-3|0)+"y":e.endsWith("ses")||e.endsWith("xes")||e.endsWith("zes")||e.endsWith("ches")||e.endsWith("shes")?e.slice(0,e.length-2|0):e.endsWith("s")?e.slice(0,e.length-1|0):e}function $p(e){return cG(Eo(e))}let dG=[["id","ID"],["ids","IDs"],["url","URL"],["uri","URI"],["api","API"],["arn","ARN"],["aws","AWS"],["iam","IAM"],["sqs","SQS"],["sns","SNS"],["uuid","UUID"],["ip","IP"],["dns","DNS"],["http","HTTP"],["https","HTTPS"],["json","JSON"],["xml","XML"],["sql","SQL"],["ui","UI"],["ux","UX"]],fG=Oe(dG);function $_(e){return e===e.toUpperCase()?e!==e.toLowerCase():!1}function N_(e){return e===e.toLowerCase()?e!==e.toUpperCase():!1}function hG(e){switch(e){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return!0;default:return!1}}function pG(e){let t=e.length,r=[],n={contents:""},i=()=>{if(n.contents.length>0){r.push(n.contents),n.contents="";return}};for(let o=0;o<t;++o){let a=e.charAt(o);if(a==="_"||a==="-"||a===" ")i();else if($_(a)){let s=o>0&&N_(e.charAt(o-1|0)),l=(o+1|0)<t&&N_(e.charAt(o+1|0)),c=o>0&&$_(e.charAt(o-1|0));(s||c&&l)&&i(),n.contents=n.contents+a}else if(hG(a)){let s=!1;if(o>0){let l=e.charAt(o-1|0);s=$_(l)||N_(l)}s&&i(),n.contents=n.contents+a}else n.contents=n.contents+a}return i(),r}function mG(e){let t=e.toLowerCase(),r=F(fG,t);return r!==void 0?r:e.length===0?"":e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}function pt(e){let t=pG(e);return t.length!==0?t.map(mG).join(" "):e}let gG=Eo;function Xe(e){let t=typeof e;return t==="string"?{TAG:"JSONString",_0:e}:t==="number"?{TAG:"JSONNumber",_0:e}:t==="boolean"?e===!0?"JSONTrue":"JSONFalse":e===null?"JSONNull":Array.isArray(e)?{TAG:"JSONArray",_0:e}:{TAG:"JSONObject",_0:e}}function oe(e){if(typeof e=="string")return e}function Li(e){if(typeof e=="number")return e}function G(e){if(typeof e=="object"&&!Array.isArray(e)&&e!==null)return e}function Ct(e){if(Array.isArray(e))return e}function Mv(e){if(typeof e=="boolean")return e}let MR=(function(e,t){for(var r in e)t(r)});function Re(e,t){if(e===t)return!0;let r=typeof e;if(r==="string"||r==="number"||r==="bigint"||r==="boolean"||r==="undefined"||e===null)return!1;let n=typeof t;if(r==="function"||n==="function")throw{RE_EXN_ID:"Invalid_argument",_1:"equal: functional value",Error:new Error};if(n==="number"||n==="bigint"||n==="undefined"||t===null)return!1;let i=e.TAG,o=t.TAG;if(i!==o)return!1;let a=e.length|0,s=t.length|0;if(a===s)if(Array.isArray(e)){let l=0;for(;;){let c=l;if(c===a)return!0;if(!Re(e[c],t[c]))return!1;l=c+1|0}}else{if(e instanceof Date&&t instanceof Date)return!(e>t||e<t);{let l={contents:!0},c=f=>{if(!Object.prototype.hasOwnProperty.call(t,f)){l.contents=!1;return}},d=f=>{if(!Object.prototype.hasOwnProperty.call(e,f)||!Re(t[f],e[f])){l.contents=!1;return}};return MR(e,c),l.contents&&MR(t,d),l.contents}}else return!1}function ca(e,t){return(typeof e=="number"||typeof e=="bigint")&&(typeof t=="number"||typeof t=="bigint")?e!==t:!Re(e,t)}let x={background:"--rv-color-background",surface:"--rv-color-surface",surfaceSubtle:"--rv-color-surface-subtle",surfaceElevated:"--rv-color-surface-elevated",brand:"--rv-color-brand",brandSubtle:"--rv-color-brand-subtle",success:"--rv-color-success",warning:"--rv-color-warning",error:"--rv-color-error",info:"--rv-color-info",textPrimary:"--rv-color-text-primary",textSecondary:"--rv-color-text-secondary",textDisabled:"--rv-color-text-disabled",textOnBrand:"--rv-color-text-on-brand",border:"--rv-color-border",borderSubtle:"--rv-color-border-subtle"},O={xs:"--rv-spacing-xs",sm:"--rv-spacing-sm",md:"--rv-spacing-md",lg:"--rv-spacing-lg",xl:"--rv-spacing-xl",xxl:"--rv-spacing-xxl"},T={fontFamily:"--rv-font-family",fontFamilyMono:"--rv-font-family-mono",sizeXs:"--rv-font-size-xs",sizeSm:"--rv-font-size-sm",sizeMd:"--rv-font-size-md",sizeLg:"--rv-font-size-lg",sizeXl:"--rv-font-size-xl",sizeXxl:"--rv-font-size-xxl",weightNormal:"--rv-font-weight-normal",weightMedium:"--rv-font-weight-medium",weightBold:"--rv-font-weight-bold",lineHeightTight:"--rv-line-height-tight",lineHeightNormal:"--rv-line-height-normal",lineHeightRelaxed:"--rv-line-height-relaxed"},Y={sm:"--rv-radius-sm",md:"--rv-radius-md",lg:"--rv-radius-lg",full:"--rv-radius-full"},Zr={sm:"--rv-shadow-sm",md:"--rv-shadow-md",lg:"--rv-shadow-lg"};function fx(e){switch(e){case"Wide":return 0;case"Compact":return 1;case"Narrow":return 2;case"Tight":return 3}}function vG(e,t){return fx(e)>=fx(t)}function bG(e){switch(e){case"Wide":return"wide";case"Compact":return"compact";case"Narrow":return"narrow";case"Tight":return"tight"}}function _G(e){switch(e){case"compact":return"Compact";case"narrow":return"Narrow";case"tight":return"Tight";case"wide":return"Wide";default:return}}let Jn={compact:"(max-width: 1024px)",narrow:"(max-width: 720px)",tight:"(max-width: 520px)",bandRank:fx,atLeastAsNarrow:vG,bandName:bG,bandOfName:_G},bO="x-reventless-union",_O="x-reventless-union-member";function yG(e){let t=F(e,bO),r;if(t!==void 0){let n=oe(t);r=n!==void 0?n:k(k(G(t),i=>F(i,"name")),oe)}else r=void 0;return k(r,n=>{if(n!=="")return n})}function xG(e){return Re(k(k(G(e),t=>F(t,"type")),oe),"null")}function SG(e){return k(k(F(e,_O),oe),t=>{if(t!=="")return t})}function wG(e){return k(G(e),t=>k(k(F(t,"properties"),G),r=>q(k(k(k(F(r,"TAG"),G),n=>F(n,"const")),oe),n=>({tag:n,memberType:SG(t),properties:Oe($e(r).filter(i=>i[0]!=="TAG"))}))))}function Hl(e){return k(G(e),t=>nt(["oneOf","anyOf"],void 0,(r,n)=>r!==void 0?r:k(k(F(t,n),Ct),i=>{let o=i.filter(l=>!xG(l)),a=o.length;if(a===1)return Hl(o[0]);if(a===0)return;let s=Q(o,wG);if(s.length===o.length)return{name:yG(t),arms:s}})))}function hx(e,t){let r=t.memberType;return r!==void 0?r:q(e.name,n=>n+t.tag)}function Sw(e,t){let r=e.arms.find(i=>i.tag===t?!0:Re(hx(e,i),t));if(r!==void 0)return r;let n=e.arms.filter(i=>t.endsWith(i.tag));if(n.length===1)return n[0]}function yO(e){return Oe([["type","object"],["properties",e.properties]])}function vn(e){let t=G(e);if(t===void 0)return e;let r=F(t,"type"),n=F(t,"properties");return r!==void 0||n!==void 0||Ee(Hl(e))?e:D(q(nt(["anyOf","oneOf","allOf"],void 0,(i,o)=>i!==void 0?i:k(k(F(t,o),Ct),a=>a.find(s=>ca(k(k(G(s),l=>F(l,"type")),oe),"null")))),vn),e)}function xO(e){return k(G(vn(e)),t=>{if(k(F(t,"type"),oe)==="array")return q(F(t,"items"),vn)})}function EG(e,t){return t.startsWith(e)}function kG(e){return e==="inherit_"?"inherit":e==="unset"?"unset":"initial"}let un={initial:"initial",inherit_:"inherit_",unset:"unset",toString:kG};function CG(e){return{NAME:"var",VAL:e}}function RG(e,t){return{NAME:"varDefault",VAL:[e,t]}}function LR(e){return EG("--",e)?e:"--"+e}function Lv(e){if(e.NAME==="var")return"var("+LR(e.VAL)+")";let t=e.VAL;return"var("+LR(t[0])+","+t[1]+")"}function AG(e){return{NAME:"s",VAL:e}}function TG(e){return{NAME:"ms",VAL:e}}function $G(e){return e.NAME==="ms"?e.VAL.toString()+"ms":e.VAL.toString()+"s"}let NG={s:AG,ms:TG,toString:$G};function ww(e){return e.VAL.toString()+"%"}function DG(e){return{NAME:"ch",VAL:e}}function FG(e){return{NAME:"em",VAL:e}}function IG(e){return{NAME:"ex",VAL:e}}function PG(e){return{NAME:"rem",VAL:e}}function OG(e){return{NAME:"vh",VAL:e}}function MG(e){return{NAME:"vw",VAL:e}}function LG(e){return{NAME:"vmin",VAL:e}}function zG(e){return{NAME:"vmax",VAL:e}}function UG(e){return{NAME:"px",VAL:e}}function BG(e){return{NAME:"pxFloat",VAL:e}}function jG(e){return{NAME:"cm",VAL:e}}function qG(e){return{NAME:"mm",VAL:e}}function VG(e){return{NAME:"inch",VAL:e}}function GG(e){return{NAME:"pc",VAL:e}}function KG(e){return{NAME:"pt",VAL:e}}function px(e){if(typeof e!="object")return"0";let t=e.NAME;return t==="inch"?e.VAL.toString()+"in":t==="vmax"?e.VAL.toString()+"vmax":t==="vmin"?e.VAL.toString()+"vmin":t==="percent"?e.VAL.toString()+"%":t==="ch"?e.VAL.toString()+"ch":t==="cm"?e.VAL.toString()+"cm":t==="em"?e.VAL.toString()+"em":t==="ex"?e.VAL.toString()+"ex":t==="mm"?e.VAL.toString()+"mm":t==="pc"?e.VAL.toString()+"pc":t==="pt"?e.VAL.toString()+"pt":t==="px"?e.VAL.toString()+"px":t==="vh"?e.VAL.toString()+"vh":t==="vw"?e.VAL.toString()+"vw":t==="rem"?e.VAL.toString()+"rem":e.VAL.toString()+"px"}let SO={ch:DG,em:FG,ex:IG,rem:PG,vh:OG,vw:MG,vmin:LG,vmax:zG,px:UG,pxFloat:BG,cm:jG,mm:qG,inch:VG,pc:GG,pt:KG,zero:"zero",toString:px};function HG(e,t){return{NAME:"min",VAL:[e,t]}}function WG(e,t){return{NAME:"max",VAL:[e,t]}}function Jo(e){if(typeof e!="object")return px(e);let t=e.NAME;if(t==="subtract"){let n=e.VAL;return"calc("+Jo(n[0])+" - "+Jo(n[1])+")"}if(t==="percent")return ww(e);if(t==="add"){let n=e.VAL;return"calc("+Jo(n[0])+" + "+Jo(n[1])+")"}if(t==="div"){let n=e.VAL;return"calc("+Jo(n[0])+" / "+n[1].toString()+")"}if(t==="max"){let n=e.VAL;return"max("+Jo(n[0])+", "+Jo(n[1])+")"}if(t==="min"){let n=e.VAL;return"min("+Jo(n[0])+", "+Jo(n[1])+")"}if(t!=="mul")return px(e);let r=e.VAL;return"calc("+Jo(r[0])+" * "+r[1].toString()+")"}let en={min:HG,max:WG,toString:Jo};function JG(e){let t=e.NAME;return t==="turn"?e.VAL.toString()+"turn":t==="deg"?e.VAL.toString()+"deg":t==="rad"?e.VAL.toString()+"rad":e.VAL.toString()+"grad"}function QG(e){return e==="fixed"?"fixed":e==="static"?"static":e==="sticky"?"sticky":e==="relative"?"relative":"absolute"}let YG={absolute:"absolute",relative:"relative",$$static:"static",fixed:"fixed",sticky:"sticky",toString:QG};function XG(e){return e==="clip"?"clip":e==="scroll"?"scroll":e==="hidden"?"hidden":e==="visible"?"visible":"auto"}let wO={hidden:"hidden",visible:"visible",scroll:"scroll",auto:"auto",clip:"clip",toString:XG};function ZG(e){return"auto"}let eK={auto:"auto",toString:ZG};function tK(e,t){return{NAME:"steps",VAL:[e,t]}}function rK(e,t,r,n){return{NAME:"cubicBezier",VAL:[e,t,r,n]}}function nK(e){if(typeof e!="object")return e==="easeInOut"?"ease-in-out":e==="linear"?"linear":e==="jumpBoth"?"jump-both":e==="stepStart"?"step-start":e==="jumpNone"?"jump-none":e==="stepEnd"?"step-end":e==="easeIn"?"ease-in":e==="jumpEnd"?"jump-end":e==="jumpStart"?"jump-start":e==="easeOut"?"ease-out":"ease";if(e.NAME==="steps"){let r=e.VAL,n=r[0];return r[1]==="start"?"steps("+n.toString()+", start)":"steps("+n.toString()+", end)"}let t=e.VAL;return"cubic-bezier("+t[0].toString()+", "+t[1].toString()+", "+t[2].toString()+", "+t[3].toString()+")"}function iK(e){return e==="none"?"none":e==="circle"?"circle":e==="lowerGreek"?"lower-greek":e==="square"?"square":e==="lowerAlpha"?"lower-alpha":e==="upperAlpha"?"upper-alpha":e==="decimal"?"decimal":e==="lowerRoman"?"lower-roman":e==="lowerLatin"?"lower-latin":e==="upperRoman"?"upper-roman":e==="upperLatin"?"upper-latin":"disc"}let oK={toString:iK};function aK(e){return typeof e=="object"?e.VAL.toString():"infinite"}let sK={toString:aK};function lK(e){return e==="cell"?"cell":e==="copy"?"copy":e==="swResize"?"sw-resize":e==="grab"?"grab":e==="help"?"help":e==="move"?"move":e==="none"?"none":e==="text"?"text":e==="rowResize"?"row-resize":e==="wait"?"wait":e==="pointer"?"pointer":e==="seResize"?"se-resize":e==="zoomOut"?"zoom-out":e==="sResize"?"s-resize":e==="zoomIn"?"zoom-in":e==="grabbing"?"grabbing":e==="nsResize"?"ns-resize":e==="nwseResize"?"nwse-resize":e==="progress"?"progress":e==="crosshair"?"crosshair":e==="wResize"?"w-resize":e==="noDrop"?"no-drop":e==="allScroll"?"all-scroll":e==="verticalText"?"vertical-text":e==="nResize"?"n-resize":e==="default"?"default":e==="neswResize"?"nesw-resize":e==="alias"?"alias":e==="ewResize"?"ew-resize":e==="eResize"?"e-resize":e==="nwResize"?"nw-resize":e==="contextMenu"?"context-menu":e==="colResize"?"col-resize":e==="notAllowed"?"not-allowed":e==="neResize"?"ne-resize":"auto"}let uK={auto:"auto",$$default:"default",none:"none",contextMenu:"contextMenu",help:"help",pointer:"pointer",progress:"progress",wait:"wait",cell:"cell",crosshair:"crosshair",text:"text",verticalText:"verticalText",alias:"alias",copy:"copy",move:"move",noDrop:"noDrop",notAllowed:"notAllowed",grab:"grab",grabbing:"grabbing",allScroll:"allScroll",colResize:"colResize",rowResize:"rowResize",nResize:"nResize",eResize:"eResize",sResize:"sResize",wResize:"wResize",neResize:"neResize",nwResize:"nwResize",seResize:"seResize",swResize:"swResize",ewResize:"ewResize",nsResize:"nsResize",neswResize:"neswResize",nwseResize:"nwseResize",zoomIn:"zoomIn",zoomOut:"zoomOut",toString:lK};function cK(e,t,r){return{NAME:"rgb",VAL:[e,t,r]}}function dK(e,t,r,n){return{NAME:"rgba",VAL:[e,t,r,n]}}function fK(e,t,r){return{NAME:"hsl",VAL:[e,t,r]}}function hK(e,t,r,n){return{NAME:"hsla",VAL:[e,t,r,n]}}function pK(e){return{NAME:"hex",VAL:e}}function zR(e){let t=e.NAME;return t==="var"||t==="varDefault"?Lv(e):JG(e)}function UR(e){let t=e.NAME;return t==="percent"?ww(e):t==="num"?e.VAL.toString():Lv(e)}function Im(e){return e.NAME==="percent"?ww(e):Lv(e)}function Pm(e){if(typeof e!="object")return e==="transparent"?"transparent":"currentColor";let t=e.NAME;if(t==="rgba"){let n=e.VAL;return"rgba("+n[0].toString()+", "+n[1].toString()+", "+n[2].toString()+", "+UR(n[3])+")"}if(t==="hex")return"#"+e.VAL;if(t==="hsl"){let n=e.VAL;return"hsl("+zR(n[0])+", "+Im(n[1])+", "+Im(n[2])+")"}if(t==="rgb"){let n=e.VAL;return"rgb("+n[0].toString()+", "+n[1].toString()+", "+n[2].toString()+")"}let r=e.VAL;return"hsla("+zR(r[0])+", "+Im(r[1])+", "+Im(r[2])+", "+UR(r[3])+")"}function mK(e){if(typeof e!="object"||e.NAME!=="lightDark")return Pm(e);let t=e.VAL;return"light-dark("+Pm(t[0])+", "+Pm(t[1])+")"}function gK(e){return e==="hidden"?"hidden":e==="ridge"?"ridge":e==="solid"?"solid":e==="outset"?"outset":e==="groove"?"groove":e==="dashed"?"dashed":e==="dotted"?"dotted":e==="double"?"double":e==="inset"?"inset":"none"}let vK={toString:gK};function bK(e){return typeof e=="object"?e.VAL.toString():"normal"}let BR={toString:bK};function _K(e){return e==="inline"?"inline":e==="block"?"block":"run-in"}let yK={toString:_K};function xK(e){return e==="grid"?"grid":e==="table"?"table":"flex"}let SK={toString:xK};function wK(e){return"list-item"}let EK={toString:wK};function kK(e){return e==="tableRow"?"table-row":e==="tableRowGroup"?"table-row-group":e==="tableColumn"?"table-column":e==="tableHeaderGroup"?"table-header-group":e==="tableCell"?"table-cell":e==="tableColumnGroup"?"table-column-group":e==="tableCaption"?"table-caption":"table-footer-group"}let CK={toString:kK};function RK(e){return e==="contents"?"contents":"none"}let AK={toString:RK};function TK(e){return e==="inlineBlock"?"inline-block":e==="inlineFlex"?"inline-flex":e==="inlineGrid"?"inline-grid":"inline-table"}let $K={toString:TK};function NK(e){return e==="left"?"left":e==="right"?"right":e==="selfEnd"?"self-end":e==="start"?"start":e==="center"?"center":e==="flexStart"?"flex-start":e==="flexEnd"?"flex-end":e==="selfStart"?"self-start":"end"}let Ew={toString:NK};function DK(e){return e==="firstBaseline"?"first baseline":e==="baseline"?"baseline":"last baseline"}let EO={toString:DK};function FK(e){return"normal"}let IK={toString:FK};function PK(e){return e==="spaceAround"?"space-around":e==="stretch"?"stretch":e==="spaceBetween"?"space-between":"space-evenly"}let OK={toString:PK};function MK(e){return e==="right"?"right":e==="justify"?"justify":e==="start"?"start":e==="center"?"center":"left"}let LK={toString:MK};function zK(e){return e==="normal"?"normal":"stretch"}let UK={toString:zK};function BK(e){return e==="stretch"?"stretch":e==="normal"?"normal":"auto"}let jK={toString:BK};function qK(e){return e==="wrapReverse"?"wrap-reverse":e==="nowrap"?"nowrap":"wrap"}let VK={toString:qK};function GK(e){return e==="row"?"row":e==="columnReverse"?"column-reverse":e==="rowReverse"?"row-reverse":"column"}let KK={toString:GK};function HK(e){return e==="none"?"none":e==="text"?"text":e==="all"?"all":e==="contain"?"contain":"auto"}let WK={toString:HK};function JK(e){return e==="minContent"?"min-content":e==="fitContent"?"fit-content":e==="maxContent"?"max-content":"auto"}let kw={toString:JK};function QK(e){return"none"}let zv={toString:QK};function YK(e){return e==="minContent"?"min-content":e==="fitContent"?"fit-content":e==="maxContent"?"max-content":"auto"}let Cw={toString:YK},tn={$$var:CG,varDefault:RG,toString:Lv},XK={linear:"linear",ease:"ease",easeIn:"easeIn",easeOut:"easeOut",easeInOut:"easeInOut",stepStart:"stepStart",stepEnd:"stepEnd",steps:tK,cubicBezier:rK,jumpStart:"jumpStart",jumpEnd:"jumpEnd",jumpNone:"jumpNone",jumpBoth:"jumpBoth",toString:nK},mx={rgb:cK,rgba:dK,hsl:fK,hsla:hK,hex:pK,transparent:"transparent",currentColor:"currentColor",toString:mK},ZK=zv,eH=zv,tH=zv,rH=zv,nH=mx.transparent;function iH(e,t){switch(t.TAG){case"D":let r=t._1,n=t._0;n==="content"?e[n]=r===""?'""':r:e[n]=r;break;case"S":e[t._0]=_u(t._1);break;case"PseudoClass":e[":"+t._0]=_u(t._1);break;case"PseudoClassParam":e[":"+(t._0+("("+(t._1+")")))]=_u(t._2);break}return e}function _u(e){return dO(e,{},iH)}function oH(e){let t=p=>e.injectRaw(p),r=(p,m)=>e.renderRaw(p,m),n=(p,m)=>e.injectRules(p,_u(m)),i=(p,m,g)=>e.renderRules(p,m,_u(g)),o=p=>e.make(_u(p)),a=p=>e.mergeStyles(p),s=(p,m)=>e.mergeStyles([p,m]),l=(p,m,g)=>e.mergeStyles([p,m,g]),c=(p,m,g,v)=>e.mergeStyles([p,m,g,v]),d=p=>dO(p,{},(m,g)=>(m[g[0].toString()+"%"]=_u(g[1]),m));return{insertRule:t,renderRule:r,global:n,renderGlobal:i,style:o,merge:a,merge2:s,merge3:l,merge4:c,keyframes:p=>e.makeKeyframes(d(p)),renderKeyframes:(p,m)=>e.renderKeyframes(p,d(m))}}function Uv(e){if(typeof e!="object")return e==="unset"||e==="inherit_"||e==="initial"?un.toString(e):e==="zero"?en.toString(e):"auto";let t=e.NAME;return t==="var"||t==="varDefault"?tn.toString(e):en.toString(e)}function aH(e){if(typeof e!="object")return mx.toString(e);let t=e.NAME;return t==="var"||t==="varDefault"?tn.toString(e):mx.toString(e)}function sH(e){return{TAG:"D",_0:"alignItems",_1:typeof e=="object"?tn.toString(e):e==="unset"||e==="inherit_"||e==="initial"?un.toString(e):e==="baseline"||e==="firstBaseline"||e==="lastBaseline"?EO.toString(e):e==="normal"||e==="stretch"?UK.toString(e):Ew.toString(e)}}function lH(e){return{TAG:"D",_0:"alignSelf",_1:typeof e=="object"?tn.toString(e):e==="selfStart"||e==="flexEnd"||e==="flexStart"||e==="center"||e==="start"||e==="selfEnd"||e==="right"||e==="left"||e==="end_"?Ew.toString(e):e==="unset"||e==="inherit_"||e==="initial"?un.toString(e):e==="baseline"||e==="firstBaseline"||e==="lastBaseline"?EO.toString(e):jK.toString(e)}}function uH(e){return{TAG:"D",_0:"animationDuration",_1:NG.toString(e)}}function cH(e){return{TAG:"D",_0:"animationIterationCount",_1:sK.toString(e)}}function dH(e){return{TAG:"D",_0:"animationTimingFunction",_1:XK.toString(e)}}function fH(e){return{TAG:"D",_0:"bottom",_1:Uv(e)}}function hH(e){return{TAG:"D",_0:"cursor",_1:uK.toString(e)}}function pH(e){return{TAG:"D",_0:"display",_1:typeof e=="object"?tn.toString(e):e==="table"||e==="grid"||e==="flex"?SK.toString(e):e==="contents"||e==="none"?AK.toString(e):e==="unset"||e==="inherit_"||e==="initial"?un.toString(e):e==="inlineGrid"||e==="inlineFlex"||e==="inlineBlock"||e==="inlineTable"?$K.toString(e):e==="block"||e==="inline"||e==="runIn"?yK.toString(e):e==="listItem"?EK.toString(e):CK.toString(e)}}function mH(e){return{TAG:"D",_0:"flexDirection",_1:typeof e=="object"?tn.toString(e):e==="unset"||e==="inherit_"||e==="initial"?un.toString(e):KK.toString(e)}}function gH(e){return{TAG:"D",_0:"flexGrow",_1:e.toString()}}function vH(e){return{TAG:"D",_0:"flexShrink",_1:e.toString()}}function bH(e){return{TAG:"D",_0:"flexWrap",_1:typeof e=="object"?tn.toString(e):e==="nowrap"||e==="wrapReverse"||e==="wrap"?VK.toString(e):un.toString(e)}}function _H(e){let t;if(typeof e=="object"){let r=e.NAME;t=r==="var"||r==="varDefault"?tn.toString(e):en.toString(e)}else t=e==="unset"||e==="inherit_"||e==="initial"?un.toString(e):e==="zero"?en.toString(e):Cw.toString(e);return{TAG:"D",_0:"height",_1:t}}function yH(e){return{TAG:"D",_0:"justifyContent",_1:typeof e=="object"?tn.toString(e):e==="spaceBetween"||e==="stretch"||e==="spaceAround"||e==="spaceEvenly"?OK.toString(e):e==="unset"||e==="inherit_"||e==="initial"?un.toString(e):e==="normal"?IK.toString(e):Ew.toString(e)}}function xH(e){return{TAG:"D",_0:"left",_1:Uv(e)}}function SH(e){let t;if(typeof e=="object"){let r=e.NAME;t=r==="var"||r==="varDefault"?tn.toString(e):r==="abs"?BR.toString(e):en.toString(e)}else t=e==="zero"?en.toString(e):e==="normal"?BR.toString(e):un.toString(e);return{TAG:"D",_0:"lineHeight",_1:t}}function wH(e){return{TAG:"D",_0:"listStyleType",_1:typeof e=="object"?tn.toString(e):e==="unset"||e==="inherit_"||e==="initial"?un.toString(e):oK.toString(e)}}function Mu(e){if(typeof e!="object")return e==="unset"||e==="inherit_"||e==="initial"?un.toString(e):e==="zero"?en.toString(e):eK.toString(e);let t=e.NAME;return t==="var"||t==="varDefault"?tn.toString(e):en.toString(e)}function EH(e){return{TAG:"D",_0:"margin",_1:Mu(e)}}function kH(e,t){return{TAG:"D",_0:"margin",_1:Mu(e)+(" "+Mu(t))}}function CH(e){return{TAG:"D",_0:"marginLeft",_1:Mu(e)}}function RH(e){return{TAG:"D",_0:"marginRight",_1:Mu(e)}}function AH(e){return{TAG:"D",_0:"marginTop",_1:Mu(e)}}function TH(e){return{TAG:"D",_0:"marginBottom",_1:Mu(e)}}function $H(e){let t;if(typeof e=="object"){let r=e.NAME;t=r==="var"||r==="varDefault"?tn.toString(e):en.toString(e)}else t=e==="none"?tH.toString(e):e==="unset"||e==="inherit_"||e==="initial"?un.toString(e):e==="zero"?en.toString(e):Cw.toString(e);return{TAG:"D",_0:"maxHeight",_1:t}}function NH(e){let t;if(typeof e=="object"){let r=e.NAME;t=r==="var"||r==="varDefault"?tn.toString(e):en.toString(e)}else t=e==="none"?ZK.toString(e):e==="unset"||e==="inherit_"||e==="initial"?un.toString(e):e==="zero"?en.toString(e):kw.toString(e);return{TAG:"D",_0:"maxWidth",_1:t}}function DH(e){let t;if(typeof e=="object"){let r=e.NAME;t=r==="var"||r==="varDefault"?tn.toString(e):en.toString(e)}else t=e==="none"?rH.toString(e):e==="unset"||e==="inherit_"||e==="initial"?un.toString(e):e==="zero"?en.toString(e):Cw.toString(e);return{TAG:"D",_0:"minHeight",_1:t}}function FH(e){let t;if(typeof e=="object"){let r=e.NAME;t=r==="var"||r==="varDefault"?tn.toString(e):en.toString(e)}else t=e==="none"?eH.toString(e):e==="unset"||e==="inherit_"||e==="initial"?un.toString(e):e==="zero"?en.toString(e):kw.toString(e);return{TAG:"D",_0:"minWidth",_1:t}}function IH(e){return{TAG:"D",_0:"opacity",_1:e.toString()}}function PH(e){return{TAG:"D",_0:"overflow",_1:wO.toString(e)}}function OH(e){return{TAG:"D",_0:"overflowY",_1:wO.toString(e)}}function MH(e){return{TAG:"D",_0:"padding",_1:en.toString(e)}}function LH(e,t){return{TAG:"D",_0:"padding",_1:en.toString(e)+(" "+en.toString(t))}}function zH(e){return{TAG:"D",_0:"position",_1:typeof e=="object"?tn.toString(e):e==="unset"||e==="inherit_"||e==="initial"?un.toString(e):YG.toString(e)}}function UH(e){return{TAG:"D",_0:"right",_1:Uv(e)}}function BH(e){return{TAG:"D",_0:"textAlign",_1:typeof e=="object"?tn.toString(e):e==="unset"||e==="inherit_"||e==="initial"?un.toString(e):LK.toString(e)}}function jH(e){return{TAG:"D",_0:"top",_1:Uv(e)}}function qH(e,t){return{TAG:"D",_0:e,_1:t}}function VH(e){return{TAG:"D",_0:"userSelect",_1:typeof e=="object"?tn.toString(e):e==="unset"||e==="inherit_"||e==="initial"?un.toString(e):WK.toString(e)}}function GH(e){let t;if(typeof e=="object"){let r=e.NAME;t=r==="var"||r==="varDefault"?tn.toString(e):en.toString(e)}else t=e==="unset"||e==="inherit_"||e==="initial"?un.toString(e):e==="zero"?en.toString(e):kw.toString(e);return{TAG:"D",_0:"width",_1:t}}function KH(e){return{TAG:"D",_0:"zIndex",_1:e.toString()}}function HH(e,t){return{TAG:"S",_0:"@media "+e,_1:t}}function WH(e,t){return{TAG:"S",_0:e,_1:t}}function JH(e){return{TAG:"PseudoClass",_0:"disabled",_1:e}}function QH(e){return{TAG:"PseudoClass",_0:"focus",_1:e}}function YH(e){return{TAG:"PseudoClass",_0:"focus-within",_1:e}}function XH(e){return{TAG:"PseudoClass",_0:"hover",_1:e}}function ZH(e){return{TAG:"PseudoClass",_0:"last-child",_1:e}}function eW(e){return{TAG:"S",_0:"::placeholder",_1:e}}let tW=SO.px;function rW(e){return typeof e=="object"?tn.toString(e):e==="unset"||e==="inherit_"||e==="initial"?un.toString(e):vK.toString(e)}function nW(e,t,r){return{TAG:"D",_0:"border",_1:SO.toString(e)+" "+rW(t)+" "+aH(r)}}function iW(e){return{TAG:"D",_0:"animationName",_1:e}}function oW(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function aW(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var sW=(function(){function e(r){var n=this;this._insertTag=function(i){var o;n.tags.length===0?n.insertionPoint?o=n.insertionPoint.nextSibling:n.prepend?o=n.container.firstChild:o=n.before:o=n.tags[n.tags.length-1].nextSibling,n.container.insertBefore(i,o),n.tags.push(i)},this.isSpeedy=r.speedy===void 0?!0:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(n){n.forEach(this._insertTag)},t.insert=function(n){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(aW(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var o=oW(i);try{o.insertRule(n,o.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(n));this.ctr++},t.flush=function(){this.tags.forEach(function(n){var i;return(i=n.parentNode)==null?void 0:i.removeChild(n)}),this.tags=[],this.ctr=0},e})(),ei="-ms-",y0="-moz-",Qt="-webkit-",kO="comm",Rw="rule",Aw="decl",lW="@import",CO="@keyframes",uW="@layer",cW=Math.abs,Bv=String.fromCharCode,dW=Object.assign;function fW(e,t){return Vn(e,0)^45?(((t<<2^Vn(e,0))<<2^Vn(e,1))<<2^Vn(e,2))<<2^Vn(e,3):0}function RO(e){return e.trim()}function hW(e,t){return(e=t.exec(e))?e[0]:e}function Yt(e,t,r){return e.replace(t,r)}function gx(e,t){return e.indexOf(t)}function Vn(e,t){return e.charCodeAt(t)|0}function Ih(e,t,r){return e.slice(t,r)}function $a(e){return e.length}function Tw(e){return e.length}function Om(e,t){return t.push(e),e}function pW(e,t){return e.map(t).join("")}var jv=1,Ed=1,AO=0,zi=0,sn=0,Gd="";function qv(e,t,r,n,i,o,a){return{value:e,root:t,parent:r,type:n,props:i,children:o,line:jv,column:Ed,length:a,return:""}}function Nf(e,t){return dW(qv("",null,null,"",null,null,0),e,{length:-e.length},t)}function mW(){return sn}function gW(){return sn=zi>0?Vn(Gd,--zi):0,Ed--,sn===10&&(Ed=1,jv--),sn}function no(){return sn=zi<AO?Vn(Gd,zi++):0,Ed++,sn===10&&(Ed=1,jv++),sn}function Ba(){return Vn(Gd,zi)}function qg(){return zi}function Np(e,t){return Ih(Gd,e,t)}function Ph(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function TO(e){return jv=Ed=1,AO=$a(Gd=e),zi=0,[]}function $O(e){return Gd="",e}function Vg(e){return RO(Np(zi-1,vx(e===91?e+2:e===40?e+1:e)))}function vW(e){for(;(sn=Ba())&&sn<33;)no();return Ph(e)>2||Ph(sn)>3?"":" "}function bW(e,t){for(;--t&&no()&&!(sn<48||sn>102||sn>57&&sn<65||sn>70&&sn<97););return Np(e,qg()+(t<6&&Ba()==32&&no()==32))}function vx(e){for(;no();)switch(sn){case e:return zi;case 34:case 39:e!==34&&e!==39&&vx(sn);break;case 40:e===41&&vx(e);break;case 92:no();break}return zi}function _W(e,t){for(;no()&&e+sn!==57;)if(e+sn===84&&Ba()===47)break;return"/*"+Np(t,zi-1)+"*"+Bv(e===47?e:no())}function yW(e){for(;!Ph(Ba());)no();return Np(e,zi)}function xW(e){return $O(Gg("",null,null,null,[""],e=TO(e),0,[0],e))}function Gg(e,t,r,n,i,o,a,s,l){for(var c=0,d=0,f=a,h=0,p=0,m=0,g=1,v=1,b=1,y=0,S="",w=i,C=o,A=n,$=S;v;)switch(m=y,y=no()){case 40:if(m!=108&&Vn($,f-1)==58){gx($+=Yt(Vg(y),"&","&\f"),"&\f")!=-1&&(b=-1);break}case 34:case 39:case 91:$+=Vg(y);break;case 9:case 10:case 13:case 32:$+=vW(m);break;case 92:$+=bW(qg()-1,7);continue;case 47:switch(Ba()){case 42:case 47:Om(SW(_W(no(),qg()),t,r),l);break;default:$+="/"}break;case 123*g:s[c++]=$a($)*b;case 125*g:case 59:case 0:switch(y){case 0:case 125:v=0;case 59+d:b==-1&&($=Yt($,/\f/g,"")),p>0&&$a($)-f&&Om(p>32?qR($+";",n,r,f-1):qR(Yt($," ","")+";",n,r,f-2),l);break;case 59:$+=";";default:if(Om(A=jR($,t,r,c,d,i,s,S,w=[],C=[],f),o),y===123)if(d===0)Gg($,t,A,A,w,o,f,s,C);else switch(h===99&&Vn($,3)===110?100:h){case 100:case 108:case 109:case 115:Gg(e,A,A,n&&Om(jR(e,A,A,0,0,i,s,S,i,w=[],f),C),i,C,f,s,n?w:C);break;default:Gg($,A,A,A,[""],C,0,s,C)}}c=d=p=0,g=b=1,S=$="",f=a;break;case 58:f=1+$a($),p=m;default:if(g<1){if(y==123)--g;else if(y==125&&g++==0&&gW()==125)continue}switch($+=Bv(y),y*g){case 38:b=d>0?1:($+="\f",-1);break;case 44:s[c++]=($a($)-1)*b,b=1;break;case 64:Ba()===45&&($+=Vg(no())),h=Ba(),d=f=$a(S=$+=yW(qg())),y++;break;case 45:m===45&&$a($)==2&&(g=0)}}return o}function jR(e,t,r,n,i,o,a,s,l,c,d){for(var f=i-1,h=i===0?o:[""],p=Tw(h),m=0,g=0,v=0;m<n;++m)for(var b=0,y=Ih(e,f+1,f=cW(g=a[m])),S=e;b<p;++b)(S=RO(g>0?h[b]+" "+y:Yt(y,/&\f/g,h[b])))&&(l[v++]=S);return qv(e,t,r,i===0?Rw:s,l,c,d)}function SW(e,t,r){return qv(e,t,r,kO,Bv(mW()),Ih(e,2,-2),0)}function qR(e,t,r,n){return qv(e,t,r,Aw,Ih(e,0,n),Ih(e,n+1,-1),n)}function id(e,t){for(var r="",n=Tw(e),i=0;i<n;i++)r+=t(e[i],i,e,t)||"";return r}function wW(e,t,r,n){switch(e.type){case uW:if(e.children.length)break;case lW:case Aw:return e.return=e.return||e.value;case kO:return"";case CO:return e.return=e.value+"{"+id(e.children,n)+"}";case Rw:e.value=e.props.join(",")}return $a(r=id(e.children,n))?e.return=e.value+"{"+r+"}":""}function EW(e){var t=Tw(e);return function(r,n,i,o){for(var a="",s=0;s<t;s++)a+=e[s](r,n,i,o)||"";return a}}function kW(e){return function(t){t.root||(t=t.return)&&e(t)}}function CW(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var RW=function(t,r,n){for(var i=0,o=0;i=o,o=Ba(),i===38&&o===12&&(r[n]=1),!Ph(o);)no();return Np(t,zi)},AW=function(t,r){var n=-1,i=44;do switch(Ph(i)){case 0:i===38&&Ba()===12&&(r[n]=1),t[n]+=RW(zi-1,r,n);break;case 2:t[n]+=Vg(i);break;case 4:if(i===44){t[++n]=Ba()===58?"&\f":"",r[n]=t[n].length;break}default:t[n]+=Bv(i)}while(i=no());return t},TW=function(t,r){return $O(AW(TO(t),r))},VR=new WeakMap,$W=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var r=t.value,n=t.parent,i=t.column===n.column&&t.line===n.line;n.type!=="rule";)if(n=n.parent,!n)return;if(!(t.props.length===1&&r.charCodeAt(0)!==58&&!VR.get(n))&&!i){VR.set(t,!0);for(var o=[],a=TW(r,o),s=n.props,l=0,c=0;l<a.length;l++)for(var d=0;d<s.length;d++,c++)t.props[c]=o[l]?a[l].replace(/&\f/g,s[d]):s[d]+" "+a[l]}}},NW=function(t){if(t.type==="decl"){var r=t.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(t.return="",t.value="")}};function NO(e,t){switch(fW(e,t)){case 5103:return Qt+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Qt+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Qt+e+y0+e+ei+e+e;case 6828:case 4268:return Qt+e+ei+e+e;case 6165:return Qt+e+ei+"flex-"+e+e;case 5187:return Qt+e+Yt(e,/(\w+).+(:[^]+)/,Qt+"box-$1$2"+ei+"flex-$1$2")+e;case 5443:return Qt+e+ei+"flex-item-"+Yt(e,/flex-|-self/,"")+e;case 4675:return Qt+e+ei+"flex-line-pack"+Yt(e,/align-content|flex-|-self/,"")+e;case 5548:return Qt+e+ei+Yt(e,"shrink","negative")+e;case 5292:return Qt+e+ei+Yt(e,"basis","preferred-size")+e;case 6060:return Qt+"box-"+Yt(e,"-grow","")+Qt+e+ei+Yt(e,"grow","positive")+e;case 4554:return Qt+Yt(e,/([^-])(transform)/g,"$1"+Qt+"$2")+e;case 6187:return Yt(Yt(Yt(e,/(zoom-|grab)/,Qt+"$1"),/(image-set)/,Qt+"$1"),e,"")+e;case 5495:case 3959:return Yt(e,/(image-set\([^]*)/,Qt+"$1$`$1");case 4968:return Yt(Yt(e,/(.+:)(flex-)?(.*)/,Qt+"box-pack:$3"+ei+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Qt+e+e;case 4095:case 3583:case 4068:case 2532:return Yt(e,/(.+)-inline(.+)/,Qt+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if($a(e)-1-t>6)switch(Vn(e,t+1)){case 109:if(Vn(e,t+4)!==45)break;case 102:return Yt(e,/(.+:)(.+)-([^]+)/,"$1"+Qt+"$2-$3$1"+y0+(Vn(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~gx(e,"stretch")?NO(Yt(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Vn(e,t+1)!==115)break;case 6444:switch(Vn(e,$a(e)-3-(~gx(e,"!important")&&10))){case 107:return Yt(e,":",":"+Qt)+e;case 101:return Yt(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Qt+(Vn(e,14)===45?"inline-":"")+"box$3$1"+Qt+"$2$3$1"+ei+"$2box$3")+e}break;case 5936:switch(Vn(e,t+11)){case 114:return Qt+e+ei+Yt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Qt+e+ei+Yt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Qt+e+ei+Yt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Qt+e+ei+e+e}return e}var DW=function(t,r,n,i){if(t.length>-1&&!t.return)switch(t.type){case Aw:t.return=NO(t.value,t.length);break;case CO:return id([Nf(t,{value:Yt(t.value,"@","@"+Qt)})],i);case Rw:if(t.length)return pW(t.props,function(o){switch(hW(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return id([Nf(t,{props:[Yt(o,/:(read-\w+)/,":"+y0+"$1")]})],i);case"::placeholder":return id([Nf(t,{props:[Yt(o,/:(plac\w+)/,":"+Qt+"input-$1")]}),Nf(t,{props:[Yt(o,/:(plac\w+)/,":"+y0+"$1")]}),Nf(t,{props:[Yt(o,/:(plac\w+)/,ei+"input-$1")]})],i)}return""})}},FW=[DW],IW=function(t){var r=t.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(g){var v=g.getAttribute("data-emotion");v.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var i=t.stylisPlugins||FW,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(g){for(var v=g.getAttribute("data-emotion").split(" "),b=1;b<v.length;b++)o[v[b]]=!0;s.push(g)});var l,c=[$W,NW];{var d,f=[wW,kW(function(g){d.insert(g)})],h=EW(c.concat(i,f)),p=function(v){return id(xW(v),h)};l=function(v,b,y,S){d=y,p(v?v+"{"+b.styles+"}":b.styles),S&&(m.inserted[b.name]=!0)}}var m={key:r,sheet:new sW({key:r,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:o,registered:{},insert:l};return m.sheet.hydrate(s),m};function PW(e){for(var t=0,r,n=0,i=e.length;i>=4;++n,i-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var OW={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},MW=/[A-Z]|^ms/g,LW=/_EMO_([^_]+?)_([^]*?)_EMO_/g,DO=function(t){return t.charCodeAt(1)===45},GR=function(t){return t!=null&&typeof t!="boolean"},D_=CW(function(e){return DO(e)?e:e.replace(MW,"-$&").toLowerCase()}),KR=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(LW,function(n,i,o){return vl={name:i,styles:o,next:vl},i})}return OW[t]!==1&&!DO(t)&&typeof r=="number"&&r!==0?r+"px":r};function x0(e,t,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var i=r;if(i.anim===1)return vl={name:i.name,styles:i.styles,next:vl},i.name;var o=r;if(o.styles!==void 0){var a=o.next;if(a!==void 0)for(;a!==void 0;)vl={name:a.name,styles:a.styles,next:vl},a=a.next;var s=o.styles+";";return s}return zW(e,t,r)}}var l=r;if(t==null)return l;var c=t[l];return c!==void 0?c:l}function zW(e,t,r){var n="";if(Array.isArray(r))for(var i=0;i<r.length;i++)n+=x0(e,t,r[i])+";";else for(var o in r){var a=r[o];if(typeof a!="object"){var s=a;t!=null&&t[s]!==void 0?n+=o+"{"+t[s]+"}":GR(s)&&(n+=D_(o)+":"+KR(o,s)+";")}else if(Array.isArray(a)&&typeof a[0]=="string"&&(t==null||t[a[0]]===void 0))for(var l=0;l<a.length;l++)GR(a[l])&&(n+=D_(o)+":"+KR(o,a[l])+";");else{var c=x0(e,t,a);switch(o){case"animation":case"animationName":{n+=D_(o)+":"+c+";";break}default:n+=o+"{"+c+"}"}}}return n}var HR=/label:\s*([^\s;{]+)\s*(;|$)/g,vl;function F_(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=!0,i="";vl=void 0;var o=e[0];if(o==null||o.raw===void 0)n=!1,i+=x0(r,t,o);else{var a=o;i+=a[0]}for(var s=1;s<e.length;s++)if(i+=x0(r,t,e[s]),n){var l=o;i+=l[s]}HR.lastIndex=0;for(var c="",d;(d=HR.exec(i))!==null;)c+="-"+d[1];var f=PW(i)+c;return{name:f,styles:i,next:vl}}function FO(e,t,r){var n="";return r.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):i&&(n+=i+" ")}),n}var UW=function(t,r,n){var i=t.key+"-"+r.name;t.registered[i]===void 0&&(t.registered[i]=r.styles)},BW=function(t,r,n){UW(t,r);var i=t.key+"-"+r.name;if(t.inserted[r.name]===void 0){var o=r;do t.insert(r===o?"."+i:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function WR(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function JR(e,t,r){var n=[],i=FO(e,n,r);return n.length<2?r:i+t(n)}var jW=function(t){var r=IW(t);r.sheet.speedy=function(s){this.isSpeedy=s},r.compat=!0;var n=function(){for(var l=arguments.length,c=new Array(l),d=0;d<l;d++)c[d]=arguments[d];var f=F_(c,r.registered,void 0);return BW(r,f),r.key+"-"+f.name},i=function(){for(var l=arguments.length,c=new Array(l),d=0;d<l;d++)c[d]=arguments[d];var f=F_(c,r.registered),h="animation-"+f.name;return WR(r,{name:f.name,styles:"@keyframes "+h+"{"+f.styles+"}"}),h},o=function(){for(var l=arguments.length,c=new Array(l),d=0;d<l;d++)c[d]=arguments[d];var f=F_(c,r.registered);WR(r,f)},a=function(){for(var l=arguments.length,c=new Array(l),d=0;d<l;d++)c[d]=arguments[d];return JR(r.registered,n,qW(c))};return{css:n,cx:a,injectGlobal:o,keyframes:i,hydrate:function(l){l.forEach(function(c){r.inserted[c]=!0})},flush:function(){r.registered={},r.inserted={},r.sheet.flush()},sheet:r.sheet,cache:r,getRegisteredStyles:FO.bind(null,r.registered),merge:JR.bind(null,r.registered,n)}},qW=function e(t){for(var r="",n=0;n<t.length;n++){var i=t[n];if(i!=null){var o=void 0;switch(typeof i){case"boolean":break;case"object":{if(Array.isArray(i))o=e(i);else{o="";for(var a in i)i[a]&&a&&(o&&(o+=" "),o+=a)}break}default:o=i}o&&(r&&(r+=" "),r+=o)}}return r},Vv=jW({key:"css"}),VW=Vv.cx,Gv=Vv.injectGlobal,IO=Vv.keyframes,GW=Vv.css;function KW(e,t){Gv(t)}function HW(e,t){Gv(Oe([[e,t]]))}function WW(e,t,r){Gv(Oe([[t,r]]))}function JW(e){return IO(e)}function QW(e,t){return IO(t)}let Kv=oH({injectRaw:e=>{Gv(e)},renderRaw:KW,injectRules:HW,renderRules:WW,make:e=>GW(e),mergeStyles:e=>VW(e),makeKeyframes:JW,renderKeyframes:QW}),u=qH,X=sH,PO=lH,Dp=fH,Ce=hH,z=pH,_e=mH,ai=gH,rn=vH,yi=bH,OO=_H,Ze=yH,zs=xH,YW=SH,XW=wH,_n=EH,ZW=kH,Fp=CH,MO=RH,Uo=AH,Ip=TH,eJ=$H,tJ=NH,rJ=DH,$w=FH,ks=IH,Us=PH,nJ=OH,iJ=MH,oJ=LH,$t=zH,Bs=UH,Ya=BH,Bo=jH,LO=VH,ma=GH,aJ=KH,lr=WH,Va=HH,Nw=JH,js=QH,zO=YH,Ue=XH,UO=ZH,sJ=eW,ke=tW,lJ=nW,uJ=iW,cJ=uH,dJ=cH,fJ=dH,hJ=nH,pJ=Kv.global,E=Kv.style,yr=Kv.merge,mJ=Kv.keyframes;function ko(e){return"var("+e+")"}let gJ=E([z("flex"),_e("column"),X("center"),Ze("center"),u("gap",ko(O.md)),ai(1),u("min-height","200px"),Ya("center"),u("padding",ko(O.xxl))]),vJ=E([u("font-size","40px"),u("color",ko(x.textDisabled)),u("line-height","1")]),bJ=E([u("color",ko(x.textPrimary)),u("font-size",ko(T.sizeLg)),u("font-weight",ko(T.weightMedium)),_n(ke(0))]),_J=E([u("color",ko(x.textSecondary)),u("font-size",ko(T.sizeMd)),u("max-width","360px"),_n(ke(0))]),yJ=E([u("background",ko(x.brand)),u("color",ko(x.textOnBrand)),u("border","none"),u("border-radius",ko(Y.md)),u("padding","var("+O.sm+") var("+O.lg+")"),u("font-size",ko(T.sizeMd)),u("cursor","pointer"),Uo(ke(8))]);function xJ(e){let t=e.title,r=t!==void 0?t:"Nothing here yet";return L("div",{children:[_("div",{children:"( )",className:vJ}),_("h3",{children:r,className:bJ}),ne(e.description,null,n=>_("p",{children:n,className:_J})),ne(e.action,null,n=>{let i=n[1];return _("button",{children:n[0],className:yJ,onClick:o=>i()})})],className:gJ})}let Kd=xJ;function Fi(e){return"var("+e+")"}let SJ=E([ma({NAME:"percent",VAL:100}),u("border-collapse","collapse"),u("font-size",Fi(T.sizeMd))]),wJ=E([u("background",Fi(x.surfaceSubtle)),u("border-bottom","2px solid var("+x.border+")")]),QR=E([u("padding","var("+O.xs+") var("+O.sm+")"),u("color",Fi(x.textSecondary)),u("font-weight",Fi(T.weightMedium)),u("font-size",Fi(T.sizeSm)),u("text-align","left"),u("white-space","nowrap"),u("user-select","none")]),EJ=E([u("padding","var("+O.sm+") var("+O.md+")"),u("font-size",Fi(T.sizeMd))]),kJ=E([Ce("pointer"),Ue([u("color",Fi(x.textPrimary))])]),CJ=E([u("color",Fi(x.textPrimary))]),RJ=E([Fp(ke(4)),u("font-size",Fi(T.sizeXs)),u("color",Fi(x.brand))]),YR=E([u("border-bottom","1px solid var("+x.borderSubtle+")"),Ue([u("background",Fi(x.surfaceSubtle))])]),AJ=E([u("min-height","44px")]),TJ=E([Ce("pointer")]),$J=E([u("background",Fi(x.surfaceSubtle)),u("box-shadow","inset 3px 0 0 0 var("+x.brand+")")]),XR=E([u("padding","var("+O.xs+") var("+O.sm+")"),u("color",Fi(x.textPrimary)),u("vertical-align","middle")]),NJ=E([u("padding","var("+O.sm+") var("+O.md+")")]),DJ=E([Ya("center"),u("padding",Fi(O.xxl))]);function FJ(e){let t=e.onSort,r=e.sortState,n=e.density==="Comfortable"?QR+" "+EJ:QR;return _("thead",{children:_("tr",{children:e.columns.map(i=>{let o=ne(r,!1,l=>l.key===i.key),a=ne(r,"Asc",l=>l.direction),s=i.sortable?n+" "+kJ+(o?" "+CJ:""):n;return L("th",{children:[i.label,o?_("span",{children:a==="Asc"?"^":"v",className:RJ}):null],className:s,style:ne(i.width,{},l=>({width:l})),onClick:l=>{if(i.sortable)return ee(t,c=>{let d=o&&a==="Asc"?"Desc":"Asc";c(i.key,d)})}},i.key)})}),className:wJ})}function IJ(e){let t=e.activeKey,r=e.density,n=e.onRowClick,i=e.keyFn,o=e.data,a=e.columns,s=r!==void 0?r:"Compact",l=s==="Comfortable"?XR+" "+NJ:XR,c=s==="Comfortable"?YR+" "+AJ:YR;return L("table",{children:[_(FJ,{columns:a,sortState:e.sortState,onSort:e.onSort,density:s}),_("tbody",{children:o.length===0?_("tr",{children:_("td",{children:D(e.emptyView,_(Kd,{title:"No data"})),className:l+" "+DJ,colSpan:a.length})}):o.map(d=>{let f=i(d),h=ne(n,c,m=>c+" "+TJ),p=Re(t,f)?h+" "+$J:h;return _("tr",{children:a.map(m=>_("td",{children:m.render(d),className:l},m.key)),className:p,onClick:m=>ee(n,g=>g(d))},f)})})],className:SJ})}let Oh=IJ;function Mh(e){return e?{TAG:"Partial",_0:"FromStart"}:"Complete"}function PJ(e,t){return e?t?{TAG:"Partial",_0:"Between"}:{TAG:"Partial",_0:"ToEnd"}:t?{TAG:"Partial",_0:"FromStart"}:"Complete"}function OJ(e){let t=Q(e,i=>{if(typeof i=="object")return i._0});if(t.length===0)return e.length===0||e.some(i=>i===void 0)?void 0:"Complete";let r=t.some(i=>i!=="FromStart"),n=t.some(i=>i!=="ToEnd");return{TAG:"Partial",_0:r?n?"Between":"ToEnd":"FromStart"}}function ZR(e,t){return e.toString()+" "+t+(e===1?"":"s")}function BO(e,t,r,n){let i=n!==void 0?n:"item",o=D(r,t),a=o===t?ZR(o,i):o.toString()+" of "+ZR(t,i);if(e===void 0)return"Showing the "+a+" loaded";if(typeof e!="object")return"Showing all "+a;switch(e._0){case"FromStart":return"Showing the first "+a+" — more available";case"Between":return"Showing "+a+" — more before and after";case"ToEnd":return"Showing the last "+a+" — more before"}}function jO(e,t){return t?e+"+":e}function MJ(e){return typeof e=="object"}function qO(e){switch(e){case"Small":return 20;case"Medium":return 28;case"Large":return 44}}let VO=["#7c9c5e","#b0743c","#7466a3","#4d8a8a","#a35f74","#5e7c9c"];function LJ(e){let t={contents:5381};return e.split("").forEach(r=>{let n=D(r.codePointAt(0),0);t.contents=(t.contents*33|0)+n&2147483647}),Fo(t.contents,VO.length)}function zJ(e){let t=Q(e.split(/[\s_.@-]+/),o=>o).filter(o=>o!==""),r=o=>o.slice(0,1).toUpperCase(),n=t[0],i=t[1];return n!==void 0?i!==void 0?r(n)+r(i):r(n):"?"}function I_(e){return"var("+e+")"}let UJ=E([z("inlineFlex"),X("center"),Ze("center"),u("border-radius",I_(Y.full)),u("color","#ffffff"),u("font-family",I_(T.fontFamily)),u("font-weight",I_(T.weightMedium)),u("flex-shrink","0"),u("user-select","none"),u("vertical-align","middle"),u("overflow","hidden")]),BJ=E([u("width","100%"),u("height","100%"),u("object-fit","cover")]);function jJ(e){let t=e.size,r=e.src,n=e.name,i=t!==void 0?t:"Medium",o=ce(()=>!1),a=o[1],s=qO(i),l=s.toString()+"px",c=r!==void 0?r!==""&&!o[0]:!1,d={background:c?"transparent":VO[LJ(n)],fontSize:((s/2|0)-1|0).toString()+"px",height:l,width:l};return _("span",{children:c?_("img",{className:BJ,alt:n,src:D(r,""),onError:f=>a(h=>!0)}):zJ(n),"aria-label":n,className:UJ,role:"img",style:d,title:n})}let Hd=jJ;function hl(e){return"var("+e+")"}let qJ=E([z("flex"),yi("wrap"),u("gap",hl(O.xs)),X("center")]),VJ=E([z("inlineFlex"),X("center"),u("padding","2px 8px"),u("border-radius",hl(Y.full)),u("background",hl(x.surfaceElevated)),u("color",hl(x.textSecondary)),u("font-size",hl(T.sizeXs)),u("font-weight",hl(T.weightMedium)),u("line-height","1.5"),u("white-space","nowrap")]),GJ=E([u("color",hl(x.textDisabled)),u("font-size",hl(T.sizeSm))]);function KJ(e){let t=e.items;return t.length===0?_("span",{children:"—",className:GJ}):_("div",{children:t.map((r,n)=>_("span",{children:r,className:VJ},n.toString()+":"+r)),className:qJ})}let GO=KJ;function mu(e){return"var("+e+")"}let eA=E([z("inlineFlex"),X("center"),u("gap","4px"),u("background","transparent"),u("border","1px solid var("+x.borderSubtle+")"),u("border-radius",mu(Y.sm)),u("padding","1px 6px"),u("color",mu(x.textSecondary)),u("font-size",mu(T.sizeXs)),u("line-height","1"),Ce("pointer"),Ue([u("background",mu(x.surfaceElevated)),u("color",mu(x.textPrimary))])]),HJ=E([u("color",mu(x.success)),u("border-color",mu(x.success))]);function WJ(e){let t=e.label,r=e.value,n=t!==void 0?t:"Copy",i=ce(()=>!1),o=i[1],a=i[0],s=c=>{c.stopPropagation(),c.preventDefault(),Lt(navigator.clipboard.writeText(r).then(()=>(o(d=>!0),setTimeout(()=>o(d=>!1),1500),Promise.resolve())),d=>Promise.resolve())},l=a?eA+" "+HJ:eA;return _("button",{children:a?"Copied":n,"aria-label":"Copy to clipboard",className:l,type:"button",onClick:s})}let JJ=WJ;function S0(e){return"var("+e+")"}let QJ=E([z("inlineFlex"),X("center"),u("gap",S0(O.xs)),u("min-width","0")]),YJ=E([u("color",S0(x.brand)),u("text-decoration","none"),u("max-width","260px"),u("overflow","hidden"),u("text-overflow","ellipsis"),u("white-space","nowrap"),Ue([u("text-decoration","underline")])]),XJ=E([u("color",S0(x.textPrimary)),u("font-family","var(--rv-font-mono, ui-monospace, monospace)"),u("font-size",S0(T.sizeSm)),u("max-width","200px"),u("overflow","hidden"),u("text-overflow","ellipsis"),u("white-space","nowrap")]);function ZJ(e,t){return e.length>t?e.slice(0,6)+"…"+e.slice(e.length-4|0,e.length):e}function eQ(e){let t=e.copyable,r=e.rawValue,n=e.label,i=e.href,o=t!==void 0?t:!1,a=Ls();return L("span",{children:[i!==void 0?_("a",{children:n,className:YJ,title:n,href:i,onClick:l=>{if(!(l.metaKey||l.ctrlKey||l.shiftKey||l.altKey||l.button!==0)&&i!==void 0)return l.preventDefault(),l.stopPropagation(),a(i)}}):_("span",{children:ZJ(n,18),className:XJ,title:r}),o?_(JJ,{value:r}):null],className:QJ})}let tQ=eQ;function bs(e){return"var("+e+")"}let tA=E([z("inlineFlex"),X("center"),u("gap","4px"),u("padding","2px 8px"),u("border-radius",bs(Y.full)),u("background",bs(x.surfaceElevated)),u("color",bs(x.textSecondary)),u("font-size",bs(T.sizeXs)),u("font-weight",bs(T.weightMedium)),u("line-height","1.5"),u("white-space","nowrap"),u("border","none")]),rQ=E([Ce("pointer"),Ue([u("background",bs(x.surface)),u("color",bs(x.textPrimary))])]),nQ=E([u("font-weight",bs(T.weightBold)),u("color",bs(x.textPrimary))]);function iQ(e){let t=e.onClick,r=ne(t,tA,i=>tA+" "+rQ),n=L(Bt,{children:[_("span",{children:e.count.toString(),className:nQ})," "+e.label,ne(t,null,i=>_("span",{children:" ▸","aria-hidden":!0}))]});return t!==void 0?_("button",{children:n,className:r,type:"button",onClick:i=>t()}):_("span",{children:n,className:r})}let hh=iQ;function Df(e){let t=e.toString();return t.length<2?"0"+t:t}function Hv(e){let t=new Date(e),r=t.getTime();if(Number.isNaN(r))return e;let n=t.getFullYear()|0,i=(t.getMonth()|0)+1|0,o=t.getDate()|0,a=t.getHours()|0,s=t.getMinutes()|0,l=t.getSeconds()|0;return n.toString()+"-"+Df(i)+"-"+Df(o)+" "+Df(a)+":"+Df(s)+":"+Df(l)}let oQ=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:?\d{2})?$/;function Lh(e){if(oQ.test(e))return Hv(e)}function aQ(e){let t=e.toLowerCase(),r=t.length;return r>2&&t.endsWith("id")&&t!=="id"?!0:r>3?t.endsWith("ids"):!1}function KO(e,t){if(!ne(e,!1,aQ))return Lh(t)}function P_(e){return"var("+e+")"}function sQ(e){if(typeof e=="object")return[e.bg,e.fg];switch(e){case"Success":return[x.success,x.background];case"Warning":return[x.warning,x.background];case"Error":return[x.error,x.background];case"Info":return[x.info,x.background];case"Neutral":return[x.surfaceElevated,x.textSecondary]}}function lQ(e,t){return E([z("inlineFlex"),X("center"),u("gap","4px"),u("padding","2px 8px"),u("border-radius",P_(Y.full)),u("font-size",P_(T.sizeXs)),u("font-weight",P_(T.weightMedium)),u("line-height","1.5"),u("white-space","nowrap"),u("background",e.startsWith("--rv-")?"var("+e+")":e),u("color",t.startsWith("--rv-")?"var("+t+")":t)])}function uQ(e){let t=e.dot,r=e.variant,n=r!==void 0?r:"Neutral",i=t!==void 0?t:!1,o=sQ(n);return L("span",{children:[i?_("span",{style:{background:"currentColor",display:"inline-block",height:"6px",width:"6px",borderRadius:"50%",flexShrink:"0"}}):null,e.label],className:lQ(o[0],o[1])})}let ia=uQ;function cQ(e){return q(e.plugin,t=>t+"."+e.store)}let HO={isId:!1,isCompositeId:!1,isSubId:!1,isCompositeSubId:!1,index:void 0,hidden:!1,summary:!1,groupBy:!1,drillTarget:void 0,collapsed:!1,scan:!1,scanSort:!1,semantic:void 0,semanticFromType:!1,storeTarget:void 0,channel:void 0,setter:void 0,retired:void 0};function $i(e,t){let r=q(F(e,t),Xe);return r==="JSONTrue"&&typeof r!="object"}function Ff(e,t){return k(F(e,t),oe)}function dQ(e){return k(k(F(e,"x-reventless-semantic-target"),G),t=>q(k(F(t,"store"),oe),r=>({plugin:k(F(t,"plugin"),oe),store:r})))}function fQ(e){return k(k(F(e,"x-reventless-setter"),G),t=>q(k(F(t,"command"),oe),r=>({command:r,field:k(F(t,"field"),oe)})))}function hQ(e){return q(k(F(e,"x-reventless-retired"),G),t=>{let r=k(F(t,"values"),Ct);return{label:mi(k(F(t,"label"),oe),n=>n.trim()!==""),showWhenFalse:$i(t,"showWhenFalse"),values:r!==void 0?Q(r,n=>mi(oe(n),i=>i.trim()!=="")):q(mi(k(F(t,"value"),oe),n=>n.trim()!==""),n=>[n]),namedWhenRetired:$i(t,"namedWhenRetired")}})}function pQ(e){let t=q(F(e,"x-reventless-index"),Xe);if(t!==void 0)return typeof t!="object"?t==="JSONTrue"?"":void 0:t.TAG==="JSONString"?t._0:void 0}function WO(e){let t=G(e);if(t===void 0)return;let r=G(vn(e));if(r===void 0||r===t)return t;let n=Oe($e(r));return $e(t).forEach(i=>{n[i[0]]=i[1]}),n}function Io(e){let t=WO(e);return t!==void 0?{isId:$i(t,"x-reventless-id"),isCompositeId:$i(t,"x-reventless-compositeId"),isSubId:$i(t,"x-reventless-subId"),isCompositeSubId:$i(t,"x-reventless-compositeSubId"),index:pQ(t),hidden:$i(t,"x-reventless-hidden")||$i(t,"x-reventless-ui-hidden"),summary:$i(t,"x-reventless-summary"),groupBy:$i(t,"x-reventless-group-by"),drillTarget:q(Ff(t,"x-reventless-drillTarget"),r=>({slice:r,keyPath:Ff(t,"x-reventless-drillTargetKey")})),collapsed:$i(t,"x-reventless-collapsed"),scan:$i(t,"x-reventless-scan"),scanSort:$i(t,"x-reventless-scanSort"),semantic:Ff(t,"x-reventless-semantic"),semanticFromType:Re(Ff(t,"x-reventless-semantic-source"),"type"),storeTarget:dQ(t),channel:Ff(t,"x-reventless-channel"),setter:fQ(t),retired:hQ(t)}:HO}function mQ(e){return ne(WO(e),!1,t=>$i(t,"x-reventless-hidden"))}function Pp(e,t){return D(q(k(k(G(e),r=>F(r,"properties")),G),r=>Q($e(r),n=>{if(t(Io(n[1])))return n[0]})),[])}function gQ(e){return D(q(k(k(G(e),t=>F(t,"properties")),G),t=>Q($e(t),r=>{let n=r[0];return k(k(k(G(r[1]),i=>F(i,"x-reventless-metric")),G),i=>{let o=k(F(i,"aggregate"),oe),a=k(F(i,"label"),oe);return q(o,s=>[n,s,a])})})),[])}function Wv(e){return Pp(e,t=>t.summary)}function JO(e){return Pp(e,t=>t.isId)[0]}function vQ(e){return Pp(e,t=>t.groupBy)[0]}function Op(e){return k(k(k(G(e),t=>F(t,"properties")),G),t=>Q($e(t),r=>{let n=r[0];return q(Io(r[1]).retired,i=>[n,i])})[0])}function bQ(e){return q(Op(e),t=>t[0])}function QO(e){return Pp(e,t=>t.isCompositeId)}function Dw(e){return Pp(e,t=>t.isSubId?!0:t.isCompositeSubId)[0]}function _Q(e){return k(k(G(e),t=>F(t,"x-reventless-live")),t=>{let r=Xe(t);if(typeof r!="object")switch(r){case"JSONFalse":return!1;case"JSONTrue":return!0;default:return}})}function yQ(e){return D(_Q(e),!0)}function Fw(e){return k(k(G(e),t=>F(t,"x-reventless-viewmode")),oe)}function xQ(e){return k(k(G(e),t=>F(t,"x-reventless-layout")),oe)}function SQ(e){let t=G(e),r=n=>D(k(k(k(k(k(k(t,i=>F(i,"properties")),G),i=>F(i,n)),G),i=>F(i,"title")),oe),pt(n));return k(k(k(t,n=>F(n,"x-reventless-owner-unscoped")),G),n=>q(k(F(n,"field"),oe),i=>({ownerLabel:r(i),matchedGroups:ne(k(F(n,"as"),Ct),[],o=>Q(o,oe))})))}function nc(e){return k(q(k(k(G(vn(e)),t=>F(t,"enum")),Ct),t=>Q(t,oe)),t=>{if(t.length!==0)return t})}function co(e,t){return D(k(k(k(k(G(e),r=>F(r,"properties")),G),r=>F(r,t)),nc),[])}function Iw(e,t){return q(Op(e),r=>{let n=r[1],i=r[0];return{field:i,label:D(Wn(mi(t,o=>o.trim()!==""),n.label),pt(i)),showWhenFalse:n.showWhenFalse,values:n.values,namedWhenRetired:n.namedWhenRetired}})}function wQ(e,t){return k(t,r=>{let n=e.values,i=Xe(r);if(n!==void 0)return typeof i!="object"||i.TAG!=="JSONString"?void 0:n.includes(i._0);if(typeof i!="object")switch(i){case"JSONFalse":return!1;case"JSONTrue":return!0;default:return}})}function zh(e,t){let r=e.values,n=wQ(e,t);return r!==void 0?n!==void 0&&n?q(k(t,oe),i=>_(ia,{variant:"Warning",label:i,dot:!1})):void 0:n!==void 0?n?_(ia,{variant:"Warning",label:e.label,dot:!1}):e.showWhenFalse?_(ia,{variant:"Neutral",label:"Not "+e.label,dot:!1}):void 0:void 0}let YO="archived",Pw="1";function EQ(e){return e.values!==void 0?"Show retired":"Show "+e.label.toLowerCase()}function kQ(e,t){return e?Ee(t):!1}function CQ(e,t){return e?Re(t,Pw):!1}function RQ(e){return[[YO,e?"":Pw],["after",""],["before",""]]}let Tc={param:YO,on:Pw,label:EQ,offered:kQ,showing:CQ,toggleParams:RQ};function AQ(e,t){return e>t?e-t|0:0}function Bc(e){return"var("+e+")"}let TQ=E([z("inlineFlex"),X("center"),u("vertical-align","middle")]),rA=E([z("inlineFlex"),u("border-radius",Bc(Y.full)),u("box-shadow","0 0 0 2px var("+x.surface+")")]),$Q=E([z("inlineFlex"),X("center"),Ze("center"),u("border-radius",Bc(Y.full)),u("background",Bc(x.surfaceElevated)),u("color",Bc(x.textSecondary)),u("font-family",Bc(T.fontFamily)),u("font-weight",Bc(T.weightMedium)),u("flex-shrink","0"),u("user-select","none")]);function NQ(e){let t=e.max,r=e.size,n=e.members,i=r!==void 0?r:"Medium",o=t!==void 0?t:4,a=AQ(n.length,o),s=a>0?n.slice(0,o):n,l=a>0?n.slice(o):[],c=qO(i),d=(-c|0)/3|0,f=h=>({marginLeft:h===0?"0":d.toString()+"px",zIndex:((s.length+1|0)-h|0).toString()});return L("span",{children:[s.map((h,p)=>_("span",{children:_(Hd,{name:h.name,src:h.imageUrl,size:i}),className:rA,style:f(p)},p.toString())),a>0?_("span",{children:"+"+a.toString(),className:rA+" "+$Q,style:{fontSize:((c/2|0)-2|0).toString()+"px",height:c.toString()+"px",marginLeft:d.toString()+"px",width:c.toString()+"px",zIndex:(s.length+2|0).toString()},title:l.map(h=>h.name).join(", ")}):null],className:TQ})}let XO=NQ,ZO=Zt(void 0),DQ=ZO.Provider;function FQ(e){return ur(DQ,{value:e.fill,children:e.children})}let eM={make:FQ};function IQ(e){return k(St(ZO),t=>t(e))}function Ds(e){let t=parseFloat(e);if(!Number.isNaN(t))return t}function Wd(e){switch(e){case"Email":return"email";case"Phone":return"phone";case"Url":return"url";case"DateTime":return"date-time";case"Currency":return"currency";case"Percent":return"percent";case"Bytes":return"bytes";case"Duration":return"duration";case"Color":return"color";case"Image":return"image";case"Status":return"status";case"GeoLat":return"geo-lat";case"GeoLng":return"geo-lng";case"GeoPoint":return"geo-point";case"Label":return"label";case"UserRef":return"user-ref";case"File":return"file";case"Markdown":return"markdown";case"ChannelText":return"channel-text";case"Rating":return"rating";case"Progress":return"progress";case"FileUrl":return"file-url";case"Country":return"country";case"Address":return"address";case"Qr":return"qr";case"Barcode":return"barcode";case"Signature":return"signature";case"ParentRef":return"parent-ref";case"Money":return"money";case"DateRange":return"date-range";case"Geolocation":return"geolocation"}}let PQ=["Email","Phone","Url","DateTime","Currency","Percent","Bytes","Duration","Color","Image","Status","GeoLat","GeoLng","GeoPoint","Label","UserRef","File","Markdown","ChannelText","Rating","Progress","FileUrl","Country","Address","Qr","Barcode","Signature","ParentRef","Money","DateRange","Geolocation"],tM="storageRef",OQ="uploadableImage",MQ="uploadableFile";function LQ(e){return e===tM||e===OQ?!0:e===MQ}function Ow(e){switch(e){case"address":return"Address";case"barcode":return"Barcode";case"bytes":return"Bytes";case"channel-text":return"ChannelText";case"color":return"Color";case"country":return"Country";case"currency":return"Currency";case"date-time":return"DateTime";case"date-range":case"dateRange":return"DateRange";case"duration":return"Duration";case"email":return"Email";case"file-url":return"FileUrl";case"geo-lat":return"GeoLat";case"geo-lng":return"GeoLng";case"geo-point":case"geoPoint":return"GeoPoint";case"geolocation":return"Geolocation";case"label":return"Label";case"markdown":return"Markdown";case"money":return"Money";case"parent-ref":return"ParentRef";case"percent":return"Percent";case"phone":return"Phone";case"progress":return"Progress";case"qr":return"Qr";case"rating":return"Rating";case"signature":return"Signature";case"status":return"Status";case"file":case"fileRef":case"uploadableFile":return"File";case"image":case"imageRef":case"uploadableImage":return"Image";case"url":return"Url";case"user-ref":return"UserRef";default:return}}function rM(e){switch(e){case"Image":return["Illustrable"];case"Status":return["Stageable"];case"ParentRef":return["Hierarchical"];case"Money":return["Measure"];case"DateRange":return["Schedulable"];case"GeoPoint":case"Geolocation":return["Mappable"];default:return[]}}function w0(e,t){return k(k(F(e,t),oe),r=>{if(r!=="")return r})}function nM(e,t,r){return k(k(k(k(F(e,t),G),n=>F(n,r)),oe),n=>{if(n!=="")return n})}function ic(e,t){return e.TAG==="Pair"?w0(t,e.startField):nM(t,e._0,"start")}function Mw(e,t){if(e.TAG!=="Pair")return nM(t,e._0,"end");let r=e.endField;if(r!==void 0)return w0(t,r)}function iM(e){return e.TAG==="Pair"?e.endField!==void 0:!0}function nA(e,t){let r=F(e,t);if(r===void 0)return;let n=Li(r);return n!==void 0?n:k(oe(r),Ds)}function E0(e,t,r){return k(k(k(F(e,t),G),n=>F(n,r)),Li)}function Jv(e){return k(G(e),t=>{let r=k(k(Wn(F(t,"__typename"),F(t,"TAG")),oe),n=>{if(n!=="")return n});return q(r,n=>[n,Oe($e(t).filter(i=>{let o=i[0];return o!=="__typename"?o!=="TAG":!1}))])})}function Lw(e){return k(Jv(e),t=>{let r=t[1],n=t[0];if(!n.endsWith("Located"))return n.endsWith("Pending")?{TAG:"Pending",requestedFor:w0(r,"requestedFor")}:n.endsWith("Unresolvable")?{TAG:"Unresolvable",reason:w0(r,"reason")}:void 0;let i=E0(r,"point","lat"),o=E0(r,"point","lng");return{TAG:"Located",point:i!==void 0&&o!==void 0?[i,o]:void 0}})}function zQ(e,t){return k(F(e,t),Lw)}function zw(e){switch(e.TAG){case"Located":let t=e.point;return t!==void 0?t:void 0;case"Pending":case"Unresolvable":return}}function UQ(e){switch(e.TAG){case"Pending":let t=e.requestedFor;return t!==void 0?t:void 0;case"Located":case"Unresolvable":return}}function oM(e){switch(e.TAG){case"Pending":case"Located":return;case"Unresolvable":let t=e.reason;return t!==void 0?t:void 0}}function xHe(e,t){switch(e.TAG){case"Paired":let r=nA(t,e.latField),n=nA(t,e.lngField);return r!==void 0&&n!==void 0?[r,n]:void 0;case"Pointed":let i=e._0,o=E0(t,i,"lat"),a=E0(t,i,"lng");return o!==void 0&&a!==void 0?[o,a]:void 0;case"Geolocated":return k(zQ(t,e._0),zw)}}function Nr(e){return D(q(k(k(G(vn(e)),t=>F(t,"properties")),G),$e),[]).map(t=>[t[0],vn(t[1])])}function Br(e,t){return k(k(G(vn(e)),r=>F(r,t)),oe)}function BQ(e){return Br(e,"type")}function Fs(e){let t=Br(e,"type");if(t===void 0)return!1;switch(t){case"integer":case"number":return!0;default:return!1}}function Mp(e){return Re(Br(e,"type"),"string")}function Qv(e){let t=Br(e,"format");if(t===void 0)return!1;switch(t){case"date":case"date-time":return!0;default:return!1}}let aM=["user","username","owner","assignee","assignedto","author","creator","createdby","updatedby","reporter","approver","reviewer","actor","member"];function sM(e){return aM.includes(e.toLowerCase())}function k0(e,t){return t.some(r=>e.endsWith(r))}function jQ(e){return k0(e,["fileurl","documenturl","downloadurl","attachmenturl","pdfurl"])}function qQ(e){let t=Br(e,"format");if(t!==void 0)switch(t){case"date":case"date-time":return["DateTime","format:date-time"];case"email":return["Email","format:email"];case"uri":case"url":return["Url","format:uri"];default:return}}function iA(e){return ne(nc(e),0,t=>t.length)}function Uh(e,t){return k(k(G(vn(e)),r=>F(r,t)),Li)}function VQ(e,t){if(!Fs(t))return;let r=Uh(t,"maximum");return["rating","stars","starrating"].includes(e)?r!==void 0&&r>10?void 0:["Rating","name:rating"]:e==="score"&&r!==void 0&&r<=10?["Rating","name:score-scale"]:void 0}let GQ=[["street","streetaddress","line1","addressline1","address1","housenumber"],["city","town","locality"],["postalcode","zip","zipcode","postcode"],["state","region","province","county"],["country","countrycode"]];function KQ(e){let t=Nr(e),r=(n,i)=>t.some(o=>o[0].toLowerCase()===n?i(o[1]):!1);return r("amount",Fs)?r("currency",Mp):!1}function HQ(e){let t=Nr(e),r=n=>t.some(i=>{let o=i[1];return i[0].toLowerCase()===n&&Re(Br(o,"type"),"string")?Qv(o):!1});return r("start")?r("end"):!1}function WQ(e){let t=Nr(e);return GQ.filter(r=>t.some(n=>r.includes(n[0].toLowerCase()))).length>=2}let JQ=["parent","parentid","manager","managerid","reportsto","reportstoid","supervisor","supervisorid"];function QQ(e){return JQ.includes(e)?!0:e.startsWith("parent")?e.endsWith("id"):!1}function YQ(e,t){let r=e.toLowerCase(),n=VQ(r,t);return n!==void 0?n:["status","state","stage"].includes(r)&&iA(t)>0?iA(t)<=8?["Status","name:status-enum"]:void 0:Re(Br(t,"type"),"string")&&["imageurl","image","photo","photourl","avatar","avatarurl","thumbnail"].includes(r)?["Image","name:image"]:Fs(t)&&k0(r,["price","amount","total"])?["Currency","name:currency"]:Re(Br(t,"type"),"string")&&["email"].includes(r)?["Email","name:email"]:Re(Br(t,"type"),"string")&&["phone","phonenumber"].includes(r)?["Phone","name:phone"]:Re(Br(t,"type"),"string")&&["website","url","homepage"].includes(r)?["Url","name:url"]:Re(Br(t,"type"),"string")&&(["file","attachment","upload"].includes(r)||k0(r,["storageref","fileref","attachmentref"]))?["File","name:file"]:Fs(t)&&["progress","percentcomplete","percentdone","completion"].includes(r)?["Progress","name:progress"]:Re(Br(t,"type"),"string")&&["country","countrycode","countryname"].includes(r)?["Country","name:country"]:Re(Br(t,"type"),"string")&&["address","streetaddress","billingaddress","shippingaddress"].includes(r)?["Address","name:address"]:Re(Br(t,"type"),"string")&&QQ(r)?["ParentRef","name:parent-ref"]:Re(Br(t,"type"),"string")&&["name","title","label","displayname"].includes(r)?["Label","name:label"]:Re(Br(t,"type"),"string")&&aM.includes(r)?["UserRef","name:user"]:void 0}function Uw(e){return["lat","latitude"].includes(e)}function Bw(e){return["lng","lon","long","longitude"].includes(e)}function XQ(e){let t=Nr(e),r=t.some(i=>Uw(i[0].toLowerCase())?Fs(i[1]):!1),n=t.some(i=>Bw(i[0].toLowerCase())?Fs(i[1]):!1);return r?n:!1}function ZQ(e){return["createdat","updatedat","deletedat"].includes(e)}let oA={contents:[]};function lM(e,t,r){let n=e+"."+t+"."+r;if(oA.contents.some(o=>o===n))return;oA.contents.push(n);let i=PQ.map(Wd).join(", ");console.error('[AutoUI] Unknown semantic "'+r+'" ('+e+') on field "'+t+'" — ignored. Valid ids: '+i+".")}function kd(e,t){let r=vn(t),n=Io(r),i=n.semanticFromType?"Type":"Annotation",o=ne(n.semantic,!1,LQ),a=k(n.semantic,d=>{if(d===tM)return;let f=Ow(d);if(f!==void 0)return{semantic:f,provenance:i};lM("x-reventless-semantic",e,d)});if(a!==void 0)return a;let s=e.toLowerCase(),l=Re(Br(r,"type"),"object")&&KQ(r)?["Money","shape:money"]:Re(Br(r,"type"),"object")&&HQ(r)?["DateRange","shape:date-range"]:Re(Br(r,"type"),"object")&&WQ(r)?["Address","shape:address"]:Re(Br(r,"type"),"object")&&XQ(r)?["GeoPoint","shape:geo-point"]:Uw(s)&&Fs(r)?["GeoLat","name:geo-pair"]:Bw(s)&&Fs(r)?["GeoLng","name:geo-pair"]:void 0,c;if(l!==void 0)c=l;else if(Re(Br(r,"type"),"string")&&jQ(s))c=["FileUrl","name:file-url"];else{let d=qQ(r);c=d!==void 0?d:YQ(e,r)}return Wn(q(c,d=>({semantic:d[0],provenance:{TAG:"Heuristic",_0:d[1]}})),o?{semantic:"File",provenance:i}:void 0)}function uM(e,t){let r=kd(e,t);return r!==void 0?r:k(xO(t),n=>kd(gG(e),n))}function bn(e,t,r){let n=Nr(e),i={};n.forEach(R=>{let N=R[0],I=k(k(t,M=>F(M,N)),M=>{let P=Ow(M);if(P!==void 0)return{semantic:P,provenance:"Hint"};lM("uiHints.fields",N,M)});if(I!==void 0){i[N]=I;return}else return ee(kd(N,R[1]),M=>{i[N]=M})});let o=R=>n.map(N=>N[0]).find(N=>ne(F(i,N),!1,I=>I.semantic===R)),a=R=>n.map(N=>N[0]).find(N=>ne(F(i,N),!1,I=>rM(I.semantic).includes(R))),s=k(mi(r,R=>R.field!=="id"),R=>q(n.find(N=>N[0]===R.field?Re(Br(N[1],"type"),"string"):!1),N=>N[0])),l=ne(r,!1,R=>Re(R.source,"annotation")),c=l?s:void 0,d=n.map(R=>R[0]).find(R=>ne(F(i,R),!1,N=>N.semantic==="Label"?N.provenance==="Hint":!1)),f;if(d!==void 0)f=d;else{let R=0;if(s!==void 0&&l?f=s:R=1,R===1){let N=o("Label");f=N!==void 0?N:s}}if(f!==void 0&&s!==void 0&&f===s){let N={semantic:"Label",provenance:l?"Annotation":{TAG:"Heuristic",_0:"declared:labelField"}},I=F(i,f);if(I!==void 0){let M=0,P=I.provenance;(typeof P=="object"||P!=="Hint")&&(M=1),M===1&&I.semantic==="Label"&&(i[f]=N)}else i[f]=N}let h=a("Mappable"),p=o("GeoLat"),m=o("GeoLng"),g=p!==void 0&&m!==void 0?{TAG:"Paired",latField:p,lngField:m}:void 0,v=o("Geolocation"),b=v!==void 0?{TAG:"Geolocated",_0:v}:h!==void 0?{TAG:"Pointed",_0:h}:g,y=a("Schedulable"),S=Q(n,R=>{let N=R[0];if(ne(F(i,N),!1,I=>I.semantic==="DateTime")||Qv(R[1]))return N}),w=S.find(R=>R.toLowerCase().startsWith("start")),C=S.find(R=>R.toLowerCase().startsWith("end")),A=w!==void 0?C!==void 0?{TAG:"Pair",startField:w,endField:C}:{TAG:"Pair",startField:w}:q(S.find(R=>{let N=R.toLowerCase();return ZQ(N)?!1:k0(N,["at","date"])?!0:N==="date"}),R=>({TAG:"Pair",startField:R}));return{semantics:i,geo:b,dateSpan:y!==void 0?{TAG:"Ranged",_0:y}:A,statusField:a("Stageable"),labelField:f,projectedLabelField:c,imageField:a("Illustrable"),parentField:a("Hierarchical")}}function eY(e,t){let n=bn(e,t,void 0).semantics;return Q(Nr(e),i=>{let o=i[0];return k(F(n,o),a=>{if(rM(a.semantic).includes("Measure"))return o})})}let cM=Zt([]),dM=Zt(e=>{}),tY=cM.Provider,rY=dM.Provider;function nY(e){let t=e.initial,r=t!==void 0?t:[],n=ce(()=>r),i=n[1],o=$r(a=>i(s=>a),[]);return ur(rY,{value:o,children:ur(tY,{value:n[0],children:e.children})})}let iY={make:nY};function ga(){return St(cM)}function oY(){return St(dM)}function aY(e){return e===""?e:e.slice(0,1).toUpperCase()+e.slice(1,e.length)}function jo(e,t){let r=aY(t),n=$p(r),i=e.find(o=>o.name===n);return i!==void 0?i:e.find(o=>o.name===r)}function fM(e,t){return e.find(r=>r.name===t)}function ul(e,t){return pO(r=>_0(e,_0(encodeURIComponent(t),r)))}function jc(e,t){return _0(e,_0(encodeURIComponent(t),HV))}function Ga(e,t,r,n){let i=[r].concat(n).map(o=>encodeURIComponent(o));return vs(jc(e,t))(mO.of_parts(i.join("/")))}function sY(e){let r=mO.wildcard_match(e).split("/").filter(o=>o!=="");if(r.length===0)return[void 0,[]];let n=q(r[0],o=>decodeURIComponent(o)),i=r.slice(1).map(o=>decodeURIComponent(o));return[n,i]}var gu=(e=>(e[e.Border=-1]="Border",e[e.Data=0]="Data",e[e.Function=1]="Function",e[e.Position=2]="Position",e[e.Timing=3]="Timing",e[e.Alignment=4]="Alignment",e))(gu||{});const lY=[0,1],hM=[1,0],pM=[2,3],mM=[3,2],uY={L:lY,M:hM,Q:pM,H:mM},cY=/^\d*$/,dY=/^[A-Z0-9 $%*+./:-]*$/,O_="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",jw=1,qw=40,aA=3,fY=3,Mm=40,hY=10,gM=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],vM=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]];let pY=class{constructor(t,r,n,i){if(this.version=t,this.ecc=r,t<jw||t>qw)throw new RangeError("Version value out of range");if(i<-1||i>7)throw new RangeError("Mask value out of range");this.size=t*4+17;const o=Array.from({length:this.size}).fill(!1);for(let s=0;s<this.size;s++)this.modules.push(o.slice()),this.types.push(o.map(()=>0));this.drawFunctionPatterns();const a=this.addEccAndInterleave(n);if(this.drawCodewords(a),i===-1){let s=1e9;for(let l=0;l<8;l++){this.applyMask(l),this.drawFormatBits(l);const c=this.getPenaltyScore();c<s&&(i=l,s=c),this.applyMask(l)}}this.mask=i,this.applyMask(i),this.drawFormatBits(i)}size;mask;modules=[];types=[];getModule(t,r){return t>=0&&t<this.size&&r>=0&&r<this.size&&this.modules[r][t]}drawFunctionPatterns(){for(let n=0;n<this.size;n++)this.setFunctionModule(6,n,n%2===0,gu.Timing),this.setFunctionModule(n,6,n%2===0,gu.Timing);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const t=this.getAlignmentPatternPositions(),r=t.length;for(let n=0;n<r;n++)for(let i=0;i<r;i++)n===0&&i===0||n===0&&i===r-1||n===r-1&&i===0||this.drawAlignmentPattern(t[n],t[i]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(t){const r=this.ecc[1]<<3|t;let n=r;for(let o=0;o<10;o++)n=n<<1^(n>>>9)*1335;const i=(r<<10|n)^21522;for(let o=0;o<=5;o++)this.setFunctionModule(8,o,ss(i,o));this.setFunctionModule(8,7,ss(i,6)),this.setFunctionModule(8,8,ss(i,7)),this.setFunctionModule(7,8,ss(i,8));for(let o=9;o<15;o++)this.setFunctionModule(14-o,8,ss(i,o));for(let o=0;o<8;o++)this.setFunctionModule(this.size-1-o,8,ss(i,o));for(let o=8;o<15;o++)this.setFunctionModule(8,this.size-15+o,ss(i,o));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let t=this.version;for(let n=0;n<12;n++)t=t<<1^(t>>>11)*7973;const r=this.version<<12|t;for(let n=0;n<18;n++){const i=ss(r,n),o=this.size-11+n%3,a=Math.floor(n/3);this.setFunctionModule(o,a,i),this.setFunctionModule(a,o,i)}}drawFinderPattern(t,r){for(let n=-4;n<=4;n++)for(let i=-4;i<=4;i++){const o=Math.max(Math.abs(i),Math.abs(n)),a=t+i,s=r+n;a>=0&&a<this.size&&s>=0&&s<this.size&&this.setFunctionModule(a,s,o!==2&&o!==4,gu.Position)}}drawAlignmentPattern(t,r){for(let n=-2;n<=2;n++)for(let i=-2;i<=2;i++)this.setFunctionModule(t+i,r+n,Math.max(Math.abs(i),Math.abs(n))!==1,gu.Alignment)}setFunctionModule(t,r,n,i=gu.Function){this.modules[r][t]=n,this.types[r][t]=i}addEccAndInterleave(t){const r=this.version,n=this.ecc;if(t.length!==Kg(r,n))throw new RangeError("Invalid argument");const i=vM[n[0]][r],o=gM[n[0]][r],a=Math.floor(bx(r)/8),s=i-a%i,l=Math.floor(a/i),c=[],d=wY(o);for(let h=0,p=0;h<i;h++){const m=t.slice(p,p+l-o+(h<s?0:1));p+=m.length;const g=EY(m,d);h<s&&m.push(0),c.push(m.concat(g))}const f=[];for(let h=0;h<c[0].length;h++)c.forEach((p,m)=>{(h!==l-o||m>=s)&&f.push(p[h])});return f}drawCodewords(t){if(t.length!==Math.floor(bx(this.version)/8))throw new RangeError("Invalid argument");let r=0;for(let n=this.size-1;n>=1;n-=2){n===6&&(n=5);for(let i=0;i<this.size;i++)for(let o=0;o<2;o++){const a=n-o,l=(n+1&2)===0?this.size-1-i:i;!this.types[l][a]&&r<t.length*8&&(this.modules[l][a]=ss(t[r>>>3],7-(r&7)),r++)}}}applyMask(t){if(t<0||t>7)throw new RangeError("Mask value out of range");for(let r=0;r<this.size;r++)for(let n=0;n<this.size;n++){let i;switch(t){case 0:i=(n+r)%2===0;break;case 1:i=r%2===0;break;case 2:i=n%3===0;break;case 3:i=(n+r)%3===0;break;case 4:i=(Math.floor(n/3)+Math.floor(r/2))%2===0;break;case 5:i=n*r%2+n*r%3===0;break;case 6:i=(n*r%2+n*r%3)%2===0;break;case 7:i=((n+r)%2+n*r%3)%2===0;break;default:throw new Error("Unreachable")}!this.types[r][n]&&i&&(this.modules[r][n]=!this.modules[r][n])}}getPenaltyScore(){let t=0;for(let o=0;o<this.size;o++){let a=!1,s=0;const l=[0,0,0,0,0,0,0];for(let c=0;c<this.size;c++)this.modules[o][c]===a?(s++,s===5?t+=aA:s>5&&t++):(this.finderPenaltyAddHistory(s,l),a||(t+=this.finderPenaltyCountPatterns(l)*Mm),a=this.modules[o][c],s=1);t+=this.finderPenaltyTerminateAndCount(a,s,l)*Mm}for(let o=0;o<this.size;o++){let a=!1,s=0;const l=[0,0,0,0,0,0,0];for(let c=0;c<this.size;c++)this.modules[c][o]===a?(s++,s===5?t+=aA:s>5&&t++):(this.finderPenaltyAddHistory(s,l),a||(t+=this.finderPenaltyCountPatterns(l)*Mm),a=this.modules[c][o],s=1);t+=this.finderPenaltyTerminateAndCount(a,s,l)*Mm}for(let o=0;o<this.size-1;o++)for(let a=0;a<this.size-1;a++){const s=this.modules[o][a];s===this.modules[o][a+1]&&s===this.modules[o+1][a]&&s===this.modules[o+1][a+1]&&(t+=fY)}let r=0;for(const o of this.modules)r=o.reduce((a,s)=>a+(s?1:0),r);const n=this.size*this.size,i=Math.ceil(Math.abs(r*20-n*10)/n)-1;return t+=i*hY,t}getAlignmentPatternPositions(){if(this.version===1)return[];{const t=Math.floor(this.version/7)+2,r=this.version===32?26:Math.ceil((this.version*4+4)/(t*2-2))*2,n=[6];for(let i=this.size-7;n.length<t;i-=r)n.splice(1,0,i);return n}}finderPenaltyCountPatterns(t){const r=t[1],n=r>0&&t[2]===r&&t[3]===r*3&&t[4]===r&&t[5]===r;return(n&&t[0]>=r*4&&t[6]>=r?1:0)+(n&&t[6]>=r*4&&t[0]>=r?1:0)}finderPenaltyTerminateAndCount(t,r,n){return t&&(this.finderPenaltyAddHistory(r,n),r=0),r+=this.size,this.finderPenaltyAddHistory(r,n),this.finderPenaltyCountPatterns(n)}finderPenaltyAddHistory(t,r){r[0]===0&&(t+=this.size),r.pop(),r.unshift(t)}};function _s(e,t,r){if(t<0||t>31||e>>>t)throw new RangeError("Value out of range");for(let n=t-1;n>=0;n--)r.push(e>>>n&1)}function ss(e,t){return(e>>>t&1)!==0}class Vw{constructor(t,r,n){if(this.mode=t,this.numChars=r,this.bitData=n,r<0)throw new RangeError("Invalid argument");this.bitData=n.slice()}getData(){return this.bitData.slice()}}const mY=[1,10,12,14],gY=[2,9,11,13],vY=[4,8,16,16];function bM(e,t){return e[Math.floor((t+7)/17)+1]}function _M(e){const t=[];for(const r of e)_s(r,8,t);return new Vw(vY,e.length,t)}function bY(e){if(!yM(e))throw new RangeError("String contains non-numeric characters");const t=[];for(let r=0;r<e.length;){const n=Math.min(e.length-r,3);_s(Number.parseInt(e.substring(r,r+n),10),n*3+1,t),r+=n}return new Vw(mY,e.length,t)}function _Y(e){if(!xM(e))throw new RangeError("String contains unencodable characters in alphanumeric mode");const t=[];let r;for(r=0;r+2<=e.length;r+=2){let n=O_.indexOf(e.charAt(r))*45;n+=O_.indexOf(e.charAt(r+1)),_s(n,11,t)}return r<e.length&&_s(O_.indexOf(e.charAt(r)),6,t),new Vw(gY,e.length,t)}function yY(e){return e===""?[]:yM(e)?[bY(e)]:xM(e)?[_Y(e)]:[_M(SY(e))]}function yM(e){return cY.test(e)}function xM(e){return dY.test(e)}function xY(e,t){let r=0;for(const n of e){const i=bM(n.mode,t);if(n.numChars>=1<<i)return Number.POSITIVE_INFINITY;r+=4+i+n.bitData.length}return r}function SY(e){e=encodeURI(e);const t=[];for(let r=0;r<e.length;r++)e.charAt(r)!=="%"?t.push(e.charCodeAt(r)):(t.push(Number.parseInt(e.substring(r+1,r+3),16)),r+=2);return t}function bx(e){if(e<jw||e>qw)throw new RangeError("Version number out of range");let t=(16*e+128)*e+64;if(e>=2){const r=Math.floor(e/7)+2;t-=(25*r-10)*r-55,e>=7&&(t-=36)}return t}function Kg(e,t){return Math.floor(bx(e)/8)-gM[t[0]][e]*vM[t[0]][e]}function wY(e){if(e<1||e>255)throw new RangeError("Degree out of range");const t=[];for(let n=0;n<e-1;n++)t.push(0);t.push(1);let r=1;for(let n=0;n<e;n++){for(let i=0;i<t.length;i++)t[i]=_x(t[i],r),i+1<t.length&&(t[i]^=t[i+1]);r=_x(r,2)}return t}function EY(e,t){const r=t.map(n=>0);for(const n of e){const i=n^r.shift();r.push(0),t.forEach((o,a)=>r[a]^=_x(o,i))}return r}function _x(e,t){if(e>>>8||t>>>8)throw new RangeError("Byte out of range");let r=0;for(let n=7;n>=0;n--)r=r<<1^(r>>>7)*285,r^=(t>>>n&1)*e;return r}function kY(e,t,r=1,n=40,i=-1,o=!0){if(!(jw<=r&&r<=n&&n<=qw)||i<-1||i>7)throw new RangeError("Invalid value");let a,s;for(a=r;;a++){const f=Kg(a,t)*8,h=xY(e,a);if(h<=f){s=h;break}if(a>=n)throw new RangeError("Data too long")}for(const f of[hM,pM,mM])o&&s<=Kg(a,f)*8&&(t=f);const l=[];for(const f of e){_s(f.mode[0],4,l),_s(f.numChars,bM(f.mode,a),l);for(const h of f.getData())l.push(h)}const c=Kg(a,t)*8;_s(0,Math.min(4,c-l.length),l),_s(0,(8-l.length%8)%8,l);for(let f=236;l.length<c;f^=253)_s(f,8,l);const d=Array.from({length:Math.ceil(l.length/8)},()=>0);return l.forEach((f,h)=>d[h>>>3]|=f<<7-(h&7)),new pY(a,t,d,i)}function CY(e,t){const{ecc:r="L",boostEcc:n=!1,minVersion:i=1,maxVersion:o=40,maskPattern:a=-1,border:s=1}=t||{},l=typeof e=="string"?yY(e):Array.isArray(e)?[_M(e)]:void 0;if(!l)throw new Error(`uqr only supports encoding string and binary data, but got: ${typeof e}`);const c=kY(l,uY[r],i,o,a,n),d=RY({version:c.version,maskPattern:c.mask,size:c.size,data:c.modules,types:c.types},s);return t?.invert&&(d.data=d.data.map(f=>f.map(h=>!h))),t?.onEncoded?.(d),d}function RY(e,t=1){if(!t)return e;const{size:r}=e,n=r+t*2;e.size=n,e.data.forEach(o=>{for(let a=0;a<t;a++)o.unshift(!1),o.push(!1)});for(let o=0;o<t;o++)e.data.unshift(Array.from({length:n},a=>!1)),e.data.push(Array.from({length:n},a=>!1));const i=gu.Border;e.types.forEach(o=>{for(let a=0;a<t;a++)o.unshift(i),o.push(i)});for(let o=0;o<t;o++)e.types.unshift(Array.from({length:n},a=>i)),e.types.push(Array.from({length:n},a=>i));return e}function AY(e){return"var("+e+")"}let TY=E([z("inlineBlock"),u("background","#ffffff"),u("padding","6px"),u("border-radius",AY(Y.md)),u("border","1px solid var("+x.borderSubtle+")"),u("line-height","0")]),$Y=E([u("color","#000000"),u("display","block")]);function NY(e){return e.map((t,r)=>t.map((n,i)=>n?"M"+i.toString()+" "+r.toString()+"h1v1h-1z":"").join("")).join("")}function DY(e){if(e.trim()!=="")try{return CY(e,{ecc:"M",border:4})}catch{return}}function FY(e){let t=e.size,r=e.value,n=t!==void 0?t:128,i=DY(r);if(i===void 0)return null;let o=i.size.toString();return _("span",{children:_("svg",{children:_("path",{d:NY(i.data),fill:"currentColor"}),"aria-label":D(e.title,"QR code for "+r),className:$Y,role:"img",height:n.toString(),width:n.toString(),shapeRendering:"crispEdges",viewBox:"0 0 "+o+" "+o,xmlns:"http://www.w3.org/2000/svg"}),className:TY})}let IY=FY,PY=["11011001100","11001101100","11001100110","10010011000","10010001100","10001001100","10011001000","10011000100","10001100100","11001001000","11001000100","11000100100","10110011100","10011011100","10011001110","10111001100","10011101100","10011100110","11001110010","11001011100","11001001110","11011100100","11001110100","11101101110","11101001100","11100101100","11100100110","11101100100","11100110100","11100110010","11011011000","11011000110","11000110110","10100011000","10001011000","10001000110","10110001000","10001101000","10001100010","11010001000","11000101000","11000100010","10110111000","10110001110","10001101110","10111011000","10111000110","10001110110","11101110110","11010001110","11000101110","11011101000","11011100010","11011101110","11101011000","11101000110","11100010110","11101101000","11101100010","11100011010","11101111010","11001000010","11110001010","10100110000","10100001100","10010110000","10010000110","10000101100","10000100110","10110010000","10110000100","10011010000","10011000010","10000110100","10000110010","11000010010","11001010000","11110111010","11000010100","10001111010","10100111100","10010111100","10010011110","10111100100","10011110100","10011110010","11110100100","11110010100","11110010010","11011011110","11011110110","11110110110","10101111000","10100011110","10001011110","10111101000","10111100010","11110101000","11110100010","10111011110","10111101110","11101011110","11110101110","11010000100","11010010000","11010011100","1100011101011"];function sA(e){return e>="0"?e<="9":!1}function OY(e){let t=[],r=0,n=e.length;for(;r<n;)if(sA(D(e[r],""))){let i=r;for(;r<n&&sA(D(e[r],""));)r=r+1|0;t.push([i,r-i|0])}else r=r+1|0;return t}function MY(e){let t={};return OY(e).forEach(r=>{let n=r[1],i=r[0],o=n%2,a=n-o|0;if(a<=0)return;let s=(i+n|0)===e.length;if((((o+(i===0&&o===0?0:1)|0)+(a/2|0)|0)+(s?0:1)|0)<n){t[(i+o|0).toString()]=a;return}}),t}function LY(e){let t=e.length;if(t===0||e.split("").some(l=>{let c=D(l.codePointAt(0),0);return c<32?!0:c>126}))return;let n=MY(e),i=[],o=Ee(n[0]);i.push(o?105:104);let a=o?"C":"B",s=0;for(;s<t;){let l=n[s.toString()];if(l!==void 0){a!=="C"&&(i.push(99),a="C");for(let c=0,d=l/2|0;c<d;++c){let f=e.substring(s+(c<<1)|0,(s+(c<<1)|0)+2|0);i.push(D(lO(f),0))}s=s+l|0}else a==="C"&&(i.push(100),a="B"),i.push(D(e.codePointAt(s),32)-32|0),s=s+1|0}return i}function zY(e){return q(LY(e),t=>{let r={contents:t[0]};return t.forEach((n,i)=>{if(i>0){r.contents=r.contents+(n*i|0)|0;return}}),t.concat([r.contents%103,106]).map(n=>PY[n]).join("")})}function UY(e,t,r){let n=r.toString(),i=[],o=0,a=e.length;for(;o<a;)if(Re(e[o],"1")){let s=o;for(;o<a&&Re(e[o],"1");)o=o+1|0;let l=(o-s|0).toString();i.push("M"+(s+t|0).toString()+" 0h"+l+"v"+n+"h-"+l+"z")}else o=o+1|0;return i.join("")}function BY(e){return"var("+e+")"}let jY=E([z("inlineBlock"),tJ({NAME:"percent",VAL:100}),u("overflow-x","auto"),u("background","#ffffff"),u("padding","6px"),u("border-radius",BY(Y.md)),u("border","1px solid var("+x.borderSubtle+")"),u("line-height","0")]),qY=E([u("color","#000000"),u("display","block")]);function VY(e){let t=e.moduleWidth,r=e.height,n=e.value,i=r!==void 0?r:64,o=t!==void 0?t:2,a=zY(n);if(a===void 0)return null;let s=a.length+20|0;return _("span",{children:_("svg",{children:_("path",{d:UY(a,10,40),fill:"currentColor"}),"aria-label":D(e.title,"Barcode for "+n),className:qY,role:"img",height:i.toString(),width:(s*o|0).toString(),preserveAspectRatio:"none",shapeRendering:"crispEdges",viewBox:"0 0 "+s.toString()+" 40",xmlns:"http://www.w3.org/2000/svg"}),className:jY})}let GY=VY;function so(e){return"var("+e+")"}let KY=E([$t("fixed"),Bo(ke(0)),zs(ke(0)),Bs(ke(0)),Dp(ke(0)),u("background","rgba(0,0,0,0.82)"),z("flex"),_e("column"),X("center"),Ze("center"),u("gap",so(O.md)),u("padding",so(O.lg)),u("z-index","1100")]),HY=E([u("max-width","min(92vw, 1400px)"),u("max-height","78vh"),u("object-fit","contain"),u("border-radius",so(Y.sm)),u("box-shadow",so(Zr.lg))]),WY=E([z("flex"),X("center"),u("gap",so(O.md)),u("max-width","100%")]),JY=E([z("flex"),X("center"),u("gap",so(O.md)),u("max-width","92vw"),u("color","#f5f5f5"),u("font-size",so(T.sizeSm))]),QY=E([u("font-size",so(T.sizeMd)),u("font-weight",so(T.weightMedium)),u("overflow","hidden"),u("text-overflow","ellipsis"),u("white-space","nowrap")]),YY=E([u("color","#c8c8c8")]),XY=E([u("font-family",so(T.fontFamilyMono)),u("color","#c8c8c8")]),SM=E([z("inlineFlex"),X("center"),Ze("center"),u("background","rgba(255,255,255,0.12)"),u("border","1px solid rgba(255,255,255,0.25)"),u("border-radius",so(Y.md)),u("color","#f5f5f5"),u("padding","4px var("+O.sm+")"),u("font-size",so(T.sizeSm)),Ce("pointer"),Ue([u("background","rgba(255,255,255,0.22)")])]),lA=yr([SM,E([u("width","40px"),u("height","40px"),u("border-radius","50%"),u("font-size",so(T.sizeLg)),rn(0)])]),ZY=yr([SM,E([$t("absolute"),Bo(ke(16)),Bs(ke(16)),u("width","32px")])]);function $c(e,t,r){return t===0?0:Fo(Fo(e+r|0,t)+t|0,t)}function eX(e){let t=e.onClose,r=e.onIndexChange,n=e.index,i=e.slides,o=i.length,a=o>1;Ae(()=>{let d=f=>{switch(f.key){case"ArrowLeft":return a?r($c(n,o,-1)):void 0;case"ArrowRight":return a?r($c(n,o,1)):void 0;case"Escape":return t();default:return}};return document.addEventListener("keydown",d),()=>{document.removeEventListener("keydown",d)}},[n,o]);let s=i[$c(n,o,0)];if(s===void 0)return null;let l=s.title,c=s.caption;return L("div",{children:[_("button",{children:"✕",className:ZY,title:"Close",type:"button",onClick:d=>t()}),L("div",{children:[a?_("button",{children:"‹",className:lA,title:"Previous",type:"button",onClick:d=>r($c(n,o,-1))}):null,_("img",{className:HY,alt:D(s.title,""),src:s.src}),a?_("button",{children:"›",className:lA,title:"Next",type:"button",onClick:d=>r($c(n,o,1))}):null],className:WY,onClick:d=>{d.stopPropagation()}}),L("div",{children:[l!==void 0?_("span",{children:l,className:QY,title:l}):null,c!==void 0?_("span",{children:c,className:YY}):null,a?_("span",{children:($c(n,o,0)+1|0).toString()+" / "+o.toString(),className:XY}):null,D(e.action,null)],className:JY,onClick:d=>{d.stopPropagation()}})],"aria-modal":!0,className:KY,role:"dialog",onClick:d=>t()})}let wM=eX;function gi(e){let t=new Date(e);return new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()}function Ro(e,t){let r=new Date(e);return new Date(r.getFullYear(),r.getMonth(),r.getDate()+t).getTime()}function EM(e,t){let r=new Date(e);return new Date(r.getFullYear(),r.getMonth()+t,1).getTime()}function Yv(e){let t=new Date(e).getDay()|0,r=t===0?6:t-1|0;return Ro(gi(e),-r|0)}function kM(e){let t=new Date(e);return new Date(t.getFullYear(),t.getMonth(),1).getTime()}function tX(e){let t=Yv(kM(e));return Fl(42,r=>Ro(t,r))}function CM(e,t){return gi(e)===gi(t)}function rX(e,t){let r=new Date(e),n=new Date(t);return r.getFullYear()===n.getFullYear()?r.getMonth()===n.getMonth():!1}function RM(e,t,r){let n=gi(r),i=n+864e5;return e<i?t>=n:!1}function uA(e){let t=e.toString();return t.length<2?"0"+t:t}function AM(e){let t=new Date(e);return uA(t.getHours()|0)+":"+uA(t.getMinutes()|0)}function TM(e){return e===gi(e)}let $M=["January","February","March","April","May","June","July","August","September","October","November","December"];function xo(e){let t=new Date(e),r=t.getMonth()|0;return D($M[r],"")+" "+t.getFullYear().toString()}let Gw=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];function NM(e){return new Date(e).getDate()|0}function Is(e){let r=new Date(e).getDay()|0,n=r===0?6:r-1|0;return D(Gw[n],"")+" "+(new Date(e).getDate()|0).toString()}function Qn(e){let t=new Date(e).getTime();if(!Number.isNaN(t))return t}let DM=864e5;function yu(e){return"var("+e+")"}function nX(e){return E([u("width","100%"),u("height",e),u("border","1px solid var("+x.borderSubtle+")"),u("border-radius",yu(Y.md)),u("background",yu(x.surfaceSubtle)),Us("hidden")])}let iX=E([z("flex"),_e("column"),X("center"),Ze("center"),u("gap",yu(O.sm)),u("height","100%"),u("padding",yu(O.lg)),u("color",yu(x.textSecondary)),u("font-size",yu(T.sizeSm)),u("text-align","center")]),oX=E([u("color",yu(x.brand)),u("text-decoration","none"),Ue([u("text-decoration","underline")])]);function aX(e){return D(D(e.split("?")[0],e).split("#")[0],e).toLowerCase().endsWith(".pdf")}function sX(e){let t=e.height,r=e.title,n=e.src,i=r!==void 0?r:"Document",o=t!==void 0?t:"70vh";return _("object",{children:L("div",{children:["This browser can't display the document inline.",_("a",{children:"Open "+i,className:oX,href:n,rel:"noopener noreferrer",target:"_blank"})],className:iX}),"aria-label":i,className:nX(o),data:n,type:"application/pdf"})}let lX=sX;function FM(e){return e==="Small"?"13px":"18px"}let IM="★";function uX(e,t){let r=t<=0?1:t;return(e<0?0:e>r?r:e)/r}function Lu(e){return"var("+e+")"}function cX(e){return E([z("inlineFlex"),$t("relative"),u("font-size",FM(e)),u("line-height","1"),u("letter-spacing","1px"),u("white-space","nowrap"),u("vertical-align","-1px")])}let dX=E([u("color",Lu(x.borderSubtle))]);function fX(e){return E([$t("absolute"),u("top","0"),u("left","0"),u("width",(e*100).toString()+"%"),Us("hidden"),u("white-space","nowrap"),u("color",Lu(x.warning)),u("pointer-events","none")])}let cA=E([z("inlineFlex"),u("gap","2px"),X("center")]);function hX(e,t){return E([u("background","none"),u("border","none"),u("padding","0 1px"),u("font-size",FM(t)),u("line-height","1"),Ce("pointer"),u("color",Lu(e?x.warning:x.borderSubtle)),u("transition","color 120ms, transform 120ms"),Ue([u("transform","scale(1.15)")]),lr("&:focus-visible",[u("outline","2px solid var("+x.brand+")"),u("outline-offset","1px"),u("border-radius","2px")])])}let dA=E([u("color",Lu(x.textSecondary)),u("font-size",Lu(T.sizeSm))]),pX=E([z("inlineFlex"),X("center"),u("gap","6px")]),mX=E([u("border","1px solid var("+x.error+")"),u("border-radius",Lu(Y.sm)),u("padding","2px 4px")]);function gX(e){return sO(e<=0?0:e,IM).join("")}function vX(e){let t=e.hasError,r=e.onBlur,n=e.onChange,i=e.showValue,o=e.size,a=e.max,s=e.value,l=a!==void 0?a:5,c=o!==void 0?o:"Small",d=i!==void 0?i:!1,f=t!==void 0?t:!1,h=l<=0?5:l,p=gX(h),m=D(e.label,(Math.round(s*10)/10).toString()+" of "+h.toString());return n!==void 0?L("span",{children:[Fl(h,g=>g+1|0).map(g=>{let v=g<=s;return _("button",{children:IM,"aria-label":g.toString()+" of "+h.toString(),"aria-pressed":v?"true":"false",className:hX(v,c),title:g.toString()+" of "+h.toString(),type:"button",onBlur:b=>ee(r,y=>y()),onClick:b=>{b.stopPropagation(),n(g===s?0:g)}},g.toString())}),d?_("span",{children:s<=0?"—":s.toString(),className:dA}):null],"aria-label":m,className:f?cA+" "+mX:cA,role:"group"}):L("span",{children:[L("span",{children:[_("span",{children:p,className:dX}),_("span",{children:p,className:fX(uX(s,h))})],"aria-label":m,className:cX(c),role:"img",title:m}),d?_("span",{children:(Math.round(s*10)/10).toString()+" / "+h.toString(),className:dA}):null],className:pX})}let M_=vX;function zu(e){return"var("+e+")"}let bX=E([z("flex"),_e("column"),u("gap","4px")]),_X=E([z("flex"),Ze("spaceBetween"),u("font-size",zu(T.sizeSm))]),yX=E([u("color",zu(x.textSecondary))]),xX=E([u("color",zu(x.textPrimary)),u("font-weight",zu(T.weightMedium))]),SX=E([u("background",zu(x.surfaceSubtle)),u("border-radius",zu(Y.full)),u("height","8px"),Us("hidden")]);function wX(e,t){return E([u("background",t!==void 0?t:"var("+x.brand+")"),u("border-radius",zu(Y.full)),u("height","100%"),u("width",e.toString()+"%"),u("transition","width 0.3s ease")])}function EX(e){let t=e.showValue,r=e.label,n=e.value,i=t!==void 0?t:!0,o=n>100?100:n,a=o<0?0:o;return L("div",{children:[Ee(r)||i?L("div",{children:[ne(r,null,s=>_("span",{children:s,className:yX})),i?_("span",{children:Math.round(a).toString()+"%",className:xX}):null],className:_X}):null,_("div",{children:_("div",{className:wX(a,e.color)}),className:SX})],className:bX})}let PM=EX,Xv={};function OM(e){Xv[e.id]=e}function MM(e){return F(Xv,e)}let LM={};function kX(e){return ne(F(Xv,e),LM,t=>t.constraints)}let fA={contents:[]};function CX(e,t){if(fA.contents.some(n=>n===e))return;fA.contents.push(e);let r=Tp(Xv).map(n=>n.id).join(", ");console.error('[AutoUI] Unknown channel "'+e+'" ('+t+") — falling back to a plain-text preview. Registered channels: "+(r===""?"(none — has the channel adapter's init() run?)":r))}let zM="#111111";function Zo(e){return"var("+e+")"}let hA=E([z("flex"),_e("column"),u("gap",Zo(O.xs))]);function RX(e){return E([u("background","#ffffff"),u("border",e?"1px solid var("+x.error+")":"1px dashed var("+x.border+")"),u("border-radius",Zo(Y.md)),u("touch-action","none"),u("max-width","100%"),u("width","100%"),u("height","auto"),Ce("crosshair"),u("display","block")])}let AX=E([u("fill","#9ca3af"),u("font-size","13px"),u("pointer-events","none"),u("user-select","none")]),TX=E([u("stroke","#e5e7eb"),u("stroke-width","1")]),pA=E([z("flex"),X("center"),u("gap",Zo(O.sm)),u("font-size",Zo(T.sizeXs)),u("color",Zo(x.textSecondary))]),mA=E([u("background","none"),u("border","1px solid var("+x.border+")"),u("border-radius",Zo(Y.sm)),u("color",Zo(x.textSecondary)),u("font-size",Zo(T.sizeXs)),u("padding","2px 8px"),Ce("pointer"),Ue([u("border-color",Zo(x.brand)),u("color",Zo(x.brand))])]),$X=E([u("background","#ffffff"),u("border","1px solid var("+x.borderSubtle+")"),u("border-radius",Zo(Y.md)),u("padding","4px"),u("display","inline-block"),u("line-height","0")]),NX=E([u("display","block"),u("max-width","100%"),u("height","auto")]);function Ni(e){return(Math.round(e*10)/10).toString()}function UM(e){return e.map(t=>Ni(t.x)+","+Ni(t.y)).join(" ")}function DX(e,t,r){let n=e.filter(o=>o.length!==0);if(n.length===0)return"";let i=n.map(o=>{let a=o.length===1?o.concat(o):o;return'<polyline points="'+UM(a)+'"/>'}).join("");return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 '+Ni(t)+" "+Ni(r)+'" width="'+Ni(t)+'" height="'+Ni(r)+'"><g fill="none" stroke="'+zM+'" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">'+i+"</g></svg>"}function gA(e){return e.trim().startsWith("<svg")}function BM(e){return"data:image/svg+xml;utf8,"+encodeURIComponent(e)}function FX(e,t){let r=e.x-t.x,n=e.y-t.y;return r*r+n*n>=1.5*1.5}function IX(e){let t=e.hasError,r=e.height,n=e.width,i=e.onBlur,o=e.onChange,a=e.value,s=n!==void 0?n:480,l=r!==void 0?r:160,c=t!==void 0?t:!1,d=De(null),f=ce(()=>[]),h=f[1],p=f[0],m=ce(()=>!1),g=m[1],v=De(!1),b=R=>q(Mi(d.current),N=>{let I=N.getBoundingClientRect(),M=I.width===0?1:s/I.width,P=I.height===0?1:l/I.height;return{x:(R.clientX-I.left)*M,y:(R.clientY-I.top)*P}}),y=R=>o(DX(R,s,l)),S=R=>{R.preventDefault();let N=b(R);if(N!==void 0)return v.current=!0,ee(Mi(d.current),I=>{I.setPointerCapture(R.pointerId)}),h(I=>I.concat([[N]]))},w=R=>{if(!v.current)return;let N=b(R);if(N!==void 0)return h(I=>{let M=I[I.length-1|0];if(M===void 0)return I;let P=M[M.length-1|0];return P!==void 0&&!FX(N,P)?I:I.slice(0,I.length-1|0).concat([M.concat([N])])})},C=R=>{if(v.current)return v.current=!1,y(p),ee(i,N=>N())},A=()=>{h(R=>[]),g(R=>!0),o("")},$=p.length!==0;return a.trim().startsWith("<svg")&&!$&&!m[0]?L("div",{children:[_("span",{children:_("img",{className:NX,alt:"Signature",src:BM(a)}),className:$X}),_("div",{children:_("button",{children:"Sign again",className:mA,type:"button",onClick:R=>A()}),className:pA})],className:hA}):L("div",{children:[L("svg",{children:[_("line",{className:TX,x1:Ni(s*.06),x2:Ni(s*.94),y1:Ni(l*.78),y2:Ni(l*.78)}),$?null:_("text",{children:"Sign here",className:AX,textAnchor:"middle",x:Ni(s/2),y:Ni(l*.7)}),_("g",{children:p.map((R,N)=>_("polyline",{points:UM(R.length===1?R.concat(R):R)},N.toString())),fill:"none",stroke:zM,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})],ref:Dt(d),"aria-label":"Signature pad",className:RX(c),role:"img",onPointerDown:S,onPointerMove:w,onPointerUp:C,onPointerCancel:C,viewBox:"0 0 "+Ni(s)+" "+Ni(l),xmlns:"http://www.w3.org/2000/svg"}),L("div",{children:[$?_("button",{children:"Clear",className:mA,type:"button",onClick:R=>A()}):null,_("span",{children:"Draw your signature above"})],className:pA})],className:hA})}let PX=IX;function OX(e,t,r){let n={};return n[t]=r,Object.assign({},e,n)}function Co(e){return"var("+e+")"}let MX=E([z("flex"),_e("column"),u("gap",Co(O.sm))]),LX=E([z("flex"),u("gap","4px")]),vA=E([u("background","none"),u("border","1px solid var("+x.border+")"),u("border-radius",Co(Y.sm)),u("color",Co(x.textSecondary)),u("font-size",Co(T.sizeXs)),u("padding","2px 8px"),Ce("pointer")]),zX=E([u("background",Co(x.brandSubtle)),u("border-color",Co(x.brand)),u("color",Co(x.textPrimary))]),UX=E([ma({NAME:"percent",VAL:100}),u("min-height","220px"),u("border","1px solid var("+x.borderSubtle+")"),u("border-radius",Co(Y.sm)),u("background","#ffffff")]),BX=E([u("margin","0"),u("font-family",Co(T.fontFamilyMono)),u("font-size",Co(T.sizeXs)),u("line-height",Co(T.lineHeightRelaxed)),u("color",Co(x.textPrimary)),u("white-space","pre-wrap"),u("word-break","break-word")]);function jX(e){let t=e.textAlternative,r=ce(()=>!1),n=r[1],i=r[0],o=(l,c,d)=>_("button",{children:l,className:c?vA+" "+zX:vA,type:"button",onClick:d}),a,s=0;return i&&t!==void 0?a=_("pre",{children:t,className:BX}):s=1,s===1&&(a=_("iframe",{className:UX,title:"Email preview",sandbox:"",srcDoc:e.html})),L("div",{children:[t!==void 0?L("div",{children:[o("HTML",!i,l=>n(c=>!1)),o("Plain text",i,l=>n(c=>!0))],className:LX}):null,a],className:MX})}function qX(e,t){return _(jX,{html:e.body,textAlternative:e.textAlternative})}function VX(){OM({id:"email",label:"Email",constraints:{subjectMaxLength:78,note:"Subject lines are elided in inbox lists past ~78 characters"},preview:qX})}const bA={};function GX(e){let t=bA[e];if(t)return t;t=bA[e]=[];for(let r=0;r<128;r++){const n=String.fromCharCode(r);t.push(n)}for(let r=0;r<e.length;r++){const n=e.charCodeAt(r);t[n]="%"+("0"+n.toString(16).toUpperCase()).slice(-2)}return t}function Cd(e,t){typeof t!="string"&&(t=Cd.defaultChars);const r=GX(t);return e.replace(/(%[a-f0-9]{2})+/gi,function(n){let i="";for(let o=0,a=n.length;o<a;o+=3){const s=parseInt(n.slice(o+1,o+3),16);if(s<128){i+=r[s];continue}if((s&224)===192&&o+3<a){const l=parseInt(n.slice(o+4,o+6),16);if((l&192)===128){const c=s<<6&1984|l&63;c<128?i+="��":i+=String.fromCharCode(c),o+=3;continue}}if((s&240)===224&&o+6<a){const l=parseInt(n.slice(o+4,o+6),16),c=parseInt(n.slice(o+7,o+9),16);if((l&192)===128&&(c&192)===128){const d=s<<12&61440|l<<6&4032|c&63;d<2048||d>=55296&&d<=57343?i+="���":i+=String.fromCharCode(d),o+=6;continue}}if((s&248)===240&&o+9<a){const l=parseInt(n.slice(o+4,o+6),16),c=parseInt(n.slice(o+7,o+9),16),d=parseInt(n.slice(o+10,o+12),16);if((l&192)===128&&(c&192)===128&&(d&192)===128){let f=s<<18&1835008|l<<12&258048|c<<6&4032|d&63;f<65536||f>1114111?i+="����":(f-=65536,i+=String.fromCharCode(55296+(f>>10),56320+(f&1023))),o+=9;continue}}i+="�"}return i})}Cd.defaultChars=";/?:@&=+$,#";Cd.componentChars="";const _A={};function KX(e){let t=_A[e];if(t)return t;t=_A[e]=[];for(let r=0;r<128;r++){const n=String.fromCharCode(r);/^[0-9a-z]$/i.test(n)?t.push(n):t.push("%"+("0"+r.toString(16).toUpperCase()).slice(-2))}for(let r=0;r<e.length;r++)t[e.charCodeAt(r)]=e[r];return t}function Lp(e,t,r){typeof t!="string"&&(r=t,t=Lp.defaultChars),typeof r>"u"&&(r=!0);const n=KX(t);let i="";for(let o=0,a=e.length;o<a;o++){const s=e.charCodeAt(o);if(r&&s===37&&o+2<a&&/^[0-9a-f]{2}$/i.test(e.slice(o+1,o+3))){i+=e.slice(o,o+3),o+=2;continue}if(s<128){i+=n[s];continue}if(s>=55296&&s<=57343){if(s>=55296&&s<=56319&&o+1<a){const l=e.charCodeAt(o+1);if(l>=56320&&l<=57343){i+=encodeURIComponent(e[o]+e[o+1]),o++;continue}}i+="%EF%BF%BD";continue}i+=encodeURIComponent(e[o])}return i}Lp.defaultChars=";/?:@&=+$,-_.!~*'()#";Lp.componentChars="-_.!~*'()";function Kw(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function C0(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const HX=/^([a-z0-9.+-]+:)/i,WX=/:[0-9]*$/,JX=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,QX=["<",">",'"',"`"," ","\r",`
|
|
3
|
+
`," "],YX=["{","}","|","\\","^","`"].concat(QX),XX=["'"].concat(YX),yA=["%","/","?",";","#"].concat(XX),xA=["/","?","#"],ZX=255,SA=/^[+a-z0-9A-Z_-]{0,63}$/,eZ=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,wA={javascript:!0,"javascript:":!0},EA={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Hw(e,t){if(e&&e instanceof C0)return e;const r=new C0;return r.parse(e,t),r}C0.prototype.parse=function(e,t){let r,n,i,o=e;if(o=o.trim(),!t&&e.split("#").length===1){const c=JX.exec(o);if(c)return this.pathname=c[1],c[2]&&(this.search=c[2]),this}let a=HX.exec(o);if(a&&(a=a[0],r=a.toLowerCase(),this.protocol=a,o=o.substr(a.length)),(t||a||o.match(/^\/\/[^@\/]+@[^@\/]+/))&&(i=o.substr(0,2)==="//",i&&!(a&&wA[a])&&(o=o.substr(2),this.slashes=!0)),!wA[a]&&(i||a&&!EA[a])){let c=-1;for(let m=0;m<xA.length;m++)n=o.indexOf(xA[m]),n!==-1&&(c===-1||n<c)&&(c=n);let d,f;c===-1?f=o.lastIndexOf("@"):f=o.lastIndexOf("@",c),f!==-1&&(d=o.slice(0,f),o=o.slice(f+1),this.auth=d),c=-1;for(let m=0;m<yA.length;m++)n=o.indexOf(yA[m]),n!==-1&&(c===-1||n<c)&&(c=n);c===-1&&(c=o.length),o[c-1]===":"&&c--;const h=o.slice(0,c);o=o.slice(c),this.parseHost(h),this.hostname=this.hostname||"";const p=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!p){const m=this.hostname.split(/\./);for(let g=0,v=m.length;g<v;g++){const b=m[g];if(b&&!b.match(SA)){let y="";for(let S=0,w=b.length;S<w;S++)b.charCodeAt(S)>127?y+="x":y+=b[S];if(!y.match(SA)){const S=m.slice(0,g),w=m.slice(g+1),C=b.match(eZ);C&&(S.push(C[1]),w.unshift(C[2])),w.length&&(o=w.join(".")+o),this.hostname=S.join(".");break}}}}this.hostname.length>ZX&&(this.hostname=""),p&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const s=o.indexOf("#");s!==-1&&(this.hash=o.substr(s),o=o.slice(0,s));const l=o.indexOf("?");return l!==-1&&(this.search=o.substr(l),o=o.slice(0,l)),o&&(this.pathname=o),EA[r]&&this.hostname&&!this.pathname&&(this.pathname=""),this};C0.prototype.parseHost=function(e){let t=WX.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};const tZ=Object.freeze(Object.defineProperty({__proto__:null,decode:Cd,encode:Lp,format:Kw,parse:Hw},Symbol.toStringTag,{value:"Module"})),jM=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,qM=/[\0-\x1F\x7F-\x9F]/,rZ=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,Ww=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,VM=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,GM=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,nZ=Object.freeze(Object.defineProperty({__proto__:null,Any:jM,Cc:qM,Cf:rZ,P:Ww,S:VM,Z:GM},Symbol.toStringTag,{value:"Module"})),iZ=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),oZ=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var L_;const aZ=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),sZ=(L_=String.fromCodePoint)!==null&&L_!==void 0?L_:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function lZ(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=aZ.get(e))!==null&&t!==void 0?t:e}var An;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(An||(An={}));const uZ=32;var bl;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(bl||(bl={}));function yx(e){return e>=An.ZERO&&e<=An.NINE}function cZ(e){return e>=An.UPPER_A&&e<=An.UPPER_F||e>=An.LOWER_A&&e<=An.LOWER_F}function dZ(e){return e>=An.UPPER_A&&e<=An.UPPER_Z||e>=An.LOWER_A&&e<=An.LOWER_Z||yx(e)}function fZ(e){return e===An.EQUALS||dZ(e)}var En;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(En||(En={}));var ys;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(ys||(ys={}));class hZ{constructor(t,r,n){this.decodeTree=t,this.emitCodePoint=r,this.errors=n,this.state=En.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=ys.Strict}startEntity(t){this.decodeMode=t,this.state=En.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,r){switch(this.state){case En.EntityStart:return t.charCodeAt(r)===An.NUM?(this.state=En.NumericStart,this.consumed+=1,this.stateNumericStart(t,r+1)):(this.state=En.NamedEntity,this.stateNamedEntity(t,r));case En.NumericStart:return this.stateNumericStart(t,r);case En.NumericDecimal:return this.stateNumericDecimal(t,r);case En.NumericHex:return this.stateNumericHex(t,r);case En.NamedEntity:return this.stateNamedEntity(t,r)}}stateNumericStart(t,r){return r>=t.length?-1:(t.charCodeAt(r)|uZ)===An.LOWER_X?(this.state=En.NumericHex,this.consumed+=1,this.stateNumericHex(t,r+1)):(this.state=En.NumericDecimal,this.stateNumericDecimal(t,r))}addToNumericResult(t,r,n,i){if(r!==n){const o=n-r;this.result=this.result*Math.pow(i,o)+parseInt(t.substr(r,o),i),this.consumed+=o}}stateNumericHex(t,r){const n=r;for(;r<t.length;){const i=t.charCodeAt(r);if(yx(i)||cZ(i))r+=1;else return this.addToNumericResult(t,n,r,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(t,n,r,16),-1}stateNumericDecimal(t,r){const n=r;for(;r<t.length;){const i=t.charCodeAt(r);if(yx(i))r+=1;else return this.addToNumericResult(t,n,r,10),this.emitNumericEntity(i,2)}return this.addToNumericResult(t,n,r,10),-1}emitNumericEntity(t,r){var n;if(this.consumed<=r)return(n=this.errors)===null||n===void 0||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===An.SEMI)this.consumed+=1;else if(this.decodeMode===ys.Strict)return 0;return this.emitCodePoint(lZ(this.result),this.consumed),this.errors&&(t!==An.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,r){const{decodeTree:n}=this;let i=n[this.treeIndex],o=(i&bl.VALUE_LENGTH)>>14;for(;r<t.length;r++,this.excess++){const a=t.charCodeAt(r);if(this.treeIndex=pZ(n,i,this.treeIndex+Math.max(1,o),a),this.treeIndex<0)return this.result===0||this.decodeMode===ys.Attribute&&(o===0||fZ(a))?0:this.emitNotTerminatedNamedEntity();if(i=n[this.treeIndex],o=(i&bl.VALUE_LENGTH)>>14,o!==0){if(a===An.SEMI)return this.emitNamedEntityData(this.treeIndex,o,this.consumed+this.excess);this.decodeMode!==ys.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:r,decodeTree:n}=this,i=(n[r]&bl.VALUE_LENGTH)>>14;return this.emitNamedEntityData(r,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,r,n){const{decodeTree:i}=this;return this.emitCodePoint(r===1?i[t]&~bl.VALUE_LENGTH:i[t+1],n),r===3&&this.emitCodePoint(i[t+2],n),n}end(){var t;switch(this.state){case En.NamedEntity:return this.result!==0&&(this.decodeMode!==ys.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case En.NumericDecimal:return this.emitNumericEntity(0,2);case En.NumericHex:return this.emitNumericEntity(0,3);case En.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case En.EntityStart:return 0}}}function KM(e){let t="";const r=new hZ(e,n=>t+=sZ(n));return function(i,o){let a=0,s=0;for(;(s=i.indexOf("&",s))>=0;){t+=i.slice(a,s),r.startEntity(o);const c=r.write(i,s+1);if(c<0){a=s+r.end();break}a=s+c,s=c===0?a+1:a}const l=t+i.slice(a);return t="",l}}function pZ(e,t,r,n){const i=(t&bl.BRANCH_LENGTH)>>7,o=t&bl.JUMP_TABLE;if(i===0)return o!==0&&n===o?r:-1;if(o){const l=n-o;return l<0||l>=i?-1:e[r+l]-1}let a=r,s=a+i-1;for(;a<=s;){const l=a+s>>>1,c=e[l];if(c<n)a=l+1;else if(c>n)s=l-1;else return e[l+i]}return-1}const HM=KM(iZ);KM(oZ);function mZ(e,t=ys.Legacy){return HM(e,t)}function gZ(e){return HM(e,ys.Strict)}function vZ(e){return Object.prototype.toString.call(e)}function Jw(e){return vZ(e)==="[object String]"}const bZ=Object.prototype.hasOwnProperty;function _Z(e,t){return bZ.call(e,t)}function Zv(e){return Array.prototype.slice.call(arguments,1).forEach(function(r){if(r){if(typeof r!="object")throw new TypeError(r+"must be object");Object.keys(r).forEach(function(n){e[n]=r[n]})}}),e}function WM(e,t,r){return[].concat(e.slice(0,t),r,e.slice(t+1))}function Qw(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function Bh(e){if(e>65535){e-=65536;const t=55296+(e>>10),r=56320+(e&1023);return String.fromCharCode(t,r)}return String.fromCharCode(e)}const JM=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,yZ=/&([a-z#][a-z0-9]{1,31});/gi,xZ=new RegExp(JM.source+"|"+yZ.source,"gi"),SZ=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function wZ(e,t){if(t.charCodeAt(0)===35&&SZ.test(t)){const n=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return Qw(n)?Bh(n):e}const r=mZ(e);return r!==e?r:e}function EZ(e){return e.indexOf("\\")<0?e:e.replace(JM,"$1")}function Rd(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(xZ,function(t,r,n){return r||wZ(t,n)})}const kZ=/[&<>"]/,CZ=/[&<>"]/g,RZ={"&":"&","<":"<",">":">",'"':"""};function AZ(e){return RZ[e]}function Il(e){return kZ.test(e)?e.replace(CZ,AZ):e}const TZ=/[.?*+^$[\]\\(){}|-]/g;function $Z(e){return e.replace(TZ,"\\$&")}function br(e){switch(e){case 9:case 32:return!0}return!1}function jh(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function QM(e){return Ww.test(e)||VM.test(e)}function qh(e){return QM(Bh(e))}function Vh(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function eb(e){return e=e.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}function kA(e){return e===32||e===9||e===10||e===13}function tb(e){let t=0;for(;t<e.length&&kA(e.charCodeAt(t));t++);let r=e.length-1;for(;r>=t&&kA(e.charCodeAt(r));r--);return e.slice(t,r+1)}const NZ={mdurl:tZ,ucmicro:nZ},DZ=Object.freeze(Object.defineProperty({__proto__:null,arrayReplaceAt:WM,asciiTrim:tb,assign:Zv,escapeHtml:Il,escapeRE:$Z,fromCodePoint:Bh,has:_Z,isMdAsciiPunct:Vh,isPunctChar:QM,isPunctCharCode:qh,isSpace:br,isString:Jw,isValidEntityCode:Qw,isWhiteSpace:jh,lib:NZ,normalizeReference:eb,unescapeAll:Rd,unescapeMd:EZ},Symbol.toStringTag,{value:"Module"}));function FZ(e,t,r){let n,i,o,a;const s=e.posMax,l=e.pos;for(e.pos=t+1,n=1;e.pos<s;){if(o=e.src.charCodeAt(e.pos),o===93&&(n--,n===0)){i=!0;break}if(a=e.pos,e.md.inline.skipToken(e),o===91){if(a===e.pos-1)n++;else if(r)return e.pos=l,-1}}let c=-1;return i&&(c=e.pos),e.pos=l,c}function IZ(e,t,r){let n,i=t;const o={ok:!1,pos:0,str:""};if(e.charCodeAt(i)===60){for(i++;i<r;){if(n=e.charCodeAt(i),n===10||n===60)return o;if(n===62)return o.pos=i+1,o.str=Rd(e.slice(t+1,i)),o.ok=!0,o;if(n===92&&i+1<r){i+=2;continue}i++}return o}let a=0;for(;i<r&&(n=e.charCodeAt(i),!(n===32||n<32||n===127));){if(n===92&&i+1<r){if(e.charCodeAt(i+1)===32)break;i+=2;continue}if(n===40&&(a++,a>32))return o;if(n===41){if(a===0)break;a--}i++}return t===i||a!==0||(o.str=Rd(e.slice(t,i)),o.pos=i,o.ok=!0),o}function PZ(e,t,r,n){let i,o=t;const a={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(n)a.str=n.str,a.marker=n.marker;else{if(o>=r)return a;let s=e.charCodeAt(o);if(s!==34&&s!==39&&s!==40)return a;t++,o++,s===40&&(s=41),a.marker=s}for(;o<r;){if(i=e.charCodeAt(o),i===a.marker)return a.pos=o+1,a.str+=Rd(e.slice(t,o)),a.ok=!0,a;if(i===40&&a.marker===41)return a;i===92&&o+1<r&&o++,o++}return a.can_continue=!0,a.str+=Rd(e.slice(t,o)),a}const OZ=Object.freeze(Object.defineProperty({__proto__:null,parseLinkDestination:IZ,parseLinkLabel:FZ,parseLinkTitle:PZ},Symbol.toStringTag,{value:"Module"})),Xa={};Xa.code_inline=function(e,t,r,n,i){const o=e[t];return"<code"+i.renderAttrs(o)+">"+Il(o.content)+"</code>"};Xa.code_block=function(e,t,r,n,i){const o=e[t];return"<pre"+i.renderAttrs(o)+"><code>"+Il(e[t].content)+`</code></pre>
|
|
4
|
+
`};Xa.fence=function(e,t,r,n,i){const o=e[t],a=o.info?Rd(o.info).trim():"";let s="",l="";if(a){const d=a.split(/(\s+)/g);s=d[0],l=d.slice(2).join("")}let c;if(r.highlight?c=r.highlight(o.content,s,l)||Il(o.content):c=Il(o.content),c.indexOf("<pre")===0)return c+`
|
|
5
|
+
`;if(a){const d=o.attrIndex("class"),f=o.attrs?o.attrs.slice():[];d<0?f.push(["class",r.langPrefix+s]):(f[d]=f[d].slice(),f[d][1]+=" "+r.langPrefix+s);const h={attrs:f};return`<pre><code${i.renderAttrs(h)}>${c}</code></pre>
|
|
6
|
+
`}return`<pre><code${i.renderAttrs(o)}>${c}</code></pre>
|
|
7
|
+
`};Xa.image=function(e,t,r,n,i){const o=e[t];return o.attrs[o.attrIndex("alt")][1]=i.renderInlineAsText(o.children,r,n),i.renderToken(e,t,r)};Xa.hardbreak=function(e,t,r){return r.xhtmlOut?`<br />
|
|
8
|
+
`:`<br>
|
|
9
|
+
`};Xa.softbreak=function(e,t,r){return r.breaks?r.xhtmlOut?`<br />
|
|
10
|
+
`:`<br>
|
|
11
|
+
`:`
|
|
12
|
+
`};Xa.text=function(e,t){return Il(e[t].content)};Xa.html_block=function(e,t){return e[t].content};Xa.html_inline=function(e,t){return e[t].content};function Jd(){this.rules=Zv({},Xa)}Jd.prototype.renderAttrs=function(t){let r,n,i;if(!t.attrs)return"";for(i="",r=0,n=t.attrs.length;r<n;r++)i+=" "+Il(t.attrs[r][0])+'="'+Il(t.attrs[r][1])+'"';return i};Jd.prototype.renderToken=function(t,r,n){const i=t[r];let o="";if(i.hidden)return"";i.block&&i.nesting!==-1&&r&&t[r-1].hidden&&(o+=`
|
|
13
|
+
`),o+=(i.nesting===-1?"</":"<")+i.tag,o+=this.renderAttrs(i),i.nesting===0&&n.xhtmlOut&&(o+=" /");let a=!1;if(i.block&&(a=!0,i.nesting===1&&r+1<t.length)){const s=t[r+1];(s.type==="inline"||s.hidden||s.nesting===-1&&s.tag===i.tag)&&(a=!1)}return o+=a?`>
|
|
14
|
+
`:">",o};Jd.prototype.renderInline=function(e,t,r){let n="";const i=this.rules;for(let o=0,a=e.length;o<a;o++){const s=e[o].type;typeof i[s]<"u"?n+=i[s](e,o,t,r,this):n+=this.renderToken(e,o,t)}return n};Jd.prototype.renderInlineAsText=function(e,t,r){let n="";for(let i=0,o=e.length;i<o;i++)switch(e[i].type){case"text":n+=e[i].content;break;case"image":n+=this.renderInlineAsText(e[i].children,t,r);break;case"html_inline":case"html_block":n+=e[i].content;break;case"softbreak":case"hardbreak":n+=`
|
|
15
|
+
`;break}return n};Jd.prototype.render=function(e,t,r){let n="";const i=this.rules;for(let o=0,a=e.length;o<a;o++){const s=e[o].type;s==="inline"?n+=this.renderInline(e[o].children,t,r):typeof i[s]<"u"?n+=i[s](e,o,t,r,this):n+=this.renderToken(e,o,t,r)}return n};function Ui(){this.__rules__=[],this.__cache__=null}Ui.prototype.__find__=function(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1};Ui.prototype.__compile__=function(){const e=this,t=[""];e.__rules__.forEach(function(r){r.enabled&&r.alt.forEach(function(n){t.indexOf(n)<0&&t.push(n)})}),e.__cache__={},t.forEach(function(r){e.__cache__[r]=[],e.__rules__.forEach(function(n){n.enabled&&(r&&n.alt.indexOf(r)<0||e.__cache__[r].push(n.fn))})})};Ui.prototype.at=function(e,t,r){const n=this.__find__(e),i=r||{};if(n===-1)throw new Error("Parser rule not found: "+e);this.__rules__[n].fn=t,this.__rules__[n].alt=i.alt||[],this.__cache__=null};Ui.prototype.before=function(e,t,r,n){const i=this.__find__(e),o=n||{};if(i===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(i,0,{name:t,enabled:!0,fn:r,alt:o.alt||[]}),this.__cache__=null};Ui.prototype.after=function(e,t,r,n){const i=this.__find__(e),o=n||{};if(i===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(i+1,0,{name:t,enabled:!0,fn:r,alt:o.alt||[]}),this.__cache__=null};Ui.prototype.push=function(e,t,r){const n=r||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:n.alt||[]}),this.__cache__=null};Ui.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);const r=[];return e.forEach(function(n){const i=this.__find__(n);if(i<0){if(t)return;throw new Error("Rules manager: invalid rule name "+n)}this.__rules__[i].enabled=!0,r.push(n)},this),this.__cache__=null,r};Ui.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(r){r.enabled=!1}),this.enable(e,t)};Ui.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);const r=[];return e.forEach(function(n){const i=this.__find__(n);if(i<0){if(t)return;throw new Error("Rules manager: invalid rule name "+n)}this.__rules__[i].enabled=!1,r.push(n)},this),this.__cache__=null,r};Ui.prototype.getRules=function(e){return this.__cache__===null&&this.__compile__(),this.__cache__[e]||[]};function va(e,t,r){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=r,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}va.prototype.attrIndex=function(t){if(!this.attrs)return-1;const r=this.attrs;for(let n=0,i=r.length;n<i;n++)if(r[n][0]===t)return n;return-1};va.prototype.attrPush=function(t){this.attrs?this.attrs.push(t):this.attrs=[t]};va.prototype.attrSet=function(t,r){const n=this.attrIndex(t),i=[t,r];n<0?this.attrPush(i):this.attrs[n]=i};va.prototype.attrGet=function(t){const r=this.attrIndex(t);let n=null;return r>=0&&(n=this.attrs[r][1]),n};va.prototype.attrJoin=function(t,r){const n=this.attrIndex(t);n<0?this.attrPush([t,r]):this.attrs[n][1]=this.attrs[n][1]+" "+r};function YM(e,t,r){this.src=e,this.env=r,this.tokens=[],this.inlineMode=!1,this.md=t}YM.prototype.Token=va;const MZ=/\r\n?|\n/g,LZ=/\0/g;function zZ(e){let t;t=e.src.replace(MZ,`
|
|
16
|
+
`),t=t.replace(LZ,"�"),e.src=t}function UZ(e){let t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function BZ(e){const t=e.tokens;for(let r=0,n=t.length;r<n;r++){const i=t[r];i.type==="inline"&&e.md.inline.parse(i.content,e.md,e.env,i.children)}}function jZ(e){return/^<a[>\s]/i.test(e)}function qZ(e){return/^<\/a\s*>/i.test(e)}function VZ(e){const t=e.tokens;if(e.md.options.linkify)for(let r=0,n=t.length;r<n;r++){if(t[r].type!=="inline"||!e.md.linkify.pretest(t[r].content))continue;let i=t[r].children,o=0;for(let a=i.length-1;a>=0;a--){const s=i[a];if(s.type==="link_close"){for(a--;i[a].level!==s.level&&i[a].type!=="link_open";)a--;continue}if(s.type==="html_inline"&&(jZ(s.content)&&o>0&&o--,qZ(s.content)&&o++),!(o>0)&&s.type==="text"&&e.md.linkify.test(s.content)){const l=s.content;let c=e.md.linkify.match(l);const d=[];let f=s.level,h=0;c.length>0&&c[0].index===0&&a>0&&i[a-1].type==="text_special"&&(c=c.slice(1));for(let p=0;p<c.length;p++){const m=c[p].url,g=e.md.normalizeLink(m);if(!e.md.validateLink(g))continue;let v=c[p].text;c[p].schema?c[p].schema==="mailto:"&&!/^mailto:/i.test(v)?v=e.md.normalizeLinkText("mailto:"+v).replace(/^mailto:/,""):v=e.md.normalizeLinkText(v):v=e.md.normalizeLinkText("http://"+v).replace(/^http:\/\//,"");const b=c[p].index;if(b>h){const C=new e.Token("text","",0);C.content=l.slice(h,b),C.level=f,d.push(C)}const y=new e.Token("link_open","a",1);y.attrs=[["href",g]],y.level=f++,y.markup="linkify",y.info="auto",d.push(y);const S=new e.Token("text","",0);S.content=v,S.level=f,d.push(S);const w=new e.Token("link_close","a",-1);w.level=--f,w.markup="linkify",w.info="auto",d.push(w),h=c[p].lastIndex}if(h<l.length){const p=new e.Token("text","",0);p.content=l.slice(h),p.level=f,d.push(p)}t[r].children=i=WM(i,a,d)}}}}const XM=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,GZ=/\((c|tm|r)\)/i,KZ=/\((c|tm|r)\)/ig,HZ={c:"©",r:"®",tm:"™"};function WZ(e,t){return HZ[t.toLowerCase()]}function JZ(e){let t=0;for(let r=e.length-1;r>=0;r--){const n=e[r];n.type==="text"&&!t&&(n.content=n.content.replace(KZ,WZ)),n.type==="link_open"&&n.info==="auto"&&t--,n.type==="link_close"&&n.info==="auto"&&t++}}function QZ(e){let t=0;for(let r=e.length-1;r>=0;r--){const n=e[r];n.type==="text"&&!t&&XM.test(n.content)&&(n.content=n.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),n.type==="link_open"&&n.info==="auto"&&t--,n.type==="link_close"&&n.info==="auto"&&t++}}function YZ(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(GZ.test(e.tokens[t].content)&&JZ(e.tokens[t].children),XM.test(e.tokens[t].content)&&QZ(e.tokens[t].children))}const XZ=/['"]/,CA=/['"]/g,RA="’";function Lm(e,t,r,n){e[t]||(e[t]=[]),e[t].push({pos:r,ch:n})}function ZZ(e,t){let r="",n=0;t.sort((i,o)=>i.pos-o.pos);for(let i=0;i<t.length;i++){const o=t[i];r+=e.slice(n,o.pos)+o.ch,n=o.pos+1}return r+e.slice(n)}function eee(e,t){let r;const n=[],i={};for(let o=0;o<e.length;o++){const a=e[o],s=e[o].level;for(r=n.length-1;r>=0&&!(n[r].level<=s);r--);if(n.length=r+1,a.type!=="text")continue;const l=a.content;let c=0;const d=l.length;e:for(;c<d;){CA.lastIndex=c;const f=CA.exec(l);if(!f)break;let h=!0,p=!0;c=f.index+1;const m=f[0]==="'";let g=32;if(f.index-1>=0)g=l.charCodeAt(f.index-1);else for(r=o-1;r>=0&&!(e[r].type==="softbreak"||e[r].type==="hardbreak");r--)if(e[r].content){g=e[r].content.charCodeAt(e[r].content.length-1);break}let v=32;if(c<d)v=l.charCodeAt(c);else for(r=o+1;r<e.length&&!(e[r].type==="softbreak"||e[r].type==="hardbreak");r++)if(e[r].content){v=e[r].content.charCodeAt(0);break}const b=Vh(g)||qh(g),y=Vh(v)||qh(v),S=jh(g),w=jh(v);if(w?h=!1:y&&(S||b||(h=!1)),S?p=!1:b&&(w||y||(p=!1)),v===34&&f[0]==='"'&&g>=48&&g<=57&&(p=h=!1),h&&p&&(h=b,p=y),!h&&!p){m&&Lm(i,o,f.index,RA);continue}if(p)for(r=n.length-1;r>=0;r--){let C=n[r];if(n[r].level<s)break;if(C.single===m&&n[r].level===s){C=n[r];let A,$;m?(A=t.md.options.quotes[2],$=t.md.options.quotes[3]):(A=t.md.options.quotes[0],$=t.md.options.quotes[1]),Lm(i,o,f.index,$),Lm(i,C.token,C.pos,A),n.length=r;continue e}}h?n.push({token:o,pos:f.index,single:m,level:s}):p&&m&&Lm(i,o,f.index,RA)}}Object.keys(i).forEach(function(o){e[o].content=ZZ(e[o].content,i[o])})}function tee(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)e.tokens[t].type!=="inline"||!XZ.test(e.tokens[t].content)||eee(e.tokens[t].children,e)}function ree(e){let t,r;const n=e.tokens,i=n.length;for(let o=0;o<i;o++){if(n[o].type!=="inline")continue;const a=n[o].children,s=a.length;for(t=0;t<s;t++)a[t].type==="text_special"&&(a[t].type="text");for(t=r=0;t<s;t++)a[t].type==="text"&&t+1<s&&a[t+1].type==="text"?a[t+1].content=a[t].content+a[t+1].content:(t!==r&&(a[r]=a[t]),r++);t!==r&&(a.length=r)}}const z_=[["normalize",zZ],["block",UZ],["inline",BZ],["linkify",VZ],["replacements",YZ],["smartquotes",tee],["text_join",ree]];function Yw(){this.ruler=new Ui;for(let e=0;e<z_.length;e++)this.ruler.push(z_[e][0],z_[e][1])}Yw.prototype.process=function(e){const t=this.ruler.getRules("");for(let r=0,n=t.length;r<n;r++)t[r](e)};Yw.prototype.State=YM;function Za(e,t,r,n){this.src=e,this.md=t,this.env=r,this.tokens=n,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0;const i=this.src;for(let o=0,a=0,s=0,l=0,c=i.length,d=!1;a<c;a++){const f=i.charCodeAt(a);if(!d)if(br(f)){s++,f===9?l+=4-l%4:l++;continue}else d=!0;(f===10||a===c-1)&&(f!==10&&a++,this.bMarks.push(o),this.eMarks.push(a),this.tShift.push(s),this.sCount.push(l),this.bsCount.push(0),d=!1,s=0,l=0,o=a+1)}this.bMarks.push(i.length),this.eMarks.push(i.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}Za.prototype.push=function(e,t,r){const n=new va(e,t,r);return n.block=!0,r<0&&this.level--,n.level=this.level,r>0&&this.level++,this.tokens.push(n),n};Za.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]};Za.prototype.skipEmptyLines=function(t){for(let r=this.lineMax;t<r&&!(this.bMarks[t]+this.tShift[t]<this.eMarks[t]);t++);return t};Za.prototype.skipSpaces=function(t){for(let r=this.src.length;t<r;t++){const n=this.src.charCodeAt(t);if(!br(n))break}return t};Za.prototype.skipSpacesBack=function(t,r){if(t<=r)return t;for(;t>r;)if(!br(this.src.charCodeAt(--t)))return t+1;return t};Za.prototype.skipChars=function(t,r){for(let n=this.src.length;t<n&&this.src.charCodeAt(t)===r;t++);return t};Za.prototype.skipCharsBack=function(t,r,n){if(t<=n)return t;for(;t>n;)if(r!==this.src.charCodeAt(--t))return t+1;return t};Za.prototype.getLines=function(t,r,n,i){if(t>=r)return"";const o=new Array(r-t);for(let a=0,s=t;s<r;s++,a++){let l=0;const c=this.bMarks[s];let d=c,f;for(s+1<r||i?f=this.eMarks[s]+1:f=this.eMarks[s];d<f&&l<n;){const h=this.src.charCodeAt(d);if(br(h))h===9?l+=4-(l+this.bsCount[s])%4:l++;else if(d-c<this.tShift[s])l++;else break;d++}l>n?o[a]=new Array(l-n+1).join(" ")+this.src.slice(d,f):o[a]=this.src.slice(d,f)}return o.join("")};Za.prototype.Token=va;const nee=65536;function U_(e,t){const r=e.bMarks[t]+e.tShift[t],n=e.eMarks[t];return e.src.slice(r,n)}function AA(e){const t=[],r=e.length;let n=0,i=e.charCodeAt(n),o=!1,a=0,s="";for(;n<r;)i===124&&(o?(s+=e.substring(a,n-1),a=n):(t.push(s+e.substring(a,n)),s="",a=n+1)),o=i===92,n++,i=e.charCodeAt(n);return t.push(s+e.substring(a)),t}function iee(e,t,r,n){if(t+2>r)return!1;let i=t+1;if(e.sCount[i]<e.blkIndent||e.sCount[i]-e.blkIndent>=4)return!1;let o=e.bMarks[i]+e.tShift[i];if(o>=e.eMarks[i])return!1;const a=e.src.charCodeAt(o++);if(a!==124&&a!==45&&a!==58||o>=e.eMarks[i])return!1;const s=e.src.charCodeAt(o++);if(s!==124&&s!==45&&s!==58&&!br(s)||a===45&&br(s))return!1;for(;o<e.eMarks[i];){const w=e.src.charCodeAt(o);if(w!==124&&w!==45&&w!==58&&!br(w))return!1;o++}let l=U_(e,t+1),c=l.split("|");const d=[];for(let w=0;w<c.length;w++){const C=c[w].trim();if(!C){if(w===0||w===c.length-1)continue;return!1}if(!/^:?-+:?$/.test(C))return!1;C.charCodeAt(C.length-1)===58?d.push(C.charCodeAt(0)===58?"center":"right"):C.charCodeAt(0)===58?d.push("left"):d.push("")}if(l=U_(e,t).trim(),l.indexOf("|")===-1||e.sCount[t]-e.blkIndent>=4)return!1;c=AA(l),c.length&&c[0]===""&&c.shift(),c.length&&c[c.length-1]===""&&c.pop();const f=c.length;if(f===0||f!==d.length)return!1;if(n)return!0;const h=e.parentType;e.parentType="table";const p=e.md.block.ruler.getRules("blockquote"),m=e.push("table_open","table",1),g=[t,0];m.map=g;const v=e.push("thead_open","thead",1);v.map=[t,t+1];const b=e.push("tr_open","tr",1);b.map=[t,t+1];for(let w=0;w<c.length;w++){const C=e.push("th_open","th",1);d[w]&&(C.attrs=[["style","text-align:"+d[w]]]);const A=e.push("inline","",0);A.content=c[w].trim(),A.children=[],e.push("th_close","th",-1)}e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let y,S=0;for(i=t+2;i<r&&!(e.sCount[i]<e.blkIndent);i++){let w=!1;for(let A=0,$=p.length;A<$;A++)if(p[A](e,i,r,!0)){w=!0;break}if(w||(l=U_(e,i).trim(),!l)||e.sCount[i]-e.blkIndent>=4||(c=AA(l),c.length&&c[0]===""&&c.shift(),c.length&&c[c.length-1]===""&&c.pop(),S+=f-c.length,S>nee))break;if(i===t+2){const A=e.push("tbody_open","tbody",1);A.map=y=[t+2,0]}const C=e.push("tr_open","tr",1);C.map=[i,i+1];for(let A=0;A<f;A++){const $=e.push("td_open","td",1);d[A]&&($.attrs=[["style","text-align:"+d[A]]]);const R=e.push("inline","",0);R.content=c[A]?c[A].trim():"",R.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}return y&&(e.push("tbody_close","tbody",-1),y[1]=i),e.push("table_close","table",-1),g[1]=i,e.parentType=h,e.line=i,!0}function oee(e,t,r){if(e.sCount[t]-e.blkIndent<4)return!1;let n=t+1,i=n;for(;n<r;){if(e.isEmpty(n)){n++;continue}if(e.sCount[n]-e.blkIndent>=4){n++,i=n;continue}break}e.line=i;const o=e.push("code_block","code",0);return o.content=e.getLines(t,i,4+e.blkIndent,!1)+`
|
|
17
|
+
`,o.map=[t,e.line],!0}function aee(e,t,r,n){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||i+3>o)return!1;const a=e.src.charCodeAt(i);if(a!==126&&a!==96)return!1;let s=i;i=e.skipChars(i,a);let l=i-s;if(l<3)return!1;const c=e.src.slice(s,i),d=e.src.slice(i,o);if(a===96&&d.indexOf(String.fromCharCode(a))>=0)return!1;if(n)return!0;let f=t,h=!1;for(;f++,!(f>=r||(i=s=e.bMarks[f]+e.tShift[f],o=e.eMarks[f],i<o&&e.sCount[f]<e.blkIndent));)if(e.src.charCodeAt(i)===a&&!(e.sCount[f]-e.blkIndent>=4)&&(i=e.skipChars(i,a),!(i-s<l)&&(i=e.skipSpaces(i),!(i<o)))){h=!0;break}l=e.sCount[t],e.line=f+(h?1:0);const p=e.push("fence","code",0);return p.info=d,p.content=e.getLines(t+1,f,l,!0),p.markup=c,p.map=[t,e.line],!0}function see(e,t,r,n){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];const a=e.lineMax;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(i)!==62)return!1;if(n)return!0;const s=[],l=[],c=[],d=[],f=e.md.block.ruler.getRules("blockquote"),h=e.parentType;e.parentType="blockquote";let p=!1,m;for(m=t;m<r;m++){const S=e.sCount[m]<e.blkIndent;if(i=e.bMarks[m]+e.tShift[m],o=e.eMarks[m],i>=o)break;if(e.src.charCodeAt(i++)===62&&!S){let C=e.sCount[m]+1,A,$;e.src.charCodeAt(i)===32?(i++,C++,$=!1,A=!0):e.src.charCodeAt(i)===9?(A=!0,(e.bsCount[m]+C)%4===3?(i++,C++,$=!1):$=!0):A=!1;let R=C;for(s.push(e.bMarks[m]),e.bMarks[m]=i;i<o;){const N=e.src.charCodeAt(i);if(br(N))N===9?R+=4-(R+e.bsCount[m]+($?1:0))%4:R++;else break;i++}p=i>=o,l.push(e.bsCount[m]),e.bsCount[m]=e.sCount[m]+1+(A?1:0),c.push(e.sCount[m]),e.sCount[m]=R-C,d.push(e.tShift[m]),e.tShift[m]=i-e.bMarks[m];continue}if(p)break;let w=!1;for(let C=0,A=f.length;C<A;C++)if(f[C](e,m,r,!0)){w=!0;break}if(w){e.lineMax=m,e.blkIndent!==0&&(s.push(e.bMarks[m]),l.push(e.bsCount[m]),d.push(e.tShift[m]),c.push(e.sCount[m]),e.sCount[m]-=e.blkIndent);break}s.push(e.bMarks[m]),l.push(e.bsCount[m]),d.push(e.tShift[m]),c.push(e.sCount[m]),e.sCount[m]=-1}const g=e.blkIndent;e.blkIndent=0;const v=e.push("blockquote_open","blockquote",1);v.markup=">";const b=[t,0];v.map=b,e.md.block.tokenize(e,t,m);const y=e.push("blockquote_close","blockquote",-1);y.markup=">",e.lineMax=a,e.parentType=h,b[1]=e.line;for(let S=0;S<d.length;S++)e.bMarks[S+t]=s[S],e.tShift[S+t]=d[S],e.sCount[S+t]=c[S],e.bsCount[S+t]=l[S];return e.blkIndent=g,!0}function lee(e,t,r,n){const i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let o=e.bMarks[t]+e.tShift[t];const a=e.src.charCodeAt(o++);if(a!==42&&a!==45&&a!==95)return!1;let s=1;for(;o<i;){const c=e.src.charCodeAt(o++);if(c!==a&&!br(c))return!1;c===a&&s++}if(s<3)return!1;if(n)return!0;e.line=t+1;const l=e.push("hr","hr",0);return l.map=[t,e.line],l.markup=Array(s+1).join(String.fromCharCode(a)),!0}function TA(e,t){const r=e.eMarks[t];let n=e.bMarks[t]+e.tShift[t];const i=e.src.charCodeAt(n++);if(i!==42&&i!==45&&i!==43)return-1;if(n<r){const o=e.src.charCodeAt(n);if(!br(o))return-1}return n}function $A(e,t){const r=e.bMarks[t]+e.tShift[t],n=e.eMarks[t];let i=r;if(i+1>=n)return-1;let o=e.src.charCodeAt(i++);if(o<48||o>57)return-1;for(;;){if(i>=n)return-1;if(o=e.src.charCodeAt(i++),o>=48&&o<=57){if(i-r>=10)return-1;continue}if(o===41||o===46)break;return-1}return i<n&&(o=e.src.charCodeAt(i),!br(o))?-1:i}function uee(e,t){const r=e.level+2;for(let n=t+2,i=e.tokens.length-2;n<i;n++)e.tokens[n].level===r&&e.tokens[n].type==="paragraph_open"&&(e.tokens[n+2].hidden=!0,e.tokens[n].hidden=!0,n+=2)}function cee(e,t,r,n){let i,o,a,s,l=t,c=!0;if(e.sCount[l]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[l]-e.listIndent>=4&&e.sCount[l]<e.blkIndent)return!1;let d=!1;n&&e.parentType==="paragraph"&&e.sCount[l]>=e.blkIndent&&(d=!0);let f,h,p;if((p=$A(e,l))>=0){if(f=!0,a=e.bMarks[l]+e.tShift[l],h=Number(e.src.slice(a,p-1)),d&&h!==1)return!1}else if((p=TA(e,l))>=0)f=!1;else return!1;if(d&&e.skipSpaces(p)>=e.eMarks[l])return!1;if(n)return!0;const m=e.src.charCodeAt(p-1),g=e.tokens.length;f?(s=e.push("ordered_list_open","ol",1),h!==1&&(s.attrs=[["start",h]])):s=e.push("bullet_list_open","ul",1);const v=[l,0];s.map=v,s.markup=String.fromCharCode(m);let b=!1;const y=e.md.block.ruler.getRules("list"),S=e.parentType;for(e.parentType="list";l<r;){o=p,i=e.eMarks[l];const w=e.sCount[l]+p-(e.bMarks[l]+e.tShift[l]);let C=w;for(;o<i;){const W=e.src.charCodeAt(o);if(W===9)C+=4-(C+e.bsCount[l])%4;else if(W===32)C++;else break;o++}const A=o;let $;A>=i?$=1:$=C-w,$>4&&($=1);const R=w+$;s=e.push("list_item_open","li",1),s.markup=String.fromCharCode(m);const N=[l,0];s.map=N,f&&(s.info=e.src.slice(a,p-1));const I=e.tight,M=e.tShift[l],P=e.sCount[l],B=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=R,e.tight=!0,e.tShift[l]=A-e.bMarks[l],e.sCount[l]=C,A>=i&&e.isEmpty(l+1)?e.line=Math.min(e.line+2,r):e.md.block.tokenize(e,l,r,!0),(!e.tight||b)&&(c=!1),b=e.line-l>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=B,e.tShift[l]=M,e.sCount[l]=P,e.tight=I,s=e.push("list_item_close","li",-1),s.markup=String.fromCharCode(m),l=e.line,N[1]=l,l>=r||e.sCount[l]<e.blkIndent||e.sCount[l]-e.blkIndent>=4)break;let j=!1;for(let W=0,te=y.length;W<te;W++)if(y[W](e,l,r,!0)){j=!0;break}if(j)break;if(f){if(p=$A(e,l),p<0)break;a=e.bMarks[l]+e.tShift[l]}else if(p=TA(e,l),p<0)break;if(m!==e.src.charCodeAt(p-1))break}return f?s=e.push("ordered_list_close","ol",-1):s=e.push("bullet_list_close","ul",-1),s.markup=String.fromCharCode(m),v[1]=l,e.line=l,e.parentType=S,c&&uee(e,g),!0}function dee(e,t,r,n){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t],a=t+1;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(i)!==91)return!1;function s(y){const S=e.lineMax;if(y>=S||e.isEmpty(y))return null;let w=!1;if(e.sCount[y]-e.blkIndent>3&&(w=!0),e.sCount[y]<0&&(w=!0),!w){const $=e.md.block.ruler.getRules("reference"),R=e.parentType;e.parentType="reference";let N=!1;for(let I=0,M=$.length;I<M;I++)if($[I](e,y,S,!0)){N=!0;break}if(e.parentType=R,N)return null}const C=e.bMarks[y]+e.tShift[y],A=e.eMarks[y];return e.src.slice(C,A+1)}let l=e.src.slice(i,o+1);o=l.length;let c=-1;for(i=1;i<o;i++){const y=l.charCodeAt(i);if(y===91)return!1;if(y===93){c=i;break}else if(y===10){const S=s(a);S!==null&&(l+=S,o=l.length,a++)}else if(y===92&&(i++,i<o&&l.charCodeAt(i)===10)){const S=s(a);S!==null&&(l+=S,o=l.length,a++)}}if(c<0||l.charCodeAt(c+1)!==58)return!1;for(i=c+2;i<o;i++){const y=l.charCodeAt(i);if(y===10){const S=s(a);S!==null&&(l+=S,o=l.length,a++)}else if(!br(y))break}const d=e.md.helpers.parseLinkDestination(l,i,o);if(!d.ok)return!1;const f=e.md.normalizeLink(d.str);if(!e.md.validateLink(f))return!1;i=d.pos;const h=i,p=a,m=i;for(;i<o;i++){const y=l.charCodeAt(i);if(y===10){const S=s(a);S!==null&&(l+=S,o=l.length,a++)}else if(!br(y))break}let g=e.md.helpers.parseLinkTitle(l,i,o);for(;g.can_continue;){const y=s(a);if(y===null)break;l+=y,i=o,o=l.length,a++,g=e.md.helpers.parseLinkTitle(l,i,o,g)}let v;for(i<o&&m!==i&&g.ok?(v=g.str,i=g.pos):(v="",i=h,a=p);i<o;){const y=l.charCodeAt(i);if(!br(y))break;i++}if(i<o&&l.charCodeAt(i)!==10&&v)for(v="",i=h,a=p;i<o;){const y=l.charCodeAt(i);if(!br(y))break;i++}if(i<o&&l.charCodeAt(i)!==10)return!1;const b=eb(l.slice(1,c));return b?(n||(typeof e.env.references>"u"&&(e.env.references={}),typeof e.env.references[b]>"u"&&(e.env.references[b]={title:v,href:f}),e.line=a),!0):!1}const fee=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],hee="[a-zA-Z_:][a-zA-Z0-9:._-]*",pee="[^\"'=<>`\\x00-\\x20]+",mee="'[^']*'",gee='"[^"]*"',vee="(?:"+pee+"|"+mee+"|"+gee+")",bee="(?:\\s+"+hee+"(?:\\s*=\\s*"+vee+")?)",ZM="<[A-Za-z][A-Za-z0-9\\-]*"+bee+"*\\s*\\/?>",e6="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",_ee="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",yee="<[?][\\s\\S]*?[?]>",xee="<![A-Za-z][^>]*>",See="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",wee=new RegExp("^(?:"+ZM+"|"+e6+"|"+_ee+"|"+yee+"|"+xee+"|"+See+")"),Eee=new RegExp("^(?:"+ZM+"|"+e6+")"),iu=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+fee.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(Eee.source+"\\s*$"),/^$/,!1]];function kee(e,t,r,n){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(i)!==60)return!1;let a=e.src.slice(i,o),s=0;for(;s<iu.length&&!iu[s][0].test(a);s++);if(s===iu.length)return!1;if(n)return iu[s][2];let l=t+1;const c=iu[s][1].test("");if(!iu[s][1].test(a)){for(;l<r&&!(e.sCount[l]<e.blkIndent&&(c||!e.isEmpty(l)));l++)if(i=e.bMarks[l]+e.tShift[l],o=e.eMarks[l],a=e.src.slice(i,o),iu[s][1].test(a)){a.length!==0&&l++;break}}e.line=l;const d=e.push("html_block","",0);return d.map=[t,l],d.content=e.getLines(t,l,e.blkIndent,!0),!0}function Cee(e,t,r,n){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let a=e.src.charCodeAt(i);if(a!==35||i>=o)return!1;let s=1;for(a=e.src.charCodeAt(++i);a===35&&i<o&&s<=6;)s++,a=e.src.charCodeAt(++i);if(s>6||i<o&&!br(a))return!1;if(n)return!0;o=e.skipSpacesBack(o,i);const l=e.skipCharsBack(o,35,i);l>i&&br(e.src.charCodeAt(l-1))&&(o=l),e.line=t+1;const c=e.push("heading_open","h"+String(s),1);c.markup="########".slice(0,s),c.map=[t,e.line];const d=e.push("inline","",0);d.content=tb(e.src.slice(i,o)),d.map=[t,e.line],d.children=[];const f=e.push("heading_close","h"+String(s),-1);return f.markup="########".slice(0,s),!0}function Ree(e,t,r){const n=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;const i=e.parentType;e.parentType="paragraph";let o=0,a,s=t+1;for(;s<r&&!e.isEmpty(s);s++){if(e.sCount[s]-e.blkIndent>3)continue;if(e.sCount[s]>=e.blkIndent){let p=e.bMarks[s]+e.tShift[s];const m=e.eMarks[s];if(p<m&&(a=e.src.charCodeAt(p),(a===45||a===61)&&(p=e.skipChars(p,a),p=e.skipSpaces(p),p>=m))){o=a===61?1:2;break}}if(e.sCount[s]<0)continue;let h=!1;for(let p=0,m=n.length;p<m;p++)if(n[p](e,s,r,!0)){h=!0;break}if(h)break}if(!o)return e.parentType=i,!1;const l=tb(e.getLines(t,s,e.blkIndent,!1));e.line=s+1;const c=e.push("heading_open","h"+String(o),1);c.markup=String.fromCharCode(a),c.map=[t,e.line];const d=e.push("inline","",0);d.content=l,d.map=[t,e.line-1],d.children=[];const f=e.push("heading_close","h"+String(o),-1);return f.markup=String.fromCharCode(a),e.parentType=i,!0}function Aee(e,t,r){const n=e.md.block.ruler.getRules("paragraph"),i=e.parentType;let o=t+1;for(e.parentType="paragraph";o<r&&!e.isEmpty(o);o++){if(e.sCount[o]-e.blkIndent>3||e.sCount[o]<0)continue;let c=!1;for(let d=0,f=n.length;d<f;d++)if(n[d](e,o,r,!0)){c=!0;break}if(c)break}const a=tb(e.getLines(t,o,e.blkIndent,!1));e.line=o;const s=e.push("paragraph_open","p",1);s.map=[t,e.line];const l=e.push("inline","",0);return l.content=a,l.map=[t,e.line],l.children=[],e.push("paragraph_close","p",-1),e.parentType=i,!0}const zm=[["table",iee,["paragraph","reference"]],["code",oee],["fence",aee,["paragraph","reference","blockquote","list"]],["blockquote",see,["paragraph","reference","blockquote","list"]],["hr",lee,["paragraph","reference","blockquote","list"]],["list",cee,["paragraph","reference","blockquote"]],["reference",dee],["html_block",kee,["paragraph","reference","blockquote"]],["heading",Cee,["paragraph","reference","blockquote"]],["lheading",Ree],["paragraph",Aee]];function rb(){this.ruler=new Ui;for(let e=0;e<zm.length;e++)this.ruler.push(zm[e][0],zm[e][1],{alt:(zm[e][2]||[]).slice()})}rb.prototype.tokenize=function(e,t,r){const n=this.ruler.getRules(""),i=n.length,o=e.md.options.maxNesting;let a=t,s=!1;for(;a<r&&(e.line=a=e.skipEmptyLines(a),!(a>=r||e.sCount[a]<e.blkIndent));){if(e.level>=o){e.line=r;break}const l=e.line;let c=!1;for(let d=0;d<i;d++)if(c=n[d](e,a,r,!1),c){if(l>=e.line)throw new Error("block rule didn't increment state.line");break}if(!c)throw new Error("none of the block rules matched");e.tight=!s,e.isEmpty(e.line-1)&&(s=!0),a=e.line,a<r&&e.isEmpty(a)&&(s=!0,a++,e.line=a)}};rb.prototype.parse=function(e,t,r,n){if(!e)return;const i=new this.State(e,t,r,n);this.tokenize(i,i.line,i.lineMax)};rb.prototype.State=Za;function zp(e,t,r,n){this.src=e,this.env=r,this.md=t,this.tokens=n,this.tokens_meta=Array(n.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}zp.prototype.pushPending=function(){const e=new va("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e};zp.prototype.push=function(e,t,r){this.pending&&this.pushPending();const n=new va(e,t,r);let i=null;return r<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),n.level=this.level,r>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],i={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(n),this.tokens_meta.push(i),n};zp.prototype.scanDelims=function(e,t){const r=this.posMax,n=this.src.charCodeAt(e);let i;if(e===0)i=32;else if(e===1)i=this.src.charCodeAt(0),(i&63488)===55296&&(i=65533);else if(i=this.src.charCodeAt(e-1),(i&64512)===56320){const v=this.src.charCodeAt(e-2);i=(v&64512)===55296?65536+(v-55296<<10)+(i-56320):65533}else(i&64512)===55296&&(i=65533);let o=e;for(;o<r&&this.src.charCodeAt(o)===n;)o++;const a=o-e;let s=o<r?this.src.charCodeAt(o):32;if((s&64512)===55296){const v=this.src.charCodeAt(o+1);s=(v&64512)===56320?65536+(s-55296<<10)+(v-56320):65533}else(s&64512)===56320&&(s=65533);const l=Vh(i)||qh(i),c=Vh(s)||qh(s),d=jh(i),f=jh(s),h=!f&&(!c||d||l),p=!d&&(!l||f||c);return{can_open:h&&(t||!p||l),can_close:p&&(t||!h||c),length:a}};zp.prototype.Token=va;function Tee(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function $ee(e,t){let r=e.pos;for(;r<e.posMax&&!Tee(e.src.charCodeAt(r));)r++;return r===e.pos?!1:(t||(e.pending+=e.src.slice(e.pos,r)),e.pos=r,!0)}const Nee=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function Dee(e,t){if(!e.md.options.linkify||e.linkLevel>0)return!1;const r=e.pos,n=e.posMax;if(r+3>n||e.src.charCodeAt(r)!==58||e.src.charCodeAt(r+1)!==47||e.src.charCodeAt(r+2)!==47)return!1;const i=e.pending.match(Nee);if(!i)return!1;const o=i[1],a=e.md.linkify.matchAtStart(e.src.slice(r-o.length));if(!a)return!1;let s=a.url;if(s.length<=o.length)return!1;let l=s.length;for(;l>0&&s.charCodeAt(l-1)===42;)l--;l!==s.length&&(s=s.slice(0,l));const c=e.md.normalizeLink(s);if(!e.md.validateLink(c))return!1;if(!t){e.pending=e.pending.slice(0,-o.length);const d=e.push("link_open","a",1);d.attrs=[["href",c]],d.markup="linkify",d.info="auto";const f=e.push("text","",0);f.content=e.md.normalizeLinkText(s);const h=e.push("link_close","a",-1);h.markup="linkify",h.info="auto"}return e.pos+=s.length-o.length,!0}function Fee(e,t){let r=e.pos;if(e.src.charCodeAt(r)!==10)return!1;const n=e.pending.length-1,i=e.posMax;if(!t)if(n>=0&&e.pending.charCodeAt(n)===32)if(n>=1&&e.pending.charCodeAt(n-1)===32){let o=n-1;for(;o>=1&&e.pending.charCodeAt(o-1)===32;)o--;e.pending=e.pending.slice(0,o),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(r++;r<i&&br(e.src.charCodeAt(r));)r++;return e.pos=r,!0}const Xw=[];for(let e=0;e<256;e++)Xw.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){Xw[e.charCodeAt(0)]=1});function Iee(e,t){let r=e.pos;const n=e.posMax;if(e.src.charCodeAt(r)!==92||(r++,r>=n))return!1;let i=e.src.charCodeAt(r);if(i===10){for(t||e.push("hardbreak","br",0),r++;r<n&&(i=e.src.charCodeAt(r),!!br(i));)r++;return e.pos=r,!0}let o=e.src[r];if(i>=55296&&i<=56319&&r+1<n){const s=e.src.charCodeAt(r+1);s>=56320&&s<=57343&&(o+=e.src[r+1],r++)}const a="\\"+o;if(!t){const s=e.push("text_special","",0);i<256&&Xw[i]!==0?s.content=o:s.content=a,s.markup=a,s.info="escape"}return e.pos=r+1,!0}function Pee(e,t){let r=e.pos;if(e.src.charCodeAt(r)!==96)return!1;const i=r;r++;const o=e.posMax;for(;r<o&&e.src.charCodeAt(r)===96;)r++;const a=e.src.slice(i,r),s=a.length;if(e.backticksScanned&&(e.backticks[s]||0)<=i)return t||(e.pending+=a),e.pos+=s,!0;let l=r,c;for(;(c=e.src.indexOf("`",l))!==-1;){for(l=c+1;l<o&&e.src.charCodeAt(l)===96;)l++;const d=l-c;if(d===s){if(!t){const f=e.push("code_inline","code",0);f.markup=a,f.content=e.src.slice(r,c).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return e.pos=l,!0}e.backticks[d]=c}return e.backticksScanned=!0,t||(e.pending+=a),e.pos+=s,!0}function Oee(e,t){const r=e.pos,n=e.src.charCodeAt(r);if(t||n!==126)return!1;const i=e.scanDelims(e.pos,!0);let o=i.length;const a=String.fromCharCode(n);if(o<2)return!1;let s;o%2&&(s=e.push("text","",0),s.content=a,o--);for(let l=0;l<o;l+=2)s=e.push("text","",0),s.content=a+a,e.delimiters.push({marker:n,length:0,token:e.tokens.length-1,end:-1,open:i.can_open,close:i.can_close});return e.pos+=i.length,!0}function NA(e,t){let r;const n=[],i=t.length;for(let o=0;o<i;o++){const a=t[o];if(a.marker!==126||a.end===-1)continue;const s=t[a.end];r=e.tokens[a.token],r.type="s_open",r.tag="s",r.nesting=1,r.markup="~~",r.content="",r=e.tokens[s.token],r.type="s_close",r.tag="s",r.nesting=-1,r.markup="~~",r.content="",e.tokens[s.token-1].type==="text"&&e.tokens[s.token-1].content==="~"&&n.push(s.token-1)}for(;n.length;){const o=n.pop();let a=o+1;for(;a<e.tokens.length&&e.tokens[a].type==="s_close";)a++;a--,o!==a&&(r=e.tokens[a],e.tokens[a]=e.tokens[o],e.tokens[o]=r)}}function Mee(e){const t=e.tokens_meta,r=e.tokens_meta.length;NA(e,e.delimiters);for(let n=0;n<r;n++)t[n]&&t[n].delimiters&&NA(e,t[n].delimiters)}const t6={tokenize:Oee,postProcess:Mee};function Lee(e,t){const r=e.pos,n=e.src.charCodeAt(r);if(t||n!==95&&n!==42)return!1;const i=e.scanDelims(e.pos,n===42);for(let o=0;o<i.length;o++){const a=e.push("text","",0);a.content=String.fromCharCode(n),e.delimiters.push({marker:n,length:i.length,token:e.tokens.length-1,end:-1,open:i.can_open,close:i.can_close})}return e.pos+=i.length,!0}function DA(e,t){const r=t.length;for(let n=r-1;n>=0;n--){const i=t[n];if(i.marker!==95&&i.marker!==42||i.end===-1)continue;const o=t[i.end],a=n>0&&t[n-1].end===i.end+1&&t[n-1].marker===i.marker&&t[n-1].token===i.token-1&&t[i.end+1].token===o.token+1,s=String.fromCharCode(i.marker),l=e.tokens[i.token];l.type=a?"strong_open":"em_open",l.tag=a?"strong":"em",l.nesting=1,l.markup=a?s+s:s,l.content="";const c=e.tokens[o.token];c.type=a?"strong_close":"em_close",c.tag=a?"strong":"em",c.nesting=-1,c.markup=a?s+s:s,c.content="",a&&(e.tokens[t[n-1].token].content="",e.tokens[t[i.end+1].token].content="",n--)}}function zee(e){const t=e.tokens_meta,r=e.tokens_meta.length;DA(e,e.delimiters);for(let n=0;n<r;n++)t[n]&&t[n].delimiters&&DA(e,t[n].delimiters)}const r6={tokenize:Lee,postProcess:zee};function Uee(e,t){let r,n,i,o,a="",s="",l=e.pos,c=!0;if(e.src.charCodeAt(e.pos)!==91)return!1;const d=e.pos,f=e.posMax,h=e.pos+1,p=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(p<0)return!1;let m=p+1;if(m<f&&e.src.charCodeAt(m)===40){for(c=!1,m++;m<f&&(r=e.src.charCodeAt(m),!(!br(r)&&r!==10));m++);if(m>=f)return!1;if(l=m,i=e.md.helpers.parseLinkDestination(e.src,m,e.posMax),i.ok){for(a=e.md.normalizeLink(i.str),e.md.validateLink(a)?m=i.pos:a="",l=m;m<f&&(r=e.src.charCodeAt(m),!(!br(r)&&r!==10));m++);if(i=e.md.helpers.parseLinkTitle(e.src,m,e.posMax),m<f&&l!==m&&i.ok)for(s=i.str,m=i.pos;m<f&&(r=e.src.charCodeAt(m),!(!br(r)&&r!==10));m++);}(m>=f||e.src.charCodeAt(m)!==41)&&(c=!0),m++}if(c){if(typeof e.env.references>"u")return!1;if(m<f&&e.src.charCodeAt(m)===91?(l=m+1,m=e.md.helpers.parseLinkLabel(e,m),m>=0?n=e.src.slice(l,m++):m=p+1):m=p+1,n||(n=e.src.slice(h,p)),o=e.env.references[eb(n)],!o)return e.pos=d,!1;a=o.href,s=o.title}if(!t){e.pos=h,e.posMax=p;const g=e.push("link_open","a",1),v=[["href",a]];g.attrs=v,s&&v.push(["title",s]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=m,e.posMax=f,!0}function Bee(e,t){let r,n,i,o,a,s,l,c,d="";const f=e.pos,h=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;const p=e.pos+2,m=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(m<0)return!1;if(o=m+1,o<h&&e.src.charCodeAt(o)===40){for(o++;o<h&&(r=e.src.charCodeAt(o),!(!br(r)&&r!==10));o++);if(o>=h)return!1;for(c=o,s=e.md.helpers.parseLinkDestination(e.src,o,e.posMax),s.ok&&(d=e.md.normalizeLink(s.str),e.md.validateLink(d)?o=s.pos:d=""),c=o;o<h&&(r=e.src.charCodeAt(o),!(!br(r)&&r!==10));o++);if(s=e.md.helpers.parseLinkTitle(e.src,o,e.posMax),o<h&&c!==o&&s.ok)for(l=s.str,o=s.pos;o<h&&(r=e.src.charCodeAt(o),!(!br(r)&&r!==10));o++);else l="";if(o>=h||e.src.charCodeAt(o)!==41)return e.pos=f,!1;o++}else{if(typeof e.env.references>"u")return!1;if(o<h&&e.src.charCodeAt(o)===91?(c=o+1,o=e.md.helpers.parseLinkLabel(e,o),o>=0?i=e.src.slice(c,o++):o=m+1):o=m+1,i||(i=e.src.slice(p,m)),a=e.env.references[eb(i)],!a)return e.pos=f,!1;d=a.href,l=a.title}if(!t){n=e.src.slice(p,m);const g=[];e.md.inline.parse(n,e.md,e.env,g);const v=e.push("image","img",0),b=[["src",d],["alt",""]];v.attrs=b,v.children=g,v.content=n,l&&b.push(["title",l])}return e.pos=o,e.posMax=h,!0}const jee=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,qee=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function Vee(e,t){let r=e.pos;if(e.src.charCodeAt(r)!==60)return!1;const n=e.pos,i=e.posMax;for(;;){if(++r>=i)return!1;const a=e.src.charCodeAt(r);if(a===60)return!1;if(a===62)break}const o=e.src.slice(n+1,r);if(qee.test(o)){const a=e.md.normalizeLink(o);if(!e.md.validateLink(a))return!1;if(!t){const s=e.push("link_open","a",1);s.attrs=[["href",a]],s.markup="autolink",s.info="auto";const l=e.push("text","",0);l.content=e.md.normalizeLinkText(o);const c=e.push("link_close","a",-1);c.markup="autolink",c.info="auto"}return e.pos+=o.length+2,!0}if(jee.test(o)){const a=e.md.normalizeLink("mailto:"+o);if(!e.md.validateLink(a))return!1;if(!t){const s=e.push("link_open","a",1);s.attrs=[["href",a]],s.markup="autolink",s.info="auto";const l=e.push("text","",0);l.content=e.md.normalizeLinkText(o);const c=e.push("link_close","a",-1);c.markup="autolink",c.info="auto"}return e.pos+=o.length+2,!0}return!1}function Gee(e){return/^<a[>\s]/i.test(e)}function Kee(e){return/^<\/a\s*>/i.test(e)}function Hee(e){const t=e|32;return t>=97&&t<=122}function Wee(e,t){if(!e.md.options.html)return!1;const r=e.posMax,n=e.pos;if(e.src.charCodeAt(n)!==60||n+2>=r)return!1;const i=e.src.charCodeAt(n+1);if(i!==33&&i!==63&&i!==47&&!Hee(i))return!1;const o=e.src.slice(n).match(wee);if(!o)return!1;if(!t){const a=e.push("html_inline","",0);a.content=o[0],Gee(a.content)&&e.linkLevel++,Kee(a.content)&&e.linkLevel--}return e.pos+=o[0].length,!0}const Jee=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,Qee=/^&([a-z][a-z0-9]{1,31});/i;function Yee(e,t){const r=e.pos,n=e.posMax;if(e.src.charCodeAt(r)!==38||r+1>=n)return!1;if(e.src.charCodeAt(r+1)===35){const o=e.src.slice(r).match(Jee);if(o){if(!t){const a=o[1][0].toLowerCase()==="x"?parseInt(o[1].slice(1),16):parseInt(o[1],10),s=e.push("text_special","",0);s.content=Qw(a)?Bh(a):Bh(65533),s.markup=o[0],s.info="entity"}return e.pos+=o[0].length,!0}}else{const o=e.src.slice(r).match(Qee);if(o){const a=gZ(o[0]);if(a!==o[0]){if(!t){const s=e.push("text_special","",0);s.content=a,s.markup=o[0],s.info="entity"}return e.pos+=o[0].length,!0}}}return!1}function FA(e){const t={},r=e.length;if(!r)return;let n=0,i=-2;const o=[];for(let a=0;a<r;a++){const s=e[a];if(o.push(0),(e[n].marker!==s.marker||i!==s.token-1)&&(n=a),i=s.token,s.length=s.length||0,!s.close)continue;t.hasOwnProperty(s.marker)||(t[s.marker]=[-1,-1,-1,-1,-1,-1]);const l=t[s.marker][(s.open?3:0)+s.length%3];let c=n-o[n]-1,d=c;for(;c>l;c-=o[c]+1){const f=e[c];if(f.marker===s.marker&&f.open&&f.end<0){let h=!1;if((f.close||s.open)&&(f.length+s.length)%3===0&&(f.length%3!==0||s.length%3!==0)&&(h=!0),!h){const p=c>0&&!e[c-1].open?o[c-1]+1:0;o[a]=a-c+p,o[c]=p,s.open=!1,f.end=a,f.close=!1,d=-1,i=-2;break}}}d!==-1&&(t[s.marker][(s.open?3:0)+(s.length||0)%3]=d)}}function Xee(e){const t=e.tokens_meta,r=e.tokens_meta.length;FA(e.delimiters);for(let n=0;n<r;n++)t[n]&&t[n].delimiters&&FA(t[n].delimiters)}function Zee(e){let t,r,n=0;const i=e.tokens,o=e.tokens.length;for(t=r=0;t<o;t++)i[t].nesting<0&&n--,i[t].level=n,i[t].nesting>0&&n++,i[t].type==="text"&&t+1<o&&i[t+1].type==="text"?i[t+1].content=i[t].content+i[t+1].content:(t!==r&&(i[r]=i[t]),r++);t!==r&&(i.length=r)}const B_=[["text",$ee],["linkify",Dee],["newline",Fee],["escape",Iee],["backticks",Pee],["strikethrough",t6.tokenize],["emphasis",r6.tokenize],["link",Uee],["image",Bee],["autolink",Vee],["html_inline",Wee],["entity",Yee]],j_=[["balance_pairs",Xee],["strikethrough",t6.postProcess],["emphasis",r6.postProcess],["fragments_join",Zee]];function Up(){this.ruler=new Ui;for(let e=0;e<B_.length;e++)this.ruler.push(B_[e][0],B_[e][1]);this.ruler2=new Ui;for(let e=0;e<j_.length;e++)this.ruler2.push(j_[e][0],j_[e][1])}Up.prototype.skipToken=function(e){const t=e.pos,r=this.ruler.getRules(""),n=r.length,i=e.md.options.maxNesting,o=e.cache;if(typeof o[t]<"u"){e.pos=o[t];return}let a=!1;if(e.level<i){for(let s=0;s<n;s++)if(e.level++,a=r[s](e,!0),e.level--,a){if(t>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;a||e.pos++,o[t]=e.pos};Up.prototype.tokenize=function(e){const t=this.ruler.getRules(""),r=t.length,n=e.posMax,i=e.md.options.maxNesting;for(;e.pos<n;){const o=e.pos;let a=!1;if(e.level<i){for(let s=0;s<r;s++)if(a=t[s](e,!1),a){if(o>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(a){if(e.pos>=n)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()};Up.prototype.parse=function(e,t,r,n){const i=new this.State(e,t,r,n);this.tokenize(i);const o=this.ruler2.getRules(""),a=o.length;for(let s=0;s<a;s++)o[s](i)};Up.prototype.State=zp;function ete(e){const t={};e=e||{},t.src_Any=jM.source,t.src_Cc=qM.source,t.src_Z=GM.source,t.src_P=Ww.source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");const r="[><|]";return t.src_pseudo_letter="(?:(?!"+r+"|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|"+r+"|"+t.src_ZPCc+")(?!"+(e["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+r+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]|$)|"+(e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+t.src_ZCc+"|$)|;(?!"+t.src_ZCc+"|$)|\\!+(?!"+t.src_ZCc+"|[!]|$)|\\?(?!"+t.src_ZCc+"|[?]|$))+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy="(^|"+r+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}function xx(e){return Array.prototype.slice.call(arguments,1).forEach(function(r){r&&Object.keys(r).forEach(function(n){e[n]=r[n]})}),e}function nb(e){return Object.prototype.toString.call(e)}function tte(e){return nb(e)==="[object String]"}function rte(e){return nb(e)==="[object Object]"}function nte(e){return nb(e)==="[object RegExp]"}function IA(e){return nb(e)==="[object Function]"}function ite(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const n6={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function ote(e){return Object.keys(e||{}).reduce(function(t,r){return t||n6.hasOwnProperty(r)},!1)}const ate={"http:":{validate:function(e,t,r){const n=e.slice(t);return r.re.http||(r.re.http=new RegExp("^\\/\\/"+r.re.src_auth+r.re.src_host_port_strict+r.re.src_path,"i")),r.re.http.test(n)?n.match(r.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,r){const n=e.slice(t);return r.re.no_http||(r.re.no_http=new RegExp("^"+r.re.src_auth+"(?:localhost|(?:(?:"+r.re.src_domain+")\\.)+"+r.re.src_domain_root+")"+r.re.src_port+r.re.src_host_terminator+r.re.src_path,"i")),r.re.no_http.test(n)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:n.match(r.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,r){const n=e.slice(t);return r.re.mailto||(r.re.mailto=new RegExp("^"+r.re.src_email_name+"@"+r.re.src_host_strict,"i")),r.re.mailto.test(n)?n.match(r.re.mailto)[0].length:0}}},ste="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",lte="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function ute(e){return function(t,r){const n=t.slice(r);return e.test(n)?n.match(e)[0].length:0}}function PA(){return function(e,t){t.normalize(e)}}function R0(e){const t=e.re=ete(e.__opts__),r=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||r.push(ste),r.push(t.src_xn),t.src_tlds=r.join("|");function n(s){return s.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(n(t.tpl_email_fuzzy),"i"),t.email_fuzzy_global=RegExp(n(t.tpl_email_fuzzy),"ig"),t.link_fuzzy=RegExp(n(t.tpl_link_fuzzy),"i"),t.link_fuzzy_global=RegExp(n(t.tpl_link_fuzzy),"ig"),t.link_no_ip_fuzzy=RegExp(n(t.tpl_link_no_ip_fuzzy),"i"),t.link_no_ip_fuzzy_global=RegExp(n(t.tpl_link_no_ip_fuzzy),"ig"),t.host_fuzzy_test=RegExp(n(t.tpl_host_fuzzy_test),"i");const i=[];e.__compiled__={};function o(s,l){throw new Error('(LinkifyIt) Invalid schema "'+s+'": '+l)}Object.keys(e.__schemas__).forEach(function(s){const l=e.__schemas__[s];if(l===null)return;const c={validate:null,link:null};if(e.__compiled__[s]=c,rte(l)){nte(l.validate)?c.validate=ute(l.validate):IA(l.validate)?c.validate=l.validate:o(s,l),IA(l.normalize)?c.normalize=l.normalize:l.normalize?o(s,l):c.normalize=PA();return}if(tte(l)){i.push(s);return}o(s,l)}),i.forEach(function(s){e.__compiled__[e.__schemas__[s]]&&(e.__compiled__[s].validate=e.__compiled__[e.__schemas__[s]].validate,e.__compiled__[s].normalize=e.__compiled__[e.__schemas__[s]].normalize)}),e.__compiled__[""]={validate:null,normalize:PA()};const a=Object.keys(e.__compiled__).filter(function(s){return s.length>0&&e.__compiled__[s]}).map(ite).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+a+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+a+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i")}function i6(e,t,r,n){const i=e.slice(r,n);this.schema=t.toLowerCase(),this.index=r,this.lastIndex=n,this.raw=i,this.text=i,this.url=i}function lo(e,t){if(!(this instanceof lo))return new lo(e,t);t||ote(e)&&(t=e,e={}),this.__opts__=xx({},n6,t),this.__schemas__=xx({},ate,e),this.__compiled__={},this.__tlds__=lte,this.__tlds_replaced__=!1,this.re={},R0(this)}lo.prototype.add=function(t,r){return this.__schemas__[t]=r,R0(this),this};lo.prototype.set=function(t){return this.__opts__=xx(this.__opts__,t),this};lo.prototype.test=function(t){if(!t.length)return!1;let r,n;if(this.re.schema_test.test(t)){for(n=this.re.schema_search,n.lastIndex=0;(r=n.exec(t))!==null;)if(this.testSchemaAt(t,r[2],n.lastIndex))return!0}return!!(this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&t.search(this.re.host_fuzzy_test)>=0&&t.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy)!==null||this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&t.indexOf("@")>=0&&t.match(this.re.email_fuzzy)!==null)};lo.prototype.pretest=function(t){return this.re.pretest.test(t)};lo.prototype.testSchemaAt=function(t,r,n){return this.__compiled__[r.toLowerCase()]?this.__compiled__[r.toLowerCase()].validate(t,n,this):0};lo.prototype.match=function(t){const r=[],n=[],i=[],o=[];let a,s,l;function c(h,p){return h?p?h.index!==p.index?h.index<p.index?h:p:h.lastIndex>=p.lastIndex?h:p:h:p}if(!t.length)return null;if(this.re.schema_test.test(t))for(l=this.re.schema_search,l.lastIndex=0;(a=l.exec(t))!==null;)s=this.testSchemaAt(t,a[2],l.lastIndex),s&&n.push({schema:a[2],index:a.index+a[1].length,lastIndex:a.index+a[0].length+s});if(this.__opts__.fuzzyLink&&this.__compiled__["http:"])for(l=this.__opts__.fuzzyIP?this.re.link_fuzzy_global:this.re.link_no_ip_fuzzy_global,l.lastIndex=0;(a=l.exec(t))!==null;)i.push({schema:"",index:a.index+a[1].length,lastIndex:a.index+a[0].length});if(this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"])for(l=this.re.email_fuzzy_global,l.lastIndex=0;(a=l.exec(t))!==null;)o.push({schema:"mailto:",index:a.index+a[1].length,lastIndex:a.index+a[0].length});const d=[0,0,0];let f=0;for(;;){const h=[n[d[0]],o[d[1]],i[d[2]]],p=c(c(h[0],h[1]),h[2]);if(!p)break;if(p===h[0]?d[0]++:p===h[1]?d[1]++:d[2]++,p.index<f)continue;const m=new i6(t,p.schema,p.index,p.lastIndex);this.__compiled__[m.schema].normalize(m,this),r.push(m),f=p.lastIndex}return r.length?r:null};lo.prototype.matchAtStart=function(t){if(!t.length)return null;const r=this.re.schema_at_start.exec(t);if(!r)return null;const n=this.testSchemaAt(t,r[2],r[0].length);if(!n)return null;const i=new i6(t,r[2],r.index+r[1].length,r.index+r[0].length+n);return this.__compiled__[i.schema].normalize(i,this),i};lo.prototype.tlds=function(t,r){return t=Array.isArray(t)?t:[t],r?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(n,i,o){return n!==o[i-1]}).reverse(),R0(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,R0(this),this)};lo.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)};lo.prototype.onCompile=function(){};const od=2147483647,Oa=36,Zw=1,Gh=26,cte=38,dte=700,o6=72,a6=128,s6="-",fte=/^xn--/,hte=/[^\0-\x7F]/,pte=/[\x2E\u3002\uFF0E\uFF61]/g,mte={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},q_=Oa-Zw,Ma=Math.floor,V_=String.fromCharCode;function cl(e){throw new RangeError(mte[e])}function gte(e,t){const r=[];let n=e.length;for(;n--;)r[n]=t(e[n]);return r}function l6(e,t){const r=e.split("@");let n="";r.length>1&&(n=r[0]+"@",e=r[1]),e=e.replace(pte,".");const i=e.split("."),o=gte(i,t).join(".");return n+o}function u6(e){const t=[];let r=0;const n=e.length;for(;r<n;){const i=e.charCodeAt(r++);if(i>=55296&&i<=56319&&r<n){const o=e.charCodeAt(r++);(o&64512)==56320?t.push(((i&1023)<<10)+(o&1023)+65536):(t.push(i),r--)}else t.push(i)}return t}const vte=e=>String.fromCodePoint(...e),bte=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:Oa},OA=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},c6=function(e,t,r){let n=0;for(e=r?Ma(e/dte):e>>1,e+=Ma(e/t);e>q_*Gh>>1;n+=Oa)e=Ma(e/q_);return Ma(n+(q_+1)*e/(e+cte))},d6=function(e){const t=[],r=e.length;let n=0,i=a6,o=o6,a=e.lastIndexOf(s6);a<0&&(a=0);for(let s=0;s<a;++s)e.charCodeAt(s)>=128&&cl("not-basic"),t.push(e.charCodeAt(s));for(let s=a>0?a+1:0;s<r;){const l=n;for(let d=1,f=Oa;;f+=Oa){s>=r&&cl("invalid-input");const h=bte(e.charCodeAt(s++));h>=Oa&&cl("invalid-input"),h>Ma((od-n)/d)&&cl("overflow"),n+=h*d;const p=f<=o?Zw:f>=o+Gh?Gh:f-o;if(h<p)break;const m=Oa-p;d>Ma(od/m)&&cl("overflow"),d*=m}const c=t.length+1;o=c6(n-l,c,l==0),Ma(n/c)>od-i&&cl("overflow"),i+=Ma(n/c),n%=c,t.splice(n++,0,i)}return String.fromCodePoint(...t)},f6=function(e){const t=[];e=u6(e);const r=e.length;let n=a6,i=0,o=o6;for(const l of e)l<128&&t.push(V_(l));const a=t.length;let s=a;for(a&&t.push(s6);s<r;){let l=od;for(const d of e)d>=n&&d<l&&(l=d);const c=s+1;l-n>Ma((od-i)/c)&&cl("overflow"),i+=(l-n)*c,n=l;for(const d of e)if(d<n&&++i>od&&cl("overflow"),d===n){let f=i;for(let h=Oa;;h+=Oa){const p=h<=o?Zw:h>=o+Gh?Gh:h-o;if(f<p)break;const m=f-p,g=Oa-p;t.push(V_(OA(p+m%g,0))),f=Ma(m/g)}t.push(V_(OA(f,0))),o=c6(i,c,s===a),i=0,++s}++i,++n}return t.join("")},_te=function(e){return l6(e,function(t){return fte.test(t)?d6(t.slice(4).toLowerCase()):t})},yte=function(e){return l6(e,function(t){return hte.test(t)?"xn--"+f6(t):t})},h6={version:"2.3.1",ucs2:{decode:u6,encode:vte},decode:d6,encode:f6,toASCII:yte,toUnicode:_te},xte={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},Ste={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},wte={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}},Ete={default:xte,zero:Ste,commonmark:wte},kte=/^(vbscript|javascript|file|data):/,Cte=/^data:image\/(gif|png|jpeg|webp);/;function Rte(e){const t=e.trim().toLowerCase();return kte.test(t)?Cte.test(t):!0}const p6=["http:","https:","mailto:"];function Ate(e){const t=Hw(e,!0);if(t.hostname&&(!t.protocol||p6.indexOf(t.protocol)>=0))try{t.hostname=h6.toASCII(t.hostname)}catch{}return Lp(Kw(t))}function Tte(e){const t=Hw(e,!0);if(t.hostname&&(!t.protocol||p6.indexOf(t.protocol)>=0))try{t.hostname=h6.toUnicode(t.hostname)}catch{}return Cd(Kw(t),Cd.defaultChars+"%")}function Po(e,t){if(!(this instanceof Po))return new Po(e,t);t||Jw(e)||(t=e||{},e="default"),this.inline=new Up,this.block=new rb,this.core=new Yw,this.renderer=new Jd,this.linkify=new lo,this.validateLink=Rte,this.normalizeLink=Ate,this.normalizeLinkText=Tte,this.utils=DZ,this.helpers=Zv({},OZ),this.options={},this.configure(e),t&&this.set(t)}Po.prototype.set=function(e){return Zv(this.options,e),this};Po.prototype.configure=function(e){const t=this;if(Jw(e)){const r=e;if(e=Ete[r],!e)throw new Error('Wrong `markdown-it` preset "'+r+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(r){e.components[r].rules&&t[r].ruler.enableOnly(e.components[r].rules),e.components[r].rules2&&t[r].ruler2.enableOnly(e.components[r].rules2)}),this};Po.prototype.enable=function(e,t){let r=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(i){r=r.concat(this[i].ruler.enable(e,!0))},this),r=r.concat(this.inline.ruler2.enable(e,!0));const n=e.filter(function(i){return r.indexOf(i)<0});if(n.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+n);return this};Po.prototype.disable=function(e,t){let r=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(i){r=r.concat(this[i].ruler.disable(e,!0))},this),r=r.concat(this.inline.ruler2.disable(e,!0));const n=e.filter(function(i){return r.indexOf(i)<0});if(n.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+n);return this};Po.prototype.use=function(e){const t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this};Po.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");const r=new this.core.State(e,this,t);return this.core.process(r),r.tokens};Po.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)};Po.prototype.parseInline=function(e,t){const r=new this.core.State(e,this,t);return r.inlineMode=!0,this.core.process(r),r.tokens};Po.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};function on(e){return"var("+e+")"}let $te=E([u("color",on(x.textPrimary)),u("font-size",on(T.sizeSm)),u("line-height",on(T.lineHeightRelaxed)),u("word-break","break-word"),lr("& > :first-child",[u("margin-top","0")]),lr("& > :last-child",[u("margin-bottom","0")]),lr("& h1, & h2, & h3, & h4, & h5, & h6",[u("margin","var("+O.md+") 0 var("+O.sm+")"),u("line-height",on(T.lineHeightTight)),u("font-weight",on(T.weightBold))]),lr("& h1",[u("font-size",on(T.sizeXl))]),lr("& h2",[u("font-size",on(T.sizeLg))]),lr("& h3, & h4, & h5, & h6",[u("font-size",on(T.sizeMd))]),lr("& p",[u("margin","var("+O.sm+") 0")]),lr("& a",[u("color",on(x.brand)),u("text-decoration","none")]),lr("& a:hover",[u("text-decoration","underline")]),lr("& ul, & ol",[u("margin","var("+O.sm+") 0"),u("padding-left","1.5em")]),lr("& li",[u("margin","var("+O.xs+") 0")]),lr("& code",[u("font-family",on(T.fontFamilyMono)),u("font-size","0.9em"),u("background",on(x.surfaceSubtle)),u("padding","1px 4px"),u("border-radius",on(Y.sm))]),lr("& pre",[u("background",on(x.surfaceSubtle)),u("border","1px solid var("+x.borderSubtle+")"),u("border-radius",on(Y.md)),u("padding",on(O.md)),u("overflow","auto"),u("margin","var("+O.sm+") 0")]),lr("& pre code",[u("background","none"),u("padding","0")]),lr("& blockquote",[u("margin","var("+O.sm+") 0"),u("padding-left",on(O.md)),u("border-left","3px solid var("+x.border+")"),u("color",on(x.textSecondary))]),lr("& table",[u("border-collapse","collapse"),u("margin","var("+O.sm+") 0")]),lr("& th, & td",[u("border","1px solid var("+x.borderSubtle+")"),u("padding","var("+O.xs+") var("+O.sm+")"),u("text-align","left")]),lr("& th",[u("background",on(x.surfaceSubtle)),u("font-weight",on(T.weightMedium))]),lr("& img",[u("max-width","100%"),u("border-radius",on(Y.sm))]),lr("& hr",[u("border","none"),u("border-top","1px solid var("+x.borderSubtle+")"),u("margin","var("+O.md+") 0")])]),Nte=new Po({html:!1,linkify:!0});function Dte(e){let t=e.source,r=Pt(()=>Nte.render(t),[t]),n=De(null);return Ae(()=>{ee(Mi(n.current),i=>{Array.from(i.querySelectorAll("a")).forEach(o=>{o.setAttribute("target","_blank"),o.setAttribute("rel","noopener noreferrer")})})},[r]),_("div",{ref:Dt(n),className:$te,dangerouslySetInnerHTML:{__html:r}})}let m6=Dte;function Fte(e,t){return _(m6,{source:e.body})}function Ite(){OM({id:"markdown",label:"Markdown",constraints:{},preview:Fte})}function ad(e){return Array.from(e).length}function eE(e,t){let r=Array.from(e),n=t<0?0:t;return r.length<=n?[e,""]:[r.slice(0,n).join(""),r.slice(n).join("")]}function g6(e,t){return k(t,r=>{let i=eE(e,r)[1];if(i!=="")return i})}function Rr(e){return"var("+e+")"}let Pte=E([z("flex"),_e("column"),u("gap","4px")]),MA=E([u("background",Rr(x.surface)),u("border","1px solid var("+x.border+")"),u("border-radius",Rr(Y.sm)),u("padding","var("+O.xs+") var("+O.sm+")"),u("font-family","inherit"),u("font-size",Rr(T.sizeMd)),u("line-height",Rr(T.lineHeightNormal)),u("color",Rr(x.textPrimary)),u("outline","none"),u("resize","vertical"),ma({NAME:"percent",VAL:100}),u("box-sizing","border-box"),u("transition","border-color 120ms"),js([u("border-color",Rr(x.brand))])]),Ote=E([u("border-color",Rr(x.error)),js([u("border-color",Rr(x.error))])]),Mte=E([z("flex"),X("center"),Ze("spaceBetween"),u("gap",Rr(O.sm)),u("font-size",Rr(T.sizeXs)),u("color",Rr(x.textSecondary))]),Lte=E([z("inlineFlex"),X("center"),u("gap","4px"),u("color",Rr(x.textSecondary))]),LA=E([u("font-variant-numeric","tabular-nums")]),zte=E([u("color",Rr(x.error)),u("font-weight",Rr(T.weightMedium))]),Ute=E([u("background",Rr(x.surfaceSubtle)),u("border","1px solid var("+x.borderSubtle+")"),u("border-left","3px solid var("+x.error+")"),u("border-radius",Rr(Y.sm)),u("padding","var("+O.xs+") var("+O.sm+")"),u("font-size",Rr(T.sizeXs)),u("line-height",Rr(T.lineHeightNormal)),u("white-space","pre-wrap"),u("word-break","break-word"),u("max-height","8em"),u("overflow","auto")]),Bte=E([u("color",Rr(x.textSecondary)),u("font-size",Rr(T.sizeXs)),Ip(ke(2))]),jte=E([u("color",Rr(x.textPrimary))]),qte=E([u("color",Rr(x.error)),u("font-weight",Rr(T.weightMedium))]),Vte=E([u("color",Rr(x.textDisabled)),u("text-decoration","line-through")]);function v6(e){return e.toString()+" character"+(e===1?"":"s")}function b6(e,t){return t!==void 0?e>t?(e-t|0).toString()+" over the "+t.toString()+"-character limit":e.toString()+" / "+t.toString():e.toString()+" characters"}function Gte(e){let t=e.note,r=e.hasError,n=e.rows,i=e.channelLabel,o=e.maxLength,a=e.onBlur,s=e.onChange,l=e.value,c=a!==void 0?a:()=>{},d=n!==void 0?n:6,f=r!==void 0?r:!1,h=Array.from(l).length,p=g6(l,o),m=Ee(p),g=f||m?MA+" "+Ote:MA,v;if(p!==void 0&&o!==void 0){let b=eE(l,o);v=L("div",{children:[_("div",{children:"Sent as:",className:Bte}),L("div",{children:[_("span",{children:b[0],className:jte}),_("span",{children:"✂",className:qte}),_("span",{children:p,className:Vte})],className:Ute})]})}else v=null;return L("div",{children:[_("textarea",{className:g,name:e.name,placeholder:e.placeholder,rows:d,value:l,onBlur:b=>c(),onChange:b=>s(b.target.value)}),L("div",{children:[L("span",{children:[i!==void 0?i:null,t!==void 0?Ee(i)?" · "+t:t:null],className:Lte}),_("span",{children:b6(h,o),className:m?LA+" "+zte:LA})],className:Mte}),v],className:Pte})}let Kte=Gte;VX();Ite();function nr(e){return"var("+e+")"}let Hte=E([z("flex"),_e("column"),u("gap",nr(O.sm)),u("background",nr(x.surface)),u("border","1px solid var("+x.border+")"),u("border-radius",nr(Y.md)),u("padding",nr(O.md))]),Wte=E([z("flex"),X("center"),Ze("spaceBetween"),u("gap",nr(O.sm))]),Jte=E([u("font-size",nr(T.sizeSm)),u("font-weight",nr(T.weightMedium)),u("color",nr(x.textPrimary))]),Qte=E([u("font-size",nr(T.sizeXs)),u("color",nr(x.textSecondary))]),Um=E([u("font-size",nr(T.sizeXs)),u("color",nr(x.textSecondary)),u("font-variant-numeric","tabular-nums"),u("white-space","nowrap")]),zA=E([u("color",nr(x.error)),u("font-weight",nr(T.weightMedium))]),Yte=E([z("flex"),X("baseline"),Ze("spaceBetween"),u("gap",nr(O.sm)),u("border-bottom","1px solid var("+x.borderSubtle+")"),u("padding-bottom",nr(O.xs))]),Xte=E([u("font-size",nr(T.sizeMd)),u("font-weight",nr(T.weightMedium)),u("color",nr(x.textPrimary)),u("word-break","break-word")]),Zte=E([u("color",nr(x.textDisabled)),u("text-decoration","line-through")]),ere=E([u("color",nr(x.error)),u("font-weight",nr(T.weightMedium))]),tre=E([u("margin","0"),u("font-family","inherit"),u("font-size",nr(T.sizeSm)),u("line-height",nr(T.lineHeightRelaxed)),u("color",nr(x.textPrimary)),u("white-space","pre-wrap"),u("word-break","break-word")]),rre=E([u("max-width","100%"),u("border-radius",nr(Y.sm)),u("border","1px solid var("+x.borderSubtle+")"),u("object-fit","cover")]),nre=E([u("font-size",nr(T.sizeXs)),u("color",nr(x.error)),u("background",nr(x.surfaceSubtle)),u("border-left","3px solid var("+x.error+")"),u("border-radius",nr(Y.sm)),u("padding","var("+O.xs+") var("+O.sm+")")]);function UA(e,t){let r=eE(e,t),n=r[1];return n===""?e:L(Bt,{children:[r[0],_("span",{children:"✂",className:ere}),_("span",{children:n,className:Zte})]})}function ire(e){let t=e.showHeader,r=e.message,n=e.channelId,i=t!==void 0?t:!0,o=MM(n);Ae(()=>{ir(o)&&CX(n,"ChannelPreview")},[n]);let a=ne(o,n,b=>b.label),s=ne(o,LM,b=>b.constraints),l=ad(r.body),c=g6(r.body,s.maxLength),d=r.subject,f;if(d!==void 0){let b=s.subjectMaxLength,y=ad(d),S=ne(b,!1,w=>y>w);f=L("div",{children:[_("span",{children:b!==void 0?UA(d,b):d,className:Xte}),b!==void 0?_("span",{children:y.toString()+" / "+b.toString(),className:S?Um+" "+zA:Um}):null],className:Yte})}else f=null;let h=k(o,b=>b.preview),p;if(h!==void 0)p=h(r,s);else{let b=s.maxLength;p=_("pre",{children:b!==void 0?UA(r.body,b):r.body,className:tre})}let m=r.imageUrl,g;if(m!==void 0){let b=s.mediaAspect;g=_("img",{className:rre,style:b!==void 0?OX({},"aspectRatio",b):{},alt:"Message media",src:Ou(m)})}else g=null;let v=s.note;return L("div",{children:[i?L("div",{children:[_("span",{children:a,className:Jte}),_("span",{children:b6(l,s.maxLength),className:Ee(c)?Um+" "+zA:Um})],className:Wte}):null,f,p,c!==void 0?_("div",{children:v6(ad(c))+" past the limit — "+a+" will cut the tail.",className:nre}):null,g,v!==void 0?_("span",{children:v,className:Qte}):null],className:Hte})}let ore=ire;function ae(e,...t){const r=new URL("https://lexical.dev/docs/error"),n=new URLSearchParams;n.append("code",e);for(const i of t)n.append("v",i);throw r.search=n.toString(),Error(`Minified Lexical error #${e}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function _6(e,...t){const r=new URL("https://lexical.dev/docs/error"),n=new URLSearchParams;n.append("code",e);for(const i of t)n.append("v",i);r.search=n.toString(),console.warn(`Minified Lexical warning #${e}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const ba=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,are=ba&&"documentMode"in document?document.documentMode:null,Qo=ba&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),Pl=ba&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Ad=!(!ba||!("InputEvent"in window)||are)&&"getTargetRanges"in new window.InputEvent("input"),Ol=ba&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,y6=ba&&/Android/.test(navigator.userAgent),Bp=ba&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent)&&!y6,x6=ba&&/^(?=.*Chrome).*/i.test(navigator.userAgent),A0=ba&&y6&&x6,jp=ba&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&Qo&&!x6,sre=0,lre=1,ure=2,BA=1,jA=2,qA=4,VA=8,cre=16,G_=32,K_=64,tE=128,dre=1,fre=2,hre=3,pre=4,mre=5,gre=6,Kh=Bp||Ol||jp?" ":"",xu=`
|
|
18
|
+
|
|
19
|
+
`,rE=Pl?" ":Kh,Ps={bold:1,capitalize:1024,code:16,highlight:tE,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},vre={directionless:1,unmergeable:2},T0={center:2,end:6,justify:4,left:1,right:3,start:5},bre={[fre]:"center",[gre]:"end",[pre]:"justify",[dre]:"left",[hre]:"right",[mre]:"start"},_re={normal:0,segmented:2,token:1},yre={[sre]:"normal",[ure]:"segmented",[lre]:"token"},GA="$config";function KA(){return Dr()._blockCursorElement}function xre(e){return e!==null&&e.nodeType===1&&e.hasAttribute("data-lexical-slot")}let S6=class Hg{element;before;after;constructor(t,r,n){this.element=t,this.before=r||null,this.after=n||null}withBefore(t){return new Hg(this.element,t,this.after)}withAfter(t){return new Hg(this.element,this.before,t)}withElement(t){return this.element===t?this:new Hg(t,this.before,this.after)}insertChild(t){const r=this.getInsertionAnchor();return r!==null&&r.parentElement!==this.element&&ae(357),this.element.insertBefore(t,r),this}removeChild(t){return t.parentElement!==this.element&&ae(358),this.element.removeChild(t),this}replaceChild(t,r){return r.parentElement!==this.element&&ae(359),this.element.replaceChild(t,r),this}getFirstChild(){const t=this.getFirstChildAnchor(),r=t?t.nextSibling:this.element.firstChild;return r===this.getInsertionAnchor()?null:r}getFirstChildAnchor(){return this.after}resolveLeafPosition(t,r,n){if(this.element===t)return r===t&&n===0?"before":"after";const i=HA(t,this.element);if(i===null)return"after";const o=Array.prototype.indexOf.call(t.childNodes,i);if(o<0)return"after";if(r===t)return n<=o?"before":"after";const a=HA(t,r);if(a===null)return"after";const s=Array.prototype.indexOf.call(t.childNodes,a);return s>=0&&s<=o?"before":"after"}getInsertionAnchor(){return this.before}};function HA(e,t){let r=t;for(;r!==null&&r.parentNode!==e;)r=r.parentNode;return r}class sd extends S6{withBefore(t){return new sd(this.element,t,this.after)}withAfter(t){return new sd(this.element,this.before,t)}withElement(t){return this.element===t?this:new sd(t,this.before,this.after)}getInsertionAnchor(){return super.getInsertionAnchor()||this.getManagedLineBreak()}getFirstChildAnchor(){let t=super.getFirstChildAnchor(),r=t?t.nextSibling:this.element.firstChild;for(;xre(r);)t=r,r=r.nextSibling;const n=t?t.nextSibling:this.element.firstChild;return n!==null&&n===KA()?n:t}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(t){if(this.element.__lexicalLastChildKind=t,t===null)this.removeManagedLineBreak();else{const r=t==="decorator"&&(jp||Ol||Bp);this.insertManagedLineBreak(r)}}removeManagedLineBreak(){const t=this.getManagedLineBreak();if(t){const r=this.element,n=t.nodeName==="IMG"?t.nextSibling:null;n&&r.removeChild(n),r.removeChild(t),r.__lexicalLineBreak=void 0}}insertManagedLineBreak(t){const r=this.getManagedLineBreak();if(r){if(t===(r.nodeName==="IMG"))return;this.removeManagedLineBreak()}const n=this.element,i=this.before,o=gr().createElement("br");if(o.setAttribute("data-lexical-managed-linebreak","true"),n.insertBefore(o,i),t){const a=gr().createElement("img");a.setAttribute("data-lexical-managed-linebreak","true"),a.style.setProperty("display","inline","important"),a.style.setProperty("border","0px","important"),a.style.setProperty("margin","0px","important"),a.alt="",n.insertBefore(a,o),n.__lexicalLineBreak=a}else n.__lexicalLineBreak=o}getFirstChildOffset(){const t=this.getFirstChild(),r=this.getInsertionAnchor();let n=0;for(let i=this.element.firstChild;i!==null&&i!==t&&i!==r;i=i.nextSibling)n++;return n}resolveChildIndex(t,r,n,i){if(n===this.element){const l=this.getFirstChildOffset(),c=KA(),d=this.element.childNodes,f=Math.min(i,d.length);let h=0;for(let p=l;p<f;p++)d[p]!==c&&h++;return[t,Math.min(h,t.getChildrenSize())]}const o=WA(r,n);o.push(i);const a=WA(r,this.element);let s=t.getIndexWithinParent();for(let l=0;l<a.length;l++){const c=o[l],d=a[l];if(c===void 0||c<d)break;if(c>d){s+=1;break}}return[t.getParentOrThrow(),s]}}function WA(e,t){const r=[];let n=t;for(;n!==e&&n!==null;n=n.parentNode){let i=0;for(let o=n.previousSibling;o!==null;o=o.previousSibling)i++;r.push(i)}return n!==e&&ae(225),r.reverse()}let w6;try{w6="0.48.0+prod.esm"}catch{}const E6=w6??'"<unknown>+source"';let If=class{_front=new Set;_back=new Set;_cache;get size(){return this._front.size+this._back.size}addBack(t){return delete this._cache,this._front.has(t)||this._back.add(t),this}addFront(t){return delete this._cache,this._back.has(t)||this._front.add(t),this}delete(t){return delete this._cache,this._front.delete(t)||this._back.delete(t)}toArray(){const t=Array.from(this._front).reverse();for(const r of this._back)t.push(r);return t}toReadonlyArray(){return this._cache=this._cache||this.toArray(),this._cache}[Symbol.iterator](){return this.toReadonlyArray()[Symbol.iterator]()}};const ou=null;function k6(e,t=1e3){return e instanceof Sx?e.clone():e.size<t?new Map(e):new Sx().init(new Map(e),void 0,e.size)}let Sx=class C6{_mutable=!1;_old=void 0;_nursery=void 0;_size=0;clone(){return this._mutable=!1,new C6().init(this._old,this._nursery,this._size)}init(t,r,n){return this._old=t,this._nursery=r,this._size=n,this}get size(){return this._size}has(t){return this.get(t)!==void 0}getWithTombstone(t){const r=this._nursery&&this._nursery.get(t);return r!==void 0?r:this._old&&this._old.get(t)}get(t){const r=this.getWithTombstone(t);return r===ou?void 0:r}shouldCompact(){return this._nursery!==void 0&&2*this._nursery.size>this._size}getNursery(){return this._mutable&&this._nursery||(this.compact(),this._nursery=new Map(this._nursery),this._mutable=!0),this._nursery}compact(t=!1){if(this._nursery&&this._nursery.size>0&&(t||this.shouldCompact())){const r=new Map(this._old);for(const[n,i]of this._nursery)i!==ou?r.set(n,i):r.delete(n);this._old=r,this._nursery=void 0}return this._mutable=!1,this}set(t,r){const n=this.getWithTombstone(t);if(n===r)return this;const i=this.getNursery();return n!==ou&&n!==void 0||(this._size++,n===ou&&i.delete(t)),i.set(t,r),this}delete(t){const r=this.has(t);return r&&(this.getNursery().set(t,ou),this._size--),r}getOrInsert(t,r){const n=this.get(t);return n!==void 0?n:(this.set(t,r),r)}getOrInsertComputed(t,r){const n=this.get(t);if(n!==void 0)return n;const i=r(t);return this.set(t,i),i}clear(){this._mutable=!1,this._old=void 0,this._nursery=void 0,this._size=0}*keys(){for(const t of this.entries())yield t[0]}*values(){for(const t of this.entries())yield t[1]}*entries(){const t=this._nursery,r=this._old;if(r)for(const n of r){const i=n[0],o=t?t.get(i):void 0;o!==ou&&(o!==void 0&&(n[1]=o),yield n)}if(t)for(const n of t)n[1]===ou||r&&r.has(n[0])||(yield n)}forEach(t,r){r!==void 0&&(t=t.bind(r));for(const[n,i]of this.entries())t(i,n,this)}get[Symbol.toStringTag](){return"GenMap"}[Symbol.iterator](){return this.entries()}};function $0(e,t,r,n,i,o){if(H(e)){let a=e.getFirstChild();for(;a!==null;){const s=a.__key;a.__parent===t&&((H(a)||Cs(a)&&a.__slots!==null)&&$0(a,s,r,n,i,o),r.has(s)||o.delete(s),i.push(s)),a=a.getNextSibling()}}for(const a of Cs(e)&&e.__slots!==null?e.__slots.values():[]){const s=n.get(a);s!==void 0&&Ku(s)&&s.__slotHost===t&&((H(s)||Cs(s)&&s.__slots!==null)&&$0(s,a,r,n,i,o),r.has(a)||o.delete(a),i.push(a))}}let wx=!1,nE=0;function Sre(e){nE=e.timeStamp}function H_(e,t,r){const n=e.nodeName==="BR",i=t.__lexicalLineBreak;return i&&(e===i||n&&e.previousSibling===i)||n&&nf(e,r)!==void 0}function wre(e,t,r){const n=xi(Vi(r)),i=n&&Oo(n,r._rootElement);let o=null,a=null;i!==null&&i.anchorNode===e&&(o=i.anchorOffset,a=i.focusOffset);const s=e.nodeValue;s!==null&&_E(t,s,o,a,!1)}function Ere(e,t,r){if(ue(e)){const n=e.anchor.getNode();if(n.is(r)&&e.format!==n.getFormat())return!1}return qi(t)&&r.isAttached()}function kre(e,t,r){for(let n=e;n&&!aL(n);n=sc(n)){const i=nf(n,t);if(i!==void 0){const o=mr(i,r);if(o)return mt(o)||!it(n)?void 0:[n,o]}}}function R6(e,t,r){wx=!0;const n=performance.now()-nE>100;try{Ao(e,()=>{const i=xe()||(function(f){return f.read("latest",()=>{const h=xe();return h!==null?h.clone():null})})(e),o=new Map,a=e._editorState,s=e._blockCursorElement;let l=!1,c="";for(let f=0;f<t.length;f++){const h=t[f],p=h.type,m=h.target,g=kre(m,e,a);if(!g)continue;const[v,b]=g;if(p==="characterData")n&&fe(b)&&qi(m)&&Ere(i,m,b)&&wre(m,b,e);else if(p==="childList"){l=!0;const y=h.addedNodes;for(let C=0;C<y.length;C++){const A=y[C],$=K4(A),R=A.parentNode;if(!(R==null||A===s||$!==null||H_(A,R,e)||e._slotsUsed&&it(A)&&A.hasAttribute("data-lexical-slot")||aL(A))){if(Pl){const N=(it(A)?A.innerText:null)||A.nodeValue;N&&(c+=N)}R.removeChild(A)}}const S=h.removedNodes,w=S.length;if(w>0){let C=0;for(let A=0;A<w;A++){const $=S[A];(H_($,m,e)||s===$)&&(m.appendChild($),C++)}w!==C&&o.set(v,b)}}}if(o.size>0)for(const[f,h]of o)h.reconcileObservedMutation(f,e);const d=r.takeRecords();if(d.length>0){for(let f=0;f<d.length;f++){const h=d[f],p=h.addedNodes,m=h.target;for(let g=0;g<p.length;g++){const v=p[g],b=v.parentNode;b==null||v.nodeName!=="BR"||H_(v,m,e)||b.removeChild(v)}}r.takeRecords()}i!==null&&(l&&Fn(i),Pl&&X4(e)&&i.insertRawText(c))})}finally{wx=!1}}function A6(e){const t=e._observer;t!==null&&R6(e,t.takeRecords(),t)}function T6(e){(function(t){nE===0&&Vi(t).addEventListener("textInput",Sre,!0)})(e),e._observer=new MutationObserver((t,r)=>{R6(e,t,r)})}const JA="latest";let Cre=class{key;parse;unparse;isEqual;defaultValue;resetOnCopyNode;constructor(t,r){this.key=t,this.parse=r.parse.bind(r),this.unparse=(r.unparse||Tre).bind(r),this.isEqual=(r.isEqual||Object.is).bind(r),this.defaultValue=this.parse(void 0),this.resetOnCopyNode=r.resetOnCopyNode||!1}};function qp(e,t){return new Cre(e,t)}function Vp(e,t,r=JA){const n=(r===JA?e.getLatest():e).__state;return n?n.getValue(t):t.defaultValue}function ld(e,t,r){let n;if(Cn(),typeof r=="function"){const o=e.getLatest(),a=Vp(o,t);if(n=r(a),t.isEqual(a,n))return o}else n=r;const i=e.getWritable();return N6(i).updateFromKnown(t,n),i}function Rre(e){const t=new Map,r=new Set;for(const{ownNodeConfig:n}of EE(typeof e=="function"?e:e.replace))if(n&&n.stateConfigs)for(const i of n.stateConfigs){let o;"stateConfig"in i?(o=i.stateConfig,i.flat&&r.add(o.key)):o=i,t.set(o.key,o)}return{flatKeys:r,sharedConfigMap:t}}const QA=new Set(["__proto__","constructor","prototype"]);let Are=class $6{node;knownState;unknownState;sharedNodeState;size;constructor(t,r,n=void 0,i=new Map,o=void 0){this.node=t,this.sharedNodeState=r,this.unknownState=n,this.knownState=i;const{sharedConfigMap:a}=this.sharedNodeState,s=o!==void 0?o:(function(l,c,d){let f=d.size;if(c)for(const h in c){const p=l.get(h);p&&d.has(p)||f++}return f})(a,n,i);this.size=s}getValue(t){const r=this.knownState.get(t);if(r!==void 0)return r;this.sharedNodeState.sharedConfigMap.set(t.key,t);let n=t.defaultValue;if(this.unknownState&&t.key in this.unknownState){const i=this.unknownState[t.key];i!==void 0&&(n=t.parse(i)),this.updateFromKnown(t,n)}return n}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){const t={...this.unknownState},r={};for(const[n,i]of this.knownState)n.isEqual(i,n.defaultValue)?delete t[n.key]:t[n.key]=n.unparse(i);for(const n of this.sharedNodeState.flatKeys)n in t&&(r[n]=t[n],delete t[n]);return YA(t)&&(r.$=t),r}getWritable(t){if(this.node===t)return this;const{sharedNodeState:r,unknownState:n}=this,i=new Map(this.knownState);return new $6(t,r,(function(o,a,s){let l;if(s)for(const[c,d]of Object.entries(s)){if(QA.has(c))continue;const f=o.get(c);f?a.has(f)||a.set(f,f.parse(d)):(l=l||{},l[c]=d)}return l})(r.sharedConfigMap,i,n),i,this.size)}resetOnCopyNode(){for(const t of this.knownState.keys())t.resetOnCopyNode&&this.knownState.set(t,t.defaultValue);return this}updateFromKnown(t,r){const n=t.key;this.sharedNodeState.sharedConfigMap.set(n,t);const{knownState:i,unknownState:o}=this;i.has(t)||o&&n in o||(o&&(delete o[n],this.unknownState=YA(o)),this.size++),i.set(t,r)}updateFromUnknown(t,r){if(QA.has(t))return;const n=this.sharedNodeState.sharedConfigMap.get(t);n?this.updateFromKnown(n,n.parse(r)):(this.unknownState=this.unknownState||{},t in this.unknownState||this.size++,this.unknownState[t]=r)}updateFromJSON(t){const{knownState:r}=this;for(const n of r.keys())r.set(n,n.defaultValue);if(this.size=r.size,this.unknownState=void 0,t)for(const[n,i]of Object.entries(t))this.updateFromUnknown(n,i)}};function N6(e){const t=e.getWritable(),r=t.__state?t.__state.getWritable(t):new Are(t,D6(t));return t.__state=r,r}function D6(e){return e.__state?e.__state.sharedNodeState:q4(Dr(),e.getType()).sharedNodeState}function YA(e){if(e)for(const t in e)return e}function Tre(e){return e}function XA(e,t,r){for(const[n,i]of t.knownState){if(e.has(n.key))continue;e.add(n.key);const o=r?r.getValue(n):n.defaultValue;if(o!==i&&!n.isEqual(o,i))return!0}return!1}function ZA(e,t,r){const{unknownState:n}=t,i=r?r.unknownState:void 0;if(n){for(const[o,a]of Object.entries(n))if(!e.has(o)&&(e.add(o),a!==(i?i[o]:void 0)))return!0}return!1}function eT(e,t){const r=e.__state;return r&&r.node===e?r.getWritable(t):r}function tT(e,t){const r=e.__mode,n=e.__format,i=e.__style,o=t.__mode,a=t.__format,s=t.__style,l=e.__state,c=t.__state;return(r===null||r===o)&&(n===null||n===a)&&(i===null||i===s)&&(e.__state===null||l===c||(function(d,f){if(d===f)return!0;const h=new Set;return!(d&&XA(h,d,f)||f&&XA(h,f,d)||d&&ZA(h,d,f)||f&&ZA(h,f,d))})(l,c))}function rT(e,t){const r=e.mergeWithSibling(t),n=Wt()._normalizedNodes;return n.add(e.__key),n.add(t.__key),r}function nT(e){let t,r,n=e;if(n.__text!==""||!n.isSimpleText()||n.isUnmergeable()){for(;(t=n.getPreviousSibling())!==null&&fe(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(t.__text!==""){if(tT(t,n)){n=rT(t,n);break}break}t.remove()}for(;(r=n.getNextSibling())!==null&&fe(r)&&r.isSimpleText()&&!r.isUnmergeable();){if(r.__text!==""){if(tT(n,r)){n=rT(n,r);break}break}r.remove()}}else n.remove()}function _l(e){return iT(e.anchor),iT(e.focus),e}function iT(e){for(;e.type==="element";){const t=e.getNode(),r=e.offset;let n,i;if(r===t.getChildrenSize()?(n=t.getChildAtIndex(r-1),i=!0):(n=t.getChildAtIndex(r),i=!1),fe(n)){e.set(n.__key,i?n.getTextContentSize():0,"text",!0);break}if(!H(n))break;e.set(n.__key,i?n.getChildrenSize():0,"element",!0)}}const Hh=Symbol.for("@lexical/CachedTextSize");function oT(e,t){return kx.read(()=>{let r=0,n=e;for(let i=0;i<t&&n!==null;i++){const o=ea.get(n);if(o===void 0&&ae(345,n),H(o)){const a=Cr.get(n);if(a!==void 0&&H(a)&&a.__parent!==o.__parent)r+=o.getTextContentSize();else{const s=Uu.get(n),l=s&&s.__lexicalTextContent;typeof l!="string"&&ae(346,o.getType()),r+=l.length}i<t-1&&!o.isInline()&&(r+=2)}else{const a=o[Hh];a===void 0&&ae(347,o.getType(),n),r+=a}n=o.__next}return r},{editor:Mt})}function F6(e){H(e)||e[Hh]===void 0&&(e[Hh]=fe(e)?e.__text.length:e.getTextContentSize())}const $re=4;let Wh,Mt,Jh,_t="",Ur=null,ti=null,Bn=null;function La(){return{firstTextKey:Bn,format:Ur,style:ti}}function yo(e){e.firstTextKey!==null&&(Ur=e.format,ti=e.style,Bn=e.firstTextKey)}function Ex(e){if(Bn!==null)return;const t=e.__lexicalFirstTextKey;if(t===void 0&&ae(348),t===null)return;const r=Cr.get(t);fe(r)&&(Ur=r.getFormat(),ti=r.getStyle(),Bn=t)}let ib,ph,mh,ea,kx,Cr,Uu,Cx,Qh,Bu,xs=!1,N0=!1;function Rl(e,t){const r=ea.get(e),n=Cr.has(e);if(t!==null){const i=Nx(e);i.parentNode===t&&t.removeChild(i)}if(!n){if(Mt._keyToDOMMap.delete(e),H(r)){const i=W0(r,ea);Rx(i,0,i.length-1,null)}if(r!==void 0){for(const i of Yi(r).values()){const o=Tx(i);Rl(i,null),o!==null&&o.remove()}yE(Qh,Jh,ib,r,"destroyed")}}}function Rx(e,t,r,n){for(let i=t;i<=r;++i){const o=e[i];o!==void 0&&Rl(o,n)}}function au(e,t){e.setProperty("text-align",t)}const Nre="40px";function I6(e,t){const r=Wh.theme.indent;if(typeof r=="string"){const n=e.classList.contains(r);t>0&&!n?e.classList.add(r):t<1&&n&&e.classList.remove(r)}e.style.setProperty("padding-inline-start",t===0?"":`calc(${t} * var(--lexical-indent-base-value, ${Nre}))`)}function P6(e,t){const r=e.style;t===0?au(r,""):t===1?au(r,"left"):t===2?au(r,"center"):t===3?au(r,"right"):t===4?au(r,"justify"):t===5?au(r,"start"):t===6&&au(r,"end")}function Ax(e,t){const r=(function(n){const i=n.__dir;if(i!==null)return i;if(Mr(n))return null;const o=n.getParent();return o===null||vr(o)&&o.__dir===null?"auto":null})(t);r!==null?e.dir=r:e.removeAttribute("dir")}function O6(e){const t=gr().createElement("div");return t.setAttribute("data-lexical-slot",e),t.style.display="none",t}function M6(e,t,r){t||e.contentEditable==="false"?Wne(r,Mt):r.removeAttribute("contenteditable")}function aT(e,t,r){const n=_t,i=La();_t="";let o="";const a=mt(e);for(const[s,l]of r){const c=O6(s);M6(t,a,c),t.appendChild(c),_t="";const d=La();Al(l,Mo(e,c,Mt)),yo(d),L6(e,s,t,c),o+=_t}return yo(i),_t=n,o}function Yi(e){return Cs(e)&&e.__slots!==null?e.__slots:uL}function L6(e,t,r,n){const i=Bu.$getSlotTargetElement(e,t,r,Mt);i!==null&&(n.parentElement!==i&&i.appendChild(n),n.style.display="")}function Tx(e){const t=Uu.get(e);return t!==void 0?t.parentElement:null}function sT(e,t,r){const n=Yi(e),i=Yi(t);for(const[d,f]of n)if(!i.has(d)){const h=Tx(f);Rl(f,null),h!==null&&h.remove()}const o=_t,a=La();let s="",l=null;const c=mt(t);for(const[d,f]of i){const h=n.get(d);let p=h!==void 0?Tx(h):null;_t="";const m=La();if(p===null){p=O6(d);let g=null;for(const v of r.children)if(!v.hasAttribute("data-lexical-slot")){g=v;break}r.insertBefore(p,g),Al(f,Mo(t,p,Mt))}else h===f?ms(f,p):(h!==void 0&&Rl(h,p),Al(f,Mo(t,p,Mt)));if(yo(m),M6(r,c,p),L6(t,d,r,p),s+=_t,p.parentElement===r){const g=l===null?r.firstChild:l.nextSibling;g!==p&&r.insertBefore(p,g),l=p}}return yo(a),_t=o,s}function Al(e,t){const r=Cr.get(e);if(r===void 0&&ae(60),t!==null){const i=ea.get(e);if(i!==void 0){const o=Uu.get(e);if(o!==void 0){const a=Ku(i)?i.__slotHost:null,s=Ku(r)?r.__slotHost:null,l=i.__parent!==r.__parent||a!==s,c=s!==null&&o.parentElement!==t.element;if(l||c)return t.insertChild(o),ms(e,t.element)}}}const n=Bu.$createDOM(r,Mt);if((function(i,o,a){const s=a._keyToDOMMap;H4(o,a,i),s.set(i,o)})(e,n,Mt),fe(r)?n.setAttribute("data-lexical-text","true"):mt(r)&&(n.setAttribute("data-lexical-decorator","true"),Hne(n,{captureSelection:!0})),H(r)){const i=r.__indent,o=r.__size;Ax(n,r),i!==0&&I6(n,i);const a=Yi(r),s=a.size>0?aT(r,n,a):"";if(o===0)n.__lexicalTextContent=s,n.__lexicalFirstTextKey=null,_t+=s,a.size>0&&(n.__lexicalSlotTextLength=s.length);else{const c=_t,d=o-1;if($x(W0(r,Cr),r,0,d,Mo(r,n,Mt)),s!==""){const f=n.__lexicalTextContent||"";n.__lexicalTextContent=s+f,_t=c+s+f}a.size>0&&(n.__lexicalSlotTextLength=s.length)}const l=r.__format;l!==0&&P6(n,l),r.isInline()||z6(null,r,n)}else{const i=r.getTextContent();if(mt(r)){const o=r.decorate(Mt,Wh);o!==null&&U6(e,o),n.contentEditable="false";const a=Yi(r);a.size>0&&aT(r,n,a)}_t+=i}return t!==null&&t.insertChild(n),Bu.$decorateDOM(r,null,n,Mt),F6(r),yE(Qh,Jh,ib,r,"created"),n}function $x(e,t,r,n,i){const o=_t,a=La();_t="",Ur=null,ti=null,Bn=null;let s=r;for(;s<=n;++s){const c=La();Al(e[s],i);const d=Cr.get(e[s]);d!==null&&fe(d)?Ur===null&&(Ur=d.getFormat(),ti=d.getStyle(),Bn=d.__key):H(d)&&s<n&&!d.isInline()&&(_t+=xu),yo(c)}const l=Mt._keyToDOMMap.get(t.__key);l===void 0&&ae(349,t.__key),l.__lexicalTextContent=_t,l.__lexicalFirstTextKey=Bn,_t=o+_t,yo(a)}function z6(e,t,r){const n=Mo(t,r,Mt),i=n.element.__lexicalLastChildKind??null,o=(function(a,s){if(a){const l=a.__last;if(l){const c=s.get(l);if(c)return bi(c)?"line-break":mt(c)&&c.isInline()?"decorator":null}return Yi(a).size>0?null:"empty"}return null})(t,Cr);i!==o&&n.setManagedLineBreak(o)}function Dre(e,t,r){var n;Ur=null,ti=null,Bn=null,(function(i,o,a){const s=_t,l=i.__size,c=o.__size;_t="";const d=a.element,f=Mt._keyToDOMMap.get(o.__key);f===void 0&&ae(351,o.__key);const h=c-l;if(!xs&&Math.abs(h)<=1&&l>=$re&&i.__first===o.__first&&(h!==0||!Mt._cloneNotNeeded.has(i.__key))){const p=f.__lexicalTextContent,m=Cx.get(i.__key);if(!xs&&typeof p=="string"&&m!==void 0){const g=(function(v,b){const y=b.size;if(y===0||y>=v.__size)return null;let S=v.__last,w=null,C=0;for(;S!==null&&C<y;){if(!b.has(S))return null;w=S;const A=Cr.get(S);if(A===void 0)return null;S=A.__prev,C++}return C!==y||S!==null&&b.has(S)?null:w})(o,m);if(g!==null){const v=m.size;if(h===0){const b=oT(g,v);let y=g,S=0;for(;y!==null&&S<v;){const R=Cr.get(y);if(R===void 0)break;const N=La();ms(y,d),fe(R)&&Ur===null&&(Ur=R.getFormat(),ti=R.getStyle(),Bn=R.__key),yo(N),y=R.__next,S++}let w="";for(y=g,S=0;y!==null&&S<v;){const R=Cr.get(y);if(R===void 0)break;let N;if(H(R)){const I=Mt._keyToDOMMap.get(y),M=I&&I.__lexicalTextContent;typeof M!="string"&&ae(352,R.getType()),N=M}else N=R.getTextContent();w+=N,S<v-1&&H(R)&&!R.isInline()&&(w+=xu),y=R.__next,S++}const C=f.__lexicalSlotTextLength||0,A=C>0?p.slice(C):p,$=A.slice(0,A.length-b)+w;return f.__lexicalTextContent=$,_t=s+$,void lT(o,f,m)}if((function(b,y,S,w,C,A,$,R){if(R!==1&&R!==-1||$!==(R===1?2:1))return!1;const I=$-R;let M=b.__last;for(let pe=0;pe<I-1;pe++){if(M===null)return!1;const be=ea.get(M);if(be===void 0)return!1;M=be.__prev}if(M===null)return!1;const P=Cr.get(A),B=ea.get(M);if(P===void 0||B===void 0||P.__prev!==B.__prev)return!1;const j=[];let W=A;for(let pe=0;pe<$;pe++){if(W===null)return!1;j.push(W);const be=Cr.get(W);W=be?be.__next:null}const te=[];W=M;for(let pe=0;pe<I;pe++){if(W===null)return!1;te.push(W);const be=ea.get(W);W=be?be.__next:null}const J=new Set(te),re=new Set(j),se=[];let he=0,K=0;for(;he<I&&K<$;)if(j[K]===te[he])se.push({key:j[K],kind:"reconcile"}),he++,K++;else if(re.has(te[he])){if(J.has(j[K]))return!1;se.push({key:j[K],kind:"create",nextIndex:K}),K++}else se.push({key:te[he],kind:"destroy"}),he++;for(;he<I;)se.push({key:te[he++],kind:"destroy"});for(;K<$;)se.push({key:j[K],kind:"create",nextIndex:K}),K++;const ie=oT(M,I);for(const pe of se){const be=La();if(pe.kind==="reconcile")ms(pe.key,S.element);else if(pe.kind==="destroy")Rl(pe.key,S.element);else{let Ge=null;for(let zt=pe.nextIndex+1;zt<$;zt++){const At=Mt._keyToDOMMap.get(j[zt]);if(At!==void 0){Ge=At;break}}Al(pe.key,S.withBefore(Ge??S.before))}if(pe.kind!=="destroy"){const Ge=Cr.get(pe.key);Ge&&fe(Ge)&&Ur===null&&(Ur=Ge.getFormat(),ti=Ge.getStyle(),Bn=Ge.__key)}yo(be)}let le="";for(let pe=0;pe<$;pe++){const be=Cr.get(j[pe]);if(be===void 0)return!1;let Ge;if(H(be)){const zt=Mt._keyToDOMMap.get(j[pe]),At=zt&&zt.__lexicalTextContent;typeof At!="string"&&ae(350,be.getType()),Ge=At}else Ge=be.getTextContent();le+=Ge,pe<$-1&&H(be)&&!be.isInline()&&(le+=xu)}const Z=w.__lexicalSlotTextLength||0,ve=Z>0?C.slice(Z):C;return w.__lexicalTextContent=ve.slice(0,ve.length-ie)+le,!0})(i,0,a,f,p,g,v,h)){const b=f.__lexicalTextContent;return typeof b!="string"&&ae(353),_t=s+b,void lT(o,f,m)}}}if(h===0){let g=i.__first,v=0;for(;g!==null;){const b=Cr.get(g);if(b===void 0)break;const y=xs||mh.has(g)||ph.has(g),S=La();if(y)ms(g,d);else{let w,C;if(H(b)){C=Uu.get(g);const A=C&&C.__lexicalTextContent;typeof A!="string"&&ae(354,b.getType()),w=A}else w=b.getTextContent();_t+=w,C!==void 0&&Ex(C)}fe(b)?Ur===null&&(Ur=b.getFormat(),ti=b.getStyle(),Bn=b.__key):H(b)&&v<c-1&&!b.isInline()&&(_t+=xu),yo(S),g=b.__next,v++}return f.__lexicalTextContent=_t,f.__lexicalFirstTextKey=Bn,void(_t=s+_t)}}if(l===1&&c===1){const p=i.__first,m=o.__first;if(p===m)ms(p,d);else{const v=Nx(p),b=Al(m,null);try{v.parentNode===d?d.replaceChild(b,v):a.insertChild(b)}catch(y){if(typeof y=="object"&&y!=null){const S=`${y.toString()} Parent: ${d.tagName}, new child: {tag: ${b.tagName} key: ${m}}, old child: {tag: ${v.tagName}, key: ${p}}.`;throw new Error(S)}throw y}Rl(p,null)}const g=Cr.get(m);fe(g)&&Ur===null&&(Ur=g.getFormat(),ti=g.getStyle(),Bn=g.__key)}else{const p=W0(i,ea),m=W0(o,Cr);if(p.length!==l&&ae(227),m.length!==c&&ae(228),l===0)c!==0&&$x(m,o,0,c-1,a);else if(c===0){if(l!==0){const g=a.after==null&&a.before==null&&Yi(o).size===0&&a.element.__lexicalLineBreak==null;Rx(p,0,l-1,g?null:d),g&&(d.textContent="")}}else(function(g,v,b,y,S,w){const C=y-1,A=S-1;let $,R,N=w.getFirstChild(),I=0,M=0;for(;I<=C&&M<=A;){const j=v[I],W=b[M],te=La();if(j===W)N=W_(ms(W,w.element)),I++,M++;else{if(R===void 0&&(R=uT(b,M)),$===void 0)$=uT(v,I);else if(!$.has(j)){I++,yo(te);continue}if(!R.has(j)){N=W_(Nx(j)),Rl(j,w.element),I++,$.delete(j),yo(te);continue}if($.has(W)){const re=Dd(Mt,W);re!==N&&w.withBefore(N??w.before).insertChild(re),N=W_(ms(W,w.element)),I++,M++}else Al(W,w.withBefore(N??w.before)),M++}const J=Cr.get(W);J!==null&&fe(J)?Ur===null&&(Ur=J.getFormat(),ti=J.getStyle(),Bn=J.__key):H(J)&&M<=A&&!J.isInline()&&(_t+=xu),yo(te)}const P=I>C,B=M>A;if(P&&!B){const j=b[A+1],W=j===void 0?null:Mt.getElementByKey(j);$x(b,g,M,A,w.withBefore(W??w.before))}else B&&!P&&Rx(v,I,C,w.element)})(o,p,m,l,c,a)}f.__lexicalTextContent=_t,f.__lexicalFirstTextKey=Bn,_t=s+_t})(e,t,Mo(t,r,Mt)),vr(t)||(n=t,Ur==null||Ur===n.__textFormat||N0||n.setTextFormat(Ur),(function(i){ti==null||ti===i.__textStyle||N0||i.setTextStyle(ti)})(t))}function lT(e,t,r){const n=t.__lexicalFirstTextKey;if(n!=null){const i=e.__key;let o=n;for(;o!==null;){const a=Cr.get(o);if(a===void 0){o=null;break}if(a.__parent===i)break;o=a.__parent}if(o!==null&&!r.has(o)){const a=Cr.get(n);if(fe(a))return Ur=a.getFormat(),void(ti=a.getStyle())}}t.__lexicalFirstTextKey=Bn}function ms(e,t){const r=ea.get(e);let n=Cr.get(e);r!==void 0&&n!==void 0||ae(61);const i=xs||mh.has(e)||ph.has(e),o=Dd(Mt,e);if(r===n&&!i){let a;if(H(r)){const s=o.__lexicalTextContent;typeof s!="string"&&ae(355,r.getType()),a=s,Ex(o)}else a=r.getTextContent();return _t+=a,o}if(r!==n&&i&&yE(Qh,Jh,ib,n,"updated"),Bu.$updateDOM(n,r,o,Mt)){const a=Al(e,null);return t===null&&ae(62),t.replaceChild(a,o),Rl(e,null),a}if(H(r)){H(n)||ae(334,e);const a=n.__indent;(xs||a!==r.__indent)&&I6(o,a);const s=n.__format;(xs||s!==r.__format)&&P6(o,s);const l=i&&(Yi(n).size>0||Yi(r).size>0)?sT(r,n,o):"";if(i){const c=_t;if(Dre(r,n,o),Mr(n)||n.isInline()||z6(0,n,o),l!==""){const d=o.__lexicalTextContent||"";o.__lexicalTextContent=l+d,_t=c+l+d,o.__lexicalSlotTextLength=l.length}else(Yi(n).size>0||Yi(r).size>0)&&(o.__lexicalSlotTextLength=0)}else{const c=o.__lexicalTextContent;typeof c!="string"&&ae(356,r.getType()),_t+=c,Ex(o)}if((xs||n.__dir!==r.__dir||n.__parent!==r.__parent)&&(Ax(o,n),Mr(n)&&!xs))for(const c of n.getChildren())H(c)&&Ax(Dd(Mt,c.getKey()),c)}else{const a=n.getTextContent();if(mt(n)){const s=n.decorate(Mt,Wh);s!==null&&U6(e,s),i&&(Yi(n).size>0||Yi(r).size>0)&&sT(r,n,o)}_t+=a}if(!N0&&Mr(n)){const a=n.getLatest();if(a.__cachedText!==_t){const s=a.getWritable();s.__cachedText=_t,n=s}}return Bu.$decorateDOM(n,r,o,Mt),F6(n),o}function U6(e,t){let r=Mt._pendingDecorators;const n=Mt._decorators;if(r===null){if(n[e]===t)return;r=W4(Mt)}r[e]=t}function W_(e){let t=e.nextSibling;return t!==null&&t===Mt._blockCursorElement&&(t=t.nextSibling),t}function uT(e,t){const r=new Set;for(let n=t;n<e.length;n++)r.add(e[n]);return r}function Fre(e,t,r,n,i,o){_t="",Ur=null,ti=null,Bn=null,xs=n===2,Mt=r,Wh=r._config,Bu=r._config.dom||q0,Jh=r._nodes,ib=Mt._listeners.mutation,ph=i,mh=o,ea=e._nodeMap,kx=e,Cr=t._nodeMap,N0=t._readOnly,Uu=k6(r._keyToDOMMap),Cx=(function(){const s=new Map,l=c=>{for(const d of c){const f=Cr.get(d);if(f===void 0)continue;const h=f.__parent;if(h===null)continue;let p=s.get(h);p===void 0&&(p=new Set,s.set(h,p)),p.add(d)}};return l(ph.keys()),l(mh),s})();const a=new Map;return Qh=a,ms("root",null),Mt=void 0,Jh=void 0,ph=void 0,mh=void 0,ea=void 0,kx=void 0,Cr=void 0,Wh=void 0,Uu=void 0,Cx=void 0,Qh=void 0,Bu=q0,a}function Nx(e){const t=Uu.get(e);return t===void 0&&ae(75,e),t}function Ke(e){return{type:e}}const B6=Ke("SELECTION_CHANGE_COMMAND"),Ire=Ke("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),j6=Ke("CLICK_COMMAND"),q6=Ke("BEFORE_INPUT_COMMAND"),V6=Ke("INPUT_COMMAND"),G6=Ke("COMPOSITION_START_COMMAND"),K6=Ke("COMPOSITION_END_COMMAND"),ku=Ke("DELETE_CHARACTER_COMMAND"),ud=Ke("INSERT_LINE_BREAK_COMMAND"),Yh=Ke("INSERT_PARAGRAPH_COMMAND"),cd=Ke("CONTROLLED_TEXT_INSERTION_COMMAND"),iE=Ke("PASTE_COMMAND"),Wg=Ke("REMOVE_TEXT_COMMAND"),Xh=Ke("DELETE_WORD_COMMAND"),Zh=Ke("DELETE_LINE_COMMAND"),ta=Ke("FORMAT_TEXT_COMMAND"),Pre=Ke("SET_TEXT_FORMAT_COMMAND"),ob=Ke("UNDO_COMMAND"),ab=Ke("REDO_COMMAND"),H6=Ke("KEYDOWN_COMMAND"),W6=Ke("KEY_ARROW_RIGHT_COMMAND"),J6=Ke("MOVE_TO_END"),Q6=Ke("KEY_ARROW_LEFT_COMMAND"),Y6=Ke("MOVE_TO_START"),X6=Ke("KEY_ARROW_UP_COMMAND"),Z6=Ke("KEY_ARROW_DOWN_COMMAND"),ep=Ke("KEY_ENTER_COMMAND"),e4=Ke("KEY_SPACE_COMMAND"),oE=Ke("KEY_BACKSPACE_COMMAND"),t4=Ke("KEY_ESCAPE_COMMAND"),r4=Ke("KEY_DELETE_COMMAND"),n4=Ke("KEY_TAB_COMMAND"),Ore=Ke("INSERT_TAB_COMMAND"),Mre=Ke("INDENT_CONTENT_COMMAND"),cT=Ke("OUTDENT_CONTENT_COMMAND"),i4=Ke("DROP_COMMAND"),Lre=Ke("FORMAT_ELEMENT_COMMAND"),o4=Ke("DRAGSTART_COMMAND"),a4=Ke("DRAGOVER_COMMAND"),zre=Ke("DRAGEND_COMMAND"),sb=Ke("COPY_COMMAND"),aE=Ke("CUT_COMMAND"),s4=Ke("SELECT_ALL_COMMAND"),Ure=Ke("CLEAR_EDITOR_COMMAND"),Bre=Ke("CLEAR_HISTORY_COMMAND"),Bm=Ke("CAN_REDO_COMMAND"),jm=Ke("CAN_UNDO_COMMAND"),jre=Ke("FOCUS_COMMAND"),qre=Ke("BLUR_COMMAND"),Vre=Ke("KEY_MODIFIER_COMMAND");function Gre(e){const t=new Map;return{dispose(){for(const r of t.values())r.dispose();t.clear()},register(r,n){let i=t.get(r);i===void 0&&(i={dispose:e(r,n),holders:new Set},t.set(r,i));const o=()=>{const a=t.get(r);a&&a.holders.delete(o)&&a.holders.size===0&&(t.delete(r),a.dispose())};return i.holders.add(o),o}}}function Kre(e,t,r,n){return e.addEventListener(t,r,n),e.removeEventListener.bind(e,t,r,n)}const ls=Object.freeze({}),Dx=[["keydown",function(e,t){const r=t._inputState;r.lastKeyDownTimeStamp=e.timeStamp,r.lastKeyCode=e.key,e.key!=="Backspace"&&tp(r),!t.isComposing()&&Te(t,H6,e)}],["pointerdown",function(e,t){const r=nL(e),n=e.pointerType;of(r)&&n!=="touch"&&n!=="pen"&&e.button===0&&Ao(t,()=>{H0(r,t)||(t._inputState.isSelectionChangeFromMouseDown=!0)})}],["compositionstart",function(e,t){Te(t,G6,e)}],["compositionend",function(e,t){const r=t._inputState;Pl?r.compositionPhase="ending-firefox":Ol||!Bp&&!jp?Te(t,K6,e):(r.compositionPhase="ending-safari",r.compositionEndData=e.data)}],["input",function(e,t){e.stopPropagation();const r=t._inputState;tp(r),Ao(t,()=>{d4(e,t)||t.dispatchCommand(V6,e)},{event:e}),r.unprocessedBeforeInputData=null}],["click",function(e,t){Ao(t,()=>{const r=xe(),n=xi(Vi(t)),i=Xd();if(n){if(ue(r)){const o=r.anchor,a=o.getNode();o.type==="element"&&o.offset===0&&r.isCollapsed()&&!Mr(a)&&ln().getChildrenSize()===1&&a.getTopLevelElementOrThrow().isEmpty()&&i!==null&&r.is(i)&&(n.removeAllRanges(),r.dirty=!0)}else if(e.pointerType==="touch"||e.pointerType==="pen"){const o=Oo(n,t._rootElement).anchorNode;(it(o)||qi(o))&&Fn(uE(i,n,t,e))}}Te(t,j6,e)})}],["cut",ls],["copy",ls],["dragstart",ls],["dragover",ls],["dragend",ls],["paste",ls],["focus",ls],["blur",ls],["drop",ls]];Ad&&Dx.push(["beforeinput",(e,t)=>(function(r,n){const i=r.inputType;i==="deleteCompositionText"||Pl&&X4(n)||i!=="insertCompositionText"&&Ao(n,()=>{d4(r,n)||Te(n,q6,r)},{event:r})})(e,t)]);const Fx=new WeakMap,D0=new WeakMap,Hre=Gre(e=>(e.addEventListener("selectionchange",mT),()=>e.removeEventListener("selectionchange",mT)));function l4(e,t,r,n,i,o){const a=e.anchor,s=e.focus,l=a.getNode(),c=Wt();let d;if(o!==void 0)d=o;else{const g=xi(Vi(c));d=g!==null?Oo(g,c._rootElement):null}const f=d!==null?d.anchorNode:null,h=a.key,p=c.getElementByKey(h),m=r.length;return h!==s.key||!fe(l)||(!i&&(!Ad||c._inputState.lastBeforeInputInsertTextTimeStamp<n+50)||l.isDirty()&&m<2||J4(r))&&a.offset!==s.offset&&!l.isComposing()||Zi(l)||l.isDirty()&&m>1||(i||!Ad)&&p!==null&&!l.isComposing()&&f!==Tl(l,p,c)||d!==null&&t!==null&&(!t.collapsed||t.startContainer!==d.anchorNode||t.startOffset!==d.anchorOffset)||!l.isComposing()&&(l.getFormat()!==e.format||l.getStyle()!==e.style)||(function(g,v){if(v.isSegmented())return!0;if(!g.isCollapsed())return!1;const b=g.anchor.offset,y=v.getParentOrThrow(),S=Cu(v);return b===0?!v.canInsertTextBefore()||!y.canInsertTextBefore()&&!v.isComposing()||S||(function(w){const C=w.getPreviousSibling();return(fe(C)||H(C)&&C.isInline())&&!C.canInsertTextAfter()})(v):b===v.getTextContentSize()&&(!v.canInsertTextAfter()||!y.canInsertTextAfter()&&!v.isComposing()||S)})(e,l)}function dT(e,t){return qi(e)&&e.nodeValue!==null&&t!==0&&t!==e.nodeValue.length}function fT(e,t,r){const{anchorNode:n,anchorOffset:i,focusNode:o,focusOffset:a}=Oo(e,t._rootElement),s=t._inputState;s.isSelectionChangeFromDOMUpdate&&(s.isSelectionChangeFromDOMUpdate=!1,dT(n,i)&&dT(o,a)&&!s.postDeleteSelectionToRestore)||Ao(t,()=>{if(!r)return void Fn(null);if(!Kp(t,n,o))return;let l=xe();if(s.postDeleteSelectionToRestore&&ue(l)&&l.isCollapsed()){const c=l.anchor,d=s.postDeleteSelectionToRestore.anchor;(c.key===d.key&&c.offset===d.offset+1||c.offset===1&&d.getNode().is(c.getNode().getPreviousSibling()))&&(l=s.postDeleteSelectionToRestore.clone(),Fn(l))}if(s.postDeleteSelectionToRestore=null,ue(l)){const c=l.anchor,d=c.getNode();if(l.isCollapsed()){e.type==="Range"&&n===o&&(l.dirty=!0);const f=Vi(t).event,h=f?f.timeStamp:performance.now(),{format:p,style:m,offset:g,key:v,timeStamp:b}=s.collapsedSelectionFormat,y=ln(),S=t.isComposing()===!1&&y.getTextContent()==="";if(h<b+200&&c.offset===g&&c.key===v)Jg(l,p,m);else if(c.type==="text")fe(d)||ae(141),u4(l,d);else if(c.type==="element"&&!S){H(d)||ae(259);const w=c.getNode();w.isEmpty()?(function(C,A){const $=A.getTextFormat(),R=A.getTextStyle();Jg(C,$,R)})(l,w):Jg(l,l.format,"")}}else{const f=c.key,h=l.focus.key,p=l.getNodes(),m=p.length,g=l.isBackward(),v=g?a:i,b=g?i:a,y=g?h:f,S=g?f:h;let w=2047,C=!1;for(let A=0;A<m;A++){const $=p[A],R=$.getTextContentSize();if(fe($)&&R!==0&&!(A===0&&$.__key===y&&v===R||A===m-1&&$.__key===S&&b===0)&&(C=!0,w&=$.getFormat(),w===0))break}l.format=C?w:0}}Te(t,B6,void 0)})}function Jg(e,t,r){e.format===t&&e.style===r||(e.format=t,e.style=r,e.dirty=!0)}function u4(e,t){Jg(e,t.getFormat(),t.getStyle())}function c4(e){if(!e.getTargetRanges)return null;const t=e.getTargetRanges();return t.length===0?null:t[0]}function hT(e){const{lastKeyCode:t}=Wt()._inputState;if(e==null||e.length<=1||t==null)return;const r=t.length===1?t:t==="Enter"?`
|
|
20
|
+
`:t==="Tab"?" ":null;if(!r)return;const n=xe();if(!ue(n)||!n.isCollapsed())return;const i=n.anchor.getNode();if(!fe(i))return;const{offset:o}=n.anchor;if(i.getTextContentSize()===o){const a=i.getNextSibling();if(r===`
|
|
21
|
+
`){if(bi(a))a.selectEnd();else if(!a){const s=cr(i,Td),l=s&&s.getNextSibling();H(l)&&l.selectStart()}}else r===" "?ju(a)&&a.selectEnd():fe(a)&&a.getTextContent()[0]===r&&a.select(1,1)}else i.getTextContent()[o]===r&&i.select(o+1,o+1)}function tp(e){e.isInsertTextAfterHandledSelectionCommand=!1,e.handledSelectionCommandTimeoutId!==null&&(clearTimeout(e.handledSelectionCommandTimeoutId),e.handledSelectionCommandTimeoutId=null)}function pT(e){tp(e),e.isInsertTextAfterHandledSelectionCommand=!0,e.handledSelectionCommandTimeoutId=setTimeout(()=>tp(e),0)}function d4(e,t){const r=nL(e);if(it(r)&&H0(r,t))return!0;const n=t.getRootElement();if(n===null)return!1;const i=ip(n.ownerDocument);return i!==null&&n.contains(i)&&H0(i,t)}function Wre(e){const t=e.inputType,r=c4(e),n=Wt(),i=n._inputState,o=xe();if(t==="insertText"&&e.data&&i.isInsertTextAfterHandledSelectionCommand){if(tp(i),e.preventDefault(),ue(o)&&!o.isCollapsed()){const f=o.isBackward()?o.anchor:o.focus;o.anchor.set(f.key,f.offset,f.type),o.focus.set(f.key,f.offset,f.type)}return!0}if(t==="deleteContentBackward"){if(o===null){const f=Xd();if(!ue(f))return!0;Fn(f.clone())}if(ue(o)){const f=o.anchor.key===o.focus.key;if((function(h,p){return h.lastKeyCode==="MediaLast"&&p<h.lastKeyDownTimeStamp+30})(i,e.timeStamp)&&n.isComposing()&&f){if(Rn(null),i.lastKeyDownTimeStamp=0,setTimeout(()=>{Ao(n,()=>{Rn(null)})},30),ue(o)){const h=o.anchor.getNode();h.markDirty(),fe(h)||ae(142),u4(o,h)}}else{if(Rn(null),Ol&&r!==null&&!r.collapsed&&(o.applyDOMRange(r),!o.isCollapsed()))return e.preventDefault(),o.removeText(),!0;e.preventDefault();const h=o.anchor.getNode(),p=h.getTextContent(),m=h.canInsertTextAfter(),g=o.anchor.offset===0&&o.focus.offset===p.length;let v=A0&&f&&!g&&m;if(v&&o.isCollapsed()&&(v=!mt(Dne(o.anchor,!0))),!v){Te(n,ku,!0);const b=xe();A0&&ue(b)&&b.isCollapsed()&&(i.postDeleteSelectionToRestore=b,setTimeout(()=>i.postDeleteSelectionToRestore=null))}}return!0}}if(!ue(o))return!0;const a=e.data;i.unprocessedBeforeInputData!==null&&bE(!1,n,i.unprocessedBeforeInputData),o.dirty&&i.unprocessedBeforeInputData===null||!o.isCollapsed()||Mr(o.anchor.getNode())||r===null||o.applyDOMRange(r),i.unprocessedBeforeInputData=null;const s=o.anchor,l=o.focus,c=s.getNode(),d=l.getNode();if(t==="insertText"||t==="insertTranspose"){if(a===`
|
|
22
|
+
`)e.preventDefault(),Te(n,ud,!1);else if(a===xu)e.preventDefault(),Te(n,Yh,void 0);else if(a==null&&e.dataTransfer){const f=e.dataTransfer.getData("text/plain");e.preventDefault(),o.insertRawText(f)}else a!=null&&l4(o,r,a,e.timeStamp,!0)?(e.preventDefault(),Te(n,cd,a),hT(a)):i.unprocessedBeforeInputData=a;return i.lastBeforeInputInsertTextTimeStamp=e.timeStamp,!0}switch(e.preventDefault(),t){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":Te(n,cd,e),hT((e.dataTransfer?e.dataTransfer.getData("text/plain"):null)??e.data);break;case"insertFromComposition":{const f=i.hadOrphanedCompositionEvents;i.hadOrphanedCompositionEvents=!1;const h=n._compositionKey;Rn(null),f||Te(n,cd,e),Qg(h);break}case"insertLineBreak":Rn(null),Te(n,ud,!1);break;case"insertParagraph":Rn(null),i.isInsertLineBreak&&!Ol?(i.isInsertLineBreak=!1,Te(n,ud,!1)):Te(n,Yh,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":Te(n,iE,e);break;case"deleteByComposition":(function(f,h){return f!==h||H(f)||H(h)||!Cu(f)||!Cu(h)})(c,d)&&Te(n,Wg,e);break;case"deleteByDrag":Gu(Px),Te(n,Wg,e);break;case"deleteByCut":Te(n,Wg,e);break;case"deleteContent":Te(n,ku,!1);break;case"deleteWordBackward":Te(n,Xh,!0);break;case"deleteWordForward":Te(n,Xh,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":Te(n,Zh,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":Te(n,Zh,!1);break;case"formatStrikeThrough":Te(n,ta,"strikethrough");break;case"formatBold":Te(n,ta,"bold");break;case"formatItalic":Te(n,ta,"italic");break;case"formatUnderline":Te(n,ta,"underline");break;case"historyUndo":Te(n,ob,void 0);break;case"historyRedo":Te(n,ab,void 0)}return!0}function Jre(e){const t=Wt(),r=t._inputState,n=xe(),i=e.data,o=c4(e);let a=!1;if(i!=null&&ue(n)){const s=xi(Vi(t)),l=s!==null?Oo(s,t._rootElement):null,c=e.inputType==="insertCompositionText"&&r.compositionPhase!=="ending-firefox"&&!t.isComposing();c&&(r.hadOrphanedCompositionEvents=!0);const d=n.anchor.getNode(),f=e.inputType==="insertCompositionText"&&r.compositionPhase!=="ending-firefox"&&t.isComposing()&&fe(d)&&Zi(d);if(!c&&!f&&l4(n,o,i,e.timeStamp,!1,l)){if(a=!0,r.compositionPhase==="ending-firefox"){const b=F0(t,i);if(r.compositionPhase="idle",b)return Gu(rp),UT(),!0}const h=n.anchor.getNode();if(s===null||l===null)return!0;const p=n.isBackward(),m=p?n.anchor.offset:n.focus.offset,g=p?n.focus.offset:n.anchor.offset;Ad&&!n.isCollapsed()&&fe(h)&&l.anchorNode!==null&&h.getTextContent().slice(0,m)+i+h.getTextContent().slice(m+g)===Y4(l.anchorNode)||Te(t,cd,i);const v=i.length;Pl&&v>1&&e.inputType==="insertCompositionText"&&!t.isComposing()&&(n.anchor.offset-=v,n._cachedNodes=null,n._cachedIsBackward=null),A0&&t.isComposing()&&(r.lastKeyDownTimeStamp=0,Rn(null))}}return a||(bE(!1,t,i!==null?i:void 0),r.compositionPhase==="ending-firefox"&&(F0(t,i||void 0),Gu(rp),r.compositionPhase="idle")),UT(),!0}function Qre(e){const t=Wt(),r=t._inputState,n=xe();if(ue(n)&&!t.isComposing()){r.compositionPhase="composing",r.hadOrphanedCompositionEvents=!1;const i=n.anchor,o=n.anchor.getNode();if(Rn(i.key),Gu(_4),e.timeStamp<r.lastKeyDownTimeStamp+30||i.type==="element"||!n.isCollapsed()||!A0&&(o.getFormat()!==n.format||fe(o)&&o.getStyle()!==n.style)||fe(o)&&(Zi(o)||i.offset===0&&!o.canInsertTextBefore()||i.offset===o.getTextContentSize()&&!o.canInsertTextAfter())){Te(t,cd,rE);const a=xe();ue(a)&&Rn(a.anchor.key)}}return!0}function Yre(e){const t=Wt();return t._inputState.compositionPhase="idle",F0(t,e.data),Gu(rp),!0}function Qg(e){if(e===null)return;const t=mr(e);if(!fe(t)||t.getType()==="text"||Zi(t)||!t.isAttached())return;const r=xe(),n=ue(r)&&r.anchor.key===e?r.anchor.offset:null,i=Pr(t.getTextContent());if(i.setFormat(t.getFormat()),i.setStyle(t.getStyle()),t.replace(i),n!==null){const o=Math.min(n,i.getTextContentSize());i.select(o,o)}}function F0(e,t){const r=e._compositionKey;if(Rn(null),r!==null&&t!=null){if(t===""){const i=mr(r),o=e.getElementByKey(r),a=o!==null&&fe(i)?Tl(i,o,e):null;if(a!==null&&a.nodeValue!==null&&fe(i)){const s=xi(Vi(e)),l=s&&Oo(s,e._rootElement);let c=null,d=null;l!==null&&l.anchorNode===a&&(c=l.anchorOffset,d=l.focusOffset),_E(i,a.nodeValue,c,d,!0)}return Qg(r),!1}if(t[t.length-1]===`
|
|
23
|
+
`){const i=xe();if(ue(i)||fr(i)){if(ue(i)){const o=i.focus;i.anchor.set(o.key,o.offset,o.type)}return Te(e,ep,null),Qg(r),!1}}const n=mr(r);if(n!==null&&fe(n)&&Zi(n)){n.markDirty();const i=xe(),o=n.getTextContentSize(),a=ue(i)&&i.anchor.key===r?i.anchor.offset:o;return n.select(a,a).insertText(t),!0}}return bE(!0,e,t),Qg(r),!1}function Xre(e){const t=Wt(),r=t._inputState;if(e.key==null)return!0;if(r.compositionPhase==="ending-safari"){const n=jT(e);if(n&&Ao(t,()=>{F0(t,r.compositionEndData)}),r.compositionPhase="idle",r.compositionEndData="",n)return!0}if((function(n){return sr(n,"ArrowRight",{shiftKey:"any"})})(e))Te(t,W6,e);else if((function(n){return sr(n,"ArrowRight",{...cs,shiftKey:"any"})})(e))Te(t,J6,e);else if((function(n){return sr(n,"ArrowLeft",{shiftKey:"any"})})(e))Te(t,Q6,e);else if((function(n){return sr(n,"ArrowLeft",{...cs,shiftKey:"any"})})(e))Te(t,Y6,e);else if((function(n){return sr(n,"ArrowUp",{altKey:"any",shiftKey:"any"})})(e))Te(t,X6,e);else if((function(n){return sr(n,"ArrowDown",{altKey:"any",shiftKey:"any"})})(e))Te(t,Z6,e);else if((function(n){return sr(n,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any",shiftKey:!0})})(e))r.isInsertLineBreak=!0,Te(t,ep,e);else if((function(n){return n.key===" "})(e))Te(t,e4,e);else if((function(n){return Qo&&sr(n,"o",{ctrlKey:!0})})(e))e.preventDefault(),r.isInsertLineBreak=!0,Te(t,ud,!0);else if((function(n){return sr(n,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any"})})(e))r.isInsertLineBreak=!1,Te(t,ep,e);else if((function(n){return sr(n,"Backspace",{shiftKey:"any"})||Qo&&sr(n,"h",{ctrlKey:!0})})(e))jT(e)?Te(t,oE,e)&&pT(r):(e.preventDefault(),Te(t,ku,!0));else if((function(n){return n.key==="Escape"})(e))Te(t,t4,e);else if((function(n){return sr(n,"Delete",{})||Qo&&sr(n,"d",{ctrlKey:!0})})(e))(function(n){return n.key==="Delete"})(e)?Te(t,r4,e):(e.preventDefault(),Te(t,ku,!1));else if((function(n){return sr(n,"Backspace",BT)})(e))e.preventDefault(),Te(t,Xh,!0);else if((function(n){return sr(n,"Delete",BT)})(e))e.preventDefault(),Te(t,Xh,!1);else if((function(n){return Qo&&sr(n,"Backspace",{metaKey:!0})})(e))e.preventDefault(),Te(t,Zh,!0);else if((function(n){return Qo&&(sr(n,"Delete",{metaKey:!0})||sr(n,"k",{ctrlKey:!0}))})(e))e.preventDefault(),Te(t,Zh,!1);else if((function(n){return sr(n,"b",cs)})(e))e.preventDefault(),Te(t,ta,"bold");else if((function(n){return sr(n,"u",cs)})(e))e.preventDefault(),Te(t,ta,"underline");else if((function(n){return sr(n,"i",cs)})(e))e.preventDefault(),Te(t,ta,"italic");else if((function(n){return sr(n,"Tab",{shiftKey:"any"})})(e))Te(t,n4,e);else if((function(n){return sr(n,"z",cs)})(e))e.preventDefault(),Te(t,ob,void 0);else if((function(n){return Qo?sr(n,"z",{metaKey:!0,shiftKey:!0}):sr(n,"y",{ctrlKey:!0})||sr(n,"z",{ctrlKey:!0,shiftKey:!0})})(e))e.preventDefault(),Te(t,ab,void 0);else{const n=t._editorState._selection;(function(i){return sr(i,"a",cs)})(e)?(e.preventDefault(),Te(t,s4,e)&&pT(r)):n===null||ue(n)||((function(i){return sr(i,"c",cs)})(e)?(e.preventDefault(),Te(t,sb,e)):(function(i){return sr(i,"x",cs)})(e)&&(e.preventDefault(),Te(t,aE,e)))}return(function(n){return n.ctrlKey||n.shiftKey||n.altKey||n.metaKey})(e)&&t.dispatchCommand(Vre,e),!0}function f4(e){let t=e.__lexicalEventHandles;return t===void 0&&(t=[],e.__lexicalEventHandles=t),t}const dd=new Map;function mT(e){const t=One(e.target);if(t===null)return;const r=xE(e.target);let n=null,i=null;const o=r!==null?D0.get(r):void 0;if(r!==null){if(o!==void 0){const f=o.editors;let h=o.hasShadowEditor;if(h===void 0){h=!1;for(const p of f)if(p._rootElement!==null&&Os(p._rootElement.getRootNode())){h=!0;break}o.hasShadowEditor=h}if(h){let p=null,m=null;for(const g of f){const v=g._rootElement;if(v===null)continue;const b=Oo(t,v).anchorNode;if(b!==null&&hd(b)===g){if(Os(v.getRootNode())){n=g,i=b;break}p===null&&(p=g,m=b)}}n===null&&p!==null&&(n=p,i=m)}else{const p=t.anchorNode;p===null||it(p)&&p.shadowRoot!==null||(n=hd(p),n!==null&&(i=p))}}if(n===null){const f=ip(r);n=f!==null?hd(f):null}}if(n===null)return;if(n._inputState.isSelectionChangeFromMouseDown){if(o!==void 0)for(const f of o.editors)f._inputState.isSelectionChangeFromMouseDown=!1;Ao(n,()=>{const f=Xd(),h=i??Oo(t,n._rootElement).anchorNode;(it(h)||qi(h))&&Fn(uE(f,t,n,e))})}const a=vE(n),s=a[a.length-1],l=s._key,c=dd.get(l),d=c||s;d!==n&&fT(t,d,!1),fT(t,n,!0),n!==s?dd.set(l,n):c&&dd.delete(l)}function gT(e){e._lexicalHandled=!0}function vT(e){return e._lexicalHandled===!0}function Zre(e){const t=Fx.get(e);if(t===void 0)return;const r=D0.get(t);if(r===void 0)return;Fx.delete(e);const n=Hp(e);cb(n)?((function(o){if(o._parentEditor!==null){const a=vE(o),s=a[a.length-1]._key;dd.get(s)===o&&dd.delete(s)}else dd.delete(o._key)})(n),r.editors.delete(n),r.hasShadowEditor=void 0,e.__lexicalEditor=null):n&&ae(198);const i=f4(e);for(let o=0;o<i.length;o++)i[o]();e.__lexicalEventHandles=[]}function Ix(e,t,r){Cn();const n=e.__key,i=e.getParent();if(i===null)return void(Hn(e)!==null&&ae(367,n,String(Hn(e))));const o=(function(s){const l=xe();if(!ue(l)||!H(s))return l;const{anchor:c,focus:d}=l,f=c.getNode(),h=d.getNode();return Fd(f,s)&&c.set(s.__key,0,"element"),Fd(h,s)&&d.set(s.__key,0,"element"),l})(e);let a=!1;if(ue(o)&&t){const s=o.anchor,l=o.focus;s.key===n&&(L0(s,e,i,e.getPreviousSibling(),e.getNextSibling()),a=!0),l.key===n&&(L0(l,e,i,e.getPreviousSibling(),e.getNextSibling()),a=!0)}else fr(o)&&t&&e.isSelected()&&e.selectPrevious();if(ue(o)&&t&&!a){const s=e.getIndexWithinParent();Ss(e),vu(o,i,s,-1)}else Ss(e);r||vr(i)||i.canBeEmpty()||!i.isEmpty()||Ix(i,t),t&&o&&Mr(i)&&i.isEmpty()&&i.selectEnd()}const h4=Symbol.for("ephemeral");function I0(e){return e[h4]||!1}const bT={configurable:!0,enumerable:!1,value:void 0,writable:!0};class io{__type;__key;__parent;__prev;__next;__state;[Hh];static getType(){const{ownNodeType:t}=wE(this);return t===void 0&&ae(64,this.name),t}static clone(t){ae(65,this.name)}$config(){return{}}config(t,r){const n=r.extends||lL(this.constructor);return Object.assign(r,{extends:n}),typeof t=="string"&&Object.assign(r,{type:t}),{[t]:r}}afterCloneFrom(t){this.__key===t.__key?(this.__parent=t.__parent,this.__next=t.__next,this.__prev=t.__prev,this.__state=t.__state):t.__state&&(this.__state=t.__state.getWritable(this))}resetOnCopyNodeFrom(t){this.__state&&(this.__state=this.__state.getWritable(this).resetOnCopyNode())}static importDOM;constructor(t){this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,Object.defineProperty(this,"__state",bT),Object.defineProperty(this,Hh,bT),G4(this,t)}getType(){return this.__type}isInline(){ae(137,this.constructor.name)}isAttached(){let t=this.__key;for(;t!==null;){if(t==="root")return!0;const r=mr(t);if(r===null)break;t=r.__parent!==null?r.__parent:Hn(r)}return!1}isSelected(t){const r=t||xe();if(r==null)return!1;const n=r.getNodes().some(i=>i.__key===this.__key);if(fe(this))return n;if(ue(r)&&r.anchor.type==="element"&&r.focus.type==="element"){if(r.isCollapsed())return!1;const i=this.getParent();if(mt(this)&&this.isInline()&&i){const o=r.isBackward()?r.focus:r.anchor;if(i.is(o.getNode())&&o.offset===i.getChildrenSize()&&this.is(i.getLastChild()))return!1}}return n}getKey(){return this.__key}getIndexWithinParent(){const t=this.getParent();if(t===null)return-1;let r=t.getFirstChild(),n=0;for(;r!==null;){if(this.is(r))return n;n++,r=r.getNextSibling()}return-1}getParent(){const t=this.getLatest().__parent;return t===null?null:mr(t)}getParentOrThrow(){const t=this.getParent();return t===null&&ae(66,this.__key),t}getTopLevelElement(){let t=this;for(;t!==null;){const r=t.getParent();if(vr(r)||Hn(t)!==null)return H(t)||t===this&&mt(t)||ae(194),t;t=r}return null}getTopLevelElementOrThrow(){const t=this.getTopLevelElement();return t===null&&ae(67,this.__key),t}getParents(){const t=[];let r=this.getParent();for(;r!==null;)t.push(r),r=r.getParent();return t}getParentKeys(){const t=[];let r=this.getParent();for(;r!==null;)t.push(r.__key),r=r.getParent();return t}getPreviousSibling(){const t=this.getLatest().__prev;return t===null?null:mr(t)}getPreviousSiblings(){const t=[],r=this.getParent();if(r===null)return t;let n=r.getFirstChild();for(;n!==null&&!n.is(this);)t.push(n),n=n.getNextSibling();return t}getNextSibling(){const t=this.getLatest().__next;return t===null?null:mr(t)}getNextSiblings(){const t=[];let r=this.getNextSibling();for(;r!==null;)t.push(r),r=r.getNextSibling();return t}getCommonAncestor(t){const r=H(this)?this:this.getParent(),n=H(t)?t:t.getParent(),i=r&&n?Gx(r,n):null;return i?i.commonAncestor:null}is(t){return t!=null&&this.__key===t.__key}isBefore(t){const r=Gx(this,t);return r!==null&&(r.type==="descendant"||(r.type==="branch"?pL(r)===-1:(r.type!=="same"&&r.type!=="ancestor"&&ae(279),!1)))}isParentOf(t){return Fd(t,this)}getNodesBetween(t){const r=this.isBefore(t),n=[],i=new Set;let o=this;for(;o!==null;){const a=o.__key;if(i.has(a)||(i.add(a),n.push(o)),o===t)break;const s=H(o)?r?o.getFirstChild():o.getLastChild():null;if(s!==null){o=s;continue}const l=r?o.getNextSibling():o.getPreviousSibling();if(l!==null){o=l;continue}const c=o.getParentOrThrow();if(i.has(c.__key)||n.push(c),c===t)break;let d=null,f=c;do{if(f===null&&ae(68),d=r?f.getNextSibling():f.getPreviousSibling(),f=f.getParent(),f===null)break;d!==null||i.has(f.__key)||n.push(f)}while(d===null);o=d}return r||n.reverse(),n}isDirty(){const t=Wt()._dirtyLeaves;return t!==null&&t.has(this.__key)}getLatest(){if(I0(this))return this;const t=mr(this.__key);return t===null&&ae(113),t}getWritable(){if(I0(this))return this;Cn();const t=Vs(),r=Wt(),n=t._nodeMap,i=this.__key,o=this.getLatest(),a=r._cloneNotNeeded,s=xe();if(s!==null&&s.setCachedNodes(null),a.has(i))return V0(o),o;const l=oL(o);return a.add(i),V0(l),n.set(i,l),l}getTextContent(){return cL(this)}getTextContentSize(){return this.getTextContent().length}createDOM(t,r){ae(70)}updateDOM(t,r,n){ae(71)}getDOMSlot(t){return new S6(t)}exportDOM(t){return{element:this.createDOM(t._config,t)}}exportJSON(){const t=this.__state?this.__state.toJSON():void 0;return{type:this.__type,version:1,...t}}static importJSON(t){ae(18,this.name)}updateFromJSON(t){return(function(r,n){const i=r.getWritable(),o=n.$;let a=o;for(const s of D6(i).flatKeys)s in n&&(a!==void 0&&a!==o||(a={...o}),a[s]=n[s]);return(i.__state||a)&&N6(r).updateFromJSON(a),i})(this,t)}static transform(){return null}remove(t){Ix(this,!0,t)}replace(t,r){Cn();let n=xe();n!==null&&(n=n.clone()),ny(this,t);const i=this.getLatest(),o=this.__key,a=t.__key,s=t.getWritable(),l=this.getParentOrThrow().getWritable(),c=l.__size,d=s.getParent(),f=d!==null?s.getIndexWithinParent():-1;Ss(s),d!==null&&ue(n)&&vu(n,d,f,-1);const h=i.getPreviousSibling(),p=i.getNextSibling(),m=i.__prev,g=i.__next,v=i.__parent;Ix(i,!1,!0),h===null?l.__first=a:h.getWritable().__next=a,s.__prev=m,p===null?l.__last=a:p.getWritable().__prev=a,s.__next=g,s.__parent=v,l.__size=c;let b=0;r&&(H(this)&&H(s)||ae(139),b=s.getChildrenSize(),s.splice(b,0,this.getChildren()));const y=To(this);if(y.length>0){Cs(this)&&Cs(s)||ae(368,this.__key,s.__key);for(const S of y){const w=Hu(this,S);w!==null&&(eie(this,S),dL(s,S,w))}}if(ue(n)){Fn(n);const S=n.anchor,w=n.focus;S.key===o&&(r&&S.type==="element"?S.set(s.__key,b+S.offset,"element"):ST(S,s)),w.key===o&&(r&&w.type==="element"?w.set(s.__key,b+w.offset,"element"):ST(w,s))}return ws()===o&&Rn(a),s}insertAfter(t,r=!0){Cn(),ny(this,t);const n=this.getWritable(),i=t.getWritable();this.getParentOrThrow();const o=i.getParent(),a=xe();let s=!1,l=!1;if(o!==null){const p=t.getIndexWithinParent();if(ue(a)){const m=o.__key,g=a.anchor,v=a.focus;s=g.type==="element"&&g.key===m&&g.offset===p+1,l=v.type==="element"&&v.key===m&&v.offset===p+1}Ss(i),r&&ue(a)&&vu(a,o,p,-1)}else Ss(i);const c=this.getNextSibling(),d=this.getParentOrThrow().getWritable(),f=i.__key,h=n.__next;if(c===null?d.__last=f:c.getWritable().__prev=f,d.__size++,n.__next=f,i.__next=h,i.__prev=n.__key,i.__parent=n.__parent,r&&ue(a)){const p=this.getIndexWithinParent();vu(a,d,p+1);const m=d.__key;s&&a.anchor.set(m,p+2,"element"),l&&a.focus.set(m,p+2,"element")}return t}insertBefore(t,r=!0){Cn(),ny(this,t);const n=this.getWritable(),i=t.getWritable();this.getParentOrThrow();const o=i.__key,a=xe(),s=i.getParent(),l=s!==null?i.getIndexWithinParent():-1;Ss(i),s!==null&&r&&ue(a)&&vu(a,s,l,-1);const c=this.getPreviousSibling(),d=this.getParentOrThrow().getWritable(),f=n.__prev,h=this.getIndexWithinParent();return c===null?d.__first=o:c.getWritable().__next=o,d.__size++,n.__prev=o,i.__prev=f,i.__next=n.__key,i.__parent=n.__parent,r&&ue(a)&&vu(a,this.getParentOrThrow(),h),t}isParentRequired(){return!1}createParentElementNode(){return Xt()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(t,r){Cn();const n=ra(this);if(n!==null)return n.selectPrevious(t,r);const i=this.getPreviousSibling(),o=this.getParentOrThrow();if(i===null)return o.select(0,0);if(H(i))return i.select();if(!fe(i)){const a=i.getIndexWithinParent()+1;return o.select(a,a)}return i.select(t,r)}selectNext(t,r){Cn();const n=ra(this);if(n!==null)return n.selectNext(t,r);const i=this.getNextSibling(),o=this.getParentOrThrow();if(i===null)return o.select();if(H(i))return i.select(0,0);if(!fe(i)){const a=i.getIndexWithinParent();return o.select(a,a)}return i.select(t,r)}markDirty(){this.getWritable()}reconcileObservedMutation(t,r){this.markDirty()}}function p4(e){return e instanceof io}const P0="historic",m4="history-push",gh="history-merge",g4="paste",v4="cut",b4="collaboration",ene="skip-scroll-into-view",tne="skip-dom-selection",Px="skip-selection-focus",_4="composition-start",rp="composition-end",rne="!important";function O0(e){const t={};if(!e)return t;let r="",n="",i=null,o=!1,a=!1,s=!1,l=0;const c=e.length;let d=-1;for(let p=0;p<c;p++){const m=e[p];if(o)m==="*"&&e[p+1]==="/"&&(o=!1,p++);else if(a)d===-1&&(d=p),a=!1;else if(i===null)if(m!=="/"||e[p+1]!=="*")if(m!=='"'&&m!=="'")if(m!=="(")if(m!==")")if(s||m!==":"||l!==0){if(m===";"&&l===0){d!==-1&&(s?n+=e.slice(d,p):r+=e.slice(d,p),d=-1);const g=r.trim(),v=n.trim();g!==""&&v!==""&&(t[g]=v),r="",n="",s=!1;continue}d===-1&&(d=p)}else d!==-1&&(r+=e.slice(d,p),d=-1),s=!0;else d===-1&&(d=p),l=Math.max(0,l-1);else d===-1&&(d=p),l++;else d===-1&&(d=p),i=m;else d!==-1&&(s?n+=e.slice(d,p):r+=e.slice(d,p),d=-1),o=!0,p++;else d===-1&&(d=p),m==="\\"?a=!0:m===i&&(i=null)}d!==-1&&(s?n+=e.slice(d,c):r+=e.slice(d,c));const f=r.trim(),h=n.trim();return f!==""&&h!==""&&(t[f]=h),t}function nne(e,t,r){const n=r.trimEnd(),i=n.length-10;i>=0&&n.slice(i).toLowerCase()===rne?e.setProperty(t,n.slice(0,i).trim(),"important"):e.setProperty(t,r,"")}function fd(e,t,r=""){if(t===r)return;const n=O0(r),i=O0(t);for(const o in i)delete n[o],nne(e,o,i[o]);for(const o in n)e.removeProperty(o)}function J_(e,t){return 16&t?"code":t&tE?"mark":32&t?"sub":64&t?"sup":null}function Q_(e,t){return 1&t?"strong":2&t?"em":"span"}function y4(e,t,r,n,i){const o=n.classList;let a=pd(i,"base");a!==void 0&&o.add(...a),a=pd(i,"underlineStrikethrough");let s=!1;const l=8&t&&4&t;a!==void 0&&(8&r&&4&r?(s=!0,l||o.add(...a)):l&&o.remove(...a));for(const c in Ps){const d=Ps[c];if(a=pd(i,c),a!==void 0)if(r&d){if(s&&(c==="underline"||c==="strikethrough")){t&d&&o.remove(...a);continue}((t&d)===0||l&&c==="underline"||c==="strikethrough")&&o.add(...a)}else t&d&&o.remove(...a)}}function x4(e,t,r){const n=r.isComposing(),i=e+(n?Kh:""),o=Dr(),a=fb(o).$getDOMSlot(r,t,o),s=a.getFirstChild();if(s===null||s.nodeType!==Node.TEXT_NODE)return void a.insertChild(gr().createTextNode(i));const l=s,c=l.nodeValue;if(c!==i)if(n||Pl){const[d,f,h]=(function(p,m){const g=p.length,v=m.length;let b=0,y=0;for(;b<g&&b<v&&p[b]===m[b];)b++;for(;y+b<g&&y+b<v&&p[g-y-1]===m[v-y-1];)y++;return[b,g-b-y,m.slice(b,v-y)]})(c,i);f!==0&&l.deleteData(d,f),l.insertData(d,h)}else l.nodeValue=i}function _T(e,t,r,n,i,o){x4(i,e,t);const a=o.theme.text;a!==void 0&&y4(0,0,n,e,a)}function qm(e,t){const r=gr().createElement(t);return r.appendChild(e),r}function Ox(e){return e!=null&&e.__isInlineFormattable===!0}class qs extends io{__text;__format;__style;__mode;__detail;get __isInlineFormattable(){return!0}static getType(){return"text"}static clone(t){return new qs(t.__text,t.__key)}afterCloneFrom(t){super.afterCloneFrom(t),this.__text=t.__text,this.__format=t.__format,this.__style=t.__style,this.__mode=t.__mode,this.__detail=t.__detail}constructor(t="",r){super(r),this.__text=t,this.__format=0,this.__style="",this.__mode=0,this.__detail=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){const t=this.getLatest();return yre[t.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===ws()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(t){const r=Ps[t];return(this.getFormat()&r)!==0}isSimpleText(){return this.__type==="text"&&this.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(t,r){return qu(this.getLatest().__format,t,r)}canHaveFormat(){return!0}isInline(){return!0}createDOM(t,r){const n=this.__format,i=J_(0,n),o=Q_(0,n),a=i===null?o:i,s=gr().createElement(a);let l=s;this.hasFormat("code")&&s.setAttribute("spellcheck","false"),i!==null&&(l=gr().createElement(o),s.appendChild(l)),_T(l,this,0,n,this.__text,t);const c=this.__style;return c!==""&&fd(s.style,c),s}updateDOM(t,r,n){const i=this.__text,o=t.__format,a=this.__format,s=J_(0,o),l=J_(0,a),c=Q_(0,o),d=Q_(0,a);if((s===null?c:s)!==(l===null?d:l))return!0;if(s===l&&c!==d){const g=r.firstChild;g==null&&ae(48);const v=gr().createElement(d);return _T(v,this,0,a,i,n),r.replaceChild(v,g),!1}let f=r;l!==null&&s!==null&&(f=r.firstChild,f==null&&ae(49)),x4(i,f,this);const h=n.theme.text;h!==void 0&&o!==a&&y4(0,o,a,f,h);const p=t.__style,m=this.__style;return p!==m&&fd(r.style,m,p),!1}static importDOM(){return{"#text":()=>({conversion:sne,priority:0}),b:()=>({conversion:one,priority:0}),code:()=>({conversion:us,priority:0}),em:()=>({conversion:us,priority:0}),i:()=>({conversion:us,priority:0}),mark:()=>({conversion:us,priority:0}),s:()=>({conversion:us,priority:0}),span:()=>({conversion:ine,priority:0}),strong:()=>({conversion:us,priority:0}),sub:()=>({conversion:us,priority:0}),sup:()=>({conversion:us,priority:0}),u:()=>({conversion:us,priority:0})}}static importJSON(t){return Pr().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setTextContent(t.text).setFormat(t.format).setDetail(t.detail).setMode(t.mode).setStyle(t.style)}exportDOM(t){let{element:r}=super.exportDOM(t);return it(r)||ae(132),r.style.whiteSpace="pre-wrap",this.hasFormat("lowercase")?r.style.textTransform="lowercase":this.hasFormat("uppercase")?r.style.textTransform="uppercase":this.hasFormat("capitalize")&&(r.style.textTransform="capitalize"),this.hasFormat("bold")&&(r=qm(r,"b")),this.hasFormat("italic")&&(r=qm(r,"i")),this.hasFormat("strikethrough")&&(r=qm(r,"s")),this.hasFormat("underline")&&(r=qm(r,"u")),{element:r}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),...super.exportJSON()}}selectionTransform(t,r){}setFormat(t){const r=this.getWritable();return r.__format=typeof t=="string"?Ps[t]:t,r}setDetail(t){const r=this.getWritable();return r.__detail=typeof t=="string"?vre[t]:t,r}setStyle(t){const r=this.getWritable();return r.__style=t,r}toggleFormat(t){const r=qu(this.getFormat(),t,null);return this.setFormat(r)}toggleDirectionless(){const t=this.getWritable();return t.__detail^=1,t}toggleUnmergeable(){const t=this.getWritable();return t.__detail^=2,t}setMode(t){const r=_re[t];if(this.__mode===r)return this;const n=this.getWritable();return n.__mode=r,n}setTextContent(t){if(this.__text===t)return this;const r=this.getWritable();return r.__text=t,r}select(t,r){Cn();let n=t,i=r;const o=xe(),a=this.getTextContent(),s=this.__key;if(typeof a=="string"){const l=a.length;n===void 0&&(n=l),i===void 0&&(i=l)}else n=0,i=0;if(!ue(o))return D4(s,n,s,i,"text","text");{const l=ws();l!==o.anchor.key&&l!==o.focus.key||Rn(s),o.setTextNodeRange(this,n,this,i)}return o}selectStart(){return this.select(0,0)}selectEnd(){const t=this.getTextContentSize();return this.select(t,t)}spliceText(t,r,n,i){const o=this.getWritable(),a=o.__text,s=n.length;let l=t;l<0&&(l=s+l,l<0&&(l=0));const c=xe();if(i&&ue(c)){const f=t+s;c.setTextNodeRange(o,f,o,f)}const d=a.slice(0,l)+n+a.slice(l+r);return o.__text=d,o}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...t){Cn();const r=this.getLatest(),n=r.getTextContent();if(n==="")return[];const i=r.__key,o=ws(),a=n.length;t.sort((R,N)=>R-N),t.push(a);const s=[],l=t.length;for(let R=0,N=0;R<a&&N<=l;N++){const I=t[N];I>R&&(s.push(n.slice(R,I)),R=I)}const c=s.length;if(c===1)return[r];const d=s[0],f=r.getParent();let h;const p=r.getFormat(),m=r.getStyle(),g=r.__detail;let v=!1,b=null,y=null;const S=xe();if(ue(S)){const[R,N]=S.isBackward()?[S.focus,S.anchor]:[S.anchor,S.focus];R.type==="text"&&R.key===i&&(b=R),N.type==="text"&&N.key===i&&(y=N)}r.isSegmented()?(h=Pr(d),h.__format=p,h.__style=m,h.__detail=g,h.__state=eT(r,h),v=!0):h=r.setTextContent(d);const w=[h];for(let R=1;R<c;R++){const N=Pr(s[R]);N.__format=p,N.__style=m,N.__detail=g,N.__state=eT(r,N);const I=N.__key;o===i&&Rn(I),w.push(N)}const C=b?b.offset:null,A=y?y.offset:null;let $=0;for(const R of w){if(!b&&!y)break;const N=$+R.getTextContentSize();if(b!==null&&C!==null&&C<=N&&C>=$&&(b.set(R.getKey(),C-$,"text"),C<N&&(b=null)),y!==null&&A!==null&&A<=N&&A>=$){y.set(R.getKey(),A-$,"text");break}$=N}if(f!==null){(function(I){const M=I.getPreviousSibling(),P=I.getNextSibling();M!==null&&V0(M),P!==null&&V0(P)})(this);const R=f.getWritable(),N=this.getIndexWithinParent();v?(R.splice(N,0,w),this.remove()):R.splice(N,1,w),ue(S)&&vu(S,f,N,c-1)}return w}mergeWithSibling(t){const r=t===this.getPreviousSibling();r||t===this.getNextSibling()||ae(50);const n=this.__key,i=t.__key,o=this.__text,a=o.length;ws()===i&&Rn(n);const s=xe();if(ue(s)){const f=s.anchor,h=s.focus;f!==null&&f.key===i&&TT(f,r,n,t,a),h!==null&&h.key===i&&TT(h,r,n,t,a)}const l=t.__text,c=r?l+o:o+l;this.setTextContent(c);const d=this.getWritable();return t.remove(),d}isTextEntity(){return!1}}function ine(e){return{forChild:sE(e.style),node:null}}function one(e){const t=e,r=t.style.fontWeight==="normal";return{forChild:sE(t.style,r?void 0:"bold"),node:null}}const yT=new WeakMap;function ane(e){if(!it(e))return!1;if(e.nodeName==="PRE")return!0;const t=e.style.whiteSpace;return typeof t=="string"&&t.startsWith("pre")}function sne(e){const t=e;e.parentElement===null&&ae(129);let r=t.textContent||"";if((function(n){let i,o=n.parentNode;const a=[n];for(;o!==null&&(i=yT.get(o))===void 0&&!ane(o);)a.push(o),o=o.parentNode;const s=i===void 0?o:i;for(let l=0;l<a.length;l++)yT.set(a[l],s);return s})(t)!==null)return{node:np(r)};if(r=r.replace(/\r/g,"").replace(/[ \t\n]+/g," "),r==="")return{node:null};if(r[0]===" "){let n=t,i=!0;for(;n!==null&&(n=xT(n,!1))!==null;){const o=n.textContent||"";if(o.length>0){/[ \t\n]$/.test(o)&&(r=r.slice(1)),i=!1;break}}i&&(r=r.slice(1))}if(r[r.length-1]===" "){let n=t,i=!0;for(;n!==null&&(n=xT(n,!0))!==null;)if((n.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){i=!1;break}i&&(r=r.slice(0,r.length-1))}return r===""?{node:null}:{node:Pr(r)}}function xT(e,t){let r=e;for(;;){let n;for(;(n=t?r.nextSibling:r.previousSibling)===null;){const o=r.parentElement;if(o===null)return null;r=o}if(r=n,it(r)){const o=r.style.display;if(o===""&&!K0(r)||o!==""&&!o.startsWith("inline"))return null}let i=r;for(;(i=t?r.firstChild:r.lastChild)!==null;)r=i;if(qi(r))return r;if(r.nodeName==="BR")return null}}const lne={code:"code",em:"italic",i:"italic",mark:"highlight",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function us(e){const t=lne[e.nodeName.toLowerCase()];return t===void 0?{node:null}:{forChild:sE(e.style,t),node:null}}function Pr(e=""){return _a(new qs(e))}function fe(e){return e instanceof qs}function sE(e,t){const r=e.fontWeight,n=e.textDecoration.split(" "),i=r==="700"||r==="bold",o=n.includes("line-through"),a=e.fontStyle==="italic",s=n.includes("underline"),l=e.verticalAlign;return c=>((fe(c)||Ox(c))&&(i&&!c.hasFormat("bold")&&c.toggleFormat("bold"),o&&!c.hasFormat("strikethrough")&&c.toggleFormat("strikethrough"),a&&!c.hasFormat("italic")&&c.toggleFormat("italic"),s&&!c.hasFormat("underline")&&c.toggleFormat("underline"),l!=="sub"||c.hasFormat("subscript")||c.toggleFormat("subscript"),l!=="super"||c.hasFormat("superscript")||c.toggleFormat("superscript"),t&&!c.hasFormat(t)&&c.toggleFormat(t)),c)}class Qd extends qs{static getType(){return"tab"}static clone(t){return new Qd(t.__key)}constructor(t){super(" ",t),this.__detail=2}static importDOM(){return null}createDOM(t){const r=super.createDOM(t),n=pd(t.theme,"tab");return n!==void 0&&r.classList.add(...n),r}static importJSON(t){return Yd().updateFromJSON(t)}setTextContent(t){return super.setTextContent(" ")}spliceText(t,r,n,i){return n===""&&r===0||n===" "&&r===1||ae(286),this}setDetail(t){return t!==2&&ae(127),this}setMode(t){return t!=="normal"&&ae(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function Yd(){return _a(new Qd)}function ju(e){return e instanceof Qd}class une{key;offset;type;_selection;constructor(t,r,n){this._selection=null,this.key=t,this.offset=r,this.type=n}is(t){return this.key===t.key&&this.offset===t.offset&&this.type===t.type}isBefore(t){return this.key===t.key?this.offset<t.offset:ap(eo(Pi(this,"next")),eo(Pi(t,"next")))<0}getNode(){const t=mr(this.key);return t===null&&ae(20),t}set(t,r,n,i){const o=this._selection,a=this.key;i&&this.key===t&&this.offset===r&&this.type===n||(this.key=t,this.offset=r,this.type=n,$d()||(ws()===a&&Rn(t),o!==null&&(o.setCachedNodes(null),ue(o)&&(o._cachedIsBackward=null),o.dirty=!0)))}}function Ka(e,t,r){return new une(e,t,r)}function Y_(e,t){let r=t.__key,n=e.offset,i="element";if(fe(t)){i="text";const o=t.getTextContentSize();n>o&&(n=o)}else if(!H(t)){const o=t.getNextSibling();if(fe(o))r=o.__key,n=0,i="text";else{const a=t.getParent();a&&(r=a.__key,n=t.getIndexWithinParent()+1)}}e.set(r,n,i)}function ST(e,t){if(H(t)){const r=t.getLastDescendant();H(r)||fe(r)?Y_(e,r):Y_(e,t)}else Y_(e,t)}class lb{_nodes;_cachedNodes;dirty;constructor(t){this._cachedNodes=null,this._nodes=t,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(t){this._cachedNodes=t}is(t){if(!fr(t))return!1;const r=this._nodes,n=t._nodes;return r.size===n.size&&Array.from(r).every(i=>n.has(i))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(t){this.dirty=!0,this._nodes.add(t),this._cachedNodes=null}delete(t){this.dirty=!0,this._nodes.delete(t),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(t){return this._nodes.has(t)}clone(){return new lb(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(t){}insertText(){}insertNodes(t){const r=this.getNodes().filter(a=>Hn(a)===null),n=r.length;if(n===0)return;const i=r[n-1];let o;if(fe(i))o=i.select();else{const a=i.getIndexWithinParent()+1;o=i.getParentOrThrow().select(a,a)}o.insertNodes(t);for(let a=0;a<n;a++)r[a].remove()}getNodes(){const t=this._cachedNodes;if(t!==null)return t;const r=this._nodes,n=[];for(const i of r){const o=mr(i);o!==null&&n.push(o)}return $d()||(this._cachedNodes=n),n}getTextContent(){const t=this.getNodes();let r="";for(let n=0;n<t.length;n++)r+=t[n].getTextContent();return r}deleteNodes(){const t=this.getNodes().filter(r=>Hn(r)===null);if((xe()||Xd())===this&&t[0]){const r=Ht(t[0],"next");sp(oa(r,r))}for(const r of t)r.remove();S4()}}function S4(){const e=ln();if(e.isEmpty()){const t=Xt();e.append(t),t.select()}}function ue(e){return e instanceof oc}class oc{format;style;anchor;focus;_cachedNodes;_cachedIsBackward;dirty;constructor(t,r,n,i){this.anchor=t,this.focus=r,t._selection=this,r._selection=this,this._cachedNodes=null,this._cachedIsBackward=null,this.format=n,this.style=i,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(t){this._cachedNodes=t}is(t){return!!ue(t)&&this.anchor.is(t.anchor)&&this.focus.is(t.focus)&&this.format===t.format&&this.style===t.style}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){const t=this._cachedNodes;if(t!==null)return t;const r=(function(n){const i=[],[o,a]=n.getTextSlices();o&&i.push(o.caret.origin);const s=new Set,l=new Set;for(const c of n)if(No(c)){const{origin:d}=c;i.length===0?s.add(d):(l.add(d),i.push(d))}else{const{origin:d}=c;H(d)&&l.has(d)||i.push(d)}if(a&&i.push(a.caret.origin),Ml(n.focus)&&H(n.focus.origin)&&n.focus.getNodeAtCaret()===null)for(let c=Lo(n.focus.origin,"previous");No(c)&&s.has(c.origin)&&!c.origin.isEmpty()&&c.origin.is(i[i.length-1]);c=RE(c))s.delete(c.origin),i.pop();for(;i.length>1;){const c=i[i.length-1];if(!H(c)||l.has(c)||c.isEmpty()||s.has(c))break;i.pop()}if(i.length===0&&n.isCollapsed()){const c=eo(n.anchor),d=eo(n.anchor.getFlipped()),f=p=>$o(p)?p.origin:p.getNodeAtCaret(),h=f(c)||f(d)||(n.anchor.getNodeAtCaret()?c.origin:d.origin);i.push(h)}return i})($E(Kx(this),"next"));return $d()||(this._cachedNodes=r),r}setTextNodeRange(t,r,n,i){return this.anchor.set(t.__key,r,"text"),this.focus.set(n.__key,i,"text"),this}getTextContent(){const t=this.getNodes();if(t.length===0)return"";const r=t[0],n=t[t.length-1],i=this.anchor,o=this.focus,a=i.isBefore(o),[s,l]=Mx(this);let c="",d=!0;for(let f=0;f<t.length;f++){const h=t[f];if(H(h)&&!h.isInline()){d||(c+=`
|
|
24
|
+
`);let p="";for(const m of To(h)){const g=Hu(h,m);g!==null&&(p+=g.getTextContent())}p!==""?(c+=p,d=!1):d=!h.isEmpty()}else if(d=!1,fe(h)){let p=h.getTextContent();h===r?h===n?i.type==="element"&&o.type==="element"&&o.offset!==i.offset||(p=s<l?p.slice(s,l):p.slice(l,s)):p=a?p.slice(s):p.slice(l):h===n&&(p=a?p.slice(0,l):p.slice(0,s)),c+=p}else!mt(h)&&!bi(h)||h===n&&this.isCollapsed()||(c+=h.getTextContent())}return c}applyDOMRange(t){const r=Wt(),n=r.getEditorState()._selection,i=N4(t.startContainer,t.startOffset,t.endContainer,t.endOffset,r,n);if(i===null)return;const[o,a,s]=i;this.anchor.set(o.key,o.offset,o.type,!0),this.focus.set(a.key,a.offset,a.type,!0),s&&(this.dirty=!0),_l(this)}clone(){const t=this.anchor,r=this.focus;return new oc(Ka(t.key,t.offset,t.type),Ka(r.key,r.offset,r.type),this.format,this.style)}toggleFormat(t){this.format=qu(this.format,t,null),this.dirty=!0}setFormat(t){this.format=t,this.dirty=!0}setStyle(t){this.style=t,this.dirty=!0}hasFormat(t){const r=Ps[t];return(this.format&r)!==0}insertRawText(t){this.insertNodes(np(t))}insertText(t){const r=this.anchor,n=this.focus,i=this.format,o=this.style;let a=r,s=n;!this.isCollapsed()&&n.isBefore(r)&&(a=n,s=r),a.type==="element"&&(function(v,b,y,S){const w=v.getNode(),C=w.getChildAtIndex(v.offset),A=Pr();if(A.setFormat(y),A.setStyle(S),rf(C))C.splice(0,0,[A]);else if(C!==null){const $=vr(w)?Xt().append(A):A;C.insertBefore($)}else if(vr(w)){const $=w.getLastChild();H($)&&!$.isInline()&&$.isEmpty()?$.append(A):w.append(Xt().append(A))}else w.append(A);v.is(b)&&b.set(A.__key,0,"text"),v.set(A.__key,0,"text")})(a,s,i,o),s.type==="element"&&Qu(s,eo(Pi(s,"next")));const l=a.offset;let c=s.offset;const d=this.getNodes(),f=d.length;let h=d[0];fe(h)||ae(26);const p=h.getTextContent().length,m=h.getParentOrThrow();let g=d[f-1];if(f===1&&s.type==="element"&&(c=p,s.set(a.key,c,"text")),this.isCollapsed()&&l===p&&(Zi(h)||!h.canInsertTextAfter()||!m.canInsertTextAfter()&&h.getNextSibling()===null)){const v=h.getNextSibling();let b;if(fe(v)&&v.canInsertTextBefore()&&!Zi(v)?b=v:(b=Pr(),b.setFormat(i),b.setStyle(o),m.canInsertTextAfter()?h.insertAfter(b):m.insertAfter(b)),b.select(0,0),h=b,t!=="")return void this.insertText(t)}else if(this.isCollapsed()&&l===0&&(Zi(h)||!h.canInsertTextBefore()||!m.canInsertTextBefore()&&h.getPreviousSibling()===null)){const v=h.getPreviousSibling();let b;if(!fe(v)||Zi(v)?(b=Pr(),b.setFormat(i),m.canInsertTextBefore()?h.insertBefore(b):m.insertBefore(b)):b=v,b.select(),h=b,t!=="")return void this.insertText(t)}else if(h.isSegmented()&&l!==p)if(ws()!==null)h=h.setMode("normal").setFormat(i).setStyle(o);else{const v=Pr(h.getTextContent());v.setFormat(i),h.replace(v),h=v}else if(!this.isCollapsed()&&t!==""){const v=g.getParent();if(!m.canInsertTextBefore()||!m.canInsertTextAfter()||H(v)&&(!v.canInsertTextBefore()||!v.canInsertTextAfter()))return this.insertText(""),A4(this.anchor,this.focus),void this.insertText(t)}if(f===1){if(Cu(h)){const S=Pr(t);return S.select(),void h.replace(S)}const v=h.getFormat(),b=h.getStyle();if(l!==c||v===i&&b===o){if(ju(h)){const S=Pr(t);return S.setFormat(i),S.setStyle(o),S.select(),void h.replace(S)}}else{if(h.getTextContent()!==""){const S=Pr(t);if(S.setFormat(i),S.setStyle(o),S.select(),l===0)h.insertBefore(S,!1);else{const[w]=h.splitText(l);w.insertAfter(S,!1)}return void(S.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=t.length,this._cachedNodes=null,this._cachedIsBackward=null))}h.setFormat(i),h.setStyle(o)}const y=c-l;h=h.spliceText(l,y,t,!0),h.getTextContent()===""?h.remove():this.anchor.type==="text"&&(this.format=v,this.style=b,h.isComposing()&&(this.anchor.offset-=t.length,this._cachedNodes=null,this._cachedIsBackward=null))}else{const v=new Set([...h.getParentKeys(),...g.getParentKeys()]),b=H(h)?h:h.getParentOrThrow();let y=H(g)?g:g.getParentOrThrow(),S=g;if(!b.is(y)&&y.isInline())do S=y,y=y.getParentOrThrow();while(y.isInline());if(s.type==="text"&&(c!==0||g.getTextContent()==="")||s.type==="element"&&g.getIndexWithinParent()<c)if(fe(g)&&!Cu(g)&&c!==g.getTextContentSize()){if(g.isSegmented()){const R=Pr(g.getTextContent());g.replace(R),g=R}Mr(s.getNode())||s.type!=="text"||(fe(g)||ae(395),g=g.spliceText(0,c,"")),v.add(g.__key)}else{const R=g.getParentOrThrow();R.canBeEmpty()||R.getChildrenSize()!==1?g.remove():R.remove()}else v.add(g.__key);const w=y.getChildren(),C=new Set(d),A=b.is(y),$=b.isInline()&&h.getNextSibling()===null?b:h;for(let R=w.length-1;R>=0;R--){const N=w[R];if(N.is(h)||H(N)&&N.isParentOf(h))break;N.isAttached()&&(!C.has(N)||N.is(S)?A||$.insertAfter(N,!1):N.remove())}if(!A){let R=y,N=null;for(;R!==null;){const I=R.getChildren(),M=I.length;(M===0||I[M-1].is(N))&&(v.delete(R.__key),N=R),R=R.getParent()}}if(Cu(h))if(l===p)h.select();else{const R=Pr(t);R.select(),h.replace(R)}else h=h.spliceText(l,p-l,t,!0),h.getTextContent()===""?h.remove():this.anchor.type==="text"&&(this.format=h.getFormat(),this.style=h.getStyle(),h.isComposing()&&(this.anchor.offset-=t.length,this._cachedNodes=null,this._cachedIsBackward=null));for(let R=1;R<f;R++){const N=d[R],I=N.__key;v.has(I)||N.remove()}}}removeText(){const t=xe()===this;e0(this,lie(Kx(this))),t&&xe()!==this&&Fn(this)}formatText(t,r=null){E4(this,t,r)}insertNodes(t){if(t.length===0)return;this.isCollapsed()||this.removeText();const r=this.anchor.getNode();if(this.anchor.type==="element"&&H(r)&&Hn(r)!==null){let g=r.isShadowRoot()?r.getFirstChild()??r.append(Xt()).getFirstChild():r.getFirstChild();if(r.isShadowRoot()&&g!==null&&!H(g)){const v=Xt();g.insertBefore(v),g=v}if(g!==null){g.selectStart();const v=xe();return ue(v)||ae(369),v.insertNodes(t)}}if(this.anchor.type==="element"&&vr(r)){const g=Z_(t),v=g.getLastDescendant();return r.splice(this.anchor.offset,0,g.getChildren()),void(v!==null&&v.selectEnd())}let n=(this.isBackward()?this.focus:this.anchor).getNode(),i=cr(n,jn);const o=t[t.length-1];if(H(i)&&"__language"in i){if("__language"in t[0])this.insertText(t[0].getTextContent());else{const g=Pf(this);i.splice(g,0,t),o.selectEnd()}return}if(!t.some(g=>(H(g)||mt(g))&&!g.isInline())){H(i)||ae(211,n.constructor.name,n.getType());const g=Pf(this);return i.splice(g,0,t),void o.selectEnd()}if(H(i)&&Hn(i)!==null){const g=Pf(this),v=zx(t);i.splice(g,0,v);const b=v[v.length-1];return void(b!==void 0?b.selectEnd():i.select(g,g))}if(i===null){const g=Z_(t),v=g.getLastDescendant();let b=Pi(this.anchor,"next");for(const y of g.getChildren())b=gL(y,b);return void(v!==null&&v.selectEnd())}if(H(i)&&!i.isParentRequired()&&!vr(i.getParentOrThrow())){const g=Pf(this),v=zx(t);i.splice(g,0,v);const b=v[v.length-1];return void(b!==void 0?b.selectEnd():i.select(g,g))}const a=Z_(t),s=a.getLastDescendant(),l=a.getChildren(),c=!H(i)||!i.isEmpty()?this.insertParagraph():null;c&&!i.isAttached()&&(n=this.anchor.getNode(),i=cr(n,jn));const d=l[l.length-1];let f=l[0];var h;H(h=f)&&jn(h)&&!h.isEmpty()&&H(i)&&(!i.isEmpty()||i.canMergeWhenEmpty())&&(H(i)||ae(211,n.constructor.name,n.getType()),i.append(...f.getChildren()),f=l[1]),f&&(i===null&&ae(212,n.constructor.name,n.getType()),(function(g,v){const b=v.getParentOrThrow().getLastChild();let y=v;const S=[v];for(;y!==b;)y.getNextSibling()||ae(140),y=y.getNextSibling(),S.push(y);let w=g;for(const C of S)w=w.insertAfter(C)})(i,f));const p=cr(s,jn);c&&H(p)&&(c.canMergeWhenEmpty()||jn(d))&&(p.append(...c.getChildren()),c.remove()),H(i)&&i.isEmpty()&&i.remove(),s.selectEnd();const m=H(i)?i.getLastChild():null;bi(m)&&p!==i&&m.remove()}insertParagraph(){const t=this.anchor.getNode();if(this.anchor.type==="element"&&vr(t)){const s=Xt();return t.splice(this.anchor.offset,0,[s]),s.select(),s}const r=Pf(this),n=cr(this.anchor.getNode(),jn);if(n!==null&&Hn(n)!==null)return null;H(n)||ae(213);const i=n.getChildAtIndex(r),o=i?[i,...i.getNextSiblings()]:[],a=n.insertNewAfter(this,!1);return a?(a.append(...o),a.selectStart(),a):null}insertLineBreak(t){const r=da();if(this.insertNodes([r]),t){const n=r.getParentOrThrow(),i=r.getIndexWithinParent();n.select(i,i)}}extract(){const t=[...this.getNodes()],r=t.length;let n=t[0],i=t[r-1];const[o,a]=Mx(this),s=this.isBackward(),[l,c]=s?[this.focus,this.anchor]:[this.anchor,this.focus],[d,f]=s?[a,o]:[o,a];if(r===0)return[];if(r===1){if(fe(n)&&!this.isCollapsed()){const h=n.splitText(d,f),p=d===0?h[0]:h[1];return p?(l.set(p.getKey(),0,"text"),c.set(p.getKey(),p.getTextContentSize(),"text"),[p]):[]}return[n]}if(fe(n)&&(d===n.getTextContentSize()?t.shift():d!==0&&([,n]=n.splitText(d),t[0]=n,l.set(n.getKey(),0,"text"))),fe(i)){const h=i.getTextContent().length;f===0?t.pop():f!==h&&([i]=i.splitText(f),t[t.length-1]=i,c.set(i.getKey(),i.getTextContentSize(),"text"))}return t}modify(t,r,n){if(U0(this,t,r,n))return;const i=t==="move",o=Wt(),a=xi(Vi(o));if(!a)return;const s=o._blockCursorElement,l=o._rootElement,c=this.focus.getNode();l===null||s===null||!H(c)||c.isInline()||c.canBeEmpty()||G0(s,o,l);const d=Dd(o,this.focus.key);let f=d;if(this.focus.type==="text"&&(f=fe(c)?Tl(c,d,o):null),this.dirty){const h=Dd(o,this.anchor.key);let p=h;if(this.anchor.type==="text"){const m=this.anchor.getNode();p=fe(m)?Tl(m,h,o):null}p&&f&&z0(a,p,this.anchor.offset,f,this.focus.offset)}if(n==="character"&&fe(c)&&c.isUnmergeable()&&(r?this.focus.offset===0:this.focus.offset===c.getTextContentSize())){const h=Ht(c,r?"previous":"next").getNodeAtCaret();if(fe(h)){if(!i){const p=h.getTextContentSize();return r?this.focus.set(h.__key,p-1,"text"):this.focus.set(h.__key,1,"text"),void(this.dirty=!0)}{const p=o.getElementByKey(h.getKey()),m=p?Tl(h,p,o):null;if(m){const g=r?m.length:0;z0(a,m,g,m,g)}}}}if(C4(a,t,r?"backward":"forward",n),a.rangeCount>0){const h=db(a,o._rootElement),p=h||a.getRangeAt(0),m=this.anchor.getNode(),g=Mr(m)?m:Z4(m);this.applyDOMRange(p),this.dirty=!0,!i&&(R4(this,r,g),(h?a.direction!=="backward":a.anchorNode===p.startContainer&&a.anchorOffset===p.startOffset)||k4(this))}n==="lineboundary"&&U0(this,t,r,n,"decorators")}forwardDeletion(t,r,n){if(!n&&(t.type==="element"&&H(r)&&t.offset===r.getChildrenSize()||t.type==="text"&&t.offset===r.getTextContentSize())){const i=r.getParent(),o=r.getNextSibling()||(i===null?null:i.getNextSibling());if(H(o)&&o.isShadowRoot())return!0}return!1}deleteCharacter(t){const r=this.isCollapsed();if(this.isCollapsed()){const n=this.anchor;let i=n.getNode();if(this.forwardDeletion(n,i,t))return;const o=mb(Pi(n,t?"previous":"next"));if(o.getTextSlices().every(s=>s===null||s.distance===0)){let s={type:"initial"};for(const l of o.iterNodeCarets("shadowRoot"))if(No(l)){if(!l.origin.isInline()){if(l.origin.isShadowRoot()){if(s.type==="merge-block")break;if(H(o.anchor.origin)&&o.anchor.origin.isEmpty()){const c=eo(l);e0(this,oa(c,c)),o.anchor.origin.remove()}return}s.type!=="merge-next-block"&&s.type!=="merge-block"||(s={block:s.block,caret:l,type:"merge-block"})}}else{if(s.type==="merge-block")break;if(Ml(l)){if(H(l.origin)){if(l.origin.isInline()){if(!l.origin.isParentOf(o.anchor.origin))break}else s={block:l.origin,type:"merge-next-block"};continue}if(mt(l.origin)){if(!l.origin.isIsolated())if(To(l.origin).length>0){if(H(o.anchor.origin)&&o.anchor.origin.isEmpty()){o.anchor.origin.remove();const c=M0();c.add(l.origin.getKey()),Fn(c)}}else if(s.type==="merge-next-block"&&(l.origin.isKeyboardSelectable()||!l.origin.isInline())&&H(o.anchor.origin)&&o.anchor.origin.isEmpty()){o.anchor.origin.remove();const c=M0();c.add(l.origin.getKey()),Fn(c)}else l.origin.remove();return}break}}if(s.type==="merge-block"){const{caret:l,block:c}=s;return To(c).length>0?void 0:l.origin.isEmpty()&&!c.isEmpty()&&l.origin.getParent()===c.getParent()?void l.origin.remove(!0):(e0(this,oa(!l.origin.isEmpty()&&c.isEmpty()?uc(Ht(c,l.direction)):o.anchor,l)),this.removeText())}for(let l=n.getNode();l!==null;){if(Hn(l)!==null)return;if(H(l)&&l.isShadowRoot())break;l=l.getParent()}}const a=this.focus;if(X_(this,t,"character"),this.isCollapsed()){if(t&&n.offset===0&&ET(this,n.getNode()))return}else{const s=a.type==="text"?a.getNode():null;if(i=n.type==="text"?n.getNode():null,s!==null&&s.isSegmented()){const l=a.offset,c=s.getTextContentSize();if(s.is(i)||t&&l!==c||!t&&l!==0)return void kT(s,t,l)}else if(i!==null&&i.isSegmented()){const l=n.offset,c=i.getTextContentSize();if(i.is(s)||t&&l!==0||!t&&l!==c)return void kT(i,t,l)}(function(l,c){const d=l.anchor,f=l.focus,h=d.getNode(),p=f.getNode();if(h===p&&d.type==="text"&&f.type==="text"){const m=d.offset,g=f.offset,v=m<g,b=v?m:g,y=v?g:m,S=y-1;b!==S&&(function(w){return!(J4(w)||dne(w))})(h.getTextContent().slice(b,y))&&(c?f.set(f.key,S,f.type):d.set(d.key,S,d.type))}})(this,t)}}if(this.removeText(),t&&!r&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0){const n=this.anchor.getNode();n.isEmpty()&&Mr(n.getParent())&&n.getPreviousSibling()===null&&ET(this,n),S4()}}deleteLine(t){const r=Lx(this.anchor);if(r!==null&&mt(ra(r)))return this.isCollapsed()||this.focus.set(this.anchor.key,this.anchor.offset,this.anchor.type),void this.deleteCharacter(t);this.isCollapsed()&&X_(this,t,"lineboundary"),this.isCollapsed()?this.deleteCharacter(t):cr(this.anchor.getNode(),jn)!==cr(this.focus.getNode(),jn)?(this.focus.set(this.anchor.key,this.anchor.offset,this.anchor.type),this.deleteCharacter(t)):this.removeText()}deleteWord(t){if(this.isCollapsed()){const r=this.anchor,n=r.getNode();if(this.forwardDeletion(r,n,t))return;X_(this,t,"word")}this.isCollapsed()?this.deleteCharacter(t):this.removeText()}isBackward(){const t=this._cachedIsBackward;if(t!==null)return t;const r=this.focus.isBefore(this.anchor);return $d()||(this._cachedIsBackward=r),r}getStartEndPoints(){return[this.anchor,this.focus]}}function fr(e){return e instanceof lb}function w4(e,t){if(fr(e)){for(const b of e.getNodes())Ox(b)&&b.setFormat(t(b.getFormat()));return}if(e.isCollapsed())return e.setFormat(t(e.format)),void Rn(null);const r=[];for(const b of e.getNodes())fe(b)?r.push(b):H(b)?b.setTextFormat(t(b.getTextFormat())):Ox(b)&&b.setFormat(t(b.getFormat()));const n=r.length;if(n===0)return e.setFormat(t(e.format)),void Rn(null);const i=e.anchor,o=e.focus,a=e.isBackward(),s=a?o:i,l=a?i:o;let c=0,d=r[0],f=s.type==="element"?0:s.offset;if(s.type==="text"&&f===d.getTextContentSize()&&(c=1,d=r[1],f=0),d==null)return;const h=n-1;let p=r[h];const m=l.type==="text"?l.offset:p.getTextContentSize();if(d.is(p)){if(f===m)return;const b=t(d.getFormat());if(Zi(d)||f===0&&m===d.getTextContentSize())d.setFormat(b);else{const y=d.splitText(f,m),S=f===0?y[0]:y[1];S.setFormat(b),s.type==="text"&&s.set(S.__key,0,"text"),l.type==="text"&&l.set(S.__key,m-f,"text")}return void(e.format=b)}f===0||Zi(d)||([,d]=d.splitText(f),f=0);const g=t(d.getFormat());d.setFormat(g);const v=t(p.getFormat());m>0&&(m===p.getTextContentSize()||Zi(p)||([p]=p.splitText(m)),p.setFormat(v));for(let b=c+1;b<h;b++){const y=r[b];y.setFormat(t(y.getFormat()))}s.type==="text"&&s.set(d.__key,f,"text"),l.type==="text"&&l.set(p.__key,m,"text"),e.format=g|v}function cne(e,t){const r=[];for(const[n,i]of Object.entries(t))typeof i=="boolean"&&r.push([n,i]);r.length!==0&&w4(e,n=>{for(const[i,o]of r)n=qu(n,i,o?Ps[i]:0);return n})}function E4(e,t,r=null){const n=r===null&&ue(e)?qu(e.format,t,null):r;w4(e,i=>qu(i,t,n))}function wT(e){const t=e.offset;if(e.type==="text")return t;const r=e.getNode();return t===r.getChildrenSize()?r.getTextContent().length:0}function Mx(e){const t=e.getStartEndPoints();if(t===null)return[0,0];const[r,n]=t;return r.type==="element"&&n.type==="element"&&r.key===n.key&&r.offset===n.offset?[0,0]:[wT(r),wT(n)]}function ET(e,t){for(let r=t;r;r=r.getParent()){if(H(r)){if(r.collapseAtStart(e))return!0;if(vr(r))break}if(r.getPreviousSibling())break}return!1}function k4(e){const t=e.focus,r=e.anchor,n=r.key,i=r.offset,o=r.type;r.set(t.key,t.offset,t.type,!0),t.set(n,i,o,!0)}function C4(e,t,r,n){e.modify(t,r,n)}function R4(e,t,r){const n=e.getNodes(),i=n.filter(s=>Fd(s,r));if(i.length===0||i.length===n.length)return!1;const o=t?i[0]:i[i.length-1],a=H(o)?o:o.getParentOrThrow();return t?a.selectStart():a.selectEnd(),!0}function X_(e,t,r){if(U0(e,"extend",t,r))return;const n=Wt(),i=xi(Vi(n));if(!i||typeof i.modify!="function")return;const o=n._blockCursorElement,a=n._rootElement,s=e.anchor,l=e.focus.getNode();a===null||o===null||!H(l)||l.isInline()||l.canBeEmpty()||G0(o,n,a);const c=N=>{const I=N.getNode(),M=n.getElementByKey(N.key);return M!==null&&N.type==="text"&&fe(I)?Tl(I,M,n):M},d=s.getNode(),f=c(s);if(f===null)return;const h=s.offset,p=e.isCollapsed(),m=e.focus,g=p?f:c(m);if(g===null)return;const v=m.offset;if(z0(i,g,v,g,v),C4(i,"move",t?"backward":"forward",r),i.rangeCount===0)return;const b=db(i,a)||i.getRangeAt(0),y=b.startContainer,S=b.startOffset;if(p&&r==="character"&&s.type==="text"&&fe(d)&&d.isUnmergeable()&&h===(t?0:d.getTextContentSize())){const N=Ht(d,t?"previous":"next").getNodeAtCaret();if(fe(N)){const I=t?N.getTextContentSize()-1:1;return e.focus.set(N.__key,I,"text"),void(e.dirty=!0)}}if(p&&r==="character"&&s.type==="text"){const N=t?0:d.getTextContentSize(),I=y===f?S:h!==N?N:-1;if(I>=0)return void(I!==h&&(e.focus.set(s.key,I,"text"),e.dirty=!0))}const[w,C,A,$]=t?[y,S,f,h]:[f,h,y,S],R=Mr(d)?d:Z4(d);e.applyDOMRange({collapsed:!1,endContainer:A,endOffset:$,startContainer:w,startOffset:C}),e.dirty=!0,!R4(e,t,R)&&t&&k4(e),r==="lineboundary"&&U0(e,"extend",t,r,"decorators")}const dne=(()=>{try{const e=new RegExp("\\p{Emoji}","u"),t=e.test.bind(e);if(t("❤️")&&t("#️⃣")&&t("👍"))return t}catch{}return()=>!1})();function kT(e,t,r){const n=e,i=n.getTextContent().split(/(?=\s)/g),o=i.length;let a=0,s=0;for(let c=0;c<o;c++){const d=c===o-1;if(s=a,a+=i[c].length,t&&a===r||a>r||d){i.splice(c,1),d&&(s=void 0);break}}const l=i.join("").trim();l===""?n.remove():(n.setTextContent(l),n.select(s,s))}function CT(e,t,r,n){let i,o=t,a=!1;if(it(e)){let s=!1;const l=e.childNodes,c=l.length,d=n._blockCursorElement;o===c&&c>0&&(s=!0,o=c-1),nf(e,n)!==void 0||H0(e,n)||(a=!0);let f=l[o],h=!1;if(f===d)f=l[o+1],h=!0;else if(d!==null){const p=d.parentNode;e===p&&t>Array.prototype.indexOf.call(p.children,d)&&o--}if(i=Qc(f),fe(i))o=ja(i,s?"next":"previous");else{let p=Qc(e);if(p===null)return null;if(H(p)){const m=n.getElementByKey(p.getKey());m===null&&ae(214),[p,o]=Mo(p,m,n).resolveChildIndex(p,m,e,t),H(p)||ae(215),s&&o>=p.getChildrenSize()&&(o=Math.max(0,p.getChildrenSize()-1));let v=p.getChildAtIndex(o);if(H(v)&&(function(b,y,S){const w=b.getParent();return S===null||w===null||!w.canBeEmpty()||w!==S.getNode()})(v,0,r)){const b=s?v.getLastDescendant():v.getFirstDescendant();b===null?p=v:(v=b,p=H(v)?v:v.getParentOrThrow()),o=0}fe(v)?(i=v,p=null,o=ja(v,s?"next":"previous")):v!==p&&s&&!h&&(H(p)||ae(216),o=Math.min(p.getChildrenSize(),o+1))}else{const m=ra(p),g=m!==null?m:p,v=g.getIndexWithinParent(),b=n.getElementByKey(p.getKey());let y="after";if(b!==null&&Qc(e)===p){const S=Mo(p,b,n);S.element!==b?y=S.resolveLeafPosition(b,e,t):t===0&&mt(p)&&(y="before")}o=y==="before"?v:v+1,p=g.getParentOrThrow()}if(H(p))return[Ka(p.__key,o,"element"),a]}}else i=Qc(e);return fe(i)?[Ka(i.__key,ja(i,o,"clamp"),"text"),a]:null}function RT(e,t,r){const n=e.offset,i=e.getNode();if(n===0){const o=i.getPreviousSibling(),a=i.getParent();if(t){if((r||!t)&&o===null&&H(a)&&a.isInline()){const s=a.getPreviousSibling();fe(s)&&e.set(s.__key,s.getTextContent().length,"text")}}else H(o)&&!r&&o.isInline()?e.set(o.__key,o.getChildrenSize(),"element"):fe(o)&&!i.isUnmergeable()&&e.set(o.__key,o.getTextContent().length,"text")}else if(n===i.getTextContent().length){const o=i.getNextSibling(),a=i.getParent();if(t&&H(o)&&o.isInline())e.set(o.__key,0,"element");else if((r||t)&&o===null&&H(a)&&a.isInline()&&!a.canInsertTextAfter()&&a.getTextContentSize()>1){const s=a.getNextSibling();fe(s)&&e.set(s.__key,0,"text")}}}function A4(e,t,r){if(e.type==="text"&&t.type==="text"){const n=e.isBefore(t),i=e.is(t);RT(e,n,i),RT(t,!n,i),i&&t.set(e.key,e.offset,e.type)}}function Lx(e){const t=mr(e.key);return t===null?null:hb(t)}function T4(e,t,r){const n=Lx(e),i=Lx(t);if(n===i||n!==null&&i!==null&&n.is(i))return!1;const o=r(n,i);if(n!==null)return H(n)?t.set(n.getKey(),o?n.getChildrenSize():0,"element"):t.set(n.getKey(),o?n.getTextContentSize():0,"text"),!0;const a=ra(i);if(a===null)return!1;const s=a.getParent();if(s===null)return!1;const l=a.getIndexWithinParent();return t.set(s.getKey(),o?l+1:l,"element"),!0}function $4(e){const t=T4(e.anchor,e.focus,(r,n)=>(function(i,o,a,s){if(a!==null&&s!==null){const d=ra(a),f=ra(s);if(d!==null&&d.is(f)){for(const h of pb(d).values()){if(h===a.getKey())return!0;if(h===s.getKey())return!1}return!0}return d===null||f===null||d.isBefore(f)}if(a!==null){const d=ra(a),f=mr(o.key);return d===null||f===null||!(!d.is(f)&&!d.isParentOf(f))||d.isBefore(f)}const l=ra(s),c=mr(i.key);return l!==null&&c!==null&&!l.is(c)&&!l.isParentOf(c)&&c.isBefore(l)})(e.anchor,e.focus,r,n));return t&&(e.dirty=!0),t}function N4(e,t,r,n,i,o){if(e===null||r===null||!Kp(i,e,r))return null;const a=CT(e,t,ue(o)?o.anchor:null,i);if(a===null)return null;const s=CT(r,n,ue(o)?o.focus:null,i);if(s===null)return null;const[l,c]=a,[d,f]=s;if(l.type==="element"&&d.type==="element"){const p=Qc(e),m=Qc(r);if(mt(p)&&mt(m))return null}const h=i._slotsUsed&&T4(l,d,()=>(e.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_FOLLOWING)!==0);return A4(l,d),[l,d,c||f||h]}function Td(e){return H(e)&&!e.isInline()}function D4(e,t,r,n,i,o){const a=Vs(),s=new oc(Ka(e,t,i),Ka(r,n,o),0,"");return s.dirty=!0,a._selection=s,s}function lE(){const e=Ka("root",0,"element"),t=Ka("root",0,"element");return new oc(e,t,0,"")}function M0(){return new lb(new Set)}function uE(e,t,r,n){const i=r._window;if(i===null)return null;const o=n||i.event,a=o?o.type:void 0,s=a==="selectionchange",l=!wx&&(s||a==="beforeinput"||a==="compositionstart"||a==="compositionend"||a==="click"&&o&&o.detail===3||a==="drop"||a===void 0);let c,d,f,h;if(ue(e)&&!l)return e.clone();{if(t===null)return null;const w=Oo(t,r._rootElement);if(c=w.anchorNode,d=w.focusNode,f=w.anchorOffset,h=w.focusOffset,(s||a===void 0)&&ue(e)&&!Kp(r,c,d))return e.clone()}const p=N4(c,f,d,h,r,e);if(p===null)return null;const[m,g,v]=p;let b=0,y="";if(ue(e)){const w=e.anchor;if(m.key===w.key)b=e.format,y=e.style;else{const C=m.getNode();fe(C)?(b=C.getFormat(),y=C.getStyle()):H(C)&&(b=C.getTextFormat(),y=C.getTextStyle())}}const S=new oc(m,g,b,y);return v&&(S.dirty=!0),S}function xe(){return Vs()._selection}function Xd(){return Wt()._editorState._selection}function vu(e,t,r,n=1){const i=e.anchor,o=e.focus,a=i.getNode(),s=o.getNode();if(!t.is(a)&&!t.is(s))return;const l=t.__key;if(e.isCollapsed()){const c=i.offset;if(r<=c&&n>0||r<c&&n<0){const d=Math.max(0,c+n);i.set(l,d,"element"),o.set(l,d,"element"),AT(e)}}else{const c=e.isBackward(),d=c?o:i,f=d.getNode(),h=c?i:o,p=h.getNode();if(t.is(f)){const m=d.offset;(r<=m&&n>0||r<m&&n<0)&&d.set(l,Math.max(0,m+n),"element")}if(t.is(p)){const m=h.offset;(r<=m&&n>0||r<m&&n<0)&&h.set(l,Math.max(0,m+n),"element")}}AT(e)}function AT(e){const t=e.anchor,r=t.offset,n=e.focus,i=n.offset,o=t.getNode(),a=n.getNode();if(e.isCollapsed()){if(!H(o))return;const s=o.getChildrenSize(),l=r>=s,c=l?o.getChildAtIndex(s-1):o.getChildAtIndex(r);if(fe(c)){let d=0;l&&(d=c.getTextContentSize()),t.set(c.__key,d,"text"),n.set(c.__key,d,"text")}return}if(H(o)){const s=o.getChildrenSize(),l=r>=s,c=l?o.getChildAtIndex(s-1):o.getChildAtIndex(r);if(fe(c)){let d=0;l&&(d=c.getTextContentSize()),t.set(c.__key,d,"text")}}if(H(a)){const s=a.getChildrenSize(),l=i>=s,c=l?a.getChildAtIndex(s-1):a.getChildAtIndex(i);if(fe(c)){let d=0;l&&(d=c.getTextContentSize()),n.set(c.__key,d,"text")}}}function L0(e,t,r,n,i){let o=null,a=0,s=null;n!==null?(o=n.__key,fe(n)?(a=n.getTextContentSize(),s="text"):H(n)&&(a=n.getChildrenSize(),s="element")):i!==null&&(o=i.__key,fe(i)?s="text":H(i)&&(s="element")),o!==null&&s!==null?e.set(o,a,s):(a=t.getIndexWithinParent(),a===-1&&(a=r.getChildrenSize()),e.set(r.__key,a,"element"))}function TT(e,t,r,n,i){e.type==="text"?e.set(r,e.offset+(t?0:i),"text"):e.offset>n.getIndexWithinParent()&&e.set(e.key,e.offset-1,"element")}function z0(e,t,r,n,i){try{e.setBaseAndExtent(t,r,n,i)}catch{}}function $T(e,t,r){const n=Dd(e,t.getKey());if(H(t)){const i=Mo(t,n,e);return[i.element,r+i.getFirstChildOffset()]}return[n,r]}function fne(e,t,r,n,i,o){const a=o.getRootNode(),s=ac(a)||Os(a)?ip(a):null;if(i.has(b4)&&s!==o||s!==null&&gE(s,s))return;const l=Oo(n,o);let c;if(!ue(t))return void(e!==null&&Kp(r,l.anchorNode,l.focusNode)&&n.removeAllRanges());const d=t.anchor,f=t.focus,h=d.getNode(),p=f.getNode(),[m,g]=$T(r,h,d.offset),[v,b]=$T(r,p,f.offset),y=t.format,S=t.style,w=t.isCollapsed();let C=m,A=v,$=!1;if(d.type==="text"?(C=fe(h)?Tl(h,m,r):null,$=h.getFormat()!==y||h.getStyle()!==S):ue(e)&&e.anchor.type==="text"&&($=!0),f.type==="text"&&(A=fe(p)?Tl(p,v,r):null),C!==null&&A!==null){if(w&&(e===null||$||ue(e)&&(e.format!==y||e.style!==S))&&(function(R,N,I,M,P,B){R._inputState.collapsedSelectionFormat={format:N,key:P,offset:M,style:I,timeStamp:B}})(r,y,S,g,d.key,performance.now()),(n.type!=="Range"||!w)&&l.anchorOffset===g&&l.focusOffset===b&&l.anchorNode===C&&l.focusNode===A){if(s===null||!o.contains(s)){const R=s!==null?hd(s):null;R!==null&&R!==r||i.has(Px)||o.focus({preventScroll:!0})}if(d.type!=="element")return}if(z0(n,C,g,A,b),Pl&&t.isCollapsed()&&o!==null&&!i.has(Px)){const R=jx(o);if(R===null||!o.contains(R)){const N=ip(o.ownerDocument),I=N!==null?hd(N):null;I!==null&&I!==r||o.focus({preventScroll:!0})}}if(!i.has(ene)&&t.isCollapsed()&&o!==null&&o===jx(o)){const R=ue(t)&&t.anchor.type==="element"?C.childNodes[g]||null:(c===void 0&&(c=Lne(n,o)),c);if(R!==null){let N;if(qi(R)){const I=R.ownerDocument.createRange();I.selectNode(R),N=I.getBoundingClientRect()}else N=R.getBoundingClientRect();(function(I,M,P){const B=xE(P),j=SE(B);if(B===null||j===null)return;const W=P.getBoundingClientRect();if(M.bottom<W.top)return;let{top:te,bottom:J}=M,re=0,se=0,he=P;for(;he!==null;){const K=he===B.body;if(K){const le=j.visualViewport;if(le){const be=le.offsetTop;re=be,se=be+le.height}else re=0,se=Vi(I).innerHeight;const Z=j.getComputedStyle(B.documentElement),ve=parseFloat(Z.scrollPaddingTop),pe=parseFloat(Z.scrollPaddingBottom);isFinite(ve)&&(re+=ve),isFinite(pe)&&(se-=pe)}else{const le=he===P?W:he.getBoundingClientRect();re=le.top,se=le.bottom}let ie=0;if(te<re?ie=-(re-te):J>se&&(ie=J-se),ie!==0)if(K)j.scrollBy(0,ie);else{const le=he.scrollTop;he.scrollTop+=ie;const Z=he.scrollTop-le;te-=Z,J-=Z}if(K)break;he=sc(he)}})(r,N,o)}}(function(R){R._inputState.isSelectionChangeFromDOMUpdate=!0})(r)}}function hne(e){let t=xe()||Xd();t===null&&(t=ln().selectEnd()),t.insertNodes(e)}function F4(e,t){for(const r of e.split(/(\r?\n|\t)/))r===`
|
|
25
|
+
`||r===`\r
|
|
26
|
+
`?t.linebreak():r===" "?t.tab():r!==""&&t.text(r)}function np(e){const t=[];return F4(e,{linebreak:()=>t.push(da()),tab:()=>t.push(Yd()),text:r=>t.push(Pr(r))}),t}function zx(e){const t=[];for(const r of e)bi(r)||(!H(r)&&!mt(r)||r.isInline()?t.push(r):H(r)&&t.push(...zx(r.getChildren())));return t}function Pf(e){let t=e;e.isCollapsed()||t.removeText();const r=xe();ue(r)&&(t=r),ue(t)||ae(161);const n=t.anchor;let i=n.getNode(),o=n.offset;for(;!jn(i)&&Hn(i)===null;){const a=i;if([i,o]=pne(i,o),a.is(i))break}return o}function pne(e,t){const r=e.getParent();if(!r){const i=Xt();return ln().append(i),i.select(),[ln(),0]}if(fe(e)){const i=e.splitText(t);if(i.length===0)return[r,e.getIndexWithinParent()];const o=t===0?0:1;return[r,i[0].getIndexWithinParent()+o]}if(!H(e)||t===0)return[r,e.getIndexWithinParent()];const n=e.getChildAtIndex(t);if(n){const i=new oc(Ka(e.__key,t,"element"),Ka(e.__key,t,"element"),0,""),o=e.insertNewAfter(i);o&&o.append(n,...n.getNextSiblings())}return[r,e.getIndexWithinParent()+1]}function NT(e){return bi(e)||Ine(e)||fe(e)||e.isParentRequired()}function Z_(e){const t=Xt();let r=null;for(let n=0;n<e.length;n++){const i=e[n];if(NT(i)){if(r===null){r=i.createParentElementNode(),t.append(r);const o=e[n+1];if(bi(i)&&(o===void 0||!NT(o)))continue}r.append(i)}else t.append(i),r=null}return t}function U0(e,t,r,n,i="decorators-and-blocks"){if(t==="move"&&n==="character"&&!e.isCollapsed()){const[d,f]=r===e.isBackward()?[e.focus,e.anchor]:[e.anchor,e.focus];return f.set(d.key,d.offset,d.type),!0}const o=Pi(e.focus,r?"previous":"next"),a=n==="lineboundary",s=t==="move";let l=o,c=i==="decorators-and-blocks";if(!TE(l)){for(const d of l){c=!1;const{origin:f}=d;if(!mt(f)||f.isIsolated()||(l=d,!a||!f.isInline()))break}if(c)for(const d of mb(o).iterNodeCarets(t==="extend"?"shadowRoot":"root")){if(No(d))d.origin.isInline()||(l=d);else{if(H(d.origin))continue;mt(d.origin)&&!d.origin.isInline()&&(l=d)}break}}if(l===o)return!1;if(s&&!a&&mt(l.origin)&&l.origin.isKeyboardSelectable()){const d=M0();return d.add(l.origin.getKey()),Fn(d),!0}return l=eo(l),s&&Qu(e.anchor,l),Qu(e.focus,l),c||!a}let Tn=null,Xr=null,Ii=!1,ey=!1,Yg=!1;const ty=new Set;let Xg=0;const DT={characterData:!0,childList:!0,subtree:!0};function $d(){return Ii||Tn!==null&&Tn._readOnly}function Cn(){Ii&&ae(13)}function I4(){Xg>99&&ae(14)}function Vs(){return Tn===null&&ae(195,P4()),Tn}function mne(e){Vs()!==null&&Xr===null&&(Xr=e),Xr!==e&&_6(378)}function Wt(){return Xr===null&&ae(337,P4()),Xr}function gne(){Wt()._dirtyType=2}function P4(){let e=0;const t=new Set,r=Nd.version;if(typeof window<"u")for(const i of tL(document)){const o=Hp(i);if(cb(o))e++;else if(o){let a=String(o.constructor.version||"<0.17.1");a===r&&(a+=" (separately built, likely a bundler configuration issue)"),t.add(a)}}let n=` Detected on the page: ${e} compatible editor(s) with version ${r}`;return t.size&&(n+=` and incompatible editors with versions ${Array.from(t).join(", ")}`),n}function O4(){return Xr}function FT(e,t,r){const n=t.__type,i=q4(e,n);let o=r.get(n);o===void 0&&(o=Array.from(i.transforms),r.set(n,o));const a=o.length;for(let s=0;s<a&&(o[s](t),t.isAttached());s++);}function IT(e,t){return e!==void 0&&e.__key!==t&&e.isAttached()}function M4(e,t){if(!t)return;const r=e._updateTags;let n=t;Array.isArray(t)||(n=[t]);for(const i of n)r.add(i)}function vne(e){return B0(e,Wt()._nodes)}function B0(e,t){const r=e.type,n=t.get(r);n===void 0&&ae(17,r);const i=n.klass;e.type!==i.getType()&&ae(18,i.name);const o=i.importJSON(e),a=e.children;if(H(o)&&Array.isArray(a))for(let l=0;l<a.length;l++){const c=B0(a[l],t);o.append(c)}const s=e.$slots;if(s){Cs(o)||ae(379,i.name);for(const l in s)dL(o,l,B0(s[l],t))}return o}function PT(e,t,r){const n=Tn,i=Ii,o=Xr;Tn=t,Ii=!0,Xr=e;try{return r()}finally{Tn=n,Ii=i,Xr=o}}function yl(e,t){const r=Yg;Yg=!0;try{(function(n,i){const o=n._pendingEditorState,a=n._rootElement,s=n._headless||a===null;if(o===null)return void(!n._updating&&n._deferred.length>0&&OT(n,n._deferred));const l=n._editorState,c=l._selection,d=o._selection,f=n._dirtyType!==0,h=Tn,p=Ii,m=Xr,g=n._updating,v=n._observer;let b=null;if(n._pendingEditorState=null,n._editorState=o,!s&&f&&v!==null){Xr=n,Tn=o,Ii=!1,n._updating=!0;try{const R=n._dirtyType,N=n._dirtyElements,I=n._dirtyLeaves;v.disconnect(),b=Fre(l,o,n,R,N,I)}catch(R){if(R instanceof Error&&n._onError(R),ey)throw R;return j4(n,null,a,o),T6(n),n._dirtyType=2,ey=!0,yl(n,l),void(ey=!1)}finally{v.observe(a,DT),n._updating=g,Tn=h,Ii=p,Xr=m}}o._readOnly||(o._readOnly=!0);const y=n._dirtyLeaves,S=n._dirtyElements,w=n._normalizedNodes,C=n._updateTags;f&&(n._dirtyType=0,n._cloneNotNeeded.clear(),n._dirtyLeaves=new Set,n._dirtyElements=new Map,n._normalizedNodes=new Set),n._updateTags=new Set,(function(R,N){const I=R._decorators;let M=R._pendingDecorators||I;const P=N._nodeMap;let B;for(B in M)P.has(B)||(M===I&&(M=W4(R)),delete M[B])})(n,o);const A=s?null:xi(Vi(n));if(n._editable&&A!==null&&(f||d===null||d.dirty||!d.is(c))&&a!==null&&!C.has(tne)){Xr=n,Tn=o;try{if(v!==null&&v.disconnect(),f||d===null||d.dirty){const R=n._blockCursorElement;R!==null&&G0(R,n,a),fne(c,d,n,A,C,a)}(function(R,N,I){let M=R._blockCursorElement;if(ue(I)&&I.isCollapsed()&&I.anchor.type==="element"&&N.contains(jx(N))){const P=I.anchor,B=P.getNode(),j=P.offset;let W=!1,te=null;if(j===B.getChildrenSize())Zg(B.getChildAtIndex(j-1))&&(W=!0);else{const J=B.getChildAtIndex(j);if(J!==null&&Zg(J)){const re=J.getPreviousSibling();(re===null||Zg(re))&&(W=!0,te=R.getElementByKey(J.__key))}}if(W){const J=Mo(B,R.getElementByKey(B.__key),R).element;return M===null&&(R._blockCursorElement=M=(function(re){const se=re.theme,he=gr().createElement("div");he.contentEditable="false",he.setAttribute("data-lexical-cursor","true");let K=se.blockCursor;if(K!==void 0){if(typeof K=="string"){const ie=Rs(K);K=se.blockCursor=ie}K!==void 0&&he.classList.add(...K)}return he})(R._config)),N.style.caretColor="transparent",void(te===null?J.appendChild(M):J.insertBefore(M,te))}}M!==null&&G0(M,R,N)})(n,a,d)}finally{v!==null&&v.observe(a,DT),Xr=m,Tn=h}}b!==null&&(function(R,N,I,M,P){const B=Array.from(R._listeners.mutation),j=B.length;for(let W=0;W<j;W++){const[te,J]=B[W];for(const re of J){const se=N.get(re);se!==void 0&&te(se,{dirtyLeaves:M,prevEditorState:P,updateTags:I})}}})(n,b,C,y,l),ue(d)||d===null||c!==null&&c.is(d)||n.dispatchCommand(B6,void 0);const $=n._pendingDecorators;$!==null&&(n._decorators=$,n._pendingDecorators=null,vh("decorator",n,!0,$)),(function(R,N,I){const M=zT(N),P=zT(I);M!==P&&vh("textcontent",R,!0,P)})(n,i||l,o),vh("update",n,!0,{dirtyElements:S,dirtyLeaves:y,editorState:o,mutatedNodes:b,normalizedNodes:w,prevEditorState:i||l,tags:C}),!g&&OT(n,n._deferred),(function(R){const N=R._updates;if(N.length===0)return void(R._cascadeCount=0);if((function(M){ty.has(M)||(ty.add(M),setTimeout(()=>{ty.delete(M),M._cascadeCount=0},0))})(R),R._cascadeCount++>99)return R._updates=[],R._cascadeCount=0,void R._onWarn(new Error(`One or more update listeners are endlessly enqueueing more updates. May have encountered infinite recursion caused by update listeners that trigger additional updates without a stop condition. Editor namespace: ${R._config.namespace}`));const I=N.shift();if(I){const[M,P]=I;ub(R,M,P)}})(n)})(e,t)}finally{Yg=r}}function vh(e,t,r,...n){const i=t._updating;t._updating=r;try{const o=t._listeners[e],a=Array.from(o);for(const[s,l]of a){l&&l();const c=s(...n);o.has(s)?o.set(s,c):c&&c()}}finally{t._updating=i}}function L4(e,t,r,n){const i=vE(e);let o;if(!Yg)for(let a=0;a<i.length;a++)i[a]._updating||(i[a]._cascadeCount=0);for(let a=4;a>=0;a--)for(let s=0;s<i.length;s++){const l=i[s];if(s>0&&l._updating){o=l;break}const c=l._commands.get(t);if(c!==void 0){const d=c[a];if(d.size>0){let f=!1;if(Ao(l,()=>{for(const h of d)if(h(r,n))return void(f=!0)}),f)return f}}}return o&&o.update(()=>{L4(o,t,r,n)}),!1}function OT(e,t){if(e._deferred=[],t.length!==0){const r=e._updating;e._updating=!0;try{for(let n=0;n<t.length;n++)t[n]()}finally{e._updating=r}}}function MT(e,t){const r=e._updates;let n=t||!1;for(;r.length!==0;){const i=r.shift();if(i){const[o,a]=i,s=e._pendingEditorState;let l;a!==void 0&&(l=a.onUpdate,a.skipTransforms&&(n=!0),a.discrete&&(s===null&&ae(191),s._flushSync=!0),l&&e._deferred.push(l),M4(e,a.tag)),s==null?ub(e,o,a):o()}}return n}function ub(e,t,r){const n=e._updateTags;let i,o=!1,a=!1;r!==void 0&&(i=r.onUpdate,M4(e,r.tag),o=r.skipTransforms||!1,a=r.discrete||!1),i&&e._deferred.push(i);const s=e._editorState;let l=e._pendingEditorState,c=!1;(l===null||l._readOnly)&&(l=e._pendingEditorState=z4(l||s),c=!0),l._flushSync=a;const d=Tn,f=Ii,h=Xr,p=e._updating;Tn=l,Ii=!1,e._updating=!0,Xr=e;const m=e._headless||e.getRootElement()===null;pE(null);try{c&&(m?s._selection!==null&&(l._selection=s._selection.clone()):l._selection=(function(y,S){const w=y.getEditorState()._selection,C=xi(Vi(y));return ue(w)||w==null?uE(w,C,y,S):w.clone()})(e,r&&r.event||null));const v=e._compositionKey;t(),o=MT(e,o),(function(y,S){const w=S.getEditorState()._selection,C=y._selection;if(ue(C)){const A=C.anchor,$=C.focus;let R;if(A.type==="text"&&(R=A.getNode(),R.selectionTransform(w,C)),$.type==="text"){const N=$.getNode();R!==N&&N.selectionTransform(w,C)}}})(l,e),e._dirtyType!==0&&(o?(function(y,S){const w=S._dirtyLeaves,C=y._nodeMap;for(const A of w){const $=C.get(A);fe($)&&$.isAttached()&&$.isSimpleText()&&!$.isUnmergeable()&&nT($)}})(l,e):(function(y,S){const w=S._dirtyLeaves,C=S._dirtyElements,A=y._nodeMap,$=ws(),R=new Map;let N=w,I=N.size,M=C,P=M.size;for(;I>0||P>0;){if(I>0){S._dirtyLeaves=new Set;for(const B of N){const j=A.get(B);fe(j)&&j.isAttached()&&j.isSimpleText()&&!j.isUnmergeable()&&nT(j),j!==void 0&&IT(j,$)&&FT(S,j,R),w.add(B)}if(N=S._dirtyLeaves,I=N.size,I>0){Xg++;continue}}S._dirtyLeaves=new Set,S._dirtyElements=new Map,M.delete("root")&&M.set("root",!0);for(const B of M){const j=B[0],W=B[1];if(C.set(j,W),!W)continue;const te=A.get(j);te!==void 0&&IT(te,$)&&FT(S,te,R)}N=S._dirtyLeaves,I=N.size,M=S._dirtyElements,P=M.size,Xg++}S._dirtyLeaves=w,S._dirtyElements=C})(l,e),MT(e),(function(y,S,w,C){const A=y._nodeMap,$=S._nodeMap,R=[];for(const[M]of C){const P=$.get(M);P!==void 0&&(P.isAttached()||(H(P)&&$0(P,M,A,$,R,C),A.has(M)||C.delete(M),R.push(M)))}for(const M of w){const P=$.get(M);P===void 0||P.isAttached()||(Cs(P)&&P.__slots!==null&&$0(P,M,A,$,R,w),A.has(M)||w.delete(M),R.push(M))}for(const M of R)$.delete(M);const N=Wt(),I=N._compositionKey;I===null||$.has(I)||(N._compositionKey=null)})(s,l,e._dirtyLeaves,e._dirtyElements)),v!==e._compositionKey&&(l._flushSync=!0);const b=l._selection;if(ue(b)){e._slotsUsed&&$4(b);const y=l._nodeMap,S=b.anchor.key,w=b.focus.key;y.get(S)!==void 0&&y.get(w)!==void 0||ae(19)}else fr(b)&&b._nodes.size===0&&(l._selection=null)}catch(v){return v instanceof Error&&e._onError(v),e._pendingEditorState=s,e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),void yl(e)}finally{Tn=d,Ii=f,Xr=h,e._updating=p,Xg=0}e._dirtyType!==0||e._deferred.length>0||(function(v,b){const y=b.getEditorState()._selection,S=v._selection;if(S!==null){if(S.dirty||!S.is(y))return!0}else if(y!==null)return!0;return!1})(l,e)?l._flushSync?(l._flushSync=!1,yl(e)):c&&Ane(()=>{yl(e)}):(l._flushSync=!1,c&&(n.clear(),e._deferred=[],e._pendingEditorState=null))}function Ao(e,t,r){Xr===e&&r===void 0?t():ub(e,t,r)}function bne(e){if(vr(e)){let t=null;for(const r of e.getChildren())t=r.isInline()?(t||r.replace(r.createParentElementNode())).append(r):null}}class Bi extends io{__first;__last;__size;__format;__style;__indent;__dir;__textFormat;__textStyle;__slotHost;__slots;$config(){return this.config(Symbol.for("ElementNode"),{$transform:bne,extends:io})}constructor(t){super(t),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style="",this.__indent=0,this.__dir=null,this.__textFormat=0,this.__textStyle="",this.__slotHost=null,this.__slots=null}afterCloneFrom(t){super.afterCloneFrom(t),this.__key===t.__key&&(this.__first=t.__first,this.__last=t.__last,this.__size=t.__size,this.__slotHost=t.__slotHost,this.__slotHost!==null&&this.__parent!==null&&ae(384,this.__key,String(this.__slotHost),String(this.__parent)),this.__slots=t.__slots),this.__indent=t.__indent,this.__format=t.__format,this.__style=t.__style,this.__dir=t.__dir,this.__textFormat=t.__textFormat,this.__textStyle=t.__textStyle}getFormat(){return this.getLatest().__format}getFormatType(){const t=this.getFormat();return bre[t]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){const t=[];let r=this.getFirstChild();for(;r!==null;)t.push(r),r=r.getNextSibling();return t}getChildrenKeys(){const t=[];let r=this.getFirstChild();for(;r!==null;)t.push(r.__key),r=r.getNextSibling();return t}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0&&To(this).length===0}isDirty(){const t=Wt()._dirtyElements;return t!==null&&t.has(this.__key)}isLastChild(){const t=this.getLatest(),r=this.getParentOrThrow().getLastChild();return r!==null&&r.is(t)}getAllTextNodes(){const t=[];for(const n of To(this)){const i=Hu(this,n);H(i)&&t.push(...i.getAllTextNodes())}let r=this.getFirstChild();for(;r!==null;){if(fe(r)&&t.push(r),H(r)){const n=r.getAllTextNodes();t.push(...n)}r=r.getNextSibling()}return t}getFirstDescendant(){let t=this.getFirstChild();for(;H(t);){const r=t.getFirstChild();if(r===null)break;t=r}return t}getLastDescendant(){let t=this.getLastChild();for(;H(t);){const r=t.getLastChild();if(r===null)break;t=r}return t}getDescendantByIndex(t){const r=this.getChildren(),n=r.length;if(t>=n){const o=r[n-1];return H(o)&&o.getLastDescendant()||o||null}const i=r[t];return H(i)&&i.getFirstDescendant()||i||null}getFirstChild(){const t=this.getLatest().__first;return t===null?null:mr(t)}getFirstChildOrThrow(){const t=this.getFirstChild();return t===null&&ae(45,this.__key),t}getLastChild(){const t=this.getLatest().__last;return t===null?null:mr(t)}getLastChildOrThrow(){const t=this.getLastChild();return t===null&&ae(96,this.__key),t}getChildAtIndex(t){const r=this.getChildrenSize();let n,i;if(t<r/2){for(n=this.getFirstChild(),i=0;n!==null&&i<=t;){if(i===t)return n;n=n.getNextSibling(),i++}return null}for(n=this.getLastChild(),i=r-1;n!==null&&i>=t;){if(i===t)return n;n=n.getPreviousSibling(),i--}return null}getTextContent(){let t=cL(this);const r=this.getChildren(),n=r.length;for(let i=0;i<n;i++){const o=r[i];t+=o.getTextContent(),H(o)&&i!==n-1&&!o.isInline()&&(t+=xu)}return t}getTextContentSize(){let t=(function(i){let o=0;for(const a of To(i)){const s=Hu(i,a);s!==null&&(o+=s.getTextContentSize())}return o})(this);const r=this.getChildren(),n=r.length;for(let i=0;i<n;i++){const o=r[i];t+=o.getTextContentSize(),H(o)&&i!==n-1&&!o.isInline()&&(t+=2)}return t}getDirection(){return this.getLatest().__dir}getTextFormat(){return this.getLatest().__textFormat}hasFormat(t){if(t!==""){const r=T0[t];return(this.getFormat()&r)!==0}return!1}hasTextFormat(t){const r=Ps[t];return(this.getTextFormat()&r)!==0}getFormatFlags(t,r){return qu(this.getLatest().__textFormat,t,r)}getTextStyle(){return this.getLatest().__textStyle}select(t,r){Cn();const n=xe();let i=t,o=r;const a=this.getChildrenSize();if(!this.canBeEmpty()){if(t===0&&r===0){const l=this.getFirstChild();if(fe(l)||H(l))return l.select(0,0)}else if(!(t!==void 0&&t!==a||r!==void 0&&r!==a)){const l=this.getLastChild();if(fe(l)||H(l))return l.select()}}i===void 0&&(i=a),o===void 0&&(o=a);const s=this.__key;return ue(n)?(n.anchor.set(s,i,"element"),n.focus.set(s,o,"element"),n.dirty=!0,n):D4(s,i,s,o,"element","element")}selectStart(){const t=this.getFirstDescendant();return t?t.selectStart():this.select()}selectEnd(){const t=this.getLastDescendant();return t?t.selectEnd():this.select()}clear(){const t=this.getWritable();return this.getChildren().forEach(r=>r.remove()),t}append(...t){return this.splice(this.getChildrenSize(),0,t)}setDirection(t){const r=this.getWritable();return r.__dir=t,r}setFormat(t){return this.getWritable().__format=t!==""&&T0[t]||0,this}setStyle(t){return this.getWritable().__style=t||"",this}setTextFormat(t){const r=this.getWritable();return r.__textFormat=t,r}setTextStyle(t){const r=this.getWritable();return r.__textStyle=t,r}setIndent(t){return this.getWritable().__indent=t,this}splice(t,r,n){I0(this)&&ae(324,this.__key,this.__type);const i=this.getChildrenSize(),o=this.getWritable();t+r<=i||ae(226,String(t),String(r),String(i));for(const p of n);const a=o.__key,s=[],l=[],c=this.getChildAtIndex(t+r);let d=null,f=i-r+n.length;if(t!==0)if(t===i)d=this.getLastChild();else{const p=this.getChildAtIndex(t);p!==null&&(d=p.getPreviousSibling())}if(r>0){let p=d===null?this.getFirstChild():d.getNextSibling();for(let m=0;m<r;m++){p===null&&ae(100);const g=p.getNextSibling(),v=p.__key;Ss(p.getWritable()),l.push(v),p=g}}let h=d;for(const p of n){h!==null&&p.is(h)&&(d=h=h.getPreviousSibling());const m=p.getWritable();m.__parent===a&&f--,Ss(m);const g=p.__key;if(h===null)o.__first=g,m.__prev=null;else{const v=h.getWritable();v.__next=g,m.__prev=v.__key}p.__key===a&&ae(76),m.__parent=a,s.push(g),h=p}if(t+r===i)h!==null&&(h.getWritable().__next=null,o.__last=h.__key);else if(c!==null){const p=c.getWritable();if(h!==null){const m=h.getWritable();p.__prev=h.__key,m.__next=c.__key}else p.__prev=null}if(o.__size=f,l.length){const p=xe();if(ue(p)){const m=new Set(l),g=new Set(s),{anchor:v,focus:b}=p;LT(v,m,g)&&L0(v,v.getNode(),this,d,c),LT(b,m,g)&&L0(b,b.getNode(),this,d,c),f!==0||this.canBeEmpty()||vr(this)||this.remove()}}return o}getDOMSlot(t){return new sd(t)}exportDOM(t){const{element:r}=super.exportDOM(t);if(it(r)){const n=this.getIndent();n>0&&(r.style.paddingInlineStart=40*n+"px",r.setAttribute("data-lexical-indent",String(n)));const i=this.getDirection();i&&(r.dir=i)}return{element:r}}exportJSON(){const t={children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),...super.exportJSON()},r=this.getTextFormat(),n=this.getTextStyle();return r===0&&n===""||vr(this)||this.getChildren().some(fe)||(r!==0&&(t.textFormat=r),n!==""&&(t.textStyle=n)),t}updateFromJSON(t){return super.updateFromJSON(t).setFormat(t.format).setIndent(t.indent).setDirection(t.direction).setTextFormat(t.textFormat||0).setTextStyle(t.textStyle||"")}insertNewAfter(t,r){return null}canIndent(){return!0}collapseAtStart(t){return!1}excludeFromCopy(t){return!1}canReplaceWith(t){return!0}canInsertAfter(t){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(t){return!1}extractWithChild(t,r,n){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(t,r){const n=Mo(this,t,r);let i=n.getFirstChild();for(let o=this.getFirstChild();o;o=o.getNextSibling()){const a=r.getElementByKey(o.getKey());a!==null&&(i==null?(n.insertChild(a),i=a):i!==a&&n.replaceChild(a,i),i=i.nextSibling)}}}function H(e){return e instanceof Bi}function LT(e,t,r){let n=e.getNode();for(;n;){const i=n.__key;if(t.has(i)&&!r.has(i))return!0;n=n.getParent()}return!1}class cE extends io{__slotHost;__slots;constructor(t){super(t),this.__slotHost=null,this.__slots=null}afterCloneFrom(t){super.afterCloneFrom(t),this.__key===t.__key&&(this.__slotHost=t.__slotHost,this.__slotHost!==null&&this.__parent!==null&&ae(383,this.__key,String(this.__slotHost),String(this.__parent)),this.__slots=t.__slots)}decorate(t,r){return null}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function mt(e){return e instanceof cE}class Zd extends Bi{__cachedText;static getType(){return"root"}static clone(){return new Zd}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){ae(51)}getTextContent(){const t=this.__cachedText;return t===null||!$d()&&Wt()._dirtyType!==0?super.getTextContent():t}remove(){ae(52)}replace(t){ae(53)}insertBefore(t){ae(54)}insertAfter(t){ae(55)}updateDOM(t,r){return!1}splice(t,r,n){for(const i of n)H(i)||mt(i)||ae(282);return super.splice(t,r,n)}static importJSON(t){return ln().updateFromJSON(t)}collapseAtStart(){return!0}}function Mr(e){return e instanceof Zd}function z4(e){return new Gp(k6(e._nodeMap),null,e._slotsUsed)}function dE(){return new Gp(new Map([["root",new Zd]]),null,!1)}function Ux(e){const t=e.exportJSON(),r=e.constructor;if(t.type!==r.getType()&&ae(130,r.name),H(e)){const i=t.children;Array.isArray(i)||ae(59,r.name);const o=e.getChildren();for(let a=0;a<o.length;a++){const s=Ux(o[a]);i.push(s)}}const n=To(e);if(n.length>0){const i={};for(const o of n){const a=Hu(e,o);a===null&&ae(366,r.name,o),i[o]=Ux(a)}t.$slots=i}return t}function _ne(e){return e instanceof Gp}class Gp{_nodeMap;_selection;_flushSync;_readOnly;_parsed;_slotsUsed;constructor(t,r=null,n=!1){this._nodeMap=t,this._selection=r||null,this._flushSync=!1,this._readOnly=!1,this._parsed=!1,this._slotsUsed=n}isEmpty(){return this._nodeMap.size===1&&this._selection===null}read(t,r){return PT(r&&r.editor||null,this,t)}clone(t){const r=new Gp(this._nodeMap,t===void 0?this._selection:t,this._slotsUsed);return r._readOnly=!0,r}toJSON(){return PT(null,this,()=>({root:Ux(ln())}))}}class fE extends Bi{static getType(){return"artificial"}createDOM(t){return gr().createElement("div")}}class ef extends io{static getType(){return"linebreak"}static clone(t){return new ef(t.__key)}constructor(t){super(t)}getTextContent(){return`
|
|
27
|
+
`}createDOM(){return gr().createElement("br")}updateDOM(){return!1}isInline(){return!0}static importDOM(){return{br:t=>U4(t)||B4(t)?null:{conversion:yne,priority:0}}}static importJSON(t){return da().updateFromJSON(t)}}function yne(e){return{node:da()}}function da(){return _a(new ef)}function bi(e){return e instanceof ef}function U4(e){const t=e.parentElement;if(t!==null&&Id(t)){const r=t.firstChild;if(r===e||r.nextSibling===e&&j0(r)){const n=t.lastChild;if(n===e||n.previousSibling===e&&j0(n))return!0}}return!1}function B4(e){const t=e.parentElement;if(t!==null&&Id(t)){const r=t.firstChild;if(r===e||r.nextSibling===e&&j0(r))return!1;const n=t.lastChild;if(n===e||n.previousSibling===e&&j0(n))return!0}return!1}function j0(e){return qi(e)&&/^( |\t|\r?\n)+$/.test(e.textContent||"")}class tf extends Bi{static getType(){return"paragraph"}static clone(t){return new tf(t.__key)}createDOM(t){const r=gr().createElement("p"),n=pd(t.theme,"paragraph");return n!==void 0&&r.classList.add(...n),r}updateDOM(t,r,n){return!1}static importDOM(){return{p:t=>({conversion:xne,priority:0})}}exportDOM(t){const{element:r}=super.exportDOM(t);if(it(r)){this.isEmpty()&&r.append(gr().createElement("br"));const n=this.getFormatType();n&&(r.style.textAlign=n)}return{element:r}}static importJSON(t){return Xt().updateFromJSON(t)}exportJSON(){const t=super.exportJSON();if(t.textFormat===void 0||t.textStyle===void 0){const r=this.getChildren().find(fe);r?(t.textFormat=r.getFormat(),t.textStyle=r.getStyle()):(t.textFormat=this.getTextFormat(),t.textStyle=this.getTextStyle())}return t}insertNewAfter(t,r){const n=Xt();n.setTextFormat(t.format),n.setTextStyle(t.style);const i=this.getDirection();return n.setDirection(i),n.setFormat(this.getFormatType()),n.setStyle(this.getStyle()),this.insertAfter(n,r),n}collapseAtStart(){const t=this.getChildren();if(t.length===0||fe(t[0])&&t[0].getTextContent().trim()===""){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}}function xne(e){const t=Xt();if(es(t,e),lc(e,t),t.getFormatType()===""){const r=e.getAttribute("align");r&&r&&r in T0&&t.setFormat(r)}return qo(t,e),{node:t}}function Xt(){return _a(new tf)}function rf(e){return e instanceof tf}function Sne(e){console.warn(e)}const ht=0,qc=1,wne=4,Ene=-8;function j4(e,t,r,n,i){const o=e._keyToDOMMap;o.clear(),e._editorState=dE(),e._pendingEditorState=n,e._compositionKey=null,e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),e._normalizedNodes=new Set,i&&i.preserveUpdateQueue||(e._updateTags=new Set,e._updates=[],e._cascadeCount=0),e._blockCursorElement=null,e._inputState.handledSelectionCommandTimeoutId!==null&&clearTimeout(e._inputState.handledSelectionCommandTimeoutId),e._inputState={collapsedSelectionFormat:{format:0,key:"root",offset:0,style:"",timeStamp:0},compositionEndData:"",compositionPhase:"idle",hadOrphanedCompositionEvents:!1,handledSelectionCommandTimeoutId:null,isInsertLineBreak:!1,isInsertTextAfterHandledSelectionCommand:!1,isSelectionChangeFromDOMUpdate:!1,isSelectionChangeFromMouseDown:!1,lastBeforeInputInsertTextTimeStamp:0,lastKeyCode:null,lastKeyDownTimeStamp:0,postDeleteSelectionToRestore:null,unprocessedBeforeInputData:null};const a=e._observer;a!==null&&(a.disconnect(),e._observer=null),t!==null&&(t.textContent="",(function(s,l){const c=`__lexicalKey_${l._key}`;delete s[c]})(t,e)),r!==null&&(r.textContent="",o.set("root",r),H4(r,e,"root"))}function kne(e){const t=new Set,r=new Set;for(const{klass:n,ownNodeConfig:i}of EE(e)){const o=n.transform;if(!r.has(o)){r.add(o);const a=n.transform();a&&t.add(a)}if(i){const a=i.$transform;a&&t.add(a)}}return t}const q0={$createDOM:(e,t)=>e.createDOM(t._config,t),$decorateDOM:(e,t,r,n)=>{},$exportDOM:(e,t)=>{const r=mE(t,e.getType());return r&&r.exportDOM!==void 0?r.exportDOM(t,e):e.exportDOM(t)},$extractWithChild:(e,t,r,n,i)=>H(e)&&e.extractWithChild(t,r,n),$getDOMSlot:(e,t,r)=>e.getDOMSlot(t),$getSlotTargetElement:(e,t,r,n)=>null,$shouldExclude:(e,t,r)=>H(e)&&e.excludeFromCopy("html"),$shouldInclude:(e,t,r)=>!t||e.isSelected(t),$updateDOM:(e,t,r,n)=>e.updateDOM(t,r,n._config)};function hE(e){const t=e||{},r=O4(),n=t.theme||{},i=e===void 0?r:t.parentEditor||null,o=t.disableEvents||!1,a=dE(),s=t.namespace||(i!==null?i._config.namespace:Q4()),l=t.editorState,c=[Zd,qs,ef,Qd,tf,fE,...t.nodes||[]],{onError:d,onWarn:f,html:h}=t,p=t.editable===void 0||t.editable;let m;if(e===void 0&&r!==null)m=r._nodes;else{m=new Map;for(let v=0;v<c.length;v++){let b=c[v],y=null,S=null;if(b&&typeof b=="object"){const A=b;b=A.replace,y=A.with,S=A.withKlass||null}if(typeof b!="function"||!b.prototype||!(b===io||b.prototype instanceof io)){let A="<unknown>";try{A=JSON.parse(E6)}catch{}ae(365,String(v-c.length+(t.nodes?t.nodes.length:0)),typeof b=="function"?`${b.name}${typeof b.getType=="function"?` (type ${String(b.getType())})`:""}`:String(b),String(A))}wE(b);const w=b.getType(),C=kne(b);m.set(w,{exportDOM:h&&h.export?h.export.get(b):void 0,klass:b,replace:y,replaceWithKlass:S,sharedNodeState:Rre(c[v]),transforms:C})}}const g=new Nd(a,i,m,{disableEvents:o,dom:{...q0,...e&&e.dom},namespace:s,theme:n},d||console.error,f||Sne,(function(v,b){const y=new Map,S=new Set,w=C=>{Object.keys(C).forEach(A=>{let $=y.get(A);$===void 0&&($=[],y.set(A,$)),$.push(C[A])})};return v.forEach(C=>{const A=C.klass.importDOM;if(A==null||S.has(A))return;S.add(A);const $=A.call(C.klass);$!==null&&w($)}),b&&w(b),y})(m,h?h.import:void 0),p,e);return l!==void 0&&(g._pendingEditorState=l,g._dirtyType=2),(function(v){v.registerCommand(q6,Wre,ht),v.registerCommand(V6,Jre,ht),v.registerCommand(G6,Qre,ht),v.registerCommand(K6,Yre,ht),v.registerCommand(H6,Xre,ht)})(g),g}function Cne(e,t){const r=e.get(t);e.delete(t),r&&r()}function Of(e,t,r){return e.set(t,r),Cne.bind(null,e,t)}class Nd{static version;_headless;_parentEditor;_rootElement;_editorState;_pendingEditorState;_compositionKey;_deferred;_keyToDOMMap;_updates;_updating;_cascadeCount;_listeners;_commands;_nodes;_decorators;_pendingDecorators;_config;_dirtyType;_cloneNotNeeded;_dirtyLeaves;_dirtyElements;_normalizedNodes;_updateTags;_observer;_key;_onError;_onWarn;_htmlConversions;_window;_editable;_blockCursorElement;_slotsUsed;_inputState;_createEditorArgs;constructor(t,r,n,i,o,a,s,l,c){this._createEditorArgs=c,this._parentEditor=r,this._rootElement=null,this._editorState=t,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new Sx,this._updates=[],this._updating=!1,this._cascadeCount=0,this._listeners={decorator:new Map,editable:new Map,mutation:new Map,root:new Map,textcontent:new Map,update:new Map},this._commands=new Map,this._config=i,this._nodes=n,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=Q4(),this._onError=o,this._onWarn=a,this._htmlConversions=s,this._editable=l,this._headless=r!==null&&r._headless,this._window=null,this._blockCursorElement=null,this._slotsUsed=!1,this._inputState={collapsedSelectionFormat:{format:0,key:"root",offset:0,style:"",timeStamp:0},compositionEndData:"",compositionPhase:"idle",hadOrphanedCompositionEvents:!1,handledSelectionCommandTimeoutId:null,isInsertLineBreak:!1,isInsertTextAfterHandledSelectionCommand:!1,isSelectionChangeFromDOMUpdate:!1,isSelectionChangeFromMouseDown:!1,lastBeforeInputInsertTextTimeStamp:0,lastKeyCode:null,lastKeyDownTimeStamp:0,postDeleteSelectionToRestore:null,unprocessedBeforeInputData:null}}isComposing(){return this._compositionKey!=null}registerUpdateListener(t){return Of(this._listeners.update,t)}registerEditableListener(t){return Of(this._listeners.editable,t)}registerDecoratorListener(t){return Of(this._listeners.decorator,t)}registerTextContentListener(t){return Of(this._listeners.textcontent,t)}registerRootListener(t){const r=this._listeners.root;return zl(Of(r,t,t(this._rootElement,null)||void 0),()=>(function(n,i,o){const a=n.get(i);a&&a(),n.set(i,i(...o)||void 0)})(r,t,[null,this._rootElement]))}registerCommand(t,r,n){n===void 0&&ae(35);const i=this._commands;i.has(t)||i.set(t,[new If,new If,new If,new If,new If]);const o=i.get(t);o===void 0&&ae(36,String(t));const a=(function(l){return 7&l})(n),s=o[a];return a!==n?s.addFront(r):s.addBack(r),()=>{s.delete(r),o.every(l=>l.size===0)&&i.delete(t)}}registerMutationListener(t,r,n){const i=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(t)).klass,o=this._listeners.mutation;let a=o.get(r);a===void 0&&(a=new Set,o.set(r,a)),a.add(i);const s=n&&n.skipInitialization;return s!==void 0&&s||this.initializeMutationListener(r,i),()=>{a.delete(i),a.size===0&&o.delete(r)}}getRegisteredNode(t){const r=this._nodes.get(t.getType());return r===void 0&&ae(37,t.name),r}resolveRegisteredNodeAfterReplacements(t){for(;t.replaceWithKlass;)t=this.getRegisteredNode(t.replaceWithKlass);return t}initializeMutationListener(t,r){const n=this._editorState,i=GT(n).get(r.getType());if(!i)return;const o=new Map;for(const a of i.keys())o.set(a,"created");o.size>0&&t(o,{dirtyLeaves:new Set,prevEditorState:n,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(t,r){const n=this.getRegisteredNode(t);return n.transforms.add(r),n}registerNodeTransform(t,r){const n=this.registerNodeTransformToKlass(t,r),i=[n],o=n.replaceWithKlass;if(o!=null){const a=this.registerNodeTransformToKlass(o,r);i.push(a)}return(function(a,s){const l=GT(a.getEditorState()),c=[];for(const d of s){const f=l.get(d);f&&c.push(f)}c.length!==0&&a.update(()=>{for(const d of c)for(const f of d.keys()){const h=mr(f);h&&h.markDirty()}},a._pendingEditorState===null?{tag:gh}:void 0)})(this,i.map(a=>a.klass.getType())),()=>{i.forEach(a=>a.transforms.delete(r))}}hasNode(t){return this._nodes.has(t.getType())}hasNodes(t){return t.every(this.hasNode.bind(this))}dispatchCommand(t,r){return Te(this,t,r)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(t){const r=this._rootElement;if(t!==r){const n=pd(this._config.theme,"root"),i=this._pendingEditorState||this._editorState;if(this._rootElement=t,j4(this,r,t,i,{preserveUpdateQueue:!0}),r!==null&&(this._config.disableEvents||Zre(r),n!=null&&r.classList.remove(...n)),t!==null){const o=SE(t),a=t.style;a.userSelect="text",a.whiteSpace="pre-wrap",a.wordBreak="break-word",t.setAttribute("data-lexical-editor","true"),this._window=o,this._dirtyType=2,T6(this),this._updateTags.add(gh),yl(this),this._config.disableEvents||(function(s,l){const c=s.ownerDocument;Fx.set(s,c);let d=D0.get(c);d===void 0&&(d={editors:new Set,hasShadowEditor:void 0},D0.set(c,d)),d.editors.add(l),d.hasShadowEditor=void 0,s.__lexicalEditor=l;const f=f4(s);f.push(Hre.register(c));for(let h=0;h<Dx.length;h++){const[p,m]=Dx[h],g=typeof m=="function"?v=>{vT(v)||(gT(v),(l.isEditable()||p==="click")&&m(v,l))}:v=>{if(vT(v))return;gT(v);const b=l.isEditable();switch(p){case"cut":return b&&Te(l,aE,v);case"copy":return Te(l,sb,v);case"paste":return b&&Te(l,iE,v);case"dragstart":return b&&Te(l,o4,v);case"dragover":return b&&Te(l,a4,v);case"dragend":return b&&Te(l,zre,v);case"focus":return b&&Te(l,jre,v);case"blur":return b&&Te(l,qre,v);case"drop":return b&&Te(l,i4,v)}};f.push(Kre(s,p,g))}})(t,this),n!=null&&t.classList.add(...n)}else this._window=null,this._updateTags.add(gh),yl(this);vh("root",this,!1,t,r)}}getElementByKey(t){return this._keyToDOMMap.get(t)||null}getEditorState(){return this._editorState}setEditorState(t,r){t.isEmpty()&&ae(38);let n=t;n._readOnly&&(n=z4(t),n._selection=t._selection?t._selection.clone():null),A6(this);const i=this._pendingEditorState,o=r!==void 0?r.tag:null;i===null||i.isEmpty()||(o!=null&&this._updateTags.add(o),yl(this)),this._pendingEditorState=n,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,this._slotsUsed=this._slotsUsed||t._slotsUsed,Ao(this,()=>{if(o&&this._updateTags.add(o),t._parsed)for(const[a,s]of n._nodeMap.entries())H(s)?this._dirtyElements.set(a,!0):this._dirtyLeaves.add(a)},{discrete:!this._updating||void 0})}parseEditorState(t,r){return(function(n,i,o){const a=dE(),s=Tn,l=Ii,c=Xr,d=i._dirtyElements,f=i._dirtyLeaves,h=i._cloneNotNeeded,p=i._dirtyType;i._dirtyElements=new Map,i._dirtyLeaves=new Set,i._cloneNotNeeded=new Set,i._dirtyType=0,Tn=a,Ii=!1,Xr=i,pE(null);try{const m=i._nodes;B0(n.root,m),o&&o(),a._readOnly=!0,a._parsed=!0}catch(m){m instanceof Error&&i._onError(m)}finally{i._dirtyElements=d,i._dirtyLeaves=f,i._cloneNotNeeded=h,i._dirtyType=p,Tn=s,Ii=l,Xr=c}return a})(typeof t=="string"?JSON.parse(t):t,this,r)}read(...t){const[r,n]=t.length===1?["force-commit",t[0]]:t;return r==="force-commit"&&yl(this),(r==="pending"?this._pendingEditorState||this._editorState:this.getEditorState()).read(n,{editor:this})}update(t,r){(function(n,i,o){n._updating?n._updates.push([i,o]):ub(n,i,o)})(this,t,r)}focus(t,r={}){const n=this._rootElement;n!==null&&(n.setAttribute("autocapitalize","off"),Ao(this,()=>{const i=xe(),o=ln();i!==null?i.dirty||Fn(i.clone()):o.getChildrenSize()!==0&&(r.defaultSelection==="rootStart"?o.selectStart():o.selectEnd()),Gu("focus"),Fne(()=>{n.removeAttribute("autocapitalize"),t&&t()})}),this._pendingEditorState===null&&n.removeAttribute("autocapitalize"))}blur(){const t=this._rootElement;t!==null&&t.blur();const r=xi(this._window);r!==null&&r.removeAllRanges()}isEditable(){return this._editable}setEditable(t){this._editable!==t&&(this._editable=t,vh("editable",this,!0,t),this._slotsUsed&&this.update(()=>gne()))}toJSON(){return{editorState:this._editorState.toJSON()}}}Nd.version=E6;let Bx=null;function pE(e){Bx=e}let Rne=1;function q4(e,t){const r=mE(e,t);return r===void 0&&ae(30,t),r}function mE(e,t){return e._nodes.get(t)}const Ane=typeof queueMicrotask=="function"?queueMicrotask:e=>{Promise.resolve().then(e)};function gE(e,t){const r=t!==void 0?t:(()=>{const o=e.getRootNode();return ac(o)||Os(o)?ip(o):null})();if(!it(r)||r.hasAttribute("data-lexical-slot"))return!1;const n=Vu(r),i=r.nodeName;return p4(n)&&(i==="INPUT"||i==="TEXTAREA"||r.contentEditable==="true"&&Hp(r)==null)}function Kp(e,t,r){const n=e.getRootElement();if(!n)return!1;try{if(!t||!n.contains(t)||!n.contains(r))return!1}catch{return!1}return hd(t)===e&&e.read("latest",()=>!gE(t))}function cb(e){return e instanceof Nd}function hd(e){let t=e;for(;t!=null;){const r=Hp(t);if(cb(r))return r;t=sc(t)}return null}function Hp(e){return e?e.__lexicalEditor:null}function Cu(e){return ju(e)||e.isToken()}function Zi(e){return Cu(e)||e.isSegmented()}function qi(e){return of(e)&&e.nodeType===3}function ac(e){return of(e)&&e.nodeType===9}function Tne(e){let t=e;for(;t!=null;){if(qi(t))return t;t=t.firstChild}return null}function qu(e,t,r){const n=Ps[t];if(r!==null&&(e&n)===(r&n))return e;let i=e^n;return t==="subscript"?i&=-65:t==="superscript"?i&=-33:t==="lowercase"?(i&=-513,i&=-1025):t==="uppercase"?(i&=-257,i&=-1025):t==="capitalize"&&(i&=-257,i&=-513),i}function V4(e){return fe(e)||bi(e)||mt(e)}function G4(e,t){const r=(function(){const a=Bx;return Bx=null,a})();if((t=t||r&&r.__key)!=null)return void(e.__key=t);Cn(),I4();const n=Wt(),i=Vs(),o=""+Rne++;i._nodeMap.set(o,e),H(e)?n._dirtyElements.set(o,!0):n._dirtyLeaves.add(o),n._cloneNotNeeded.add(o),n._dirtyType===0&&(n._dirtyType=1),e.__key=o}function Ss(e){Hn(e)!==null&&ae(380,e.__key,String(Hn(e)));const t=e.getParent();if(t!==null){const r=e.getWritable(),n=t.getWritable(),i=e.getPreviousSibling(),o=e.getNextSibling(),a=o!==null?o.__key:null,s=i!==null?i.__key:null,l=i!==null?i.getWritable():null,c=o!==null?o.getWritable():null;i===null&&(n.__first=a),o===null&&(n.__last=s),l!==null&&(l.__next=a),c!==null&&(c.__prev=s),r.__prev=null,r.__next=null,r.__parent=null,n.__size--}}function V0(e){I4(),I0(e)&&ae(323,e.__key,e.__type);const t=e.getLatest(),r=t.__parent!==null?t.__parent:Ku(t)?t.__slotHost:null,n=Vs(),i=Wt(),o=n._nodeMap,a=i._dirtyElements;r!==null&&(function(l,c,d){let f=l;for(;f!==null;){if(d.has(f))return;const h=c.get(f);if(h===void 0)break;d.set(f,!1),f=h.__parent!==null?h.__parent:Ku(h)?h.__slotHost:null}})(r,o,a);const s=t.__key;i._dirtyType===0&&(i._dirtyType=1),H(e)?a.set(s,!0):i._dirtyLeaves.add(s)}function Rn(e){Cn();const t=Wt(),r=t._compositionKey;if(e!==r){if(t._compositionKey=e,r!==null){const n=mr(r);n!==null&&n.getWritable()}if(e!==null){const n=mr(e);n!==null&&n.getWritable()}}}function ws(){return $d()?null:Wt()._compositionKey}function mr(e,t){const r=(t||Vs())._nodeMap.get(e);return r===void 0?null:r}function K4(e,t){const r=nf(e,Wt());return r!==void 0?mr(r,t):null}function H4(e,t,r){e[`__lexicalKey_${t._key}`]=r}function nf(e,t){return e[`__lexicalKey_${t._key}`]}function Vu(e,t){let r=e;for(;r!=null;){const n=K4(r,t);if(n!==null)return n;r=sc(r)}return null}function W4(e){const t=e._decorators,r=Object.assign({},t);return e._pendingDecorators=r,r}function zT(e){return e.read(()=>ln().getTextContent())}function ln(){return Vs()._nodeMap.get("root")}function Fn(e){Cn();const t=Vs();e!==null&&(e.dirty=!0,e.setCachedNodes(null),ue(e)&&Wt()._slotsUsed&&$4(e)),t._selection=e}function UT(){Cn(),A6(Wt())}function Qc(e){const t=(function(r,n){let i=r;for(;i!=null;){const o=nf(i,n);if(o!==void 0)return o;i=sc(i)}return null})(e,Wt());return t===null?null:mr(t)}function J4(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function vE(e){const t=[];for(let r=e;r!==null;r=r._parentEditor)t.push(r);return t}function Q4(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substring(0,5)}function Y4(e){return qi(e)?e.nodeValue:null}function bE(e,t,r){const n=xi(Vi(t));if(n===null)return;const i=Oo(n,t._rootElement),o=i.anchorNode;let{anchorOffset:a,focusOffset:s}=i;if(o!==null){let l=Y4(o);const c=Vu(o);if(l!==null&&fe(c)){if((l===Kh||l===rE)&&r){const d=r.length;l=r,a=d,s=d}l!==null&&_E(c,l,a,s,e)}}}function _E(e,t,r,n,i){let o=e;if(o.isAttached()&&(i||!o.isDirty())){const a=o.isComposing();if(o.isToken()&&a)return;let s=t;if((a||i)&&(t.endsWith(Kh)&&(s=t.slice(0,-Kh.length)),i)){const c=rE;let d;for(;(d=s.indexOf(c))!==-1;)s=s.slice(0,d)+s.slice(d+c.length),r!==null&&r>d&&(r=Math.max(d,r-c.length)),n!==null&&n>d&&(n=Math.max(d,n-c.length))}const l=o.getTextContent();if(i||s!==l){const c=xe();if(s===""){if(Rn(null),Bp||Ol||jp)o.remove();else{const g=Wt();ry(o,"",c),setTimeout(()=>{g.update(()=>{o.isAttached()&&o.getTextContent()===""&&o.remove()})},20)}return}const d=o.getParent(),f=Xd(),h=o.getTextContentSize(),p=ws(),m=o.getKey();if(o.isToken()&&!a||p!==null&&m===p&&!a||ue(f)&&(d!==null&&!d.canInsertTextBefore()&&f.anchor.offset===0||f.anchor.key===e.__key&&f.anchor.offset===0&&!o.canInsertTextBefore()&&!a||f.focus.key===e.__key&&f.focus.offset===h&&!o.canInsertTextAfter()&&!a))return void o.markDirty();if(!ue(c)||r===null||n===null)return void ry(o,s,c);if(c.setTextNodeRange(o,r,o,n),o.isSegmented()){const g=Pr(o.getTextContent());o.replace(g),o=g}ry(o,s,c)}}}function ry(e,t,r){if(e.setTextContent(t),ue(r)){const n=e.getKey();let i=!1;for(const o of["anchor","focus"]){const a=r[o];a.type==="text"&&a.key===n&&(a.offset=ja(e,a.offset,"clamp"),i=!0)}i&&(r._cachedNodes=null,r._cachedIsBackward=null)}}function Vm(e,t,r){const n=t[r]||!1;return n==="any"||n===e[r]}function $ne(e,t){return Vm(e,t,"altKey")&&Vm(e,t,"ctrlKey")&&Vm(e,t,"shiftKey")&&Vm(e,t,"metaKey")}function sr(e,t,r){if(!$ne(e,r))return!1;if(e.key.toLowerCase()===t.toLowerCase())return!0;if(t.length>1||e.key.length===1&&e.key.charCodeAt(0)<=127)return!1;if(e.code.startsWith("Digit")&&/^\d$/.test(t))return e.code===`Digit${t}`;const n="Key"+t.toUpperCase();return e.code===n}const cs={ctrlKey:!Qo,metaKey:Qo},BT={altKey:Qo,ctrlKey:!Qo};function jT(e){return e.key==="Backspace"}function Nne(e){const t=ln();if(ue(e)){const r=e.anchor,n=e.focus,i=r.getNode();if(Mr(i))return r.set(i.getKey(),0,"element"),n.set(i.getKey(),i.getChildrenSize(),"element"),_l(e),e;const o=i.getTopLevelElementOrThrow(),a=o.getParent();if(a===null)return H(o)&&(r.set(o.getKey(),0,"element"),n.set(o.getKey(),o.getChildrenSize(),"element"),_l(e)),e;const s=a;return r.set(s.getKey(),0,"element"),n.set(s.getKey(),s.getChildrenSize(),"element"),_l(e),e}{const r=t.select(0,t.getChildrenSize());return Fn(_l(r)),r}}function pd(e,t){e.__lexicalClassNameCache===void 0&&(e.__lexicalClassNameCache={});const r=e.__lexicalClassNameCache,n=r[t];if(n!==void 0)return n;const i=e[t];if(typeof i=="string"){const o=Rs(i);return r[t]=o,o}return i}function yE(e,t,r,n,i){if(r.size===0)return;const o=n.__type,a=n.__key,s=t.get(o);s===void 0&&ae(33,o);const l=s.klass;let c=e.get(l);c===void 0&&(c=new Map,e.set(l,c));const d=c.get(a),f=d==="destroyed"&&i==="created";(d===void 0||f)&&c.set(a,f?"updated":i)}function qT(e,t,r){const n=e.getParent();let i=r,o=e;return n!==null&&(r===0&&(i=o.getIndexWithinParent(),o=n)),o.getChildAtIndex(i-1)}function Dne(e,t){const r=e.offset;if(e.type==="element")return qT(e.getNode(),t,r);{const n=e.getNode();if(r===0||!t){const i=n.getPreviousSibling();return i===null?qT(n.getParentOrThrow(),t,n.getIndexWithinParent()+0):i}}return null}function X4(e){const t=Vi(e).event,r=t&&t.inputType;return r==="insertFromPaste"||r==="insertFromPasteAsQuotation"}function Te(e,t,r){return L4(e,t,r,e)}function Dd(e,t){const r=e._keyToDOMMap.get(t);return r===void 0&&ae(75,t),r}function sc(e){const t=e.assignedSlot||e.parentElement;if(t!==null)return t;const r=e.parentNode;return Os(r)?r.host:null}function xE(e){return ac(e)?e:it(e)?e.ownerDocument:null}function Gu(e){Cn(),Wt()._updateTags.add(e)}function Fne(e){Cn(),Wt()._deferred.push(e)}function Fd(e,t){let r=e.getParent();for(;r!==null;){if(r.is(t))return!0;r=r.getParent()}return!1}function SE(e){const t=xE(e);return t?t.defaultView:null}function Vi(e){const t=e._window;return t===null&&ae(78),t}function Ine(e){return H(e)&&e.isInline()||mt(e)&&e.isInline()}function Z4(e){let t=e.getLatest();for(;t!==null;){if(Hn(t)!==null&&H(t))return t;const r=t.getParentOrThrow();if(vr(r))return r;t=r}return t}function md(e){return H(e)&&e.isShadowRoot()}function vr(e){return Mr(e)||md(e)}function ii(e,t=!1){const r=e.constructor.clone(e);return G4(r,null),r.afterCloneFrom(e),t||r.resetOnCopyNodeFrom(e),r}function _a(e){const t=Wt(),r=e.getType(),n=mE(t,r);n===void 0&&ae(200,e.constructor.name,r);const{replace:i,replaceWithKlass:o}=n;if(i!==null){const a=i(e),s=a.constructor;return o!==null?a instanceof o||ae(201,o.name,o.getType(),s.name,s.getType(),e.constructor.name,r):a instanceof e.constructor&&s!==e.constructor||ae(202,s.name,s.getType(),e.constructor.name,r),a.__key===e.__key&&ae(203,e.constructor.name,r,s.name,s.getType()),a}return e}function ny(e,t){!Mr(e.getParent())||H(t)||mt(t)||ae(99)}function Pne(e){const t=mr(e);return t===null&&ae(63,e),t}function Zg(e){if(!e||e.isInline())return!1;if(mt(e))return!0;if(H(e)){if(e.isShadowRoot()){const t=e.getParent();return!(H(t)&&t.isShadowRoot())}return!e.canBeEmpty()}return!1}function G0(e,t,r){r.style.removeProperty("caret-color"),t._blockCursorElement=null;const n=e.parentElement;n!==null&&n.removeChild(e)}function xi(e){return ba?(e||window).getSelection():null}function One(e){const t=SE(e);return t?t.getSelection():null}function Os(e){return qx(e)&&"host"in e}const Mne=[];function eL(e){const t=e.getRootNode();if(t===e||!Os(t))return Mne;const r=[t];let n=t.host;for(;;){const i=n.getRootNode();if(i===n||!Os(i))break;r.push(i),n=i.host}return r}function*tL(e){const t=[e];let r;for(;r=t.pop();){yield*r.querySelectorAll('[data-lexical-editor="true"]');const n=(ac(r)?r:r.ownerDocument).createTreeWalker(r,NodeFilter.SHOW_ELEMENT);let i;for(;i=n.nextNode();)i.shadowRoot&&t.push(i.shadowRoot)}}function rL(e){return e!==null?e.ownerDocument:document}function gr(){const e=O4();return rL(e!==null?e._rootElement:null)}function db(e,t){if(t===null||typeof e.getComposedRanges!="function")return null;const r=eL(t);if(r.length===0)return null;const n=e.getComposedRanges;try{const i=n.call(e,{shadowRoots:r})[0];if(i!==void 0)return i}catch{}try{const i=n.apply(e,r)[0];if(i!==void 0)return i}catch{}return null}function Lne(e,t){const r=db(e,t);if(r!==null){const n=zne(r);if(n!==null)return n}return e.rangeCount>0?e.getRangeAt(0):null}function Oo(e,t){const r=db(e,t);return r===null?e:Une(r,Bne(e))}function zne(e){const t=e.startContainer.ownerDocument;if(t===null)return null;const r=t.createRange();try{return r.setStart(e.startContainer,e.startOffset),r.setEnd(e.endContainer,e.endOffset),r}catch{return null}}function Une(e,t){const{startContainer:r,startOffset:n,endContainer:i,endOffset:o}=e;return t==="backward"?{anchorNode:i,anchorOffset:o,direction:t,focusNode:r,focusOffset:n}:{anchorNode:r,anchorOffset:n,direction:t,focusNode:i,focusOffset:o}}function Bne(e){return e.direction}function jx(e){const t=e.getRootNode();return ac(t)||Os(t)?t.activeElement:null}function ip(e){let t=e.activeElement;for(;t!==null&&t.shadowRoot!==null;){const r=t.shadowRoot.activeElement;if(r===null)break;t=r}return t}function nL(e){const t=e.target;if(t!==null&&it(t)&&t.shadowRoot!==null&&typeof e.composedPath=="function"){const r=e.composedPath();if(r.length>0)return r[0]}return t}function iL(e){return it(e)&&e.tagName==="A"}function it(e){return of(e)&&e.nodeType===1}function of(e){return typeof e=="object"&&e!==null&&"nodeType"in e&&typeof e.nodeType=="number"}function qx(e){return of(e)&&e.nodeType===11}const jne=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|mark|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/i;function K0(e){return!(!it(e)||!e.style.display.startsWith("inline"))||jne.test(e.nodeName)}const qne=/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/i;function Id(e){return(!it(e)||!e.style.display.startsWith("inline"))&&qne.test(e.nodeName)}function jn(e){if(mt(e)&&!e.isInline())return!0;if(!H(e)||vr(e))return!1;const t=e.getFirstChild(),r=t===null||bi(t)||fe(t)||t.isInline();return!e.isInline()&&e.canBeEmpty()!==!1&&r}function Dr(){return Wt()}function fb(e=Dr()){return e._config.dom||q0}function Mo(e,t,r=Dr()){const n=fb(r).$getDOMSlot(e,t,r);return H(e)&&(Vne(n)||ae(344,e.getKey(),e.getType())),n}function Vne(e){return e instanceof sd}function Tl(e,t,r=Dr()){return Tne(Mo(e,t,r).element)}const VT=new WeakMap,Gne=new Map;function GT(e){if(!e._readOnly&&e.isEmpty())return Gne;e._readOnly||ae(192);let t=VT.get(e);return t||(t=(function(r){const n=new Map;for(const[i,o]of r._nodeMap){const a=o.__type;let s=n.get(a);s||(s=new Map,n.set(a,s)),s.set(i,o)}return n})(e),VT.set(e,t)),t}function oL(e){const t=e.constructor.clone(e);return t.afterCloneFrom(e),t}function Kne(e){return(t=oL(e))[h4]=!0,t;var t}function lc(e,t){const r=e.getAttribute("data-lexical-indent");if(r!==null){const o=parseInt(r,10);if(Number.isFinite(o)&&o>=0)return void t.setIndent(o)}const n=parseInt(e.style.paddingInlineStart,10)||0,i=Math.round(n/40);t.setIndent(i)}function qo(e,t){const r=t.getAttribute("dir");return r==="ltr"||r==="rtl"?e.setDirection(r):e}function es(e,t){const r=t.style.textAlign;return r&&r in T0?e.setFormat(r):e}function Hne(e,t){e.__lexicalUnmanaged=!0,t&&t.captureSelection!==void 0&&(e.__lexicalCapturedSelection=t.captureSelection)}function aL(e){return e.__lexicalUnmanaged===!0}function Wne(e,t=Dr()){const r=t.isEditable();e.contentEditable=r?"true":"false",r?e.__lexicalEditor=t:delete e.__lexicalEditor}function H0(e,t){let r=e;for(;r!=null;){if(r.__lexicalCapturedSelection===!0)return!0;if(it(r)&&r.hasAttribute("data-lexical-slot")||nf(r,t)!==void 0)return!1;r=sc(r)}return!1}function Mf(e,t){return(function(r,n){return Object.prototype.hasOwnProperty.call(r,n)})(e,t)&&e[t]!==io[t]}const KT=new WeakMap;function wE(e){const t=KT.get(e);if(t)return t;const r=e.prototype!=null&&GA in e.prototype?e.prototype[GA]():void 0,n=(function(l){if(!(l===io||l.prototype instanceof io)){let c="<unknown>",d="<unknown>";try{c=l.getType()}catch{}try{Nd.version&&(d=JSON.parse(Nd.version))}catch{}ae(290,l.name,c,d)}return l===cE||l===Bi||l===io})(e),i=!n&&Mf(e,"getType")?e.getType():void 0;let o,a=i;if(r)if(i)o=r[i];else{for(const[l,c]of Object.entries(r))a=l,o=c;if(!o)for(const l of Object.getOwnPropertySymbols(r)){const c=r[l];if(c){o=c;break}}}if(!n&&a&&(Mf(e,"getType")||(e.getType=()=>a),Mf(e,"clone")||(e.clone=l=>(pE(l),new e)),Mf(e,"importJSON")||(e.importJSON=o&&o.$importJSON||(l=>new e().updateFromJSON(l))),!Mf(e,"importDOM")&&o)){const{importDOM:l}=o;l&&(e.importDOM=()=>l)}const s={klass:e,ownNodeConfig:o,ownNodeType:a};return KT.set(e,s),s}function*EE(e){for(let t=e;t&&(t===io||p4(t.prototype));){const r=wE(t);yield r,t=r.ownNodeConfig&&r.ownNodeConfig.extends||lL(t)}}function sL(e){const t=Dr();return Cn(),new(t.resolveRegisteredNodeAfterReplacements(t.getRegisteredNode(e))).klass}const cr=(e,t)=>{let r=e;for(;r!=null&&!Mr(r);){if(t(r))return r;r=r.getParent()}return null};function W0(e,t){const r=[];let n=e.__first;for(;n!==null;){const i=t===null?mr(n):t.get(n);i==null&&ae(174),r.push(n),n=i.__next}return r}function lL(e){const t=Object.getPrototypeOf(e);if(typeof t=="function"&&t!==Function.prototype)return t;const r=e.prototype&&Object.getPrototypeOf(e.prototype);return r?r.constructor:null}const uL=new Map;function Cs(e){return H(e)||mt(e)}function Ku(e){return H(e)||mt(e)}function Hn(e){const t=e.getLatest();return Ku(t)?t.__slotHost:null}function ra(e){const t=Hn(e);if(t===null)return null;const r=mr(t);return H(r)||mt(r)||ae(370),r}function Jne(e){const t=ra(e);if(t===null)return null;const r=e.getLatest().__key;for(const[n,i]of pb(t))if(i===r)return n;return null}function hb(e){let t=e.getLatest();for(;t!==null;){if(Hn(t)!==null)return t;t=t.getParent()}return null}function pb(e){const t=e.getLatest();return Cs(t)&&t.__slots!==null?t.__slots:uL}function To(e){return Array.from(pb(e).keys())}function Hu(e,t){const r=pb(e).get(t);return r===void 0?null:mr(r)}const Qne=["__proto__","constructor","prototype"],HT=Symbol("slotMapOwner");function Vx(e){let t=e.__slots;return t!==null&&t[HT]===e||(t=new Map(t),t[HT]=e,e.__slots=t),t}const WT=new WeakMap,Yne=[];function Xne(e){for(const{ownNodeConfig:t}of EE(e)){const r=t&&t.slots;if(r)return r}return Yne}function cL(e){let t="";for(const r of To(e)){const n=Hu(e,r);n!==null&&(t+=n.getTextContent())}return t}function JT(e,t,r){const n=r.get(e),i=r.get(t);return n!==void 0?i!==void 0?n-i:-1:i!==void 0?1:e<t?-1:e>t?1:0}function Zne(e){const t=e.__slots;if(t===null||t.size<2)return;const r=(function(a){let s=WT.get(a);if(s===void 0){const l=Xne(a),c=new Map;for(const d of l)Qne.includes(d)&&ae(371,a.name,d),c.has(d)&&ae(372,a.name,d),c.set(d,c.size);s=c,WT.set(a,s)}return s})(e.constructor);let n=null,i=!0;for(const a of t.keys()){if(n!==null&&JT(n,a,r)>0){i=!1;break}n=a}if(i)return;const o=Array.from(t).sort(([a],[s])=>JT(a,s,r));t.clear();for(const[a,s]of o)t.set(a,s)}function dL(e,t,r){t!=="__proto__"&&t!=="constructor"&&t!=="prototype"||ae(373,t);const n=e.getLatest();if(n.__slots!==null&&n.__slots.get(t)===r.getLatest().__key)return n;(!H(r)&&!mt(r)||r.isInline())&&ae(374,r.__key);const i=e.getWritable(),o=Vx(i),a=o.get(t);a!==void 0&&fL(a);const s=r.getWritable(),l=ra(s);if(l!==null){const c=Jne(s);c!==null&&Vx(l.getWritable()).delete(c),s.__slotHost=null}return Ss(s),s.__slotHost=i.__key,o.set(t,s.__key),Zne(i),(function(){const c=Dr();c._slotsUsed=!0,c._pendingEditorState&&(c._pendingEditorState._slotsUsed=!0)})(),i}function eie(e,t){const r=e.getWritable();if(r.__slots===null)return r;const n=r.__slots.get(t);return n!==void 0&&(fL(n),Vx(r).delete(t)),r}function fL(e){const t=mr(e);if(t===null)return;const r=t.getWritable();Ku(r)||ae(377,e),r.__slotHost=null,r.remove()}const tie={next:"previous",previous:"next"};class kE{origin;constructor(t){this.origin=t}[Symbol.iterator](){return hL({hasNext:Ml,initial:this.getAdjacentCaret(),map:t=>t,step:t=>t.getAdjacentCaret()})}getAdjacentCaret(){return Ht(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return Ht(this.origin,this.direction)}remove(){const t=this.getNodeAtCaret();return t&&t.remove(),this}replaceOrInsert(t,r){const n=this.getNodeAtCaret();return t.is(this.origin)||t.is(n)||(n===null?this.insert(t):n.replace(t,r)),this}splice(t,r,n="next"){const i=n===this.direction?r:Array.from(r).reverse();let o=this;const a=this.getParentAtCaret(),s=new Map;for(let l=o.getAdjacentCaret();l!==null&&s.size<t;l=l.getAdjacentCaret()){const c=l.origin.getWritable();s.set(c.getKey(),c)}for(const l of i){if(s.size>0){const c=o.getNodeAtCaret();if(c){if(s.delete(c.getKey()),s.delete(l.getKey()),!(c.is(l)||o.origin.is(l))){const d=l.getParent();d&&d.is(a)&&l.remove(),c.replace(l)}}else c===null&&ae(263,Array.from(s).join(" "))}else o.insert(l);o=Ht(l,this.direction)}for(const l of s.values())l.remove();return this}}class op extends kE{type="child";getLatest(){const t=this.origin.getLatest();return t===this.origin?this:Lo(t,this.direction)}getParentCaret(t="root"){return Ht(CE(this.getParentAtCaret(),t),this.direction)}getFlipped(){const t=Wl(this.direction);return Ht(this.getNodeAtCaret(),t)||Lo(this.origin,t)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(t){return t instanceof op&&this.direction===t.direction&&this.origin.is(t.origin)}isSamePointCaret(t){return this.isSameNodeCaret(t)}}const rie={root:Mr,shadowRoot:vr};function Wl(e){return tie[e]}function CE(e,t="root"){return e===null||rie[t](e)?null:Hn(e)===null?e:null}class Wu extends kE{type="sibling";getLatest(){const t=this.origin.getLatest();return t===this.origin?this:Ht(t,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return H(this.origin)?Lo(this.origin,this.direction):null}getParentCaret(t="root"){return Ht(CE(this.getParentAtCaret(),t),this.direction)}getFlipped(){const t=Wl(this.direction);return Ht(this.getNodeAtCaret(),t)||Lo(this.origin.getParentOrThrow(),t)}isSamePointCaret(t){return t instanceof Wu&&this.direction===t.direction&&this.origin.is(t.origin)}isSameNodeCaret(t){return(t instanceof Wu||t instanceof Ju)&&this.direction===t.direction&&this.origin.is(t.origin)}}class Ju extends kE{type="text";offset;constructor(t,r){super(t),this.offset=r}getLatest(){const t=this.origin.getLatest();return t===this.origin?this:Ll(t,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(t="root"){return Ht(CE(this.getParentAtCaret(),t),this.direction)}getFlipped(){return Ll(this.origin,Wl(this.direction),this.offset)}isSamePointCaret(t){return t instanceof Ju&&this.direction===t.direction&&this.origin.is(t.origin)&&this.offset===t.offset}isSameNodeCaret(t){return(t instanceof Wu||t instanceof Ju)&&this.direction===t.direction&&this.origin.is(t.origin)}getSiblingCaret(){return Ht(this.origin,this.direction)}}function $o(e){return e instanceof Ju}function Ml(e){return e instanceof Wu}function No(e){return e instanceof op}const nie={next:class extends Ju{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends Ju{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},iie={next:class extends Wu{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends Wu{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},oie={next:class extends op{direction="next";getNodeAtCaret(){return this.origin.getFirstChild()}insert(e){return this.origin.splice(0,0,[e]),this}},previous:class extends op{direction="previous";getNodeAtCaret(){return this.origin.getLastChild()}insert(e){return this.origin.splice(this.origin.getChildrenSize(),0,[e]),this}}};function Ht(e,t){return e?new iie[t](e):null}function Ll(e,t,r){return e?new nie[t](e,ja(e,r)):null}function ja(e,t,r="error"){const n=e.getTextContentSize();let i=t==="next"?n:t==="previous"?0:t;return(i<0||i>n)&&(r!=="clamp"&&_6(284,String(t),String(n),e.getKey()),i=i<0?0:n),i}function QT(e,t){return new sie(e,t)}function Lo(e,t){return H(e)?new oie[t](e):null}function aie(e){return e&&e.getChildCaret()||e}function RE(e){return e&&aie(e.getAdjacentCaret())}class AE{type="node-caret-range";direction;anchor;focus;constructor(t,r,n){this.anchor=t,this.focus=r,this.direction=n}getLatest(){const t=this.anchor.getLatest(),r=this.focus.getLatest();return t===this.anchor&&r===this.focus?this:new AE(t,r,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){const t=i=>{const o=this[i].getLatest();return $o(o)?(function(a,s){const{direction:l,origin:c}=a,d=ja(c,s==="focus"?Wl(l):l);return QT(a,d-a.offset)})(o,i):null},r=t("anchor"),n=t("focus");if(r&&n){const{caret:i}=r,{caret:o}=n;if(i.isSameNodeCaret(o))return[QT(i,o.offset-i.offset),null]}return[r,n]}iterNodeCarets(t="root"){const r=$o(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),n=this.focus.getLatest(),i=$o(n),o=a=>a.isSameNodeCaret(n)?null:RE(a)||a.getParentCaret(t);return hL({hasNext:a=>a!==null&&!(i&&n.isSameNodeCaret(a)),initial:r.isSameNodeCaret(n)?null:o(r),map:a=>a,step:o})}[Symbol.iterator](){return this.iterNodeCarets("root")}}class sie{type="slice";caret;distance;constructor(t,r){this.caret=t,this.distance=r}getSliceIndices(){const{distance:t,caret:{offset:r}}=this,n=r+t;return n<r?[n,r]:[r,n]}getTextContent(){const[t,r]=this.getSliceIndices();return this.caret.origin.getTextContent().slice(t,r)}getTextContentSize(){return Math.abs(this.distance)}removeTextSlice(){const{caret:{origin:t,direction:r}}=this,[n,i]=this.getSliceIndices(),o=t.getTextContent();return Ll(t.setTextContent(o.slice(0,n)+o.slice(i)),r,n)}}function mb(e){return oa(e,Ht(ln(),e.direction))}function gb(e){return oa(e,e)}function oa(e,t){return e.direction!==t.direction&&ae(265),new AE(e,t,e.direction)}function hL(e){const{initial:t,hasNext:r,step:n,map:i}=e;let o=t;return{[Symbol.iterator](){return this},next(){if(!r(o))return{done:!0,value:void 0};const a={done:!1,value:i(o)};return o=n(o),a}}}function ap(e,t){const r=Gx(e.origin,t.origin);switch(r===null&&ae(275,e.origin.getKey(),t.origin.getKey()),r.type){case"same":{const n=e.type==="text",i=t.type==="text";return n&&i?(function(o,a){return Math.sign(o-a)})(e.offset,t.offset):e.type===t.type?0:n?-1:i?1:e.type==="child"?-1:1}case"ancestor":return e.type==="child"?-1:1;case"descendant":return t.type==="child"?1:-1;case"branch":return pL(r)}}function pL(e){const{a:t,b:r}=e,n=t.__key,i=r.__key;let o=t,a=r;for(;o&&a;o=o.getNextSibling(),a=a.getNextSibling()){if(o.__key===i)return-1;if(a.__key===n)return 1}return o===null?1:-1}function Gm(e,t){return t.is(e)}function YT(e){return H(e)?[e.getLatest(),null]:[e.getParent(),e.getLatest()]}function Gx(e,t){if(e.is(t))return{commonAncestor:e,type:"same"};const r=new Map;for(let[n,i]=YT(e);n;i=n,n=n.getParent())r.set(n,i);for(let[n,i]=YT(t);n;i=n,n=n.getParent()){const o=r.get(n);if(o!==void 0)return o===null?(Gm(e,n)||ae(276),{commonAncestor:n,type:"ancestor"}):i===null?(Gm(t,n)||ae(277),{commonAncestor:n,type:"descendant"}):((H(o)||Gm(e,o))&&(H(i)||Gm(t,i))&&n.is(o.getParent())&&n.is(i.getParent())||ae(278),{a:o,b:i,commonAncestor:n,type:"branch"})}return null}function Pi(e,t){const{type:r,key:n,offset:i}=e,o=Pne(e.key);return r==="text"?(fe(o)||ae(266,o.getType(),n),Ll(o,t,i)):(H(o)||ae(267,o.getType(),n),Hx(o,e.offset,t))}function Qu(e,t){const{origin:r,direction:n}=t,i=n==="next";$o(t)?e.set(r.getKey(),t.offset,"text"):Ml(t)?fe(r)?e.set(r.getKey(),ja(r,n),"text"):e.set(r.getParentOrThrow().getKey(),r.getIndexWithinParent()+(i?1:0),"element"):(No(t)&&H(r)||ae(268),e.set(r.getKey(),i?0:r.getChildrenSize(),"element"))}function sp(e){const t=xe(),r=ue(t)?t:lE();return e0(r,e),Fn(r),r}function e0(e,t){Qu(e.anchor,t.anchor),Qu(e.focus,t.focus)}function Kx(e){const{anchor:t,focus:r}=e,n=Pi(t,"next"),i=Pi(r,"next"),o=ap(n,i)<=0?"next":"previous";return oa(Ms(n,o),Ms(i,o))}function uc(e){const{direction:t,origin:r}=e,n=Ht(r,Wl(t)).getNodeAtCaret();return n?Ht(n,t):Lo(r.getParentOrThrow(),t)}function XT(e,t="root"){const r=[e];for(let n=No(e)?e.getParentCaret(t):e.getSiblingCaret();n!==null;n=n.getParentCaret(t))r.push(uc(n));return r}function iy(e){return!!e&&e.origin.isAttached()}function lie(e,t="removeEmptySlices"){if(e.isCollapsed())return e;const r="root",n="next";let i=t;const o=$E(e,n),a=XT(o.anchor,r),s=XT(o.focus.getFlipped(),r),l=new Set,c=[];for(const m of o.iterNodeCarets(r))if(No(m))l.add(m.origin.getKey());else if(Ml(m)){const{origin:g}=m;H(g)&&!l.has(g.getKey())||c.push(g)}for(const m of c)m.remove();for(const m of o.getTextSlices()){if(!m)continue;const{origin:g}=m.caret,v=g.getTextContentSize(),b=uc(Ht(g,n)),y=g.getMode();if(Math.abs(m.distance)===v&&i==="removeEmptySlices"||y==="token"&&m.distance!==0)b.remove();else if(m.distance!==0){i="removeEmptySlices";let S=m.removeTextSlice();const w=m.caret.origin;if(y==="segmented"){const C=S.origin,A=Pr(C.getTextContent()).setStyle(C.getStyle()).setFormat(C.getFormat());b.replaceOrInsert(A),S=Ll(A,n,S.offset)}w.is(a[0].origin)&&(a[0]=S),w.is(s[0].origin)&&(s[0]=S.getFlipped())}}let d,f;for(const m of a)if(iy(m)){d=eo(m);break}for(const m of s)if(iy(m)){f=eo(m);break}const h=(function(m,g,v){if(!m||!g)return null;const b=m.getParentAtCaret(),y=g.getParentAtCaret();if(!b||!y)return null;const S=b.getParents().reverse();S.push(b);const w=y.getParents().reverse();w.push(y);const C=Math.min(S.length,w.length);let A;for(A=0;A<C&&S[A]===w[A];A++);const $=(I,M)=>{let P;for(let B=A;B<I.length;B++){const j=I[B];if(vr(j))return;!P&&M(j)&&(P=j)}return P},R=$(S,jn),N=R&&$(w,I=>v.has(I.getKey())&&jn(I));return N&&To(N).length>0?null:R&&N?[R,N]:null})(d,f,l);if(h){const[m,g]=h;Lo(m,"previous").splice(0,g.getChildren());let v=g.getParent();for(g.remove(!0);v&&v.isEmpty();){const b=v;v=v.getParent(),b.remove(!0)}}else if(f){const m=(function(b){if(No(b)){const y=b.origin;if(jn(y))return y}else{const y=b.getParentAtCaret();if(y&&jn(y))return y}return null})(f),g=m&&m.getParent(),v=m&&m.getParents().findLast(md);if(m&&g&&!Mr(g)&&m.isEmpty()&&l.has(m.getKey())&&To(m).length===0&&(!v||l.has(v.getKey()))){m.remove(!0);let b=g;for(;b&&!Mr(b)&&b.isEmpty();){const y=b.getParent();if(y&&Mr(y)&&y.getChildrenSize()<=1)break;const S=b;b=y,S.remove(!0)}}}const p=[d,f,...a,...s].find(iy);if(p)return gb(Ms(eo(p),e.direction));ae(269,JSON.stringify(a.map(m=>m.origin.__key)))}function eo(e){const t=(function(i){let o=i;for(;No(o);){const a=RE(o);if(!No(a))break;o=a}return o})(e.getLatest()),{direction:r}=t;if(fe(t.origin))return $o(t)?t:Ll(t.origin,r,r);const n=t.getAdjacentCaret();return Ml(n)&&fe(n.origin)?Ll(n.origin,r,Wl(r)):t}function TE(e){return $o(e)&&e.offset!==ja(e.origin,e.direction)}function Ms(e,t){return e.direction===t?e:e.getFlipped()}function $E(e,t){return e.direction===t?e:oa(Ms(e.focus,t),Ms(e.anchor,t))}function Hx(e,t,r){let n=Lo(e,"next");for(let i=0;i<t;i++){const o=n.getAdjacentCaret();if(o===null)break;n=o}return Ms(n,r)}function uie(e){const{origin:t,offset:r,direction:n}=e;if(r===ja(t,n))return e.getSiblingCaret();if(r===ja(t,Wl(n)))return uc(e.getSiblingCaret());const[i]=t.splitText(r);return fe(i)||ae(281),Ms(Ht(i,"next"),n)}function cie(e,t){return!0}function mL(e,{$copyElementNode:t=ii,$splitTextPointCaretNext:r=uie,rootMode:n="shadowRoot",$shouldSplit:i=cie,removeEmptyDestination:o=!1}={}){if($o(e))return r(e);const a=e.getParentCaret(n);if(a){const{origin:s}=a;if(No(e)){const c=uc(a);if(o&&s.isEmpty())return s.remove(),c;if(!s.canBeEmpty()||!i(s,"first"))return c}const l=(function(c){const d=[];for(let f=c.getAdjacentCaret();f;f=f.getAdjacentCaret())d.push(f.origin);return d})(e);(l.length>0||!o&&s.canBeEmpty()&&i(s,"last"))&&a.insert(t(s).splice(0,0,l))}return a}function gL(e,t,r){let n=Ms(t,"next");$o(n)&&(n.offset===0?n=Ht(n.origin,"previous").getFlipped():n.offset===n.origin.getTextContentSize()&&(n=Ht(n.origin,"next"))),n.origin.is(e)&&(Ml(n)||ae(342,e.getKey(),e.getType()),n=uc(n)),(e.is(n.getNodeAtCaret())||e.is(n.getFlipped().getNodeAtCaret()))&&e.remove(!0);for(let i=n;i;i=mL(i,r))n=i;return $o(n)&&ae(283),n.insert(e.isInline()?Xt().append(e):e),Ms(Ht(e.getLatest(),"next"),t.direction)}function NE(e,t){if(!t||e===t)return e;for(const r in t)if(e[r]!==t[r])return{...e,...t};return e}function Rs(...e){const t=[];for(const r of e)if(r&&typeof r=="string")for(const[n]of r.matchAll(/\S+/g))t.push(n);return t}function Ha(e,...t){const r=Rs(...t);r.length>0&&e.classList.add(...r)}function DE(e,...t){const r=Rs(...t);r.length>0&&e.classList.remove(...r)}function zl(...e){return()=>{for(let t=e.length-1;t>=0;t--)e[t]();e.length=0}}function vL(e){const t=Dr().getElementByKey(e.getKey());if(t===null)return null;const r=t.ownerDocument.defaultView;return r===null?null:r.getComputedStyle(t)}function bL(e){return vL(Mr(e)?e:e.getParentOrThrow())}function Km(e){const t=bL(e);return t!==null&&t.direction==="rtl"}function _L(e,t,r="self"){const n=e.getStartEndPoints();if(t.isSelected(e)&&!Zi(t)&&n!==null){const[i,o]=n,a=e.isBackward(),s=i.getNode(),l=o.getNode(),c=t.is(s),d=t.is(l);if(c||d){const[f,h]=Mx(e),p=s.is(l),m=t.is(a?l:s),g=t.is(a?s:l);let v,b=0;p?(b=f>h?h:f,v=f>h?f:h):m?(b=a?h:f,v=void 0):g&&(b=0,v=a?f:h);const y=t.__text.slice(b,v);y!==t.__text&&(r==="clone"&&(t=Kne(t)),t.__text=y)}}return t}function die(e,t){const r=e.getFormatType(),n=e.getIndent();r!==t.getFormatType()&&t.setFormat(r),n!==t.getIndent()&&t.setIndent(n)}function fie(e,t,r){let n=Pi(e,r);if(TE(n))return!1;for(;n;n=n.getParentCaret()){const i=n.getParentAtCaret();if(!i||n.getNodeAtCaret())return!1;if(t.is(i))return!0}return!1}function hie(e,t,r=die){if(!e)return;const n=e.getStartEndPoints();let i=!1,o=null;const a=new Map;if(n){const[s,l]=n,c=cr(s.getNode(),jn);o=cr(l.getNode(),jn);const d=e.isBackward()?"previous":"next";i=H(o)&&!o.is(c)&&(function(f,h,p){const m=f.getNode();return(!H(m)||!m.isEmpty())&&fie(f,h,p)})(l,o,Wl(d)),H(c)&&a.set(c.getKey(),c),H(o)&&!i&&a.set(o.getKey(),o)}for(const s of e.getNodes())if(H(s)&&jn(s)){if(i&&s.is(o))continue;a.set(s.getKey(),s)}else if(!n){const l=cr(s,jn);H(l)&&a.set(l.getKey(),l)}for(const s of a.values()){const l=t();r(s,l),s.replace(l,!0)}}function yL(e){const t=xL(e);return t!==null&&t.writingMode==="vertical-rl"}function xL(e){const t=e.anchor.getNode();return H(t)?vL(t):bL(t)}function ZT(e,t){let r=yL(e)?!t:t;SL(e)&&(r=!r);const n=Pi(e.focus,r?"previous":"next");if(TE(n))return!1;if($o(n)&&!ju(n.origin)&&n.origin.isUnmergeable()){const i=n.getNodeAtCaret();if(fe(i)&&!ju(i))return!0}for(const i of mb(n)){if(No(i))return!i.origin.isInline();if(!H(i.origin)){if(mt(i.origin))return!0;break}}return!1}function pie(e,t,r,n){e.modify(t?"extend":"move",r,n)}function SL(e){const t=xL(e);return t!==null&&t.direction==="rtl"}function e$(e,t,r){const n=SL(e);let i;i=yL(e)||n?!r:r,pie(e,t,i,"character")}function mie(e,...t){const r=new URL("https://lexical.dev/docs/error"),n=new URLSearchParams;n.append("code",e);for(const i of t)n.append("v",i);throw r.search=n.toString(),Error(`Minified Lexical error #${e}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function gie(e,t){let r=e;for(;r!=null;){if(r instanceof t)return r;r=r.getParent()}return null}function vie(e){const t=cr(e,r=>H(r)&&!r.isInline());return H(t)||mie(4,e.__key),t}function xl(e,t){return e!==null&&Object.getPrototypeOf(e).constructor.name===t.name}function Hm(e){let t=null;if(xl(e,DragEvent)?t=e.dataTransfer:xl(e,ClipboardEvent)&&(t=e.clipboardData),t===null)return[!1,[],!1];const r=t.types,n=r.includes("Files"),i=r.includes("text/html")||r.includes("text/plain");return[n,Array.from(t.files),i]}function t$(e){const t=xe();if(!ue(t))return!1;const r=new Set,n=t.getNodes();for(let i=0;i<n.length;i++){const o=n[i],a=o.getKey();if(r.has(a))continue;const s=cr(o,c=>H(c)&&!c.isInline());if(s===null)continue;const l=s.getKey();s.canIndent()&&!r.has(l)&&(r.add(l),e(s))}return r.size>0}const bie=Symbol.for("preact-signals");function FE(){if(Ru>1)return void Ru--;let e,t=!1;for(!(function(){let r=J0;for(J0=void 0;r!==void 0;)r.S.v===r.v&&(r.S.i=r.i),r=r.o})();bh!==void 0;){let r=bh;for(bh=void 0,Q0++;r!==void 0;){const n=r.u;if(r.u=void 0,r.f&=-3,!(8&r.f)&&wL(r))try{r.c()}catch(i){t||(e=i,t=!0)}r=n}}if(Q0=0,Ru--,t)throw e}let tr,bh;function r$(e){const t=tr;tr=void 0;try{return e()}finally{tr=t}}let J0,Ru=0,Q0=0,n$=0,t0=0;function i$(e){if(tr===void 0)return;let t=e.n;return t===void 0||t.t!==tr?(t={i:0,S:e,p:tr.s,n:void 0,t:tr,e:void 0,x:void 0,r:t},tr.s!==void 0&&(tr.s.n=t),tr.s=t,e.n=t,32&tr.f&&e.S(t),t):t.i===-1?(t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=tr.s,t.n=void 0,tr.s.n=t,tr.s=t),t):void 0}function li(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}function _ie(e,t){return new li(e,t)}function wL(e){for(let t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function o$(e){for(let t=e.s;t!==void 0;t=t.n){const r=t.S.n;if(r!==void 0&&(t.r=r),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function EL(e){let t,r=e.s;for(;r!==void 0;){const n=r.p;r.i===-1?(r.S.U(r),n!==void 0&&(n.n=r.n),r.n!==void 0&&(r.n.p=n)):t=r,r.S.n=r.r,r.r!==void 0&&(r.r=void 0),r=n}e.s=t}function Nc(e,t){li.call(this,void 0),this.x=e,this.s=void 0,this.g=t0-1,this.f=4,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}function kL(e){const t=e.m;if(e.m=void 0,typeof t=="function"){Ru++;const r=tr;tr=void 0;try{t()}catch(n){throw e.f&=-2,e.f|=8,IE(e),n}finally{tr=r,FE()}}}function IE(e){for(let t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,kL(e)}function yie(e){if(tr!==this)throw new Error("Out-of-order effect");EL(this),tr=e,this.f&=-2,8&this.f&&IE(this),FE()}function Vc(e,t){this.x=e,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=t?.name}function xie(e,t){const r=new Vc(e,t);try{r.c()}catch(i){throw r.d(),i}const n=r.d.bind(r);return n[Symbol.dispose]=n,n}li.prototype.brand=bie,li.prototype.h=function(){return!0},li.prototype.S=function(e){const t=this.t;t!==e&&e.e===void 0&&(e.x=t,this.t=e,t!==void 0?t.e=e:r$(()=>{var r;(r=this.W)==null||r.call(this)}))},li.prototype.U=function(e){if(this.t!==void 0){const t=e.e,r=e.x;t!==void 0&&(t.x=r,e.e=void 0),r!==void 0&&(r.e=t,e.x=void 0),e===this.t&&(this.t=r,r===void 0&&r$(()=>{var n;(n=this.Z)==null||n.call(this)}))}},li.prototype.subscribe=function(e){return xie(()=>{const t=this.value,r=tr;tr=void 0;try{e(t)}finally{tr=r}},{name:"sub"})},li.prototype.valueOf=function(){return this.value},li.prototype.toString=function(){return this.value+""},li.prototype.toJSON=function(){return this.value},li.prototype.peek=function(){const e=tr;tr=void 0;try{return this.value}finally{tr=e}},Object.defineProperty(li.prototype,"value",{get(){const e=i$(this);return e!==void 0&&(e.i=this.i),this.v},set(e){if(e!==this.v){if(Q0>100)throw new Error("Cycle detected");(function(t){Ru!==0&&Q0===0&&t.l!==n$&&(t.l=n$,J0={S:t,v:t.v,i:t.i,o:J0})})(this),this.v=e,this.i++,t0++,Ru++;try{for(let t=this.t;t!==void 0;t=t.x)t.t.N()}finally{FE()}}}}),Nc.prototype=new li,Nc.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===t0))return!0;if(this.g=t0,this.f|=1,this.i>0&&!wL(this))return this.f&=-2,!0;const e=tr;try{o$(this),tr=this;const t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(t){this.v=t,this.f|=16,this.i++}return tr=e,EL(this),this.f&=-2,!0},Nc.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(let t=this.s;t!==void 0;t=t.n)t.S.S(t)}li.prototype.S.call(this,e)},Nc.prototype.U=function(e){if(this.t!==void 0&&(li.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(let t=this.s;t!==void 0;t=t.n)t.S.U(t)}},Nc.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(let e=this.t;e!==void 0;e=e.x)e.t.N()}},Object.defineProperty(Nc.prototype,"value",{get(){if(1&this.f)throw new Error("Cycle detected");const e=i$(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),Vc.prototype.c=function(){const e=this.S();try{if(8&this.f||this.x===void 0)return;const t=this.x();typeof t=="function"&&(this.m=t)}finally{e()}},Vc.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,kL(this),o$(this),Ru++;const e=tr;return tr=this,yie.bind(this,e)},Vc.prototype.N=function(){2&this.f||(this.f|=2,this.u=bh,bh=this)},Vc.prototype.d=function(){this.f|=8,1&this.f||IE(this)},Vc.prototype.dispose=function(){this.d()};function Sie(e){return(typeof e.nodes=="function"?e.nodes():e.nodes)||[]}function pr(e,...t){const r=new URL("https://lexical.dev/docs/error"),n=new URLSearchParams;n.append("code",e);for(const i of t)n.append("v",i);throw r.search=n.toString(),Error(`Minified Lexical error #${e}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let CL;try{CL="0.48.0+prod.esm"}catch{}const wie=CL??'"<unknown>+source"',Eie=new Set(["__proto__","constructor","prototype"]);function RL(e,t){if(e&&t&&!Array.isArray(t)&&typeof e=="object"&&typeof t=="object"){const r=e,n=t;for(const i in n)!Eie.has(i)&&Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=RL(r[i],n[i]));return e}return t}const PE=0,Wx=1,AL=2,oy=3,Wm=4,Dc=5,ay=6,Lf=7;function sy(e){return e.id===PE}function TL(e){return e.id===AL}function kie(e){return(function(t){return t.id===Wx})(e)||pr(305,String(e.id),String(Wx)),Object.assign(e,{id:AL})}const Cie=new Set;let Rie=class{builder;configs;_dependency;_peerNameSet;extension;state;_signal;constructor(t,r){this.builder=t,this.extension=r,this.configs=new Set,this.state={id:PE}}mergeConfigs(){let t=this.extension.config||{};const r=this.extension.mergeConfig?this.extension.mergeConfig.bind(this.extension):NE;for(const n of this.configs)t=r(t,n);return t}init(t){const r=this.state;TL(r)||pr(306,String(r.id));const n={getDependency:this.getInitDependency.bind(this),getDirectDependentNames:this.getDirectDependentNames.bind(this),getPeer:this.getInitPeer.bind(this),getPeerNameSet:this.getPeerNameSet.bind(this)},i={...n,getDependency:this.getDependency.bind(this),getInitResult:this.getInitResult.bind(this),getPeer:this.getPeer.bind(this)},o=(function(s,l,c){return Object.assign(s,{config:l,id:oy,registerState:c})})(r,this.mergeConfigs(),n);let a;this.state=o,this.extension.init&&(a=this.extension.init(t,o.config,n)),this.state=(function(s,l,c){return Object.assign(s,{id:Wm,initResult:l,registerState:c})})(o,a,i)}build(t){const r=this.state;let n;r.id!==Wm&&pr(307,String(r.id),String(Dc)),this.extension.build&&(n=this.extension.build(t,r.config,r.registerState));const i={...r.registerState,getOutput:()=>n,getSignal:this.getSignal.bind(this)};this.state=(function(o,a,s){return Object.assign(o,{id:Dc,output:a,registerState:s})})(r,n,i)}register(t,r){this._signal=r;const n=this.state;n.id!==Dc&&pr(308,String(n.id),String(Dc));const i=this.extension.register&&this.extension.register(t,n.config,n.registerState);return this.state=(function(o){return Object.assign(o,{id:ay})})(n),()=>{const o=this.state;o.id!==Lf&&pr(309,String(n.id),String(Lf)),this.state=(function(a){return Object.assign(a,{id:Dc})})(o),i&&i()}}afterRegistration(t){const r=this.state;let n;return r.id!==ay&&pr(310,String(r.id),String(ay)),this.extension.afterRegistration&&(n=this.extension.afterRegistration(t,r.config,r.registerState)),this.state=(function(i){return Object.assign(i,{id:Lf})})(r),n}getSignal(){return this._signal===void 0&&pr(311),this._signal}getInitResult(){this.extension.init===void 0&&pr(312,this.extension.name);const t=this.state;return(function(r){return r.id>=Wm})(t)||pr(313,String(t.id),String(Wm)),t.initResult}getInitPeer(t){const r=this.builder.extensionNameMap.get(t);return r?r.getExtensionInitDependency():void 0}getExtensionInitDependency(){const t=this.state;return(function(r){return r.id>=oy})(t)||pr(314,String(t.id),String(oy)),{config:t.config}}getPeer(t){const r=this.builder.extensionNameMap.get(t);return r?r.getExtensionDependency():void 0}getInitDependency(t){const r=this.builder.getExtensionRep(t);return r===void 0&&pr(315,this.extension.name,t.name),r.getExtensionInitDependency()}getDependency(t){const r=this.builder.getExtensionRep(t);return r===void 0&&pr(315,this.extension.name,t.name),r.getExtensionDependency()}getState(){const t=this.state;return(function(r){return r.id>=Lf})(t)||pr(316,String(t.id),String(Lf)),t}getDirectDependentNames(){return this.builder.incomingEdges.get(this.extension.name)||Cie}getPeerNameSet(){let t=this._peerNameSet;return t||(t=new Set((this.extension.peerDependencies||[]).map(([r])=>r)),this._peerNameSet=t),t}getExtensionDependency(){if(!this._dependency){const t=this.state;(function(r){return r.id>=Dc})(t)||pr(317,this.extension.name),this._dependency={config:t.config,init:t.initResult,output:t.output}}return this._dependency}};const a$={tag:gh};function Aie(){const e=ln();e.isEmpty()&&e.append(Xt())}const Tie={config:{setOptions:a$,updateOptions:a$},init:({$initialEditorState:e=Aie})=>({$initialEditorState:e,initialized:!1}),afterRegistration(e,{updateOptions:t,setOptions:r},n){const i=n.getInitResult();if(!i.initialized){i.initialized=!0;const{$initialEditorState:o}=i;if(_ne(o))e.setEditorState(o,r);else if(typeof o=="function")e.update(()=>{o(e)},t);else if(o&&(typeof o=="string"||typeof o=="object")){const a=e.parseEditorState(o);e.setEditorState(a,r)}}return()=>{}},name:"@lexical/extension/InitialState",nodes:[Zd,qs,ef,Qd,tf]},s$=Symbol.for("@lexical/extension/LexicalBuilder");function l$(){}function $ie(e){throw e}function Jm(e){return Array.isArray(e)?e:[e]}const ly=wie;class _h{roots;extensionNameMap;outgoingConfigEdges;incomingEdges;conflicts;_sortedExtensionReps;PACKAGE_VERSION;constructor(t){this.outgoingConfigEdges=new Map,this.incomingEdges=new Map,this.extensionNameMap=new Map,this.conflicts=new Map,this.PACKAGE_VERSION=ly,this.roots=t;for(const r of t)this.addExtension(r)}static fromExtensions(t){const r=[Jm(Tie)];for(const n of t)r.push(Jm(n));return new _h(r)}static maybeFromEditor(t){const r=t[s$];return r&&(r.PACKAGE_VERSION!==ly&&pr(292,r.PACKAGE_VERSION,ly),r instanceof _h||pr(293)),r}static fromEditor(t){const r=_h.maybeFromEditor(t);return r===void 0&&pr(294),r}constructEditor(){const{$initialEditorState:t,onError:r,onWarn:n,...i}=this.buildCreateEditorArgs(),o=Object.assign(hE({...i,...r?{onError:a=>{r(a,o)}}:{},...n?{onWarn:a=>{n(a,o)}}:{}}),{[s$]:this});for(const a of this.sortedExtensionReps())a.build(o);return o}buildEditor(){let t=l$;function r(){try{t()}finally{t=l$}}const n=Object.assign(this.constructEditor(),{dispose:r,[Symbol.dispose]:r});return t=zl(this.registerEditor(n),()=>n.setRootElement(null)),n}hasExtensionByName(t){return this.extensionNameMap.has(t)}getExtensionRep(t){const r=this.extensionNameMap.get(t.name);if(r)return r.extension!==t&&pr(295,t.name),r}addEdge(t,r,n){const i=this.outgoingConfigEdges.get(t);i?i.set(r,n):this.outgoingConfigEdges.set(t,new Map([[r,n]]));const o=this.incomingEdges.get(r);o?o.add(t):this.incomingEdges.set(r,new Set([t]))}addExtension(t){this._sortedExtensionReps!==void 0&&pr(296);const r=Jm(t),[n]=r;typeof n.name!="string"&&pr(297,typeof n.name);let i=this.extensionNameMap.get(n.name);if(i!==void 0&&i.extension!==n&&pr(298,n.name),!i){i=new Rie(this,n),this.extensionNameMap.set(n.name,i);const o=this.conflicts.get(n.name);typeof o=="string"&&pr(299,n.name,o);for(const a of n.conflictsWith||[])this.extensionNameMap.has(a)&&pr(299,n.name,a),this.conflicts.set(a,n.name);for(const a of n.dependencies||[]){const s=Jm(a);this.addEdge(n.name,s[0].name,s.slice(1)),this.addExtension(s)}for(const[a,s]of n.peerDependencies||[])this.addEdge(n.name,a,s?[s]:[])}}sortedExtensionReps(){if(this._sortedExtensionReps)return this._sortedExtensionReps;const t=[],r=(n,i)=>{let o=n.state;if(TL(o))return;const a=n.extension.name;var s;sy(o)||pr(300,a,i||"[unknown]"),sy(s=o)||pr(304,String(s.id),String(PE)),o=Object.assign(s,{id:Wx}),n.state=o;const l=this.outgoingConfigEdges.get(a);if(l)for(const c of l.keys()){const d=this.extensionNameMap.get(c);d&&r(d,a)}o=kie(o),n.state=o,t.push(n)};for(const n of this.extensionNameMap.values())sy(n.state)&&r(n);for(const n of t)for(const[i,o]of this.outgoingConfigEdges.get(n.extension.name)||[])if(o.length>0){const a=this.extensionNameMap.get(i);if(a)for(const s of o)a.configs.add(s)}for(const[n,...i]of this.roots)if(i.length>0){const o=this.extensionNameMap.get(n.name);o===void 0&&pr(301,n.name);for(const a of i)o.configs.add(a)}return this._sortedExtensionReps=t,this._sortedExtensionReps}registerEditor(t){const r=this.sortedExtensionReps(),n=new AbortController,i=[()=>n.abort()],o=n.signal;for(const a of r){const s=a.register(t,o);s&&i.push(s)}for(const a of r){const s=a.afterRegistration(t);s&&i.push(s)}return zl(...i)}buildCreateEditorArgs(){const t={},r=new Set,n=new Map,i=new Map,o={},a={},s=this.sortedExtensionReps();for(const d of s){const{extension:f}=d;if(f.onError!==void 0&&(t.onError=f.onError),f.onWarn!==void 0&&(t.onWarn=f.onWarn),f.disableEvents!==void 0&&(t.disableEvents=f.disableEvents),f.parentEditor!==void 0&&(t.parentEditor=f.parentEditor),f.editable!==void 0&&(t.editable=f.editable),f.namespace!==void 0&&(t.namespace=f.namespace),f.$initialEditorState!==void 0&&(t.$initialEditorState=f.$initialEditorState),f.nodes)for(const h of Sie(f)){if(typeof h!="function"){const p=n.get(h.replace);p&&pr(302,f.name,h.replace.name,p.extension.name),n.set(h.replace,d)}r.add(h)}if(f.html){if(f.html.export)for(const[h,p]of f.html.export.entries())i.set(h,p);f.html.import&&Object.assign(o,f.html.import)}f.theme&&RL(a,f.theme)}Object.keys(a).length>0&&(t.theme=a),r.size&&(t.nodes=[...r]);const l=Object.keys(o).length>0,c=i.size>0;(l||c)&&(t.html={},l&&(t.html.import=o),c&&(t.html.export=i));for(const d of s)d.init(t);return t.onError||(t.onError=$ie),t}}function Wp(e,t){const r=_h.maybeFromEditor(e);if(!r)return;const n=r.extensionNameMap.get(t);return n?n.getExtensionDependency():void 0}function Nie(e){return Wp(Dr(),e)}class vb extends cE{static getType(){return"horizontalrule"}static clone(t){return new vb(t.__key)}static importJSON(t){return OE().updateFromJSON(t)}static importDOM(){return{hr:()=>({conversion:Die,priority:0})}}exportDOM(){return{element:gr().createElement("hr")}}createDOM(t){const r=gr().createElement("hr");return Ha(r,t.theme.hr),r}getTextContent(){return`
|
|
28
|
+
`}isInline(){return!1}updateDOM(){return!1}}function Die(){return{node:OE()}}function OE(){return sL(vb)}function af(e,...t){const r=new URL("https://lexical.dev/docs/error"),n=new URLSearchParams;n.append("code",e);for(const i of t)n.append("v",i);throw r.search=n.toString(),Error(`Minified Lexical error #${e}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let gd;function $L(e,t){const{key:r}=t;return e&&r in e?e[r]:t.defaultValue}function NL(e){return gd&&gd.editor===e?gd:void 0}function Fie(e,t){if("cfg"in t){const{cfg:r,updater:n}=t;return[r,n($L(e,r))]}return t}function Iie(e,t){let r=t;for(const n of e){const[i,o]=Fie(r,n),a=i.key;if(r===t&&$L(r,i)===o)continue;const s=r===t||r===void 0?Pie(t):r;s[a]=o,r=s}return r}function Pie(e){return Object.create(e||null)}function DL(e,t){return[e,t]}function Oie(e,t,r,n=Dr()){const i=gd,o=NL(n);try{return gd={...o,editor:n,[e]:t},r()}finally{gd=i}}function Mie(e,t=()=>{}){return(r,n=Dr())=>i=>{const o=NL(n),a=o&&o[e],s=Iie(r,a||t(n));return s&&s!==a?Oie(e,s,i,n):i()}}function FL(e,t,r,n){return Object.assign(qp(Symbol(t),{isEqual:n,parse:r}),{[e]:!0})}function Lie(e){if(!ac(e))return;const t=e;if(t.querySelector("style")===null)return;const r=new Map;function n(i){let o=r.get(i);if(o===void 0){o=new Set;for(let a=0;a<i.style.length;a++)o.add(i.style[a]);r.set(i,o)}return o}try{for(const i of Array.from(t.styleSheets)){let o;try{o=i.cssRules}catch{continue}for(const a of Array.from(o)){if(!xl(a,CSSStyleRule))continue;let s;try{s=t.querySelectorAll(a.selectorText)}catch{continue}for(const l of Array.from(s)){if(!it(l))continue;const c=n(l);for(let d=0;d<a.style.length;d++){const f=a.style[d];c.has(f)||l.style.setProperty(f,a.style.getPropertyValue(f),a.style.getPropertyPriority(f))}}}}}catch{}}const IL="@lexical/html/DOM",PL=Symbol.for("@lexical/html/DOMExportContext"),zie=Symbol.for("@lexical/html/DOMImportContext");function Uie(e,t,r){return FL(PL,e,t,r)}const Bie=Uie("isExport",Boolean);function jie(e){const t=Wp(e,IL);return t?t.output.defaults:void 0}function qie(e){const t=Wp(e,IL);return t?t.output.runtime:void 0}function Vie(e=Dr()){const t=qie(e);return t?t.getSessionConfig():fb(e)}const Gie=Mie(PL,jie),bb=Symbol.for("@lexical/html/SelectorImpl");function lp(e,t){const r={kind:"element",predicate:(n=t,n.length===0?it:n.length===1?n[0]:(o,a)=>{for(const s of n)if(!s(o,a))return!1;return!0}),tags:e};var n;const i=o=>lp(e,[...t,o]);return{[bb]:r,attr:(o,a,s)=>i(Jx(o,a,s)),classAll:(...o)=>i(ML(o)),classAny:(...o)=>i((function(a){const s=OL(a);return s.length===0?()=>!1:l=>{if(!it(l))return!1;const c=l.classList;for(const d of s)if(c.contains(d))return!0;return!1}})(o)),styleAny:(o,a,s)=>i((function(l,c,d){if(typeof c=="string")return f=>it(f)&&f.style.getPropertyValue(l)===c;if(c instanceof RegExp){const f=d&&d.capture,h=c;return(p,m)=>{if(!it(p))return!1;const g=p.style.getPropertyValue(l);if(!g)return!1;const v=g.match(h);return v!==null&&(f!==void 0&&(m[f]=v),!0)}}af(362,JSON.stringify(l))})(o,a,s))}}function OL(e){const t=[];for(const r of e)r&&t.push(r);return t}function ML(e){const t=OL(e);return t.length===0?()=>!0:r=>{if(!it(r))return!1;const n=r.classList;for(const i of t)if(!n.contains(i))return!1;return!0}}function Jx(e,t,r){if(t===!0)return n=>it(n)&&n.hasAttribute(e);if(typeof t=="string")return n=>it(n)&&n.getAttribute(e)===t;if(t instanceof RegExp){const n=r&&r.capture,i=t;return(o,a)=>{if(!it(o))return!1;const s=o.getAttribute(e);if(s==null)return!1;const l=s.match(i);return l!==null&&(n!==void 0&&(a[n]=l),!0)}}af(361,JSON.stringify(e))}const Kie={kind:"text",predicate:qi,tags:new Set},Hie={[bb]:Kie},Wie={kind:"comment",predicate:e=>e.nodeType===8,tags:new Set},Jie={[bb]:Wie},Yc={any:()=>lp(new Set,[]),comment:()=>Jie,tag(...e){e.length>0||af(363);const t=new Set;for(const r of e)t.add(r.toUpperCase());return lp(t,[])},text:()=>Hie};function LL(e,t){return it(e)&&e.nodeName===t.toUpperCase()}const zL=/[A-Za-z0-9_-]/;let Qie=class{constructor(t,r){this.source=t,this.pos=r}peek(t=0){return this.source[this.pos+t]||""}consume(){return this.source[this.pos++]||""}eof(){return this.pos>=this.source.length}skipWhitespace(){for(;!this.eof()&&/\s/.test(this.peek());)this.pos++}readIdent(){const t=this.pos;for(;!this.eof()&&zL.test(this.peek());)this.pos++;return this.source.slice(t,this.pos)}readQuoted(){const t=this.consume();this.assert(t==='"'||t==="'","expected quote");const r=this.pos;for(;!this.eof()&&this.peek()!==t;)this.peek()==="\\"?this.pos+=2:this.pos++;this.assert(!this.eof(),"unterminated string");const n=this.source.slice(r,this.pos);return this.pos++,n.replace(/\\(.)/g,"$1")}assert(t,r){t||af(364,String(this.pos+1),r,this.source)}};function Yie(e){const t=new Set,r=[],n=[];if(e.skipWhitespace(),e.peek()==="*")e.consume();else if(zL.test(e.peek())){const i=e.readIdent();i&&t.add(i.toUpperCase())}for(;!e.eof();){const i=e.peek();if(i==="."){e.consume();const o=e.readIdent();e.assert(o!=="",'expected class name after "."'),n.push(o)}else if(i==="#"){e.consume();const o=e.readIdent();e.assert(o!=="",'expected id after "#"'),r.push(Jx("id",o))}else{if(i!=="[")break;{e.consume(),e.skipWhitespace();const o=e.readIdent();e.assert(o!=="",'expected attribute name after "["'),e.skipWhitespace();let a=!0;if(e.peek()==="="){e.consume(),e.skipWhitespace();const s=e.peek();s==='"'||s==="'"?a=e.readQuoted():(a=e.readIdent(),e.assert(a!=="","expected attribute value")),e.skipWhitespace()}e.assert(e.peek()==="]",'expected "]"'),e.consume(),r.push(Jx(o,a))}}}return n.length>0&&r.push(ML(n)),{predicates:r,tags:t}}function Xie(e){const t=new Qie(e,0),r=[];for(;;){const i=Yie(t);if(r.push(i),t.skipWhitespace(),t.eof())break;t.assert(t.peek()===",",'expected "," (selector lists are the only supported combinator)'),t.consume(),t.skipWhitespace()}if(r.length===1)return lp(r[0].tags,r[0].predicates);const n=new Set;for(const i of r)for(const o of i.tags)n.add(o);return lp(n,[(i,o)=>{for(const a of r){const s=i.nodeName;if(a.tags.size>0&&!a.tags.has(s))continue;let l=!0;for(const c of a.predicates)if(!c(i,o)){l=!1;break}if(l)return!0}return!1}])}function ME(e,t,r){return FL(zie,e,t,r)}const Qx=ME("textFormat",()=>0),Zie=ME("textStyle",()=>({}));function eoe(e){if(!it(e))return!1;if(e.nodeName==="PRE")return!0;const t=e.style.whiteSpace;return typeof t=="string"&&t.startsWith("pre")}function toe(e){if(qi(e))return!0;if(!it(e))return!1;const t=e.style.display;return t?t.startsWith("inline"):!Id(e)&&K0(e)}const roe=ME("whitespaceConfig",()=>({isInline:toe,preservesWhitespace:eoe}));function LE(e){return Td(e)||mt(e)&&!e.isInline()}function UL(e,t){const r=[];let n=[];const i=()=>{n.length!==0&&(r.push(t().splice(0,0,n)),n=[])};for(const o of e)if(LE(o)){if(i(),H(o)){const a=UL(o.getChildren(),t);o.splice(0,o.getChildrenSize(),a)}r.push(o)}else n.push(o);return i(),r}function BL(e,t){if(!it(t))return e;const r=t.style.textAlign;if(!zE(r))return e;for(const n of e)Td(n)&&n.getFormatType()===""&&n.setFormat(r);return e}function noe(e,t,r){e.length===1&&bi(e[0])&&(e=[]);const n=Xt();if(it(r)){const i=r.style.textAlign;zE(i)&&n.setFormat(i)}return[n.splice(0,0,e)]}const jL={$accepts:LE,$packageRun:noe,name:"BlockSchema"},cc=Yc,ioe=new Set(["center","end","justify","left","right","start"]);function zE(e){return ioe.has(e)}const ooe={B:{fontWeight:"bold"},EM:{fontStyle:"italic"},I:{fontStyle:"italic"},S:{textDecoration:"line-through"},STRONG:{fontWeight:"bold"},SUB:{verticalAlign:"sub"},SUP:{verticalAlign:"super"},U:{textDecoration:"underline"}},aoe={CODE:cre,MARK:tE},soe=new Set(["font-weight","font-style","text-decoration","vertical-align"]),loe={$import:(e,t)=>{const r=e.get(Qx),n=ooe[t.nodeName],i=(function(h){return{fontStyle:h.style.fontStyle,fontWeight:h.style.fontWeight,textDecoration:h.style.textDecoration,verticalAlign:h.style.verticalAlign}})(t),o=n?(a=n,{fontStyle:(s=i).fontStyle||a.fontStyle,fontWeight:s.fontWeight||a.fontWeight,textDecoration:s.textDecoration||a.textDecoration,verticalAlign:s.verticalAlign||a.verticalAlign}):i;var a,s;let l=(c=r,d=(function(h){let p=0,m=0;const{fontWeight:g,fontStyle:v,textDecoration:b,verticalAlign:y}=h;if(g==="700"||g==="bold"?p|=BA:g!=="normal"&&g!=="400"||(m|=BA),v==="italic"?p|=jA:v==="normal"&&(m|=jA),b){const S=b.split(" ");S.includes("underline")&&(p|=VA),S.includes("line-through")&&(p|=qA),S.includes("none")&&(m|=VA|qA)}return y==="sub"?(p|=G_,m|=K_):y==="super"?(p|=K_,m|=G_):y==="baseline"&&(m|=G_|K_),{clear:m,set:p}})(o),c&~d.clear|d.set);var c,d;const f=aoe[t.nodeName];return f&&(l|=f),l===r?e.$importChildren(t):e.$importChildren(t,{context:[DL(Qx,l)]})},match:cc.tag("b","strong","em","i","code","mark","s","sub","sup","u","span"),name:"@lexical/html/inline-format"};function u$(e,t,r){let n=e;for(;;){let i=null;for(;(i=t?n.nextSibling:n.previousSibling)===null;){const a=n.parentNode;if(a===null)return null;n=a}if(n=i,!r.isInline(n))return null;let o=n;for(;(o=t?n.firstChild:n.lastChild)!==null;)n=o;if(qi(n))return n;if(n.nodeName==="BR")return null}}function c$(e,t){return t!==0&&fe(e)?e.setFormat(t):e}function d$(e,t){if(fe(e)){const r=(function(n){let i="";for(const o in n)soe.has(o)||(i+=`${o}: ${n[o]}; `);return i.trimEnd()})(t);r!==""&&e.setStyle(r)}return e}const uoe={$import:(e,t)=>{const r=e.get(Qx),n=e.get(Zie),i=e.get(roe);if((function(s,l){let c=s.parentNode;for(;c!==null;){if(l.preservesWhitespace(c))return!0;c=c.parentNode}return!1})(t,i)){const s=np(t.textContent||"");for(const l of s)c$(l,r),d$(l,n);return s}const o=(function(s,l){let c=(s.textContent||"").replace(/\r/g,"").replace(/[ \t\n]+/g," ");if(c.length===0)return"";if(c[0]===" "){let d=s,f=!0;for(;d!==null&&(d=u$(d,!1,l))!==null;){const h=d.textContent||"";if(h.length>0){/[ \t\n]$/.test(h)&&(c=c.slice(1)),f=!1;break}}f&&(c=c.slice(1))}if(c.length>0&&c[c.length-1]===" "){let d=s,f=!0;for(;d!==null&&(d=u$(d,!0,l))!==null;)if((d.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){f=!1;break}f&&(c=c.slice(0,-1))}return c})(t,i);if(o==="")return[];const a=Pr(o);return c$(a,r),d$(a,n),[a]},match:cc.text(),name:"@lexical/html/#text"},coe={$import:()=>[],match:cc.tag("script","style"),name:"@lexical/html/script-style-ignore"},doe={$import:(e,t)=>U4(t)||B4(t)?[]:[da()],match:cc.tag("br"),name:"@lexical/html/br"},foe={$import:(e,t)=>{const r=Xt();if(es(r,t),lc(t,r),r.getFormatType()===""){const n=t.getAttribute("align");n&&zE(n)&&r.setFormat(n)}return qo(r,t),[r.splice(0,0,e.$importChildren(t))]},match:cc.tag("p"),name:"@lexical/html/p"},hoe={$import:(e,t,r)=>Dr().hasNode(vb)?[OE()]:r(),match:cc.tag("hr"),name:"@lexical/html/hr"};cc.any();function poe(e,t){const r=[];let n=0,i=0;for(;n<e.length&&i<t.length;)e[n]<=t[i]?r.push(e[n++]):r.push(t[i++]);for(;n<e.length;)r.push(e[n++]);for(;i<t.length;)r.push(t[i++]);return r}function moe(e){const t=[],r=new Map,n=[],i=[],o=[],a=new Set;e.forEach((l,c)=>{const d=(function(h){const p=h[bb];return p===void 0&&af(360),p})(l.match),f=l.name||(function(h,p){return h.kind==="text"?`#text@${p}`:h.kind==="comment"?`#comment@${p}`:h.tags.size===0?`*@${p}`:`${Array.from(h.tags).join(",").toLowerCase()}@${p}`})(d,c);if(l.name&&a.add(l.name),t.push({$import:l.$import,name:f,predicate:d.predicate}),d.kind==="text")i.push(c);else if(d.kind==="comment")o.push(c);else if(d.tags.size===0)n.push(c);else for(const h of d.tags){let p=r.get(h);p||(p=[],r.set(h,p)),p.push(c)}});const s=new Map;if(n.length===0)for(const[l,c]of r)s.set(l,c);else for(const[l,c]of r)s.set(l,poe(c,n));return{byTag:s,commentIndices:o,rules:t,textIndices:i,wildcardIndices:n}}function goe(e){const t=[];for(const r of e)if(voe(r))for(const n of r.rules)t.push(n);else t.push(r);return t}function voe(e){return typeof e=="object"&&e!==null&&"__type"in e&&e.__type==="CompiledOverlayRules"}function qL(e){const t=goe(e);return{__type:"CompiledOverlayRules",dispatch:moe(t),rules:t}}Yc.any();const Pn={any:Yc.any,comment:Yc.comment,css:Xie,tag:Yc.tag,text:Yc.text},VL=new Set(["STYLE","SCRIPT"]);function boe(e,t){Lie(t);const r=ac(t)?t.body.childNodes:t.childNodes,n=[],i=[];for(const o of r)if(!VL.has(o.nodeName)){const a=KL(o,e,i,!1);if(a!==null)for(const s of a)n.push(s)}return(function(o){for(const a of o)a.getParent()&&a.getNextSibling()instanceof fE&&a.insertAfter(da());for(const a of o){const s=a.getParent();s&&s.splice(a.getIndexWithinParent(),1,a.getChildren())}})(i),n}function _oe(e,t=null,r=Dr()){return Gie([DL(Bie,!0)],r)(()=>{const n=ln(),i=Vie(r),o=ue(t)?hb(t.anchor.getNode()):null,a=e.append.bind(e);for(const s of(H(o)?o:n).getChildren())GL(r,s,a,t,i);return e})}function yoe(e,t=null){return(typeof document>"u"||typeof window>"u"&&global.window===void 0)&&af(338),mne(e),_oe(gr().createElement("div"),t,e).innerHTML}function GL(e,t,r,n=null,i=fb(e)){let o=i.$shouldInclude(t,n,e);const a=i.$shouldExclude(t,n,e);let s=t;n!==null&&fe(t)&&(s=_L(n,t,"clone"));const l=i.$exportDOM(s,e),{element:c,after:d,append:f,$getChildNodes:h}=l;if(!c)return!1;const p=gr().createDocumentFragment(),m=h?h():H(s)?s.getChildren():[],g=o&&fr(n)&&H(t)?null:n,v=p.append.bind(p);for(const b of m){const y=GL(e,b,v,g,i);!o&&y&&i.$extractWithChild(t,b,n,"html",e)&&(o=!0)}if(o&&!a){if((it(c)||qx(c))&&(f?f(p):c.append(p)),r(c),d){const b=d.call(s,c);b&&(qx(c)?c.replaceChildren(b):c.replaceWith(b))}}else r(p);return o}function KL(e,t,r,n,i=new Map,o){const a=[];if(VL.has(e.nodeName))return a;let s=null;const l=(function(m,g){const{nodeName:v}=m,b=g._htmlConversions.get(v.toLowerCase());let y=null;if(b!==void 0)for(const S of b){const w=S(m);w!==null&&(y===null||(y.priority||0)<=(w.priority||0))&&(y=w)}return y!==null?y.conversion:null})(e,t),c=l?l(e):null;let d=null;if(c!==null){d=c.after;const m=c.node;if(s=Array.isArray(m)?m[m.length-1]:m,s!==null){for(const[,g]of i)if(s=g(s,o),!s)break;s&&a.push(...Array.isArray(m)?m:[s])}c.forChild!=null&&i.set(e.nodeName,c.forChild)}const f=e.childNodes;let h=[];const p=(s==null||!vr(s))&&(s!=null&&Td(s)||n);for(let m=0;m<f.length;m++)h.push(...KL(f[m],t,r,p,new Map(i),s));if(d!=null&&(h=d(h)),Id(e)&&(h=xoe(e,h,p?()=>{const m=new fE;return r.push(m),m}:Xt)),s==null)if(h.length>0)for(const m of h)a.push(m);else Id(e)&&(function(m){return m.nextSibling==null||m.previousSibling==null?!1:K0(m.nextSibling)&&K0(m.previousSibling)})(e)&&a.push(da());else H(s)&&s.append(...h);return a}function xoe(e,t,r){const n=e.style.textAlign,i=[];let o=[];for(let a=0;a<t.length;a++){const s=t[a];if(Td(s))n&&!s.getFormat()&&s.setFormat(n),i.push(s);else if(o.push(s),a===t.length-1||a<t.length-1&&Td(t[a+1])){const l=r();l.setFormat(n),l.append(...o),i.push(l),o=[]}}return i}function pl(e,...t){const r=new URL("https://lexical.dev/docs/error"),n=new URLSearchParams;n.append("code",e);for(const i of t)n.append("v",i);throw r.search=n.toString(),Error(`Minified Lexical error #${e}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function Soe(e){let t=1,r=e.getParent();for(;r!=null;){if(Ut(r)){const n=r.getParent();if(dt(n)){t++,r=n.getParent();continue}pl(40)}return t}return t}function Yx(e){const t=e.getParent();dt(t)||pl(40);let r=t,n=t;for(;n!==null;)n=n.getParent(),dt(n)&&(r=n);return r}function HL(e){let t=[];const r=e.getChildren().filter(Ut);for(let n=0;n<r.length;n++){const i=r[n],o=i.getFirstChild();dt(o)?t=t.concat(HL(o)):t.push(i)}return t}function So(e){return Ut(e)&&dt(e.getFirstChild())}function WL(e,t){return Ut(e)&&(t.length===0||t.length===1&&e.is(t[0])&&e.getChildrenSize()===0)}function f$(e){const t=xe();if(t!==null){let r=t.getNodes();if(ue(t)){const[i]=t.getStartEndPoints(),o=i.getNode(),a=o.getParent();if(vr(o)){const s=o.getFirstChild();if(s)r=s.selectStart().getNodes();else{const l=Xt();o.append(l),r=l.select().getNodes()}}else if(WL(o,r)){const s=aa(e);if(vr(a)){o.replace(s);const l=Wa();H(o)&&(l.setFormat(o.getFormatType()),l.setIndent(o.getIndent())),s.append(l)}else if(Ut(o)){const l=o.getParentOrThrow();Yu(s,l.getChildren()),l.replace(s)}return}}const n=new Set;for(let i=0;i<r.length;i++){const o=r[i];if(H(o)&&o.isEmpty()&&!Ut(o)&&!n.has(o.getKey())){h$(o,e);continue}let a=V4(o)?o.getParent():Ut(o)&&o.isEmpty()?o:null;for(;a!=null;){const s=a.getKey();if(dt(a)){if(!n.has(s)){const l=aa(e);Yu(l,a.getChildren()),a.replace(l),n.add(s)}break}{const l=a.getParent();if(vr(l)&&!n.has(s)){n.add(s),h$(a,e);break}a=l}}}}}function Yu(e,t){e.splice(e.getChildrenSize(),0,t)}function h$(e,t){if(dt(e))return e;const r=e.getPreviousSibling(),n=e.getNextSibling(),i=Wa();let o;if(Yu(i,e.getChildren()),dt(r)&&t===r.getListType())r.append(i),dt(n)&&t===n.getListType()&&(Yu(r,n.getChildren()),n.remove()),o=r;else if(dt(n)&&t===n.getListType())n.getFirstChildOrThrow().insertBefore(i),o=n;else{const s=aa(t);s.append(i),e.replace(s),o=s}i.setFormat(e.getFormatType()),i.setIndent(e.getIndent());const a=xe();return ue(a)&&(o.getKey()===a.anchor.key&&a.anchor.set(i.getKey(),a.anchor.offset,"element"),o.getKey()===a.focus.key&&a.focus.set(i.getKey(),a.focus.offset,"element")),e.remove(),o}function UE(e,t){const r=e.getLastChild(),n=t.getFirstChild();r&&n&&So(r)&&So(n)&&(UE(r.getFirstChild(),n.getFirstChild()),n.remove());const i=t.getChildren();i.length>0&&e.append(...i),t.remove()}function woe(){const e=xe();if(ue(e)){const t=new Set,r=e.getNodes(),n=e.anchor.getNode();if(WL(n,r))t.add(Yx(n));else for(let i=0;i<r.length;i++){const o=r[i];if(V4(o)){const a=gie(o,dc);a!=null&&t.add(Yx(a))}}for(const i of t){let o=i;const a=HL(i);for(const s of a){const l=Xt().setTextStyle(e.style).setTextFormat(e.format);Yu(l,s.getChildren()),o.insertAfter(l),o=l,s.__key===e.anchor.key&&Qu(e.anchor,eo(Lo(l,"next"))),s.__key===e.focus.key&&Qu(e.focus,eo(Lo(l,"next"))),s.remove()}i.remove()}}}function JL(e){const t=e.getListType()!=="check";let r=e.getStart();for(const n of e.getChildren())Ut(n)&&(n.getValue()!==r&&n.setValue(r),t&&n.getLatest().__checked!=null&&n.setChecked(void 0),dt(n.getFirstChild())||r++)}function Eoe(e){const t=new Set;if(So(e)||t.has(e.getKey()))return;const r=e.getParent(),n=e.getNextSibling(),i=e.getPreviousSibling();if(So(n)&&So(i)){const o=i.getFirstChild();if(dt(o)){o.append(e);const a=n.getFirstChild();dt(a)&&(Yu(o,a.getChildren()),n.remove(),t.add(n.getKey()))}}else if(So(n)){const o=n.getFirstChild();if(dt(o)){const a=o.getFirstChild();a!==null&&a.insertBefore(e)}}else if(So(i)){const o=i.getFirstChild();dt(o)&&o.append(e)}else if(dt(r)){const o=ii(e),a=ii(r);o.append(a),a.append(e),i?i.insertAfter(o):n?n.insertBefore(o):r.append(o)}}function p$(e){if(So(e))return;const t=e.getParent(),r=t?t.getParent():void 0;if(dt(r?r.getParent():void 0)&&Ut(r)&&dt(t)){const n=t?t.getFirstChild():void 0,i=t?t.getLastChild():void 0;if(e.is(n))r.insertBefore(e),t.isEmpty()&&r.remove();else if(e.is(i))r.insertAfter(e),t.isEmpty()&&r.remove();else{const o=ii(e),a=ii(t);o.append(a),e.getPreviousSiblings().forEach(c=>a.append(c));const s=ii(e),l=ii(t);s.append(l),Yu(l,e.getNextSiblings()),r.insertBefore(o),r.insertAfter(s),r.replace(e)}}}function koe(e=!1){const t=xe();if(!ue(t)||!t.isCollapsed())return!1;const r=t.anchor.getNode();let n=null;if(Ut(r)&&r.getChildrenSize()===0)n=r;else if(fe(r)){const c=r.getParent();Ut(c)&&c.getChildren().every(d=>fe(d)&&d.getTextContent().trim()==="")&&(n=c)}if(n===null)return!1;const i=Yx(n),o=n.getParent();dt(o)||pl(40);const a=o.getParent();let s;if(vr(a))s=Xt(),i.insertAfter(s);else{if(!Ut(a))return!1;s=ii(a),a.insertAfter(s)}s.setTextStyle(t.style).setTextFormat(t.format).select();const l=n.getNextSiblings();if(l.length>0){const c=e?(function(f,h){return f.getStart()+h.getIndexWithinParent()})(o,n):1,d=ii(o).setStart(c);if(Ut(s)){const f=ii(s);f.append(d),s.insertAfter(f)}else s.insertAfter(d);d.append(...l)}return(function(c){let d=c;for(;d.getNextSibling()==null&&d.getPreviousSibling()==null;){const f=d.getParent();if(f==null||!Ut(f)&&!dt(f))break;d=f}d.remove()})(n),!0}let dc=class extends Bi{__value;__checked;$config(){return this.config("listitem",{$transform:t=>{const r=t.getParent();if(dt(r))r.getListType()!=="check"&&t.getChecked()!=null&&t.setChecked(void 0);else if(r){const n=t.createParentElementNode();dt(n)||pl(340);const i=[t];for(const o of["previous","next"]){i.reverse();for(const{origin:a}of Ht(t,o)){if(!Ut(a))break;i.push(a)}}t.insertBefore(n),n.splice(0,0,i),vr(r)||(gL(n,uc(Ht(n,"next")),{$shouldSplit:()=>!1,removeEmptyDestination:!0}),r.isEmpty()&&r.isAttached()&&r.remove())}},extends:Bi,importDOM:{li:()=>({conversion:Coe,priority:0})}})}constructor(t=1,r=void 0,n){super(n),this.__value=t===void 0?1:t,this.__checked=r}afterCloneFrom(t){super.afterCloneFrom(t),this.__value=t.__value,this.__checked=t.__checked}createDOM(t){const r=gr().createElement("li");return this.updateListItemDOM(null,r,t),r}updateListItemDOM(t,r,n){(function(a,s){const l=s.getParent();!dt(l)||l.getListType()!=="check"||dt(s.getFirstChild())?(a.removeAttribute("role"),a.removeAttribute("tabIndex"),a.removeAttribute("aria-checked")):(a.setAttribute("role","checkbox"),a.setAttribute("tabIndex","-1"),a.setAttribute("aria-checked",s.getChecked()?"true":"false"))})(r,this),r.value=this.__value,(function(a,s,l){const c=s.list;if(!c)return;const d=c.listitem,f=c.nested&&c.nested.listitem,h=l.getParent(),p=dt(h)&&h.getListType()==="check",m=l.getChecked(),g=l.getChildren().some(y=>dt(y)),v=[];c.listitemChecked!==void 0&&v.push(c.listitemChecked),c.listitemUnchecked!==void 0&&v.push(c.listitemUnchecked),f!==void 0&&v.push(...Rs(f)),v.length>0&&DE(a,...v);const b=[];if(d!==void 0&&b.push(...Rs(d)),p){const y=m?c.listitemChecked:c.listitemUnchecked;y!==void 0&&b.push(y)}f!==void 0&&g&&b.push(...Rs(f)),b.length>0&&Ha(a,...b)})(r,n.theme,this);const i=t?t.__style:"",o=this.__style;i!==o&&fd(r.style,o,i),(function(a,s,l){const c=s.__textStyle,d=l?l.__textStyle:"";if(l!==null&&d===c)return;const f=O0(c);for(const h in f)a.style.setProperty(`--listitem-marker-${h}`,f[h]);if(d!=="")for(const h in O0(d))h in f||a.style.removeProperty(`--listitem-marker-${h}`)})(r,this,t)}updateDOM(t,r,n){const i=r;return this.updateListItemDOM(t,i,n),!1}updateFromJSON(t){return super.updateFromJSON(t).setValue(t.value).setChecked(t.checked)}exportDOM(t){const r=this.createDOM(t._config),n=this.getFormatType();n&&(r.style.textAlign=n);const i=this.getDirection();return i&&(r.dir=i),So(this)?{after(o){if(it(o)){const a=o.previousElementSibling;if(it(a)&&a.nodeName==="LI"){for(;o.firstChild;)a.append(o.firstChild);o.remove()}}return o},element:r}:{element:r}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),value:this.getValue()}}append(...t){for(let r=0;r<t.length;r++){const n=t[r];if(H(n)&&this.canMergeWith(n)){const i=n.getChildren();this.append(...i),n.remove()}else super.append(n)}return this}replace(t,r){if(Ut(t))return super.replace(t);this.setIndent(0);const n=this.getParentOrThrow();if(!dt(n))return t;if(n.__first===this.getKey())n.insertBefore(t);else if(n.__last===this.getKey())n.insertAfter(t);else{const a=ii(n);let s=this.getNextSibling();for(;s;){const l=s;s=s.getNextSibling(),a.append(l)}n.insertAfter(t),t.insertAfter(a)}const i=this.__key;let o=0;if(r&&(H(t)||pl(139),o=t.getChildrenSize(),t.splice(o,0,this.getChildren())),r&&H(t)){const a=xe();if(ue(a))for(const s of a.getStartEndPoints())s.key===i&&s.type==="element"&&s.set(t.getKey(),o+s.offset,"element")}return this.remove(),n.getChildrenSize()===0&&n.remove(),t}insertAfter(t,r=!0){const n=this.getParentOrThrow();if(dt(n)||pl(39),Ut(t))return super.insertAfter(t,r);const i=this.getNextSiblings();if(n.insertAfter(t,r),i.length!==0){const o=ii(n);i.forEach(a=>o.append(a)),t.insertAfter(o,r)}return t}remove(t){const r=this.getPreviousSibling(),n=this.getNextSibling();super.remove(t),r&&n&&So(r)&&So(n)&&(UE(r.getFirstChild(),n.getFirstChild()),n.remove())}resetOnCopyNodeFrom(t){super.resetOnCopyNodeFrom(t),t.getChecked()&&this.setChecked(!1)}insertNewAfter(t,r=!0){const n=ii(this);return this.insertAfter(n,r),n}collapseAtStart(t){if(So(this))return!1;const r=this.getParentOrThrow();if(Ut(r.getParentOrThrow()))return p$(this),!0;const n=Xt().append(...this.getChildren()),i=this.getNextSiblings();if(i.length>0){const o=ii(r);o.append(...i),r.insertAfter(o)}return r.insertAfter(n),this.remove(),r.getChildrenSize()===0&&r.remove(),n.selectStart(),!0}getValue(){return this.getLatest().__value}setValue(t){const r=this.getWritable();return r.__value=t,r}getChecked(){const t=this.getLatest();let r;const n=this.getParent();return dt(n)&&(r=n.getListType()),r==="check"?!!t.__checked:void 0}setChecked(t){const r=this.getWritable();return r.__checked=t,r}toggleChecked(){const t=this.getWritable();return t.setChecked(!t.__checked)}getIndent(){const t=this.getParent();if(t===null||!this.isAttached())return this.getLatest().__indent;let r=t.getParentOrThrow(),n=0;for(;Ut(r);)r=r.getParentOrThrow().getParentOrThrow(),n++;return n}setIndent(t){typeof t!="number"&&pl(117),(t=Math.floor(t))>=0||pl(199);let r=this.getIndent();for(;r!==t;)r<t?(Eoe(this),r++):(p$(this),r--);return this}canInsertAfter(t){return Ut(t)}canReplaceWith(t){return Ut(t)}canMergeWith(t){return Ut(t)||rf(t)}extractWithChild(t,r){if(!ue(r))return!1;const n=r.anchor.getNode(),i=r.focus.getNode();return this.isParentOf(n)&&this.isParentOf(i)&&this.getTextContent().length===r.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return aa("bullet")}canMergeWhenEmpty(){return!0}};function Coe(e){if(e.classList.contains("task-list-item")){for(const n of e.children)if(n.tagName==="INPUT")return m$(n)}if(e.classList.contains("joplin-checkbox")){for(const n of e.children)if(n.classList.contains("checkbox-wrapper")&&n.children.length>0&&n.children[0].tagName==="INPUT")return m$(n.children[0])}const t=e.getAttribute("aria-checked"),r=Wa(t==="true"||t!=="false"&&void 0);return es(r,e),{after:QL.bind(null,r),node:qo(r,e)}}function m$(e){if(e.getAttribute("type")!=="checkbox")return{node:null};const t=Wa(e.hasAttribute("checked"));return{after:QL.bind(null,t),node:t}}function QL(e,t){const r=t[0];return t.length===1&&rf(r)&&!e.getFormatType()&&r.getFormatType()?(e.setFormat(r.getFormatType()),r.getChildren()):t}function Wa(e){return _a(new dc(void 0,e))}function Ut(e){return e instanceof dc}let Jp=class extends Bi{__tag;__start;__listType;$config(){return this.config("list",{$transform:t=>{(function(r){const n=r.getNextSibling();dt(n)&&r.getListType()===n.getListType()&&UE(r,n)})(t),JL(t)},extends:Bi,importDOM:{ol:()=>({conversion:v$,priority:0}),ul:()=>({conversion:v$,priority:0})}})}constructor(t="number",r=1,n){super(n);const i=Roe[t]||t;this.__listType=i,this.__tag=i==="number"?"ol":"ul",this.__start=r}afterCloneFrom(t){super.afterCloneFrom(t),this.__listType=t.__listType,this.__tag=t.__tag,this.__start=t.__start}getTag(){return this.getLatest().__tag}setListType(t){const r=this.getWritable();return r.__listType=t,r.__tag=t==="number"?"ol":"ul",r}getListType(){return this.getLatest().__listType}getStart(){return this.getLatest().__start}setStart(t){const r=this.getWritable();return r.__start=t,r}createDOM(t,r){const n=this.__tag,i=gr().createElement(n);return this.__start!==1&&i.setAttribute("start",String(this.__start)),i.__lexicalListType=this.__listType,g$(i,t.theme,this),i}updateDOM(t,r,n){return t.__tag!==this.__tag||t.__listType!==this.__listType||(g$(r,n.theme,this),t.__start!==this.__start&&r.setAttribute("start",String(this.__start)),!1)}updateFromJSON(t){return super.updateFromJSON(t).setListType(t.listType).setStart(t.start)}exportDOM(t){const r=this.createDOM(t._config,t);return it(r)&&(this.__start!==1&&r.setAttribute("start",String(this.__start)),this.__listType==="check"&&r.setAttribute("__lexicalListType","check")),{element:r}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag()}}canBeEmpty(){return!1}canIndent(){return!1}splice(t,r,n){let i=n;for(let o=0;o<n.length;o++){const a=n[o];Ut(a)||(i===n&&(i=[...n]),i[o]=this.createListItemNode().append(!H(a)||dt(a)||a.isInline()?a:Pr(a.getTextContent())))}return super.splice(t,r,i)}extractWithChild(t){return Ut(t)}createListItemNode(){return Wa()}};function g$(e,t,r){const n=[],i=[],o=t.list;if(o!==void 0){const a=o[`${r.__tag}Depth`]||[],s=Soe(r)-1,l=s%a.length,c=a[l],d=o[r.__tag];let f;const h=o.nested,p=o.checklist;if(h!==void 0&&h.list&&(f=h.list),d!==void 0&&n.push(d),p!==void 0&&r.__listType==="check"&&n.push(p),c!==void 0){n.push(...Rs(c));for(let m=0;m<a.length;m++)m!==l&&i.push(r.__tag+m)}if(f!==void 0){const m=Rs(f);s>1?n.push(...m):i.push(...m)}}i.length>0&&DE(e,...i),n.length>0&&Ha(e,...n)}function v$(e){let t;if((function(r){return it(r)&&r.nodeName.toLowerCase()==="ol"})(e)){const r=e.start;t=aa("number",r)}else t=(function(r){if(r.getAttribute("__lexicallisttype")==="check"||r.classList.contains("contains-task-list")||r.getAttribute("data-is-checklist")==="1")return!0;for(const n of r.childNodes)if(it(n)&&n.hasAttribute("aria-checked"))return!0;return!1})(e)?aa("check"):aa("bullet");return qo(t,e),{after:r=>(function(n,i){const o=i.createListItemNode.bind(i),a=[];for(let s=0;s<n.length;s++){const l=n[s];if(Ut(l)){a.push(l);const c=l.getChildren();c.length>1&&c.forEach(d=>{dt(d)&&a.push(o().append(d))})}else a.push(o().append(l))}return a})(r,t),node:t}}const Roe={ol:"number",ul:"bullet"};function aa(e="number",t=1){return _a(new Jp(e,t))}function dt(e){return e instanceof Jp}function Aoe(e){const t=[];for(const r of e)if(Ut(r)){t.push(r);const n=r.getChildren();if(n.length>1)for(const i of n)dt(i)&&t.push(Wa().append(i))}else t.push(Wa().append(r));return t}const Toe={$import:(e,t)=>{let r;var n;return LL(t,"ol")?r=aa("number",t.start):r=(n=t).matches('[__lexicallisttype="check"], .contains-task-list, [data-is-checklist="1"]')||n.querySelector(":scope > [aria-checked]")!==null?aa("check"):aa("bullet"),qo(r,t),[r.splice(0,0,BL(Aoe(e.$importChildren(t)),t))]},match:Pn.tag("ol","ul"),name:"@lexical/list/list"};function YL(e,t){if(t.length!==1)return t;const r=t[0];return rf(r)&&!e.getFormatType()&&r.getFormatType()?(e.setFormat(r.getFormatType()),r.getChildren()):t}function XL(e){const t=a=>LE(a)&&!dt(a);if(!e.some(t))return e;const r=[];let n=[];const i=()=>{n.length>0&&(r.push(n),n=[])};for(const a of e)t(a)?(i(),r.push(H(a)?a.getChildren():[a])):n.push(a);i();const o=[];for(const a of r)o.length>0&&o.push(da()),o.push(...a);return o}const $oe={$import:(e,t)=>{const r=t.getAttribute("aria-checked"),n=Wa(r==="true"||r!=="false"&&void 0);return es(n,t),qo(n,t),[n.splice(0,0,XL(YL(n,e.$importChildren(t))))]},match:Pn.tag("li"),name:"@lexical/list/li"};function b$(e,t,r){const n=LL(r,"input")?r:r.querySelector('input[type="checkbox"]');if(!n||n.getAttribute("type")!=="checkbox")return[];const i=Wa(n.hasAttribute("checked"));return es(i,t),qo(i,t),[i.splice(0,0,XL(YL(i,e.$importChildren(t))))]}Pn.tag("li").classAll("task-list-item"),Pn.tag("li").classAll("joplin-checkbox");const Noe=Ke("UPDATE_LIST_START_COMMAND"),ZL=Ke("INSERT_UNORDERED_LIST_COMMAND"),e8=Ke("INSERT_ORDERED_LIST_COMMAND"),Doe=Ke("REMOVE_LIST_COMMAND");function Foe(e,t){return zl(e.registerCommand(e8,()=>(f$("number"),!0),qc),e.registerCommand(Noe,r=>{const{listNodeKey:n,newStart:i}=r,o=mr(n);return!!dt(o)&&(o.getListType()==="number"&&(o.setStart(i),JL(o)),!0)},qc),e.registerCommand(ZL,()=>(f$("bullet"),!0),qc),e.registerCommand(Doe,()=>(woe(),!0),qc),e.registerCommand(Yh,()=>koe(!1),qc),e.registerCommand(oE,r=>{if((function(){const a=xe();if(!ue(a)||!a.isCollapsed()||a.anchor.offset!==0)return!1;const s=a.anchor.getNode(),l=cr(s,Ut);if(!Ut(l))return!1;const c=l.getFirstDescendant();if(c===null||!l.is(s)&&!c.is(s))return!1;const d=l.getParent();if(!dt(d)||!l.is(d.getFirstChild()))return!1;const f=d.getPreviousSibling();if(!mt(f)||f.isIsolated()||!f.isKeyboardSelectable()&&f.isInline())return!1;const h=Xt().append(...l.getChildren());return d.insertBefore(h),l.remove(),d.isEmpty()&&d.remove(),h.selectStart(),!0})())return r.preventDefault(),!0;const n=xe();if(!ue(n)||!n.isCollapsed())return!1;const{anchor:i}=n;if(i.offset!==0)return!1;let o=i.getNode();for(;!Ut(o);){if(o.getPreviousSibling()!==null)return!1;const a=o.getParent();if(a===null)return!1;o=a}return!(!Ut(o)||!o.collapseAtStart(n))&&(r.preventDefault(),!0)},Ene),e.registerNodeTransform(dc,r=>{const n=r.getFirstChild();if(n){if(fe(n)){const i=n.getStyle(),o=n.getFormat();r.getTextStyle()!==i&&r.setTextStyle(i),r.getTextFormat()!==o&&r.setTextFormat(o)}}else{const i=xe();ue(i)&&(i.style!==r.getTextStyle()||i.format!==r.getTextFormat())&&i.isCollapsed()&&r.is(i.anchor.getNode())&&r.setTextStyle(i.style).setTextFormat(i.format)}}),e.registerNodeTransform(qs,r=>{const n=r.getParent();if(Ut(n)&&r.is(n.getFirstChild())){const i=r.getStyle(),o=r.getFormat();i===n.getTextStyle()&&o===n.getTextFormat()||n.setTextStyle(i).setTextFormat(o)}}))}function Ioe(e,t,r,n,i){if(e===null||r.size===0&&n.size===0&&!i)return 0;const o=t._selection,a=e._selection;if(i)return 1;if(!(ue(o)&&ue(a)&&a.isCollapsed()&&o.isCollapsed()))return 0;const s=(function(b,y,S){const w=b._nodeMap,C=[];for(const A of y){const $=w.get(A);$!==void 0&&C.push($)}for(const[A,$]of S){if(!$)continue;const R=w.get(A);R===void 0||Mr(R)||C.push(R)}return C})(t,r,n);if(s.length===0)return 0;if(s.length>1){const b=t._nodeMap,y=b.get(o.anchor.key),S=b.get(a.anchor.key);return y&&S&&!e._nodeMap.has(y.__key)&&fe(y)&&y.__text.length===1&&o.anchor.offset===1?2:0}const l=s[0],c=e._nodeMap.get(l.__key);if(!fe(c)||!fe(l)||c.__mode!==l.__mode)return 0;const d=c.__text,f=l.__text;if(d===f)return 0;const h=o.anchor,p=a.anchor;if(h.key!==p.key||h.type!=="text")return 0;const m=h.offset,g=p.offset,v=f.length-d.length;return v===1&&g===m-1?2:v===-1&&g===m+1?3:v===-1&&g===m?4:0}function Poe(e,t,r){let n=r(),i=0,o=n,a=0,s=null;return(l,c,d,f,h,p)=>{const m=r();if(p.has(_4)&&(o=n,a=i,s=l),p.has(P0))return i=0,n=m,2;p.has(rp)&&s&&(n=o,i=a,l=s);const g=p.has(g4)||p.has(v4)?0:Ioe(l,c,f,h,e.isComposing()),v=(()=>{const b=d===null||d.editor===e,y=p.has(m4);if(!y&&b&&p.has(gh))return 0;if(g===1)return 2;if(l===null)return 1;const S=c._selection;return f.size>0||h.size>0?y===!1&&g!==0&&g===i&&m<n+t&&b||f.size===1&&(function(C,A,$){const R=A._nodeMap.get(C),N=$._nodeMap.get(C),I=A._selection,M=$._selection;return!(ue(I)&&ue(M)&&I.anchor.type==="element"&&I.focus.type==="element"&&M.anchor.type==="text"&&M.focus.type==="text"||!fe(R)||!fe(N)||R.__parent!==N.__parent)&&JSON.stringify(A.read(()=>R.exportJSON()))===JSON.stringify($.read(()=>N.exportJSON()))})(Array.from(f)[0],l,c)?0:1:S!==null?0:2})();return n=m,i=g,v}}function _$(e,t){e.undoStack=[],e.redoStack=[],e.current=null}function Ooe(e,t,r,n=Date.now,i,o=null){const a=Poe(e,r,n);return zl(e.registerCommand(ob,()=>((function(s,l,c){const d=l.redoStack,f=l.undoStack;if(f.length!==0){const h=l.current,p=f.pop();h!==null&&(d.push(h),s.dispatchCommand(Bm,!0)),f.length===0&&s.dispatchCommand(jm,!1),l.current=p||null,p&&p.editor.setEditorState(p.editorState,{tag:P0})}})(e,t),!0),ht),e.registerCommand(ab,()=>((function(s,l,c){const d=l.redoStack,f=l.undoStack;if(d.length!==0){const h=l.current;h!==null&&(f.push(h),s.dispatchCommand(jm,!0));const p=d.pop();d.length===0&&s.dispatchCommand(Bm,!1),l.current=p||null,p&&p.editor.setEditorState(p.editorState,{tag:P0})}})(e,t),!0),ht),e.registerCommand(Ure,()=>(_$(t),!1),ht),e.registerCommand(Bre,()=>(_$(t),e.dispatchCommand(Bm,!1),e.dispatchCommand(jm,!1),!0),ht),e.registerUpdateListener(({editorState:s,prevEditorState:l,dirtyLeaves:c,dirtyElements:d,tags:f})=>{const h=t.current,p=t.redoStack,m=t.undoStack,g=h===null?null:h.editorState;if(h!==null&&s===g)return;const v=a(l,s,h,c,d,f);if(v===1){if(p.length!==0&&(t.redoStack=[],e.dispatchCommand(Bm,!1)),h!==null){m.push({...h});const b=typeof o=="number"||o===null?o:o.peek();b!==null&&m.length>b&&m.splice(0,m.length-b),e.dispatchCommand(jm,!0)}}else if(v===2)return;t.current={editor:e,editorState:s}}))}function Moe(){return{current:null,redoStack:[],undoStack:[]}}function Loe(e,t){let r=e;for(let n=Ht(e,t);n&&(n8(n.origin)||ju(n.origin));n=n.getAdjacentCaret())r=n.origin;return r}function zoe(e){return Loe(e,"previous")}function t8(e,t){for(const r of e.childNodes)if(it(r)&&r.tagName===t||t8(r,t))return!0;return!1}const nh="data-language",zf="data-highlight-language",Qm="data-theme";class sf extends Bi{__language;__theme;__isSyntaxHighlightSupported;static getType(){return"code"}static clone(t){return new sf(t.__language,t.__key)}constructor(t,r){super(r),this.__language=t||void 0,this.__isSyntaxHighlightSupported=!1,this.__theme=void 0}afterCloneFrom(t){super.afterCloneFrom(t),this.__language=t.__language,this.__theme=t.__theme,this.__isSyntaxHighlightSupported=t.__isSyntaxHighlightSupported}createDOM(t){const r=gr().createElement("code");Ha(r,t.theme.code),r.setAttribute("spellcheck","false");const n=this.getLanguage();n&&(r.setAttribute(nh,n),this.getIsSyntaxHighlightSupported()&&r.setAttribute(zf,n));const i=this.getTheme();i&&r.setAttribute(Qm,i);const o=this.getStyle();return o&&fd(r.style,o),r}updateDOM(t,r,n){const i=this.__language,o=t.__language;i?i!==o&&r.setAttribute(nh,i):o&&r.removeAttribute(nh);const a=this.__isSyntaxHighlightSupported;t.__isSyntaxHighlightSupported&&o?a&&i?i!==o&&r.setAttribute(zf,i):r.removeAttribute(zf):a&&i&&r.setAttribute(zf,i);const s=this.__theme,l=t.__theme;s?s!==l&&r.setAttribute(Qm,s):l&&r.removeAttribute(Qm);const c=this.__style,d=t.__style;return c!==d&&fd(r.style,c,d),!1}exportDOM(t){const r=gr().createElement("pre");Ha(r,t._config.theme.code),r.setAttribute("spellcheck","false");const n=this.getLanguage();n&&(r.setAttribute(nh,n),this.getIsSyntaxHighlightSupported()&&r.setAttribute(zf,n));const i=this.getTheme();i&&r.setAttribute(Qm,i);const o=this.getStyle();return o&&fd(r.style,o),{element:r}}static importDOM(){return{code:t=>t.textContent!=null&&(/\r?\n/.test(t.textContent)||t8(t,"BR"))?{conversion:y$,priority:1}:null,div:()=>({conversion:Uoe,priority:1}),pre:()=>({conversion:y$,priority:0}),table:t=>uy(t)?{conversion:Boe,priority:3}:null,td:t=>{const r=t,n=r.closest("table");return r.classList.contains("js-file-line")||n&&uy(n)?{conversion:x$,priority:3}:null},tr:t=>{const r=t.closest("table");return r&&uy(r)?{conversion:x$,priority:3}:null}}}static importJSON(t){return hi().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setLanguage(t.language).setTheme(t.theme)}exportJSON(){return{...super.exportJSON(),language:this.getLanguage(),theme:this.getTheme()}}insertNewAfter(t,r=!0){if(!Wp(Dr(),"@lexical/code")){const a=joe(t);if(a)return a}const{anchor:n,focus:i}=t,o=(n.isBefore(i)?n:i).getNode();if(fe(o)){let a=zoe(o);const s=[];for(;;)if(ju(a))s.push(Yd()),a=a.getNextSibling();else{if(!n8(a))break;{let m=0;const g=a.getTextContent(),v=a.getTextContentSize();for(;m<v&&g[m]===" ";)m++;if(m!==0&&s.push(r8(" ".repeat(m))),m!==v)break;a=a.getNextSibling()}}const l=o.splitText(n.offset)[0],c=n.offset===0?0:1,d=l.getIndexWithinParent()+c,f=o.getParentOrThrow(),h=[da(),...s];f.splice(d,0,h);const p=s[s.length-1];p?p.select():n.offset===0?l.selectPrevious():l.getNextSibling().selectNext(0,0)}if(up(o)){const{offset:a}=t.anchor;o.splice(a,0,[da()]),o.select(a+1,a+1)}return null}canIndent(){return!1}collapseAtStart(){const t=Xt();return this.getChildren().forEach(r=>t.append(r)),this.replace(t),!0}setLanguage(t){const r=this.getWritable();return r.__language=t||void 0,r}getLanguage(){return this.getLatest().__language}setIsSyntaxHighlightSupported(t){const r=this.getWritable();return r.__isSyntaxHighlightSupported=t,r}getIsSyntaxHighlightSupported(){return this.getLatest().__isSyntaxHighlightSupported}setTheme(t){const r=this.getWritable();return r.__theme=t||void 0,r}getTheme(){return this.getLatest().__theme}}function hi(e,t){return sL(sf).setLanguage(e).setTheme(t)}function up(e){return e instanceof sf}function y$(e){return{node:hi(e.getAttribute(nh))}}function Uoe(e){const t=e,r=S$(t);return r||(function(n){let i=n.parentElement;for(;i!==null;){if(S$(i))return!0;i=i.parentElement}return!1})(t)?{node:r?hi():null}:{node:null}}function Boe(){return{node:hi()}}function x$(){return{node:null}}function S$(e){return e.style.fontFamily.match("monospace")!==null}function uy(e){return e.classList.contains("js-file-line-container")}function joe(e){const{anchor:t}=e;if(e.isCollapsed()&&t.type==="element"){const r=t.getNode();if(up(r)){const n=r.getChildrenSize();if(n>=2&&t.offset===n){const i=r.getLastChild();if(bi(i)&&bi(i.getPreviousSibling())){const o=Xt();return r.splice(n-2,2,[]).insertAfter(o,!1),o.select(),o}}}}return null}class _b extends qs{__highlightType;constructor(t="",r,n){super(t,n),this.__highlightType=r}static getType(){return"code-highlight"}static clone(t){return new _b(t.__text,t.__highlightType||void 0,t.__key)}afterCloneFrom(t){super.afterCloneFrom(t),this.__highlightType=t.__highlightType}getHighlightType(){return this.getLatest().__highlightType}setHighlightType(t){const r=this.getWritable();return r.__highlightType=t||void 0,r}canHaveFormat(){return!1}createDOM(t){const r=super.createDOM(t),n=cy(t.theme,this.__highlightType);return Ha(r,n),r}updateDOM(t,r,n){const i=super.updateDOM(t,r,n),o=cy(n.theme,t.__highlightType),a=cy(n.theme,this.__highlightType);return o!==a&&(o&&DE(r,o),a&&Ha(r,a)),i}static importJSON(t){return r8().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setHighlightType(t.highlightType)}exportJSON(){return{...super.exportJSON(),highlightType:this.getHighlightType()}}setFormat(t){return this}isParentRequired(){return!0}createParentElementNode(){return hi()}}function cy(e,t){return t&&e&&e.codeHighlight&&e.codeHighlight[t]}function r8(e="",t){return _a(new _b(e,t))}function n8(e){return e instanceof _b}const i8="data-language";function o8(e){return e.style.fontFamily.match("monospace")!==null}function Xx(e){let t=e.parentElement;for(;t!==null;){if(o8(t))return!0;t=t.parentElement}return!1}const qoe=qL([{$import:(e,t)=>e.$importChildren(t),match:Pn.tag("tr","td"),name:"@lexical/code/github-code-table/unwrap"}]),Voe={$import:(e,t)=>[hi(t.getAttribute(i8)).splice(0,0,e.$importChildren(t))],match:Pn.tag("pre"),name:"@lexical/code/pre"},Goe={$import:(e,t,r)=>{const n=t.textContent||"";return/\r?\n/.test(n)||t.querySelector("br")!==null?[hi(t.getAttribute(i8)).splice(0,0,e.$importChildren(t))]:r()},match:Pn.tag("code"),name:"@lexical/code/code-multiline"};function Ym(e){if(!it(e))return!1;const t=e.style.fontFamily,r=e.style.whiteSpace;return typeof t=="string"&&/monospace/i.test(t)&&typeof r=="string"&&r.startsWith("pre")}function Koe(e){let t=!1;const r=[];let n="",i=!1;const o=()=>{i&&(r.push(n),n="",i=!1)};for(const a of Array.from(e.childNodes))if(it(a))a.tagName==="DIV"?(o(),r.push(a.textContent||""),t=!0):a.tagName==="BR"?(o(),r.push(""),t=!0):(n+=a.textContent||"",i=!0);else if(qi(a)){const s=a.textContent||"";s.length>0&&(n+=s,i=!0)}return o(),t?r:null}Pn.tag("div"),Pn.tag("div","br");const Hoe={$import:(e,t,r)=>o8(t)?[hi().splice(0,0,e.$importChildren(t))]:Xx(t)?e.$importChildren(t):r(),match:Pn.tag("div"),name:"@lexical/code/div"};Pn.tag("table").classAll("js-file-line-container"),Pn.tag("td").classAll("js-file-line");const w$=new Set(["http:","https:","mailto:","sms:","tel:"]);let Qp=class a8 extends Bi{__url;__target;__rel;__title;static getType(){return"link"}static clone(t){return new a8(t.__url,{rel:t.__rel,target:t.__target,title:t.__title},t.__key)}constructor(t="",r={},n){super(n);const{target:i=null,rel:o=null,title:a=null}=r;this.__url=t,this.__target=i,this.__rel=o,this.__title=a}afterCloneFrom(t){super.afterCloneFrom(t),this.__url=t.__url,this.__rel=t.__rel,this.__target=t.__target,this.__title=t.__title}createDOM(t){const r=gr().createElement("a");return this.updateLinkDOM(null,r,t),Ha(r,t.theme.link),r}updateLinkDOM(t,r,n){if(iL(r)){t&&t.__url===this.__url||(r.href=this.sanitizeUrl(this.__url));for(const i of["target","rel","title"]){const o=`__${i}`,a=this[o];t&&t[o]===a||(a?r[i]=a:r.removeAttribute(i))}}}updateDOM(t,r,n){return this.updateLinkDOM(t,r,n),!1}static importDOM(){return{a:t=>({conversion:Woe,priority:1})}}static importJSON(t){return Pd().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setURL(t.url).setRel(t.rel||null).setTarget(t.target||null).setTitle(t.title||null)}sanitizeUrl(t){const r=t;t=C$(t);try{const n=new URL(C$(t));if(!w$.has(n.protocol))return"about:blank"}catch{const i=r.replace(/[\u0000-\u001F\u007F\s]/g,"").match(/^([a-z][a-z0-9+.-]*):/i);if(i!=null&&!w$.has(`${i[1].toLowerCase()}:`))return"about:blank"}return t}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),url:this.getURL()}}getURL(){return this.getLatest().__url}setURL(t){const r=this.getWritable();return r.__url=t,r}getTarget(){return this.getLatest().__target}setTarget(t){const r=this.getWritable();return r.__target=t,r}getRel(){return this.getLatest().__rel}setRel(t){const r=this.getWritable();return r.__rel=t,r}getTitle(){return this.getLatest().__title}setTitle(t){const r=this.getWritable();return r.__title=t,r}insertNewAfter(t,r=!0){const n=ii(this);return this.insertAfter(n,r),n}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(t,r,n){if(!ue(r))return!1;const i=r.anchor.getNode(),o=r.focus.getNode();return(this.is(i)||this.isParentOf(i))&&(this.is(o)||this.isParentOf(o))&&r.getTextContent().length>0}isEmailURI(){return this.__url.startsWith("mailto:")}isWebSiteURI(){return this.__url.startsWith("https://")||this.__url.startsWith("http://")}shouldMergeAdjacentLink(t){return this.getType()===t.getType()&&this.__url===t.__url&&this.__target===t.__target&&this.__rel===t.__rel&&this.__title===t.__title}};function Woe(e){let t=null;if(iL(e)){const r=e.textContent;(r!==null&&r!==""||e.children.length>0)&&(t=Pd(e.getAttribute("href")||"",{rel:e.getAttribute("rel"),target:e.getAttribute("target"),title:e.getAttribute("title")}))}return{node:t}}function Pd(e="",t){return _a(new Qp(e,t))}function Aa(e){return e instanceof Qp}let s8=class l8 extends Qp{__isUnlinked;constructor(t="",r={},n){super(t,r,n),this.__isUnlinked=r.isUnlinked!==void 0&&r.isUnlinked!==null&&r.isUnlinked}afterCloneFrom(t){super.afterCloneFrom(t),this.__isUnlinked=t.__isUnlinked}static getType(){return"autolink"}static clone(t){return new l8(t.__url,{isUnlinked:t.__isUnlinked,rel:t.__rel,target:t.__target,title:t.__title},t.__key)}shouldMergeAdjacentLink(t){return!1}getIsUnlinked(){return this.__isUnlinked}setIsUnlinked(t){const r=this.getWritable();return r.__isUnlinked=t,r}createDOM(t){return this.__isUnlinked?gr().createElement("span"):super.createDOM(t)}updateDOM(t,r,n){return super.updateDOM(t,r,n)||t.__isUnlinked!==this.__isUnlinked}static importJSON(t){return E$().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setIsUnlinked(t.isUnlinked||!1)}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),isUnlinked:this.__isUnlinked}}insertNewAfter(t,r=!0){const n=E$(this.__url,{isUnlinked:this.__isUnlinked,rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(n,r),n}};function E$(e="",t){return _a(new s8(e,t))}function Gc(e){return e instanceof s8}function k$(e,t){if(e.type==="element"){const r=e.getNode();return H(r)||(function(n,...i){const o=new URL("https://lexical.dev/docs/error"),a=new URLSearchParams;a.append("code",n);for(const s of i)a.append("v",s);throw o.search=a.toString(),Error(`Minified Lexical error #${n}; visit ${o.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(252),r.getChildren()[e.offset+t]||null}return null}function Joe(e,t={}){let r;if(e&&typeof e=="object"){const{url:d,...f}=e;r=d,t={...f,...t}}else r=e;const{target:n,title:i}=t,o=t.rel===void 0?"noreferrer":t.rel,a=xe();if(a===null||!ue(a)&&!fr(a))return;if(fr(a)){const d=a.getNodes();return d.length===0?void 0:void d.forEach(f=>{if(r===null){const h=cr(f,p=>!Gc(p)&&Aa(p));h&&(h.insertBefore(f),h.getChildren().length===0&&h.remove())}else{const h=cr(f,p=>!Gc(p)&&Aa(p));if(h)h.setURL(r),n!==void 0&&h.setTarget(n),o!==void 0&&h.setRel(o);else{const p=Pd(r,{rel:o,target:n});f.insertBefore(p),p.append(f)}}})}if(a.isCollapsed()&&r===null)for(const d of a.getNodes()){const f=cr(d,h=>!Gc(h)&&Aa(h));return void(f!==null&&(f.getParentOrThrow().splice(f.getIndexWithinParent(),0,f.getChildren()),f.remove()))}const s=a.extract();if(r===null){const d=new Set;return void s.forEach(f=>{const h=cr(f,p=>!Gc(p)&&Aa(p));if(h!==null){const p=h.getKey();if(d.has(p))return;(function(m,g){const v=new Set(g.filter(R=>m.isParentOf(R)).map(R=>R.getKey())),b=m.getChildren(),y=R=>v.has(R.getKey())||H(R)&&g.some(N=>m.isParentOf(N)&&R.isParentOf(N)),S=b.filter(y);if(S.length===b.length)return b.forEach(R=>m.insertBefore(R)),void m.remove();const w=b.findIndex(y),C=b.findLastIndex(y),A=w===0,$=C===b.length-1;if(A)S.forEach(R=>m.insertBefore(R));else if($)for(let R=S.length-1;R>=0;R--)m.insertAfter(S[R]);else{for(let N=S.length-1;N>=0;N--)m.insertAfter(S[N]);const R=b.slice(C+1);if(R.length>0){const N=ii(m);S[S.length-1].insertAfter(N),R.forEach(I=>N.append(I))}}})(h,s),d.add(p)}})}const l=new Set,c=d=>{l.has(d.getKey())||(l.add(d.getKey()),d.setURL(r),n!==void 0&&d.setTarget(n),o!==void 0&&d.setRel(o),i!==void 0&&d.setTitle(i))};if(s.length===1){const d=s[0],f=cr(d,Aa);if(f!==null)return c(f)}(function(d){const f=xe();if(!ue(f))return d();const h=_l(f),p=h.isBackward(),m=k$(h.anchor,p?-1:0),g=k$(h.focus,p?0:-1);if(d(),m||g){const v=xe();if(ue(v)){const b=v.clone();if(m){const y=m.getParent();y&&b.anchor.set(y.getKey(),m.getIndexWithinParent()+(p?1:0),"element")}if(g){const y=g.getParent();y&&b.focus.set(y.getKey(),g.getIndexWithinParent()+(p?0:1),"element")}Fn(_l(b))}}})(()=>{let d=null;for(const f of s){if(!f.isAttached())continue;const h=cr(f,Aa);if(h){c(h);continue}if(H(f)){if(!f.isInline())continue;if(Aa(f)){if(!(Gc(f)||d!==null&&d.getParentOrThrow().isParentOf(f))){c(f),d=f;continue}for(const m of f.getChildren())f.insertBefore(m);f.remove();continue}}const p=f.getPreviousSibling();Aa(p)&&p.is(d)?p.append(f):(d=Pd(r,{rel:o,target:n,title:i}),f.insertAfter(d),d.append(f))}})}const Qoe=/^\+?[0-9\s()-]{5,}$/;function C$(e){return e.match(/^[a-z][a-z0-9+.-]*:/i)||e.match(/^[/#.]/)?e:e.includes("@")?`mailto:${e}`:Qoe.test(e)?`tel:${e}`:`https://${e}`}Pn.tag("a");function Y0(e,t,r=null){const n=rL(r),i=r?eL(r):[],o=r!==null&&i.length>0;if(o&&typeof n.caretPositionFromPoint=="function"){const a=n.caretPositionFromPoint(e,t,{shadowRoots:i});if(a!==null&&(function(s,l){for(let c=s;c!==null;){if(c===l)return!0;c=sc(c)}return!1})(a.offsetNode,r))return{node:a.offsetNode,offset:a.offset}}if(o){const a=r.getRootNode();if(Os(a)){const s=a.elementFromPoint(e,t);if(s!==null&&r.contains(s)){const l=(function(c,d,f,h){const p=h.createRange(),m=$=>d<$.top?$.top-d:d>$.bottom?d-$.bottom:0,g=$=>c<$.left?$.left-c:c>$.right?c-$.right:0,v=h.createTreeWalker(f,NodeFilter.SHOW_TEXT);let b=null,y=1/0,S=1/0;for(let $=v.nextNode();$;$=v.nextNode()){p.selectNodeContents($);for(const R of p.getClientRects()){const N=m(R),I=g(R);(N<y||N===y&&I<S)&&(y=N,S=I,b=$)}}if(b===null)return null;let w=0,C=1/0,A=1/0;for(let $=0;$<=b.length;$++){p.setStart(b,$),p.collapse(!0);const R=p.getBoundingClientRect(),N=m(R),I=Math.abs(c-R.left);(N<C||N===C&&I<A)&&(C=N,A=I,w=$)}return{node:b,offset:w}})(e,t,s,n);if(l!==null)return l}}}if(typeof n.caretRangeFromPoint=="function"){const a=n.caretRangeFromPoint(e,t);return a===null?null:{node:a.startContainer,offset:a.startOffset}}if(typeof n.caretPositionFromPoint=="function"){const a=n.caretPositionFromPoint(e,t);return a===null?null:{node:a.offsetNode,offset:a.offset}}return null}function Xc(e,...t){const r=new URL("https://lexical.dev/docs/error"),n=new URLSearchParams;n.append("code",e);for(const i of t)n.append("v",i);throw r.search=n.toString(),Error(`Minified Lexical error #${e}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const Zx={"application/x-lexical-editor":0,"text/html":10,"text/plain":20,"text/uri-list":30};function Yoe(e){return window.trustedTypes&&window.trustedTypes.createPolicy?window.trustedTypes.createPolicy("lexical",{createHTML:t=>t}).createHTML(e):e}const R$=(e,t)=>{if(!ue(t))return t.insertRawText(e),!0;const r=n=>{const i=xe();ue(i)&&n(i)};return F4(e,{linebreak:()=>r(n=>n.insertParagraph()),tab:()=>r(n=>n.insertNodes([Yd()])),text:n=>r(i=>i.insertText(n))}),!0},eS={"application/x-lexical-editor":[(e,t,r)=>{try{const n=Dr(),i=JSON.parse(e);if(i&&i.namespace===n._config.namespace&&Array.isArray(i.nodes))return A$(n,oae(i.nodes),t),!0}catch(n){console.error(n)}return r()}],"text/html":[(e,t,r)=>{try{const n=Dr(),i=new DOMParser().parseFromString(Yoe(e),"text/html");return A$(n,boe(n,i),t),!0}catch(n){return console.error(n),r()}}],"text/plain":[R$],"text/uri-list":[R$]};function Xoe(e,t,r,n){if(!e)return!1;const i=o=>!!e[o]&&e[o](t,r,i.bind(null,o-1),n);return i(e.length-1)}function u8(e,t,r){const n=t.getData("text/plain");for(const i of(function(o){return Object.keys(o.$importMimeType).filter(a=>o.$importMimeType[a]!==void 0).sort((a,s)=>{const l=o.priority[a],c=o.priority[s];return l===void 0&&c===void 0?a<s?-1:a>s?1:0:l===void 0?1:c===void 0?-1:l-c})})(e)){const o=t.getData(i);if(o&&(i!=="text/html"||o!==n)&&Xoe(e.$importMimeType[i],o,r,t))return!0}return!1}const Zoe={$importMimeType:eS,$insertDataTransfer:(e,t)=>u8({$importMimeType:eS,priority:Zx},e,t),priority:Zx},eae={build:(e,t)=>({$importMimeType:t.$importMimeType,$insertDataTransfer:(r,n)=>u8(t,r,n),priority:t.priority}),config:{$importMimeType:eS,priority:Zx},mergeConfig(e,t){const r=NE(e,t);if(t.$importMimeType){const n={...e.$importMimeType};for(const[i,o]of Object.entries(t.$importMimeType))if(o){const a=n[i];n[i]=a?[...a,...o]:o}r.$importMimeType=n}return t.priority&&(r.priority={...e.priority,...t.priority}),r},name:"@lexical/clipboard/Import"};function c8(e,t=xe()){return t==null&&Xc(166),ue(t)&&t.isCollapsed()||t.getNodes().length===0?"":yoe(e,t)}function d8(e,t=xe()){return t==null&&Xc(166),ue(t)&&t.isCollapsed()||t.getNodes().length===0?null:JSON.stringify(iae(e,t))}function tS(e,t,r){(function(){const n=Nie(eae.name);return n?n.output:Zoe})().$insertDataTransfer(e,t)}const f8="application/x-lexical-drag";function tae(e,t){const r={editorKey:t.getKey()};e.setData(f8,JSON.stringify(r))}function rae(e,t,r){const n=e.dataTransfer;if(n===null)return!1;const i=(function(c){const d=c.getData(f8);if(!d)return null;let f;try{f=JSON.parse(d)}catch{return null}return(h=f)!==null&&typeof h=="object"&&"editorKey"in h&&typeof h.editorKey=="string"?f:null;var h})(n);if(i===null)return!1;const o=(function(c,d){const f=Y0(c.clientX,c.clientY,d.getRootElement());if(f===null)return null;const h=Vu(f.node);if(h===null)return null;if(fe(h))return Ll(h,"next",f.offset);if(H(h))return Hx(h,f.offset,"next");const p=h.getParent();return p===null?null:Hx(p,h.getIndexWithinParent()+1,"next")})(e,t);if(o===null)return!1;const a=mL(o);if(a===null)return!1;const s=i.editorKey===t.getKey(),l=xe();if(s){if(!ue(l)||l.isCollapsed())return!1;if((function(c,d){const{anchor:f,focus:h}=$E(Kx(d),"next");return ap(f,c)<0&&ap(c,h)<0})(o,l))return e.preventDefault(),!0;l.removeText()}if(!a.origin.isAttached())return e.preventDefault(),!0;if(r(n,sp(gb(a)),t),!s){const c=t.getRootElement(),d=c?c.ownerDocument:null,f=d?(function(h,p){for(const m of tL(p)){const g=Hp(m);if(cb(g)&&g.getKey()===h&&it(m))return m}return null})(i.editorKey,d):null;f!==null&&f.dispatchEvent(new InputEvent("beforeinput",{bubbles:!0,cancelable:!0,inputType:"deleteByDrag"}))}return e.preventDefault(),!0}function nae(e,t){return rae(e,t,tS)}function A$(e,t,r){e.dispatchCommand(Ire,{nodes:t,selection:r})||(r.insertNodes(t),(function(n){if(ue(n)&&n.isCollapsed()){const i=n.anchor;let o=null;const a=Pi(i,"previous");if(a)if($o(a))o=a.origin;else{const s=oa(a,Lo(ln(),"next").getFlipped());for(const l of s){if(fe(l.origin)){o=l.origin;break}if(H(l.origin)&&!l.origin.isInline())break}}if(o&&fe(o)){const s=o.getFormat(),l=o.getStyle();n.format===s&&n.style===l||(n.format=s,n.style=l,n.dirty=!0)}}})(r))}function rS(e,t,r,n=[]){let i=t===null||r.isSelected(t);const o=H(r)&&r.excludeFromCopy("html");let a=r;t!==null&&fe(a)&&(a=_L(t,a,"clone"));const s=H(a)?a.getChildren():[],l=(function(d){const f=d.exportJSON(),h=d.constructor;if(f.type!==h.getType()&&Xc(58,h.name),H(d)){const p=f.children;Array.isArray(p)||Xc(59,h.name)}return f})(a);fe(a)&&a.getTextContentSize()===0&&(i=!1);const c=i&&fr(t)&&H(r)?null:t;for(let d=0;d<s.length;d++){const f=s[d],h=rS(e,c,f,l.children);!i&&H(r)&&h&&r.extractWithChild(f,t,"clone")&&(i=!0)}if(i&&!o){const d=To(a);if(d.length>0){const f={};for(const h of d){const p=Hu(a,h);p===null&&Xc(366,a.constructor.name,h);const m=[];rS(e,null,p,m),m.length===1&&m[0].type===p.getType()||Xc(385,h,a.constructor.name,String(m.length),String(m.length>0?m[0].type:"none")),f[h]=m[0]}l.$slots=f}}if(i&&!o)n.push(l);else if(Array.isArray(l.children))for(let d=0;d<l.children.length;d++){const f=l.children[d];n.push(f)}return i}function iae(e,t){const r=[],n=ln(),i=ue(t)?t.anchor.getNode():fr(t)?t.getNodes()[0]??null:null,o=i!==null?hb(i):null,a=(H(o)?o:n).getChildren();for(let s=0;s<a.length;s++)rS(e,t,a[s],r);return{namespace:e._config.namespace,nodes:r}}function oae(e){const t=[];for(const r of e)t.push(vne(r));return t}let Fc=null;async function T$(e,t,r){if(Fc!==null)return!1;if(t!==null)return new Promise((c,d)=>{e.update(()=>{c($$(e,t,r))})});const n=e.getRootElement(),i=e._window||window,o=i.document,a=xi(i);if(n===null||a===null)return!1;const s=o.createElement("span");s.style.position="fixed",s.style.top="-1000px",s.append(o.createTextNode("#")),n.append(s);const l=o.createRange();return l.setStart(s,0),l.setEnd(s,1),a.removeAllRanges(),a.addRange(l),new Promise((c,d)=>{const f=e.registerCommand(sb,h=>(xl(h,ClipboardEvent)&&(f(),Fc!==null&&(i.clearTimeout(Fc),Fc=null),c($$(e,h,r))),!0),wne);Fc=i.setTimeout(()=>{f(),Fc=null,c(!1)},50),o.execCommand("copy"),s.remove()})}function $$(e,t,r){if(r===void 0){const i=xi(e._window),o=xe();if(!o||o.isCollapsed()||!i)return!1;const a=Oo(i,e.getRootElement()),s=a.anchorNode,l=a.focusNode;if(s!==null&&l!==null&&!Kp(e,s,l))return!1;r=h8(o)}t.preventDefault();const n=t.clipboardData;return n!==null&&(p8(n,r),!0)}const aae=[["text/html",c8],["application/x-lexical-editor",d8]];function h8(e=xe()){return(function(t,r){const n={"text/plain":""};for(const[i,o]of Object.entries(t))if(o){const a=lae(o,r);a!==null&&(n[i]=a)}return n})(sae(),e)}function p8(e,t){for(const[r]of aae)t[r]===void 0&&e.setData(r,"");for(const r in t){const n=t[r];n!==void 0&&e.setData(r,n)}}function sae(e=Dr()){const t=Wp(e,uae.name);return t?t.output:m8}const m8={"application/x-lexical-editor":[(e,t)=>e?d8(Dr(),e):t()],"text/html":[(e,t)=>e?c8(Dr(),e):t()],"text/plain":[(e,t)=>e?e.getTextContent():t()]};function lae(e,t){const r=n=>e[n]?e[n](t,r.bind(null,n-1)):null;return r(e.length-1)}const uae={build:(e,t,r)=>t.$exportMimeType,config:{$exportMimeType:m8},mergeConfig(e,t){const r=NE(e,t);if(t.$exportMimeType){const n={...e.$exportMimeType};for(const[i,o]of Object.entries(t.$exportMimeType))if(o){const a=n[i];n[i]=a?[...a,...o]:o}r.$exportMimeType=n}return r},name:"@lexical/clipboard/GetClipboardData"},cae={$import:(e,t)=>{const r=As(t.nodeName.toLowerCase());return lc(t,r),es(r,t),qo(r,t),[r.splice(0,0,e.$importChildren(t))]},match:Pn.tag("h1","h2","h3","h4","h5","h6"),name:"@lexical/rich-text/heading"},dae={$import:(e,t)=>{const r=uf();return es(r,t),lc(t,r),qo(r,t),[r.splice(0,0,e.$importChildren(t))]},match:Pn.tag("blockquote"),name:"@lexical/rich-text/blockquote"};Pn.tag("blockquote");Pn.tag("p"),Pn.tag("span");const N$=Ke("DRAG_DROP_PASTE_FILE"),dy=qp("shadowRoot",{parse:Boolean});class lf extends Bi{static getType(){return"quote"}static clone(t){return new lf(t.__key)}$config(){return this.config("quote",{extends:Bi,stateConfigs:[{flat:!0,stateConfig:dy}]})}isShadowRoot(){return Vp(this,dy)}setIsShadowRoot(t){return ld(this,dy,t)}createDOM(t){const r=gr().createElement("blockquote");return Ha(r,t.theme.quote),r}updateDOM(t,r){return!1}static importDOM(){return{blockquote:t=>({conversion:fae,priority:0})}}exportDOM(t){const{element:r}=super.exportDOM(t);if(it(r)){this.isEmpty()&&r.append(gr().createElement("br"));const n=this.getFormatType();n&&(r.style.textAlign=n);const i=this.getDirection();i&&(r.dir=i)}return{element:r}}static importJSON(t){return uf().updateFromJSON(t)}exportJSON(){return super.exportJSON()}insertNewAfter(t,r){const n=Xt(),i=this.getDirection();return n.setDirection(i),this.insertAfter(n,r),n}collapseAtStart(){if(this.isShadowRoot()){for(const r of this.getChildren())this.insertBefore(r);return this.remove(),!0}const t=Xt();return this.getChildren().forEach(r=>t.append(r)),this.replace(t),!0}canMergeWhenEmpty(){return!0}}function uf(e){const t=_a(new lf);return e&&e.shadowRoot?t.setIsShadowRoot(!0):t}function nS(e){return e instanceof lf}let yb=class g8 extends Bi{__tag;static getType(){return"heading"}static clone(t){return new g8(t.__tag,t.__key)}afterCloneFrom(t){super.afterCloneFrom(t),this.__tag=t.__tag}constructor(t="h1",r){super(r),this.__tag=t}getTag(){return this.getLatest().__tag}setTag(t){const r=this.getWritable();return r.__tag=t,r}createDOM(t){const r=this.__tag,n=gr().createElement(r),i=t.theme.heading;if(i!==void 0){const o=i[r];Ha(n,o)}return n}updateDOM(t,r,n){return t.__tag!==this.__tag}static importDOM(){return{h1:t=>({conversion:Ic,priority:0}),h2:t=>({conversion:Ic,priority:0}),h3:t=>({conversion:Ic,priority:0}),h4:t=>({conversion:Ic,priority:0}),h5:t=>({conversion:Ic,priority:0}),h6:t=>({conversion:Ic,priority:0}),p:t=>{const r=t.firstChild;return r!==null&&D$(r)?{conversion:()=>({node:null}),priority:3}:null},span:t=>D$(t)?{conversion:r=>({node:As("h1")}),priority:3}:null}}exportDOM(t){const{element:r}=super.exportDOM(t);if(it(r)){this.isEmpty()&&r.append(gr().createElement("br"));const n=this.getFormatType();n&&(r.style.textAlign=n);const i=this.getDirection();i&&(r.dir=i)}return{element:r}}static importJSON(t){return As(t.tag).updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setTag(t.tag)}exportJSON(){return{...super.exportJSON(),tag:this.getTag()}}insertNewAfter(t,r=!0){const n=t?t.anchor.offset:0,i=this.getLastDescendant(),o=!i||t&&t.anchor.key===i.getKey()&&n===i.getTextContentSize()||!t?Xt():As(this.getTag()),a=this.getDirection();if(o.setDirection(a),this.insertAfter(o,r),n===0&&!this.isEmpty()&&t){const s=Xt();s.select(),this.replace(s,!0)}return o}collapseAtStart(){if(this.isEmpty()){const t=Xt();this.getChildren().forEach(r=>t.append(r)),this.replace(t)}return!0}extractWithChild(){return!0}};function D$(e){return e.nodeName.toLowerCase()==="span"&&e.style.fontSize==="26pt"}function Ic(e){const t=e.nodeName.toLowerCase();let r=null;return t!=="h1"&&t!=="h2"&&t!=="h3"&&t!=="h4"&&t!=="h5"&&t!=="h6"||(r=As(t),lc(e,r),es(r,e),qo(r,e)),{node:r}}function fae(e){const t=uf();return es(t,e),lc(e,t),qo(t,e),{node:t}}function As(e="h1"){return _a(new yb(e))}function hae(e){return e instanceof yb}function F$(e){const t=Vu(e);return mt(t)}function Pc(e,t,r,n){let i=!1,o=null;if(e.isCollapsed()&&e.anchor.type==="text"){const s=e.anchor.getNode();if(fe(s)){o=s;const l=e.anchor.offset,c=l===s.getTextContentSize()&&s.getNextSibling()===null,d=l===0&&s.getPreviousSibling()===null;i=r==="end"&&c||r==="start"&&d||r==="both"&&(c||d)}}let a=!1;for(const[s,l]of Object.entries(n)){if(l==null||!l[t])continue;const c=s;if(l.onlyAtBoundary){if(!(i&&o&&fe(o)&&o.hasFormat(c)))continue;a=!0}e.hasFormat(c)&&e.toggleFormat(c)}a&&e.setStyle("")}const pae={capitalize:{enter:!0,space:!0,tab:!0},lowercase:{enter:!0,space:!0,tab:!0},uppercase:{enter:!0,space:!0,tab:!0}};function Xm(e,t){return(function(r,n){if(!r.isCollapsed())return!1;const i=Pi(r.focus,n),o=cr(i.origin,md);if(!o)return!1;const a=r.focus.getNode();if(!o.is(a)&&!Fd(a,o))return!1;const s=oa(i,Ht(o,n));if(s.getTextSlices().some(f=>f&&f.getTextContentSize()>0))return!1;const l=oa(s.anchor.getSiblingCaret(),s.focus);let c=l.anchor.origin;for(const f of l){if(!Ml(f)||!f.origin.is(c.getParent()))return!1;c=f.origin}let d=o;for(const f of mb(Ht(o,n))){if(!f.origin.is(d.getParent())){if(Zg(f.origin)){const h=Ht(d,n);return sp(oa(h,h)),!0}break}if(!md(f.origin))break;d=f.origin}return!1})(e,t)||(function(r,n){if(!r.isCollapsed()||r.anchor.type!=="element")return!1;const i=Pi(r.anchor,n).getNodeAtCaret();return!(!md(i)||i.isInline()||(sp(gb(eo(Lo(i,n)))),0))})(e,t)}function I$(e){return mt(e)&&!e.isInline()&&!e.isIsolated()&&e.isKeyboardSelectable()}function Zm(e){const t=M0();t.add(e),Fn(t)}function P$(e,t){if(!e.isCollapsed())return!1;const r=e.focus,n=r.getNode(),i=t?"previous":"next",o=Pi(r,i);if(r.type==="element"&&H(n)&&(Mr(n)||md(n))){const b=o.getNodeAtCaret();return!(b===null||!I$(b))&&(Zm(b.__key),!0)}const a=cr(H(n)?n:n.getParentOrThrow(),b=>H(b)&&!b.isInline()&&vr(b.getParent()));if(a===null)return!1;const s=Ht(a,i).getNodeAtCaret();if(s===null||!I$(s))return!1;if(a.getTextContentSize()===0)return Zm(s.__key),!0;const l=Dr().getRootElement();if(l===null)return!1;const c=xi(l.ownerDocument.defaultView);if(c===null||c.rangeCount===0)return!1;const d=c.anchorNode,f=c.anchorOffset,h=c.focusNode,p=c.focusOffset;c.modify("move",t?"backward":"forward","line");const m=c.anchorNode,g=c.anchorOffset;if(m===null)return O$(c,d,f,h,p),!1;const v=Vu(m);return O$(c,d,f,h,p),v===null?!1:(m===d&&g===f||!v.is(a)&&!Fd(v,a))&&(Zm(s.__key),!0)}function O$(e,t,r,n,i){t!==null&&n!==null&&e.setBaseAndExtent(t,r,n,i)}function M$(e,t){if(!e.isCollapsed())return!1;const r=e.focus.getNode(),n=cr(H(r)?r:r.getParentOrThrow(),v=>H(v)&&!v.isInline());if(n===null)return!1;const i=Dr(),o=i.getRootElement();if(o===null)return!1;const a=o.ownerDocument.defaultView;if(a===null)return!1;let s=!1;for(const v of n.getChildren())if(H(v)&&v.isInline()){const b=i.getElementByKey(v.getKey());if(b!==null){const y=a.getComputedStyle(b).display;if(y==="inline-grid"||y==="inline-flex"){s=!0;break}}}if(!s)return!1;const l=Ht(n,t?"previous":"next").getNodeAtCaret();if(l===null||!H(l)){if(t){const v=n.getFirstDescendant();fe(v)?v.select(0,0):n.select(0,0)}else{const v=n.getLastDescendant();if(fe(v)){const b=v.getTextContentSize();v.select(b,b)}else{const b=n.getChildrenSize();n.select(b,b)}}return!0}const c=i.getElementByKey(l.getKey());if(c===null)return!1;const d=xi(a);if(d===null||d.rangeCount===0)return!1;const f=d.getRangeAt(0).cloneRange();f.collapse(!0);const h=f.getBoundingClientRect(),p=c.getBoundingClientRect(),m=p.top+p.height/2;if(h.height>0){const v=Y0(h.left,m,o);if(v!==null&&c.contains(v.node)){const b=o.ownerDocument.createRange();return b.setStart(v.node,v.offset),b.collapse(!0),e.applyDOMRange(b),e.dirty=!0,!0}}const g=t?l.getLastDescendant():l.getFirstDescendant();if(fe(g)){const v=t?g.getTextContentSize():0;g.select(v,v)}else{const v=l.getChildrenSize();l.select(t?v:0,t?v:0)}return!0}function eg(e,t){const r=Ht(e,t),n=r.getAdjacentCaret();n!==null&&H(n.origin)&&!n.origin.isInline()&&n.origin.isShadowRoot()?sp(gb(r)):t==="next"?e.selectNext(0,0):e.selectPrevious()}function L$(e,t,r){r.preventDefault(),r.stopPropagation();const n=e.getNodes();if(n.length===0)return!0;const i=n.map(l=>Ht(l,"next")).sort(ap),o=(t?i[0]:i[i.length-1]).origin,a=cr(o,l=>l!==o&&H(l)&&!l.isInline())??ln(),s=t?0:a.getChildrenSize();return a.select(s,s),!0}function mae(e,t=_ie(pae)){return zl(e.registerCommand(j6,()=>{const r=xe();return fr(r)?(r.clear(),!0):(ue(r)&&Pc(r,"click","both",t.peek()),!1)},ht),e.registerCommand(ku,r=>{const n=xe();return ue(n)?(n.deleteCharacter(r),!0):!!fr(n)&&(n.deleteNodes(),!0)},ht),e.registerCommand(Xh,r=>{const n=xe();return!!ue(n)&&(n.deleteWord(r),!0)},ht),e.registerCommand(Zh,r=>{const n=xe();return!!ue(n)&&(n.deleteLine(r),!0)},ht),e.registerCommand(cd,r=>{const n=xe();if(typeof r=="string")n!==null&&n.insertText(r);else{if(n===null)return!1;const i=r.dataTransfer;if(i!=null)tS(i,n);else if(ue(n)){const o=r.data;return o&&n.insertText(o),!0}}return!0},ht),e.registerCommand(Wg,()=>{const r=xe();return!!ue(r)&&(r.removeText(),!0)},ht),e.registerCommand(ta,r=>{const n=xe();return!(!ue(n)&&!fr(n))&&(E4(n,r),!0)},ht),e.registerCommand(Pre,r=>{const n=xe();return!(!ue(n)&&!fr(n))&&(cne(n,r),!0)},ht),e.registerCommand(Lre,r=>{const n=xe();if(!ue(n)&&!fr(n))return!1;const i=n.getNodes();for(const o of i){const a=cr(o,s=>H(s)&&!s.isInline());a!==null&&a.setFormat(r)}return!0},ht),e.registerCommand(ud,r=>{const n=xe();return!!ue(n)&&(n.insertLineBreak(r),!0)},ht),e.registerCommand(Yh,()=>{const r=xe();return!!ue(r)&&(r.insertParagraph(),!0)},ht),e.registerCommand(Ore,()=>{const r=Yd(),n=xe();return ue(n)&&(r.setFormat(n.format),r.setStyle(n.style)),hne([r]),!0},ht),e.registerCommand(Mre,()=>t$(r=>{const n=r.getIndent();r.setIndent(n+1)}),ht),e.registerCommand(cT,()=>t$(r=>{const n=r.getIndent();n>0&&r.setIndent(Math.max(0,n-1))}),ht),e.registerCommand(X6,r=>{const n=xe();if(fr(n)){const i=n.getNodes();if(i.length>0)return r.preventDefault(),eg(i[0],"previous"),!0}else if(ue(n)&&(!r.shiftKey&&Xm(n,"previous")||!r.shiftKey&&P$(n,!0)||!r.shiftKey&&M$(n,!0)))return r.preventDefault(),!0;return!1},ht),e.registerCommand(Z6,r=>{const n=xe();if(fr(n)){const i=n.getNodes();if(i.length>0)return r.preventDefault(),eg(i[0],"next"),!0}else if(ue(n)&&((function(i){const o=i.focus;return o.key==="root"&&o.offset===ln().getChildrenSize()})(n)||!r.shiftKey&&Xm(n,"next")||!r.shiftKey&&P$(n,!1)||!r.shiftKey&&M$(n,!1)))return r.preventDefault(),!0;return!1},ht),e.registerCommand(Q6,r=>{const n=xe();if(fr(n)){const i=n.getNodes();if(i.length>0)return r.preventDefault(),eg(i[0],Km(i[0])?"next":"previous"),!0}if(!ue(n))return!1;if(!r.shiftKey&&Xm(n,Km(n.anchor.getNode())?"next":"previous"))return r.preventDefault(),!0;if(r.shiftKey||Pc(n,"arrow","start",t.peek()),ZT(n,!0)){const i=r.shiftKey;return r.preventDefault(),e$(n,i,!0),!0}return!1},ht),e.registerCommand(W6,r=>{const n=xe();if(fr(n)){const i=n.getNodes();if(i.length>0)return r.preventDefault(),eg(i[0],Km(i[0])?"previous":"next"),!0}if(!ue(n))return!1;if(!r.shiftKey&&Xm(n,Km(n.anchor.getNode())?"previous":"next"))return r.preventDefault(),!0;if(r.shiftKey||Pc(n,"arrow","end",t.peek()),ZT(n,!1)){const i=r.shiftKey;return r.preventDefault(),e$(n,i,!1),!0}return!1},ht),e.registerCommand(oE,r=>{const n=xe();if(!fr(n)&&F$(r.target))return!1;if(ue(n)){if((function(i){if(!i.isCollapsed())return!1;const{anchor:o}=i;if(o.offset!==0)return!1;const a=o.getNode();if(Mr(a))return!1;const s=vie(a);return s.getIndent()>0&&(s.is(a)||a.is(s.getFirstDescendant()))})(n))return r.preventDefault(),e.dispatchCommand(cT,void 0);if(Ol&&Ad)return!1}else if(!fr(n))return!1;return r.preventDefault(),e.dispatchCommand(ku,!0)},ht),e.registerCommand(r4,r=>{const n=xe();return!(!fr(n)&&F$(r.target))&&!(!ue(n)&&!fr(n))&&(r.preventDefault(),e.dispatchCommand(ku,!1))},ht),e.registerCommand(ep,r=>{let n=xe();if(fr(n)){const i=n.getNodes();i.length===1&&mt(i[0])&&!i[0].isInline()&&(n=i[0].selectNext())}if(!ue(n))return!1;if(Pc(n,"enter","both",t.peek()),r!==null){if((Ol||Bp||jp)&&Ad)return!1;if(r.preventDefault(),r.shiftKey)return e.dispatchCommand(ud,!1)}return e.dispatchCommand(Yh,void 0)},ht),e.registerCommand(t4,()=>{const r=xe();return!!ue(r)&&(e.blur(),!0)},ht),e.registerCommand(i4,r=>{const[,n]=Hm(r);if(n.length>0){const i=r.clientX,o=r.clientY,a=Y0(i,o,e.getRootElement());if(a!==null){const{offset:s,node:l}=a,c=Vu(l);if(c!==null){const d=lE();if(fe(c))d.anchor.set(c.getKey(),s,"text"),d.focus.set(c.getKey(),s,"text");else{const h=c.getParentOrThrow().getKey(),p=c.getIndexWithinParent()+1;d.anchor.set(h,p,"element"),d.focus.set(h,p,"element")}const f=_l(d);Fn(f)}e.dispatchCommand(N$,n)}return r.preventDefault(),!0}return nae(r,e)},ht),e.registerCommand(o4,r=>{const[n]=Hm(r),i=xe();return!(n&&!ue(i))&&(ue(i)&&!i.isCollapsed()&&r.dataTransfer!==null&&(p8(r.dataTransfer,h8(i)),tae(r.dataTransfer,e)),!0)},ht),e.registerCommand(a4,r=>{const[n]=Hm(r),i=xe();if(n&&!ue(i))return!1;const o=r.clientX,a=r.clientY,s=Y0(o,a,e.getRootElement());if(s!==null){const l=Vu(s.node);mt(l)&&r.preventDefault()}return!0},ht),e.registerCommand(s4,()=>{const r=xe();return Nne(ue(r)&&hb(r.anchor.getNode())!==null?r:null),!0},ht),e.registerCommand(sb,r=>(T$(e,xl(r,ClipboardEvent)?r:null),!0),ht),e.registerCommand(aE,r=>((async function(n,i){await T$(i,xl(n,ClipboardEvent)?n:null),i.update(()=>{const o=xe();ue(o)?o.removeText():fr(o)&&o.getNodes().forEach(a=>a.remove())},{tag:v4})})(r,e),!0),ht),e.registerCommand(iE,r=>{const[,n,i]=Hm(r);return n.length>0&&!i?(e.dispatchCommand(N$,n),!0):of(r.target)&&gE(r.target)?!1:xe()!==null&&((function(o,a){o.preventDefault(),a.update(()=>{const s=xe(),l=xl(o,InputEvent)||xl(o,KeyboardEvent)?null:o.clipboardData;l!=null&&s!==null&&tS(l,s)},{tag:g4})})(r,e),!0)},ht),e.registerCommand(e4,()=>{const r=xe();return ue(r)&&Pc(r,"space","both",t.peek()),!1},ht),e.registerCommand(n4,()=>{const r=xe();return ue(r)&&Pc(r,"tab","both",t.peek()),!1},ht),e.registerCommand(J6,r=>{const n=xe();if(fr(n))return L$(n,!1,r);if(!ue(n))return!1;const{anchor:i}=n;if(i.type!=="element"||i.offset!==0)return!1;const o=i.getNode();if(!H(o))return!1;const a=o.getFirstChild();if(!mt(a)||!a.isInline())return!1;const s=o.getKey(),l=o.selectEnd();return r.shiftKey&&l.anchor.set(s,0,"element"),r.preventDefault(),r.stopPropagation(),!0},ht),e.registerCommand(Y6,r=>{const n=xe();if(fr(n))return L$(n,!0,r);if(!ue(n))return!1;const{anchor:i,focus:o}=n,a=cr(o.getNode(),c=>H(c)&&!c.isInline());if(a===null)return!1;const s=a.getFirstChild();if(!mt(s)||!s.isInline()||cr(i.getNode(),c=>H(c)&&!c.isInline())!==a)return!1;const l=a.getKey();return(o.type!=="element"||o.key!==l||o.offset!==0)&&(n.focus.set(l,0,"element"),r.shiftKey||n.anchor.set(l,0,"element"),r.preventDefault(),r.stopPropagation(),!0)},ht))}function iS(e,t){const r={};for(const n of e){const i=t(n);i&&(r[i]?r[i].push(n):r[i]=[n])}return r}function BE(e){const t=iS(e,r=>r.type);return{element:t.element||[],multilineElement:t["multiline-element"]||[],textFormat:t["text-format"]||[],textMatch:t["text-match"]||[]}}const z$=/[!-/:-@[-`{-~\s]/,U$=/\s/,oS=/[!"#$%&'()*+,\-./:;<=>?@[\]^_`{|}~]/,gae=/^\s{0,3}$/;function aS(e){if(!rf(e))return!1;const t=e.getFirstChild();return t==null||e.getChildrenSize()===1&&fe(t)&&gae.test(t.getTextContent())}function sS(e){return e.replace(/\\([!-/:-@[-`{-~])/g,"$1").replace(/&#(\d+);/g,(t,r)=>String.fromCodePoint(Number(r)))}const v8=/^(\s*)(\d{1,})\.\s/,b8=/^(\s*)[-*+]\s/,vae=/^(\s*)(?:[-*+]\s)?\s?(\[(\s|x)?\])\s/i,lS=/^(#{1,6})\s/,_8=/^>\s/,y8=/^([ \t]*`{3,})([\w-]+)?[ \t]?/,uS=/^[ \t]*`{3,}$/,bae=/^[ \t]*```[^`]+(?:(?:`{1,2}|`{4,})[^`]+)*```(?:[^`]|$)/,_ae=/^(?:\|)(.+)(?:\|)\s?$/;function yae(e){if(e[0]!=="|")return!1;const{length:t}=e;let r=1,n=0;for(;r<t;){let i=r;for(e[i]===" "&&i++,e[i]===":"&&i++;e[i]==="-";)i++;if(e[i]===":"&&i++,e[i]===" "&&i++,e[i]!=="|")break;n++,r=i+1}return n>0&&(r===t||r===t-1&&/\s/.test(e[r]))}const B$=/^<[a-z_][\w-]*(?:\s[^<>]*)?\/?>/i,j$=/^<\/[a-z_][\w-]*\s*>/i,q$=e=>new RegExp(`(?:${e.source})$`,e.flags),ih=qp("mdListMarker",{parse:e=>typeof e=="string"&&/^[-*+]$/.test(e)?e:"-",resetOnCopyNode:!0}),V$=qp("mdCodeFence",{parse:e=>typeof e=="string"&&/^`{3,}$/.test(e)?e:"```",resetOnCopyNode:!0}),x8=qp("mdHardLineBreak",{parse:e=>typeof e=="string"&&/^(\\| {2,})$/.test(e)?e:"",resetOnCopyNode:!0});function cS(e){if(e.endsWith("\\"))return[e.slice(0,-1),"\\"];const t=e.match(/^(.*?\S)( {2,})$/);return t?[t[1],t[2]]:null}function xae(e){const t=e.getChildren(),r=t.length-1,n=t[r];if(!fe(n))return null;const i=n.getTextContent(),o=cS(i);if(o!==null){const[a,s]=o;return n.setTextContent(a),s}return/^ {2,}$/.test(i)&&(function(a,s){for(let l=s-1;l>=0;l--){if(bi(a[l]))return!1;if(/\S/.test(a[l].getTextContent()))return!0}return!1})(t,r)?(n.setTextContent(""),i):null}function S8(e){const t=da(),r=xae(e);return r!==null&&ld(t,x8,r),t}const w8=e=>(t,r,n,i)=>{const o=e(n);o.append(...r),t.replace(o),i||o.select(0,0)},E8=e=>(t,r,n,i)=>{const o=t.getPreviousSibling(),a=t.getNextSibling(),s=Wa(e==="check"?n[3]==="x":void 0),l=n[0].trim()[0],c=e!=="bullet"&&e!=="check"||l!==ih.parse(l)?void 0:l;if(dt(a)&&a.getListType()===e){c&&ld(a,ih,c);const f=a.getFirstChild();f!==null?f.insertBefore(s):a.append(s),e==="number"&&a.setStart(Number(n[2])),t.remove()}else if(dt(o)&&o.getListType()===e)c&&ld(o,ih,c),o.append(s),t.remove();else{const f=aa(e,e==="number"?Number(n[2]):void 0);c&&ld(f,ih,c),f.append(s),t.replace(f)}s.append(...r),i||s.select(0,0);const d=(function(f){const h=f.match(/\t/g),p=f.match(/ /g);let m=0;return h&&(m+=h.length),p&&(m+=Math.floor(p.length/4)),m})(n[1]);d&&s.setIndent(d)},jE=(e,t,r,n)=>{const i=[],o=e.getChildren();let a=0;for(const s of o)if(Ut(s)){if(s.getChildrenSize()===1){const p=s.getFirstChild();if(dt(p)){const m=jE(p,t,r+1,n);m&&i.push(m);continue}}if(n&&!s.getChildren().some(p=>p.isSelected(n)))continue;const l=" ".repeat(4*r),c=e.getListType(),d=Vp(e,ih),f=c==="number"?`${e.getStart()+a}. `:c==="check"?`${d} [${s.getChecked()?"x":" "}] `:d+" ";let h=t(s);c!=="number"&&(h=h.replace(/^(\s{0,3}\d+)(\.\s)/,"$1\\$2")),i.push(l+f+h),a++}return i.join(`
|
|
29
|
+
`)},Sae={dependencies:[yb],export:(e,t)=>{if(!hae(e))return null;const r=Number(e.getTag().slice(1));return"#".repeat(r)+" "+t(e)},regExp:lS,replace:w8(e=>{const t="h"+e[1].length;return As(t)}),triggerOnEnter:!0,type:"element"},wae={dependencies:[lf],export:(e,t)=>{if(!nS(e))return null;const r=t(e).split(`
|
|
30
|
+
`),n=[];for(const i of r)n.push("> "+i);return n.join(`
|
|
31
|
+
`)},regExp:_8,replace:(e,t,r,n)=>{if(n){const o=e.getPreviousSibling();if(nS(o))return o.splice(o.getChildrenSize(),0,[S8(o),...t]),void e.remove()}const i=uf();i.append(...t),e.replace(i),n||i.select(0,0)},triggerOnEnter:!0,type:"element"},r0={dependencies:[sf],export:e=>{if(!up(e))return null;const t=e.getTextContent();let r=Vp(e,V$);if(t.indexOf(r)>-1){const n=t.match(/`{3,}/g);if(n){const i=Math.max(...n.map(o=>o.length));r="`".repeat(i+1)}}return r+(e.getLanguage()||"")+(t?`
|
|
32
|
+
`+t:"")+`
|
|
33
|
+
`+r},handleImportAfterStartMatch:({lines:e,rootNode:t,startLineIndex:r,startMatch:n})=>{const i=n[1],o=i.trim().length,a=e[r],s=n.index+i.length,l=a.slice(s),c=new RegExp(`\`{${o},}$`);if(c.test(l)){const p=l.match(c),m=l.slice(0,l.lastIndexOf(p[0])),g=[...n];return g[2]="",r0.replace(t,null,g,p,[m],!0),[!0,r]}const d=new RegExp(`^[ \\t]*\`{${o},}$`);for(let p=r+1;p<e.length;p++){const m=e[p];if(d.test(m)){const g=m.match(d),v=e.slice(r+1,p),b=a.slice(n[0].length);return b.length>0&&v.unshift(b),r0.replace(t,null,n,g,v,!0),[!0,p]}}const f=e.slice(r+1),h=a.slice(n[0].length);return h.length>0&&f.unshift(h),r0.replace(t,null,n,null,f,!0),[!0,e.length-1]},regExpEnd:{optional:!0,regExp:uS},regExpStart:y8,replace:(e,t,r,n,i,o)=>{let a,s;const l=r[1]?r[1].trim():"```",c=r[2]||void 0;if(!t&&i){if(i.length===1)n?(a=hi(c),s=i[0]):(a=hi(c),s=i[0].startsWith(" ")?i[0].slice(1):i[0]);else{for(a=hi(c),i.length>0&&(i[0].trim().length===0?i.shift():i[0].startsWith(" ")&&(i[0]=i[0].slice(1)));i.length>0&&!i[i.length-1].length;)i.pop();s=i.join(`
|
|
34
|
+
`)}ld(a,V$,l);const d=Pr(s);a.append(d),e.append(a)}else t&&w8(d=>hi(d?d[2]:void 0))(e,t,r,o)},type:"multiline-element"},Eae={dependencies:[Jp,dc],export:(e,t,r)=>dt(e)?jE(e,t,0,r):null,regExp:b8,replace:E8("bullet"),triggerOnEnter:!0,type:"element"},kae={dependencies:[Jp,dc],export:(e,t,r)=>dt(e)?jE(e,t,0,r):null,regExp:v8,replace:E8("number"),triggerOnEnter:!0,type:"element"},Cae={format:["code"],tag:"`",type:"text-format"},Rae={format:["highlight"],tag:"==",type:"text-format"},Aae={format:["bold","italic"],tag:"***",type:"text-format"},Tae={format:["bold","italic"],intraword:!1,tag:"___",type:"text-format"},$ae={format:["bold"],tag:"**",type:"text-format"},Nae={format:["bold"],intraword:!1,tag:"__",type:"text-format"},Dae={format:["strikethrough"],tag:"~~",type:"text-format"},Fae={format:["italic"],tag:"*",type:"text-format"},Iae={format:["italic"],intraword:!1,tag:"_",type:"text-format"},Pae={dependencies:[Qp],export:(e,t,r)=>{if(!Aa(e)||Gc(e))return null;const n=t(e);let i=e.getTitle();return i!=null&&(i=i.replace(/([\\"])/g,"\\$1")),i?`[${n}](${e.getURL()} "${i}")`:`[${n}](${e.getURL()})`},importRegExp:/(?:\[(.+?)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))/,regExp:/(?:\[([^[\]]*(?:\[[^[\]]*\][^[\]]*)*)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))$/,replace:(e,t)=>{if(cr(e,Aa))return;const[,r,n,i]=t,o=n!=null?sS(n):void 0,a=i!=null?sS(i):void 0,s=Pd(o,{title:a}),l=r.split("[").length-1,c=r.split("]").length-1;let d=r,f="";if(l<c)return;if(l>c){const p=r.split("[");f="["+p[0],d=p.slice(1).join("[")}const h=Pr(d);return h.setFormat(e.getFormat()),s.append(h),e.replace(s),f&&s.insertBefore(Pr(f)),h},trigger:")",type:"text-match"},Oae=[Sae,wae,Eae,kae],Mae=[r0],Lae=[Cae,Aae,Tae,$ae,Nae,Rae,Fae,Iae,Dae],zae=[Pae],$l=[...Oae,...Mae,...Lae,...zae];function Uae(e,t=!1){const r=e.split(`
|
|
35
|
+
`);let n=0;const i=[];for(let o=0;o<r.length;o++){const a=r[o],s=a.trimEnd(),l=i[i.length-1],c=o<r.length-1?cS(a):null,d=l!==void 0&&cS(l)!==null;if(bae.test(s))i.push(s);else if(n===0){{const f=s.match(y8);if(f){n=f[1].trim().length,i.push(s);continue}}s===""||l===""||!l||lS.test(l)||lS.test(s)||_8.test(s)||v8.test(s)||b8.test(s)||vae.test(s)||_ae.test(s)||yae(s)||d||!t||B$.test(s)||j$.test(s)||q$(j$).test(l)||q$(B$).test(l)||uS.test(l)?i.push(!t&&s!==""||c!==null?a:s):i[i.length-1]=l+" "+(c===null?s:a).trimStart()}else{if(uS.test(s)&&s.trim().length>=n){n=0,i.push(s);continue}i.push(a)}}return i.join(`
|
|
36
|
+
`)}function Bae(e,t,r,n,i){for(const o of t){if(!o.export)continue;const a=o.export(e,s=>X0(s,r,n,void 0,void 0,i));if(a!=null)return a}return H(e)?X0(e,r,n,void 0,void 0,i):mt(e)?e.getTextContent():null}function X0(e,t,r,n,i,o=!1){const a=[],s=e.getChildren();n||(n=[]),i||(i=[]);e:for(const l of s){for(const c of r){if(!c.export)continue;const d=c.export(l,f=>X0(f,t,r,n,[...i,...n],o),(f,h)=>G$(f,h,t,n,i,o));if(d!=null){a.push(d);continue e}}bi(l)?a.push(jae(l)):fe(l)?a.push(G$(l,l.getTextContent(),t,n,i,o)):H(l)?a.push(X0(l,t,r,n,i,o)):mt(l)&&a.push(l.getTextContent())}return a.join("")}function jae(e){return Vp(e,x8)+`
|
|
37
|
+
`}function G$(e,t,r,n,i,o=!1){const a=e.hasFormat("code");let s,l,c,d,f=t;if(a||(f=o?f.replace(/([*_`~])/g,"\\$1"):f.replace(/([*_`~\\])/g,"\\$1")),a){const{fence:y,padded:S}=(function(w){const C=w.match(/`+/g),A=C?Math.max(...C.map($=>$.length)):0;return{fence:"`".repeat(A+1),padded:w.length===0||w.includes("`")||/^\s/.test(w)&&/\s$/.test(w)?` ${w} `:w}})(t);s="",c="",l=y+S+y,d=!1}else{const y=f.match(/^(\s*)(.*?)(\s*)$/s)||["","",f,""];s=y[1],l=y[2],c=y[3],d=l===""}let h="",p="",m="";const g=K$(e,!0),v=K$(e,!1),b=new Set;for(const y of r){const S=y.format[0],w=y.tag;S!=="code"&&H$(e,S)&&!b.has(S)&&(b.add(S),H$(g,S)&&n.find(C=>C.tag===w)||(n.push({format:S,tag:w}),h+=w))}for(let y=0;y<n.length;y++){const S=dS(e,n[y].format),w=dS(v,n[y].format);if(S&&w)continue;const C=[...n];for(;C.length>y;){const A=C.pop();i&&A&&i.find($=>$.tag===A.tag)||(A&&typeof A.tag=="string"&&(S?w||(m+=A.tag):p+=A.tag),n.pop())}break}return d&&!e.hasFormat("code")?p+f:p+s+h+l+m+c}function K$(e,t){const r=t?e.getPreviousSibling():e.getNextSibling();return fe(r)?r:null}function dS(e,t){return fe(e)&&e.hasFormat(t)}function H$(e,t){return!!dS(e,t)&&(t==="code"||!e||!/^\s*$/.test(e.getTextContent()))}function qae(e,t){const r=e.getTextContent(),n=t.transformersByTag["`"],i=[];let o=null;if(n){const f=(function(h){const p=y=>{let S=0;for(let w=y-1;w>=0&&h[w]==="\\";w--)S++;return S%2==1},m=[];let g=0;for(;g<h.length;)if(h[g]==="`"){let y=1;for(;g+y<h.length&&h[g+y]==="`";)y++;m.push({index:g,length:y}),g+=y}else g++;const v=[];let b=0;for(;b<m.length;){const y=m[b];if(p(y.index)){b++;continue}let S=-1;for(let A=b+1;A<m.length;A++)if(m[A].length===y.length){S=A;break}if(S===-1){b++;continue}const w=m[S];let C=h.slice(y.index+y.length,w.index);C.length>=2&&C.startsWith(" ")&&C.endsWith(" ")&&/[^ ]/.test(C)&&(C=C.slice(1,-1)),v.push({content:C,endIndex:w.index+w.length,startIndex:y.index}),b=S+1}return v})(r);for(const h of f)o||(o={content:h.content,endIndex:h.endIndex,startIndex:h.startIndex,tag:"`"}),i.push({end:h.endIndex,start:h.startIndex})}const a=(function(f,h,p=[]){const m=[],g=new Set(Object.keys(h.transformersByTag).filter(S=>S[0]!=="`").map(S=>S[0])),v=S=>{let w=0;for(let C=S-1;C>=0&&f[C]==="\\";C--)w++;return w%2==1},b=S=>p.some(w=>S>=w.start&&S<w.end);let y=0;for(;y<f.length;){const S=f[y];if(!g.has(S)||v(y)||b(y)){y++;continue}let w=1;for(;y+w<f.length&&f[y+w]===S;)w++;const C=W$(S,f,y,w,!0),A=W$(S,f,y,w,!1);(C||A)&&m.push({active:!0,canClose:A,canOpen:C,char:S,index:y,length:w}),y+=w}return m})(r,t,i),s=a.length>0?(function(f,h,p){const m={};let g=0,v=null;for(;g<h.length;){const b=h[g];if(!b.active||!b.canClose||b.length===0){g++;continue}const y=`${b.char}${b.canOpen}${b.length%3}`,S=m[y]??-1;let w=!1;for(let C=g-1;C>S;C--){const A=h[C];if(!A.active||!A.canOpen||A.length===0||A.char!==b.char||(A.canClose||b.canOpen)&&(A.length+b.length)%3==0&&A.length%3!=0&&b.length%3!=0)continue;const $=Math.min(A.length,b.length),R=Object.keys(p.transformersByTag).filter(M=>M[0]===A.char&&M.length<=$).sort((M,P)=>P.length-M.length)[0];if(!R)continue;w=!0;const N=R.length,I={content:f.slice(A.index+A.length,b.index),endIndex:b.index+N,startIndex:A.index+(A.length-N),tag:R};(!v||I.startIndex<v.startIndex||I.startIndex===v.startIndex&&I.endIndex>v.endIndex)&&(v=I);for(let M=C+1;M<g;M++)h[M].active=!1;A.length-=N,b.length-=N,A.active=A.length>0,b.length>0?b.index+=N:(b.active=!1,g++);break}w||(m[y]=g-1,b.canOpen||(b.active=!1),g++)}return v})(r,a,t):null;let l=null,c=null;if(o&&s?s.startIndex<=o.startIndex&&s.endIndex>=o.endIndex?(l=s,c=t.transformersByTag[s.tag]):(l=o,c=n):o?(l=o,c=n):s&&(l=s,c=t.transformersByTag[s.tag]),!l||!c)return null;const d=[r.slice(l.startIndex,l.endIndex),l.tag,l.content];return d.index=l.startIndex,d.input=r,{endIndex:l.endIndex,isCodeSpan:c===n,match:d,startIndex:l.startIndex,transformer:c}}function W$(e,t,r,n,i){if(!J$(t,r,n,i))return!1;if(e==="*")return!0;if(e==="_"){if(!J$(t,r,n,!i))return!0;const o=i?t[r-1]:t[r+n];return o!==void 0&&oS.test(o)}return!0}function J$(e,t,r,n){const i=e[t-1],o=e[t+r],[a,s]=n?[o,i]:[i,o];return a!==void 0&&!U$.test(a)&&(!oS.test(a)||s===void 0||U$.test(s)||oS.test(s))}function dl(e){return fe(e)&&!e.hasFormat("code")}function uu(e,t,r){let n=qae(e,t),i=(function(a,s){const l=a;let c,d,f,h;for(const p of s){if(!p.replace||!p.importRegExp)continue;const m=l.getTextContent().match(p.importRegExp);if(!m)continue;const g=m.index||0,v=p.getEndIndex?p.getEndIndex(l,m):g+m[0].length;v!==!1&&(c===void 0||d===void 0||g<c&&(v>d||v<=c))&&(c=g,d=v,f=p,h=m)}return c===void 0||d===void 0||f===void 0||h===void 0?null:{endIndex:d,match:h,startIndex:c,transformer:f}})(e,r);if(n&&i&&(n.isCodeSpan?i.startIndex<=n.startIndex&&i.endIndex>=n.endIndex?n=null:i=null:n.startIndex<=i.startIndex&&n.endIndex>=i.endIndex||i.startIndex>n.endIndex?i=null:n=null),n){const a=(function(s,l,c,d,f){const h=s.getTextContent();let p,m,g;if(f[0]===h?p=s:l===0?[p,m]=s.splitText(c):[g,p,m]=s.splitText(l,c),p.setTextContent(f[2]),d)for(const v of d.format)p.hasFormat(v)||p.toggleFormat(v);return{nodeAfter:m,nodeBefore:g,transformedNode:p}})(e,n.startIndex,n.endIndex,n.transformer,n.match);dl(a.nodeAfter)&&uu(a.nodeAfter,t,r),dl(a.nodeBefore)&&uu(a.nodeBefore,t,r),dl(a.transformedNode)&&uu(a.transformedNode,t,r)}else if(i){const a=(function(s,l,c,d,f){let h,p,m;return l===0?[h,p]=s.splitText(c):[m,h,p]=s.splitText(l,c),d.replace?{nodeAfter:p,nodeBefore:m,transformedNode:d.replace(h,f)||void 0}:null})(e,i.startIndex,i.endIndex,i.transformer,i.match);if(!a)return;dl(a.nodeAfter)&&uu(a.nodeAfter,t,r),dl(a.nodeBefore)&&uu(a.nodeBefore,t,r),dl(a.transformedNode)&&uu(a.transformedNode,t,r)}const o=sS(e.getTextContent());e.setTextContent(o)}function Vae(e,t,r,n=!1){const i=BE(r),o=(function(c){const d={},f={},h=[];for(const p of c){const{tag:m}=p;d[m]=p;const g=m.replace(/(\*|\^|\+)/g,"\\$1");h.push(g),m.length===1?f[m]=m==="`"?new RegExp("(^|[^\\\\`])(`)((?:\\\\`|[^`])+?)(`)(?!`)"):new RegExp(`(^|[^\\\\${g}])(${g})((\\\\${g})?.*?[^${g}\\s](\\\\${g})?)(${g})(?![\\\\${g}])`):f[m]=new RegExp(`(^|[^\\\\])(${g})((\\\\${g})?.*?[^\\s](\\\\${g})?)(${g})(?!\\\\)`)}return{fullMatchRegExpByTag:f,openTagsRegExp:new RegExp(`(${h.join("|")})`,"g"),transformersByTag:d}})(i.textFormat),a=e.split(`
|
|
38
|
+
`),s=a.length;for(let c=0;c<s;c++){const d=a[c],[f,h]=Gae(a,c,i.multilineElement,t);f?c=h:Kae(d,t,i.element,o,i.textMatch,n)}const l=t.getChildren();for(const c of l)if(!n&&aS(c)&&t.getChildrenSize()>1)c.remove();else if(H(c))for(const d of c.getAllTextNodes())Hae(d)}function Gae(e,t,r,n){for(const i of r){const{handleImportAfterStartMatch:o,regExpEnd:a,regExpStart:s,replace:l}=i,c=e[t].match(s);if(!c)continue;if(o){const m=o({lines:e,rootNode:n,startLineIndex:t,startMatch:c,transformer:i});if(m===null)continue;if(m)return m}const d=typeof a=="object"&&"regExp"in a?a.regExp:a,f=a&&typeof a=="object"&&"optional"in a?a.optional:!a;let h=t;const p=e.length;for(;h<p;){const m=d?e[h].match(d):null;if(!m&&(!f||f&&h<p-1)){h++;continue}if(m&&t===h&&m.index===c.index){h++;continue}const g=[];if(m&&t===h)g.push(e[t].slice(c[0].length,-m[0].length));else for(let v=t;v<=h;v++)if(v===t){const b=e[v].slice(c[0].length);g.push(b)}else if(v===h&&m){const b=e[v].slice(0,-m[0].length);g.push(b)}else g.push(e[v]);if(l(n,null,c,m,g,!0)!==!1)return[!0,h];break}}return[!1,t]}function Kae(e,t,r,n,i,o){const a=Pr(e),s=Xt();s.append(a),t.append(s);for(const{regExp:l,replace:c}of r){const d=e.match(l);if(d&&(a.setTextContent(e.slice(d[0].length)),c(s,[a],d,!0)!==!1))break}if(uu(a,n,i),s.getParent()!==null&&e.length>0){const l=s.getPreviousSibling();if(!o&&(rf(l)||nS(l)||dt(l))){let c=l;if(dt(l)){const d=l.getLastDescendant();c=d==null?null:cr(d,Ut)}c!=null&&c.getTextContentSize()>0&&(c.splice(c.getChildrenSize(),0,[S8(c),...s.getChildren()]),s.remove())}}}function Hae(e){const t=new Set,r=e.getTextContent();let n=r.indexOf(" ");for(;n!==-1;)t.add(n),t.add(n+1),n=r.indexOf(" ",n+1);e.splitText(...t).forEach(i=>{i.getTextContent()===" "&&i.replace(Yd())})}function Wae(e,...t){const r=new URL("https://lexical.dev/docs/error"),n=new URLSearchParams;n.append("code",e);for(const i of t)n.append("v",i);throw r.search=n.toString(),Error(`Minified Lexical error #${e}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function Q$(e,t,r,n,i){const o=e.getParent();if(!vr(o)||e.getFirstChild()!==t)return!1;const a=t.getTextContent();if(!i&&a[r-1]!==" ")return!1;for(const{regExp:s,replace:l}of n){const c=a.match(s),d=i||c&&c[0].endsWith(" ")?r:r-1;if(c&&c[0].length===d){const f=t.getNextSiblings(),[h,p]=t.splitText(r);if(l(e,p?[p,...f]:f,c,!1)!==!1)return h.remove(),!0}}return!1}function Y$(e,t,r,n,i){const o=e.getParent();if(!vr(o)||e.getFirstChild()!==t)return!1;const a=t.getTextContent();if(!i&&a[r-1]!==" ")return!1;for(const{regExpStart:s,replace:l,regExpEnd:c}of n){if(c&&!("optional"in c)||c&&"optional"in c&&!c.optional)continue;const d=a.match(s);if(d){const f=i||d[0].endsWith(" ")?r:r-1;if(d[0].length!==f)continue;const h=t.getNextSiblings(),[p,m]=t.splitText(r);if(l(e,m?[m,...h]:h,d,null,null,!1)!==!1)return p.remove(),!0}}return!1}function Jae(e,t){let r=0;const n=e.getTextContent();for(let i=0;i<t;i++)n[i]==="`"&&r++;return r%2!=0}function X$(e,t,r){const n=r.length;for(let i=t;i>=n;i--){const o=i-n;if(k8(e,o,r,0,n)&&e[o+n]!==" ")return o}return-1}function k8(e,t,r,n,i){for(let o=0;o<i;o++)if(e[t+o]!==r[n+o])return!1;return!0}function Qae(e,t=$l){const r=BE(t),n=r.element.filter(l=>l.triggerOnEnter),i=iS(r.textFormat,({tag:l})=>l[l.length-1]),o=iS(r.textMatch,({trigger:l})=>l),a=new Set([" "]);for(const l of r.textFormat)a.add(l.tag.slice(-1));for(const l of r.textMatch)l.trigger!==void 0&&a.add(l.trigger);for(const l of t){const c=l.type;if(c==="element"||c==="text-match"||c==="multiline-element"){const d=l.dependencies;for(const f of d)e.hasNode(f)||Wae(173,f.getType())}}const s=(l,c,d)=>!!Q$(l,c,d,r.element)||!!Y$(l,c,d,r.multilineElement)||!!(function(f,h,p){let m=f.getTextContent();const g=p[m[h-1]];if(g==null)return!1;h<m.length&&(m=m.slice(0,h));for(const v of g){if(!v.replace||!v.regExp)continue;const b=m.match(v.regExp);if(b===null)continue;const y=b.index||0,S=y+b[0].length;let w;return y===0?[w]=f.splitText(S):[,w]=f.splitText(y,S),w.selectNext(0,0),v.replace(w,b),!0}return!1})(c,d,o)||!!(function(f,h,p){const m=f.getTextContent(),g=h-1,v=m[g],b=p[v];if(!b)return!1;for(const y of b){const{tag:S}=y,w=S.length,C=g-w+1;if(w>1&&!k8(m,C,S,0,w)||m[C-1]===" ")continue;const A=m[g+1];if(y.intraword===!1&&A&&!z$.test(A))continue;const $=f;let R=$,N=X$(m,C,S),I=R;for(;N<0&&(I=I.getPreviousSibling())&&!bi(I);)if(fe(I)){if(I.hasFormat("code"))continue;const se=I.getTextContent();R=I,N=X$(se,se.length,S)}if(N<0||R===$&&N+w===C)continue;const M=R.getTextContent();if(N>0&&M[N-1]===v)continue;const P=M[N-1];if(y.intraword===!1&&P&&!z$.test(P)||!y.format.includes("code")&&Jae(R,N))continue;const B=$.getTextContent(),j=B.slice(0,C)+B.slice(g+1);$.setTextContent(j);const W=R===$?j:M;R.setTextContent(W.slice(0,N)+W.slice(N+w));const te=xe(),J=lE();Fn(J);const re=g-w*(R===$?2:1)+1;J.anchor.set(R.__key,N,"text"),J.focus.set($.__key,re,"text");for(const se of y.format)J.formatText(se,Ps[se]);J.anchor.set(J.focus.key,J.focus.offset,J.focus.type);for(const se of y.format)J.hasFormat(se)&&J.toggleFormat(se);return ue(te)&&(J.format=te.format),!0}return!1})(c,d,i);return zl(e.registerUpdateListener(({tags:l,dirtyLeaves:c,editorState:d,prevEditorState:f})=>{if(l.has(b4)||l.has(P0)||e.isComposing())return;const h=l.has(rp),p=d.read(xe),m=f.read(xe);if(!ue(m)||!ue(p)||!p.isCollapsed()||p.is(m)&&!h)return;const g=p.anchor.key,v=p.anchor.offset,b=d._nodeMap.get(g);if(fe(b)&&c.has(g)&&(h||v===1||!(v>m.anchor.offset+1))){if(h){const y=d.read(()=>b.getTextContent())[v-1];if(!a.has(y))return}e.update(()=>{if(!dl(b))return;const y=b.getParent();y===null||up(y)||s(y,b,p.anchor.offset)&&Gu(m4)})}}),e.registerCommand(ep,l=>{if(l!==null&&l.shiftKey)return!1;const c=xe();if(!ue(c)||!c.isCollapsed())return!1;const d=c.anchor.offset,f=c.anchor.getNode();if(!fe(f)||!dl(f))return!1;const h=f.getParent();return h===null||up(h)?!1:d===f.getTextContent().length&&!(!Y$(h,f,d,r.multilineElement,!0)&&!Q$(h,f,d,n,!0))&&(l!==null&&l.preventDefault(),!0)},qc))}function C8(e,t=$l,r,n=!1,i=!1){const o=n?e:Uae(e,i),a=ln();a.clear(),Vae(o,a,t,n),xe()!==null&&a.selectStart()}function R8(e=$l,t,r=!1){return(function(i,o=!1){const a=BE(i),s=[...a.multilineElement,...a.element],l=!o,c=a.textFormat.filter(d=>d.format.length===1).sort((d,f)=>Number(d.format.includes("code"))-Number(f.format.includes("code")));return d=>{const f=[],h=(d||ln()).getChildren();for(let p=0;p<h.length;p++){const m=h[p],g=Bae(m,s,c,a.textMatch,o);g!=null&&f.push(l&&p>0&&!aS(m)&&!aS(h[p-1])?`
|
|
39
|
+
`.concat(g):g)}return f.join(`
|
|
40
|
+
`)}})(e,r)(t)}let A8=[yb,lf,Jp,dc,Qp,sf];function Di(e){return"var("+e+")"}let Yae=E([z("flex"),yi("wrap"),X("center"),u("gap","2px"),u("padding","var("+O.xs+")"),u("border-bottom","1px solid var("+x.borderSubtle+")")]),fy=E([u("background","none"),u("border","1px solid transparent"),u("border-radius",Di(Y.sm)),u("color",Di(x.textSecondary)),u("font-family","inherit"),u("font-size",Di(T.sizeSm)),u("line-height","1"),u("min-width","26px"),u("padding","5px 6px"),Ce("pointer"),Ue([u("background",Di(x.surfaceSubtle))])]),Xae=E([u("background",Di(x.surfaceSubtle)),u("border-color",Di(x.border)),u("color",Di(x.textPrimary))]),Zae=E([ks(.4),Ce("notAllowed")]),hy=E([u("width","1px"),u("align-self","stretch"),u("background",Di(x.borderSubtle)),u("margin","2px 4px")]),ese=E([z("flex"),X("center"),u("gap",Di(O.xs)),u("padding","var("+O.xs+")"),u("border-bottom","1px solid var("+x.borderSubtle+")")]),tse=E([ai(1),u("background",Di(x.surface)),u("border","1px solid var("+x.border+")"),u("border-radius",Di(Y.sm)),u("color",Di(x.textPrimary)),u("font-family","inherit"),u("font-size",Di(T.sizeSm)),u("padding","3px 6px"),u("outline","none"),js([u("border-color",Di(x.brand))])]);function rse(e){let t=e.disabled,r=e.formats,n=e.editor,i=t!==void 0?t:!1,o=ce(()=>{}),a=o[1],s=o[0],l=(h,p)=>{n.dispatchCommand(h,p)},c=h=>{n.update(()=>{let p=xe();if(p!=null&&ue(p)){hie(p,h);return}})},d=(h,p,m,g)=>{let v=m!==void 0?m:!1,b=i?fy+" "+Zae:v?fy+" "+Xae:fy;return _("button",{children:h,"aria-label":p,"aria-pressed":v?"true":"false",className:b,title:p,disabled:i,type:"button",onClick:y=>g(),onMouseDown:y=>{y.preventDefault()}})},f=h=>{let p=h.trim();n.update(()=>{Joe(p===""?null:p)}),a(m=>{})};return L(Bt,{children:[L("div",{children:[d("B","Bold",r.bold,()=>l(ta,"bold")),d("I","Italic",r.italic,()=>l(ta,"italic")),d("</>","Inline code",r.code,()=>l(ta,"code")),_("span",{className:hy}),d("H1","Heading 1",void 0,()=>c(()=>As("h1"))),d("H2","Heading 2",void 0,()=>c(()=>As("h2"))),d("¶","Paragraph",void 0,()=>c(()=>Xt())),_("span",{className:hy}),d("•","Bulleted list",void 0,()=>l(ZL,void 0)),d("1.","Numbered list",void 0,()=>l(e8,void 0)),d("“","Quote",void 0,()=>c(()=>uf())),d("🔗","Link",void 0,()=>a(h=>{if(!Ee(h))return""})),_("span",{className:hy}),d("↩","Undo",void 0,()=>l(ob,void 0)),d("↪","Redo",void 0,()=>l(ab,void 0))],"aria-label":"Formatting",className:Yae,role:"toolbar"}),s!==void 0?L("div",{children:[_("input",{"aria-label":"Link URL",className:tse,autoFocus:!0,placeholder:"https://…",type:"url",value:s,onKeyDown:h=>{switch(h.key){case"Enter":return h.preventDefault(),f(s);case"Escape":return a(m=>{});default:return}},onChange:h=>{let p=h.target.value;a(m=>p)}}),d("Apply","Apply link",void 0,()=>f(s)),d("Remove","Remove link",void 0,()=>f(""))],className:ese}):null]})}let Z$={bold:!1,italic:!1,code:!1},nse=rse;function ise(e){return e.trim()===""}let eN={contents:void 0};function ose(){let e=eN.contents;if(e!==void 0)return Rt(e);let t=hE({namespace:"reventless-rich-text-probe",nodes:A8,onError:r=>{}});return eN.contents=Dt(t),t}function ase(e){let t=ose(),r={contents:""};return t.update(()=>{C8(e,$l)},{discrete:!0}),t.read(()=>{r.contents=R8($l)}),r.contents}function sse(e){return e.trim()!==""?e.trimEnd()!==ase(e).trimEnd():!1}function st(e){return"var("+e+")"}let tN=E([z("flex"),_e("column"),u("background",st(x.surface)),u("border","1px solid var("+x.border+")"),u("border-radius",st(Y.sm)),u("box-sizing","border-box"),u("transition","border-color 120ms"),ma({NAME:"percent",VAL:100}),Us("hidden"),zO([u("border-color",st(x.brand))])]),lse=E([u("border-color",st(x.error)),zO([u("border-color",st(x.error))])]),use=E([z("flex"),X("center"),u("gap","2px"),u("justify-content","flex-end"),u("padding","var("+O.xs+")"),u("border-bottom","1px solid var("+x.borderSubtle+")")]);function cse(e){return E([u("background",e?st(x.surfaceSubtle):"transparent"),u("border","1px solid "+(e?st(x.border):"transparent")),u("border-radius",st(Y.sm)),u("color",st(e?x.textPrimary:x.textSecondary)),u("font-family","inherit"),u("font-size",st(T.sizeXs)),u("padding","2px var("+O.sm+")"),Ce("pointer")])}let dse=E([u("background",st(x.surfaceSubtle)),u("border-bottom","1px solid var("+x.borderSubtle+")"),u("color",st(x.textSecondary)),u("font-size",st(T.sizeXs)),u("line-height",st(T.lineHeightNormal)),u("padding","var("+O.xs+") var("+O.sm+")")]),fse=E([$t("relative"),z("flex"),_e("column")]),hse=E([$t("absolute"),u("top","var("+O.sm+")"),u("left","var("+O.sm+")"),u("color",st(x.textDisabled)),u("font-size",st(T.sizeSm)),u("pointer-events","none"),u("user-select","none")]);function pse(e){return E([u("color",st(x.textPrimary)),u("font-size",st(T.sizeSm)),u("line-height",st(T.lineHeightRelaxed)),u("min-height",e),u("outline","none"),u("padding",st(O.sm)),u("word-break","break-word"),u("overflow-y","auto"),u("tab-size","4")])}let mse=E([u("margin","0 0 var("+O.sm+")")]),gse=E([u("font-size",st(T.sizeXl)),u("font-weight",st(T.weightBold)),u("line-height",st(T.lineHeightTight)),u("margin","var("+O.sm+") 0 var("+O.xs+")")]),vse=E([u("font-size",st(T.sizeLg)),u("font-weight",st(T.weightBold)),u("line-height",st(T.lineHeightTight)),u("margin","var("+O.sm+") 0 var("+O.xs+")")]),bse=E([u("font-size",st(T.sizeMd)),u("font-weight",st(T.weightBold)),u("margin","var("+O.sm+") 0 var("+O.xs+")")]),_se=E([u("border-left","3px solid var("+x.border+")"),u("color",st(x.textSecondary)),u("margin","var("+O.xs+") 0"),u("padding-left",st(O.md))]),rN=E([u("margin","var("+O.xs+") 0"),u("padding-left","1.5em")]),yse=E([u("margin","2px 0")]),xse=E([u("color",st(x.brand)),u("text-decoration","underline")]),Sse=E([u("font-weight",st(T.weightBold))]),wse=E([u("font-style","italic")]),Ese=E([u("text-decoration","line-through")]),kse=E([u("background",st(x.surfaceSubtle)),u("border-radius",st(Y.sm)),u("font-family",st(T.fontFamilyMono)),u("font-size","0.9em"),u("padding","1px 4px")]),Cse=E([u("background",st(x.surfaceSubtle)),u("border","1px solid var("+x.borderSubtle+")"),u("border-radius",st(Y.md)),u("display","block"),u("font-family",st(T.fontFamilyMono)),u("font-size","0.9em"),u("margin","var("+O.xs+") 0"),u("padding",st(O.sm)),u("white-space","pre-wrap")]);function Rse(e){return E([u("background","transparent"),u("border","none"),u("color",st(x.textPrimary)),u("font-family",st(T.fontFamilyMono)),u("font-size",st(T.sizeSm)),u("line-height",st(T.lineHeightNormal)),u("min-height",e),u("outline","none"),u("padding",st(O.sm)),u("resize","vertical"),u("box-sizing","border-box"),ma({NAME:"percent",VAL:100})])}let Ase=Object.fromEntries([["paragraph",mse],["quote",_se],["link",xse],["code",Cse],["heading",Object.fromEntries([["h1",gse],["h2",vse],["h3",bse]])],["list",Object.fromEntries([["ul",rN],["ol",rN],["listitem",yse]])],["text",Object.fromEntries([["bold",Sse],["italic",wse],["strikethrough",Ese],["code",kse]])]]);function Tse(e){let t=e.readOnly,r=e.hasError,n=e.minHeight,i=e.placeholder,o=e.onBlur,a=e.onChange,s=e.value,l=o!==void 0?o:()=>{},c=i!==void 0?i:"Write markdown…",d=n!==void 0?n:"180px",f=r!==void 0?r:!1,h=t!==void 0?t:!1,p=ce(()=>"Rich"),m=p[1],g=p[0],v=ce(()=>Z$),b=v[1],y=ce(()=>s.trim()===""),S=y[1],w=ce(()=>!1),C=w[1],A=De(null),$=De(s),R=De(s),N=De(!1),I=De(a);I.current=a;let M=Pt(()=>hE({namespace:"reventless-rich-text",nodes:A8,onError:re=>{console.error("[RichTextEditor] Lexical error — the document may be incomplete:",re)},theme:Ase}),[]),P=()=>{let re={contents:""};return M.read(()=>{re.contents=R8($l)}),re.contents},B=re=>{R.current=re,$.current=re,N.current=!0,C(se=>sse(re)),M.update(()=>{C8(re,$l)})},j=()=>{let re=P();if(S(se=>re.trim()===""),b(se=>{let he={contents:Z$};return M.read(()=>{let K=xe();if(K!=null&&ue(K)){he.contents={bold:K.hasFormat("bold"),italic:K.hasFormat("italic"),code:K.hasFormat("code")};return}}),he.contents}),N.current){N.current=!1,$.current=re;return}else return re!==$.current?($.current=re,I.current(re)):void 0},W=g==="Rich";Ae(()=>{if(!W)return;M.setRootElement(A.current);let re=zl(mae(M),Foe(M),Ooe(M,Moe(),300),Qae(M,$l),M.registerUpdateListener(se=>j()));return B(s),()=>{re(),M.setRootElement(null)}},[W]),Ae(()=>{W&&s!==$.current&&s!==R.current&&B(s)},[s]),Ae(()=>{M.setEditable(!h)},[h]);let te=(re,se)=>_("button",{children:se,"aria-pressed":g===re?"true":"false",className:cse(g===re),type:"button",onClick:he=>{if(m(K=>re),re==="Source")return C(K=>!1)}}),J;return J=g==="Rich"?L("div",{children:[_("div",{ref:Dt(A),"aria-label":"Rich text editor","aria-multiline":!0,className:pse(d),contentEditable:!h,role:"textbox",spellCheck:!0,onBlur:re=>l(),suppressContentEditableWarning:!0}),y[0]&&!h?_("div",{children:c,className:hse}):null],className:fse}):_("textarea",{"aria-label":"Markdown source",className:Rse(d),spellCheck:!1,placeholder:c,readOnly:h,value:s,onBlur:re=>l(),onChange:re=>{let se=re.target.value;$.current=se,R.current=se,a(se)}}),L("div",{children:[L("div",{children:[te("Rich","Rich text"),te("Source","Markdown")],className:use}),!h&&W?_(nse,{editor:M,formats:v[0]}):null,w[0]&&W?_("div",{children:"Editing as rich text will reformat this document — switch to Markdown to keep it as written.",className:dse}):null,J],className:f?tN+" "+lse:tN})}let $se=Tse;function Ul(e){return"var("+e+")"}let T8=E([z("inlineFlex"),X("center"),Ze("center"),u("background",Ul(x.surfaceSubtle)),u("border","1px solid var("+x.borderSubtle+")"),u("color",Ul(x.textDisabled))]),nN=yr([T8,E([u("width","24px"),u("height","24px"),u("border-radius",Ul(Y.sm)),u("font-size",Ul(T.sizeSm)),u("vertical-align","middle")])]),$8=yr([T8,E([u("border-radius",Ul(Y.md)),u("font-size",Ul(T.sizeSm))])]),Nse=yr([$8,E([_e("column"),u("gap",Ul(O.xs)),u("aspect-ratio","4 / 3")])]),Dse=yr([$8,E([_e("row"),u("gap",Ul(O.sm)),u("padding","var("+O.sm+") var("+O.md+")")])]),Fse=E([u("width","240px"),u("max-width","100%")]),Ise=E([u("width","100%")]),Pse=E([u("width","100%"),u("height","100%"),u("aspect-ratio","auto")]),iN=E([u("font-size","20px"),u("line-height","1")]),Ose=E([u("position","absolute"),u("width","1px"),u("height","1px"),u("padding","0"),u("margin","-1px"),Us("hidden"),u("clip","rect(0, 0, 0, 0)"),u("white-space","nowrap"),u("border","0")]);function tg(e){return e==="Media"?"⬚":"▤"}function Mse(e){return e==="Media"?"No image":"No file"}function oN(e){switch(e){case"Thumb":case"Detail":return Fse;case"Tile":return Ise;case"Fill":return Pse}}function Lse(e){let t=e.size,r=e.kind,n=r!==void 0?r:"Media",i=t!==void 0?t:"Detail",o=D(e.label,Mse(n)),a;return a=n==="Media"?Nse:Dse,n==="Media"?i==="Thumb"?_("span",{children:tg(n),"aria-label":o,className:nN,role:"img",title:o}):L("span",{children:[_("span",{children:tg(n),"aria-hidden":!0,className:iN}),o],"aria-label":o,className:yr([a,oN(i)]),role:"img"}):i==="Thumb"?L("span",{children:[_("span",{children:tg(n),"aria-hidden":!0}),_("span",{children:o,className:Ose})],className:nN,title:o}):L("span",{children:[_("span",{children:tg(n),"aria-hidden":!0,className:iN}),o],className:yr([a,oN(i)])})}let fS=Lse;function gt(e){return"var("+e+")"}let hS=E([u("color",gt(x.brand)),u("text-decoration","none"),Ue([u("text-decoration","underline")])]),zse=E([z("inlineBlock"),u("width","12px"),u("height","12px"),u("border-radius","3px"),u("border","1px solid var("+x.border+")"),u("vertical-align","-1px")]),cf=E([z("inlineFlex"),X("center"),u("gap","6px")]),Use=E([u("height","24px"),u("width","24px"),u("object-fit","cover"),u("border-radius",gt(Y.sm)),u("border","1px solid var("+x.borderSubtle+")"),u("vertical-align","middle")]),Bse=E([u("max-height","160px"),u("max-width","240px"),u("object-fit","cover"),u("border-radius",gt(Y.md)),u("border","1px solid var("+x.borderSubtle+")"),Ce("zoomIn")]),jse=E([u("color",gt(x.error)),u("font-size",gt(T.sizeXs)),u("font-weight",gt(T.weightMedium)),u("white-space","nowrap"),Fp(ke(6))]),qse=E([z("inlineBlock"),u("background",gt(x.surfaceSubtle)),u("border","1px solid var("+x.borderSubtle+")"),u("border-radius","3px"),u("color",gt(x.textSecondary)),u("font-size",gt(T.sizeXs)),u("font-weight",gt(T.weightMedium)),u("letter-spacing","0.03em"),u("padding","1px 4px"),u("line-height","1.2")]),N8=E([u("color",gt(x.textSecondary))]),D8=E([u("color",gt(x.warning)),u("font-weight",gt(T.weightMedium))]),aN=E([u("color",gt(x.textSecondary)),u("font-weight",gt(T.weightNormal))]),F8=E([z("inlineBlock"),u("background",gt(x.surfaceSubtle)),u("border","1px solid var("+x.borderSubtle+")"),u("border-radius","3px"),u("color",gt(x.textSecondary)),u("font-size",gt(T.sizeXs)),u("padding","1px 4px"),u("line-height","1.2")]),Vse=E([z("inlineBlock"),u("background",gt(x.surfaceSubtle)),u("border-radius",gt(Y.full)),u("width","64px"),u("height","6px"),Us("hidden")]);function Gse(e){return E([u("background",gt(x.brand)),u("border-radius",gt(Y.full)),u("height","100%"),u("width",e.toString()+"%")])}let qE=E([u("color",gt(x.textSecondary)),u("font-size",gt(T.sizeXs)),u("font-variant-numeric","tabular-nums")]),Kse=E([u("width","220px"),u("max-width","100%")]),Hse=E([z("flex"),_e("column"),u("gap","1px"),u("line-height","1.35")]),Wse=E([u("background","none"),u("border","none"),u("padding","0"),Ce("zoomIn")]),Jse=E([z("inlineFlex"),u("background","none"),u("border","none"),u("padding","0"),u("line-height","0"),u("max-width","100%"),Ce("pointer"),Ue([u("opacity","0.75")])]),Qse=E([z("flex"),_e("column"),u("gap",gt(O.xs)),u("width","100%")]),Yse=E([u("background","none"),u("border","none"),u("padding","0"),u("color",gt(x.textSecondary)),u("font-size",gt(T.sizeXs)),u("text-decoration","underline"),Ce("pointer"),Ue([u("color",gt(x.brand))])]),I8=E([z("flex"),_e("column"),X("flexStart"),u("gap","6px")]),P8=E([u("color",gt(x.textSecondary)),u("font-family",gt(T.fontFamilyMono)),u("font-size",gt(T.sizeXs))]),Xse=E([z("inlineBlock"),u("background","#ffffff"),u("border","1px solid var("+x.borderSubtle+")"),u("border-radius",gt(Y.md)),u("padding","4px"),u("line-height","0")]),Zse=E([u("display","block"),u("max-width","260px"),u("height","auto")]),ele=E([z("flex"),X("center"),u("gap",gt(O.xs))]);function yh(e){return E([u("background",gt(x.surface)),u("border","1px solid var("+(e?x.error:x.border)+")"),u("border-radius",gt(Y.sm)),u("color",gt(x.textPrimary)),u("font-family","inherit"),u("font-size",gt(T.sizeSm)),u("padding","6px 8px")])}let sN=E([u("flex","1 1 auto"),u("min-width","0")]),lN=E([u("flex","0 0 auto")]),tle=E([u("color",gt(x.textSecondary)),u("font-size",gt(T.sizeXs)),u("font-variant-numeric","tabular-nums")]),rle=E([z("inlineFlex"),X("center"),u("gap","6px")]);function O8(e){return E([u("color",gt(e?x.error:x.textSecondary)),u("font-size",gt(T.sizeXs)),u("font-variant-numeric","tabular-nums")])}let nle=E([z("flex"),_e("column"),u("gap","4px")]),ile=E([z("flex"),X("center"),u("gap",gt(O.xs))]);function df(e,t){return e.length>t?e.slice(0,t-1|0)+"…":e}function VE(e){let t=e<0,n=(t?-e:e).toFixed(2).split("."),i=D(n[0],"0"),o=D(n[1],"00"),a=s=>{let l=s.length;return l<=3?s:a(s.slice(0,l-3|0))+","+s.slice(l-3|0)};return(t?"-":"")+a(i)+"."+o}function ole(e){return/^[A-Z]{3}$/.test(e)}function M8(e){if(ole(e))try{return Dt(new Intl.NumberFormat("en-US",{style:"currency",currency:e}))}catch{return}}function L8(e,t){let r=M8(t);if(r===void 0)return VE(e)+" "+t;let n=Rt(r),i=n.resolvedOptions().maximumFractionDigits;return n.format(e/Math.pow(10,i))}function xb(e){return k(G(e),t=>{let r=k(F(t,"amount"),Li),n=k(F(t,"currency"),oe);if(r!==void 0&&n!==void 0)return[r,n]})}function ale(e,t){let r=M8(t);return r!==void 0?e/Math.pow(10,Rt(r).resolvedOptions().maximumFractionDigits):e}function z8(e){let r=e.toFixed(2).replace(/\.?0+$/,"");return(r===""||r==="-"?"0":r)+"%"}function U8(e){let t=["B","KB","MB","GB","TB","PB"],n=((s,l)=>{for(;;){let c=l,d=s;if(!(d>=1024&&c<(t.length-1|0)))return[d,c];l=c+1|0,s=d/1024}})(e<0?0:e,0),i=n[1],o=n[0];return(i===0?Math.round(o).toString():(Math.round(o*10)/10).toString())+" "+t[i]}function GE(e){let t=e<0?0:Math.floor(e)|0,r=t/86400|0,n=t%86400/3600|0,i=t%3600/60|0,o=t%60;return r>0?r.toString()+"d "+n.toString()+"h":n>0?n.toString()+"h "+i.toString()+"m":i>0?i.toString()+"m "+o.toString()+"s":o.toString()+"s"}function KE(e){return k(G(e),t=>{let r=o=>k(k(F(t,o),oe),a=>{if(a!=="")return a}),n=r("start"),i=r("end");if(n!==void 0&&i!==void 0)return[n,i]})}function HE(e,t){let r=Qn(e),n=Qn(t);return r!==void 0&&n!==void 0?n<r?"Ends before it starts":void 0:"Not a date-time"}function B8(e,t){let r=Qn(e),n=Qn(t);if(r!==void 0&&n!==void 0&&n>=r)return GE((n-r)/1e3)}function sle(e){return e.replace(/```[^\n]*\n?/g,"").replace(/`([^`]*)`/g,"$1").replace(/!\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/^#{1,6}\s+/gm,"").replace(/^\s{0,3}(?:[-*+]|\d+\.)\s+/gm,"").replace(/^>\s?/gm,"").replace(/(\*\*|__)(.*?)\1/g,"$2").replace(/(\*|_)(.*?)\1/g,"$2").replace(/~~(.*?)~~/g,"$1").replace(/\s+/g," ").trim()}function lle(e,t){return nt(t,e,(r,n)=>D(r.split(n)[0],r))}function Z0(e){let r=lle(e,["?","#"]).split("/").filter(o=>o!==""),n=D(r[r.length-1|0],""),i;try{i=decodeURIComponent(n)}catch{i=n}return i===""?"file":i}function ule(e){let t=e.split("."),r=t.length;if(r===0||r===1)return;let n=D(t[r-1|0],"");if(/^[A-Za-z0-9]{1,5}$/.test(n))return n.toUpperCase()}function WE(e){return/^[A-Za-z]{2}$/.test(e)}function j8(e){if(WE(e))return e.toUpperCase().split("").map(t=>D(t.codePointAt(0),65)+127397|0).map(t=>String.fromCodePoint(t)).join("")}let uN={contents:void 0};function cle(){let e=uN.contents;if(e!==void 0)return Rt(e);let t;try{t=Dt(new Intl.DisplayNames(["en"],{type:"region"}))}catch{t=void 0}return uN.contents=Dt(t),t}function JE(e){if(!WE(e))return e;let t=cle();if(t===void 0)return e;try{let r=Rt(t).of(e.toUpperCase());return r===""?e:r}catch{return e}}let dle=["street","streetaddress","line1","addressline1","address1"],fle=["line2","addressline2","address2","apartment","unit","suite"],hle=["postalcode","zip","zipcode","postcode"],ple=["city","town","locality"],mle=["state","region","province","county"],gle=["country","countrycode"];function vle(e){let t=Xe(e);if(typeof t=="object")switch(t.TAG){case"JSONString":let r=t._0;return r===""?void 0:r;case"JSONNumber":return t._0.toString();default:return}}function q8(e){let t=Xe(e);if(typeof t=="object")switch(t.TAG){case"JSONString":let r=t._0.split(`
|
|
41
|
+
`).map(c=>c.trim()).filter(c=>c!=="");return r.length===0?void 0:r;case"JSONObject":let n=$e(t._0),i=c=>k(n.find(d=>c.includes(d[0].toLowerCase())),d=>vle(d[1])),o=i(hle),a=i(ple),s=o!==void 0?a!==void 0?o+" "+a:o:a!==void 0?a:void 0,l=Q([i(dle),i(fle),s,i(mle),i(gle)],c=>c).map(c=>c.trim()).filter(c=>c!=="");return l.length===0?void 0:l;default:return}}function ble(e){return q(q8(e),t=>t.map(r=>WE(r)?JE(r):r).join(", "))}function _le(e){let t=j8(e);return t!==void 0?t+" "+JE(e):e}function yle(e){return k(G(e),t=>{let r=o=>k($e(t).find(a=>o(a[0].toLowerCase())),a=>Li(a[1])),n=r(Uw),i=r(Bw);if(n!==void 0&&i!==void 0)return[n,i]})}function Od(e){let r=e.toFixed(5).replace(/\.?0+$/,"");return r===""||r==="-"?"0":r}function rg(e){return ne(q(Uh(e,"maximum"),t=>t|0),5,t=>t<=0?5:t)}function cN(e,t){let r=Uh(e,"maximum");return r!==void 0&&r>0&&r<=1?t/r*100:t}let Sb={};function xr(e,t){Sb[Wd(e)]=t}function xle(e){return F(Sb,Wd(e))}function V8(e,t){return k(kd(e,t),r=>F(Sb,Wd(r.semantic)))}function G8(e,t,r){return k(V8(e,t),n=>n.cell(e,t,r))}function n0(e,t,r){return k(V8(e,t),n=>n.detail(e,t,r))}function Sle(e,t){return G8(e,t,null)}function wle(e,t){return n0(e,t,null)}function QE(e,t){return k(uM(e,t),r=>F(Sb,Wd(r.semantic)))}function Ele(e,t){return ne(QE(e,t),!1,r=>Ee(r.input))}function kle(e,t,r,n,i,o,a){return q(k(QE(e,t),s=>s.input),s=>s(e,t,r,n,i,o,a))}function Cle(e,t,r,n){return k(k(QE(e,t),i=>i.validateInput),i=>i(e,t,r,n))}function ev(e){e.stopPropagation()}function tv(e,t,r){return r?_("a",{children:t,className:hS,href:e,rel:"noopener noreferrer",target:"_blank",onClick:ev}):_("a",{children:t,className:hS,href:e,onClick:ev})}function _i(e){return k(oe(e),t=>{if(t!=="")return t})}function YE(e){let t=(r,n,i)=>q(_i(i),e);return{cell:t,detail:t}}function wb(e){let t=(r,n,i)=>q(Li(i),o=>e(o));return{cell:t,detail:t}}xr("Email",YE(e=>tv("mailto:"+e,e,!1)));xr("Phone",YE(e=>tv("tel:"+e,e,!1)));xr("Url",{cell:(e,t,r)=>q(_i(r),n=>tv(n,df(n,40),!0)),detail:(e,t,r)=>q(_i(r),n=>tv(n,n,!0))});xr("Currency",wb(VE));xr("Percent",wb(z8));xr("Bytes",wb(U8));xr("Duration",wb(GE));xr("Color",YE(e=>L("span",{children:[_("span",{className:zse,style:{background:e}}),e],className:cf})));function Rle(e){return e==="Media"?["Add an image","Add image"]:["Add a file","Add file"]}function rv(e){let t=e.size,r=e.kind,n=IQ(e.field);if(n===void 0)return _(fS,{kind:r,size:t});let i=Rle(r);return _("button",{children:_(fS,{kind:r,size:t,label:i[1]}),className:Jse,title:i[0],type:"button",onClick:o=>{o.stopPropagation(),n()}})}function Ale(e){let t=e.alt,r=e.src,n=ce(()=>!1);if(r===void 0)return _(rv,{field:e.field,kind:"Media",size:"Detail"});let i=n[1];return L(Bt,{children:[_("button",{children:_("img",{className:Bse,alt:t,src:r}),className:Wse,title:"Click to enlarge",onClick:o=>{o.stopPropagation(),i(a=>!0)}}),n[0]?_(wM,{slides:[{key:r,src:r,title:t}],index:0,onIndexChange:o=>{},onClose:()=>i(o=>!1)}):null]})}function nv(e){let t=Xe(e);if(typeof t!="object")return t==="JSONNull"?Dt(void 0):void 0;if(t.TAG!=="JSONString")return;let r=t._0;return Dt(r===""?void 0:r)}xr("Image",{cell:(e,t,r)=>q(nv(r),n=>n!==void 0?_("img",{className:Use,alt:e,src:Ou(n),onClick:ev}):_(rv,{field:e,kind:"Media",size:"Thumb"})),detail:(e,t,r)=>q(nv(r),n=>_(Ale,{src:q(n,Ou),alt:e,field:e}))});function Tle(e){return/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(e)?!0:/^[0-9A-Za-z_-]{16,}$/.test(e)}function $le(e){return L("span",{children:[_(Hd,{name:e,size:"Small"}),e],className:cf})}function dN(e,t,r){return k(_i(r),n=>{if(!Tle(n))return $le(n)})}xr("UserRef",{cell:dN,detail:dN});xr("Markdown",{cell:(e,t,r)=>q(_i(r),n=>df(sle(n),80)),detail:(e,t,r)=>q(_i(r),n=>_(m6,{source:n})),input:(e,t,r,n,i,o,a)=>_($se,{value:r,onChange:n,onBlur:i,hasError:a}),validateInput:(e,t,r,n)=>{if(n&&ise(r))return"Required"}});xr("Rating",{cell:(e,t,r)=>q(Li(r),n=>_(M_,{value:n,max:rg(t)})),detail:(e,t,r)=>q(Li(r),n=>_(M_,{value:n,max:rg(t),size:"Medium",showValue:!0})),input:(e,t,r,n,i,o,a)=>_(M_,{value:D(Ds(r),0),max:rg(t),size:"Medium",showValue:!0,onChange:s=>n(s<=0?"":s.toString()),onBlur:i,hasError:a}),validateInput:(e,t,r,n)=>{if(r==="")return n?"Required":void 0;let i=Ds(r);if(i===void 0)return"Invalid rating";let o=rg(t);if(i<0||i>o)return"Must be between 0 and "+o.toString()}});function Nle(e){return e<0?0:e>100?100:e}xr("Progress",{cell:(e,t,r)=>q(Li(r),n=>{let i=Nle(cN(t,n));return L("span",{children:[_("span",{children:_("span",{className:Gse(i)}),className:Vse}),_("span",{children:Math.round(i).toString()+"%",className:qE})],className:cf})}),detail:(e,t,r)=>q(Li(r),n=>_("div",{children:_(PM,{value:cN(t,n)}),className:Kse}))});function XE(e,t){let r=Ou(e),n=ule(t);return L("span",{children:[n!==void 0?_("span",{children:n,className:qse}):null,_("a",{children:t,className:hS,download:"",href:r,rel:"noopener noreferrer",target:"_blank",onClick:ev})],className:cf})}function K8(e){let t=e.name,r=e.href,n=ce(()=>!1),i=n[1],o=n[0];return L("span",{children:[L("span",{children:[XE(r,t),aX(r)?_("button",{children:o?"Hide preview":"Preview","aria-expanded":o,className:Yse,type:"button",onClick:a=>{a.stopPropagation(),i(s=>!s)}}):null],className:cf}),o?_(lX,{src:Ou(r),title:t,height:"60vh"}):null],className:Qse})}xr("FileUrl",{cell:(e,t,r)=>q(_i(r),n=>XE(n,df(Z0(n),40))),detail:(e,t,r)=>q(_i(r),n=>_(K8,{href:n,name:Z0(n)}))});xr("File",{cell:(e,t,r)=>q(nv(r),n=>n!==void 0?XE(n,df(Z0(n),40)):_(rv,{field:e,kind:"Document",size:"Thumb"})),detail:(e,t,r)=>q(nv(r),n=>n!==void 0?_(K8,{href:n,name:Z0(n)}):_(rv,{field:e,kind:"Document",size:"Detail"}))});function Dle(e){return D(k(Nr(e).find(t=>t[0].toLowerCase()==="currency"),t=>nc(t[1])),[])}function Fle(e,t){return _("span",{children:L8(e,t),className:qE})}function fN(e,t,r){return q(xb(r),n=>Fle(n[0],n[1]))}function Ile(e){let t=e.hasError,r=e.onBlur,n=e.onChange,i=e.value,o=Dle(e.propSchema),a;if(i==="")a=void 0;else try{a=xb(JSON.parse(i))}catch{a=void 0}let s=a!==void 0?[a[0].toString(),a[1]]:["",D(o[0],"")],l=s[1],c=s[0],d=(h,p)=>{let m=Ds(h);n(m!==void 0&&p!==""?JSON.stringify(Oe([["amount",m],["currency",p]])):"")},f=Ds(c);return L("span",{children:[L("span",{children:[_("input",{"aria-label":"Amount in minor units",className:yh(t)+" "+sN,step:1,type:"number",value:c,onBlur:h=>r(),onChange:h=>d(h.target.value,l)}),_("span",{children:f!==void 0&&l!==""?"= "+L8(f,l):"minor units",className:tle})],className:sN}),o.length===0?_("input",{"aria-label":"Currency",className:yh(t)+" "+lN,placeholder:"EUR",value:l,onBlur:h=>r(),onChange:h=>d(c,h.target.value)}):_("select",{children:o.map(h=>_("option",{children:h,value:h},h)),"aria-label":"Currency",className:yh(t)+" "+lN,value:l,onBlur:h=>r(),onChange:h=>d(c,h.target.value)})],className:ele})}xr("Money",{cell:fN,detail:fN,input:(e,t,r,n,i,o,a)=>_(Ile,{propSchema:t,value:r,onChange:n,onBlur:i,hasError:a}),validateInput:(e,t,r,n)=>{if(r==="")return n?"Required":void 0;let i;try{i=JSON.parse(r)}catch{i=null}let o=xb(i);if(o===void 0)return"Invalid amount";let a=o[0];if(a!==Math.trunc(a))return"An amount is a whole number of minor units"}});function Ple(e,t){let r=HE(e,t),n=B8(e,t),i=r!==void 0?r:n!==void 0?n:"";return L("span",{children:[D(Lh(e),e)+" → "+D(Lh(t),t),i===""?null:_("span",{children:i,className:O8(Ee(r))})],className:rle})}function hN(e,t,r){return q(KE(r),n=>Ple(n[0],n[1]))}function ng(e){if(e==="")return;let t=new Date(e);if(!Number.isNaN(t.getTime()))return t.toISOString()}function pN(e){let t=Hv(e);return t===e?"":t.slice(0,10)+"T"+t.slice(11,16)}function Ole(e){let t=e.hasError,r=e.onBlur,n=e.onChange,i=e.value,o;if(i==="")o=void 0;else try{o=KE(JSON.parse(i))}catch{o=void 0}let a=o!==void 0?[pN(o[0]),pN(o[1])]:["",""],s=a[1],l=a[0],c=(p,m)=>{let g=ng(p),v=ng(m);n(g!==void 0&&v!==void 0?JSON.stringify(Oe([["start",g],["end",v]])):"")},d=ng(l),f=ng(s),h;if(d!==void 0&&f!==void 0){let p=HE(d,f);h=p!==void 0?[p,!0]:[D(B8(d,f),""),!1]}else h=["start and end",!1];return L("span",{children:[L("span",{children:[_("input",{"aria-label":"Start",className:yh(t),type:"datetime-local",value:l,onBlur:p=>r(),onChange:p=>c(p.target.value,s)}),_("span",{children:"→","aria-hidden":!0}),_("input",{"aria-label":"End",className:yh(t),type:"datetime-local",value:s,onBlur:p=>r(),onChange:p=>c(l,p.target.value)})],className:ile}),_("span",{children:h[0],className:O8(h[1])})],className:nle})}xr("DateRange",{cell:hN,detail:hN,input:(e,t,r,n,i,o,a)=>_(Ole,{value:r,onChange:n,onBlur:i,hasError:a}),validateInput:(e,t,r,n)=>{if(r==="")return n?"Required":void 0;let i;try{i=JSON.parse(r)}catch{i=null}let o=KE(i);return o!==void 0?HE(o[0],o[1]):"Invalid range"}});function Mle(e){let t=j8(e);return t!==void 0?L("span",{children:[_("span",{children:t,"aria-hidden":!0}),JE(e)],className:cf}):e}function mN(e,t,r){return q(_i(r),Mle)}xr("Country",{cell:mN,detail:mN});xr("Address",{cell:(e,t,r)=>q(ble(r),n=>df(n,60)),detail:(e,t,r)=>q(q8(r),n=>_("span",{children:n.map((i,o)=>_("span",{children:_le(i)},o.toString())),className:Hse}))});function gN(e,t,r){return q(yle(r),n=>Od(n[0])+", "+Od(n[1]))}let Lle={cell:gN,detail:gN};xr("GeoPoint",Lle);let H8="Located — this query selected only which arm the value is in, not the coordinates";function zle(e,t,r){return q(Lw(r),n=>{switch(n.TAG){case"Pending":return _("span",{children:"Locating…",className:N8});case"Located":let i=zw(n);return i!==void 0?Od(i[0])+", "+Od(i[1]):_("span",{children:"Located",className:F8,title:H8});case"Unresolvable":return _("span",{children:"Not located",className:D8,title:D(oM(n),"No reason given")})}})}function Ule(e,t,r){return q(Lw(r),n=>{switch(n.TAG){case"Pending":let i=UQ(n);return L("span",{children:["Locating…",i!==void 0?_("span",{children:" "+i,className:aN}):null],className:N8});case"Located":let o=zw(n);return o!==void 0?Od(o[0])+", "+Od(o[1]):_("span",{children:"Located",className:F8,title:H8});case"Unresolvable":let a=oM(n);return L("span",{children:["Not located",a!==void 0?_("span",{children:" "+a,className:aN}):null],className:D8})}})}xr("Geolocation",{cell:zle,detail:Ule});function Ble(e){return q(k(k(G(e),t=>F(t,"maxLength")),Li),t=>t|0)}function py(e){let t=k(Io(e).channel,n=>kX(n).maxLength),r=Ble(e);return t!==void 0?r!==void 0?t<r?t:r:t:r}xr("ChannelText",{cell:(e,t,r)=>q(_i(r),n=>{let i=k(py(t),o=>{if(ad(n)>o)return ad(n)-o|0});return L("span",{children:[df(n,80),i!==void 0?_("span",{children:i.toString()+" over",className:jse}):null]})}),detail:(e,t,r)=>{let n=_i(r),i=Io(t).channel;if(n!==void 0&&i!==void 0)return _(ore,{channelId:i,message:{body:n}})},input:(e,t,r,n,i,o,a)=>{let s=k(Io(t).channel,MM);return _(Kte,{value:r,onChange:n,onBlur:i,maxLength:py(t),channelLabel:q(s,l=>l.label),hasError:a,note:k(s,l=>l.constraints.note),name:e})},validateInput:(e,t,r,n)=>n&&r===""?"Required":k(py(t),i=>{let o=ad(r);if(o>i)return v6(o-i|0)+" over the "+i.toString()+"-character limit"})});xr("Qr",{cell:(e,t,r)=>{},detail:(e,t,r)=>q(_i(r),n=>L("span",{children:[_(IY,{value:n}),_("span",{children:n,className:P8})],className:I8}))});xr("Barcode",{cell:(e,t,r)=>{},detail:(e,t,r)=>q(_i(r),n=>L("span",{children:[_(GY,{value:n}),_("span",{children:n,className:P8})],className:I8}))});xr("Signature",{cell:(e,t,r)=>k(_i(r),n=>{if(gA(n))return _("span",{children:"✓ Signed",className:qE})}),detail:(e,t,r)=>k(_i(r),n=>{if(gA(n))return _("span",{children:_("img",{className:Zse,alt:"Signature",src:BM(n)}),className:Xse})}),input:(e,t,r,n,i,o,a)=>_(PX,{value:r,onChange:n,onBlur:i,hasError:a}),validateInput:(e,t,r,n)=>{if(n&&r==="")return"Required"}});function cp(e){return"var("+e+")"}let jle=E([z("inlineFlex"),X("center"),yi("wrap"),u("gap","4px"),u("font-size",cp(T.sizeSm)),u("min-width","0")]),qle=E([u("color",cp(x.textDisabled)),u("font-size",cp(T.sizeXs))]),Vle=E([u("color",cp(x.brand)),u("text-decoration","none"),Ue([u("text-decoration","underline")])]),Gle=E([u("color",cp(x.textPrimary))]);function Kle(e){let t=e.segments,r=Ls();return _("span",{children:t.map((n,i)=>{let o=i===(t.length-1|0),a=n.href;return L(Nv,{children:[a!==void 0?_("a",{children:n.label,className:Vle,href:a,onClick:s=>{if(!(s.metaKey||s.ctrlKey||s.shiftKey||s.altKey||s.button!==0))return s.preventDefault(),s.stopPropagation(),r(a)}}):_("span",{children:n.label,className:Gle}),o?null:_("span",{children:" › ",className:qle})]},i.toString()+":"+n.label)}),className:jle})}let Hle=Kle;function vN(e){return k(k(G(e),t=>F(t,"type")),oe)}function ZE(e){return k(k(G(e),t=>F(t,"format")),oe)}function Wle(e){return k(G(e),t=>F(t,"items"))}function bN(e){return Ee(k(k(G(e),t=>F(t,"properties")),G))}function Ja(e){let t=e.toLowerCase(),r=e.length,n=o=>{let a=o.length;if(r>a&&t.endsWith(o))return e.slice(0,r-a|0)},i=n("ids");return i!==void 0?i:n("id")}function Jle(e,t,r){let n=vn(t);if(e==="compositeId")return"KCompositeId";let i=Hl(n);if(i!==void 0)return{TAG:"KUnion",_0:i};let o=nc(n);if(o!==void 0)return{TAG:"KEnum",_0:o};let a=vN(n),s=0;if(a!==void 0)switch(a){case"array":let l=Wle(n);if(l===void 0)return"KArrayOfStrings";if(bN(l)||Re(vN(l),"object"))return{TAG:"KArrayOfObjects",_0:l};let c=Ja(e);return c!==void 0?{TAG:"KArrayOfEntityIds",_0:c}:"KArrayOfStrings";case"boolean":return"KBoolean";case"integer":case"number":return"KNumber";case"object":return bN(n)?{TAG:"KNestedObject",_0:n}:"KString";default:s=1}else s=1;if(s===1){let l=ZE(n),c=0;if(l!==void 0)switch(l){case"date":case"date-time":return"KDate";default:c=2}else c=2;if(c===2){if(r.isId)return"KString";let d=Ja(e);return d!==void 0?{TAG:"KEntityId",_0:d}:"KString"}}}function Xu(e,t,r){let n=jo(t,e);return r!==void 0&&n!==void 0&&r.pluginId===n.pluginId?r.viewName===n.name:!1}function Qle(e){switch(e){case"sortKey":case"subId":return!0;default:return!1}}function Yle(e,t){return e==="id"||e==="compositeId"?!0:t.isId}function Xle(e,t,r,n){return t.hidden||Qle(e)?!1:Yle(e,t)?Re(n,e):r?t.summary:!0}function Zle(e,t,r){if(e==="compositeId"||r.isId)return 0;if(e==="id")return 1;if(r.summary)return 2;if(typeof t!="object")switch(t){case"KBoolean":return 7;case"KCompositeId":return 0;case"KDate":return 4;case"KNumber":return 8;case"KString":return 5;case"KArrayOfStrings":return 11}else switch(t.TAG){case"KEnum":return 6;case"KEntityId":return 9;case"KArrayOfEntityIds":return 10;case"KArrayOfObjects":return 12;case"KNestedObject":return 13;case"KUnion":return 14}}function eue(e,t){if(typeof e!="object")switch(e){case"KBoolean":return"80px";case"KCompositeId":return"260px";case"KNumber":return"100px";case"KString":return t==="id"?"220px":void 0;case"KDate":case"KArrayOfStrings":return"180px"}else switch(e.TAG){case"KEnum":return"140px";case"KEntityId":return"220px";case"KArrayOfEntityIds":return"260px";default:return"240px"}}function _N(e,t){let r=Io(t),n=Jle(e,t,r),i=D(k(k(G(t),o=>F(o,"title")),oe),pt(e));return{key:e,label:i,kind:n,ann:r,propSchema:t,priority:Zle(e,n,r),width:eue(n,e)}}function di(e,t,r,n,i,o){let a=t!==void 0?t:"List",s=r!==void 0?r:[],l=D(q(k(k(G(e),m=>F(m,"properties")),G),$e),[]),c=Wv(e),d=a==="List"&&c.length!==0,f=mi(Wn(i,bn(e,void 0,void 0).labelField),m=>m!=="id"),h=Q(l,m=>{let g=m[0],v=_N(g,m[1]),b=v.kind,y;if(typeof b!="object")y=!1;else switch(b.TAG){case"KEntityId":case"KArrayOfEntityIds":y=Xu(b._0,s,n);break;default:y=!1}let S=Re(g,o);if(Xle(g,v.ann,d,f)&&!y&&!S)return v}),p;if(h.length===0){let m=g=>l.find(v=>v[0]===g);p=ne(Wn(Wn(k(JO(e),m),m("compositeId")),m("id")),[],g=>[_N(g[0],g[1])])}else p=h;return p.toSorted((m,g)=>m.priority-g.priority|0)}function tue(e,t){return e.length>t?e.slice(0,t-1|0)+"…":e}function dp(e){return _(ia,{variant:"Neutral",label:e,dot:!1})}function yN(e,t,r,n,i){let o=jo(r,e);return o===void 0?[void 0,t]:(i!==void 0?i.pluginId===o.pluginId&&i.viewName===o.name:!1)?[void 0,t]:[Ga(o.pluginId,o.name,t,[]),t]}function pS(e,t,r,n){let i=jo(r,e);return i!==void 0?t?$p(i.name):Eo(i.name):n}function Au(e,t,r){let n=e.kind;if(typeof n!="object")return e.label;switch(n.TAG){case"KEntityId":let i=n._0;return Xu(i,t,r)?e.label:pS(i,!1,t,e.label);case"KArrayOfEntityIds":let o=n._0;return Xu(o,t,r)?e.label:pS(o,!0,t,e.label);default:return e.label}}function xN(e,t,r){if(r===void 0)return[t,!1];let n=r.lookupLabel(e,t);return n!==void 0?[n,!1]:[t,r.isMissing(e,t)]}function iv(e,t,r,n,i,o,a,s,l){let c=l!==void 0?l:!1,d=Xu(t,n,a),f=D(s,sM(t)),h=g=>{let v=yN(t,g,n,i,a),b=v[1],y=d?[b,!1]:xN(t,b,o),S=y[0],w;if(o!==void 0){let N=o.retiredBadge;w=N!==void 0&&!d?N(t,b):void 0}else w=void 0;let C;if(o!==void 0){let N=o.linkable;C=N!==void 0&&!d?N(t,b):!0}else C=!0;let A=C?_(tQ,{href:v[0],label:S,rawValue:b}):_("span",{children:S,title:S+" is not available to open"}),$=w!==void 0?L("span",{children:[A,w],style:{display:"inline-flex",alignItems:"center",gap:"6px"}}):A,R=f&&S!==b?L("span",{children:[_(Hd,{name:S,size:"Small"}),$],style:{display:"inline-flex",alignItems:"center",gap:"6px"}}):$;return y[1]?_("span",{children:R,style:{fontStyle:"italic",opacity:"0.55"},title:"Referenced "+t+" not found (id: "+b+")"}):R},p=g=>{let v=Q(g,b=>{let S=yN(t,b,n,i,a)[1],C=xN(t,S,o)[0];if(C!==S)return{name:C}});if(c&&f&&!d&&g.length>=2&&v.length===g.length)return _(XO,{members:v,size:"Small"})},m=Xe(r);if(typeof m!="object")return JSON.stringify(r);switch(m.TAG){case"JSONString":return h(m._0);case"JSONArray":let g=m._0,v=Q(g,oe),b=v.length===g.length?p(v):void 0;return b!==void 0?b:_("span",{children:g.map((y,S)=>{let w=Xe(y);return typeof w!="object"||w.TAG!=="JSONString"?null:L("span",{children:[h(w._0),S<(g.length-1|0)?", ":null]},S.toString())})});default:return JSON.stringify(r)}}function rue(e){let t=Xe(e);if(typeof t!="object"||t.TAG!=="JSONString")return JSON.stringify(e);let r=t._0.split("/").map(n=>({label:n,href:void 0}));return _(Hle,{segments:r})}function Yo(e,t,r){let n=Xe(r);if(typeof n!="object")switch(n){case"JSONFalse":return _(ia,{variant:"Neutral",label:"No",dot:!1});case"JSONTrue":return _(ia,{variant:"Success",label:"Yes",dot:!1});case"JSONNull":return"—"}else switch(n.TAG){case"JSONString":let i=n._0,o=KO(e,i);if(t===void 0)return o!==void 0?o:i;switch(t){case"date":case"date-time":return Hv(i);default:return o!==void 0?o:i}case"JSONNumber":return n._0.toString();case"JSONObject":case"JSONArray":return JSON.stringify(r)}}function mS(e,t,r,n,i,o){let a=G(t);if(a===void 0)return;let s=F(a,"name");if(s!==void 0&&Xe(s)!=="JSONNull")return Yo("name",void 0,s);let l=di(e,"Drill",r,o,void 0,void 0),c=Q(l,m=>{let g=m.kind,v;if(typeof g!="object")v=g!=="KArrayOfStrings";else switch(g.TAG){case"KArrayOfEntityIds":case"KArrayOfObjects":case"KNestedObject":case"KUnion":v=!1;break;default:v=!0}let b=F(a,m.key);if(!v||b===void 0)return;let y=Xe(b);if(!(typeof y!="object"&&y==="JSONNull"))return[m,b]});if(c.length===0)return;let d=c.slice(0,2),f=l.length-d.length|0,h=d.map((m,g)=>{let v=m[1],b=m[0],y=b.kind,S;if(typeof y!="object")S=y==="KDate"?Yo(b.key,ZE(b.propSchema),v):Yo(b.key,void 0,v);else switch(y.TAG){case"KEnum":let w=Xe(v);S=typeof w!="object"||w.TAG!=="JSONString"?Yo(b.key,void 0,v):dp(w._0);break;case"KEntityId":S=iv(b.key,y._0,v,r,n,i,o,void 0,void 0);break;default:S=Yo(b.key,void 0,v)}return L("span",{children:[g>0?" · ":null,S]},g.toString())}),p=f>0?_("span",{children:"+"+f.toString(),style:{marginLeft:"4px",opacity:"0.55"}}):null;return L("span",{children:[h,p],style:{display:"inline-flex",alignItems:"center",flexWrap:"wrap"}})}function nue(e,t,r,n,i,o){let a=Jv(t);if(a===void 0)return JSON.stringify(t);let s=a[1],l=a[0],c=Sw(e,l),d=ne(c,l,h=>h.tag),f=D(k(c,h=>mS(yO(h),s,r,n,i,o)),null);return L("span",{children:[dp(d),f],style:{display:"inline-flex",alignItems:"center",flexWrap:"wrap",gap:"6px"}})}function Sl(e,t,r,n,i,o,a,s,l){let c=i!==void 0?i:HO,d=mi(n,p=>Xe(p)!=="JSONNull");if(d===void 0)return D(Sle(e,r),"—");let f=G8(e,r,d);if(f!==void 0)return f;if(typeof t!="object")switch(t){case"KCompositeId":return rue(d);case"KDate":return Yo(e,ZE(r),d);case"KBoolean":case"KNumber":return Yo(e,void 0,d);case"KString":let p=Xe(d);if(typeof p!="object"||p.TAG!=="JSONString")return Yo(e,void 0,d);let m=p._0;return m.length>60?_("span",{children:tue(m,60),title:m}):Yo(e,void 0,d);case"KArrayOfStrings":let g=D(q(Ct(d),v=>Q(v,oe)),[]);return _(GO,{items:g})}else switch(t.TAG){case"KEnum":let p=Xe(d);return typeof p!="object"||p.TAG!=="JSONString"?Yo(e,void 0,d):dp(p._0);case"KEntityId":case"KArrayOfEntityIds":break;case"KArrayOfObjects":let m=t._0,g=D(Ct(d),[]),v=g.length;if(c.collapsed){let C=g[0];return C!==void 0?SN(m,C,o,a,s,l):_(hh,{count:v,label:"items"})}let b=k(g[0],C=>mS(m,C,o,a,s,l));return b!==void 0?L("span",{children:[b,v>1?_("span",{children:"+"+(v-1|0).toString(),style:{marginLeft:"4px",opacity:"0.55"}}):null],style:{display:"inline-flex",alignItems:"center",flexWrap:"wrap"}}):_(hh,{count:v,label:"items"});case"KNestedObject":let y=t._0;if(c.collapsed)return SN(y,d,o,a,s,l);let S=mS(y,d,o,a,s,l);if(S!==void 0)return S;let w=D(q(G(d),C=>Object.keys(C).length),0);return _(hh,{count:w,label:"fields"});case"KUnion":return nue(t._0,d,o,a,s,l)}let h=ne(kd(e,r),!1,p=>p.semantic==="UserRef");return iv(e,t._0,d,o,a,s,l,h?!0:void 0,!0)}function SN(e,t,r,n,i,o){let a=D(G(t),{}),s=di(e,"Drill",r,o,void 0,void 0).filter(l=>{let c=l.kind;if(typeof c!="object")return!0;switch(c.TAG){case"KArrayOfObjects":case"KNestedObject":return!1;default:return!0}});return _("div",{children:s.map(l=>L("div",{children:[_("span",{children:Au(l,r,o),style:{fontSize:"0.85em",minWidth:"80px",opacity:"0.55"}}),_("span",{children:Sl(l.key,l.kind,l.propSchema,F(a,l.key),l.ann,r,n,i,o)})],style:{display:"flex",alignItems:"baseline",gap:"6px"}},l.key)),style:{display:"flex",maxHeight:"120px",overflow:"auto",flexDirection:"column",gap:"2px"}})}function iue(e){if(typeof e!="object")return e!=="KArrayOfStrings";switch(e.TAG){case"KArrayOfEntityIds":case"KArrayOfObjects":case"KNestedObject":case"KUnion":return!1;default:return!0}}function oue(e){return typeof e!="object"?e==="KBoolean":e.TAG==="KEnum"}function W8(e,t,r,n,i,o,a,s,l,c){let d=i!==void 0?i:!1,f=Wn(mi(c,h=>e.some(p=>p.key===h)),q(e[0],h=>h.key));return e.map(h=>{let p=Au(h,t,a),m=ne(kd(h.key,h.propSchema),!1,g=>g.semantic==="Image"?!0:g.semantic==="File");return{key:h.key,label:p,render:g=>{let v=Sl(h.key,h.kind,h.propSchema,n(g,h.key),h.ann,t,r,o,a),b=s!==void 0&&m?_(eM.make,{fill:S=>s(g,S),children:v}):v;if(l===void 0)return b;if(Ee(l.values)&&h.key===l.field){let S=zh(l,n(g,l.field));return S!==void 0?S:b}if(l.values!==void 0||!Re(f,h.key))return b;let y=zh(l,n(g,l.field));return y!==void 0?L("span",{children:[b,y],style:{display:"inline-flex",alignItems:"center",gap:"6px"}}):b},sortable:d&&iue(h.kind),width:h.width}})}function J8(e){return(t,r)=>e(t,r).then(n=>n.data)}let Q8=Zt(void 0),Y8=Zt(void 0),aue={contents:void 0},sue=Q8.Provider,lue=Y8.Provider;function uue(e){let t=e.executeResult,r=e.execute,n=Pt(()=>{if(r!==void 0)return r;if(t!==void 0)return J8(t);console.error('AutoGraphQL.Provider: neither `execute` nor `executeResult` was supplied — every query below this provider will report "Not connected".')},[r,t]);return ur(sue,{value:n,children:ur(lue,{value:t,children:e.children})})}let cue={make:uue};function si(){return St(Q8)}function Yp(){return St(Y8)}let X8={hasNextPage:!1,hasPreviousPage:!1,startCursor:void 0,endCursor:void 0};function Z8(e,t){let r=G(e),n=k(k(k(r,i=>F(i,"data")),G),i=>F(i,t));return n!==void 0?n:k(r,i=>F(i,t))}function e2(e,t){let r=Z8(e,t),n=k(r,Ct);return n!==void 0?n:Q(D(k(k(k(r,G),i=>F(i,"edges")),Ct),[]),i=>k(G(i),o=>F(o,"node")))}function e5(e,t){return Q(e2(e,t),G)}function t5(e,t){let r=(i,o)=>D(k(F(i,o),Mv),!1),n=(i,o)=>k(F(i,o),oe);return ne(k(k(k(Z8(e,t),G),i=>F(i,"pageInfo")),G),X8,i=>({hasNextPage:r(i,"hasNextPage"),hasPreviousPage:r(i,"hasPreviousPage"),startCursor:n(i,"startCursor"),endCursor:n(i,"endCursor")}))}function due(e,t){return t!==void 0&&t!==""?"Backward":e!==void 0&&e!==""?"Forward":"FirstPage"}function fue(e,t){return e.hasNextPage?!0:t==="Backward"}function hue(e,t){return e.hasPreviousPage?!0:t==="Forward"}let r5={};function ff(e,t,r,n){return k(jo(r,t),i=>k(F(e,i.queryField),o=>F(o.labels,n)))}function Xp(e,t,r,n){return k(jo(r,t),i=>k(i.namedRetirement,o=>k(k(F(e,i.queryField),a=>F(a.states,n)),a=>{let s=o.values;return zh(o,s!==void 0?a:!0)})))}function Zp(e,t,r,n,i){if(i)return!0;let o=jo(r,t);if(o===void 0)return!0;let a=F(e,o.queryField);return a!==void 0?ir(F(a.states,n)):!0}function em(e,t,r,n){let i=jo(r,t);if(i===void 0)return!1;let o=F(e,i.queryField);return o!==void 0&&o.loaded&&ne(o.asked,!0,a=>Ee(F(a,n)))?ir(F(o.labels,n)):!1}function pue(e){let t=Xe(e);if(typeof t!="object")return[];switch(t.TAG){case"JSONString":let r=t._0;return r!==""?[r]:[];case"JSONArray":return Q(t._0,oe).filter(n=>n!=="");default:return[]}}function mue(e,t,r,n){let i={},o=(l,c)=>Q(l,d=>k(F(d,c),G)),a=(l,c)=>l.map(d=>Q(D(k(F(d,c),Ct),[]),G)).flat(),s=(l,c,d)=>{c.forEach(f=>{let h=f.kind;if(typeof h!="object")return;switch(h.TAG){case"KEntityId":case"KArrayOfEntityIds":break;case"KArrayOfObjects":return d>0?s(a(l,f.key),di(h._0,"Drill",r,n,void 0,void 0),d-1|0):void 0;case"KNestedObject":return d>0?s(o(l,f.key),di(h._0,"Drill",r,n,void 0,void 0),d-1|0):void 0;default:return}let p=h._0;if(Xu(p,r,n))return;let m=jo(r,p);if(m!==void 0){l.forEach(g=>ee(F(g,f.key),v=>{pue(v).forEach(b=>{let y=m.queryField,S=D(F(i,y),[]);S.some(w=>w===b)||S.push(b),i[y]=S})}));return}})};return s(e,t,3),i}function gue(e){return $e(e).toSorted((r,n)=>wd(r[0],n[0])).map(r=>r[0]+":"+r[1].toSorted(wd).join(",")).join("|")}function n5(e){try{let t=atob(e),r=t.indexOf(":");return r>0&&r<(t.length-1|0)?t.slice(r+1|0):void 0}catch{return}}function vue(e,t){let r={},n={};return D(k(k(G(D(k(G(e),i=>F(i,"data")),e)),i=>F(i,t+"Refs")),Ct),[]).forEach(i=>{let o=G(i);if(o===void 0)return;let a=k(F(o,"id"),oe);if(a===void 0)return;let s=D(k(F(o,"label"),oe),a),l=D(k(F(o,"retired"),Mv),!1),c=D(k(F(o,"retiredState"),oe),""),d=f=>{if(r[f]=s,l){n[f]=c;return}};d(a),ee(n5(a),d)}),[r,n]}function bue(e,t){return Ee(k(k(G(D(k(G(e),r=>F(r,"data")),e)),r=>F(r,t+"Refs")),Ct))}function _ue(e,t,r){let n={};return e5(e,t).forEach(i=>{let o=k(F(i,"id"),oe),a=D(k(F(i,r),oe),"");if(o===void 0)return;let s=n5(o),l=r==="id"?s!==void 0?s:o:a===""?o:a;if(n[o]=l,s!==void 0){n[s]=l;return}}),n}function t2(e,t,r){let n=t.queryField,i=t.labelField,o=i==="id"?"id":"id "+i,a="query($ids: [ID!]!) { "+n+"Refs(ids: $ids) { id label retired retiredState } }",s="query($ids: [ID!]) { "+n+"(first: "+r.length.toString()+", filter: {ids: $ids}) { edges { node { "+o+" } } } }",l={};return l.ids=r.map(c=>c),e(a,l).then(c=>bue(c,n)?Promise.resolve(vue(c,n)):e(s,l).then(d=>[_ue(d,n,i),{}]))}let tm=Zt(void 0);function yue(){return St(tm)}function xue(){let e=St(tm);return e!==void 0?e.invalidate:t=>{}}let i5=tm.Provider;function Sue(e){let t=si(),r=ce(()=>r5),n=r[1],i=r[0],o=De({}),a=(g,v)=>n(b=>{let y=Oe($e(b)),S=Oe(ne(F(o.current,g),[],C=>C.ids).map(C=>[C,!0])),w={...v(F(b,g))};return w.asked=S,y[g]=w,y}),s=(g,v)=>{let b=Oe($e(g));return $e(v).forEach(y=>{b[y[0]]=y[1]}),b},l=(g,v,b,y)=>a(g,S=>{let w=y?void 0:S;return{loaded:!0,labels:s(ne(w,{},C=>C.labels),v),states:s(ne(w,{},C=>C.states),b)}}),c=De(g=>{}),d=(g,v,b)=>{let y=g.queryField;if(t===void 0)return;let S=(w,C)=>{l(y,w,C,b);let A=F(o.current,y);if(A!==void 0)return o.current[y]={entity:A.entity,ids:A.ids,refetching:!1,stale:!1},A.stale?c.current(y):void 0};Lt(t2(t,g,v).then(w=>S(w[0],w[1])),w=>(console.warn("[AutoUI] RefLabel batch "+y+" failed; cells fall back to raw ids",w),S({},{}),Promise.resolve()))},f=g=>{let v=F(o.current,g);if(v!==void 0&&v.ids.length!==0)if(v.refetching){o.current[g]={entity:v.entity,ids:v.ids,refetching:v.refetching,stale:!0};return}else return o.current[g]={entity:v.entity,ids:v.ids,refetching:!0,stale:!1},a(g,b=>{if(b===void 0)return{loaded:!1,labels:{},states:{}};let y={...b};return y.loaded=!1,y}),d(v.entity,v.ids,!0)};c.current=f;let h=$r((g,v)=>{$e(g).forEach(b=>{let y=b[0],S=F(o.current,y),w=ne(S,[],$=>$.ids),C=b[1].filter($=>!w.includes($));if(C.length===0)return;let A=v.find($=>$.queryField===y);if(A!==void 0)return o.current[y]={entity:A,ids:w.concat(C),refetching:ne(S,!1,$=>$.refetching),stale:ne(S,!1,$=>$.stale)},a(y,$=>{if($===void 0)return{loaded:!1,labels:{},states:{}};let R={...$};return R.loaded=!1,R}),d(A,C,!1)})},[t]),p=$r(f,[t]),m=Pt(()=>({entries:i,request:h,invalidate:p}),[i,h,p]);return ur(i5,{value:m,children:e.children})}let wue={provider:i5,make:Sue},o5={context:tm,use:yue,useInvalidate:xue,Provider:wue};function hf(e,t,r,n,i){let o=i!==void 0?i:!0,a=si(),s=St(tm),l=ce(()=>r5),c=l[1],d=o?mue(e,t,r,n):{},f=gue(d);return Ae(()=>{let h={contents:!1};return f!==""&&(s!==void 0?s.request(d,r):a!==void 0&&$e(d).forEach(p=>{let m=p[1];if(m.length===0)return;let g=p[0],v=r.find(b=>b.queryField===g);if(v!==void 0){Lt(t2(a,v,m).then(b=>{if(h.contents)return;let y=b[1],S=b[0];c(w=>{let C=Oe($e(w));return C[g]={loaded:!0,labels:S,states:y},C})}),b=>(h.contents||(console.warn("[AutoUI] RefLabel batch "+g+" failed; cells fall back to raw ids",b),c(y=>{let S=Oe($e(y));return S[g]={loaded:!0,labels:{},states:{}},S})),Promise.resolve()));return}})),()=>{h.contents=!0}},[f,a]),s!==void 0?s.entries:l[0]}let Eue=[],a5={registry:Eue},fa="table",ml={contents:[]};function ya(e){ml.contents.some(t=>t.id===e.id)?ml.contents=ml.contents.map(t=>t.id===e.id?e:t):ml.contents=ml.contents.concat([e])}function s5(e){return ml.contents.find(t=>t.id===e)}function ov(){return ml.contents}function r2(e,t){let r=t!==void 0?t:a5,n=bn(e,void 0,void 0),i=ml.contents.filter(o=>{let a=o.arity;return typeof a!="object"||a.TAG==="Multi"?o.isCapable(e,n,r):!1});return i.filter(o=>o.id===fa).concat(i.filter(o=>o.id!==fa))}function n2(e){return OJ(e.map(t=>t.window))}function kue(e){return nt(e,0,(t,r)=>t+r.rows.length|0)}function rm(e,t,r){let n=r!==void 0?r:"item";return BO(n2(e),kue(e),t,n)}function l5(e){try{return Mi(localStorage.getItem(e))}catch{return}}function Cue(e,t){try{return localStorage.setItem(e,t)}catch{return}}function i2(e,t,r){return"autoui.viewmode."+D(e,"default")+"."+t+ne(r,"",n=>"."+n)}function Rue(e){try{return G(JSON.parse(e))}catch{return}}function o2(e){return q(l5(e),t=>{let r=Rue(t);if(r===void 0)return{mode:t};let n=k(F(r,"mode"),oe);return n!==void 0?{mode:n,band:k(k(F(r,"band"),oe),Jn.bandOfName)}:{mode:t}})}function a2(e,t,r){let n={};n.mode=t,n.band=Jn.bandName(r),Cue(e,JSON.stringify(n))}function wl(e){return"var("+e+")"}let u5=E([z("inlineFlex"),X("center"),u("border","1px solid var("+x.border+")"),u("border-radius",wl(Y.md)),u("overflow","hidden")]),s2=E([z("inlineFlex"),X("center"),u("gap","4px"),u("background","none"),u("border","none"),u("padding","2px var("+O.sm+")"),u("color",wl(x.textSecondary)),u("font-size",wl(T.sizeSm)),Ce("pointer"),Ue([u("background",wl(x.surfaceSubtle)),u("color",wl(x.textPrimary))])]),c5=yr([s2,E([u("background",wl(x.surfaceSubtle)),u("color",wl(x.textPrimary)),u("font-weight",wl(T.weightMedium))])]),d5=E([Va(Jn.compact,[u("display","none")])]),Aue={group:u5,btn:s2,btnActive:c5,btnLabel:d5};function Tue(e){let t=e.onSelect,r=e.activeId;return _("div",{children:e.modes.map(n=>L("button",{children:[n.icon,_("span",{children:n.label,className:d5})],"aria-label":n.label,"aria-pressed":n.id===r?"true":"false",className:n.id===r?c5:s2,title:n.label,onClick:i=>t(n.id)},n.id)),"aria-label":"View mode",className:u5,role:"group"})}let Da={Style:Aue,make:Tue};function $ue(e){let t=e.source,r=ga(),n=Ap(),i=di(t.schema,"List",r,t.ownEntity,t.semantics.labelField,t.semantics.projectedLabelField),o=t.rows.map((d,f)=>{let h=D(G(d),{});return{rowKey:D(k(F(h,"id"),oe),"#"+f.toString()),json:d,dict:h}}),a=hf(o.map(d=>d.dict),i,r,t.ownEntity,ir(t.refLabels)),s=t.refLabels,l=s!==void 0?s:{lookupLabel:(d,f)=>ff(a,d,r,f),isMissing:(d,f)=>em(a,d,r,f),retiredBadge:(d,f)=>Xp(a,d,r,f),linkable:(d,f)=>Zp(a,d,r,f,!1)},c=i.map(d=>({key:d.key,label:Au(d,r,t.ownEntity),render:f=>Sl(d.key,d.kind,d.propSchema,F(f.dict,d.key),d.ann,r,n,l,t.ownEntity),sortable:!1,width:d.width}));return _(Oh,{columns:c,data:o,keyFn:d=>d.rowKey,onRowClick:d=>t.onOpenRow(d.rowKey,d.json)})}let Nue=_("span",{children:"▦","aria-hidden":!0,style:{fontSize:"0.9em",lineHeight:"1"}});ya({id:fa,label:"Table",icon:Nue,arity:"Single",isCapable:(e,t,r)=>!0,render:e=>{let t=e[0];return t!==void 0?_($ue,{source:t}):null},capability:"always — the universal default"});let wN=["resources","events"],EN=["split","full"],kN=["funnel","scatter"],i0={};function hn(e,t){return k(e.views,r=>F(r,t))}function Qa(e,t){return k(e.fields,r=>F(r,t))}function On(e,t){console.error("[AutoUI] ui-hints "+e+": "+t)}function jr(e,t,r){let n=e[t];if(n===void 0)return;let i=me.string(n);if(i!==void 0)return i;On(r+"."+t,"expected a string — dropped")}function gS(e,t,r){let n=e[t];if(n===void 0)return;let i=me.bool(n);if(i!==void 0)return i;On(r+"."+t,"expected a boolean — dropped")}function Due(e,t,r){let n=e[t];if(n===void 0)return;let i=me.float(n);if(i!==void 0){if(i===Math.trunc(i))return i|0;On(r+"."+t,"expected a whole number — dropped");return}else{On(r+"."+t,"expected a number — dropped");return}}function my(e,t,r){let n=e[t];if(n===void 0)return;let i=me.array(n);if(i!==void 0)return Q(i,me.string);On(r+"."+t,"expected an array of strings — dropped")}function CN(e,t,r,n){let i=e[t];if(i===void 0)return;let o=me.object(i);if(o!==void 0){let a={};return Object.entries(o).forEach(s=>{let l=s[0];ee(n(s[1],r+"."+t+'["'+l+'"]'),c=>{a[l]=c})}),a}On(r+"."+t,"expected an object — dropped")}function f5(e,t){let r=me.object(e);if(r!==void 0){let n={};return Object.entries(r).forEach(i=>{let o=i[0],a=me.string(i[1]);if(a!==void 0){n[o]=a;return}else return On(t+"."+o,"expected a string — dropped")}),n}On(t,"expected an object of string values — dropped")}function Fue(e,t){let r=me.object(e);if(r!==void 0)return{label:jr(r,"label",t),scopedLabel:jr(r,"scopedLabel",t),group:jr(r,"group",t),order:Due(r,"order",t),hidden:gS(r,"hidden",t)};On(t,"expected an object — dropped")}function Iue(e,t){let r=me.object(e);if(r!==void 0){let n=jr(r,"pluginId",t),i=jr(r,"slice",t),o=jr(r,"command",t),a=jr(r,"field",t);if(n!==void 0&&i!==void 0&&o!==void 0&&a!==void 0)return{label:jr(r,"label",t),pluginId:n,slice:i,command:o,field:a,then:jr(r,"then",t)};On(t,"a row action needs pluginId, slice, command and field — dropped");return}On(t,"expected an object — dropped")}function Pue(e,t){let r=me.object(e);if(r!==void 0){let n=r.nav,i=r.rowActions,o;if(i!==void 0){let s=me.array(i);s!==void 0?o=xw(s,(l,c)=>Iue(l,t+".rowActions["+c.toString()+"]")):(On(t+".rowActions","expected an array of row actions — dropped"),o=void 0)}else o=void 0;let a=r.transitions;return{mode:jr(r,"mode",t),layout:jr(r,"layout",t),canvas:jr(r,"canvas",t),role:jr(r,"role",t),resourceRef:jr(r,"resourceRef",t),accent:jr(r,"accent",t),audit:gS(r,"audit",t),presence:gS(r,"presence",t),related:my(r,"related",t),nav:n!==void 0?Fue(n,t+".nav"):void 0,rowActions:o,suppressRowActions:my(r,"suppressRowActions",t),retiredLabel:jr(r,"retiredLabel",t),suppress:my(r,"suppress",t),transitions:a!==void 0?f5(a,t+".transitions"):void 0}}On(t,"expected an object — dropped")}function Oue(e,t){let r=me.object(e);if(r!==void 0){let n=jr(r,"view",t);if(n!==void 0)return{view:n,label:jr(r,"label",t),field:jr(r,"field",t),aggregate:jr(r,"aggregate",t),viz:jr(r,"viz",t),xField:jr(r,"xField",t)};On(t,"metric without a `view` — dropped");return}On(t,"expected an object — dropped")}function Mue(e,t){let r=e!==void 0?e:"ui-hints",n=me.object(t);if(n!==void 0){let i=n.dashboard,o;if(i!==void 0){let a=me.array(i);a!==void 0?o=xw(a,(s,l)=>Oue(s,r+".dashboard["+l.toString()+"]")):(On(r+".dashboard","expected an array of metrics — dropped"),o=void 0)}else o=void 0;return{views:CN(n,"views",r,Pue),fields:CN(n,"fields",r,f5),dashboard:o}}return On(r,"expected an object — no hints applied"),i0}function Lue(e){let t=me.object(e);if(t!==void 0){let r={};return Object.entries(t).forEach(n=>{let i=n[0];r[i]=Mue('ui-hints["'+i+'"]',n[1])}),r}return On("ui-hints.json","top-level value is not a {pluginId: hints} object — ignored"),{}}function zue(e,t){let r={};return Object.entries(e).forEach(n=>{r[n[0]]=n[1]}),Object.entries(t).forEach(n=>{let i=n[0];Ee(e[i])&&console.info("[AutoUI] uiHints ("+i+"): code-supplied hints replace the ui-hints.json entry"),r[i]=n[1]}),r}function cu(e){return D(q(k(k(G(vn(e)),t=>F(t,"properties")),G),t=>Object.keys(t)),[])}function Uue(e,t){return k(k(q(k(k(k(G(vn(e)),r=>F(r,"properties")),G),r=>F(r,t)),vn),G),r=>F(r,"items"))}function gy(e,t){let r=t.split("."),n=D(r[0],t),i=e.readModels.find(a=>a.name===n),o=i!==void 0?i.schema:q(e.stateViewSlices.find(a=>a.name===n),a=>a.schema);return o!==void 0?nt(r.slice(1),{TAG:"Ok",_0:{schema:o}},(a,s)=>{if(a.TAG!=="Ok")return a;let l=a._0.schema,c=Uue(l,s);return c!==void 0?{TAG:"Ok",_0:{schema:c}}:cu(l).includes(s)?ne(k(k(k(G(vn(l)),d=>F(d,"properties")),G),d=>F(d,s)),{TAG:"Error",_0:'unresolvable path segment "'+s+'" in "'+t+'"'},d=>({TAG:"Ok",_0:{schema:d}})):{TAG:"Error",_0:'unknown field "'+s+'" in path "'+t+'"'}}):{TAG:"Error",_0:'unknown view "'+n+'" — known views: '+e.readModels.map(a=>a.name).concat(e.stateViewSlices.map(a=>a.name)).join(", ")}}function Bue(e){return e.aggregates.flatMap(t=>t.commands).concat(e.stateChangeSlices.flatMap(t=>t.commands).concat(e.readModels.flatMap(t=>t.commands))).map(t=>t.name)}function h5(e,t){let r=e.readModels.find(n=>n.name===t);return r!==void 0?r.lifecycleField:k(e.stateViewSlices.find(n=>n.name===t),n=>n.lifecycleField)}function jue(e,t){let r=e.readModels.find(n=>n.name===t);return r!==void 0?r.ownerField:k(e.stateViewSlices.find(n=>n.name===t),n=>n.ownerField)}function que(e,t,r){let n=Wn(h5(e,t),bn(r,void 0,void 0).statusField);return n!==void 0?co(r,n):[]}function Vue(e){return Nr(e).filter(t=>Fs(t[1])).map(t=>t[0])}function RN(e,t){if(s5(e)!==void 0)return;let n=ov().map(i=>i.id).join(", ");return t+': unknown view-mode id "'+e+'" — registered modes: '+n}function Gue(e,t){let r=e.aggregates.find(i=>i.name===t);if(r!==void 0)return{TAG:"Ok",_0:r.commands};let n=e.stateChangeSlices.find(i=>i.name===t);return n!==void 0?{TAG:"Ok",_0:n.commands}:{TAG:"Error",_0:e.aggregates.map(i=>i.name).concat(e.stateChangeSlices.map(i=>i.name))}}function Kue(e,t,r,n){let i=r!==void 0?r:[],o=n!==void 0?n:{},a=i.length===0?[t]:i,s=[],l=c=>{s.push("[AutoUI] uiHints ("+t.id+"): "+c)};return ee(e.views,c=>{$e(c).forEach(d=>{let f=d[1],h=d[0],p=gy(t,h);p.TAG!=="Ok"&&l('views["'+h+'"]: '+p._0),ee(f.role,m=>{if(!wN.includes(m))return l('views["'+h+'"].role: unknown role "'+m+'" — expected '+wN.join(" or "));if(m!=="events")return;let g=f.resourceRef;return g!==void 0?p.TAG==="Ok"&&!cu(p._0.schema).includes(g)?l('views["'+h+'"].resourceRef: unknown field "'+g+'"'):void 0:l('views["'+h+'"]: role "events" requires a resourceRef field')}),ee(f.resourceRef,m=>{if(ca(f.role,"events"))return l('views["'+h+'"].resourceRef: only meaningful with role "events"')}),ee(f.transitions,m=>{let g=Bue(t),v=h5(t,h),b;b=p.TAG==="Ok"?v!==void 0?co(p._0.schema,v):[]:[],b.length===0&&l('views["'+h+'"].transitions: the view declares no status enum, so no transition can apply'),$e(m).forEach(y=>{let S=y[1],w=y[0];if(g.includes(S)||l('views["'+h+'"].transitions["'+w+'"]: unknown command "'+S+'" — known commands: '+g.join(", ")),b.length!==0&&!b.includes(w))return l('views["'+h+'"].transitions: unknown target state "'+w+'" — known states: '+b.join(", "))})}),ee(f.nav,m=>{h.includes(".")&&l('views["'+h+'"].nav: a nested path has no menu entry of its own — nav belongs on the top-level view'),[["label",m.label],["scopedLabel",m.scopedLabel],["group",m.group]].forEach(g=>{let v=g[0];ee(g[1],b=>{if(b.trim()==="")return l('views["'+h+'"].nav.'+v+": blank — an empty "+v+" renders nothing, so it is ignored")})}),ee(m.scopedLabel,g=>{if(!h.includes(".")&&ir(jue(t,h)))return l('views["'+h+'"].nav.scopedLabel: the view declares no @owner field, so no caller is narrowed to their own rows and this label never renders')})}),ee(f.rowActions,m=>{h.includes(".")&&m.length!==0&&l('views["'+h+'"].rowActions: a nested path names a collection drilled into inside a detail, not a view whose rows an action can be declared about — they belong on the top-level view'),m.forEach((g,v)=>{let b='views["'+h+'"].rowActions['+v.toString()+"]",y=a.find(S=>S.id===g.pluginId);if(y!==void 0){let S=Gue(y,g.slice);if(S.TAG==="Ok"){let w=S._0,C=w.find(A=>A.name===g.command);if(C!==void 0){let A=cu(C.schema);A.includes(g.field)||l(b+': unknown field "'+g.field+'" on command "'+g.command+'" — known fields: '+A.join(", "))}else l(b+': unknown command "'+g.command+'" in "'+g.slice+'" — known commands: '+w.map(A=>A.name).join(", "))}else l(b+': unknown slice "'+g.slice+'" in plugin "'+g.pluginId+'" — known aggregates and slices: '+S._0.join(", "))}else l(b+': unknown plugin "'+g.pluginId+'" — known plugins: '+a.map(S=>S.id).join(", "));ee(g.then,S=>{if(S.trim()==="")return l(b+".then: blank — an empty route navigates nowhere, so it is ignored")})})}),ee(f.suppressRowActions,m=>{h.includes(".")&&m.length!==0&&l('views["'+h+'"].suppressRowActions: a nested path names a collection drilled into inside a detail, not a view whose rows an action can be offered on — they belong on the top-level view');let g=D(f.rowActions,[]).map(y=>y.pluginId+"."+y.slice+"."+y.command),v=D(F(o,h),[]),b=g.concat(v);m.forEach((y,S)=>{let w='views["'+h+'"].suppressRowActions['+S.toString()+"]";return y.trim()===""?l(w+": blank — an empty pointer names no action, so it is ignored"):b.some(C=>C===y)?void 0:l(w+': "'+y+'" matches no declared or inferred action on this view — '+(b.length!==0?"it offers "+b.join(", "):"it offers none"))})}),ee(f.retiredLabel,m=>{if(m.trim()==="")return l('views["'+h+'"].retiredLabel: blank — an empty label renders an empty badge, so it is ignored');if(p.TAG!=="Ok")return;let g=Op(p._0.schema);return g!==void 0?g[1].values!==void 0?l('views["'+h+'"].retiredLabel: "'+g[0]+'" retires the row by its lifecycle state, so each row badges by the state it is in — rename the states themselves to change the word'):void 0:l('views["'+h+'"].retiredLabel: the view declares no @retired field, so there is no retirement state to label')}),ee(f.mode,m=>ee(RN(m,'views["'+h+'"].mode'),l)),ee(f.layout,m=>{if(!EN.includes(m))return l('views["'+h+'"].layout: unknown layout "'+m+'" — expected '+EN.join(" or "))}),ee(f.suppress,m=>{m.forEach(g=>{if(ee(RN(g,'views["'+h+'"].suppress'),l),g===fa)return l('views["'+h+'"].suppress: the "table" mode is the universal fallback and cannot be suppressed')})})})}),ee(e.fields,c=>{$e(c).forEach(d=>{let f=d[0],h=gy(t,f);if(h.TAG!=="Ok")return l('fields["'+f+'"]: '+h._0);let p=cu(h._0.schema);$e(d[1]).forEach(m=>{let g=m[1],v=m[0];if(p.includes(v)||l('fields["'+f+'"]: unknown field "'+v+'"'),ir(Ow(g)))return l('fields["'+f+'"].'+v+': unknown semantic "'+g+'"')})})}),ee(e.dashboard,c=>{c.forEach(d=>{let f=D(d.aggregate,"count");["count","sum","avg"].includes(f)?f!=="count"&&ir(d.field)&&l('dashboard metric on "'+d.view+'": aggregate "'+f+'" requires a field'):l('dashboard metric on "'+d.view+'": unknown aggregate "'+f+'" — expected count, sum, or avg');let h=gy(t,d.view);if(h.TAG!=="Ok")return l("dashboard metric: "+h._0);let p=h._0.schema;ee(d.field,m=>{if(!cu(p).includes(m))return l('dashboard metric on "'+d.view+'": unknown field "'+m+'"')}),ee(d.xField,m=>{if(!cu(p).includes(m))return l('dashboard metric on "'+d.view+'": unknown xField "'+m+'"')}),ee(d.viz,m=>{if(!kN.includes(m))return l('dashboard metric on "'+d.view+'": unknown viz "'+m+'" — expected '+kN.join(", "));if(m==="funnel"&&que(t,d.view,p).length===0)return l('dashboard metric on "'+d.view+'": viz "funnel" needs a status enum to order the stages, and this view declares none');if(m!=="scatter")return;let g=d.field,v=d.xField;if(g!==void 0&&v!==void 0){let b=cu(p),y=Vue(p);[["field",g],["xField",v]].forEach(S=>{let w=S[1];if(b.includes(w)&&!y.includes(w))return l('dashboard metric on "'+d.view+'": viz "scatter" '+S[0]+' "'+w+'" is not a numeric field')});return}l('dashboard metric on "'+d.view+'": viz "scatter" needs both a field (the y measure) and an xField (the x measure)')})})}),s.forEach(c=>{console.error(c)}),s}function l2(e,t,r){let i=r2(e,r!==void 0?r:a5),o=k(t,a=>a.suppress);return o!==void 0?i.filter(a=>a.id===fa?!0:!o.includes(a.id)):i}let Hue="cards";function u2(e,t,r,n,i){let o=m=>k(m,g=>i.find(v=>v.id===g)),a=Re(n,"Tight"),s=m=>{if(!a)return!0;let g=m.band;return g!==void 0?Jn.atLeastAsNarrow(g,"Tight"):!1},l=q(e,m=>m.mode),c=o(k(e,m=>{if(s(m))return m.mode}));if(c!==void 0)return c;let d=o(k(t,m=>m.mode));if(d!==void 0)return d;let f=o(r);if(f!==void 0)return f;let h=a?o(Hue):void 0;if(h!==void 0)return h;let p=o(l);return p!==void 0?p:i[0]}function vy(e){switch(e){case"full":return"Full";case"split":return"Split";default:return}}function Wue(e,t,r,n){if(!n)return"Full";let i=k(e,vy);if(i!==void 0)return i;let o=k(k(t,a=>a.layout),vy);return o!==void 0?o:D(k(r,vy),"Full")}function Jue(e,t){return D(k(e,r=>r.audit),!1)?!0:t}function Que(e){return D(k(e,t=>t.presence),!1)}function Yue(e){return k(e,t=>t.related)}function Xue(e){return e.toLowerCase()==="hide"?"Hide":"Lock"}function Zc(e,t){return t!==void 0&&t.length!==0?t.some(r=>e.includes(r)):!0}function p5(e){return k(e,t=>t[0])}function Zue(e,t){let r=n=>n.filter(i=>Zc(e,i.requiredAccess));return t.map(n=>{let i={...n};return i.internalQueryables=q(n.internalQueryables,o=>o.filter(a=>Zc(e,a.requiredAccess))),i.stateChangeSlices=n.stateChangeSlices.map(o=>{let a={...o};return a.commands=r(o.commands),a}),i.stateViewSlices=n.stateViewSlices.filter(o=>Zc(e,o.requiredAccess)),i.aggregates=n.aggregates.map(o=>{let a={...o};return a.commands=r(o.commands),a}),i.readModels=n.readModels.filter(o=>Zc(e,o.requiredAccess)).map(o=>{let a={...o};return a.commands=r(o.commands),a}),i})}function ece(e,t){let r={},n=(i,o)=>{let a=!Zc(e,o),s=p5(o);if(a&&s!==void 0){r[i]=s;return}};return t.forEach(i=>{i.readModels.forEach(o=>n(o.name,o.requiredAccess)),i.stateViewSlices.forEach(o=>n(o.name,o.requiredAccess))}),r}function tce(e,t){let r={},n=(i,o)=>{if(o.length!==0&&o.every(a=>!Zc(e,a.requiredAccess)))return ee(k(o[0],a=>p5(a.requiredAccess)),a=>{r[i]=a})};return t.forEach(i=>{i.aggregates.forEach(o=>n(o.name,o.commands)),i.stateChangeSlices.forEach(o=>n(o.name,o.commands))}),r}function rce(e,t,r){return e==="Lock"?[r,ece(t,r),tce(t,r)]:[Zue(t,r),{},{}]}let nce=[u(x.background,"#0d1117"),u(x.surface,"#161b22"),u(x.surfaceSubtle,"#1c2128"),u(x.surfaceElevated,"#21262d"),u(x.brand,"#2f81f7"),u(x.brandSubtle,"#1f4b8e"),u(x.success,"#3fb950"),u(x.warning,"#d29922"),u(x.error,"#f85149"),u(x.info,"#58a6ff"),u(x.textPrimary,"#e6edf3"),u(x.textSecondary,"#8b949e"),u(x.textDisabled,"#484f58"),u(x.textOnBrand,"#ffffff"),u(x.border,"#30363d"),u(x.borderSubtle,"#21262d"),u(O.xs,"4px"),u(O.sm,"8px"),u(O.md,"16px"),u(O.lg,"24px"),u(O.xl,"32px"),u(O.xxl,"48px"),u(T.fontFamily,"-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"),u(T.fontFamilyMono,"'SFMono-Regular', Consolas, 'Liberation Mono', monospace"),u(T.sizeXs,"11px"),u(T.sizeSm,"12px"),u(T.sizeMd,"14px"),u(T.sizeLg,"16px"),u(T.sizeXl,"20px"),u(T.sizeXxl,"24px"),u(T.weightNormal,"400"),u(T.weightMedium,"500"),u(T.weightBold,"600"),u(T.lineHeightTight,"1.25"),u(T.lineHeightNormal,"1.5"),u(T.lineHeightRelaxed,"1.75"),u(Y.sm,"4px"),u(Y.md,"6px"),u(Y.lg,"12px"),u(Y.full,"9999px"),u(Zr.sm,"0 1px 3px rgba(0,0,0,0.4)"),u(Zr.md,"0 4px 12px rgba(0,0,0,0.5)"),u(Zr.lg,"0 8px 24px rgba(0,0,0,0.6)")],ice=[u(x.background,"#ffffff"),u(x.surface,"#f6f8fa"),u(x.surfaceSubtle,"#eaeef2"),u(x.surfaceElevated,"#ffffff"),u(x.brand,"#0969da"),u(x.brandSubtle,"#ddf4ff"),u(x.success,"#1a7f37"),u(x.warning,"#9a6700"),u(x.error,"#cf222e"),u(x.info,"#0550ae"),u(x.textPrimary,"#1f2328"),u(x.textSecondary,"#636c76"),u(x.textDisabled,"#bec1c5"),u(x.textOnBrand,"#ffffff"),u(x.border,"#d0d7de"),u(x.borderSubtle,"#eaeef2"),u(O.xs,"4px"),u(O.sm,"8px"),u(O.md,"16px"),u(O.lg,"24px"),u(O.xl,"32px"),u(O.xxl,"48px"),u(T.fontFamily,"-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"),u(T.fontFamilyMono,"'SFMono-Regular', Consolas, 'Liberation Mono', monospace"),u(T.sizeXs,"11px"),u(T.sizeSm,"12px"),u(T.sizeMd,"14px"),u(T.sizeLg,"16px"),u(T.sizeXl,"20px"),u(T.sizeXxl,"24px"),u(T.weightNormal,"400"),u(T.weightMedium,"500"),u(T.weightBold,"600"),u(T.lineHeightTight,"1.25"),u(T.lineHeightNormal,"1.5"),u(T.lineHeightRelaxed,"1.75"),u(Y.sm,"4px"),u(Y.md,"6px"),u(Y.lg,"12px"),u(Y.full,"9999px"),u(Zr.sm,"0 1px 3px rgba(0,0,0,0.08)"),u(Zr.md,"0 4px 12px rgba(0,0,0,0.12)"),u(Zr.lg,"0 8px 24px rgba(0,0,0,0.16)")],oce=[u(x.background,"#f5f5f5"),u(x.surface,"#ffffff"),u(x.surfaceSubtle,"#eeeeee"),u(x.surfaceElevated,"#ffffff"),u(x.brand,"#424242"),u(x.brandSubtle,"#e0e0e0"),u(x.success,"#388e3c"),u(x.warning,"#f57c00"),u(x.error,"#d32f2f"),u(x.info,"#1976d2"),u(x.textPrimary,"#212121"),u(x.textSecondary,"#757575"),u(x.textDisabled,"#bdbdbd"),u(x.textOnBrand,"#ffffff"),u(x.border,"#bdbdbd"),u(x.borderSubtle,"#e0e0e0"),u(O.xs,"4px"),u(O.sm,"8px"),u(O.md,"16px"),u(O.lg,"24px"),u(O.xl,"32px"),u(O.xxl,"48px"),u(T.fontFamily,"-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"),u(T.fontFamilyMono,"'SFMono-Regular', Consolas, 'Liberation Mono', monospace"),u(T.sizeXs,"11px"),u(T.sizeSm,"12px"),u(T.sizeMd,"14px"),u(T.sizeLg,"16px"),u(T.sizeXl,"20px"),u(T.sizeXxl,"24px"),u(T.weightNormal,"400"),u(T.weightMedium,"500"),u(T.weightBold,"600"),u(T.lineHeightTight,"1.25"),u(T.lineHeightNormal,"1.5"),u(T.lineHeightRelaxed,"1.75"),u(Y.sm,"4px"),u(Y.md,"6px"),u(Y.lg,"12px"),u(Y.full,"9999px"),u(Zr.sm,"0 1px 3px rgba(0,0,0,0.12)"),u(Zr.md,"0 4px 12px rgba(0,0,0,0.14)"),u(Zr.lg,"0 8px 24px rgba(0,0,0,0.18)")],ace=[u(x.background,"#000000"),u(x.surface,"#0a0a0a"),u(x.surfaceSubtle,"#111111"),u(x.surfaceElevated,"#1a1a1a"),u(x.brand,"#ffdd00"),u(x.brandSubtle,"#332b00"),u(x.success,"#00ff00"),u(x.warning,"#ffaa00"),u(x.error,"#ff4444"),u(x.info,"#44aaff"),u(x.textPrimary,"#ffffff"),u(x.textSecondary,"#cccccc"),u(x.textDisabled,"#555555"),u(x.textOnBrand,"#000000"),u(x.border,"#ffffff"),u(x.borderSubtle,"#888888"),u(O.xs,"4px"),u(O.sm,"8px"),u(O.md,"16px"),u(O.lg,"24px"),u(O.xl,"32px"),u(O.xxl,"48px"),u(T.fontFamily,"-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"),u(T.fontFamilyMono,"'SFMono-Regular', Consolas, 'Liberation Mono', monospace"),u(T.sizeXs,"11px"),u(T.sizeSm,"12px"),u(T.sizeMd,"14px"),u(T.sizeLg,"16px"),u(T.sizeXl,"20px"),u(T.sizeXxl,"24px"),u(T.weightNormal,"400"),u(T.weightMedium,"500"),u(T.weightBold,"600"),u(T.lineHeightTight,"1.25"),u(T.lineHeightNormal,"1.5"),u(T.lineHeightRelaxed,"1.75"),u(Y.sm,"4px"),u(Y.md,"6px"),u(Y.lg,"12px"),u(Y.full,"9999px"),u(Zr.sm,"0 1px 3px rgba(255,255,255,0.1)"),u(Zr.md,"0 4px 12px rgba(255,255,255,0.15)"),u(Zr.lg,"0 8px 24px rgba(255,255,255,0.2)")];function ig(e,t){let r=t!==void 0?[u(x.brand,t.primaryColor)]:[];return E(e.concat(r))}function sce(e){let t=e.theme,r=t.preset,n;switch(r){case"Dark":n=ig(nce,t.brand);break;case"Light":n=ig(ice,t.brand);break;case"Neutral":n=ig(oce,t.brand);break;case"HighContrast":n=ig(ace,t.brand);break}return _("div",{children:e.children,className:n})}let lce=sce;function uce(e){}let cce={preset:"Light",setPreset:uce},m5=Zt(cce),dce=m5.Provider;function fce(){return St(m5)}let g5="reventless-ui:theme",hce=["Light","Dark","Neutral","HighContrast"];function pce(e){switch(e){case"Dark":return"Dark";case"HighContrast":return"HighContrast";case"Light":return"Light";case"Neutral":return"Neutral";default:return}}function mce(e){switch(e){case"Dark":return"Dark";case"HighContrast":return"HighContrast";case"Neutral":return"Neutral";default:return"Light"}}function v5(e){switch(e){case"Dark":return"Dark";case"Light":return"Light";case"Neutral":return"Neutral";case"HighContrast":return"HighContrast"}}function gce(e){let t=localStorage.getItem(g5);return t==null?e:mce(t)}function vce(e){let t=e.initialPreset,r=t!==void 0?t:"Light",n=ce(()=>gce(r)),i=n[1],o=n[0],a=$r(l=>{localStorage.setItem(g5,v5(l)),i(c=>l)},[]),s=Pt(()=>({preset:o,setPreset:a}),[o,a]);return _(dce,{value:s,children:_(lce,{theme:{preset:o,brand:e.brand},children:e.children})})}let bce={make:vce};function b5(e){return e.startsWith("/")?!e.startsWith("//"):!1}function _ce(e){let t;e.startsWith("https://")?t="wss://"+e.slice(8):e.startsWith("http://")?t="ws://"+e.slice(7):b5(e)?t=(location.protocol==="https:"?"wss":"ws")+"://"+location.host+e:t=e;let r=t.replace("appsync-api.","appsync-realtime-api.");return r.endsWith("/realtime")?r:r+"/realtime"}function yce(e){let t=e.startsWith("https://")?e.slice(8):e.startsWith("http://")?e.slice(7):b5(e)?location.host:e,r=t.indexOf("/");return r!==-1?t.slice(0,r):t}function xce(e){return btoa(e).replaceAll("+","-").replaceAll("/","_").replaceAll("=","")}function Sce(e,t){let r=JSON.stringify(Object.fromEntries([["host",e],["Authorization",t]]));return"header-"+xce(r)}function wce(e){return e===4401?!0:e===4403}function o0(e,t){if(e.state===t)return;let r=e.state;e.state=t;let n=0;switch(t){case"Closed":case"Connecting":n=1;break;case"Open":let i=e.disconnectedSince;if(i!==void 0){let o=Date.now()-i;e.disconnectedSince=void 0,ee(e.onReconnect,a=>a(o))}break}n===1&&r==="Open"&&(e.disconnectedSince=Date.now()),ee(e.onStateChange,i=>i(t))}function Ece(e){switch(e){case 1:return 1e3;case 2:return 2e3;case 3:return 4e3;case 4:return 8e3;case 5:return 16e3;default:return 3e4}}let kce='{"type":"connection_init"}';function vS(e,t){let r=e.ws,n=e.getToken();if(r===void 0||n===void 0)return;let i=Object.fromEntries([["host",e.host],["Authorization",n]]),o=JSON.stringify(Object.fromEntries([["type","subscribe"],["id",t.id],["channel",t.channel],["authorization",i]]));try{Rt(r).send(o);return}catch{return}}function Cce(e,t){let r=e.ws;if(r===void 0)return;let n=JSON.stringify(Object.fromEntries([["type","unsubscribe"],["id",t]]));try{Rt(r).send(n);return}catch{return}}function Rce(e){e.subscriptions.forEach(t=>vS(e,t))}function Ace(e,t){let r;try{r=JSON.parse(t)}catch{r=void 0}let n=k(r,me.object);if(n===void 0)return;let i=k(n.type,me.string);if(i!==void 0)switch(i){case"connection_ack":o0(e,"Open"),e.reconnectAttempts=0;let o=e.pendingPostAck;return e.pendingPostAck=[],o.forEach(h=>h()),Rce(e);case"data":let a=k(n.id,me.string),s=D(n.event,null),l=h=>{let p=me.string(h);if(p===void 0)return h;try{return JSON.parse(p)}catch{return h}},c=me.array(s),d=c!==void 0?c.map(l):[l(s)],f=k(a,h=>e.subscriptions.get(h));if(f!==void 0){d.forEach(h=>f.onMessage(h));return}else return;default:return}}function _5(e){if(e.disposed)return;let t=["aws-appsync-event-ws"],r=e.getToken(),n=r!==void 0?t.concat([Sce(e.host,r)]):t,i=new WebSocket(e.url,n);e.ws=Dt(i),o0(e,"Connecting"),i.onopen=()=>{try{i.send(kce);return}catch{return}},i.onmessage=o=>Ace(e,o.data),i.onclose=o=>{if(e.ws=void 0,wce(o.code))return o0(e,"Unauthorized"),ee(e.onAuthFailure,s=>{try{return s()}catch{return}});if(o0(e,"Closed"),e.disposed)return;let a=e.reconnectAttempts+1|0;e.reconnectAttempts=a,e.reconnectTimer=setTimeout(()=>_5(e),Ece(a))},i.onerror=o=>{}}function Tce(e,t,r,n,i,o){let a={ws:void 0,state:"Closed",url:e,host:t,getToken:r,subscriptions:new Map,pendingPostAck:[],reconnectAttempts:0,reconnectTimer:void 0,disposed:!1,onStateChange:n,disconnectedSince:void 0,onReconnect:i,onAuthFailure:o};return _5(a),a}function $ce(e,t,r){let n=crypto.randomUUID(),i={id:n,channel:t,onMessage:r};return e.subscriptions.set(n,i),e.state==="Open"?vS(e,i):e.pendingPostAck.push(()=>vS(e,i)),()=>{if(e.subscriptions.has(n))return e.subscriptions.delete(n),Cce(e,n)}}function AN(e){e.disposed=!0;let t=e.reconnectTimer;t!==void 0&&clearTimeout(t),e.reconnectTimer=void 0;let r=e.ws;if(r!==void 0)try{Rt(r).close()}catch{}e.ws=void 0,e.subscriptions.clear()}async function Nce(e,t,r,n){let i=JSON.stringify(Object.fromEntries([["channel",r],["events",n.map(a=>JSON.stringify(a))]])),o=Object.fromEntries([["Content-Type","application/json"]]);t!==void 0&&(o.Authorization=t);try{let a=await fetch(e,{method:"POST",headers:o,body:i});return a.ok?{TAG:"Ok",_0:void 0}:{TAG:"Error",_0:"publish failed with status "+a.status.toString()}}catch(a){let s=Ns(a);return s.RE_EXN_ID===Dv?{TAG:"Error",_0:D(s._1.message,"publish failed")}:{TAG:"Error",_0:"publish failed"}}}function TN(){return ne(Mi(globalThis.document),!1,e=>e.hidden)}function Dce(e){let t=Mi(globalThis.document);if(t===void 0)return()=>{};let r=Rt(t);return r.addEventListener("visibilitychange",e),()=>{r.removeEventListener("visibilitychange",e)}}let y5=["Platform_"];function $N(e,t){let r=t.toLowerCase();return e.some(n=>r.startsWith(n.toLowerCase()))?"Platform":"Domain"}let x5=Zt(void 0);function nm(){return St(x5)}function NN(){return{client:void 0,registry:new Map,refcount:0,idleTimer:void 0,reconnectListeners:[],torndown:!1}}let Fce=x5.Provider;function Ice(e){let t=e.getToken,r=e.platformReadModelPrefixes,n=e.onAuthFailure,i=e.clientEventsNamespace,o=e.liveReconnectRefetch,a=e.liveUpdates,s=e.platformEventsEndpoint,l=e.domainEventsEndpoint,c=o!==void 0?o:!0,d=r!==void 0?r:y5,f=De(t);Ae(()=>{f.current=t},[t]);let h=()=>f.current(),p=De(NN()),m=De(NN()),g=De(TN()),v=ce(()=>"Closed"),b=v[1],y=v[0],S=ce(()=>"Closed"),w=S[1],C=S[0],A=K=>K==="Domain"?p:m,$=K=>K==="Domain"?l:s,R=K=>{let ie=A(K).current;if(!c)return;ie.reconnectListeners.slice().forEach(Z=>{try{return Z()}catch{return}})},N=K=>{let ie=A(K).current,le=ie.client;if(le!==void 0)return le;let Z=$(K);if(Z===void 0)return;let ve=_ce(Z),pe=yce(Z),be=Tce(ve,pe,h,Ge=>K==="Domain"?b(zt=>Ge):w(zt=>Ge),Ge=>{if(Ge>=2e3)return R(K)},n);return ie.client=be,be},I=K=>{let ie=A(K).current,le=ie.idleTimer;if(le!==void 0){clearTimeout(le),ie.idleTimer=void 0;return}},M=(K,ie,le)=>{if(!ir(le.underlyingUnsub))return;let Z=N(K);if(Z===void 0)return;let ve=$ce(Z,ie,pe=>{le.callbacks.forEach(be=>be(pe))});le.underlyingUnsub=ve},P=(K,ie,le)=>{let Z=A(K).current;if(!a||ir($(K)))return()=>{};I(K),Z.refcount=Z.refcount+1|0;let ve=Z.registry.get(ie),pe;if(ve!==void 0){let be=ve.drainTimer;be!==void 0&&(clearTimeout(be),ve.drainTimer=void 0),pe=ve}else{let be={refcount:0,callbacks:[],underlyingUnsub:void 0,drainTimer:void 0};Z.registry.set(ie,be),pe=be}return pe.callbacks.push(le),pe.refcount=pe.refcount+1|0,pe.refcount===1&&!g.current&&M(K,ie,pe),()=>{if(pe.callbacks=pe.callbacks.filter(be=>be!==le),pe.refcount=pe.refcount-1|0,Z.torndown?(pe.underlyingUnsub=void 0,Z.registry.delete(ie)):pe.refcount===0&&(pe.drainTimer=setTimeout(()=>{let be=pe.underlyingUnsub;be!==void 0&&be(),pe.underlyingUnsub=void 0,pe.drainTimer=void 0,Z.registry.delete(ie)},5e3)),Z.refcount=Z.refcount-1|0,Z.refcount===0&&!Z.torndown){let be=A(K).current,Ge=be.idleTimer;Ge!==void 0&&clearTimeout(Ge),be.idleTimer=setTimeout(()=>{let zt=be.client;zt!==void 0&&(AN(zt),be.client=void 0),be.idleTimer=void 0},3e4);return}}},B=K=>a?Ee($($N(d,K))):!1,j=()=>{["Domain","Platform"].forEach(K=>{A(K).current.registry.forEach(le=>{let Z=le.underlyingUnsub;if(Z!==void 0){Z(),le.underlyingUnsub=void 0;return}})})},W=()=>{["Domain","Platform"].forEach(K=>{let ie=A(K).current,le={contents:!1};if(ie.registry.forEach((Z,ve)=>{if(Z.refcount>0&&ir(Z.underlyingUnsub))if(M(K,ve,Z),Ee(Z.underlyingUnsub)){le.contents=!0;return}else return}),le.contents)return R(K)})};Ae(()=>Dce(()=>{let ie=TN();if(ie!==g.current)return g.current=ie,ie?j():W()}),[]),Ae(()=>(()=>{["Domain","Platform"].forEach(K=>{let ie=A(K).current,le=ie.idleTimer;le!==void 0&&clearTimeout(le),ie.idleTimer=void 0,ie.registry.forEach(ve=>{let pe=ve.drainTimer;if(pe!==void 0){clearTimeout(pe),ve.drainTimer=void 0;return}});let Z=ie.client;Z!==void 0&&AN(Z),ie.client=void 0,ie.torndown=!0})}),[]);let te=K=>K==="Domain"?y:C,J=(K,ie)=>{let le=A(K).current;return le.reconnectListeners.push(ie),()=>{le.reconnectListeners=le.reconnectListeners.filter(Z=>Z!==ie)}},re=()=>a&&Ee(i)?Ee(l):!1,se=async(K,ie,le)=>{let Z=$(K);return Z!==void 0?await Nce(Z,f.current(),ie,le):{TAG:"Error",_0:"no events endpoint configured"}},he=Pt(()=>({subscribe:P,isLive:B,apiForReadModel:K=>$N(d,K),statusFor:te,registerReconnect:J,publish:se,clientChannelsAvailable:re,clientNamespace:()=>i,liveUpdatesEnabled:()=>a}),[a,l,s,y,C,i,d]);return ur(Fce,{value:he,children:e.children})}let Pce={make:Ice};function S5(e,t){if(e.length===0)return"Unknown";let r=t.filter(n=>e.includes(n));return r.length!==0?{TAG:"Elevated",_0:r}:"Scoped"}function w5(e,t){let r=G(e);if(r===void 0)return e;let n=k(F(r,"properties"),G);if(n===void 0)return e;let i=k(F(n,t),G);if(i===void 0)return e;let o=Oe($e(i));o["x-reventless-ui-hidden"]=!0;let a=Oe($e(n));a[t]=o;let s=Oe($e(r));return s.properties=a,s}function Oce(e,t,r){let n=G(e);if(n===void 0)return e;let i={};i.field=t,i.as=r.map(a=>a);let o=Oe($e(n));return o["x-reventless-owner-unscoped"]=i,o}function Mce(e,t,r){if(typeof e!="object"){if(e==="Unknown"||t==="")return r;let n=o=>o.map(a=>{if(a.ownerField===void 0)return a;let l={...a};return l.ownerValue=t,l}),i=(o,a)=>a!==void 0?w5(o,a):o;return r.map(o=>{let a={...o};return a.internalQueryables=q(o.internalQueryables,s=>s.map(l=>{let c={...l};return c.schema=i(l.schema,l.ownerField),c})),a.stateChangeSlices=o.stateChangeSlices.map(s=>{let l={...s};return l.commands=n(s.commands),l}),a.stateViewSlices=o.stateViewSlices.map(s=>{let l={...s};return l.schema=i(s.schema,s.ownerField),l}),a.aggregates=o.aggregates.map(s=>{let l={...s};return l.commands=n(s.commands),l}),a.readModels=o.readModels.map(s=>{let l={...s};return l.commands=n(s.commands),l.schema=i(s.schema,s.ownerField),l}),a})}else{let n=e._0,i=(o,a)=>a!==void 0?Oce(o,a,n):o;return r.map(o=>{let a={...o};return a.stateViewSlices=o.stateViewSlices.map(s=>{let l={...s};return l.schema=i(s.schema,s.ownerField),l}),a.readModels=o.readModels.map(s=>{let l={...s};return l.schema=i(s.schema,s.ownerField),l}),a})}}function Lce(e,t){return ee(k(k(G(t),r=>F(r,"properties")),G),r=>{Tp(r).forEach(n=>ee(k(k(G(n),i=>F(i,"x-reventless-semantic-target")),G),i=>{let o=F(i,"store"),a=F(i,"plugin");if(o!==void 0&&a===void 0){i.plugin=e;return}}))}),t}function zce(e){let t=Op(e);return t!==void 0&&t[1].values===void 0?w5(e,t[0]):e}function bS(e,t){let r=oe(t);return zce(Lce(e,r!==void 0?JSON.parse(r):t))}function DN(e){switch(e){case"boolean":return"Boolean";case"integer":return"Int";case"number":return"Float";default:return"String"}}function FN(e){let t=e.toLowerCase();return t.length>=2?t.endsWith("id"):!1}function Uce(e){let t=e.toLowerCase();return t.length>3?t.endsWith("ids"):!1}function IN(e){if(Re(k(F(e,"type"),oe),"object"))return k(F(e,"x-reventless-graphql-input"),oe)}function Bce(e){return k(F(e,"x-reventless-graphql-type"),oe)}function jce(e,t){let r=D(k(F(t,"type"),oe),"string");if(r==="array"){let i=k(F(t,"items"),G),o=k(i,IN);return"["+(o!==void 0?o:D(q(k(k(i,s=>F(s,"type")),oe),s=>s==="string"&&(Uce(e)||FN(e))?"ID":DN(s)),"String"))+"!]"}let n=IN(t);return n!==void 0?n:FN(e)&&r==="string"?"ID":DN(r)}function E5(e){return q(k(k(G(e),t=>F(t,"required")),Ct),t=>Q(t,oe))}function qce(e,t,r){let n=E5(t),i=D(q(k(k(G(t),d=>F(d,"properties")),G),d=>Object.keys(d).filter(f=>f!=="TAG").map(f=>{let h=k(F(d,f),G),p=k(h,Bce),m;if(p!==void 0)m=p;else{let g=ne(h,"String",v=>jce(f,v));m=n!==void 0?n.includes(f)?g+"!":g:g+"!"}return[f,m]})),[]),a=(r!==void 0?[]:[["id","ID!"]]).concat(i),s="__typename ... on CommandAccepted { msgId entityId eventCount } ... on CommandRejected { msgId errorCode errorDetail } ... on CommandPending { msgId }";if(a.length===0)return"mutation { "+e+" { "+s+" } }";let l=a.map(d=>"$"+d[0]+": "+d[1]).join(", "),c=a.map(d=>{let f=d[0];return f+": $"+f}).join(", ");return"mutation "+e+"("+l+") { "+e+"("+c+") { "+s+" } }"}function Vce(e){let t=e.split(".");return D(t[t.length-1|0],e)}function Gce(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2")}function Kce(e){return Q(D(Ct(e),[]),t=>q(G(t),r=>{let n=i=>D(k(F(r,i),oe),"");return{fieldName:n("fieldName"),entity:n("entity"),plugin:k(F(r,"plugin"),oe)}}))}function _S(e){return ca(k(F(e,"apiExposed"),Mv),!1)}function yS(e,t,r){return Q(D(Ct(r),[]),n=>q(k(G(n),i=>{if(t(i))return i}),i=>{let o=v=>D(k(F(i,v),oe),""),a=o("name"),l=o("level")==="Instance"?"Instance":"Collection",c=D(q(F(i,"schema"),v=>bS(e,v)),null),d=o("mutationField"),f=k(F(i,"aggregateIdField"),oe),h=D(q(F(i,"references"),Kce),[]),p=q(k(F(i,"allowedStates"),Ct),v=>Q(v,oe)),m=k(F(i,"targetState"),oe),g=k(q(k(F(i,"requiredAccess"),Ct),v=>Q(v,oe)),v=>{if(v.length!==0)return v});return{name:a,label:Gce(Vce(a)),schema:c,mutationDocument:d===""?"":qce(d,c,f),requiredRole:void 0,level:l,aggregateIdField:f,refFields:[],references:h,allowedStates:p,targetState:m,requiredAccess:g,ownerField:k(F(i,"ownerField"),oe)}}))}function PN(e,t){return yS(e,r=>!_S(r),t)}function xS(e){return Q(D(Ct(e),[]),t=>q(G(t),r=>{let n=g=>D(k(F(r,g),oe),""),i=g=>D(k(F(r,g),Ct),[]),o=(g,v)=>Q(D(k(F(g,v),Ct),[]),oe),a=n("pluginId"),s=g=>k(q(k(F(g,"requiredAccess"),Ct),v=>Q(v,oe)),v=>{if(v.length!==0)return v}),l=Q(i("readModels"),g=>q(G(g),v=>{let b=y=>D(k(F(v,y),oe),"");return{name:b("name"),schema:D(q(F(v,"schema"),y=>bS(a,y)),null),queryDocument:"",queryField:b("queryField"),sortIndex:0,commands:[],linkedWriteSide:o(v,"linkedWriteSide"),labelField:b("labelField"),labelFieldSource:k(F(v,"labelFieldSource"),oe),searchableFields:o(v,"searchableFields"),lifecycleField:k(F(v,"lifecycleField"),oe),requiredAccess:s(v),ownerField:k(F(v,"ownerField"),oe)}})),c=Q(i("aggregates"),g=>q(G(g),v=>({name:(y=>D(k(F(v,y),oe),""))("name"),schema:null,commands:yS(a,_S,D(F(v,"commands"),[])),systemCommands:PN(a,D(F(v,"commands"),[])),linkedViews:o(v,"linkedViews")}))),d=g=>Q(i(g),v=>q(G(v),b=>{let y=S=>D(k(F(b,S),oe),"");return{name:y("name"),schema:D(q(F(b,"schema"),S=>bS(a,S)),null),queryField:y("queryField"),sortIndex:0,linkedWriteSide:o(b,"linkedWriteSide"),labelField:y("labelField"),labelFieldSource:k(F(b,"labelFieldSource"),oe),searchableFields:o(b,"searchableFields"),lifecycleField:k(F(b,"lifecycleField"),oe),requiredAccess:s(b),ownerField:k(F(b,"ownerField"),oe)}})),f=d("stateViewSlices"),h=d("internalQueryables"),p=Q(i("stateChangeSlices"),g=>q(G(g),v=>({name:(y=>D(k(F(v,y),oe),""))("name"),commands:yS(a,_S,D(F(v,"commands"),[])),systemCommands:PN(a,D(F(v,"commands"),[])),linkedViews:o(v,"linkedViews"),consistencyRead:k(F(v,"consistencyRead"),oe)}))),m=q(k(F(r,"derivedPages"),Ct),g=>Q(g,oe));return{id:a,name:a,readModels:l,aggregates:c,stateViewSlices:f,stateChangeSlices:p,internalQueryables:h,derivedPages:m}}))}function Hce(e){return D(q(k(k(k(me.object(e),t=>t.data),me.object),t=>t.Platform_ComponentDefinitions),xS),[])}function Wce(e){if(me.array(e)!==void 0)return{TAG:"Ok",_0:xS(e)};let r=mi(k(k(k(me.object(e),n=>n.data),me.object),n=>n.Platform_ComponentDefinitions),n=>Ee(me.array(n)));return r!==void 0?{TAG:"Ok",_0:xS(r)}:{TAG:"Error",_0:"expected a JSON array of component-definition entries (or a `{data:{Platform_ComponentDefinitions:[…]}}` envelope)"}}let Jce=`{
|
|
42
|
+
Platform_ComponentDefinitions {
|
|
43
|
+
pluginId
|
|
44
|
+
readModels { name queryField schema linkedWriteSide labelField labelFieldSource searchableFields lifecycleField requiredAccess ownerField }
|
|
45
|
+
aggregates { name commands { name schema level aggregateIdField mutationField references { fieldName entity plugin } allowedStates targetState apiExposed requiredAccess ownerField } linkedViews }
|
|
46
|
+
stateViewSlices { name queryField schema linkedWriteSide labelField labelFieldSource searchableFields lifecycleField requiredAccess ownerField }
|
|
47
|
+
internalQueryables { name queryField schema linkedWriteSide labelField labelFieldSource searchableFields lifecycleField requiredAccess ownerField }
|
|
48
|
+
stateChangeSlices { name commands { name schema level aggregateIdField mutationField references { fieldName entity plugin } allowedStates targetState apiExposed requiredAccess ownerField } linkedViews consistencyRead }
|
|
49
|
+
}
|
|
50
|
+
}`;function Qce(e){return e.startsWith("https://")?"wss://"+e.slice(8):e.startsWith("http://")?"ws://"+e.slice(7):e.startsWith("/")?(location.protocol==="https:"?"wss":"ws")+"://"+location.host+e:e}let Yce="/ui-hints.json",Xce="Reventless";function Zce(e){let t=e.appName,r=e.platformName;return t!==void 0&&t.trim()!==""?t.trim():r!==void 0&&r.trim()!==""?pt(r):Xce}function ede(e){return e.toLowerCase()==="fleet"?"Fleet":"Single"}function tde(e){switch(e.toLowerCase()){case"cognito":return"Cognito";case"inmemory":case"local":return"Local";default:return"Anonymous"}}function rde(e){let t=me.object(e);if(t===void 0)return{TAG:"Error",_0:"config.json: top-level value is not an object"};let r=s=>k(t[s],me.string),n=r("apiEndpoint");if(n===void 0)return{TAG:"Error",_0:"config.json: missing required field `apiEndpoint`"};let i=D(r("platformApiEndpoint"),n),o=s=>k(t[s],me.bool),a=s=>D(q(k(t[s],me.object),l=>Object.fromEntries(Q(Object.entries(l),c=>{let d=c[0];return q(me.string(c[1]),f=>[d,f])}))),{});return{TAG:"Ok",_0:{apiEndpoint:n,platformApiEndpoint:i,platformApiSubscriptionEndpoint:D(r("platformApiSubscriptionEndpoint"),Qce(i)),domainApiEventsEndpoint:r("domainApiEventsEndpoint"),platformApiEventsEndpoint:r("platformApiEventsEndpoint"),clientEventsNamespace:r("clientEventsNamespace"),liveUpdates:D(o("liveUpdates"),!0),liveReconnectRefetch:D(o("liveReconnectRefetch"),!0),platformReadModelPrefixes:D(q(k(t.platformReadModelPrefixes,me.array),s=>Q(s,me.string)),y5),region:r("region"),authMode:D(q(r("authMode"),tde),"Anonymous"),cognitoUserPoolId:r("cognitoUserPoolId"),cognitoClientId:r("cognitoClientId"),autoRedirectFirstPage:D(o("autoRedirectFirstPage"),!1),home:r("home"),mode:D(q(r("mode"),ede),"Single"),environment:r("environment"),platformName:r("platformName"),accessTiers:Q(D(k(t.accessTiers,me.array),[]),me.string),viewModes:Q(D(k(t.viewModes,me.array),[]),me.string),mapStyle:r("mapStyle"),graphLayout:r("graphLayout"),assetOrigins:a("assetOrigins"),uiHintsUrl:D(r("uiHintsUrl"),Yce),manifestUrl:r("manifestUrl"),journeyManifestUrls:ne(k(t.journeyManifestUrls,me.object),{},s=>{let l={};return rG(s,(c,d)=>ee(me.string(c),f=>{l[d]=f})),l}),deniedSurfaces:D(q(r("deniedSurfaces"),Xue),"Lock"),appName:r("appName"),logoUrl:r("logoUrl"),theme:k(r("theme"),s=>{let l=pce(s);if(l!==void 0)return l;console.warn('[Shell] config.json: unknown theme "'+s+'" — expected '+hce.join(", ")+". Opening on the default instead.")}),elevatedGroups:Q(D(k(t.elevatedGroups,me.array),[]),me.string)}}}function nde(e){return Lt(fetch(e).then(t=>t.ok?t.json().then(Lue):(console.warn("[AutoUI] "+e+": not loaded (status "+t.status.toString()+") — no UI hints applied"),Promise.resolve({}))),t=>(console.warn("[AutoUI] "+e+": not loaded ("+String(t)+") — no UI hints applied"),Promise.resolve({})))}function k5(e){return Lt(fetch(e).then(t=>t.ok?Lt(t.json().then(r=>{let n=Wce(r);return n.TAG==="Ok"?n:{TAG:"Error",_0:e+": "+n._0}}),r=>Promise.resolve({TAG:"Error",_0:e+": not valid JSON — "+String(r)})):Promise.resolve({TAG:"Error",_0:e+": fetch failed with status "+t.status.toString()})),t=>Promise.resolve({TAG:"Error",_0:e+": fetch threw — "+String(t)}))}function ide(){return Lt(fetch("/config.json").then(e=>e.ok?e.json().then(rde):Promise.resolve({TAG:"Error",_0:"config.json: fetch failed with status "+e.status.toString()})),e=>Promise.resolve({TAG:"Error",_0:"config.json: fetch threw — "+String(e)}))}function ode(e){let t=me.string(e);return t!==void 0?t:q(me.float(e),r=>r.toString())}function ade(e){return q(me.object(e),t=>({message:D(k(t.message,me.string),""),path:Q(D(k(t.path,me.array),[]),ode),code:k(k(k(t.extensions,me.object),r=>r.code),me.string),errorType:k(t.errorType,me.string)}))}function c2(e){let t=me.object(e);return{data:D(k(t,r=>r.data),null),errors:Q(D(k(k(t,r=>r.errors),me.array),[]),ade)}}function sde(e,t){return e.errors.find(r=>Re(r.path[0],t))}function C5(e,t){let r=k(me.object(e.data),n=>n[t]);if(!(r!==void 0&&Xe(r)!=="JSONNull"))return sde(e,t)}function R5(e){return e.errors.some(t=>Re(t.code,"UNAUTHORIZED"))}function lde(e){return e.errors.some(t=>Re(t.code,"FORBIDDEN")?!0:Re(t.errorType,"Unauthorized"))}function ude(e){return t=>((r,n)=>{let i={contents:void 0};return e((a,s)=>t(a,s).then(l=>(i.contents=l,l.data)))(r,n).then(a=>{let s=i.contents;return s!==void 0?s:{data:a,errors:[]}})})}function cde(e,t,r,n){return(i,o)=>{let a=i.includes("Platform")||i.includes("platform")?t:e,s=Object.fromEntries([["content-type","application/json"]]),l=r();return l!==void 0&&(s.Authorization="Bearer "+l),fetch(a,{method:"POST",headers:s,body:D(JSON.stringify({query:i,variables:o}),"")}).then(c=>(c.status===401&&n(),c.json())).then(c=>{let d=c2(c);return R5(d)&&n(),Promise.resolve(d)})}}let dde=J8;class oh extends Error{}oh.prototype.name="InvalidTokenError";function fde(e){return decodeURIComponent(atob(e).replace(/(.)/g,(t,r)=>{let n=r.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}function hde(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return fde(t)}catch{return atob(t)}}function pde(e,t){if(typeof e!="string")throw new oh("Invalid token specified: must be a string");t||(t={});const r=t.header===!0?0:1,n=e.split(".")[r];if(typeof n!="string")throw new oh(`Invalid token specified: missing part #${r+1}`);let i;try{i=hde(n)}catch(o){throw new oh(`Invalid token specified: invalid base64 for part #${r+1} (${o.message})`)}try{return JSON.parse(i)}catch(o){throw new oh(`Invalid token specified: invalid json for part #${r+1} (${o.message})`)}}let mde=(function(e){return e&&e.name?String(e.name):"UnknownError"}),gde=(function(e){return e&&e.message?String(e.message):""});function Eb(e){return{name:mde(e),message:gde(e)}}function kb(e){switch(e.name){case"PasswordResetRequiredException":return"Password reset required — contact your administrator";case"LimitExceededException":case"TooManyRequestsException":return"Too many attempts — please wait a moment and try again";case"UserNotConfirmedException":return"Account not confirmed — check your email";case"NotAuthorizedException":case"UserNotFoundException":return"Incorrect username or password";default:return"Sign-in failed. Please try again."}}const vde=e=>({setHttpHandler(t){e.httpHandler=t},httpHandler(){return e.httpHandler},updateHttpClientConfig(t,r){e.httpHandler?.updateHttpClientConfig(t,r)},httpHandlerConfigs(){return e.httpHandler.httpHandlerConfigs()}}),bde=e=>({httpHandler:e.httpHandler()});var fp;(function(e){e.HTTP="http",e.HTTPS="https"})(fp||(fp={}));var hp;(function(e){e.MD5="md5",e.CRC32="crc32",e.CRC32C="crc32c",e.SHA1="sha1",e.SHA256="sha256"})(hp||(hp={}));const SS="__smithy_context";class uo{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(t){this.method=t.method||"GET",this.hostname=t.hostname||"localhost",this.port=t.port,this.query=t.query||{},this.headers=t.headers||{},this.body=t.body,this.protocol=t.protocol?t.protocol.slice(-1)!==":"?`${t.protocol}:`:t.protocol:"https:",this.path=t.path?t.path.charAt(0)!=="/"?`/${t.path}`:t.path:"/",this.username=t.username,this.password=t.password,this.fragment=t.fragment}static clone(t){const r=new uo({...t,headers:{...t.headers}});return r.query&&(r.query=_de(r.query)),r}static isInstance(t){if(!t)return!1;const r=t;return"method"in r&&"protocol"in r&&"hostname"in r&&"path"in r&&typeof r.query=="object"&&typeof r.headers=="object"}clone(){return uo.clone(this)}}function _de(e){return Object.keys(e).reduce((t,r)=>{const n=e[r];return{...t,[r]:Array.isArray(n)?[...n]:n}},{})}class Md{statusCode;reason;headers;body;constructor(t){this.statusCode=t.statusCode,this.reason=t.reason,this.headers=t.headers||{},this.body=t.body}static isInstance(t){if(!t)return!1;const r=t;return typeof r.statusCode=="number"&&typeof r.headers=="object"}}const yde=e=>t=>async r=>{if(!uo.isInstance(r.request))return t(r);const{request:n}=r,{handlerProtocol:i=""}=e.requestHandler.metadata||{};if(i.indexOf("h2")>=0&&!n.headers[":authority"])delete n.headers.host,n.headers[":authority"]=n.hostname+(n.port?":"+n.port:"");else if(!n.headers.host){let o=n.hostname;n.port!=null&&(o+=`:${n.port}`),n.headers.host=o}return t(r)},xde={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},Sde=e=>({applyToStack:t=>{t.add(yde(e),xde)}}),wde=()=>(e,t)=>async r=>{try{const n=await e(r),{clientName:i,commandName:o,logger:a,dynamoDbDocumentClientOptions:s={}}=t,{overrideInputFilterSensitiveLog:l,overrideOutputFilterSensitiveLog:c}=s,d=l??t.inputFilterSensitiveLog,f=c??t.outputFilterSensitiveLog,{$metadata:h,...p}=n.output;return a?.info?.({clientName:i,commandName:o,input:d(r.input),output:f(p),metadata:h}),n}catch(n){const{clientName:i,commandName:o,logger:a,dynamoDbDocumentClientOptions:s={}}=t,{overrideInputFilterSensitiveLog:l}=s,c=l??t.inputFilterSensitiveLog;throw a?.error?.({clientName:i,commandName:o,input:c(r.input),error:n,metadata:n.$metadata}),n}},Ede={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},kde=e=>({applyToStack:t=>{t.add(wde(),Ede)}}),Cde={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},Rde=()=>e=>async t=>e(t),Ade=e=>({applyToStack:t=>{t.add(Rde(),Cde)}}),pf=e=>e[SS]||(e[SS]={}),Ts=e=>{if(typeof e=="function")return e;const t=Promise.resolve(e);return()=>t},Tde=(e,t)=>{if(!t||t.length===0)return e;const r=[];for(const n of t)for(const i of e)i.schemeId.split("#")[1]===n&&r.push(i);for(const n of e)r.find(({schemeId:i})=>i===n.schemeId)||r.push(n);return r};function $de(e){const t=new Map;for(const r of e)t.set(r.schemeId,r);return t}const Nde=(e,t)=>(r,n)=>async i=>{const o=e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,n,i.input)),a=e.authSchemePreference?await e.authSchemePreference():[],s=Tde(o,a),l=$de(e.httpAuthSchemes),c=pf(n),d=[];for(const f of s){const h=l.get(f.schemeId);if(!h){d.push(`HttpAuthScheme \`${f.schemeId}\` was not enabled for this service.`);continue}const p=h.identityProvider(await t.identityProviderConfigProvider(e));if(!p){d.push(`HttpAuthScheme \`${f.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:m={},signingProperties:g={}}=f.propertiesExtractor?.(e,n)||{};f.identityProperties=Object.assign(f.identityProperties||{},m),f.signingProperties=Object.assign(f.signingProperties||{},g),c.selectedHttpAuthScheme={httpAuthOption:f,identity:await p(f.identityProperties),signer:h.signer};break}if(!c.selectedHttpAuthScheme)throw new Error(d.join(`
|
|
51
|
+
`));return r(i)},Dde={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},Fde=(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:r})=>({applyToStack:n=>{n.addRelativeTo(Nde(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:r}),Dde)}}),Ide=e=>t=>{throw t},Pde=(e,t)=>{},Ode=e=>(t,r)=>async n=>{if(!uo.isInstance(n.request))return t(n);const o=pf(r).selectedHttpAuthScheme;if(!o)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:a={}},identity:s,signer:l}=o,c=await t({...n,request:await l.sign(n.request,s,a)}).catch((l.errorHandler||Ide)(a));return(l.successHandler||Pde)(c.response,a),c},Mde={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},Lde=e=>({applyToStack:t=>{t.addRelativeTo(Ode(),Mde)}}),xh=e=>{if(typeof e=="function")return e;const t=Promise.resolve(e);return()=>t},A5="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ON=Object.entries(A5).reduce((e,[t,r])=>(e[r]=Number(t),e),{}),zde=A5.split(""),vd=6,Sh=8,Ude=63,Cb=e=>{let t=e.length/4*3;e.slice(-2)==="=="?t-=2:e.slice(-1)==="="&&t--;const r=new ArrayBuffer(t),n=new DataView(r);for(let i=0;i<e.length;i+=4){let o=0,a=0;for(let c=i,d=i+3;c<=d;c++)if(e[c]!=="="){if(!(e[c]in ON))throw new TypeError(`Invalid character ${e[c]} in base64 string.`);o|=ON[e[c]]<<(d-c)*vd,a+=vd}else o>>=vd;const s=i/4*3;o>>=a%Sh;const l=Math.floor(a/Sh);for(let c=0;c<l;c++){const d=(l-c-1)*Sh;n.setUint8(s+c,(o&255<<d)>>d)}}return new Uint8Array(r)},Ld=e=>new TextEncoder().encode(e),pp=e=>typeof e=="string"?Ld(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),d2=e=>{if(typeof e=="string")return e;if(typeof e!="object"||typeof e.byteOffset!="number"||typeof e.byteLength!="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return new TextDecoder("utf-8").decode(e)};function av(e){let t;typeof e=="string"?t=Ld(e):t=e;const r=typeof t=="object"&&typeof t.length=="number",n=typeof t=="object"&&typeof t.byteOffset=="number"&&typeof t.byteLength=="number";if(!r&&!n)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let i="";for(let o=0;o<t.length;o+=3){let a=0,s=0;for(let c=o,d=Math.min(o+3,t.length);c<d;c++)a|=t[c]<<(d-c-1)*Sh,s+=Sh;const l=Math.ceil(s/vd);a<<=l*vd-s;for(let c=1;c<=l;c++){const d=(l-c)*vd;i+=zde[(a&Ude<<d)>>d]}i+="==".slice(0,4-l)}return i}class Tu extends Uint8Array{static fromString(t,r="utf-8"){if(typeof t=="string")return r==="base64"?Tu.mutate(Cb(t)):Tu.mutate(Ld(t));throw new Error(`Unsupported conversion from ${typeof t} to Uint8ArrayBlobAdapter.`)}static mutate(t){return Object.setPrototypeOf(t,Tu.prototype),t}transformToString(t="utf-8"){return t==="base64"?av(this):d2(this)}}const $u=e=>encodeURIComponent(e).replace(/[!'()*]/g,Bde),Bde=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;function jde(e){const t=[];for(let r of Object.keys(e).sort()){const n=e[r];if(r=$u(r),Array.isArray(n))for(let i=0,o=n.length;i<o;i++)t.push(`${r}=${$u(n[i])}`);else{let i=r;(n||typeof n=="string")&&(i+=`=${$u(n)}`),t.push(i)}}return t.join("&")}function MN(e,t){return new Request(e,t)}function qde(e=0){return new Promise((t,r)=>{e&&setTimeout(()=>{const n=new Error(`Request did not complete within ${e} ms`);n.name="TimeoutError",r(n)},e)})}const by={supported:void 0};class f2{config;configProvider;static create(t){return typeof t?.handle=="function"?t:new f2(t)}constructor(t){typeof t=="function"?this.configProvider=t().then(r=>r||{}):(this.config=t??{},this.configProvider=Promise.resolve(this.config)),by.supported===void 0&&(by.supported=typeof Request<"u"&&"keepalive"in MN("https://[::1]"))}destroy(){}async handle(t,{abortSignal:r,requestTimeout:n}={}){this.config||(this.config=await this.configProvider);const i=n??this.config.requestTimeout,o=this.config.keepAlive===!0,a=this.config.credentials;if(r?.aborted){const y=LN(r);return Promise.reject(y)}let s=t.path;const l=jde(t.query||{});l&&(s+=`?${l}`),t.fragment&&(s+=`#${t.fragment}`);let c="";if(t.username!=null||t.password!=null){const y=t.username??"",S=t.password??"";c=`${y}:${S}@`}const{port:d,method:f}=t,h=`${t.protocol}//${c}${t.hostname}${d?`:${d}`:""}${s}`,p=f==="GET"||f==="HEAD"?void 0:t.body,m={body:p,headers:new Headers(t.headers),method:f,credentials:a};this.config?.cache&&(m.cache=this.config.cache),p&&(m.duplex="half"),typeof AbortController<"u"&&(m.signal=r),by.supported&&(m.keepalive=o),typeof this.config.requestInit=="function"&&Object.assign(m,this.config.requestInit(t));let g=()=>{};const v=MN(h,m),b=[fetch(v).then(y=>{const S=y.headers,w={};for(const A of S.entries())w[A[0]]=A[1];return y.body!=null?{response:new Md({headers:w,reason:y.statusText,statusCode:y.status,body:y.body})}:y.blob().then(A=>({response:new Md({headers:w,reason:y.statusText,statusCode:y.status,body:A})}))}),qde(i)];return r&&b.push(new Promise((y,S)=>{const w=()=>{const C=LN(r);S(C)};if(typeof r.addEventListener=="function"){const C=r;C.addEventListener("abort",w,{once:!0}),g=()=>C.removeEventListener("abort",w)}else r.onabort=w})),Promise.race(b).finally(g)}updateHttpClientConfig(t,r){this.config=void 0,this.configProvider=this.configProvider.then(n=>(n[t]=r,n))}httpHandlerConfigs(){return this.config??{}}}function LN(e){const t=e&&typeof e=="object"&&"reason"in e?e.reason:void 0;if(t){if(t instanceof Error){const i=new Error("Request aborted");return i.name="AbortError",i.cause=t,i}const n=new Error(String(t));return n.name="AbortError",n}const r=new Error("Request aborted");return r.name="AbortError",r}const Vde=async e=>typeof Blob=="function"&&e instanceof Blob||e.constructor?.name==="Blob"?Blob.prototype.arrayBuffer!==void 0?new Uint8Array(await e.arrayBuffer()):Gde(e):Kde(e);async function Gde(e){const t=await Hde(e),r=Cb(t);return new Uint8Array(r)}async function Kde(e){const t=[],r=e.getReader();let n=!1,i=0;for(;!n;){const{done:s,value:l}=await r.read();l&&(t.push(l),i+=l.length),n=s}const o=new Uint8Array(i);let a=0;for(const s of t)o.set(s,a),a+=s.length;return o}function Hde(e){return new Promise((t,r)=>{const n=new FileReader;n.onloadend=()=>{if(n.readyState!==2)return r(new Error("Reader aborted too early"));const i=n.result??"",o=i.indexOf(","),a=o>-1?o+1:i.length;t(i.substring(a))},n.onabort=()=>r(new Error("Read aborted")),n.onerror=()=>r(n.error),n.readAsDataURL(e)})}const T5={},wS={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();t.length===1&&(t=`0${t}`),T5[e]=t,wS[t]=e}function Wde(e){if(e.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const t=new Uint8Array(e.length/2);for(let r=0;r<e.length;r+=2){const n=e.slice(r,r+2).toLowerCase();if(n in wS)t[r/2]=wS[n];else throw new Error(`Cannot decode unrecognized sequence ${n} as hexadecimal`)}return t}function Nu(e){let t="";for(let r=0;r<e.byteLength;r++)t+=T5[e[r]];return t}const ES=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return Tu.mutate(e);if(!e)return Tu.mutate(new Uint8Array);const r=t.streamCollector(e);return Tu.mutate(await r)},a0=e=>typeof e=="function"?e():e,$5=(e,t,r,n,i)=>({name:t,namespace:e,traits:r,input:n,output:i}),Jde=e=>(t,r)=>async n=>{const{response:i}=await t(n),{operationSchema:o}=pf(r),[,a,s,l,c,d]=o??[];try{const f=await e.protocol.deserializeResponse($5(a,s,l,c,d),{...e,...r},i);return{response:i,output:f}}catch(f){if(Object.defineProperty(f,"$response",{value:i,enumerable:!1,writable:!1,configurable:!1}),!("$metadata"in f)){const h="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";try{f.message+=`
|
|
52
|
+
`+h}catch{!r.logger||r.logger?.constructor?.name==="NoOpLogger"?console.warn(h):r.logger?.warn?.(h)}typeof f.$responseBodyText<"u"&&f.$response&&(f.$response.body=f.$responseBodyText);try{if(Md.isInstance(i)){const{headers:p={}}=i,m=Object.entries(p);f.$metadata={httpStatusCode:i.statusCode,requestId:_y(/^x-[\w-]+-request-?id$/,m),extendedRequestId:_y(/^x-[\w-]+-id-2$/,m),cfId:_y(/^x-[\w-]+-cf-id$/,m)}}}catch{}}throw f}},_y=(e,t)=>(t.find(([r])=>r.match(e))||[void 0,void 0])[1];function Qde(e){const t={};if(e=e.replace(/^\?/,""),e)for(const r of e.split("&")){let[n,i=null]=r.split("=");n=decodeURIComponent(n),i&&(i=decodeURIComponent(i)),n in t?Array.isArray(t[n])?t[n].push(i):t[n]=[t[n],i]:t[n]=i}return t}const zd=e=>{if(typeof e=="string")return zd(new URL(e));const{hostname:t,pathname:r,port:n,protocol:i,search:o}=e;let a;return o&&(a=Qde(o)),{hostname:t,port:n?parseInt(n):void 0,protocol:i,path:r,query:a}},Yde=e=>{if(typeof e=="object"){if("url"in e){const t=zd(e.url);if(e.headers){t.headers={};for(const r in e.headers)t.headers[r.toLowerCase()]=e.headers[r].join(", ")}return t}return e}return zd(e)},Xde=e=>(t,r)=>async n=>{const{operationSchema:i}=pf(r),[,o,a,s,l,c]=i??[],d=r.endpointV2?async()=>Yde(r.endpointV2):e.endpoint,f=await e.protocol.serializeRequest($5(o,a,s,l,c),n.input,{...e,...r,endpoint:d});return t({...n,request:f})},Zde={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},efe={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function tfe(e){return{applyToStack:t=>{t.add(Xde(e),efe),t.add(Jde(e),Zde),e.protocol.setSerdeContext(e)}}}const yy=[];function ah(e){if(typeof e=="object")return e;if(e=e|0,yy[e])return yy[e];const t={};let r=0;for(const n of["httpLabel","idempotent","idempotencyToken","sensitive","httpPayload","httpResponseCode","httpQueryParams"])(e>>r++&1)===1&&(t[n]=1);return yy[e]=t}const Uf={it:Symbol.for("@smithy/nor-struct-it"),ns:Symbol.for("@smithy/ns")},xy=[],Sy={};class $n{ref;memberName;static symbol=Symbol.for("@smithy/nor");symbol=$n.symbol;name;schema;_isMemberSchema;traits;memberTraits;normalizedTraits;constructor(t,r){this.ref=t,this.memberName=r;const n=[];let i=t,o=t;for(this._isMemberSchema=!1;wy(i);)n.push(i[1]),i=i[0],o=a0(i),this._isMemberSchema=!0;if(n.length>0){this.memberTraits={};for(let a=n.length-1;a>=0;--a){const s=n[a];Object.assign(this.memberTraits,ah(s))}}else this.memberTraits=0;if(o instanceof $n){const a=this.memberTraits;Object.assign(this,o),this.memberTraits=Object.assign({},a,o.getMemberTraits(),this.getMemberTraits()),this.normalizedTraits=void 0,this.memberName=r??o.memberName;return}if(this.schema=a0(o),rfe(this.schema)?(this.name=`${this.schema[1]}#${this.schema[2]}`,this.traits=this.schema[3]):(this.name=this.memberName??String(o),this.traits=0),this._isMemberSchema&&!r)throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(!0)} missing member name.`)}static[Symbol.hasInstance](t){const r=this.prototype.isPrototypeOf(t);return!r&&typeof t=="object"&&t!==null?t.symbol===this.symbol:r}static of(t){const r=typeof t=="function"||typeof t=="object"&&t!==null;if(typeof t=="number"){if(xy[t])return xy[t]}else if(typeof t=="string"){if(Sy[t])return Sy[t]}else if(r&&t[Uf.ns])return t[Uf.ns];const n=a0(t);if(n instanceof $n)return n;if(wy(n)){const[o,a]=n;if(o instanceof $n)return Object.assign(o.getMergedTraits(),ah(a)),o;throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(t,null,2)}.`)}const i=new $n(n);return r?t[Uf.ns]=i:typeof n=="string"?Sy[n]=i:typeof n=="number"?xy[n]=i:i}getSchema(){const t=this.schema;return Array.isArray(t)&&t[0]===0?t[4]:t}getName(t=!1){const{name:r}=this;return!t&&r&&r.includes("#")?r.split("#")[1]:r||void 0}getMemberName(){return this.memberName}isMemberSchema(){return this._isMemberSchema}isListSchema(){const t=this.getSchema();return typeof t=="number"?t>=64&&t<128:t[0]===1}isMapSchema(){const t=this.getSchema();return typeof t=="number"?t>=128&&t<=255:t[0]===2}isStructSchema(){const t=this.getSchema();if(typeof t!="object")return!1;const r=t[0];return r===3||r===-3||r===4}isUnionSchema(){const t=this.getSchema();return typeof t!="object"?!1:t[0]===4}isBlobSchema(){const t=this.getSchema();return t===21||t===42}isTimestampSchema(){const t=this.getSchema();return typeof t=="number"&&t>=4&&t<=7}isUnitSchema(){return this.getSchema()==="unit"}isDocumentSchema(){return this.getSchema()===15}isStringSchema(){return this.getSchema()===0}isBooleanSchema(){return this.getSchema()===2}isNumericSchema(){return this.getSchema()===1}isBigIntegerSchema(){return this.getSchema()===17}isBigDecimalSchema(){return this.getSchema()===19}isStreaming(){const{streaming:t}=this.getMergedTraits();return!!t||this.getSchema()===42}isIdempotencyToken(){return!!this.getMergedTraits().idempotencyToken}getMergedTraits(){return this.normalizedTraits??(this.normalizedTraits={...this.getOwnTraits(),...this.getMemberTraits()})}getMemberTraits(){return ah(this.memberTraits)}getOwnTraits(){return ah(this.traits)}getKeySchema(){const[t,r]=[this.isDocumentSchema(),this.isMapSchema()];if(!t&&!r)throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(!0)}`);const n=this.getSchema(),i=t?15:n[4]??0;return Bf([i,0],"key")}getValueSchema(){const t=this.getSchema(),[r,n,i]=[this.isDocumentSchema(),this.isMapSchema(),this.isListSchema()],o=typeof t=="number"?63&t:t&&typeof t=="object"&&(n||i)?t[3+t[0]]:r?15:void 0;if(o!=null)return Bf([o,0],n?"value":"member");throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no value member.`)}getMemberSchema(t){const r=this.getSchema();if(this.isStructSchema()&&r[4].includes(t)){const n=r[4].indexOf(t),i=r[5][n];return Bf(wy(i)?i:[i,0],t)}if(this.isDocumentSchema())return Bf([15,0],t);throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no member=${t}.`)}getMemberSchemas(){const t={};try{for(const[r,n]of this.structIterator())t[r]=n}catch{}return t}getEventStreamMember(){if(this.isStructSchema()){for(const[t,r]of this.structIterator())if(r.isStreaming()&&r.isStructSchema())return t}return""}*structIterator(){if(this.isUnitSchema())return;if(!this.isStructSchema())throw new Error("@smithy/core/schema - cannot iterate non-struct schema.");const t=this.getSchema(),r=t[4].length;let n=t[Uf.it];if(n&&r===n.length){yield*n;return}n=Array(r);for(let i=0;i<r;++i){const o=t[4][i],a=Bf([t[5][i],0],o);yield n[i]=[o,a]}t[Uf.it]=n}}function Bf(e,t){if(e instanceof $n)return Object.assign(e,{memberName:t,_isMemberSchema:!0});const r=$n;return new r(e,t)}const wy=e=>Array.isArray(e)&&e.length===2,rfe=e=>Array.isArray(e)&&e.length>=5;class Qi{namespace;schemas;exceptions;static registries=new Map;constructor(t,r=new Map,n=new Map){this.namespace=t,this.schemas=r,this.exceptions=n}static for(t){return Qi.registries.has(t)||Qi.registries.set(t,new Qi(t)),Qi.registries.get(t)}copyFrom(t){const{schemas:r,exceptions:n}=this;for(const[i,o]of t.schemas)r.has(i)||r.set(i,o);for(const[i,o]of t.exceptions)n.has(i)||n.set(i,o)}register(t,r){const n=this.normalizeShapeId(t);for(const i of[this,Qi.for(n.split("#")[0])])i.schemas.set(n,r)}getSchema(t){const r=this.normalizeShapeId(t);if(!this.schemas.has(r))throw new Error(`@smithy/core/schema - schema not found for ${r}`);return this.schemas.get(r)}registerError(t,r){const n=t,i=n[1];for(const o of[this,Qi.for(i)])o.schemas.set(i+"#"+n[2],n),o.exceptions.set(n,r)}getErrorCtor(t){const r=t;return this.exceptions.has(r)?this.exceptions.get(r):Qi.for(r[1]).exceptions.get(r)}getBaseException(){for(const t of this.exceptions.keys())if(Array.isArray(t)){const[,r,n]=t,i=r+"#"+n;if(i.startsWith("smithy.ts.sdk.synthetic.")&&i.endsWith("ServiceException"))return t}}find(t){for(const r of this.schemas.values())if(t(r))return r}clear(){this.schemas.clear(),this.exceptions.clear()}normalizeShapeId(t){return t.includes("#")?t:this.namespace+"#"+t}}const kS=e=>{if(e!=null){if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return String(t)!==String(e)&&dfe.warn(cfe(`Expected number but observed string: ${e}`)),t}if(typeof e=="number")return e;throw new TypeError(`Expected number, got ${typeof e}: ${e}`)}},nfe=Math.ceil(2**127*(2-2**-23)),zN=e=>{const t=kS(e);if(t!==void 0&&!Number.isNaN(t)&&t!==1/0&&t!==-1/0&&Math.abs(t)>nfe)throw new TypeError(`Expected 32-bit float, got ${e}`);return t},ife=e=>{if(e!=null){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)}},UN=e=>N5(e,16),BN=e=>N5(e,8),N5=(e,t)=>{const r=ife(e);if(r!==void 0&&ofe(r,t)!==r)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return r},ofe=(e,t)=>{switch(t){case 32:return Int32Array.of(e)[0];case 16:return Int16Array.of(e)[0];case 8:return Int8Array.of(e)[0]}},afe=e=>kS(typeof e=="string"?Rb(e):e),sfe=e=>zN(typeof e=="string"?Rb(e):e),lfe=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,Rb=e=>{const t=e.match(lfe);if(t===null||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)},sv=e=>UN(typeof e=="string"?Rb(e):e),ufe=e=>BN(typeof e=="string"?Rb(e):e),cfe=e=>String(new TypeError(e).stack||e).split(`
|
|
53
|
+
`).slice(0,5).filter(t=>!t.includes("stackTraceWarning")).join(`
|
|
54
|
+
`),dfe={warn:console.warn},ffe=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],h2=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function hfe(e){const t=e.getUTCFullYear(),r=e.getUTCMonth(),n=e.getUTCDay(),i=e.getUTCDate(),o=e.getUTCHours(),a=e.getUTCMinutes(),s=e.getUTCSeconds(),l=i<10?`0${i}`:`${i}`,c=o<10?`0${o}`:`${o}`,d=a<10?`0${a}`:`${a}`,f=s<10?`0${s}`:`${s}`;return`${ffe[n]}, ${l} ${h2[r]} ${t} ${c}:${d}:${f} GMT`}const pfe=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),mfe=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const t=pfe.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");const[r,n,i,o,a,s,l,c,d]=t,f=sv(mp(n)),h=Nl(i,"month",1,12),p=Nl(o,"day",1,31),m=s0(f,h,p,{hours:a,minutes:s,seconds:l,fractionalMilliseconds:c});return d.toUpperCase()!="Z"&&m.setTime(m.getTime()-Rfe(d)),m},gfe=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),vfe=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),bfe=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),D5=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let t=gfe.exec(e);if(t){const[r,n,i,o,a,s,l,c]=t;return s0(sv(mp(o)),Ey(i),Nl(n,"day",1,31),{hours:a,minutes:s,seconds:l,fractionalMilliseconds:c})}if(t=vfe.exec(e),t){const[r,n,i,o,a,s,l,c]=t;return Sfe(s0(yfe(o),Ey(i),Nl(n,"day",1,31),{hours:a,minutes:s,seconds:l,fractionalMilliseconds:c}))}if(t=bfe.exec(e),t){const[r,n,i,o,a,s,l,c]=t;return s0(sv(mp(c)),Ey(n),Nl(i.trimLeft(),"day",1,31),{hours:o,minutes:a,seconds:s,fractionalMilliseconds:l})}throw new TypeError("Invalid RFC-7231 date-time value")},_fe=e=>{if(e==null)return;let t;if(typeof e=="number")t=e;else if(typeof e=="string")t=afe(e);else if(typeof e=="object"&&e.tag===1)t=e.value;else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(t)||t===1/0||t===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(t*1e3))},s0=(e,t,r,n)=>{const i=t-1;return Efe(e,i,r),new Date(Date.UTC(e,i,r,Nl(n.hours,"hour",0,23),Nl(n.minutes,"minute",0,59),Nl(n.seconds,"seconds",0,60),Cfe(n.fractionalMilliseconds)))},yfe=e=>{const t=new Date().getUTCFullYear(),r=Math.floor(t/100)*100+sv(mp(e));return r<t?r+100:r},xfe=50*365*24*60*60*1e3,Sfe=e=>e.getTime()-new Date().getTime()>xfe?new Date(Date.UTC(e.getUTCFullYear()-100,e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds())):e,Ey=e=>{const t=h2.indexOf(e);if(t<0)throw new TypeError(`Invalid month: ${e}`);return t+1},wfe=[31,28,31,30,31,30,31,31,30,31,30,31],Efe=(e,t,r)=>{let n=wfe[t];if(t===1&&kfe(e)&&(n=29),r>n)throw new TypeError(`Invalid day for ${h2[t]} in ${e}: ${r}`)},kfe=e=>e%4===0&&(e%100!==0||e%400===0),Nl=(e,t,r,n)=>{const i=ufe(mp(e));if(i<r||i>n)throw new TypeError(`${t} must be between ${r} and ${n}, inclusive`);return i},Cfe=e=>e==null?0:sfe("0."+e)*1e3,Rfe=e=>{const t=e[0];let r=1;if(t=="+")r=1;else if(t=="-")r=-1;else throw new TypeError(`Offset direction, ${t}, must be "+" or "-"`);const n=Number(e.substring(1,3)),i=Number(e.substring(4,6));return r*(n*60+i)*60*1e3},mp=e=>{let t=0;for(;t<e.length-1&&e.charAt(t)==="0";)t++;return t===0?e:e.slice(t)},jN=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Zn=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0")),F5=()=>{if(jN)return jN();const e=new Uint8Array(16);return crypto.getRandomValues(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128,Zn[e[0]]+Zn[e[1]]+Zn[e[2]]+Zn[e[3]]+"-"+Zn[e[4]]+Zn[e[5]]+"-"+Zn[e[6]]+Zn[e[7]]+"-"+Zn[e[8]]+Zn[e[9]]+"-"+Zn[e[10]]+Zn[e[11]]+Zn[e[12]]+Zn[e[13]]+Zn[e[14]]+Zn[e[15]]},El=function(t){return Object.assign(new String(t),{deserializeJSON(){return JSON.parse(String(t))},toString(){return String(t)},toJSON(){return String(t)}})};El.from=e=>e&&typeof e=="object"&&(e instanceof El||"deserializeJSON"in e)?e:typeof e=="string"||Object.getPrototypeOf(e)===String.prototype?El(String(e)):El(JSON.stringify(e));El.fromObject=El.from;const qN=/^-?\d*(\.\d+)?$/;class za{string;type;constructor(t,r){if(this.string=t,this.type=r,!qN.test(t))throw new Error('@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".')}toString(){return this.string}static[Symbol.hasInstance](t){if(!t||typeof t!="object")return!1;const r=t;return za.prototype.isPrototypeOf(t)||r.type==="bigDecimal"&&qN.test(r.string)}}class Afe{serdeContext;setSerdeContext(t){this.serdeContext=t}}class Tfe extends Afe{options;compositeErrorRegistry;constructor(t){super(),this.options=t,this.compositeErrorRegistry=Qi.for(t.defaultNamespace);for(const r of t.errorTypeRegistries??[])this.compositeErrorRegistry.copyFrom(r)}getRequestType(){return uo}getResponseType(){return Md}setSerdeContext(t){this.serdeContext=t,this.serializer.setSerdeContext(t),this.deserializer.setSerdeContext(t),this.getPayloadCodec()&&this.getPayloadCodec().setSerdeContext(t)}updateServiceEndpoint(t,r){if("url"in r){t.protocol=r.url.protocol,t.hostname=r.url.hostname,t.port=r.url.port?Number(r.url.port):void 0,t.path=r.url.pathname,t.fragment=r.url.hash||void 0,t.username=r.url.username||void 0,t.password=r.url.password||void 0,t.query||(t.query={});for(const[n,i]of r.url.searchParams.entries())t.query[n]=i;if(r.headers)for(const n in r.headers)t.headers[n]=r.headers[n].join(", ");return t}else{if(t.protocol=r.protocol,t.hostname=r.hostname,t.port=r.port?Number(r.port):void 0,t.path=r.path,t.query={...r.query},r.headers)for(const n in r.headers)t.headers[n]=r.headers[n];return t}}setHostPrefix(t,r,n){if(this.serdeContext?.disableHostPrefix)return;const i=$n.of(r.input),o=ah(r.traits??{});if(o.endpoint){let a=o.endpoint?.[0];if(typeof a=="string"){for(const[s,l]of i.structIterator()){if(!l.getMergedTraits().hostLabel)continue;const c=n[s];if(typeof c!="string")throw new Error(`@smithy/core/schema - ${s} in input must be a string as hostLabel.`);a=a.replace(`{${s}}`,c)}t.hostname=a+t.hostname}}}deserializeMetadata(t){return{httpStatusCode:t.statusCode,requestId:t.headers["x-amzn-requestid"]??t.headers["x-amzn-request-id"]??t.headers["x-amz-request-id"],extendedRequestId:t.headers["x-amz-id-2"],cfId:t.headers["x-amz-cf-id"]}}async serializeEventStream({eventStream:t,requestSchema:r,initialRequest:n}){return(await this.loadEventStreamCapability()).serializeEventStream({eventStream:t,requestSchema:r,initialRequest:n})}async deserializeEventStream({response:t,responseSchema:r,initialResponseContainer:n}){return(await this.loadEventStreamCapability()).deserializeEventStream({response:t,responseSchema:r,initialResponseContainer:n})}async loadEventStreamCapability(){const{EventStreamSerde:t}=await rh(async()=>{const{EventStreamSerde:r}=await import("./index-C5R5wdF3.js");return{EventStreamSerde:r}},__vite__mapDeps([5]));return new t({marshaller:this.getEventStreamMarshaller(),serializer:this.serializer,deserializer:this.deserializer,serdeContext:this.serdeContext,defaultContentType:this.getDefaultContentType()})}getDefaultContentType(){throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`)}async deserializeHttpMessage(t,r,n,i,o){return[]}getEventStreamMarshaller(){const t=this.serdeContext;if(!t.eventStreamMarshaller)throw new Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.");return t.eventStreamMarshaller}}class $fe extends Tfe{async serializeRequest(t,r,n){const i=this.serializer,o={},a={},s=await n.endpoint(),l=$n.of(t?.input),c=l.getSchema();let d;const f=r&&typeof r=="object"?r:{},h=new uo({protocol:"",hostname:"",port:void 0,path:"/",fragment:void 0,query:o,headers:a,body:void 0});if(s&&(this.updateServiceEndpoint(h,s),this.setHostPrefix(h,t,f)),f){const p=l.getEventStreamMember();if(p){if(f[p]){const m={};for(const[g,v]of l.structIterator())g!==p&&f[g]&&(i.write(v,f[g]),m[g]=i.flush());d=await this.serializeEventStream({eventStream:f[p],requestSchema:l,initialRequest:m})}}else i.write(c,f),d=i.flush()}return h.headers=Object.assign(h.headers,a),h.query=o,h.body=d,h.method="POST",h}async deserializeResponse(t,r,n){const i=this.deserializer,o=$n.of(t.output),a={};if(n.statusCode>=300){const l=await ES(n.body,r);throw l.byteLength>0&&Object.assign(a,await i.read(15,l)),await this.handleError(t,r,n,a,this.deserializeMetadata(n)),new Error("@smithy/core/protocols - RPC Protocol error handler failed to throw.")}for(const l in n.headers){const c=n.headers[l];delete n.headers[l],n.headers[l.toLowerCase()]=c}const s=o.getEventStreamMember();if(s)a[s]=await this.deserializeEventStream({response:n,responseSchema:o,initialResponseContainer:a});else{const l=await ES(n.body,r);l.byteLength>0&&Object.assign(a,await i.read(o,l))}return a.$metadata=this.deserializeMetadata(n),a}}function I5(e,t){if(t.timestampFormat.useTrait&&e.isTimestampSchema()&&(e.getSchema()===5||e.getSchema()===6||e.getSchema()===7))return e.getSchema();const{httpLabel:r,httpPrefixHeaders:n,httpHeader:i,httpQuery:o}=e.getMergedTraits();return(t.httpBindings?typeof n=="string"||i?6:o||r?5:void 0:void 0)??t.timestampFormat.default}function Nfe(e,t,r){e.__smithy_context?e.__smithy_context.features||(e.__smithy_context.features={}):e.__smithy_context={features:{}},e.__smithy_context.features[t]=r}class Dfe{authSchemes=new Map;constructor(t){for(const r in t){const n=t[r];n!==void 0&&this.authSchemes.set(r,n)}}getIdentityProvider(t){return this.authSchemes.get(t)}}class Ffe{async sign(t,r,n){return t}}const Ife=e=>function(r){return P5(r)&&r.expiration.getTime()-Date.now()<e},Pfe=3e5,Ofe=Ife(Pfe),P5=e=>e.expiration!==void 0,Mfe=(e,t,r)=>{if(e===void 0)return;const n=typeof e!="function"?async()=>Promise.resolve(e):e;let i,o,a,s=!1;const l=async c=>{o||(o=n(c));try{i=await o,a=!0,s=!1}finally{o=void 0}return i};return t===void 0?async c=>((!a||c?.forceRefresh)&&(i=await l(c)),i):async c=>((!a||c?.forceRefresh)&&(i=await l(c)),s?i:r(i)?(t(i)&&await l(c),i):(s=!0,i))},Lfe=void 0;function zfe(e){return e===void 0?!0:typeof e=="string"&&e.length<=50}function Ufe(e){const t=xh(e.userAgentAppId??Lfe),{customUserAgent:r}=e;return Object.assign(e,{customUserAgent:typeof r=="string"?[[r]]:r,userAgentAppId:async()=>{const n=await t();if(!zfe(n)){const i=e.logger?.constructor?.name==="NoOpLogger"||!e.logger?console:e.logger;typeof n!="string"?i?.warn("userAgentAppId must be a string or undefined."):n.length>50&&i?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return n}})}class p2{nodes;root;conditions;results;constructor(t,r,n,i){this.nodes=t,this.root=r,this.conditions=n,this.results=i}static from(t,r,n,i){return new p2(t,r,n,i)}}class Bfe{capacity;data=new Map;parameters=[];constructor({size:t,params:r}){this.capacity=t??50,r&&(this.parameters=r)}get(t,r){const n=this.hash(t);if(n===!1)return r();if(!this.data.has(n)){if(this.data.size>this.capacity+10){const i=this.data.keys();let o=0;for(;;){const{value:a,done:s}=i.next();if(this.data.delete(a),s||++o>10)break}}this.data.set(n,r())}return this.data.get(n)}size(){return this.data.size}hash(t){let r="";const{parameters:n}=this;if(n.length===0)return!1;for(const i of n){const o=String(t[i]??"");if(o.includes("|;"))return!1;r+=o+"|;"}return r}}class ha extends Error{constructor(t){super(t),this.name="EndpointError"}}const jfe="endpoints";function lv(e){return typeof e!="object"||e==null?e:"ref"in e?`$${lv(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(lv).join(", ")})`:JSON.stringify(e,null,2)}const m2={},qfe=(e,t)=>e===t;function Vfe(...e){for(const t of e)if(t!=null)return t}const Gfe=e=>{const t=e.split("."),r=[];for(const n of t){const i=n.indexOf("[");if(i!==-1){if(n.indexOf("]")!==n.length-1)throw new ha(`Path: '${e}' does not end with ']'`);const o=n.slice(i+1,-1);if(Number.isNaN(parseInt(o)))throw new ha(`Invalid array index: '${o}' in path: '${e}'`);i!==0&&r.push(n.slice(0,i)),r.push(o)}else r.push(n)}return r},O5=(e,t)=>Gfe(t).reduce((r,n)=>{if(typeof r!="object")throw new ha(`Index '${n}' in '${t}' not found in '${JSON.stringify(e)}'`);if(Array.isArray(r)){const i=parseInt(n);return r[i<0?r.length+i:i]}return r[n]},e),Kfe=e=>e!=null,Hfe=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),Ab=(e,t=!1)=>{if(!t)return Hfe.test(e);const r=e.split(".");for(const n of r)if(!Ab(n))return!1;return!0};function Wfe(e,t,r){return e?t:r}const Jfe=e=>!e,Qfe=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),M5=e=>Qfe.test(e)||e.startsWith("[")&&e.endsWith("]"),ky={[fp.HTTP]:80,[fp.HTTPS]:443},Yfe=e=>{const t=(()=>{try{if(e instanceof URL)return e;if(typeof e=="object"&&"hostname"in e){const{hostname:h,port:p,protocol:m="",path:g="",query:v={}}=e,b=new URL(`${m}//${h}${p?`:${p}`:""}${g}`);return b.search=Object.entries(v).map(([y,S])=>`${y}=${S}`).join("&"),b}return new URL(e)}catch{return null}})();if(!t)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;const r=t.href,{host:n,hostname:i,pathname:o,protocol:a,search:s}=t;if(s)return null;const l=a.slice(0,-1);if(!Object.values(fp).includes(l))return null;const c=M5(i),d=r.includes(`${n}:${ky[l]}`)||typeof e=="string"&&e.includes(`${n}:${ky[l]}`),f=`${n}${d?`:${ky[l]}`:""}`;return{scheme:l,authority:f,path:o,normalizedPath:o.endsWith("/")?o:`${o}/`,isIp:c}};function Xfe(e,t,r){if(r===1)return[e];if(e==="")return[""];const n=e.split(t);return r===0?n:n.slice(0,r-1).concat(n.slice(1).join(t))}const Zfe=(e,t)=>e===t,ehe=(e,t,r,n)=>e==null||t>=r||e.length<r||/[^\u0000-\u007f]/.test(e)?null:n?e.substring(e.length-r,e.length-t):e.substring(t,r),the=e=>encodeURIComponent(e).replace(/[!*'()]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),rhe={booleanEquals:qfe,coalesce:Vfe,getAttr:O5,isSet:Kfe,isValidHostLabel:Ab,ite:Wfe,not:Jfe,parseURL:Yfe,split:Xfe,stringEquals:Zfe,substring:ehe,uriEncode:the},L5=(e,t)=>{const r=[],{referenceRecord:n,endpointParams:i}=t;let o=0;for(;o<e.length;){const a=e.indexOf("{",o);if(a===-1){r.push(e.slice(o));break}r.push(e.slice(o,a));const s=e.indexOf("}",a);if(s===-1){r.push(e.slice(a));break}e[a+1]==="{"&&e[s+1]==="}"&&(r.push(e.slice(a+1,s)),o=s+2);const l=e.substring(a+1,s);if(l.includes("#")){const[c,d]=l.split("#");r.push(O5(n[c]??i[c],d))}else r.push(n[l]??i[l]);o=s+1}return r.join("")},nhe=({ref:e},t)=>t.referenceRecord[e]??t.endpointParams[e],Tb=(e,t,r)=>{if(typeof e=="string")return L5(e,r);if(e.fn)return U5.callFunction(e,r);if(e.ref)return nhe(e,r);throw new ha(`'${t}': ${String(e)} is not a string, function or reference.`)},z5=({fn:e,argv:t},r)=>{const n=Array(t.length);for(let a=0;a<n.length;++a){const s=t[a];typeof s=="boolean"||typeof s=="number"?n[a]=s:n[a]=U5.evaluateExpression(s,"arg",r)}const i=e.indexOf(".");if(i!==-1){const s=m2[e.slice(0,i)]?.[e.slice(i+1)];if(typeof s=="function")return s(...n)}const o=rhe[e];if(typeof o=="function")return o(...n);throw new Error(`function ${e} not loaded in endpointFunctions.`)},U5={evaluateExpression:Tb,callFunction:z5},ihe=(e,t)=>{const{assign:r}=e;if(r&&r in t.referenceRecord)throw new ha(`'${r}' is already defined in Reference Record.`);const n=z5(e,t);t.logger?.debug?.(`${jfe} evaluateCondition: ${lv(e)} = ${lv(n)}`);const i=n===""?!0:!!n;return r!=null?{result:i,toAssign:{name:r,value:n}}:{result:i}},ohe=(e,t)=>Object.entries(e??{}).reduce((r,[n,i])=>(r[n]=i.map(o=>{const a=Tb(o,"Header value entry",t);if(typeof a!="string")throw new ha(`Header '${n}' value '${a}' is not a string`);return a}),r),{}),B5=(e,t)=>Object.entries(e).reduce((r,[n,i])=>(r[n]=q5.getEndpointProperty(i,t),r),{}),j5=(e,t)=>{if(Array.isArray(e))return e.map(r=>j5(r,t));switch(typeof e){case"string":return L5(e,t);case"object":if(e===null)throw new ha(`Unexpected endpoint property: ${e}`);return q5.getEndpointProperties(e,t);case"boolean":return e;default:throw new ha(`Unexpected endpoint property type: ${typeof e}`)}},q5={getEndpointProperty:j5,getEndpointProperties:B5},ahe=(e,t)=>{const r=Tb(e,"Endpoint URL",t);if(typeof r=="string")try{return new URL(r)}catch(n){throw console.error(`Failed to construct URL with ${r}`,n),n}throw new ha(`Endpoint URL must be a string, got ${typeof r}`)},Cy=1e8,she=(e,t)=>{const{nodes:r,root:n,results:i,conditions:o}=e;let a=n;const s={},l={referenceRecord:s,endpointParams:t.endpointParams,logger:t.logger};for(;a!==1&&a!==-1&&a<Cy;){const c=3*(Math.abs(a)-1),[d,f,h]=[r[c],r[c+1],r[c+2]],[p,m,g]=o[d],v=ihe({fn:p,assign:g,argv:m},l);if(v.toAssign){const{name:b,value:y}=v.toAssign;s[b]=y}a=a>=0===v.result?f:h}if(a>=Cy){const c=i[a-Cy];if(c[0]===-1){const[,p]=c;throw new ha(Tb(p,"Error",l))}const[d,f,h]=c;return{url:ahe(d,l),properties:B5(f,l),headers:ohe(h??{},l)}}throw new ha("No matching endpoint.")},V5=(e,t=!1)=>{if(t){for(const r of e.split("."))if(!V5(r))return!1;return!0}return!(!Ab(e)||e.length<3||e.length>63||e!==e.toLowerCase()||M5(e))},VN=":",lhe="/",uhe=e=>{const t=e.split(VN);if(t.length<6)return null;const[r,n,i,o,a,...s]=t;if(r!=="arn"||n===""||i===""||s.join(VN)==="")return null;const l=s.map(c=>c.split(lhe)).flat();return{partition:n,service:i,region:o,accountId:a,resourceId:l}},che=[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-east-2":{description:"Asia Pacific (Taipei)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-6":{description:"Asia Pacific (New Zealand)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"aws global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"mx-central-1":{description:"Mexico (Central)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"aws-cn global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-eusc",outputs:{dnsSuffix:"amazonaws.eu",dualStackDnsSuffix:"api.amazonwebservices.eu",implicitGlobalRegion:"eusc-de-east-1",name:"aws-eusc",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eusc\\-(de)\\-\\w+\\-\\d+$",regions:{"eusc-de-east-1":{description:"AWS European Sovereign Cloud (Germany)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"api.aws.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"aws-iso global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"api.aws.scloud",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"aws-iso-b global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"},"us-isob-west-1":{description:"US ISOB West"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"api.cloud-aws.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"aws-iso-e-global":{description:"aws-iso-e global region"},"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"api.aws.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"aws-iso-f global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"aws-us-gov global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}}],dhe={partitions:che};let fhe=dhe;const hhe=e=>{const{partitions:t}=fhe;for(const n of t){const{regions:i,outputs:o}=n;for(const[a,s]of Object.entries(i))if(a===e)return{...o,...s}}for(const n of t){const{regionRegex:i,outputs:o}=n;if(new RegExp(i).test(e))return{...o}}const r=t.find(n=>n.id==="aws");if(!r)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...r.outputs}},G5={isVirtualHostableS3Bucket:V5,parseArn:uhe,partition:hhe};m2.aws=G5;function phe(e,t,r){return e.$source||(e.$source={}),e.$source[t]=r,e}function ds(e,t,r){e.__aws_sdk_context?e.__aws_sdk_context.features||(e.__aws_sdk_context.features={}):e.__aws_sdk_context={features:{}},e.__aws_sdk_context.features[t]=r}var Bl;(function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"})(Bl||(Bl={}));const wh=3,mhe=Bl.STANDARD,ghe=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],vhe=["TimeoutError","RequestTimeout","RequestTimeoutException"],bhe=[500,502,503,504],_he=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],yhe=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],xhe=e=>e?.$retryable!==void 0,She=e=>e.$metadata?.clockSkewCorrected,whe=e=>{const t=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);return e&&e instanceof TypeError?t.has(e.message):!1},K5=e=>e.$metadata?.httpStatusCode===429||ghe.includes(e.name)||e.$retryable?.throttling==!0,g2=(e,t=0)=>xhe(e)||She(e)||vhe.includes(e.name)||_he.includes(e?.code||"")||yhe.includes(e?.code||"")||bhe.includes(e.$metadata?.httpStatusCode||0)||whe(e)||khe(e)||e.cause!==void 0&&t<=10&&g2(e.cause,t+1),Ehe=e=>{if(e.$metadata?.httpStatusCode!==void 0){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!g2(e)}return!1};function khe(e){return e.code==="ERR_HTTP2_STREAM_ERROR"&&e.message.includes("NGHTTP2_REFUSED_STREAM")}class v2{static setTimeoutFn=setTimeout;beta;minCapacity;minFillRate;scaleConstant;smooth;enabled=!1;availableTokens=0;lastMaxRate=0;measuredTxRate=0;requestCount=0;fillRate;lastThrottleTime;lastTimestamp=0;lastTxRateBucket;maxCapacity;timeWindow=0;constructor(t){this.beta=t?.beta??.7,this.minCapacity=t?.minCapacity??1,this.minFillRate=t?.minFillRate??.5,this.scaleConstant=t?.scaleConstant??.4,this.smooth=t?.smooth??.8,this.lastThrottleTime=this.getCurrentTimeInSeconds(),this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}async getSendToken(){return this.acquireTokenBucket(1)}updateClientSendingRate(t){let r;this.updateMeasuredRate();const n=t;if(n?.errorType==="THROTTLING"||K5(n?.error??t)){const a=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=a,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),r=this.cubicThrottle(a),this.enableTokenBucket()}else this.calculateTimeWindow(),r=this.cubicSuccess(this.getCurrentTimeInSeconds());const o=Math.min(r,2*this.measuredTxRate);this.updateTokenBucketRate(o)}getCurrentTimeInSeconds(){return Date.now()/1e3}async acquireTokenBucket(t){if(this.enabled){if(this.refillTokenBucket(),t>this.availableTokens){const r=(t-this.availableTokens)/this.fillRate*1e3;await new Promise(n=>v2.setTimeoutFn(n,r))}this.availableTokens=this.availableTokens-t}}refillTokenBucket(){const t=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=t;return}const r=(t-this.lastTimestamp)*this.fillRate;this.availableTokens=Math.min(this.maxCapacity,this.availableTokens+r),this.lastTimestamp=t}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}cubicThrottle(t){return this.getPrecise(t*this.beta)}cubicSuccess(t){return this.getPrecise(this.scaleConstant*Math.pow(t-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(t){this.refillTokenBucket(),this.fillRate=Math.max(t,this.minFillRate),this.maxCapacity=Math.max(t,this.minCapacity),this.availableTokens=Math.min(this.availableTokens,this.maxCapacity)}updateMeasuredRate(){const t=this.getCurrentTimeInSeconds(),r=Math.floor(t*2)/2;if(this.requestCount++,r>this.lastTxRateBucket){const n=this.requestCount/(r-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(n*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=r}}getPrecise(t){return parseFloat(t.toFixed(8))}}const H5=20*1e3,GN=500,Che=1,Rhe="amz-sdk-invocation-id",Ahe="amz-sdk-request";var The={};class ci{static v2026=typeof process<"u"&&The?.SMITHY_NEW_RETRIES_2026==="true";static delay(){return ci.v2026?50:100}static throttlingDelay(){return ci.v2026?1e3:500}static cost(){return ci.v2026?14:5}static throttlingCost(){return ci.v2026?5:10}static modifiedCostType(){return ci.v2026?"THROTTLING":"TRANSIENT"}}class $he{x=ci.delay();computeNextBackoffDelay(t){const i=Math.random()*Math.min(this.x*2**t,H5);return Math.floor(i)}setDelayBase(t){this.x=t}}class KN{delay;count;cost;longPoll;constructor(t,r,n,i){this.delay=t,this.count=r,this.cost=n,this.longPoll=i}getRetryCount(){return this.count}getRetryDelay(){return Math.min(H5,this.delay)}getRetryCost(){return this.cost}isLongPoll(){return this.longPoll}}class CS{mode=Bl.STANDARD;capacity=GN;retryBackoffStrategy;maxAttemptsProvider;baseDelay;constructor(t){typeof t=="number"?this.maxAttemptsProvider=async()=>t:typeof t=="function"?this.maxAttemptsProvider=t:t&&typeof t=="object"&&(this.maxAttemptsProvider=async()=>t.maxAttempts,this.baseDelay=t.baseDelay,this.retryBackoffStrategy=t.backoff),this.maxAttemptsProvider??=async()=>wh,this.baseDelay??=ci.delay(),this.retryBackoffStrategy??=new $he}async acquireInitialRetryToken(t){return new KN(ci.delay(),0,void 0,ci.v2026&&t.includes(":longpoll"))}async refreshRetryTokenForRetry(t,r){const n=await this.getMaxAttempts(),i=this.shouldRetry(t,r,n);if(i||t.isLongPoll?.()){const o=r.errorType;this.retryBackoffStrategy.setDelayBase(o==="THROTTLING"?ci.throttlingDelay():this.baseDelay);const a=this.retryBackoffStrategy.computeNextBackoffDelay(t.getRetryCount());let s=a;if(r.retryAfterHint instanceof Date&&(s=Math.max(a,Math.min(r.retryAfterHint.getTime()-Date.now(),a+5e3))),i){const l=this.getCapacityCost(o);return this.capacity-=l,new KN(s,t.getRetryCount()+1,l,t.isLongPoll?.()??!1)}else throw Object.assign(new Error("No retry token available"),{$backoff:ci.v2026?s:0})}throw new Error("No retry token available")}recordSuccess(t){this.capacity=Math.min(GN,this.capacity+(t.getRetryCost()??Che))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch{return console.warn(`Max attempts provider could not resolve. Using default of ${wh}`),wh}}shouldRetry(t,r,n){return t.getRetryCount()+1<n&&this.capacity>=this.getCapacityCost(r.errorType)&&this.isRetryableError(r.errorType)}getCapacityCost(t){return t===ci.modifiedCostType()?ci.throttlingCost():ci.cost()}isRetryableError(t){return t==="THROTTLING"||t==="TRANSIENT"}async maxAttempts(){return this.maxAttemptsProvider()}}class Nhe{mode=Bl.ADAPTIVE;rateLimiter;standardRetryStrategy;constructor(t,r){const{rateLimiter:n}=r??{};this.rateLimiter=n??new v2,this.standardRetryStrategy=r?new CS({maxAttempts:typeof t=="number"?t:3,...r}):new CS(t)}async acquireInitialRetryToken(t){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(t)}async refreshRetryTokenForRetry(t,r){return this.rateLimiter.updateClientSendingRate(r),this.standardRetryStrategy.refreshRetryTokenForRetry(t,r)}recordSuccess(t){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(t)}async maxAttemptsProvider(){return this.standardRetryStrategy.maxAttempts()}}const Dhe=/\d{12}\.ddb/;async function Fhe(e,t,r){if(r.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor"&&ds(e,"PROTOCOL_RPC_V2_CBOR","M"),typeof t.retryStrategy=="function"){const o=await t.retryStrategy();if(typeof o.mode=="string")switch(o.mode){case Bl.ADAPTIVE:ds(e,"RETRY_MODE_ADAPTIVE","F");break;case Bl.STANDARD:ds(e,"RETRY_MODE_STANDARD","E");break}}if(typeof t.accountIdEndpointMode=="function"){const o=e.endpointV2;switch(String(o?.url?.hostname).match(Dhe)&&ds(e,"ACCOUNT_ID_ENDPOINT","O"),await t.accountIdEndpointMode?.()){case"disabled":ds(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":ds(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":ds(e,"ACCOUNT_ID_MODE_REQUIRED","R");break}}const i=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(i?.$source){const o=i;o.accountId&&ds(e,"RESOLVED_ACCOUNT_ID","T");for(const[a,s]of Object.entries(o.$source??{}))ds(e,a,s)}}const HN="user-agent",Ry="x-amz-user-agent",WN=" ",Ay="/",Ihe=/[^!$%&'*+\-.^_`|~\w]/g,Phe=/[^!$%&'*+\-.^_`|~\w#]/g,JN="-",Ohe=1024;function Mhe(e){let t="";for(const r in e){const n=e[r];if(t.length+n.length+1<=Ohe){t.length?t+=","+n:t+=n;continue}break}return t}const Lhe=e=>(t,r)=>async n=>{const{request:i}=n;if(!uo.isInstance(i))return t(n);const{headers:o}=i,a=r?.userAgent?.map(og)||[],s=(await e.defaultUserAgentProvider()).map(og);await Fhe(r,e,n);const l=r;s.push(`m/${Mhe(Object.assign({},r.__smithy_context?.features,l.__aws_sdk_context?.features))}`);const c=e?.customUserAgent?.map(og)||[],d=await e.userAgentAppId();d&&s.push(og(["app",`${d}`]));const f=[].concat([...s,...a,...c]).join(WN),h=[...s.filter(p=>p.startsWith("aws-sdk-")),...c].join(WN);return e.runtime!=="browser"?(h&&(o[Ry]=o[Ry]?`${o[HN]} ${h}`:h),o[HN]=f):o[Ry]=f,t({...n,request:i})},og=e=>{const t=e[0].split(Ay).map(a=>a.replace(Ihe,JN)).join(Ay),r=e[1]?.replace(Phe,JN),n=t.indexOf(Ay),i=t.substring(0,n);let o=t.substring(n+1);return i==="api"&&(o=o.toLowerCase()),[i,o,r].filter(a=>a&&a.length>0).reduce((a,s,l)=>{switch(l){case 0:return s;case 1:return`${a}/${s}`;default:return`${a}#${s}`}},"")},zhe={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Uhe=e=>({applyToStack:t=>{t.add(Lhe(e),zhe)}}),Bhe=!1,jhe=!1,QN=new Set,qhe=(e,t=Ab)=>{if(!QN.has(e)&&!t(e))if(e==="*")console.warn('@smithy/config-resolver WARN - Please use the caller region instead of "*". See "sigv4a" in https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md.');else throw new Error(`Region not accepted: region="${e}" is not a valid hostname component.`);else QN.add(e)},W5=e=>typeof e=="string"&&(e.startsWith("fips-")||e.endsWith("-fips")),Vhe=e=>W5(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e,Ghe=e=>{const{region:t,useFipsEndpoint:r}=e;if(!t)throw new Error("Region is missing");return Object.assign(e,{region:async()=>{const n=typeof t=="function"?await t():t,i=Vhe(n);return qhe(i),i},useFipsEndpoint:async()=>{const n=typeof t=="string"?t:await t();return W5(n)?!0:typeof r!="function"?Promise.resolve(!!r):r()}})},YN="content-length";function Khe(e){return t=>async r=>{const n=r.request;if(uo.isInstance(n)){const{body:i,headers:o}=n;if(i&&Object.keys(o).map(a=>a.toLowerCase()).indexOf(YN)===-1)try{const a=e(i);n.headers={...n.headers,[YN]:String(a)}}catch{}}return t({...r,request:n})}}const Hhe={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},Whe=e=>({applyToStack:t=>{t.add(Khe(e.bodyLengthChecker),Hhe)}}),Jhe=async e=>{const t=e?.Bucket||"";if(typeof e.Bucket=="string"&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),epe(t)){if(e.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!Zhe(t)||t.indexOf(".")!==-1&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3)&&(e.ForcePathStyle=!0);return e.DisableMultiRegionAccessPoints&&(e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0),e},Qhe=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Yhe=/(\d+\.){3}\d+/,Xhe=/\.\./,Zhe=e=>Qhe.test(e)&&!Yhe.test(e)&&!Xhe.test(e),epe=e=>{const[t,r,n,,,i]=e.split(":"),o=t==="arn"&&e.split(":").length>=6,a=!!(o&&r&&n&&i);if(o&&!a)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return a},tpe=(e,t,r,n=!1)=>{const i=async()=>{let o;return n?o=r.clientContextParams?.[e]??r[e]??r[t]:o=r[e]??r[t],typeof o=="function"?o():o};return e==="credentialScope"||t==="CredentialScope"?async()=>{const o=typeof r.credentials=="function"?await r.credentials():r.credentials;return o?.credentialScope??o?.CredentialScope}:e==="accountId"||t==="AccountId"?async()=>{const o=typeof r.credentials=="function"?await r.credentials():r.credentials;return o?.accountId??o?.AccountId}:e==="endpoint"||t==="endpoint"?async()=>{if(r.isCustomEndpoint===!1)return;const o=await i();if(o&&typeof o=="object"){if("url"in o)return o.url.href;if("hostname"in o){const{protocol:a,hostname:s,port:l,path:c}=o;return`${a}//${s}${l?":"+l:""}${c}`}}return o}:i},J5=async e=>{},Q5=e=>{if(typeof e=="object"){if("url"in e){const t=zd(e.url);if(e.headers){t.headers={};for(const[r,n]of Object.entries(e.headers))t.headers[r.toLowerCase()]=n.join(", ")}return t}return e}return zd(e)},rpe=async(e,t,r,n)=>{if(!r.isCustomEndpoint){let a;r.serviceConfiguredEndpoint?a=await r.serviceConfiguredEndpoint():a=await J5(r.serviceId),a&&(r.endpoint=()=>Promise.resolve(Q5(a)),r.isCustomEndpoint=!0)}const i=await npe(e,t,r);if(typeof r.endpointProvider!="function")throw new Error("config.endpointProvider is not set.");const o=r.endpointProvider(i,n);if(r.isCustomEndpoint&&r.endpoint){const a=await r.endpoint();if(a?.headers){o.headers??={};for(const[s,l]of Object.entries(a.headers))o.headers[s]=Array.isArray(l)?l:[l]}}return o},npe=async(e,t,r)=>{const n={},i=t?.getEndpointParameterInstructions?.()||{};for(const[o,a]of Object.entries(i))switch(a.type){case"staticContextParams":n[o]=a.value;break;case"contextParams":n[o]=e[a.name];break;case"clientContextParams":case"builtInParams":n[o]=await tpe(a.name,o,r,a.type!=="builtInParams")();break;case"operationContextParams":n[o]=a.get(e);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(a))}return Object.keys(i).length===0&&Object.assign(n,r),String(r.serviceId).toLowerCase()==="s3"&&await Jhe(n),n},ipe=({config:e,instructions:t})=>(r,n)=>async i=>{e.isCustomEndpoint&&Nfe(n,"ENDPOINT_OVERRIDE","N");const o=await rpe(i.input,{getEndpointParameterInstructions(){return t}},{...e},n);n.endpointV2=o,n.authSchemes=o.properties?.authSchemes;const a=n.authSchemes?.[0];if(a){n.signing_region=a.signingRegion,n.signing_service=a.signingName;const l=pf(n)?.selectedHttpAuthScheme?.httpAuthOption;l&&(l.signingProperties=Object.assign(l.signingProperties||{},{signing_region:a.signingRegion,signingRegion:a.signingRegion,signing_service:a.signingName,signingName:a.signingName,signingRegionSet:a.signingRegionSet},a.properties))}return r({...i})},ope={name:"serializerMiddleware"},ape={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:ope.name},spe=(e,t)=>({applyToStack:r=>{r.addRelativeTo(ipe({config:e,instructions:t}),ape)}}),lpe=e=>{const t=e.tls??!0,{endpoint:r,useDualstackEndpoint:n,useFipsEndpoint:i}=e,o=r!=null?async()=>Q5(await Ts(r)()):void 0,s=Object.assign(e,{endpoint:o,tls:t,isCustomEndpoint:!!r,useDualstackEndpoint:Ts(n??!1),useFipsEndpoint:Ts(i??!1)});let l;return s.serviceConfiguredEndpoint=async()=>(e.serviceId&&!l&&(l=J5(e.serviceId)),l),s},upe=e=>e instanceof Error?e:e instanceof Object?Object.assign(new Error,e):typeof e=="string"?new Error(e):new Error(`AWS SDK error wrapper for ${e}`),cpe=e=>{const{retryStrategy:t,retryMode:r}=e,n=Ts(e.maxAttempts??wh);let i=t?Promise.resolve(t):void 0;const o=async()=>await Ts(r)()===Bl.ADAPTIVE?new Nhe(n):new CS(n);return Object.assign(e,{maxAttempts:n,retryStrategy:()=>i??=o()})},su=(e,t)=>{const r=[];if(e&&r.push(e),t)for(const n of t)r.push(n);return r},al=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,uv=()=>{let e=[],t=[],r=!1;const n=new Set,i=f=>f.sort((h,p)=>XN[p.step]-XN[h.step]||ZN[p.priority||"normal"]-ZN[h.priority||"normal"]),o=f=>{let h=!1;const p=m=>{const g=su(m.name,m.aliases);if(g.includes(f)){h=!0;for(const v of g)n.delete(v);return!1}return!0};return e=e.filter(p),t=t.filter(p),h},a=f=>{let h=!1;const p=m=>{if(m.middleware===f){h=!0;for(const g of su(m.name,m.aliases))n.delete(g);return!1}return!0};return e=e.filter(p),t=t.filter(p),h},s=f=>(e.forEach(h=>{f.add(h.middleware,{...h})}),t.forEach(h=>{f.addRelativeTo(h.middleware,{...h})}),f.identifyOnResolve?.(d.identifyOnResolve()),f),l=f=>{const h=[];return f.before.forEach(p=>{p.before.length===0&&p.after.length===0?h.push(p):h.push(...l(p))}),h.push(f),f.after.reverse().forEach(p=>{p.before.length===0&&p.after.length===0?h.push(p):h.push(...l(p))}),h},c=(f=!1)=>{const h=[],p=[],m={};return e.forEach(v=>{const b={...v,before:[],after:[]};for(const y of su(b.name,b.aliases))m[y]=b;h.push(b)}),t.forEach(v=>{const b={...v,before:[],after:[]};for(const y of su(b.name,b.aliases))m[y]=b;p.push(b)}),p.forEach(v=>{if(v.toMiddleware){const b=m[v.toMiddleware];if(b===void 0){if(f)return;throw new Error(`${v.toMiddleware} is not found when adding ${al(v.name,v.aliases)} middleware ${v.relation} ${v.toMiddleware}`)}v.relation==="after"&&b.after.push(v),v.relation==="before"&&b.before.push(v)}}),i(h).map(l).reduce((v,b)=>(v.push(...b),v),[])},d={add:(f,h={})=>{const{name:p,override:m,aliases:g}=h,v={step:"initialize",priority:"normal",middleware:f,...h},b=su(p,g);if(b.length>0){if(b.some(y=>n.has(y))){if(!m)throw new Error(`Duplicate middleware name '${al(p,g)}'`);for(const y of b){const S=e.findIndex(C=>C.name===y||C.aliases?.some(A=>A===y));if(S===-1)continue;const w=e[S];if(w.step!==v.step||v.priority!==w.priority)throw new Error(`"${al(w.name,w.aliases)}" middleware with ${w.priority} priority in ${w.step} step cannot be overridden by "${al(p,g)}" middleware with ${v.priority} priority in ${v.step} step.`);e.splice(S,1)}}for(const y of b)n.add(y)}e.push(v)},addRelativeTo:(f,h)=>{const{name:p,override:m,aliases:g}=h,v={middleware:f,...h},b=su(p,g);if(b.length>0){if(b.some(y=>n.has(y))){if(!m)throw new Error(`Duplicate middleware name '${al(p,g)}'`);for(const y of b){const S=t.findIndex(C=>C.name===y||C.aliases?.some(A=>A===y));if(S===-1)continue;const w=t[S];if(w.toMiddleware!==v.toMiddleware||w.relation!==v.relation)throw new Error(`"${al(w.name,w.aliases)}" middleware ${w.relation} "${w.toMiddleware}" middleware cannot be overridden by "${al(p,g)}" middleware ${v.relation} "${v.toMiddleware}" middleware.`);t.splice(S,1)}}for(const y of b)n.add(y)}t.push(v)},clone:()=>s(uv()),use:f=>{f.applyToStack(d)},remove:f=>typeof f=="string"?o(f):a(f),removeByTag:f=>{let h=!1;const p=m=>{const{tags:g,name:v,aliases:b}=m;if(g&&g.includes(f)){const y=su(v,b);for(const S of y)n.delete(S);return h=!0,!1}return!0};return e=e.filter(p),t=t.filter(p),h},concat:f=>{const h=s(uv());return h.use(f),h.identifyOnResolve(r||h.identifyOnResolve()||(f.identifyOnResolve?.()??!1)),h},applyToStack:s,identify:()=>c(!0).map(f=>{const h=f.step??f.relation+" "+f.toMiddleware;return al(f.name,f.aliases)+" - "+h}),identifyOnResolve(f){return typeof f=="boolean"&&(r=f),r},resolve:(f,h)=>{for(const p of c().map(m=>m.middleware).reverse())f=p(f,h);return r&&console.log(d.identify()),f}};return d},XN={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},ZN={high:3,normal:2,low:1};class dpe{config;middlewareStack=uv();initConfig;handlers;constructor(t){this.config=t;const{protocol:r,protocolSettings:n}=t;n&&typeof r=="function"&&(t.protocol=new r(n))}send(t,r,n){const i=typeof r!="function"?r:void 0,o=typeof r=="function"?r:n,a=i===void 0&&this.config.cacheMiddleware===!0;let s;if(a){this.handlers||(this.handlers=new WeakMap);const l=this.handlers;l.has(t.constructor)?s=l.get(t.constructor):(s=t.resolveMiddleware(this.middlewareStack,this.config,i),l.set(t.constructor,s))}else delete this.handlers,s=t.resolveMiddleware(this.middlewareStack,this.config,i);if(o)s(t).then(l=>o(null,l.output),l=>o(l)).catch(()=>{});else return s(t).then(l=>l.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}const Ty="***SensitiveInformation***";function RS(e,t){if(t==null)return t;const r=$n.of(e);if(r.getMergedTraits().sensitive)return Ty;if(r.isListSchema()){if(!!r.getValueSchema().getMergedTraits().sensitive)return Ty}else if(r.isMapSchema()){if(!!r.getKeySchema().getMergedTraits().sensitive||!!r.getValueSchema().getMergedTraits().sensitive)return Ty}else if(r.isStructSchema()&&typeof t=="object"){const n=t,i={};for(const[o,a]of r.structIterator())n[o]!=null&&(i[o]=RS(a,n[o]));return i}return t}let Y5=class{middlewareStack=uv();schema;static classBuilder(){return new fpe}resolveMiddlewareWithContext(t,r,n,{middlewareFn:i,clientName:o,commandName:a,inputFilterSensitiveLog:s,outputFilterSensitiveLog:l,smithyContext:c,additionalContext:d,CommandCtor:f}){for(const b of i.bind(this)(f,t,r,n))this.middlewareStack.use(b);const h=t.concat(this.middlewareStack),{logger:p}=r,m={logger:p,clientName:o,commandName:a,inputFilterSensitiveLog:s,outputFilterSensitiveLog:l,[SS]:{commandInstance:this,...c},...d},{requestHandler:g}=r;let v=n??{};return c.eventStream&&(v={isEventStream:!0,...v}),h.resolve(b=>g.handle(b.request,v),m)}};class fpe{_init=()=>{};_ep={};_middlewareFn=()=>[];_commandName="";_clientName="";_additionalContext={};_smithyContext={};_inputFilterSensitiveLog=void 0;_outputFilterSensitiveLog=void 0;_serializer=null;_deserializer=null;_operationSchema;init(t){this._init=t}ep(t){return this._ep=t,this}m(t){return this._middlewareFn=t,this}s(t,r,n={}){return this._smithyContext={service:t,operation:r,...n},this}c(t={}){return this._additionalContext=t,this}n(t,r){return this._clientName=t,this._commandName=r,this}f(t=n=>n,r=n=>n){return this._inputFilterSensitiveLog=t,this._outputFilterSensitiveLog=r,this}ser(t){return this._serializer=t,this}de(t){return this._deserializer=t,this}sc(t){return this._operationSchema=t,this._smithyContext.operationSchema=t,this}build(){const t=this;let r;return r=class extends Y5{input;static getEndpointParameterInstructions(){return t._ep}constructor(...[n]){super(),this.input=n??{},t._init(this),this.schema=t._operationSchema}resolveMiddleware(n,i,o){const a=t._operationSchema,s=a?.[4]??a?.input,l=a?.[5]??a?.output;return this.resolveMiddlewareWithContext(n,i,o,{CommandCtor:r,middlewareFn:t._middlewareFn,clientName:t._clientName,commandName:t._commandName,inputFilterSensitiveLog:t._inputFilterSensitiveLog??(a?RS.bind(null,s):c=>c),outputFilterSensitiveLog:t._outputFilterSensitiveLog??(a?RS.bind(null,l):c=>c),smithyContext:t._smithyContext,additionalContext:t._additionalContext})}serialize=t._serializer;deserialize=t._deserializer}}}class ed extends Error{$fault;$response;$retryable;$metadata;constructor(t){super(t.message),Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=t.name,this.$fault=t.$fault,this.$metadata=t.$metadata}static isInstance(t){if(!t)return!1;const r=t;return ed.prototype.isPrototypeOf(r)||!!r.$fault&&!!r.$metadata&&(r.$fault==="client"||r.$fault==="server")}static[Symbol.hasInstance](t){if(!t)return!1;const r=t;return this===ed?ed.isInstance(t):ed.isInstance(t)?r.name&&this.name?this.prototype.isPrototypeOf(t)||r.name===this.name:this.prototype.isPrototypeOf(t):!1}}const e3=(e,t={})=>{Object.entries(t).filter(([,n])=>n!==void 0).forEach(([n,i])=>{(e[n]==null||e[n]==="")&&(e[n]=i)});const r=e.message||e.Message||"UnknownError";return e.message=r,delete e.Message,e},hpe=e=>{switch(e){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:3e4};default:return{}}},X5=Object.values(hp),ppe=e=>{const t=[];for(const r in hp){const n=hp[r];e[n]!==void 0&&t.push({algorithmId:()=>n,checksumConstructor:()=>e[n]})}for(const[r,n]of Object.entries(e.checksumAlgorithms??{}))t.push({algorithmId:()=>r,checksumConstructor:()=>n});return{addChecksumAlgorithm(r){e.checksumAlgorithms=e.checksumAlgorithms??{};const n=r.algorithmId(),i=r.checksumConstructor();X5.includes(n)?e.checksumAlgorithms[n.toUpperCase()]=i:e.checksumAlgorithms[n]=i,t.push(r)},checksumAlgorithms(){return t}}},mpe=e=>{const t={};return e.checksumAlgorithms().forEach(r=>{const n=r.algorithmId();X5.includes(n)&&(t[n]=r.checksumConstructor())}),t},gpe=e=>({setRetryStrategy(t){e.retryStrategy=t},retryStrategy(){return e.retryStrategy}}),vpe=e=>{const t={};return t.retryStrategy=e.retryStrategy(),t},bpe=e=>Object.assign(ppe(e),gpe(e)),_pe=e=>Object.assign(mpe(e),vpe(e));class Z5{trace(){}debug(){}info(){}warn(){}error(){}}const ype=e=>e?.body instanceof ReadableStream;function xpe(e,t){if(Md.isInstance(e))for(const r of Object.keys(e.headers)){const n=r.toLowerCase();if(n==="retry-after"){const i=e.headers[r];let o=NaN;if(i.endsWith("GMT"))try{o=(D5(i).getTime()-Date.now())/1e3}catch(a){t?.trace?.("Failed to parse retry-after header"),t?.trace?.(a)}else i.match(/ GMT, ((\d+)|(\d+\.\d+))$/)?o=Number(i.match(/ GMT, ([\d.]+)$/)?.[1]):i.match(/^((\d+)|(\d+\.\d+))$/)?o=Number(i):Date.parse(i)>=Date.now()&&(o=(Date.parse(i)-Date.now())/1e3);return isNaN(o)?void 0:new Date(Date.now()+o*1e3)}else if(n==="x-amz-retry-after"){const i=e.headers[r],o=Number(i);if(isNaN(o)){t?.trace?.(`Failed to parse x-amz-retry-after=${i}`);return}return new Date(Date.now()+o)}}}const Spe=e=>(t,r)=>async n=>{let i=await e.retryStrategy();const o=await e.maxAttempts();if(wpe(i)){i=i;let a=await i.acquireInitialRetryToken((r.partition_id??"")+(r.__retryLongPoll?":longpoll":"")),s=new Error,l=0,c=0;const{request:d}=n,f=uo.isInstance(d);for(f&&(d.headers[Rhe]=F5());;)try{f&&(d.headers[Ahe]=`attempt=${l+1}; max=${o}`);const{response:h,output:p}=await t(n);return i.recordSuccess(a),p.$metadata.attempts=l+1,p.$metadata.totalRetryDelay=c,{response:h,output:p}}catch(h){const p=Epe(h,e.logger);if(s=upe(h),f&&ype(d))throw(r.logger instanceof Z5?console:r.logger)?.warn("An error was encountered in a non-retryable streaming request."),s;try{a=await i.refreshRetryTokenForRetry(a,p)}catch(g){throw typeof g.$backoff=="number"&&await t3(g.$backoff),s.$metadata||(s.$metadata={}),s.$metadata.attempts=l+1,s.$metadata.totalRetryDelay=c,s}l=a.getRetryCount();const m=a.getRetryDelay();c+=m,await t3(m)}}else return i=i,i?.mode&&(r.userAgent=[...r.userAgent||[],["cfg/retry-mode",i.mode]]),i.retry(t,n)},t3=e=>new Promise(t=>setTimeout(t,e)),wpe=e=>typeof e.acquireInitialRetryToken<"u"&&typeof e.refreshRetryTokenForRetry<"u"&&typeof e.recordSuccess<"u",Epe=(e,t)=>{const r={error:e,errorType:kpe(e)},n=xpe(e.$response,t);return n&&(r.retryAfterHint=n),r},kpe=e=>K5(e)?"THROTTLING":g2(e)?"TRANSIENT":Ehe(e)?"SERVER_ERROR":"CLIENT_ERROR",Cpe={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},Rpe=e=>({applyToStack:t=>{t.add(Spe(e),Cpe)}}),r3=e=>Md.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,ez=e=>new Date(Date.now()+e),Ape=(e,t)=>Math.abs(ez(t).getTime()-e)>=3e5,n3=(e,t)=>{const r=Date.parse(e);return Ape(r,t)?r-Date.now():t},Eh=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t},Tpe=async e=>{const t=Eh("context",e.context),r=Eh("config",e.config),n=t.endpointV2?.properties?.authSchemes?.[0],o=await Eh("signer",r.signer)(n),a=e?.signingRegion,s=e?.signingRegionSet,l=e?.signingName;return{config:r,signer:o,signingRegion:a,signingRegionSet:s,signingName:l}};class $pe{async sign(t,r,n){if(!uo.isInstance(t))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const i=await Tpe(n),{config:o,signer:a}=i;let{signingRegion:s,signingName:l}=i;const c=n.context;if(c?.authSchemes?.length??!1){const[f,h]=c.authSchemes;f?.name==="sigv4a"&&h?.name==="sigv4"&&(s=h?.signingRegion??s,l=h?.signingName??l)}return await a.sign(t,{signingDate:ez(o.systemClockOffset),signingRegion:s,signingService:l})}errorHandler(t){return r=>{const n=r.ServerTime??r3(r.$response);if(n){const i=Eh("config",t.config),o=i.systemClockOffset;i.systemClockOffset=n3(n,i.systemClockOffset),i.systemClockOffset!==o&&r.$metadata&&(r.$metadata.clockSkewCorrected=!0)}throw r}}successHandler(t,r){const n=r3(t);if(n){const i=Eh("config",r.config);i.systemClockOffset=n3(n,i.systemClockOffset)}}}const Npe=(e,t,r)=>{let n,i,o,a=!1;const s=async()=>{i||(i=e());try{n=await i,o=!0,a=!1}finally{i=void 0}return n};return async l=>((!o||l?.forceRefresh)&&(n=await s()),n)},Dpe="X-Amz-Algorithm",Fpe="X-Amz-Credential",tz="X-Amz-Date",Ipe="X-Amz-SignedHeaders",Ppe="X-Amz-Expires",rz="X-Amz-Signature",nz="X-Amz-Security-Token",iz="authorization",oz=tz.toLowerCase(),Ope="date",Mpe=[iz,oz,Ope],Lpe=rz.toLowerCase(),AS="x-amz-content-sha256",zpe=nz.toLowerCase(),Upe={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},Bpe=/^proxy-/,jpe=/^sec-/,$y="AWS4-HMAC-SHA256",qpe="AWS4-HMAC-SHA256-PAYLOAD",Vpe="UNSIGNED-PAYLOAD",Gpe=50,az="aws4_request",Kpe=3600*24*7,ag={},Ny=[],Dy=(e,t,r)=>`${e}/${t}/${r}/${az}`,Hpe=async(e,t,r,n,i)=>{const o=await i3(e,t.secretAccessKey,t.accessKeyId),a=`${r}:${n}:${i}:${Nu(o)}:${t.sessionToken}`;if(a in ag)return ag[a];for(Ny.push(a);Ny.length>Gpe;)delete ag[Ny.shift()];let s=`AWS4${t.secretAccessKey}`;for(const l of[r,n,i,az])s=await i3(e,s,l);return ag[a]=s},i3=(e,t,r)=>{const n=new e(t);return n.update(pp(r)),n.digest()},o3=({headers:e},t,r)=>{const n={};for(const i of Object.keys(e).sort()){if(e[i]==null)continue;const o=i.toLowerCase();(o in Upe||t?.has(o)||Bpe.test(o)||jpe.test(o))&&(!r||r&&!r.has(o))||(n[o]=e[i].trim().replace(/\s+/g," "))}return n},Wpe=e=>typeof ArrayBuffer=="function"&&e instanceof ArrayBuffer||Object.prototype.toString.call(e)==="[object ArrayBuffer]",Fy=async({headers:e,body:t},r)=>{for(const n of Object.keys(e))if(n.toLowerCase()===AS)return e[n];if(t==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof t=="string"||ArrayBuffer.isView(t)||Wpe(t)){const n=new r;return n.update(pp(t)),Nu(await n.digest())}return Vpe};class Jpe{format(t){const r=[];for(const o of Object.keys(t)){const a=Ld(o);r.push(Uint8Array.from([a.byteLength]),a,this.formatHeaderValue(t[o]))}const n=new Uint8Array(r.reduce((o,a)=>o+a.byteLength,0));let i=0;for(const o of r)n.set(o,i),i+=o.byteLength;return n}formatHeaderValue(t){switch(t.type){case"boolean":return Uint8Array.from([t.value?0:1]);case"byte":return Uint8Array.from([2,t.value]);case"short":const r=new DataView(new ArrayBuffer(3));return r.setUint8(0,3),r.setInt16(1,t.value,!1),new Uint8Array(r.buffer);case"integer":const n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,t.value,!1),new Uint8Array(n.buffer);case"long":const i=new Uint8Array(9);return i[0]=5,i.set(t.value.bytes,1),i;case"binary":const o=new DataView(new ArrayBuffer(3+t.value.byteLength));o.setUint8(0,6),o.setUint16(1,t.value.byteLength,!1);const a=new Uint8Array(o.buffer);return a.set(t.value,3),a;case"string":const s=Ld(t.value),l=new DataView(new ArrayBuffer(3+s.byteLength));l.setUint8(0,7),l.setUint16(1,s.byteLength,!1);const c=new Uint8Array(l.buffer);return c.set(s,3),c;case"timestamp":const d=new Uint8Array(9);return d[0]=8,d.set(b2.fromNumber(t.value.valueOf()).bytes,1),d;case"uuid":if(!Qpe.test(t.value))throw new Error(`Invalid UUID received: ${t.value}`);const f=new Uint8Array(17);return f[0]=9,f.set(Wde(t.value.replace(/\-/g,"")),1),f}}}var a3;(function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"})(a3||(a3={}));const Qpe=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class b2{bytes;constructor(t){if(this.bytes=t,t.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(t){if(t>9223372036854776e3||t<-9223372036854776e3)throw new Error(`${t} is too large (or, if negative, too small) to represent as an Int64`);const r=new Uint8Array(8);for(let n=7,i=Math.abs(Math.round(t));n>-1&&i>0;n--,i/=256)r[n]=i;return t<0&&s3(r),new b2(r)}valueOf(){const t=this.bytes.slice(0),r=t[0]&128;return r&&s3(t),parseInt(Nu(t),16)*(r?-1:1)}toString(){return String(this.valueOf())}}function s3(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,e[t]===0);t--);}const Ype=(e,t)=>{e=e.toLowerCase();for(const r of Object.keys(t))if(e===r.toLowerCase())return!0;return!1},Xpe=(e,t={})=>{const{headers:r,query:n={}}=uo.clone(e);for(const i of Object.keys(r)){const o=i.toLowerCase();(o.slice(0,6)==="x-amz-"&&!t.unhoistableHeaders?.has(o)||t.hoistableHeaders?.has(o))&&(n[i]=r[i],delete r[i])}return{...e,headers:r,query:n}},l3=e=>{e=uo.clone(e);for(const t of Object.keys(e.headers))Mpe.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},Zpe=({query:e={}})=>{const t=[],r={};for(const n of Object.keys(e)){if(n.toLowerCase()===Lpe)continue;const i=$u(n);t.push(i);const o=e[n];typeof o=="string"?r[i]=`${i}=${$u(o)}`:Array.isArray(o)&&(r[i]=o.slice(0).reduce((a,s)=>a.concat([`${i}=${$u(s)}`]),[]).sort().join("&"))}return t.sort().map(n=>r[n]).filter(n=>n).join("&")},eme=e=>tme(e).toISOString().replace(/\.\d{3}Z$/,"Z"),tme=e=>typeof e=="number"?new Date(e*1e3):typeof e=="string"?Number(e)?new Date(Number(e)*1e3):new Date(e):e;class rme{service;regionProvider;credentialProvider;sha256;uriEscapePath;applyChecksum;constructor({applyChecksum:t,credentials:r,region:n,service:i,sha256:o,uriEscapePath:a=!0}){this.service=i,this.sha256=o,this.uriEscapePath=a,this.applyChecksum=typeof t=="boolean"?t:!0,this.regionProvider=Ts(n),this.credentialProvider=Ts(r)}createCanonicalRequest(t,r,n){const i=Object.keys(r).sort();return`${t.method}
|
|
55
|
+
${this.getCanonicalPath(t)}
|
|
56
|
+
${Zpe(t)}
|
|
57
|
+
${i.map(o=>`${o}:${r[o]}`).join(`
|
|
58
|
+
`)}
|
|
59
|
+
|
|
60
|
+
${i.join(";")}
|
|
61
|
+
${n}`}async createStringToSign(t,r,n,i){const o=new this.sha256;o.update(pp(n));const a=await o.digest();return`${i}
|
|
62
|
+
${t}
|
|
63
|
+
${r}
|
|
64
|
+
${Nu(a)}`}getCanonicalPath({path:t}){if(this.uriEscapePath){const r=[];for(const o of t.split("/"))o?.length!==0&&o!=="."&&(o===".."?r.pop():r.push(o));const n=`${t?.startsWith("/")?"/":""}${r.join("/")}${r.length>0&&t?.endsWith("/")?"/":""}`;return $u(n).replace(/%2F/g,"/")}return t}validateResolvedCredentials(t){if(typeof t!="object"||typeof t.accessKeyId!="string"||typeof t.secretAccessKey!="string")throw new Error("Resolved credential object is not valid")}formatDate(t){const r=eme(t).replace(/[\-:]/g,"");return{longDate:r,shortDate:r.slice(0,8)}}getCanonicalHeaderList(t){return Object.keys(t).sort().join(";")}}class u3 extends rme{headerFormatter=new Jpe;constructor({applyChecksum:t,credentials:r,region:n,service:i,sha256:o,uriEscapePath:a=!0}){super({applyChecksum:t,credentials:r,region:n,service:i,sha256:o,uriEscapePath:a})}async presign(t,r={}){const{signingDate:n=new Date,expiresIn:i=3600,unsignableHeaders:o,unhoistableHeaders:a,signableHeaders:s,hoistableHeaders:l,signingRegion:c,signingService:d}=r,f=await this.credentialProvider();this.validateResolvedCredentials(f);const h=c??await this.regionProvider(),{longDate:p,shortDate:m}=this.formatDate(n);if(i>Kpe)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const g=Dy(m,h,d??this.service),v=Xpe(l3(t),{unhoistableHeaders:a,hoistableHeaders:l});f.sessionToken&&(v.query[nz]=f.sessionToken),v.query[Dpe]=$y,v.query[Fpe]=`${f.accessKeyId}/${g}`,v.query[tz]=p,v.query[Ppe]=i.toString(10);const b=o3(v,o,s);return v.query[Ipe]=this.getCanonicalHeaderList(b),v.query[rz]=await this.getSignature(p,g,this.getSigningKey(f,h,m,d),this.createCanonicalRequest(v,b,await Fy(t,this.sha256))),v}async sign(t,r){return typeof t=="string"?this.signString(t,r):t.headers&&t.payload?this.signEvent(t,r):t.message?this.signMessage(t,r):this.signRequest(t,r)}async signEvent({headers:t,payload:r},{signingDate:n=new Date,priorSignature:i,signingRegion:o,signingService:a,eventStreamCredentials:s}){const l=o??await this.regionProvider(),{shortDate:c,longDate:d}=this.formatDate(n),f=Dy(c,l,a??this.service),h=await Fy({headers:{},body:r},this.sha256),p=new this.sha256;p.update(t);const m=Nu(await p.digest()),g=[qpe,d,f,i,m,h].join(`
|
|
65
|
+
`);return this.signString(g,{signingDate:n,signingRegion:l,signingService:a,eventStreamCredentials:s})}async signMessage(t,{signingDate:r=new Date,signingRegion:n,signingService:i,eventStreamCredentials:o}){return this.signEvent({headers:this.headerFormatter.format(t.message.headers),payload:t.message.body},{signingDate:r,signingRegion:n,signingService:i,priorSignature:t.priorSignature,eventStreamCredentials:o}).then(s=>({message:t.message,signature:s}))}async signString(t,{signingDate:r=new Date,signingRegion:n,signingService:i,eventStreamCredentials:o}={}){const a=o??await this.credentialProvider();this.validateResolvedCredentials(a);const s=n??await this.regionProvider(),{shortDate:l}=this.formatDate(r),c=new this.sha256(await this.getSigningKey(a,s,l,i));return c.update(pp(t)),Nu(await c.digest())}async signRequest(t,{signingDate:r=new Date,signableHeaders:n,unsignableHeaders:i,signingRegion:o,signingService:a}={}){const s=await this.credentialProvider();this.validateResolvedCredentials(s);const l=o??await this.regionProvider(),c=l3(t),{longDate:d,shortDate:f}=this.formatDate(r),h=Dy(f,l,a??this.service);c.headers[oz]=d,s.sessionToken&&(c.headers[zpe]=s.sessionToken);const p=await Fy(c,this.sha256);!Ype(AS,c.headers)&&this.applyChecksum&&(c.headers[AS]=p);const m=o3(c,i,n),g=await this.getSignature(d,h,this.getSigningKey(s,l,f,a),this.createCanonicalRequest(c,m,p));return c.headers[iz]=`${$y} Credential=${s.accessKeyId}/${h}, SignedHeaders=${this.getCanonicalHeaderList(m)}, Signature=${g}`,c}async getSignature(t,r,n,i){const o=await this.createStringToSign(t,r,i,$y),a=new this.sha256(await n);return a.update(pp(o)),Nu(await a.digest())}getSigningKey(t,r,n,i){return Hpe(this.sha256,t,n,r,i||this.service)}}const nme=e=>{let t=e.credentials,r=!!e.credentials,n;Object.defineProperty(e,"credentials",{set(c){c&&c!==t&&c!==n&&(r=!0),t=c;const d=ime(e,{credentials:t,credentialDefaultProvider:e.credentialDefaultProvider}),f=ome(e,d);if(r&&!f.attributed){const h=typeof t=="object"&&t!==null;n=async p=>{const g=await f(p);return h&&(!g.$source||Object.keys(g.$source).length===0)?phe(g,"CREDENTIALS_CODE","e"):g},n.memoized=f.memoized,n.configBound=f.configBound,n.attributed=!0}else n=f},get(){return n},enumerable:!0,configurable:!0}),e.credentials=t;const{signingEscapePath:i=!0,systemClockOffset:o=e.systemClockOffset||0,sha256:a}=e;let s;return e.signer?s=xh(e.signer):e.regionInfoProvider?s=()=>xh(e.region)().then(async c=>[await e.regionInfoProvider(c,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},c]).then(([c,d])=>{const{signingRegion:f,signingService:h}=c;e.signingRegion=e.signingRegion||f||d,e.signingName=e.signingName||h||e.serviceId;const p={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:a,uriEscapePath:i},m=e.signerConstructor||u3;return new m(p)}):s=async c=>{c=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await xh(e.region)(),properties:{}},c);const d=c.signingRegion,f=c.signingName;e.signingRegion=e.signingRegion||d,e.signingName=e.signingName||f||e.serviceId;const h={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:a,uriEscapePath:i},p=e.signerConstructor||u3;return new p(h)},Object.assign(e,{systemClockOffset:o,signingEscapePath:i,signer:s})};function ime(e,{credentials:t,credentialDefaultProvider:r}){let n;return t?t?.memoized?n=t:n=Mfe(t,Ofe,P5):r?n=xh(r(Object.assign({},e,{parentClientConfig:e}))):n=async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")},n.memoized=!0,n}function ome(e,t){if(t.configBound)return t;const r=async n=>t({...n,callerClientConfig:e});return r.memoized=t.memoized,r.configBound=!0,r}const ame=async(e,t,r)=>({operation:pf(t).operation,region:await Ts(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function sme(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"cognito-idp",region:e.region},propertiesExtractor:(t,r)=>({signingProperties:{config:t,context:r}})}}function Gt(e){return{schemeId:"smithy.api#noAuth"}}const lme=e=>{const t=[];switch(e.operation){case"AssociateSoftwareToken":{t.push(Gt());break}case"ChangePassword":{t.push(Gt());break}case"CompleteWebAuthnRegistration":{t.push(Gt());break}case"ConfirmDevice":{t.push(Gt());break}case"ConfirmForgotPassword":{t.push(Gt());break}case"ConfirmSignUp":{t.push(Gt());break}case"DeleteUser":{t.push(Gt());break}case"DeleteUserAttributes":{t.push(Gt());break}case"DeleteWebAuthnCredential":{t.push(Gt());break}case"ForgetDevice":{t.push(Gt());break}case"ForgotPassword":{t.push(Gt());break}case"GetDevice":{t.push(Gt());break}case"GetTokensFromRefreshToken":{t.push(Gt());break}case"GetUser":{t.push(Gt());break}case"GetUserAttributeVerificationCode":{t.push(Gt());break}case"GetUserAuthFactors":{t.push(Gt());break}case"GlobalSignOut":{t.push(Gt());break}case"InitiateAuth":{t.push(Gt());break}case"ListDevices":{t.push(Gt());break}case"ListWebAuthnCredentials":{t.push(Gt());break}case"ResendConfirmationCode":{t.push(Gt());break}case"RespondToAuthChallenge":{t.push(Gt());break}case"RevokeToken":{t.push(Gt());break}case"SetUserMFAPreference":{t.push(Gt());break}case"SetUserSettings":{t.push(Gt());break}case"SignUp":{t.push(Gt());break}case"StartWebAuthnRegistration":{t.push(Gt());break}case"UpdateAuthEventFeedback":{t.push(Gt());break}case"UpdateDeviceStatus":{t.push(Gt());break}case"UpdateUserAttributes":{t.push(Gt());break}case"VerifySoftwareToken":{t.push(Gt());break}case"VerifyUserAttribute":{t.push(Gt());break}default:t.push(sme(e))}return t},ume=e=>{const t=nme(e);return Object.assign(t,{authSchemePreference:Ts(e.authSchemePreference??[])})},cme=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"cognito-idp"}),dme={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},fme="3.1033.0",hme={version:fme},pme=e=>new TextEncoder().encode(e);var mme=typeof Buffer<"u"&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:pme;function gp(e){return e instanceof Uint8Array?e:typeof e=="string"?mme(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function TS(e){return typeof e=="string"?e.length===0:e.byteLength===0}var sz={name:"SHA-256"},c3={name:"HMAC",hash:sz},gme=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85]);const vme={};function l0(){return typeof window<"u"?window:typeof self<"u"?self:vme}var bme=(function(){function e(t){this.toHash=new Uint8Array(0),this.secret=t,this.reset()}return e.prototype.update=function(t){if(!TS(t)){var r=gp(t),n=new Uint8Array(this.toHash.byteLength+r.byteLength);n.set(this.toHash,0),n.set(r,this.toHash.byteLength),this.toHash=n}},e.prototype.digest=function(){var t=this;return this.key?this.key.then(function(r){return l0().crypto.subtle.sign(c3,r,t.toHash).then(function(n){return new Uint8Array(n)})}):TS(this.toHash)?Promise.resolve(gme):Promise.resolve().then(function(){return l0().crypto.subtle.digest(sz,t.toHash)}).then(function(r){return Promise.resolve(new Uint8Array(r))})},e.prototype.reset=function(){var t=this;this.toHash=new Uint8Array(0),this.secret&&this.secret!==void 0&&(this.key=new Promise(function(r,n){l0().crypto.subtle.importKey("raw",gp(t.secret),c3,!1,["sign"]).then(r,n)}),this.key.catch(function(){}))},e})();function _me(e,t,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{c(n.next(d))}catch(f){a(f)}}function l(d){try{c(n.throw(d))}catch(f){a(f)}}function c(d){d.done?o(d.value):i(d.value).then(s,l)}c((n=n.apply(e,t||[])).next())})}function yme(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(c){return function(d){return l([c,d])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(r=0)),r;)try{if(n=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,i=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){r.label=c[1];break}if(c[0]===6&&r.label<o[1]){r.label=o[1],o=c;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(c);break}o[2]&&r.ops.pop(),r.trys.pop();continue}c=t.call(e,r)}catch(d){c=[6,d],i=0}finally{n=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}var mo=64,xme=32,Sme=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),wme=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],Eme=Math.pow(2,53)-1,u0=(function(){function e(){this.state=Int32Array.from(wme),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(t){if(this.finished)throw new Error("Attempted to update an already finished hash.");var r=0,n=t.byteLength;if(this.bytesHashed+=n,this.bytesHashed*8>Eme)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=t[r++],n--,this.bufferLength===mo&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var t=this.bytesHashed*8,r=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),n=this.bufferLength;if(r.setUint8(this.bufferLength++,128),n%mo>=mo-8){for(var i=this.bufferLength;i<mo;i++)r.setUint8(i,0);this.hashBuffer(),this.bufferLength=0}for(var i=this.bufferLength;i<mo-8;i++)r.setUint8(i,0);r.setUint32(mo-8,Math.floor(t/4294967296),!0),r.setUint32(mo-4,t),this.hashBuffer(),this.finished=!0}for(var o=new Uint8Array(xme),i=0;i<8;i++)o[i*4]=this.state[i]>>>24&255,o[i*4+1]=this.state[i]>>>16&255,o[i*4+2]=this.state[i]>>>8&255,o[i*4+3]=this.state[i]>>>0&255;return o},e.prototype.hashBuffer=function(){for(var t=this,r=t.buffer,n=t.state,i=n[0],o=n[1],a=n[2],s=n[3],l=n[4],c=n[5],d=n[6],f=n[7],h=0;h<mo;h++){if(h<16)this.temp[h]=(r[h*4]&255)<<24|(r[h*4+1]&255)<<16|(r[h*4+2]&255)<<8|r[h*4+3]&255;else{var p=this.temp[h-2],m=(p>>>17|p<<15)^(p>>>19|p<<13)^p>>>10;p=this.temp[h-15];var g=(p>>>7|p<<25)^(p>>>18|p<<14)^p>>>3;this.temp[h]=(m+this.temp[h-7]|0)+(g+this.temp[h-16]|0)}var v=(((l>>>6|l<<26)^(l>>>11|l<<21)^(l>>>25|l<<7))+(l&c^~l&d)|0)+(f+(Sme[h]+this.temp[h]|0)|0)|0,b=((i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10))+(i&o^i&a^o&a)|0;f=d,d=c,c=l,l=s+v|0,s=a,a=o,o=i,i=v+b|0}n[0]+=i,n[1]+=o,n[2]+=a,n[3]+=s,n[4]+=l,n[5]+=c,n[6]+=d,n[7]+=f},e})(),kme=(function(){function e(t){this.secret=t,this.hash=new u0,this.reset()}return e.prototype.update=function(t){if(!(TS(t)||this.error))try{this.hash.update(gp(t))}catch(r){this.error=r}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return _me(this,void 0,void 0,function(){return yme(this,function(t){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new u0,this.secret){this.outer=new u0;var t=Cme(this.secret),r=new Uint8Array(mo);r.set(t);for(var n=0;n<mo;n++)t[n]^=54,r[n]^=92;this.hash.update(t),this.outer.update(r);for(var n=0;n<t.byteLength;n++)t[n]=0}},e})();function Cme(e){var t=gp(e);if(t.byteLength>mo){var r=new u0;r.update(t),t=r.digest()}var n=new Uint8Array(mo);return n.set(t),n}var Rme=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function Ame(e){if(Tme(e)&&typeof e.crypto.subtle=="object"){var t=e.crypto.subtle;return $me(t)}return!1}function Tme(e){if(typeof e=="object"&&typeof e.crypto=="object"){var t=e.crypto.getRandomValues;return typeof t=="function"}return!1}function $me(e){return e&&Rme.every(function(t){return typeof e[t]=="function"})}var Nme=(function(){function e(t){Ame(l0())?this.hash=new bme(t):this.hash=new kme(t)}return e.prototype.update=function(t,r){this.hash.update(gp(t))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e})();const Dme=({serviceId:e,clientVersion:t})=>async r=>{const n=typeof window<"u"?window.navigator:void 0,i=n?.userAgent??"",o=n?.userAgentData?.platform??d3.os(i)??"other",a=void 0,s=n?.userAgentData?.brands??[],l=s[s.length-1],c=l?.brand??d3.browser(i)??"unknown",d=l?.version??"unknown",f=[["aws-sdk-js",t],["ua","2.1"],[`os/${o}`,a],["lang/js"],["md/browser",`${c}_${d}`]];e&&f.push([`api/${e}`,t]);const h=await r?.userAgentAppId?.();return h&&f.push([`app/${h}`]),f},d3={os(e){if(/iPhone|iPad|iPod/.test(e))return"iOS";if(/Macintosh|Mac OS X/.test(e))return"macOS";if(/Windows NT/.test(e))return"Windows";if(/Android/.test(e))return"Android";if(/Linux/.test(e))return"Linux"},browser(e){if(/EdgiOS|EdgA|Edg\//.test(e))return"Microsoft Edge";if(/Firefox\//.test(e))return"Firefox";if(/Chrome\//.test(e))return"Chrome";if(/Safari\//.test(e))return"Safari"}},Fme=e=>()=>Promise.reject(e),f3=typeof TextEncoder=="function"?new TextEncoder:null,Ime=e=>{if(typeof e=="string"){if(f3)return f3.encode(e).byteLength;let t=e.length;for(let r=t-1;r>=0;r--){const n=e.charCodeAt(r);n>127&&n<=2047?t++:n>2047&&n<=65535&&(t+=2),n>=56320&&n<=57343&&r--}return t}else{if(typeof e.byteLength=="number")return e.byteLength;if(typeof e.size=="number")return e.size}throw new Error(`Body Length computation failed for ${e}`)},Pme=["in-region","cross-region","mobile","standard","legacy"],Ome=({defaultsMode:e}={})=>Npe(async()=>{const t=typeof e=="function"?await e():e;switch(t?.toLowerCase()){case"auto":return Promise.resolve(Mme()?"mobile":"standard");case"mobile":case"in-region":case"cross-region":case"standard":case"legacy":return Promise.resolve(t?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${Pme.join(", ")}, got ${t}`)}}),Mme=()=>{const e=window?.navigator;if(e?.connection){const{effectiveType:t,rtt:r,downlink:n}=e?.connection;if(typeof t=="string"&&t!=="4g"||Number(r)>100||Number(n)<10)return!0}return e?.userAgentData?.mobile||typeof e?.maxTouchPoints=="number"&&e?.maxTouchPoints>1};class Lme{queryCompat;errorRegistry;constructor(t=!1){this.queryCompat=t}resolveRestContentType(t,r){const n=r.getMemberSchemas(),i=Object.values(n).find(o=>!!o.getMergedTraits().httpPayload);if(i){const o=i.getMergedTraits().mediaType;return o||(i.isStringSchema()?"text/plain":i.isBlobSchema()?"application/octet-stream":t)}else if(!r.isUnitSchema()&&Object.values(n).find(a=>{const{httpQuery:s,httpQueryParams:l,httpHeader:c,httpLabel:d,httpPrefixHeaders:f}=a.getMergedTraits();return!s&&!l&&!c&&!d&&f===void 0}))return t}async getErrorSchemaOrThrowBaseException(t,r,n,i,o,a){let s=t;t.includes("#")&&([,s]=t.split("#"));const l={$metadata:o,$fault:n.statusCode<500?"client":"server"};if(!this.errorRegistry)throw new Error("@aws-sdk/core/protocols - error handler not initialized.");try{return{errorSchema:a?.(this.errorRegistry,s)??this.errorRegistry.getSchema(t),errorMetadata:l}}catch{i.message=i.message??i.Message??"UnknownError";const d=this.errorRegistry,f=d.getBaseException();if(f){const m=d.getErrorCtor(f)??Error;throw this.decorateServiceException(Object.assign(new m({name:s}),l),i)}const h=i,p=h?.message??h?.Message??h?.Error?.Message??h?.Error?.message;throw this.decorateServiceException(Object.assign(new Error(p),{name:s},l),i)}}compose(t,r,n){let i=n;r.includes("#")&&([i]=r.split("#"));const o=Qi.for(i),a=Qi.for("smithy.ts.sdk.synthetic."+n);t.copyFrom(o),t.copyFrom(a),this.errorRegistry=t}decorateServiceException(t,r={}){if(this.queryCompat){const n=t.Message??r.Message,i=e3(t,r);n&&(i.message=n);const o=i.Error??{};o.Type=i.Error?.Type,o.Code=i.Error?.Code,o.Message=i.Error?.message??i.Error?.Message??n,i.Error=o;const a=i.$metadata.requestId;return a&&(i.RequestId=a),i}return e3(t,r)}setQueryCompatError(t,r){const n=r.headers?.["x-amzn-query-error"];if(t!==void 0&&n!=null){const[i,o]=n.split(";"),a=Object.keys(t),s={Code:i,Type:o};t.Code=i,t.Type=o;for(let l=0;l<a.length;l++){const c=a[l];s[c==="message"?"Message":c]=t[c]}delete s.__type,t.Error=s}}queryCompatOutput(t,r){t.Error&&(r.Error=t.Error),t.Type&&(r.Type=t.Type),t.Code&&(r.Code=t.Code)}findQueryCompatibleError(t,r){try{return t.getSchema(r)}catch{return t.find(i=>$n.of(i).getMergedTraits().awsQueryError?.[0]===r)}}}class _2{serdeContext;setSerdeContext(t){this.serdeContext=t}}class zme{from;to;keys;constructor(t,r){this.from=t,this.to=r;const n=Object.keys(this.from),i=new Set(n);i.delete("__type"),this.keys=i}mark(t){this.keys.delete(t)}hasUnknown(){return this.keys.size===1&&Object.keys(this.to).length===0}writeUnknown(){if(this.hasUnknown()){const t=this.keys.values().next().value,r=this.from[t];this.to.$unknown=[t,r]}}}function Ume(e,t,r){if(r?.source){const n=r.source;if(typeof t=="number"&&(t>Number.MAX_SAFE_INTEGER||t<Number.MIN_SAFE_INTEGER||n!==String(t)))return n.includes(".")?new za(n,"bigDecimal"):BigInt(n)}return t}const Bme=(e,t)=>ES(e,t).then(r=>(t?.utf8Encoder??d2)(r)),jme=(e,t)=>Bme(e,t).then(r=>{if(r.length)try{return JSON.parse(r)}catch(n){throw n?.name==="SyntaxError"&&Object.defineProperty(n,"$responseBodyText",{value:r}),n}return{}}),h3=(e,t)=>Object.keys(e).find(r=>r.toLowerCase()===t.toLowerCase()),Iy=e=>{let t=e;return typeof t=="number"&&(t=t.toString()),t.indexOf(",")>=0&&(t=t.split(",")[0]),t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},qme=(e,t)=>{const r=h3(e.headers,"x-amzn-errortype");if(r!==void 0)return Iy(e.headers[r]);if(t&&typeof t=="object"){const n=h3(t,"code");if(n&&t[n]!==void 0)return Iy(t[n]);if(t.__type!==void 0)return Iy(t.__type)}};class Vme extends _2{settings;constructor(t){super(),this.settings=t}async read(t,r){return this._read(t,typeof r=="string"?JSON.parse(r,Ume):await jme(r,this.serdeContext))}readObject(t,r){return this._read(t,r)}_read(t,r){const n=r!==null&&typeof r=="object",i=$n.of(t);if(n){if(i.isStructSchema()){const a=r,s=i.isUnionSchema(),l={};let c;const{jsonName:d}=this.settings;d&&(c={});let f;s&&(f=new zme(a,l));for(const[h,p]of i.structIterator()){let m=h;d&&(m=p.getMergedTraits().jsonName??m,c[m]=h),s&&f.mark(m),a[m]!=null&&(l[h]=this._read(p,a[m]))}if(s)f.writeUnknown();else if(typeof a.__type=="string")for(const h in a){const p=a[h],m=d?c[h]??h:h;m in l||(l[m]=p)}return l}if(Array.isArray(r)&&i.isListSchema()){const a=i.getValueSchema(),s=[];for(const l of r)s.push(this._read(a,l));return s}if(i.isMapSchema()){const a=i.getValueSchema(),s={};for(const l in r)s[l]=this._read(a,r[l]);return s}}if(i.isBlobSchema()&&typeof r=="string")return Cb(r);const o=i.getMergedTraits().mediaType;if(i.isStringSchema()&&typeof r=="string"&&o)return o==="application/json"||o.endsWith("+json")?El.from(r):r;if(i.isTimestampSchema()&&r!=null)switch(I5(i,this.settings)){case 5:return mfe(r);case 6:return D5(r);case 7:return _fe(r);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",r),new Date(r)}if(i.isBigIntegerSchema()&&(typeof r=="number"||typeof r=="string"))return BigInt(r);if(i.isBigDecimalSchema()&&r!=null){if(r instanceof za)return r;const a=r;return a.type==="bigDecimal"&&"string"in a?new za(a.string,a.type):new za(String(r),"bigDecimal")}if(i.isNumericSchema()&&typeof r=="string"){switch(r){case"Infinity":return 1/0;case"-Infinity":return-1/0;case"NaN":return NaN}return r}if(i.isDocumentSchema())if(n){const a=Array.isArray(r)?[]:{};for(const s in r){const l=r[s];l instanceof za?a[s]=l:a[s]=this._read(i,l)}return a}else return structuredClone(r);return r}}const p3="Ν";class Gme{values=new Map;counter=0;stage=0;createReplacer(){if(this.stage===1)throw new Error("@aws-sdk/core/protocols - JsonReplacer already created.");if(this.stage===2)throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");return this.stage=1,(t,r)=>{if(r instanceof za){const n=`${p3+"nv"+this.counter++}_`+r.string;return this.values.set(`"${n}"`,r.string),n}if(typeof r=="bigint"){const n=r.toString(),i=`${p3+"b"+this.counter++}_`+n;return this.values.set(`"${i}"`,n),i}return r}}replaceInJson(t){if(this.stage===0)throw new Error("@aws-sdk/core/protocols - JsonReplacer not created yet.");if(this.stage===2)throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");if(this.stage=2,this.counter===0)return t;for(const[r,n]of this.values)t=t.replace(r,n);return t}}class Kme extends _2{settings;buffer;useReplacer=!1;rootSchema;constructor(t){super(),this.settings=t}write(t,r){this.rootSchema=$n.of(t),this.buffer=this._write(this.rootSchema,r)}flush(){const{rootSchema:t,useReplacer:r}=this;if(this.rootSchema=void 0,this.useReplacer=!1,t?.isStructSchema()||t?.isDocumentSchema()){if(!r)return JSON.stringify(this.buffer);const n=new Gme;return n.replaceInJson(JSON.stringify(this.buffer,n.createReplacer(),0))}return this.buffer}writeDiscriminatedDocument(t,r){this.write(t,r),typeof this.buffer=="object"&&(this.buffer.__type=$n.of(t).getName(!0))}_write(t,r,n){const i=r!==null&&typeof r=="object",o=$n.of(t);if(i){if(o.isStructSchema()){const a=r,s={},{jsonName:l}=this.settings;let c;l&&(c={});let d=0;for(const[f,h]of o.structIterator()){const p=this._write(h,a[f],o);if(p!==void 0){let m=f;l&&(m=h.getMergedTraits().jsonName??f,c[f]=m),s[m]=p,d++}}if(o.isUnionSchema()&&d===0){const{$unknown:f}=a;if(Array.isArray(f)){const[h,p]=f;s[h]=this._write(15,p)}}else if(typeof a.__type=="string")for(const f in a){const h=a[f],p=l?c[f]??f:f;p in s||(s[p]=this._write(15,h))}return s}if(Array.isArray(r)&&o.isListSchema()){const a=o.getValueSchema(),s=[],l=!!o.getMergedTraits().sparse;for(const c of r)(l||c!=null)&&s.push(this._write(a,c));return s}if(o.isMapSchema()){const a=o.getValueSchema(),s={},l=!!o.getMergedTraits().sparse;for(const c in r){const d=r[c];(l||d!=null)&&(s[c]=this._write(a,d))}return s}if(r instanceof Uint8Array&&(o.isBlobSchema()||o.isDocumentSchema()))return o===this.rootSchema?r:(this.serdeContext?.base64Encoder??av)(r);if(r instanceof Date&&(o.isTimestampSchema()||o.isDocumentSchema()))switch(I5(o,this.settings)){case 5:return r.toISOString().replace(".000Z","Z");case 6:return hfe(r);case 7:return r.getTime()/1e3;default:return console.warn("Missing timestamp format, using epoch seconds",r),r.getTime()/1e3}r instanceof za&&(this.useReplacer=!0)}if(!(r===null&&n?.isStructSchema())){if(o.isStringSchema()){if(typeof r>"u"&&o.isIdempotencyToken())return F5();const a=o.getMergedTraits().mediaType;return r!=null&&a&&(a==="application/json"||a.endsWith("+json"))?El.from(r):r}if(typeof r=="number"&&o.isNumericSchema())return Math.abs(r)===1/0||isNaN(r)?String(r):r;if(typeof r=="string"&&o.isBlobSchema())return o===this.rootSchema?r:(this.serdeContext?.base64Encoder??av)(r);if(typeof r=="bigint"&&(this.useReplacer=!0),o.isDocumentSchema())if(i){const a=Array.isArray(r)?[]:{};for(const s in r){const l=r[s];l instanceof za?(this.useReplacer=!0,a[s]=l):a[s]=this._write(o,l)}return a}else return structuredClone(r);return r}}}class Hme extends _2{settings;constructor(t){super(),this.settings=t}createSerializer(){const t=new Kme(this.settings);return t.setSerdeContext(this.serdeContext),t}createDeserializer(){const t=new Vme(this.settings);return t.setSerdeContext(this.serdeContext),t}}class Wme extends $fe{serializer;deserializer;serviceTarget;codec;mixin;awsQueryCompatible;constructor({defaultNamespace:t,errorTypeRegistries:r,serviceTarget:n,awsQueryCompatible:i,jsonCodec:o}){super({defaultNamespace:t,errorTypeRegistries:r}),this.serviceTarget=n,this.codec=o??new Hme({timestampFormat:{useTrait:!0,default:7},jsonName:!1}),this.serializer=this.codec.createSerializer(),this.deserializer=this.codec.createDeserializer(),this.awsQueryCompatible=!!i,this.mixin=new Lme(this.awsQueryCompatible)}async serializeRequest(t,r,n){const i=await super.serializeRequest(t,r,n);return i.path.endsWith("/")||(i.path+="/"),i.headers["content-type"]=`application/x-amz-json-${this.getJsonRpcVersion()}`,i.headers["x-amz-target"]=`${this.serviceTarget}.${t.name}`,this.awsQueryCompatible&&(i.headers["x-amzn-query-mode"]="true"),(a0(t.input)==="unit"||!i.body)&&(i.body="{}"),i}getPayloadCodec(){return this.codec}async handleError(t,r,n,i,o){this.awsQueryCompatible&&this.mixin.setQueryCompatError(i,n);const a=qme(n,i)??"Unknown";this.mixin.compose(this.compositeErrorRegistry,a,this.options.defaultNamespace);const{errorSchema:s,errorMetadata:l}=await this.mixin.getErrorSchemaOrThrowBaseException(a,this.options.defaultNamespace,n,i,o,this.awsQueryCompatible?this.mixin.findQueryCompatibleError:void 0),c=$n.of(s),d=i.message??i.Message??"UnknownError",f=this.compositeErrorRegistry.getErrorCtor(s)??Error,h=new f(d),p={},m=this.codec.createDeserializer();for(const[g,v]of c.structIterator())i[g]!=null&&(p[g]=m.readObject(v,i[g]));throw this.awsQueryCompatible&&this.mixin.queryCompatOutput(i,p),this.mixin.decorateServiceException(Object.assign(h,l,{$fault:c.getMergedTraits().error,message:d},p),i)}}class Jme extends Wme{constructor({defaultNamespace:t,errorTypeRegistries:r,serviceTarget:n,awsQueryCompatible:i,jsonCodec:o}){super({defaultNamespace:t,errorTypeRegistries:r,serviceTarget:n,awsQueryCompatible:i,jsonCodec:o})}getShapeId(){return"aws.protocols#awsJson1_1"}getJsonRpcVersion(){return"1.1"}getDefaultContentType(){return"application/x-amz-json-1.1"}}const vp="ref",lu=-1,sg=!0,m3="isSet",lz="PartitionResult",lg="booleanEquals",Py="getAttr",jf="stringEquals",g3={[vp]:"Endpoint"},Oy={[vp]:lz},sh={[vp]:"Region"},Ca={},v3=[sh],b3={conditions:[[m3,[g3]],[m3,v3],["aws.partition",v3,lz],[lg,[{[vp]:"UseFIPS"},sg]],[lg,[{fn:Py,argv:[Oy,"supportsFIPS"]},sg]],[lg,[{[vp]:"UseDualStack"},sg]],[lg,[{fn:Py,argv:[Oy,"supportsDualStack"]},sg]],[jf,[{fn:Py,argv:[Oy,"name"]},"aws"]],[jf,[sh,"us-east-1"]],[jf,[sh,"us-east-2"]],[jf,[sh,"us-west-1"]],[jf,[sh,"us-west-2"]]],results:[[lu],[lu,"Invalid Configuration: FIPS and custom endpoint are not supported"],[lu,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[g3,Ca],["https://cognito-idp-fips.us-east-1.amazonaws.com",Ca],["https://cognito-idp-fips.us-east-2.amazonaws.com",Ca],["https://cognito-idp-fips.us-west-1.amazonaws.com",Ca],["https://cognito-idp-fips.us-west-2.amazonaws.com",Ca],["https://cognito-idp-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",Ca],[lu,"FIPS and DualStack are enabled, but this partition does not support one or both"],["https://cognito-idp-fips.{Region}.{PartitionResult#dnsSuffix}",Ca],[lu,"FIPS is enabled but this partition does not support FIPS"],["https://cognito-idp.{Region}.amazonaws.com",Ca],["https://cognito-idp.{Region}.{PartitionResult#dualStackDnsSuffix}",Ca],[lu,"DualStack is enabled but this partition does not support DualStack"],["https://cognito-idp.{Region}.{PartitionResult#dnsSuffix}",Ca],[lu,"Invalid Configuration: Missing Region"]]},Qme=2,Sn=1e8,Yme=new Int32Array([-1,1,-1,0,17,3,1,4,Sn+16,2,5,Sn+16,3,9,6,5,7,Sn+15,6,8,Sn+14,7,Sn+12,Sn+13,4,11,10,5,Sn+9,Sn+11,5,12,Sn+10,6,13,Sn+9,8,Sn+4,14,9,Sn+5,15,10,Sn+6,16,11,Sn+7,Sn+8,3,Sn+1,18,5,Sn+2,Sn+3]),Xme=p2.from(Yme,Qme,b3.conditions,b3.results),Zme=new Bfe({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),ege=(e,t={})=>Zme.get(e,()=>she(Xme,{endpointParams:e,logger:t.logger}));m2.aws=G5;class ze extends ed{constructor(t){super(t),Object.setPrototypeOf(this,ze.prototype)}}class y2 extends ze{name="AccessDeniedException";$fault="client";constructor(t){super({name:"AccessDeniedException",$fault:"client",...t}),Object.setPrototypeOf(this,y2.prototype)}}class x2 extends ze{name="InternalErrorException";$fault="server";constructor(t){super({name:"InternalErrorException",$fault:"server",...t}),Object.setPrototypeOf(this,x2.prototype)}}class S2 extends ze{name="InvalidParameterException";$fault="client";reasonCode;constructor(t){super({name:"InvalidParameterException",$fault:"client",...t}),Object.setPrototypeOf(this,S2.prototype),this.reasonCode=t.reasonCode}}class w2 extends ze{name="NotAuthorizedException";$fault="client";constructor(t){super({name:"NotAuthorizedException",$fault:"client",...t}),Object.setPrototypeOf(this,w2.prototype)}}class E2 extends ze{name="ResourceNotFoundException";$fault="client";constructor(t){super({name:"ResourceNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,E2.prototype)}}class k2 extends ze{name="TooManyRequestsException";$fault="client";constructor(t){super({name:"TooManyRequestsException",$fault:"client",...t}),Object.setPrototypeOf(this,k2.prototype)}}class C2 extends ze{name="UserImportInProgressException";$fault="client";constructor(t){super({name:"UserImportInProgressException",$fault:"client",...t}),Object.setPrototypeOf(this,C2.prototype)}}class R2 extends ze{name="InternalServerException";$fault="server";constructor(t){super({name:"InternalServerException",$fault:"server",...t}),Object.setPrototypeOf(this,R2.prototype)}}class A2 extends ze{name="LimitExceededException";$fault="client";constructor(t){super({name:"LimitExceededException",$fault:"client",...t}),Object.setPrototypeOf(this,A2.prototype)}}class T2 extends ze{name="UserNotFoundException";$fault="client";constructor(t){super({name:"UserNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,T2.prototype)}}class $2 extends ze{name="InvalidLambdaResponseException";$fault="client";constructor(t){super({name:"InvalidLambdaResponseException",$fault:"client",...t}),Object.setPrototypeOf(this,$2.prototype)}}class N2 extends ze{name="TooManyFailedAttemptsException";$fault="client";constructor(t){super({name:"TooManyFailedAttemptsException",$fault:"client",...t}),Object.setPrototypeOf(this,N2.prototype)}}class D2 extends ze{name="UnexpectedLambdaException";$fault="client";constructor(t){super({name:"UnexpectedLambdaException",$fault:"client",...t}),Object.setPrototypeOf(this,D2.prototype)}}class F2 extends ze{name="UserLambdaValidationException";$fault="client";constructor(t){super({name:"UserLambdaValidationException",$fault:"client",...t}),Object.setPrototypeOf(this,F2.prototype)}}class I2 extends ze{name="CodeDeliveryFailureException";$fault="client";constructor(t){super({name:"CodeDeliveryFailureException",$fault:"client",...t}),Object.setPrototypeOf(this,I2.prototype)}}class P2 extends ze{name="InvalidPasswordException";$fault="client";constructor(t){super({name:"InvalidPasswordException",$fault:"client",...t}),Object.setPrototypeOf(this,P2.prototype)}}class O2 extends ze{name="InvalidSmsRoleAccessPolicyException";$fault="client";constructor(t){super({name:"InvalidSmsRoleAccessPolicyException",$fault:"client",...t}),Object.setPrototypeOf(this,O2.prototype)}}class M2 extends ze{name="InvalidSmsRoleTrustRelationshipException";$fault="client";constructor(t){super({name:"InvalidSmsRoleTrustRelationshipException",$fault:"client",...t}),Object.setPrototypeOf(this,M2.prototype)}}class L2 extends ze{name="PreconditionNotMetException";$fault="client";constructor(t){super({name:"PreconditionNotMetException",$fault:"client",...t}),Object.setPrototypeOf(this,L2.prototype)}}class z2 extends ze{name="UnsupportedUserStateException";$fault="client";constructor(t){super({name:"UnsupportedUserStateException",$fault:"client",...t}),Object.setPrototypeOf(this,z2.prototype)}}class U2 extends ze{name="UsernameExistsException";$fault="client";constructor(t){super({name:"UsernameExistsException",$fault:"client",...t}),Object.setPrototypeOf(this,U2.prototype)}}class B2 extends ze{name="AliasExistsException";$fault="client";constructor(t){super({name:"AliasExistsException",$fault:"client",...t}),Object.setPrototypeOf(this,B2.prototype)}}class j2 extends ze{name="InvalidUserPoolConfigurationException";$fault="client";constructor(t){super({name:"InvalidUserPoolConfigurationException",$fault:"client",...t}),Object.setPrototypeOf(this,j2.prototype)}}class q2 extends ze{name="InvalidEmailRoleAccessPolicyException";$fault="client";constructor(t){super({name:"InvalidEmailRoleAccessPolicyException",$fault:"client",...t}),Object.setPrototypeOf(this,q2.prototype)}}class V2 extends ze{name="MFAMethodNotFoundException";$fault="client";constructor(t){super({name:"MFAMethodNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,V2.prototype)}}class G2 extends ze{name="PasswordResetRequiredException";$fault="client";constructor(t){super({name:"PasswordResetRequiredException",$fault:"client",...t}),Object.setPrototypeOf(this,G2.prototype)}}class K2 extends ze{name="UnsupportedOperationException";$fault="client";constructor(t){super({name:"UnsupportedOperationException",$fault:"client",...t}),Object.setPrototypeOf(this,K2.prototype)}}class H2 extends ze{name="UserNotConfirmedException";$fault="client";constructor(t){super({name:"UserNotConfirmedException",$fault:"client",...t}),Object.setPrototypeOf(this,H2.prototype)}}class W2 extends ze{name="UserPoolAddOnNotEnabledException";$fault="client";constructor(t){super({name:"UserPoolAddOnNotEnabledException",$fault:"client",...t}),Object.setPrototypeOf(this,W2.prototype)}}class J2 extends ze{name="CodeMismatchException";$fault="client";constructor(t){super({name:"CodeMismatchException",$fault:"client",...t}),Object.setPrototypeOf(this,J2.prototype)}}class Q2 extends ze{name="ExpiredCodeException";$fault="client";constructor(t){super({name:"ExpiredCodeException",$fault:"client",...t}),Object.setPrototypeOf(this,Q2.prototype)}}class Y2 extends ze{name="PasswordHistoryPolicyViolationException";$fault="client";constructor(t){super({name:"PasswordHistoryPolicyViolationException",$fault:"client",...t}),Object.setPrototypeOf(this,Y2.prototype)}}class X2 extends ze{name="SoftwareTokenMFANotFoundException";$fault="client";constructor(t){super({name:"SoftwareTokenMFANotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,X2.prototype)}}class Z2 extends ze{name="ConcurrentModificationException";$fault="client";constructor(t){super({name:"ConcurrentModificationException",$fault:"client",...t}),Object.setPrototypeOf(this,Z2.prototype)}}class ek extends ze{name="ForbiddenException";$fault="client";constructor(t){super({name:"ForbiddenException",$fault:"client",...t}),Object.setPrototypeOf(this,ek.prototype)}}class tk extends ze{name="WebAuthnChallengeNotFoundException";$fault="client";constructor(t){super({name:"WebAuthnChallengeNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,tk.prototype)}}class rk extends ze{name="WebAuthnClientMismatchException";$fault="client";constructor(t){super({name:"WebAuthnClientMismatchException",$fault:"client",...t}),Object.setPrototypeOf(this,rk.prototype)}}class nk extends ze{name="WebAuthnCredentialNotSupportedException";$fault="client";constructor(t){super({name:"WebAuthnCredentialNotSupportedException",$fault:"client",...t}),Object.setPrototypeOf(this,nk.prototype)}}class ik extends ze{name="WebAuthnNotEnabledException";$fault="client";constructor(t){super({name:"WebAuthnNotEnabledException",$fault:"client",...t}),Object.setPrototypeOf(this,ik.prototype)}}class ok extends ze{name="WebAuthnOriginNotAllowedException";$fault="client";constructor(t){super({name:"WebAuthnOriginNotAllowedException",$fault:"client",...t}),Object.setPrototypeOf(this,ok.prototype)}}class ak extends ze{name="WebAuthnRelyingPartyMismatchException";$fault="client";constructor(t){super({name:"WebAuthnRelyingPartyMismatchException",$fault:"client",...t}),Object.setPrototypeOf(this,ak.prototype)}}class sk extends ze{name="DeviceKeyExistsException";$fault="client";constructor(t){super({name:"DeviceKeyExistsException",$fault:"client",...t}),Object.setPrototypeOf(this,sk.prototype)}}class lk extends ze{name="GroupExistsException";$fault="client";constructor(t){super({name:"GroupExistsException",$fault:"client",...t}),Object.setPrototypeOf(this,lk.prototype)}}class uk extends ze{name="DuplicateProviderException";$fault="client";constructor(t){super({name:"DuplicateProviderException",$fault:"client",...t}),Object.setPrototypeOf(this,uk.prototype)}}class ck extends ze{name="ManagedLoginBrandingExistsException";$fault="client";constructor(t){super({name:"ManagedLoginBrandingExistsException",$fault:"client",...t}),Object.setPrototypeOf(this,ck.prototype)}}class dk extends ze{name="TermsExistsException";$fault="client";constructor(t){super({name:"TermsExistsException",$fault:"client",...t}),Object.setPrototypeOf(this,dk.prototype)}}class fk extends ze{name="FeatureUnavailableInTierException";$fault="client";constructor(t){super({name:"FeatureUnavailableInTierException",$fault:"client",...t}),Object.setPrototypeOf(this,fk.prototype)}}class hk extends ze{name="TierChangeNotAllowedException";$fault="client";constructor(t){super({name:"TierChangeNotAllowedException",$fault:"client",...t}),Object.setPrototypeOf(this,hk.prototype)}}class pk extends ze{name="UserPoolTaggingException";$fault="client";constructor(t){super({name:"UserPoolTaggingException",$fault:"client",...t}),Object.setPrototypeOf(this,pk.prototype)}}class mk extends ze{name="InvalidOAuthFlowException";$fault="client";constructor(t){super({name:"InvalidOAuthFlowException",$fault:"client",...t}),Object.setPrototypeOf(this,mk.prototype)}}class gk extends ze{name="ScopeDoesNotExistException";$fault="client";constructor(t){super({name:"ScopeDoesNotExistException",$fault:"client",...t}),Object.setPrototypeOf(this,gk.prototype)}}class vk extends ze{name="UnsupportedIdentityProviderException";$fault="client";constructor(t){super({name:"UnsupportedIdentityProviderException",$fault:"client",...t}),Object.setPrototypeOf(this,vk.prototype)}}class bk extends ze{name="RefreshTokenReuseException";$fault="client";constructor(t){super({name:"RefreshTokenReuseException",$fault:"client",...t}),Object.setPrototypeOf(this,bk.prototype)}}class _k extends ze{name="UnauthorizedException";$fault="client";constructor(t){super({name:"UnauthorizedException",$fault:"client",...t}),Object.setPrototypeOf(this,_k.prototype)}}class yk extends ze{name="UnsupportedTokenTypeException";$fault="client";constructor(t){super({name:"UnsupportedTokenTypeException",$fault:"client",...t}),Object.setPrototypeOf(this,yk.prototype)}}class xk extends ze{name="WebAuthnConfigurationMissingException";$fault="client";constructor(t){super({name:"WebAuthnConfigurationMissingException",$fault:"client",...t}),Object.setPrototypeOf(this,xk.prototype)}}class Sk extends ze{name="EnableSoftwareTokenMFAException";$fault="client";constructor(t){super({name:"EnableSoftwareTokenMFAException",$fault:"client",...t}),Object.setPrototypeOf(this,Sk.prototype)}}const tge="AvailableChallenges",rge="AccessDeniedException",nge="AliasExistsException",ige="AnalyticsEndpointId",oge="AuthFlow",age="AnalyticsMetadata",sge="AnalyticsMetadataType",lge="AuthParameters",uge="AuthParametersType",cge="AuthenticationResult",dge="AuthenticationResultType",fge="AccessToken",hge="CodeDeliveryFailureException",pge="ClientId",mge="ClientIdType",gge="ClientMetadata",vge="CodeMismatchException",bge="ConcurrentModificationException",_ge="ChallengeName",yge="ChallengeParameters",xge="DeviceGroupKey",Sge="DeviceKey",wge="DeviceKeyExistsException",Ege="DuplicateProviderException",kge="ExpiredCodeException",Cge="EncodedData",Rge="ExpiresIn",Age="EnableSoftwareTokenMFAException",Tge="ForbiddenException",$ge="FeatureUnavailableInTierException",Nge="GroupExistsException",Dge="IpAddress",Fge="InitiateAuthRequest",Ige="InitiateAuthResponse",Pge="InitiateAuth",Oge="InternalErrorException",Mge="InvalidEmailRoleAccessPolicyException",Lge="InvalidLambdaResponseException",zge="InvalidOAuthFlowException",Uge="InvalidParameterException",Bge="InvalidPasswordException",jge="InternalServerException",qge="InvalidSmsRoleAccessPolicyException",Vge="InvalidSmsRoleTrustRelationshipException",Gge="IdToken",Kge="InvalidUserPoolConfigurationException",Hge="LimitExceededException",Wge="MFAMethodNotFoundException",Jge="ManagedLoginBrandingExistsException",Qge="NotAuthorizedException",Yge="NewDeviceMetadata",Xge="NewDeviceMetadataType",Zge="PasswordHistoryPolicyViolationException",e0e="PreconditionNotMetException",t0e="PasswordResetRequiredException",r0e="ResourceNotFoundException",n0e="RefreshToken",i0e="RefreshTokenReuseException",uz="Session",o0e="ScopeDoesNotExistException",a0e="SessionType",s0e="SoftwareTokenMFANotFoundException",l0e="TierChangeNotAllowedException",u0e="TermsExistsException",c0e="TooManyFailedAttemptsException",d0e="TooManyRequestsException",f0e="TokenModelType",h0e="TokenType",p0e="UserContextDataType",m0e="UserContextData",g0e="UnauthorizedException",v0e="UsernameExistsException",b0e="UserImportInProgressException",_0e="UnsupportedIdentityProviderException",y0e="UnexpectedLambdaException",x0e="UserLambdaValidationException",S0e="UserNotConfirmedException",w0e="UserNotFoundException",E0e="UnsupportedOperationException",k0e="UserPoolAddOnNotEnabledException",C0e="UserPoolTaggingException",R0e="UnsupportedTokenTypeException",A0e="UnsupportedUserStateException",T0e="WebAuthnClientMismatchException",$0e="WebAuthnConfigurationMissingException",N0e="WebAuthnChallengeNotFoundException",D0e="WebAuthnCredentialNotSupportedException",F0e="WebAuthnNotEnabledException",I0e="WebAuthnOriginNotAllowedException",P0e="WebAuthnRelyingPartyMismatchException",He="client",qe="error",We="httpError",Ve="message",O0e="reasonCode",cz="smithy.ts.sdk.synthetic.com.amazonaws.cognitoidentityprovider",dz="server",Ne="com.amazonaws.cognitoidentityprovider",fz=Qi.for(cz);var M0e=[-3,cz,"CognitoIdentityProviderServiceException",0,[],[]];fz.registerError(M0e,ze);const je=Qi.for(Ne);var L0e=[-3,Ne,rge,{[qe]:He,[We]:403},[Ve],[0]];je.registerError(L0e,y2);var z0e=[-3,Ne,nge,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(z0e,B2);var U0e=[-3,Ne,hge,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(U0e,I2);var B0e=[-3,Ne,vge,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(B0e,J2);var j0e=[-3,Ne,bge,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(j0e,Z2);var q0e=[-3,Ne,wge,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(q0e,sk);var V0e=[-3,Ne,Ege,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(V0e,uk);var G0e=[-3,Ne,Age,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(G0e,Sk);var K0e=[-3,Ne,kge,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(K0e,Q2);var H0e=[-3,Ne,$ge,{[qe]:He,[We]:403},[Ve],[0]];je.registerError(H0e,fk);var W0e=[-3,Ne,Tge,{[qe]:He,[We]:403},[Ve],[0]];je.registerError(W0e,ek);var J0e=[-3,Ne,Nge,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(J0e,lk);var Q0e=[-3,Ne,Oge,{[qe]:dz},[Ve],[0]];je.registerError(Q0e,x2);var Y0e=[-3,Ne,jge,{[qe]:dz},[Ve],[0]];je.registerError(Y0e,R2);var X0e=[-3,Ne,Mge,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(X0e,q2);var Z0e=[-3,Ne,Lge,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(Z0e,$2);var eve=[-3,Ne,zge,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(eve,mk);var tve=[-3,Ne,Uge,{[qe]:He,[We]:400},[Ve,O0e],[0,0]];je.registerError(tve,S2);var rve=[-3,Ne,Bge,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(rve,P2);var nve=[-3,Ne,qge,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(nve,O2);var ive=[-3,Ne,Vge,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(ive,M2);var ove=[-3,Ne,Kge,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(ove,j2);var ave=[-3,Ne,Hge,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(ave,A2);var sve=[-3,Ne,Jge,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(sve,ck);var lve=[-3,Ne,Wge,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(lve,V2);var uve=[-3,Ne,Qge,{[qe]:He,[We]:403},[Ve],[0]];je.registerError(uve,w2);var cve=[-3,Ne,Zge,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(cve,Y2);var dve=[-3,Ne,t0e,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(dve,G2);var fve=[-3,Ne,e0e,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(fve,L2);var hve=[-3,Ne,i0e,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(hve,bk);var pve=[-3,Ne,r0e,{[qe]:He,[We]:404},[Ve],[0]];je.registerError(pve,E2);var mve=[-3,Ne,o0e,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(mve,gk);var gve=[-3,Ne,s0e,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(gve,X2);var vve=[-3,Ne,u0e,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(vve,dk);var bve=[-3,Ne,l0e,{[qe]:He,[We]:403},[Ve],[0]];je.registerError(bve,hk);var _ve=[-3,Ne,c0e,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(_ve,N2);var yve=[-3,Ne,d0e,{[qe]:He,[We]:429},[Ve],[0]];je.registerError(yve,k2);var xve=[-3,Ne,g0e,{[qe]:He,[We]:401},[Ve],[0]];je.registerError(xve,_k);var Sve=[-3,Ne,y0e,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(Sve,D2);var wve=[-3,Ne,_0e,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(wve,vk);var Eve=[-3,Ne,E0e,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(Eve,K2);var kve=[-3,Ne,R0e,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(kve,yk);var Cve=[-3,Ne,A0e,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(Cve,z2);var Rve=[-3,Ne,b0e,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(Rve,C2);var Ave=[-3,Ne,x0e,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(Ave,F2);var Tve=[-3,Ne,v0e,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(Tve,U2);var $ve=[-3,Ne,S0e,{[qe]:He,[We]:400},[Ve],[0]];je.registerError($ve,H2);var Nve=[-3,Ne,w0e,{[qe]:He,[We]:404},[Ve],[0]];je.registerError(Nve,T2);var Dve=[-3,Ne,k0e,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(Dve,W2);var Fve=[-3,Ne,C0e,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(Fve,pk);var Ive=[-3,Ne,N0e,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(Ive,tk);var Pve=[-3,Ne,T0e,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(Pve,rk);var Ove=[-3,Ne,$0e,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(Ove,xk);var Mve=[-3,Ne,D0e,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(Mve,nk);var Lve=[-3,Ne,F0e,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(Lve,ik);var zve=[-3,Ne,I0e,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(zve,ok);var Uve=[-3,Ne,P0e,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(Uve,ak);const Bve=[fz,je];var jve=[0,Ne,mge,8,0],hz=[0,Ne,a0e,8,0],My=[0,Ne,f0e,8,0],qve=[3,Ne,sge,0,[ige],[0]],Vve=[3,Ne,dge,0,[fge,Rge,h0e,n0e,Gge,Yge],[[()=>My,0],1,0,[()=>My,0],[()=>My,0],()=>Hve]],Gve=[3,Ne,Fge,0,[oge,pge,lge,gge,age,m0e,uz],[0,[()=>jve,0],[()=>Jve,0],128,()=>qve,[()=>Wve,0],[()=>hz,0]],2],Kve=[3,Ne,Ige,0,[_ge,uz,yge,cge,tge],[0,[()=>hz,0],128,[()=>Vve,0],64]],Hve=[3,Ne,Xge,0,[Sge,xge],[0,0]],Wve=[3,Ne,p0e,8,[Dge,Cge],[0,0]],Jve=[2,Ne,uge,8,0,0],Qve=[9,Ne,Pge,0,()=>Gve,()=>Kve];const Yve=e=>({apiVersion:"2016-04-18",base64Decoder:e?.base64Decoder??Cb,base64Encoder:e?.base64Encoder??av,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??ege,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??lme,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new $pe},{schemeId:"smithy.api#noAuth",identityProvider:t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Ffe}],logger:e?.logger??new Z5,protocol:e?.protocol??Jme,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.cognitoidentityprovider",errorTypeRegistries:Bve,xmlNamespace:"http://cognito-idp.amazonaws.com/doc/2016-04-18/",version:"2016-04-18",serviceTarget:"AWSCognitoIdentityProviderService"},serviceId:e?.serviceId??"Cognito Identity Provider",urlParser:e?.urlParser??zd,utf8Decoder:e?.utf8Decoder??Ld,utf8Encoder:e?.utf8Encoder??d2}),Xve=e=>{const t=Ome(e),r=()=>t().then(hpe),n=Yve(e);return{...n,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??Ime,credentialDefaultProvider:e?.credentialDefaultProvider??(i=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??Dme({serviceId:n.serviceId,clientVersion:hme.version}),maxAttempts:e?.maxAttempts??wh,region:e?.region??Fme("Region is missing"),requestHandler:f2.create(e?.requestHandler??r),retryMode:e?.retryMode??(async()=>(await r()).retryMode||mhe),sha256:e?.sha256??Nme,streamCollector:e?.streamCollector??Vde,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(Bhe)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(jhe))}},Zve=e=>({setRegion(t){e.region=t},region(){return e.region}}),ebe=e=>({region:e.region()}),tbe=e=>{const t=e.httpAuthSchemes;let r=e.httpAuthSchemeProvider,n=e.credentials;return{setHttpAuthScheme(i){const o=t.findIndex(a=>a.schemeId===i.schemeId);o===-1?t.push(i):t.splice(o,1,i)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(i){r=i},httpAuthSchemeProvider(){return r},setCredentials(i){n=i},credentials(){return n}}},rbe=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),nbe=(e,t)=>{const r=Object.assign(Zve(e),bpe(e),vde(e),tbe(e));return t.forEach(n=>n.configure(r)),Object.assign(e,ebe(r),_pe(r),bde(r),rbe(r))};class pz extends dpe{config;constructor(...[t]){const r=Xve(t||{});super(r),this.initConfig=r;const n=cme(r),i=Ufe(n),o=cpe(i),a=Ghe(o),s=a,l=lpe(s),c=ume(l),d=nbe(c,t?.extensions||[]);this.config=d,this.middlewareStack.use(tfe(this.config)),this.middlewareStack.use(Uhe(this.config)),this.middlewareStack.use(Rpe(this.config)),this.middlewareStack.use(Whe(this.config)),this.middlewareStack.use(Sde(this.config)),this.middlewareStack.use(kde(this.config)),this.middlewareStack.use(Ade(this.config)),this.middlewareStack.use(Fde(this.config,{httpAuthSchemeParametersProvider:ame,identityProviderConfigProvider:async f=>new Dfe({"aws.auth#sigv4":f.credentials})})),this.middlewareStack.use(Lde(this.config))}destroy(){super.destroy()}}class mz extends Y5.classBuilder().ep(dme).m(function(t,r,n,i){return[spe(n,t.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","InitiateAuth",{}).n("CognitoIdentityProviderClient","InitiateAuthCommand").sc(Qve).build(){}let ibe="reventless.auth.v1",cv="reventless.role-switched",obe=300*1e3,wk="activeRole",Ek="availableRoles",kk="activeRoleStale";function gz(e){return e.split(",").map(t=>t.trim()).filter(t=>t!=="")}function $S(e){let t=i=>D(k(e[i],me.string),""),r=Q(D(k(e.groups,me.array),[]),me.string),n=i=>k(k(k(e.claims,me.object),o=>o[i]),me.string);return{userId:t("userId"),username:t("username"),groups:r,provider:t("provider"),activeRole:n(wk),availableRoles:ne(n(Ek),[],gz),staleRole:n(kk)}}function abe(e){let t=[["userId",e.userId],["username",e.username],["groups",e.groups.map(s=>s)],["provider",e.provider]],r=e.activeRole,n=e.availableRoles,i=e.staleRole,o,a=0;if(r!==void 0||n.length!==0||i!==void 0?a=1:o=[],a===1){let s=[];ee(r,l=>{s.push([wk,l])}),n.length!==0&&s.push([Ek,n.join(",")]),ee(i,l=>{s.push([kk,l])}),o=[["claims",Object.fromEntries(s)]]}return Object.fromEntries(t.concat(o))}function sbe(e){let t=localStorage.getItem(e);if(t!=null)try{let r=JSON.parse(t),n=me.object(r);if(n===void 0)return;let i=k(n.token,me.string),o=n.identity,a=k(n.refreshToken,me.string),s=k(n.expiresAt,me.float);return i!==void 0&&o!==void 0?q(me.object(o),l=>({token:i,identity:$S(l),refreshToken:a,expiresAt:s})):void 0}catch{return}}function qf(e,t){let r=[["token",t.token],["identity",abe(t.identity)]],n=t.refreshToken,i=n!==void 0?r.concat([["refreshToken",n]]):r,o=t.expiresAt,a=o!==void 0?i.concat([["expiresAt",o]]):i,s=JSON.stringify(Object.fromEntries(a));localStorage.setItem(e,s)}function lbe(){return sessionStorage.getItem(cv)==null?!1:(sessionStorage.removeItem(cv),!0)}function ube(e){return(e.endsWith("/graphql")?e.slice(0,e.length-8|0):e)+"/__inmemory/login"}function cbe(e){return(e.endsWith("/graphql")?e.slice(0,e.length-8|0):e)+"/__inmemory/switch-role"}function vz(e){let t=n=>k(e[n],me.string),r=Q(D(k(e["cognito:groups"],me.array),[]),me.string);return{userId:D(t("sub"),""),username:D(Wn(t("cognito:username"),t("email")),""),groups:r,provider:"Cognito",activeRole:t(wk),availableRoles:ne(t(Ek),[],gz),staleRole:t(kk)}}let dbe=`mutation SetActiveRole($activeRole: String) {
|
|
66
|
+
Platform_SetActiveRole(activeRole: $activeRole) {
|
|
67
|
+
activeRole
|
|
68
|
+
availableRoles
|
|
69
|
+
}
|
|
70
|
+
}`;async function NS(e){try{let t=await e.text();return JSON.parse(t)}catch{return}}function _3(e,t){let r=e.status;return t+" (HTTP "+r.toString()+")"}function fbe(e){return JSON.stringify(e!==void 0?Object.fromEntries([["activeRole",e]]):{})}async function y3(e,t,r){try{let n=JSON.stringify(Object.fromEntries([["query",dbe],["variables",Object.fromEntries([["activeRole",ne(r,null,l=>l)]])]])),i=await fetch(e,{method:"POST",headers:{"content-type":"application/json",authorization:"Bearer "+t},body:n}),o=await NS(i),a=k(k(k(k(k(k(k(o,me.object),l=>l.errors),me.array),l=>l.at(0)),me.object),l=>l.message),me.string),s=i.ok;return a!==void 0?{TAG:"Error",_0:a}:s?{TAG:"Ok",_0:void 0}:{TAG:"Error",_0:"Could not switch role"}}catch(n){let i=Ns(n);return{TAG:"Error",_0:kb(Eb(i))}}}function bz(e){try{return pde(e)}catch{return}}function hbe(e){let t=e.IdToken;if(t===void 0)return;let r=bz(t);if(r===void 0)return;let n=e.ExpiresIn,i=n!==void 0?Date.now()+n*1e3:void 0;return{token:t,identity:vz(r),refreshToken:e.RefreshToken,expiresAt:i}}async function pbe(e,t,r,n){try{let i=new pz({region:t}),o=new mz({ClientId:e,AuthFlow:"USER_PASSWORD_AUTH",AuthParameters:Object.fromEntries([["USERNAME",r],["PASSWORD",n]])}),a=await i.send(o),s=k(a.AuthenticationResult,hbe);return s!==void 0?{TAG:"Ok",_0:s}:{TAG:"Error",_0:"Cognito returned no usable tokens"}}catch(i){let o=Ns(i);return{TAG:"Error",_0:kb(Eb(o))}}}async function x3(e,t,r,n){try{let i=new pz({region:t}),o=new mz({ClientId:e,AuthFlow:"REFRESH_TOKEN_AUTH",AuthParameters:Object.fromEntries([["REFRESH_TOKEN",r]])}),s=(await i.send(o)).AuthenticationResult;if(s===void 0)return{TAG:"Error",_0:"Cognito refresh returned no tokens"};let l=s.IdToken;if(l===void 0)return{TAG:"Error",_0:"Cognito refresh missing IdToken"};let c=bz(l),d=D(q(c,vz),n),f=s.ExpiresIn,h=f!==void 0?Date.now()+f*1e3:void 0,p=s.RefreshToken;return{TAG:"Ok",_0:{token:l,identity:d,refreshToken:p!==void 0?p:r,expiresAt:h}}}catch(i){let o=Ns(i);return{TAG:"Error",_0:kb(Eb(o))}}}function mbe(e){switch(e){case"Anonymous":return!1;case"Local":case"Cognito":return!0}}let _z=Zt(void 0),gbe=_z.Provider;function vbe(e){let t=e.storageKey,r=e.region,n=e.cognitoClientId,i=e.apiEndpoint,o=e.authMode,a=t!==void 0?t:ibe,s=ce(()=>sbe(a)),l=s[1],c=s[0];Ae(()=>{if(c===void 0)return;let y=c.refreshToken;if(y===void 0)return;let S=c.expiresAt;if(S===void 0)return;let w=c.identity;switch(o){case"Anonymous":case"Local":return;case"Cognito":if(n===void 0||r===void 0)return;let C=Math.max(0,S-Date.now()-obe),A=setTimeout(()=>{x3(n,r,y,w).then($=>{if($.TAG==="Ok"){let R=$._0;return qf(a,R),l(N=>R)}localStorage.removeItem(a),l(R=>{})})},C);return()=>{clearTimeout(A)}}},[c,o,n,r]);let d=q(c,y=>y.identity),f=Ee(c),h=async(y,S)=>{try{let w=0;switch(o){case"Anonymous":case"Local":w=1;break;case"Cognito":if(n===void 0)return{TAG:"LoginErr",_0:"Cognito mode missing clientId or region in config.json"};if(r===void 0)return{TAG:"LoginErr",_0:"Cognito mode missing clientId or region in config.json"};let C=await pbe(n,r,y,S);if(C.TAG!=="Ok")return{TAG:"LoginErr",_0:C._0};let A=C._0;return qf(a,A),l($=>A),"LoginOk"}if(w===1){if(i===void 0)return{TAG:"LoginErr",_0:"Local auth mode requires an apiEndpoint"};let C=await fetch(ube(i),{method:"POST",headers:{"content-type":"application/json"},body:D(JSON.stringify({username:y,password:S}),"")}),A=await NS(C);if(C.ok){let R=k(A,me.object);if(R===void 0)return{TAG:"LoginErr",_0:"Malformed login response"};let N=k(R.token,me.string),I=k(R.identity,me.object);if(N===void 0)return{TAG:"LoginErr",_0:"Malformed login response"};if(I===void 0)return{TAG:"LoginErr",_0:"Malformed login response"};let M=$S(I),P={token:N,identity:M,refreshToken:void 0,expiresAt:void 0};return qf(a,P),l(B=>P),"LoginOk"}return{TAG:"LoginErr",_0:D(k(k(k(A,me.object),R=>R.error),me.string),_3(C,"Login failed"))}}}catch(w){let C=Ns(w);return{TAG:"LoginErr",_0:kb(Eb(C))}}},p=async y=>{try{let S=0;switch(o){case"Anonymous":case"Local":S=1;break;case"Cognito":if(c===void 0)return{TAG:"LoginErr",_0:"Not signed in"};let w=c.refreshToken;if(i===void 0)return{TAG:"LoginErr",_0:"Switching roles is not available on this deployment"};if(n===void 0)return{TAG:"LoginErr",_0:"Switching roles is not available on this deployment"};if(r===void 0)return{TAG:"LoginErr",_0:"Switching roles is not available on this deployment"};if(w===void 0)return{TAG:"LoginErr",_0:"Switching roles is not available on this deployment"};let C=await y3(i,c.token,y);if(C.TAG!=="Ok")return{TAG:"LoginErr",_0:C._0};let A=await x3(n,r,w,c.identity),$=0;if(A.TAG==="Ok"){let R=A._0;if(Re(R.identity.activeRole,y))return qf(a,R),sessionStorage.setItem(cv,"1"),l(N=>R),"LoginOk";$=2}else $=2;if($===2)return await y3(i,c.token,c.identity.activeRole),A.TAG==="Ok"?{TAG:"LoginErr",_0:"The server did not narrow this session to that role"}:{TAG:"LoginErr",_0:A._0};break}if(S===1){if(i===void 0)return{TAG:"LoginErr",_0:"Local auth mode requires an apiEndpoint"};if(c===void 0)return{TAG:"LoginErr",_0:"Not signed in"};let w=await fetch(cbe(i),{method:"POST",headers:{"content-type":"application/json",authorization:"Bearer "+c.token},body:fbe(y)}),C=await NS(w);if(!w.ok)return{TAG:"LoginErr",_0:D(k(k(k(C,me.object),M=>M.error),me.string),_3(w,"Could not switch role"))};let A=k(C,me.object);if(A===void 0)return{TAG:"LoginErr",_0:"Malformed switch response"};let $=k(A.token,me.string),R=k(A.identity,me.object);if($===void 0)return{TAG:"LoginErr",_0:"Malformed switch response"};if(R===void 0)return{TAG:"LoginErr",_0:"Malformed switch response"};let N=$S(R),I={token:$,identity:N,refreshToken:void 0,expiresAt:void 0};return qf(a,I),sessionStorage.setItem(cv,"1"),l(M=>I),"LoginOk"}}catch(S){let w=Ns(S);return console.error("[AuthProvider] switchRole threw; session left as it was",w),{TAG:"LoginErr",_0:"Could not switch role. You are still acting as the role you had."}}},m=mbe(o);return ur(gbe,{value:{identity:d,isAuthenticated:f,login:h,switchRole:p,canSwitchRoles:m,logout:()=>{localStorage.removeItem(a),l(y=>{})},getToken:()=>q(c,y=>y.token)},children:e.children})}let bbe={make:vbe};function xa(){return St(_z)}function yz(e){let t=globalThis.window;if(t!=null)try{return Mi(t.matchMedia(e))}catch{return}}function Ly(e){let t=yz(e);if(t===void 0)return!1;try{return Rt(t).matches}catch{return!1}}function bd(e){let t=ce(()=>Ly(e)),r=t[1];return Ae(()=>{r(a=>Ly(e));let n=yz(e);if(n===void 0)return;let i=Rt(n),o=()=>r(a=>Ly(e));try{return i.addEventListener("change",o),()=>{try{i.removeEventListener("change",o);return}catch{return}}}catch{return}},[e]),t[0]}function xz(){let e=bd(Jn.compact),t=bd(Jn.narrow),r=bd(Jn.tight);return{compact:e,narrow:t,tight:r}}function Sz(e){return e.tight?"Tight":e.narrow?"Narrow":e.compact?"Compact":"Wide"}function wz(){return Sz(xz())}let _be={background:"var("+x.surface+")",border:"1px solid var("+x.border+")",color:"var("+x.textPrimary+")",cursor:"pointer",display:"inline-flex",fontFamily:"var("+T.fontFamily+")",fontSize:"var("+T.sizeSm+")",fontWeight:"var("+T.weightMedium+")",lineHeight:"1",padding:"0.375rem 0.75rem",borderRadius:"var("+Y.md+")",alignItems:"center",gap:"0.375rem"},ybe={color:"var("+x.textSecondary+")",fontSize:"0.625rem"},xbe={background:"var("+x.surfaceElevated+")",border:"1px solid var("+x.borderSubtle+")",color:"var("+x.textPrimary+")",fontFamily:"var("+T.fontFamily+")",minWidth:"200px",padding:"0.75rem 1rem",position:"absolute",right:"0",top:"calc(100% + 0.5rem)",zIndex:"10",borderRadius:"var("+Y.md+")",boxShadow:"var("+Zr.md+")"},Sbe={background:"var("+x.brandSubtle+")",color:"var("+x.brand+")",display:"inline-block",fontSize:"var("+T.sizeXs+")",marginRight:"0.25rem",marginBottom:"0.25rem",padding:"0.125rem 0.5rem",borderRadius:"var("+Y.full+")"},S3={border:"none",borderTop:"1px solid var("+x.borderSubtle+")",margin:"0.5rem 0"},wbe={background:"transparent",border:"1px solid var("+x.border+")",color:"var("+x.textPrimary+")",cursor:"pointer",fontSize:"var("+T.sizeSm+")",padding:"0.375rem 0.5rem",width:"100%",borderRadius:"var("+Y.sm+")"},Ebe={color:"var("+x.textSecondary+")",fontSize:"var("+T.sizeXs+")",letterSpacing:"0.04em",marginBottom:"0.25rem",textTransform:"uppercase"};function kbe(e){return{background:"transparent",border:"none",color:"var("+x.textPrimary+")",cursor:e?"default":"pointer",display:"flex",fontSize:"var("+T.sizeSm+")",fontWeight:"var("+(e?T.weightMedium:T.weightNormal)+")",padding:"0.3125rem 0.5rem",textAlign:"left",width:"100%",borderRadius:"var("+Y.sm+")",alignItems:"center",justifyContent:"space-between",gap:"0.75rem"}}let Cbe={color:"var("+x.textSecondary+")",fontSize:"var("+T.sizeXs+")"},Rbe={color:"var("+x.textSecondary+")",fontWeight:"var("+T.weightNormal+")"},Abe={background:"transparent",border:"none",color:"var("+x.textSecondary+")",cursor:"pointer",display:"block",fontFamily:"var("+T.fontFamily+")",fontSize:"var("+T.sizeSm+")",padding:"0.3125rem 0.5rem",textAlign:"left",width:"100%",borderRadius:"var("+Y.sm+")"},Tbe={color:"var("+x.textSecondary+")",fontSize:"var("+T.sizeXs+")",marginBottom:"0.25rem"},$be={color:"var("+x.error+")",fontSize:"var("+T.sizeXs+")",marginTop:"0.25rem"},Nbe={color:"var("+x.textSecondary+")",fontSize:"var("+T.sizeXs+")",marginBottom:"0.25rem"};function Dbe(e){let t=e.trim()[0];return t!==void 0&&t.trim()!==""?t.toUpperCase():"☺"}function Ez(e,t){if(!e)return[];let r=t.availableRoles;return r.length!==0?r:t.groups}let Fbe="Stop acting as one role",Ibe="All of them — choose one to narrow.";function Pbe(e,t){let r=e.length;if(r!==1&&r!==0)return t.activeRole}function Obe(e){let t=xa(),r=ce(()=>!1),n=r[1],i=r[0],o=ce(()=>!1),a=o[1],s=o[0],l=ce(()=>{}),c=l[1],d=l[0],f=bd(Jn.compact);if(t===void 0)return null;let h=t.identity;if(h===void 0)return null;let p=Ez(t.canSwitchRoles,h),m=Pbe(p,h),g=b=>{a(y=>!0),c(y=>{}),t.switchRole(b).then(y=>{if(a(w=>!1),typeof y!="object")return n(w=>!1);let S=y._0;c(w=>S)})},v;if(i){let b=h.staleRole,y=p.length,S;if(y!==1&&y!==0){let w=h.activeRole,C=h.activeRole;S=L(Bt,{children:[L("div",{children:[_("div",{children:"Acting as",style:Ebe}),w!==void 0?null:_("div",{children:Ibe,style:Tbe}),p.map(A=>{let $=Re(h.activeRole,A);return L("button",{children:[A,$?_("span",{children:"✓",style:Cbe}):null],"aria-checked":$?"true":"false",role:"radio",style:kbe($),disabled:s,onClick:R=>{if(!$)return g(A)}},A)})],"aria-label":"Acting as",role:"radiogroup"}),C!==void 0?L(Bt,{children:[_("hr",{style:S3}),_("button",{children:Fbe,style:Abe,disabled:s,onClick:A=>g(void 0)})]}):null,d!==void 0?_("div",{children:d,style:$be}):null]})}else S=null;v=L("div",{children:[_("div",{children:h.username,style:{fontSize:"var("+T.sizeMd+")",fontWeight:"var("+T.weightMedium+")",marginBottom:"0.25rem"}}),h.groups.length!==0&&p.length<=1?_("div",{children:h.groups.map(w=>_("span",{children:w,style:Sbe},w)),style:{marginBottom:"0.25rem"}}):null,b!==void 0?_("div",{children:b+" is no longer one of your roles, so you are acting as all of them.",style:Nbe}):null,S,_("hr",{style:S3}),_("button",{children:"Sign out",style:wbe,onClick:w=>{n(C=>!1),t.logout()}})],style:xbe})}else v=null;return L("div",{children:[L("button",{children:[f?Dbe(h.username):L(Bt,{children:[h.username,m!==void 0?_("span",{children:"· "+m,style:Rbe}):null]}),_("span",{children:i?"▴":"▾",style:ybe})],"aria-label":m!==void 0?"Signed in as "+h.username+", acting as "+m:"Signed in as "+h.username,style:_be,onClick:b=>n(y=>!y)}),v],style:{position:"relative"}})}let Mbe=Obe,Lbe={background:"var("+x.surface+")",border:"1px solid var("+x.borderSubtle+")",color:"var("+x.textPrimary+")",fontFamily:"var("+T.fontFamily+")",margin:"6rem auto",maxWidth:"360px",padding:"2rem",borderRadius:"var("+Y.md+")"},w3={color:"var("+x.textSecondary+")",display:"block",fontSize:"var("+T.sizeSm+")",marginBottom:"0.25rem"},E3={background:"var("+x.surfaceElevated+")",border:"1px solid var("+x.border+")",color:"var("+x.textPrimary+")",fontSize:"var("+T.sizeMd+")",marginBottom:"1rem",padding:"0.5rem 0.75rem",width:"100%",borderRadius:"var("+Y.sm+")",boxSizing:"border-box"};function zbe(e){return{background:e?"var("+x.textDisabled+")":"var("+x.brand+")",border:"none",color:"var("+x.textOnBrand+")",cursor:e?"not-allowed":"pointer",fontSize:"var("+T.sizeMd+")",fontWeight:"var("+T.weightMedium+")",padding:"0.625rem",width:"100%",borderRadius:"var("+Y.sm+")"}}let Ube={color:"var("+x.error+")",fontSize:"var("+T.sizeSm+")",marginBottom:"0.75rem"};function Bbe(e){let t=xa(),r=ce(()=>""),n=r[1],i=r[0],o=ce(()=>""),a=o[1],s=o[0],l=ce(()=>{}),c=l[1],d=l[0],f=ce(()=>!1),h=f[1],p=f[0],m=g=>{g.preventDefault(),c(v=>{}),h(v=>!0),t!==void 0?Lt(t.login(i,s).then(v=>{if(h(y=>!1),typeof v!="object")return;let b=v._0;c(y=>b)}),v=>(h(b=>!1),c(b=>"Unexpected error during sign-in"),Promise.resolve())):(c(v=>"Auth provider missing"),h(v=>!1),Promise.resolve())};return L("div",{children:[_("h1",{children:"Sign in",style:{fontSize:"var("+T.sizeXl+")",fontWeight:"var("+T.weightBold+")",margin:"0 0 1.5rem"}}),L("form",{children:[_("label",{children:"Username",style:w3}),_("input",{style:E3,autoComplete:"username",autoFocus:!0,type:"text",value:i,onChange:g=>{let v=g.target.value;n(b=>v)}}),_("label",{children:"Password",style:w3}),_("input",{style:E3,autoComplete:"current-password",type:"password",value:s,onChange:g=>{let v=g.target.value;a(b=>v)}}),d!==void 0?_("div",{children:d,style:Ube}):null,_("button",{children:p?"Signing in…":"Sign in",style:zbe(p),disabled:p,type:"submit"})],onSubmit:m})],style:Lbe})}let k3=Bbe;function jbe(e){let t=e.children,r=e.url,n=r!==void 0?r:"",i=t!==void 0?t:"No route matched!";return D(KV(e.routes,n),i)}let qbe=jbe;function Vbe(e){return e.button===0&&!e.altKey&&!e.ctrlKey&&!e.metaKey?!e.shiftKey:!1}function Gbe(e){let t=St(Fv),r=oO(t.prefix,e.route),n=i=>{if(!i.defaultPrevented&&Vbe(i))return i.preventDefault(),ua(r)};return _("a",{children:e.children,href:r,onClick:n})}let Kbe=Gbe,im=Zt(void 0),Hbe=im.Provider;function Wbe(e){let t=e.initialPages,r=t!==void 0?t:[],n=ce(()=>r),i=n[1],o=ce(()=>[]),a=o[1],s=n[0].concat(o[0]);return ur(Hbe,{value:{register:m=>i(g=>g.concat(m)),deregister:m=>i(g=>g.filter(v=>v.fragmentId!==m)),setPluginPages:m=>a(g=>m),getPages:()=>s,getPage:m=>s.find(g=>g.fragmentId===m)},children:e.children})}let Jbe={make:Wbe};function kz(){let e=St(im);return e!==void 0?e.getPages():[]}function Cz(e){return!D(e.menuEntry.hidden,!1)}let Qbe=[];function Ybe(e){return!1}let Xbe={activeAccess:Qbe,hasAccess:Ybe},Rz=Zt(Xbe),Zbe=Rz.Provider;function e_e(e){let t=e.access;return ur(Zbe,{value:{activeAccess:t,hasAccess:i=>t.some(o=>o===i)},children:e.children})}function Gs(){return St(Rz).hasAccess}let t_e=e_e;function Su(e){return"var("+e+")"}let r_e=E([z("flex"),X("center"),u("gap",Su(O.sm)),u("padding","6px var("+O.sm+") 6px 14px"),u("border-radius",Su(Y.md)),u("color",Su(x.textDisabled)),u("font-size",Su(T.sizeSm)),Ce("notAllowed"),LO("none")]),n_e=E([u("font-size","14px"),rn(0)]),i_e=E([ai(1),u("font-weight",Su(T.weightMedium))]),o_e=E([u("font-size",Su(T.sizeXs)),u("color",Su(x.brand)),Ce("pointer"),u("text-decoration","none"),rn(0)]);function a_e(e){return L("div",{children:[_("span",{children:"[locked]",className:n_e}),_("span",{children:e.label,className:i_e}),_("span",{children:"Upgrade",className:o_e})],className:r_e})}let s_e=a_e;function l_e(e,t){return e.length===0?"Absent":e.every(r=>{let n=r.requiredAccess;return n!==void 0?!t(n):!1})?"Locked":"Active"}function qn(e){return"var("+e+")"}let u_e=E([z("flex"),_e("column"),u("gap","2px"),u("padding","var("+O.sm+")"),lr("& a",[u("text-decoration","none"),u("color","inherit"),u("display","block"),u("outline-offset","2px")])]),c_e=E([u("color",qn(x.textDisabled)),u("font-size",qn(T.sizeXs)),u("font-weight",qn(T.weightBold)),u("letter-spacing","0.08em"),u("text-transform","uppercase"),u("padding","var("+O.xs+") var("+O.sm+")"),Uo(ke(12)),Ip(ke(2))]),C3=E([$t("relative"),z("flex"),X("center"),u("gap",qn(O.sm)),u("padding","6px var("+O.sm+") 6px 14px"),u("color",qn(x.textSecondary)),u("font-size",qn(T.sizeMd)),u("line-height","1.4"),Ce("pointer"),u("border-radius",qn(Y.md)),u("text-decoration","none"),u("transition","background-color 140ms ease, color 140ms ease, transform 140ms ease"),lr("&::before",[u("content","''"),$t("absolute"),u("left","4px"),u("top","50%"),u("width","3px"),u("height","0"),u("border-radius",qn(Y.full)),u("background",qn(x.brand)),u("transform","translateY(-50%)"),u("transition","height 160ms ease")]),Ue([u("background",qn(x.surfaceSubtle)),u("color",qn(x.textPrimary)),u("transform","translateX(2px)")]),Va("(prefers-reduced-motion: reduce)",[u("transition","none"),Ue([u("transform","none")]),lr("&::before",[u("transition","none")])])]),d_e=E([u("background",qn(x.brandSubtle)),u("color",qn(x.textPrimary)),u("font-weight",qn(T.weightMedium)),lr("&::before",[u("height","56%")]),Ue([u("background",qn(x.brandSubtle)),u("color",qn(x.textPrimary)),u("transform","none")])]),f_e=E([u("font-size","14px"),u("line-height","1"),rn(0)]),h_e=E([u("white-space","nowrap"),u("overflow","hidden"),u("text-overflow","ellipsis")]),p_e=E([u("font-size","12px"),u("color",qn(x.textDisabled)),Fp("auto"),rn(0)]);function m_e(e,t){let r=e.url;return r!==void 0?r===t?!0:t.startsWith(r+"/"):!1}function g_e(e){let t=e.onNavigate,r=e.hasAccess,n=e.isActive,i=e.page,o=ne(i.requiredAccess,!1,c=>!r(c)),a=n?C3+" "+d_e:C3,s=L(Bt,{children:[ne(i.menuEntry.icon,null,c=>_("span",{children:c,"aria-hidden":!0,className:f_e})),_("span",{children:i.menuEntry.label,className:h_e}),o?_("span",{children:"[locked]",className:p_e}):null]}),l=i.url;return!o&&l!==void 0?_(Kbe,{route:l,children:_("span",{children:s,"aria-current":n?"page":void 0,className:a,onClick:c=>t()})}):_("div",{children:s,className:a,role:"button"})}function R3(e){let t=e.onNavigate,r=e.hasAccess,n=e.currentUrl,i=e.pages.toSorted((o,a)=>yw(o.menuEntry.sortOrder,a.menuEntry.sortOrder));return L(Bt,{children:[ne(e.label,null,o=>_("div",{children:o,className:c_e})),i.map(o=>_(g_e,{page:o,isActive:m_e(o,n),hasAccess:r,onNavigate:t},o.fragmentId))]})}function v_e(e){let t=e.onNavigate,r=e.currentUrl,n=t!==void 0?t:()=>{},i=kz(),o=Gs(),a=i.filter(Cz),s={};a.forEach(d=>{let f=D(d.menuEntry.group,""),h=D(s[f],[]);s[f]=h.concat([d])});let l=D(s[""],[]),c=Object.entries(s).filter(d=>d[0]!=="").toSorted((d,f)=>{let h=nt(d[1],999,(m,g)=>m<g.menuEntry.sortOrder?m:g.menuEntry.sortOrder),p=nt(f[1],999,(m,g)=>m<g.menuEntry.sortOrder?m:g.menuEntry.sortOrder);return yw(h,p)});return L("nav",{children:[l.length!==0?_(R3,{label:void 0,pages:l,currentUrl:r,hasAccess:o,onNavigate:n}):null,c.map(d=>{let f=d[1],h=d[0];switch(l_e(f,o)){case"Active":return _(R3,{label:h,pages:f,currentUrl:r,hasAccess:o,onNavigate:n},h);case"Locked":return _(s_e,{label:h},h);case"Absent":return null}})],"aria-label":"primary navigation",className:u_e})}let b_e=v_e,Az=Zt(void 0),Tz=Zt(void 0),__e=Az.Provider,y_e=Tz.Provider;function x_e(e){return ur(__e,{value:e.target,children:ur(y_e,{value:e.controlsTarget,children:e.children})})}let S_e={make:x_e};function $z(){return St(Az)}function w_e(){return St(Tz)}function dv(e,t){return e!==void 0?iO(t,Rt(e)):t}function mn(e){return"var("+e+")"}let Nz="52px",E_e=E([z("flex"),_e("row"),OO({NAME:"vh",VAL:100}),u("overflow","hidden"),u("background",mn(x.background)),u("font-family",mn(T.fontFamily)),u("color",mn(x.textPrimary))]),Dz=E([z("flex"),_e("column"),u("width","236px"),rn(0),u("background",mn(x.surface)),u("border-right","1px solid var("+x.borderSubtle+")"),u("overflow","hidden"),Va(Jn.compact,[$t("fixed"),Bo(ke(0)),zs(ke(0)),Dp(ke(0)),u("width","min(268px, 82vw)"),u("z-index","950"),u("box-shadow",mn(Zr.lg)),u("transform","translateX(-100%)"),u("visibility","hidden"),u("transition","transform 180ms ease, visibility 0s linear 180ms")]),Va("(prefers-reduced-motion: reduce)",[u("transition","none")])]),k_e=yr([Dz,E([Va(Jn.compact,[u("transform","translateX(0)"),u("visibility","visible"),u("transition","transform 180ms ease, visibility 0s linear 0s")])])]),C_e=E([$t("fixed"),Bo(ke(0)),zs(ke(0)),Bs(ke(0)),Dp(ke(0)),u("background","rgba(0,0,0,0.45)"),u("z-index","900"),u("display","none"),Va(Jn.compact,[u("display","block")])]),R_e=E([u("display","none"),Va(Jn.compact,[u("display","inline-flex")]),X("center"),Ze("center"),u("vertical-align","middle"),u("margin-right",mn(O.sm)),u("background","none"),u("border","1px solid var("+x.border+")"),u("border-radius",mn(Y.md)),u("padding","2px var("+O.sm+")"),u("color",mn(x.textSecondary)),u("font-size",mn(T.sizeMd)),u("line-height","1.6"),Ce("pointer"),Ue([u("background",mn(x.surfaceSubtle)),u("color",mn(x.textPrimary))])]),A_e=E([z("flex"),X("center"),u("gap",mn(O.sm)),u("height",Nz),rn(0),u("padding","0 var("+O.md+")"),u("color",mn(x.textPrimary)),u("font-size",mn(T.sizeLg)),u("font-weight",mn(T.weightBold)),u("letter-spacing","-0.01em")]),T_e=E([u("white-space","nowrap"),u("overflow","hidden"),u("text-overflow","ellipsis")]),$_e=E([ai(1),u("overflow-y","auto"),u("min-height","0")]),N_e=E([z("flex"),_e("column"),ai(1),u("min-width","0"),u("overflow","hidden")]),D_e=E([z("flex"),X("center"),u("min-height",Nz),rn(0),u("padding","var("+O.xs+") var("+O.lg+")"),u("border-bottom","1px solid var("+x.borderSubtle+")"),u("background",mn(x.surface))]),F_e=E([u("display","flow-root"),ai(1),u("min-width","0")]),Fz=E([u("display","contents")]),I_e=E([u("float","right"),z("flex"),X("center"),Ze("flexEnd"),u("flex-wrap","wrap"),u("gap",mn(O.sm)),u("margin-left",mn(O.md)),u("max-width","100%"),lr("& > *, & > ."+Fz+" > *",[u("min-width","0"),u("max-width","100%")])]),P_e=E([u("display","block"),u("min-width","0")]),O_e=E([z("flex"),_e("column"),ai(1),u("overflow","auto"),u("padding","var("+O.md+") var("+O.lg+")"),u("background",mn(x.background))]),Iz="a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex='-1'])";function M_e(e){let t=Array.from(e.querySelectorAll(Iz))[0];if(t!==void 0){Rt(t).focus();return}}function L_e(e,t){let r=n=>{switch(n.key){case"Escape":return t();case"Tab":let o=Array.from(e.querySelectorAll(Iz)),a=o.length;if(a===0){n.preventDefault();return}let s=o[0],l=o[a-1|0],c=document.activeElement,d=c==null?void 0:Dt(c),f=ne(d,!1,m=>e.contains(m)),h=m=>c!=null&&m!==void 0?c===Rt(m):!1,p=f?n.shiftKey&&h(s)?l:!n.shiftKey&&h(l)?s:void 0:s;if(p!==void 0){n.preventDefault(),Rt(p).focus();return}else return;default:return}};return document.addEventListener("keydown",r),()=>{document.removeEventListener("keydown",r)}}function z_e(e){let t=e.loading,r=e.routesReady,n=e.fallback,i=e.appName,o=i!==void 0?i:"Reventless",a=n!==void 0?n:"404 — Page not found",s=r!==void 0?r:!0,l=t!==void 0?t:null,c=aO(),d=ce(()=>{}),f=d[1],h=ce(()=>{}),p=h[1],m=(N,I)=>{let M=I==null?void 0:Dt(I);return N(P=>P!==void 0&&I!=null&&Rt(P)===I?P:M)},g=N=>m(f,N),v=N=>m(p,N),b=ce(()=>!1),y=b[1],S=b[0],w=bd(Jn.compact),C=$r(()=>y(N=>!1),[]),A=De(null),$=De(null),R=De(!1);return Ae(()=>{if(S&&!w){y(N=>!1);return}if(S){R.current=!0;let N=$.current;return N!=null?(M_e(N),L_e(N,C)):void 0}if(R.current&&(R.current=!1,w)){let N=A.current;N?.focus()}},[S,w]),L("div",{children:[L("aside",{children:[L("div",{children:[ne(e.logoUrl,null,N=>_("img",{style:{height:"22px"},alt:o,src:N})),_("span",{children:o,className:T_e,title:o})],className:A_e}),_("div",{children:_(b_e,{currentUrl:c,onNavigate:C}),className:$_e})],ref:Dt($),className:S?k_e:Dz,id:"rv-shell-nav"}),S?_("div",{"aria-hidden":!0,className:C_e,onClick:N=>C()}):null,L("main",{children:[_("div",{children:L("div",{children:[L("div",{children:[_("div",{ref:Dt(v),className:Fz}),D(e.headerSlot,null)],className:I_e}),_("div",{children:_("button",{children:"☰",ref:Dt(A),"aria-label":S?"Close navigation":"Open navigation","aria-expanded":S,"aria-controls":"rv-shell-nav",className:R_e,onClick:N=>y(I=>!I)}),ref:Dt(g),className:P_e})],className:F_e}),className:D_e}),_("div",{children:_(S_e.make,{target:d[0],controlsTarget:h[0],children:s?_(qbe,{url:c,routes:e.router,children:a}):l}),className:O_e})],className:N_e})],className:E_e})}let U_e=z_e,om=Zt(void 0),B_e=om.Provider;function j_e(e){let t=e.access,r=e.initialPanels,n=r!==void 0?r:[],i=t!==void 0?t:[],o=ce(()=>n),a=o[1],s=ce(()=>[]),l=s[1],c=o[0].concat(s[0]);return ur(B_e,{value:{register:b=>a(y=>y.concat(b)),deregister:b=>a(y=>y.filter(S=>S.extensionPackage!==b)),setPluginPanels:b=>l(y=>b),getPanel:b=>c.find(y=>y.fragmentId===b),getPanelsForPosition:b=>c.filter(y=>y.positions.some(S=>S===b)),hasAccess:b=>i.some(y=>y===b)},children:e.children})}let q_e={make:j_e};function V_e(e){let t=St(om);return t!==void 0?t.getPanelsForPosition(e):[]}function G_e(e){let t=St(om);if(t!==void 0)return t.getPanel(e)}function Ck(e){return"/"+e.environment+"/"+e.platformName}function Pz(e){let t=e.split("?")[0],r=t.split("/").filter(l=>l!==""),n=r[0],i=r[1];if(n===void 0||i===void 0)return;let o={environment:n,platformName:i},a=Ck(o),s=t.startsWith(a)?t.slice(a.length):"/";return[o,s===""?"/":s]}let K_e=Zt(void 0),H_e=K_e.Provider;function W_e(e){return ur(H_e,{value:e.scope,children:e.children})}let Oz={make:W_e};function J_e(e){let t=e.length-1|0,r=0;for(;;){let n=r,i=t;if(i<0)return n;r={hd:e[i],tl:n},t=i-1|0}}let Mz=Zt(void 0),Lz=Zt({routes:[],publicLinks:Pu()}),zz=Zt(!1),Q_e=Mz.Provider;function Y_e(e){return ur(Q_e,{value:e.value,children:e.children})}let X_e=Lz.Provider;function Z_e(e){return ur(X_e,{value:e.value,children:e.children})}let eye=zz.Provider;function tye(e){return ur(eye,{value:e.value,children:e.children})}function rye(e){let t=ce(()=>({routes:[],publicLinks:Pu()})),r=t[1],n=t[0],i=ce(()=>({routes:[],publicLinks:Pu()})),o=i[1],a=i[0],s=ce(()=>!1),l=s[1],c=n.routes.concat(a.routes),d=dx(n.publicLinks,a.publicLinks),f={routes:c,publicLinks:d};return _(Y_e,{value:{register:(g,v)=>r(b=>({routes:b.routes.concat(g),publicLinks:dx(b.publicLinks,v)})),setPluginRoutes:(g,v)=>{o(b=>({routes:g,publicLinks:v})),l(b=>!0)}},children:_(tye,{value:s[0],children:_(Z_e,{value:f,children:_(XV.make,{registry:d,children:e.children})})})})}let nye={make:rye};function Rk(){return St(Mz)}function iye(){return St(zz)}function oye(){let e=St(Lz).routes;return Pt(()=>VV(J_e(e.toReversed())),[e])}let aye=(function(e,t){return e.contains(t)});function Yr(e){return"var("+e+")"}let sye=E([u("position","relative"),z("inlineFlex")]),lye=E([z("inlineFlex"),X("center"),u("gap","3px"),u("background",Yr(x.surface)),u("color",Yr(x.textPrimary)),u("border","1px solid var("+x.border+")"),u("border-radius",Yr(Y.md)),u("padding","2px var("+O.xs+")"),u("font-family",Yr(T.fontFamily)),u("font-size",Yr(T.sizeMd)),u("line-height","1.4"),Ce("pointer"),Ue([u("background",Yr(x.surfaceSubtle))])]),uye=E([u("font-size","0.625rem"),u("color",Yr(x.textSecondary))]),cye=E([u("position","absolute"),u("top","calc(100% + 0.5rem)"),u("right","0"),u("min-width","170px"),u("padding",Yr(O.xs)),u("background",Yr(x.surfaceElevated)),u("border","1px solid var("+x.borderSubtle+")"),u("border-radius",Yr(Y.md)),u("box-shadow",Yr(Zr.md)),u("z-index","10")]),Uz=E([z("flex"),X("center"),u("gap",Yr(O.sm)),u("width","100%"),u("padding","var("+O.xs+") var("+O.sm+")"),u("background","transparent"),u("border","none"),u("border-radius",Yr(Y.sm)),u("color",Yr(x.textPrimary)),u("font-family",Yr(T.fontFamily)),u("font-size",Yr(T.sizeSm)),u("text-align","left"),Ce("pointer"),Ue([u("background",Yr(x.surfaceSubtle))])]),dye=yr([Uz,E([u("font-weight",Yr(T.weightMedium))])]),fye=E([u("font-size",Yr(T.sizeMd)),u("line-height","1"),u("width","1.25em"),u("text-align","center"),rn(0)]),hye=E([u("margin-left","auto"),u("color",Yr(x.textSecondary)),u("font-size",Yr(T.sizeXs))]);function zy(e){switch(e){case"Dark":return"Dark";case"Light":return"Light";case"Neutral":return"Neutral";case"HighContrast":return"High contrast"}}function A3(e){switch(e){case"Dark":return"☾";case"Light":return"☀";case"Neutral":return"◯";case"HighContrast":return"◐"}}let pye=["Light","Dark","Neutral","HighContrast"];function mye(e){let t=fce(),r=t.setPreset,n=t.preset,i=ce(()=>!1),o=i[1],a=i[0],s=De(null);return Ae(()=>{if(!a)return;let l=d=>{let f=d.target,h=s.current;if(h!=null&&!aye(h,f))return o(p=>!1)},c=d=>{if(d.key==="Escape")return o(f=>!1)};return document.addEventListener("mousedown",l),document.addEventListener("keydown",c),()=>{document.removeEventListener("mousedown",l),document.removeEventListener("keydown",c)}},[a]),L("div",{children:[L("button",{children:[_("span",{children:A3(n),"aria-hidden":!0}),_("span",{children:a?"▴":"▾","aria-hidden":!0,className:uye})],"aria-label":"Theme: "+zy(n),"aria-expanded":a,"aria-haspopup":"menu",className:lye,title:"Theme: "+zy(n),onClick:l=>o(c=>!c)}),a?_("div",{children:pye.map(l=>{let c=l===n;return L("button",{children:[_("span",{children:A3(l),"aria-hidden":!0,className:fye}),zy(l),c?_("span",{children:"✓",className:hye}):null],"aria-checked":c?"true":"false",className:c?dye:Uz,role:"radio",onClick:d=>{r(l),o(f=>!1)}},v5(l))}),"aria-label":"Theme",className:cye,role:"radiogroup"}):null],ref:Dt(s),className:sye})}let gye=mye;function T3(e){return Object.fromEntries([["eq",e]])}function vye(e,t){let r=me.object(e),n=r!==void 0?Object.fromEntries(Object.entries(r)):{},i=k(n.filter,me.object),o=i!==void 0?Object.fromEntries(Object.entries(i)):{};return o.environment=T3(t.environment),o.platformName=T3(t.platformName),n.filter=o,n}let bye=/\$filter\s*:\s*[A-Za-z0-9_]*Filter\b/,_ye=/\$filter\s*:/,$3={};function yye(e){if($3[e]===void 0){$3[e]=!0,console.warn("PlatformFilter: this query declares a `$filter` variable that is not a fleet-scope `<Type>Filter` input object, so it is left untouched. `$filter` is reserved for platform-scope injection in fleet mode — rename the variable (e.g. `$logFilter`) to avoid ambiguity. Query: "+e);return}}function xye(e){return t=>((r,n)=>bye.test(r)?t(r,vye(n,e)):(_ye.test(r)&&yye(r),t(r,n)))}let Sye={background:"var("+x.surface+")",border:"1px solid var("+x.borderSubtle+")",color:"var("+x.textPrimary+")",fontFamily:"var("+T.fontFamily+")",margin:"6rem auto",maxWidth:"480px",padding:"2rem",borderRadius:"var("+Y.md+")"},wye={background:"var("+x.surfaceElevated+")",border:"1px solid var("+x.border+")",color:"var("+x.textPrimary+")",cursor:"pointer",display:"flex",fontSize:"var("+T.sizeMd+")",marginBottom:"0.5rem",padding:"0.75rem 1rem",textAlign:"left",width:"100%",borderRadius:"var("+Y.sm+")",alignItems:"center",justifyContent:"space-between"},Eye={background:"var("+x.brandSubtle+")",color:"var("+x.brand+")",fontSize:"var("+T.sizeXs+")",padding:"0.125rem 0.5rem",borderRadius:"var("+Y.full+")"};function kye(e){let t=e.discover,r=si(),n=ce(()=>"Loading"),i=n[1],o=n[0];Ae(()=>{r!==void 0?(i(s=>"Loading"),Lt(t(r).then(s=>i(l=>({TAG:"Loaded",_0:s}))),s=>{let l=D(k(nV(s),c=>c.message),"Platform discovery failed");return i(c=>({TAG:"Failed",_0:l})),Promise.resolve()})):i(s=>({TAG:"Failed",_0:"PlatformPicker rendered outside AutoGraphQL.Provider"}))},[Ee(r)]);let a;if(typeof o!="object")a=_("div",{children:"Discovering platforms…",style:{color:"var("+x.textSecondary+")"}});else if(o.TAG==="Loaded"){let s=o._0;a=s.length!==0?s.map(l=>L("button",{children:[l.platformName,_("span",{children:l.environment,style:Eye})],style:wye,onClick:c=>ua(Ck(l)+"/")},l.environment+"/"+l.platformName)):_("div",{children:"No platforms discovered.",style:{color:"var("+x.textSecondary+")"}})}else a=_("div",{children:o._0,style:{color:"var("+x.error+")",fontSize:"var("+T.sizeSm+")"}});return L("div",{children:[_("h1",{children:"Select a platform",style:{fontSize:"var("+T.sizeXl+")",fontWeight:"var("+T.weightBold+")",margin:"0 0 1.5rem"}}),a],style:Sye})}let Cye=kye;function Uy(e){return k(e,t=>{if(t.trim()!=="")return t})}function Vf(e,t,r,n,i){let o=i!==void 0?i:!1,a=k(n,c=>c.nav),s=o?Uy(k(a,c=>c.scopedLabel)):void 0,l=s!==void 0?s:Uy(k(a,c=>c.label));return{label:D(l,t),icon:void 0,group:D(Uy(k(a,c=>c.group)),e),sortOrder:D(k(a,c=>c.order),r),hidden:k(a,c=>c.hidden)}}function Rye(e){let t=e.lastIndexOf("_");if(t!==-1)return e.slice(0,t)}function Aye(e,t){return e+"_"+t+"EventHistory"}function Tye(e){return`query AuditTrail($entityId: ID, $eventTypes: [String!], $user: String, $timeFrom: String, $timeTo: String, $first: Int, $after: String) {
|
|
71
|
+
`+e+`(
|
|
72
|
+
filter: {entityId: $entityId, eventTypes: $eventTypes, user: $user, timeFrom: $timeFrom, timeTo: $timeTo}
|
|
73
|
+
first: $first
|
|
74
|
+
after: $after
|
|
75
|
+
) {
|
|
76
|
+
edges {
|
|
77
|
+
node {
|
|
78
|
+
position
|
|
79
|
+
eventType
|
|
80
|
+
payload
|
|
81
|
+
tags { key value }
|
|
82
|
+
meta { user time correlationId causationId }
|
|
83
|
+
recordedAt
|
|
84
|
+
}
|
|
85
|
+
cursor
|
|
86
|
+
}
|
|
87
|
+
pageInfo { hasNextPage endCursor }
|
|
88
|
+
}
|
|
89
|
+
}`}function $ye(e){return ne(k(G(e),t=>F(t,"x-reventless-audit")),!1,t=>{let r=Xe(t);return typeof r!="object"?r==="JSONTrue":r.TAG==="JSONString"})}let N3={contents:[]};function D3(e){if(!N3.contents.includes(e)){N3.contents.push(e),console.error('[AutoUI] View "'+e+'" opted into an audit trail but no event log could be resolved for it — the view declares no linked write side, so there is no `…EventHistory` field to query. Remove the audit hint, or check that the read model projects an aggregate or slice.');return}}function Nye(e,t){if(!t)return;let r=e.linkedWriteSide[0],n=Rye(e.queryField);if(r!==void 0){if(n!==void 0){let i=Aye(n,r);return{queryField:i,queryDocument:Tye(i),displayName:r}}D3(e.name);return}D3(e.name)}function sl(e,t){return k(F(e,t),oe)}function Dye(e){let t=D(G(e),{}),r=D(k(F(t,"meta"),G),{}),n=Q(D(k(F(t,"tags"),Ct),[]),s=>{let l=D(G(s),{}),c=sl(l,"key"),d=sl(l,"value");if(c!==void 0&&d!==void 0)return[c,d]}),i=sl(t,"position"),o=sl(t,"eventType");if(i===void 0||o===void 0)return;let a=D(sl(r,"time"),D(sl(t,"recordedAt"),""));return{position:i,eventType:o,payload:D(F(t,"payload"),{}),tags:n,actor:sl(r,"user"),time:a,recordedAt:D(sl(t,"recordedAt"),a)}}function Fye(e,t){return Q(e2(e,t),Dye)}function Iye(e,t){let r=t5(e,t);return[r.hasNextPage,r.endCursor]}function Pye(e,t){let r=e.startsWith(t)&&e.length>t.length?e.slice(t.length):e;return pt(r).toLowerCase()}function Oye(e){return D(q(G(e),$e),[]).filter(t=>t[0]!=="TAG")}function Mye(e){let t={};return e.map(r=>{let n=JSON.stringify(Oe($e(t)),null,2);Oye(r.payload).forEach(o=>{t[o[0]]=o[1]});let i=JSON.stringify(Oe($e(t)),null,2);return[n,i]})}let Lye="System";function zye(e,t){let r=Mye(e);return e.map((n,i)=>{let o=D(r[i],["",""]),a=ne(n.tags[0],t,s=>t+" "+s[1]);return{id:n.position,verb:Pye(n.eventType,t),subject:a,actor:D(n.actor,Lye),timestamp:n.time,before:o[0],after:o[1]}}).toReversed()}function Uye(e){let t=[];return e.forEach(r=>ee(r.actor,n=>{if(!t.includes(n)){t.push(n);return}})),t.toSorted(wd)}function Bye(e){let t=[];return e.forEach(r=>{if(!t.includes(r.eventType)){t.push(r.eventType);return}}),t.toSorted(wd)}function Xi(e){return"var("+e+")"}let jye=E([z("flex"),_e("column"),X("center"),Ze("center"),u("gap",Xi(O.lg)),u("padding",Xi(O.xxl)),ma({NAME:"percent",VAL:100}),OO({NAME:"percent",VAL:100}),Ya("center"),u("min-height","400px")]),qye=E([u("font-size","48px"),u("line-height","1")]),Vye=E([u("color",Xi(x.textPrimary)),u("font-size",Xi(T.sizeXxl)),u("font-weight",Xi(T.weightBold)),_n(ke(0))]),Gye=E([u("color",Xi(x.textSecondary)),u("font-size",Xi(T.sizeLg)),u("line-height",Xi(T.lineHeightRelaxed)),u("max-width","480px"),_n(ke(0))]),Kye=E([u("background",Xi(x.brand)),u("color",Xi(x.textOnBrand)),u("border-radius",Xi(Y.md)),u("padding","var("+O.sm+") var("+O.lg+")"),u("font-size",Xi(T.sizeMd)),u("font-weight",Xi(T.weightMedium)),u("border","none"),u("cursor","pointer"),Uo(ke(8))]);function Hye(e){let t=e.definition;return L("div",{children:[_("div",{children:"[locked]",className:qye}),_("h2",{children:t.title,className:Vye}),_("p",{children:ne(t.requiredAccess,"This feature requires an upgrade.",r=>'This feature requires the "'+r+'" access tier.'),className:Gye}),_("button",{children:"Upgrade to unlock",className:Kye})],className:jye})}let Wye=Hye;function Jye(e){let t=e.children,r=e.definition,n=Gs(),i=r.requiredAccess;return i!==void 0&&!n(i)?_(Wye,{definition:r}):t}let ug=Jye,Qye=F;function F3(e,t){let r=k(t[0],n=>F(e,n));if(r!==void 0&&t.every(n=>Re(F(e,n),r)))return r}function fv(e,t,r){let n=F(e,t);return n!==void 0?r(n):!0}function Ak(e,t,r){return Q(t,n=>{let i=F(e,n);if(i!==void 0&&!r(i))return n+': requires "'+i+'"'})}let Tk=["body","text","message","comment","content"],Yye=["author","createdby","user","commenter","postedby"],Xye=["createdat","postedat","at","commentedat"];function Bz(e){return Q(Nr(e),t=>{if(Mp(t[1]))return t[0]})}function $k(e,t){return Bz(e).find(r=>t.includes(r.toLowerCase()))}function Zye(e){let t=bn(e,void 0,void 0),r=Nr(e).map(n=>n[0]).find(n=>ne(F(t.semantics,n),!1,i=>i.semantic==="UserRef"));return r!==void 0?r:$k(e,Yye)}function e1e(e){return Q(Nr(e),t=>{if(Qv(t[1]))return t[0]}).find(t=>Xye.includes(t.toLowerCase()))}function jz(e){return Bz(e).filter(t=>{let r=t.toLowerCase();return r!=="id"?r.endsWith("id"):!1})}function qz(e,t){let r=Eo(t).toLowerCase();return jz(e).find(n=>n.toLowerCase()===r+"id")}function t1e(e){let t=jz(e);if(t.length===1)return t[0]}function r1e(e){return ne(k(G(e),t=>F(t,"x-reventless-comments")),!1,t=>{let r=Xe(t);return typeof r!="object"?r==="JSONTrue":r.TAG==="JSONString"})}function I3(e,t){let r=e.toLowerCase(),n=t.toLowerCase(),i=Eo(t).toLowerCase();return r.endsWith("comments")?r===i+"comments"?!0:r===n+"comments":!1}let n1e=["addcomment","postcomment","comment","writecomment","leavecomment"];function i1e(e,t){let r=Q(e.linkedWriteSide,n=>t.aggregates.find(i=>i.name===n)).map(n=>n.commands).flat();return e.commands.concat(r).find(n=>n1e.some(i=>n.name.toLowerCase().startsWith(i)))}let P3={contents:[]};function o1e(e){if(!P3.contents.includes(e)){P3.contents.push(e),console.error('[AutoUI] Read model "'+e+'" announces itself as comments but has no body field — no comment thread is wired. The convention expects a string field named '+Tk.join(" | ")+' (plus an entity ref like "orderId"); see docs/guides/comments-read-model-convention.md.');return}}function a1e(e,t){return Q(e.readModels.filter(r=>r.name!==t?r1e(r.schema)?!0:I3(r.name,t):!1),r=>{let n=qz(r.schema,t),i=n!==void 0?n:I3(r.name,t)?t1e(r.schema):void 0,o=$k(r.schema,Tk);if(o!==void 0)return i!==void 0?{readModel:r,entityField:i,bodyField:o,authorField:Zye(r.schema),timestampField:e1e(r.schema),postCommand:i1e(r,e)}:void 0;o1e(r.name)})[0]}function Oc(e,t){return k(F(e,t),oe)}function s1e(e,t,r){let n=Q(t,o=>{let a=D(G(o),{});if(Re(Oc(a,e.entityField),r))return a}),i=o=>k(k(e.timestampField,a=>Oc(o,a)),Qn);return n.toSorted((o,a)=>{let s=i(o),l=i(a);return s!==void 0?l!==void 0?s-l:-1:l!==void 0?1:0}).map((o,a)=>({id:D(Oc(o,"id"),"#"+a.toString()),body:D(Oc(o,e.bodyField),""),author:k(e.authorField,s=>Oc(o,s)),timestamp:k(e.timestampField,s=>Oc(o,s))}))}function l1e(e,t,r){let n=e.postCommand,i=D(k(n,a=>a.aggregateIdField),e.entityField),o=D(k(n,a=>$k(a.schema,Tk)),e.bodyField);return Oe([[i,t],[o,r]])}function am(e){let t=e.isId||e.isCompositeId||e.isSubId||e.isCompositeSubId||Ee(e.index)||e.scan,r=e.isId||e.isSubId||e.isCompositeSubId||Ee(e.index)||e.scanSort;return{filter:t,sort:r}}function O3(e){return am(e.ann)}function Vz(e){let t=Ee(JO(e)),r=Wv(e).length!==0,n=QO(e).length!==0;return{search:t||r||n}}function DS(e){let r=D(q(k(k(G(e),a=>F(a,"properties")),G),$e),[]).map(a=>am(Io(a[1]))),n=r.some(a=>a.filter),i=r.some(a=>a.sort),o=Vz(e);return{hasFilter:n,hasSort:i,hasSearch:o.search}}function M3(e,t){let r={},n={};return $e(e).forEach(i=>{let o=i[1];if(o==="")return;let a=i[0],s=t.find(l=>l.key===a);if(s!==void 0){am(s.ann).filter?r[a]=o:n[a]=o;return}n[a]=o}),[r,n]}function L3(e,t,r){if(e===void 0)return"NoSort";let n=r.find(i=>i.key===e);return n!==void 0?am(n.ann).sort?{TAG:"ServerSort",_0:e,_1:t}:{TAG:"ClientSort",_0:e,_1:t}:"NoSort"}function Gz(e,t,r,n){let i={};if(r.search&&t!==""&&(i.search=t),$e(e).forEach(o=>{let a=o[1],s=o[0],l=n.find(f=>f.key===s),c=q(l,f=>f.kind),d;if(c!==void 0&&typeof c!="object")switch(c){case"KBoolean":d=a==="true";break;case"KNumber":d=D(q(Ds(a),f=>f),a);break;default:d=a}else d=a;i[s+"Eq"]=d}),$e(i).length!==0)return i}function u1e(e){if(typeof e!="object"||e.TAG!=="ServerSort")return;let t=e._1==="Asc"?"ASC":"DESC";return Oe([["field",e._0],["direction",t]])}function c1e(e,t){return ne(Nr(e).find(r=>r[0]===t),!1,r=>am(Io(r[1])).filter)}let z3={contents:[]};function d1e(e,t,r){let n=e+"."+t;if(!z3.contents.includes(n)){z3.contents.push(n),console.error('[AutoUI] View "'+e+'" references "'+r+'" through "'+t+'", but the server cannot filter on that field — so "'+r+'" gets no "'+e+'" panel on its detail page. Annotate '+t+" with @index (or @scan, for a small view) on the read model's state so the connection gains a "+t+"Eq filter; see docs/guides/related-rows.md.");return}}function f1e(e,t){return Q(e.readModels.filter(r=>r.name!==t),r=>{let n=qz(r.schema,t);if(n!==void 0){if(c1e(r.schema,n))return{readModel:r,refField:n};d1e(r.name,n,t);return}})}function h1e(e,t,r){return t!==void 0?Q(t,n=>{let i=e.find(o=>o.readModel.name===n);if(i!==void 0)return i;console.error("[AutoUI] uiHints.views."+r+'.related names "'+n+'", which does not reference '+r+" through a filterable field — no panel for it. Detected: "+e.map(o=>o.readModel.name).join(", ")+".")}):e}function p1e(e,t){return e+"."+t.readModel.name}function m1e(e,t){let r=G(e);if(r===void 0)return e;let n=Oe($e(r)),i=k(F(n,"properties"),G);if(i===void 0)return e;let o=Oe($e(i).filter(s=>s[0]!==t));n.properties=o;let a=k(F(n,"required"),Ct);return a!==void 0&&(n.required=a.filter(s=>ca(oe(s),t))),n}function g1e(e,t){let r={};return ee(Gz(Oe([[e.refField,t]]),"",{search:!1},[]),n=>{r.filter=n}),r}function Fa(e){return"var("+e+")"}function Kz(e){switch(e){case"Success":return x.success;case"Warning":return x.warning;case"Error":return x.error;case"Info":return x.info}}function v1e(e){return E([z("flex"),X("flexStart"),u("gap",Fa(O.sm)),u("padding","var("+O.sm+") var("+O.md+")"),u("border-radius",Fa(Y.md)),u("border-left","3px solid var("+Kz(e)+")"),u("background",Fa(x.surfaceElevated)),u("font-size",Fa(T.sizeMd)),u("line-height",Fa(T.lineHeightNormal))])}function b1e(e){return E([u("color",Fa(Kz(e))),u("font-size","16px"),rn(0),Uo(ke(1))])}let _1e=E([ai(1)]),y1e=E([u("font-weight",Fa(T.weightMedium)),u("color",Fa(x.textPrimary)),Ip(ke(2))]),x1e=E([u("color",Fa(x.textSecondary))]),S1e=E([u("background","none"),lJ(ke(0),"none",hJ),Ce("pointer"),u("color",Fa(x.textSecondary)),u("font-size","16px"),u("line-height","1"),u("padding","0"),rn(0)]);function w1e(e){switch(e){case"Success":return"OK";case"Warning":return"!";case"Error":return"X";case"Info":return"i"}}function E1e(e){let t=e.variant,r=t!==void 0?t:"Info";return L("div",{children:[_("span",{children:w1e(r),className:b1e(r)}),L("div",{children:[ne(e.title,null,n=>_("div",{children:n,className:y1e})),_("div",{children:e.message,className:x1e})],className:_1e}),ne(e.onDismiss,null,n=>_("button",{children:"×","aria-label":"Dismiss",className:S1e,onClick:i=>n()}))],className:v1e(r),role:"alert"})}let Nk=E1e;function qa(e){return"var("+e+")"}let k1e=E([$t("fixed"),Bo(ke(0)),zs(ke(0)),Bs(ke(0)),Dp(ke(0)),u("background","rgba(0,0,0,0.5)"),z("flex"),X("center"),Ze("center"),u("z-index","1000"),u("backdrop-filter","blur(2px)")]),C1e=E([u("background",qa(x.surface)),u("border","1px solid var("+x.border+")"),u("border-radius",qa(Y.lg)),u("box-shadow",qa(Zr.lg)),z("flex"),_e("column"),u("max-height","90vh"),u("max-width","90vw"),u("min-width","400px"),u("overflow","hidden")]),R1e=E([z("flex"),X("center"),Ze("spaceBetween"),u("padding","var("+O.md+") var("+O.lg+")"),u("border-bottom","1px solid var("+x.borderSubtle+")"),rn(0)]),A1e=E([u("color",qa(x.textPrimary)),u("font-size",qa(T.sizeLg)),u("font-weight",qa(T.weightMedium)),_n(ke(0))]),T1e=E([u("background","none"),u("border","none"),u("cursor","pointer"),u("color",qa(x.textSecondary)),u("font-size","18px"),u("padding","0"),u("line-height","1"),Ue([u("color",qa(x.textPrimary))])]),$1e=E([u("padding",qa(O.lg)),u("overflow-y","auto"),ai(1)]),N1e=E([z("flex"),X("center"),Ze("flexEnd"),u("gap",qa(O.sm)),u("padding","var("+O.md+") var("+O.lg+")"),u("border-top","1px solid var("+x.borderSubtle+")"),rn(0)]);function D1e(e){let t=e.onClose,r=e.isOpen;return Ae(()=>{if(!r)return;let n=i=>{if(i.key==="Escape")return t()};return document.addEventListener("keydown",n),()=>{document.removeEventListener("keydown",n)}},[r]),r?_("div",{children:L("div",{children:[L("div",{children:[_("h2",{children:e.title,className:A1e}),_("button",{children:"x",className:T1e,onClick:n=>t()})],className:R1e}),_("div",{children:e.children,className:$1e}),ne(e.footer,null,n=>_("div",{children:n,className:N1e}))],className:C1e,style:ne(e.width,{},n=>({width:n})),onClick:n=>{n.stopPropagation()}}),className:k1e,onClick:n=>t()}):null}let Dk=D1e;function F1e(e){switch(e){case"Added":return"Added";case"BulkInvalidated":return"BulkInvalidated";case"Removed":return"Removed";case"Updated":return"Updated";default:return}}function I1e(e){let t=me.object(e);if(t===void 0)return;let r=s=>k(t[s],me.string),n=t.state,i=n!==void 0&&Ee(me.object(n))?n:void 0,o=k(r("changeKind"),F1e),a=r("id");if(o!==void 0&&a!==void 0)return{changeKind:o,id:a,sortKeyValue:r("sortKeyValue"),state:i,seq:r("seq")}}function U3(e){return e.replace(/[^A-Za-z0-9-]/g,"-")}let B3="default";function P1e(e,t){let r=U3(e);return typeof t!="object"?"/"+B3+"/"+r+"/*":"/"+B3+"/"+r+"/"+U3(t._0)}function FS(e,t,r,n,i){let o=r!==void 0?r:!0,a=nm(),s=P1e(e,t),l=De(n);Ae(()=>{l.current=n},[n]);let c=De(i);Ae(()=>{c.current=i},[i]),Ae(()=>{if(!o||a===void 0)return;let d=a.apiForReadModel(e),f={contents:void 0},h={contents:void 0},p=setTimeout(()=>{let m=a.subscribe(d,s,v=>{let b=I1e(v);if(b!==void 0)return l.current(b)});f.contents=m;let g=a.registerReconnect(d,()=>ee(c.current,v=>v()));h.contents=g},100);return()=>{clearTimeout(p);let m=f.contents;m!==void 0&&m();let g=h.contents;if(g!==void 0)return g()}},[s,o,a])}function oo(e){return"var("+e+")"}let O1e=E([z("flex"),_e("column"),u("gap",oo(O.sm))]),M1e=E([u("overflow-x","auto")]),L1e=E([u("border-collapse","collapse"),u("font-size",oo(T.sizeSm)),u("min-width","min-content")]),Fk=[u("border","1px solid var("+x.borderSubtle+")"),u("padding","4px var("+O.sm+")"),u("background",oo(x.surfaceSubtle)),u("white-space","nowrap"),u("font-weight",oo(T.weightMedium))],z1e=E(Fk.concat([u("text-align","left"),u("color",oo(x.textSecondary))])),U1e=E(Fk.concat([u("text-align","right"),u("color",oo(x.textSecondary)),u("text-transform","uppercase"),u("letter-spacing","0.04em"),u("font-size",oo(T.sizeXs))])),B1e=E(Fk.concat([u("text-align","left"),u("color",oo(x.textPrimary))]));function j1e(e){return E([u("border","1px solid var("+x.borderSubtle+")"),u("padding","4px var("+O.sm+")"),u("text-align","right"),u("white-space","nowrap"),u("background",e<=0?"transparent":"color-mix(in srgb, var("+x.brand+") "+Math.round(e*100).toString()+"%, transparent)"),u("color",e>=.55?oo(x.textOnBrand):e<=0?oo(x.textDisabled):oo(x.textPrimary))])}let q1e=E([z("flex"),X("center"),u("gap","6px"),u("font-size",oo(T.sizeXs)),u("color",oo(x.textSecondary))]);function V1e(e){return E([u("width","18px"),u("height","10px"),u("background","color-mix(in srgb, var("+x.brand+") "+Math.round(e*100).toString()+"%, transparent)"),u("border","1px solid var("+x.borderSubtle+")")])}function Hz(e,t){if(e<=0||t<=0)return 0;let r=e/t;return r<.12?.12:r>1?1:r}function G1e(e){return nt(e,0,(t,r)=>nt(r,t,(n,i)=>i.value>n?i.value:n))}let Wz=[.12,.35,.6,.85,1];function K1e(e){let t=e.cells,r=e.colHeaders,n=G1e(t);return L("div",{children:[_("div",{children:L("table",{children:[_("thead",{children:L("tr",{children:[_("th",{children:e.rowDimLabel+" ╲ "+e.colDimLabel,className:z1e,scope:"col"}),r.map(i=>_("th",{children:i.label,className:U1e,scope:"col"},i.value))]})}),_("tbody",{children:e.rowHeaders.map((i,o)=>L("tr",{children:[_("th",{children:i.label,className:B1e,scope:"row"}),r.map((a,s)=>{let l=D(k(t[o],c=>c[s]),{value:0,display:""});return _("td",{children:_("span",{children:l.display,title:i.label+" × "+a.label+": "+l.display}),className:j1e(Hz(l.value,n))},i.value+":"+a.value)})]},i.value))})],className:L1e}),className:M1e}),L("div",{children:["0",Wz.map(i=>_("span",{className:V1e(i)},i.toString())),e.maxLabel],className:q1e})],className:O1e})}let H1e=K1e;function W1e(e,t){let r=a=>{throw{RE_EXN_ID:"Undefined_recursive_module",_1:e,Error:new Error}},n=(a,s,l)=>{if(typeof a!="object")switch(a){case"Function":case"Lazy":s[l]=r;return;case"Class":s[l]=[r,r,r,0];return}else{if(a.TAG!=="Module"){s[l]=a._0;return}let c=a._0,d={};s[l]=d;let f=c.length;for(let h=0;h<f;++h){let p=c[h];n(p[0],d,p[1])}return}},i={},o="dummy";return n(t,i,o),i[o]}function J1e(e,t,r){let n=(i,o,a,s,l)=>{if(typeof i!="object")switch(i){case"Function":s[l]=a;return;case"Lazy":case"Class":Object.assign(o,a);return}else{if(i.TAG!=="Module")return;let c=i._0;for(let d=0,f=c.length;d<f;++d){let h=c[d],p=h[1];n(h[0],o[p],a[p],o,p)}return}};if(typeof e!="object")throw{RE_EXN_ID:"Assert_failure",_1:["Primitive_module.res",68,9],Error:new Error};{let i=e._0;for(let o=0,a=i.length;o<a;++o){let s=i[o],l=s[1];n(s[0],t[l],r[l],t,l)}return}}function IS(e){let t=e.parent;if(t!==void 0&&t!=="")return t}function Q1e(e,t,r){let n=k(F(e,t),IS);if(n!==void 0){if(n===t)return!0;{let i=n,o=0;for(;;){let a=o,s=i;if(a>r)return!0;let l=k(F(e,s),IS);if(l===void 0)return!1;if(l===t)return!0;o=a+1|0,i=l}}}else return!1}function Y1e(e){let t={};e.forEach(l=>{t[l.key]=l});let r=e.length,n={},i=[],o={contents:0},a={contents:0};e.forEach(l=>{let c=IS(l);if(c!==void 0){if(F(t,c)!==void 0){if(Q1e(t,l.key,r)){a.contents=a.contents+1|0,i.push(l.key);return}let f=D(F(n,c),[]);n[c]=f.concat([l.key]);return}o.contents=o.contents+1|0,i.push(l.key);return}i.push(l.key)});let s=(l,c)=>{let d=F(t,l);if(d===void 0)return;let f=c>=r?[]:Q(D(F(n,l),[]),h=>s(h,c+1|0));return{node:d,children:f}};return{roots:Q(i,l=>s(l,0)),detached:o.contents,cycles:a.contents}}function Jz(e){return nt(e.children,e.children.length,(t,r)=>t+Jz(r)|0)}let X1e="14px";function Dn(e){return"var("+e+")"}let Z1e=E([z("flex"),_e("column"),u("gap",Dn(O.sm))]),exe=E([u("overflow-x","auto"),u("padding-bottom","4px")]),txe=E([z("flex"),X("flexStart"),Ze("center"),u("gap",Dn(O.lg)),u("min-width","min-content"),u("padding","var("+O.xs+") 0")]),rxe=E([z("flex"),_e("column"),X("center"),u("min-width","min-content")]);function nxe(e){return E([z("flex"),_e("column"),u("gap","2px"),u("min-width","132px"),u("max-width","180px"),u("padding","var("+O.xs+") var("+O.sm+")"),u("border","1px solid var("+x.borderSubtle+")"),u("border-top","3px solid "+e),u("border-radius",Dn(Y.md)),u("background",Dn(x.surface)),u("text-align","left"),Ce("pointer"),Ue([u("background",Dn(x.surfaceSubtle))])])}let ixe=E([u("font-size",Dn(T.sizeSm)),u("font-weight",Dn(T.weightMedium)),u("color",Dn(x.textPrimary)),u("overflow","hidden"),u("text-overflow","ellipsis"),u("white-space","nowrap")]),oxe=E([u("font-size",Dn(T.sizeXs)),u("color",Dn(x.textSecondary)),u("overflow","hidden"),u("text-overflow","ellipsis"),u("white-space","nowrap")]),axe=E([u("margin-top","2px"),u("padding","0 6px"),u("border","1px solid var("+x.border+")"),u("border-radius","10px"),u("background",Dn(x.surface)),u("color",Dn(x.textSecondary)),u("font-size",Dn(T.sizeXs)),u("line-height","16px"),Ce("pointer"),Ue([u("color",Dn(x.textPrimary))])]),j3=E([u("width","1px"),u("height",X1e),u("background",Dn(x.border))]),sxe=E([z("flex"),X("flexStart"),u("min-width","min-content")]),lxe=E([z("flex"),_e("column"),X("center"),u("min-width","min-content")]),uxe=E([u("padding","0 var("+O.xs+")")]),cxe=E([z("flex"),u("width","100%"),u("height","1px")]);function q3(e){return E([u("flex","1 1 50%"),u("background",e?Dn(x.border):"transparent")])}let dxe=E([u("font-size",Dn(T.sizeXs)),u("color",Dn(x.textDisabled))]),fxe="var("+x.brand+")",Ik=W1e(["OrgChart.res",255,4],{TAG:"Module",_0:[["Function","make"]]});function hxe(e){let t=e.depth,r=e.tree,n=ce(()=>!1),i=n[1],o=n[0],a=Jz(r),s=r.children.length,l=r.node.subtitle;return L("div",{children:[L("button",{children:[_("span",{children:r.node.title,className:ixe}),l!==void 0&&l!==""?_("span",{children:l,className:oxe}):null],className:nxe(D(r.node.accent,fxe)),title:r.node.title,onClick:c=>ee(r.node.onOpen,d=>d())}),s===0?null:L(Bt,{children:[_("button",{children:o?"+"+a.toString():"−","aria-expanded":!o,className:axe,title:o?"Expand":"Collapse",onClick:c=>i(d=>!d)}),o?null:L(Bt,{children:[_("div",{className:j3}),_("div",{children:r.children.map((c,d)=>L("div",{children:[L("div",{children:[_("div",{className:q3(d>0)}),_("div",{className:q3(d<(s-1|0))})],className:cxe}),_("div",{className:j3}),_("div",{children:_(Ik.make,{tree:c,depth:t+1|0}),className:uxe})],className:lxe},c.node.key)),className:sxe})]})]})],className:rxe})}J1e({_0:[["Function","make"]]},Ik,{make:hxe});function pxe(e){let t=Y1e(e.nodes);if(t.roots.length===0)return _(Kd,{title:"Nothing to chart",description:"No rows in this window."});let r=Q([e.windowNote,t.detached>0?t.detached.toString()+" item(s) whose parent is outside this window":void 0,t.cycles>0?t.cycles.toString()+" item(s) in a parent loop, shown as roots":void 0],n=>n);return L("div",{children:[_("div",{children:_("div",{children:t.roots.map(n=>_(Ik.make,{tree:n,depth:0},n.node.key)),className:txe}),className:exe}),r.length===0?null:_("span",{children:r.join(" · "),className:dxe})],className:Z1e})}let mxe=pxe;function ao(e){return"var("+e+")"}let gxe=E([$t("relative"),u("padding-left","28px"),z("flex"),_e("column"),u("gap",ao(O.md))]),vxe=E([$t("absolute"),zs(ke(7)),Bo(ke(8)),Dp(ke(0)),u("width","2px"),u("background",ao(x.borderSubtle))]),bxe=E([$t("absolute"),zs(ke(-21)),Bo(ke(6)),u("width","10px"),u("height","10px"),u("border-radius","50%"),u("background",ao(x.brand)),u("border","2px solid var("+x.surface+")"),rn(0)]),Qz=E([$t("relative"),z("flex"),_e("column"),u("gap","2px")]),_xe=yr([Qz,E([u("background","none"),u("border","none"),u("padding","0"),Ya("left"),Ce("pointer"),Ue([u("opacity","0.85")])])]),yxe=E([z("flex"),X("center"),u("gap",ao(O.sm))]),xxe=E([u("color",ao(x.textDisabled)),u("font-size",ao(T.sizeXs)),u("font-family",ao(T.fontFamilyMono))]),Sxe=E([u("color",ao(x.textPrimary)),u("font-size",ao(T.sizeMd)),u("font-weight",ao(T.weightMedium))]),wxe=E([u("color",ao(x.textSecondary)),u("font-size",ao(T.sizeSm)),u("line-height",ao(T.lineHeightNormal)),Fp(ke(0))]);function Exe(e){let t=e.onSelect,r=n=>L(Bt,{children:[_("div",{className:bxe,style:q(n.accent,i=>({background:i}))}),L("div",{children:[_("span",{children:n.timestamp,className:xxe}),ne(n.variant,null,i=>_(ia,{variant:i,label:n.label})),ne(n.variant,_("span",{children:n.label,className:Sxe}),i=>null)],className:yxe}),ne(n.detail,null,i=>_("div",{children:i,className:wxe}))]});return L("div",{children:[_("div",{className:vxe}),e.entries.map(n=>t!==void 0?_("button",{children:r(n),className:_xe,type:"button",onClick:i=>t(n.id)},n.id):_("div",{children:r(n),className:Qz},n.id))],className:gxe})}let kxe=Exe,Cxe="The server did not confirm this command. It may not have been applied.";function Yz(e){let t=k(k(G(e),n=>Tp(n)[0]),G),r=k(k(t,n=>F(n,"__typename")),oe);if(r===void 0)return{TAG:"NotExecuted",_0:Cxe};switch(r){case"CommandAccepted":return"Accepted";case"CommandPending":return"Pending";case"CommandRejected":let n=k(k(t,o=>F(o,"errorCode")),oe),i=k(k(t,o=>F(o,"errorDetail")),oe);return{TAG:"Rejected",_0:{errorCode:n,detail:i}};default:return{TAG:"NotExecuted",_0:"The server answered with an unexpected result type ("+r+")."}}}function Rxe(e){let t=Yz(e.data);if(typeof t!="object"||t.TAG!=="NotExecuted")return t;let r=t._0,n=e.errors[0];return n!==void 0&&n.message!==""?{TAG:"NotExecuted",_0:n.message}:{TAG:"NotExecuted",_0:r}}function Sa(e,t){let r=F(e,t);if(r===void 0)return;let n=oe(r);return n!==void 0?n:k(k(G(r),i=>F(i,"TAG")),oe)}function Xz(e,t,r){if(r===void 0)return e;let n=Sa(t,r);return e.filter(i=>{let o=i.allowedStates;return o!==void 0?n!==void 0?o.includes(n):!1:!0})}function Axe(e){let t=e[0];if(t===void 0)return;let r=nt(e,t.start,(i,o)=>o.start<i?o.start:i),n=nt(e,t.end_,(i,o)=>o.end_>i?o.end_:i);return[gi(r),Ro(gi(n),1)]}function Txe(e,t){let r=(t-e)/DM;return r<=21?"Days":r<=120?"Weeks":"Months"}function V3(e){let t=new Date(e).getMonth()|0;return D($M[t],"").slice(0,3)}function $xe(e,t){switch(t){case"Days":return Is(e);case"Weeks":return NM(e).toString()+" "+V3(e);case"Months":let r=new Date(e).getFullYear().toString();return V3(e)+" '"+r.slice(2)}}function Nxe(e,t,r){let n=l=>{switch(r){case"Days":return Ro(gi(e),l);case"Weeks":return Ro(Yv(e),l*7|0);case"Months":return EM(kM(e),l)}},i=[],o=0;for(;n(o)<t&&o<2e3;){let l=n(o);l>=e&&i.push(l),o=o+1|0}let a=i.length,s=a<=40?1:(a/40|0)+1|0;return xw(i,(l,c)=>{if(Fo(c,s)===0)return[l,$xe(l,r)]})}function hv(e,t,r){return r<=t?0:(e-t)/(r-t)*100}function kh(e){return e<0?0:e>100?100:e}function PS(e,t,r){let n=kh(hv(e.start,t,r)),o=kh(hv(e.end_>e.start?e.end_:e.start,t,r))-n,a=o<.6?.6:o;return[n+a>100?100-a:n,a]}function Zz(e){return e.map(t=>Q(t.dependsOn,r=>q(e.find(n=>n.key===r?n.key!==t.key:!1),n=>({from:n.key,to_:t.key,violated:t.start<n.end_})))).flat()}function Dxe(e){return nt(e,0,(t,r)=>t+r.dependsOn.filter(n=>!e.some(i=>i.key===n)).length|0)}function e9(e){return Zz(e).filter(t=>t.violated)}function Fxe(e,t){return e9(e).some(r=>r.to_===t)}let Pk="184px";function dr(e){return"var("+e+")"}let Ixe=E([z("flex"),_e("column"),u("gap",dr(O.sm))]),Pxe=E([z("flex"),X("center"),Ze("spaceBetween"),yi("wrap"),u("gap",dr(O.sm))]),Oxe=E([z("inlineFlex"),X("center"),u("gap",dr(O.xs))]),t9=E([u("background","none"),u("border","1px solid var("+x.border+")"),u("border-radius",dr(Y.sm)),u("padding","2px var("+O.sm+")"),u("color",dr(x.textSecondary)),u("font-size",dr(T.sizeSm)),Ce("pointer"),Ue([u("background",dr(x.surfaceSubtle)),u("color",dr(x.textPrimary))])]),Mxe=yr([t9,E([u("background",dr(x.surfaceSubtle)),u("color",dr(x.textPrimary)),u("font-weight",dr(T.weightMedium))])]),Lxe=E([u("font-size",dr(T.sizeMd)),u("font-weight",dr(T.weightMedium)),u("color",dr(x.textPrimary))]),zxe=E([u("border","1px solid var("+x.borderSubtle+")"),u("border-radius",dr(Y.md)),u("overflow","hidden")]),r9=E([z("flex"),X("stretch")]),Uxe=yr([r9,E([u("background",dr(x.surfaceSubtle)),u("border-bottom","1px solid var("+x.borderSubtle+")")])]),Bxe=E([u("flex","0 0 "+Pk),u("padding","4px var("+O.sm+")"),u("font-size",dr(T.sizeXs)),u("color",dr(x.textSecondary)),u("text-transform","uppercase"),u("letter-spacing","0.04em")]),jxe=E([$t("relative"),u("flex","1 1 auto"),u("height","22px"),u("overflow","hidden")]),qxe=E([$t("absolute"),u("top","4px"),u("padding-left","3px"),u("border-left","1px solid var("+x.borderSubtle+")"),u("font-size",dr(T.sizeXs)),u("color",dr(x.textSecondary)),u("white-space","nowrap"),u("pointer-events","none")]),Vxe=E([$t("relative")]),Gxe=yr([r9,E([u("height","30px"),u("border-top","1px solid var("+x.borderSubtle+")")])]),Kxe=E([u("flex","0 0 "+Pk),z("flex"),X("center"),u("gap","4px"),u("padding","0 var("+O.sm+")"),u("font-size",dr(T.sizeSm)),u("color",dr(x.textPrimary)),u("border-right","1px solid var("+x.borderSubtle+")"),u("overflow","hidden")]),Hxe=E([u("overflow","hidden"),u("text-overflow","ellipsis"),u("white-space","nowrap")]),Wxe=E([u("color",dr(x.warning)),u("font-size",dr(T.sizeXs)),u("flex","0 0 auto")]),Jxe=E([$t("relative"),u("flex","1 1 auto")]),Qxe=E([$t("absolute"),u("top","0"),u("bottom","0"),u("width","1px"),u("background",dr(x.borderSubtle)),u("opacity","0.6"),u("pointer-events","none")]);function Yxe(e){return E([$t("absolute"),u("top","5px"),u("height","19px"),u("border","none"),u("border-radius",dr(Y.sm)),u("background",e),u("padding","0"),Ce("pointer"),Ue([u("filter","brightness(1.12)")])])}let Xxe=E([u("outline","2px solid var("+x.warning+")"),u("outline-offset","1px")]),Zxe=E([$t("absolute"),u("top","0"),u("left",Pk),u("right","0"),u("bottom","0"),u("pointer-events","none")]),eSe=E([u("display","block"),u("width","100%"),u("height","100%")]),tSe=E([u("font-size",dr(T.sizeXs)),u("color",dr(x.textDisabled))]),rSe="var("+x.brand+")";function kl(e){return(Math.round(e*100)/100).toString()}function nSe(e,t){let r=Ro(t,-1);return xo(e)===xo(r)?xo(e):xo(e)+" – "+xo(r)}function iSe(e){let t=e.to_,r=e.from,n=e.tasks,i=e.edge,o=w=>n.findIndex(C=>C.key===w),a=o(i.from),s=o(i.to_),l=n[a],c=n[s];if(l===void 0||c===void 0)return null;let d=PS(l,r,t),h=PS(c,r,t)[0],p=d[0]+d[1],m=a*30+30/2,g=s*30+30/2,v=i.violated?e.arrowBadId:e.arrowId,b;if(h>p){let w=kh((p+h)/2);b=[[p,m],[w,m],[w,g],[h,g]]}else{let w=kh(p+1.4),C=kh(h-1.4),A=(m+g)/2;b=[[p,m],[w,m],[w,A],[C,A],[C,g],[h,g]]}let y=i.violated?"var("+x.warning+")":"var("+x.border+")",S=b.length-2|0;return _("g",{children:b.map((w,C)=>{let A=b[C+1|0];return A!==void 0?_("line",{markerEnd:C===S?"url(#"+v+")":void 0,stroke:y,strokeWidth:"1.5",x1:kl(w[0])+"%",x2:kl(A[0])+"%",y1:kl(w[1]),y2:kl(A[1])},C.toString()):null})})}function oSe(e){let t=e.initialGranularity,r=e.windowNote,n=e.tasks,i=Qq(),o=ce(()=>t),a=o[1],s="rv-gantt-arrow-"+i,l="rv-gantt-arrow-bad-"+i,c=Axe(n);if(c===void 0)return _(Kd,{title:"Nothing scheduled",description:"No row in this window carries a start and end date."});let d=c[1],f=c[0],h=D(o[0],Txe(f,d)),p=Nxe(f,d,h),m=Zz(n),g=Dxe(n),v=e9(n).length,b=(w,C)=>_("button",{children:C,className:h===w?Mxe:t9,onClick:A=>a($=>w)}),y,S=0;if(r!==void 0||g!==0||v!==0?S=1:y=null,S===1){let w=Q([r,g>0?g.toString()+" dependency link(s) outside this window":void 0,v>0?v.toString()+" start(s) before a dependency ends":void 0],C=>C);y=_("span",{children:w.join(" · "),className:tSe})}return L("div",{children:[L("div",{children:[_("span",{children:nSe(f,d),className:Lxe}),L("div",{children:[b("Days","Days"),b("Weeks","Weeks"),b("Months","Months")],className:Oxe})],className:Pxe}),L("div",{children:[L("div",{children:[_("div",{children:"Task",className:Bxe}),_("div",{children:p.map(w=>{let C=w[0];return _("span",{children:w[1],className:qxe,style:{left:kl(hv(C,f,d))+"%"}},C.toString())}),className:jxe})],className:Uxe}),L("div",{children:[n.map(w=>{let C=PS(w,f,d),A=Fxe(n,w.key),$=Yxe(D(w.accent,rSe)),R=A?$+" "+Xxe:$;return L("div",{children:[L("div",{children:[A?_("span",{children:"▲",className:Wxe,title:"Starts before a dependency ends"}):null,_("span",{children:w.title,className:Hxe,title:w.title})],className:Kxe}),L("div",{children:[p.map(N=>{let I=N[0];return _("div",{className:Qxe,style:{left:kl(hv(I,f,d))+"%"}},I.toString())}),_("button",{className:R,style:{left:kl(C[0])+"%",width:kl(C[1])+"%"},title:w.title+" · "+Is(w.start)+" → "+Is(w.end_),onClick:N=>w.onOpen()})],className:Jxe})],className:Gxe},w.key)}),_("div",{children:L("svg",{children:[L("defs",{children:[_("marker",{children:_("path",{d:"M0,0 L6,3 L0,6 z",fill:"var("+x.border+")"}),id:s,markerHeight:"6",markerWidth:"6",orient:"auto",refX:"5",refY:"3"}),_("marker",{children:_("path",{d:"M0,0 L6,3 L0,6 z",fill:"var("+x.warning+")"}),id:l,markerHeight:"6",markerWidth:"6",orient:"auto",refX:"5",refY:"3"})]}),m.map(w=>_(iSe,{edge:w,tasks:n,from:f,to_:d,arrowId:s,arrowBadId:l},w.from+"->"+w.to_))],className:eSe}),className:Zxe})],className:Vxe})],className:zxe}),y],className:Ixe})}let aSe=oSe;function oi(e){return"var("+e+")"}let sSe=E([u("overflow-x","auto")]),lSe=E([u("border-collapse","collapse"),u("font-size",oi(T.sizeSm)),u("color",oi(x.textPrimary)),u("min-width","min-content")]),Ok=[u("border","1px solid var("+x.borderSubtle+")"),u("padding","4px var("+O.sm+")"),u("text-align","right"),u("white-space","nowrap")],uSe=E(Ok),cSe=E(Ok.concat([u("color",oi(x.textDisabled))])),dSe=E([u("border","1px solid var("+x.borderSubtle+")"),u("padding","4px var("+O.sm+")"),u("text-align","left"),u("color",oi(x.textSecondary)),u("font-weight",oi(T.weightMedium)),u("white-space","nowrap")]),fSe=E([u("border","1px solid var("+x.borderSubtle+")"),u("padding","4px var("+O.sm+")"),u("text-align","right"),u("background",oi(x.surfaceSubtle)),u("color",oi(x.textSecondary)),u("font-weight",oi(T.weightMedium)),u("text-transform","uppercase"),u("letter-spacing","0.04em"),u("font-size",oi(T.sizeXs)),u("white-space","nowrap")]),hSe=E([u("border","1px solid var("+x.borderSubtle+")"),u("padding","4px var("+O.sm+")"),u("text-align","left"),u("background",oi(x.surfaceSubtle)),u("color",oi(x.textPrimary)),u("font-weight",oi(T.weightMedium)),u("white-space","nowrap")]),By=E(Ok.concat([u("font-weight",oi(T.weightMedium))])),G3=E([u("border","1px solid var("+x.borderSubtle+")"),u("padding","4px var("+O.sm+")"),u("background",oi(x.surfaceSubtle)),u("color",oi(x.textSecondary)),u("font-weight",oi(T.weightMedium)),u("white-space","nowrap")]),K3="Total";function pSe(e){let t=e.colTotals,r=e.rowTotals,n=e.cells,i=e.colHeaders;return _("div",{children:L("table",{children:[_("thead",{children:L("tr",{children:[_("th",{children:e.rowDimLabel+" ╲ "+e.colDimLabel,className:dSe,scope:"col"}),i.map(o=>_("th",{children:o.label,className:fSe,scope:"col"},o.value)),_("th",{children:K3,className:G3,scope:"col"})]})}),_("tbody",{children:e.rowHeaders.map((o,a)=>{let s=D(n[a],[]);return L("tr",{children:[_("th",{children:o.label,className:hSe,scope:"row"}),i.map((l,c)=>{let d=D(s[c],{display:"",empty:!0});return _("td",{children:d.empty?"—":d.display,className:d.empty?cSe:uSe},l.value)}),_("td",{children:D(r[a],""),className:By})]},o.value)})}),_("tfoot",{children:L("tr",{children:[_("th",{children:K3,className:G3,scope:"row"}),i.map((o,a)=>_("td",{children:D(t[a],""),className:By},o.value)),_("td",{children:e.grandTotal,className:By})]})})],className:lSe}),className:sSe})}let mSe=pSe;function gSe(e){let t=e.label,r=e.size;return _(fS,{kind:"Media",size:r!==void 0?r:"Detail",label:t!==void 0?t:"No image"})}let OS=gSe;function Oi(e){return"var("+e+")"}let vSe=E([z("grid"),u("grid-template-columns","repeat(auto-fill, minmax(180px, 1fr))"),u("gap",Oi(O.md))]),bSe=E([z("flex"),_e("column"),X("stretch"),u("gap",Oi(O.xs)),u("padding","0"),u("background","none"),u("border","none"),u("text-align","left"),Ce("pointer"),Ue([u("opacity","0.88")])]),_Se=E([u("width","100%"),u("aspect-ratio","4 / 3"),u("object-fit","cover"),u("background",Oi(x.surfaceSubtle)),u("border","1px solid var("+x.border+")"),u("border-radius",Oi(Y.md))]),ySe=E([z("flex"),X("center"),Ze("spaceBetween"),u("gap",Oi(O.sm))]),xSe=E([u("color",Oi(x.textPrimary)),u("font-size",Oi(T.sizeSm)),u("font-weight",Oi(T.weightMedium)),u("overflow","hidden"),u("text-overflow","ellipsis"),u("white-space","nowrap")]),SSe=E([u("color",Oi(x.textSecondary)),u("font-size",Oi(T.sizeXs)),u("overflow","hidden"),u("text-overflow","ellipsis"),u("white-space","nowrap")]),wSe=E([u("background","rgba(255,255,255,0.12)"),u("border","1px solid rgba(255,255,255,0.25)"),u("border-radius",Oi(Y.md)),u("color","#f5f5f5"),u("padding","4px var("+O.sm+")"),u("font-size",Oi(T.sizeSm)),Ce("pointer"),Ue([u("background","rgba(255,255,255,0.22)")])]),ESe=E([u("color",Oi(x.textDisabled)),u("font-size",Oi(T.sizeSm))]);function kSe(e){return Q(e,t=>q(t.src,r=>({key:t.key,src:r,title:t.title,caption:t.caption})))}function CSe(e){let t=e.onOpen,r=e.items,n=ce(()=>{}),i=n[1],o=n[0],a=kSe(r);if(r.length===0)return _("span",{children:"(empty)",className:ESe});let s;if(o!==void 0){let l=k(t,c=>q(a[o],d=>_("button",{children:"Open record →",className:wSe,type:"button",onClick:f=>{i(h=>{}),c(d.key)}})));s=_(wM,{slides:a,index:o,onIndexChange:c=>i(d=>c),onClose:()=>i(c=>{}),action:l})}else s=null;return L(Bt,{children:[_("div",{children:r.map(l=>{let c=l.src,d=l.onUpload,f=l.caption;return L("button",{children:[c!==void 0?_("img",{className:_Se,alt:l.title,src:c}):d!==void 0?_(OS,{size:"Tile",label:"Add image"}):_(OS,{size:"Tile"}),L("div",{children:[_("span",{children:l.title,className:xSe}),D(l.badge,null)],className:ySe}),f!==void 0?_("span",{children:f,className:SSe}):null],className:bSe,title:ir(l.src)&&Ee(l.onUpload)?"Add an image":l.title,type:"button",onClick:h=>{let p=l.src,m=l.onUpload;if(p===void 0)return m!==void 0?m():ee(t,v=>v(l.key));let g=a.findIndex(v=>v.key===l.key);return g!==-1?i(v=>g):ee(t,v=>v(l.key))}},l.key)}),className:vSe}),s]})}let RSe=CSe;const $b=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function mf(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Mk(e){return"nodeType"in e}function Gi(e){var t,r;return e?mf(e)?e:Mk(e)&&(t=(r=e.ownerDocument)==null?void 0:r.defaultView)!=null?t:window:window}function Lk(e){const{Document:t}=Gi(e);return e instanceof t}function sm(e){return mf(e)?!1:e instanceof Gi(e).HTMLElement}function n9(e){return e instanceof Gi(e).SVGElement}function gf(e){return e?mf(e)?e.document:Mk(e)?Lk(e)?e:sm(e)||n9(e)?e.ownerDocument:document:document:document}const jl=$b?nO:Ae;function zk(e){const t=De(e);return jl(()=>{t.current=e}),$r(function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return t.current==null?void 0:t.current(...n)},[])}function ASe(){const e=De(null),t=$r((n,i)=>{e.current=setInterval(n,i)},[]),r=$r(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,r]}function bp(e,t){t===void 0&&(t=[e]);const r=De(e);return jl(()=>{r.current!==e&&(r.current=e)},t),r}function lm(e,t){const r=De();return Pt(()=>{const n=e(r.current);return r.current=n,n},[...t])}function pv(e){const t=zk(e),r=De(null),n=$r(i=>{i!==r.current&&t?.(i,r.current),r.current=i},[]);return[r,n]}function MS(e){const t=De();return Ae(()=>{t.current=e},[e]),t.current}let jy={};function Nb(e,t){return Pt(()=>{if(t)return t;const r=jy[e]==null?0:jy[e]+1;return jy[e]=r,e+"-"+r},[e,t])}function i9(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return n.reduce((o,a)=>{const s=Object.entries(a);for(const[l,c]of s){const d=o[l];d!=null&&(o[l]=d+e*c)}return o},{...t})}}const _d=i9(1),mv=i9(-1);function TSe(e){return"clientX"in e&&"clientY"in e}function o9(e){if(!e)return!1;const{KeyboardEvent:t}=Gi(e.target);return t&&e instanceof t}function $Se(e){if(!e)return!1;const{TouchEvent:t}=Gi(e.target);return t&&e instanceof t}function LS(e){if($Se(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:r}=e.touches[0];return{x:t,y:r}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:r}=e.changedTouches[0];return{x:t,y:r}}}return TSe(e)?{x:e.clientX,y:e.clientY}:null}const H3="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function NSe(e){return e.matches(H3)?e:e.querySelector(H3)}const DSe={display:"none"};function FSe(e){let{id:t,value:r}=e;return _o.createElement("div",{id:t,style:DSe},r)}function ISe(e){let{id:t,announcement:r,ariaLiveType:n="assertive"}=e;const i={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return _o.createElement("div",{id:t,style:i,role:"status","aria-live":n,"aria-atomic":!0},r)}function PSe(){const[e,t]=ce("");return{announce:$r(n=>{n!=null&&t(n)},[]),announcement:e}}const a9=Zt(null);function OSe(e){const t=St(a9);Ae(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function MSe(){const[e]=ce(()=>new Set),t=$r(n=>(e.add(n),()=>e.delete(n)),[e]);return[$r(n=>{let{type:i,event:o}=n;e.forEach(a=>{var s;return(s=a[i])==null?void 0:s.call(a,o)})},[e]),t]}const LSe={draggable:`
|
|
90
|
+
To pick up a draggable item, press the space bar.
|
|
91
|
+
While dragging, use the arrow keys to move the item.
|
|
92
|
+
Press space again to drop the item in its new position, or press escape to cancel.
|
|
93
|
+
`},zSe={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was moved over droppable area "+r.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was dropped over droppable area "+r.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function USe(e){let{announcements:t=zSe,container:r,hiddenTextDescribedById:n,screenReaderInstructions:i=LSe}=e;const{announce:o,announcement:a}=PSe(),s=Nb("DndLiveRegion"),[l,c]=ce(!1);if(Ae(()=>{c(!0)},[]),OSe(Pt(()=>({onDragStart(f){let{active:h}=f;o(t.onDragStart({active:h}))},onDragMove(f){let{active:h,over:p}=f;t.onDragMove&&o(t.onDragMove({active:h,over:p}))},onDragOver(f){let{active:h,over:p}=f;o(t.onDragOver({active:h,over:p}))},onDragEnd(f){let{active:h,over:p}=f;o(t.onDragEnd({active:h,over:p}))},onDragCancel(f){let{active:h,over:p}=f;o(t.onDragCancel({active:h,over:p}))}}),[o,t])),!l)return null;const d=_o.createElement(_o.Fragment,null,_o.createElement(FSe,{id:n,value:i.draggable}),_o.createElement(ISe,{id:s,announcement:a}));return r?iO(d,r):d}var pn;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(pn||(pn={}));function gv(){}function W3(e,t){return Pt(()=>({sensor:e,options:t??{}}),[e,t])}function BSe(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Pt(()=>[...t].filter(n=>n!=null),[...t])}const pa=Object.freeze({x:0,y:0});function jSe(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return n-r}function qSe(e,t){if(!e||e.length===0)return null;const[r]=e;return r[t]}function VSe(e,t){const r=Math.max(t.top,e.top),n=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height),a=i-n,s=o-r;if(n<i&&r<o){const l=t.width*t.height,c=e.width*e.height,d=a*s,f=d/(l+c-d);return Number(f.toFixed(4))}return 0}const GSe=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const i=[];for(const o of n){const{id:a}=o,s=r.get(a);if(s){const l=VSe(s,t);l>0&&i.push({id:a,data:{droppableContainer:o,value:l}})}}return i.sort(jSe)};function KSe(e,t,r){return{...e,scaleX:t&&r?t.width/r.width:1,scaleY:t&&r?t.height/r.height:1}}function s9(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:pa}function HSe(e){return function(r){for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];return i.reduce((a,s)=>({...a,top:a.top+e*s.y,bottom:a.bottom+e*s.y,left:a.left+e*s.x,right:a.right+e*s.x}),{...r})}}const WSe=HSe(1);function JSe(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function QSe(e,t,r){const n=JSe(t);if(!n)return e;const{scaleX:i,scaleY:o,x:a,y:s}=n,l=e.left-a-(1-i)*parseFloat(r),c=e.top-s-(1-o)*parseFloat(r.slice(r.indexOf(" ")+1)),d=i?e.width/i:e.width,f=o?e.height/o:e.height;return{width:d,height:f,top:c,right:l+d,bottom:c+f,left:l}}const YSe={ignoreTransform:!1};function um(e,t){t===void 0&&(t=YSe);let r=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:c,transformOrigin:d}=Gi(e).getComputedStyle(e);c&&(r=QSe(r,c,d))}const{top:n,left:i,width:o,height:a,bottom:s,right:l}=r;return{top:n,left:i,width:o,height:a,bottom:s,right:l}}function J3(e){return um(e,{ignoreTransform:!0})}function XSe(e){const t=e.innerWidth,r=e.innerHeight;return{top:0,left:0,right:t,bottom:r,width:t,height:r}}function ZSe(e,t){return t===void 0&&(t=Gi(e).getComputedStyle(e)),t.position==="fixed"}function ewe(e,t){t===void 0&&(t=Gi(e).getComputedStyle(e));const r=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(i=>{const o=t[i];return typeof o=="string"?r.test(o):!1})}function Uk(e,t){const r=[];function n(i){if(t!=null&&r.length>=t||!i)return r;if(Lk(i)&&i.scrollingElement!=null&&!r.includes(i.scrollingElement))return r.push(i.scrollingElement),r;if(!sm(i)||n9(i)||r.includes(i))return r;const o=Gi(e).getComputedStyle(i);return i!==e&&ewe(i,o)&&r.push(i),ZSe(i,o)?r:n(i.parentNode)}return e?n(e):r}function l9(e){const[t]=Uk(e,1);return t??null}function qy(e){return!$b||!e?null:mf(e)?e:Mk(e)?Lk(e)||e===gf(e).scrollingElement?window:sm(e)?e:null:null}function u9(e){return mf(e)?e.scrollX:e.scrollLeft}function c9(e){return mf(e)?e.scrollY:e.scrollTop}function zS(e){return{x:u9(e),y:c9(e)}}var kn;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(kn||(kn={}));function d9(e){return!$b||!e?!1:e===document.scrollingElement}function f9(e){const t={x:0,y:0},r=d9(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},n={x:e.scrollWidth-r.width,y:e.scrollHeight-r.height},i=e.scrollTop<=t.y,o=e.scrollLeft<=t.x,a=e.scrollTop>=n.y,s=e.scrollLeft>=n.x;return{isTop:i,isLeft:o,isBottom:a,isRight:s,maxScroll:n,minScroll:t}}const twe={x:.2,y:.2};function rwe(e,t,r,n,i){let{top:o,left:a,right:s,bottom:l}=r;n===void 0&&(n=10),i===void 0&&(i=twe);const{isTop:c,isBottom:d,isLeft:f,isRight:h}=f9(e),p={x:0,y:0},m={x:0,y:0},g={height:t.height*i.y,width:t.width*i.x};return!c&&o<=t.top+g.height?(p.y=kn.Backward,m.y=n*Math.abs((t.top+g.height-o)/g.height)):!d&&l>=t.bottom-g.height&&(p.y=kn.Forward,m.y=n*Math.abs((t.bottom-g.height-l)/g.height)),!h&&s>=t.right-g.width?(p.x=kn.Forward,m.x=n*Math.abs((t.right-g.width-s)/g.width)):!f&&a<=t.left+g.width&&(p.x=kn.Backward,m.x=n*Math.abs((t.left+g.width-a)/g.width)),{direction:p,speed:m}}function nwe(e){if(e===document.scrollingElement){const{innerWidth:o,innerHeight:a}=window;return{top:0,left:0,right:o,bottom:a,width:o,height:a}}const{top:t,left:r,right:n,bottom:i}=e.getBoundingClientRect();return{top:t,left:r,right:n,bottom:i,width:e.clientWidth,height:e.clientHeight}}function h9(e){return e.reduce((t,r)=>_d(t,zS(r)),pa)}function iwe(e){return e.reduce((t,r)=>t+u9(r),0)}function owe(e){return e.reduce((t,r)=>t+c9(r),0)}function awe(e,t){if(t===void 0&&(t=um),!e)return;const{top:r,left:n,bottom:i,right:o}=t(e);l9(e)&&(i<=0||o<=0||r>=window.innerHeight||n>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const swe=[["x",["left","right"],iwe],["y",["top","bottom"],owe]];class Bk{constructor(t,r){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=Uk(r),i=h9(n);this.rect={...t},this.width=t.width,this.height=t.height;for(const[o,a,s]of swe)for(const l of a)Object.defineProperty(this,l,{get:()=>{const c=s(n),d=i[o]-c;return this.rect[l]+d},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Ch{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(r=>{var n;return(n=this.target)==null?void 0:n.removeEventListener(...r)})},this.target=t}add(t,r,n){var i;(i=this.target)==null||i.addEventListener(t,r,n),this.listeners.push([t,r,n])}}function lwe(e){const{EventTarget:t}=Gi(e);return e instanceof t?e:gf(e)}function Vy(e,t){const r=Math.abs(e.x),n=Math.abs(e.y);return typeof t=="number"?Math.sqrt(r**2+n**2)>t:"x"in t&&"y"in t?r>t.x&&n>t.y:"x"in t?r>t.x:"y"in t?n>t.y:!1}var vo;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(vo||(vo={}));function Q3(e){e.preventDefault()}function uwe(e){e.stopPropagation()}var hr;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(hr||(hr={}));const p9={start:[hr.Space,hr.Enter],cancel:[hr.Esc],end:[hr.Space,hr.Enter,hr.Tab]},cwe=(e,t)=>{let{currentCoordinates:r}=t;switch(e.code){case hr.Right:return{...r,x:r.x+25};case hr.Left:return{...r,x:r.x-25};case hr.Down:return{...r,y:r.y+25};case hr.Up:return{...r,y:r.y-25}}};class jk{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:r}}=t;this.props=t,this.listeners=new Ch(gf(r)),this.windowListeners=new Ch(Gi(r)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(vo.Resize,this.handleCancel),this.windowListeners.add(vo.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(vo.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:r}=this.props,n=t.node.current;n&&awe(n),r(pa)}handleKeyDown(t){if(o9(t)){const{active:r,context:n,options:i}=this.props,{keyboardCodes:o=p9,coordinateGetter:a=cwe,scrollBehavior:s="smooth"}=i,{code:l}=t;if(o.end.includes(l)){this.handleEnd(t);return}if(o.cancel.includes(l)){this.handleCancel(t);return}const{collisionRect:c}=n.current,d=c?{x:c.left,y:c.top}:pa;this.referenceCoordinates||(this.referenceCoordinates=d);const f=a(t,{active:r,context:n.current,currentCoordinates:d});if(f){const h=mv(f,d),p={x:0,y:0},{scrollableAncestors:m}=n.current;for(const g of m){const v=t.code,{isTop:b,isRight:y,isLeft:S,isBottom:w,maxScroll:C,minScroll:A}=f9(g),$=nwe(g),R={x:Math.min(v===hr.Right?$.right-$.width/2:$.right,Math.max(v===hr.Right?$.left:$.left+$.width/2,f.x)),y:Math.min(v===hr.Down?$.bottom-$.height/2:$.bottom,Math.max(v===hr.Down?$.top:$.top+$.height/2,f.y))},N=v===hr.Right&&!y||v===hr.Left&&!S,I=v===hr.Down&&!w||v===hr.Up&&!b;if(N&&R.x!==f.x){const M=g.scrollLeft+h.x,P=v===hr.Right&&M<=C.x||v===hr.Left&&M>=A.x;if(P&&!h.y){g.scrollTo({left:M,behavior:s});return}P?p.x=g.scrollLeft-M:p.x=v===hr.Right?g.scrollLeft-C.x:g.scrollLeft-A.x,p.x&&g.scrollBy({left:-p.x,behavior:s});break}else if(I&&R.y!==f.y){const M=g.scrollTop+h.y,P=v===hr.Down&&M<=C.y||v===hr.Up&&M>=A.y;if(P&&!h.x){g.scrollTo({top:M,behavior:s});return}P?p.y=g.scrollTop-M:p.y=v===hr.Down?g.scrollTop-C.y:g.scrollTop-A.y,p.y&&g.scrollBy({top:-p.y,behavior:s});break}}this.handleMove(t,_d(mv(f,this.referenceCoordinates),p))}}}handleMove(t,r){const{onMove:n}=this.props;t.preventDefault(),n(r)}handleEnd(t){const{onEnd:r}=this.props;t.preventDefault(),this.detach(),r()}handleCancel(t){const{onCancel:r}=this.props;t.preventDefault(),this.detach(),r()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}jk.activators=[{eventName:"onKeyDown",handler:(e,t,r)=>{let{keyboardCodes:n=p9,onActivation:i}=t,{active:o}=r;const{code:a}=e.nativeEvent;if(n.start.includes(a)){const s=o.activatorNode.current;return s&&e.target!==s?!1:(e.preventDefault(),i?.({event:e.nativeEvent}),!0)}return!1}}];function Y3(e){return!!(e&&"distance"in e)}function X3(e){return!!(e&&"delay"in e)}class qk{constructor(t,r,n){var i;n===void 0&&(n=lwe(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=r;const{event:o}=t,{target:a}=o;this.props=t,this.events=r,this.document=gf(a),this.documentListeners=new Ch(this.document),this.listeners=new Ch(n),this.windowListeners=new Ch(Gi(a)),this.initialCoordinates=(i=LS(o))!=null?i:pa,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:r,bypassActivationConstraint:n}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(vo.Resize,this.handleCancel),this.windowListeners.add(vo.DragStart,Q3),this.windowListeners.add(vo.VisibilityChange,this.handleCancel),this.windowListeners.add(vo.ContextMenu,Q3),this.documentListeners.add(vo.Keydown,this.handleKeydown),r){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(X3(r)){this.timeoutId=setTimeout(this.handleStart,r.delay),this.handlePending(r);return}if(Y3(r)){this.handlePending(r);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,r){const{active:n,onPending:i}=this.props;i(n,t,this.initialCoordinates,r)}handleStart(){const{initialCoordinates:t}=this,{onStart:r}=this.props;t&&(this.activated=!0,this.documentListeners.add(vo.Click,uwe,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(vo.SelectionChange,this.removeTextSelection),r(t))}handleMove(t){var r;const{activated:n,initialCoordinates:i,props:o}=this,{onMove:a,options:{activationConstraint:s}}=o;if(!i)return;const l=(r=LS(t))!=null?r:pa,c=mv(i,l);if(!n&&s){if(Y3(s)){if(s.tolerance!=null&&Vy(c,s.tolerance))return this.handleCancel();if(Vy(c,s.distance))return this.handleStart()}if(X3(s)&&Vy(c,s.tolerance))return this.handleCancel();this.handlePending(s,c);return}t.cancelable&&t.preventDefault(),a(l)}handleEnd(){const{onAbort:t,onEnd:r}=this.props;this.detach(),this.activated||t(this.props.active),r()}handleCancel(){const{onAbort:t,onCancel:r}=this.props;this.detach(),this.activated||t(this.props.active),r()}handleKeydown(t){t.code===hr.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const dwe={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Vk extends qk{constructor(t){const{event:r}=t,n=gf(r.target);super(t,dwe,n)}}Vk.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return!r.isPrimary||r.button!==0?!1:(n?.({event:r}),!0)}}];const fwe={move:{name:"mousemove"},end:{name:"mouseup"}};var US;(function(e){e[e.RightClick=2]="RightClick"})(US||(US={}));class hwe extends qk{constructor(t){super(t,fwe,gf(t.event.target))}}hwe.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return r.button===US.RightClick?!1:(n?.({event:r}),!0)}}];const Gy={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class pwe extends qk{constructor(t){super(t,Gy)}static setup(){return window.addEventListener(Gy.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(Gy.move.name,t)};function t(){}}}pwe.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;const{touches:i}=r;return i.length>1?!1:(n?.({event:r}),!0)}}];var Rh;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Rh||(Rh={}));var vv;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(vv||(vv={}));function mwe(e){let{acceleration:t,activator:r=Rh.Pointer,canScroll:n,draggingRect:i,enabled:o,interval:a=5,order:s=vv.TreeOrder,pointerCoordinates:l,scrollableAncestors:c,scrollableAncestorRects:d,delta:f,threshold:h}=e;const p=vwe({delta:f,disabled:!o}),[m,g]=ASe(),v=De({x:0,y:0}),b=De({x:0,y:0}),y=Pt(()=>{switch(r){case Rh.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case Rh.DraggableRect:return i}},[r,i,l]),S=De(null),w=$r(()=>{const A=S.current;if(!A)return;const $=v.current.x*b.current.x,R=v.current.y*b.current.y;A.scrollBy($,R)},[]),C=Pt(()=>s===vv.TreeOrder?[...c].reverse():c,[s,c]);Ae(()=>{if(!o||!c.length||!y){g();return}for(const A of C){if(n?.(A)===!1)continue;const $=c.indexOf(A),R=d[$];if(!R)continue;const{direction:N,speed:I}=rwe(A,R,y,t,h);for(const M of["x","y"])p[M][N[M]]||(I[M]=0,N[M]=0);if(I.x>0||I.y>0){g(),S.current=A,m(w,a),v.current=I,b.current=N;return}}v.current={x:0,y:0},b.current={x:0,y:0},g()},[t,w,n,g,o,a,JSON.stringify(y),JSON.stringify(p),m,c,C,d,JSON.stringify(h)])}const gwe={x:{[kn.Backward]:!1,[kn.Forward]:!1},y:{[kn.Backward]:!1,[kn.Forward]:!1}};function vwe(e){let{delta:t,disabled:r}=e;const n=MS(t);return lm(i=>{if(r||!n||!i)return gwe;const o={x:Math.sign(t.x-n.x),y:Math.sign(t.y-n.y)};return{x:{[kn.Backward]:i.x[kn.Backward]||o.x===-1,[kn.Forward]:i.x[kn.Forward]||o.x===1},y:{[kn.Backward]:i.y[kn.Backward]||o.y===-1,[kn.Forward]:i.y[kn.Forward]||o.y===1}}},[r,t,n])}function bwe(e,t){const r=t!=null?e.get(t):void 0,n=r?r.node.current:null;return lm(i=>{var o;return t==null?null:(o=n??i)!=null?o:null},[n,t])}function _we(e,t){return Pt(()=>e.reduce((r,n)=>{const{sensor:i}=n,o=i.activators.map(a=>({eventName:a.eventName,handler:t(a.handler,n)}));return[...r,...o]},[]),[e,t])}var _p;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(_p||(_p={}));var BS;(function(e){e.Optimized="optimized"})(BS||(BS={}));const Z3=new Map;function ywe(e,t){let{dragging:r,dependencies:n,config:i}=t;const[o,a]=ce(null),{frequency:s,measure:l,strategy:c}=i,d=De(e),f=v(),h=bp(f),p=$r(function(b){b===void 0&&(b=[]),!h.current&&a(y=>y===null?b:y.concat(b.filter(S=>!y.includes(S))))},[h]),m=De(null),g=lm(b=>{if(f&&!r)return Z3;if(!b||b===Z3||d.current!==e||o!=null){const y=new Map;for(let S of e){if(!S)continue;if(o&&o.length>0&&!o.includes(S.id)&&S.rect.current){y.set(S.id,S.rect.current);continue}const w=S.node.current,C=w?new Bk(l(w),w):null;S.rect.current=C,C&&y.set(S.id,C)}return y}return b},[e,o,r,f,l]);return Ae(()=>{d.current=e},[e]),Ae(()=>{f||p()},[r,f]),Ae(()=>{o&&o.length>0&&a(null)},[JSON.stringify(o)]),Ae(()=>{f||typeof s!="number"||m.current!==null||(m.current=setTimeout(()=>{p(),m.current=null},s))},[s,f,p,...n]),{droppableRects:g,measureDroppableContainers:p,measuringScheduled:o!=null};function v(){switch(c){case _p.Always:return!1;case _p.BeforeDragging:return r;default:return!r}}}function m9(e,t){return lm(r=>e?r||(typeof t=="function"?t(e):e):null,[t,e])}function xwe(e,t){return m9(e,t)}function Swe(e){let{callback:t,disabled:r}=e;const n=zk(t),i=Pt(()=>{if(r||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:o}=window;return new o(n)},[n,r]);return Ae(()=>()=>i?.disconnect(),[i]),i}function Db(e){let{callback:t,disabled:r}=e;const n=zk(t),i=Pt(()=>{if(r||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:o}=window;return new o(n)},[r]);return Ae(()=>()=>i?.disconnect(),[i]),i}function wwe(e){return new Bk(um(e),e)}function eD(e,t,r){t===void 0&&(t=wwe);const[n,i]=ce(null);function o(){i(l=>{if(!e)return null;if(e.isConnected===!1){var c;return(c=l??r)!=null?c:null}const d=t(e);return JSON.stringify(l)===JSON.stringify(d)?l:d})}const a=Swe({callback(l){if(e)for(const c of l){const{type:d,target:f}=c;if(d==="childList"&&f instanceof HTMLElement&&f.contains(e)){o();break}}}}),s=Db({callback:o});return jl(()=>{o(),e?(s?.observe(e),a?.observe(document.body,{childList:!0,subtree:!0})):(s?.disconnect(),a?.disconnect())},[e]),n}function Ewe(e){const t=m9(e);return s9(e,t)}const tD=[];function kwe(e){const t=De(e),r=lm(n=>e?n&&n!==tD&&e&&t.current&&e.parentNode===t.current.parentNode?n:Uk(e):tD,[e]);return Ae(()=>{t.current=e},[e]),r}function Cwe(e){const[t,r]=ce(null),n=De(e),i=$r(o=>{const a=qy(o.target);a&&r(s=>s?(s.set(a,zS(a)),new Map(s)):null)},[]);return Ae(()=>{const o=n.current;if(e!==o){a(o);const s=e.map(l=>{const c=qy(l);return c?(c.addEventListener("scroll",i,{passive:!0}),[c,zS(c)]):null}).filter(l=>l!=null);r(s.length?new Map(s):null),n.current=e}return()=>{a(e),a(o)};function a(s){s.forEach(l=>{const c=qy(l);c?.removeEventListener("scroll",i)})}},[i,e]),Pt(()=>e.length?t?Array.from(t.values()).reduce((o,a)=>_d(o,a),pa):h9(e):pa,[e,t])}function rD(e,t){t===void 0&&(t=[]);const r=De(null);return Ae(()=>{r.current=null},t),Ae(()=>{const n=e!==pa;n&&!r.current&&(r.current=e),!n&&r.current&&(r.current=null)},[e]),r.current?mv(e,r.current):pa}function Rwe(e){Ae(()=>{if(!$b)return;const t=e.map(r=>{let{sensor:n}=r;return n.setup==null?void 0:n.setup()});return()=>{for(const r of t)r?.()}},e.map(t=>{let{sensor:r}=t;return r}))}function Awe(e,t){return Pt(()=>e.reduce((r,n)=>{let{eventName:i,handler:o}=n;return r[i]=a=>{o(a,t)},r},{}),[e,t])}function g9(e){return Pt(()=>e?XSe(e):null,[e])}const nD=[];function Twe(e,t){t===void 0&&(t=um);const[r]=e,n=g9(r?Gi(r):null),[i,o]=ce(nD);function a(){o(()=>e.length?e.map(l=>d9(l)?n:new Bk(t(l),l)):nD)}const s=Db({callback:a});return jl(()=>{s?.disconnect(),a(),e.forEach(l=>s?.observe(l))},[e]),i}function $we(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return sm(t)?t:e}function Nwe(e){let{measure:t}=e;const[r,n]=ce(null),i=$r(c=>{for(const{target:d}of c)if(sm(d)){n(f=>{const h=t(d);return f?{...f,width:h.width,height:h.height}:h});break}},[t]),o=Db({callback:i}),a=$r(c=>{const d=$we(c);o?.disconnect(),d&&o?.observe(d),n(d?t(d):null)},[t,o]),[s,l]=pv(a);return Pt(()=>({nodeRef:s,rect:r,setRef:l}),[r,s,l])}const Dwe=[{sensor:Vk,options:{}},{sensor:jk,options:{}}],Fwe={current:{}},c0={draggable:{measure:J3},droppable:{measure:J3,strategy:_p.WhileDragging,frequency:BS.Optimized},dragOverlay:{measure:um}};class Ah extends Map{get(t){var r;return t!=null&&(r=super.get(t))!=null?r:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:r}=t;return!r})}getNodeFor(t){var r,n;return(r=(n=this.get(t))==null?void 0:n.node.current)!=null?r:void 0}}const Iwe={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Ah,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:gv},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:c0,measureDroppableContainers:gv,windowRect:null,measuringScheduled:!1},Pwe={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:gv,draggableNodes:new Map,over:null,measureDroppableContainers:gv},Fb=Zt(Pwe),Owe=Zt(Iwe);function Mwe(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Ah}}}function Lwe(e,t){switch(t.type){case pn.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case pn.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case pn.DragEnd:case pn.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case pn.RegisterDroppable:{const{element:r}=t,{id:n}=r,i=new Ah(e.droppable.containers);return i.set(n,r),{...e,droppable:{...e.droppable,containers:i}}}case pn.SetDroppableDisabled:{const{id:r,key:n,disabled:i}=t,o=e.droppable.containers.get(r);if(!o||n!==o.key)return e;const a=new Ah(e.droppable.containers);return a.set(r,{...o,disabled:i}),{...e,droppable:{...e.droppable,containers:a}}}case pn.UnregisterDroppable:{const{id:r,key:n}=t,i=e.droppable.containers.get(r);if(!i||n!==i.key)return e;const o=new Ah(e.droppable.containers);return o.delete(r),{...e,droppable:{...e.droppable,containers:o}}}default:return e}}function zwe(e){let{disabled:t}=e;const{active:r,activatorEvent:n,draggableNodes:i}=St(Fb),o=MS(n),a=MS(r?.id);return Ae(()=>{if(!t&&!n&&o&&a!=null){if(!o9(o)||document.activeElement===o.target)return;const s=i.get(a);if(!s)return;const{activatorNode:l,node:c}=s;if(!l.current&&!c.current)return;requestAnimationFrame(()=>{for(const d of[l.current,c.current]){if(!d)continue;const f=NSe(d);if(f){f.focus();break}}})}},[n,t,i,a,o]),null}function Uwe(e,t){let{transform:r,...n}=t;return e!=null&&e.length?e.reduce((i,o)=>o({transform:i,...n}),r):r}function Bwe(e){return Pt(()=>({draggable:{...c0.draggable,...e?.draggable},droppable:{...c0.droppable,...e?.droppable},dragOverlay:{...c0.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function jwe(e){let{activeNode:t,measure:r,initialRect:n,config:i=!0}=e;const o=De(!1),{x:a,y:s}=typeof i=="boolean"?{x:i,y:i}:i;jl(()=>{if(!a&&!s||!t){o.current=!1;return}if(o.current||!n)return;const c=t?.node.current;if(!c||c.isConnected===!1)return;const d=r(c),f=s9(d,n);if(a||(f.x=0),s||(f.y=0),o.current=!0,Math.abs(f.x)>0||Math.abs(f.y)>0){const h=l9(c);h&&h.scrollBy({top:f.y,left:f.x})}},[t,a,s,n,r])}const v9=Zt({...pa,scaleX:1,scaleY:1});var fl;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(fl||(fl={}));const b9=Yq(function(t){var r,n,i,o;let{id:a,accessibility:s,autoScroll:l=!0,children:c,sensors:d=Dwe,collisionDetection:f=GSe,measuring:h,modifiers:p,...m}=t;const g=Xq(Lwe,void 0,Mwe),[v,b]=g,[y,S]=MSe(),[w,C]=ce(fl.Uninitialized),A=w===fl.Initialized,{draggable:{active:$,nodes:R,translate:N},droppable:{containers:I}}=v,M=$!=null?R.get($):null,P=De({initial:null,translated:null}),B=Pt(()=>{var Ie;return $!=null?{id:$,data:(Ie=M?.data)!=null?Ie:Fwe,rect:P}:null},[$,M]),j=De(null),[W,te]=ce(null),[J,re]=ce(null),se=bp(m,Object.values(m)),he=Nb("DndDescribedBy",a),K=Pt(()=>I.getEnabled(),[I]),ie=Bwe(h),{droppableRects:le,measureDroppableContainers:Z,measuringScheduled:ve}=ywe(K,{dragging:A,dependencies:[N.x,N.y],config:ie.droppable}),pe=bwe(R,$),be=Pt(()=>J?LS(J):null,[J]),Ge=Me(),zt=xwe(pe,ie.draggable.measure);jwe({activeNode:$!=null?R.get($):null,config:Ge.layoutShiftCompensation,initialRect:zt,measure:ie.draggable.measure});const At=eD(pe,ie.draggable.measure,zt),Er=eD(pe?pe.parentElement:null),nn=De({activatorEvent:null,active:null,activeNode:pe,collisionRect:null,collisions:null,droppableRects:le,draggableNodes:R,draggingNode:null,draggingNodeRect:null,droppableContainers:I,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Mn=I.getNodeFor((r=nn.current.over)==null?void 0:r.id),qt=Nwe({measure:ie.dragOverlay.measure}),wi=(n=qt.nodeRef.current)!=null?n:pe,Yn=A?(i=qt.rect)!=null?i:At:null,et=!!(qt.nodeRef.current&&qt.rect),lt=Ewe(et?null:At),Vt=g9(wi?Gi(wi):null),Ot=kwe(A?Mn??pe:null),Ft=Twe(Ot),Ei=Uwe(p,{transform:{x:N.x-lt.x,y:N.y-lt.y,scaleX:1,scaleY:1},activatorEvent:J,active:B,activeNodeRect:At,containerNodeRect:Er,draggingNodeRect:Yn,over:nn.current.over,overlayNodeRect:qt.rect,scrollableAncestors:Ot,scrollableAncestorRects:Ft,windowRect:Vt}),Ln=be?_d(be,N):null,Xn=Cwe(Ot),ns=rD(Xn),Ho=rD(Xn,[At]),ki=_d(Ei,ns),Ci=Yn?WSe(Yn,Ei):null,Ki=B&&Ci?f({active:B,collisionRect:Ci,droppableRects:le,droppableContainers:K,pointerCoordinates:Ln}):null,Se=qSe(Ki,"id"),[Fe,Lr]=ce(null),Jt=et?Ei:_d(Ei,Ho),V=KSe(Jt,(o=Fe?.rect)!=null?o:null,At),ye=De(null),Pe=$r((Ie,tt)=>{let{sensor:rt,options:Le}=tt;if(j.current==null)return;const vt=R.get(j.current);if(!vt)return;const Et=Ie.nativeEvent,Gr=new rt({active:j.current,activeNode:vt,event:Et,options:Le,context:nn,onAbort(ct){if(!R.get(ct))return;const{onDragAbort:Fr}=se.current,zr={id:ct};Fr?.(zr),y({type:"onDragAbort",event:zr})},onPending(ct,cn,Fr,zr){if(!R.get(ct))return;const{onDragPending:xn}=se.current,kr={id:ct,constraint:cn,initialCoordinates:Fr,offset:zr};xn?.(kr),y({type:"onDragPending",event:kr})},onStart(ct){const cn=j.current;if(cn==null)return;const Fr=R.get(cn);if(!Fr)return;const{onDragStart:zr}=se.current,yn={activatorEvent:Et,active:{id:cn,data:Fr.data,rect:P}};Fm(()=>{zr?.(yn),C(fl.Initializing),b({type:pn.DragStart,initialCoordinates:ct,active:cn}),y({type:"onDragStart",event:yn}),te(ye.current),re(Et)})},onMove(ct){b({type:pn.DragMove,coordinates:ct})},onEnd:zn(pn.DragEnd),onCancel:zn(pn.DragCancel)});ye.current=Gr;function zn(ct){return async function(){const{active:Fr,collisions:zr,over:yn,scrollAdjustedTranslate:xn}=nn.current;let kr=null;if(Fr&&xn){const{cancelDrop:Ir}=se.current;kr={activatorEvent:Et,active:Fr,collisions:zr,delta:xn,over:yn},ct===pn.DragEnd&&typeof Ir=="function"&&await Promise.resolve(Ir(kr))&&(ct=pn.DragCancel)}j.current=null,Fm(()=>{b({type:ct}),C(fl.Uninitialized),Lr(null),te(null),re(null),ye.current=null;const Ir=ct===pn.DragEnd?"onDragEnd":"onDragCancel";if(kr){const Hi=se.current[Ir];Hi?.(kr),y({type:Ir,event:kr})}})}}},[R]),ut=$r((Ie,tt)=>(rt,Le)=>{const vt=rt.nativeEvent,Et=R.get(Le);if(j.current!==null||!Et||vt.dndKit||vt.defaultPrevented)return;const Gr={active:Et};Ie(rt,tt.options,Gr)===!0&&(vt.dndKit={capturedBy:tt.sensor},j.current=Le,Pe(rt,tt))},[R,Pe]),ft=_we(d,ut);Rwe(d),jl(()=>{At&&w===fl.Initializing&&C(fl.Initialized)},[At,w]),Ae(()=>{const{onDragMove:Ie}=se.current,{active:tt,activatorEvent:rt,collisions:Le,over:vt}=nn.current;if(!tt||!rt)return;const Et={active:tt,activatorEvent:rt,collisions:Le,delta:{x:ki.x,y:ki.y},over:vt};Fm(()=>{Ie?.(Et),y({type:"onDragMove",event:Et})})},[ki.x,ki.y]),Ae(()=>{const{active:Ie,activatorEvent:tt,collisions:rt,droppableContainers:Le,scrollAdjustedTranslate:vt}=nn.current;if(!Ie||j.current==null||!tt||!vt)return;const{onDragOver:Et}=se.current,Gr=Le.get(Se),zn=Gr&&Gr.rect.current?{id:Gr.id,rect:Gr.rect.current,data:Gr.data,disabled:Gr.disabled}:null,ct={active:Ie,activatorEvent:tt,collisions:rt,delta:{x:vt.x,y:vt.y},over:zn};Fm(()=>{Lr(zn),Et?.(ct),y({type:"onDragOver",event:ct})})},[Se]),jl(()=>{nn.current={activatorEvent:J,active:B,activeNode:pe,collisionRect:Ci,collisions:Ki,droppableRects:le,draggableNodes:R,draggingNode:wi,draggingNodeRect:Yn,droppableContainers:I,over:Fe,scrollableAncestors:Ot,scrollAdjustedTranslate:ki},P.current={initial:Yn,translated:Ci}},[B,pe,Ki,Ci,R,wi,Yn,le,I,Fe,Ot,ki]),mwe({...Ge,delta:N,draggingRect:Ci,pointerCoordinates:Ln,scrollableAncestors:Ot,scrollableAncestorRects:Ft});const It=Pt(()=>({active:B,activeNode:pe,activeNodeRect:At,activatorEvent:J,collisions:Ki,containerNodeRect:Er,dragOverlay:qt,draggableNodes:R,droppableContainers:I,droppableRects:le,over:Fe,measureDroppableContainers:Z,scrollableAncestors:Ot,scrollableAncestorRects:Ft,measuringConfiguration:ie,measuringScheduled:ve,windowRect:Vt}),[B,pe,At,J,Ki,Er,qt,R,I,le,Fe,Z,Ot,Ft,ie,ve,Vt]),at=Pt(()=>({activatorEvent:J,activators:ft,active:B,activeNodeRect:At,ariaDescribedById:{draggable:he},dispatch:b,draggableNodes:R,over:Fe,measureDroppableContainers:Z}),[J,ft,B,At,b,he,R,Fe,Z]);return _o.createElement(a9.Provider,{value:S},_o.createElement(Fb.Provider,{value:at},_o.createElement(Owe.Provider,{value:It},_o.createElement(v9.Provider,{value:V},c)),_o.createElement(zwe,{disabled:s?.restoreFocus===!1})),_o.createElement(USe,{...s,hiddenTextDescribedById:he}));function Me(){const Ie=W?.autoScrollEnabled===!1,tt=typeof l=="object"?l.enabled===!1:l===!1,rt=A&&!Ie&&!tt;return typeof l=="object"?{...l,enabled:rt}:{enabled:rt}}}),qwe=Zt(null),iD="button",Vwe="Draggable";function _9(e){let{id:t,data:r,disabled:n=!1,attributes:i}=e;const o=Nb(Vwe),{activators:a,activatorEvent:s,active:l,activeNodeRect:c,ariaDescribedById:d,draggableNodes:f,over:h}=St(Fb),{role:p=iD,roleDescription:m="draggable",tabIndex:g=0}=i??{},v=l?.id===t,b=St(v?v9:qwe),[y,S]=pv(),[w,C]=pv(),A=Awe(a,t),$=bp(r);jl(()=>(f.set(t,{id:t,key:o,node:y,activatorNode:w,data:$}),()=>{const N=f.get(t);N&&N.key===o&&f.delete(t)}),[f,t]);const R=Pt(()=>({role:p,tabIndex:g,"aria-disabled":n,"aria-pressed":v&&p===iD?!0:void 0,"aria-roledescription":m,"aria-describedby":d.draggable}),[n,p,g,v,m,d.draggable]);return{active:l,activatorEvent:s,activeNodeRect:c,attributes:R,isDragging:v,listeners:n?void 0:A,node:y,over:h,setNodeRef:S,setActivatorNodeRef:C,transform:b}}const Gwe="Droppable",Kwe={timeout:25};function y9(e){let{data:t,disabled:r=!1,id:n,resizeObserverConfig:i}=e;const o=Nb(Gwe),{active:a,dispatch:s,over:l,measureDroppableContainers:c}=St(Fb),d=De({disabled:r}),f=De(!1),h=De(null),p=De(null),{disabled:m,updateMeasurementsFor:g,timeout:v}={...Kwe,...i},b=bp(g??n),y=$r(()=>{if(!f.current){f.current=!0;return}p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{c(Array.isArray(b.current)?b.current:[b.current]),p.current=null},v)},[v]),S=Db({callback:y,disabled:m||!a}),w=$r((R,N)=>{S&&(N&&(S.unobserve(N),f.current=!1),R&&S.observe(R))},[S]),[C,A]=pv(w),$=bp(t);return Ae(()=>{!S||!C.current||(S.disconnect(),f.current=!1,S.observe(C.current))},[C,S]),Ae(()=>(s({type:pn.RegisterDroppable,element:{id:n,key:o,disabled:r,node:C,rect:h,data:$}}),()=>s({type:pn.UnregisterDroppable,key:o,id:n})),[n]),Ae(()=>{r!==d.current.disabled&&(s({type:pn.SetDroppableDisabled,id:n,key:o,disabled:r}),d.current.disabled=r)},[n,o,r,s]),{active:a,rect:h,isOver:l?.id===n,node:C,over:l,setNodeRef:A}}function x9(e,t){ee(Mi(e.onPointerDown),r=>r(t))}function S9(e,t){ee(Mi(e.onKeyDown),r=>r(t))}function w9(e){return q(e==null?void 0:Dt(e),t=>"translate3d("+t.x.toString()+"px, "+t.y.toString()+"px, 0)")}let oD=[{bg:"#d1fae5",border:"#059669",fg:"#065f46"},{bg:"#fef3c7",border:"#d97706",fg:"#78350f"},{bg:"#ede9fe",border:"#7c3aed",fg:"#4c1d95"},{bg:"#ccfbf1",border:"#0d9488",fg:"#134e4a"},{bg:"#fce7f3",border:"#db2777",fg:"#831843"},{bg:"#ffedd5",border:"#ea580c",fg:"#7c2d12"},{bg:"#ecfccb",border:"#65a30d",fg:"#365314"}],E9={bg:"#e2e8f0",border:"#64748b",fg:"#1e293b"};function Hwe(e){return e<0?E9:oD[Fo(e,oD.length)]}function Gk(e,t){let r=e.indexOf(t);return r!==-1?Hwe(r):E9}let Wwe={bg:"#dbeafe",border:"#2563eb",fg:"#1e3a8a"};function Ud(e){return"var("+e+")"}let k9=[z("inlineFlex"),X("center"),u("gap","4px"),u("font-size",Ud(T.sizeXs)),u("font-weight",Ud(T.weightMedium)),u("line-height","1.5"),u("white-space","nowrap")];function C9(e,t){return E(k9.concat([u("background",e.bg),u("border","1px solid "+e.border),u("color",e.fg)]).concat(t))}function Jwe(e){return C9(e,[u("padding","2px 8px"),u("border-radius",Ud(Y.full))])}let Qwe=C9(Wwe,[u("padding","2px 8px"),u("border-radius",Ud(Y.sm))]),Ywe=E(k9.concat([u("padding","2px 0"),u("color",Ud(x.textSecondary)),u("font-weight",Ud(T.weightNormal)),u("font-style","italic"),u("border-bottom","1px dashed var("+x.border+")")]));function Xwe(e){return{background:e.border,display:"inline-block",height:"6px",width:"6px",borderRadius:"50%",flexShrink:"0"}}function Zwe(e){let t=e.dot,r=e.swatch;return L("span",{children:[(t!==void 0?t:!0)?_("span",{style:Xwe(r)}):null,e.label],className:Jwe(r)})}let Kk={make:Zwe};function eEe(e){return _("span",{children:e.label,className:Qwe})}let tEe={make:eEe};function rEe(e){let t=e.label;return _("span",{children:t,className:Ywe,title:t+" — run by the platform, not callable"})}let nEe={make:rEe};function qr(e){return"var("+e+")"}let iEe=E([z("flex"),X("stretch"),u("gap",qr(O.md)),u("overflow-x","auto"),u("padding-bottom",qr(O.sm))]),R9=[z("flex"),_e("column"),u("gap",qr(O.sm)),u("flex","0 0 240px"),u("padding",qr(O.sm)),u("background",qr(x.surfaceSubtle)),u("border","1px solid var("+x.borderSubtle+")"),u("border-radius",qr(Y.md)),u("min-height","120px")],oEe=E(R9);function aEe(e){return E(R9.concat([u("border-top","3px solid "+e.border)]))}let sEe=E([u("border-color",qr(x.brand))]),lEe=E([ks(.45)]),uEe=E([z("flex"),X("center"),Ze("spaceBetween"),u("gap",qr(O.sm)),u("font-size",qr(T.sizeSm)),u("font-weight",qr(T.weightMedium)),u("color",qr(x.textSecondary))]),cEe=E([u("text-transform","uppercase"),u("letter-spacing","0.04em")]),aD=E([z("flex"),_e("column"),X("stretch"),u("gap","4px"),u("padding",qr(O.sm)),u("background",qr(x.surface)),u("border","1px solid var("+x.border+")"),u("border-radius",qr(Y.sm)),u("text-align","left"),Ce("pointer"),Ue([u("border-color",qr(x.brand))])]),dEe=E([Ce("grab")]),fEe=E([ks(.85),u("z-index","10"),Ce("grabbing")]),hEe=E([u("font-size",qr(T.sizeSm)),u("font-weight",qr(T.weightMedium)),u("color",qr(x.textPrimary))]),pEe=E([u("font-size",qr(T.sizeXs)),u("color",qr(x.textSecondary)),u("overflow","hidden"),u("text-overflow","ellipsis"),u("white-space","nowrap")]),mEe=E([u("color",qr(x.textDisabled)),u("font-size",qr(T.sizeSm))]);function gEe(e){let t=e.onClick,r=e.draggable,n=e.card,i=_9({id:n.key,disabled:!r}),o=r?aD+" "+dEe:aD,a=i.isDragging?o+" "+fEe:o,s=w9(i.transform),l=s!==void 0?{transform:s}:void 0,c=i.listeners,d=c==null?void 0:Dt(c),f=n.meta;return L("div",{children:[_("span",{children:n.title,className:hEe}),f!==void 0?_("span",{children:f,className:pEe,title:f}):null],ref:Dt(i.setNodeRef),className:a,role:"button",style:l,tabIndex:0,onKeyDown:h=>ee(d,p=>S9(p,h)),onClick:h=>ee(t,p=>p(n.key)),onPointerDown:h=>ee(d,p=>x9(p,h))})}function vEe(e){let t=e.accepts,r=e.onCardClick,n=e.draggable,i=e.column,o=t!==void 0?t:!0,a=y9({id:i.value,disabled:!o}),s=i.swatch,l=s!==void 0?aEe(s):oEe,c=a.isOver,d=o?c?l+" "+sEe:l:l+" "+lEe,f=i.swatch;return L("div",{children:[L("div",{children:[f!==void 0?_(Kk.make,{swatch:f,label:i.label}):_("span",{children:i.label,className:cEe}),_(hh,{count:i.cards.length,label:""})],className:uEe}),i.cards.length===0?_("span",{children:"—",className:mEe}):i.cards.map(h=>_(gEe,{card:h,draggable:n,onClick:r},h.key))],ref:Dt(a.setNodeRef),className:d})}function bEe(e){let t=e.canDrop,r=e.onMove,n=e.onCardClick,i=e.columns,o=Ee(r),a=BSe(W3(Vk,{activationConstraint:{distance:5}}),W3(jk,{})),s=ce(()=>{}),l=s[1],c=s[0],d=h=>t!==void 0&&c!==void 0?t(c,h.value):!0,f=h=>{l(v=>{});let p=h.over;if(r===void 0||p==null)return;let m=i.find(v=>v.cards.some(b=>b.key===h.active.id));if(ne(t,!0,v=>v(h.active.id,p.id))&&ne(m,!0,v=>v.value!==p.id))return r(h.active.id,p.id)};return _(b9,{sensors:Dt(a),onDragStart:h=>l(p=>h.active.id),onDragEnd:f,onDragCancel:()=>l(h=>{}),children:_("div",{children:i.map(h=>_(vEe,{column:h,draggable:o,onCardClick:n,accepts:d(h)},h.value)),className:iEe})})}let _Ee=bEe;function yt(e){return"var("+e+")"}let yEe=E([z("flex"),_e("column"),u("gap",yt(O.sm))]),xEe=E([z("flex"),X("center"),Ze("spaceBetween"),u("gap",yt(O.sm))]),sD=E([z("inlineFlex"),X("center"),u("gap",yt(O.xs))]),lh=E([u("background","none"),u("border","1px solid var("+x.border+")"),u("border-radius",yt(Y.sm)),u("padding","2px var("+O.sm+")"),u("color",yt(x.textSecondary)),u("font-size",yt(T.sizeSm)),Ce("pointer"),Ue([u("background",yt(x.surfaceSubtle)),u("color",yt(x.textPrimary))])]),SEe=yr([lh,E([u("background",yt(x.surfaceSubtle)),u("color",yt(x.textPrimary)),u("font-weight",yt(T.weightMedium))])]),wEe=E([u("font-size",yt(T.sizeMd)),u("font-weight",yt(T.weightMedium)),u("color",yt(x.textPrimary))]),EEe=E([z("grid"),u("grid-template-columns","repeat(7, 1fr)"),u("gap","1px")]),kEe=E([u("font-size",yt(T.sizeXs)),u("color",yt(x.textSecondary)),u("text-transform","uppercase"),u("letter-spacing","0.04em"),u("padding","2px var("+O.xs+")")]),CEe=E([z("grid"),u("grid-template-columns","repeat(7, 1fr)"),u("gap","1px"),u("background",yt(x.borderSubtle)),u("border","1px solid var("+x.borderSubtle+")"),u("border-radius",yt(Y.md)),u("overflow","hidden")]),A9=E([z("flex"),_e("column"),u("gap","2px"),u("min-height","96px"),u("padding","4px"),u("background",yt(x.surface))]),REe=yr([A9,E([u("opacity","0.55")])]),T9=E([u("font-size",yt(T.sizeXs)),u("color",yt(x.textSecondary))]),AEe=yr([T9,E([u("color",yt(x.brand)),u("font-weight",yt(T.weightMedium))])]);function TEe(e){return E([z("block"),u("width","100%"),u("text-align","left"),u("border","none"),u("border-left","3px solid "+e),u("border-radius",yt(Y.sm)),u("background",yt(x.surfaceSubtle)),u("color",yt(x.textPrimary)),u("font-size",yt(T.sizeXs)),u("padding","1px var("+O.xs+")"),u("overflow","hidden"),u("text-overflow","ellipsis"),u("white-space","nowrap"),Ce("pointer"),Ue([u("background",yt(x.surfaceElevated))])])}let $Ee=E([u("background","none"),u("border","none"),u("padding","0"),u("text-align","left"),u("font-size",yt(T.sizeXs)),u("color",yt(x.brand)),Ce("pointer"),Ue([u("text-decoration","underline")])]);function NEe(e){return E([z("grid"),u("grid-template-columns","repeat("+e.toString()+", 1fr)"),u("gap","1px"),u("background",yt(x.borderSubtle)),u("border","1px solid var("+x.borderSubtle+")"),u("border-radius",yt(Y.md)),u("overflow","hidden")])}let DEe=E([z("flex"),_e("column"),u("gap","2px"),u("min-height","200px"),u("padding","4px"),u("background",yt(x.surface))]),FEe=E([u("font-size",yt(T.sizeXs)),u("color",yt(x.textSecondary)),u("padding-bottom","2px"),u("border-bottom","1px solid var("+x.borderSubtle+")")]),IEe=E([z("flex"),yi("wrap"),X("center"),u("gap",yt(O.md)),u("font-size",yt(T.sizeXs)),u("color",yt(x.textSecondary))]);function PEe(e){return E([z("inlineBlock"),u("width","8px"),u("height","8px"),u("border-radius","50%"),u("background",e),u("margin-right","4px")])}let OEe=E([u("font-size",yt(T.sizeXs)),u("color",yt(x.textDisabled))]),MEe="var("+x.brand+")";function LEe(e){return D(e.end_,e.start)}function lD(e,t){return e.filter(r=>RM(r.start,LEe(r),t)).toSorted((r,n)=>r.start-n.start)}function zEe(e,t){return TM(e.start)||!CM(e.start,t)?e.title:AM(e.start)+" "+e.title}function UEe(e){let t=e.initialDate,r=e.windowNote,n=e.legend,i=e.events,o=n!==void 0?n:[],a=ce(()=>"Month"),s=a[1],l=a[0],c=ce(()=>gi(D(t,Date.now()))),d=c[1],f=c[0],h=gi(Date.now()),p=w=>d(C=>{switch(l){case"Month":return EM(C,w);case"Week":return Ro(C,w*7|0);case"Day":return Ro(C,w)}}),m=(w,C)=>_("button",{children:zEe(w,C),className:TEe(D(w.accent,MEe)),title:w.title,onClick:A=>w.onOpen()},w.key),g=()=>{let w=tX(f);return L(Bt,{children:[_("div",{children:Gw.map(C=>_("div",{children:C,className:kEe},C)),className:EEe}),_("div",{children:w.map(C=>{let A=lD(i,C),$=A.slice(0,3),R=A.length-$.length|0;return L("div",{children:[_("span",{children:NM(C).toString(),className:C===h?AEe:T9}),$.map(N=>m(N,C)),R>0?_("button",{children:"+"+R.toString()+" more",className:$Ee,onClick:N=>{d(I=>C),s(I=>"Day")}}):null],className:rX(C,f)?A9:REe},C.toString())}),className:CEe})]})},v=w=>_("div",{children:w.map(C=>L("div",{children:[_("div",{children:Is(C),className:FEe}),lD(i,C).map(A=>m(A,C))],className:DEe},C.toString())),className:NEe(w.length)}),b;switch(l){case"Month":b=g();break;case"Week":b=v(Fl(7,w=>Ro(Yv(f),w)));break;case"Day":b=v([gi(f)]);break}let y;switch(l){case"Month":case"Week":y=xo(f);break;case"Day":y=Is(f)+" — "+xo(f);break}let S=(w,C)=>_("button",{children:C,className:l===w?SEe:lh,onClick:A=>s($=>w)});return L("div",{children:[L("div",{children:[L("div",{children:[_("button",{children:"‹",className:lh,onClick:w=>p(-1)}),_("button",{children:"Today",className:lh,onClick:w=>d(C=>h)}),_("button",{children:"›",className:lh,onClick:w=>p(1)}),_("span",{children:y,className:wEe})],className:sD}),L("div",{children:[S("Month","Month"),S("Week","Week"),S("Day","Day")],className:sD})],className:xEe}),o.length!==0?_("div",{children:o.map(w=>L("span",{children:[_("span",{className:PEe(w.accent)}),w.label]},w.label)),className:IEe}):null,b,r!==void 0?_("span",{children:r,className:OEe}):null],className:yEe})}let BEe=UEe;function wr(e){return"var("+e+")"}let jEe=E([z("grid"),u("grid-template-columns","repeat(auto-fill, minmax(220px, 1fr))"),u("gap",wr(O.md))]),qEe=E([z("flex"),_e("column"),X("stretch"),u("gap",wr(O.sm)),u("padding",wr(O.md)),u("background",wr(x.surface)),u("border","1px solid var("+x.border+")"),u("border-radius",wr(Y.md)),u("text-align","left"),Ue([u("border-color",wr(x.brand)),u("background",wr(x.surfaceSubtle))])]),VEe=E([z("flex"),_e("column"),X("stretch"),u("gap",wr(O.sm)),u("background","none"),u("border","none"),u("padding","0"),u("font","inherit"),u("color","inherit"),u("text-align","left"),Ce("pointer")]),GEe=E([z("flex"),yi("wrap"),u("gap","4px")]),KEe=E([u("background",wr(x.surface)),u("border","1px solid var("+x.border+")"),u("border-radius",wr(Y.sm)),u("padding","2px var("+O.sm+")"),u("color",wr(x.textPrimary)),u("font-size",wr(T.sizeSm)),Ce("pointer"),Ue([u("border-color",wr(x.brand)),u("color",wr(x.brand))])]),HEe=E([u("width","100%"),u("height","96px"),u("object-fit","cover"),u("border-radius",wr(Y.sm))]),WEe=E([u("width","100%"),u("height","96px")]),JEe=E([z("flex"),X("center"),Ze("spaceBetween"),u("gap",wr(O.sm))]),QEe=E([u("font-size",wr(T.sizeMd)),u("font-weight",wr(T.weightMedium)),u("color",wr(x.textPrimary)),u("overflow","hidden"),u("text-overflow","ellipsis"),u("white-space","nowrap")]),YEe=E([z("flex"),X("baseline"),u("gap",wr(O.sm)),u("font-size",wr(T.sizeSm))]),XEe=E([u("color",wr(x.textSecondary)),u("white-space","nowrap"),rn(0)]),ZEe=E([u("color",wr(x.textPrimary)),u("min-width","0"),u("overflow","hidden"),u("text-overflow","ellipsis")]),e2e=E([u("color",wr(x.textDisabled)),u("font-size",wr(T.sizeSm))]);function t2e(e){let t=e.cards;if(t.length===0)return _("span",{children:"(empty)",className:e2e});let r=e.onCardClick;return _("div",{children:t.map(n=>{let i=n.media,o;o=i!==void 0?typeof i!="object"?_("span",{children:_(OS,{size:"Fill"}),className:WEe}):_("img",{className:HEe,alt:n.title,src:i._0}):null;let a=n.actions;return L("div",{children:[L("button",{children:[o,L("div",{children:[_("span",{children:n.title,className:QEe,title:n.title}),D(n.badge,null)],className:JEe}),n.fields.map(s=>L("div",{children:[_("span",{children:s.label,className:XEe}),_("span",{children:s.value,className:ZEe})],className:YEe},s.label))],className:VEe,onClick:s=>ee(r,l=>l(n.key))}),a!==void 0&&a.length!==0?_("div",{children:a.map(s=>_("button",{children:s.label,className:KEe,onClick:l=>s.onClick()},s.label)),className:GEe}):null],className:qEe},n.key)}),className:jEe})}let r2e=t2e;function n2e(e,t){let r=e.length,n=t.length,i=sO((r+1|0)*(n+1|0)|0,0),o=(c,d)=>i[(c*(n+1|0)|0)+d|0];for(let c=0;c<r;++c)for(let d=0;d<n;++d)i[((c+1|0)*(n+1|0)|0)+(d+1|0)|0]=e[c]===t[d]?o(c,d)+1|0:o(c,d+1|0)>o(c+1|0,d)?o(c,d+1|0):o(c+1|0,d);let a=[],s=r,l=n;for(;s>0||l>0;){let c=e[s-1|0],d=t[l-1|0];s>0&&l>0&&c===d?(a=[{kind:"Unchanged",text:c}].concat(a),s=s-1|0,l=l-1|0):l>0&&(s===0||o(s,l-1|0)>=o(s-1|0,l))?(a=[{kind:"Added",text:d}].concat(a),l=l-1|0):(a=[{kind:"Removed",text:c}].concat(a),s=s-1|0)}return a}function wu(e){return"var("+e+")"}let i2e=E([u("font-family",wu(T.fontFamilyMono)),u("font-size",wu(T.sizeSm)),u("line-height",wu(T.lineHeightNormal)),u("border","1px solid var("+x.border+")"),u("border-radius",wu(Y.md)),Us("auto")]),Ky=E([z("flex"),u("padding","1px var("+O.md+")")]),o2e=E([u("background","rgba(248,81,73,0.12)"),u("color",wu(x.error))]),a2e=E([u("background","rgba(63,185,80,0.12)"),u("color",wu(x.success))]),s2e=E([u("color",wu(x.textSecondary))]),l2e=E([u("width","16px"),rn(0),u("user-select","none"),MO(ke(8))]);function u2e(e){let t=e.before.split(`
|
|
94
|
+
`),r=e.after.split(`
|
|
95
|
+
`),n=n2e(t,r);return _("div",{children:n.map((i,o)=>{let a=i.kind,s;switch(a){case"Removed":s=[Ky+" "+o2e,"-"];break;case"Added":s=[Ky+" "+a2e,"+"];break;case"Unchanged":s=[Ky+" "+s2e," "];break}return L("div",{children:[_("span",{children:s[1],className:l2e}),_("span",{children:i.text})],className:s[0]},o.toString())}),className:i2e})}let c2e=u2e;function Ib(e,t){let r=new Date(t).getTime();if(Number.isNaN(r))return t;let n=(e-r)/1e3;return n<45?"just now":n<3600?Math.floor(n/60).toString()+"m ago":n<86400?Math.floor(n/3600).toString()+"h ago":n<1209600?Math.floor(n/86400).toString()+"d ago":t.slice(0,10)}function vi(e){return"var("+e+")"}let d2e=E([z("flex"),_e("column"),u("gap","2px"),u("font-family",vi(T.fontFamily)),u("font-size",vi(T.sizeSm))]),uD=E([z("flex"),X("flexStart"),u("gap","10px"),u("padding",vi(O.xs)+" "+vi(O.sm)),u("border-radius",vi(Y.sm))]),f2e=E([Ce("pointer"),Ue([u("background",vi(x.surfaceSubtle))])]),h2e=E([z("flex"),_e("column"),u("gap","2px"),u("min-width","0"),u("flex","1")]),p2e=E([u("color",vi(x.textPrimary))]),m2e=E([u("font-weight",vi(T.weightMedium))]),g2e=E([u("color",vi(x.textSecondary))]),v2e=E([z("inlineFlex"),X("center"),u("gap","6px"),u("color",vi(x.textSecondary)),u("font-size",vi(T.sizeXs)),u("white-space","nowrap")]),b2e=E([z("inlineBlock"),u("width","8px"),u("height","8px"),u("border-radius","50%"),u("flex-shrink","0")]),_2e=E([u("background","none"),u("border","none"),u("padding","0"),u("color",vi(x.brand)),u("font-size",vi(T.sizeXs)),Ce("pointer"),u("text-align","left"),Ue([u("text-decoration","underline")])]),y2e=E([u("margin-top","4px"),u("max-width","560px")]),x2e=E([u("color",vi(x.textSecondary)),u("padding",vi(O.md)),Ya("center")]);function S2e(e){let t=e.onClick,r=e.entry,n=ce(()=>!1),i=n[1],o=n[0],a=Ee(r.before)&&Ee(r.after),s=D(r.actor,r.subject),l=t!==void 0?uD+" "+f2e:uD,c=r.actor,d=r.accent,f=r.timestamp;return L("div",{children:[_(Hd,{name:s,src:r.actorImageUrl,size:"Medium"}),L("div",{children:[L("span",{children:[c!==void 0?_("span",{children:c+" ",className:m2e}):null,_("span",{children:r.verb+" ",className:g2e}),r.subject],className:p2e}),L("span",{children:[d!==void 0?_("span",{className:b2e,style:{background:d}}):null,f!==void 0?Ib(e.nowMs,f):null],className:v2e}),a?_("button",{children:o?"Hide changes":"Show changes",className:_2e,onClick:h=>{h.stopPropagation(),i(p=>!p)}}):null,o&&a?_("div",{children:_(c2e,{before:D(r.before,""),after:D(r.after,"")}),className:y2e}):null],className:h2e})],className:l,onClick:h=>ee(t,p=>p(r))})}function w2e(e){let t=e.nowMs,r=e.onEntryClick,n=e.emptyLabel,i=e.entries,o=n!==void 0?n:"No activity yet",a=t!==void 0?t:Date.now();return i.length===0?_("div",{children:o,className:x2e}):_("div",{children:i.map(s=>_(S2e,{entry:s,nowMs:a,onClick:r},s.id)),className:d2e})}let E2e=w2e;function k2e(e,t){let r=e.indexOf(t);return e.map((n,i)=>{let o=r<0?"Upcoming":i<r?"Done":i===r?"Current":"Upcoming";return[n,o]})}function C2e(e,t,r){return k2e(co(e,t),r).map(n=>{let i=n[0];return{key:i,label:pt(i),state:n[1]}})}function zo(e){return"var("+e+")"}let R2e=E([z("flex"),X("flexStart"),u("gap","0"),u("width","100%")]),A2e=E([z("flex"),_e("column"),X("center"),u("gap","4px"),u("flex","0 0 auto")]);function T2e(e){return E([u("flex","1 1 auto"),u("height","2px"),u("margin","0 6px"),u("margin-top","11px"),u("min-width","16px"),u("background",zo(e?x.brand:x.borderSubtle))])}let Hk=[z("inlineFlex"),X("center"),Ze("center"),u("width","24px"),u("height","24px"),u("border-radius","50%"),u("font-size",zo(T.sizeXs)),u("font-weight",zo(T.weightMedium)),u("box-sizing","border-box")],$2e=E(Hk.concat([u("background",zo(x.brand)),u("color","#fff")])),N2e=E(Hk.concat([u("background",zo(x.surface)),u("color",zo(x.brand)),u("border","2px solid var("+x.brand+")")])),D2e=E(Hk.concat([u("background",zo(x.surface)),u("color",zo(x.textDisabled)),u("border","1px solid var("+x.border+")")])),$9=[u("font-size",zo(T.sizeXs)),u("text-align","center"),u("max-width","96px")],F2e=E($9.concat([u("color",zo(x.textPrimary))])),I2e=E($9.concat([u("color",zo(x.textDisabled))])),P2e=E([u("display","none")]);function O2e(e){switch(e){case"Done":return $2e;case"Current":return N2e;case"Upcoming":return D2e}}function M2e(e){switch(e){case"Done":case"Current":return F2e;case"Upcoming":return I2e}}function L2e(e,t){switch(e){case"Done":return"✓";case"Current":case"Upcoming":return(t+1|0).toString()}}function z2e(e){let t=e.compact,r=t!==void 0?t:!1;return _("div",{children:e.steps.map((n,i)=>{let o=i===0?null:_("div",{className:T2e(n.state==="Done"||n.state==="Current")},n.key+":c"),a=r?P2e:M2e(n.state);return L(Nv,{children:[o,L("div",{children:[_("span",{children:L2e(n.state,i),className:O2e(n.state)}),_("span",{children:n.label,className:a})],className:A2e,role:"listitem"})]},n.key)}),"aria-label":"Progress",className:R2e,role:"list"})}let N9=z2e;function D9(e){switch(e.toLowerCase().replaceAll("_","").replaceAll("-","")){case"accepted":case"approve":case"approved":case"confirmed":case"granted":case"signed":return"Approved";case"awaiting":case"escalated":case"inreview":case"pending":case"submitted":case"underreview":return"Pending";case"na":case"notrequired":case"skipped":case"waived":return"Skipped";case"declined":case"denied":case"refused":case"reject":case"rejected":case"withdrawn":return"Rejected";default:return{TAG:"Other",_0:e}}}function U2e(e){if(typeof e=="object")return pt(e._0);switch(e){case"Approved":return"Approved";case"Rejected":return"Rejected";case"Pending":return"Pending";case"Skipped":return"Skipped"}}function B2e(e){if(typeof e=="object")return"Neutral";switch(e){case"Approved":return"Success";case"Rejected":return"Error";case"Pending":return"Info";case"Skipped":return"Neutral"}}function j2e(e){if(typeof e=="object")return"•";switch(e){case"Approved":return"✓";case"Rejected":return"✕";case"Pending":return"•";case"Skipped":return"–"}}function q2e(e){if(typeof e=="object")return"var("+x.border+")";switch(e){case"Approved":return"var("+x.success+")";case"Rejected":return"var("+x.error+")";case"Pending":return"var("+x.info+")";case"Skipped":return"var("+x.border+")"}}function In(e){return"var("+e+")"}let V2e=E([z("flex"),_e("column"),u("gap",In(O.md)),u("font-family",In(T.fontFamily))]),G2e=E([z("flex"),_e("column")]),K2e=E([z("flex"),X("stretch"),u("gap",In(O.sm))]),H2e=E([z("flex"),_e("column"),X("center"),u("flex","0 0 22px")]);function W2e(e){return E([z("inlineFlex"),X("center"),Ze("center"),u("width","20px"),u("height","20px"),u("border-radius","50%"),u("box-sizing","border-box"),u("border","2px solid "+e),u("color",e),u("background",In(x.surface)),u("font-size","11px"),u("line-height","1"),u("flex","0 0 auto")])}let J2e=E([u("flex","1 1 auto"),u("width","1px"),u("min-height","12px"),u("background",In(x.borderSubtle))]),cD=E([z("flex"),_e("column"),u("gap","2px"),u("flex","1 1 auto"),u("min-width","0"),u("padding-bottom",In(O.sm))]),Q2e=E([Ce("pointer"),Ue([u("background",In(x.surfaceSubtle))]),u("border-radius",In(Y.sm)),u("padding-left","4px"),u("margin-left","-4px")]),Y2e=E([z("flex"),X("center"),yi("wrap"),u("gap",In(O.xs))]),X2e=E([u("font-size",In(T.sizeSm)),u("font-weight",In(T.weightMedium)),u("color",In(x.textPrimary))]),Z2e=E([z("flex"),X("center"),u("gap","6px"),u("font-size",In(T.sizeXs)),u("color",In(x.textSecondary))]),eke=E([u("font-size",In(T.sizeSm)),u("color",In(x.textSecondary)),u("white-space","pre-wrap")]),tke=E([u("font-size",In(T.sizeXs)),u("color",In(x.textDisabled))]);function rke(e){let t=e.entries;if(t.length===0)return _(Kd,{title:"No approvals",description:"Nothing in this window carries a decision."});let r=e.windowNote,n=e.nowMs,i=e.steps,o=t.length-1|0;return L("div",{children:[i!==void 0&&i.length>1?_(N9,{steps:i}):null,_("div",{children:t.map((a,s)=>{let l=Ee(a.onOpen),c=a.actor,d=a.at,f,h=0;c!==void 0||d!==void 0?h=1:f=null,h===1&&(f=L("div",{children:[c!==void 0?L(Bt,{children:[_(Hd,{name:c,src:a.actorImageUrl,size:"Small"}),_("span",{children:c})]}):null,d!==void 0?_("span",{children:Ib(D(n,Date.now()),d),title:D(Lh(d),d)}):null],className:Z2e}));let p=a.note;return L("div",{children:[L("div",{children:[_("span",{children:j2e(a.decision),className:W2e(q2e(a.decision))}),s===o?null:_("div",{className:J2e})],className:H2e}),L("div",{children:[L("div",{children:[_("span",{children:a.step,className:X2e}),_(ia,{variant:B2e(a.decision),label:U2e(a.decision)})],className:Y2e}),f,p!==void 0&&p!==""?_("div",{children:p,className:eke}):null],className:l?cD+" "+Q2e:cD,onClick:m=>ee(a.onOpen,g=>g())})],className:K2e},a.key)}),className:G2e}),r!==void 0?_("span",{children:r,className:tke}):null],className:V2e})}let nke=rke;function sa(e){return e.toLowerCase().replaceAll("_","").replaceAll("-","").replaceAll(" ","")}let ike=["approved","approve","accepted","granted","signed","confirmed","rejected","reject","declined","denied","refused","withdrawn","pending","awaiting","submitted","inreview","underreview","escalated","skipped","waived","notrequired"],oke=["decision","outcome","verdict","approval","approvalstatus","result"],ake=["step","stage","level","tier","approvalstep","approvallevel","phase"],ske=["note","notes","comment","comments","reason","remarks","justification","rationale"];function lke(e){let t=nc(e);if(t!==void 0&&t.length>=2&&t.length<=12)return t}function uke(e){return e.filter(t=>ike.includes(sa(t))).length>=2}function F9(e){return Q(Nr(e),t=>{let r=t[1],n=t[0];if(Mp(r))return q(lke(r),i=>[n,i])})}function cke(e){let t=F9(e),r=t.find(n=>oke.includes(sa(n[0])));return r!==void 0?r:t.find(n=>uke(n[1]))}function dke(e,t){let r=Nr(e).map(n=>n[0]).find(n=>ne(F(t.semantics,n),!1,i=>i.semantic==="UserRef"));return r!==void 0?r:Nr(e).map(n=>n[0]).find(n=>ne(Ja(n),!1,sM))}function I9(e,t){let r=D(t,bn(e,void 0,void 0)),n=cke(e),i=r.dateSpan;if(n===void 0||i===void 0)return;let o=n[0],a=F9(e).find(s=>{let l=s[0];return l!==o?ake.includes(sa(l)):!1});return{decisionField:o,dateSpan:i,stepField:q(a,s=>s[0]),stepValues:ne(a,[],s=>s[1]),actorField:dke(e,r),noteField:Q(Nr(e),s=>{let l=s[0];if(Mp(s[1])&&ske.includes(sa(l)))return l})[0]}}function fke(e){return Ee(I9(e,void 0))}function Wk(e){return e.rows.map((t,r)=>{let n=D(G(t),{});return{key:D(k(F(n,"id"),oe),"#"+r.toString()),json:t,dict:n}})}function bu(e,t){return k(F(e,t),oe)}function dD(e,t){return k(ic(t,e),Qn)}function fD(e,t){if(t===void 0)return e.length;let r=e.findIndex(n=>sa(n)===sa(t));return r!==-1?r:e.length}function hke(e,t,r){let n=r!==void 0?r:f=>f,a=Wk(e).map(f=>{let h=k(t.stepField,m=>bu(f.dict,m)),p=bu(f.dict,t.decisionField);return[f,h,p]}).slice();t.stepField!==void 0?a.sort((f,h)=>fD(t.stepValues,f[1])-fD(t.stepValues,h[1])|0):a.sort((f,h)=>{let p=dD(f[0].dict,t.dateSpan),m=dD(h[0].dict,t.dateSpan);return p!==void 0?m!==void 0?p-m:-1:m!==void 0?1:0});let l=a.map(f=>{let h=f[0];return{key:h.key,step:D(q(f[1],pt),D(k(e.semantics.labelField,p=>bu(h.dict,p)),"Decision")),decision:ne(f[2],"Pending",D9),actor:q(k(t.actorField,p=>bu(h.dict,p)),n),at:ic(t.dateSpan,h.dict),note:k(t.noteField,p=>bu(h.dict,p)),onOpen:()=>e.onOpenRow(h.key,h.json)}}),c=Q(a,f=>q(f[1],sa)),d=t.stepValues.filter(f=>!c.includes(sa(f))).map(f=>({key:"pending:"+f,step:pt(f),decision:"Pending"}));return l.concat(d)}function pke(e,t){let r=t.stepField;if(r===void 0)return[];let n=Wk(e),i=Q(n,a=>{let s=bu(a.dict,r),l=bu(a.dict,t.decisionField);if(s===void 0||l===void 0)return;let c=D9(l);if(!(typeof c!="object"&&c==="Pending"))return sa(s)}),o=t.stepValues.find(a=>!i.includes(sa(a)));return t.stepValues.map(a=>({key:a,label:pt(a),state:i.includes(sa(a))?"Done":Re(o,a)?"Current":"Upcoming"}))}function Ks(e){return e.rows.map((t,r)=>{let n=D(G(t),{});return{key:D(k(F(n,"id"),oe),"#"+r.toString()),json:t,dict:n}})}function vf(e,t){return k(F(e,t),oe)}function P9(e,t,r){return q(vf(t,r),n=>{let i=Ja(r);return i!==void 0?D(k(e.refLabels,o=>o.lookupLabel(i,n)),n):n})}function fc(e,t){return D(k(e.semantics.labelField,r=>vf(t.dict,r)),t.key)}function mke(e,t){return q(e.semantics.imageField,r=>{let n=k(vf(t.dict,r),i=>{if(i!=="")return i});return n!==void 0?{TAG:"Picture",_0:Ou(n)}:"EmptySlot"})}function O9(e,t,r){ee(t.find(n=>n.key===r),n=>e.onOpenRow(n.key,n.json))}function M9(e,t,r){return _("span",{children:rm(e,t,r!==void 0?r:"item"),style:{color:"var("+x.textDisabled+")",fontSize:"var("+T.sizeXs+")"}})}function Pb(e,t,r,n){return L("div",{children:[e,M9(t,r,n!==void 0?n:"item")],style:{display:"flex",flexDirection:"column",gap:"var("+O.sm+")"}})}function gke(e){let t=e.source,r=ga(),n=Ap(),i=Ks(t),o=di(t.schema,"List",r,t.ownEntity,t.semantics.labelField,t.semantics.projectedLabelField),a=hf(i.map(h=>h.dict),o,r,t.ownEntity,ir(t.refLabels)),s=t.refLabels,l=s!==void 0?s:{lookupLabel:(h,p)=>ff(a,h,r,p),isMissing:(h,p)=>em(a,h,r,p),retiredBadge:(h,p)=>Xp(a,h,r,p),linkable:(h,p)=>Zp(a,h,r,p,!1)},c=Q([t.semantics.labelField,t.semantics.imageField,t.semantics.statusField],h=>h),d=o.filter(h=>!c.includes(h.key)).slice(0,4),f=i.map(h=>{let p=q(k(t.semantics.statusField,y=>Sa(h.dict,y)),y=>_(ia,{variant:"Neutral",label:pt(y),dot:!1})),m=k(t.retired,y=>zh(y,F(h.dict,y.field))),g=p!==void 0?m!==void 0?L(Bt,{children:[p,m]}):p:m!==void 0?m:void 0,v=mke(t,h),b=q(t.rowActionsFor,y=>y(h.key,h.json).map(S=>({label:S.label,onClick:S.run})));return{key:h.key,title:fc(t,h),media:v,badge:g,fields:d.map(y=>({label:Au(y,r,t.ownEntity),value:Sl(y.key,y.kind,y.propSchema,F(h.dict,y.key),y.ann,r,n,l,t.ownEntity)})),actions:b}});return Pb(_(r2e,{cards:f,onCardClick:h=>O9(t,i,h)}),[t],void 0,void 0)}function vke(e){let t=Ks(e),r=D(e.semantics.statusField,""),n=co(e.schema,r),i=s=>D(Sa(s.dict,r),""),o=s=>s.map(l=>({value:l,label:l===""?"(no status)":pt(l),cards:t.filter(c=>i(c)===l).map(c=>{let d=Q(Wv(e.schema),f=>{if(f!==r)return P9(e,c.dict,f)})[0];return{key:c.key,title:fc(e,c),meta:d}}),swatch:Gk(n,l)})),a=nt(t.map(i).filter(s=>!n.includes(s)),[],(s,l)=>s.includes(l)?s:s.concat([l]));return o(n).concat(o(a))}function bke(e){let t=e.source,r=Ks(t),n=D(t.semantics.statusField,""),i=vke(t),o=f=>D(k(r.find(h=>h.key===f),h=>Sa(h.dict,n)),""),a=(f,h)=>k(t.statusCommandFor,p=>p(o(f),h)),s=t.onCommand,l=s!==void 0&&Ee(t.statusCommandFor)?(f,h)=>ee(a(f,h),p=>s(p.command,f,p.patch)):void 0,d=t.statusCommandFor!==void 0?(f,h)=>Ee(a(f,h)):void 0;return Pb(_(_Ee,{columns:i,onCardClick:f=>O9(t,r,f),onMove:l,canDrop:d}),[t],void 0,"card")}let Bd=["var("+x.brand+")","#7c9c5e","#b0743c","#7466a3","#4d8a8a","#a35f74"];function Jk(e,t){return D(e.accent,Bd[Fo(t,Bd.length)])}function _ke(e){return e.map((t,r)=>{let n=Jk(t,r),i=t.semantics.dateSpan;return i!==void 0?Q(Ks(t),o=>q(k(ic(i,o.dict),Qn),a=>{let s=k(Mw(i,o.dict),Qn);return{key:r.toString()+":"+o.key,title:fc(t,o),start:a,end_:s,accent:n,onOpen:()=>t.onOpenRow(o.key,o.json)}})):[]}).flat()}function yke(e){let t=e.sources,r=_ke(t),n=t.length>1?t.map((i,o)=>({label:i.readModelName,accent:Jk(i,o)})):[];return _(BEe,{events:r,legend:n,windowNote:rm(t,void 0,void 0)})}function xke(e){return e.map((r,n)=>{let i=r.semantics.dateSpan,o=Jk(r,n);return Ks(r).map(a=>{let s=k(i,f=>ic(f,a.dict)),l=k(s,Qn),c=s!==void 0?D(Lh(s),s):"",d=q(k(r.semantics.statusField,f=>Sa(a.dict,f)),pt);return{entry:{id:n.toString()+":"+a.key,timestamp:c,label:fc(r,a),detail:d,variant:void 0,accent:o},sort:l,open_:()=>r.onOpenRow(a.key,a.json)}})}).flat().toSorted((r,n)=>{let i=r.sort,o=n.sort;return i!==void 0?o!==void 0?o-i:-1:o!==void 0?1:0})}function Ske(e){let t=e.sources,r=xke(t),n=i=>ee(r.find(o=>o.entry.id===i),o=>o.open_());return Pb(_(kxe,{entries:r.map(i=>i.entry),onSelect:n}),t,void 0,void 0)}function L9(e,t){let r=F(e,t);if(r===void 0)return[];let n=oe(r);return n!==void 0?[n]:Q(D(Ct(r),[]),oe)}function wke(e,t){let r=t.map(n=>n.key);return Q(Nr(e.schema),n=>{let i=n[0];return q(Ja(i),o=>i)}).filter(n=>t.some(i=>L9(i.dict,n).some(o=>o!==i.key?r.includes(o):!1)))}function Eke(e){let t=Ks(e),r=wke(e,t),n=mi(e.semantics.dateSpan,iM);return n!==void 0?Q(t,i=>q(k(ic(n,i.dict),Qn),o=>{let a=D(k(Mw(n,i.dict),Qn),o);return{key:i.key,title:fc(e,i),start:o,end_:a<o?o:a,accent:e.accent,dependsOn:r.map(s=>L9(i.dict,s)).flat(),onOpen:()=>e.onOpenRow(i.key,i.json)}})):[]}function kke(e){let t=e.source,r=Eke(t),n=t.rows.length,i=r.length,o=rm([t],i,void 0),a=i===n?o:o+" (the rest carry no start date)";return _(aSe,{tasks:r,windowNote:a})}function Cke(e,t){let r=e.semantics.labelField,n=k(e.semantics.statusField,i=>vf(t.dict,i));return n!==void 0?n:k(Wv(e.schema).find(i=>ca(i,r)?ca(i,e.semantics.parentField):!1),i=>P9(e,t.dict,i))}function Rke(e){let t=Ks(e),r=e.semantics.parentField;return t.map(n=>({key:n.key,title:fc(e,n),subtitle:Cke(e,n),parent:k(r,i=>vf(n.dict,i)),accent:e.accent,onOpen:()=>e.onOpenRow(n.key,n.json)}))}function Ake(e){let t=e.source,r=Rke(t);return _(mxe,{nodes:r,windowNote:rm([t],void 0,void 0)})}function Tke(e){let t=e.source,r=ga(),n=Wk(t),i=di(t.schema,"List",r,t.ownEntity,t.semantics.labelField,t.semantics.projectedLabelField),o=hf(n.map(h=>h.dict),i,r,t.ownEntity,ir(t.refLabels)),a=t.refLabels,s=a!==void 0?a.lookupLabel:(h,p)=>ff(o,h,r,p),l=I9(t.schema,t.semantics);if(l===void 0)return null;let d=hke(t,l,h=>{let p=k(l.actorField,Ja);return p!==void 0?D(s(p,h),h):h}),f=pke(t,l);return _(nke,{entries:d,steps:f,windowNote:rm([t],void 0,"decision")})}function $ke(e){return Q(Nr(e),t=>{let r=nc(t[1]);if(r!==void 0&&r.length>=2&&r.length<=12)return[t[0],r]})}function z9(e){let t=$ke(e),r=bn(e,void 0,void 0).statusField,n=r!==void 0&&t.some(a=>a[0]===r)?t.filter(a=>a[0]===r).concat(t.filter(a=>a[0]!==r)):t,i=n[0],o=n[1];if(i!==void 0&&o!==void 0)return[i,o]}function Nke(e){return q(z9(e.schema),t=>{let r=t[1],n=r[1],i=r[0],o=t[0],a=o[1],s=o[0],l=Ks(e),c=(b,y)=>D(Sa(b.dict,y),""),d=(b,y)=>nt(l.map(S=>c(S,b)).filter(S=>!y.includes(S)),[],(S,w)=>S.includes(w)?S:S.concat([w])),f=a.concat(d(s,a)),h=n.concat(d(i,n)),p=f.map(b=>h.map(y=>nt(l,0,(S,w)=>c(w,s)===b&&c(w,i)===y?S+1|0:S))),m=p.map(b=>nt(b,0,(y,S)=>y+S|0)),g=h.map((b,y)=>nt(p,0,(S,w)=>S+w[y]|0)),v=nt(m,0,(b,y)=>b+y|0);return{rowField:s,colField:i,rowValues:f,colValues:h,counts:p,rowTotals:m,colTotals:g,grandTotal:v}})}function Dke(e,t){return jO(e.toString(),MJ(t))}function Fke(e){let t=e.source,r=ce(()=>"Numbers"),n=r[1],i=r[0],o=Nke(t);if(o===void 0)return null;let a=g=>g===""?"(none)":pt(g),s=pt(o.rowField),l=pt(o.colField),c=o.rowValues.map(g=>[g,a(g)]),d=o.colValues.map(g=>[g,a(g)]),f=nt(o.counts,0,(g,v)=>nt(v,g,(b,y)=>y>b?y:b)),h=g=>Dke(g,n2([t])),p=(g,v)=>_("button",{children:v,style:{background:"none",backgroundColor:i===g?"var("+x.surfaceSubtle+")":"transparent",border:"1px solid var("+x.border+")",color:i===g?"var("+x.textPrimary+")":"var("+x.textSecondary+")",cursor:"pointer",fontSize:"var("+T.sizeSm+")",padding:"2px var("+O.sm+")",borderRadius:"var("+Y.sm+")"},type:"button",onClick:b=>n(y=>g)}),m;return m=i==="Numbers"?_(mSe,{rowDimLabel:s,colDimLabel:l,rowHeaders:c.map(g=>({value:g[0],label:g[1]})),colHeaders:d.map(g=>({value:g[0],label:g[1]})),cells:o.counts.map(g=>g.map(v=>({display:v.toString(),empty:v===0}))),rowTotals:o.rowTotals.map(h),colTotals:o.colTotals.map(h),grandTotal:h(o.grandTotal)}):_(H1e,{rowDimLabel:s,colDimLabel:l,rowHeaders:c.map(g=>({value:g[0],label:g[1]})),colHeaders:d.map(g=>({value:g[0],label:g[1]})),cells:o.counts.map(g=>g.map(v=>({value:v,display:v.toString()}))),maxLabel:f.toString()}),L("div",{children:[L("div",{children:[p("Numbers","Numbers"),p("Heat","Heat")],style:{display:"inline-flex",alignSelf:"flex-end",gap:"var("+O.xs+")"}}),m,M9([t],void 0,"row")],style:{display:"flex",flexDirection:"column",gap:"var("+O.sm+")"}})}function Ike(e){return e.map((t,r)=>{let n=t.semantics.imageField;return Ks(t).map(i=>{let o=k(k(n,c=>vf(i.dict,c)),c=>{if(c!=="")return Ou(c)}),a=q(k(t.semantics.statusField,c=>Sa(i.dict,c)),pt),s=t.fillSlot,l=o!==void 0||s===void 0||n===void 0?void 0:s(i.key,n);return{item:{key:r.toString()+":"+i.key,src:o,title:fc(t,i),caption:a,onUpload:l},open_:()=>t.onOpenRow(i.key,i.json)}})}).flat()}function Pke(e){let t=e.sources,r=Ike(t),n=i=>ee(r.find(o=>o.item.key===i),o=>o.open_());return Pb(_(RSe,{items:r.map(i=>i.item),onOpen:n}),t,void 0,void 0)}function Hs(e){return _("span",{children:e,"aria-hidden":!0,style:{fontSize:"0.9em",lineHeight:"1"}})}function bf(e,t){let r=e[0];return r!==void 0?t(r):null}ya({id:"cards",label:"Cards",icon:Hs("▤"),arity:"Single",isCapable:(e,t,r)=>!0,render:e=>bf(e,t=>_(gke,{source:t})),capability:"always — richer with label/image semantics and summary fields"});ya({id:"board",label:"Board",icon:Hs("▥"),arity:"Single",isCapable:(e,t,r)=>ne(t.statusField,!1,n=>co(e,n).length!==0),render:e=>bf(e,t=>_(bke,{source:t})),capability:"statusField — status/state/stage string enum (≤ 8 values) supplying the columns"});ya({id:"calendar",label:"Calendar",icon:Hs("▣"),arity:{TAG:"Multi",min:1},isCapable:(e,t,r)=>Ee(t.dateSpan),render:e=>_(yke,{sources:e}),capability:"dateSpan — a `date-range` field, a start*/end* date-time pair, or a lone non-infrastructure date field"});ya({id:"timeline",label:"Timeline",icon:Hs("▚"),arity:{TAG:"Multi",min:2},isCapable:(e,t,r)=>Ee(t.dateSpan),render:e=>_(Ske,{sources:e}),capability:"dateSpan — a date field to place rows on a most-recent-first chronological stream; several sources merge into one stream, accent-coded per source"});ya({id:"gantt",label:"Gantt",icon:Hs("▬"),arity:"Single",isCapable:(e,t,r)=>ne(t.dateSpan,!1,iM),render:e=>bf(e,t=>_(kke,{source:t})),capability:"dateSpan stating an end — a `date-range` field or a start*/end* date-time pair; dependency connectors come from entity-ref fields whose ids point at other loaded rows"});ya({id:"hierarchy",label:"Hierarchy",icon:Hs("⑂"),arity:"Single",isCapable:(e,t,r)=>Ee(t.parentField),render:e=>bf(e,t=>_(Ake,{source:t})),capability:"parentField — a parent*/manager/reportsTo/supervisor string field (or one annotated `parent-ref`) whose values point at other rows of the same collection"});ya({id:"approvals",label:"Approvals",icon:Hs("✓"),arity:"Single",isCapable:(e,t,r)=>fke(e),render:e=>bf(e,t=>_(Tke,{source:t})),capability:"a decision enum — a small string enum named decision/outcome/verdict/approval/result, or any small enum declaring two or more approval values (approved/rejected/pending/…) — plus a date field to sequence the chain"});ya({id:"pivot",label:"Pivot",icon:Hs("⊞"),arity:"Single",isCapable:(e,t,r)=>Ee(z9(e)),render:e=>bf(e,t=>_(Fke,{source:t})),capability:"two small string enums (2–12 values) as the row and column dimensions"});ya({id:"gallery",label:"Gallery",icon:Hs("▨"),arity:"Single",isCapable:(e,t,r)=>Ee(t.imageField),render:e=>_(Pke,{sources:e}),capability:"imageField — a string field named image/imageUrl/photo/avatar/thumbnail (or annotated `image`) supplying each row's picture"});function hD(e,t){return e===t?0:e<t?-1:1}function Oke(e){return typeof e!="object"?e==="KBoolean"?[["true","Yes"],["false","No"]]:void 0:e.TAG==="KEnum"?e._0.map(t=>[t,t]):void 0}function uh(e,t){if(t===void 0)return"";let r=Xe(t),n=0;if(typeof r!="object"){if(r==="JSONNull")return"";n=2}else switch(r.TAG){case"JSONString":return r._0;case"JSONNumber":return r._0.toString();default:n=2}if(n===2){if(typeof e!="object")switch(e){case"KBoolean":return typeof r!="object"?r==="JSONFalse"?"No":"Yes":JSON.stringify(t);case"KArrayOfStrings":if(typeof r=="object")return r.TAG==="JSONObject"?JSON.stringify(t):Q(r._0,oe).join(", ");break}else if(e.TAG==="KUnion"&&typeof r=="object"){if(r.TAG!=="JSONObject")return JSON.stringify(t);let i=Jv(t);if(i===void 0)return"";let o=i[0];return ne(Sw(e._0,o),o,a=>a.tag)}}return typeof r!="object"?r==="JSONFalse"?"false":"true":JSON.stringify(t)}function Mke(e,t,r){let n=a=>a!==void 0?Xe(a)==="JSONNull":!0,i=n(t),o=n(r);if(i)return o?0:1;if(o)return-1;if(typeof e!="object")switch(e){case"KBoolean":let a=c=>{if(c===void 0)return 0;let d=Xe(c);if(typeof d=="object")return 0;switch(d){case"JSONTrue":return 1;default:return 0}};return a(t)-a(r);case"KDate":return hD(uh(e,t),uh(e,r));case"KNumber":let s=D(k(t,Li),0),l=D(k(r,Li),0);return s-l}return hD(uh(e,t),uh(e,r))}function Lke(e,t,r){if(r==="")return!0;if(typeof e=="object")return e.TAG==="KEnum"?ne(k(t,oe),!1,i=>i===r):!0;if(e!=="KBoolean")return!0;let n=q(t,Xe);if(n===void 0||typeof n=="object")return!1;switch(n){case"JSONFalse":return r==="false";case"JSONTrue":return r==="true";default:return!1}}function zke(e,t,r){if(r==="")return!0;let n=r.toLowerCase();return t.some(i=>uh(i.kind,F(e,i.key)).toLowerCase().includes(n))}function Uke(e,t,r){let n=$e(r).filter(i=>i[1]!=="");return n.length===0?e:e.filter(i=>n.every(o=>{let a=o[0],s=t.find(l=>l.key===a);return s!==void 0?Lke(s.kind,F(i,a),o[1]):!0}))}function Bke(e,t,r){return r===""?e:e.filter(n=>zke(n,t,r))}function jke(e,t,r,n){if(r===void 0)return e;let i=t.find(a=>a.key===r);if(i===void 0)return e;let o=n==="Asc"?1:-1;return e.toSorted((a,s)=>Mke(i.kind,F(a,r),F(s,r))*o)}function qke(e,t){return Q(e,r=>{if(!oue(r.kind))return;let n=Oke(r.kind);if(n===void 0)return;let i=n.map(o=>({label:o[1],value:o[0]}));return{key:r.key,label:r.label,options:i,value:D(F(t,r.key),"")}})}function Xo(e){return"var("+e+")"}let Vke=E([$t("relative"),z("inlineFlex"),X("center")]),Gke=E([u("background",Xo(x.surface)),u("border","1px solid var("+x.border+")"),u("border-radius",Xo(Y.md)),u("padding","var("+O.xs+") var("+O.md+")"),u("padding-left","32px"),u("font-size",Xo(T.sizeMd)),u("color",Xo(x.textPrimary)),u("outline","none"),u("width","240px"),js([u("border-color",Xo(x.brand))]),sJ([u("color",Xo(x.textDisabled))])]),Kke=E([$t("absolute"),zs(ke(10)),u("color",Xo(x.textDisabled)),u("font-size",Xo(T.sizeSm)),u("pointer-events","none")]),Hke=E([$t("absolute"),Bs(ke(8)),u("background","none"),u("border","none"),u("cursor","pointer"),u("color",Xo(x.textDisabled)),u("font-size",Xo(T.sizeSm)),u("padding","0"),u("line-height","1"),Ue([u("color",Xo(x.textSecondary))])]);function Wke(e){let t=e.placeholder,r=e.onChange,n=e.value,i=t!==void 0?t:"Search...";return L("div",{children:[_("span",{children:"/",className:Kke}),_("input",{className:Gke,placeholder:i,type:"text",value:n,onChange:o=>r(o.target.value)}),n!==""?_("button",{children:"x",className:Hke,onClick:o=>r("")}):null],className:Vke})}let U9=Wke;function gl(e){return"var("+e+")"}let Jke=E([z("flex"),X("center"),u("gap",gl(O.sm)),yi("wrap")]),Qke=E([z("flex"),X("center"),u("gap","4px")]),Yke=E([u("color",gl(x.textSecondary)),u("font-size",gl(T.sizeSm)),u("white-space","nowrap")]),Xke=E([u("background",gl(x.surface)),u("border","1px solid var("+x.border+")"),u("border-radius",gl(Y.sm)),u("padding","2px var("+O.sm+")"),u("font-size",gl(T.sizeSm)),u("color",gl(x.textPrimary)),u("cursor","pointer"),u("outline","none"),js([u("border-color",gl(x.brand))])]);function B9(e){let t=e.onChange,r=e.filter;return L("div",{children:[_("span",{children:r.label+":",className:Yke}),L("select",{children:[_("option",{children:"All",value:""}),r.options.map(n=>_("option",{children:n.label,value:n.value},n.value))],className:Xke,value:r.value,onChange:n=>t(r.key,n.target.value)})],className:Qke})}let Zke={make:B9};function eCe(e){let t=e.onSearchChange,r=e.searchValue,n=e.onFilterChange;return L("div",{children:[r!==void 0&&t!==void 0?_(U9,{value:r,onChange:t}):null,e.filters.map(i=>_(B9,{filter:i,onChange:n},i.key))],className:Jke})}let j9=eCe;function Qk(){let e=ce(()=>{}),t=e[1],r=e[0],n=o=>{if(typeof o!="object")return t(s=>{});let a=o._0;t(s=>a)};return{element:r!==void 0?_(Nk,{variant:"Error",title:r.command,message:r.reason,onDismiss:()=>t(o=>{})}):null,onNotice:n}}function pD(e){try{return decodeURIComponent(e)}catch{return e}}function tCe(e,t){return encodeURIComponent(e)+"/"+encodeURIComponent(t)}function mD(e){let t=e.split("/");if(t.length!==2)return[e,void 0];let r=t[0],n=t[1];return[pD(r),pD(n)]}function to(e){return"var("+e+")"}let rCe=E([z("flex"),_e("column"),X("center"),Ze("center"),u("gap",to(O.md)),ai(1),u("min-height","160px"),Ya("center"),u("padding",to(O.lg))]),nCe=E([u("font-size","32px"),u("color",to(x.error)),u("line-height","1")]),iCe=E([u("color",to(x.textPrimary)),u("font-size",to(T.sizeLg)),u("font-weight",to(T.weightMedium)),_n(ke(0))]),oCe=E([u("color",to(x.textSecondary)),u("font-size",to(T.sizeSm)),u("line-height",to(T.lineHeightNormal)),_n(ke(0))]),aCe=E([u("background",to(x.brand)),u("color",to(x.textOnBrand)),u("border","none"),u("border-radius",to(Y.md)),u("padding","var("+O.xs+") var("+O.md+")"),u("font-size",to(T.sizeSm)),u("cursor","pointer"),Uo(ke(4))]);function sCe(e){let t=e.title,r=t!==void 0?t:"Something went wrong";return L("div",{children:[_("div",{children:"X",className:nCe}),_("h3",{children:r,className:iCe}),ne(e.detail,null,n=>_("p",{children:n,className:oCe})),ne(e.onRetry,null,n=>_("button",{children:"Try again",className:aCe,onClick:i=>n()}))],className:rCe})}let Ia=sCe;function lCe(e){return e.metaKey||e.ctrlKey||e.shiftKey||e.altKey?!0:e.button!==0}function Dl(e){return"var("+e+")"}let uCe=E([z("flex"),X("center"),u("gap",Dl(O.xs)),u("font-size",Dl(T.sizeSm)),u("color",Dl(x.textSecondary)),u("min-width","0")]),cCe=E([u("color",Dl(x.brand)),u("text-decoration","none"),u("white-space","nowrap"),u("overflow","hidden"),u("text-overflow","ellipsis"),u("max-width","18ch"),Ue([u("text-decoration","underline")])]),dCe=E([u("color",Dl(x.textPrimary)),u("font-weight",Dl(T.weightMedium))]),fCe=E([u("color",Dl(x.textDisabled)),u("font-size",Dl(T.sizeLg)),u("line-height","1"),rn(0),LO("none")]),q9=_("span",{children:"›","aria-hidden":!0,className:fCe});function hCe(e){let t=e.allLinks,r=e.crumbs,n=t!==void 0?t:!1;return _("nav",{children:r.map((i,o)=>{let a=!n&&o===(r.length-1|0);return L(Nv,{children:[o>0?q9:null,a||ir(i.href)&&ir(i.onClick)?_("span",{children:i.label,className:dCe}):_("a",{children:i.label,className:cCe,title:i.label,href:D(i.href,"#"),onClick:q(i.onClick,s=>(l=>{if(!lCe(l))return l.preventDefault(),s()}))})]},i.label)}),"aria-label":"breadcrumbs",className:uCe})}let V9=hCe;function wo(e){return"var("+e+")"}let pCe=E([$t("relative"),z("inlineBlock")]),mCe=E([u("background","none"),u("border","1px solid var("+x.border+")"),u("border-radius",wo(Y.sm)),u("cursor","pointer"),u("color",wo(x.textSecondary)),u("padding","2px var("+O.sm+")"),u("font-size",wo(T.sizeSm)),Ue([u("background",wo(x.surfaceSubtle)),u("color",wo(x.textPrimary))])]),gCe=E([$t("absolute"),Bs(ke(0)),Bo({NAME:"percent",VAL:100}),Uo(ke(4)),u("background",wo(x.surfaceElevated)),u("border","1px solid var("+x.border+")"),u("border-radius",wo(Y.md)),u("box-shadow",wo(Zr.md)),u("min-width","160px"),u("z-index","200"),u("overflow","hidden"),oJ(ke(4),ke(0))]);function vCe(e){return E([z("block"),ma({NAME:"percent",VAL:100}),u("background","none"),u("border","none"),u("text-align","left"),u("padding","var("+O.xs+") var("+O.md+")"),u("font-size",wo(T.sizeMd)),u("color",wo(e?x.error:x.textPrimary)),Ce("pointer"),Ue([u("background",wo(x.surfaceSubtle))])])}let bCe=E([u("border","none"),u("border-top","1px solid var("+x.borderSubtle+")"),ZW(ke(4),ke(0))]);function _Ce(e){let t=e.triggerLabel,r=t!==void 0?t:"...",n=ce(()=>!1),i=n[1],o=n[0];return Ae(()=>{if(!o)return;let a=s=>i(l=>!1);return document.addEventListener("click",a),()=>{document.removeEventListener("click",a)}},[o]),L("div",{children:[_("button",{children:r,className:mCe,onClick:a=>{a.stopPropagation(),i(s=>!s)}}),o?_("div",{children:e.items.map((a,s)=>{if(typeof a!="object")return _("hr",{className:bCe},s.toString());let l=a.onClick,c=a.label;return _("button",{children:c,className:vCe(a.danger),onClick:d=>{i(f=>!1),l()}},c)}),className:gCe,onClick:a=>{a.stopPropagation()}}):null],className:pCe})}let G9=_Ce;function Ua(e){return"var("+e+")"}let yCe=E([z("flex"),X("center"),u("gap",Ua(O.md)),u("flex-wrap","wrap"),u("padding-bottom",Ua(O.sm)),u("border-bottom","1px solid var("+x.borderSubtle+")")]),K9=E([u("display","inline-flex"),X("center"),u("vertical-align","middle"),u("gap",Ua(O.xs)),u("min-width","0"),u("max-width","100%"),u("margin-right",Ua(O.md)),u("flex","0 1 auto")]),xCe=E([u("font-size",Ua(T.sizeLg)),u("font-weight",Ua(T.weightMedium)),u("color",Ua(x.textPrimary)),u("line-height",Ua(T.lineHeightTight)),_n(ke(0)),u("min-width","8ch"),u("white-space","nowrap"),u("overflow","hidden"),u("text-overflow","ellipsis")]),SCe=E([u("display","inline-flex"),X("center"),u("vertical-align","middle"),u("flex-wrap","wrap"),u("gap",Ua(O.sm)),u("flex","0 1 auto"),u("min-width","0"),u("max-width","100%")]),wCe=E([z("flex"),X("center"),u("flex-wrap","wrap"),Ze("flexEnd"),u("gap",Ua(O.sm)),rn(0),u("margin-left","auto")]),ECe={titleGroup:K9};function Du(e){return"var("+e+")"}let H9=E([z("inlineFlex"),X("center"),u("gap","4px"),u("border-radius",Du(Y.md)),u("padding","2px var("+O.sm+")"),u("font-size",Du(T.sizeSm)),u("line-height","1.6"),u("white-space","nowrap"),Ce("pointer"),Nw([u("opacity","0.4"),Ce("notAllowed")])]),kCe=yr([H9,E([u("background",Du(x.brand)),u("color",Du(x.textOnBrand)),u("border","1px solid transparent"),Ue([u("filter","brightness(1.08)")])])]),W9=yr([H9,E([u("background",Du(x.surface)),u("color",Du(x.textPrimary)),u("border","1px solid var("+x.border+")"),Ue([u("background",Du(x.surfaceSubtle))])])]);function CCe(e){let t=e.inBar,r=e.actions,n=e.commands,i=e.titleAccessory,o=e.title,a=e.crumbs,s=a!==void 0?a:[],l=i!==void 0?i:null,c=n!==void 0?n:[],d=r!==void 0?r:null,f=t!==void 0?t:!1,h=w_e(),p=bd(Jn.narrow),m=s.length!==0,g=w=>_("button",{children:w.label,className:D(w.primary,!1)?kCe:W9,onClick:C=>w.run()},w.key),v=p&&c.length>2,b;if(v){let w=c.slice(1);b=L(Bt,{children:[ne(c[0],null,g),_(G9,{items:w.map(C=>({TAG:"Action",label:C.label,onClick:C.run,danger:!1})),triggerLabel:"⋯ "+w.length.toString()})]})}else b=c.map(g);let y=ne(e.controls,null,w=>dv(f?h:void 0,_("div",{children:w,className:wCe}))),S=L(Bt,{children:[L("div",{children:[m?_(V9,{crumbs:s,allLinks:!0}):null,m?q9:null,_("h1",{children:o,className:xCe,title:o}),l],className:K9}),L("div",{children:[b,d],className:SCe}),y]});return f?S:_("div",{children:S,className:yCe})}let RCe=W9,J9=CCe;function Q9(e,t){return t!==void 0?(r,n)=>t(r,n).then(Rxe):e!==void 0?(r,n)=>e(r,n).then(Yz):void 0}function cm(){let e=si(),t=Yp();return Q9(e,t)}let ACe=Oe([["ProductsNotAvailable",{template:"These products aren't available yet: {{missing}}.",idFields:[{field:"missing",entityStem:"product"}]}],["OrderAlreadyPlaced",{template:"This order has already been placed.",idFields:[]}],["CategoryAlreadyArchived",{template:"This category is already archived.",idFields:[]}]]);function TCe(e,t){return e!==void 0?t!==void 0?t+" ("+e+")":"Command rejected: "+e:t!==void 0?t:"Command rejected"}function gD(e,t){return ne(k(G(e),r=>F(r,t)),[],r=>{let n=Xe(r);if(typeof n!="object")return[];switch(n.TAG){case"JSONString":let i=n._0;return i!==""?[i]:[];case"JSONArray":return Q(n._0,oe).filter(o=>o!=="");default:return[]}})}function $Ce(e){return k(e,t=>{try{return JSON.parse(t)}catch{return}})}function vD(e,t){return nt($e(t),e,(r,n)=>r.replaceAll("{{"+n[0]+"}}",n[1]))}function NCe(e,t,r,n){let i=jo(t,r);return i!==void 0?Lt(t2(e,i,n).then(o=>{let a=o[0];return n.map(s=>{let l=F(a,s);return l!==void 0?l:s})}),o=>Promise.resolve(n)):Promise.resolve(n)}function dm(e,t,r,n){let i=TCe(r,n);if(r===void 0)return Promise.resolve(i);let o=F(ACe,r);if(o===void 0)return Promise.resolve(i);if(o.idFields.length===0)return Promise.resolve(o.template);let a=$Ce(n);if(a===void 0)return Promise.resolve(o.template);if(e!==void 0){let l=o.idFields.map(c=>{let d=c.field,f=gD(a,d);return f.length===0?Promise.resolve([d,""]):NCe(e,t,c.entityStem,f).then(h=>Promise.resolve([d,h.join(", ")]))});return Promise.all(l).then(c=>{let d={};return c.forEach(f=>{d[f[0]]=f[1]}),Promise.resolve(vD(o.template,d))})}let s={};return o.idFields.forEach(l=>{let c=l.field,d=gD(a,c);s[c]=d.join(", ")}),Promise.resolve(vD(o.template,s))}let DCe="The request failed — the change was not sent.",bD="This command could not be sent. See the console for details.";function FCe(e,t,r){let n={};return $e(D(G(r),{})).forEach(i=>{n[i[0]]=i[1]}),n[D(e.aggregateIdField,"id")]=t,n}function Yk(e,t,r,n,i,o,a,s,l){let c=a!==void 0?a:[],d=s!==void 0?s:m=>{},f=l!==void 0?l:m=>{},h=r.filter(m=>m.level==="Instance"),p=Q9(e,t);return(m,g,v)=>{let b=h.find(y=>y.name===m);if(p!==void 0)if(b!==void 0){f(g),Lt(p(b.mutationDocument,FCe(b,g,v)).then(y=>{if(typeof y!="object")return y==="Accepted"?(i||o(),d("Cleared"),Promise.resolve()):(i||setTimeout(()=>o(),500),d("Cleared"),Promise.resolve());{if(y.TAG==="Rejected"){let w=y._0;return console.warn("[AutoUI] "+n+": command "+m+" rejected"+ne(w.errorCode,"",C=>" ("+C+")")),o(),dm(e,c,w.errorCode,w.detail).then(C=>(d({TAG:"Failed",_0:{command:b.label,reason:C}}),Promise.resolve()))}let S=y._0;return console.error("[AutoUI] "+n+": command "+m+" not executed — "+S),o(),d({TAG:"Failed",_0:{command:b.label,reason:S}}),Promise.resolve()}}),y=>(console.error("[AutoUI] "+n+": command "+m+" failed to reach the server"),d({TAG:"Failed",_0:{command:b.label,reason:DCe}}),o(),Promise.resolve()));return}else return console.error("[AutoUI] "+n+': command "'+m+'" is not an instance command of this view'),d({TAG:"Failed",_0:{command:m,reason:bD}});else return console.error("[AutoUI] "+n+': command "'+m+'" not sent — no GraphQL executor in context'),d({TAG:"Failed",_0:{command:m,reason:bD}})}}let ICe=500;function fi(e){return"var("+e+")"}let PCe=E([$t("relative"),z("inlineBlock")]),OCe=E([z("inlineFlex"),X("center"),u("gap","6px"),u("background",fi(x.surface)),u("border","1px solid var("+x.border+")"),u("border-radius",fi(Y.sm)),u("padding","2px var("+O.sm+")"),u("color",fi(x.textSecondary)),u("font-size",fi(T.sizeSm)),u("white-space","nowrap"),Ce("pointer"),Ue([u("background",fi(x.surfaceSubtle)),u("color",fi(x.textPrimary))])]),MCe=E([z("inlineFlex"),X("center"),Ze("center"),u("min-width","16px"),u("height","16px"),u("padding","0 4px"),u("border-radius",fi(Y.full)),u("background",fi(x.brand)),u("color",fi(x.textOnBrand)),u("font-size",fi(T.sizeXs)),u("line-height","1")]),LCe=E([$t("absolute"),zs(ke(0)),Bo({NAME:"percent",VAL:100}),Uo(ke(4)),z("flex"),_e("column"),u("gap",fi(O.sm)),u("align-items","stretch"),u("background",fi(x.surfaceElevated)),u("border","1px solid var("+x.border+")"),u("border-radius",fi(Y.md)),u("box-shadow",fi(Zr.md)),u("padding",fi(O.md)),u("min-width","220px"),u("max-width","min(320px, calc(100vw - 32px))"),u("max-height","min(60vh, 420px)"),u("overflow-y","auto"),u("z-index","200")]);function zCe(e){let t=e.label,r=e.activeCount,n=t!==void 0?t:"Filters",i=ce(()=>!1),o=i[1],a=i[0];return Ae(()=>{if(!a)return;let s=l=>o(c=>!1);return document.addEventListener("click",s),()=>{document.removeEventListener("click",s)}},[a]),L("div",{children:[L("button",{children:[n,r>0?_("span",{children:r.toString(),className:MCe}):null,_("span",{children:"▾","aria-hidden":!0})],"aria-expanded":a,className:OCe,onClick:s=>{s.stopPropagation(),o(l=>!l)}}),a?_("div",{children:e.children,className:LCe,onKeyDown:s=>{if(s.key==="Escape")return o(l=>!1)},onClick:s=>{s.stopPropagation()}}):null],className:PCe})}let UCe=zCe;function jS(e){return"var("+e+")"}let BCe=E([z("grid"),u("grid-template-columns","minmax(0, 1fr) minmax(0, 1.4fr)"),u("gap",jS(O.lg)),u("align-items","start"),Va(Jn.narrow,[u("grid-template-columns","minmax(0, 1fr)")])]),Y9=E([u("min-width","0"),u("overflow","auto")]),jCe=yr([Y9,E([u("border-left","1px solid var("+x.border+")"),u("padding-left",jS(O.lg)),Va(Jn.narrow,[u("border-left","none"),u("padding-left","0"),u("border-top","1px solid var("+x.border+")"),u("padding-top",jS(O.lg))])])]);function qCe(e){return L("div",{children:[_("div",{children:e.master,className:Y9}),_("div",{children:e.detail,className:jCe})],className:BCe})}let VCe=qCe;function yp(e){return"var("+e+")"}let GCe=E([z("flex"),_e("column"),X("center"),Ze("center"),u("gap",yp(O.md)),ai(1),u("min-height","160px"),u("color",yp(x.textSecondary))]),KCe=E([u("width","32px"),u("height","32px"),u("border","3px solid var("+x.borderSubtle+")"),u("border-top-color",yp(x.brand)),u("border-radius","50%"),u("animation","rv-spin 0.7s linear infinite")]),HCe=E([u("font-size",yp(T.sizeSm)),u("color",yp(x.textSecondary))]);pJ("@keyframes rv-spin",[lr("from",[u("transform","rotate(0deg)")]),lr("to",[u("transform","rotate(360deg)")])]);function WCe(e){return L("div",{children:[_("div",{className:KCe}),ne(e.label,null,t=>_("span",{children:t,className:HCe}))],className:GCe})}let yd=WCe;function JCe(e,t){return D(k(F(e,t),oe),"")}function QCe(e,t,r){let n={},i=[];e.forEach(a=>{let s=JCe(a,t),l=F(n,s);l!==void 0?l.push(a):(n[s]=[a],i.push(s))});let o=a=>{if(a==="")return r.length+1|0;let s=r.indexOf(a);return s!==-1?s:r.length};return i.toSorted((a,s)=>{let l=o(a),c=o(s);return l!==c?l-c|0:a<s?-1:a>s?1:0}).map(a=>[a,D(F(n,a),[])])}function go(e){return k(k(G(e),t=>F(t,"id")),oe)}function X9(e){return D(q(k(k(G(e),t=>F(t,"properties")),G),t=>Object.keys(t)),[])}function Th(e,t){return k(G(e),r=>F(r,t))}function YCe(e,t,r,n){let i=n!==void 0?n:[],o=G(e),a=G(t);if(o===void 0||a===void 0)return e;let s=Oe($e(o));return r.filter(l=>!i.includes(l)).forEach(l=>{let c=F(a,l),d=F(o,l);if(c!==void 0){s[l]=c;return}else if(d!==void 0){s[l]=null;return}else return}),s}function Z9(e){return e.startsWith("__")?!0:e.startsWith("$")}function XCe(e){let t=e.toLowerCase(),r=t.length;return r>2&&t.endsWith("id")?!0:r>3?t.endsWith("ids"):!1}let e7="$offload";function qS(e){let t=Xe(e);if(typeof t!="object")return!1;switch(t.TAG){case"JSONObject":let r=t._0;return Ee(F(r,e7))?!0:Tp(r).some(qS);case"JSONArray":return t._0.some(qS);default:return!1}}function VS(e){let t=Xe(e);if(typeof t=="object")switch(t.TAG){case"JSONObject":let r=t._0,n=k(F(r,e7),G);if(n===void 0)return nt(Tp(r),void 0,(o,a)=>Wn(o,VS(a)));let i=k(F(n,"hash"),oe);return i!==void 0?i:k(F(n,"key"),oe);case"JSONArray":return nt(t._0,void 0,(o,a)=>Wn(o,VS(a)));default:return}}function t7(e,t){return Q(t,r=>q(k(Th(e,r),VS),n=>[r,n]))}function ZCe(e,t,r,n){let i=n!==void 0?n:[],o=r.some(l=>i.includes(l)?!1:ne(Th(t,l),!1,qS)),s=ne(G(e),!1,l=>Object.keys(l).some(c=>Z9(c)?!1:!r.includes(c)))&&r.some(l=>XCe(l)?ca(Th(e,l),Th(t,l)):!1);return o?!1:!s}let _D=new Map;function eRe(e,t){let r=ne(G(e),[],i=>Object.keys(i).filter(o=>Z9(o)?!1:!t.includes(o)));if(r.length===0)return;let n=r.join(",");if(ir(_D.get(n))){_D.set(n,!0),console.warn("AutoLiveApply: the live-update payload carries fields the state schema does not declare ("+n+") — they will not be merged. The persisted manifest is likely behind the deployed projection.");return}}function tRe(e,t,r,n){return Q(t7(t,r),i=>{let o=i[1],a=i[0],s=n.some(c=>c[0]===a?c[1]===o:!1),l=ne(Th(e,a),!1,c=>Xe(c)!=="JSONNull");if(s&&l)return a})}function r7(e,t,r,n){let i=n!==void 0?n:[],o=t.state;if(o===void 0)return;let a=X9(r);if(a.length===0)return;eRe(o,a);let s=tRe(e,o,a,i),l=YCe(e,o,a,s);if(ZCe(e,l,a,s))return l}function rRe(e,t){return r7({},e,t,void 0)}function nRe(e,t,r){return q(k(k(G(t),n=>F(n,r)),Ct),n=>{let i=Q(n,go);return{rows:n,gone:e.filter(o=>!i.includes(o))}})}function iRe(e,t){let r=k(G(e),n=>F(n,t));if(r!==void 0)return Xe(r)==="JSONNull"?"Absent":{TAG:"Present",_0:r}}function oRe(e,t){return t.length===0?e:e.filter(r=>{let n=go(r);return n!==void 0?!t.includes(n):!0})}let Hy={fromBatch:nRe,fromSingle:iRe,drop:oRe},aRe=/^[0-9]+$/;function yD(e){if(!aRe.test(e))return;let t=e.length,r=n=>{for(;;){let i=n;if(!(i<(t-1|0)&&Re(e[i],"0")))return i;n=i+1|0}};return e.slice(r(0))}function sRe(e,t){let r=yD(e),n=yD(t);if(r===void 0||n===void 0)return!0;let i=r.length,o=n.length;return i===o?r>n:i>o}function lRe(){return new Map}function n7(e,t,r){if(r===void 0)return!0;let n=e.get(t);return n!==void 0?sRe(r,n):!0}function uRe(e,t,r){if(r!==void 0&&n7(e,t,r)){e.set(t,r);return}}let gs={make:lRe,shouldApply:n7,record:uRe};function cRe(){return new Map}function i7(e,t){return D(e.get(t),[])}function o7(e,t,r){if(r.length!==0){e.set(t,r);return}}function dRe(e,t,r,n){let i=r7(t,r,n,i7(e,r.id)),o=r.state;return o!==void 0&&o7(e,r.id,t7(o,X9(n))),i}let td={make:cRe,known:i7,record:o7,apply:dRe},xD=21;function a7(e,t,r){return Q(e5(e,t),n=>{let i=k(F(n,"id"),oe),o=D(k(F(n,r),oe),D(i,""));return q(i,a=>({id:a,label:o}))})}function fRe(e,t){let r=si(),n=ce(()=>({loading:!0,options:[],hasMore:!1})),i=n[1];return Ae(()=>{let o={contents:!1};if(i(a=>({loading:!0,options:[],hasMore:!1})),r!==void 0){let a=t==="id"?"id":"id "+t,s="query { "+e+"(first: "+xD.toString()+") { edges { node { "+a+" } } } }";Lt(r(s,{}).then(l=>{if(!o.contents){let c=a7(l,e,t),d=c.length>=xD,f=d?c.slice(0,20):c;i(h=>({loading:!1,options:f,hasMore:d}))}return Promise.resolve()}),l=>(o.contents||(console.warn("[AutoUI] RefField "+e+" fetch failed",l),i(c=>({loading:!1,options:[],hasMore:!1}))),Promise.resolve()))}else o.contents||i(a=>({loading:!1,options:[],hasMore:!1}));return()=>{o.contents=!0}},[r,e,t]),n[0]}function hRe(e,t,r){let n=si(),i=ce(()=>({loading:!1,options:[],error:!1})),o=i[1];return Ae(()=>{if(r===""){o(l=>({loading:!1,options:[],error:!1}));return}let a={contents:!1};o(l=>({loading:!0,options:l.options,error:l.error}));let s=setTimeout(()=>{if(a.contents)return;if(n===void 0)return o(f=>({loading:!1,options:[],error:!1}));let l=t==="id"?"id":"id "+t,c="query($q: String!) { "+e+"(first: 20, filter: {searchPrefix: $q}) { edges { node { "+l+" } } } }",d={};d.q=r,Lt(n(c,d).then(f=>{if(!a.contents){let h=a7(f,e,t);o(p=>({loading:!1,options:h,error:!1}))}return Promise.resolve()}),f=>(a.contents||(console.warn("[AutoUI] RefField "+e+" searchPrefix failed; falling back to client-side filter",f),o(h=>({loading:!1,options:[],error:!0}))),Promise.resolve()))},250);return()=>{a.contents=!0,clearTimeout(s)}},[n,r,e]),i[0]}function pRe(e,t,r){let n=si(),i=ce(()=>{}),o=i[1];return Ae(()=>{let a={contents:!1},s=0;if(n!==void 0&&t!==void 0&&t!==""){let l=r==="id"?"id":"id "+r,c="query($id: ID!) { "+e+"(id: $id) { "+l+" } }",d={};d.id=t,Lt(n(c,d).then(f=>{if(!a.contents){let h=G(f),p=D(k(k(h,b=>F(b,"data")),G),{}),m=F(p,e),g=m!==void 0?m:k(h,b=>F(b,e)),v=k(g,G);if(v!==void 0){let b=D(k(F(v,"id"),oe),t),y=D(k(F(v,r),oe),b);o(S=>({id:b,label:y}))}else o(b=>{})}return Promise.resolve()}),f=>Promise.resolve())}else s=1;return s===1&&o(l=>{}),()=>{a.contents=!0}},[n,t,r]),i[0]}function Ar(e){return"var("+e+")"}function ch(e){if(e==="")return[];let t=Ct(JSON.parse(e));return t!==void 0?Q(t,oe):[e]}function mRe(e){return JSON.stringify(e.map(t=>t))}let gRe=E([$t("relative"),ma({NAME:"percent",VAL:100})]),SD=E([u("background",Ar(x.surface)),u("border","1px solid var("+x.border+")"),u("border-radius",Ar(Y.sm)),u("padding","var("+O.xs+") var("+O.sm+")"),u("font-size",Ar(T.sizeMd)),u("color",Ar(x.textPrimary)),u("outline","none"),ma({NAME:"percent",VAL:100}),rJ(ke(34)),z("flex"),X("center"),yi("wrap"),u("gap","4px"),Ce("pointer"),Ya("left"),js([u("border-color",Ar(x.brand))])]),vRe=E([u("border-color",Ar(x.brand))]),bRe=E([u("border-color",Ar(x.error))]),_Re=E([u("color",Ar(x.textSecondary))]),yRe=E([z("inlineFlex"),X("center"),u("background",Ar(x.surfaceSubtle)),u("border","1px solid var("+x.borderSubtle+")"),u("border-radius",Ar(Y.sm)),u("padding","2px 6px"),u("font-size",Ar(T.sizeSm)),u("gap","4px")]),xRe=E([Ce("pointer"),u("color",Ar(x.textSecondary)),u("font-weight",Ar(T.weightBold))]),SRe=E([u("border","none"),u("background","transparent"),u("outline","none"),u("color",Ar(x.textPrimary)),u("font-size",Ar(T.sizeMd)),ai(1),$w(ke(40))]),wRe=E([$t("absolute"),Bo({NAME:"percent",VAL:100}),zs("zero"),Bs("zero"),Uo(ke(2)),u("background",Ar(x.surfaceElevated)),u("border","1px solid var("+x.border+")"),u("border-radius",Ar(Y.sm)),u("box-shadow",Ar(Zr.md)),XW("none"),_n("zero"),iJ("zero"),eJ(ke(240)),nJ("auto"),aJ(20)]),ERe=E([u("padding","var("+O.xs+") var("+O.sm+")"),Ce("pointer"),u("color",Ar(x.textPrimary)),u("font-size",Ar(T.sizeMd))]),kRe=E([u("background",Ar(x.surfaceSubtle))]),CRe=E([u("background",Ar(x.brandSubtle))]),wD=E([u("padding","var("+O.xs+") var("+O.sm+")"),u("color",Ar(x.textSecondary)),u("font-size",Ar(T.sizeSm))]),RRe=(function(e,t){return e.contains(t)});function ARe(e){let t=e.getBoundingClientRect(),r=window.innerHeight-t.bottom-12,n=t.top-12,i=r<240&&n>r,a=Math.max(120,Math.min(240,i?n:r));return[i,a]}function TRe(e){let t=e.autoFocus,r=e.hasError,n=e.onBlur,i=e.onChange,o=e.value,a=e.required,s=e.multi,l=e.labelField,c=e.queryField,d=e.fieldKey,f=n!==void 0?n:()=>{},h=r!==void 0?r:!1,p=t!==void 0?t:!1,m=fRe(c,l),g=m.options,v=m.loading,b=De(void 0),y;if(s)y="Search";else{let et=b.current;if(et!==void 0)y=et;else if(v)y="Inline";else{let lt=m.hasMore?"Search":"Inline";b.current=lt,y=lt}}let S=ce(()=>!1),w=S[1],C=S[0],A=ce(()=>0),$=A[1],R=A[0],N=ce(()=>""),I=N[1],M=N[0],P=ce(()=>[!1,240]),B=P[1],j=P[0],W=De(null),te=De(null),J=s||o===""?!1:!g.some(et=>et.id===o),re=pRe(e.singleQueryField,J?o:void 0,l),se=et=>{let lt=q(g.find(Ot=>Ot.id===et),Ot=>Ot.label),Vt=k(re,Ot=>{if(Ot.id===et)return Ot.label});return lt!==void 0?lt:Vt!==void 0?Vt:et};Ae(()=>{if(!C)return;let et=lt=>{let Vt=lt.target,Ot=W.current;if(Ot!=null&&!RRe(Ot,Vt))return w(Ft=>!1)};return document.addEventListener("mousedown",et),()=>{document.removeEventListener("mousedown",et)}},[C]),nO(()=>{if(C){let et=W.current;et!=null&&B(lt=>ARe(et))}},[C]);let he=y==="Search"&&M!=="",K=hRe(c,l,he?M:""),ie;if(M==="")ie=g;else{let et=M.toLowerCase();ie=g.filter(lt=>lt.label.toLowerCase().startsWith(et))}let le=he&&!K.error?K.options:ie,Z=le.length,ve=v||he&&K.loading,pe=et=>{let lt=ch(o),Vt=lt.some(Ft=>Ft===et)?lt.filter(Ft=>Ft!==et):lt.concat([et]);i(d,JSON.stringify(Vt.map(Ft=>Ft))),I(Ft=>""),$(Ft=>0);let Ot=te.current;if(Ot!=null){Ot.focus();return}},be=et=>{let lt=le[et];if(lt!==void 0){if(s)return pe(lt.id);{let Vt=lt.id;return i(d,Vt),w(Ot=>!1),I(Ot=>"")}}},Ge=et=>{switch(et.key){case"ArrowDown":return et.preventDefault(),C?$(Ft=>Z===0?0:Fo(Ft+1|0,Z)):w(Ft=>!0);case"ArrowUp":return et.preventDefault(),$(Ft=>Z===0?0:Fo((Ft-1|0)+Z|0,Z));case"Backspace":if(!(s&&M===""))return;let Vt=ch(o);if(Vt.length===0)return;let Ot=Vt.slice(0,Vt.length-1|0);return i(d,JSON.stringify(Ot.map(Ft=>Ft)));case"Enter":return C?(et.preventDefault(),be(R)):void 0;case"Escape":return C?w(Ft=>!1):void 0;default:return}},zt=C?SD+" "+vRe:SD,At=h?zt+" "+bRe:zt,Er=()=>ch(o).map(lt=>L("span",{children:[se(lt),_("span",{children:"×",className:xRe,onClick:Vt=>{Vt.stopPropagation(),pe(lt)}})],className:yRe},lt)),nn=(j[1]|0).toString()+"px",Mn=j[0]?{bottom:"100%",marginTop:"0",marginBottom:"2px",maxHeight:nn,top:"auto"}:{maxHeight:nn},qt;if(ve)qt=_("li",{children:"Loading…",className:wD});else if(Z===0)qt=_("li",{children:M===""?"No options":"No matches",className:wD});else{let et=s?ch(o):o===""?[]:[o];qt=le.map((lt,Vt)=>{let Ot=et.some(Ln=>Ln===lt.id),Ei=$V([[ERe],Vt===R?[kRe]:[],Ot?[CRe]:[]]).join(" ");return _("li",{children:lt.label,"aria-selected":Ot,className:Ei,role:"option",onMouseDown:Ln=>{Ln.preventDefault(),be(Vt)},onMouseEnter:Ln=>$(Xn=>Vt)},lt.id)})}let wi=_("ul",{children:qt,className:wRe,role:"listbox",style:Mn}),Yn;return Yn=y==="Inline"?_("button",{children:o===""?_("span",{children:a?"Select…":"—",className:_Re}):se(o),className:At,autoFocus:p,type:"button",onKeyDown:Ge,onBlur:et=>f(),onClick:et=>w(lt=>!lt)}):L("div",{children:[s?Er():null,_("input",{ref:Dt(te),className:SRe,autoFocus:p,placeholder:a?"Search…":"—",type:"text",value:s||C?M:o===""?"":se(o),onKeyDown:Ge,onFocus:et=>w(lt=>!0),onBlur:et=>f(),onChange:et=>{let lt=et.target.value;I(Vt=>lt)}})],className:At,onClick:et=>w(lt=>!0)}),L("div",{children:[Yn,C?wi:null],ref:Dt(W),className:gRe})}let $Re=TRe;function Ob(e){return e.pluginId+"."+e.slice+"."+e.command.name}function NRe(e,t,r,n){return k(e.find(i=>i.id===t),i=>{let o=i.aggregates.find(a=>a.name===r);return o!==void 0?q(o.commands.find(a=>a.name===n),a=>({plugin:i,enclosingAggregate:o,command:a})):k(i.stateChangeSlices.find(a=>a.name===r),a=>q(a.commands.find(s=>s.name===n),s=>({plugin:i,enclosingAggregate:void 0,command:s})))})}function Mb(e,t,r){return e}function DRe(e,t,r){let n=r!==void 0?r:Mb;return q(NRe(t,e.pluginId,e.slice,e.command),i=>{let o=i.plugin,a=n(i.command,i.enclosingAggregate,o.id);return{label:D(e.label,a.label),pluginId:o.id,slice:e.slice,command:a,field:e.field,navigateTo:k(e.then,s=>{if(s.trim()!=="")return s})}})}function FRe(e,t,r){let n=r!==void 0?r:Mb;return Q(D(k(e,i=>i.rowActions),[]),i=>DRe(i,t,n))}function IRe(e,t,r){let n=t!==void 0?t:[],i=r!==void 0?r:[],o=e.slice();return n.forEach(a=>{if(!o.some(s=>s.command.name===a.command.name)){o.push(a);return}}),i.length===0?o:o.filter(a=>!i.some(s=>s===Ob(a)))}function PRe(e,t){let r=e.refFields.find(n=>n.propertyKey===t);return r!==void 0?r.multi:D(k(k(k(q(k(k(k(G(e.schema),n=>F(n,"properties")),G),n=>F(n,t)),vn),G),n=>F(n,"type")),oe),"")==="array"}function ORe(e,t){return Oe([[e.field,PRe(e.command,e.field)?mRe([t]):t]])}function s7(e,t){return{command:e.command,initialValues:ORe(e,t),navigateTo:e.navigateTo,formKey:e.command.name+":"+t}}function jt(e){return"var("+e+")"}let l7="168px",MRe=E([z("flex"),_e("column"),u("gap",jt(O.sm))]),LRe=E([z("flex"),X("center"),Ze("spaceBetween"),u("gap",jt(O.sm))]),ED=E([z("inlineFlex"),X("center"),u("gap",jt(O.xs))]),dh=E([u("background","none"),u("border","1px solid var("+x.border+")"),u("border-radius",jt(Y.sm)),u("padding","2px var("+O.sm+")"),u("color",jt(x.textSecondary)),u("font-size",jt(T.sizeSm)),Ce("pointer"),Ue([u("background",jt(x.surfaceSubtle)),u("color",jt(x.textPrimary))])]),zRe=yr([dh,E([u("background",jt(x.surfaceSubtle)),u("color",jt(x.textPrimary)),u("font-weight",jt(T.weightMedium))])]),URe=E([u("font-size",jt(T.sizeMd)),u("font-weight",jt(T.weightMedium)),u("color",jt(x.textPrimary))]),BRe=E([u("border","1px solid var("+x.borderSubtle+")"),u("border-radius",jt(Y.md)),u("overflow","hidden")]),u7=E([z("flex"),X("stretch")]),jRe=yr([u7,E([u("background",jt(x.surfaceSubtle)),u("border-bottom","1px solid var("+x.borderSubtle+")")])]),qRe=yr([u7,E([u("border-top","1px solid var("+x.borderSubtle+")")])]),VRe=E([u("flex","0 0 "+l7),u("padding","4px var("+O.sm+")"),u("font-size",jt(T.sizeXs)),u("color",jt(x.textSecondary)),u("text-transform","uppercase"),u("letter-spacing","0.04em")]),c7=E([u("flex","0 0 "+l7),u("padding","6px var("+O.sm+")"),u("font-size",jt(T.sizeSm)),u("font-weight",jt(T.weightMedium)),u("color",jt(x.textPrimary)),u("border-right","1px solid var("+x.borderSubtle+")"),u("overflow","hidden"),u("text-overflow","ellipsis"),u("white-space","nowrap")]),GRe=yr([c7,E([u("color",jt(x.textDisabled)),u("font-style","italic")])]);function GS(e){return E([z("grid"),u("flex","1 1 auto"),u("grid-template-columns","repeat("+e.toString()+", minmax(0, 1fr))")])}let KRe=E([u("background",jt(x.surfaceSubtle))]),HRe=E([u("padding","4px var("+O.xs+")"),u("font-size",jt(T.sizeXs)),u("color",jt(x.textSecondary)),u("border-left","1px solid var("+x.borderSubtle+")")]),d7=E([z("flex"),_e("column"),u("gap","2px"),u("min-height","48px"),u("padding","3px"),u("border-left","1px solid var("+x.borderSubtle+")")]),WRe=yr([d7,E([u("background",jt(x.surfaceSubtle))])]);function kD(e){return E([z("block"),u("width","100%"),u("text-align","left"),u("border","none"),u("border-left","3px solid "+e),u("border-radius",jt(Y.sm)),u("background",jt(x.surfaceSubtle)),u("color",jt(x.textPrimary)),u("font-size",jt(T.sizeXs)),u("padding","1px var("+O.xs+")"),u("overflow","hidden"),u("text-overflow","ellipsis"),u("white-space","nowrap"),Ce("pointer"),Ue([u("background",jt(x.surfaceElevated))])])}let JRe=E([Ce("grab")]),QRe=E([ks(.85),u("z-index","10"),Ce("grabbing")]),YRe=E([u("font-size",jt(T.sizeXs)),u("color",jt(x.textDisabled))]),CD="var("+x.brand+")";function XRe(e){return D(e.end_,e.start)}function ZRe(e,t){return e.filter(r=>RM(r.start,XRe(r),t)).toSorted((r,n)=>r.start-n.start)}function eAe(e,t){return TM(e.start)||!CM(e.start,t)?e.title:AM(e.start)+" "+e.title}function tAe(e){let t=e.draggable,r=e.event,n=_9({id:r.key,disabled:!t}),i=t?kD(D(r.accent,CD))+" "+JRe:kD(D(r.accent,CD)),o=n.isDragging?i+" "+QRe:i,a=q(w9(n.transform),c=>({transform:c})),s=n.listeners,l=s==null?void 0:Dt(s);return _("button",{children:eAe(r,e.day),ref:Dt(n.setNodeRef),className:o,style:a,title:r.title,onKeyDown:c=>ee(l,d=>S9(d,c)),onClick:c=>r.onOpen(),onPointerDown:c=>ee(l,d=>x9(d,c))})}function rAe(e){let t=e.draggable,r=e.today,n=e.days,i=e.lane,o=i.unassigned?"":i.resourceId,a=y9({id:o}),s=!i.unassigned&&a.isOver?GS(n.length)+" "+KRe:GS(n.length);return L("div",{children:[_("div",{children:i.label,className:i.unassigned?GRe:c7}),_("div",{children:n.map(l=>_("div",{children:ZRe(i.events,l).map(c=>_(tAe,{event:c,day:l,draggable:t},c.key)),className:l===r?WRe:d7},l.toString())),ref:Dt(a.setNodeRef),className:s})],className:qRe})}function nAe(e){let t=e.onReassign,r=e.initialDate,n=e.windowNote,i=e.lanes,o=ce(()=>"Week"),a=o[1],s=o[0],l=ce(()=>gi(D(r,Date.now()))),c=l[1],d=l[0],f=gi(Date.now()),h=Ee(t),p;p=s==="Week"?Fl(7,y=>Ro(Yv(d),y)):[gi(d)];let m=y=>c(S=>s==="Week"?Ro(S,y*7|0):Ro(S,y)),g=y=>{let S=y.over;if(t===void 0||S==null||S.id==="")return;let w=i.find(C=>C.events.some(A=>A.key===y.active.id));if(ne(w,!0,C=>C.resourceId!==S.id))return t(y.active.id,S.id)},v=(y,S)=>_("button",{children:S,className:s===y?zRe:dh,onClick:w=>a(C=>y)}),b;return b=s==="Week"?xo(d):Is(d)+" — "+xo(d),L("div",{children:[L("div",{children:[L("div",{children:[_("button",{children:"‹",className:dh,onClick:y=>m(-1)}),_("button",{children:"Today",className:dh,onClick:y=>c(S=>f)}),_("button",{children:"›",className:dh,onClick:y=>m(1)}),_("span",{children:b,className:URe})],className:ED}),L("div",{children:[v("Week","Week"),v("Day","Day")],className:ED})],className:LRe}),_(b9,{onDragEnd:g,children:L("div",{children:[L("div",{children:[_("div",{children:"Resource",className:VRe}),_("div",{children:p.map(y=>_("div",{children:Is(y),className:HRe},y.toString())),className:GS(p.length)})],className:jRe}),i.map(y=>_(rAe,{lane:y,days:p,today:f,draggable:h},y.unassigned?"\0unassigned":y.resourceId))],className:BRe})}),n!==void 0?_("span",{children:n,className:YRe}):null],className:MRe})}let iAe=nAe;function oAe(e){switch(e){case"Hints":return"hints";case"DeclaredTarget":return"declared-target";case"SchemaTarget":return"schema-target";case"Setter":return"setter"}}function f7(e,t){return e+"→"+t}function Xk(e){return D(q(k(k(G(e),t=>F(t,"properties")),G),t=>Object.keys(t)),[])}function Lb(e){return Q(D(k(k(G(e),t=>F(t,"required")),Ct),[]),oe).filter(t=>t!=="TAG")}function aAe(e,t){let r=k(k(k(G(e),o=>F(o,"properties")),G),o=>F(o,t));if(r===void 0)return;let n=k(k(G(r),o=>F(o,"const")),oe);if(n!==void 0)return n;let i=nc(r);if(i!==void 0&&i.length===1)return i[0]}function h7(e){return e.filter(t=>t.level==="Instance")}function Wy(e,t){let r=e.allowedStates;return r!==void 0&&r.length!==0?r.includes(t):!0}function p7(e){let t=e.allowedStates,r=e.targetState;return t!==void 0?r===void 0:!1}function sAe(e,t,r){return Xk(e.schema).includes(t)?Oe([[t,r]]):{}}function lAe(e,t){let r=e.filter(n=>!p7(n)&&Xk(n.schema).includes(t)?Lb(n.schema).every(i=>i===t||i==="id"?!0:Re(i,n.aggregateIdField)):!1);if(r.length===1)return r[0]}function RD(e){if(e.length===1)return e[0]}function zb(e,t,r){let n=h7(t),i=lAe(n,e);return(o,a)=>{let s=(f,h)=>{if(Wy(f,o))return{command:f.name,patch:sAe(f,e,a),tier:h}},l=k(k(k(r,f=>f[a]),f=>n.find(h=>h.name===f)),f=>s(f,"Hints"));if(l!==void 0)return l;let c=k(RD(n.filter(f=>Wy(f,o)?Re(f.targetState,a):!1)),f=>s(f,"DeclaredTarget"));if(c!==void 0)return c;let d=k(RD(n.filter(f=>!p7(f)&&Wy(f,o)?Re(aAe(f.schema,e),a):!1)),f=>s(f,"SchemaTarget"));return d!==void 0?d:k(i,f=>s(f,"Setter"))}}function uAe(e,t,r){let n=h7(r),i=co(e,t),o={};return n.forEach(a=>{let s=a.targetState;if(s!==void 0){D(a.allowedStates,[]).forEach(l=>{if(i.includes(l)&&i.includes(s)){o[f7(l,s)]={command:a.name,patch:{},tier:"DeclaredTarget"};return}});return}}),o}function m7(e,t,r,n){let i=zb(t,r,n),o=co(e,t),a={};return o.forEach(s=>{o.forEach(l=>ee(i(s,l),c=>{a[f7(s,l)]=c}))}),a}function cAe(e,t,r){let n=t+"→",i=Q(Object.entries(e),o=>{let a=o[0];if(o[1].command===r&&a.startsWith(n))return a.slice(n.length)});if(i.length===1)return i[0]}let Zu="resources",ec="events";function dAe(e){return e.find(t=>Re(t.role,Zu))}function g7(e){return e.filter(t=>Re(t.role,ec))}function fAe(e,t){return e.toString()+"::"+t}function hAe(e){let t=e.indexOf("::");if(t!==-1)return q(lO(e.slice(0,t)),r=>[r,e.slice(t+2|0)])}function Gf(e,t){return k(F(e,t),oe)}function pAe(e){let t=dAe(e),r=g7(e),n=t!==void 0?t.rows.map(d=>{let f=D(G(d),{}),h=D(Gf(f,"id"),""),p=D(k(t.semantics.labelField,m=>Gf(f,m)),h);return[h,p]}):[],i=n.map(d=>d[0]),o=r.map((d,f)=>Q(d.rows,h=>{let p=D(G(h),{}),m=D(Gf(p,"id"),""),g=d.semantics.dateSpan;if(g!==void 0)return q(k(ic(g,p),Qn),v=>{let b=k(Mw(g,p),Qn),y=D(k(d.semantics.labelField,R=>Gf(p,R)),m),S=D(k(d.resourceRef,R=>Gf(p,R)),""),w=fAe(f,m),C=d.accent;return[S,{key:w,title:y,start:v,end_:b,accent:C,onOpen:()=>d.onOpenRow(m,h)}]})})).flat(),a=d=>Q(o,f=>{if(d(f[0]))return f[1]}),s=n.map(d=>{let f=d[0];return{resourceId:f,label:d[1],unassigned:!1,events:a(h=>h===f)}}),l=a(d=>!i.includes(d)),c=l.length!==0?[{resourceId:"",label:"Unassigned",unassigned:!0,events:l}]:[];return s.concat(c)}function mAe(e){let t=e.sources,r=pAe(t),n=g7(t),o=n.some(l=>Ee(l.onCommand)&&Ee(l.assignCommand)?Ee(l.resourceRef):!1)?(l,c)=>ee(hAe(l),d=>{let f=d[1];ee(n[d[0]],h=>{let p=h.onCommand,m=h.assignCommand,g=h.resourceRef;if(p!==void 0&&m!==void 0&&g!==void 0)return p(m,f,Oe([[g,c]]))})}):void 0,a=nt(n,0,(l,c)=>l+c.rows.length|0),s=BO(n2(t),a,void 0,"scheduled item");return _(iAe,{lanes:r,windowNote:s,onReassign:o})}let gAe=_("span",{children:"☰","aria-hidden":!0,style:{fontSize:"0.9em",lineHeight:"1"}}),fh="scheduler";function v7(e){return Ee(bn(e,void 0,void 0).dateSpan)?Nr(e).some(t=>Ee(Ja(t[0]))):!1}function vAe(e,t,r){return r?!1:v7(t)}function b7(e,t){let r=e.filter(i=>i.level==="Instance").filter(i=>Xk(i.schema).includes(t)?Lb(i.schema).every(o=>o===t||o==="id"?!0:Re(o,i.aggregateIdField)):!1);return r.length!==1?void 0:r[0].name}function bAe(e,t,r){let n=r!==void 0?r:(o,a)=>{},i={};return ov().filter(o=>{let a=o.arity;return typeof a!="object"?!1:a.TAG!=="Multi"}).forEach(o=>{let a={},s={},l=(c,d,f)=>{let h=F(c,d);h!==void 0?h.push(f):c[d]=[f]};e.forEach(c=>{let d=k(t,p=>hn(p,c.name)),f=D(k(d,p=>p.canvas),o.label),h=k(d,p=>p.role);if(h!==void 0)return h===Zu?l(a,f,c):h===ec?ee(k(d,p=>p.resourceRef),p=>l(s,f,[c,p])):void 0}),$e(s).forEach(c=>{let d=c[0],f=D(F(a,d),[]),h=f.length;if(h!==1)return h!==0?n(d,f.length):void 0;let p=f[0];c[1].forEach(m=>{i[m[0].name]={resource:p,resourceRef:m[1]}})})}),i}ya({id:fh,label:"Scheduler",icon:gAe,arity:{TAG:"Slots",_0:[{role:Zu,min:1,max:1},{role:ec,min:1}]},isCapable:(e,t,r)=>v7(e),render:e=>_(mAe,{sources:e}),capability:"role join: a resources source (lanes) + an events source with a date span and an entity-ref to the resource"});function $s(e){return"var("+e+")"}let cg=E([z("inlineFlex"),X("center"),u("gap","6px"),u("background","none"),u("border","1px solid var("+x.border+")"),u("border-radius",$s(Y.full)),u("padding","2px var("+O.sm+")"),u("color",$s(x.textSecondary)),u("font-size",$s(T.sizeXs)),u("line-height","1.5")]),Jy=E([Ce("pointer"),Ue([u("background",$s(x.surfaceSubtle)),u("color",$s(x.textPrimary))])]),_Ae=E([ks(.6),Ce("notAllowed")]),yAe=E([Va(Jn.compact,[u("display","none")])]);function Zk(e){return E([z("inlineBlock"),u("width","8px"),u("height","8px"),u("border-radius","50%"),u("background",e)])}let xAe=Zk($s(x.success)),SAe=Zk($s(x.border)),wAe=Zk($s(x.border)),EAe=mJ([[0,[ks(.4)]],[50,[ks(1)]],[100,[ks(.4)]]]),kAe=E([z("inlineBlock"),u("width","8px"),u("height","8px"),u("border-radius","50%"),u("background",$s(x.warning)),uJ(EAe),cJ({NAME:"ms",VAL:1200}),dJ("infinite"),fJ("easeInOut")]);function CAe(e){let t=e.onToggle,r=e.reconnecting,n=e.canBeLive,i=e.live,o=r!==void 0?r:!1,a=n?i&&o?[cg+" "+Jy,kAe,"Reconnecting…"]:i?[cg+" "+Jy,xAe,"Live"]:[cg+" "+Jy,SAe,"Snapshot"]:[cg+" "+_Ae,wAe,"Off"],s=a[2],l=n?d=>t():void 0,c=n?i&&o?"Live updates on — reconnecting to the server":i?"Live updates on — click for snapshot mode":"Snapshot mode — click for live updates":"Live updates disabled globally";return L("button",{children:[_("span",{className:a[1]}),_("span",{children:s,className:yAe})],"aria-label":"Live updates: "+s,className:a[0],title:c,disabled:!n,type:"button",onClick:l})}let RAe=CAe;function Kf(e){return"var("+e+")"}let AAe=E([z("inlineFlex"),X("center"),u("gap","6px"),u("background",Kf(x.brand)),u("color",Kf(x.textOnBrand)),u("border","none"),u("border-radius",Kf(Y.full)),u("padding","var("+O.xs+") var("+O.md+")"),u("font-size",Kf(T.sizeSm)),u("font-weight",Kf(T.weightMedium)),Ce("pointer"),Ue([u("opacity","0.85")])]),TAe=E([z("flex"),X("center"),Ze("center"),u("padding","var("+O.xs+") 0")]);function $Ae(e){let t=e.onClick,r=e.count,n=r===1?"1 new item — click to refresh":r.toString()+" new items — click to refresh";return _("div",{children:_("button",{children:n,className:AAe,type:"button",onClick:i=>t()}),className:TAe})}let NAe=$Ae;function eC(e,t,r,n,i,o){let a=t!==void 0?t:{},s=r!==void 0?r:"",l=n!==void 0?n:!0,c=i!==void 0?i:()=>{},d=si(),f=Yp(),h=ce(()=>[]),p=h[1],m=ce(()=>X8),g=m[1],v=m[0],b=ce(()=>"Loading"),y=b[1],S=ce(()=>0),w=S[1],C=ce(()=>1),A=C[1],$=C[0],R=f!==void 0?(N,I)=>f(N,I).then(M=>[M.data,C5(M,e.queryField)]):d!==void 0?(N,I)=>d(N,I).then(M=>[M,void 0]):void 0;return Ae(()=>{if(l)if(R!==void 0){y(I=>"Loading"),c();let N;if(o!==void 0){let I=Oe(ne(G(a),[],$e));I.first=o*$|0,N=I}else N=a;Lt(R(e.queryDocument,N).then(I=>{let M=I[1],P=I[0];return M!==void 0?y(B=>({TAG:"Refused",_0:M.message})):(p(B=>e2(P,e.queryField)),g(B=>t5(P,e.queryField)),y(B=>"Loaded")),Promise.resolve()}),I=>(y(M=>({TAG:"Error",_0:"Failed to load data"})),Promise.resolve()))}else y(N=>({TAG:"Error",_0:"Not connected"}));else y(N=>"Loaded")},[S[0],s,l,$]),{rows:h[0],setRows:p,pageInfo:v,fetchState:b[0],refetch:()=>w(N=>N+1|0),loadMore:()=>A(N=>N+1|0),canLoadMore:v.hasNextPage}}function tc(e,t,r){let n=t!==void 0?t:!0,o=eC(e,void 0,void 0,n,void 0,50),a=De(void 0),s=De(gs.make()),l=De(td.make()),c=()=>{let p=a.current;p!==void 0&&clearTimeout(p),a.current=setTimeout(()=>{a.current=void 0,o.refetch()},250)},d=p=>{if(!gs.shouldApply(s.current,p.id,p.seq))return;gs.record(s.current,p.id,p.seq);let m=p.changeKind,g;return g=m==="Updated"?k(o.rows.find(v=>Re(go(v),p.id)),v=>td.apply(l.current,v,p,e.schema)):void 0,g!==void 0?o.setRows(v=>v.map(b=>Re(go(b),p.id)?g:b)):c()},f=nm(),h=n&&ne(f,!1,p=>p.isLive(e.queryField));return FS(e.queryField,"All",h,d,o.refetch),{rows:o.rows,fetchState:o.fetchState,refetch:o.refetch,isLive:h,loadMore:o.loadMore,canLoadMore:o.canLoadMore}}let DAe=50;function _7(){try{return Mi(globalThis.localStorage)}catch{return}}let y7="reventless.live.";function AD(e){let t=_7();if(t===void 0)return!1;try{let r=Rt(t).getItem(y7+e);return r==null?!1:r==="true"}catch{return!1}}function FAe(e,t){let r=_7();if(r!==void 0)try{Rt(r).setItem(y7+e,t?"true":"false");return}catch{return}}function IAe(e){let t=ce(()=>AD(e)),r=t[1],n=t[0];Ae(()=>{r(o=>AD(e))},[e]);let i=$r(()=>{let o=!n;FAe(e,o),r(a=>o)},[n,e]);return[n,i]}function PAe(e,t){switch(e.TAG){case"Valid":return!0;case"Invalid":return!1;case"Pending":return!1}}function OAe(e){return PAe(e)}function tC(e){switch(e.TAG){case"Invalid":return e._1;case"Valid":case"Pending":return 0}}function Vo(e){return[e._0,tC(e)]}function x7(e,t){return cO(t,e,(r,n)=>n(r))}function Go(e){switch(e.TAG){case"Invalid":return e;case"Valid":case"Pending":return{TAG:"Valid",_0:e._0}}}function S7(e){if(!e.includes("."))return e;let t=e.replace(/0+$/,"");return t.endsWith(".")?t.slice(0,t.length-1|0):t}function MAe(e){return t=>{let r=Vo(t),n=r[0];return n>=e?Go(t):{TAG:"Invalid",_0:n,_1:{hd:"Must be at least "+S7(e.toString()),tl:r[1]}}}}function LAe(e){return t=>{let r=Vo(t),n=r[0];return n<=e?Go(t):{TAG:"Invalid",_0:n,_1:{hd:"Must be at most "+S7(e.toString()),tl:r[1]}}}}function zAe(e){let t=Vo(e),r=t[0];return isFinite(r)&&(r|0)===r?Go(e):{TAG:"Invalid",_0:r,_1:{hd:"Must be a whole number",tl:t[1]}}}function bv(e,t){let r=q(F(e,t),Xe);if(typeof r=="object"&&r.TAG==="JSONNumber")return r._0|0}function TD(e,t){let r=q(F(e,t),Xe);if(typeof r=="object"&&r.TAG==="JSONNumber")return r._0}function _v(e,t){let r=q(F(e,t),Xe);if(typeof r=="object"&&r.TAG==="JSONString")return r._0}function UAe(e){let t=_v(e,"format");if(_v(e,"x-reventless-format")==="cuid")return"Cuid";if(t!==void 0)switch(t){case"date-time":return"DateTime";case"email":return"Email";case"uri":return"Url";case"uuid":return"Uuid";default:return}}function $D(e){let t=bv(e,"minLength"),r=bv(e,"maxLength"),n=q(_v(e,"pattern"),a=>new RegExp(a)),i=UAe(e),o=_v(e,"description");return{minLength:t,maxLength:r,pattern:n,format:i,patternHint:o}}function ND(e,t){let r=TD(e,"minimum"),n=TD(e,"maximum");return{min:r,max:n,integer:t}}function BAe(e){let t=bv(e,"minItems"),r=bv(e,"maxItems");return{minItems:t,maxItems:r}}function Ub(e){if(typeof e!="object")return!1;switch(e.TAG){case"TextField":case"NumberField":return e.required;case"EnumField":return e.required;case"RefField":return e.required;case"ItemsField":return e.required}}function w7(e){let t=e.indexOf("[]");if(t===-1)return;let r=e.slice(0,t),n=e.slice(t+2|0),i=n.startsWith(".")?n.slice(1):n;if(!(r===""||i===""||i.includes("[]")))return[r,i]}function E7(e){return k(F(e,"items"),t=>{let r=k(G(t),n=>F(n,"type"));if(r!==void 0&&Re(oe(r),"object"))return t})}function rC(e,t){let r=t!==void 0?t:[],n={},i={};r.forEach(f=>{let h=w7(f.propertyKey);if(h!==void 0){let p=h[0],m=D(F(i,p),[]);m.push({propertyKey:h[1],queryField:f.queryField,singleQueryField:f.singleQueryField,labelField:f.labelField,multi:f.multi,required:f.required,entityName:f.entityName,entityNamePlural:f.entityNamePlural}),i[p]=m;return}n[f.propertyKey]=f});let o=Xe(e);if(typeof o!="object")return[];if(o.TAG!=="JSONObject")return[];let a=o._0,s=F(a,"required"),l;if(s!==void 0){let f=Xe(s);l=typeof f!="object"?[]:f.TAG==="JSONArray"?Q(f._0,h=>{let p=Xe(h);if(!(typeof p!="object"||p.TAG!=="JSONString"))return p._0}):[]}else l=[];let c=F(a,"properties");if(c===void 0)return[];let d=Xe(c);return typeof d!="object"?[]:d.TAG==="JSONObject"?Q($e(d._0),f=>{let h=f[1],p=f[0],m=Xe(h);if(typeof m!="object"||m.TAG!=="JSONObject")return;let g=m._0;if(Ee(F(g,"const")))return;let v=F(g,"type"),b;if(v!==void 0){let R=Xe(v);b=typeof R!="object"||R.TAG!=="JSONString"?"string":R._0}else b="string";let y=l.some(R=>R===p),S=F(n,p),w;if(S!==void 0)w=S.multi?S.entityNamePlural:S.entityName;else{let R=F(g,"title");if(R!==void 0){let N=Xe(R);w=typeof N!="object"||N.TAG!=="JSONString"?pt(p):N._0}else w=pt(p)}let C=F(g,"enum"),A;if(C!==void 0){let R=Xe(C);A=typeof R!="object"||R.TAG!=="JSONArray"?void 0:Q(R._0,N=>{let I=Xe(N);if(!(typeof I!="object"||I.TAG!=="JSONString"))return I._0})}else A=void 0;let $;if(S!==void 0)$={TAG:"RefField",queryField:S.queryField,singleQueryField:S.singleQueryField,labelField:S.labelField,multi:S.multi,required:y,constraints:S.multi?BAe(g):{}};else if(b==="boolean")$="BoolField";else if(A!==void 0)$={TAG:"EnumField",options:A,required:y};else switch(b){case"array":let R=E7(g);$=R!==void 0?{TAG:"ItemsField",itemSchema:R,itemRefFields:D(F(i,p),[]),required:y}:{TAG:"TextField",required:y,constraints:$D(g)};break;case"integer":$={TAG:"NumberField",required:y,constraints:ND(g,!0)};break;case"number":$={TAG:"NumberField",required:y,constraints:ND(g,!1)};break;default:$={TAG:"TextField",required:y,constraints:$D(g)}}return q($,R=>({key:p,label:w,fieldType:R,propSchema:h}))}):[]}function nC(e){let t={};return e.forEach(r=>{let n=r.fieldType,i;if(typeof n!="object")i="false";else switch(n.TAG){case"EnumField":i=D(n.options[0],"");break;case"ItemsField":i="[]";break;default:i=""}t[r.key]=i}),t}function jAe(e){return D(k(k(G(e),t=>F(t,"properties")),G),{})}function k7(e,t){return k(q(F(e,t),vn),G)}function qAe(e,t){return D(k(k(k7(e,t),r=>F(r,"type")),oe),"string")}function VAe(e,t){return Ee(k(k(k7(e,t),r=>F(r,"enum")),Ct))}function GAe(e,t,r){let n=t!==void 0?t:!1,i=0,o=0,a=0;if(r===""){if(n)return null;a=3}else a=3;if(a===3)switch(e){case"array":if(r==="")return[];try{return JSON.parse(r)}catch{return[r]}case"boolean":case"integer":case"number":case"object":o=2;break;default:i=1}if(o===2){if(r==="")return null;i=1}if(i===1){let s=0;switch(e){case"boolean":return r==="true";case"integer":case"number":s=2;break;case"object":try{return JSON.parse(r)}catch{return null}default:return r}if(s===2)return D(q(Ds(r),l=>l),r)}}function Bb(e,t){let r=jAe(e),n=E5(e),i=a=>n!==void 0?!n.includes(a):!1,o={};return $e(t).forEach(a=>{let s=a[1],l=a[0],c=qAe(r,l),d=VAe(r,l);if(!(s===""&&i(l)&&(d||c!=="string"))){o[l]=GAe(c,d,s);return}}),o}function KAe(e){let t=Xe(e);if(typeof t!="object")switch(t){case"JSONFalse":return"false";case"JSONTrue":return"true";case"JSONNull":return""}else switch(t.TAG){case"JSONString":return t._0;case"JSONNumber":return t._0.toString();case"JSONObject":case"JSONArray":return JSON.stringify(e)}}function C7(e){let t={};return ee(G(e),r=>{$e(r).forEach(n=>{t[n[0]]=KAe(n[1])})}),t}let HAe="Must not be empty";function WAe(e){let t=Vo(e),r=t[0];return r.length>0?Go(e):{TAG:"Invalid",_0:r,_1:{hd:HAe,tl:t[1]}}}let JAe=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;function QAe(e){let t=Vo(e),r=t[0];return JAe.exec(r)!==null?Go(e):{TAG:"Invalid",_0:r,_1:{hd:"Must be a valid email address",tl:t[1]}}}function YAe(e){let t=Vo(e),r=t[0],n;try{new URL(r),n=!0}catch{n=!1}return n?Go(e):{TAG:"Invalid",_0:r,_1:{hd:"Must be a valid URL",tl:t[1]}}}let XAe=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;function ZAe(e){let t=Vo(e),r=t[0];return XAe.exec(r)!==null?Go(e):{TAG:"Invalid",_0:r,_1:{hd:"Must be a valid UUID",tl:t[1]}}}let eTe=/^c[a-z0-9]{23,24}$/;function tTe(e){let t=Vo(e),r=t[0];return eTe.exec(r)!==null?Go(e):{TAG:"Invalid",_0:r,_1:{hd:"Must be a valid CUID",tl:t[1]}}}function rTe(e){let t=Vo(e),r=t[0],n=Date.parse(r);return Number.isNaN(n)?{TAG:"Invalid",_0:r,_1:{hd:"Must be a valid ISO 8601 date-time",tl:t[1]}}:Go(e)}function nTe(e){return t=>{let r=Vo(t),n=r[0];return n.length>=e?Go(t):{TAG:"Invalid",_0:n,_1:{hd:"Must be at least "+e.toString()+" characters",tl:r[1]}}}}function iTe(e){return t=>{let r=Vo(t),n=r[0];return n.length<=e?Go(t):{TAG:"Invalid",_0:n,_1:{hd:"Must be at most "+e.toString()+" characters",tl:r[1]}}}}function oTe(e,t){return r=>{let n=Vo(r),i=n[0];return e.exec(i)!==null?Go(r):{TAG:"Invalid",_0:i,_1:{hd:D(t,"Does not match the required pattern"),tl:n[1]}}}}function iC(e){let t=tC(e);if(t!==0)return t.hd}function aTe(e){switch(e){case"Email":return QAe;case"Url":return YAe;case"Uuid":return ZAe;case"Cuid":return tTe;case"DateTime":return rTe}}function sTe(e,t,r){if(e==="")return t?WAe({TAG:"Pending",_0:e}):{TAG:"Valid",_0:e};let n=[];return ee(r.minLength,i=>{n.push(nTe(i))}),ee(r.maxLength,i=>{n.push(iTe(i))}),ee(r.format,i=>{n.push(aTe(i))}),ee(r.pattern,i=>{n.push(oTe(i,r.patternHint))}),n.length===0?{TAG:"Valid",_0:e}:x7({TAG:"Pending",_0:e},Pv(n))}function lTe(e,t,r){if(e==="")return t?{TAG:"Invalid",_0:e,_1:{hd:"Required",tl:0}}:{TAG:"Valid",_0:e};let n=Ds(e);if(n===void 0)return{TAG:"Invalid",_0:e,_1:{hd:"Must be a number",tl:0}};let i=[];D(r.integer,!1)&&i.push(zAe),ee(r.min,s=>{i.push(MAe(s))}),ee(r.max,s=>{i.push(LAe(s))});let o=x7({TAG:"Pending",_0:n},Pv(i)),a=tC(o);return a!==0?{TAG:"Invalid",_0:e,_1:a}:{TAG:"Valid",_0:e}}function uTe(e,t,r){let i=ch(e).length;if(i===0&&t)return{TAG:"Invalid",_0:e,_1:{hd:"Required",tl:0}};let o={contents:0};return ee(r.maxItems,s=>{if(i>s){o.contents={hd:"Select at most "+s.toString()+" items",tl:o.contents};return}}),ee(r.minItems,s=>{if(i<s&&(t||i>0)){o.contents={hd:"Select at least "+s.toString()+" items",tl:o.contents};return}}),o.contents!==0?{TAG:"Invalid",_0:e,_1:o.contents}:{TAG:"Valid",_0:e}}function DD(e,t){return t&&e===""?{TAG:"Invalid",_0:e,_1:{hd:"Required",tl:0}}:{TAG:"Valid",_0:e}}function oC(e,t){let r=e.propSchema;if(r!==void 0&&Ele(e.key,r)){let i=Ub(e.fieldType),o=Cle(e.key,r,t,i);return o!==void 0?{TAG:"Invalid",_0:t,_1:{hd:o,tl:0}}:{TAG:"Valid",_0:t}}let n=e.fieldType;if(typeof n!="object")return{TAG:"Valid",_0:t};switch(n.TAG){case"TextField":return sTe(t,n.required,n.constraints);case"NumberField":return lTe(t,n.required,n.constraints);case"EnumField":return DD(t,n.required);case"RefField":return n.multi?uTe(t,n.required,n.constraints):DD(t,n.required);case"ItemsField":return cTe(t,n.required,n.itemSchema,n.itemRefFields)}}function cTe(e,t,r,n){let i;if(e==="")i=[];else try{i=Ct(JSON.parse(e))}catch{i=void 0}if(i===void 0)return{TAG:"Invalid",_0:e,_1:{hd:"Not a valid list",tl:0}};if(i.length===0)return t?{TAG:"Invalid",_0:e,_1:{hd:"Add at least one row",tl:0}}:{TAG:"Valid",_0:e};let o=rC(r,n),a=Q(i.map((s,l)=>{let c=C7(s);return Q(o,d=>q(iC(oC(d,D(F(c,d.key),""))),f=>"Row "+(l+1|0).toString()+": "+f))[0]}),s=>s);return a.length!==0?{TAG:"Invalid",_0:e,_1:Pv(a)}:{TAG:"Valid",_0:e}}function rr(e){return"var("+e+")"}let dTe=E([z("flex"),_e("column"),u("gap",rr(O.md))]),fTe=E([z("flex"),_e("column"),u("gap","4px")]),R7=E([u("color",rr(x.textSecondary)),u("font-size",rr(T.sizeSm)),u("font-weight",rr(T.weightMedium))]),hTe=E([u("color",rr(x.error)),Fp(ke(2))]),FD=E([u("background",rr(x.surface)),u("border","1px solid var("+x.border+")"),u("border-radius",rr(Y.sm)),u("padding","var("+O.xs+") var("+O.sm+")"),u("font-size",rr(T.sizeMd)),u("color",rr(x.textPrimary)),u("outline","none"),ma({NAME:"percent",VAL:100}),u("transition","border-color 120ms, box-shadow 120ms"),js([u("border-color",rr(x.brand))])]),pTe=E([u("border-color",rr(x.error)),js([u("border-color",rr(x.error)),u("box-shadow","0 0 0 2px color-mix(in srgb, var("+x.error+") 25%, transparent)")])]),mTe=E([u("color",rr(x.error)),u("font-size",rr(T.sizeXs)),u("min-height","1.1em"),u("line-height","1.1"),Uo(ke(2))]),gTe=E([Ce("pointer"),MO(ke(6))]),ID=E([u("background",rr(x.brand)),u("color",rr(x.textOnBrand)),u("border","none"),u("border-radius",rr(Y.sm)),u("padding","var("+O.xs+") var("+O.md+")"),u("font-size",rr(T.sizeMd)),Ce("pointer"),PO("flexStart"),u("transition","opacity 120ms")]),vTe=E([ks(.5),Ce("notAllowed")]),bTe=E([z("flex"),_e("column"),u("gap",rr(O.sm)),u("border","1px solid var("+x.border+")"),u("border-radius",rr(Y.sm)),u("padding",rr(O.sm))]),_Te=E([u("color",rr(x.textSecondary)),u("font-size",rr(T.sizeSm))]),yTe=E([z("flex"),X("flexStart"),u("gap",rr(O.sm)),u("padding-bottom",rr(O.sm)),u("border-bottom","1px solid var("+x.border+")")]),xTe=E([z("flex"),yi("wrap"),u("gap",rr(O.sm)),ai(1),$w(ke(0))]),PD=E([u("background",rr(x.surface)),u("color",rr(x.textPrimary)),u("border","1px solid var("+x.border+")"),u("border-radius",rr(Y.sm)),u("padding","var("+O.xs+") var("+O.sm+")"),u("font-size",rr(T.sizeSm)),Ce("pointer")]),STe=E([u("margin-top","1.4em")]),wTe=E([PO("flexStart")]);function A7(e){let t=e.error;return L("div",{children:[L("label",{children:[e.label,e.required?_("span",{children:"*",className:hTe}):null],className:R7}),e.children,_("div",{children:t!==void 0?t:null,className:mTe})],className:fTe})}function T7(e){let t=e.autoFocus,r=e.hasError,n=e.onBlur,i=e.onChange,o=e.value,a=e.field,s=r!==void 0?r:!1,l=t!==void 0?t:!1,c=Ub(a.fieldType),d=s?FD+" "+pTe:FD,f=g=>n(a.key),h=a.propSchema,p=h!==void 0?kle(a.key,h,o,g=>i(a.key,g),()=>n(a.key),c,s):void 0;if(p!==void 0)return p;let m=a.fieldType;if(typeof m!="object")return L("label",{children:[_("input",{className:gTe,checked:o==="true",type:"checkbox",onBlur:f,onChange:g=>i(a.key,g.target.checked?"true":"false")}),"Enabled"],className:R7});switch(m.TAG){case"TextField":let g=m.constraints.format,v;if(g!==void 0)switch(g){case"Email":v="email";break;case"Url":v="url";break;default:v="text"}else v="text";return _("input",{className:d,autoFocus:l,type:v,value:o,onBlur:f,onChange:b=>i(a.key,b.target.value)});case"NumberField":return _("input",{className:d,autoFocus:l,type:"number",value:o,onBlur:f,onChange:b=>i(a.key,b.target.value)});case"EnumField":return _("select",{children:m.options.map(b=>_("option",{children:b,value:b},b)),className:d,value:o,onBlur:f,onChange:b=>i(a.key,b.target.value)});case"RefField":return _($Re,{fieldKey:a.key,queryField:m.queryField,singleQueryField:m.singleQueryField,labelField:m.labelField,multi:m.multi,required:m.required,value:o,onChange:i,onBlur:()=>n(a.key),hasError:s,autoFocus:l});case"ItemsField":return _("input",{className:d,autoFocus:l,type:"text",value:o,onBlur:f,onChange:b=>i(a.key,b.target.value)})}}function ETe(e,t){let r=nC(t),n;if(e==="")n=[];else{let i;try{i=Ct(JSON.parse(e))}catch{i=void 0}n=i!==void 0?i:[]}return n.map(i=>{let o=Oe($e(r));return $e(C7(i)).forEach(a=>{o[a[0]]=a[1]}),o})}function kTe(e,t){return JSON.stringify(e.map(r=>Bb(t,r)))}function CTe(e){let t=e.showError,r=e.onBlur,n=e.onChange,i=e.itemRefFields,o=e.itemSchema,a=e.fieldKey,s=Pt(()=>rC(o,i),[o,i]),l=ETe(e.value,s),c=f=>n(a,kTe(f,o)),d=f=>c(l.concat([nC(s)]));return L("div",{children:[l.length===0?_("div",{children:"No rows yet.",className:_Te}):null,l.map((f,h)=>L("div",{children:[_("div",{children:s.map(p=>{let m=D(F(f,p.key),""),g=t?iC(oC(p,m)):void 0;return _(A7,{label:p.label,required:Ub(p.fieldType),error:g,children:_(T7,{field:p,value:m,onChange:(v,b)=>c(l.map((y,S)=>{if(S!==h)return y;let w=Oe($e(y));return w[v]=b,w})),onBlur:v=>r(a),hasError:Ee(g)})},p.key)}),className:xTe}),_("button",{children:"Remove","aria-label":"Remove row "+(h+1|0).toString(),className:PD+" "+STe,type:"button",onClick:p=>c(l.filter((m,g)=>g!==h))})],className:yTe},h.toString())),_("button",{children:"Add row",className:PD+" "+wTe,type:"button",onClick:d})],className:bTe})}function RTe(e){let t=e.autoFocus,r=e.showError,n=e.errorMessage,i=e.onBlur,o=e.onChange,a=e.value,s=e.field,l=r!==void 0?r:!1,c=t!==void 0?t:!1,d=Ub(s.fieldType),f=l&&Ee(n),h=s.fieldType,p,m=0;return typeof h!="object"||h.TAG!=="ItemsField"?m=1:p=_(CTe,{fieldKey:s.key,itemSchema:h.itemSchema,itemRefFields:h.itemRefFields,value:a,onChange:o,onBlur:i,showError:l}),m===1&&(p=_(T7,{field:s,value:a,onChange:o,onBlur:i,hasError:f,autoFocus:c})),_(A7,{label:s.label,required:d,error:f?n:void 0,children:p})}function ATe(e){let t=e.refFields,r=e.initialValues,n=e.submitLabel,i=e.onSubmit,o=e.schema,a=n!==void 0?n:"Submit",s=t!==void 0?t:[],l=Pt(()=>rC(o,s),[o,s]),c=ce(()=>{let I=nC(l);return ee(r,M=>{$e(M).forEach(P=>{I[P[0]]=P[1]})}),I}),d=c[1],f=c[0],h=ce(()=>({})),p=h[1],m=h[0],g=ce(()=>!1),v=g[1],b=g[0],y=Pt(()=>l.map(I=>{let M=D(F(f,I.key),"");return[I.key,oC(I,M)]}),[l,f]),S=y.every(I=>OAe(I[1])),w={};y.forEach(I=>{let M=iC(I[1]);if(M!==void 0){w[I[0]]=M;return}});let C=(I,M)=>d(P=>{let B=Oe($e(P));return B[I]=M,B}),A=I=>p(M=>{let P=Oe($e(M));return P[I]=!0,P}),$=I=>{if(I.preventDefault(),v(M=>!0),S)return i(f)},R=b&&!S,N=R?ID+" "+vTe:ID;return L("form",{children:[l.map((I,M)=>{let P=D(F(m,I.key),!1);return _(RTe,{field:I,value:D(F(f,I.key),""),onChange:C,onBlur:A,errorMessage:F(w,I.key),showError:P||b,autoFocus:M===0},I.key)}),_("button",{children:a,className:N,disabled:R,type:"submit"})],className:dTe,noValidate:!0,onSubmit:$})}let TTe=ATe;function Qy(e){switch(e){case"SubmitStarted":return!1;case"FormOpened":case"SubmitFailed":return!0}}let $7=Zt(void 0),$Te=$7.Provider;function NTe(e){return ur($Te,{value:e.session,children:e.children})}let DTe={make:NTe};function FTe(){return St($7)}function ITe(e,t){return e.concat([t])}function PTe(e,t){return e.filter(r=>r!==t)}function OTe(e,t){return ne(e,[],r=>r.armed.current?t:[])}function MTe(e){return"var("+e+")"}let LTe=E([z("flex"),_e("column"),u("gap",MTe(O.md))]);function zTe(e){let t=e.submitLabel,r=e.onSubmit,n=e.refFields,i=e.ownerValue,o=e.ownerField,a=e.injectNewId,s=e.aggregateIdField,l=e.aggregateId,c=e.schema,d=a!==void 0?a:!1,f=n!==void 0?n:[],h=t!==void 0?t:"Submit",p=ce(()=>{}),m=p[1],g=ce(()=>!1),v=g[1],y=ce(()=>crypto.randomUUID())[0],S=De(Qy("FormOpened")),w=Pt(()=>({armed:S}),[]),C=o!==void 0&&i!==void 0?[o,i]:void 0,A=I=>{let M=Oe($e(I));ee(C,P=>{M[P[0]]=P[1]}),ee(l,P=>{M[D(s,"id")]=P}),d&&(M[D(s,"id")]=y),v(P=>!0),m(P=>{}),S.current=Qy("SubmitStarted"),r(M).then(P=>{if(v(B=>!1),typeof P=="object"){let B=P._0;S.current=Qy("SubmitFailed"),m(j=>B)}return Promise.resolve()})},R=Q([l!==void 0?s!==void 0||d?s:void 0:d?s:void 0,q(C,I=>I[0])],I=>I),N=R.length===0?c:D(q(G(c),I=>{let M=Oe($e(I));return ee(k(F(M,"properties"),G),P=>{let B=Oe($e(P).filter(j=>!R.includes(j[0])));M.properties=B}),M}),c);return _(DTe.make,{session:w,children:L("div",{children:[ne(p[0],null,I=>_(Nk,{variant:"Error",message:I})),g[0]?_(yd,{label:"Submitting..."}):null,_(TTe,{schema:N,onSubmit:A,submitLabel:h,initialValues:e.initialValues,refFields:f})],className:LTe})})}let aC=zTe;function UTe(e){let t={},r=e.startsWith("?")?e.slice(1):e;return r===""||r.split("&").forEach(n=>{let i=n.split("="),o=i.length;if(!(o>=3))switch(o){case 0:return;case 1:let a=i[0];if(a!==""){t[decodeURIComponent(a)]="";return}else return;case 2:let s=i[0],l=i[1];if(s!==""){t[decodeURIComponent(s)]=decodeURIComponent(l);return}else return}}),t}function BTe(e,t){return e===t?0:e<t?-1:1}function N7(e){let t=$e(e).filter(r=>r[1]!=="").toSorted((r,n)=>BTe(r[0],n[0]));return t.length===0?"":"?"+t.map(r=>encodeURIComponent(r[0])+"="+encodeURIComponent(r[1])).join("&")}function jTe(e){if(e.path===0)return"/";let r=[];return TV(e.path,n=>{r.push(n)}),"/"+r.join("/")}function OD(e,t){let r=t.filter(o=>o[1]==="").map(o=>o[0]),n=t.filter(o=>o[1]!==""),i=$e(e).filter(o=>{let a=o[0];return r.includes(a)?!1:!n.some(s=>s[0]===a)});return Oe(i.concat(n))}function D7(){let e=mV(),t=UTe(e.search),r=jTe(e),n=e.hash===""?"":"#"+e.hash,i=l=>{let c=N7(l);ua(r+c+n)};return{params:t,get:l=>F(t,l),set:(l,c)=>i(OD(t,[[l,c]])),setMany:l=>i(OD(t,l))}}let F7=Zt(void 0),qTe=F7.Provider;function VTe(e){return ur(qTe,{value:e.chrome,children:e.children})}let MD={make:VTe};function GTe(){return St(F7)}function Do(e){return"var("+e+")"}let KTe=E([z("flex"),_e("column"),X("center"),Ze("center"),u("gap",Do(O.md)),ai(1),u("min-height","160px"),Ya("center"),u("padding",Do(O.lg))]),HTe=E([u("font-size","32px"),u("color",Do(x.warning)),u("line-height","1")]),WTe=E([u("color",Do(x.textPrimary)),u("font-size",Do(T.sizeLg)),u("font-weight",Do(T.weightMedium)),_n(ke(0))]),JTe=E([u("color",Do(x.textSecondary)),u("font-size",Do(T.sizeSm)),u("line-height",Do(T.lineHeightNormal)),u("max-width","440px"),_n(ke(0))]),QTe=E([u("background","transparent"),u("color",Do(x.textSecondary)),u("border","1px solid var("+x.border+")"),u("border-radius",Do(Y.md)),u("padding","var("+O.xs+") var("+O.md+")"),u("font-size",Do(T.sizeSm)),u("cursor","pointer"),Uo(ke(4))]);function YTe(e){let t=e.title,r=t!==void 0?t:"Unavailable";return L("div",{children:[_("div",{children:"( ! )",className:HTe}),_("h3",{children:r,className:WTe}),_("p",{children:e.detail,className:JTe}),ne(e.onRetry,null,n=>_("button",{children:"Try again",className:QTe,onClick:i=>n()}))],className:KTe})}let d0=YTe;function sC(e){return ne(k(k(G(e),t=>F(t,"properties")),G),[],$e)}function XTe(e,t){return q(sC(e).find(r=>r[0]===t),r=>r[1])}function lC(e){if(e.length===1)return Dt(e[0])}function ZTe(e,t){return Lb(e.schema).every(r=>r===t||r==="id"?!0:Re(r,e.aggregateIdField))}function KS(e,t){return q(lC(sC(e.schema).filter(r=>t(r[0],r[1]))),r=>r[0])}function LD(e,t,r){return lC(Q(e,n=>k(KS(n,r),i=>{if(ZTe(n,i))return{command:n,argument:i,tier:t}})))}function I7(e,t){return Re(Io(e).storeTarget,t)}function e$e(e,t,r,n){let i=t.field;return i!==void 0?sC(e.schema).some(o=>o[0]===i)?i:void 0:Wn(k(n,o=>KS(e,(a,s)=>I7(s,o))),KS(e,(o,a)=>o===r))}let zD={contents:[]};function UD(e,t,r){let n=e+"."+t.command+"."+D(t.field,"")+"."+r;if(!zD.contents.some(i=>i===n)){zD.contents.push(n),console.error('[AutoUI] x-reventless-setter on field "'+e+'": '+r);return}}function t$e(e,t,r,n){let i=lC(e.filter(o=>o.name===t.command));if(i!==void 0){let o=e$e(i,t,r,n);if(o!==void 0)return{command:i,argument:o,tier:"Declared"};UD(r,t,'"'+t.command+'" takes no argument this field could fill — the slot stays static.');return}UD(r,t,'no exposed instance command named "'+t.command+'" — the slot stays static.')}function P7(e,t,r){return k(XTe(e,t),n=>{let i=Io(n),o=i.storeTarget,a=r.filter(c=>c.level==="Instance"),s=i.setter;if(s!==void 0)return t$e(a,s,t,o);let l=k(o,c=>LD(a,"StoreMatch",(d,f)=>I7(f,c)));return l!==void 0?l:LD(a,"NameMatch",(c,d)=>c===t)})}function O7(e,t){let r=e.requiredRole;return r!==void 0?t.includes(r):!0}function r$e(e){let t=e.resource,r=tc(t,void 0),n=t.name,i=r.rows,o=t.schema,a=e.resourceSemantics,s=Mh(r.canLoadMore),d={readModelName:n,rows:i,schema:o,semantics:a,window:s,onOpenRow:(R,N)=>{},role:Zu},f=e.eventReadModelName,h=e.eventRows,p=e.eventSchema,m=e.eventSemantics,g=e.eventAccent,v=e.eventWindow,b=e.onOpenEvent,y=e.onCommand,S=ec,w=e.resourceRef,C=e.assignCommand,A={readModelName:f,rows:h,schema:p,semantics:m,accent:g,window:v,onOpenRow:b,onCommand:y,role:S,resourceRef:w,assignCommand:C},$=r.fetchState;return typeof $!="object"?$==="Loading"?_(yd,{}):e.mode.render([d,A]):$.TAG==="Error"?_(Ia,{detail:$._0,onRetry:()=>r.refetch()}):_(d0,{detail:$._0,onRetry:()=>r.refetch()})}let n$e=r$e,M7=Zt(void 0),i$e=M7.Provider;function o$e(e){return ur(i$e,{value:e.refresh,children:e.children})}let BD={make:o$e};function a$e(){return St(M7)}function s$e(e){try{return Mi(localStorage.getItem(e))}catch{return}}function l$e(e,t){try{return localStorage.setItem(e,t)}catch{return}}function Kn(e){return"var("+e+")"}let Yy=E([z("flex"),_e("column"),u("gap",Kn(O.lg))]),u$e=E([z("flex"),_e("column"),u("gap",Kn(O.lg))]),c$e=E([z("flex"),_e("column"),u("gap",Kn(O.sm))]),d$e=E([u("font-size",Kn(T.sizeSm)),u("font-weight",Kn(T.weightMedium)),u("color",Kn(x.textSecondary)),u("text-transform","uppercase"),u("letter-spacing","0.04em"),_n(ke(0))]),f$e=E([z("flex"),X("center"),u("gap",Kn(O.sm)),u("flex-wrap","wrap")]),L7=E([z("inlineFlex"),X("center"),u("gap","6px"),u("margin-left","auto"),u("font-size",Kn(T.sizeSm)),u("color",Kn(x.textSecondary)),u("cursor","pointer"),u("white-space","nowrap")]),h$e=E([z("flex"),_e("column"),u("gap",Kn(O.sm)),u("align-items","stretch"),lr("& ."+L7,[u("margin-left","0")])]),p$e=E([z("flex"),X("center"),Ze("flexEnd"),u("gap",Kn(O.xs)),u("padding-top",Kn(O.sm))]),jD=E([u("background","none"),u("border","1px solid var("+x.border+")"),u("border-radius",Kn(Y.sm)),u("padding","2px var("+O.sm+")"),u("color",Kn(x.textSecondary)),u("font-size",Kn(T.sizeSm)),Ce("pointer"),Ue([u("background",Kn(x.surfaceSubtle)),u("color",Kn(x.textPrimary))]),Nw([u("opacity","0.4"),Ce("notAllowed")])]);function m$e(e,t,r){return t!==void 0&&t!==""?[["before",t],["last",r]]:e!==void 0?e!==""?[["first",r],["after",e]]:[["first",r]]:[["first",r]]}let qD={contents:[]},VD={contents:[]};function g$e(e,t,r){let n=D(e,"<no-plugin>")+"."+t+"."+r;if(!qD.contents.some(i=>i===n)){qD.contents.push(n),console.warn("[AutoUI] Read model "+t+' declared lifecycleField="'+r+`" but the list-view rows don't include that field; per-row command filtering is disabled.`);return}}function v$e(e,t,r){let n=D(e,"<no-plugin>")+"."+t;if(!VD.contents.some(i=>i===n)){VD.contents.push(n),console.warn("[AutoUI] Read model "+t+' lifecycleField="'+r+'" value is neither a string nor a TAG-shaped object; per-row command filter cannot match against allowedStates.');return}}let GD={contents:[]};function b$e(e,t){let r=D(e,"<no-plugin>")+"."+t;if(!GD.contents.some(n=>n===r)){GD.contents.push(r),console.warn("[AutoUI] Read model "+t+" produced duplicate row keys — row identity is ambiguous and row clicks may open the wrong row. Give each row a unique id, or annotate the distinguishing field with @subId.");return}}function _$e(e){let t=e.archiveOffered,r=e.rowActions,n=e.schedulerJoin,i=e.uiHints,o=e.liveOffered,a=e.sortKeyField,s=e.byIdsQueryDocument,l=e.byIdsQueryField,c=e.detailQueryDocument,d=e.singleQueryField,f=e.drillPath,h=e.openRowId,p=e.pluginId,m=e.detailView,g=e.rows,v=e.readModel,b=f!==void 0?f:[],y=o!==void 0?o:!0,S=r!==void 0?r:[],w=t!==void 0?t:!1,C=si(),A=Yp(),$=cm(),R=ce(()=>{}),N=R[1],I=ce(()=>{}),M=I[1],P=I[0],B=ce(()=>({})),j=B[1],W=B[0],te=ce(()=>"Loaded"),J=te[1],re=te[0],se=ce(()=>{}),he=se[1],K=se[0],ie=nm(),le=ne(ie,!1,U=>U.isLive(v.queryField)),Z=IAe(D(p,"default")+"."+v.name),ve=Z[0],be=le&&y&&ve,Ge=ga(),zt=q(p,U=>({pluginId:U,viewName:v.name})),At=k(i,U=>hn(U,v.name)),Er=l2(v.schema,At,{registry:Ge,ownEntity:zt}),nn=ne(k(At,U=>U.suppress),!1,U=>U.includes(fh)),Mn;if(n!==void 0&&vAe(!0,v.schema,nn)){let U=s5(fh);Mn=U!==void 0&&!Er.some(de=>de.id===U.id)?Er.concat([U]):Er}else Mn=Er;let qt=i2(p,v.name,void 0),wi=ce(()=>o2(qt)),Yn=wi[1],et=xz(),lt=et.narrow,Vt=Sz(et),Ot=U=>{a2(qt,U,Vt),Yn(de=>({mode:U,band:Vt}))},Ft=u2(wi[0],At,Fw(v.schema),Vt,Mn),Ei=n!==void 0&&Ft!==void 0?Ft.id===fh:!1,Ln=Ee(m)&&!Ei,Xn="reventless.layout."+D(p,"default")+"."+v.name,ns=ce(()=>s$e(Xn)),Ho=ns[1],ki=Wue(ns[0],At,xQ(v.schema),Ln),Ci=ie!==void 0&&be?ie.statusFor(ie.apiForReadModel(v.queryField))!=="Open":!1,Ki=be&&!Ci,Se=ce(()=>0),Fe=Se[1],Lr=Se[0],Jt=De({}),V=De(void 0),ye=De(gs.make()),Pe=De(gs.make()),ut=De(td.make()),ft=De(td.make()),It=De(new Map),at=U=>{It.current.set(U,Date.now())},Me=U=>{let de=It.current.get(U);return de!==void 0?Date.now()-de<6e4:!1},Ie=D7(),tt=N7(Ie.params),rt=Ls(),Le=q(p,U=>vs(ul(U,v.name))+tt),vt=Dw(v.schema),Et=U=>q(k(F(U,"id"),oe),de=>{let ge=k(vt,we=>k(F(U,we),oe));return ge!==void 0?tCe(de,ge):de}),Gr=U=>vt!==void 0?mD(U)[0]:U,zn=U=>{if(vt===void 0)return Oe([["id",U]]);let de=mD(U),ge=de[1],we=de[0];return Oe(ge!==void 0?[["id",we],["subId",ge]]:[["id",we]])},ct=h!==void 0?h:P,cn=U=>p!==void 0?rt(Ga(p,v.name,U,[])+tt):M(de=>U),Fr=()=>Le!==void 0?rt(Le):M(U=>{}),zr=DS(v.schema),yn=Vz(v.schema),xn=zr.hasFilter||zr.hasSort||zr.hasSearch,kr=bn(v.schema,k(i,U=>Qa(U,v.name)),{field:v.labelField,source:v.labelFieldSource}),Ir=di(v.schema,void 0,Ge,zt,kr.labelField,kr.projectedLabelField),Hi=Iw(v.schema,k(At,U=>U.retiredLabel)),is=Tc.offered(w,Hi),Zl=Tc.showing(is,Ie.get(Tc.param)),el=[];$e(Ie.params).forEach(U=>{let de=U[1];if(de==="")return;let ge=U[0];if(ge==="after"||ge==="before"){el.push(ge+"="+de);return}if(ge===Tc.param&&is){el.push(ge+"="+de);return}if(!xn)return;if(ge==="sort"||ge==="dir"){el.push(ge+"="+de);return}if(ge==="q"&&yn.search){el.push(ge+"="+de);return}if(!ge.startsWith("f."))return;let we=ge.slice(2);if(ne(Ir.find(Ye=>Ye.key===we),!1,Ye=>O3(Ye).filter)){el.push(ge+"="+de);return}});let Ec=el.toSorted((U,de)=>U===de?0:U<de?-1:1).join("|"),eu={};if(xn){let U={};$e(Ie.params).forEach(dn=>{let ar=dn[0];if(ar.startsWith("f.")){U[ar.slice(2)]=dn[1];return}});let de=M3(U,Ir),ge=D(Ie.get("q"),""),we=Gz(de[0],ge,yn,Ir),Ye=Ie.get("dir")==="desc"?"Desc":"Asc",kt=L3(Ie.get("sort"),Ye,Ir),er=u1e(kt);ee(we,dn=>{eu.filter=dn}),ee(er,dn=>{eu.orderBy=dn})}m$e(Ie.get("after"),Ie.get("before"),DAe).forEach(U=>{eu[U[0]]=U[1]}),is&&(eu.includeRetired=Zl);let tl=eC(v,eu,Ec,void 0,()=>j(U=>({})),void 0),Kr=tl.refetch,ho=tl.fetchState,tu=tl.pageInfo,kc=tl.setRows,ru=tl.rows,Sm=(U,de,ge)=>A!==void 0?()=>A(U,zn(ge)).then(we=>[we.data,C5(we,de)]):C!==void 0?()=>C(U,zn(ge)).then(we=>[we,void 0]):void 0,rl=U=>{if(c===void 0||d===void 0)return;let de=Sm(c,d,U);if(de!==void 0){J(ge=>"Loading"),Lt(de().then(ge=>{let we=ge[1],Qe=k(G(ge[0]),kt=>F(kt,d)),Ye=0;return we!==void 0||Qe===void 0||Xe(Qe)==="JSONNull"?Ye=1:(j(kt=>{let er=Oe($e(kt));return er[U]=Qe,er}),J(kt=>"Loaded")),Ye===1&&(j(kt=>Oe($e(kt).filter(er=>er[0]!==U))),J(kt=>we!==void 0?{TAG:"Refused",_0:we.message}:{TAG:"Error",_0:"Detail not found"})),Promise.resolve()}),ge=>(J(we=>({TAG:"Error",_0:"Failed to load detail"})),Promise.resolve()));return}},wm=()=>{if(ee(ct,rl),!Ki)return Kr()};Ae(()=>{let U=h!==void 0?h:P;U!==void 0&&(ir(F(W,U))?rl(U):J(de=>"Loaded"))},[h,P]);let Em=Ap(),Cf=Qk(),km=ne(k(xa(),U=>U.identity),[],U=>U.groups),Rf=(U,de)=>q(mi(P7(v.schema,de,v.commands),ge=>O7(ge.command,km)),ge=>(()=>N(we=>({command:ge.command,rowId:U,formKey:ge.command.name+":"+U})))),Cm=U=>{let de=k(F(U,"id"),oe);return de!==void 0?S.map(ge=>{let we=s7(ge,de);return{label:ge.label,run:()=>N(Qe=>({command:we.command,rowId:void 0,initialValues:we.initialValues,navigateTo:we.navigateTo,formKey:we.formKey}))}}):[]},bt=(U,de)=>Cm(D(G(de),{})),os=(U,de)=>k(k(F(U,"id"),oe),ge=>Rf(ge,de)),hR=(g!==void 0?g:ru).map(U=>D(G(U),{})),Tf=hf(hR,Ir,Ge,zt,void 0),Rm={lookupLabel:(U,de)=>ff(Tf,U,Ge,de),isMissing:(U,de)=>em(Tf,U,Ge,de),retiredBadge:(U,de)=>Xp(Tf,U,Ge,de),linkable:(U,de)=>Zp(Tf,U,Ge,de,w)},Cc=due(Ie.get("after"),Ie.get("before")),S_=fue(tu,Cc),w_=hue(tu,Cc),gR=S_||w_,vR=W8(Ir,Ge,Em,F,!0,Rm,zt,os,Hi,kr.labelField).map(U=>{if(!U.sortable||!gR)return U;let de=ne(Ir.find(ge=>ge.key===U.key),!1,ge=>O3(ge).sort);return{key:U.key,label:U.label,render:U.render,sortable:de,width:U.width}}),bR=Ie.get("sort"),Am=Ie.get("dir")==="desc"?"Desc":"Asc",E_=U=>kc(de=>de.map(ge=>{let we=go(ge);if(we===void 0)return ge;let Qe=U.find(Ye=>Re(go(Ye),we));return Qe!==void 0?Qe:ge})),Tm=a!==void 0?Q(ru,U=>k(k(G(U),de=>F(de,a)),oe)):[],_R=U=>{let de=tu.hasNextPage,ge=Tm.length;if(U===void 0||a===void 0||!de||ge<=0)return!1;let we=Tm[0];if(Am==="Asc"){let Ye=nt(Tm,we,(kt,er)=>kt>er?kt:er);return U>Ye}let Qe=nt(Tm,we,(Ye,kt)=>Ye<kt?Ye:kt);return U<Qe},yR=U=>{if(U.length!==0)return kc(de=>Hy.drop(de,U))},kq=()=>{let U=Object.keys(Jt.current);if(Jt.current={},V.current=void 0,U.length!==0){if(U.length>10)return Kr();if(l!==void 0&&s!==void 0&&C!==void 0){let de=Oe([["ids",U.map(ge=>ge)]]);Lt(C(s,de).then(ge=>{let we=Hy.fromBatch(U,ge,l);return we!==void 0&&(E_(we.rows),ir(vt)&&yR(we.gone)),Promise.resolve()}),ge=>Promise.resolve());return}if(vt!==void 0||d===void 0||c===void 0||C===void 0)return Kr();U.forEach(de=>{let ge=Oe([["id",de]]);Lt(C(c,ge).then(we=>{let Qe=Hy.fromSingle(we,d);return Qe!==void 0&&(typeof Qe!="object"?yR([de]):E_([Qe._0])),Promise.resolve()}),we=>Promise.resolve())})}},k_=U=>{Jt.current[U]=!0;let de=V.current;de!==void 0&&clearTimeout(de),V.current=setTimeout(kq,150)},C_=U=>kc(de=>{let ge=de.map(Ye=>{let kt=go(Ye);if(kt===void 0)return Ye;let er=U.find(dn=>Re(go(dn),kt));return er!==void 0?er:Ye}),we=Q(ge,go),Qe=U.filter(Ye=>{let kt=go(Ye);return kt!==void 0?!we.includes(kt):!1});return ge.concat(Qe)}),Cq=U=>ru.find(de=>Re(go(de),U)),xR=o5.useInvalidate(),Rq=U=>{if(!gs.shouldApply(ye.current,U.id,U.seq))return;gs.record(ye.current,U.id,U.seq),xR(v.queryField);let de=Cq(U.id),ge=Ee(de);switch(U.changeKind){case"Added":if(!Me(U.id))return _R(U.sortKeyValue)?void 0:Fe(er=>er+1|0);if(It.current.delete(U.id),ge)return;let Qe=rRe(U,v.schema);if(vt!==void 0||Qe===void 0){let er=U.id;if(vt!==void 0)return Kr();if(l!==void 0&&s!==void 0&&C!==void 0){let ar=Oe([["ids",[er]]]);Lt(C(s,ar).then(fn=>{let il=D(k(k(G(fn),Ac=>F(Ac,l)),Ct),[]);return C_(il),Promise.resolve()}),fn=>Promise.resolve());return}if(d===void 0||c===void 0||C===void 0)return Kr();let dn=Oe([["id",er]]);Lt(C(c,dn).then(ar=>{let fn=k(G(ar),il=>F(il,d));return fn!==void 0&&Xe(fn)!=="JSONNull"&&C_([fn]),Promise.resolve()}),ar=>Promise.resolve());return}else return C_([Qe]);case"Updated":if(vt!==void 0)return ge?k_(U.id):void 0;if(de===void 0)return;let Ye=_R(U.sortKeyValue),kt=td.apply(ut.current,de,U,v.schema);return Ye||kt===void 0?k_(U.id):E_([kt]);case"Removed":return ge?vt!==void 0?k_(U.id):kc(er=>er.filter(dn=>ca(go(dn),U.id))):void 0;case"BulkInvalidated":return Fe(er=>0),Kr()}},Aq=()=>Kr();FS(v.queryField,"All",be,Rq,Aq);let Tq=U=>{if(ct===void 0||U.id!==Gr(ct)||!gs.shouldApply(Pe.current,U.id,U.seq))return;gs.record(Pe.current,U.id,U.seq),xR(v.queryField);let de=U.changeKind;if(vt!==void 0)switch(de){case"Updated":case"Removed":return rl(ct);case"Added":case"BulkInvalidated":return}else switch(de){case"Updated":let ge=k(F(W,ct),we=>td.apply(ft.current,we,U,v.schema));return ge!==void 0?(j(we=>{let Qe=Oe($e(we));return Qe[ct]=ge,Qe}),J(we=>"Loaded")):rl(ct);case"Removed":return he(we=>ct);case"Added":case"BulkInvalidated":return}},$q=()=>{if(ct!==void 0&&c!==void 0&&d!==void 0&&C!==void 0){Lt(C(c,zn(ct)).then(U=>{let de=k(G(U),we=>F(we,d)),ge=0;return de!==void 0&&Xe(de)!=="JSONNull"?(j(we=>{let Qe=Oe($e(we));return Qe[ct]=de,Qe}),J(we=>"Loaded")):ge=1,ge===1&&he(we=>ct),Promise.resolve()}),U=>Promise.resolve());return}};FS(v.queryField,{_0:D(q(ct,Gr),"")},be&&Ee(ct),Tq,$q),Ae(()=>{he(U=>{})},[D(ct,"")]);let SR=D(Ie.get("q"),""),R_={};$e(Ie.params).forEach(U=>{let de=U[0];if(de.startsWith("f.")){R_[de.slice(2)]=U[1];return}});let $m=qke(Ir,R_),wR=$m.length!==0,Nq=q(bR,U=>({key:U,direction:Am==="Asc"?"Asc":"Desc"})),Dq=(U,de)=>{let ge=de==="Asc"?"asc":"desc";Ie.setMany([["sort",U],["dir",ge],["after",""],["before",""]])},Fq=U=>Ie.setMany([["q",U],["after",""],["before",""]]),ER=(U,de)=>Ie.setMany([["f."+U,de],["after",""],["before",""]]),Iq=()=>ee(tu.endCursor,U=>Ie.setMany([["after",U],["before",""]])),Pq=()=>ee(tu.startCursor,U=>Ie.setMany([["before",U],["after",""]])),$f=v.commands.filter(U=>U.level==="Instance"),Oq=$f.length!==0||S.length!==0,Rc;if(Oq){let ge={key:"__actions",label:"",render:we=>{let Qe=k(F(we,"id"),oe),Ye=v.lifecycleField;Ye!==void 0&&(F(we,Ye)!==void 0?Sa(we,Ye)===void 0&&v$e(p,v.name,Ye):g$e(p,v.name,Ye));let er=Xz($f,we,v.lifecycleField).map(ar=>({TAG:"Action",label:ar.label,onClick:()=>N(fn=>({command:ar,rowId:Qe,formKey:ar.name+":"+D(Qe,"")})),danger:!1})),dn=Cm(we).map(ar=>({TAG:"Action",label:ar.label,onClick:ar.run,danger:!1}));return _(G9,{items:er.concat(dn),triggerLabel:"..."})},sortable:!1,width:"56px"};Rc=vR.concat([ge])}else Rc=vR;let Mq=v.commands.filter(U=>U.level==="Collection"),kR=U=>{let de=U.map(er=>D(G(er),{})),ge=M3(R_,Ir),Qe=xn&&yn.search?"":SR,Ye=L3(bR,Am,Ir),kt;return kt=typeof Ye!="object"||Ye.TAG==="ServerSort"?[void 0,Am]:[Ye._0,Ye._1],jke(Bke(Uke(de,Ir,ge[1]),Ir,Qe),Ir,kt[0],kt[1])},CR=U=>{if(Ft!==void 0&&Ft.id!==fa){let de=q(kr.statusField,as=>zb(as,$f,k(At,ol=>ol.transitions))),ge=Yk(C,A,$f,v.name,be,()=>Kr(),Ge,Cf.onNotice,at),we=kR(U).map(as=>as),Qe=PJ(w_,S_);if(n!==void 0&&Ft.id===fh){let as=bn(n.resource.schema,k(i,ol=>Qa(ol,n.resource.name)),{field:n.resource.labelField,source:n.resource.labelFieldSource});return _(n$e,{mode:Ft,resource:n.resource,resourceSemantics:as,resourceRef:n.resourceRef,assignCommand:b7($f,n.resourceRef),eventReadModelName:v.name,eventSchema:v.schema,eventRows:we,eventWindow:Qe,eventSemantics:kr,eventAccent:k(At,ol=>ol.accent),onOpenEvent:(ol,Hq)=>ee(k(G(Hq),Et),cn),onCommand:ge})}let Ye=v.name,kt=v.schema,er=k(At,as=>as.accent),dn=Qe,ar=(as,ol)=>ee(k(G(ol),Et),cn),fn=q(de,as=>ge),il=Rf,Ac=S.length===0?void 0:bt,Kq={readModelName:Ye,rows:we,schema:kt,semantics:kr,accent:er,window:dn,onOpenRow:ar,onCommand:fn,statusCommandFor:de,fillSlot:il,rowActionsFor:Ac,ownEntity:zt,retired:Hi,refLabels:Rm};return Ft.render([Kq])}else{let de=kR(U),ge=q(m,ar=>(fn=>ee(Et(fn),cn))),we=ar=>D(Et(ar),JSON.stringify(ar)),Qe=(ar,fn)=>{let il=fn.map(we),Ac={};return il.forEach(DR=>{Ac[DR]=!0}),Object.keys(Ac).length!==il.length&&b$e(p,v.name),_(Oh,{columns:ar,data:fn,keyFn:we,sortState:Nq,onSort:Dq,onRowClick:ge,activeKey:ct})},Ye=vQ(v.schema);if(Ye===void 0)return Qe(Rc,de);let kt=QCe(de,Ye,co(v.schema,Ye)),er=kt.length;if(er===1||er===0)return Qe(Rc,de);let dn=Rc.filter(ar=>ar.key!==Ye);return _("div",{children:kt.map(ar=>{let fn=ar[0];return L("div",{children:[_("div",{children:pt(fn),className:d$e}),Qe(dn,ar[1])],className:c$e},fn)}),className:u$e})}},Lq=g!==void 0?CR(g):typeof ho!="object"?ho==="Loading"?_(yd,{}):CR(ru):ho.TAG==="Error"?_(Ia,{detail:ho._0,onRetry:()=>Kr()}):_(d0,{detail:ho._0,onRetry:()=>Kr()}),nl;if(ct!==void 0&&m!==void 0){let de=(g!==void 0?g:ru).find(Qe=>Re(k(G(Qe),Et),ct)),ge=F(W,ct);nl=[ct,m,ge!==void 0?ge:de]}else nl=void 0;let zq=U=>ca(K,U[0])?Ee(U[2]):!1,RR=U=>{let de=U[2],ge=U[0];if(Re(K,ge))return _(Ia,{title:"Entity removed",detail:"This entity no longer exists. Return to the list to continue.",onRetry:()=>Fr()});if(de!==void 0)return U[1](Gr(ge),b,Rt(de));let we=0,Qe=0,Ye=0;if(typeof ho!="object"){if(ho==="Loading")return _(yd,{});if(typeof re!="object"){if(re!=="Loading")return _(Ia,{title:"Row not found",detail:"The row data is no longer in the current page."});Ye=4}else{if(re.TAG!=="Error")return _(d0,{detail:re._0,onRetry:()=>Kr()});we=2}}else Ye=4;if(Ye===4)if(typeof re!="object"){if(re==="Loading")return _(yd,{});Qe=3}else Qe=3;if(Qe===3&&typeof ho=="object"){if(ho.TAG==="Error")return _(Ia,{detail:ho._0,onRetry:()=>Kr()});we=2}return we===2&&typeof re=="object"&&re.TAG==="Error"?_(Ia,{detail:re._0,onRetry:()=>Kr()}):_(d0,{detail:ho._0,onRetry:()=>Kr()})},Uq=Ln?_("div",{children:[["full","Full","▭"],["split","Split","▤"]].map(U=>{let de=U[1],ge=U[0],we;return we=ki==="Full"?ge==="full":ge==="split",L("button",{children:[_("span",{children:U[2],"aria-hidden":!0,style:{fontSize:"0.9em",lineHeight:"1"}}),_("span",{children:de,className:Da.Style.btnLabel})],"aria-label":de,"aria-pressed":we?"true":"false",className:we?Da.Style.btnActive:Da.Style.btn,title:de,onClick:Qe=>{l$e(Xn,ge),Ho(Ye=>ge)}},ge)}),"aria-label":"Layout",className:Da.Style.group,role:"group"}):null,Nm=$z(),AR=y?_(RAe,{live:ve,canBeLive:le,reconnecting:Ci,onToggle:Z[1]}):null,Bq=_(J9,{title:v.name,commands:Mq.map(U=>({key:U.name,label:"+ "+U.label,run:()=>N(de=>({command:U,rowId:void 0,formKey:U.name})),primary:!0})),controls:L(Bt,{children:[Mn.length>1?_(Da.make,{modes:Mn,activeId:ne(Ft,fa,U=>U.id),onSelect:Ot}):null,Uq,AR]}),inBar:Ee(Nm)}),TR=dv(Nm,Bq),$R=Hi!==void 0&&is?L("label",{children:[_("input",{checked:Zl,type:"checkbox",onChange:U=>Ie.setMany(Tc.toggleParams(Zl))}),Tc.label(Hi)],className:L7}):null,jq=wR?_(j9,{filters:$m,onFilterChange:ER}):null,qq=nt($m,0,(U,de)=>de.value===""?U:U+1|0)+(Zl&&is?1:0)|0,Vq=L(Bt,{children:[L("div",{children:[_(U9,{value:SR,onChange:Fq}),lt&&(wR||is)?_(UCe,{activeCount:qq,children:L("div",{children:[$m.map(U=>_(Zke.make,{filter:U,onChange:ER},U.key)),$R],className:h$e})}):L(Bt,{children:[jq,$R]})],className:f$e}),Lr>0?_(NAe,{count:Lr,onClick:()=>{Fe(U=>0),Ie.setMany([["after",""],["before",""]]),Kr()}}):null]}),Gq=gR?L("div",{children:[_("button",{children:"‹ Prev",className:jD,disabled:!w_,onClick:U=>Pq()}),_("button",{children:"Next ›",className:jD,disabled:!S_,onClick:U=>Iq()})],className:p$e}):null,A_=SQ(v.schema),T_;if(A_!==void 0){let U=A_.matchedGroups,de=U.length,ge=de!==1?de!==0?U.join(" / "):"an elevated role":U[0];T_=_(Nk,{variant:"Info",title:"Viewing as "+ge,message:"This list is not filtered to you — it shows rows for every "+A_.ownerLabel+"."})}else T_=null;let NR=L(Bt,{children:[Vq,T_,Cf.element,Lq,Gq]}),Dm;if(ki==="Full")if(nl!==void 0){let U=nl[2],de=nl[1],ge=nl[0],Ye={label:v.name,href:Le,onClick:Fr},kt=zq([ge,de,U]),fn={placement:Ee(Nm)?"Bar":"Pane",ancestors:[Ye],controls:AR};Dm=_(BD.make,{refresh:wm,children:L("div",{children:[kt?null:dv(Nm,_("div",{children:_(V9,{crumbs:[Ye],allLinks:!0}),className:ECe.titleGroup})),_(MD.make,{chrome:fn,children:RR([ge,de,U])})],className:Yy})})}else Dm=L("div",{children:[TR,NR],className:Yy});else{let U=nl!==void 0?RR(nl):_(Kd,{title:"Select an item",description:"Choose a row on the left to see its details here."});Dm=_(BD.make,{refresh:wm,children:L("div",{children:[TR,_(MD.make,{chrome:{placement:"Pane",ancestors:[]},children:_(VCe,{master:NR,detail:U})})],className:Yy})})}return L(Bt,{children:[Dm,ne(R[0],null,U=>_(Dk,{isOpen:!0,onClose:()=>N(de=>{}),title:U.command.label,children:_(aC,{schema:U.command.schema,aggregateId:U.rowId,aggregateIdField:U.command.aggregateIdField,injectNewId:U.command.level==="Collection",ownerField:U.command.ownerField,ownerValue:U.command.ownerValue,initialValues:U.initialValues,refFields:U.command.refFields,onSubmit:de=>{if($!==void 0){let ge=U.rowId;return ge!==void 0?at(ge):ee(F(de,D(U.command.aggregateIdField,"id")),at),Lt($(U.command.mutationDocument,Bb(U.command.schema,de)).then(we=>{if(typeof we!="object")return we==="Accepted"?(N(Qe=>{}),Ki||Kr(),ee(U.navigateTo,ua),Promise.resolve("Ok")):(N(Qe=>{}),!Ki&&ir(U.navigateTo)&&setTimeout(()=>Kr(),ICe),ee(U.navigateTo,ua),Promise.resolve("Ok"));{if(we.TAG==="Rejected"){let Ye=we._0;return dm(C,Ge,Ye.errorCode,Ye.detail).then(kt=>Promise.resolve({TAG:"Err",_0:kt}))}let Qe=we._0;return console.error("[AutoUI] "+v.name+": command "+U.command.name+" not executed — "+Qe),Promise.resolve({TAG:"Err",_0:Qe})}}),we=>Promise.resolve({TAG:"Err",_0:"Request failed"}))}return N(ge=>{}),Promise.resolve("Ok")},submitLabel:"Execute"},U.formKey)}))]})}let y$e=_$e;function x$e(e,t,r){if(e.length<2)return[];let n=nt(e,Number.MAX_VALUE,(s,l)=>s<l?s:l),o=nt(e,Number.MIN_VALUE,(s,l)=>s>l?s:l)-n,a=t/(e.length-1|0);return e.map((s,l)=>({x:l*a,y:o===0?r/2:r-(s-n)/o*r}))}function S$e(e){return e.map(t=>t.x.toString()+","+t.y.toString()).join(" ")}function w$e(e){let t=e.color,r=e.height,n=e.width,i=n!==void 0?n:80,o=r!==void 0?r:24,a=t!==void 0?t:"",s=x$e(e.values,i,o),l=a===""?"var("+x.brand+")":a;return s.length<2?null:_("svg",{children:_("polyline",{fill:"none",points:S$e(s),stroke:l,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"}),style:{display:"block",overflow:"visible"},height:o.toString(),width:i.toString(),viewBox:"0 0 "+i.toString()+" "+o.toString()})}let E$e=w$e;function pi(e){return"var("+e+")"}let k$e=E([z("flex"),_e("column"),u("gap",pi(O.xs)),u("padding",pi(O.lg)),u("background",pi(x.surface)),u("border","1px solid var("+x.border+")"),u("border-radius",pi(Y.md))]),C$e=E([u("color",pi(x.textSecondary)),u("font-size",pi(T.sizeSm)),u("font-weight",pi(T.weightMedium))]),R$e=E([z("flex"),X("baseline"),u("gap",pi(O.sm))]),A$e=E([u("color",pi(x.textPrimary)),u("font-size",pi(T.sizeXxl)),u("font-weight",pi(T.weightBold)),u("line-height",pi(T.lineHeightTight))]);function T$e(e){switch(e){case"Up":return x.success;case"Down":return x.error;case"Neutral":return x.textDisabled}}function $$e(e){return E([u("color",pi(T$e(e))),u("font-size",pi(T.sizeSm)),u("font-weight",pi(T.weightMedium))])}function N$e(e){let t=e.trendLabel,r=e.trend,n;if(r!==void 0&&t!==void 0){let i;switch(r){case"Up":i="^";break;case"Down":i="v";break;case"Neutral":i="-";break}n=_("span",{children:i+" "+t,className:$$e(r)})}else n=null;return L("div",{children:[_("div",{children:e.label,className:C$e}),L("div",{children:[_("span",{children:e.value,className:A$e}),n],className:R$e}),ne(e.sublabel,null,i=>_("div",{children:i,style:{color:"var("+x.textDisabled+")",fontSize:"var("+T.sizeXs+")"}})),D(e.footer,null)],className:k$e})}let D$e=N$e;function z7(e){return"var("+e+")"}let F$e=E([z("grid"),u("grid-template-columns","repeat(auto-fill, minmax(180px, 1fr))"),u("gap",z7(O.md))]),I$e=E([Ce("pointer"),u("border-radius",z7(Y.md)),Ue([u("filter","brightness(0.98)")])]);function P$e(e){let t=e.kpis;return t.length===0?null:_("div",{children:t.map(r=>{let n=q(r.spark,a=>_(E$e,{values:a,width:120,height:24})),i=_(D$e,{label:r.label,value:r.value,trend:r.trend,trendLabel:r.trendLabel,sublabel:r.sublabel,footer:n}),o=r.onOpen;return o!==void 0?_("div",{children:i,className:I$e,role:"button",tabIndex:0,onKeyDown:a=>{if(a.key==="Enter")return o()},onClick:a=>o()},r.key):_("div",{children:i},r.key)}),className:F$e})}let O$e=P$e,yv=["var("+x.brand+")","#7c9c5e","#b0743c","#7466a3","#4d8a8a","#a35f74"];function U7(e,t){return D(e.color,yv[Fo(t,yv.length)])}function M$e(e){let t=nt(e,0,(n,i)=>n+(i.value>0?i.value:0));if(t<=0)return[];let r={contents:0};return e.map(n=>{let i=r.contents,o=(n.value>0?n.value:0)/t;return r.contents=i+o,[i,i+o]})}function dg(e,t,r,n){let i=(n-.25)*2*Math.PI;return[e+r*Math.cos(i),t+r*Math.sin(i)]}function an(e){return(Math.round(e*1e3)/1e3).toString()}function Xy(e,t,r,n,i,o){let a=dg(e,t,r,i),s=a[1],l=a[0],c=dg(e,t,r,o),d=c[1],f=c[0],h=o-i>.5?"1":"0";if(n<=0)return"M "+an(e)+" "+an(t)+" L "+an(l)+" "+an(s)+" A "+an(r)+" "+an(r)+" 0 "+h+" 1 "+an(f)+" "+an(d)+" Z";let p=dg(e,t,n,i),m=dg(e,t,n,o);return"M "+an(l)+" "+an(s)+" A "+an(r)+" "+an(r)+" 0 "+h+" 1 "+an(f)+" "+an(d)+" L "+an(m[0])+" "+an(m[1])+" A "+an(n)+" "+an(n)+" 0 "+h+" 0 "+an(p[0])+" "+an(p[1])+" Z"}function L$e(e){let t=e.innerRatio,r=e.size,n=e.slices,i=r!==void 0?r:120,o=t!==void 0?t:0,a=M$e(n);if(a.length===0)return null;let s=i/2,l=i/2-1,c=o>0?l*o:0;return _("svg",{children:a.map((d,f)=>{let h=d[1],p=d[0],m=n[f],g=U7(m,f),v=h-p>=.999?Xy(s,s,l,c,p,p+.5)+" "+Xy(s,s,l,c,p+.5,h):Xy(s,s,l,c,p,h);return _("path",{children:_("title",{children:m.label}),d:v,fill:g},m.label+f.toString())}),style:{display:"block",height:"auto",maxWidth:"100%"},height:i.toString(),width:i.toString(),viewBox:"0 0 "+i.toString()+" "+i.toString()})}let z$e=L$e,U$e=["var("+x.brand+")","var("+x.success+")"];function B$e(e){let t=e.flatMap(i=>i.values),r=nt(t,Number.MAX_VALUE,(i,o)=>i<o?i:o),n=nt(t,Number.MIN_VALUE,(i,o)=>i>o?i:o);return[r,n]}function j$e(e){let t=e.height,r=e.width,n=e.series,i=r!==void 0?r:320,o=t!==void 0?t:120;if(n.length===0||n.every(m=>m.values.length<2))return null;let a=B$e(n),s=a[0],l=a[1]-s,c=l===0?1:l,d=o-16,f=nt(n,0,(m,g)=>m>g.values.length?m:g.values.length),h=i/(f-1|0),p=8+d;return _("svg",{children:n.map((m,g)=>{let v=D(m.color,D(U$e[g],"var("+x.brand+")")),y=m.values.map((C,A)=>{let $=A*h,R=8+d-(C-s)/c*d;return[$,R]}).map(C=>C[0].toString()+","+C[1].toString()).join(" "),S=(m.values.length-1|0)*h,w="0,"+p.toString()+" "+y+(" "+S.toString()+","+p.toString());return L("g",{children:[_("polygon",{fill:v,fillOpacity:"0.15",points:w,stroke:"none"}),_("polyline",{fill:"none",points:y,stroke:v,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})]},m.label)}),style:{display:"block",height:"auto",maxWidth:"100%"},height:o.toString(),width:i.toString(),viewBox:"0 0 "+i.toString()+" "+o.toString()})}let q$e=j$e;function V$e(e){let t=e.size,r=t!==void 0?t:120;return _(z$e,{slices:e.slices,size:r,innerRatio:.6})}let G$e=V$e;function Fu(e){return"var("+e+")"}function K$e(e){return E([z("flex"),_e("column"),X("center"),u("gap","2px"),u("width","100%"),u("max-width",e.toString()+"px")])}let H$e=E([$t("relative"),u("width","100%"),u("line-height","0")]),W$e=E([$t("absolute"),u("left","0"),u("right","0"),u("bottom","0"),u("text-align","center"),u("line-height","1.1"),u("font-size",Fu(T.sizeXl)),u("font-weight",Fu(T.weightMedium)),u("color",Fu(x.textPrimary))]),J$e=E([z("flex"),Ze("spaceBetween"),u("width","100%"),u("font-size",Fu(T.sizeXs)),u("color",Fu(x.textDisabled))]),Q$e=E([u("font-size",Fu(T.sizeSm)),u("color",Fu(x.textSecondary))]);function Y$e(e,t,r){if(r<=t)return 0;let n=(e-t)/(r-t);return n<0?0:n>1?1:n}function Un(e){return(Math.round(e*100)/100).toString()}function KD(e,t,r,n){let i=Math.PI+n*Math.PI;return[e+r*Math.cos(i),t+r*Math.sin(i)]}function HD(e,t,r,n,i){let o=KD(e,t,r,n),a=KD(e,t,r,i);return"M "+Un(o[0])+" "+Un(o[1])+" A "+Un(r)+" "+Un(r)+" 0 0 1 "+Un(a[0])+" "+Un(a[1])}function X$e(e){let t=e.size,r=e.caption,n=e.max,i=e.min,o=e.value,a=i!==void 0?i:0,s=t!==void 0?t:160;if(n<=a)return null;let l=Y$e(o,a,n),c=s*.09,d=s/2,f=s/2-c/2,h=f+c/2,p=h+c/2;return L("div",{children:[L("div",{children:[L("svg",{children:[_("path",{d:HD(d,h,f,0,1),fill:"none",stroke:"var("+x.surfaceSubtle+")",strokeLinecap:"round",strokeWidth:Un(c)}),l<=0?null:_("path",{d:HD(d,h,f,0,l),fill:"none",stroke:"var("+x.brand+")",strokeLinecap:"round",strokeWidth:Un(c)})],"aria-label":Un(o)+" of "+Un(n),role:"img",style:{display:"block",height:"auto",maxWidth:"100%"},height:Un(p),width:Un(s),viewBox:"0 0 "+Un(s)+" "+Un(p)}),_("div",{children:D(e.display,Un(o)),className:W$e})],className:H$e}),L("div",{children:[_("span",{children:Un(a)}),_("span",{children:Un(n)})],className:J$e}),r!==void 0?_("div",{children:r,className:Q$e}):null],className:K$e(s)})}let Z$e=X$e;function $h(e){return"var("+e+")"}let eNe=E([z("flex"),_e("column"),u("gap","6px")]),tNe=E([u("overflow-x","auto")]),rNe=E([z("flex"),u("gap","4px"),X("flexStart")]);function nNe(e){return E([z("grid"),u("grid-template-rows","repeat(7, "+e.toString()+"px)"),u("gap","2px"),X("center"),u("font-size",$h(T.sizeXs)),u("color",$h(x.textDisabled)),u("line-height","1")])}function iNe(e){return E([z("grid"),u("grid-auto-flow","column"),u("grid-auto-columns",e.toString()+"px"),u("grid-template-rows","repeat(7, "+e.toString()+"px)"),u("gap","2px")])}function oNe(e){return E([u("border-radius","2px"),u("border","1px solid var("+x.borderSubtle+")"),u("background",e<=0?"transparent":"color-mix(in srgb, var("+x.brand+") "+Math.round(e*100).toString()+"%, transparent)")])}let aNe=E([u("visibility","hidden")]),sNe=E([z("flex"),X("center"),yi("wrap"),u("gap",$h(O.md)),u("font-size",$h(T.sizeXs)),u("color",$h(x.textSecondary))]),lNe=E([z("flex"),X("center"),u("gap","4px")]);function uNe(e){return E([u("width","10px"),u("height","10px"),u("border-radius","2px"),u("border","1px solid var("+x.borderSubtle+")"),u("background","color-mix(in srgb, var("+x.brand+") "+Math.round(e*100).toString()+"%, transparent)")])}function cNe(e){let t=new Date(e).getDay()|0;return t===0?6:t-1|0}function dNe(e){let t=e[0];if(t===void 0)return[];let r=Fl(cNe(t.time),n=>{});for(e.forEach(n=>{r.push(n)});r.length%7!==0;)r.push(void 0);return Fl(r.length/7|0,n=>r.slice(n*7|0,(n*7|0)+7|0))}function fNe(e){return nt(e,0,(t,r)=>r.value>t?r.value:t)}function WD(e){return e===Math.trunc(e)?Math.trunc(e).toString():e.toString()}function hNe(e){return e%2===0?D(Gw[e],""):""}function pNe(e){let t=e.cellSize,r=e.days,n=t!==void 0?t:11,i=dNe(r);if(i.length===0)return null;let o=fNe(r),a=r[0],s=r[r.length-1|0],l=a!==void 0&&s!==void 0?xo(a.time)+" – "+xo(s.time):"";return L("div",{children:[_("div",{children:L("div",{children:[_("div",{children:Fl(7,c=>_("span",{children:hNe(c)},c.toString())),className:nNe(n)}),_("div",{children:i.map((c,d)=>c.map((f,h)=>f!==void 0?_("div",{className:oNe(Hz(f.value,o)),title:Is(f.time)+" "+xo(f.time)+": "+WD(f.value)},f.time.toString()):_("div",{className:aNe},"b:"+d.toString()+":"+h.toString()))),className:iNe(n)})],className:rNe}),className:tNe}),L("div",{children:[_("span",{children:l}),L("span",{children:["less",Wz.map(c=>_("span",{className:uNe(c)},c.toString())),"more (max "+WD(o)+")"],className:lNe})],className:sNe})],className:eNe})}let mNe=pNe;function ji(e){return"var("+e+")"}let gNe=E([z("flex"),_e("column"),u("gap","2px")]),vNe=E([z("flex"),_e("column"),u("gap","3px")]),bNe=E([z("flex"),Ze("spaceBetween"),X("baseline"),u("gap",ji(O.sm)),u("font-size",ji(T.sizeSm))]),_Ne=E([u("color",ji(x.textPrimary))]),yNe=E([u("color",ji(x.textPrimary)),u("font-weight",ji(T.weightMedium)),u("white-space","nowrap")]),xNe=E([u("color",ji(x.textSecondary)),u("font-weight",ji(T.weightNormal))]),SNe=E([u("background",ji(x.surfaceSubtle)),u("border-radius",ji(Y.sm)),u("height","14px"),Us("hidden")]);function wNe(e,t){return E([u("background",t),u("border-radius",ji(Y.sm)),u("height","100%"),u("width",e.toString()+"%"),u("min-width",e>0?"2px":"0")])}let ENe=E([u("padding","2px 0 4px"),u("font-size",ji(T.sizeXs)),u("color",ji(x.textDisabled))]),kNe=E([u("padding-top","4px"),u("font-size",ji(T.sizeXs)),u("color",ji(x.textDisabled))]);function JD(e,t){return t<=0?0:Math.round(e/t*1e3)/10}function CNe(e){return e===Math.trunc(e)?Math.trunc(e).toString():e.toString()}function RNe(e){let t=ne(e[0],0,r=>r.value);return e.map((r,n)=>{let i=e[n-1|0];return{conversion:JD(r.value,t),dropOff:i!==void 0&&i.value>0&&r.value<i.value?JD(i.value-r.value,i.value):void 0}})}function ANe(e){let t=e.stages;if(t.length===0)return null;let r=e.note,n=RNe(t),i=ne(t[0],0,o=>o.value);return L("div",{children:[t.map((o,a)=>{let s=n[a],l=i<=0?0:o.value/i*100,c=k(s,d=>d.dropOff);return L("div",{children:[c!==void 0?_("div",{children:"↓ "+c.toString()+"% drop-off",className:ENe}):null,L("div",{children:[L("div",{children:[_("span",{children:o.label,className:_Ne}),L("span",{children:[CNe(o.value),a===0?null:_("span",{children:" · "+ne(s,0,d=>d.conversion).toString()+"%",className:xNe})],className:yNe})],className:bNe}),_("div",{children:_("div",{className:wNe(l,D(o.color,"var("+x.brand+")"))}),className:SNe})],className:vNe})]},o.label+":"+a.toString())}),r!==void 0?_("div",{children:r,className:kNe}):null],className:gNe})}let TNe=ANe;function Nh(e){return"var("+e+")"}let $Ne=E([z("flex"),_e("column"),u("gap","2px")]),NNe=E([z("flex"),u("gap","4px")]),B7=[u("font-size",Nh(T.sizeXs)),u("color",Nh(x.textDisabled)),u("white-space","nowrap")],DNe=E(B7.concat([z("flex"),_e("column"),Ze("spaceBetween"),u("text-align","right")]));function FNe(e){return E(B7.concat([z("flex"),Ze("spaceBetween"),u("margin-left",e.toString()+"px")]))}let INe=E([z("flex"),Ze("spaceBetween"),u("gap",Nh(O.sm)),u("font-size",Nh(T.sizeXs)),u("color",Nh(x.textSecondary))]);function PNe(e){let t=e[0];if(t!==void 0)return nt(e,{xMin:t.x,xMax:t.x,yMin:t.y,yMax:t.y},(r,n)=>({xMin:n.x<r.xMin?n.x:r.xMin,xMax:n.x>r.xMax?n.x:r.xMax,yMin:n.y<r.yMin?n.y:r.yMin,yMax:n.y>r.yMax?n.y:r.yMax}))}function Hr(e){return(Math.round(e*100)/100).toString()}function QD(e,t,r){return r<=t?.5:(e-t)/(r-t)}function ONe(e){let t=e.height,r=e.width,n=e.yLabel,i=e.xLabel,o=e.points,a=r!==void 0?r:320,s=t!==void 0?t:200,l=PNe(o);if(l===void 0)return null;let c=3.5+1,d=a-c*2,f=s-c*2,h,p=0;return i!==void 0||n!==void 0?p=1:h=null,p===1&&(h=L("div",{children:[_("span",{children:"↑ "+D(n,"y")}),_("span",{children:D(i,"x")+" →"})],className:INe})),L("div",{children:[L("div",{children:[L("div",{children:[_("span",{children:Hr(l.yMax)}),_("span",{children:Hr(l.yMin)})],className:DNe,style:{width:"34px"}}),L("svg",{children:[_("line",{stroke:"var("+x.borderSubtle+")",strokeWidth:"1",x1:Hr(c),x2:Hr(a-c),y1:Hr(s-c),y2:Hr(s-c)}),_("line",{stroke:"var("+x.borderSubtle+")",strokeWidth:"1",x1:Hr(c),x2:Hr(c),y1:Hr(c),y2:Hr(s-c)}),o.map((m,g)=>{let v=c+QD(m.x,l.xMin,l.xMax)*d,b=c+(1-QD(m.y,l.yMin,l.yMax))*f;return _("circle",{children:_("title",{children:m.label+" — "+D(i,"x")+": "+Hr(m.x)+", "+D(n,"y")+": "+Hr(m.y)}),cx:Hr(v),cy:Hr(b),fill:D(m.color,"var("+x.brand+")"),fillOpacity:"0.75",r:Hr(3.5)},m.label+":"+g.toString())})],style:{display:"block",height:"auto",maxWidth:"100%",minWidth:"0"},height:Hr(s),width:Hr(a),viewBox:"0 0 "+Hr(a)+" "+Hr(s)})],className:NNe}),L("div",{children:[_("span",{children:Hr(l.xMin)}),_("span",{children:Hr(l.xMax)})],className:FNe(38)}),h],className:$Ne})}let MNe=ONe;function la(e){return"var("+e+")"}let LNe=E([z("flex"),_e("column"),u("gap","6px"),_n(ke(0)),u("padding","0"),u("list-style","none")]),j7=[z("grid"),u("grid-template-columns","1.5rem 1fr auto"),X("center"),u("gap",la(O.sm)),u("font-size",la(T.sizeSm)),u("color",la(x.textPrimary))],zNe=E(j7),UNe=E(j7.concat([Ce("pointer"),u("background","transparent"),u("border","none"),u("padding","2px 0"),u("text-align","left"),u("width","100%"),u("font","inherit"),Ue([u("color",la(x.brand))])])),BNe=E([u("align-self","start"),u("font-size",la(T.sizeXs)),u("color",la(x.textDisabled)),u("text-align","right"),u("font-variant-numeric","tabular-nums")]),jNe=E([z("flex"),_e("column"),u("gap","3px"),$w(ke(0))]),qNe=E([u("overflow","hidden"),u("text-overflow","ellipsis"),u("white-space","nowrap")]),VNe=E([u("background",la(x.surfaceSubtle)),u("border-radius",la(Y.sm)),u("height","6px"),Us("hidden")]);function GNe(e){return E([u("background",la(x.brand)),u("border-radius",la(Y.sm)),u("height","100%"),u("width",e.toString()+"%"),u("min-width",e>0?"2px":"0")])}let KNe=E([u("align-self","start"),u("font-weight",la(T.weightMedium)),u("white-space","nowrap"),u("font-variant-numeric","tabular-nums")]);function HNe(e,t){return t<=0||e<=0?0:e/t*100}function WNe(e){let t=e.limit,r=t!==void 0?t:10,n=e.entries.slice(0,r);if(n.length===0)return null;let i=nt(n,0,(o,a)=>a.value>o?a.value:o);return _("ol",{children:n.map((o,a)=>{let s=L(Bt,{children:[_("span",{children:(a+1|0).toString(),className:BNe}),L("span",{children:[_("span",{children:o.label,className:qNe,title:o.label}),_("span",{children:_("span",{className:GNe(HNe(o.value,i))}),className:VNe})],className:jNe}),_("span",{children:o.display,className:KNe})]}),l=o.onOpen;return _("li",{children:l!==void 0?_("button",{children:s,className:UNe,type:"button",onClick:c=>l()}):_("div",{children:s,className:zNe})},o.key)}),className:LNe})}let JNe=WNe;function QNe(e){return nt(e.segments,0,(t,r)=>t+(r.value>0?r.value:0))}function YNe(e){let t=e.height,r=e.width,n=e.bars,i=r!==void 0?r:320,o=t!==void 0?t:120;if(n.length===0)return null;let a=nt(n,0,(f,h)=>{let p=QNe(h);return f>p?f:p}),s=a===0?1:a,l=n.length,c=(i-2*(l+1|0))/l,d=o-4;return _("svg",{children:n.map((f,h)=>{let p=2+h*(c+2),m={contents:o};return _("g",{children:f.segments.map((g,v)=>{let b=g.value>0?g.value:0,y=b/s*d,S=m.contents-y;return m.contents=S,b===0?null:_("rect",{children:_("title",{children:f.label+" — "+g.key+": "+b.toString()}),height:y.toString(),width:c.toString(),fill:D(g.color,"var("+x.brand+")"),x:p.toString(),y:S.toString()},g.key+":"+v.toString())})},f.label+":"+h.toString())}),style:{display:"block",height:"auto",maxWidth:"100%"},height:o.toString(),width:i.toString(),viewBox:"0 0 "+i.toString()+" "+o.toString()})}let XNe=YNe;function Tr(e){return"var("+e+")"}let ZNe=E([z("flex"),_e("column"),u("gap",Tr(O.lg))]),e3e=E([u("font-size",Tr(T.sizeXl)),u("font-weight",Tr(T.weightMedium)),u("color",Tr(x.textPrimary)),_n(ke(0))]),t3e=E([z("grid"),u("grid-template-columns","repeat(auto-fill, minmax(300px, 1fr))"),u("gap",Tr(O.md))]),Kc=E([z("flex"),_e("column"),u("gap",Tr(O.sm)),u("padding",Tr(O.lg)),u("background",Tr(x.surface)),u("border","1px solid var("+x.border+")"),u("border-radius",Tr(Y.md))]),Hc=E([u("font-size",Tr(T.sizeSm)),u("font-weight",Tr(T.weightMedium)),u("color",Tr(x.textSecondary))]),r3e=E([z("flex"),X("center"),u("gap",Tr(O.lg))]),YD=E([z("flex"),_e("column"),u("gap","4px"),u("font-size",Tr(T.sizeSm)),u("color",Tr(x.textSecondary))]),XD=E([z("flex"),X("center"),u("gap","6px")]);function ZD(e){return E([z("inlineBlock"),u("width","8px"),u("height","8px"),u("border-radius","50%"),u("background",e)])}let eF=E([u("font-size",Tr(T.sizeXs)),u("color",Tr(x.textDisabled))]),n3e=E([z("flex"),Ze("spaceBetween"),X("center"),u("gap",Tr(O.sm))]),i3e=E([z("inlineFlex"),u("gap",Tr(O.xs))]);function o3e(e){return E([u("background",e?Tr(x.surfaceSubtle):"transparent"),u("border","1px solid var("+x.border+")"),u("border-radius",Tr(Y.sm)),u("padding","2px var("+O.sm+")"),u("font-size",Tr(T.sizeXs)),u("color",Tr(e?x.textPrimary:x.textSecondary)),Ce("pointer")])}function xv(e,t){return k(F(e,t),r=>{let n=Li(r);return n!==void 0?n:q(xb(r),i=>ale(i[0],i[1]))})}function fm(e){return e.map(t=>D(G(t),{}))}function HS(e,t,r){switch(t){case"avg":case"sum":break;default:return e.length}if(r===void 0)return e.length;let n=Q(fm(e),o=>xv(o,r)),i=nt(n,0,(o,a)=>o+a);return t==="sum"?i:n.length===0?0:i/n.length}function Sv(e){let t=Math.round(e*100)/100;return t===Math.trunc(t)?Math.trunc(t).toString():t.toString()}function a3e(e,t,r){return jO(e,r&&(t==="count"||t==="sum"))}function s3e(e,t,r,n){return r?t==="avg"?e+" · avg of the first "+n.toString()+" loaded":e+" · over the first "+n.toString()+" loaded":e}function fs(e){let t=D(e.aggregate,"count"),r=e.label;if(r!==void 0)return r;let n=e.field;switch(t){case"avg":return n!==void 0?e.view+" — avg "+pt(n):e.view;case"sum":return n!==void 0?e.view+" — total "+pt(n):e.view;default:return e.view}}function q7(e,t,r,n){let i=Fl(r,o=>[]);return fm(e).forEach(o=>ee(k(ic(t,o),Qn),a=>{let s=Math.floor((n-a)/864e5)|0;if(s>=0&&s<r)return ee(i[(r-1|0)-s|0],l=>{l.push(o)})})),i}function WS(e,t,r,n,i,o){return q7(e,t,r,n).map(a=>HS(a.map(s=>s),i,o))}function V7(e,t){return Q(fm(e),r=>Sa(r,t))}function G7(e,t,r){let n=co(t,r),i=nt(e.filter(o=>!n.includes(o)),[],(o,a)=>o.includes(a)?o:o.concat([a]));return n.concat(i)}function l3e(e,t,r){let n=V7(e,r);return Q(G7(n,t,r),i=>{let o=n.filter(a=>a===i).length;if(o!==0)return{label:pt(i),value:o}})}function K7(e){return yv[Fo(e,yv.length)]}function u3e(e,t,r,n,i,o){let a=q7(e,t,r,n),s=f=>Q(f,h=>Sa(h,o)),l=a.flatMap(s),c=G7(l,i,o).filter(f=>l.some(h=>h===f)),d=a.map((f,h)=>{let p=s(f);return{label:Is(n-((r-1|0)-h|0)*864e5),segments:c.map((m,g)=>({key:pt(m),value:p.filter(v=>v===m).length,color:K7(g)}))}});return{statuses:c,bars:d}}function c3e(e,t,r){let n=co(t,r),i=V7(e,r),o=Q(i,a=>{let s=n.indexOf(a);if(!(s<0))return s});return{stages:n.map((a,s)=>({label:pt(a),value:o.filter(l=>l>=s).length})),excluded:i.length-o.length|0}}function d3e(e,t){return q(Nr(e).find(r=>r[0]===t),r=>r[1])}function H7(e,t){return q(F(e.semantics,t),r=>r.semantic)}function f3e(e,t,r){let n=d3e(e,t);if(n===void 0)return;let i=Uh(n,"maximum");if(i===void 0)return Re(H7(r,t),"Percent")?{min:0,max:100}:void 0;let o=D(Uh(n,"minimum"),0);if(i>o)return{min:o,max:i}}function tF(e,t,r){let n=H7(e,t);if(n===void 0)return Sv(r);switch(n){case"Percent":return z8(r);case"Bytes":return U8(r);case"Duration":return GE(r);case"Currency":case"Money":return VE(r);default:return Sv(r)}}function h3e(e,t,r,n){return Q(fm(e),i=>q(xv(i,t),o=>{let a=D(k(F(i,"id"),oe),"");return{id:a,label:D(k(F(i,r),oe),a===""?"—":a),value:o}})).toSorted((i,o)=>o.value-i.value).slice(0,n)}function p3e(e,t,r,n){return Q(fm(e),i=>{let o=xv(i,t),a=xv(i,r);if(o!==void 0&&a!==void 0)return{label:D(k(F(i,n),oe),D(k(F(i,"id"),oe),"—")),x:o,y:a}})}function m3e(e,t,r,n,i,o){return WS(e,t,r,n,i,o).map((a,s)=>({time:gi(n-((r-1|0)-s|0)*DM),value:a}))}function g3e(e){let t=ce(()=>"Days30"),r=t[1],n=t[0],i=(a,s)=>_("button",{children:s,className:o3e(n===a),type:"button",onClick:l=>r(c=>a)}),o;return o=n==="Days30"?e.body:_(mNe,{days:e.yearDays}),L("div",{children:[L("div",{children:[_("span",{children:e.title,className:Hc}),L("div",{children:[i("Days30","30 days"),i("Year","Year")],className:i3e})],className:n3e}),o],className:Kc})}function v3e(e){let t=e.viewAccess,r=e.mockRows,n=e.uiHints,i=e.readModels,o=e.metrics,a=e.pluginId,s=t!==void 0?t:{},l=Ls(),c=Gs(),d=Q(nt(o.map(P=>P.view),[],(P,B)=>P.includes(B)?P:P.concat([B])),P=>i.find(B=>B.name===P)),f=d.map(P=>{let B=fv(s,P.name,c),j=tc(P,B&&ir(r));return[P,B,j]}),h=P=>r!==void 0?D(F(r,P),[]):ne(f.find(B=>B[0].name===P),[],B=>B[2].rows),p=P=>r!==void 0?!1:ne(f.find(B=>B[0].name===P),!1,B=>B[2].canLoadMore),m=Date.now(),g=Q(o,P=>q(d.find(B=>B.name===P.view?fv(s,B.name,c):!1),B=>({metric:P,readModel:B,rows:h(B.name),partial:p(B.name),semantics:bn(B.schema,k(n,j=>Qa(j,B.name)),{field:B.labelField,source:B.labelFieldSource})}))),v=g.map((P,B)=>{let j=D(P.metric.aggregate,"count"),W=q(P.semantics.dateSpan,te=>WS(P.rows,te,14,m,j,P.metric.field));return{key:B.toString()+":"+P.readModel.name,label:fs(P.metric),value:a3e(Sv(HS(P.rows,j,P.metric.field)),j,P.partial),sublabel:s3e(P.readModel.name,j,P.partial,P.rows.length),spark:W,onOpen:()=>l(vs(ul(a,P.readModel.name)))}}),b=P=>{let B=P.readModel.lifecycleField;return B!==void 0?B:P.semantics.statusField},y=Q(g,P=>q(P.semantics.dateSpan,B=>{let j=D(P.metric.aggregate,"count"),W=fs(P.metric)+" — trend",te=b(P),J;if(j==="count"&&te!==void 0){let se=u3e(P.rows,B,30,m,P.readModel.schema,te),he=se.statuses;J=he.length===0?void 0:L(Bt,{children:[_(XNe,{bars:se.bars}),_("div",{children:he.map((K,ie)=>L("span",{children:[_("span",{className:ZD(K7(ie))}),pt(K)],className:XD},K)),className:YD})]})}else J=void 0;let re;if(J!==void 0)re=J;else{let se=WS(P.rows,B,30,m,j,P.metric.field);re=_(q$e,{series:[{label:fs(P.metric),values:se}]})}return _(g3e,{title:W,body:re,yearDays:m3e(P.rows,B,365,m,j,P.metric.field)},"trend:"+fs(P.metric))})),S=Q(g,P=>{let B=P.metric.aggregate,j=P.metric.field;if(B==="avg"&&j!==void 0)return q(f3e(P.readModel.schema,j,P.semantics),W=>{let te=HS(P.rows,"avg",j);return L("div",{children:[_("span",{children:fs(P.metric),className:Hc}),_(Z$e,{value:te,min:W.min,max:W.max,display:tF(P.semantics,j,te),caption:P.readModel.name+" · "+pt(j)})],className:Kc},"gauge:"+fs(P.metric))})}),w=[],C=Q(g,P=>{let B=P.metric.aggregate,j=P.metric.field;if(B===void 0)return;switch(B){case"avg":case"sum":break;default:return}if(j===void 0||w.includes(P.readModel.name+":"+j))return;w.push(P.readModel.name+":"+j);let W=h3e(P.rows,j,P.readModel.labelField,10).map(te=>({key:te.id===""?te.label:te.id,label:te.label,display:tF(P.semantics,j,te.value),value:te.value,onOpen:te.id===""?void 0:()=>l(Ga(a,P.readModel.name,te.id,[]))}));if(W.length!==0)return L("div",{children:[_("span",{children:P.readModel.name+" — top by "+pt(j),className:Hc}),_(JNe,{entries:W})],className:Kc},"top:"+P.readModel.name+":"+j)}),A=Q(g,P=>{let B=P.metric.viz,j=P.metric.field,W=P.metric.xField;if(B===void 0||B!=="scatter"||j===void 0||W===void 0)return;let te=p3e(P.rows,W,j,P.readModel.labelField);if(te.length!==0)return L("div",{children:[_("span",{children:P.readModel.name+" — "+pt(j)+" by "+pt(W),className:Hc}),_(MNe,{points:te,xLabel:pt(W),yLabel:pt(j)})],className:Kc},"scatter:"+fs(P.metric))}),$=Q(g,P=>{let B=P.metric.viz,j=b(P);if(B===void 0||B!=="funnel"||j===void 0)return;let W=c3e(P.rows,P.readModel.schema,j),te=W.stages;if(te.length===0)return;let J=W.excluded;return L("div",{children:[_("span",{children:fs(P.metric)+" — "+pt(j)+" funnel",className:Hc}),_(TNe,{stages:te,note:J===0?void 0:J.toString()+" row(s) with an unlisted "+pt(j)+" excluded"})],className:Kc},"funnel:"+fs(P.metric))}),R=Q(g,P=>{let B=D(P.metric.aggregate,"count"),j=Re(P.metric.viz,"funnel")?void 0:b(P);if(B!=="count"||j===void 0)return;let W=l3e(P.rows,P.readModel.schema,j);if(W.length!==0)return L("div",{children:[_("span",{children:P.readModel.name+" — by "+pt(j),className:Hc}),L("div",{children:[_(G$e,{slices:W}),_("div",{children:W.map((te,J)=>L("span",{children:[_("span",{className:ZD(U7(te,J))}),te.label+" ("+Sv(te.value)+")"],className:XD},te.label)),className:YD})],className:r3e})],className:Kc},"status:"+P.readModel.name)}),N=(Ee(r)?[]:Q(f,P=>{let B=P[0],j=P[2].fetchState;if(P[1])return typeof j!="object"?j==="Loading"?B.name+": loading…":void 0:(j.TAG,B.name+": "+j._0)})).concat(Ak(s,d.map(P=>P.name),c)),I=[$,A,S,y,C,R].flatMap(P=>P),M=nt(Q(g,P=>{if(P.partial)return P.readModel.name}),[],(P,B)=>P.includes(B)?P:P.concat([B]));return L("div",{children:[_("h2",{children:"Dashboard",className:e3e}),_(O$e,{kpis:v}),I.length!==0?_("div",{children:I,className:t3e}):null,M.length!==0?_("span",{children:"Figures cover the rows loaded for: "+M.join(", "),className:eF}):null,N.length!==0?_("span",{children:N.join(" · "),className:eF}):null],className:ZNe})}let b3e=v3e;function W7(e){return"explicit-ref-same-plugin"}function _3e(e){switch(e){case"PlatformSuppliedField":return"platform-supplied-field";case"NewEntityIdentity":return"new-entity-identity";case"SelfReference":return"self-reference";case"AlreadyPlaced":return"already-placed";case"NarrowerRefTarget":return"narrower-ref-target";case"OptionalField":return"optional-field";case"SystemCommand":return"system-command"}}function y3e(e){switch(e){case"PlatformSuppliedField":return"the field is @owner — the resolver overwrites it with the caller's id";case"NewEntityIdentity":return"the field is the new entity's own id, minted at submit";case"SelfReference":return"the command's own aggregate is this view — it is already an Instance command";case"AlreadyPlaced":return"this view already offers the command";case"NarrowerRefTarget":return"an explicit @ref names a different view, so this one is wider than the command accepts";case"OptionalField":return"the field is optional, so the command is not about the row";case"SystemCommand":return"the command is platform-run, never clicked"}}function jb(e){return Ee(e.tier)?e.vetoes.length===0:!1}function J7(e){return e.vetoes.length!==0}function Q7(e){return ir(e.tier)?e.vetoes.length===0:!1}function x3e(e){return e.flatMap(t=>{let r=(o,a,s,l)=>s.map(c=>({pluginId:t.id,slice:o,command:c,enclosingAggregate:a,system:l})),n=t.aggregates.flatMap(o=>r(o.name,o,o.commands,!1).concat(r(o.name,o,D(o.systemCommands,[]),!0))),i=t.stateChangeSlices.flatMap(o=>r(o.name,void 0,o.commands,!1).concat(r(o.name,void 0,D(o.systemCommands,[]),!0)));return n.concat(i)})}function S3e(e){return ne(k(k(G(e),t=>F(t,"properties")),G),[],t=>Q($e(t),r=>{let n=r[0],i=G(r[1]),o=Ee(k(i,l=>F(l,"const"))),a=k(k(i,l=>F(l,"type")),oe),s=k(k(k(k(i,l=>F(l,"items")),G),l=>F(l,"type")),oe);if(!o&&a!==void 0)switch(a){case"array":return s==="string"?n:void 0;case"string":return n;default:return}}))}function w3e(e,t,r){return q(e.references.find(n=>n.fieldName===t),n=>{let i=n.plugin,o=i!==void 0?r.filter(s=>s.pluginId===i):r,a=fM(o,n.entity);return a!==void 0?a:jo(o,n.entity)})}function E3e(e,t){return k(Ja(e),r=>jo(t,r))}function k3e(e){let t=e.command.aggregateIdField;if(t!==void 0)return D(Ja(t),t);let r=e.enclosingAggregate;return r!==void 0?r.name:e.slice}function C3e(e,t,r,n,i,o){let a=[];Re(e.command.ownerField,r)&&a.push("PlatformSuppliedField");let s=e.enclosingAggregate,l=Ja(r),c=s!==void 0&&l!==void 0?l.toLowerCase()===s.name.toLowerCase():!1;return e.command.level==="Collection"&&(Re(e.command.aggregateIdField,r)||c)&&a.push("NewEntityIdentity"),Xu(k3e(e),o,{pluginId:t.pluginId,viewName:t.name})&&a.push("SelfReference"),t.placed.some(d=>d===e.command.name)&&a.push("AlreadyPlaced"),i&&a.push("NarrowerRefTarget"),n.some(d=>d===r)||a.push("OptionalField"),e.system&&a.push("SystemCommand"),a}function R3e(e,t,r,n,i){let o=x3e(t),a=i!==void 0?i:Mb,s=[];return o.forEach(l=>{let c=Lb(l.command.schema);S3e(l.command.schema).forEach(d=>{let f=w3e(l.command,d,n),h=E3e(d,n),p;if(f!==void 0){let m=Rt(f),g=0;m!==void 0&&h!==void 0&&m.pluginId===h.pluginId&&m.name===h.name?p=[[m,!0]]:g=1,g===1&&(p=[[m,!0],[h,!1]])}else p=[[h,!1]];p.forEach(m=>{let g=m[1];ee(m[0],v=>{e.filter(b=>b.pluginId===v.pluginId?b.name===v.name:!1).forEach(b=>{let y=C3e(l,b,d,c,!g&&Ee(f),n),S=g&&l.pluginId===b.pluginId?"ExplicitRefSamePlugin":void 0,w=Ee(S)&&y.length===0?a(l.command,l.enclosingAggregate,l.pluginId):l.command;s.push({viewName:b.name,action:{label:w.label,pluginId:l.pluginId,slice:l.slice,command:w,field:d},tier:S,vetoes:y})})})})})}),s}function Y7(e,t){return e.filter(r=>r.viewName===t)}function A3e(e,t){return Y7(e,t).filter(jb).map(r=>r.action)}let X7={actor:"",eventType:"",timeFrom:"",timeTo:""};function rF(e){return e.actor!==""||e.eventType!==""||e.timeFrom!==""?!0:e.timeTo!==""}function Nn(e){return"var("+e+")"}let T3e=E([z("flex"),_e("column"),u("gap",Nn(O.sm))]),$3e=E([z("flex"),X("center"),u("gap",Nn(O.md)),yi("wrap"),u("padding-bottom",Nn(O.xs)),u("border-bottom","1px solid var("+x.border+")")]),N3e=E([z("flex"),X("center"),u("gap","4px")]),nF=E([u("color",Nn(x.textSecondary)),u("font-size",Nn(T.sizeSm)),u("white-space","nowrap")]),iF=E([u("background",Nn(x.surface)),u("border","1px solid var("+x.border+")"),u("border-radius",Nn(Y.sm)),u("padding","2px var("+O.sm+")"),u("font-size",Nn(T.sizeSm)),u("color",Nn(x.textPrimary)),u("outline","none"),js([u("border-color",Nn(x.brand))])]),D3e=E([u("background","none"),u("border","none"),u("padding","0"),u("color",Nn(x.brand)),u("font-size",Nn(T.sizeSm)),Ce("pointer"),Ue([u("text-decoration","underline")])]),F3e=E([z("flex"),Ze("center"),u("padding-top",Nn(O.xs))]),I3e=E([u("background",Nn(x.surface)),u("border","1px solid var("+x.border+")"),u("border-radius",Nn(Y.sm)),u("padding","4px var("+O.md+")"),u("font-size",Nn(T.sizeSm)),u("color",Nn(x.textPrimary)),Ce("pointer"),Ue([u("border-color",Nn(x.brand))])]);function P3e(e){let t=e.emptyLabel,r=e.onLoadMore,n=e.loading,i=e.hasMore,o=e.onFilterChange,a=e.filter,s=i!==void 0?i:!1,l=n!==void 0?n:!1,c=t!==void 0?t:"No recorded history for this record",d=Q([["actor","Actor",e.actors.map(h=>({label:h,value:h})),a.actor],["eventType","Event",e.eventTypes.map(h=>({label:pt(h),value:h})),a.eventType]],h=>{let p=h[2];if(p.length!==0)return{key:h[0],label:h[1],options:p,value:h[3]}});return L("div",{children:[L("div",{children:[_(j9,{filters:d,onFilterChange:(h,p)=>{switch(h){case"actor":return o({actor:p,eventType:a.eventType,timeFrom:a.timeFrom,timeTo:a.timeTo});case"eventType":return o({actor:a.actor,eventType:p,timeFrom:a.timeFrom,timeTo:a.timeTo});default:return}}}),L("div",{children:[_("span",{children:"From:",className:nF}),_("input",{className:iF,type:"date",value:a.timeFrom,onChange:h=>o({actor:a.actor,eventType:a.eventType,timeFrom:h.target.value,timeTo:a.timeTo})}),_("span",{children:"To:",className:nF}),_("input",{className:iF,type:"date",value:a.timeTo,onChange:h=>o({actor:a.actor,eventType:a.eventType,timeFrom:a.timeFrom,timeTo:h.target.value})})],className:N3e}),rF(a)?_("button",{children:"Clear filters",className:D3e,onClick:h=>o(X7)}):null],className:$3e}),_(E2e,{entries:e.entries,emptyLabel:rF(a)?"No events match these filters":c,onEntryClick:e.onEntryClick,nowMs:e.nowMs}),s?_("div",{children:_("button",{children:l?"Loading…":"Load earlier events",className:I3e,disabled:l,onClick:h=>ee(r,p=>p())}),className:F3e}):null],className:T3e})}let O3e=P3e;function M3e(e){if(e!=="")return e+"T00:00:00.000Z"}function L3e(e){if(e!=="")return e+"T23:59:59.999Z"}function z3e(e,t,r){let n={};return n.entityId=e,n.first=50,ee(r,i=>{n.after=i}),t.actor!==""&&(n.user=t.actor),t.eventType!==""&&(n.eventTypes=[t.eventType]),ee(M3e(t.timeFrom),i=>{n.timeFrom=i}),ee(L3e(t.timeTo),i=>{n.timeTo=i}),n}function U3e(e){let t=e.entityId,r=e.binding,n=si(),i=Gs(),o=ne(e.requiredAccess,!1,P=>!i(P)),a=ce(()=>[]),s=a[1],l=a[0],c=ce(()=>X7),d=c[1],f=c[0],h=ce(()=>!0),p=h[1],m=ce(()=>{}),g=m[1],v=m[0],b=ce(()=>!1),y=b[1],w=ce(()=>{})[1],C=ce(()=>0),A=C[1],$=C[0],R=De(void 0),N=f.actor+"|"+f.eventType+"|"+f.timeFrom+"|"+f.timeTo;Ae(()=>{if(!o)if(n!==void 0){let P=$===0,B=P?void 0:R.current;p(j=>!0),g(j=>{}),Lt(n(r.queryDocument,z3e(t,f,B)).then(j=>{let W=Fye(j,r.queryField),te=Iye(j,r.queryField),J=te[1],re=te[0];return s(se=>P?W:W.concat(se)),y(se=>re),w(se=>J),R.current=J,p(se=>!1),Promise.resolve()}),j=>(p(W=>!1),g(W=>"Could not load the history for this record."),Promise.resolve()))}else g(P=>"Not connected")},[N,$,o]);let I=P=>{R.current=void 0,A(B=>0),s(B=>[]),d(B=>P)},M=()=>A(P=>P+1|0);return o?null:v!==void 0?_(Ia,{title:"History unavailable",detail:v,onRetry:()=>A(P=>P+1|0)}):_(O3e,{entries:zye(l,r.displayName),actors:Uye(l),eventTypes:Bye(l),filter:f,onFilterChange:I,hasMore:b[0],loading:h[0],onLoadMore:M})}let B3e=U3e;function ri(e){return"var("+e+")"}let j3e=E([z("flex"),_e("column"),u("gap",ri(O.lg))]),q3e=E([z("flex"),X("center"),Ze("spaceBetween"),u("gap",ri(O.md))]),V3e=E([u("font-size",ri(T.sizeXl)),u("font-weight",ri(T.weightMedium)),u("color",ri(x.textPrimary)),_n(ke(0))]),G3e=E([z("flex"),yi("wrap"),X("center"),u("gap",ri(O.md)),u("font-size",ri(T.sizeSm)),u("color",ri(x.textSecondary))]),K3e=E([z("inlineFlex"),X("center"),u("gap","4px"),Ce("pointer")]);function H3e(e){return E([z("inlineBlock"),u("width","8px"),u("height","8px"),u("border-radius","50%"),u("background",e)])}let oF=E([u("font-size",ri(T.sizeXs)),u("color",ri(x.textDisabled))]),W3e=E([z("flex"),X("center"),u("gap",ri(O.sm))]),J3e=E([u("background","none"),u("border","1px solid var("+x.border+")"),u("border-radius",ri(Y.sm)),u("padding","2px var("+O.sm+")"),u("color",ri(x.textSecondary)),u("font-size",ri(T.sizeSm)),Ce("pointer"),Ue([u("background",ri(x.surfaceSubtle)),u("color",ri(x.textPrimary))])]);function Q3e(e){let t=e.viewAccess,r=e.uiHints,n=e.readModels,i=e.pluginId,o=t!==void 0?t:{},a=Ls(),s=Gs(),l=si(),c=Yp(),d=ga(),f=Qk(),h=ce(()=>[]),p=h[1],m=h[0],g=n.map((C,A)=>{let $=fv(o,C.name,s),R=$&&!m.includes(C.name),N=tc(C,R);return[C,A,R,$,N]}),v=(C,A)=>D(k(k(r,$=>hn($,C.name)),$=>$.accent),Bd[Fo(A,Bd.length)]),b=Q(g,C=>{let A=C[4],$=C[0],R=k(r,P=>hn(P,$.name)),N=bn($.schema,k(r,P=>Qa(P,$.name)),{field:$.labelField,source:$.labelFieldSource}),I=q(N.statusField,P=>zb(P,$.commands,k(R,B=>B.transitions))),M=Yk(l,c,$.commands,$.name,A.isLive,A.refetch,d,f.onNotice,void 0);if(C[2])return{readModelName:$.name,rows:A.rows,schema:$.schema,semantics:N,accent:v($,C[1]),window:Mh(A.canLoadMore),onOpenRow:(P,B)=>a(Ga(i,$.name,P,[])),onCommand:q(I,P=>M),statusCommandFor:I,ownEntity:{pluginId:i,viewName:$.name}}}),y=Q(g,C=>{if(C[2]&&C[4].canLoadMore)return C[0].name}),S=()=>{g.forEach(C=>{let A=C[4];if(C[2]&&A.canLoadMore)return A.loadMore()})},w=Q(g,C=>{let A=C[0],$=C[4].fetchState;if(C[2])return typeof $!="object"?$==="Loading"?A.name+": loading…":void 0:($.TAG,A.name+": "+$._0)}).concat(Ak(o,n.map(C=>C.name),s));return L("div",{children:[_("div",{children:_("h2",{children:e.canvasName,className:V3e}),className:q3e}),_("div",{children:g.filter(C=>C[3]).map(C=>{let A=C[0];return L("label",{children:[_("input",{checked:C[2],type:"checkbox",onChange:$=>{let R=A.name;p(N=>N.includes(R)?N.filter(I=>I!==R):N.concat([R]))}}),_("span",{className:H3e(v(A,C[1]))}),A.name],className:K3e},A.name)}),className:G3e}),f.element,e.mode.render(b),y.length!==0?L("div",{children:[_("button",{children:"Load more",className:J3e,onClick:C=>S()}),_("span",{children:"More rows available: "+y.join(", "),className:oF})],className:W3e}):null,w.length!==0?_("span",{children:w.join(" · "),className:oF}):null],className:j3e})}let Y3e=Q3e;function _r(e){return"var("+e+")"}let X3e=E([z("flex"),_e("column"),u("gap",_r(O.lg)),u("padding","0 var("+O.md+")"),u("min-width","0")]),Z3e=E([z("flex"),X("center"),u("gap",_r(O.sm)),rn(0)]),eDe=E([z("flex"),_e("column"),u("gap",_r(O.sm)),u("min-width","0")]),Zy=E([z("flex"),X("start"),u("gap",_r(O.md)),u("padding","var("+O.xs+") 0"),u("border-bottom","1px solid var("+x.borderSubtle+")"),UO([u("border-bottom","none")])]),e1=E([u("color",_r(x.textSecondary)),u("font-size",_r(T.sizeMd)),u("font-weight",_r(T.weightMedium)),u("white-space","nowrap"),u("padding-top","2px"),rn(0),u("min-width","200px")]),fg=E([u("color",_r(x.textPrimary)),u("font-size",_r(T.sizeMd)),u("word-break","break-word"),u("min-width","0")]),aF=E([z("flex"),X("start"),u("gap",_r(O.md)),u("padding","var("+O.xs+") 0"),u("border-bottom","1px solid var("+x.borderSubtle+")"),UO([u("border-bottom","none")])]),sF=E([u("color",_r(x.textSecondary)),u("font-size",_r(T.sizeMd)),u("font-weight",_r(T.weightMedium)),u("padding-top","2px"),rn(0),u("min-width","200px")]),lF=E([z("flex"),_e("column"),u("gap",_r(O.sm)),ai(1),u("padding",_r(O.md)),u("background",_r(x.surfaceSubtle)),u("border-radius",_r(Y.md)),u("border","1px solid var("+x.borderSubtle+")"),u("min-width","0")]),tDe=E([z("flex"),_e("column"),u("gap",_r(O.sm)),u("min-width","0")]),rDe=E([z("flex"),X("center"),Ze("spaceBetween"),u("gap",_r(O.md)),u("padding-bottom",_r(O.xs)),u("border-bottom","1px solid var("+x.borderSubtle+")")]),nDe=E([u("color",_r(x.textPrimary)),u("font-size",_r(T.sizeMd)),u("font-weight",_r(T.weightMedium))]),uF=E([u("overflow-x","auto"),u("max-width","100%"),u("border","1px solid var("+x.borderSubtle+")"),u("border-radius",_r(Y.md))]),Wc=E([u("color",_r(x.textDisabled)),u("font-size",_r(T.sizeSm))]);function Z7(e,t){return D(k(k(G(e),r=>F(r,"title")),oe),pt(t))}function cF(e){return k(k(G(e),t=>F(t,"type")),oe)}function dF(e){return k(k(G(e),t=>F(t,"format")),oe)}function iDe(e){return k(G(e),t=>F(t,"items"))}function fF(e){return Ee(k(k(G(e),t=>F(t,"properties")),G))}function oDe(e){let t=e.toLowerCase(),r=t.length;return r>2&&t.endsWith("id")&&t!=="id"?!0:r>3?t.endsWith("ids"):!1}function hF(e){let t=e.toLowerCase(),r=e.length,n=a=>{let s=a.length;if(r>s&&t.endsWith(a))return e.slice(0,r-s|0)},i=n("ids");if(i!==void 0)return i;let o=n("id");if(o!==void 0)return o}function aDe(e,t){let r=vn(t),n=cF(r),i=Hl(r);if(i!==void 0)return{TAG:"TaggedUnion",_0:i};if(n!==void 0)switch(n){case"array":let a=iDe(r);if(a===void 0)return"ArrayOfScalars";let s=cF(a);if(fF(a)||Re(s,"object"))return{TAG:"ArrayOfObjects",_0:a};if(!Re(s,"string"))return"ArrayOfScalars";let l=hF(e);return l!==void 0?{TAG:"EntityRefArray",_0:l}:"ArrayOfStrings";case"boolean":return"Bool";case"object":return fF(r)?{TAG:"NestedObject",_0:r}:{TAG:"Scalar",_0:"object",_1:void 0}}if(!oDe(e))return{TAG:"Scalar",_0:D(n,"string"),_1:dF(r)};let o=hF(e);return o!==void 0?{TAG:"EntityRef",_0:o}:{TAG:"Scalar",_0:D(n,"string"),_1:dF(r)}}function hg(e,t,r,n){let i=Xe(e);if(typeof i!="object")switch(i){case"JSONFalse":return _(ia,{variant:"Neutral",label:"false",dot:!1});case"JSONTrue":return _(ia,{variant:"Success",label:"true",dot:!1});case"JSONNull":return _("span",{children:"—",className:Wc})}else switch(i.TAG){case"JSONString":let o=i._0;return t==="date-time"?Hv(o):D(KO(r,o),o);case"JSONNumber":return i._0.toString();case"JSONObject":case"JSONArray":return JSON.stringify(e)}}function sDe(e){return D(q(Ct(e),t=>t.map(r=>{let n=Xe(r);if(typeof n!="object")switch(n){case"JSONFalse":return"false";case"JSONTrue":return"true";case"JSONNull":return"—"}else switch(n.TAG){case"JSONString":return n._0;case"JSONNumber":return n._0.toString();case"JSONObject":case"JSONArray":return JSON.stringify(r)}})),[])}function pF(e){return D(q(Ct(e),t=>Q(t,G)),[])}function eU(e,t){let r=k(F(e,"id"),oe);if(r!==void 0)return r;let n=k(F(e,"compositeId"),oe);return n!==void 0?n:"#"+t.toString()}function mF(e){return e.map((t,r)=>({key:eU(t,r),row:t}))}function lDe(e,t,r){for(;;){let n=t,i=n[0];if(i===void 0)return e;let o=e[e.length-1|0];if(o===void 0)return;let a=Ee(G(o.data)),s=Ct(o.data),l;if(a){let c=D(G(o.data),{}),d=k(k(G(o.schema),p=>F(p,"properties")),G),f=k(d,p=>F(p,i)),h=F(c,i);l=h!==void 0&&f!==void 0?{data:h,schema:f,label:Z7(f,i)}:void 0}else if(Ee(s)){let c=D(s,[]),d=D(k(G(o.schema),h=>F(h,"items")),o.schema),f=c.find((h,p)=>{let m=D(G(h),{});return eU(m,p)===i});l=f!==void 0?{data:f,schema:d,label:i}:void 0}else l=void 0;if(l===void 0)return;e.push(l),r.push(i),t=n.slice(1)}}function uDe(e,t){if(t!==void 0&&t!=="id")return k(k(k(G(e),r=>F(r,t)),oe),r=>{if(r!=="")return r})}function cDe(e,t){let r=e.filter(n=>ca(n.key,t));return r.length===0?e:r}function dDe(e){let t=e.headerAccessory,r=e.entityPanel,n=e.uiHints,i=e.viewName,o=e.pluginId,a=e.drillPath,s=e.labelField,l=e.aggregateId,c=e.lifecycleField,d=e.rowActions,f=e.commands,h=e.rootLabel,p=e.schema,m=e.data,g=f!==void 0?f:[],v=d!==void 0?d:[],b=a!==void 0?a:[],y=si(),S=cm(),w=ga(),C=Ap(),A=a$e(),$=$z(),R=GTe(),N=ne(R,!1,Se=>Se.placement==="Bar")&&Ee($),I=o!==void 0&&i!==void 0?{pluginId:o,viewName:i}:void 0,M=Ls(),P=ce(()=>[]),B=P[1],j=ce(()=>{}),W=j[1],te=ce(()=>({})),J=te[1],re=te[0],se=wz(),K=Ee(o)&&Ee(i)?b:P[0],ie=Se=>{if(o!==void 0&&i!==void 0&&l!==void 0)return M(Ga(o,i,l,Se));B(Fe=>Se)},le=lDe([{data:m,schema:p,label:h}],K,[]),Z=D(G(m),{}),ve=di(p,"Drill",w,I,s,void 0),pe=hf([Z],ve,w,I,void 0),Er={lookupLabel:(Se,Fe)=>ff(pe,Se,w,Fe),isMissing:(Se,Fe)=>em(pe,Se,w,Fe),retiredBadge:(Se,Fe)=>Xp(pe,Se,w,Fe),linkable:(Se,Fe)=>Zp(pe,Se,w,Fe,!1)},nn=ne(k(xa(),Se=>Se.identity),[],Se=>Se.groups),Mn=Se=>{if(l!==void 0)return q(mi(P7(p,Se,g),Fe=>O7(Fe.command,nn)),Fe=>(()=>W(Lr=>({command:Fe.command,rowId:l,formKey:Fe.command.name+":"+D(l,"")}))))},qt=(Se,Fe,Lr)=>L("div",{children:[_("div",{children:Fe,className:e1}),_("div",{children:Lr,className:fg})],className:Zy},Se),wi=(Se,Fe,Lr)=>Xu(Se,w,I)?Lr:pS(Se,Fe,w,Lr),Yn=uDe(m,s),et=Se=>{let Fe=Xe(Se.data);if(typeof Fe!="object"){if(Fe==="JSONNull")return _("span",{children:"—",className:Wc})}else switch(Fe.TAG){case"JSONObject":let Lr=D(G(Se.data),{}),Jt=K.length===0,V=di(Se.schema,"Drill",w,I,Jt?s:void 0,void 0),ye=Jt&&Ee(Yn)?cDe(V,s):V;return ye.length===0?_("span",{children:"(no fields)",className:Wc}):_("div",{children:ye.map(at=>{let Me=at.key,Ie=at.propSchema,tt=mi(F(Lr,Me),vt=>Xe(vt)!=="JSONNull"),rt=Z7(Ie,Me),Le=aDe(Me,Ie);if(tt===void 0)return qt(Me,rt,D(wle(Me,Ie),_("span",{children:"—",className:Wc})));if(typeof Le!="object")switch(Le){case"Bool":return qt(Me,rt,hg(tt,void 0,Me))}else switch(Le.TAG){case"Scalar":let vt=n0(Me,Ie,tt);return vt!==void 0?qt(Me,rt,vt):qt(Me,rt,hg(tt,Le._1,Me));case"EntityRef":let Et=Le._0;return qt(Me,wi(Et,!1,rt),iv(Me,Et,tt,w,C,Er,I,void 0,void 0));case"EntityRefArray":let Gr=Le._0;return qt(Me,wi(Gr,!0,rt),iv(Me,Gr,tt,w,C,Er,I,void 0,void 0));case"NestedObject":let zn=n0(Me,Ie,tt);if(zn!==void 0)return qt(Me,rt,zn);let ct=di(Le._0,"Drill",w,I,void 0,void 0),cn=D(k(F(Lr,Me),G),{});return L("div",{children:[_("div",{children:rt,className:sF}),_("div",{children:ct.map(bt=>{let os=F(cn,bt.key);return L("div",{children:[_("div",{children:Au(bt,w,I),className:e1}),_("div",{children:Sl(bt.key,bt.kind,bt.propSchema,os,void 0,w,C,Er,I),className:fg})],className:Zy},bt.key)}),className:lF})],className:aF},Me);case"ArrayOfObjects":let Fr=Le._0,zr=mF(pF(tt)),yn=zr.length,xn=D(i,h),kr=xn+"."+Me,Ir=k(n,bt=>hn(bt,kr)),Hi=l2(Fr,Ir,{registry:w,ownEntity:I}),is=i2(o,xn,Me),Zl=F(re,Me),el=Zl!==void 0?Zl:o2(is),Ec=u2(el,Ir,Fw(Fr),void 0,Hi),eu=bt=>{a2(is,bt,se),J(os=>{let Af=Oe($e(os));return Af[Me]={mode:bt,band:se},Af})},tl=D(Ct(tt),[]),Kr=bt=>{let os=bn(Fr,k(n,nu=>Qa(nu,kr)),void 0),Af=k(Ir,nu=>nu.accent),pR={readModelName:kr,rows:tl,schema:Fr,semantics:os,accent:Af,window:"Complete",onOpenRow:(nu,mR)=>{let x_=SV(tl,Cc=>Cc===mR),Rm=x_!==void 0?ne(zr[x_],nu,Cc=>Cc.key):nu;ie(K.concat([Me,Rm]))}};return bt.render([pR])},tu=di(Fr,"Drill",w,I,void 0,void 0).map(bt=>({key:bt.key,label:bt.label,render:os=>Sl(bt.key,bt.kind,bt.propSchema,F(os.row,bt.key),void 0,w,C,Er,I),sortable:!1,width:bt.width})),kc=yn===0?_("span",{children:"(empty)",className:Wc}):_("div",{children:_(Oh,{columns:tu,data:zr,keyFn:bt=>bt.key,onRowClick:bt=>ie(K.concat([Me,bt.key])),density:"Comfortable"}),className:uF}),ru=Ec!==void 0&&Ec.id!==fa?Kr(Ec):kc;return L("div",{children:[L("div",{children:[_("span",{children:rt,className:nDe}),L("span",{children:[Hi.length>1?_(Da.make,{modes:Hi,activeId:ne(Ec,fa,bt=>bt.id),onSelect:eu}):null,_(hh,{count:yn,label:"items",onClick:()=>ie(K.concat([Me]))})],style:{display:"inline-flex",alignItems:"center",gap:"8px"}})],className:rDe}),ru],className:tDe},Me);case"TaggedUnion":let Sm=n0(Me,Ie,tt);if(Sm!==void 0)return qt(Me,rt,Sm);let rl=Jv(tt);if(rl===void 0)return qt(Me,rt,hg(tt,void 0,Me));let wm=rl[1],Em=rl[0],Cf=Sw(Le._0,Em),km=ne(Cf,Em,bt=>bt.tag),Rf=ne(Cf,[],bt=>di(yO(bt),"Drill",w,I,void 0,void 0)),Cm=L("span",{children:[rt,dp(km)],style:{display:"inline-flex",alignItems:"center",flexWrap:"wrap",gap:"6px"}});return Rf.length!==0?L("div",{children:[_("div",{children:Cm,className:sF}),_("div",{children:Rf.map(bt=>L("div",{children:[_("div",{children:Au(bt,w,I),className:e1}),_("div",{children:Sl(bt.key,bt.kind,bt.propSchema,F(wm,bt.key),void 0,w,C,Er,I),className:fg})],className:Zy},bt.key)),className:lF})],className:aF},Me):qt(Me,rt,dp(km))}return qt(Me,rt,_(GO,{items:sDe(tt)}))}),className:eDe});case"JSONArray":let Pe=mF(pF(Se.data)),ut=D(k(G(Se.schema),at=>F(at,"items")),Se.schema),It=di(ut,"Drill",w,I,void 0,void 0).map(at=>({key:at.key,label:Au(at,w,I),render:Me=>Sl(at.key,at.kind,at.propSchema,F(Me.row,at.key),void 0,w,C,Er,I),sortable:!1,width:at.width}));return Pe.length===0?_("span",{children:"(empty)",className:Wc}):_("div",{children:_(Oh,{columns:It,data:Pe,keyFn:at=>at.key,onRowClick:at=>ie(K.concat([at.key])),density:"Comfortable"}),className:uF})}return _("div",{children:hg(Se.data,void 0,void 0),className:fg})},lt=D(Yn,D(l,h)),Vt=Se=>{if(o!==void 0&&i!==void 0&&l!==void 0)return Ga(o,i,l,K.slice(0,Se))},Ot=le!==void 0?le.slice(0,le.length-1|0).map((Se,Fe)=>({label:Fe===0?lt:Se.label,href:Vt(Fe),onClick:()=>ie(K.slice(0,Fe))})):[],Ft=ne(R,[],Se=>Se.ancestors).concat(Ot),Ei;if(le!==void 0){let Se=le.length,Fe=le[le.length-1|0];Ei=Se!==1&&Fe!==void 0?Fe.label:lt}else Ei=lt;let Ln;if(le!==void 0){let Se=le[le.length-1|0];Ln=Se!==void 0?et(Se):null}else Ln=_(Ia,{title:"Drill path no longer valid",detail:"The data shape has changed since this view was opened.",onRetry:()=>ie([])});let Xn=K.length===0,ns=Xn?Xz(g.filter(Se=>Se.level==="Instance"),Z,c):[],Ho;if(Xn&&c!==void 0){let Se=co(p,c),Fe=zb(c,g,k(k(n,Jt=>k(i,V=>hn(Jt,V))),Jt=>Jt.transitions));if(Se.map((Jt,V)=>Se.slice(0,V).some(ye=>Ee(Fe(Jt,ye)))).some(Jt=>Jt))Ho=void 0;else{let Jt=C2e(p,c,D(Sa(Z,c),""));Ho=Jt.length!==0?_(N9,{steps:Jt}):void 0}}else Ho=void 0;let ki=Xn?D(k(Iw(p,k(k(n,Se=>k(i,Fe=>hn(Se,Fe))),Se=>Se.retiredLabel)),Se=>zh(Se,F(Z,Se.field))),null):null,Ci=Xn?l!==void 0?v.map(Se=>{let Fe=s7(Se,l);return{key:"rowAction:"+Se.command.name,label:Se.label,run:()=>W(Lr=>({command:Fe.command,rowId:void 0,initialValues:Fe.initialValues,navigateTo:Fe.navigateTo,formKey:Fe.formKey}))}}):[]:[],Ki=_(J9,{crumbs:Ft,title:Ei,titleAccessory:L("div",{children:[ki,Xn&&t!==void 0&&l!==void 0?t(l):null],className:Z3e}),commands:ns.map(Se=>({key:Se.name,label:Se.label,run:()=>W(Fe=>({command:Se,rowId:l,formKey:Se.name+":"+D(l,"")}))})).concat(Ci),controls:k(R,Se=>Se.controls),inBar:N});return L("div",{children:[dv(N?$:void 0,Ki),D(Ho,null),Xn?_(eM.make,{fill:Mn,children:Ln}):Ln,Xn&&r!==void 0&&l!==void 0?r(l):null,ne(j[0],null,Se=>{let Fe=Se.command;return _(Dk,{isOpen:!0,onClose:()=>W(Lr=>{}),title:Fe.label,children:_(aC,{schema:Fe.schema,aggregateId:Se.rowId,aggregateIdField:Fe.aggregateIdField,injectNewId:Fe.level==="Collection",ownerField:Fe.ownerField,ownerValue:Fe.ownerValue,initialValues:Se.initialValues,refFields:Fe.refFields,onSubmit:Lr=>S!==void 0?Lt(S(Fe.mutationDocument,Bb(Fe.schema,Lr)).then(Jt=>{if(typeof Jt!="object")return Jt==="Accepted"?(W(V=>{}),ee(A,V=>V()),ee(Se.navigateTo,ua),Promise.resolve("Ok")):(W(V=>{}),ir(Se.navigateTo)&&ee(A,V=>{setTimeout(V,500)}),ee(Se.navigateTo,ua),Promise.resolve("Ok"));{if(Jt.TAG==="Rejected"){let ye=Jt._0;return dm(y,w,ye.errorCode,ye.detail).then(Pe=>Promise.resolve({TAG:"Err",_0:Pe}))}let V=Jt._0;return console.error("[AutoUI] "+Fe.name+": command not executed — "+V),Promise.resolve({TAG:"Err",_0:V})}}),Jt=>Promise.resolve({TAG:"Err",_0:"Request failed"})):(W(Jt=>{}),Promise.resolve("Ok")),submitLabel:"Execute"},Se.formKey)})})],className:X3e})}let gF=dDe;function Iu(e){return"var("+e+")"}let fDe=E([z("flex"),_e("column"),u("gap",Iu(O.md))]),hDe=E([z("flex"),X("center"),u("gap",Iu(O.md)),u("flex-wrap","wrap"),u("padding-bottom",Iu(O.sm)),u("border-bottom","1px solid var("+x.border+")")]),pDe=E([u("font-size",Iu(T.sizeLg)),u("font-weight",Iu(T.weightMedium)),u("color",Iu(x.textPrimary)),_n(ke(0))]),mDe=E([z("flex"),X("center"),yi("wrap"),u("gap",Iu(O.sm)),u("margin-left","auto")]);function gDe(e){let t=e.contextId,r=e.slice,n=si(),i=cm(),o=ga(),a=ce(()=>{}),s=a[1];return L("div",{children:[L("div",{children:[_("h2",{children:r.name,className:pDe}),_("div",{children:r.commands.map(l=>_("button",{children:l.label,className:RCe,onClick:c=>s(d=>l)},l.name)),className:mDe})],className:hDe}),ne(a[0],null,l=>_(Dk,{isOpen:!0,onClose:()=>s(c=>{}),title:l.label,children:_(aC,{schema:l.schema,aggregateId:t,aggregateIdField:l.aggregateIdField,injectNewId:l.level==="Collection",ownerField:l.ownerField,ownerValue:l.ownerValue,refFields:l.refFields,onSubmit:c=>i!==void 0?Lt(i(l.mutationDocument,Bb(l.schema,c)).then(d=>{if(typeof d=="object"){if(d.TAG==="Rejected"){let h=d._0;return dm(n,o,h.errorCode,h.detail).then(p=>Promise.resolve({TAG:"Err",_0:p}))}let f=d._0;return console.error("[AutoUI] "+l.name+": command not executed — "+f),Promise.resolve({TAG:"Err",_0:f})}return s(f=>{}),Promise.resolve("Ok")}),d=>Promise.resolve({TAG:"Err",_0:"Request failed"})):(s(d=>{}),Promise.resolve("Ok")),submitLabel:"Execute"},l.name+":"+D(t,""))}))],className:fDe})}let vDe=gDe;function bDe(e){let t=e.uiHints,r=e.hostViewName,n=e.entityId,i=e.binding,o=ga(),a=Ap(),s=Ls(),l=Gs(),c=ne(e.requiredAccess,!1,Z=>!l(Z)),d=eC(i.readModel,g1e(i,n),n,!c,void 0,25),f=d.rows.map(Z=>D(G(Z),{})),h=m1e(i.readModel.schema,i.refField),p=fM(o,i.readModel.name),m=q(p,Z=>({pluginId:Z.pluginId,viewName:i.readModel.name})),g=p1e(r,i),v=bn(h,k(t,Z=>Qa(Z,g)),{field:i.readModel.labelField,source:i.readModel.labelFieldSource}),b=di(h,"List",o,m,v.labelField,v.projectedLabelField),y=k(t,Z=>hn(Z,g)),S=l2(i.readModel.schema,y,{registry:o,ownEntity:m}),w=i2(e.pluginId,r,i.readModel.name),C=ce(()=>o2(w)),A=C[1],$=wz(),R=Z=>{a2(w,Z,$),A(ve=>({mode:Z,band:$}))},N=u2(C[0],y,Fw(i.readModel.schema),void 0,S),I=hf(f,b,o,m,void 0),W={lookupLabel:(Z,ve)=>ff(I,Z,o,ve),isMissing:(Z,ve)=>em(I,Z,o,ve),retiredBadge:(Z,ve)=>Xp(I,Z,o,ve),linkable:(Z,ve)=>Zp(I,Z,o,ve,!1)},te=W8(b,o,a,F,void 0,W,m,void 0,void 0,void 0),J=Z=>k(F(Z,"id"),oe),re=Z=>D(J(Z),JSON.stringify(Z)),se=Z=>ee(p,ve=>s(Ga(ve.pluginId,ve.name,Z,[]))),he=q(p,Z=>(ve=>ee(J(ve),se))),K=Z=>{let ve=i.readModel.name,pe=d.rows,be=k(y,nn=>nn.accent),Ge=Mh(d.canLoadMore),Er={readModelName:ve,rows:pe,schema:h,semantics:v,accent:be,window:Ge,onOpenRow:(nn,Mn)=>{let qt=k(G(Mn),J);return se(qt!==void 0?qt:nn)},ownEntity:m,refLabels:W};return Z.render([Er])};if(c)return null;let ie=d.fetchState,le;if(typeof ie!="object")if(ie==="Loading")le=_(yd,{});else{let Z,ve=0;N!==void 0&&N.id!==fa?Z=K(N):ve=1,ve===1&&(Z=_(Oh,{columns:te,data:f,keyFn:re,onRowClick:he})),le=L(Bt,{children:[Z,d.canLoadMore?_("button",{children:"Load more",onClick:pe=>d.loadMore()}):null]})}else le=ie.TAG==="Error"?_(Ia,{title:"Could not load related rows",detail:ie._0,onRetry:d.refetch}):_(Ia,{title:"Not available",detail:ie._0});return L("section",{children:[L("div",{children:[_("h3",{children:pt(i.readModel.name)}),S.length>1?_(Da.make,{modes:S,activeId:ne(N,fa,Z=>Z.id),onSelect:R}):null],style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"8px"}}),le]})}let _De=bDe,uC={contents:void 0};function $He(e){uC.contents=e}function yDe(){return Ee(uC.contents)}function xDe(e,t){return q(uC.contents,r=>r(e,t))}function wv(e){return e.filter(t=>t.level==="Instance")}function SDe(e,t,r,n){let i=n!==void 0?n:[];return t!==void 0&&co(e,t).length!==0?wv(r.concat(i)).some(o=>{let a=o.allowedStates;return a!==void 0?a.length!==0:!1}):!1}function wDe(e,t,r,n,i){let o=n!==void 0?n:[],a=wv(r),s=wv(o),l=co(e,t),c=m7(e,t,r,i),d=uAe(e,t,o),f=(v,b,y)=>({commandName:y.name,label:y.label,toState:v!==void 0?cAe(b?d:c,v,y.name):y.targetState,system:b}),h=(v,b,y)=>Q(y,S=>{let w=S.allowedStates;if(w!==void 0&&w.includes(v))return f(v,b,S)}),p=l.map(v=>{let b=h(v,!1,a).concat(h(v,!0,s));return{value:v,label:pt(v),terminal:b.length===0,outgoing:b}}),m=(v,b)=>b.filter(y=>ir(y.allowedStates)).map(y=>f(void 0,v,y)),g=m(!1,a).concat(m(!0,s));return{lifecycleField:t,states:p,anyState:g}}function EDe(e){return Q(wv(e),t=>t.targetState)}function kDe(e,t){let r=t!==void 0?t:[],n=e.states.flatMap(s=>Q(s.outgoing,l=>q(l.toState,c=>({fromState:s.value,toState:c,command:l.label,selfLoop:c===s.value,system:l.system})))),i=Q(n,s=>{if(!s.selfLoop)return s.toState}).concat(EDe(r)),o=q(e.states[0],s=>s.value);return{nodes:e.states.map(s=>({value:s.value,label:s.label,terminal:s.terminal,unreachable:!i.includes(s.value)&&ca(s.value,o),unresolved:s.outgoing.filter(l=>ir(l.toState)).map(l=>l.label)})),edges:n,anyState:e.anyState.map(s=>({label:s.label,system:s.system,toState:s.toState}))}}function Or(e){return"var("+e+")"}let CDe=E([z("flex"),_e("column"),u("gap",Or(O.md))]),RDe=E([u("font-size",Or(T.sizeLg)),u("font-weight",Or(T.weightMedium)),u("color",Or(x.textPrimary)),_n(ke(0))]),ADe=E([u("font-size",Or(T.sizeXs)),u("color",Or(x.textDisabled))]),TDe=E([z("flex"),u("flex-wrap","wrap"),X("flexStart"),u("gap",Or(O.md))]);function $De(e){return E([z("flex"),_e("column"),u("gap",Or(O.sm)),u("flex","0 1 240px"),u("padding",Or(O.md)),u("background",Or(x.surface)),u("border","1px solid var("+x.border+")"),u("border-left","3px solid "+e.border),u("border-radius",Or(Y.md))])}let NDe=E([z("flex"),X("center"),Ze("spaceBetween"),u("gap",Or(O.sm))]),DDe=E([u("font-size",Or(T.sizeXs)),u("color",Or(x.textDisabled)),u("text-transform","uppercase"),u("letter-spacing","0.04em")]),FDe=E([z("flex"),_e("column"),u("gap","6px")]),IDe=E([z("flex"),X("center"),u("flex-wrap","wrap"),u("gap","4px")]),PDe=E([u("color",Or(x.textSecondary)),u("font-size",Or(T.sizeSm))]),ODe=E([u("font-size",Or(T.sizeXs)),u("color",Or(x.textDisabled))]),MDe=E([z("flex"),_e("column"),u("gap",Or(O.sm)),u("padding-top",Or(O.sm))]),LDe=E([u("font-size",Or(T.sizeXs)),u("font-weight",Or(T.weightMedium)),u("color",Or(x.textSecondary)),u("text-transform","uppercase"),u("letter-spacing","0.04em")]),zDe=E([z("flex"),u("flex-wrap","wrap"),u("gap","6px")]);function vF(e,t){let r=t.toState;return L("div",{children:[t.system?_(nEe.make,{label:t.label}):_(tEe.make,{label:t.label}),r!==void 0?L(Bt,{children:[_("span",{children:"→",className:PDe}),_(Kk.make,{swatch:Gk(e,r),label:pt(r),dot:!1})]}):null],className:IDe},t.commandName)}function UDe(e){let t=e.display,r=e.title,n=e.systemCommands,i=e.lifecycleField,o=n!==void 0?n:[],a=t!==void 0?t:"Lane",s=wDe(e.schema,i,e.commands,o,e.transitions),l=s.states.map(d=>d.value),c;return c=a==="Lane"?void 0:xDe(kDe(s,o),D(r,pt(i))),L("div",{children:[r!==void 0?_("h3",{children:r,className:RDe}):null,_("div",{children:"Lifecycle on “"+pt(i)+"”",className:ADe}),c!==void 0?c:L(Bt,{children:[_("div",{children:s.states.map(d=>{let f=Gk(l,d.value);return L("div",{children:[L("div",{children:[_(Kk.make,{swatch:f,label:d.label}),d.terminal?_("span",{children:"end",className:DDe}):null],className:NDe}),d.terminal?_("span",{children:"No commands available",className:ODe}):_("div",{children:d.outgoing.map(h=>vF(l,h)),className:FDe})],className:$De(f)},d.value)}),className:TDe}),s.anyState.length!==0?L("div",{children:[_("span",{children:"Any state",className:LDe}),_("div",{children:s.anyState.map(d=>vF(l,d)),className:zDe})],className:MDe}):null]})],className:CDe})}let BDe=UDe;function Es(e){return"var("+e+")"}let jDe=E([z("flex"),_e("column"),u("gap",Es(O.xl))]),qDe=E([u("font-size",Es(T.sizeXl)),u("font-weight",Es(T.weightMedium)),u("color",Es(x.textPrimary)),_n(ke(0))]),VDe=E([z("flex"),X("center"),Ze("spaceBetween"),u("gap",Es(O.md))]),GDe=E([z("flex"),_e("column"),u("gap",Es(O.md)),u("padding",Es(O.lg)),u("background",Es(x.surfaceSubtle)),u("border","1px solid var("+x.borderSubtle+")"),u("border-radius",Es(Y.md))]);function tU(e){return e.filter(t=>SDe(t.schema,t.lifecycleField,t.commands,D(t.systemCommands,[])))}let bF="lifecycle",_F="diagram";function KDe(e){let t=e.uiHints,r=D7(),n=tU(e.views),i=Re(r.get(bF),_F)?"Diagram":"Lane",o=(s,l,c)=>_("button",{children:s,"aria-pressed":c?"true":"false",className:c?Da.Style.btnActive:Da.Style.btn,onClick:d=>r.set(bF,l)},l),a=yDe()?L("div",{children:[o("Lane","",i==="Lane"),o("Diagram",_F,i==="Diagram")],"aria-label":"Lifecycle rendering",className:Da.Style.group,role:"group"}):null;return L("div",{children:[L("div",{children:[_("h2",{children:"Lifecycles",className:qDe}),a],className:VDe}),n.length!==0?n.map(s=>_("div",{children:_(BDe,{schema:s.schema,lifecycleField:D(s.lifecycleField,""),commands:s.commands,systemCommands:D(s.systemCommands,[]),title:s.name,transitions:k(k(t,l=>hn(l,s.name)),l=>l.transitions),display:i}),className:GDe},s.name)):_(Kd,{title:"No lifecycles",description:"No view in this plugin declares a lifecycle enum with state-scoped commands."})],className:jDe})}let HDe=KDe;function Tt(e){return"var("+e+")"}let WDe=E([z("flex"),_e("column"),u("gap",Tt(O.md)),u("font-family",Tt(T.fontFamily))]),JDe=E([z("flex"),X("center"),u("gap",Tt(O.sm)),u("color",Tt(x.textSecondary)),u("font-size",Tt(T.sizeSm)),u("font-weight",Tt(T.weightMedium)),u("text-transform","uppercase"),u("letter-spacing","0.04em")]),QDe=E([z("inlineFlex"),X("center"),u("padding","0 6px"),u("border-radius",Tt(Y.full)),u("background",Tt(x.surfaceElevated)),u("color",Tt(x.textPrimary)),u("font-size",Tt(T.sizeXs)),u("letter-spacing","0")]),YDe=E([z("flex"),_e("column"),u("gap",Tt(O.md))]),XDe=E([z("flex"),X("flexStart"),u("gap",Tt(O.sm))]),ZDe=E([z("flex"),_e("column"),u("gap","2px"),u("min-width","0"),ai(1)]),eFe=E([z("flex"),X("baseline"),u("gap",Tt(O.sm))]),tFe=E([u("color",Tt(x.textPrimary)),u("font-size",Tt(T.sizeSm)),u("font-weight",Tt(T.weightMedium))]),rFe=E([u("color",Tt(x.textDisabled)),u("font-size",Tt(T.sizeXs))]),nFe=E([u("color",Tt(x.textPrimary)),u("font-size",Tt(T.sizeSm)),u("line-height",Tt(T.lineHeightNormal)),u("white-space","pre-wrap"),u("word-break","break-word")]),iFe=E([u("color",Tt(x.textDisabled)),u("font-size",Tt(T.sizeSm)),u("padding","var("+O.sm+") 0")]),oFe=E([z("flex"),_e("column"),X("flexEnd"),u("gap",Tt(O.sm))]),aFe=E([u("width","100%"),u("min-height","64px"),u("padding",Tt(O.sm)),u("background",Tt(x.surface)),u("border","1px solid var("+x.border+")"),u("border-radius",Tt(Y.md)),u("color",Tt(x.textPrimary)),u("font-family",Tt(T.fontFamily)),u("font-size",Tt(T.sizeSm)),u("resize","vertical")]),sFe=E([u("background",Tt(x.brand)),u("border","none"),u("border-radius",Tt(Y.md)),u("color",Tt(x.textOnBrand)),u("padding","4px var("+O.md+")"),u("font-size",Tt(T.sizeSm)),u("font-weight",Tt(T.weightMedium)),Ce("pointer"),Nw([u("opacity","0.5"),Ce("default")])]),lFe=E([u("color",Tt(x.error)),u("font-size",Tt(T.sizeXs)),u("align-self","flex-start")]);function uFe(e){let t=e.comment,r=t.timestamp;return L("div",{children:[_(Hd,{name:D(t.author,"?"),src:t.authorImageUrl,size:"Medium"}),L("div",{children:[L("div",{children:[_("span",{children:D(t.author,"Unknown"),className:tFe}),r!==void 0?_("span",{children:Ib(e.nowMs,r),className:rFe}):null],className:eFe}),_("span",{children:t.body,className:nFe})],className:ZDe})],className:XDe})}function cFe(e){let t=e.nowMs,r=e.error,n=e.posting,i=e.onPost,o=e.emptyLabel,a=e.title,s=e.comments,l=a!==void 0?a:"Comments",c=o!==void 0?o:"No comments yet",d=n!==void 0?n:!1,f=t!==void 0?t:Date.now(),h=ce(()=>""),p=h[1],m=h[0],g=m.trim(),v=g!==""&&!d,b=()=>{if(v)return ee(i,y=>y(g)),p(y=>"")};return L("div",{children:[L("div",{children:[l,_("span",{children:s.length.toString(),className:QDe})],className:JDe}),s.length===0?_("div",{children:c,className:iFe}):_("div",{children:s.map(y=>_(uFe,{comment:y,nowMs:f},y.id)),className:YDe}),i!==void 0?L("div",{children:[_("textarea",{className:aFe,disabled:d,placeholder:"Write a comment…",value:m,onKeyDown:y=>{if(y.key==="Enter"&&(y.metaKey||y.ctrlKey))return y.preventDefault(),b()},onChange:y=>{let S=y.target.value;p(w=>S)}}),r!==void 0?_("span",{children:r,className:lFe}):null,_("button",{children:d?"Posting…":"Comment",className:sFe,disabled:!v,onClick:y=>b()})],className:oFe}):null],className:WDe})}let dFe=cFe;function fFe(e){let t=e.entityId,r=e.binding,n=si(),i=cm(),o=ga(),a=Gs(),s=ne(e.requiredAccess,!1,b=>!a(b)),l=tc(r.readModel,!s),c=ce(()=>!1),d=c[1],f=ce(()=>{}),h=f[1],p=b=>{let y=r.postCommand;if(i!==void 0&&y!==void 0){d(S=>!0),h(S=>{}),Lt(i(y.mutationDocument,l1e(r,t,b)).then(S=>{if(d(w=>!1),typeof S!="object")return l.refetch(),Promise.resolve();{if(S.TAG==="Rejected"){let C=S._0;return dm(n,o,C.errorCode,C.detail).then(A=>(h($=>A),Promise.resolve()))}let w=S._0;return console.error("[AutoUI] comment not posted — "+w),h(C=>w),Promise.resolve()}}),S=>(d(w=>!1),h(w=>"Could not post the comment."),Promise.resolve()));return}};if(s)return null;let m=s1e(r,l.rows,t),g=r.postCommand;return _(dFe,{comments:m,onPost:n!==void 0&&g!==void 0?p:void 0,posting:c[0],error:f[0]})}let hFe=fFe;function ni(e){return"var("+e+")"}let pFe=E([z("flex"),_e("column"),u("gap",ni(O.lg))]),mFe=E([z("flex"),X("center"),Ze("spaceBetween"),u("gap",ni(O.md))]),gFe=E([u("font-size",ni(T.sizeXl)),u("font-weight",ni(T.weightMedium)),u("color",ni(x.textPrimary)),_n(ke(0))]),vFe=E([z("flex"),yi("wrap"),X("center"),u("gap",ni(O.md)),u("font-size",ni(T.sizeSm)),u("color",ni(x.textSecondary))]),bFe=E([z("inlineFlex"),X("center"),u("gap","4px"),Ce("pointer")]);function _Fe(e){return E([z("inlineBlock"),u("width","8px"),u("height","8px"),u("border-radius","50%"),u("background",e)])}let yF=E([u("font-size",ni(T.sizeXs)),u("color",ni(x.textDisabled))]),yFe=E([z("flex"),X("center"),u("gap",ni(O.sm))]),xFe=E([u("background","none"),u("border","1px solid var("+x.border+")"),u("border-radius",ni(Y.sm)),u("padding","2px var("+O.sm+")"),u("color",ni(x.textSecondary)),u("font-size",ni(T.sizeSm)),Ce("pointer"),Ue([u("background",ni(x.surfaceSubtle)),u("color",ni(x.textPrimary))])]);function SFe(e){let t=e.viewAccess,r=e.uiHints,n=e.events,i=e.resource,o=e.pluginId,a=t!==void 0?t:{},s=Ls(),l=Gs(),c=si(),d=Yp(),f=ga(),h=Qk(),p=ce(()=>[]),m=p[1],g=p[0],v=K=>bn(K.schema,k(r,ie=>Qa(ie,K.name)),{field:K.labelField,source:K.labelFieldSource}),b=tc(i,!0),y=i.name,S=b.rows,w=i.schema,C=v(i),A=Mh(b.canLoadMore),$=(K,ie)=>s(Ga(o,i.name,K,[])),R=Zu,N={pluginId:o,viewName:i.name},I={readModelName:y,rows:S,schema:w,semantics:C,window:A,onOpenRow:$,role:R,ownEntity:N},M=n.map((K,ie)=>{let le=fv(a,K.readModel.name,l),Z=le&&!g.includes(K.readModel.name),ve=tc(K.readModel,Z);return[K,ie,Z,le,ve]}),P=(K,ie)=>D(k(k(r,le=>hn(le,K.name)),le=>le.accent),Bd[Fo(ie,Bd.length)]),B=Q(M,K=>{let ie=K[4],le=K[0],Z=b7(le.readModel.commands,le.resourceRef),ve=Yk(c,d,le.readModel.commands,le.readModel.name,ie.isLive,ie.refetch,f,h.onNotice,void 0);if(K[2])return{readModelName:le.readModel.name,rows:ie.rows,schema:le.readModel.schema,semantics:v(le.readModel),accent:P(le.readModel,K[1]),window:Mh(ie.canLoadMore),onOpenRow:(pe,be)=>s(Ga(o,le.readModel.name,pe,[])),onCommand:q(Z,pe=>ve),role:ec,resourceRef:le.resourceRef,assignCommand:Z,ownEntity:{pluginId:o,viewName:le.readModel.name}}}),j=[I].concat(B),W=(b.canLoadMore?[i.name]:[]).concat(Q(M,K=>{if(K[2]&&K[4].canLoadMore)return K[0].readModel.name})),te=()=>{b.canLoadMore&&b.loadMore(),M.forEach(K=>{let ie=K[4];if(K[2]&&ie.canLoadMore)return ie.loadMore()})},J=b.fetchState,re,se=0;typeof J!="object"?re=J==="Loading"?[i.name+": loading…"]:[]:se=1,se===1&&(re=[i.name+": "+J._0]);let he=re.concat(Q(M,K=>{let ie=K[0],le=K[4].fetchState;if(K[2])return typeof le!="object"?le==="Loading"?ie.readModel.name+": loading…":void 0:(le.TAG,ie.readModel.name+": "+le._0)}).concat(Ak(a,n.map(K=>K.readModel.name),l)));return L("div",{children:[_("div",{children:_("h2",{children:e.canvasName,className:gFe}),className:mFe}),_("div",{children:M.filter(K=>K[3]).map(K=>{let ie=K[0];return L("label",{children:[_("input",{checked:K[2],type:"checkbox",onChange:le=>{let Z=ie.readModel.name;m(ve=>ve.includes(Z)?ve.filter(pe=>pe!==Z):ve.concat([Z]))}}),_("span",{className:_Fe(P(ie.readModel,K[1]))}),ie.readModel.name],className:bFe},ie.readModel.name)}),className:vFe}),h.element,e.mode.render(j),W.length!==0?L("div",{children:[_("button",{children:"Load more",className:xFe,onClick:K=>te()}),_("span",{children:"More rows available: "+W.join(", "),className:yF})],className:yFe}):null,he.length!==0?_("span",{children:he.join(" · "),className:yF}):null],className:pFe})}let wFe=SFe;function EFe(e){return e}function xF(e,t){let r=t!==void 0?t:[];return e.map(n=>({name:n.name,schema:n.schema,commands:n.commands,rowActionCandidates:Y7(r,n.name),declaredLabelField:n.labelField,declaredLabelSource:n.labelFieldSource}))}function Ev(e){if(typeof e=="object")return"heuristic:"+e._0;switch(e){case"Annotation":return"annotation";case"Type":return"type";case"Hint":return"hint"}}function rU(e,t,r){return t!==void 0?Object.entries(m7(e.schema,t,e.commands,k(r,n=>n.transitions))):[]}function kFe(e){let t=[["command",Ob(e.action)],["field",e.action.field]],r=ne(e.tier,[],o=>[["tier",W7()]]),n=e.vetoes,i=n.length!==0?[["vetoes",n.map(_3e)]]:[];return Oe(t.concat(r).concat(i))}function CFe(e){let t=r=>e.filter(r).map(kFe);return Oe([["attached",t(jb)],["vetoed",t(J7)],["deferred",t(Q7)]])}function nU(e){return q(e.declaredLabelField,t=>({field:t,source:e.declaredLabelSource}))}function iU(e,t){return ne(mi(e.declaredLabelSource,r=>Re(e.declaredLabelField,t)),t,r=>t+" ("+r+")")}function oU(e,t){if(t.TAG==="Pair"){let n=t.endField,i=t.startField;return n!==void 0?i+".."+n:i}let r=t._0;return ne(F(e.semantics,r),r,n=>r+" ("+Ev(n.provenance)+")")}function aU(e,t){switch(t.TAG){case"Paired":return t.latField+"/"+t.lngField;case"Pointed":let r=t._0;return ne(F(e.semantics,r),r,i=>r+" ("+Ev(i.provenance)+")");case"Geolocated":let n=t._0;return ne(F(e.semantics,n),n+" (point on Located)",i=>n+" ("+Ev(i.provenance)+", point on Located)")}}function RFe(e,t,r){let n=e.name,i=e.schema,o=bn(i,t,nU(e)),a=$e(o.semantics).map(d=>{let f=d[1];return Oe([["field",d[0]],["semantic",Wd(f.semantic)],["provenance",Ev(f.provenance)]])}),s=[];ee(o.geo,d=>{s.push(["geo",aU(o,d)])}),ee(o.dateSpan,d=>{s.push(["dateSpan",oU(o,d)])}),ee(o.statusField,d=>{s.push(["status",d])}),ee(o.labelField,d=>{s.push(["label",iU(e,d)])}),ee(o.imageField,d=>{s.push(["image",d])}),ee(o.parentField,d=>{s.push(["parent",d])});let l=r2(i,void 0).map(d=>d.id),c=rU(e,o.statusField,r).map(d=>{let f=d[1];return[d[0],f.command+" ("+oAe(f.tier)+")"]});return Oe([["view",n],["capableModes",l],["roles",Oe(s)],["transitions",Oe(c)],["rowActions",CFe(D(e.rowActionCandidates,[]))],["fields",a]])}function sU(e,t,r,n){return Oe([["plugin",e],["hintErrors",(n!==void 0?n:[]).map(EFe)],["views",t.map(o=>RFe(o,k(r,a=>Qa(a,o.name)),k(r,a=>hn(a,o.name))))]])}function AFe(e,t){return e.map(r=>{let n=r.name,i=r.schema,o=bn(i,k(t,b=>Qa(b,n)),nU(r)),a=r2(i,void 0).map(b=>b.id).join(", "),s=[];ee(o.geo,b=>{s.push("geo="+aU(o,b))}),ee(o.dateSpan,b=>{s.push("dateSpan="+oU(o,b))}),ee(o.statusField,b=>{s.push("status="+b)}),ee(o.labelField,b=>{s.push("label="+iU(r,b))}),ee(o.imageField,b=>{s.push("image="+b)}),ee(o.parentField,b=>{s.push("parent="+b)});let l=s.length===0?"":"; "+s.join("; "),c=Object.keys(o.semantics).length,d=rU(r,o.statusField,k(t,b=>hn(b,n))),f=o.statusField,h=d.length,p=f!==void 0?"; "+h.toString()+" transition(s)":"",m=D(r.rowActionCandidates,[]),g=b=>m.filter(b).length.toString(),v=m.length!==0?"; row actions "+g(jb)+" attached, "+g(J7)+" vetoed, "+g(Q7)+" deferred":"";return n+": modes "+a+l+p+v+"; "+c.toString()+" field semantic(s)"})}function TFe(e,t,r,n){let i=n!==void 0?n:[];console.log('[AutoUI] Inference report — plugin "'+e+'"'),AFe(t,r).forEach(o=>{console.log(" "+o)}),t.forEach(o=>{D(o.rowActionCandidates,[]).forEach(a=>{let s=a.tier,l=a.vetoes,c,d=0;s!==void 0&&l.length===0?c="attached ("+W7()+")":d=1,d===1&&(c=l.length!==0?"not offered — "+l.map(y3e).join("; "):"deferred — no tier admits it yet"),console.log(" "+o.name+" · "+Ob(a.action)+"("+a.action.field+"): "+c)})}),console.log(JSON.stringify(sU(e,t,r,i),null,2))}function t1(e){return e.replace(/[^A-Za-z0-9-]/g,"-")}function $Fe(e,t,r){return"/"+t1(e)+"/"+t1(t)+"/"+t1(r)}function NFe(e){return Object.fromEntries([["kind",e.kind],["senderId",e.senderId],["sentAt",e.sentAt],["body",e.body]])}function DFe(e){let t=me.object(e);if(t===void 0)return;let r=o=>k(t[o],me.string),n=r("kind"),i=r("senderId");if(n!==void 0&&i!==void 0)return{kind:n,senderId:i,sentAt:D(k(t.sentAt,me.float),0),body:D(t.body,null)}}function FFe(e,t,r,n,i){let o=n!==void 0?n:!0,a=nm(),s=k(a,h=>h.clientNamespace()),l=o&&Ee(s)&&ne(a,!1,h=>h.clientChannelsAvailable()),c=s!==void 0?$Fe(s,e,t):void 0,d=De(i);return d.current=i,Ae(()=>{let h=l?a:void 0;if(h!==void 0&&c!==void 0)return h.subscribe("Domain",c,p=>{let m=DFe(p);if(m!==void 0&&m.senderId!==r)return d.current(m)})},[l,D(c,""),r]),{available:l,publish:(h,p)=>{let m=l?a:void 0;if(m===void 0||c===void 0)return;let g=Date.now(),v={kind:h,senderId:r,sentAt:g,body:p};m.publish("Domain",c,[NFe(v)]).then(b=>{b.TAG!=="Ok"&&console.warn("[AutoClientChannel] publish to "+c+" failed: "+b._0)})}}}let JS="heartbeat",QS="hello",lU="leave";function SF(e){let t=me.object(e);if(t===void 0)return;let r=i=>k(t[i],me.string),n=r("userId");if(n!==void 0&&n!=="")return[n,D(r("username"),n)]}function IFe(e,t,r){let n=t.kind;if(n===lU){let s=SF(t.body);if(s===void 0)return e;let l=s[0];return e.filter(c=>c.userId!==l)}if(n!==JS&&n!==QS)return e;let i=SF(t.body);if(i===void 0)return e;let o=i[0];return e.filter(s=>s.userId!==o).concat([{userId:o,username:i[1],lastSeen:r}])}function PFe(e,t){return e.filter(r=>t-r.lastSeen<25e3)}function OFe(e,t){return Object.fromEntries([["userId",e],["username",t]])}function MFe(e,t,r,n,i){let o="presence",a=i!==void 0?i:!0,s=ce(()=>[]),l=s[1],c=De(void 0),f=FFe(o,t,r,a&&r!=="",m=>{if(l(v=>IFe(v,m,Date.now())),m.kind!==QS)return;let g=c.current;if(g!==void 0){setTimeout(()=>g(),Math.random()*1e3);return}}),h=f.available,p=f.publish;return Ae(()=>{if(!h)return;let m=OFe(r,n),g=()=>p(JS,m);c.current=g,p(QS,m),p(JS,m);let v=setInterval(g,1e4);return()=>{clearInterval(v),c.current=void 0,p(lU,m)}},[h,r,n,t]),Ae(()=>{if(!h)return;let m=setInterval(()=>l(g=>PFe(g,Date.now())),1e4);return()=>{clearInterval(m)}},[h]),h?s[0]:[]}function f0(e){return"var("+e+")"}let LFe=E([z("inlineFlex"),X("center"),u("gap",f0(O.xs))]),zFe=E([u("font-family",f0(T.fontFamily)),u("font-size",f0(T.sizeSm)),u("color",f0(x.textSecondary)),u("white-space","nowrap")]);function UFe(e){return e===1?"1 other here":e.toString()+" others here"}function BFe(e){let t=e.showLabel,r=e.max,n=e.size,i=e.people,o=n!==void 0?n:"Small",a=r!==void 0?r:4,s=t!==void 0?t:!0;if(i.length===0)return null;let l=i.map(c=>({name:c.username,imageUrl:c.imageUrl}));return L("span",{children:[_(XO,{members:l,size:o,max:a}),s?_("span",{children:UFe(i.length),className:zFe}):null],className:LFe,title:i.map(c=>c.username).join(", ")})}let jFe=BFe;function qFe(e){let t=xa(),r=k(t,s=>s.identity),n=ne(r,"",s=>s.userId),i=ne(r,"",s=>s.username),a=MFe(void 0,e.readModel+"-"+e.entityId,n,i===""?n:i,n!=="").map(s=>({userId:s.userId,username:s.username}));return _(jFe,{people:a})}let VFe=qFe;function uU(e){return e===""?e:e.slice(0,1).toUpperCase()+e.slice(1,e.length)}let YS={contents:[]},XS={contents:[]};function cU(e,t,r){if(r!=="id")return;let n=e+"."+t;if(!YS.contents.some(i=>i===n)){YS.contents.push(n),console.warn("[AutoUI] Entity "+n+' has labelField="id" — dropdown labels will render as raw UUIDs. Add a @displayName annotation on the source state to fix.');return}}function dU(e,t,r,n){if(r==="id"||n.length!==0&&n.some(o=>o===r))return;let i=e+"."+t;if(!XS.contents.some(o=>o===i)){XS.contents.push(i),console.warn("[AutoUI] Entity "+i+' labelField="'+r+'" is not @searchable; searchPrefix will scan the table — OK at small scale, consider annotating for production.');return}}function ZS(e){let t=[];return e.forEach(r=>{let n=(o,a,s,l,c)=>{cU(r.id,o,s),dU(r.id,o,s,l);let d=Iw(c,void 0),f=d!==void 0&&d.namedWhenRetired?d:void 0;t.push({pluginId:r.id,name:o,queryField:a,singleQueryField:Eo(a),labelField:s,namedRetirement:f})};r.readModels.forEach(o=>n(o.name,o.queryField,o.labelField,o.searchableFields,o.schema)),r.stateViewSlices.concat(D(r.internalQueryables,[])).forEach(o=>n(o.name,o.queryField,o.labelField,o.searchableFields,o.schema))}),t}function h0(e,t){let r=e.toLowerCase(),n=o=>{let a=o.length,s=e.length;if(s>a&&r.endsWith(o))return e.slice(0,s-a|0)};if(!t)return n("id");let i=n("ids");return i!==void 0?i:n("id")}function cC(e){return[Eo(e),$p(e)]}function jd(e,t){return e.find(r=>r.name===t)}function dC(e,t){let r=uU(t),n=$p(r),i=jd(e,n);return i!==void 0?i:jd(e,r)}function fC(e){return Q(D(k(k(G(e),t=>F(t,"required")),Ct),[]),oe)}function fU(e,t,r,n){return Q(e.references,i=>{let o=i.fieldName.includes("[]"),a=w7(i.fieldName),s;if(a!==void 0){let g=a[1],v=k(k(F(n,a[0]),G),E7),b=k(k(k(k(v,G),y=>F(y,"properties")),G),y=>F(y,g));s=b!==void 0?[b,!0,D(q(v,fC),[]).some(y=>y===g)]:[void 0,!1,!1]}else s=o?[void 0,!1,!1]:[F(n,i.fieldName),!0,r.some(g=>g===i.fieldName)];let l=k(s[0],G),c=k(k(l,g=>F(g,"type")),oe),d=Re(c,"array"),f=i.plugin,h=f!==void 0?t.filter(g=>g.pluginId===f):t,p=jd(h,i.entity),m=p!==void 0?p:dC(h,i.entity);if(s[1]){if(m!==void 0){let g=cC(m.name);return{propertyKey:i.fieldName,queryField:m.queryField,singleQueryField:m.singleQueryField,labelField:m.labelField,multi:d,required:s[2],entityName:g[0],entityNamePlural:g[1]}}console.warn("[AutoUI] Command "+e.name+" field "+i.fieldName+': explicit @ref to "'+i.entity+'" did not resolve to a registered entity. Falling back to text input.');return}console.warn("[AutoUI] Command "+e.name+" field "+i.fieldName+": explicit @ref path does not name a property of a record array on this command. Falling back to text input.")})}function hU(e,t,r,n,i,o){let a=[];return i!==void 0&&$e(i).forEach(s=>{let l=s[0],c=G(s[1]);if(Ee(k(c,S=>F(S,"const"))))return;let f=k(k(c,S=>F(S,"type")),oe),h=k(k(k(k(c,S=>F(S,"items")),G),S=>F(S,"type")),oe),p;if(f!==void 0)switch(f){case"array":p=h==="string"?!0:void 0;break;case"string":p=!1;break;default:p=void 0}else p=void 0;if(p===void 0)return;let m=!1;if(e.level==="Collection"&&!p){let S;if(t!==void 0)if(Re(e.aggregateIdField,l))S=!0;else{let w=h0(l,!1);S=w!==void 0?w.toLowerCase()===t.name.toLowerCase():!1}else S=Re(e.aggregateIdField,l);m=S}if(m)return;let g=e.aggregateIdField,v;if(g!==void 0&&t!==void 0&&g===l&&!p){let S=jd(r,$p(t.name));v=S!==void 0?S:jd(r,t.name)}else v=void 0;let b;if(v!==void 0)b=v;else{let S=h0(l,p);b=S!==void 0?dC(r,S):void 0}if(b!==void 0){b.pluginId!==o&&console.warn("[AutoUI] Command "+e.name+" field "+l+' resolved cross-plugin to "'+b.name+'" in plugin "'+b.pluginId+'" via naming heuristic. Add @ref("'+b.pluginId+"."+b.name+'") to make the cross-plugin reference explicit, or @ref("<LocalEntity>") to target a same-plugin entity.');let S=cC(b.name),w=b.queryField,C=b.singleQueryField,A=b.labelField,$=n.some(M=>M===l),R=S[0],N=S[1],I={propertyKey:l,queryField:w,singleQueryField:C,labelField:A,multi:p,required:$,entityName:R,entityNamePlural:N};a.push(I);return}if(h0(l,p)!==void 0){console.warn("[AutoUI] Command "+e.name+" field "+l+" looks like a reference but no matching entity was registered. Falling back to text input.");return}}),a}function hC(e,t,r,n){let i=fC(e.schema),o=k(k(G(e.schema),s=>F(s,"properties")),G);if(e.references.length===0)return hU(e,t,r,i,o,n);let a=D(o,{});return fU(e,r,i,a)}function pU(e,t){let r=(i,o)=>{let a={...i};return a.refFields=hC(i,o,t,e.id),a},n={...e};return n.stateChangeSlices=e.stateChangeSlices.map(i=>{let o={...i};return o.commands=i.commands.map(a=>r(a,void 0)),o}),n.aggregates=e.aggregates.map(i=>{let o={...i};return o.commands=i.commands.map(a=>r(a,i)),o}),n.readModels=e.readModels.map(i=>{let o={...i};return o.commands=i.commands.map(a=>r(a,void 0)),o}),n}let GFe={capitalize:uU,singularize:Eo,warnedIdLabel:YS,warnedUnsearchable:XS,warnIfIdLabel:cU,warnIfUnsearchable:dU,buildRegistry:ZS,stemFromKey:h0,entityDisplayNames:cC,findByName:jd,findByStem:dC,requiredSet:fC,resolveExplicitRefs:fU,resolveByHeuristic:hU,resolveForCommand:hC,enrichPlugin:pU};function qb(e){let t=me.object(e);if(t===void 0||Ee(Hl(e)))return;let r=k(t.properties,me.object);if(r!==void 0)return r;let n=k(k(k(t.items,me.object),i=>i.properties),me.object);return n!==void 0?n:nt(["anyOf","oneOf","allOf"],void 0,(i,o)=>i!==void 0?i:k(k(t[o],me.array),a=>nt(a,void 0,(s,l)=>s!==void 0?s:qb(l))))}function pC(e,t){let r=Q(Object.entries(e),n=>{if(!mQ(n[1]))return n[0]});return t&&!r.includes("id")?["id"].concat(r):r}let wF=new Map;function KFe(e){if(ir(wF.get(e))){wF.set(e,!0),console.error('AutoUI: the union field "'+e+'" carries neither '+bO+" on the field nor "+_O+" on its arms, so its member types cannot be named. It will be selected as `"+e+" { __typename }` — the arm is readable, its fields are not. The platform emitting this schema is behind the union contract.");return}}function mC(e,t,r){let n=Q(t.arms,i=>{let o=hx(t,i);if(o===void 0)return;let a=r(i);if(a!=="")return"... on "+o+" { "+a+" }"});return t.arms.some(i=>ir(hx(t,i)))&&KFe(e),n.length!==0?e+" { __typename "+n.join(" ")+" }":e+" { __typename }"}function xp(e,t,r){let n=t!==void 0?t:3;return pC(e,r!==void 0?r:!0).map(a=>{let s=k(e[a],Hl);if(s!==void 0)return mC(a,s,c=>n<=0?"":xp(c.properties,n-1|0,!1));if(n<=0)return a;let l=k(e[a],qb);return l!==void 0?a+" { "+xp(l,n-1|0,!1)+" }":a}).join(" ")}function HFe(e,t){let r=pC(e,t);return Q(r,n=>{let i=e[n];if(i===void 0)return n;let o=Hl(i);return o!==void 0?mC(n,o,a=>xp(a.properties,1,!1)):ir(qb(i))?n:void 0}).join(" ")}function mU(e,t,r){let n=!0,i=1,o=pC(e,n);return Q(o,a=>{let s=e[a];if(s===void 0)return a;let l=Hl(s);if(l!==void 0)return mC(a,l,f=>xp(f.properties,i,!1));let c=qb(s);if(c===void 0)return a;let d=HFe(c,!1);if(d!=="")return a+" { "+d+" }"}).join(" ")}function Vb(e){return D(k(k(me.object(e),t=>t.properties),me.object),{})}function EF(e,t,r,n,i,o){let a=n!==void 0?n:!1,s=i!==void 0?i:!1,l=o!==void 0?o:!1,c=mU(Vb(t)),d=a||l,f=["$first: Int","$after: String","$last: Int","$before: String"],h=["first: $first","after: $after","last: $last","before: $before"],p=Ee(bQ(t)),m=p?f.concat(["$includeRetired: Boolean"]):f,g=p?h.concat(["includeRetired: $includeRetired"]):h,v;if(r!==void 0){let S=d?["$filter: "+r+"Filter"].concat(m):m,w=d?["filter: $filter"].concat(g):g,C=s?S.concat(["$orderBy: "+r+"OrderBy"]):S,A=s?w.concat(["orderBy: $orderBy"]):w;v=[C,A]}else v=[m,g];let b=v[0].join(", "),y=v[1].join(", ");return"query("+b+") { "+e+"("+y+") { pageInfo { hasNextPage hasPreviousPage startCursor endCursor } edges { cursor node { "+c+" } } } }"}function kF(e,t){let r=xp(Vb(t),void 0,void 0),i=ne(Op(t),!1,a=>a[1].namedWhenRetired)?", includeRetired: true":"",o=Dw(t);return o!==void 0?"query($id: ID!, $subId: String!) { "+e+"(id: $id, "+o+": $subId"+i+") { "+r+" } }":"query($id: ID!) { "+e+"(id: $id"+i+") { "+r+" } }"}function WFe(e,t){let r=mU(Vb(t));return"query($ids: [String!]!) { "+e+"ByIds(ids: $ids) { "+r+" } }"}function JFe(e){return QO(e).length===0?ir(Dw(e)):!1}function QFe(e){let t=Object.keys(Vb(e));return t.includes("updatedAt")?"updatedAt":t.includes("createdAt")?"createdAt":void 0}function CF(e,t,r){return e==="Operator"?t:D(r,[])}function r1(e,t){let r={},n=(i,o)=>{let a=F(r,i);if(a!==void 0){let s=o.filter(l=>!a.some(c=>c.name===l.name));r[i]=a.concat(s);return}r[i]=o};return e.aggregates.forEach(i=>{i.linkedViews.forEach(o=>n(o,CF(t,i.commands,i.systemCommands)))}),e.stateChangeSlices.forEach(i=>{let o=CF(t,i.commands,i.systemCommands),a=o.filter(c=>c.level==="Collection"),s=o.filter(c=>c.level==="Instance");i.linkedViews.forEach(c=>n(c,a));let l=i.consistencyRead;if(l!==void 0)return n(l,s);i.linkedViews.forEach(c=>n(c,s))}),r}function RF(e,t,r,n,i){let o=i!==void 0?i:Mb,a=e.readModels.map(s=>s.name).concat(e.stateViewSlices.map(s=>s.name)).map(s=>({pluginId:e.id,name:s,placed:D(F(n,s),[]).map(l=>l.name)}));return R3e(a,t,void 0,r,o)}function YFe(e,t,r,n,i,o,a,s,l,c,d,f,h,p){let m=[],g=i!==void 0?i:[],v=o!==void 0?o:[],b=a!==void 0?a:[],y=s!==void 0?s:[],S={},w=c!==void 0?c:{},C=d!==void 0?d:{},A=f!==void 0?f:!1,$=g.length===0?[e]:g,R=ZS($),N=pU(e,R),I=r1(N,"Operator"),M=r1(N,"System"),P=(V,ye,Pe)=>{let ut={...V};return ut.refFields=hC(V,ye,R,Pe),ut},B=RF(N,$,R,I,P),j=v.find(V=>V.id===N.id),W;if(j!==void 0){let V=ZS(v);W=RF(j,v,V,r1(j,"Operator"),void 0)}else W=B;let te={};W.filter(jb).forEach(V=>{te[V.viewName]=D(F(te,V.viewName),[]).concat([Ob(V.action)])});let J=ne(h,[],V=>Kue(V,N,v,te)),re=[],se=Pu(),he=N.id,K=V=>{let ye=N.derivedPages;return ye!==void 0?ye.includes(V):!0},ie=V=>{let ye=k(h,Pe=>hn(Pe,V));return IRe(FRe(ye,$,P),A3e(B,V),D(k(ye,Pe=>Pe.suppressRowActions),[]))},le=(V,ye,Pe,ut,ft,It)=>{let at=JFe(V.schema),Me=at?V.queryField+"ByIds":void 0,Ie=at?WFe(V.queryField,V.schema):void 0,tt=QFe(V.schema),rt=yQ(V.schema),Le=V.name,vt=vs(ul(he,Le)),Et=F(w,Le),Gr=Pe+Le,zn=Vf(N.name,Le,V.sortIndex,k(h,xn=>hn(xn,Le)),A&&Ee(V.ownerField)),cn={fragmentId:Gr,title:Le,menuEntry:zn,requiredAccess:Et,url:vt},Fr=ie(Le),zr=he+"."+Le,yn=(xn,kr)=>_(y$e,{readModel:V,detailView:ye,pluginId:he,openRowId:xn,drillPath:kr,singleQueryField:ut,detailQueryDocument:ft,byIdsQueryField:Me,byIdsQueryDocument:Ie,sortKeyField:tt,liveOffered:rt,uiHints:h,schedulerJoin:It,rowActions:Fr,archiveOffered:!A},zr);return re.push(Uc(jc(he,Le),xn=>{let kr=sY(xn);return _(ug,{definition:cn,children:yn(kr[0],kr[1])})})),JV(se,he,Le,ul(he,Le)),cn},Z=N.readModels.filter(V=>!b.includes(V.name)).map(V=>{let ye=D(F(I,V.name),V.commands),Pe=D(F(M,V.name),D(V.systemCommands,[])),ut=Eo(V.queryField),ft=DS(V.schema);if(V.queryDocument===""){let at={...V};return at.systemCommands=Pe,at.commands=ye,at.queryDocument=EF(V.queryField,V.schema,ut,ft.hasFilter,ft.hasSort,ft.hasSearch),at}let It={...V};return It.systemCommands=Pe,It.commands=ye,It}),ve=N.stateViewSlices.filter(V=>!b.includes(V.name)).map(V=>{let ye=D(F(I,V.name),[]),Pe=D(F(M,V.name),[]),ut=Eo(V.queryField),ft=DS(V.schema),It=EF(V.queryField,V.schema,ut,ft.hasFilter,ft.hasSort,ft.hasSearch);return{name:V.name,schema:V.schema,queryDocument:It,queryField:V.queryField,sortIndex:V.sortIndex,commands:ye,linkedWriteSide:V.linkedWriteSide,labelField:V.labelField,labelFieldSource:V.labelFieldSource,searchableFields:V.searchableFields,lifecycleField:V.lifecycleField,ownerField:V.ownerField,systemCommands:Pe}}),pe=bAe(Z.concat(ve),h,(V,ye)=>{console.warn("[AutoUI] "+N.id+': scheduler canvas "'+V+'" has '+ye.toString()+" resource models — its events list omits the scheduler toggle (the generated page still renders)")}),be={...N};be.readModels=Z;let Ge=V=>q(a1e(be,V),ye=>{let Pe=F(w,ye.readModel.name);return ut=>_(hFe,{binding:ye,entityId:ut,requiredAccess:Pe})}),zt=V=>{let ye=D(h,i0),Pe=Jue(hn(ye,V.name),$ye(V.schema));return q(Nye(V,Pe),ut=>{let ft=F(w,V.name);return It=>_(B3e,{binding:ut,entityId:It,requiredAccess:ft})})},At=V=>{let ye=D(h,i0);if(Que(hn(ye,V.name)))return Pe=>_(VFe,{readModel:V.name,entityId:Pe})},Er={...N};Er.readModels=Z.concat(ve);let nn=V=>{let ye=D(h,i0);return h1e(f1e(Er,V.name),Yue(hn(ye,V.name)),V.name).map(Pe=>{let ut=F(w,Pe.readModel.name);return ft=>_(_De,{binding:Pe,entityId:ft,hostViewName:V.name,pluginId:he,uiHints:h,requiredAccess:ut})})},Mn=V=>{let ye=Q([Ge(V.name)].concat(nn(V).map(Pe=>Pe)).concat([zt(V)]),Pe=>Pe);if(ye.length!==0)return Pe=>_(Bt,{children:ye.map((ut,ft)=>_(Nv,{children:ut(Pe)},ft.toString()))})},qt=Z.map(V=>{let ye=Eo(V.queryField),Pe=kF(ye,V.schema),ut=ie(V.name),ft=F(S,V.name);return le(V,ft!==void 0?ft:(at,Me,Ie)=>_(gF,{data:Ie,schema:V.schema,rootLabel:V.name,commands:V.commands,rowActions:ut,lifecycleField:V.lifecycleField,aggregateId:at,labelField:V.labelField,drillPath:Me,pluginId:N.id,viewName:V.name,uiHints:h,entityPanel:Mn(V),headerAccessory:At(V)}),N.id+".",ye,Pe,F(pe,V.name))}),wi=ve.map(V=>{let ye=Eo(V.queryField),Pe=kF(ye,V.schema),ut=ie(V.name),ft=F(S,V.name);return le(V,ft!==void 0?ft:(at,Me,Ie)=>_(gF,{data:Ie,schema:V.schema,rootLabel:V.name,commands:V.commands,rowActions:ut,lifecycleField:V.lifecycleField,aggregateId:at,labelField:V.labelField,drillPath:Me,pluginId:N.id,viewName:V.name,uiHints:h,entityPanel:Mn(V),headerAccessory:At(V)}),N.id+".slice.",ye,Pe,F(pe,V.name))}),Yn=N.stateChangeSlices.filter(V=>!y.includes(V.name)).map(V=>({fragmentId:N.id+".commands."+V.name,title:V.name,description:"Auto-generated command panel for "+V.name,extensionPackage:N.id,positions:m,component:ye=>_(vDe,{slice:V,contextId:ye.contextId}),requiredAccess:F(C,V.name),minWidth:void 0})),et=Z.concat(ve).toSorted((V,ye)=>V.sortIndex===ye.sortIndex?wd(V.name,ye.name):yw(V.sortIndex,ye.sortIndex));Ee(l5("autoui.inferenceReport"))&&TFe(N.id,xF(et,B),h,J),ee(p,V=>V(sU(N.id,xF(et,B),h,J)));let lt=et.map(V=>[V,bn(V.schema,void 0,void 0)]),Vt=Q(ov(),V=>{let ye=V.arity;if(!(typeof ye!="object"||ye.TAG!=="Multi"))return[V,ye.min]}).flatMap(V=>{let ye=V[1],Pe=V[0],ut={};return lt.forEach(ft=>{let It=ft[0],at=k(h,Le=>hn(Le,It.name)),Me=ne(k(at,Le=>Le.suppress),!1,Le=>Le.includes(Pe.id)),Ie={registry:R};if(!(Pe.isCapable(It.schema,ft[1],Ie)&&!Me))return;let tt=D(k(at,Le=>Le.canvas),Pe.label),rt=F(ut,tt);rt!==void 0?rt.push(It):ut[tt]=[It]}),Q($e(ut),ft=>{let It=ft[1];if(It.length>=ye)return[Pe,ft[0],It]})}),Ot=(V,ye)=>Vt.some(Pe=>Pe[1]===ye?Pe[0].id!==V.id:!1)?ye+" — "+V.label:ye,Ft=K("canvas")?Vt.map(V=>{let ye=V[2],Pe=V[0],ut=Ot(Pe,V[1]),ft=N.id+".canvas."+ut,It=Vf(N.name,ut,900,void 0,void 0),at=F3(w,ye.map(tt=>tt.name)),Me=vs(ul(he,ut)),Ie={fragmentId:ft,title:ut,menuEntry:It,requiredAccess:at,url:Me};return re.push(Uc(jc(he,ut),tt=>_(ug,{definition:Ie,children:_(Y3e,{pluginId:he,mode:Pe,canvasName:ut,readModels:ye,uiHints:h,viewAccess:w})}))),Ie}):[],Ei=K("scheduler")?Q(ov(),V=>{let ye=V.arity;if(!(typeof ye!="object"||ye.TAG==="Multi"))return[V,ye._0]}).flatMap(V=>{let ye=V[1],Pe=V[0],ut={},ft={},It=(tt,rt,Le)=>{let vt=F(tt,rt);vt!==void 0?vt.push(Le):tt[rt]=[Le]};et.forEach(tt=>{let rt=k(h,Et=>hn(Et,tt.name)),Le=D(k(rt,Et=>Et.canvas),Pe.label),vt=k(rt,Et=>Et.role);if(vt!==void 0)return vt===Zu?It(ut,Le,tt):vt===ec?ee(k(rt,Et=>Et.resourceRef),Et=>It(ft,Le,[tt,Et])):void 0});let at=(tt,rt)=>ne(ye.find(Le=>Le.role===tt),rt,Le=>Le.min),Me=at(Zu,1),Ie=at(ec,1);return Q($e(ut),tt=>{let rt=tt[1],Le=tt[0],vt=D(F(ft,Le),[]),Et=rt[0];if(Et===void 0||!(rt.length>=Me&&vt.length>=Ie))return;let Gr=vt.map(yn=>({readModel:yn[0],resourceRef:yn[1]})),zn=N.id+".scheduler."+Le,ct=Vf(N.name,Le,910,void 0,void 0),cn=Qye(w,Et.name),Fr=vs(ul(he,Le)),zr={fragmentId:zn,title:Le,menuEntry:ct,requiredAccess:cn,url:Fr};return re.push(Uc(jc(he,Le),yn=>_(ug,{definition:zr,children:_(wFe,{pluginId:he,canvasName:Le,mode:Pe,resource:Et,events:Gr,uiHints:h,viewAccess:w})}))),zr})}):[],Ln=Z.concat(ve).flatMap(V=>gQ(V.schema).map(ye=>({view:V.name,label:ye[2],field:ye[0],aggregate:ye[1]}))),Xn=Z.concat(ve).flatMap(V=>eY(V.schema,k(h,ye=>Qa(ye,V.name))).map(ye=>({view:V.name,field:ye,aggregate:"sum"}))),ns=D(k(h,V=>V.dashboard),[]),Ho=ns.map(V=>[V.view,D(V.field,"")]),ki=(V,ye)=>!V.some(Pe=>Pe[0]===ye.view?Pe[1]===D(ye.field,""):!1),Ci=Ln.filter(V=>ki(Ho,V)),Ki=Ho.concat(Ci.map(V=>[V.view,D(V.field,"")])),Se=ns.concat(Ci).concat(Xn.filter(V=>ki(Ki,V))),Fe;if(Se.length!==0&&K("dashboard")){let V="Dashboard",ye=Z.concat(ve),Pe=N.id+".dashboard",ut=Vf(N.name,V,-100,void 0,void 0),ft=F3(w,nt(Se.map(Me=>Me.view),[],(Me,Ie)=>Me.includes(Ie)?Me:Me.concat([Ie])).filter(Me=>ye.some(Ie=>Ie.name===Me))),It=vs(ul(he,V)),at={fragmentId:Pe,title:V,menuEntry:ut,requiredAccess:ft,url:It};re.push(Uc(jc(he,V),Me=>_(ug,{definition:at,children:_(b3e,{pluginId:he,metrics:Se,readModels:ye,uiHints:h,viewAccess:w})}))),Fe=[at]}else Fe=[];let Lr=tU(Z.concat(ve)),Jt;if(Lr.length!==0&&K("lifecycles")){let V="Lifecycles",ye=N.id+".lifecycles",Pe=Vf(N.name,V,-50,void 0,void 0),ut=vs(ul(he,V)),ft={fragmentId:ye,title:V,menuEntry:Pe,requiredAccess:void 0,url:ut};re.push(Uc(jc(he,V),It=>_(HDe,{views:Lr,uiHints:h}))),Jt=[ft]}else Jt=[];return{pages:Fe.concat(Jt.concat(qt.concat(wi.concat(Ft.concat(Ei))))),panels:Yn,routes:re,publicLinks:se}}function ew(e){return R5(c2(e))}function AF(e){return lde(c2(e))}let TF=new Map;function XFe(e,t){let r=TF.get(e);if(!(r!==void 0?r===t:!1)){rO.registerRemotes([{name:e,entry:t}]),TF.set(e,t);return}}async function ZFe(e,t,r){XFe(e,r);try{let n=await rO.loadRemote(e+"/"+t);return n==null?{TAG:"Error",_0:"Module Federation returned null for "+e+"/"+t+" — the plugin's vite federation config probably doesn't expose this fragment."}:{TAG:"Ok",_0:n.default}}catch(n){let i=Ns(n);if(i.RE_EXN_ID!==Dv)return{TAG:"Error",_0:"Failed to load "+e+"/"+t+" from "+r};let o=D(i._1.message,"unknown error");return{TAG:"Error",_0:"Failed to load "+e+"/"+t+" from "+r+": "+o}}}const eIe=Zt(null),n1={didCatch:!1,error:null};class tIe extends Zq{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=n1}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var r,n,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];(r=(n=this.props).onReset)===null||r===void 0||r.call(n,{args:o,reason:"imperative-api"}),this.setState(n1)}}componentDidCatch(t,r){var n,i;(n=(i=this.props).onError)===null||n===void 0||n.call(i,t,r)}componentDidUpdate(t,r){const{didCatch:n}=this.state,{resetKeys:i}=this.props;if(n&&r.error!==null&&rIe(t.resetKeys,i)){var o,a;(o=(a=this.props).onReset)===null||o===void 0||o.call(a,{next:i,prev:t.resetKeys,reason:"keys"}),this.setState(n1)}}render(){const{children:t,fallbackRender:r,FallbackComponent:n,fallback:i}=this.props,{didCatch:o,error:a}=this.state;let s=t;if(o){const l={error:a,resetErrorBoundary:this.resetErrorBoundary};if(typeof r=="function")s=r(l);else if(n)s=ur(n,l);else if(i!==void 0)s=i;else throw a}return ur(eIe.Provider,{value:{didCatch:o,error:a,resetErrorBoundary:this.resetErrorBoundary}},s)}}function rIe(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==t.length||e.some((r,n)=>!Object.is(r,t[n]))}function nIe(e){let t=D(e.error.message,"unknown error");return _("div",{children:"Plugin fragment crashed: "+t,style:{color:"#a00",fontFamily:"system-ui",padding:"1rem"}})}function iIe(e,t){console.error("Fragment crashed:",e)}function oIe(e){let t=e.fallbackComponent;return ur(tIe,{FallbackComponent:t!==void 0?t:nIe,onError:iIe,children:e.children})}let aIe=oIe;function sIe(e){let t=e.remoteEntryUrl,r=e.fragmentId,n=e.pluginId,i=ce(()=>"Loading"),o=i[1],a=i[0];return Ae(()=>{o(l=>"Loading");let s={contents:!1};return ZFe(n,r,t).then(l=>{if(s.contents)return;if(l.TAG==="Ok"){let d=l._0;return o(f=>({TAG:"Loaded",_0:d}))}let c=l._0;o(d=>({TAG:"Failed",_0:c}))}),()=>{s.contents=!0}},[n,r,t]),typeof a!="object"?_("div",{children:"Loading panel…",style:{fontFamily:"system-ui",padding:"0.75rem"}}):a.TAG==="Loaded"?_(aIe,{children:ur(a._0,e.panelProps)}):_("div",{children:"Panel error: "+a._0,style:{color:"#a00",padding:"0.75rem"}})}let lIe=sIe;function Ti(e){return e===null?"null":Array.isArray(e)?"array":typeof e}function du(e){return Ti(e)==="object"}function uIe(e){return Array.isArray(e)&&e.length>0&&e.every(t=>"message"in t)}function $F(e,t){return e.length<124?e:t}const cIe="graphql-transport-ws";var Ji;(function(e){e[e.InternalServerError=4500]="InternalServerError",e[e.InternalClientError=4005]="InternalClientError",e[e.BadRequest=4400]="BadRequest",e[e.BadResponse=4004]="BadResponse",e[e.Unauthorized=4401]="Unauthorized",e[e.Forbidden=4403]="Forbidden",e[e.SubprotocolNotAcceptable=4406]="SubprotocolNotAcceptable",e[e.ConnectionInitialisationTimeout=4408]="ConnectionInitialisationTimeout",e[e.ConnectionAcknowledgementTimeout=4504]="ConnectionAcknowledgementTimeout",e[e.SubscriberAlreadyExists=4409]="SubscriberAlreadyExists",e[e.TooManyInitialisationRequests=4429]="TooManyInitialisationRequests"})(Ji||(Ji={}));var Qr;(function(e){e.ConnectionInit="connection_init",e.ConnectionAck="connection_ack",e.Ping="ping",e.Pong="pong",e.Subscribe="subscribe",e.Next="next",e.Error="error",e.Complete="complete"})(Qr||(Qr={}));function gU(e){if(!du(e))throw new Error(`Message is expected to be an object, but got ${Ti(e)}`);if(!e.type)throw new Error("Message is missing the 'type' property");if(typeof e.type!="string")throw new Error(`Message is expects the 'type' property to be a string, but got ${Ti(e.type)}`);switch(e.type){case Qr.ConnectionInit:case Qr.ConnectionAck:case Qr.Ping:case Qr.Pong:{if(e.payload!=null&&!du(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object or nullish or missing, but got "${e.payload}"`);break}case Qr.Subscribe:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${Ti(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!du(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${Ti(e.payload)}`);if(typeof e.payload.query!="string")throw new Error(`"${e.type}" message payload expects the 'query' property to be a string, but got ${Ti(e.payload.query)}`);if(e.payload.variables!=null&&!du(e.payload.variables))throw new Error(`"${e.type}" message payload expects the 'variables' property to be a an object or nullish or missing, but got ${Ti(e.payload.variables)}`);if(e.payload.operationName!=null&&Ti(e.payload.operationName)!=="string")throw new Error(`"${e.type}" message payload expects the 'operationName' property to be a string or nullish or missing, but got ${Ti(e.payload.operationName)}`);if(e.payload.extensions!=null&&!du(e.payload.extensions))throw new Error(`"${e.type}" message payload expects the 'extensions' property to be a an object or nullish or missing, but got ${Ti(e.payload.extensions)}`);break}case Qr.Next:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${Ti(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!du(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${Ti(e.payload)}`);break}case Qr.Error:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${Ti(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!uIe(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an array of GraphQL errors, but got ${JSON.stringify(e.payload)}`);break}case Qr.Complete:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${Ti(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);break}default:throw new Error(`Invalid message 'type' property "${e.type}"`)}return e}function dIe(e,t){return gU(typeof e=="string"?JSON.parse(e,t):e)}function Hf(e,t){return gU(e),JSON.stringify(e,t)}var xd=function(e){return this instanceof xd?(this.v=e,this):new xd(e)},fIe=function(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),i,o=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",a),i[Symbol.asyncIterator]=function(){return this},i;function a(p){return function(m){return Promise.resolve(m).then(p,f)}}function s(p,m){n[p]&&(i[p]=function(g){return new Promise(function(v,b){o.push([p,g,v,b])>1||l(p,g)})},m&&(i[p]=m(i[p])))}function l(p,m){try{c(n[p](m))}catch(g){h(o[0][3],g)}}function c(p){p.value instanceof xd?Promise.resolve(p.value.v).then(d,f):h(o[0][2],p)}function d(p){l("next",p)}function f(p){l("throw",p)}function h(p,m){p(m),o.shift(),o.length&&l(o[0][0],o[0][1])}};function hIe(e){const{url:t,connectionParams:r,lazy:n=!0,onNonLazyError:i=console.error,lazyCloseTimeout:o=0,keepAlive:a=0,disablePong:s,connectionAckWaitTimeout:l=0,retryAttempts:c=5,retryWait:d=async function(te){let J=1e3;for(let re=0;re<te;re++)J*=2;await new Promise(re=>setTimeout(re,J+Math.floor(Math.random()*2700+300)))},shouldRetry:f=i1,isFatalConnectionProblem:h,on:p,webSocketImpl:m,generateID:g=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,te=>{const J=Math.random()*16|0;return(te=="x"?J:J&3|8).toString(16)})},jsonMessageReplacer:v,jsonMessageReviver:b}=e;let y;if(m){if(!mIe(m))throw new Error("Invalid WebSocket implementation provided");y=m}else typeof WebSocket<"u"?y=WebSocket:typeof global<"u"?y=global.WebSocket||global.MozWebSocket:typeof window<"u"&&(y=window.WebSocket||window.MozWebSocket);if(!y)throw new Error("WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`");const S=y,w=(()=>{const W=(()=>{const J={};return{on(re,se){return J[re]=se,()=>{delete J[re]}},emit(re){var se;"id"in re&&((se=J[re.id])===null||se===void 0||se.call(J,re))}}})(),te={connecting:p?.connecting?[p.connecting]:[],opened:p?.opened?[p.opened]:[],connected:p?.connected?[p.connected]:[],ping:p?.ping?[p.ping]:[],pong:p?.pong?[p.pong]:[],message:p?.message?[W.emit,p.message]:[W.emit],closed:p?.closed?[p.closed]:[],error:p?.error?[p.error]:[]};return{onMessage:W.on,on(J,re){const se=te[J];return se.push(re),()=>{se.splice(se.indexOf(re),1)}},emit(J,...re){for(const se of[...te[J]])se(...re)}}})();function C(W){const te=[w.on("error",J=>{te.forEach(re=>re()),W(J)}),w.on("closed",J=>{te.forEach(re=>re()),W(J)})]}let A,$=0,R,N=!1,I=0,M=!1;async function P(){clearTimeout(R);const[W,te]=await(A??(A=new Promise((se,he)=>(async()=>{if(N){if(await d(I),!$)return A=void 0,he({code:1e3,reason:"All Subscriptions Gone"});I++}w.emit("connecting",N);const K=new S(typeof t=="function"?await t():t,cIe);let ie,le;function Z(){isFinite(a)&&a>0&&(clearTimeout(le),le=setTimeout(()=>{K.readyState===S.OPEN&&(K.send(Hf({type:Qr.Ping})),w.emit("ping",!1,void 0))},a))}C(pe=>{A=void 0,clearTimeout(ie),clearTimeout(le),he(pe),pe instanceof NF&&(K.close(4499,"Terminated"),K.onerror=null,K.onclose=null)}),K.onerror=pe=>w.emit("error",pe),K.onclose=pe=>w.emit("closed",pe),K.onopen=async()=>{try{w.emit("opened",K);const pe=typeof r=="function"?await r():r;if(K.readyState!==S.OPEN)return;K.send(Hf(pe?{type:Qr.ConnectionInit,payload:pe}:{type:Qr.ConnectionInit},v)),isFinite(l)&&l>0&&(ie=setTimeout(()=>{K.close(Ji.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")},l)),Z()}catch(pe){w.emit("error",pe),K.close(Ji.InternalClientError,$F(pe instanceof Error?pe.message:new Error(pe).message,"Internal client error"))}};let ve=!1;K.onmessage=({data:pe})=>{try{const be=dIe(pe,b);if(w.emit("message",be),be.type==="ping"||be.type==="pong"){w.emit(be.type,!0,be.payload),be.type==="pong"?Z():s||(K.send(Hf(be.payload?{type:Qr.Pong,payload:be.payload}:{type:Qr.Pong})),w.emit("pong",!1,be.payload));return}if(ve)return;if(be.type!==Qr.ConnectionAck)throw new Error(`First message cannot be of type ${be.type}`);clearTimeout(ie),ve=!0,w.emit("connected",K,be.payload,N),N=!1,I=0,se([K,new Promise((Ge,zt)=>C(zt))])}catch(be){K.onmessage=null,w.emit("error",be),K.close(Ji.BadResponse,$F(be instanceof Error?be.message:new Error(be).message,"Bad response"))}}})())));W.readyState===S.CLOSING&&await te;let J=()=>{};const re=new Promise(se=>J=se);return[W,J,Promise.race([re.then(()=>{if(!$){const se=()=>W.close(1e3,"Normal Closure");isFinite(o)&&o>0?R=setTimeout(()=>{W.readyState===S.OPEN&&se()},o):se()}}),te])]}function B(W){if(i1(W)&&(pIe(W.code)||[Ji.InternalServerError,Ji.InternalClientError,Ji.BadRequest,Ji.BadResponse,Ji.Unauthorized,Ji.SubprotocolNotAcceptable,Ji.SubscriberAlreadyExists,Ji.TooManyInitialisationRequests].includes(W.code)))throw W;if(M)return!1;if(i1(W)&&W.code===1e3)return $>0;if(!c||I>=c||!f(W)||h?.(W))throw W;return N=!0}n||(async()=>{for($++;;)try{const[,,W]=await P();await W}catch(W){try{if(!B(W))return}catch(te){return i?.(te)}}})();function j(W,te){const J=g(W);let re=!1,se=!1,he=()=>{$--,re=!0};return(async()=>{for($++;;)try{const[K,ie,le]=await P();if(re)return ie();const Z=w.onMessage(J,ve=>{switch(ve.type){case Qr.Next:{te.next(ve.payload);return}case Qr.Error:{se=!0,re=!0,te.error(ve.payload),he();return}case Qr.Complete:{re=!0,he();return}}});K.send(Hf({id:J,type:Qr.Subscribe,payload:W},v)),he=()=>{!re&&K.readyState===S.OPEN&&K.send(Hf({id:J,type:Qr.Complete},v)),$--,re=!0,ie()},await le.finally(Z);return}catch(K){if(!B(K))return}})().then(()=>{se||te.complete()}).catch(K=>{te.error(K)}),()=>{re||he()}}return{on:w.on,subscribe:j,iterate(W){const te=[],J={done:!1,error:null,resolve:()=>{}},re=j(W,{next(he){te.push(he),J.resolve()},error(he){J.done=!0,J.error=he,J.resolve()},complete(){J.done=!0,J.resolve()}}),se=(function(){return fIe(this,arguments,function*(){for(;;){for(te.length||(yield xd(new Promise(ie=>J.resolve=ie)));te.length;)yield yield xd(te.shift());if(J.error)throw J.error;if(J.done)return yield xd(void 0)}})})();return se.throw=async he=>(J.done||(J.done=!0,J.error=he,J.resolve()),{done:!0,value:void 0}),se.return=async()=>(re(),{done:!0,value:void 0}),se},async dispose(){if(M=!0,A){const[W]=await A;W.close(1e3,"Normal Closure")}},terminate(){A&&w.emit("closed",new NF)}}}class NF extends Error{constructor(){super(...arguments),this.name="TerminatedCloseEvent",this.message="4499: Terminated",this.code=4499,this.reason="Terminated",this.wasClean=!1}}function i1(e){return du(e)&&"code"in e&&"reason"in e}function pIe(e){return[1e3,1001,1006,1005,1012,1013,1014].includes(e)?!1:e>=1e3&&e<=1999}function mIe(e){return typeof e=="function"&&"constructor"in e&&"CLOSED"in e&&"CLOSING"in e&&"CONNECTING"in e&&"OPEN"in e}function gIe(e,t){let r=t!==void 0?{Authorization:"Bearer "+t}:void 0;return hIe({url:e,connectionParams:r,lazy:!0,retryAttempts:5})}function Sp(e,t){return k(e[t],me.string)}function na(e,t){return D(Sp(e,t),"")}function vIe(e,t){return q(k(e[t],me.float),r=>r|0)}function bIe(e,t){return Q(D(k(e[t],me.array),[]),me.string)}function _Ie(e){let t=me.object(e);return t!==void 0?{label:na(t,"label"),icon:Sp(t,"icon"),group:Sp(t,"group"),sortOrder:D(vIe(t,"sortOrder"),0)}:{label:"",icon:void 0,group:void 0,sortOrder:0}}function yIe(e){return q(me.object(e),t=>({fragmentId:na(t,"fragmentId"),title:na(t,"title"),description:na(t,"description"),positions:bIe(t,"positions"),requiredAccess:Sp(t,"requiredAccess")}))}function xIe(e){return q(me.object(e),t=>({fragmentId:na(t,"fragmentId"),title:na(t,"title"),menuEntry:D(q(t.menuEntry,_Ie),{label:na(t,"title"),icon:void 0,group:void 0,sortOrder:0}),requiredAccess:Sp(t,"requiredAccess")}))}function SIe(e){return q(me.object(e),t=>({pluginId:na(t,"pluginId"),remoteEntryUrl:na(t,"remoteEntryUrl"),panels:Q(D(k(t.panels,me.array),[]),yIe),pages:Q(D(k(t.pages,me.array),[]),xIe),registeredAt:na(t,"registeredAt"),updatedAt:na(t,"updatedAt")}))}function wIe(e){return Q(D(k(k(k(k(me.object(e),t=>t.data),me.object),t=>t.Platform_UIFragments),me.array),[]),SIe)}let EIe=`{
|
|
96
|
+
Platform_UIFragments {
|
|
97
|
+
pluginId
|
|
98
|
+
remoteEntryUrl
|
|
99
|
+
panels { fragmentId title description positions requiredAccess }
|
|
100
|
+
pages {
|
|
101
|
+
fragmentId
|
|
102
|
+
title
|
|
103
|
+
menuEntry { label icon group sortOrder }
|
|
104
|
+
requiredAccess
|
|
105
|
+
}
|
|
106
|
+
registeredAt
|
|
107
|
+
updatedAt
|
|
108
|
+
}
|
|
109
|
+
}`,DF=["message","body","text","title","content"],vU=["userId","recipientId","recipient","user","targetUserId"],kIe=["createdAt","sentAt","notifiedAt","at","timestamp"],CIe=["read","isRead","seen","acknowledged"];function gC(e,t){return t.some(r=>r.toLowerCase()===e.toLowerCase())}function bU(e){return Q(Nr(e),t=>{if(Mp(t[1]))return t[0]})}function _U(e,t){return bU(e).find(r=>gC(r,t))}function RIe(e){let t=_U(e,vU);if(t!==void 0)return t;let r=bn(e,void 0,void 0);return Nr(e).map(n=>n[0]).find(n=>ne(F(r.semantics,n),!1,i=>i.semantic==="UserRef"))}function AIe(e){return Q(Nr(e),t=>{if(Qv(t[1]))return t[0]}).find(t=>gC(t,kIe))}function TIe(e){return Q(Nr(e),t=>{if(Re(BQ(t[1]),"boolean"))return t[0]}).find(t=>gC(t,CIe))}function $Ie(e,t){return Q(bU(e),r=>{let n=r.toLowerCase();if(!(r===t||n==="id"||!n.endsWith("id")))return{field:r,stem:r.slice(0,r.length-2|0)}})}function NIe(e){return ne(k(G(e),t=>F(t,"x-reventless-notifications")),!1,t=>{let r=Xe(t);return typeof r!="object"?r==="JSONTrue":r.TAG==="JSONString"})}let DIe=["markread","marknotificationread","readnotification","acknowledge","dismiss","markseen"];function FIe(e,t){let r=Q(e.linkedWriteSide,n=>t.aggregates.find(i=>i.name===n)).map(n=>n.commands).flat();return e.commands.concat(r).find(n=>DIe.some(i=>n.name.toLowerCase().startsWith(i)))}let FF={contents:[]};function IF(e,t,r){if(!FF.contents.includes(e)){FF.contents.push(e),console.error('[AutoUI] Read model "'+e+'" announces itself as notifications but has no '+t+" field — no notification bell is wired. The convention expects a string field named "+r.join(" | ")+"; see docs/guides/notifications-read-model-convention.md.");return}}function IIe(e){return Q(e.readModels.filter(t=>NIe(t.schema)?!0:t.name.toLowerCase().endsWith("notifications")),t=>{let r=_U(t.schema,DF),n=RIe(t.schema);if(r!==void 0){if(n!==void 0)return{readModel:t,messageField:r,recipientField:n,timestampField:AIe(t.schema),readField:TIe(t.schema),refFields:$Ie(t.schema,n),markReadCommand:FIe(t,e)};IF(t.name,"recipient",vU);return}else{IF(t.name,"message",DF);return}})[0]}function rd(e,t){return k(F(e,t),oe)}function PIe(e,t,r){let n=rd(e,t.recipientField);return n!==void 0&&r!==void 0&&n!==r.userId?n===r.username:!0}function kv(e,t){return k(k(t.timestampField,r=>rd(e,r)),Qn)}function OIe(e,t,r){let n=t.readField;if(n!==void 0){let o=q(F(e,n),Xe);return o==="JSONTrue"&&typeof o!="object"}let i=kv(e,t);return i!==void 0?r!==void 0?i<=r:!1:!0}function MIe(e,t,r,n){return Q(t,i=>{let o=D(G(i),{});if(PIe(o,e,r))return o}).toSorted((i,o)=>{let a=kv(i,e),s=kv(o,e);return a!==void 0?s!==void 0?s-a:-1:s!==void 0?1:0}).map((i,o)=>({id:D(rd(i,"id"),"#"+o.toString()),message:D(rd(i,e.messageField),""),timestamp:k(e.timestampField,a=>rd(i,a)),read:OIe(i,e,n),refs:Q(e.refFields,a=>q(rd(i,a.field),s=>[a.stem,s]))}))}function LIe(e,t){return nt(t,void 0,(r,n)=>{let i=D(G(n),{}),o=kv(i,e);return r!==void 0?o!==void 0?Math.max(r,o):r:o})}function zIe(e,t){let r=D(k(e.markReadCommand,n=>n.aggregateIdField),"id");return Oe([[r,t]])}let yU=Zt([]),xU=Zt(e=>{}),UIe=yU.Provider,BIe=xU.Provider;function jIe(e){let t=e.initial,r=t!==void 0?t:[],n=ce(()=>r),i=n[1],o=$r(a=>i(s=>a),[]);return ur(BIe,{value:o,children:ur(UIe,{value:n[0],children:e.children})})}let qIe={make:jIe};function VIe(){return St(yU)}function GIe(){return St(xU)}function tw(e,t){return e+"/"+t}function KIe(e){let t=new Map;return e.forEach(r=>{let n=r.remoteEntryUrl;if(n.length>0){r.pages.forEach(i=>{t.set(tw(r.pluginId,i.fragmentId),n)}),r.panels.forEach(i=>{t.set(tw(r.pluginId,i.fragmentId),n)});return}}),t}function HIe(e,t,r){return e.get(tw(t,r))}function WIe(e,t,r){return e.map(n=>{let i=HIe(r,t,n.fragmentId);return i!==void 0?{fragmentId:n.fragmentId,title:n.title,description:n.description,extensionPackage:n.extensionPackage,positions:n.positions,component:o=>_(lIe,{pluginId:t,fragmentId:n.fragmentId,remoteEntryUrl:i,panelProps:o}),requiredAccess:n.requiredAccess,minWidth:n.minWidth}:n})}function PF(e,t){let r=t+".",n=e.startsWith(r)?e.slice(r.length):e;return D(q([".list",".detail"].find(o=>n.endsWith(o)),o=>n.slice(0,n.length-o.length|0)),n)}function JIe(e,t){let r=t.find(n=>n.pluginId===e?n.remoteEntryUrl.length>0:!1);return r!==void 0?[r.pages.map(n=>PF(n.fragmentId,e)),r.panels.map(n=>PF(n.fragmentId,e))]:[[],[]]}let SU={contents:[]};function OF(e,t,r){let n=Object.fromEntries([["content-type","application/json"]]);return r!==void 0&&(n.Authorization="Bearer "+r),Lt(fetch(e,{method:"POST",headers:n,body:D(JSON.stringify({query:t}),"")}).then(i=>i.json()),i=>Promise.resolve(null))}function wU(e,t,r,n,i,o,a){let s=KIe(t),l=rce(i,n,e),c=l[2],d=l[1],f=Mce(o,a,l[0]),h;h=typeof o!="object"?o!=="Unknown":!1;let p=GFe.buildRegistry(f),m=Q(f,S=>q(IIe(S),w=>({pluginId:S.id,binding:w}))),g=[],v=[],b=[],y={contents:Pu()};return f.forEach(S=>{let w=JIe(S.id,t),C=YFe(S,void 0,void 0,void 0,f,e,w[0],w[1],void 0,d,c,h,r[S.id],void 0),A=WIe(C.panels,S.id,s);C.pages.forEach($=>{g.push($)}),A.forEach($=>{v.push($)}),C.routes.forEach($=>{b.push($)}),y.contents=dx(y.contents,C.publicLinks)}),t.forEach(S=>{}),{pages:g,panels:v,routes:b,publicLinks:y.contents,entities:p,notificationBindings:m}}function QIe(e,t,r,n,i,o,a,s,l,c,d,f){let h=wU(o,a,s,l,c,d,f);n(h.entities),i(h.notificationBindings),ee(e,p=>p.setPluginPages(h.pages)),SU.contents=Q(h.pages,p=>p.url),ee(t,p=>p.setPluginPanels(h.panels)),ee(r,p=>p.setPluginRoutes(h.routes,h.publicLinks))}let Cv="Admin";function YIe(e,t){return e?!1:t.includes(Cv)}function XIe(e){return e!==void 0?"You are acting as "+e+", and this deployment has no surfaces configured for that role. Its pages are discovered from an admin-only query, which only the "+Cv+" group can reach.":"This deployment has no surfaces configured for your roles. Its pages are discovered from an admin-only query, which only the "+Cv+" group can reach."}function ZIe(e,t){return Wn(k(t,r=>e.journeyManifestUrls[r]),e.manifestUrl)}function EU(e,t,r,n){if(e.manifestUrl!==void 0&&(typeof t!="object"||!r.includes(Cv)))return ZIe(e,n)}function rw(e,t){return t==="/"?!0:e.some(r=>t===r?!0:t.startsWith(r+"/"))}function ePe(){return"/"+Ov(gV(void 0).path).join("/")}function tPe(e){if(!lbe())return;let t=SU.contents,r=i=>rw(t,i);if(rw(t,ePe()))return;let n=mi(k(q(e.home,i=>i.trim()),i=>{if(i!=="")return i}),r);ua(D(Wn(n,t[0]),"/"))}function rPe(e){return e.TAG==="ManifestUnreadable"?"Component manifest could not be loaded":"Nothing here for the role you are acting as"}function MF(e,t,r,n,i,o,a,s,l,c,d,f,h,p){let m=(y,S)=>QIe(n,i,o,a,s,y,S,l,c,e.deniedSurfaces,d,f),g=EU(e,d,h,p);if(g!==void 0)return k5(g).then(y=>{if(y.TAG!=="Ok")return{TAG:"ManifestUnreadable",_0:y._0};m(y._0,[])});let v=OF(e.platformApiEndpoint,Jce,t),b=OF(e.platformApiEndpoint,EIe,t);return Promise.all([v,b]).then(y=>{let S=y[1],w=y[0],C=AF(w)||AF(S),A=C||ew(w)||ew(S);if(m(Hce(w),wIe(S)),A)if(YIe(C,h)){r();return}else return{TAG:"NoSurfacesForCaller",_0:XIe(p)}})}let nPe=`subscription OnPluginStatusChange {
|
|
110
|
+
onPluginStatusChange { pluginId status }
|
|
111
|
+
}`,iPe=`subscription OnUIFragmentChange {
|
|
112
|
+
onUIFragmentChange { pluginId changeKind }
|
|
113
|
+
}`;function oPe(e,t,r,n){return ir(EU(e,t,r,n))}function aPe(e){return L("div",{children:[_("strong",{children:e.title}),_("p",{children:e.message,style:{margin:"0.5rem 0 0",whiteSpace:"pre-wrap"}})],role:"alert",style:{background:"var("+x.surfaceSubtle+")",border:"1px solid var("+x.borderSubtle+")",color:"var("+x.error+")",margin:"1rem",padding:"1rem 1.25rem",borderRadius:"0.375rem"}})}function sPe(e){let t=e.uiHints,r=e.config,n=t!==void 0?t:{},i=St(im),o=St(om),a=Rk(),s=oY(),l=GIe(),c=xa(),d=k(c,S=>S.getToken()),f=ne(k(c,S=>S.identity),[],S=>S.groups),h=k(k(c,S=>S.identity),S=>S.activeRole),p=f.concat(r.accessTiers),m=S5(r.elevatedGroups,f),g=ne(k(c,S=>S.identity),"",S=>S.userId),v=ce(()=>{}),b=v[1],y=v[0];return Ae(()=>{MF(r,d,()=>ee(c,S=>S.logout()),i,o,a,s,l,n,p,m,g,f,h).then(S=>{ee(S,w=>{console.error("[Shell] "+w._0)}),b(w=>S),tPe(r)})},[d,n]),Ae(()=>{if(oPe(r,m,f,h))try{let S=gIe(r.platformApiSubscriptionEndpoint,d),w=()=>{MF(r,d,()=>ee(c,$=>$.logout()),i,o,a,s,l,n,p,m,g,f,h)},C=S.subscribe({query:nPe,variables:void 0},{next:$=>w(),error:$=>{},complete:()=>{}}),A=S.subscribe({query:iPe,variables:void 0},{next:$=>w(),error:$=>{},complete:()=>{}});return()=>{C(),A(),S.dispose()}}catch{return}},[d]),y!==void 0?_(aPe,{message:y._0,title:rPe(y)}):null}let lPe=sPe;function uPe(e,t,r){return Q(t,n=>{if(!Re(n,r))return q(e[n],i=>[n,i])})}async function cPe(e,t,r,n,i,o){let a=[],s=uPe(e.journeyManifestUrls,t,r);return(await Promise.all(s.map(c=>{let d=c[0];return k5(c[1]).then(f=>[d,f])}))).forEach(c=>{let d=c[1],f=c[0];if(d.TAG!=="Ok")return;let h=wU(d._0,[],i,[f].concat(e.accessTiers),e.deniedSurfaces,S5(e.elevatedGroups,[f]),o),p=Q(h.pages,m=>m.url);if(rw(p,n)){a.push(f);return}}),a}let dPe={display:"flex",padding:"2rem",alignItems:"flex-start",flexDirection:"column",gap:"var("+O.sm+")"},fPe={fontSize:"var("+T.sizeLg+")",fontWeight:"var("+T.weightMedium+")",margin:"0"},hPe={color:"var("+x.textSecondary+")",margin:"0"},pPe={background:"var("+x.surface+")",border:"1px solid var("+x.borderSubtle+")",color:"var("+x.textPrimary+")",cursor:"pointer",padding:"0.4rem 0.9rem",borderRadius:"0.375rem"},mPe={color:"var("+x.error+")",margin:"0"};function gPe(e){let t=e.uiHints,r=e.config,n=xa(),i=aO(),o=k(n,w=>w.identity),a=ne(n,!1,w=>w.canSwitchRoles),s=ne(o,[],w=>Ez(a,w)),l=k(o,w=>w.activeRole),c=ne(o,"",w=>w.userId),d=ce(()=>[]),f=d[1],h=d[0],p=ce(()=>!1),m=p[1],g=p[0],v=ce(()=>{}),b=v[1],y=v[0];Ae(()=>{let w={contents:!0};return cPe(r,s,l,i,t,c).then(C=>{if(w.contents)return f(A=>C)}),()=>{w.contents=!1}},[i,s.join(",")]);let S;if(h.length!==0){let w;h.length!==1?w="This page is part of another role you hold: "+h.join(", ")+".":w="This page is part of your "+h[0]+" role.",S=L(Bt,{children:[_("p",{children:w,style:hPe}),h.map(C=>_("button",{children:"Act as "+C,style:pPe,disabled:g,onClick:A=>ee(n,$=>{m(R=>!0),b(R=>{}),$.switchRole(C).then(R=>{if(m(I=>!1),typeof R!="object")return;let N=R._0;b(I=>N)})})},C)),y!==void 0?_("p",{children:y,style:mPe}):null]})}else S=null;return L("div",{children:[_("h1",{children:"404 — Page not found",style:fPe}),S],style:dPe})}let vPe=gPe;function Kt(e){return"var("+e+")"}let bPe=E([$t("relative"),z("inlineBlock")]),_Pe=E([$t("relative"),z("inlineFlex"),X("center"),Ze("center"),u("background","none"),u("border","none"),u("border-radius",Kt(Y.md)),u("cursor","pointer"),u("color",Kt(x.textSecondary)),u("padding","6px"),Ue([u("background",Kt(x.surfaceSubtle)),u("color",Kt(x.textPrimary))])]),yPe=E([$t("absolute"),Bo(ke(0)),Bs(ke(0)),z("inlineFlex"),X("center"),Ze("center"),u("min-width","16px"),u("height","16px"),u("padding","0 4px"),u("border-radius",Kt(Y.full)),u("background",Kt(x.brand)),u("color",Kt(x.textOnBrand)),u("font-family",Kt(T.fontFamily)),u("font-size","10px"),u("font-weight",Kt(T.weightBold)),u("line-height","1")]),xPe=E([$t("absolute"),Bs(ke(0)),Bo({NAME:"percent",VAL:100}),Uo(ke(4)),u("width","320px"),u("background",Kt(x.surfaceElevated)),u("border","1px solid var("+x.border+")"),u("border-radius",Kt(Y.md)),u("box-shadow",Kt(Zr.md)),u("z-index","200"),u("overflow","hidden"),u("font-family",Kt(T.fontFamily))]),SPe=E([z("flex"),X("center"),Ze("spaceBetween"),u("padding","var("+O.sm+") var("+O.md+")"),u("border-bottom","1px solid var("+x.borderSubtle+")"),u("color",Kt(x.textSecondary)),u("font-size",Kt(T.sizeSm)),u("font-weight",Kt(T.weightMedium)),u("text-transform","uppercase"),u("letter-spacing","0.04em")]),wPe=E([u("background","none"),u("border","none"),u("color",Kt(x.brand)),u("font-size",Kt(T.sizeXs)),u("text-transform","none"),u("letter-spacing","0"),Ce("pointer"),Ue([u("text-decoration","underline")])]),EPe=E([u("max-height","360px"),u("overflow-y","auto")]);function kPe(e){return E([z("flex"),X("flexStart"),u("gap",Kt(O.sm)),u("width","100%"),u("background","none"),u("border","none"),u("border-bottom","1px solid var("+x.borderSubtle+")"),u("text-align","left"),u("padding","var("+O.sm+") var("+O.md+")"),Ce(e?"pointer":"default"),Ue(e?[u("background",Kt(x.surfaceSubtle))]:[])])}function CPe(e){return E([u("width","8px"),u("height","8px"),u("border-radius",Kt(Y.full)),u("margin-top","5px"),u("flex-shrink","0"),u("background",e?"transparent":Kt(x.brand))])}let RPe=E([z("flex"),_e("column"),u("gap","2px"),u("min-width","0")]);function APe(e){return E([u("color",Kt(x.textPrimary)),u("font-size",Kt(T.sizeSm)),u("font-weight",Kt(e?T.weightNormal:T.weightMedium)),u("line-height",Kt(T.lineHeightNormal)),u("word-break","break-word")])}let TPe=E([u("color",Kt(x.textDisabled)),u("font-size",Kt(T.sizeXs))]),$Pe=E([u("color",Kt(x.textDisabled)),u("font-size",Kt(T.sizeSm)),u("padding",Kt(O.md)),u("text-align","center")]);function NPe(e){return L("svg",{children:[_("path",{d:"M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"}),_("path",{d:"M13.73 21a2 2 0 0 1-3.46 0"})],"aria-hidden":!0,height:"18",width:"18",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24"})}function DPe(e){let t=e.defaultOpen,r=e.nowMs,n=e.emptyLabel,i=e.onPanelOpen,o=e.onMarkAllRead,a=e.onOpen,s=e.notifications,l=n!==void 0?n:"No notifications",c=t!==void 0?t:!1,d=r!==void 0?r:Date.now(),f=ce(()=>c),h=f[1],p=f[0],m=s.filter(v=>!v.read).length;Ae(()=>{if(!p)return;let v=y=>h(S=>!1),b=y=>{if(y.key==="Escape")return h(S=>!1)};return document.addEventListener("click",v),document.addEventListener("keydown",b),()=>{document.removeEventListener("click",v),document.removeEventListener("keydown",b)}},[p]);let g=()=>{let v=!p;v&&ee(i,b=>b()),h(b=>v)};return L("div",{children:[L("button",{children:[_(NPe,{}),m>0?_("span",{children:m>99?"99+":m.toString(),className:yPe}):null],"aria-label":m>0?"Notifications ("+m.toString()+" unread)":"Notifications",className:_Pe,title:"Notifications",type:"button",onClick:v=>{v.stopPropagation(),g()}}),p?L("div",{children:[L("div",{children:["Notifications",o!==void 0&&m>0?_("button",{children:"Mark all read",className:wPe,type:"button",onClick:v=>o()}):null],className:SPe}),s.length===0?_("div",{children:l,className:$Pe}):_("div",{children:s.map(v=>{let b=v.timestamp;return L("button",{children:[_("span",{className:CPe(v.read)}),L("span",{children:[_("span",{children:v.message,className:APe(v.read)}),b!==void 0?_("span",{children:Ib(d,b),className:TPe}):null],className:RPe})],className:kPe(Ee(a)),type:"button",onClick:y=>{ee(a,S=>S(v)),h(S=>!1)}},v.id)}),className:EPe})],className:xPe,onClick:v=>{v.stopPropagation()}}):null],className:bPe})}let FPe=DPe;function kU(e){return"autoui.notifications.seen."+e}function IPe(e){let t=localStorage.getItem(kU(e));if(t!=null)return Ds(t)}function PPe(e,t){localStorage.setItem(kU(e),t.toString())}function OPe(e){let t=e.onData,r=tc(e.binding.readModel,void 0);return Ae(()=>{t({rows:r.rows,refetch:r.refetch})},[r.rows]),null}function MPe(e){let t=VIe(),r=xa(),n=si(),i=cm(),o=ga(),a=Ls(),s=ce(()=>({})),l=s[1],c=s[0],f=ce(()=>0)[1],h=C=>(A=>l($=>{let R=Oe($e($));return R[C]=A,R})),p=q(k(r,C=>C.identity),C=>({userId:C.userId,username:C.username})),m=t.flatMap(C=>{let A=ne(F(c,C.pluginId),[],$=>$.rows);return MIe(C.binding,A,p,IPe(C.pluginId)).map($=>({key:C.pluginId+":"+$.id,appBinding:C,entry:$}))}).toSorted((C,A)=>{let $=k(C.entry.timestamp,Qn),R=k(A.entry.timestamp,Qn);return $!==void 0?R!==void 0?R-$:-1:R!==void 0?1:0}),g=(C,A)=>{let $=C.binding.markReadCommand;if($!==void 0&&i!==void 0){Lt(i($.mutationDocument,zIe(C.binding,A)).then(R=>{if(typeof R!="object"){let N=C.pluginId;return ee(F(c,N),I=>I.refetch())}R.TAG!=="Rejected"&&console.error("[AutoUI] notification markRead not executed — "+R._0)}),R=>Promise.resolve());return}},v=C=>ee(m.find(A=>A.key===C.id),A=>{A.entry.read||g(A.appBinding,A.entry.id);let $=A.entry;ee(wV($.refs,R=>{let N=R[1];return q(jo(o,R[0]),I=>[I,N])}),R=>{let N=R[0];a(Ga(N.pluginId,N.name,R[1],[]))})}),b=Ee(n)&&t.some(C=>Ee(C.binding.markReadCommand)),y=()=>{m.forEach(C=>{if(!C.entry.read)return g(C.appBinding,C.entry.id)})},S=()=>{t.forEach(C=>{let A=ne(F(c,C.pluginId),[],$=>$.rows);ee(LIe(C.binding,A),$=>PPe(C.pluginId,$))}),f(C=>C+1|0)},w=m.map(C=>({id:C.key,message:C.entry.message,timestamp:C.entry.timestamp,read:C.entry.read}));return t.length===0?null:L(Bt,{children:[t.map(C=>_(OPe,{binding:C.binding,onData:h(C.pluginId)},C.pluginId)),_(FPe,{notifications:w,onOpen:v,onMarkAllRead:b?y:void 0,onPanelOpen:S})]})}let LPe=MPe,zPe="/default/dev/uiHints";function UPe(e){let t=e.onChange,r=nm(),n=e.config.authMode,i;switch(n){case"Local":i=!0;break;case"Anonymous":case"Cognito":i=!1;break}let o=De(t);return o.current=t,Ae(()=>{let a=i?r:void 0;if(a===void 0)return;let s=a.subscribe("Domain",zPe,c=>o.current()),l=a.registerReconnect("Domain",()=>o.current());return()=>{s(),l()}},[i?Ee(r):!1]),null}let BPe=UPe;function jPe(e,t,r){if(e===void 0)return!0;let n=t.toLowerCase(),i=r.toLowerCase();return e.split(",").map(o=>o.trim().toLowerCase()).filter(o=>o!=="").some(o=>o.startsWith(".")?n.endsWith(o):o.endsWith("/*")?i.startsWith(o.slice(0,o.length-1|0)):i===o)}function qPe(e){let t=["B","KB","MB","GB"],n=((s,l)=>{for(;;){let c=l,d=s;if(!(d>=1024&&c<(t.length-1|0)))return[d,c];l=c+1|0,s=d/1024}})(e<0?0:e,0),i=n[1],o=n[0];return(i===0?Math.round(o).toString():(Math.round(o*10)/10).toString())+" "+t[i]}function VPe(e,t){if(e)return[t,!1];let r=t.slice(0,1);return[r,r.length!==0]}function gn(e){return"var("+e+")"}let LF=E([z("flex"),_e("column"),X("center"),Ze("center"),u("gap","6px"),u("padding",gn(O.lg)),u("border","2px dashed var("+x.border+")"),u("border-radius",gn(Y.md)),u("color",gn(x.textSecondary)),u("font-family",gn(T.fontFamily)),u("font-size",gn(T.sizeSm)),Ce("pointer"),u("transition","border-color 120ms, background 120ms"),Ya("center")]),GPe=E([u("border-color",gn(x.brand)),u("background",gn(x.brandSubtle))]),KPe=E([u("font-size",gn(T.sizeXs))]),HPe=E([z("flex"),X("center"),u("gap","8px"),u("padding",gn(O.xs)+" 0"),u("font-family",gn(T.fontFamily)),u("font-size",gn(T.sizeSm)),u("color",gn(x.textPrimary))]),WPe=E([u("flex","1"),u("min-width","0"),u("overflow","hidden"),u("text-overflow","ellipsis"),u("white-space","nowrap")]),JPe=E([u("color",gn(x.textSecondary)),u("font-size",gn(T.sizeXs)),u("white-space","nowrap")]),QPe=E([u("color",gn(x.success))]),zF=E([u("color",gn(x.error))]),YPe=E([u("width","120px")]),XPe=E([u("flex","0 0 auto"),u("border","none"),u("background","transparent"),u("padding","0 4px"),u("color",gn(x.textSecondary)),u("font-size",gn(T.sizeMd)),YW({NAME:"abs",VAL:1}),Ce("pointer")]),ZPe=E([u("width","40px"),u("height","40px"),u("flex","0 0 auto"),u("object-fit","cover"),u("border-radius",gn(Y.sm)),u("border","1px solid var("+x.border+")")]);function eOe(e){let t=e.onRemoved,r=e.onUploaded,n=e.label,i=e.multiple,o=e.accept,a=e.adapter,s=i!==void 0?i:!0,l=n!==void 0?n:"Drop files here or click to browse",c=ce(()=>[]),d=c[1],f=c[0],h=ce(()=>!1),p=h[1],m=De(null),g=De(0),v=De([]),b=De([]);Ae(()=>(()=>{v.current.forEach(M=>{URL.revokeObjectURL(M)})}),[]);let y=(M,P)=>d(B=>B.map(j=>j.key===M?{key:j.key,name:j.name,size:j.size,status:P,preview:j.preview}:j)),S=M=>ee(M.preview,P=>{URL.revokeObjectURL(P),v.current=v.current.filter(B=>B!==P)}),w=M=>ee(a.remove,P=>{Lt(P(M).then(B=>{B.TAG!=="Ok"&&console.error("[FileDropzone] could not remove "+M+": "+B._0)}),B=>(console.error("[FileDropzone] could not remove "+M),Promise.resolve()))}),C=M=>{b.current=b.current.concat([M.key]),S(M);let P=M.status;if(P.TAG!=="Done")return;let B=P._0;ee(t,j=>j(B)),w(B)},A=M=>{let P=VPe(s,M),B=P[1];B&&f.forEach(C),P[0].forEach((j,W)=>{let te=B&&W===0;g.current=g.current+1|0;let J=g.current.toString()+":"+j.name,re=jPe(o,j.name,j.type),se=re?{TAG:"Uploading",_0:0}:{TAG:"Rejected",_0:"File type not accepted"},he=j.type,K;if(he.toLowerCase().startsWith("image/")){let ve=URL.createObjectURL(j);v.current=v.current.concat([ve]),K=ve}else K=void 0;let ie=j.name,le=j.size,Z={key:J,name:ie,size:le,status:se,preview:K};if(d(ve=>te?[Z]:ve.concat([Z])),re){Lt(a.upload(j,ve=>y(J,{TAG:"Uploading",_0:ve})).then(ve=>{if(ve.TAG==="Ok"){let pe=ve._0;b.current.includes(J)?w(pe):(y(J,{TAG:"Done",_0:pe}),ee(r,be=>be(j.name,pe)))}else y(J,{TAG:"Failed",_0:ve._0});return Promise.resolve()}),ve=>(y(J,{TAG:"Failed",_0:"Upload failed"}),Promise.resolve()));return}})},$=M=>{M.preventDefault(),p(B=>!1);let P=M.dataTransfer;if(P!=null)return A(Array.from(P.files))},R=M=>{let P=M.target.files;P!=null&&A(Array.from(P)),M.target.value=""},N=()=>ee(Mi(m.current),M=>M.click()),I=h[0]?LF+" "+GPe:LF;return L("div",{children:[L("div",{children:[_("span",{children:l}),o!==void 0?_("span",{children:"Accepted: "+o,className:KPe}):null],className:I,role:"button",onClick:M=>N(),onDragLeave:M=>p(P=>!1),onDragOver:M=>{M.preventDefault(),p(P=>!0)},onDrop:$}),_("input",{ref:Dt(m),style:{display:"none"},accept:o,multiple:s,type:"file",onChange:R}),f.map(M=>{let P=M.preview,B=M.status,j;switch(B.TAG){case"Uploading":j=_("span",{children:_(PM,{value:B._0,showValue:!1}),className:YPe});break;case"Done":j=_("span",{children:"Uploaded",className:QPe});break;case"Rejected":j=_("span",{children:"Rejected",className:zF,title:B._0});break;case"Failed":j=_("span",{children:"Failed",className:zF,title:B._0});break}return L("div",{children:[P!==void 0?_("img",{className:ZPe,alt:M.name,src:P}):null,_("span",{children:M.name,className:WPe,title:M.name}),_("span",{children:qPe(M.size),className:JPe}),j,_("button",{children:"×","aria-label":"Remove "+M.name,className:XPe,title:"Remove "+M.name,type:"button",onClick:W=>{W.stopPropagation();let te=M.key;ee(f.find(J=>J.key===te),C),d(J=>J.filter(re=>re.key!==te))}})],className:HPe},M.key)})]})}let tOe=eOe;function CU(e){if(e==="")return[];let t;try{t=Ct(JSON.parse(e))}catch{return[e]}return t!==void 0?Q(t,oe):[e]}function rOe(e){return{upload:(t,r)=>Promise.resolve({TAG:"Error",_0:e!==void 0?'No upload endpoint is configured for the store "'+e+'".':"No upload endpoint is configured."})}}function nOe(e,t){let r=uM(e,t);if(r!==void 0&&r.semantic==="Image")return"image/*"}function iOe(e){return Re(k(k(G(vn(e)),t=>F(t,"type")),oe),"array")}function RU(e){let t=r=>k(Io(r).storeTarget,cQ);return Wn(t(e),k(xO(e),t))}function oOe(e,t,r){return Wn(k(RU(e),r),t)}function aOe(e,t,r){return D(oOe(e,t,r),rOe(RU(e)))}function sOe(e){let t=e.onChange,r=e.value,n=e.multiple,i=e.adapter,o=De(n?CU(r):r===""?[]:[r]),a=De([]),s=FTe(),l=h=>n?JSON.stringify(h.map(p=>p)):D(h[0],""),c=(h,p)=>{let m=n?o.current.concat([p]):[p];o.current=m,a.current=ITe(a.current,p),t(l(m))},d=h=>{let p=o.current.filter(m=>m!==h);o.current=p,a.current=PTe(a.current,h),t(l(p))},f=h=>ee(i.remove,p=>{Lt(p(h).then(m=>{m.TAG!=="Ok"&&console.error("[FileDropzoneInput] could not release "+h+": "+m._0)}),m=>(console.error("[FileDropzoneInput] could not release "+h),Promise.resolve()))});return Ae(()=>(()=>{OTe(s,a.current).forEach(f)}),[]),_(tOe,{adapter:i,accept:e.accept,multiple:n,onUploaded:c,onRemoved:d})}function lOe(e,t,r,n){if(n&&CU(r).length===0)return"Required"}function uOe(e,t,r){let n=e!==void 0?e:a=>{},i=(a,s,l,c,d,f,h)=>_(sOe,{adapter:aOe(s,void 0,n),accept:Wn(t,nOe(a,s)),multiple:D(r,iOe(s)),value:l,onChange:c}),o=a=>{let l={...D(xle(a),{cell:(c,d,f)=>{},detail:(c,d,f)=>{}})};xr(a,(l.validateInput=lOe,l.input=i,l))};o("File"),o("Image")}var cOe={FRAGMENT:"Fragment",INLINE_DATA_FRAGMENT:"InlineDataFragment",LINKED_FIELD:"LinkedField",LITERAL:"Literal",LIST_VALUE:"ListValue",RELAY_LIVE_RESOLVER:"RelayLiveResolver",OBJECT_VALUE:"ObjectValue",REQUEST:"Request",SCALAR_FIELD:"ScalarField",SPLIT_OPERATION:"SplitOperation",UPDATABLE_QUERY:"UpdatableQuery",VARIABLE:"Variable"},hc=cOe,dOe=function(e,t,r,n,i,o,a,s){if(!e){var l;if(t===void 0)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[r,n,i,o,a,s],d=0;l=new Error(t.replace(/%s/g,function(){return c[d++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}},Be=dOe;function Gb(e){return function(){return e}}var _f=function(){};_f.thatReturns=Gb;_f.thatReturnsFalse=Gb(!1);_f.thatReturnsTrue=Gb(!0);_f.thatReturnsNull=Gb(null);_f.thatReturnsThis=function(){return this};_f.thatReturnsArgument=function(e){return e};var Kb=hc,hm=Be;function fOe(e){hm(!1)}function Ws(e){var t=e;return typeof t=="function"?t=t():t.default&&(t=t.default),t}function AU(e){var t=Ws(e);return typeof t=="object"&&t!==null&&t.kind===Kb.FRAGMENT}function TU(e){var t=Ws(e);return typeof t=="object"&&t!==null&&t.kind===Kb.REQUEST}function hOe(e){var t=Ws(e);return typeof t=="object"&&t!==null&&t.kind===Kb.UPDATABLE_QUERY}function $U(e){var t=Ws(e);return typeof t=="object"&&t!==null&&t.kind===Kb.INLINE_DATA_FRAGMENT}function vC(e){var t=Ws(e);return AU(t)||hm(!1),t}function pOe(e){var t,r=vC(e),n=(t=r.metadata)===null||t===void 0?void 0:t.refetch,i=n?.connection;return n===null||typeof n!="object"||i===null||typeof i!="object"?null:r}function mOe(e){var t,r=vC(e),n=(t=r.metadata)===null||t===void 0?void 0:t.refetch;return n===null||typeof n!="object"?null:r}function gOe(e){var t=Ws(e);return TU(t)||hm(!1),t}function vOe(e){var t=Ws(e);return hOe(t)||hm(!1),t}function bOe(e){var t=Ws(e);return $U(t)||hm(!1),t}var wa={getFragment:vC,getNode:Ws,getPaginationFragment:pOe,getRefetchableFragment:mOe,getRequest:gOe,getUpdatableQuery:vOe,getInlineDataFragment:bOe,graphql:fOe,isFragment:AU,isRequest:TU,isInlineDataFragment:$U},NU={exports:{}};(function(e){function t(r){return r&&r.__esModule?r:{default:r}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(NU);var Je=NU.exports,DU={exports:{}},FU={exports:{}},IU={exports:{}},PU={exports:{}};(function(e){function t(r){"@babel/helpers - typeof";return e.exports=t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(PU);var OU=PU.exports,MU={exports:{}};(function(e){var t=OU.default;function r(n,i){if(t(n)!="object"||!n)return n;var o=n[Symbol.toPrimitive];if(o!==void 0){var a=o.call(n,i||"default");if(t(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(n)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(MU);var _Oe=MU.exports;(function(e){var t=OU.default,r=_Oe;function n(i){var o=r(i,"string");return t(o)=="symbol"?o:o+""}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(IU);var LU=IU.exports;(function(e){var t=LU;function r(n,i,o){return(i=t(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o,n}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(FU);var Si=FU.exports;(function(e){var t=Si;function r(i,o){var a=Object.keys(i);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(i);o&&(s=s.filter(function(l){return Object.getOwnPropertyDescriptor(i,l).enumerable})),a.push.apply(a,s)}return a}function n(i){for(var o=1;o<arguments.length;o++){var a=arguments[o]!=null?arguments[o]:{};o%2?r(Object(a),!0).forEach(function(s){t(i,s,a[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(a)):r(Object(a)).forEach(function(s){Object.defineProperty(i,s,Object.getOwnPropertyDescriptor(a,s))})}return i}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(DU);var or=DU.exports,zU={exports:{}},UU={exports:{}},BU={exports:{}};(function(e){function t(r,n){(n==null||n>r.length)&&(n=r.length);for(var i=0,o=Array(n);i<n;i++)o[i]=r[i];return o}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(BU);var jU=BU.exports;(function(e){var t=jU;function r(n,i){if(n){if(typeof n=="string")return t(n,i);var o={}.toString.call(n).slice(8,-1);return o==="Object"&&n.constructor&&(o=n.constructor.name),o==="Map"||o==="Set"?Array.from(n):o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?t(n,i):void 0}}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(UU);var qU=UU.exports;(function(e){var t=qU;function r(n,i){var o=typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(!o){if(Array.isArray(n)||(o=t(n))||i&&n&&typeof n.length=="number"){o&&(n=o);var a=0,s=function(){};return{s,n:function(){return a>=n.length?{done:!0}:{done:!1,value:n[a++]}},e:function(h){throw h},f:s}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
114
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var l,c=!0,d=!1;return{s:function(){o=o.call(n)},n:function(){var h=o.next();return c=h.done,h},e:function(h){d=!0,l=h},f:function(){try{c||o.return==null||o.return()}finally{if(d)throw l}}}}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(zU);var Vr=zU.exports,VU=Je.default,UF=VU(or),BF=VU(Vr),yOe=Be;function xOe(e,t,r){var n=(0,BF.default)(t),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;e.relayFieldLogger((0,UF.default)((0,UF.default)({},o),{},{uiContext:r}))}}catch(c){n.e(c)}finally{n.f()}var a=(0,BF.default)(t),s;try{for(a.s();!(s=a.n()).done;){var l=s.value;if(GU(l))switch(l.kind){case"relay_resolver.error":throw new Error("Relay: Resolver error at path '".concat(l.fieldPath,"' in '").concat(l.owner,"'. Message: ").concat(l.error.message));case"relay_field_payload.error":throw new Error("Relay: Unexpected response payload - check server logs for details.");case"missing_expected_data.throw":throw new Error("Relay: Missing expected data at path '".concat(l.fieldPath,"' in '").concat(l.owner,"'."));case"missing_required_field.throw":throw new Error("Relay: Missing @required value at path '".concat(l.fieldPath,"' in '").concat(l.owner,"'."));case"missing_required_field.log":case"missing_expected_data.log":break;default:l.kind,yOe(!1)}}}catch(c){a.e(c)}finally{a.f()}}function GU(e){switch(e.kind){case"relay_resolver.error":case"relay_field_payload.error":return e.shouldThrow&&!e.handled;case"missing_expected_data.throw":case"missing_required_field.throw":return!e.handled;case"missing_required_field.log":case"missing_expected_data.log":return!1;default:throw e.kind,new Error("Relay: Unexpected event kind")}}function SOe(e,t,r){t!=null&&xOe(e,t,r)}var pm={handlePotentialSnapshotErrors:SOe,eventShouldThrow:GU},KU={exports:{}},HU={exports:{}};(function(e){var t=jU;function r(n){if(Array.isArray(n))return t(n)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(HU);var wOe=HU.exports,WU={exports:{}};(function(e){function t(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(WU);var EOe=WU.exports,JU={exports:{}};(function(e){function t(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
115
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(JU);var kOe=JU.exports;(function(e){var t=wOe,r=EOe,n=qU,i=kOe;function o(a){return t(a)||r(a)||n(a)||i()}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports})(KU);var Jl=KU.exports,QU={DEFAULT_HANDLE_KEY:""},COe=QU,ROe=COe.DEFAULT_HANDLE_KEY,AOe=Be;function TOe(e,t,r){return t&&t!==ROe?"__".concat(t,"_").concat(e):(r==null&&AOe(!1),"__".concat(r,"_").concat(e))}var YU=TOe,$Oe={ENABLE_VARIABLE_CONNECTION_KEY:!1,ENABLE_RELAY_RESOLVERS:!1,ENABLE_GETFRAGMENTIDENTIFIER_OPTIMIZATION:!1,ENABLE_FRIENDLY_QUERY_NAME_GQL_URL:!1,ENABLE_DO_NOT_WRAP_LIVE_QUERY:!1,ENABLE_NOTIFY_SUBSCRIPTION:!1,BATCH_ASYNC_MODULE_UPDATES_FN:null,ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT:!1,MAX_DATA_ID_LENGTH:null,STRING_INTERN_LEVEL:0,LOG_MISSING_RECORDS_IN_PROD:!1,ENABLE_STORE_ID_COLLISION_LOGGING:!1,ENABLE_NONCOMPLIANT_ERROR_HANDLING_ON_LISTS:!1,ENABLE_LOOSE_SUBSCRIPTION_ATTRIBUTION:!1,ENABLE_OPERATION_TRACKER_OPTIMISTIC_UPDATES:!1,ENABLE_RELAY_OPERATION_TRACKER_SUSPENSE:!1,PROCESS_OPTIMISTIC_UPDATE_BEFORE_SUBSCRIPTION:!1,MARK_RESOLVER_VALUES_AS_CLEAN_AFTER_FRAGMENT_REREAD:!1,ENABLE_CYLE_DETECTION_IN_VARIABLES:!1,ENABLE_ACTIVITY_COMPATIBILITY:!1,ENABLE_READ_TIME_RESOLVER_STORAGE_KEY_PREFIX:!0,ENABLE_USE_PAGINATION_IS_LOADING_FIX:!1,DISALLOW_NESTED_UPDATES:!1,ENABLE_TYPENAME_PREFIXED_DATA_ID:!1,ENABLE_UI_CONTEXT_ON_RELAY_LOGGER:!1,CHECK_ALL_FRAGMENTS_FOR_MISSING_CLIENT_EDGES:!1},Ko=$Oe;function nw(e){if(!e||typeof e!="object")return e;if(Array.isArray(e))return e.map(nw);for(var t=Object.keys(e).sort(),r={},n=0;n<t.length;n++)r[t[n]]=nw(e[t[n]]);return r}function XU(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new Set;if(!e||typeof e!="object")return!1;if(t.has(e))return!0;var r=new Set(t);r.add(e);var n=Array.isArray(e)?e:Object.values(e);return n.some(function(i){return XU(i,r)})}var pc={stableCopy:nw,hasCycle:XU},NOe=Je.default,DOe=NOe(Jl),FOe=YU,Hb=hc,IOe=Ko,POe=pc,ZU=POe.stableCopy,OOe=Be,MOe=Hb.VARIABLE,LOe=Hb.LITERAL,zOe=Hb.OBJECT_VALUE,UOe=Hb.LIST_VALUE,BOe="__errors",jOe="__module_component_",qOe="__module_operation_";function iw(e,t){if(e.kind===MOe)return WOe(e.variableName,t);if(e.kind===LOe)return e.value;if(e.kind===zOe){var r={};return e.fields.forEach(function(i){r[i.name]=iw(i,t)}),r}else if(e.kind===UOe){var n=[];return e.items.forEach(function(i){i!=null&&n.push(iw(i,t))}),n}}function bC(e,t,r){var n={};return r&&(n[tB.FRAGMENT_POINTER_IS_WITHIN_UNMATCHED_TYPE_REFINEMENT]=!0),e&&e.forEach(function(i){n[i.name]=iw(i,t)}),n}function VOe(e,t){var r=e.dynamicKey,n=e.handle,i=e.key,o=e.name,a=e.args,s=e.filters,l=FOe(n,i,o),c=null;return a&&s&&a.length!==0&&s.length!==0&&(c=a.filter(function(d){return s.indexOf(d.name)>-1})),r&&(c=c!=null?[r].concat((0,DOe.default)(c)):[r]),c===null?l:_C(l,bC(c,t))}function eB(e,t){if(e.storageKey)return e.storageKey;var r=KOe(e),n=e.name;return r&&r.length!==0?_C(n,bC(r,t)):n}function GOe(e,t){var r=eB(e,t);return IOe.ENABLE_READ_TIME_RESOLVER_STORAGE_KEY_PREFIX?"$r:"+r:r}function KOe(e){if(e.kind==="RelayResolver"||e.kind==="RelayLiveResolver"){var t;if(e.args==null){var r;return(r=e.fragment)===null||r===void 0?void 0:r.args}return((t=e.fragment)===null||t===void 0?void 0:t.args)==null?e.args:e.args.concat(e.fragment.args)}var n=typeof e.args>"u"?void 0:e.args;return n}function HOe(e,t){return _C(e,ZU(t))}function _C(e,t){if(!t)return e;var r=[];for(var n in t)if(t.hasOwnProperty(n)){var i=t[n];if(i!=null){var o;r.push(n+":"+((o=JSON.stringify(i))!==null&&o!==void 0?o:"undefined"))}}return r.length===0?e:e+"(".concat(r.join(","),")")}function WOe(e,t){return t.hasOwnProperty(e)||OOe(!1),ZU(t[e])}function JOe(e){return"".concat(jOe).concat(e)}function QOe(e){return"".concat(qOe).concat(e)}var tB={ACTOR_IDENTIFIER_KEY:"__actorIdentifier",CLIENT_EDGE_TRAVERSAL_PATH:"__clientEdgeTraversalPath",FRAGMENTS_KEY:"__fragments",FRAGMENT_OWNER_KEY:"__fragmentOwner",FRAGMENT_POINTER_IS_WITHIN_UNMATCHED_TYPE_REFINEMENT:"$isWithinUnmatchedTypeRefinement",FRAGMENT_PROP_NAME_KEY:"__fragmentPropName",MODULE_COMPONENT_KEY:"__module_component",ERRORS_KEY:BOe,ID_KEY:"__id",REF_KEY:"__ref",REFS_KEY:"__refs",ROOT_ID:"client:root",ROOT_TYPE:"__Root",TYPENAME_KEY:"__typename",INVALIDATED_AT_KEY:"__invalidated_at",RELAY_RESOLVER_VALUE_KEY:"__resolverValue",RELAY_RESOLVER_INVALIDATION_KEY:"__resolverValueMayBeInvalid",RELAY_RESOLVER_SNAPSHOT_KEY:"__resolverSnapshot",RELAY_RESOLVER_ERROR_KEY:"__resolverError",RELAY_RESOLVER_OUTPUT_TYPE_RECORD_IDS:"__resolverOutputTypeRecordIDs",getArgumentValues:bC,getHandleStorageKey:VOe,getStorageKey:eB,getReadTimeResolverStorageKey:GOe,getStableStorageKey:HOe,getModuleComponentKey:JOe,getModuleOperationKey:QOe},Sr=tB,YOe=Je.default,rB=YOe(or),XOe=Sr,ZOe=XOe.getArgumentValues,eMe=Be;function tMe(e,t,r){if(e.argumentDefinitions==null)return r;var n;return e.argumentDefinitions.forEach(function(i){if(!r.hasOwnProperty(i.name))switch(n=n||(0,rB.default)({},r),i.kind){case"LocalArgument":n[i.name]=i.defaultValue;break;case"RootArgument":if(!t.hasOwnProperty(i.name)){n[i.name]=void 0;break}n[i.name]=t[i.name];break;default:eMe(!1)}}),n||r}function rMe(e,t,r){var n={};return e.argumentDefinitions.forEach(function(i){var o=i.defaultValue;r[i.name]!=null&&(o=r[i.name]),n[i.name]=o}),t!=null&&Object.keys(t).forEach(function(i){n[i]=t[i].get()}),n}function nMe(e,t,r){if(t==null)return e;var n=(0,rB.default)({},e),i=r?ZOe(r,e):{};return t.forEach(function(o){var a,s=(a=i[o.name])!==null&&a!==void 0?a:o.defaultValue;n[o.name]=s}),n}var Ql={getLocalVariables:nMe,getFragmentVariables:tMe,getOperationVariables:rMe},o1=[],a1=[];/**
|
|
116
|
+
* Checks if two values are equal. Values may be primitives, arrays, or objects.
|
|
117
|
+
* Returns true if both arguments have the same keys and values.
|
|
118
|
+
*
|
|
119
|
+
* @see http://underscorejs.org
|
|
120
|
+
* @copyright 2009-2013 Jeremy Ashkenas, DocumentCloud Inc.
|
|
121
|
+
* @license MIT
|
|
122
|
+
*/function iMe(e,t){var r=o1.length?o1.pop():[],n=a1.length?a1.pop():[],i=ow(e,t,r,n);return r.length=0,n.length=0,o1.push(r),a1.push(n),i}function ow(e,t,r,n){if(e===t)return e!==0||1/e==1/t;if(e==null||t==null||typeof e!="object"||typeof t!="object")return!1;var i=Object.prototype.toString,o=i.call(e);if(o!=i.call(t))return!1;switch(o){case"[object String]":return e==String(t);case"[object Number]":return isNaN(e)||isNaN(t)?!1:e==Number(t);case"[object Date]":case"[object Boolean]":return+e==+t;case"[object RegExp]":return e.source==t.source&&e.global==t.global&&e.multiline==t.multiline&&e.ignoreCase==t.ignoreCase}for(var a=r.length;a--;)if(r[a]==e)return n[a]==t;r.push(e),n.push(t);var s=0;if(o==="[object Array]"){if(s=e.length,s!==t.length)return!1;for(;s--;)if(!ow(e[s],t[s],r,n))return!1}else{if(e.constructor!==t.constructor)return!1;if(e.hasOwnProperty("valueOf")&&t.hasOwnProperty("valueOf"))return e.valueOf()==t.valueOf();var l=Object.keys(e);if(l.length!=Object.keys(t).length)return!1;for(var c=0;c<l.length;c++)if(!ow(e[l[c]],t[l[c]],r,n))return!1}return r.pop(),n.pop(),!0}var Js=iMe,oMe=Ql,aMe=oMe.getFragmentVariables,mm=Sr,sMe=mm.CLIENT_EDGE_TRAVERSAL_PATH,lMe=mm.FRAGMENT_OWNER_KEY,uMe=mm.FRAGMENT_POINTER_IS_WITHIN_UNMATCHED_TYPE_REFINEMENT,cMe=mm.FRAGMENTS_KEY,nB=mm.ID_KEY,iB=Js,ql=Be;function Wb(e,t){typeof t=="object"&&t!==null&&!Array.isArray(t)||ql(!1);var r=t[nB],n=t[cMe],i=t[lMe],o=t[sMe];if(typeof r=="string"&&typeof n=="object"&&n!==null&&typeof n[e.name]=="object"&&n[e.name]!==null&&typeof i=="object"&&i!==null&&(o==null||Array.isArray(o))){var a=i,s=o,l=n[e.name],c=aMe(e,a.variables,l),d=l[uMe]===!0;return dB(e,r,c,a,d,s)}return null}function oB(e,t){var r=null;return t.forEach(function(n,i){var o=n!=null?Wb(e,n):null;o!=null&&(r=r||[],r.push(o))}),r==null?null:{kind:"PluralReaderSelector",selectors:r}}function aB(e,t){return t==null?t:e.metadata&&e.metadata.plural===!0?(Array.isArray(t)||ql(!1),oB(e,t)):(Array.isArray(t)&&ql(!1),Wb(e,t))}function dMe(e,t){var r={};for(var n in e)if(e.hasOwnProperty(n)){var i=e[n],o=t[n];r[n]=aB(i,o)}return r}function fMe(e,t){var r={};for(var n in e)if(e.hasOwnProperty(n)){var i=e[n],o=t[n];r[n]=sB(i,o)}return r}function sB(e,t){return t==null?t:e.metadata&&e.metadata.plural===!0?(Array.isArray(t)||ql(!1),hMe(e,t)):(Array.isArray(t)&&ql(!1),lB(e,t))}function hMe(e,t){var r=null;return t.forEach(function(n){var i=n!=null?lB(e,n):null;i!=null&&(r=r||[],r.push(i))}),r}function lB(e,t){typeof t=="object"&&t!==null&&!Array.isArray(t)||ql(!1);var r=t[nB];return typeof r=="string"?r:null}function pMe(e,t){var r={};for(var n in e)if(e.hasOwnProperty(n)){var i=e[n],o=t[n],a=uB(i,o);Object.assign(r,a)}return r}function uB(e,t){var r;return t==null?{}:((r=e.metadata)===null||r===void 0?void 0:r.plural)===!0?(Array.isArray(t)||ql(!1),cB(e,t)):(Array.isArray(t)&&ql(!1),yC(e,t)||{})}function yC(e,t){var r=Wb(e,t);return r?r.variables:null}function cB(e,t){var r={};return t.forEach(function(n,i){if(n!=null){var o=yC(e,n);o!=null&&Object.assign(r,o)}}),r}function jF(e,t){return e.dataID===t.dataID&&e.node===t.node&&iB(e.variables,t.variables)&&mMe(e.owner,t.owner)&&e.isWithinUnmatchedTypeRefinement===t.isWithinUnmatchedTypeRefinement&&gMe(e.clientEdgeTraversalPath,t.clientEdgeTraversalPath)}function mMe(e,t){return e===t?!0:e.identifier===t.identifier&&iB(e.cacheConfig,t.cacheConfig)}function gMe(e,t){if(e===t)return!0;if(e==null||t==null||e.length!==t.length)return!1;for(var r=e.length;r--;){var n=e[r],i=t[r];if(n!==i&&(n==null||i==null||n.clientEdgeDestinationID!==i.clientEdgeDestinationID||n.readerClientEdge!==i.readerClientEdge))return!1}return!0}function vMe(e,t){return e===t?!0:e==null?t==null:t==null?e==null:e.kind==="SingularReaderSelector"&&t.kind==="SingularReaderSelector"?jF(e,t):e.kind==="PluralReaderSelector"&&t.kind==="PluralReaderSelector"?e.selectors.length===t.selectors.length&&e.selectors.every(function(r,n){return jF(r,t.selectors[n])}):!1}function dB(e,t,r,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,o=arguments.length>5?arguments[5]:void 0;return{kind:"SingularReaderSelector",dataID:t,isWithinUnmatchedTypeRefinement:i,clientEdgeTraversalPath:o??null,node:e,variables:r,owner:n}}function bMe(e,t,r){return{dataID:t,node:e,variables:r}}var Ea={areEqualSelectors:vMe,createReaderSelector:dB,createNormalizationSelector:bMe,getDataIDsFromFragment:sB,getDataIDsFromObject:fMe,getSingularSelector:Wb,getPluralSelector:oB,getSelector:aB,getSelectorsFromObject:dMe,getVariablesFromSingularFragment:yC,getVariablesFromPluralFragment:cB,getVariablesFromFragment:uB,getVariablesFromObject:pMe},_Me=wa,yMe=_Me.getFragment,xMe=pm,SMe=xMe.eventShouldThrow,wMe=Ea,EMe=wMe.getSelector,qF=Be,Dh=[];function kMe(e,t){Dh.push(e);try{return t()}finally{Dh.pop()}}function CMe(e,t){if(!Dh.length)throw new Error("readFragment should be called only from within a Relay Resolver function.");var r=Dh[Dh.length-1],n=yMe(e),i=EMe(n,t);i==null&&qF(!1),i.kind!=="SingularReaderSelector"&&qF(!1);var o=r.getDataForResolverFragment(i,t),a=o.data,s=o.isMissingData,l=o.fieldErrors;if(s||l!=null&&l.some(SMe))throw fB;return a}var fB={},xC={readFragment:CMe,withResolverContext:kMe,RESOLVER_FRAGMENT_ERRORED_SENTINEL:fB},RMe=xC;RMe.readFragment;var hB={exports:{}};(function(e){function t(n,i,o,a,s,l,c){try{var d=n[l](c),f=d.value}catch(h){return void o(h)}d.done?i(f):Promise.resolve(f).then(a,s)}function r(n){return function(){var i=this,o=arguments;return new Promise(function(a,s){var l=n.apply(i,o);function c(f){t(l,a,s,c,d,"next",f)}function d(f){t(l,a,s,c,d,"throw",f)}c(void 0)})}}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(hB);var pB=hB.exports;function AMe(e){return e!=null&&typeof e=="object"&&typeof e.then=="function"}var mB=AMe,TMe=mB,ps=PMe,wp=(function(){e.create=function(n){return new e(n)};function e(r){this._source=r}e.onUnhandledError=function(n){ps=n},e.from=function(n){return $Me(n)?NMe(n):TMe(n)?DMe(n):FMe(n)};var t=e.prototype;return t.catch=function(n){var i=this;return e.create(function(o){var a;return i.subscribe({start:function(l){a=l},next:o.next,complete:o.complete,error:function(l){try{n(l).subscribe({start:function(d){a=d},next:o.next,complete:o.complete,error:o.error})}catch(c){o.error(c,!0)}}}),function(){return a.unsubscribe()}})},t.concat=function(n){var i=this;return e.create(function(o){var a;return i.subscribe({start:function(l){a=l},next:o.next,error:o.error,complete:function(){a=n.subscribe(o)}}),function(){a&&a.unsubscribe()}})},t.do=function(n){var i=this;return e.create(function(o){var a=function(l){return function(){try{n[l]&&n[l].apply(n,arguments)}catch(c){ps(c,!0)}o[l]&&o[l].apply(o,arguments)}};return i.subscribe({start:a("start"),next:a("next"),error:a("error"),complete:a("complete"),unsubscribe:a("unsubscribe")})})},t.finally=function(n){var i=this;return e.create(function(o){var a=i.subscribe(o);return function(){a.unsubscribe(),n()}})},t.ifEmpty=function(n){var i=this;return e.create(function(o){var a=!1,s;return s=i.subscribe({next:function(c){a=!0,o.next(c)},error:o.error,complete:function(){a?o.complete():s=n.subscribe(o)}}),function(){s&&s.unsubscribe()}})},t.subscribe=function(n){return IMe(this._source,n)},t.map=function(n){var i=this;return e.create(function(o){var a=i.subscribe({complete:o.complete,error:o.error,next:function(l){try{var c=n(l);o.next(c)}catch(d){o.error(d,!0)}}});return function(){a.unsubscribe()}})},t.mergeMap=function(n){var i=this;return e.create(function(o){var a=[];function s(c){this._sub=c,a.push(c)}function l(){a.splice(a.indexOf(this._sub),1),a.length===0&&o.complete()}return i.subscribe({start:s,next:function(d){try{o.closed||e.from(n(d)).subscribe({start:s,next:o.next,error:o.error,complete:l})}catch(f){o.error(f,!0)}},error:o.error,complete:l}),function(){a.forEach(function(c){return c.unsubscribe()}),a.length=0}})},t.poll=function(n){var i=this;return e.create(function(o){var a,s,l=function c(){a=i.subscribe({next:o.next,error:o.error,complete:function(){s=setTimeout(c,n)}})};return l(),function(){clearTimeout(s),a.unsubscribe()}})},t.toPromise=function(){var n=this;return new Promise(function(i,o){var a=!1;n.subscribe({next:function(l){a||(a=!0,i(l))},error:o,complete:i})})},e})();function $Me(e){return typeof e=="object"&&e!==null&&typeof e.subscribe=="function"}function NMe(e){return e instanceof wp?e:wp.create(function(t){return e.subscribe(t)})}function DMe(e){return wp.create(function(t){e.then(function(r){t.next(r),t.complete()},t.error)})}function FMe(e){return wp.create(function(t){t.next(e),t.complete()})}function IMe(e,t){var r=!1,n,i=function(c){return Object.defineProperty(c,"closed",{get:function(){return r}})};function o(){if(n){if(n.unsubscribe)n.unsubscribe();else try{n()}catch(l){ps(l,!0)}n=void 0}}var a=i({unsubscribe:function(){if(!r){r=!0;try{t.unsubscribe&&t.unsubscribe(a)}catch(c){ps(c,!0)}finally{o()}}}});try{t.start&&t.start(a)}catch(l){ps(l,!0)}if(r)return a;var s=i({next:function(c){if(!r&&t.next)try{t.next(c)}catch(d){ps(d,!0)}},error:function(c,d){if(r||!t.error)r=!0,ps(c,d||!1),o();else{r=!0;try{t.error(c)}catch(f){ps(f,!0)}finally{o()}}},complete:function(){if(!r){r=!0;try{t.complete&&t.complete()}catch(c){ps(c,!0)}finally{o()}}}});try{n=e(s)}catch(l){s.error(l,!0)}return r&&o(),a}function PMe(e,t){}var Yl=wp,gB=Je.default,OMe=gB(Vr),pg=gB(Si),MMe=Yl,LMe=Be,zMe=(function(){function e(){var r=this;(0,pg.default)(this,"_complete",!1),(0,pg.default)(this,"_events",[]),(0,pg.default)(this,"_sinks",new Set),(0,pg.default)(this,"_subscription",[]),this._observable=MMe.create(function(n){r._sinks.add(n);for(var i=r._events,o=0;o<i.length&&!n.closed;o++){var a=i[o];switch(a.kind){case"complete":n.complete();break;case"error":n.error(a.error);break;case"next":n.next(a.data);break;default:a.kind,LMe(!1)}}return function(){r._sinks.delete(n)}})}var t=e.prototype;return t.complete=function(){this._complete!==!0&&(this._complete=!0,this._events.push({kind:"complete"}),this._sinks.forEach(function(n){return n.complete()}))},t.error=function(n){this._complete!==!0&&(this._complete=!0,this._events.push({kind:"error",error:n}),this._sinks.forEach(function(i){return i.error(n)}))},t.next=function(n){this._complete!==!0&&(this._events.push({kind:"next",data:n}),this._sinks.forEach(function(i){return i.next(n)}))},t.subscribe=function(n){var i=this._observable.subscribe(n);return this._subscription.push(i),i},t.unsubscribe=function(){var n=(0,OMe.default)(this._subscription),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;o.unsubscribe()}}catch(a){n.e(a)}finally{n.f()}this._subscription=[]},t.getObserverCount=function(){return this._sinks.size},e})(),vB=zMe,SC=Yl,VF=vB,bB=Be,UMe=typeof WeakMap=="function",GF=UMe?new WeakMap:new Map;function BMe(e,t){return _B(e,t.request.identifier,function(){return e.execute({operation:t})})}function _B(e,t,r){return SC.create(function(n){var i=wC(e),o=i.get(t);return o||r().finally(function(){return i.delete(t)}).subscribe({start:function(s){o={identifier:t,subject:new VF,subjectForInFlightStatus:new VF,subscription:s,promise:null},i.set(t,o)},next:function(s){var l=mg(i,t);l.subject.next(s),l.subjectForInFlightStatus.next(s)},error:function(s){var l=mg(i,t);l.subject.error(s),l.subjectForInFlightStatus.error(s)},complete:function(){var s=mg(i,t);s.subject.complete(),s.subjectForInFlightStatus.complete()},unsubscribe:function(s){var l=mg(i,t);l.subject.unsubscribe(),l.subjectForInFlightStatus.unsubscribe()}}),o==null&&bB(!1),jMe(i,o).subscribe(n)})}function jMe(e,t){return SC.create(function(r){var n=t.subject.subscribe(r);return function(){n.unsubscribe();var i=e.get(t.identifier);if(i){var o=i.subscription;o!=null&&i.subject.getObserverCount()===0&&(o.unsubscribe(),e.delete(t.identifier))}}})}function yB(e,t,r){return SC.create(function(n){var i=r.subjectForInFlightStatus.subscribe({error:n.error,next:function(a){if(!e.isRequestActive(r.identifier)){n.complete();return}n.next()},complete:n.complete,unsubscribe:n.complete});return function(){i.unsubscribe()}})}function qMe(e,t){var r=wC(e),n=r.get(t.identifier);if(!n||!e.isRequestActive(n.identifier))return null;var i=new Promise(function(o,a){var s=!1;yB(e,r,n).subscribe({complete:o,error:a,next:function(c){s&&o(c)}}),s=!0});return i}function VMe(e,t){var r=wC(e),n=r.get(t.identifier);return!n||!e.isRequestActive(n.identifier)?null:yB(e,r,n)}function wC(e){var t=GF.get(e);if(t!=null)return t;var r=new Map;return GF.set(e,r),r}function mg(e,t){var r=e.get(t);return r==null&&bB(!1),r}var Jb={fetchQuery:BMe,fetchQueryDeduped:_B,getPromiseForActiveRequest:qMe,getObservableForActiveRequest:VMe},GMe=Je.default;pB.default;var KMe=GMe(Vr),xB=Yl,HMe=Jb,WMe=HMe.getObservableForActiveRequest,JMe=wa,QMe=JMe.getFragment,YMe=pm,XMe=YMe.handlePotentialSnapshotErrors,ZMe=Ea,e6e=ZMe.getSelector,p0=Be;function t6e(e,t,r){var n,i=QMe(t),o=e6e(i,r);switch(((n=i.metadata)===null||n===void 0?void 0:n.hasClientEdges)!=null&&p0(!1),o==null&&p0(!1),o.kind){case"SingularReaderSelector":return r6e(e,t,o);case"PluralReaderSelector":return n6e(e,t,o)}p0(!1)}function r6e(e,t,r){var n=e.lookup(r);return xB.create(function(i){i.next(Rv(e,t,r.owner,n));var o=e.subscribe(n,function(a){i.next(Rv(e,t,r.owner,a))});return function(){return o.dispose()}})}function n6e(e,t,r){var n=r.selectors.map(function(i){return e.lookup(i)});return xB.create(function(i){var o=n.map(function(s,l){return Rv(e,t,r.selectors[l].owner,s)});i.next(KF(o));var a=n.map(function(s,l){return e.subscribe(s,function(c){o[l]=Rv(e,t,r.selectors[l].owner,c),i.next(KF(o))})});return function(){return a.forEach(function(s){return s.dispose()})}})}function Rv(e,t,r,n){var i=n.missingLiveResolverFields!=null&&n.missingLiveResolverFields.length>0,o=n.missingClientEdges!=null&&n.missingClientEdges.length>0;if(i||o)return{state:"loading"};if(n.isMissingData&&(WMe(e,r)!=null||e.getOperationTracker().getPendingOperationsAffectingOwner(r)!=null))return{state:"loading"};try{XMe(e,n.fieldErrors)}catch(a){return{error:a,state:"error"}}return n.data==null&&p0(!1),{state:"ok",value:n.data}}function KF(e){var t=[],r=(0,KMe.default)(e),n;try{for(r.s();!(n=r.n()).done;){var i=n.value;if(i.state==="ok")t.push(i.value);else return i}}catch(o){r.e(o)}finally{r.f()}return{state:"ok",value:t}}var EC={observeFragment:t6e};function SB(e){return i6e(e)&&(Object.freeze(e),Object.getOwnPropertyNames(e).forEach(function(t){var r=e[t];r&&typeof r=="object"&&!Object.isFrozen(r)&&SB(r)})),e}function i6e(e){return e!=null&&(Array.isArray(e)||typeof e=="object"&&e.constructor===Object)}var wB=SB,o6e=pc,a6e=o6e.stableCopy,s6e=Be;function l6e(e,t){var r=e.cacheID!=null?e.cacheID:e.id;return r==null&&s6e(!1),r+JSON.stringify(a6e(t))}var EB=l6e,u6e=EB,c6e=Ko,d6e=pc,f6e=d6e.hasCycle,h6e=Ql,p6e=h6e.getOperationVariables,kB=Ea,m6e=kB.createNormalizationSelector,g6e=kB.createReaderSelector,v6e=Sr,b6e=v6e.ROOT_ID,_6e=Be;function y6e(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:b6e,i=e.operation,o=p6e(i,e.params.providedVariables,t);c6e.ENABLE_CYLE_DETECTION_IN_VARIABLES&&f6e(o)&&_6e(!1);var a=CB(e,o,r),s={fragment:g6e(e.fragment,n,o,a),request:a,root:m6e(i,n,o)};return s}function CB(e,t,r){var n={identifier:u6e(e.params,t),node:e,variables:t,cacheConfig:r};return n}var Xl={createOperationDescriptor:y6e,createRequestDescriptor:CB},x6e=Je.default,S6e=x6e(Si),w6e=EC,E6e=w6e.observeFragment,k6e=Xl,C6e=k6e.createOperationDescriptor;function R6e(e,t,r){var n=C6e(t,r),i={__id:n.fragment.dataID,__fragments:(0,S6e.default)({},n.fragment.node.name,n.request.variables),__fragmentOwner:n.request},o=n.request.node.fragment;return E6e(e,o,i)}var A6e={observeQuery:R6e},T6e=pB.default,$6e=EC,N6e=$6e.observeFragment;function D6e(e,t,r){return aw.apply(this,arguments)}function aw(){return aw=T6e(function*(e,t,r){var n;try{var i,o=yield new Promise(function(s,l){n=N6e(e,t,r).subscribe({next:function(d){d.state==="ok"?s(d.value):d.state==="error"&&l(d.error)}})});return(i=n)===null||i===void 0||i.unsubscribe(),o}catch(s){var a;throw(a=n)===null||a===void 0||a.unsubscribe(),s}}),aw.apply(this,arguments)}var F6e={waitForFragmentData:D6e},I6e=EC;I6e.observeFragment;var P6e=A6e;P6e.observeQuery;var O6e=F6e;O6e.waitForFragmentData;function M6e(e){return e.ok===!0}function L6e(e){return e.ok===!1}var z6e={isValueResult:M6e,isErrorResult:L6e},HF=new Map,U6e=1,B6e=j6e(),RB=" ",WF="\v";function j6e(){for(var e=new Set,t=0;t<10;++t)e.add(t.toString());return e}function q6e(e){return e[0]===RB&&B6e.has(e[1])||e[0]===WF?WF+e:e}function V6e(e,t){if(t==null||e.length<t)return q6e(e);var r=HF.get(e);return r!=null||(r=RB+U6e++,HF.set(e,r)),r}var AB={intern:V6e},JF=Ko,G6e=AB,K6e=G6e.intern,Ep="client:";function H6e(e,t,r){var n=JF.STRING_INTERN_LEVEL<=0?e:K6e(e,JF.MAX_DATA_ID_LENGTH),i=n+":"+t;return r!=null&&(i+=":"+r),i.indexOf(Ep)!==0&&(i=Ep+i),i}function W6e(e){return e.indexOf(Ep)===0}var J6e=0;function Q6e(){return"".concat(Ep,"local:").concat(J6e++)}function Y6e(e,t,r){var n="".concat(Ep).concat(e,":").concat(t);return r!=null&&(n+=":"+r),n}var ts={generateClientID:H6e,generateClientObjectClientID:Y6e,generateUniqueClientID:Q6e,isClientID:W6e},X6e={after:!0,before:!0,find:!0,first:!0,last:!0,surrounds:!0},QF={CURSOR:"cursor",EDGES:"edges",END_CURSOR:"endCursor",HAS_NEXT_PAGE:"hasNextPage",HAS_PREV_PAGE:"hasPreviousPage",NODE:"node",PAGE_INFO_TYPE:"PageInfo",PAGE_INFO:"pageInfo",START_CURSOR:"startCursor"},Z6e={inject:function(t){QF=t},get:function(){return QF},isConnectionCall:function(t){return X6e.hasOwnProperty(t.name)}},kC=Z6e,e4e=ts,kp=e4e.generateClientID,t4e=Sr,r4e=t4e.getStableStorageKey,TB=YU,mc=kC,n4e=Be,$B="connection",sw="__connection_next_edge_index";function i4e(e,t){var r=e.get(t.dataID);if(r){var n=mc.get(),i=n.EDGES,o=n.END_CURSOR,a=n.HAS_NEXT_PAGE,s=n.HAS_PREV_PAGE,l=n.PAGE_INFO,c=n.PAGE_INFO_TYPE,d=n.START_CURSOR,f=r.getLinkedRecord(t.fieldKey),h=f&&f.getLinkedRecord(l);if(!f){r.setValue(null,t.handleKey,void 0,r.getErrors(t.fieldKey));return}var p=kp(r.getDataID(),t.handleKey),m=r.getLinkedRecord(t.handleKey),g=m??e.get(p),v=g&&g.getLinkedRecord(l);if(g){m==null&&r.setLinkedRecord(g,t.handleKey);var S=g,w=f.getLinkedRecords(i);w&&(w=w.map(function(re){return lw(e,S,re)}));var C=S.getLinkedRecords(i),A=S.getLinkedRecord(l);S.copyFieldsFrom(f),C&&S.setLinkedRecords(C,i),A&&S.setLinkedRecord(A,l);var $=[],R=t.args;if(C&&w)if(R.after!=null){var N,I=(N=v)===null||N===void 0?void 0:N.getValue(o),M=h?.getValue(o),P=v&&R.after===I,B=v&&I===M;if(P||B){var j=new Set;gg(C,$,j),gg(w,$,j)}else return}else if(R.before!=null)if(v&&R.before===v.getValue(d)){var W=new Set;gg(w,$,W),gg(C,$,W)}else return;else $=w;else w?$=w:$=C;if($!=null&&$!==C&&S.setLinkedRecords($,i),v&&h){if(R.after==null&&R.before==null)v.copyFieldsFrom(h);else if(R.before!=null||R.after==null&&R.last){v.setValue(!!h.getValue(s),s);var te=h.getValue(d);typeof te=="string"&&v.setValue(te,d)}else if(R.after!=null||R.before==null&&R.first){v.setValue(!!h.getValue(a),a);var J=h.getValue(o);typeof J=="string"&&v.setValue(J,o)}}}else{var b=e.create(p,f.getType());b.setValue(0,sw),b.copyFieldsFrom(f);var y=f.getLinkedRecords(i);y&&(y=y.map(function(re){return lw(e,b,re)}),b.setLinkedRecords(y,i)),r.setLinkedRecord(b,t.handleKey),v=e.create(kp(b.getDataID(),l),c),v.setValue(!1,a),v.setValue(!1,s),v.setValue(null,o),v.setValue(null,d),h&&v.copyFieldsFrom(h),b.setLinkedRecord(v,l)}}}function o4e(e,t,r){var n=TB($B,t,null);return e.getLinkedRecord(n,r)}function a4e(e,t,r){var n=TB($B,t,null),i=r4e(n,r);return kp(e,i)}function s4e(e,t,r){var n=mc.get(),i=n.CURSOR,o=n.EDGES,a=e.getLinkedRecords(o);if(!a){e.setLinkedRecords([t],o);return}var s;if(r==null)s=a.concat(t);else{s=[];for(var l=!1,c=0;c<a.length;c++){var d=a[c];if(s.push(d),d!=null){var f=d.getValue(i);r===f&&(s.push(t),l=!0)}}l||s.push(t)}e.setLinkedRecords(s,o)}function l4e(e,t,r,n){var i=mc.get(),o=i.NODE,a=kp(t.getDataID(),r.getDataID()),s=e.get(a);return s||(s=e.create(a,n)),s.setLinkedRecord(r,o),s.getValue("cursor")==null&&s.setValue(null,"cursor"),s}function u4e(e,t,r){var n=mc.get(),i=n.CURSOR,o=n.EDGES,a=e.getLinkedRecords(o);if(!a){e.setLinkedRecords([t],o);return}var s;if(r==null)s=[t].concat(a);else{s=[];for(var l=!1,c=0;c<a.length;c++){var d=a[c];if(d!=null){var f=d.getValue(i);r===f&&(s.push(t),l=!0)}s.push(d)}l||s.unshift(t)}e.setLinkedRecords(s,o)}function c4e(e,t){var r=mc.get(),n=r.EDGES,i=r.NODE,o=e.getLinkedRecords(n);if(o){for(var a,s=0;s<o.length;s++){var l=o[s],c=l&&l.getLinkedRecord(i);c!=null&&c.getDataID()===t?a===void 0&&(a=o.slice(0,s)):a!==void 0&&a.push(l)}a!==void 0&&e.setLinkedRecords(a,n)}}function lw(e,t,r){if(r==null)return r;var n=mc.get(),i=n.EDGES,o=t.getValue(sw);typeof o!="number"&&n4e(!1);var a=kp(t.getDataID(),i,o),s=e.create(a,r.getType());return s.copyFieldsFrom(r),s.getValue("cursor")==null&&s.setValue(null,"cursor"),t.setValue(o+1,sw),s}function gg(e,t,r){for(var n=mc.get(),i=n.NODE,o=0;o<e.length;o++){var a=e[o];if(a){var s=a.getLinkedRecord(i),l=s&&s.getDataID();if(l){if(r.has(l))continue;r.add(l)}t.push(a)}}}var Qb={buildConnectionEdge:lw,createEdge:l4e,deleteNode:c4e,getConnection:o4e,getConnectionID:a4e,insertEdgeAfter:s4e,insertEdgeBefore:u4e,update:i4e},d4e=Je.default,Cp=d4e(Vr),gc=Qb,NB=kC,Sd=Be;var f4e={update:function(t,r){var n=t.get(r.dataID);if(n!=null){var i=n.getValue(r.fieldKey);typeof i=="string"?t.delete(i):Array.isArray(i)&&i.forEach(function(o){typeof o=="string"&&t.delete(o)})}}},h4e={update:function(t,r){var n=t.get(r.dataID);if(n!=null){var i=r.handleArgs.connections;i==null&&Sd(!1);var o=n.getValue(r.fieldKey),a=Array.isArray(o)?o:[o];a.forEach(function(s){if(typeof s=="string"){var l=(0,Cp.default)(i),c;try{for(l.s();!(c=l.n()).done;){var d=c.value,f=t.get(d);f!=null&&gc.deleteNode(f,s)}}catch(h){l.e(h)}finally{l.f()}}})}}},p4e={update:DB(gc.insertEdgeAfter)},m4e={update:DB(gc.insertEdgeBefore)},g4e={update:FB(gc.insertEdgeAfter)},v4e={update:FB(gc.insertEdgeBefore)};function DB(e){return function(t,r){var n,i=t.get(r.dataID);if(i!=null){var o=r.handleArgs.connections;o==null&&Sd(!1);var a,s;try{a=i.getLinkedRecord(r.fieldKey)}catch{}if(!a)try{s=i.getLinkedRecords(r.fieldKey)}catch{}if(!(a==null&&s==null)){var l=NB.get(),c=l.NODE,d=l.EDGES,f=(n=s)!==null&&n!==void 0?n:[a],h=(0,Cp.default)(f),p;try{var m=function(){var y=p.value;if(y==null)return"continue";var S=y.getLinkedRecord("node");if(!S)return"continue";var w=S.getDataID(),C=(0,Cp.default)(o),A;try{for(C.s();!(A=C.n()).done;){var $=A.value,R=t.get($);if(R!=null){var N=(g=R.getLinkedRecords(d))===null||g===void 0?void 0:g.some(function(M){var P;return(M==null||(P=M.getLinkedRecord(c))===null||P===void 0?void 0:P.getDataID())===w});if(!N){var I=gc.buildConnectionEdge(t,R,y);I==null&&Sd(!1),e(R,I)}}}}catch(M){C.e(M)}finally{C.f()}};for(h.s();!(p=h.n()).done;)var g,v=m()}catch(b){h.e(b)}finally{h.f()}}}}}function FB(e){return function(t,r){var n,i=t.get(r.dataID);if(i!=null){var o=r.handleArgs,a=o.connections,s=o.edgeTypeName;a==null&&Sd(!1),s==null&&Sd(!1);var l,c;try{l=i.getLinkedRecord(r.fieldKey)}catch{}if(!l)try{c=i.getLinkedRecords(r.fieldKey)}catch{}if(!(l==null&&c==null)){var d=NB.get(),f=d.NODE,h=d.EDGES,p=(n=c)!==null&&n!==void 0?n:[l],m=(0,Cp.default)(p),g;try{var v=function(){var w=g.value;if(w==null)return"continue";var C=w.getDataID(),A=(0,Cp.default)(a),$;try{for(A.s();!($=A.n()).done;){var R=$.value,N=t.get(R);if(N!=null){var I=(b=N.getLinkedRecords(h))===null||b===void 0?void 0:b.some(function(P){var B;return(P==null||(B=P.getLinkedRecord(f))===null||B===void 0?void 0:B.getDataID())===C});if(!I){var M=gc.createEdge(t,N,w,s);M==null&&Sd(!1),e(N,M)}}}}catch(P){A.e(P)}finally{A.f()}};for(m.s();!(g=m.n()).done;)var b,y=v()}catch(S){m.e(S)}finally{m.f()}}}}}var b4e={AppendEdgeHandler:p4e,DeleteRecordHandler:f4e,PrependEdgeHandler:m4e,AppendNodeHandler:g4e,PrependNodeHandler:v4e,DeleteEdgeHandler:h4e},_4e=Qb,Mc=b4e,y4e=Be;function x4e(e){switch(e){case"connection":return _4e;case"deleteRecord":return Mc.DeleteRecordHandler;case"deleteEdge":return Mc.DeleteEdgeHandler;case"appendEdge":return Mc.AppendEdgeHandler;case"prependEdge":return Mc.PrependEdgeHandler;case"appendNode":return Mc.AppendNodeHandler;case"prependNode":return Mc.PrependNodeHandler}y4e(!1)}var S4e=x4e;function w4e(e){return!!(e&&e["@@RelayModernEnvironment"])}var CC=w4e,E4e=Je.default,RC=E4e(Vr),nd=Qb;var k4e=Object.freeze({RANGE_ADD:"RANGE_ADD",RANGE_DELETE:"RANGE_DELETE",NODE_DELETE:"NODE_DELETE"}),C4e=Object.freeze({APPEND:"append",PREPEND:"prepend"});function R4e(e,t,r,n){var i=r?[r]:[],o=n?[n]:[];return e.forEach(function(a){switch(a.type){case"NODE_DELETE":var s=A4e(a,t);s&&(i.push(s),o.push(s));break;case"RANGE_ADD":var l=T4e(a,t);l&&(i.push(l),o.push(l));break;case"RANGE_DELETE":var c=$4e(a,t);c&&(i.push(c),o.push(c));break}}),{optimisticUpdater:function(s,l){i.forEach(function(c){c(s,l)})},updater:function(s,l){o.forEach(function(c){c(s,l)})}}}function A4e(e,t){var r=e.deletedIDFieldName,n=AC(t);return n?function(i,o){var a=i.getRootField(n);if(a){var s=a.getValue(r),l=Array.isArray(s)?s:[s];l.forEach(function(c){c&&typeof c=="string"&&i.delete(c)})}}:null}function T4e(e,t){var r=e.parentID,n=e.connectionInfo,i=e.edgeName;if(!r)return null;var o=AC(t);return!n||!o?null:function(a,s){var l=a.get(r);if(l){var c=a.getRootField(o);if(c){var d=c.getLinkedRecord(i),f=(0,RC.default)(n),h;try{for(f.s();!(h=f.n()).done;){var p=h.value;if(d){var m=nd.getConnection(l,p.key,p.filters);if(m){var g=nd.buildConnectionEdge(a,m,d);if(g)switch(p.rangeBehavior){case"append":nd.insertEdgeAfter(m,g);break;case"prepend":nd.insertEdgeBefore(m,g);break;default:break}}}}}catch(v){f.e(v)}finally{f.f()}}}}}function $4e(e,t){var r=e.parentID,n=e.connectionKeys,i=e.pathToConnection,o=e.deletedIDFieldName;if(!r)return null;var a=AC(t);return a?function(s,l){if(l){var c=[],d=l[a];if(d&&Array.isArray(o)){var f=(0,RC.default)(o),h;try{for(f.s();!(h=f.n()).done;){var p=h.value;d&&typeof d=="object"&&(d=d[p])}}catch(m){f.e(m)}finally{f.f()}Array.isArray(d)?d.forEach(function(m){m&&m.id&&typeof m=="object"&&typeof m.id=="string"&&c.push(m.id)}):d&&d.id&&typeof d.id=="string"&&c.push(d.id)}else d&&typeof o=="string"&&typeof d=="object"&&(d=d[o],typeof d=="string"?c.push(d):Array.isArray(d)&&d.forEach(function(m){typeof m=="string"&&c.push(m)}));N4e(r,n,i,s,c)}}:null}function N4e(e,t,r,n,i){var o=n.get(e);if(o&&!(r.length<2)){for(var a=o,s=1;s<r.length-1;s++)a&&(a=a.getLinkedRecord(r[s]));if(!(!t||!a)){var l=(0,RC.default)(t),c;try{var d=function(){var h=c.value,p=nd.getConnection(a,h.key,h.filters);p&&i.forEach(function(m){nd.deleteNode(p,m)})};for(l.s();!(c=l.n()).done;)d()}catch(f){l.e(f)}finally{l.f()}}}}function AC(e){return e.fragment.selections&&e.fragment.selections.length>0&&e.fragment.selections[0].kind==="LinkedField"?e.fragment.selections[0].name:null}var Yb={MutationTypes:k4e,RangeOperations:C4e,convert:R4e},D4e=wa,F4e=D4e.getRequest,I4e=CC,P4e=Xl,O4e=P4e.createOperationDescriptor,M4e=Yb,L4e=Be;function z4e(e,t){I4e(e)||L4e(!1);var r=F4e(t.mutation);if(r.params.operationKind!=="mutation")throw new Error("commitMutation: Expected mutation operation");var n=t.optimisticUpdater,i=t.configs,o=t.optimisticResponse,a=t.variables,s=O4e(r,a);if(i){var l=M4e.convert(i,r,n);n=l.optimisticUpdater}return e.applyMutation({operation:s,response:o,updater:n})}var U4e=z4e;function B4e(e,t){e.commitUpdate(t)}var j4e=B4e,q4e=Je.default;q4e(or);var V4e=Je.default,YF=V4e(Jl),G4e=wa,K4e=G4e.getRequest,H4e=ts,W4e=H4e.generateUniqueClientID,J4e=CC,Q4e=Xl,Y4e=Q4e.createOperationDescriptor,X4e=Yb,Z4e=Be;function eLe(e,t){J4e(e)||Z4e(!1);var r=K4e(t.mutation);if(r.params.operationKind!=="mutation")throw new Error("commitMutation: Expected mutation operation");if(r.kind!=="Request")throw new Error("commitMutation: Expected mutation to be of type request");var n=t.optimisticResponse,i=t.optimisticUpdater,o=t.updater,a=t.configs,s=t.cacheConfig,l=t.onError,c=t.onUnsubscribe,d=t.variables,f=t.uploadables,h=Y4e(r,d,s,W4e());if(typeof n=="function"&&(n=n()),a){var p=X4e.convert(a,r,i,o);i=p.optimisticUpdater,o=p.updater}var m=[],g=e.executeMutation({operation:h,optimisticResponse:n,optimisticUpdater:i,updater:o,uploadables:f}).subscribe({next:function(b){var y;Array.isArray(b)?b.forEach(function(S){S.errors&&m.push.apply(m,(0,YF.default)(S.errors))}):b.errors&&m.push.apply(m,(0,YF.default)(b.errors)),(y=t.onNext)===null||y===void 0||y.call(t)},complete:function(){var b=t.onCompleted;if(b){var y=e.lookup(h.fragment);b(y.data,m.length!==0?m:null)}},error:l,unsubscribe:c});return{dispose:g.unsubscribe}}var tLe=eLe,rLe=typeof WeakMap=="function",s1=rLe?new WeakMap:new Map;function IB(e,t){if(t!=null){var r={};return Object.assign(r,e),Object.keys(t).forEach(function(n){var i=t[n].get,o=i();if(!s1.has(i))s1.set(i,o),r[n]=o;else{var a=s1.get(i);r[n]=a}}),r}else return e}IB.tests_only_resetDebugCache=void 0;var nLe=IB,XF=Yl;function iLe(e){return function(r,n,i,o,a){var s=e(r,n,i,o,a);return s instanceof Error?XF.create(function(l){return l.error(s)}):XF.from(s)}}var oLe={convertFetch:iLe},aLe=nLe,sLe=oLe,lLe=sLe.convertFetch,l1=Be;function uLe(e,t){var r=lLe(e);function n(i,o,a,s,l){var c=aLe(o,i.providedVariables);if(i.operationKind==="subscription")return t||l1(!1),s&&l1(!1),t(i,c,a);var d=a.poll;return d!=null?(s&&l1(!1),r(i,c,{force:!0}).poll(d)):r(i,c,a,s,l)}return{execute:n}}var cLe={create:uLe},dLe=Je.default;dLe(or);var fLe=pc;fLe.stableCopy;var hLe=Je.default,pLe=hLe(or),mLe=Yl,gLe=Xl,vLe=gLe.createOperationDescriptor,bLe=pm,_Le=bLe.handlePotentialSnapshotErrors,yLe=Jb,xLe=wa,SLe=xLe.getRequest,wLe=Be;function ELe(e,t,r,n){var i,o=SLe(t);o.params.operationKind!=="query"&&wLe(!1);var a=(0,pLe.default)({force:!0},n?.networkCacheConfig),s=vLe(o,r,a),l=(i=n?.fetchPolicy)!==null&&i!==void 0?i:"network-only";function c(d){return _Le(e,d.fieldErrors),d.data}switch(l){case"network-only":return ZF(e,s).map(c);case"store-or-network":return e.check(s).status==="available"?mLe.from(e.lookup(s.fragment)).map(c):ZF(e,s).map(c);default:throw new Error("fetchQuery: Invalid fetchPolicy "+l)}}function ZF(e,t){return yLe.fetchQuery(e,t).map(function(){return e.lookup(t.fragment)})}var kLe=ELe,CLe=Xl,RLe=CLe.createOperationDescriptor,ALe=wa,TLe=ALe.getRequest;function $Le(e,t,r,n){var i=TLe(t);if(i.params.operationKind!=="query")throw new Error("fetchQuery: Expected query operation");var o=RLe(i,r,n);return e.execute({operation:o}).map(function(){return e.lookup(o.fragment).data}).toPromise()}var NLe=$Le,DLe=(function(){function e(){this._preloadableQueries=new Map,this._callbacks=new Map}var t=e.prototype;return t.set=function(n,i){this._preloadableQueries.set(n,i);var o=this._callbacks.get(n);o?.forEach(function(a){try{a(i)}catch(s){setTimeout(function(){throw s},0)}})},t.get=function(n){return this._preloadableQueries.get(n)},t.onLoad=function(n,i){var o,a=(o=this._callbacks.get(n))!==null&&o!==void 0?o:new Set;a.add(i);var s=function(){a.delete(i)};return this._callbacks.set(n,a),{dispose:s}},t.clear=function(){this._preloadableQueries.clear()},e})(),FLe=new DLe,ILe=FLe,PLe=Jb,OLe=PLe.getPromiseForActiveRequest;function MLe(e,t,r){var n,i,o=[],a=OLe(e,r);if(a!=null)o=[r];else{var s,l,c=e.getOperationTracker(),d=c.getPendingOperationsAffectingOwner(r);o=(s=d?.pendingOperations)!==null&&s!==void 0?s:[],a=(l=d?.promise)!==null&&l!==void 0?l:null}if(!a)return null;var f=(n=(i=o)===null||i===void 0?void 0:i.map(function(m){return m.node.params.name}).join(","))!==null&&n!==void 0?n:null;(f==null||f.length===0)&&(f="Unknown pending operation");var h=t.name,p=f===h?"Relay(".concat(f,")"):"Relay(".concat(f,":").concat(h,")");return a.displayName=p,e.__log({name:"pendingoperation.found",fragment:t,fragmentOwner:r,pendingOperations:o}),{promise:a,pendingOperations:o}}var PB=MLe;function LLe(e,t){return e===t&&(e===null||typeof e!="object")}var OB=LLe;function zLe(e,t){return uw(e,t,!0)}function uw(e,t,r){if(e===t||typeof e!="object"||!e||e.constructor!==Object&&!Array.isArray(e)||typeof t!="object"||!t||t.constructor!==Object&&!Array.isArray(t))return t;var n=!1,i=Array.isArray(e)?e:null,o=Array.isArray(t)?t:null;if(i&&o){var a=r&&!Object.isFrozen(o);n=o.reduce(function(h,p,m){var g=i[m],v=uw(g,p,a);return v!==o[m]&&a&&(o[m]=v),h&&v===i[m]},!0)&&i.length===o.length}else if(!i&&!o){var s=e,l=t,c=Object.keys(s),d=Object.keys(l),f=r&&!Object.isFrozen(l);n=d.reduce(function(h,p){var m=s[p],g=uw(m,l[p],f);return g!==l[p]&&f&&(l[p]=g),h&&g===s[p]},!0)&&c.length===d.length}return n?e:t}var Xb=zLe,MB=Je.default,eI=MB(or),TC=MB(Si),ULe=PB,BLe=pm,jLe=BLe.handlePotentialSnapshotErrors,qLe=OB,VLe=Xb,LB=Ko,GLe=Xl,KLe=GLe.createRequestDescriptor,$C=Ea,HLe=$C.areEqualSelectors,WLe=$C.createReaderSelector,JLe=$C.getSelectorsFromObject,QLe=Js,tI=Be,YLe=(function(){function e(r,n,i,o,a){var s=this;(0,TC.default)(this,"_onChange",function(){s._stale=!0,typeof s._callback=="function"&&s._callback()}),this._callback=o,this._context=r,this._data={},this._fragments=n,this._props={},this._resolvers={},this._stale=!1,this._rootIsQueryRenderer=a,this.setProps(i)}var t=e.prototype;return t.dispose=function(){for(var n in this._resolvers)this._resolvers.hasOwnProperty(n)&&zB(this._resolvers[n])},t.resolve=function(){if(this._stale){var n=this._data,i;for(var o in this._resolvers)if(this._resolvers.hasOwnProperty(o)){var a=this._resolvers[o],s=n[o];if(a){var l=a.resolve();(i||l!==s)&&(i=i||(0,eI.default)({},n),i[o]=l)}else{var c=this._props[o],d=c!==void 0?c:null;(i||!qLe(d,s))&&(i=i||(0,eI.default)({},n),i[o]=d)}}this._data=i||n,this._stale=!1}return this._data},t.setCallback=function(n,i){this._callback=i,LB.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT===!0&&this.setProps(n)},t.setProps=function(n){this._props={};var i=JLe(this._fragments,n);for(var o in i)if(i.hasOwnProperty(o)){var a=i[o],s=this._resolvers[o];a==null?(s?.dispose(),s=null):a.kind==="PluralReaderSelector"?s==null?s=new rI(this._context.environment,this._rootIsQueryRenderer,a,this._callback!=null,this._onChange):(s instanceof rI||tI(!1),s.setSelector(a)):s==null?s=new cw(this._context.environment,this._rootIsQueryRenderer,a,this._callback!=null,this._onChange):(s instanceof cw||tI(!1),s.setSelector(a)),this._props[o]=n[o],this._resolvers[o]=s}this._stale=!0},t.setVariables=function(n,i){for(var o in this._resolvers)if(this._resolvers.hasOwnProperty(o)){var a=this._resolvers[o];a&&a.setVariables(n,i)}this._stale=!0},e})(),cw=(function(){function e(r,n,i,o,a){var s=this;(0,TC.default)(this,"_onChange",function(c){s._data=c.data,s._isMissingData=c.isMissingData,s._fieldErrors=c.fieldErrors,s._callback()});var l=r.lookup(i);this._callback=a,this._data=l.data,this._isMissingData=l.isMissingData,this._fieldErrors=l.fieldErrors,this._environment=r,this._rootIsQueryRenderer=n,this._selector=i,LB.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT===!0?o&&(this._subscription=r.subscribe(l,this._onChange)):this._subscription=r.subscribe(l,this._onChange)}var t=e.prototype;return t.dispose=function(){this._subscription&&(this._subscription.dispose(),this._subscription=null)},t.resolve=function(){if(this._isMissingData===!0){var n=ULe(this._environment,this._selector.node,this._selector.owner),i=n?.promise;if(i!=null&&!this._rootIsQueryRenderer){var o,a=(o=n?.pendingOperations)!==null&&o!==void 0?o:[];throw this._environment.__log({name:"suspense.fragment",data:this._data,fragment:this._selector.node,isRelayHooks:!1,isMissingData:this._isMissingData,isPromiseCached:!1,pendingOperations:a}),i}}return jLe(this._environment,this._fieldErrors),this._data},t.setSelector=function(n){if(!(this._subscription!=null&&HLe(n,this._selector))){this.dispose();var i=this._environment.lookup(n);this._data=VLe(this._data,i.data),this._isMissingData=i.isMissingData,this._fieldErrors=i.fieldErrors,this._selector=n,this._subscription=this._environment.subscribe(i,this._onChange)}},t.setVariables=function(n,i){if(!QLe(n,this._selector.variables)){var o=KLe(i,n),a=WLe(this._selector.node,this._selector.dataID,n,o);this.setSelector(a)}},e})(),rI=(function(){function e(r,n,i,o,a){var s=this;(0,TC.default)(this,"_onChange",function(l){s._stale=!0,s._callback()}),this._callback=a,this._data=[],this._environment=r,this._resolvers=[],this._stale=!0,this._rootIsQueryRenderer=n,this._subscribeOnConstruction=o,this.setSelector(i)}var t=e.prototype;return t.dispose=function(){this._resolvers.forEach(zB)},t.resolve=function(){if(this._stale){for(var n=this._data,i,o=0;o<this._resolvers.length;o++){var a=n[o],s=this._resolvers[o].resolve();(i||s!==a)&&(i=i||n.slice(0,o),i.push(s))}!i&&this._resolvers.length!==n.length&&(i=n.slice(0,this._resolvers.length)),this._data=i||n,this._stale=!1}return this._data},t.setSelector=function(n){for(var i=n.selectors;this._resolvers.length>i.length;){var o=this._resolvers.pop();o.dispose()}for(var a=0;a<i.length;a++)a<this._resolvers.length?this._resolvers[a].setSelector(i[a]):this._resolvers[a]=new cw(this._environment,this._rootIsQueryRenderer,i[a],this._subscribeOnConstruction,this._onChange);this._stale=!0},t.setVariables=function(n,i){this._resolvers.forEach(function(o){return o.setVariables(n,i)}),this._stale=!0},e})();function zB(e){e&&e.dispose()}var XLe=YLe,ZLe=XLe;function e8e(e,t,r,n,i,o){return new ZLe(e,r,n,o,i)}var t8e=e8e,r8e=Be,u1,nI;function n8e(e){return u1||(u1=e.createContext(null),nI=e),e!==nI&&r8e(!1),u1}var i8e=n8e,o8e=Be,c1,iI;function a8e(e){return c1||(c1=e.createContext(null),iI=e),e!==iI&&o8e(!1),c1}var s8e=a8e,UB=Object.freeze({__LIVE_RESOLVER_SUSPENSE_SENTINEL:!0});function l8e(){return UB}function u8e(e){return e===UB}var Zb={isSuspenseSentinel:u8e,suspenseSentinel:l8e},BB={exports:{}};(function(e){function t(r,n){if(r==null)return{};var i={};for(var o in r)if({}.hasOwnProperty.call(r,o)){if(n.indexOf(o)!==-1)continue;i[o]=r[o]}return i}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(BB);var yf=BB.exports,e_=Je.default,c8e=e_(Si),oI=e_(yf),aI=e_(LU),Cl=e_(or),d8e=wB,jB=ts,qB=jB.generateClientObjectClientID;jB.isClientID;var f8e=Zb,VB=f8e.isSuspenseSentinel,Qs=Sr,dw=Qs.ACTOR_IDENTIFIER_KEY,Gn=Qs.ERRORS_KEY,NC=Qs.ID_KEY,h8e=Qs.INVALIDATED_AT_KEY,Vl=Qs.REF_KEY,qd=Qs.REFS_KEY,GB=Qs.RELAY_RESOLVER_VALUE_KEY;Qs.ROOT_ID;var DC=Qs.TYPENAME_KEY,d1=Js,rc=Be;function p8e(e){return(0,Cl.default)({},e)}function m8e(e,t){for(var r in e)e.hasOwnProperty(r)&&r!==NC&&r!==DC&&(t[r]=e[r])}function g8e(e,t){var r={};return r[NC]=e,r[DC]=t,r}function v8e(e){return e}function b8e(e){return e[NC]}function _8e(e){return Gn in e?Object.keys(e).filter(function(t){return t!==Gn}):Object.keys(e)}function y8e(e){return e[DC]}function x8e(e,t){var r;return(r=e[Gn])===null||r===void 0?void 0:r[t]}function FC(e,t){var r=e[t];return r&&typeof r=="object"&&(!r.hasOwnProperty(Vl)&&!r.hasOwnProperty(qd)||rc(!1)),r}function S8e(e,t){return t in e}function w8e(e,t){var r=e[t];if(r==null)return r;var n=r;return typeof n=="object"&&n&&typeof n[Vl]=="string"||rc(!1),n[Vl]}function E8e(e,t){var r=e[t];if(r==null)return!1;var n=r;return typeof n=="object"&&n&&typeof n[Vl]=="string"}function k8e(e,t){var r=e[t];return r==null?r:(typeof r=="object"&&Array.isArray(r[qd])||rc(!1),r[qd])}function C8e(e,t){var r=e[t];return r==null?!1:typeof r=="object"&&Array.isArray(r[qd])&&r[qd].every(function(n){return typeof n=="string"})}function R8e(e){if(e==null)return null;var t=e[h8e];return typeof t!="number"?null:t}function A8e(e,t){var r,n=e[Gn],i=t[Gn],o=null;if(n==null&&i==null){var a;for(var s in t)(o||!d1(e[s],t[s]))&&(o=o!==null?o:(0,Cl.default)({},e),o[s]=t[s]);return(a=o)!==null&&a!==void 0?a:e}for(var l in t)if(l!==Gn){var c=t[l],d=i?.[l];if(o==null){var f=e[l],h=n?.[l];if(d1(f,c)&&d1(h,d))continue;o=(0,Cl.default)({},e),n!=null&&(o[Gn]=(0,Cl.default)({},n))}HB(o,l,c),KB(o,l,d)}return(r=o)!==null&&r!==void 0?r:e}function T8e(e,t){if(Gn in e||Gn in t){var r=e[Gn],n=(0,oI.default)(e,[Gn].map(aI.default)),i=t[Gn],o=(0,oI.default)(t,[Gn].map(aI.default)),a=(0,Cl.default)((0,Cl.default)({},n),o);if(r==null&&i==null)return a;var s={};for(var l in r)o.hasOwnProperty(l)||(s[l]=r[l]);for(var c in i)s[c]=i[c];for(var d in s){a[Gn]=s;break}return a}else return(0,Cl.default)((0,Cl.default)({},e),t)}function $8e(e){d8e(e)}function KB(e,t,r){var n=e[Gn];if(r!=null&&r.length>0)n==null?e[Gn]=(0,c8e.default)({},t,r):n[t]=r;else if(n!=null&&delete n[t]){for(var i in n)if(n.hasOwnProperty(i))return;delete e[Gn]}}function HB(e,t,r){e[t]=r}function N8e(e,t,r){var n={};n[Vl]=r,e[t]=n}function D8e(e,t,r){var n={};n[qd]=r,e[t]=n}function F8e(e,t,r,n){var i={};i[Vl]=n,i[dw]=r,e[t]=i}function I8e(e,t){var r=e[t];return r==null?r:(typeof r=="object"&&typeof r[Vl]=="string"&&r[dw]!=null||rc(!1),[r[dw],r[Vl]])}function P8e(e,t){var r=FC(e,GB);return r==null||VB(r)?null:(typeof r=="object"&&(r=r.id),typeof r!="string"&&rc(!1),qB(t,r))}function O8e(e,t){var r=FC(e,GB);return r==null||VB(r)?null:(Array.isArray(r)||rc(!1),r.map(function(n){return n==null?null:(typeof n=="object"&&(n=n.id),typeof n!="string"&&rc(!1),qB(t,n))}))}function M8e(e){return e}var fo={clone:p8e,copyFields:m8e,create:g8e,freeze:$8e,fromObject:v8e,getDataID:b8e,getErrors:x8e,getFields:_8e,getInvalidationEpoch:R8e,getLinkedRecordID:w8e,getLinkedRecordIDs:k8e,getType:y8e,getValue:FC,hasValue:S8e,hasLinkedRecordID:E8e,hasLinkedRecordIDs:C8e,merge:T8e,setErrors:KB,setValue:HB,setLinkedRecordID:N8e,setLinkedRecordIDs:D8e,update:A8e,getActorLinkedRecordID:I8e,setActorLinkedRecordID:F8e,getResolverLinkedRecordID:P8e,getResolverLinkedRecordIDs:O8e,toJSON:M8e},L8e={EXISTENT:"EXISTENT",NONEXISTENT:"NONEXISTENT",UNKNOWN:"UNKNOWN"},t_=L8e,z8e=Je.default,U8e=z8e(Vr),sI=fo,IC=t_,B8e=IC.EXISTENT,j8e=IC.NONEXISTENT,q8e=IC.UNKNOWN,V8e=(function(){function e(r){var n=this;this._records=new Map,r!=null&&Object.keys(r).forEach(function(i){var o=r[i],a=sI.fromObject(o);n._records.set(i,a)})}e.create=function(n){return new e(n)};var t=e.prototype;return t.clear=function(){this._records=new Map},t.delete=function(n){this._records.set(n,null)},t.get=function(n){return this._records.get(n)},t.getRecordIDs=function(){return Array.from(this._records.keys())},t.getStatus=function(n){return this._records.has(n)?this._records.get(n)==null?j8e:B8e:q8e},t.has=function(n){return this._records.has(n)},t.remove=function(n){this._records.delete(n)},t.set=function(n,i){this._records.set(n,i)},t.size=function(){return this._records.size},t.toJSON=function(){var n={},i=(0,U8e.default)(this._records),o;try{for(i.s();!(o=i.n()).done;){var a=o.value,s=a[0],l=a[1];n[s]=sI.toJSON(l)}}catch(c){i.e(c)}finally{i.f()}return n},e})(),vc=V8e,G8e=Be,WB="INTERNAL_ACTOR_IDENTIFIER_DO_NOT_USE";function K8e(e){e!==WB&&G8e(!1)}var PC={assertInternalActorIdentifier:K8e,getActorIdentifier:function(t){return t},INTERNAL_ACTOR_IDENTIFIER_DO_NOT_USE:WB},fw="actor_key",H8e=PC,W8e=H8e.getActorIdentifier;function J8e(e){if(e!=null&&typeof e=="object"&&typeof e[fw]=="string")return W8e(e[fw])}var Q8e={ACTOR_IDENTIFIER_FIELD_NAME:fw,getActorIdentifierFromPayload:J8e},r_=Je.default,lI=r_(or),Y8e=r_(yf),JB=r_(Vr),X8e=r_(Jl),Z8e=["path","locations"],hw=Symbol("$SELF");function e5e(e){if(e==null)return null;var t=new Map,r=(0,JB.default)(e),n;try{for(r.s();!(n=r.n()).done;){var i=n.value,o=i.path,a=i.locations,s=(0,Y8e.default)(i,Z8e);if(o!=null){var l=o.length;if(l!==0){for(var c=l-1,d=t,f=0;f<c;f++){var h=o[f],p=d.get(h);if(p instanceof Map){d=p;continue}var m=new Map;Array.isArray(p)&&m.set(hw,p),d.set(h,m),d=m}var g=o[c],v=d.get(g);v instanceof Map&&(d=v,v=d.get(g),g=hw),Array.isArray(v)?v.push(s):d.set(g,[s])}}}}catch(b){r.e(b)}finally{r.f()}return t}function t5e(e,t){var r=e.get(t);if(r==null)return null;if(Array.isArray(r))return r;var n=[];return QB(r,n),n}function QB(e,t){var r=(0,JB.default)(e),n;try{for(r.s();!(n=r.n()).done;){var i=n.value,o=i[0],a=i[1],s=t.length;if(Array.isArray(a)?t.push.apply(t,(0,X8e.default)(a)):QB(a,t),o!==hw)for(var l=t.length,c=s;c<l;c++){var d=t[c];d.path==null?t[c]=(0,lI.default)((0,lI.default)({},d),{},{path:[o]}):d.path.unshift(o)}}}catch(f){r.e(f)}finally{r.f()}}function r5e(e,t){var r=e.get(t);return r instanceof Map?r:null}var n5e={buildErrorTrie:e5e,getNestedErrorTrieByKey:r5e,getErrorsByKey:t5e},i5e="client:__type:",o5e="__TypeSchema";function a5e(e){return i5e+e}var n_={generateTypeID:a5e,TYPE_SCHEMA_TYPE:o5e},YB=Je.default,s5e=YB(Vr),Wf=YB(Jl),XB=Q8e;XB.ACTOR_IDENTIFIER_FIELD_NAME;var l5e=XB.getActorIdentifierFromPayload,uI=Ko,ZB=ts,f1=ZB.generateClientID,u5e=ZB.isClientID,c5e=Ql,d5e=c5e.getLocalVariables,OC=n5e,f5e=OC.buildErrorTrie,h5e=OC.getErrorsByKey,cI=OC.getNestedErrorTrieByKey,xt=fo,p5e=Ea,m5e=p5e.createNormalizationSelector,bc=Sr,g5e=bc.ROOT_ID,v5e=bc.TYPENAME_KEY,dI=bc.getArgumentValues,b5e=bc.getHandleStorageKey,_5e=bc.getModuleComponentKey,y5e=bc.getModuleOperationKey,h1=bc.getStorageKey,ej=n_,p1=ej.TYPE_SCHEMA_TYPE,m1=ej.generateTypeID,Ri=Be;function x5e(e,t,r,n,i,o){var a=t.dataID,s=t.node,l=t.variables,c=new S5e(e,l,n,o??!1);return c.normalizeResponse(s,a,r,i)}var S5e=(function(){function e(r,n,i,o){this._actorIdentifier=i.actorIdentifier,this._getDataId=i.getDataID,this._handleFieldPayloads=[],this._treatMissingFieldsAsNull=i.treatMissingFieldsAsNull,this._incrementalPlaceholders=[],this._isClientExtension=!1,this._isUnmatchedAbstractType=!1,this._useExecTimeResolvers=o,this._followupPayloads=[],this._path=i.path?(0,Wf.default)(i.path):[],this._recordSource=r,this._variables=n,this._shouldProcessClientComponents=i.shouldProcessClientComponents,this._log=i.log}var t=e.prototype;return t.normalizeResponse=function(n,i,o,a){var s=this._recordSource.get(i);return s||Ri(!1),this._assignClientAbstractTypes(n),this._errorTrie=f5e(a),this._traverseSelections(n,s,o),{errors:a,fieldPayloads:this._handleFieldPayloads,incrementalPlaceholders:this._incrementalPlaceholders,followupPayloads:this._followupPayloads,source:this._recordSource,isFinal:!1}},t._assignClientAbstractTypes=function(n){var i=n.clientAbstractTypes;if(i!=null)for(var o=0,a=Object.keys(i);o<a.length;o++){var s=a[o],l=(0,s5e.default)(i[s]),c;try{for(l.s();!(c=l.n()).done;){var d=c.value,f=m1(d),h=this._recordSource.get(f);h==null&&(h=xt.create(f,p1),this._recordSource.set(f,h)),xt.setValue(h,s,!0)}}catch(p){l.e(p)}finally{l.f()}}},t._getVariableValue=function(n){return this._variables.hasOwnProperty(n)||Ri(!1),this._variables[n]},t._getRecordType=function(n){var i=n[v5e];return i==null&&Ri(!1),i},t._traverseSelections=function(n,i,o){for(var a=0;a<n.selections.length;a++){var s=n.selections[a];switch(s.kind){case"ScalarField":case"LinkedField":this._normalizeField(s,i,o);break;case"Condition":var l=!!this._getVariableValue(s.condition);l===s.passingValue&&this._traverseSelections(s,i,o);break;case"FragmentSpread":{var c=this._variables;this._variables=d5e(this._variables,s.fragment.argumentDefinitions,s.args),this._traverseSelections(s.fragment,i,o),this._variables=c;break}case"InlineFragment":{var d=s.abstractKey;if(d==null){var f=xt.getType(i);f===s.type&&this._traverseSelections(s,i,o)}else{var h=Object.prototype.hasOwnProperty.call(o,d),p=xt.getType(i),m=m1(p),g=this._recordSource.get(m);g==null&&(g=xt.create(m,p1),this._recordSource.set(m,g)),xt.setValue(g,d,h),h&&this._traverseSelections(s,i,o)}break}case"TypeDiscriminator":{var v=s.abstractKey,b=Object.prototype.hasOwnProperty.call(o,v),y=xt.getType(i),S=m1(y),w=this._recordSource.get(S);w==null&&(w=xt.create(S,p1),this._recordSource.set(S,w)),xt.setValue(w,v,b);break}case"LinkedHandle":case"ScalarHandle":var C=s.args?dI(s.args,this._variables):{},A=h1(s,this._variables),$=b5e(s,this._variables);this._handleFieldPayloads.push({args:C,dataID:xt.getDataID(i),fieldKey:A,handle:s.handle,handleKey:$,handleArgs:s.handleArgs?dI(s.handleArgs,this._variables):{}});break;case"ModuleImport":this._normalizeModuleImport(s,i,o);break;case"Defer":this._normalizeDefer(s,i,o);break;case"Stream":this._normalizeStream(s,i,o);break;case"ClientExtension":var R=this._isClientExtension;this._isClientExtension=!0,this._traverseSelections(s,i,o),this._isClientExtension=R;break;case"ClientComponent":if(this._shouldProcessClientComponents===!1)break;this._traverseSelections(s.fragment,i,o);break;case"ActorChange":this._normalizeActorChange(s,i,o);break;case"RelayResolver":case"RelayLiveResolver":this._useExecTimeResolvers||this._normalizeResolver(s,i,o);break;case"ClientEdgeToClientObject":this._useExecTimeResolvers||this._normalizeResolver(s.backingField,i,o);break;default:Ri(!1)}}},t._normalizeResolver=function(n,i,o){n.fragment!=null&&this._traverseSelections(n.fragment,i,o)},t._normalizeDefer=function(n,i,o){var a=n.if===null||this._getVariableValue(n.if);a===!1?this._traverseSelections(n,i,o):this._incrementalPlaceholders.push({kind:"defer",data:o,label:n.label,path:(0,Wf.default)(this._path),selector:m5e(n,xt.getDataID(i),this._variables),typeName:xt.getType(i),actorIdentifier:this._actorIdentifier})},t._normalizeStream=function(n,i,o){this._traverseSelections(n,i,o);var a=n.if===null||this._getVariableValue(n.if);a===!0&&this._incrementalPlaceholders.push({kind:"stream",label:n.label,path:(0,Wf.default)(this._path),parentID:xt.getDataID(i),node:n,variables:this._variables,actorIdentifier:this._actorIdentifier})},t._normalizeModuleImport=function(n,i,o){typeof o=="object"&&o||Ri(!1);var a=xt.getType(i),s=_5e(n.documentName),l=n.componentModuleProvider||o[s];xt.setValue(i,s,l??null);var c=y5e(n.documentName),d=n.operationModuleProvider||o[c];xt.setValue(i,c,d??null),d!=null&&this._followupPayloads.push({kind:"ModuleImportPayload",args:n.args,data:o,dataID:xt.getDataID(i),operationReference:d,path:(0,Wf.default)(this._path),typeName:a,variables:this._variables,actorIdentifier:this._actorIdentifier})},t._normalizeField=function(n,i,o){typeof o=="object"&&o||Ri(!1);var a=n.alias||n.name,s=h1(n,this._variables),l=o[a],c=uI.ENABLE_NONCOMPLIANT_ERROR_HANDLING_ON_LISTS&&Array.isArray(l)&&l.length===0;if(l==null||c){if(l===void 0){var d=this._isClientExtension||this._isUnmatchedAbstractType;if(d)return;if(!this._treatMissingFieldsAsNull)return}n.kind==="ScalarField"&&this._validateConflictingFieldsWithIdenticalId(i,s,null),c?n.kind==="LinkedField"?xt.setLinkedRecordIDs(i,s,[]):xt.setValue(i,s,[]):xt.setValue(i,s,null);var f=this._errorTrie;if(f!=null){var h=h5e(f,a);h!=null&&xt.setErrors(i,s,h)}return}if(n.kind==="ScalarField")this._validateConflictingFieldsWithIdenticalId(i,s,l),xt.setValue(i,s,l);else if(n.kind==="LinkedField"){this._path.push(a);var p=this._errorTrie;this._errorTrie=p==null?null:cI(p,a),n.plural?this._normalizePluralLink(n,i,s,l):this._normalizeLink(n,i,s,l),this._errorTrie=p,this._path.pop()}else Ri(!1)},t._normalizeActorChange=function(n,i,o){var a,s=n.linkedField;typeof o=="object"&&o||Ri(!1);var l=s.alias||s.name,c=h1(s,this._variables),d=o[l];if(d==null){if(d===void 0){var f=this._isClientExtension||this._isUnmatchedAbstractType;if(f)return;if(!this._treatMissingFieldsAsNull)return}xt.setValue(i,c,null);return}var h=l5e(d);if(h==null){xt.setValue(i,c,null);return}var p=(a=s.concreteType)!==null&&a!==void 0?a:this._getRecordType(d),m=this._getDataId(d,p)||xt.getLinkedRecordID(i,c)||f1(xt.getDataID(i),c);typeof m!="string"&&Ri(!1),xt.setActorLinkedRecordID(i,c,h,m),this._followupPayloads.push({kind:"ActorPayload",data:d,dataID:m,path:[].concat((0,Wf.default)(this._path),[l]),typeName:p,variables:this._variables,node:s,actorIdentifier:h})},t._normalizeLink=function(n,i,o,a){var s;typeof a=="object"&&a||Ri(!1);var l=this._getDataId(a,(s=n.concreteType)!==null&&s!==void 0?s:this._getRecordType(a))||xt.getLinkedRecordID(i,o)||f1(xt.getDataID(i),o);typeof l!="string"&&Ri(!1),this._validateConflictingLinkedFieldsWithIdenticalId(xt.getLinkedRecordID(i,o),l,o),xt.setLinkedRecordID(i,o,l);var c=this._recordSource.get(l);if(c)this._validateRecordType(c,n,a);else{var d=n.concreteType||this._getRecordType(a);c=xt.create(l,d),this._recordSource.set(l,c)}this._traverseSelections(n,c,a)},t._normalizePluralLink=function(n,i,o,a){var s=this;Array.isArray(a)||Ri(!1);var l=xt.getLinkedRecordIDs(i,o),c=[];a.forEach(function(d,f){var h;if(d==null){c.push(d);return}s._path.push(String(f));var p=s._errorTrie;s._errorTrie=p==null?null:cI(p,f),typeof d!="object"&&Ri(!1);var m=s._getDataId(d,(h=n.concreteType)!==null&&h!==void 0?h:s._getRecordType(d))||l&&l[f]||f1(xt.getDataID(i),o,f);typeof m!="string"&&Ri(!1),c.push(m);var g=s._recordSource.get(m);if(g)s._validateRecordType(g,n,d);else{var v=n.concreteType||s._getRecordType(d);g=xt.create(m,v),s._recordSource.set(m,g)}l&&s._validateConflictingLinkedFieldsWithIdenticalId(l[f],m,o),s._traverseSelections(n,g,d),s._errorTrie=p,s._path.pop()}),xt.setLinkedRecordIDs(i,o,c)},t._validateRecordType=function(n,i,o){if(uI.ENABLE_STORE_ID_COLLISION_LOGGING){var a,s=(a=i.concreteType)!==null&&a!==void 0?a:this._getRecordType(o),l=xt.getDataID(n),c=u5e(l)&&l!==g5e||xt.getType(n)===s;if(!c){var d={name:"idCollision.typename",previous_typename:xt.getType(n),new_typename:s};this._log!=null&&this._log(d)}}},t._validateConflictingFieldsWithIdenticalId=function(n,i,o){},t._validateConflictingLinkedFieldsWithIdenticalId=function(n,i,o){},e})(),tj={normalize:x5e},i_=Je.default,fI=i_(or),w5e=i_(fo),E5e=i_(vc),k5e=i_(tj);function C5e(e,t,r,n,i){var o,a=e.data,s=e.errors,l=E5e.default.create(),c=w5e.default.create(t.dataID,r);l.set(t.dataID,c);var d=k5e.default.normalize(l,t,a,n,s,i);return(0,fI.default)((0,fI.default)({},d),{},{isFinal:((o=e.extensions)===null||o===void 0?void 0:o.is_final)===!0})}var R5e=C5e,A5e=wa,T5e=A5e.getInlineDataFragment,$5e=Sr,N5e=$5e.FRAGMENTS_KEY,hI=Be;function D5e(e,t){var r,n=T5e(e);if(t==null)return t;typeof t!="object"&&hI(!1);var i=(r=t[N5e])===null||r===void 0?void 0:r[n.name];return i==null&&hI(!1),i}var F5e=D5e,I5e=1e5;function P5e(){return I5e++}var rj=P5e,O5e=rj;function M5e(e,t){return{execute:function(n,i,o,a,s,l,c,d){var f=O5e(),h={start:function(g){e.__log({name:"network.start",networkRequestId:f,params:n,variables:i,cacheConfig:o})},next:function(g){e.__log({name:"network.next",networkRequestId:f,response:g})},error:function(g){e.__log({name:"network.error",networkRequestId:f,error:g})},complete:function(){e.__log({name:"network.complete",networkRequestId:f})},unsubscribe:function(){e.__log({name:"network.unsubscribe",networkRequestId:f})}},p=function(g){e.__log({name:"network.info",networkRequestId:f,info:g})};return t.execute(n,i,o,a,p,l,c,d).do(h)}}}var L5e=M5e,z5e=Je.default,Jf=z5e(Vr),U5e=Be,B5e=(function(){function e(){this._ownersToPendingOperations=new Map,this._pendingOperationsToOwners=new Map,this._ownersToPendingPromise=new Map}var t=e.prototype;return t.update=function(n,i){if(i.size!==0){var o=n.identifier,a=new Set,s=(0,Jf.default)(i),l;try{for(s.s();!(l=s.n()).done;){var c=l.value,d=c.identifier,f=this._ownersToPendingOperations.get(d);f!=null?f.has(o)||(f.set(o,n),a.add(d)):(this._ownersToPendingOperations.set(d,new Map([[o,n]])),a.add(d))}}catch(v){s.e(v)}finally{s.f()}if(a.size!==0){var h=this._pendingOperationsToOwners.get(o)||new Set,p=(0,Jf.default)(a),m;try{for(p.s();!(m=p.n()).done;){var g=m.value;this._resolveOwnerResolvers(g),h.add(g)}}catch(v){p.e(v)}finally{p.f()}this._pendingOperationsToOwners.set(o,h)}}},t.complete=function(n){var i=n.identifier,o=this._pendingOperationsToOwners.get(i);if(o!=null){var a=new Set,s=new Set,l=(0,Jf.default)(o),c;try{for(l.s();!(c=l.n()).done;){var d=c.value,f=this._ownersToPendingOperations.get(d);f&&(f.delete(i),f.size>0?s.add(d):a.add(d))}}catch(y){l.e(y)}finally{l.f()}var h=(0,Jf.default)(a),p;try{for(h.s();!(p=h.n()).done;){var m=p.value;this._resolveOwnerResolvers(m),this._ownersToPendingOperations.delete(m)}}catch(y){h.e(y)}finally{h.f()}var g=(0,Jf.default)(s),v;try{for(g.s();!(v=g.n()).done;){var b=v.value;this._resolveOwnerResolvers(b)}}catch(y){g.e(y)}finally{g.f()}this._pendingOperationsToOwners.delete(i)}},t._resolveOwnerResolvers=function(n){var i=this._ownersToPendingPromise.get(n);i?.resolve(),this._ownersToPendingPromise.delete(n)},t.getPendingOperationsAffectingOwner=function(n){var i=n.identifier,o=this._ownersToPendingOperations.get(i);if(o==null||o.size===0)return null;var a=this._ownersToPendingPromise.get(i);if(a!=null)return{promise:a.promise,pendingOperations:a.pendingOperations};var s,l=new Promise(function(d){s=d});s==null&&U5e(!1);var c=Array.from(o.values());return this._ownersToPendingPromise.set(i,{promise:l,resolve:s,pendingOperations:c}),{promise:l,pendingOperations:c}},e})(),j5e=B5e;function q5e(e){var t=typeof v0<"u"?v0:typeof window<"u"?window:void 0,r=t&&t.__RELAY_DEVTOOLS_HOOK__;r&&r.registerEnvironment(e)}var V5e=q5e,G5e=ts,K5e=G5e.generateClientID,H5e=Sr,W5e=H5e.ROOT_ID,J5e=K5e(W5e,"viewer"),Q5e="Viewer",MC={VIEWER_ID:J5e,VIEWER_TYPE:Q5e},nj=MC,Y5e=nj.VIEWER_ID,X5e=nj.VIEWER_TYPE;function Z5e(e,t){return t===X5e&&e.id==null?Y5e:e.id}var ij=Z5e,eze=function(t){},tze=eze,oj=hc,rze=oj.REQUEST,nze=oj.SPLIT_OPERATION;function ize(e){switch(e.kind){case rze:return e.operation;case nze:default:return e}}var LC=ize;function pI(e,t,r){for(var n=arguments.length,i=new Array(n>3?n-3:0),o=3;o<n;o++)i[o-3]=arguments[o];var a=0,s=r.replace(/%s/g,function(){return String(i[a++])}),l=new Error(s),c=Object.assign(l,{name:t,messageFormat:r,messageParams:i,type:e,taalOpcodes:[2,2]});if(c.stack===void 0)try{throw c}catch{}return c}var oze={create:function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),o=2;o<n;o++)i[o-2]=arguments[o];return pI.apply(void 0,["error",t,r].concat(i))},createWarning:function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),o=2;o<n;o++)i[o-2]=arguments[o];return pI.apply(void 0,["warn",t,r].concat(i))}},g1,v1,aze=typeof window<"u"&&typeof((g1=window)===null||g1===void 0||(v1=g1.performance)===null||v1===void 0?void 0:v1.now)=="function";function mI(){return aze?window.performance.now():Date.now()}function sze(e){var t=mI(),r=e();return[t,mI()-t,r]}var lze=sze,aj=Je.default,Qf=aj(Vr),Yf=aj(Jl),b1=Yl,uze=rj,_1=LC,cze=oze,vg=Ko,dze=pc,fze=dze.stableCopy,hze=lze,sj=ts,gI=sj.generateClientID,pze=sj.generateUniqueClientID,mze=Ql,gze=mze.getLocalVariables,bg=fo,lj=Ea,y1=lj.createNormalizationSelector,vze=lj.createReaderSelector,_g=vc,zC=Sr,vI=zC.ROOT_TYPE,bze=zC.TYPENAME_KEY,_ze=zC.getStorageKey,Wr=Be;function yze(e){return new xze(e)}var xze=(function(){function e(r){var n=this,i,o,a,s=r.actorIdentifier,l=r.getDataID,c=r.getPublishQueue,d=r.getStore,f=r.isClientPayload,h=r.operation,p=r.operationExecutions,m=r.operationLoader,g=r.operationTracker,v=r.optimisticConfig,b=r.scheduler,y=r.shouldProcessClientComponents,S=r.sink,w=r.source,C=r.treatMissingFieldsAsNull,A=r.updater,$=r.log,R=r.normalizeResponse;this._actorIdentifier=s,this._getDataID=l,this._treatMissingFieldsAsNull=C,this._incrementalPayloadsPending=!1,this._incrementalResults=new Map,this._log=$,this._executeId=uze(),this._nextSubscriptionId=0,this._operation=h,this._operationExecutions=p,this._operationLoader=m,this._operationTracker=g,this._operationUpdateEpochs=new Map,this._optimisticUpdates=null,this._useExecTimeResolvers=(i=(o=this._operation.request.node.operation.use_exec_time_resolvers)!==null&&o!==void 0?o:((a=this._operation.request.node.operation.exec_time_resolvers_enabled_provider)===null||a===void 0?void 0:a.get())===!0)!==null&&i!==void 0?i:!1,this._execTimeResolverResponseComplete=!1,this._pendingModulePayloadsCount=0,this._getPublishQueue=c,this._scheduler=b,this._sink=S,this._source=new Map,this._state="started",this._getStore=d,this._subscriptions=new Map,this._updater=A,this._isClientPayload=f===!0,this._isSubscriptionOperation=this._operation.request.node.params.operationKind==="subscription",this._shouldProcessClientComponents=y,this._retainDisposables=new Map,this._seenActors=new Set,this._completeFns=[],this._normalizeResponse=R;var N=this._nextSubscriptionId++;vg.PROCESS_OPTIMISTIC_UPDATE_BEFORE_SUBSCRIPTION&&v!=null&&this._processOptimisticResponse(v.response!=null?{data:v.response}:null,v.updater,!1),w.subscribe({complete:function(){return n._complete(N)},error:function(M){return n._error(M)},next:function(M){try{n._next(N,M)}catch(P){S.error(P)}},start:function(M){var P;n._start(N,M),n._log({name:"execute.start",executeId:n._executeId,params:n._operation.request.node.params,variables:n._operation.request.variables,cacheConfig:(P=n._operation.request.cacheConfig)!==null&&P!==void 0?P:{}})},unsubscribe:function(){n._log({name:"execute.unsubscribe",executeId:n._executeId})}}),!vg.PROCESS_OPTIMISTIC_UPDATE_BEFORE_SUBSCRIPTION&&v!=null&&this._processOptimisticResponse(v.response!=null?{data:v.response}:null,v.updater,!1)}var t=e.prototype;return t.cancel=function(){var n=this;if(this._state!=="completed"){this._state="completed",this._operationExecutions.delete(this._operation.request.identifier),this._subscriptions.size!==0&&(this._subscriptions.forEach(function(o){return o.unsubscribe()}),this._subscriptions.clear());var i=this._optimisticUpdates;i!==null&&(this._optimisticUpdates=null,i.forEach(function(o){return n._getPublishQueueAndSaveActor().revertUpdate(o)}),this._runPublishQueue()),this._incrementalResults.clear(),this._asyncStoreUpdateDisposable!=null&&(this._asyncStoreUpdateDisposable.dispose(),this._asyncStoreUpdateDisposable=null),this._completeFns=[],this._completeOperationTracker(),this._disposeRetainedData()}},t._updateActiveState=function(){var n;switch(this._state){case"started":{n="active";break}case"loading_incremental":{n="active";break}case"completed":{n="inactive";break}case"loading_final":{n=this._pendingModulePayloadsCount>0||this._useExecTimeResolvers&&!this._execTimeResolverResponseComplete?"active":"inactive";break}default:this._state,Wr(!1)}this._operationExecutions.set(this._operation.request.identifier,n)},t._schedule=function(n,i){var o=this,a=this._scheduler;if(a!=null){var s=this._nextSubscriptionId++;b1.create(function(l){var c=a.schedule(function(){try{n(),l.complete()}catch(d){l.error(d)}},i);return function(){return a.cancel(c)}}).subscribe({complete:function(){return o._complete(s)},error:function(c){return o._error(c)},start:function(c){return o._start(s,c)}})}else n()},t._complete=function(n){this._subscriptions.delete(n),this._subscriptions.size===0&&(this.cancel(),this._sink.complete(),this._log({name:"execute.complete",executeId:this._executeId}))},t._error=function(n){this.cancel(),this._sink.error(n),this._log({name:"execute.error",executeId:this._executeId,error:n})},t._start=function(n,i){this._subscriptions.set(n,i),this._updateActiveState()},t._next=function(n,i){var o=this,a=this._state==="loading_incremental"?"low":"default";this._schedule(function(){o._log({name:"execute.next.start",executeId:o._executeId,response:i,operation:o._operation}),o._handleNext(i),o._maybeCompleteSubscriptionOperationTracking(),o._log({name:"execute.next.end",executeId:o._executeId,response:i,operation:o._operation})},a)},t._handleErrorResponse=function(n){var i=this,o=[];return n.forEach(function(a){if(!(a.data===null&&a.extensions!=null&&!a.hasOwnProperty("errors")))if(a.data==null){var s=a.hasOwnProperty("errors")&&a.errors!=null?a.errors:null,l=s?s.map(function(f){var h=f.message;return h}).join(`
|
|
123
|
+
`):"(No errors)",c=cze.create("RelayNetwork","No data returned for operation `"+i._operation.request.node.params.name+"`, got error(s):\n"+l+"\n\nSee the error `source` property for more information.");throw c.source={errors:s,operation:i._operation.request.node,variables:i._operation.request.variables},c.stack,c}else{var d=a;o.push(d)}}),o},t._handleOptimisticResponses=function(n){var i;if(n.length>1)return n.some(function(s){var l;return((l=s.extensions)===null||l===void 0?void 0:l.isOptimistic)===!0})&&Wr(!1),!1;var o=n[0],a=((i=o.extensions)===null||i===void 0?void 0:i.isOptimistic)===!0;return a&&this._state!=="started"&&Wr(!1),a?(this._processOptimisticResponse(o,null,this._treatMissingFieldsAsNull),this._sink.next(o),!0):!1},t._handleNext=function(n){if(this._state!=="completed"){this._seenActors.clear();var i=Array.isArray(n)?n:[n],o=this._handleErrorResponse(i);if(o.length===0){var a=i.some(function(R){var N;return((N=R.extensions)===null||N===void 0?void 0:N.is_final)===!0});a&&(this._state="loading_final",this._updateActiveState(),this._incrementalPayloadsPending=!1),this._sink.next(n);return}var s=this._handleOptimisticResponses(o);if(!s){var l=Sze(o),c=l[0],d=l[1],f=l[2],h=c.length>0,p=f.length>0;if(h){if(this._isSubscriptionOperation){var m=pze();this._operation={request:this._operation.request,fragment:vze(this._operation.fragment.node,m,this._operation.fragment.variables,this._operation.fragment.owner),root:y1(this._operation.root.node,m,this._operation.root.variables)}}var g=this._processResponses(c);this._processPayloadFollowups(g)}if(p)for(var v=[],b=0;b<f.length;b++){var y,S=f[b],w=new _g(S.data),a=((y=S.extensions)===null||y===void 0?void 0:y.is_final)===!0,C={errors:[],fieldPayloads:[],followupPayloads:[],incrementalPlaceholders:[],isFinal:a,source:w};this._getPublishQueueAndSaveActor().commitPayload(this._operation,C,this._updater),v.push(C),this._execTimeResolverResponseComplete=a,a&&this._updateActiveState()}if(d.length>0){var A=this._processIncrementalResponses(d);this._processPayloadFollowups(A)}this._isSubscriptionOperation&&(o[0].extensions==null?o[0].extensions={__relay_subscription_root_id:this._operation.fragment.dataID}:o[0].extensions.__relay_subscription_root_id=this._operation.fragment.dataID);var $=this._runPublishQueue(h||p?this._operation:void 0);h&&this._incrementalPayloadsPending&&this._retainData(),this._updateOperationTracker($),this._sink.next(n)}}},t._processOptimisticResponse=function(n,i,o){var a=this;if(this._optimisticUpdates!==null&&Wr(!1),!(n==null&&i==null)){var s=[];if(n){var l=this._normalizeResponse(n,this._operation.root,vI,{actorIdentifier:this._actorIdentifier,getDataID:this._getDataID,log:this._log,path:[],shouldProcessClientComponents:this._shouldProcessClientComponents,treatMissingFieldsAsNull:o},this._useExecTimeResolvers);bI(l),s.push({operation:this._operation,payload:l,updater:i}),this._processOptimisticFollowups(l,s)}else i&&s.push({operation:this._operation,payload:{errors:null,fieldPayloads:null,incrementalPlaceholders:null,followupPayloads:null,source:_g.create(),isFinal:!1},updater:i});this._optimisticUpdates=s,s.forEach(function(d){return a._getPublishQueueAndSaveActor().applyUpdate(d)});var c=this._runPublishQueue();vg.ENABLE_OPERATION_TRACKER_OPTIMISTIC_UPDATES&&this._updateOperationTracker(c)}},t._processOptimisticFollowups=function(n,i){if(n.followupPayloads&&n.followupPayloads.length){var o=n.followupPayloads,a=(0,Qf.default)(o),s;try{for(a.s();!(s=a.n()).done;){var l=s.value;switch(l.kind){case"ModuleImportPayload":var c=this._expectOperationLoader(),d=c.get(l.operationReference);if(d==null)this._processAsyncOptimisticModuleImport(l);else{var f=this._processOptimisticModuleImport(d,l);i.push.apply(i,(0,Yf.default)(f))}break;case"ActorPayload":break;default:Wr(!1)}}}catch(h){a.e(h)}finally{a.f()}}},t._normalizeFollowupPayload=function(n,i){var o;i.kind==="SplitOperation"&&n.kind==="ModuleImportPayload"?o=gze(n.variables,i.argumentDefinitions,n.args):o=n.variables;var a=y1(i,n.dataID,o),s={data:n.data,extensions:this._state==="loading_final"?{is_final:!0}:void 0};return this._normalizeResponse(s,a,n.typeName,{actorIdentifier:this._actorIdentifier,getDataID:this._getDataID,log:this._log,path:n.path,treatMissingFieldsAsNull:this._treatMissingFieldsAsNull,shouldProcessClientComponents:this._shouldProcessClientComponents},this._useExecTimeResolvers)},t._processOptimisticModuleImport=function(n,i){var o=_1(n),a=[],s=this._normalizeFollowupPayload(i,o);return bI(s),a.push({operation:this._operation,payload:s,updater:null}),this._processOptimisticFollowups(s,a),a},t._processAsyncOptimisticModuleImport=function(n){var i=this;this._expectOperationLoader().load(n.operationReference).then(function(o){if(!(o==null||i._state!=="started")){var a=i._processOptimisticModuleImport(o,n);if(a.forEach(function(l){return i._getPublishQueueAndSaveActor().applyUpdate(l)}),i._optimisticUpdates!=null){var s;(s=i._optimisticUpdates).push.apply(s,(0,Yf.default)(a)),i._runPublishQueue()}}})},t._processResponses=function(n){var i=this;return this._log({name:"execute.normalize.start",operation:this._operation}),this._optimisticUpdates!==null&&(this._optimisticUpdates.forEach(function(o){i._getPublishQueueAndSaveActor().revertUpdate(o)}),this._optimisticUpdates=null),this._incrementalPayloadsPending=!1,this._incrementalResults.clear(),this._source.clear(),n.map(function(o){var a=i._normalizeResponse(o,i._operation.root,vI,{actorIdentifier:i._actorIdentifier,getDataID:i._getDataID,log:i._log,path:[],treatMissingFieldsAsNull:i._treatMissingFieldsAsNull,shouldProcessClientComponents:i._shouldProcessClientComponents},i._useExecTimeResolvers);return i._getPublishQueueAndSaveActor().commitPayload(i._operation,a,i._updater),i._log({name:"execute.normalize.end",operation:i._operation}),a})},t._processPayloadFollowups=function(n){var i=this;this._state!=="completed"&&n.forEach(function(o){var a=o.incrementalPlaceholders,s=o.followupPayloads,l=o.isFinal;if(i._state=l?"loading_final":"loading_incremental",i._updateActiveState(),l&&(i._incrementalPayloadsPending=!1),s&&s.length!==0&&s.forEach(function(d){var f,h=i._actorIdentifier;i._actorIdentifier=(f=d.actorIdentifier)!==null&&f!==void 0?f:i._actorIdentifier,i._processFollowupPayload(d),i._actorIdentifier=h}),a&&a.length!==0&&(i._incrementalPayloadsPending=i._state!=="loading_final",a.forEach(function(d){var f,h=i._actorIdentifier;i._actorIdentifier=(f=d.actorIdentifier)!==null&&f!==void 0?f:i._actorIdentifier,i._processIncrementalPlaceholder(o,d),i._actorIdentifier=h}),i._isClientPayload||i._state==="loading_final")){var c=[];a.forEach(function(d){d.kind==="defer"&&c.push(i._processDeferResponse(d.label,d.path,d,{data:d.data,extensions:{is_final:!0}}))}),c.length>0&&i._processPayloadFollowups(c)}})},t._maybeCompleteSubscriptionOperationTracking=function(){!this._isSubscriptionOperation&&!(this._useExecTimeResolvers&&this._execTimeResolverResponseComplete&&this._state==="loading_final")||this._pendingModulePayloadsCount===0&&this._incrementalPayloadsPending===!1&&this._completeOperationTracker()},t._processFollowupPayload=function(n){var i=this;switch(n.kind){case"ModuleImportPayload":var o=this._expectOperationLoader(),a=o.get(n.operationReference);if(a!=null)this._processFollowupPayloadWithNormalizationNode(n,_1(a));else{var s=this._nextSubscriptionId++;this._pendingModulePayloadsCount++;var l=function(){i._pendingModulePayloadsCount--,i._maybeCompleteSubscriptionOperationTracking()},c=b1.from(new Promise(function(d,f){o.load(n.operationReference).then(d,f)}));b1.create(function(d){var f,h=c.subscribe({next:function(m){if(m!=null){var g=function(){try{var y=_1(m),S=vg.BATCH_ASYNC_MODULE_UPDATES_FN,w=S!=null&&i._pendingModulePayloadsCount>1,C=hze(function(){if(i._handleFollowupPayload(n,y),w)i._scheduleAsyncStoreUpdate(S,d.complete);else{var R=i._runPublishQueue();i._updateOperationTracker(R)}}),A=C[0],$=C[1];i._log({name:"execute.async.module",executeId:i._executeId,operationName:y.name,duration:$}),w||d.complete()}catch(R){d.error(R)}},v=i._scheduler;v==null?g():f=v.schedule(g)}else d.complete()},error:d.error});return function(){h.unsubscribe(),i._scheduler!=null&&f!=null&&i._scheduler.cancel(f)}}).subscribe({complete:function(){i._complete(s),l()},error:function(f){i._error(f),l()},start:function(f){return i._start(s,f)}})}break;case"ActorPayload":this._processFollowupPayloadWithNormalizationNode(n,n.node);break;default:Wr(!1)}},t._processFollowupPayloadWithNormalizationNode=function(n,i){this._handleFollowupPayload(n,i),this._maybeCompleteSubscriptionOperationTracking()},t._handleFollowupPayload=function(n,i){var o=this._normalizeFollowupPayload(n,i);this._getPublishQueueAndSaveActor().commitPayload(this._operation,o),this._processPayloadFollowups([o])},t._processIncrementalPlaceholder=function(n,i){var o,a=i.label,s=i.path,l=s.map(String).join("."),c=this._incrementalResults.get(a);c==null&&(c=new Map,this._incrementalResults.set(a,c));var d=c.get(l),f=d!=null&&d.kind==="response"?d.responses:null;c.set(l,{kind:"placeholder",placeholder:i});var h;i.kind==="stream"?h=i.parentID:i.kind==="defer"?h=i.selector.dataID:Wr(!1);var p=n.source.get(h),m=((o=n.fieldPayloads)!==null&&o!==void 0?o:[]).filter(function(C){var A=gI(C.dataID,C.fieldKey);return C.dataID===h||A===h});p==null&&Wr(!1);var g,v,b=this._source.get(h);if(b!=null){g=bg.update(b.record,p);var y=new Map,S=function(A){var $=wze(A);y.set($,A)};b.fieldPayloads.forEach(S),m.forEach(S),v=Array.from(y.values())}else g=p,v=m;if(this._source.set(h,{record:g,fieldPayloads:v}),f!=null){var w=this._processIncrementalResponses(f);this._processPayloadFollowups(w)}},t._processIncrementalResponses=function(n){var i=this,o=[];return n.forEach(function(a){var s=a.label,l=a.path,c=a.response,d=i._incrementalResults.get(s);if(d==null&&(d=new Map,i._incrementalResults.set(s,d)),s.indexOf("$defer$")!==-1){var f=l.map(String).join("."),h=d.get(f);if(h==null){h={kind:"response",responses:[a]},d.set(f,h);return}else if(h.kind==="response"){h.responses.push(a);return}var p=h.placeholder;p.kind!=="defer"&&Wr(!1),o.push(i._processDeferResponse(s,l,p,c))}else{var m=l.slice(0,-2).map(String).join("."),g=d.get(m);if(g==null){g={kind:"response",responses:[a]},d.set(m,g);return}else if(g.kind==="response"){g.responses.push(a);return}var v=g.placeholder;v.kind!=="stream"&&Wr(!1),o.push(i._processStreamResponse(s,l,v,c))}}),o},t._processDeferResponse=function(n,i,o,a){var s,l=o.selector.dataID,c=this._actorIdentifier;this._actorIdentifier=(s=o.actorIdentifier)!==null&&s!==void 0?s:this._actorIdentifier;var d=this._normalizeResponse(a,o.selector,o.typeName,{actorIdentifier:this._actorIdentifier,getDataID:this._getDataID,log:this._log,path:o.path,treatMissingFieldsAsNull:this._treatMissingFieldsAsNull,shouldProcessClientComponents:this._shouldProcessClientComponents},this._useExecTimeResolvers);this._getPublishQueueAndSaveActor().commitPayload(this._operation,d);var f=this._source.get(l);f==null&&Wr(!1);var h=f.fieldPayloads;if(h.length!==0){var p,m={errors:null,fieldPayloads:h,incrementalPlaceholders:null,followupPayloads:null,source:_g.create(),isFinal:((p=a.extensions)===null||p===void 0?void 0:p.is_final)===!0};this._getPublishQueueAndSaveActor().commitPayload(this._operation,m)}return this._actorIdentifier=c,d},t._processStreamResponse=function(n,i,o,a){var s=o.parentID,l=o.node,c=o.variables,d=o.actorIdentifier,f=this._actorIdentifier;this._actorIdentifier=d??this._actorIdentifier;var h=l.selections[0];h!=null&&h.kind==="LinkedField"&&h.plural===!0||Wr(!1);var p=this._normalizeStreamItem(a,s,h,c,i,o.path),m=p.fieldPayloads,g=p.itemID,v=p.itemIndex,b=p.prevIDs,y=p.relayPayload,S=p.storageKey;if(this._getPublishQueueAndSaveActor().commitPayload(this._operation,y,function(C){var A=C.get(s);if(A!=null){var $=A.getLinkedRecords(S);if($!=null&&!($.length!==b.length||$.some(function(N,I){return b[I]!==(N&&N.getDataID())}))){var R=(0,Yf.default)($);R[v]=C.get(g),A.setLinkedRecords(R,S)}}}),m.length!==0){var w={errors:null,fieldPayloads:m,incrementalPlaceholders:null,followupPayloads:null,source:_g.create(),isFinal:!1};this._getPublishQueueAndSaveActor().commitPayload(this._operation,w)}return this._actorIdentifier=f,y},t._normalizeStreamItem=function(n,i,o,a,s,l){var c,d,f,h,p=n.data;typeof p!="object"&&Wr(!1);var m=(c=o.alias)!==null&&c!==void 0?c:o.name,g=_ze(o,a),v=this._source.get(i);v==null&&Wr(!1);var b=v.record,y=v.fieldPayloads,S=bg.getLinkedRecordIDs(b,g);S==null&&Wr(!1);var w=s[s.length-1],C=parseInt(w,10);C===w&&C>=0||Wr(!1);var A=(d=o.concreteType)!==null&&d!==void 0?d:p[bze];typeof A!="string"&&Wr(!1);var $=(f=(h=this._getDataID(p,A))!==null&&h!==void 0?h:S?.[C])!==null&&f!==void 0?f:gI(i,g,C);typeof $!="string"&&Wr(!1);var R=y1(o,$,a),N=bg.clone(b),I=(0,Yf.default)(S);I[C]=$,bg.setLinkedRecordIDs(N,g,I),this._source.set(i,{record:N,fieldPayloads:y});var M=this._normalizeResponse(n,R,A,{actorIdentifier:this._actorIdentifier,getDataID:this._getDataID,log:this._log,path:[].concat((0,Yf.default)(l),[m,String(C)]),treatMissingFieldsAsNull:this._treatMissingFieldsAsNull,shouldProcessClientComponents:this._shouldProcessClientComponents},this._useExecTimeResolvers);return{fieldPayloads:y,itemID:$,itemIndex:C,prevIDs:S,relayPayload:M,storageKey:g}},t._scheduleAsyncStoreUpdate=function(n,i){var o=this;this._completeFns.push(i),this._asyncStoreUpdateDisposable==null&&(this._asyncStoreUpdateDisposable=n(function(){o._asyncStoreUpdateDisposable=null;var a=o._runPublishQueue();o._updateOperationTracker(a);var s=(0,Qf.default)(o._completeFns),l;try{for(s.s();!(l=s.n()).done;){var c=l.value;c()}}catch(d){s.e(d)}finally{s.f()}o._completeFns=[]}))},t._updateOperationTracker=function(n){n!=null&&n.length>0&&this._operationTracker.update(this._operation.request,new Set(n))},t._completeOperationTracker=function(){this._operationTracker.complete(this._operation.request)},t._getPublishQueueAndSaveActor=function(){return this._seenActors.add(this._actorIdentifier),this._getPublishQueue(this._actorIdentifier)},t._getActorsToVisit=function(){return this._seenActors.size===0?new Set([this._actorIdentifier]):this._seenActors},t._runPublishQueue=function(n){var i=new Set,o=(0,Qf.default)(this._getActorsToVisit()),a;try{for(o.s();!(a=o.n()).done;){var s=a.value,l=this._getPublishQueue(s).run(n);l.forEach(function(c){return i.add(c)})}}catch(c){o.e(c)}finally{o.f()}return Array.from(i)},t._retainData=function(){var n=(0,Qf.default)(this._getActorsToVisit()),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;this._retainDisposables.has(o)||this._retainDisposables.set(o,this._getStore(o).retain(this._operation))}}catch(a){n.e(a)}finally{n.f()}},t._disposeRetainedData=function(){var n=(0,Qf.default)(this._retainDisposables.values()),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;o.dispose()}}catch(a){n.e(a)}finally{n.f()}this._retainDisposables.clear()},t._expectOperationLoader=function(){var n=this._operationLoader;return n||Wr(!1),n},e})();function Sze(e){var t=[],r=[],n=[];return e.forEach(function(i){var o;if(i.path!=null||i.label!=null){var a=i.label,s=i.path;(a==null||s==null)&&Wr(!1),r.push({label:a,path:s,response:i})}else((o=i.extensions)===null||o===void 0?void 0:o.is_normalized)===!0?n.push(i):t.push(i)}),[t,r,n]}function wze(e){var t;return(t=JSON.stringify(fze(e)))!==null&&t!==void 0?t:""}function bI(e){var t=e.incrementalPlaceholders;t!=null&&t.length!==0&&Wr(!1)}var Eze={execute:yze},kze=Promise.resolve();function Cze(e){kze.then(e).catch(Rze)}function Rze(e){setTimeout(function(){throw e},0)}var Aze=Cze,wn=fo,Tze=t_,_I=Tze.EXISTENT,x1=Be,$ze=(function(){function e(r,n){this.__sources=[n,r],this._base=r,this._sink=n}var t=e.prototype;return t.unstable_getRawRecordWithChanges=function(n){var i=this._base.get(n),o=this._sink.get(n);if(o===void 0){if(i==null)return i;var a=wn.clone(i);return a}else{if(o===null)return null;if(i!=null){var s=wn.update(i,o);return s}else{var l=wn.clone(o);return l}}},t._getSinkRecord=function(n){var i=this._sink.get(n);if(!i){var o=this._base.get(n);o||x1(!1),i=wn.create(n,wn.getType(o)),this._sink.set(n,i)}return i},t.copyFields=function(n,i){var o=this._sink.get(n),a=this._base.get(n);o||a||x1(!1);var s=this._getSinkRecord(i);a&&wn.copyFields(a,s),o&&wn.copyFields(o,s)},t.copyFieldsFromRecord=function(n,i){var o=this._getSinkRecord(i);wn.copyFields(n,o)},t.create=function(n,i){this._base.getStatus(n)!==_I&&this._sink.getStatus(n)!==_I||x1(!1);var o=wn.create(n,i);this._sink.set(n,o)},t.delete=function(n){this._sink.delete(n)},t.getStatus=function(n){return this._sink.has(n)?this._sink.getStatus(n):this._base.getStatus(n)},t.getType=function(n){for(var i=0;i<this.__sources.length;i++){var o=this.__sources[i].get(n);if(o)return wn.getType(o);if(o===null)return null}},t.getValue=function(n,i){for(var o=0;o<this.__sources.length;o++){var a=this.__sources[o].get(n);if(a){var s=wn.getValue(a,i);if(s!==void 0)return s}else if(a===null)return null}},t.setValue=function(n,i,o){var a=this._getSinkRecord(n);wn.setValue(a,i,o)},t.getErrors=function(n,i){for(var o=0;o<this.__sources.length;o++){var a=this.__sources[o].get(n);if(a){var s=wn.getErrors(a,i);if(s!==void 0)return s}else if(a===null)return null}},t.setErrors=function(n,i,o){var a=this._getSinkRecord(n);wn.setErrors(a,i,o)},t.getLinkedRecordID=function(n,i){for(var o=0;o<this.__sources.length;o++){var a=this.__sources[o].get(n);if(a){var s=wn.getLinkedRecordID(a,i);if(s!==void 0)return s}else if(a===null)return null}},t.setLinkedRecordID=function(n,i,o){var a=this._getSinkRecord(n);wn.setLinkedRecordID(a,i,o)},t.getLinkedRecordIDs=function(n,i){for(var o=0;o<this.__sources.length;o++){var a=this.__sources[o].get(n);if(a){var s=wn.getLinkedRecordIDs(a,i);if(s!==void 0)return s}else if(a===null)return null}},t.setLinkedRecordIDs=function(n,i,o){var a=this._getSinkRecord(n);wn.setLinkedRecordIDs(a,i,o)},e})(),uj=$ze,Nze=Je.default,o_=Nze(Vr),Dze=Sr,Vd=Dze.getArgumentValues,Fze=["id","__id","__typename","js"];function Ize(e,t,r,n,i){var o={};return Rp(o,e,t,r,n,i),o}function Rp(e,t,r,n,i,o){var a,s=(0,o_.default)(n),l;try{var c=function(){var p=l.value;switch(p.kind){case"LinkedField":p.plural?Object.defineProperty(e,(d=p.alias)!==null&&d!==void 0?d:p.name,{get:Mze(p,r,t,i,o),set:Pze(p,r,t,i)}):Object.defineProperty(e,(f=p.alias)!==null&&f!==void 0?f:p.name,{get:Lze(p,r,t,i,o),set:Oze(p,r,t,i)});break;case"ScalarField":var m=(a=p.alias)!==null&&a!==void 0?a:p.name;Object.defineProperty(e,m,{get:function(){var v,b=Vd((v=p.args)!==null&&v!==void 0?v:[],r),y=t.getValue(p.name,b);return y==null&&(y=Bze(p,b,t,i,o)),y},set:Fze.includes(p.name)?void 0:function(g){var v,b=Vd((v=p.args)!==null&&v!==void 0?v:[],r);t.setValue__UNSAFE(g,p.name,b)}});break;case"InlineFragment":t.getType()===p.type&&Rp(e,t,r,p.selections,i,o);break;case"ClientExtension":Rp(e,t,r,p.selections,i,o);break;case"FragmentSpread":break;case"Condition":case"ActorChange":case"InlineDataFragmentSpread":case"AliasedInlineFragmentSpread":case"ClientEdgeToClientObject":case"ClientEdgeToServerObject":case"Defer":case"ModuleImport":case"RequiredField":case"CatchField":case"Stream":case"RelayResolver":case"RelayLiveResolver":throw new Error("Encountered an unexpected ReaderSelection variant in RelayRecordSourceProxy. This indicates a bug in Relay.");default:throw p.kind,new Error("Encountered an unexpected ReaderSelection variant in RelayRecordSourceProxy. This indicates a bug in Relay.")}};for(s.s();!(l=s.n()).done;){var d,f;c()}}catch(h){s.e(h)}finally{s.f()}}function Pze(e,t,r,n){return function(o){var a,s=Vd((a=e.args)!==null&&a!==void 0?a:[],t);if(o==null)throw new Error("Do not assign null to plural linked fields; assign an empty array instead.");var l=o.map(function(c){if(c==null)throw new Error("When assigning an array of items, none of the items should be null or undefined.");var d=c.__id;if(d==null)throw new Error("The __id field must be present on each item passed to the setter. This indicates a bug in Relay.");var f=n.get(d);if(f==null)throw new Error("Did not find item with data id ".concat(d," in the store."));return f});r.setLinkedRecords(l,e.name,s)}}function Oze(e,t,r,n){return function(o){var a,s=Vd((a=e.args)!==null&&a!==void 0?a:[],t);if(o==null)r.setValue(o,e.name,s);else{var l=o.__id;if(l==null)throw new Error("The __id field must be present on the argument. This indicates a bug in Relay.");var c=n.get(l);if(c==null)throw new Error("Did not find item with data id ".concat(l," in the store."));r.setLinkedRecord(c,e.name,s)}}}function Mze(e,t,r,n,i){return function(){var o,a=Vd((o=e.args)!==null&&o!==void 0?o:[],t),s=r.getLinkedRecords(e.name,a);return s===void 0&&(s=Uze(e,a,r,n,i)),s!=null?s.map(function(l){if(l!=null){var c={};return Rp(c,l,t,e.selections,n,i),c}else return l}):s}}function Lze(e,t,r,n,i){return function(){var o,a=Vd((o=e.args)!==null&&o!==void 0?o:[],t),s=r.getLinkedRecord(e.name,a);if(s===void 0&&(s=zze(e,a,r,n,i)),s!=null){var l={};return Rp(l,s,t,e.selections,n,i),l}else return s}}function zze(e,t,r,n,i){var o=(0,o_.default)(i),a;try{for(o.s();!(a=o.n()).done;){var s=a.value;if(s.kind==="linked"){var l=s.handle(e,r,t,n);if(l!=null)return n.get(l)}}}catch(c){o.e(c)}finally{o.f()}}function Uze(e,t,r,n,i){var o=(0,o_.default)(i),a;try{for(o.s();!(a=o.n()).done;){var s=a.value;if(s.kind==="pluralLinked"){var l=s.handle(e,r,t,n);if(l!=null)return l.map(function(c){if(c!=null)return n.get(c)})}}}catch(c){o.e(c)}finally{o.f()}}function Bze(e,t,r,n,i){var o=(0,o_.default)(i),a;try{for(o.s();!(a=o.n()).done;){var s=a.value;if(s.kind==="scalar"){var l=s.handle(e,r,t,n);if(l!==void 0)return l}}}catch(c){o.e(c)}finally{o.f()}}var cj={createUpdatableProxy:Ize},jze=wa,qze=jze.getFragment,Vze=Ea,Gze=Vze.getVariablesFromFragment,Kze=Sr,Hze=Kze.ID_KEY,Wze=cj,Jze=Wze.createUpdatableProxy,Qze=Be;function Yze(e,t,r,n){var i=qze(e),o=Gze(i,t),a=t[Hze],s=r.get(a);return s==null&&Qze(!1),{updatableData:Jze(s,o,i.selections,r,n)}}var dj={readUpdatableFragment:Yze},Xze=wa,Zze=Xze.getUpdatableQuery,e9e=cj,t9e=e9e.createUpdatableProxy;function r9e(e,t,r,n){var i=Zze(e);return{updatableData:t9e(r.getRoot(),t,i.fragment.selections,r,n)}}var fj={readUpdatableQuery:r9e},n9e=ts,i9e=n9e.generateClientID,o9e=Sr,ll=o9e.getStableStorageKey,yg=Be,a9e=(function(){function e(r,n,i){this._dataID=i,this._mutator=n,this._source=r}var t=e.prototype;return t.copyFieldsFrom=function(n){this._mutator.copyFields(n.getDataID(),this._dataID)},t.getDataID=function(){return this._dataID},t.getType=function(){var n=this._mutator.getType(this._dataID);return n==null&&yg(!1),n},t.getValue=function(n,i){var o=ll(n,i);return this._mutator.getValue(this._dataID,o)},t.setValue=function(n,i,o,a){return hj(n)||yg(!1),this.setValue__UNSAFE(n,i,o,a)},t.getErrors=function(n,i){var o=ll(n,i);return this._mutator.getErrors(this._dataID,o)},t.setValue__UNSAFE=function(n,i,o,a){var s=ll(i,o);return this._mutator.setValue(this._dataID,s,n),a!=null&&(a.length===0?this._mutator.setErrors(this._dataID,s):this._mutator.setErrors(this._dataID,s,a)),this},t.getLinkedRecord=function(n,i){var o=ll(n,i),a=this._mutator.getLinkedRecordID(this._dataID,o);return a!=null?this._source.get(a):a},t.setLinkedRecord=function(n,i,o){n instanceof e||yg(!1);var a=ll(i,o),s=n.getDataID();return this._mutator.setLinkedRecordID(this._dataID,a,s),this},t.getOrCreateLinkedRecord=function(n,i,o){var a=this.getLinkedRecord(n,o);if(!a){var s,l=ll(n,o),c=i9e(this.getDataID(),l);a=(s=this._source.get(c))!==null&&s!==void 0?s:this._source.create(c,i),this.setLinkedRecord(a,n,o)}return a},t.getLinkedRecords=function(n,i){var o=this,a=ll(n,i),s=this._mutator.getLinkedRecordIDs(this._dataID,a);return s==null?s:s.map(function(l){return l!=null?o._source.get(l):l})},t.setLinkedRecords=function(n,i,o){Array.isArray(n)||yg(!1);var a=ll(i,o),s=n.map(function(l){return l&&l.getDataID()});return this._mutator.setLinkedRecordIDs(this._dataID,a,s),this},t.invalidateRecord=function(){this._source.markIDForInvalidation(this._dataID)},e})();function hj(e){return e==null||typeof e!="object"||Array.isArray(e)&&e.every(hj)}var s9e=a9e,l9e=fo,pj=t_,S1=pj.EXISTENT,yI=pj.NONEXISTENT,mj=Sr,w1=mj.ROOT_ID,xI=mj.ROOT_TYPE,u9e=dj,c9e=u9e.readUpdatableFragment,d9e=fj,f9e=d9e.readUpdatableQuery,h9e=s9e,xg=Be,p9e=(function(){function e(r,n,i,o,a){this.__mutator=r,this._handlerProvider=i||null,this._proxies={},this._getDataID=n,this._invalidatedStore=!1,this._idsMarkedForInvalidation=new Set,this._missingFieldHandlers=o,this._log=a??function(s){}}var t=e.prototype;return t.publishSource=function(n,i){var o=this,a=n.getRecordIDs();a.forEach(function(s){var l=n.getStatus(s);if(l===S1){var c=n.get(s);c&&(o.__mutator.getStatus(s)!==S1&&o.create(s,l9e.getType(c)),o.__mutator.copyFieldsFromRecord(c,s))}else l===yI&&o.delete(s)}),i&&i.length&&i.forEach(function(s){var l=o._handlerProvider&&o._handlerProvider(s.handle);l||xg(!1),l.update(o,s)})},t.create=function(n,i){this.__mutator.create(n,i),delete this._proxies[n];var o=this.get(n);return o||xg(!1),o},t.delete=function(n){n===w1&&xg(!1),delete this._proxies[n],this.__mutator.delete(n)},t.get=function(n){if(!this._proxies.hasOwnProperty(n)){var i=this.__mutator.getStatus(n);i===S1?this._proxies[n]=new h9e(this,this.__mutator,n):this._proxies[n]=i===yI?null:void 0}return this._proxies[n]},t.getRoot=function(){var n=this.get(w1);return n||(n=this.create(w1,xI)),n&&n.getType()===xI||xg(!1),n},t.invalidateStore=function(){this._invalidatedStore=!0},t.isStoreMarkedForInvalidation=function(){return this._invalidatedStore},t.markIDForInvalidation=function(n){this._idsMarkedForInvalidation.add(n)},t.getIDsMarkedForInvalidation=function(){return this._idsMarkedForInvalidation},t.readUpdatableQuery=function(n,i){return f9e(n,i,this,this._missingFieldHandlers)},t.readUpdatableFragment=function(n,i){return c9e(n,i,this,this._missingFieldHandlers)},e})(),gj=p9e,m9e=hc,SI=m9e.LINKED_FIELD,g9e=Sr,v9e=g9e.getHandleStorageKey,b9e=Js,_9e=Be;function y9e(e,t,r){var n=t.find(function(o){return o.kind===SI&&o.name===e.name&&o.alias===e.alias&&b9e(o.args,e.args)});n&&n.kind===SI||_9e(!1);var i=v9e(e,r);return{kind:"LinkedField",alias:n.alias,name:i,storageKey:i,args:null,concreteType:n.concreteType,plural:n.plural,selections:n.selections}}var vj=y9e,x9e=hc,wI=x9e.SCALAR_FIELD,S9e=Sr,w9e=S9e.getHandleStorageKey,E9e=Js,k9e=Be;function C9e(e,t,r){var n=t.find(function(o){return o.kind===wI&&o.name===e.name&&o.alias===e.alias&&E9e(o.args,e.args)});n&&n.kind===wI||k9e(!1);var i=w9e(e,r);return{kind:"ScalarField",alias:n.alias,name:i,storageKey:i,args:null}}var R9e=C9e,A9e=Je.default,Sg=A9e(Vr),T9e=uj,$9e=gj,N9e=LC,D9e=ts,F9e=D9e.isClientID,I9e=vj,P9e=R9e,O9e=Ql,EI=O9e.getLocalVariables,kI=fo,bj=t_,E1=bj.EXISTENT,M9e=bj.UNKNOWN,UC=Sr,_j=n_,L9e=_j.TYPE_SCHEMA_TYPE,k1=_j.generateTypeID,Xf=Be,z9e=UC.getModuleOperationKey,wg=UC.getStorageKey,C1=UC.getArgumentValues;function U9e(e,t,r,n,i,o,a,s,l,c){l?.({name:"store.datachecker.start",selector:n});var d=n.dataID,f=n.node,h=n.variables,p=new B9e(e,t,r,h,i,o,a,s,l,c),m=p.check(f,d);return l?.({name:"store.datachecker.end",selector:n}),m}var B9e=(function(){function e(r,n,i,o,a,s,l,c,d,f){this._getSourceForActor=r,this._getTargetForActor=n,this._getDataID=l,this._source=r(i),this._mutatorRecordSourceProxyCache=new Map;var h=this._getMutatorAndRecordProxyForActor(i),p=h[0],m=h[1];this._useExecTimeResolvers=f??!1,this._mostRecentlyInvalidatedAt=null,this._handlers=a,this._mutator=p,this._operationLoader=s??null,this._recordSourceProxy=m,this._recordWasMissing=!1,this._variables=o,this._shouldProcessClientComponents=c,this._log=d}var t=e.prototype;return t._getMutatorAndRecordProxyForActor=function(n){var i=this._mutatorRecordSourceProxyCache.get(n);if(i==null){var o=this._getTargetForActor(n),a=new T9e(this._getSourceForActor(n),o),s=new $9e(a,this._getDataID,void 0,this._handlers,this._log);i=[a,s],this._mutatorRecordSourceProxyCache.set(n,i)}return i},t.check=function(n,i){return this._assignClientAbstractTypes(n),this._traverse(n,i),this._recordWasMissing===!0?{status:"missing",mostRecentlyInvalidatedAt:this._mostRecentlyInvalidatedAt}:{status:"available",mostRecentlyInvalidatedAt:this._mostRecentlyInvalidatedAt}},t._getVariableValue=function(n){return this._variables.hasOwnProperty(n)||Xf(!1),this._variables[n]},t._handleMissing=function(){this._recordWasMissing=!0},t._handleMissingScalarField=function(n,i){if(!(n.name==="id"&&n.alias==null&&F9e(i))){var o=n.args!=null?C1(n.args,this._variables):{},a=(0,Sg.default)(this._handlers),s;try{for(a.s();!(s=a.n()).done;){var l=s.value;if(l.kind==="scalar"){var c=l.handle(n,this._recordSourceProxy.get(i),o,this._recordSourceProxy);if(c!==void 0)return c}}}catch(d){a.e(d)}finally{a.f()}this._handleMissing()}},t._handleMissingLinkField=function(n,i){var o=n.args!=null?C1(n.args,this._variables):{},a=(0,Sg.default)(this._handlers),s;try{for(a.s();!(s=a.n()).done;){var l=s.value;if(l.kind==="linked"){var c=l.handle(n,this._recordSourceProxy.get(i),o,this._recordSourceProxy);if(c!==void 0&&(c===null||this._mutator.getStatus(c)===E1))return c}}}catch(d){a.e(d)}finally{a.f()}this._handleMissing()},t._handleMissingPluralLinkField=function(n,i){var o=this,a=n.args!=null?C1(n.args,this._variables):{},s=(0,Sg.default)(this._handlers),l;try{for(s.s();!(l=s.n()).done;){var c=l.value;if(c.kind==="pluralLinked"){var d=c.handle(n,this._recordSourceProxy.get(i),a,this._recordSourceProxy);if(d!=null){var f=d.every(function(h){return h!=null&&o._mutator.getStatus(h)===E1});if(f)return d}else if(d===null)return null}}}catch(h){s.e(h)}finally{s.f()}this._handleMissing()},t._traverse=function(n,i){var o=this._mutator.getStatus(i);if(o===M9e&&this._handleMissing(),o===E1){var a=this._source.get(i),s=kI.getInvalidationEpoch(a);s!=null&&(this._mostRecentlyInvalidatedAt=this._mostRecentlyInvalidatedAt!=null?Math.max(this._mostRecentlyInvalidatedAt,s):s),this._traverseSelections(n.selections,i)}},t._traverseSelections=function(n,i){var o=this;n.forEach(function(a){switch(a.kind){case"ScalarField":o._checkScalar(a,i);break;case"LinkedField":a.plural?o._checkPluralLink(a,i):o._checkLink(a,i);break;case"ActorChange":o._checkActorChange(a.linkedField,i);break;case"Condition":var s=!!o._getVariableValue(a.condition);s===a.passingValue&&o._traverseSelections(a.selections,i);break;case"InlineFragment":{var l=a.abstractKey;if(l==null){var c=o._mutator.getType(i);c===a.type&&o._traverseSelections(a.selections,i)}else{var d=o._mutator.getType(i);d==null&&Xf(!1);var f=k1(d),h=o._mutator.getValue(f,l);h===!0?o._traverseSelections(a.selections,i):h==null&&o._handleMissing()}break}case"LinkedHandle":{var p=I9e(a,n,o._variables);p.plural?o._checkPluralLink(p,i):o._checkLink(p,i);break}case"ScalarHandle":{var m=P9e(a,n,o._variables);o._checkScalar(m,i);break}case"ModuleImport":o._checkModuleImport(a,i);break;case"Defer":case"Stream":o._traverseSelections(a.selections,i);break;case"FragmentSpread":var g=o._variables;o._variables=EI(o._variables,a.fragment.argumentDefinitions,a.args),o._traverseSelections(a.fragment.selections,i),o._variables=g;break;case"ClientExtension":var v=o._recordWasMissing;o._traverseSelections(a.selections,i),o._recordWasMissing=v;break;case"TypeDiscriminator":var b=a.abstractKey,y=o._mutator.getType(i);y==null&&Xf(!1);var S=k1(y),w=o._mutator.getValue(S,b);w==null&&o._handleMissing();break;case"ClientComponent":if(o._shouldProcessClientComponents===!1)break;o._traverseSelections(a.fragment.selections,i);break;case"RelayResolver":case"RelayLiveResolver":o._useExecTimeResolvers||o._checkResolver(a,i);break;case"ClientEdgeToClientObject":o._useExecTimeResolvers||o._checkResolver(a.backingField,i);break;default:Xf(!1)}})},t._checkResolver=function(n,i){n.fragment&&this._traverseSelections([n.fragment],i)},t._checkModuleImport=function(n,i){var o=this._operationLoader;o===null&&Xf(!1);var a=z9e(n.documentName),s=this._mutator.getValue(i,a);if(s==null){s===void 0&&this._handleMissing();return}var l=o.get(s);if(l!=null){var c=N9e(l),d=this._variables;this._variables=EI(this._variables,c.argumentDefinitions,n.args),this._traverse(c,i),this._variables=d}else this._handleMissing()},t._checkScalar=function(n,i){var o=wg(n,this._variables),a=this._mutator.getValue(i,o);a===void 0&&(a=this._handleMissingScalarField(n,i),a!==void 0&&this._mutator.setValue(i,o,a))},t._checkLink=function(n,i){var o=wg(n,this._variables),a=this._mutator.getLinkedRecordID(i,o);a===void 0&&(a=this._handleMissingLinkField(n,i),a!=null?this._mutator.setLinkedRecordID(i,o,a):a===null&&this._mutator.setValue(i,o,null)),a!=null&&this._traverse(n,a)},t._checkPluralLink=function(n,i){var o=this,a=wg(n,this._variables),s=this._mutator.getLinkedRecordIDs(i,a);s===void 0&&(s=this._handleMissingPluralLinkField(n,i),s!=null?this._mutator.setLinkedRecordIDs(i,a,s):s===null&&this._mutator.setValue(i,a,null)),s&&s.forEach(function(l){l!=null&&o._traverse(n,l)})},t._checkActorChange=function(n,i){var o=wg(n,this._variables),a=this._source.get(i),s=a!=null?kI.getActorLinkedRecordID(a,o):a;if(s==null)s===void 0&&this._handleMissing();else{var l=s[0],c=s[1],d=this._source,f=this._mutator,h=this._recordSourceProxy,p=this._getMutatorAndRecordProxyForActor(l),m=p[0],g=p[1];this._source=this._getSourceForActor(l),this._mutator=m,this._recordSourceProxy=g,this._assignClientAbstractTypes(n),this._traverse(n,c),this._source=d,this._mutator=f,this._recordSourceProxy=h}},t._assignClientAbstractTypes=function(n){var i=n.clientAbstractTypes;if(i!=null)for(var o=0,a=Object.keys(i);o<a.length;o++){var s=a[o],l=(0,Sg.default)(i[s]),c;try{for(l.s();!(c=l.n()).done;){var d=c.value,f=k1(d);this._source.get(f)==null&&this._mutator.create(f,L9e),this._mutator.getValue(f,s)==null&&this._mutator.setValue(f,s,!0)}}catch(h){l.e(h)}finally{l.f()}}},e})(),j9e={check:U9e},q9e=function(t){typeof t=="object"&&t!=null&&(Array.isArray(t)||t.constructor===Object)&&Object.freeze(t)},V9e=fo,G9e=Sr,K9e=G9e.RELAY_RESOLVER_OUTPUT_TYPE_RECORD_IDS,H9e=Be;function W9e(e){var t=V9e.getValue(e,K9e);return t==null?null:(t instanceof Set||H9e(!1),t)}var yj=W9e;function J9e(e){return e!=null&&typeof e=="object"&&typeof e.read=="function"&&typeof e.subscribe=="function"}var Q9e=J9e,Y9e=Je.default,Na=Y9e(Vr),X9e=Xb,Z9e=hc,CI=Z9e.RELAY_LIVE_RESOLVER,e7e=Ko,RI=q9e,xj=ts,Eg=xj.generateClientID,R1=xj.generateClientObjectClientID,ot=fo,t7e=Ea,r7e=t7e.createNormalizationSelector,kg=vc,n7e=tj,i7e=n7e.normalize,_c=Sr,A1=_c.RELAY_RESOLVER_ERROR_KEY,pw=_c.RELAY_RESOLVER_INVALIDATION_KEY,o7e=_c.RELAY_RESOLVER_OUTPUT_TYPE_RECORD_IDS,T1=_c.RELAY_RESOLVER_SNAPSHOT_KEY,$1=_c.RELAY_RESOLVER_VALUE_KEY,a7e=_c.getReadTimeResolverStorageKey,s7e=_c.getStorageKey,l7e=yj,u7e=Q9e,c7e=Zb,AI=c7e.isSuspenseSentinel,Ta=Be,BC="__resolverLiveStateSubscription",Cg="__resolverLiveStateValue",Rg="__resolverLiveStateDirty",Sj="__RELAY_RESOLVER__",d7e="__relay_model_instance";function N1(e,t,r){var n=e.get(t);n||(n=new Set,e.set(t,n)),n.add(r)}var f7e=(function(){function e(r,n){this._resolverIDToRecordIDs=new Map,this._recordIDToResolverIDs=new Map,this._getRecordSource=r,this._store=n,this._handlingBatch=!1,this._liveResolverBatchRecordSource=null}var t=e.prototype;return t.readFromCacheOrEvaluate=function(n,i,o,a,s){var l=this._getRecordSource(),c=Fh(l,n),d=a7e(i,o),f=ot.getLinkedRecordID(c,d),h=f==null?null:l.get(f),p;if(h==null||this._isInvalid(h,s)){var m;h!=null&&Ej(h),f=(m=f)!==null&&m!==void 0?m:Eg(n,d),h=ot.create(f,Sj);var g=a();if(ot.setValue(h,T1,g.snapshot),ot.setValue(h,A1,g.error),i.kind===CI){if(g.resolverResult!=null){g.error!=null&&Ta(!1);var v=g.resolverResult;p=this._setLiveStateValue(h,f,v,i,o)}}else p=this._setResolverValue(h,g.resolverResult,i,o);l.set(f,h);var b=Fh(l,n),y=ot.clone(b);if(ot.setLinkedRecordID(y,d,f),l.set(n,y),i.fragment!=null){var S,w=s7e(i.fragment,o),C=Eg(n,w);N1(this._resolverIDToRecordIDs,C,f),N1(this._recordIDToResolverIDs,n,C);var A=(S=g.snapshot)===null||S===void 0?void 0:S.seenRecords;if(A!=null){var $=(0,Na.default)(A),R;try{for($.s();!(R=$.n()).done;){var N=R.value;N1(this._recordIDToResolverIDs,N,C)}}catch(J){$.e(J)}finally{$.f()}}}}else if(i.kind===CI&&ot.getValue(h,Rg)){var I;f=(I=f)!==null&&I!==void 0?I:Eg(n,d),h=ot.clone(h);var M=ot.getValue(h,Cg);u7e(M)||Ta(!1),p=this._setLiveResolverValue(h,M,i,o),ot.setValue(h,Rg,!1),l.set(f,h)}var P=this._getResolverValue(h),B=ot.getValue(h,T1),j=ot.getValue(h,A1),W=null;if(AI(P)){var te;W=(te=f)!==null&&te!==void 0?te:Eg(n,d)}return[P,f,j,B,W,p]},t.getLiveResolverPromise=function(n){var i=this._getRecordSource(),o=i.get(n);o==null&&Ta(!1);var a=ot.getValue(o,Cg);return new Promise(function(s){var l=a.subscribe(function(){l(),s()})})},t._setLiveStateValue=function(n,i,o,a,s){var l=this._makeLiveStateHandler(i),c=o.subscribe(l);ot.setValue(n,Cg,o);var d=this._setLiveResolverValue(n,o,a,s);return ot.setValue(n,Rg,!1),ot.setValue(n,BC,c),d},t._makeLiveStateHandler=function(n){var i=this;return function(){var o=i._getRecordSource(),a=o.get(n);if(a&&ot.hasValue(a,Cg)){var s=ot.clone(a);ot.setValue(s,Rg,!0),i._setLiveResolverUpdate(n,s)}}},t._setLiveResolverUpdate=function(n,i){if(this._handlingBatch)this._liveResolverBatchRecordSource==null&&(this._liveResolverBatchRecordSource=kg.create()),this._liveResolverBatchRecordSource.set(n,i);else{var o=kg.create();o.set(n,i),this._store.publish(o),this._store.notify()}},t.batchLiveStateUpdates=function(n){this._handlingBatch&&Ta(!1),this._handlingBatch=!0;try{n()}finally{this._liveResolverBatchRecordSource!=null&&(this._store.publish(this._liveResolverBatchRecordSource),this._store.notify()),this._liveResolverBatchRecordSource=null,this._handlingBatch=!1}},t._setLiveResolverValue=function(n,i,o,a){var s=null,l=null;try{s=i.read()}catch(c){l=c}return ot.setValue(n,A1,l),this._setResolverValue(n,s,o,a)},t._setResolverValue=function(n,i,o,a){var s=o.normalizationInfo,l=null;if(i!=null&&s!=null&&!AI(i)){var c,d=l7e(n),f=new Set,h=this._getRecordSource();if(s.plural){Array.isArray(i)||Ta(!1),c=[];for(var p=kg.create(),m=0;m<i.length;m++){var g=i[m];if(g!=null){typeof g!="object"&&Ta(!1);var v=$I(s,g),b=R1(v,ot.getDataID(n),m),y=this._normalizeOutputTypeValue(b,g,a,s,[o.path,String(m)],v),S=(0,Na.default)(y.getRecordIDs()),w;try{for(S.s();!(w=S.n()).done;){var C=w.value;p.set(C,Fh(y,C)),f.add(C)}}catch(P){S.e(P)}finally{S.f()}c.push(b)}}l=TI(h,p,d)}else{typeof i!="object"&&Ta(!1);var A=$I(s,i),$=R1(A,ot.getDataID(n)),R=this._normalizeOutputTypeValue($,i,a,s,[o.path],A),N=(0,Na.default)(R.getRecordIDs()),I;try{for(N.s();!(I=N.n()).done;){var M=I.value;f.add(M)}}catch(P){N.e(P)}finally{N.f()}c=$,l=TI(h,R,d)}ot.setValue(n,o7e,f),RI(c),ot.setValue(n,$1,c)}else RI(i),ot.setValue(n,$1,i);return l},t.notifyUpdatedSubscribers=function(n){this._store.__notifyUpdatedSubscribers(n)},t._getResolverValue=function(n){return ot.getValue(n,$1)},t.invalidateDataIDs=function(n){for(var i=this._getRecordSource(),o=new Set,a=Array.from(n);a.length;){var s=a.pop();o.add(s),n.add(s);var l=this._recordIDToResolverIDs.get(s);if(l!=null){var c=(0,Na.default)(l),d;try{for(c.s();!(d=c.n()).done;){var f=d.value;if(!o.has(f)){o.add(f);var h=this._resolverIDToRecordIDs.get(f);if(h==null)continue;var p=(0,Na.default)(h),m;try{for(p.s();!(m=p.n()).done;){var g=m.value;wj(g,i),o.has(g)||(o.add(g),a.push(g))}}catch(v){p.e(v)}finally{p.f()}}}}catch(v){c.e(v)}finally{c.f()}}}},t._isInvalid=function(n,i){if(!ot.getValue(n,pw))return!1;var o=ot.getValue(n,T1),a=o?.data,s=o?.selector;if(a==null||s==null)return!0;var l=i(s),c=l.data,d=X9e(a,c);if(d!==a)return!0;if(e7e.MARK_RESOLVER_VALUES_AS_CLEAN_AFTER_FRAGMENT_REREAD){var f=ot.clone(n);ot.setValue(f,pw,!1);var h=this._getRecordSource();h.set(ot.getDataID(n),f)}return!1},t._normalizeOutputTypeValue=function(n,i,o,a,s,l){var c=kg.create();switch(a.kind){case"OutputType":{var d=ot.create(n,l);c.set(n,d);var f=r7e(a.normalizationNode,n,o),h=!1,p=this._store.__getNormalizationOptions(s);return i7e(c,f,i,p,void 0,h).source}case"WeakModel":{var m=ot.create(n,l);return ot.setValue(m,d7e,i),c.set(n,m),c}default:a.kind,Ta(!1)}},t.ensureClientRecord=function(n,i){var o=R1(i,n),a=this._getRecordSource();if(!a.has(o)){var s=ot.create(o,i);ot.setValue(s,"id",n),a.set(o,s)}return o},t.unsubscribeFromLiveResolverRecords=function(n){return m7e(this._getRecordSource(),n)},t.invalidateResolverRecords=function(n){if(n.size!==0){var i=(0,Na.default)(n),o;try{for(i.s();!(o=i.n()).done;){var a=o.value,s=this._getRecordSource().get(a);s!=null&&jC(s)&&this._getRecordSource().delete(a)}}catch(l){i.e(l)}finally{i.f()}}},e})();function TI(e,t,r){var n=new Set;if(r!=null){var i=(0,Na.default)(r),o;try{for(i.s();!(o=i.n()).done;){var a=o.value;t.has(a)||(n.add(a),e.remove(a))}}catch(p){i.e(p)}finally{i.f()}}var s=(0,Na.default)(t.getRecordIDs()),l;try{for(s.s();!(l=s.n()).done;){var c=l.value,d=Fh(t,c);if(e.has(c)){var f=Fh(e,c),h=ot.update(f,d);h!==f&&(n.add(c),e.set(c,h),p7e(f,e))}else e.set(c,d)}}catch(p){s.e(p)}finally{s.f()}return n}function h7e(e){var t=new Set;return ot.getFields(e).forEach(function(r){if(ot.hasLinkedRecordID(e,r)){var n=ot.getLinkedRecordID(e,r);n!=null&&t.add(n)}else if(ot.hasLinkedRecordIDs(e,r)){var i;(i=ot.getLinkedRecordIDs(e,r))===null||i===void 0||i.forEach(function(o){o!=null&&t.add(o)})}}),t}function wj(e,t){var r=t.get(e);if(r){var n=ot.clone(r);ot.setValue(n,pw,!0),t.set(e,n)}}function p7e(e,t){var r=h7e(e),n=(0,Na.default)(r),i;try{for(n.s();!(i=n.n()).done;){var o=i.value,a=t.get(o);a!=null&&jC(a)&&wj(o,t)}}catch(s){n.e(s)}finally{n.f()}}function m7e(e,t){if(t.size!==0){var r=(0,Na.default)(t),n;try{for(r.s();!(n=r.n()).done;){var i=n.value,o=e.get(i);o!=null&&jC(o)&&Ej(o)}}catch(a){r.e(a)}finally{r.f()}}}function jC(e){return ot.getType(e)===Sj}function Ej(e){var t=ot.getValue(e,BC);t?.()}function Fh(e,t){var r=e.get(t);return r==null&&Ta(!1),r}function g7e(e){return e}function $I(e,t){var r,n=(r=e.concreteType)!==null&&r!==void 0?r:t.__typename;return n==null&&Ta(!1),n}var v7e={LiveResolverCache:f7e,getUpdatedDataIDs:g7e,RELAY_RESOLVER_LIVE_STATE_SUBSCRIPTION_KEY:BC},b7e=Je.default,_7e=b7e(or),kj=fo,NI=vc,y7e=Be,D1=kj.fromObject(Object.freeze({__UNPUBLISH_RECORD_SENTINEL:!0})),Cj=(function(){function e(r){this._base=r,this._sink=NI.create()}var t=e.prototype;return t.has=function(n){if(this._sink.has(n)){var i=this._sink.get(n);return i!==D1}else return this._base.has(n)},t.get=function(n){if(this._sink.has(n)){var i=this._sink.get(n);return i===D1?void 0:i}else return this._base.get(n)},t.getStatus=function(n){var i=this.get(n);return i===void 0?"UNKNOWN":i===null?"NONEXISTENT":"EXISTENT"},t.clear=function(){this._base=NI.create(),this._sink.clear()},t.delete=function(n){this._sink.delete(n)},t.remove=function(n){this._sink.set(n,D1)},t.set=function(n,i){this._sink.set(n,i)},t.getRecordIDs=function(){return Object.keys(this.toJSON())},t.size=function(){return Object.keys(this.toJSON()).length},t.toJSON=function(){var n=this,i=(0,_7e.default)({},this._base.toJSON());return this._sink.getRecordIDs().forEach(function(o){var a=n.get(o);a===void 0?delete i[o]:i[o]=kj.toJSON(a)}),i},t.getOptimisticRecordIDs=function(){return new Set(this._sink.getRecordIDs())},e})();function x7e(e){return new Cj(e)}function S7e(e){return e instanceof Cj||y7e(!1),e.getOptimisticRecordIDs()}var w7e={create:x7e,getOptimisticRecordIDs:S7e},E7e=hc,k7e=E7e.RELAY_LIVE_RESOLVER,DI=Be,C7e=(function(){function e(){}var t=e.prototype;return t.readFromCacheOrEvaluate=function(n,i,o,a,s){i.kind===k7e&&DI(!1);var l=a(),c=l.resolverResult,d=l.snapshot,f=l.error;return[c,void 0,f,d,void 0,void 0]},t.invalidateDataIDs=function(n){},t.ensureClientRecord=function(n,i){DI(!1)},t.notifyUpdatedSubscribers=function(n){},e})(),R7e={NoopResolverCache:C7e},a_=Je.default,FI=a_(or),A7e=a_(Si),T7e=a_(yf),F1=a_(Jl),$7e=["message"],II=Ko,N7e=Zb,D7e=N7e.isSuspenseSentinel,F7e=Ql,Ai=fo,rs=Sr,PI=rs.CLIENT_EDGE_TRAVERSAL_PATH,I7e=rs.FRAGMENT_OWNER_KEY,P7e=rs.FRAGMENT_PROP_NAME_KEY,Ag=rs.FRAGMENTS_KEY,Tg=rs.ID_KEY,O7e=rs.MODULE_COMPONENT_KEY,M7e=rs.ROOT_ID,m0=rs.getArgumentValues,L7e=rs.getModuleComponentKey,$g=rs.getStorageKey,z7e=R7e,U7e=z7e.NoopResolverCache,Rj=xC,B7e=Rj.RESOLVER_FRAGMENT_ERRORED_SENTINEL,j7e=Rj.withResolverContext,q7e=n_,V7e=q7e.generateTypeID,Jr=Be;function Aj(e,t,r,n){var i=new G7e(e,t,r??new U7e,n);return i.read()}var G7e=(function(){function e(r,n,i,o){var a,s,l,c;this._clientEdgeTraversalPath=(a=n.clientEdgeTraversalPath)!==null&&a!==void 0&&a.length?(0,F1.default)(n.clientEdgeTraversalPath):[],this._missingClientEdges=[],this._missingLiveResolverFields=[],this._isMissingData=!1,this._isWithinUnmatchedTypeRefinement=!1,this._fieldErrors=null,this._owner=n.owner,this._useExecTimeResolvers=(s=(l=this._owner.node.operation.use_exec_time_resolvers)!==null&&l!==void 0?l:((c=this._owner.node.operation.exec_time_resolvers_enabled_provider)===null||c===void 0?void 0:c.get())===!0)!==null&&s!==void 0?s:!1,this._recordSource=r,this._seenRecords=new Set,this._selector=n,this._variables=n.variables,this._resolverCache=i,this._fragmentName=n.node.name,this._updatedDataIDs=new Set,this._resolverContext=o}var t=e.prototype;return t.read=function(){var n,i=this._selector,o=i.node,a=i.dataID,s=i.isWithinUnmatchedTypeRefinement,l=o.abstractKey,c=this._recordSource.get(a),d=!s;if(d&&l==null&&c!=null&&(this._recordMatchesTypeCondition(c,o.type)||(d=!1)),d&&l!=null&&c!=null){var f=this._implementsInterface(c,l);f===!1&&(d=!1)}this._isWithinUnmatchedTypeRefinement=!d;var h=this._traverse(o,a,null),p=(n=this._selector.node.metadata)===null||n===void 0?void 0:n.catchTo;return p!=null&&(h=this._catchErrors(h,p,null)),this._updatedDataIDs.size>0&&(this._resolverCache.notifyUpdatedSubscribers(this._updatedDataIDs),this._updatedDataIDs.clear()),{data:h,isMissingData:this._isMissingData&&d,missingClientEdges:this._missingClientEdges.length?this._missingClientEdges:null,missingLiveResolverFields:this._missingLiveResolverFields,seenRecords:this._seenRecords,selector:this._selector,fieldErrors:this._fieldErrors}},t._maybeAddFieldErrors=function(n,i){var o=Ai.getErrors(n,i);if(o!=null){var a=this._fragmentName;this._fieldErrors==null&&(this._fieldErrors=[]);for(var s=0;s<o.length;s++){var l,c,d,f=o[s];this._fieldErrors.push({kind:"relay_field_payload.error",owner:a,fieldPath:((l=f.path)!==null&&l!==void 0?l:[]).join("."),error:f,shouldThrow:(c=(d=this._selector.node.metadata)===null||d===void 0?void 0:d.throwOnFieldError)!==null&&c!==void 0?c:!1,handled:!1,uiContext:void 0})}}},t._markDataAsMissing=function(n){var i,o;if(!this._isWithinUnmatchedTypeRefinement){this._fieldErrors==null&&(this._fieldErrors=[]);var a=this._fragmentName;if(this._fieldErrors.push((i=(o=this._selector.node.metadata)===null||o===void 0?void 0:o.throwOnFieldError)!==null&&i!==void 0&&i?{kind:"missing_expected_data.throw",owner:a,fieldPath:n,handled:!1,uiContext:void 0}:{kind:"missing_expected_data.log",owner:a,fieldPath:n,uiContext:void 0}),this._isMissingData=!0,this._clientEdgeTraversalPath.length){var s=this._clientEdgeTraversalPath[this._clientEdgeTraversalPath.length-1];s!==null&&this._missingClientEdges.push({request:s.readerClientEdge.operation,clientEdgeDestinationID:s.clientEdgeDestinationID})}}},t._traverse=function(n,i,o){var a=this._recordSource.get(i);if(this._seenRecords.add(i),a==null)return a===void 0&&this._markDataAsMissing("<record>"),a;var s=o||{},l=this._traverseSelections(n.selections,a,s);return l?s:null},t._getVariableValue=function(n){return this._variables.hasOwnProperty(n)||Jr(!1),this._variables[n]},t._maybeReportUnexpectedNull=function(n){if(n.action!=="NONE"){var i=this._fragmentName;this._fieldErrors==null&&(this._fieldErrors=[]);var o;if(n.field.linkedField!=null){var a;o=(a=n.field.linkedField.alias)!==null&&a!==void 0?a:n.field.linkedField.name}else{var s;o=(s=n.field.alias)!==null&&s!==void 0?s:n.field.name}switch(n.action){case"THROW":this._fieldErrors.push({kind:"missing_required_field.throw",fieldPath:o,owner:i,handled:!1,uiContext:void 0});return;case"LOG":this._fieldErrors.push({kind:"missing_required_field.log",fieldPath:o,owner:i,uiContext:void 0});return;default:n.action}}},t._handleRequiredFieldValue=function(n,i){return i==null?(this._maybeReportUnexpectedNull(n),!1):!0},t._catchErrors=function(n,i,o){var a=n;switch(i){case"RESULT":a=this._asResult(n);break;case"NULL":this._fieldErrors!=null&&this._fieldErrors.length>0&&(a=null);break}var s=this._fieldErrors;if(this._fieldErrors=o,s!=null){this._fieldErrors==null&&(this._fieldErrors=[]);for(var l=0;l<s.length;l++)this._fieldErrors.push(OI(s[l]))}return a},t._asResult=function(n){if(this._fieldErrors==null||this._fieldErrors.length===0)return{ok:!0,value:n};var i=this._fieldErrors.map(function(o){switch(o.kind){case"relay_field_payload.error":var a=o.error;a.message;var s=(0,T7e.default)(a,$7e);return s;case"missing_expected_data.throw":case"missing_expected_data.log":return{path:o.fieldPath.split(".")};case"relay_resolver.error":return{message:"Relay: Error in resolver for field at ".concat(o.fieldPath," in ").concat(o.owner)};case"missing_required_field.throw":return{message:"Relay: Missing @required value at path '".concat(o.fieldPath,"' in '").concat(o.owner,"'.")};case"missing_required_field.log":return null;default:o.kind,Jr(!1)}}).filter(Boolean);return{ok:!1,errors:i}},t._traverseSelections=function(n,i,o){for(var a=0;a<n.length;a++){var s=n[a];switch(s.kind){case"RequiredField":var l=this._readClientSideDirectiveField(s,i,o);if(!this._handleRequiredFieldValue(s,l))return!1;break;case"CatchField":{var c,d,f,h=this._fieldErrors;this._fieldErrors=null;var p=this._readClientSideDirectiveField(s,i,o),m=(c=(d=s.field)===null||d===void 0?void 0:d.backingField)!==null&&c!==void 0?c:s.field,g=(f=m?.alias)!==null&&f!==void 0?f:m?.name;g==null&&Jr(!1),o[g]=this._catchErrors(p,s.to,h);break}case"ScalarField":this._readScalar(s,i,o);break;case"LinkedField":s.plural?this._readPluralLink(s,i,o):this._readLink(s,i,o);break;case"Condition":var v=!!this._getVariableValue(s.condition);if(v===s.passingValue){var b=this._traverseSelections(s.selections,i,o);if(!b)return!1}break;case"InlineFragment":{var y=this._readInlineFragment(s,i,o,!1);if(y===!1)return!1;break}case"RelayLiveResolver":case"RelayResolver":{this._useExecTimeResolvers?this._readScalar(s,i,o):this._readResolverField(s,i,o);break}case"FragmentSpread":this._createFragmentPointer(s,i,o);break;case"AliasedInlineFragmentSpread":{this._readAliasedInlineFragment(s,i,o);break}case"ModuleImport":this._readModuleImport(s,i,o);break;case"InlineDataFragmentSpread":this._createInlineDataOrResolverFragmentPointer(s,i,o);break;case"Defer":case"ClientExtension":{var S=this._isMissingData,w=this._missingClientEdges.length;this._clientEdgeTraversalPath.push(null);var C=this._traverseSelections(s.selections,i,o);if(this._isMissingData=S||this._missingClientEdges.length>w||this._missingLiveResolverFields.length>0,this._clientEdgeTraversalPath.pop(),!C)return!1;break}case"Stream":{var A=this._traverseSelections(s.selections,i,o);if(!A)return!1;break}case"ActorChange":this._readActorChange(s,i,o);break;case"ClientEdgeToClientObject":case"ClientEdgeToServerObject":if(this._useExecTimeResolvers&&(s.backingField.kind==="RelayResolver"||s.backingField.kind==="RelayLiveResolver")){var $=s.linkedField;$.plural?this._readPluralLink($,i,o):this._readLink($,i,o)}else this._readClientEdge(s,i,o);break;default:Jr(!1)}}return!0},t._readClientSideDirectiveField=function(n,i,o){switch(n.field.kind){case"ScalarField":return this._readScalar(n.field,i,o);case"LinkedField":return n.field.plural?this._readPluralLink(n.field,i,o):this._readLink(n.field,i,o);case"RelayResolver":case"RelayLiveResolver":return this._useExecTimeResolvers?this._readScalar(n.field,i,o):this._readResolverField(n.field,i,o);case"ClientEdgeToClientObject":case"ClientEdgeToServerObject":if(this._useExecTimeResolvers&&(n.field.backingField.kind==="RelayResolver"||n.field.backingField.kind==="RelayLiveResolver")){var a=n.field;return a.linkedField.plural?this._readPluralLink(a.linkedField,i,o):this._readLink(a.linkedField,i,o)}else return this._readClientEdge(n.field,i,o);case"AliasedInlineFragmentSpread":return this._readAliasedInlineFragment(n.field,i,o);default:n.field.kind,Jr(!1)}},t._readResolverField=function(n,i,o){var a,s=Ai.getDataID(i),l=this._fieldErrors;this._fieldErrors=null;var c=this._readResolverFieldImpl(n,s),d=(a=n.alias)!==null&&a!==void 0?a:n.name;return this._prependPreviousErrors(l,d),o[d]=c,c},t._readResolverFieldImpl=function(n,i){var o=this,a=n.fragment,s,l=function(y){return s!=null?{data:s.data,isMissingData:s.isMissingData,fieldErrors:s.fieldErrors}:(s=Aj(o._recordSource,y,o._resolverCache),{data:s.data,isMissingData:s.isMissingData,fieldErrors:s.fieldErrors})},c=function(){if(a!=null){var y={__id:i,__fragmentOwner:o._owner,__fragments:(0,A7e.default)({},a.name,a.args?m0(a.args,o._variables):{})};o._clientEdgeTraversalPath.length>0&&o._clientEdgeTraversalPath[o._clientEdgeTraversalPath.length-1]!==null&&(y[PI]=(0,F1.default)(o._clientEdgeTraversalPath));var S={getDataForResolverFragment:l};return j7e(S,function(){var $=MI(n,o._variables,y,o._resolverContext),R=$[0],N=$[1];return{resolverResult:R,snapshot:s,error:N}})}else{var w=MI(n,o._variables,null,o._resolverContext),C=w[0],A=w[1];return{resolverResult:C,snapshot:void 0,error:A}}},d=this._resolverCache.readFromCacheOrEvaluate(i,n,this._variables,c,l),f=d[0],h=d[1],p=d[2],m=d[3],g=d[4],v=d[5];return this._propagateResolverMetadata(n.path,m,p,h,g,v),f},t._propagateResolverMetadata=function(n,i,o,a,s,l){var c=this;if(i!=null){if(i.missingClientEdges!=null)for(var d=0;d<i.missingClientEdges.length;d++){var f=i.missingClientEdges[d];this._missingClientEdges.push(f)}if(i.missingLiveResolverFields!=null){this._isMissingData=this._isMissingData||i.missingLiveResolverFields.length>0;for(var h=0;h<i.missingLiveResolverFields.length;h++){var p=i.missingLiveResolverFields[h];this._missingLiveResolverFields.push(p)}}if(i.fieldErrors!=null){this._fieldErrors==null&&(this._fieldErrors=[]);for(var m=0;m<i.fieldErrors.length;m++){var g,v=i.fieldErrors[m];((g=this._selector.node.metadata)===null||g===void 0?void 0:g.throwOnFieldError)===!0?this._fieldErrors.push(v):this._fieldErrors.push(OI(v))}}this._isMissingData=this._isMissingData||i.isMissingData}if(o){var b,y,S={kind:"relay_resolver.error",fieldPath:n,owner:this._fragmentName,error:o,shouldThrow:(b=(y=this._selector.node.metadata)===null||y===void 0?void 0:y.throwOnFieldError)!==null&&b!==void 0?b:!1,handled:!1,uiContext:void 0};this._fieldErrors==null?this._fieldErrors=[S]:this._fieldErrors.push(S)}a!=null&&this._seenRecords.add(a),s!=null&&(this._isMissingData=!0,this._missingLiveResolverFields.push(s)),l?.forEach(function(w){c._updatedDataIDs.add(w)})},t._readClientEdge=function(n,i,o){var a=this,s,l=n.backingField;l.kind==="ClientExtension"&&Jr(!1);var c=(s=l.alias)!==null&&s!==void 0?s:l.name,d={};this._traverseSelections([l],i,d);var f=d[c];if(f==null||D7e(f))return o[c]=f,f;if(n.linkedField.plural){Array.isArray(f)||Jr(!1);var h;n.kind!=="ClientEdgeToClientObject"&&Jr(!1),n.backingField.normalizationInfo==null?h=f.map(function(N){var I,M=(I=n.concreteType)!==null&&I!==void 0?I:N.__typename;typeof M!="string"&&Jr(!1);var P=I1(N,l.path,a._owner.identifier),B=a._resolverCache.ensureClientRecord(P,M),j=n.modelResolvers;if(j!=null){var W=j[M];W===void 0&&Jr(!1);var te=a._readResolverFieldImpl(W,B);return te!=null?B:null}return B}):h=f.map(function(N){return I1(N,l.path,a._owner.identifier)}),this._clientEdgeTraversalPath.push(null);var p=this._readLinkedIds(n.linkedField,h,i,o);return this._clientEdgeTraversalPath.pop(),o[c]=p,p}else{var m,g=I1(f,l.path,this._owner.identifier),v,b=(m=n.concreteType)!==null&&m!==void 0?m:f.__typename,y;n.kind==="ClientEdgeToClientObject"?n.backingField.normalizationInfo==null?(typeof b!="string"&&Jr(!1),v=this._resolverCache.ensureClientRecord(g,b),y=null):(v=g,y=null):(v=g,y={readerClientEdge:n,clientEdgeDestinationID:g});var S=n.modelResolvers;if(S!=null){typeof b!="string"&&Jr(!1);var w=S[b];w===void 0&&Jr(!1);var C=this._readResolverFieldImpl(w,v);if(C==null)return o[c]=null,null}this._clientEdgeTraversalPath.push(y);var A=o[c];A==null||typeof A=="object"||Jr(!1);var $=this._fieldErrors;this._fieldErrors=null;var R=this._traverse(n.linkedField,v,A);return this._prependPreviousErrors($,c),this._clientEdgeTraversalPath.pop(),o[c]=R,R}},t._readScalar=function(n,i,o){var a,s=(a=n.alias)!==null&&a!==void 0?a:n.name,l=$g(n,this._variables),c=Ai.getValue(i,l);return c===null||II.ENABLE_NONCOMPLIANT_ERROR_HANDLING_ON_LISTS&&Array.isArray(c)&&c.length===0?this._maybeAddFieldErrors(i,l):c===void 0&&this._markDataAsMissing(s),o[s]=c,c},t._readLink=function(n,i,o){var a,s=(a=n.alias)!==null&&a!==void 0?a:n.name,l=$g(n,this._variables),c=Ai.getLinkedRecordID(i,l);if(c==null)return o[s]=c,c===null?this._maybeAddFieldErrors(i,l):c===void 0&&this._markDataAsMissing(s),c;var d=o[s];d==null||typeof d=="object"||Jr(!1);var f=this._fieldErrors;this._fieldErrors=null;var h=this._traverse(n,c,d);return this._prependPreviousErrors(f,s),o[s]=h,h},t._prependPreviousErrors=function(n,i){if(this._fieldErrors!=null){for(var o=0;o<this._fieldErrors.length;o++){var a=this._fieldErrors[o];a.owner===this._fragmentName&&(a.kind==="missing_expected_data.throw"||a.kind==="missing_expected_data.log"||a.kind==="missing_required_field.throw"||a.kind==="missing_required_field.log")&&(a.fieldPath="".concat(i,".").concat(a.fieldPath))}if(n!=null){for(var s=this._fieldErrors.length-1;s>=0;s--)n.push(this._fieldErrors[s]);this._fieldErrors=n}}else this._fieldErrors=n},t._readActorChange=function(n,i,o){var a,s=(a=n.alias)!==null&&a!==void 0?a:n.name,l=$g(n,this._variables),c=Ai.getActorLinkedRecordID(i,l);if(c==null)return o[s]=c,c===void 0?this._markDataAsMissing(s):c===null&&this._maybeAddFieldErrors(i,l),o[s];var d=c[0],f=c[1],h={};return this._createFragmentPointer(n.fragmentSpread,Ai.fromObject({__id:f}),h),o[s]={__fragmentRef:h,__viewer:d},o[s]},t._readPluralLink=function(n,i,o){var a=$g(n,this._variables),s=Ai.getLinkedRecordIDs(i,a);return(s===null||II.ENABLE_NONCOMPLIANT_ERROR_HANDLING_ON_LISTS&&Array.isArray(s)&&s.length===0)&&this._maybeAddFieldErrors(i,a),this._readLinkedIds(n,s,i,o)},t._readLinkedIds=function(n,i,o,a){var s=this,l,c=(l=n.alias)!==null&&l!==void 0?l:n.name;if(i==null)return a[c]=i,i===void 0&&this._markDataAsMissing(c),i;var d=a[c];d==null||Array.isArray(d)||Jr(!1);var f=this._fieldErrors;this._fieldErrors=null;var h=d||[];return i.forEach(function(p,m){if(p==null){p===void 0&&s._markDataAsMissing(String(m)),h[m]=p;return}var g=h[m];g==null||typeof g=="object"||Jr(!1);var v=s._fieldErrors;s._fieldErrors=null,h[m]=s._traverse(n,p,g),s._prependPreviousErrors(v,m)}),this._prependPreviousErrors(f,c),a[c]=h,h},t._readModuleImport=function(n,i,o){var a=L7e(n.documentName),s=Ai.getValue(i,a),l=s!==void 0?s:n.componentModuleProvider;if(l==null){l===void 0&&this._markDataAsMissing("<module-import>");return}this._createFragmentPointer({kind:"FragmentSpread",name:n.fragmentName,args:n.args},i,o),o[P7e]=n.fragmentPropName,o[O7e]=l},t._readAliasedInlineFragment=function(n,i,o){var a=this._fieldErrors;this._fieldErrors=null;var s=this._readInlineFragment(n.fragment,i,{},!0);this._prependPreviousErrors(a,n.name),s===!1&&(s=null),o[n.name]=s},t._readInlineFragment=function(n,i,o,a){if(n.type==null){var s=this._traverseSelections(n.selections,i,o);return s===!1?!1:o}var l=n.abstractKey;if(l==null)if(this._recordMatchesTypeCondition(i,n.type)){var s=this._traverseSelections(n.selections,i,o);if(!s)return!1}else return null;else{var c=this._implementsInterface(i,l);if(c===!1&&a)return null;var d=this._isMissingData,f=this._isWithinUnmatchedTypeRefinement;this._isWithinUnmatchedTypeRefinement=f||c===!1;var h=this._traverseSelections(n.selections,i,o);if(this._isWithinUnmatchedTypeRefinement=f,c===!1)return this._isMissingData=d,null;if(c==null)return;if(h===!1)return!1}return o},t._recordMatchesTypeCondition=function(n,i){var o=Ai.getType(n);return o!=null&&o===i||Ai.getDataID(n)===M7e},t._createFragmentPointer=function(n,i,o){var a=o[Ag];a==null&&(a=o[Ag]={}),typeof a=="object"&&a!=null||Jr(!1),o[Tg]==null&&(o[Tg]=Ai.getDataID(i)),a[n.name]=m0(n.args,this._variables,this._isWithinUnmatchedTypeRefinement),o[I7e]=this._owner,this._clientEdgeTraversalPath.length>0&&this._clientEdgeTraversalPath[this._clientEdgeTraversalPath.length-1]!==null&&(o[PI]=(0,F1.default)(this._clientEdgeTraversalPath))},t._createInlineDataOrResolverFragmentPointer=function(n,i,o){var a=o[Ag];a==null&&(a=o[Ag]={}),typeof a=="object"&&a!=null||Jr(!1),o[Tg]==null&&(o[Tg]=Ai.getDataID(i));var s={},l=this._fragmentName;this._fragmentName=n.name;var c=this._variables,d=n.args?m0(n.args,this._variables):{};this._variables=F7e.getFragmentVariables(n,this._owner.variables,d),this._traverseSelections(n.selections,i,s),this._variables=c,this._fragmentName=l,a[n.name]=s},t._implementsInterface=function(n,i){var o=Ai.getType(n),a=this._recordSource.get(V7e(o)),s=a!=null?Ai.getValue(a,i):null;return s==null&&this._markDataAsMissing("<abstract-type-hint>"),s},e})();function OI(e){switch(e.kind){case"missing_expected_data.throw":case"missing_required_field.throw":case"relay_field_payload.error":case"relay_resolver.error":return(0,FI.default)((0,FI.default)({},e),{},{handled:!0});case"missing_expected_data.log":case"missing_required_field.log":return e;default:e.kind,Jr(!1)}}function MI(e,t,r,n){var i=typeof e.resolverModule=="function"?e.resolverModule:e.resolverModule.default,o=null,a=null;try{var s=[];e.fragment!=null&&s.push(r);var l=e.args?m0(e.args,t):void 0;s.push(l),s.push(n),o=i.apply(null,s)}catch(c){o=null,c!==B7e&&(a=c)}return[o,a]}function I1(e,t,r){if(typeof e=="string")return e;if(typeof e=="object"&&e!=null&&typeof e.id=="string")return e.id;Jr(!1)}var qC={read:Aj},K7e=Je.default,LI=K7e(Vr),H7e=LC,W7e=vj,J7e=yj,Q7e=Ql,zI=Q7e.getLocalVariables,hs=fo,s_=Sr,Y7e=n_,UI=Y7e.generateTypeID,P1=Be,X7e=s_.getReadTimeResolverStorageKey,BI=s_.getStorageKey,Z7e=s_.getModuleOperationKey;function eUe(e,t,r,n,i,o){var a=t.dataID,s=t.node,l=t.variables,c=new tUe(e,l,r,n,i,o);c.mark(s,a)}var tUe=(function(){function e(r,n,i,o,a,s){this._operationLoader=o??null,this._operationName=null,this._useExecTimeResolvers=s??!1,this._recordSource=r,this._references=i,this._variables=n,this._shouldProcessClientComponents=a}var t=e.prototype;return t.mark=function(n,i){(n.kind==="Operation"||n.kind==="SplitOperation")&&(this._operationName=n.name),this._traverse(n,i)},t._traverse=function(n,i){this._references.add(i);var o=this._recordSource.get(i);o!=null&&this._traverseSelections(n.selections,o)},t._getVariableValue=function(n){return this._variables.hasOwnProperty(n)||P1(!1),this._variables[n]},t._traverseSelections=function(n,i){var o=this;n.forEach(function(a){switch(a.kind){case"ActorChange":o._traverseLink(a.linkedField,i);break;case"LinkedField":a.plural?o._traversePluralLink(a,i):o._traverseLink(a,i);break;case"Condition":var s=!!o._getVariableValue(a.condition);s===a.passingValue&&o._traverseSelections(a.selections,i);break;case"InlineFragment":if(a.abstractKey==null){var l=hs.getType(i);(l!=null&&l===a.type||l===s_.ROOT_TYPE)&&o._traverseSelections(a.selections,i)}else{var c=hs.getType(i),d=UI(c);o._references.add(d),o._traverseSelections(a.selections,i)}break;case"FragmentSpread":var f=o._variables;o._variables=zI(o._variables,a.fragment.argumentDefinitions,a.args),o._traverseSelections(a.fragment.selections,i),o._variables=f;break;case"LinkedHandle":var h=W7e(a,n,o._variables);h.plural?o._traversePluralLink(h,i):o._traverseLink(h,i);break;case"Defer":case"Stream":o._traverseSelections(a.selections,i);break;case"ScalarField":case"ScalarHandle":break;case"TypeDiscriminator":{var p=hs.getType(i),m=UI(p);o._references.add(m);break}case"ModuleImport":o._traverseModuleImport(a,i);break;case"ClientExtension":o._traverseSelections(a.selections,i);break;case"ClientComponent":if(o._shouldProcessClientComponents===!1)break;o._traverseSelections(a.fragment.selections,i);break;case"RelayResolver":case"RelayLiveResolver":o._traverseResolverField(a,i);break;case"ClientEdgeToClientObject":o._traverseClientEdgeToClientObject(a,i);break;default:P1(!1)}})},t._traverseClientEdgeToClientObject=function(n,i){if(this._useExecTimeResolvers){this._traverseLink(n.linkedField,i);return}var o=this._traverseResolverField(n.backingField,i);if(o!=null){var a=this._recordSource.get(o);if(a!=null)if(n.backingField.isOutputType){var s=J7e(a);if(s!=null){var l=(0,LI.default)(s),c;try{for(l.s();!(c=l.n()).done;){var d=c.value;this._references.add(d)}}catch(y){l.e(y)}finally{l.f()}}}else{var f=n.linkedField,h=f.concreteType;if(h==null)return;if(f.plural){var p=hs.getResolverLinkedRecordIDs(a,h);if(p!=null){var m=(0,LI.default)(p),g;try{for(m.s();!(g=m.n()).done;){var v=g.value;v!=null&&this._traverse(f,v)}}catch(y){m.e(y)}finally{m.f()}}}else{var b=hs.getResolverLinkedRecordID(a,h);b!=null&&this._traverse(f,b)}}}},t._traverseResolverField=function(n,i){if(!this._useExecTimeResolvers){var o=X7e(n,this._variables),a=hs.getLinkedRecordID(i,o);a!=null&&this._references.add(a);var s=n.fragment;return s!=null&&this._traverseSelections([s],i),a}},t._traverseModuleImport=function(n,i){var o=this._operationLoader;o===null&&P1(!1);var a=Z7e(n.documentName),s=hs.getValue(i,a);if(s!=null){var l=o.get(s);if(l!=null){var c=H7e(l),d=this._variables;this._variables=zI(this._variables,c.argumentDefinitions,n.args),this._traverseSelections(c.selections,i),this._variables=d}}},t._traverseLink=function(n,i){var o=BI(n,this._variables),a=hs.getLinkedRecordID(i,o);a!=null&&this._traverse(n,a)},t._traversePluralLink=function(n,i){var o=this,a=BI(n,this._variables),s=hs.getLinkedRecordIDs(i,a);s?.forEach(function(l){l!=null&&o._traverse(n,l)})},e})(),rUe={mark:eUe},nUe=Symbol.iterator;function iUe(e,t){for(var r=e[nUe](),n=r.next();!n.done;){var i=n.value;if(t.has(i))return!0;n=r.next()}return!1}var oUe=iUe,aUe=Sr,sUe=aUe.ROOT_ID,lUe=MC,uUe=lUe.VIEWER_ID,cUe=Symbol.iterator;function dUe(e,t){for(var r=e[cUe](),n=r.next();!n.done;){var i=n.value;if(t.has(i)&&i!==sUe&&i!==uUe)return!0;n=r.next()}return!1}var fUe=dUe,jI=Xb,qI=Ko,hUe=oUe,pUe=fUe,VI=qC,mUe=(function(){function e(r,n,i){this._subscriptions=new Set,this.__log=r,this._resolverCache=n,this._resolverContext=i}var t=e.prototype;return t.subscribe=function(n,i){var o=this,a={backup:null,callback:i,snapshot:n,stale:!1},s=function(){o._subscriptions.delete(a)};return this._subscriptions.add(a),{dispose:s}},t.snapshotSubscriptions=function(n){var i=this;this._subscriptions.forEach(function(o){if(!o.stale){o.backup=o.snapshot;return}var a=o.snapshot,s=VI.read(n,a.selector,i._resolverCache,i._resolverContext),l=jI(a.data,s.data);s.data=l,o.backup=s})},t.restoreSubscriptions=function(){this._subscriptions.forEach(function(n){var i=n.backup;n.backup=null,i?(i.data!==n.snapshot.data&&(n.stale=!0),n.snapshot={data:n.snapshot.data,isMissingData:i.isMissingData,missingClientEdges:i.missingClientEdges,missingLiveResolverFields:i.missingLiveResolverFields,seenRecords:i.seenRecords,selector:i.selector,fieldErrors:i.fieldErrors}):n.stale=!0})},t.updateSubscriptions=function(n,i,o,a){var s=this,l=i.size!==0;this._subscriptions.forEach(function(c){var d=s._updateSubscription(n,c,i,l,a);d!=null&&o.push(d)})},t._updateSubscription=function(n,i,o,a,s){var l=i.backup,c=i.callback,d=i.snapshot,f=i.stale,h=a&&hUe(d.seenRecords,o);if(!(!f&&!h)){var p=h||!l?VI.read(n,d.selector,this._resolverCache,this._resolverContext):l,m=jI(d.data,p.data);if(p={data:m,isMissingData:p.isMissingData,missingClientEdges:p.missingClientEdges,missingLiveResolverFields:p.missingLiveResolverFields,seenRecords:p.seenRecords,selector:p.selector,fieldErrors:p.fieldErrors},i.snapshot=p,i.stale=!1,p.data!==d.data)return this.__log&&qI.ENABLE_NOTIFY_SUBSCRIPTION&&this.__log({name:"store.notify.subscription",sourceOperation:s,snapshot:d,nextSnapshot:p}),c(p),d.selector.owner;if(qI.ENABLE_LOOSE_SUBSCRIPTION_ATTRIBUTION&&(f||pUe(d.seenRecords,o)))return d.selector.owner}},t.size=function(){return this._subscriptions.size},e})(),gUe=mUe,Tj=Je.default,GI=Tj(Vr),vUe=Tj(Si),$j=PC,bUe=$j.INTERNAL_ACTOR_IDENTIFIER_DO_NOT_USE,KI=$j.assertInternalActorIdentifier,_Ue=Aze,yUe=j9e,xUe=ij,VC=v7e,SUe=VC.LiveResolverCache,wUe=VC.RELAY_RESOLVER_LIVE_STATE_SUBSCRIPTION_KEY,EUe=VC.getUpdatedDataIDs,Eu=fo,HI=w7e,kUe=qC,CUe=rUe,RUe=gUe,AUe=Sr,Nj=Sr,O1=Nj.ROOT_ID,TUe=Nj.ROOT_TYPE,M1=Be,$Ue=10,NUe=(function(){function e(r,n){var i=this,o,a,s,l,c,d,f,h;(0,vUe.default)(this,"_gcStep",function(){i._gcRun&&(i._gcRun.next().done?i._gcRun=null:i._gcScheduler(i._gcStep))}),this._currentWriteEpoch=0,this._gcHoldCounter=0,this._gcReleaseBufferSize=(o=n?.gcReleaseBufferSize)!==null&&o!==void 0?o:$Ue,this._shouldRetainWithinTTL_EXPERIMENTAL=(a=n?.shouldRetainWithinTTL_EXPERIMENTAL)!==null&&a!==void 0?a:!1,this._gcRun=null,this._gcScheduler=(s=n?.gcScheduler)!==null&&s!==void 0?s:_Ue,this._getDataID=(l=n?.getDataID)!==null&&l!==void 0?l:xUe,this._globalInvalidationEpoch=null,this._invalidationSubscriptions=new Set,this._invalidatedRecordIDs=new Set,this.__log=(c=n?.log)!==null&&c!==void 0?c:null,this._queryCacheExpirationTime=n?.queryCacheExpirationTime,this._operationLoader=(d=n?.operationLoader)!==null&&d!==void 0?d:null,this._optimisticSource=null,this._recordSource=r,this._releaseBuffer=[],this._roots=new Map,this._shouldScheduleGC=!1,this._resolverCache=new SUe(function(){return i._getMutableRecordSource()},this),this._resolverContext=n?.resolverContext,this._storeSubscriptions=new RUe(n?.log,this._resolverCache,this._resolverContext),this._updatedRecordIDs=new Set,this._shouldProcessClientComponents=(f=n?.shouldProcessClientComponents)!==null&&f!==void 0?f:!1,this._treatMissingFieldsAsNull=(h=n?.treatMissingFieldsAsNull)!==null&&h!==void 0?h:!1,this._actorIdentifier=n?.actorIdentifier,DUe(this._recordSource)}var t=e.prototype;return t.getSource=function(){var n;return(n=this._optimisticSource)!==null&&n!==void 0?n:this._recordSource},t.getOperationLoader=function(){return this._operationLoader},t._getMutableRecordSource=function(){var n;return(n=this._optimisticSource)!==null&&n!==void 0?n:this._recordSource},t.getLiveResolverPromise=function(n){return this._resolverCache.getLiveResolverPromise(n)},t.batchLiveStateUpdates=function(n){this.__log!=null&&this.__log({name:"liveresolver.batch.start"});try{this._resolverCache.batchLiveStateUpdates(n)}finally{this.__log!=null&&this.__log({name:"liveresolver.batch.end"})}},t.check=function(n,i){var o,a,s,l,c,d,f,h=n.root,p=this._getMutableRecordSource(),m=this._globalInvalidationEpoch,g=(o=(a=n.request.node.operation.use_exec_time_resolvers)!==null&&a!==void 0?a:((s=n.request.node.operation.exec_time_resolvers_enabled_provider)===null||s===void 0?void 0:s.get())===!0)!==null&&o!==void 0?o:!1,v=this._roots.get(n.request.identifier),b=v!=null?v.epoch:null;if(m!=null&&(b==null||b<=m))return{status:"stale"};var y=(l=i?.handlers)!==null&&l!==void 0?l:[],S=(c=i?.getSourceForActor)!==null&&c!==void 0?c:function(A){return KI(A),p},w=(d=i?.getTargetForActor)!==null&&d!==void 0?d:function(A){return KI(A),p},C=yUe.check(S,w,(f=i?.defaultActorIdentifier)!==null&&f!==void 0?f:bUe,h,y,this._operationLoader,this._getDataID,this._shouldProcessClientComponents,this.__log,g);return IUe(C,b,v?.fetchTime,this._queryCacheExpirationTime)},t.retain=function(n){var i=this,o=n.request.identifier,a=!1,s=function(){if(!a){a=!0;var d=i._roots.get(o);if(d!=null&&(d.refCount--,d.refCount===0)){var f=i._queryCacheExpirationTime,h=d.fetchTime!=null&&f!=null&&d.fetchTime<=Date.now()-f;if(h)i._shouldRetainWithinTTL_EXPERIMENTAL||i._roots.delete(o),i.scheduleGC();else if(i._releaseBuffer.push(o),i._releaseBuffer.length>i._gcReleaseBufferSize){var p=i._releaseBuffer.shift();i._shouldRetainWithinTTL_EXPERIMENTAL||i._roots.delete(p),i.scheduleGC()}}}},l=this._roots.get(o);return l!=null?(l.refCount===0&&(this._releaseBuffer=this._releaseBuffer.filter(function(c){return c!==o})),l.refCount+=1):this._roots.set(o,{operation:n,refCount:1,epoch:null,fetchTime:null}),{dispose:s}},t.lookup=function(n){var i=this.__log;i?.({name:"store.lookup.start",selector:n});var o=this.getSource(),a=kUe.read(o,n,this._resolverCache,this._resolverContext);return i?.({name:"store.lookup.end",selector:n}),a},t.notify=function(n,i){var o=this,a=this.__log;a?.({name:"store.notify.start",sourceOperation:n}),this._currentWriteEpoch++,i===!0&&(this._globalInvalidationEpoch=this._currentWriteEpoch),this._resolverCache.invalidateDataIDs(this._updatedRecordIDs);var s=this.getSource(),l=[];if(this._storeSubscriptions.updateSubscriptions(s,this._updatedRecordIDs,l,n),this._invalidationSubscriptions.forEach(function(h){o._updateInvalidationSubscription(h,i===!0)}),n!=null){var c=n.request.identifier,d=this._roots.get(c);if(d!=null)d.epoch=this._currentWriteEpoch,d.fetchTime=Date.now();else if(n.request.node.params.operationKind==="query"&&this._gcReleaseBufferSize>0&&this._releaseBuffer.length<this._gcReleaseBufferSize){var f={operation:n,refCount:0,epoch:this._currentWriteEpoch,fetchTime:Date.now()};this._releaseBuffer.push(c),this._roots.set(c,f)}}return a?.({name:"store.notify.complete",sourceOperation:n,updatedRecordIDs:this._updatedRecordIDs,invalidatedRecordIDs:this._invalidatedRecordIDs,subscriptionsSize:this._storeSubscriptions.size(),updatedOwners:l}),this._updatedRecordIDs.clear(),this._invalidatedRecordIDs.clear(),l},t.publish=function(n,i){var o=this._getMutableRecordSource();FUe(o,n,this._currentWriteEpoch+1,i,this._updatedRecordIDs,this._invalidatedRecordIDs);var a=this.__log;a?.({name:"store.publish",source:n,optimistic:o===this._optimisticSource})},t.subscribe=function(n,i){return this._storeSubscriptions.subscribe(n,i)},t.holdGC=function(){var n=this;this._gcRun&&(this._gcRun=null,this._shouldScheduleGC=!0),this._gcHoldCounter++;var i=function(){n._gcHoldCounter>0&&(n._gcHoldCounter--,n._gcHoldCounter===0&&n._shouldScheduleGC&&(n.scheduleGC(),n._shouldScheduleGC=!1))};return{dispose:i}},t.toJSON=function(){return"RelayModernStore()"},t.getEpoch=function(){return this._currentWriteEpoch},t.__getUpdatedRecordIDs=function(){return this._updatedRecordIDs},t.lookupInvalidationState=function(n){var i=this,o=new Map;return n.forEach(function(a){var s,l=i.getSource().get(a);o.set(a,(s=Eu.getInvalidationEpoch(l))!==null&&s!==void 0?s:null)}),o.set("global",this._globalInvalidationEpoch),{dataIDs:n,invalidations:o}},t.checkInvalidationState=function(n){var i=this.lookupInvalidationState(n.dataIDs),o=i.invalidations,a=n.invalidations;if(o.get("global")!==a.get("global"))return!0;var s=(0,GI.default)(n.dataIDs),l;try{for(s.s();!(l=s.n()).done;){var c=l.value;if(o.get(c)!==a.get(c))return!0}}catch(d){s.e(d)}finally{s.f()}return!1},t.subscribeToInvalidationState=function(n,i){var o=this,a={callback:i,invalidationState:n},s=function(){o._invalidationSubscriptions.delete(a)};return this._invalidationSubscriptions.add(a),{dispose:s}},t._updateInvalidationSubscription=function(n,i){var o=this,a=n.callback,s=n.invalidationState,l=s.dataIDs,c=i||l.some(function(d){return o._invalidatedRecordIDs.has(d)});c&&a()},t.snapshot=function(){this._optimisticSource!=null&&M1(!1);var n=this.__log;n?.({name:"store.snapshot"}),this._storeSubscriptions.snapshotSubscriptions(this.getSource()),this._gcRun&&(this._gcRun=null,this._shouldScheduleGC=!0),this._optimisticSource=HI.create(this.getSource())},t.restore=function(){var n=this._optimisticSource;n||M1(!1);var i=this.__log;i?.({name:"store.restore"});var o=HI.getOptimisticRecordIDs(n);this._resolverCache.unsubscribeFromLiveResolverRecords(o),this._optimisticSource=null,this._shouldScheduleGC&&this.scheduleGC(),this._storeSubscriptions.restoreSubscriptions(),this._resolverCache.invalidateResolverRecords(o)},t.scheduleGC=function(){if(this._gcHoldCounter>0){this._shouldScheduleGC=!0;return}this._gcRun||(this._gcRun=this._collect(),this._gcScheduler(this._gcStep))},t.__gc=function(){if(this._optimisticSource==null)for(var n=this._collect();!n.next().done;);},t._collect=function*(){if(!(this._shouldRetainWithinTTL_EXPERIMENTAL&&this._queryCacheExpirationTime==null)){var n=this.__log;e:for(;;){n?.({name:"store.gc.start"});var i=this._currentWriteEpoch,o=new Set,a=(0,GI.default)(this._roots.entries()),s;try{for(a.s();!(s=a.n()).done;){var l,c,d,f=s.value,h=f[0],p=f[1],m=p.operation,g=p.refCount,v=p.fetchTime;if(this._shouldRetainWithinTTL_EXPERIMENTAL){var b=this._queryCacheExpirationTime;b==null&&M1(!1);var y=v==null||v<=Date.now()-b,S=y&&g===0&&!this._releaseBuffer.includes(h);if(S)continue}var w=m.root,C=(l=(c=m.request.node.operation.use_exec_time_resolvers)!==null&&c!==void 0?c:((d=m.request.node.operation.exec_time_resolvers_enabled_provider)===null||d===void 0?void 0:d.get())===!0)!==null&&l!==void 0?l:!1;if(CUe.mark(this._recordSource,w,o,this._operationLoader,this._shouldProcessClientComponents,C),yield,i!==this._currentWriteEpoch){n?.({name:"store.gc.interrupted"});continue e}}}catch(M){a.e(M)}finally{a.f()}for(var A=this._recordSource.getRecordIDs(),$=0;$<A.length;$++){var R=A[$];if(!o.has(R)){var N=this._recordSource.get(R);if(N!=null){var I=Eu.getValue(N,wUe);I?.()}this._recordSource.remove(R),this._shouldRetainWithinTTL_EXPERIMENTAL&&this._roots.delete(R)}}n?.({name:"store.gc.end",references:o});return}}},t.__getNormalizationOptions=function(n){return{path:n,getDataID:this._getDataID,log:this.__log,treatMissingFieldsAsNull:this._treatMissingFieldsAsNull,shouldProcessClientComponents:this._shouldProcessClientComponents,actorIdentifier:this._actorIdentifier}},t.__notifyUpdatedSubscribers=function(n){var i=EUe(n),o=this._updatedRecordIDs;this._updatedRecordIDs=i,this.notify(),this._updatedRecordIDs=o},e})();function DUe(e){if(!e.has(O1)){var t=Eu.create(O1,TUe);e.set(O1,t)}}function FUe(e,t,r,n,i,o){n&&n.forEach(function(h){var p=e.get(h),m=t.get(h);if(m!==null){var g;p!=null?g=Eu.clone(p):g=m!=null?Eu.clone(m):null,g&&(Eu.setValue(g,AUe.INVALIDATED_AT_KEY,r),o.add(h),e.set(h,g))}});for(var a=t.getRecordIDs(),s=0;s<a.length;s++){var l=a[s],c=t.get(l),d=e.get(l);if(c&&d){var f=Eu.update(d,c);f!==d&&(i.add(l),e.set(l,f))}else c===null?(e.delete(l),d!==null&&i.add(l)):c&&(e.set(l,c),i.add(l))}}function IUe(e,t,r,n){var i=e.mostRecentlyInvalidatedAt,o=e.status;if(typeof i=="number"&&(t==null||i>t))return{status:"stale"};if(o==="missing")return{status:"missing"};if(r!=null&&n!=null){var a=r<=Date.now()-n;if(a)return{status:"stale"}}return{status:"available",fetchTime:r??null}}var GC=NUe,Dj=Sr,PUe=Dj.ROOT_TYPE,WI=Dj.getStorageKey,OUe=dj,MUe=OUe.readUpdatableFragment,LUe=fj,zUe=LUe.readUpdatableQuery,JI=Be,UUe=(function(){function e(r,n,i,o){this.__mutator=r,this.__recordSource=n,this._readSelector=i,this._missingFieldHandlers=o}var t=e.prototype;return t.create=function(n,i){return this.__recordSource.create(n,i)},t.delete=function(n){this.__recordSource.delete(n)},t.get=function(n){return this.__recordSource.get(n)},t.getRoot=function(){return this.__recordSource.getRoot()},t.getOperationRoot=function(){var n=this.__recordSource.get(this._readSelector.dataID);return n||(n=this.__recordSource.create(this._readSelector.dataID,PUe)),n},t._getRootField=function(n,i,o){var a=n.node.selections.find(function(s){return s.kind==="LinkedField"&&s.name===i||s.kind==="RequiredField"&&s.field.name===i});return a&&a.kind==="RequiredField"&&(a=a.field),a&&a.kind==="LinkedField"||JI(!1),a.plural!==o&&JI(!1),a},t.getRootField=function(n){var i=this._getRootField(this._readSelector,n,!1),o=WI(i,this._readSelector.variables);return this.getOperationRoot().getLinkedRecord(o)},t.getPluralRootField=function(n){var i=this._getRootField(this._readSelector,n,!0),o=WI(i,this._readSelector.variables);return this.getOperationRoot().getLinkedRecords(o)},t.invalidateStore=function(){this.__recordSource.invalidateStore()},t.readUpdatableQuery=function(n,i){return zUe(n,i,this,this._missingFieldHandlers)},t.readUpdatableFragment=function(n,i){return MUe(n,i,this,this._missingFieldHandlers)},e})(),BUe=UUe,L1,z1,U1=uj,B1=gj,QI=BUe,jUe=Ko,qUe=qC,YI=vc,Ng=Be,j1=typeof v0<"u"?v0:typeof window<"u"?window:void 0,q1=(L1=j1==null||(z1=j1.ErrorUtils)===null||z1===void 0?void 0:z1.applyWithGuard)!==null&&L1!==void 0?L1:function(e,t,r,n,i){return e.apply(t,r)},VUe=(function(){function e(r,n,i,o,a){this._hasStoreSnapshot=!1,this._handlerProvider=n||null,this._pendingBackupRebase=!1,this._pendingData=new Set,this._pendingOptimisticUpdates=new Set,this._store=r,this._appliedOptimisticUpdates=new Set,this._gcHold=null,this._getDataID=i,this._missingFieldHandlers=o,this._log=a}var t=e.prototype;return t.applyUpdate=function(n){!this._appliedOptimisticUpdates.has(n)&&!this._pendingOptimisticUpdates.has(n)||Ng(!1),this._pendingOptimisticUpdates.add(n)},t.revertUpdate=function(n){this._pendingOptimisticUpdates.has(n)?this._pendingOptimisticUpdates.delete(n):this._appliedOptimisticUpdates.has(n)&&(this._pendingBackupRebase=!0,this._appliedOptimisticUpdates.delete(n))},t.revertAll=function(){this._pendingBackupRebase=!0,this._pendingOptimisticUpdates.clear(),this._appliedOptimisticUpdates.clear()},t.commitPayload=function(n,i,o){this._pendingBackupRebase=!0,this._pendingData.add({kind:"payload",operation:n,payload:i,updater:o})},t.commitUpdate=function(n){this._pendingBackupRebase=!0,this._pendingData.add({kind:"updater",updater:n})},t.commitSource=function(n){this._pendingBackupRebase=!0,this._pendingData.add({kind:"source",source:n})},t.run=function(n){var i=this._appliedOptimisticUpdates===0&&!!this._gcHold,o=!this._pendingBackupRebase&&this._pendingOptimisticUpdates.size===0&&!i;if(jUe.DISALLOW_NESTED_UPDATES&&this._isRunning===!0&&Ng(!1),this._isRunning=!0,o)return this._isRunning=!1,[];this._pendingBackupRebase&&this._hasStoreSnapshot&&(this._store.restore(),this._hasStoreSnapshot=!1);var a=this._commitData();return(this._pendingOptimisticUpdates.size||this._pendingBackupRebase&&this._appliedOptimisticUpdates.size)&&(this._hasStoreSnapshot||(this._store.snapshot(),this._hasStoreSnapshot=!0),this._applyUpdates()),this._pendingBackupRebase=!1,this._appliedOptimisticUpdates.size>0?this._gcHold||(this._gcHold=this._store.holdGC()):this._gcHold&&(this._gcHold.dispose(),this._gcHold=null),this._isRunning=!1,this._store.notify(n,a)},t._publishSourceFromPayload=function(n){var i=this,o=n.payload,a=n.operation,s=n.updater,l=o.source,c=o.fieldPayloads,d=new U1(this._store.getSource(),l),f=new B1(d,this._getDataID,this._handlerProvider,this._missingFieldHandlers,this._log);if(c&&c.length&&c.forEach(function(v){var b=i._handlerProvider&&i._handlerProvider(v.handle);b||Ng(!1),b.update(f,v)}),s){var h=a.fragment;h==null&&Ng(!1);var p=new QI(d,f,h,this._missingFieldHandlers),m=XI(l,h);s(p,m)}var g=f.getIDsMarkedForInvalidation();return this._store.publish(l,g),f.isStoreMarkedForInvalidation()},t._commitData=function(){var n=this;if(!this._pendingData.size)return!1;var i=!1;return this._pendingData.forEach(function(o){if(o.kind==="payload"){var a=n._publishSourceFromPayload(o);i=i||a}else if(o.kind==="source"){var s=o.source;n._store.publish(s)}else{var l=o.updater,c=YI.create(),d=new U1(n._store.getSource(),c),f=new B1(d,n._getDataID,n._handlerProvider,n._missingFieldHandlers,n._log);q1(l,null,[f],null,"RelayPublishQueue:commitData"),i=i||f.isStoreMarkedForInvalidation();var h=f.getIDsMarkedForInvalidation();n._store.publish(c,h)}}),this._pendingData.clear(),i},t._applyUpdates=function(){var n=this,i=YI.create(),o=new U1(this._store.getSource(),i),a=new B1(o,this._getDataID,this._handlerProvider,this._missingFieldHandlers,this._log),s=function(c){if(c.storeUpdater){var d=c.storeUpdater;q1(d,null,[a],null,"RelayPublishQueue:applyUpdates")}else{var f=c.operation,h=c.payload,p=c.updater,m=h.source,g=h.fieldPayloads;if(m&&a.publishSource(m,g),p){var v;m&&(v=XI(m,f.fragment));var b=new QI(o,a,f.fragment,n._missingFieldHandlers);q1(p,null,[b,v],null,"RelayPublishQueue:applyUpdates")}}};this._pendingBackupRebase&&this._appliedOptimisticUpdates.size&&this._appliedOptimisticUpdates.forEach(s),this._pendingOptimisticUpdates.size&&(this._pendingOptimisticUpdates.forEach(function(l){s(l),n._appliedOptimisticUpdates.add(l)}),this._pendingOptimisticUpdates.clear()),this._store.publish(i)},e})();function XI(e,t){var r=qUe.read(e,t).data;return r}var GUe=VUe,KUe=Je.default,ZI=KUe(or),HUe=S4e,Fj=PC,eP=Fj.INTERNAL_ACTOR_IDENTIFIER_DO_NOT_USE,Dg=Fj.assertInternalActorIdentifier,V1=Yl,tP=L5e,WUe=j5e,JUe=V5e,QUe=ij,YUe=tze,XUe=R5e,ZUe=Eze,eBe=GC,tBe=GUe,rP=vc,Ij=(function(){function e(r){var n=this,i,o,a,s,l,c,d,f,h,p,m;this.configName=r.configName,this._treatMissingFieldsAsNull=r.treatMissingFieldsAsNull===!0;var g=r.operationLoader,v=(i=r.store)!==null&&i!==void 0?i:new eBe(new rP,{log:r.log,operationLoader:r.operationLoader,getDataID:r.getDataID,shouldProcessClientComponents:r.shouldProcessClientComponents});this.__log=(o=r.log)!==null&&o!==void 0?o:nBe,this.relayFieldLogger=(a=r.relayFieldLogger)!==null&&a!==void 0?a:YUe,this._defaultRenderPolicy=(s=r.UNSTABLE_defaultRenderPolicy)!==null&&s!==void 0?s:"partial",this._operationLoader=g,this._operationExecutions=new Map,this._network=tP(this,r.network),this._getDataID=(l=r.getDataID)!==null&&l!==void 0?l:QUe,this._missingFieldHandlers=(c=r.missingFieldHandlers)!==null&&c!==void 0?c:[],this._publishQueue=new tBe(v,(d=r.handlerProvider)!==null&&d!==void 0?d:HUe,this._getDataID,this._missingFieldHandlers,this.__log),this._scheduler=(f=r.scheduler)!==null&&f!==void 0?f:null,this._store=v,this.options=r.options,this._isServer=(h=r.isServer)!==null&&h!==void 0?h:!1,this._normalizeResponse=(p=r.normalizeResponse)!==null&&p!==void 0?p:XUe,this.__setNet=function(b){return n._network=tP(n,b)},this._operationTracker=(m=r.operationTracker)!==null&&m!==void 0?m:new WUe,this._shouldProcessClientComponents=r.shouldProcessClientComponents,JUe(this)}var t=e.prototype;return t.getStore=function(){return this._store},t.getNetwork=function(){return this._network},t.getOperationTracker=function(){return this._operationTracker},t.getScheduler=function(){return this._scheduler},t.isRequestActive=function(n){var i=this._operationExecutions.get(n);return i==="active"},t.UNSTABLE_getDefaultRenderPolicy=function(){return this._defaultRenderPolicy},t.applyUpdate=function(n){var i=this,o=function(){i._scheduleUpdates(function(){i._publishQueue.revertUpdate(n),i._publishQueue.run()})};return this._scheduleUpdates(function(){i._publishQueue.applyUpdate(n),i._publishQueue.run()}),{dispose:o}},t.revertUpdate=function(n){var i=this;this._scheduleUpdates(function(){i._publishQueue.revertUpdate(n),i._publishQueue.run()})},t.replaceUpdate=function(n,i){var o=this;this._scheduleUpdates(function(){o._publishQueue.revertUpdate(n),o._publishQueue.applyUpdate(i),o._publishQueue.run()})},t.applyMutation=function(n){var i=this._execute({createSource:function(){return V1.create(function(a){})},isClientPayload:!1,operation:n.operation,optimisticConfig:n,updater:null}).subscribe({});return{dispose:function(){return i.unsubscribe()}}},t.check=function(n){return this._missingFieldHandlers.length===0&&!rBe(n)?this._store.check(n):this._checkSelectorAndHandleMissingFields(n,this._missingFieldHandlers)},t.commitPayload=function(n,i){this._execute({createSource:function(){return V1.from({data:i})},isClientPayload:!0,operation:n,optimisticConfig:null,updater:null}).subscribe({})},t.commitUpdate=function(n){var i=this;this._scheduleUpdates(function(){i._publishQueue.commitUpdate(n),i._publishQueue.run()})},t.lookup=function(n){return this._store.lookup(n)},t.subscribe=function(n,i){return this._store.subscribe(n,i)},t.retain=function(n){return this._store.retain(n)},t.isServer=function(){return this._isServer},t._checkSelectorAndHandleMissingFields=function(n,i){var o=this,a=rP.create(),s=this._store.getSource(),l=this._store.check(n,{handlers:i,defaultActorIdentifier:eP,getSourceForActor:function(d){return Dg(d),s},getTargetForActor:function(d){return Dg(d),a}});return a.size()>0&&this._scheduleUpdates(function(){o._publishQueue.commitSource(a),o._publishQueue.run()}),l},t._scheduleUpdates=function(n){var i=this._scheduler;i!=null?i.schedule(n):n()},t.execute=function(n){var i=this,o=n.operation;return this._execute({createSource:function(){return i.getNetwork().execute(o.request.node.params,o.request.variables,o.request.cacheConfig||{},null,void 0,void 0,void 0,function(){return i.check(o)})},isClientPayload:!1,operation:o,optimisticConfig:null,updater:null})},t.executeSubscription=function(n){var i=this,o=n.operation,a=n.updater;return this._execute({createSource:function(){return i.getNetwork().execute(o.request.node.params,o.request.variables,o.request.cacheConfig||{},null)},isClientPayload:!1,operation:o,optimisticConfig:null,updater:a})},t.executeMutation=function(n){var i=this,o=n.operation,a=n.optimisticResponse,s=n.optimisticUpdater,l=n.updater,c=n.uploadables,d;return(a||s)&&(d={operation:o,response:a,updater:s}),this._execute({createSource:function(){return i.getNetwork().execute(o.request.node.params,o.request.variables,(0,ZI.default)((0,ZI.default)({},o.request.cacheConfig),{},{force:!0}),c)},isClientPayload:!1,operation:o,optimisticConfig:d,updater:l})},t.executeWithSource=function(n){var i=n.operation,o=n.source;return this._execute({createSource:function(){return o},isClientPayload:!1,operation:i,optimisticConfig:null,updater:null})},t.toJSON=function(){var n;return"RelayModernEnvironment(".concat((n=this.configName)!==null&&n!==void 0?n:"",")")},t._execute=function(n){var i=this,o=n.createSource,a=n.isClientPayload,s=n.operation,l=n.optimisticConfig,c=n.updater,d=this._publishQueue,f=this._store;return V1.create(function(h){var p=ZUe.execute({actorIdentifier:eP,getDataID:i._getDataID,isClientPayload:a,log:i.__log,operation:s,operationExecutions:i._operationExecutions,operationLoader:i._operationLoader,operationTracker:i._operationTracker,optimisticConfig:l,getPublishQueue:function(g){return Dg(g),d},scheduler:i._scheduler,shouldProcessClientComponents:i._shouldProcessClientComponents,sink:h,source:o(),getStore:function(g){return Dg(g),f},treatMissingFieldsAsNull:i._treatMissingFieldsAsNull,updater:c,normalizeResponse:i._normalizeResponse});return function(){return p.cancel()}})},e})();function rBe(e){return e.root.node.kind==="Operation"&&e.root.node.clientAbstractTypes!=null}Ij.prototype["@@RelayModernEnvironment"]=!0;function nBe(){}var iBe=Ij,oBe=Yb,aBe=wa,sBe=aBe.getRequest,lBe=Xl,uBe=lBe.createOperationDescriptor,cBe=Ea,dBe=cBe.createReaderSelector;function fBe(e,t){var r=sBe(t.subscription);if(r.params.operationKind!=="subscription")throw new Error("requestSubscription: Must use Subscription operation");var n=t.configs,i=t.onCompleted,o=t.onError,a=t.onNext,s=t.variables,l=t.cacheConfig,c=uBe(r,s,l),d=n?oBe.convert(n,r,null,t.updater):t,f=d.updater,h=e.executeSubscription({operation:c,updater:f}).subscribe({next:function(m){if(a!=null){var g=c.fragment,v;if(Array.isArray(m)){var b,y;v=(b=m[0])===null||b===void 0||(y=b.extensions)===null||y===void 0?void 0:y.__relay_subscription_root_id}else{var S;v=(S=m.extensions)===null||S===void 0?void 0:S.__relay_subscription_root_id}typeof v=="string"&&(g=dBe(g.node,v,g.variables,g.owner));var w=e.lookup(g).data;a(w)}},error:o,complete:i});return{dispose:h.unsubscribe}}var hBe=fBe,pBe=Je.default;pBe(or);var Pj=Sr;Pj.getModuleComponentKey;Pj.getModuleOperationKey;var mBe=Object.prototype.hasOwnProperty;function gBe(e){for(var t in e)if(mBe.call(e,t))return!1;return!0}var vBe=gBe,KC=Ea,bBe=KC.getDataIDsFromFragment,_Be=KC.getSelector,yBe=KC.getVariablesFromFragment,xBe=vBe,Zf=Ko,SBe=pc,nP=SBe.stableCopy,wBe=AB,iP=wBe.intern;function EBe(e,t){var r=_Be(e,t),n=r==null?"null":r.kind==="SingularReaderSelector"?r.owner.identifier:"["+r.selectors.map(function(c){return c.owner.identifier}).join(",")+"]",i=yBe(e,t),o=bBe(e,t);if(Zf.ENABLE_GETFRAGMENTIDENTIFIER_OPTIMIZATION){var a=typeof o>"u"?"missing":o==null?"null":Array.isArray(o)?"["+o.join(",")+"]":o;return a=Zf.STRING_INTERN_LEVEL<=1?a:iP(a,Zf.MAX_DATA_ID_LENGTH),n+"/"+e.name+"/"+(i==null||xBe(i)?"{}":JSON.stringify(nP(i)))+"/"+a}else{var s,l=(s=JSON.stringify(o))!==null&&s!==void 0?s:"missing";return l=Zf.STRING_INTERN_LEVEL<=1?l:iP(l,Zf.MAX_DATA_ID_LENGTH),n+"/"+e.name+"/"+JSON.stringify(nP(i))+"/"+l}}var kBe=EBe,eh=Be;function CBe(e,t){var r,n;((r=e.metadata)===null||r===void 0?void 0:r.plural)===!0&&eh(!1);var i=(n=e.metadata)===null||n===void 0?void 0:n.refetch;i==null&&eh(!1);var o=i.operation.default?i.operation.default:i.operation,a=i.fragmentPathInResult;typeof o=="string"&&eh(!1);var s=i.identifierInfo;return s!=null&&(s.identifierField==null||typeof s.identifierField=="string"||eh(!1),s.identifierQueryVariableName==null||typeof s.identifierQueryVariableName=="string"||eh(!1)),{fragmentRefPathInResponse:a,identifierInfo:s,refetchableRequest:o,refetchMetadata:i}}var Oj=CBe,RBe=Oj,G1=Be;function ABe(e,t){var r,n,i=RBe(e),o=i.refetchableRequest,a=i.refetchMetadata,s=a.connection;s==null&&G1(!1);var l=s.path,c=((r=(n=e.metadata)===null||n===void 0?void 0:n.connection)!==null&&r!==void 0?r:[])[0];c==null&&G1(!1);var d=a.identifierInfo;return d?.identifierField==null||typeof d.identifierField=="string"||G1(!1),{connectionPathInFragmentData:l,identifierField:d?.identifierField,paginationRequest:o,paginationMetadata:s,stream:c.stream===!0}}var TBe=ABe,Mj=Je.default,Fg=Mj(Si),Lc=Mj(or),oP=Be;function $Be(e,t,r,n,i,o){var a,s=o.backward,l=o.forward;if(e==="backward"){var c;s!=null&&s.count!=null&&s.cursor!=null||oP(!1);var d=(0,Lc.default)((0,Lc.default)((0,Lc.default)({},n),i),{},(c={},(0,Fg.default)(c,s.cursor,r),(0,Fg.default)(c,s.count,t),c));return l&&l.cursor&&(d[l.cursor]=null),l&&l.count&&(d[l.count]=null),d}l!=null&&l.count!=null&&l.cursor!=null||oP(!1);var f=(0,Lc.default)((0,Lc.default)((0,Lc.default)({},n),i),{},(a={},(0,Fg.default)(a,l.cursor,r),(0,Fg.default)(a,l.count,t),a));return s&&s.cursor&&(f[s.cursor]=null),s&&s.count&&(f[s.count]=null),f}var NBe=$Be,DBe=Je.default,FBe=DBe(Vr),aP=Be;function IBe(e,t){var r=e,n=(0,FBe.default)(t),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;if(r==null)return null;typeof o=="number"?(Array.isArray(r)||aP(!1),r=r[o]):(typeof r=="object"&&!Array.isArray(r)||aP(!1),r=r[o])}}catch(a){n.e(a)}finally{n.f()}return r}var PBe=IBe,Lj=z6e;Lj.isErrorResult;Lj.isValueResult;var OBe=Qb,MBe=kC,LBe=U4e,zBe=j4e,UBe=tLe,sP=Yb,BBe=cLe,jBe=Yl,qBe=kLe,VBe=NLe,Ig=Jb,Ra=wa,GBe=ILe,HC=ts;HC.generateClientID;HC.generateUniqueClientID;HC.isClientID;var KBe=t8e,HBe=i8e,WBe=s8e,JBe=CC,zj=Zb;zj.isSuspenseSentinel;zj.suspenseSentinel;var QBe=F5e,lP=Ql,YBe=iBe,uP=Xl,Wi=Ea,XBe=GC,ZBe=vc,po=Sr,eje=xC,cP=MC,tje=hBe,rje=wB,nje=kBe,ije=TBe,oje=NBe,aje=PB,sje=Oj,lje=EB,uje=PBe,cje=pm,dje=cje.handlePotentialSnapshotErrors,fje=mB,hje=OB,pje=Xb,mje=QU,gje=Ko,vje=vB,Uj=pc;Uj.hasCycle;Uj.stableCopy;var bje={Environment:YBe,Network:BBe,Observable:jBe,RecordSource:ZBe,ReplaySubject:vje,Store:XBe,areEqualSelectors:Wi.areEqualSelectors,createFragmentSpecResolver:KBe,createNormalizationSelector:Wi.createNormalizationSelector,createOperationDescriptor:uP.createOperationDescriptor,createReaderSelector:Wi.createReaderSelector,createRequestDescriptor:uP.createRequestDescriptor,getArgumentValues:po.getArgumentValues,getDataIDsFromFragment:Wi.getDataIDsFromFragment,getDataIDsFromObject:Wi.getDataIDsFromObject,getNode:Ra.getNode,getFragment:Ra.getFragment,getInlineDataFragment:Ra.getInlineDataFragment,getModuleComponentKey:po.getModuleComponentKey,getModuleOperationKey:po.getModuleOperationKey,getPaginationFragment:Ra.getPaginationFragment,getPluralSelector:Wi.getPluralSelector,getRefetchableFragment:Ra.getRefetchableFragment,getRequest:Ra.getRequest,getRequestIdentifier:lje,getSelector:Wi.getSelector,getSelectorsFromObject:Wi.getSelectorsFromObject,getSingularSelector:Wi.getSingularSelector,getStorageKey:po.getStorageKey,getVariablesFromFragment:Wi.getVariablesFromFragment,getVariablesFromObject:Wi.getVariablesFromObject,getVariablesFromPluralFragment:Wi.getVariablesFromPluralFragment,getVariablesFromSingularFragment:Wi.getVariablesFromSingularFragment,handlePotentialSnapshotErrors:dje,graphql:Ra.graphql,isFragment:Ra.isFragment,isInlineDataFragment:Ra.isInlineDataFragment,isRequest:Ra.isRequest,readInlineData:QBe,readFragment:eje.readFragment,MutationTypes:sP.MutationTypes,RangeOperations:sP.RangeOperations,ConnectionHandler:OBe,VIEWER_ID:cP.VIEWER_ID,VIEWER_TYPE:cP.VIEWER_TYPE,applyOptimisticMutation:LBe,commitLocalUpdate:zBe,commitMutation:UBe,fetchQuery:qBe,fetchQuery_DEPRECATED:VBe,isRelayModernEnvironment:JBe,requestSubscription:tje,ConnectionInterface:MBe,PreloadableQueryRegistry:GBe,RelayFeatureFlags:gje,DEFAULT_HANDLE_KEY:mje.DEFAULT_HANDLE_KEY,FRAGMENTS_KEY:po.FRAGMENTS_KEY,FRAGMENT_OWNER_KEY:po.FRAGMENT_OWNER_KEY,ID_KEY:po.ID_KEY,REF_KEY:po.REF_KEY,REFS_KEY:po.REFS_KEY,ROOT_ID:po.ROOT_ID,ROOT_TYPE:po.ROOT_TYPE,TYPENAME_KEY:po.TYPENAME_KEY,deepFreeze:rje,isPromise:fje,isScalarAndEqual:hje,recycleNodesInto:pje,getFragmentIdentifier:nje,getRefetchMetadata:sje,getPaginationMetadata:ije,getPaginationVariables:oje,getPendingOperationsForFragment:aje,getValueAtPath:uje,__internal:{createRelayContext:HBe,createRelayLoggingContext:WBe,getOperationVariables:lP.getOperationVariables,getLocalVariables:lP.getLocalVariables,fetchQuery:Ig.fetchQuery,fetchQueryDeduped:Ig.fetchQueryDeduped,getPromiseForActiveRequest:Ig.getPromiseForActiveRequest,getObservableForActiveRequest:Ig.getObservableForActiveRequest}},wt=bje,_je=GC,Bj=_je;const jj=tV(Bj),yje=rV({__proto__:null,default:jj},[Bj]);let dP={kind:"linked",handle:(e,t,r,n)=>{let i=e.name,o=r.id;if(!(t==null||i!=="node"||t.getType()!==wt.ROOT_TYPE))return o}};function xje(e,t,r){return new wt.Store(e,{gcReleaseBufferSize:t,queryCacheExpirationTime:r})}function Sje(e,t,r){return new jj(e,{gcReleaseBufferSize:t,queryCacheExpirationTime:r})}function wje(e,t,r){return new yje(e,{gcReleaseBufferSize:t,queryCacheExpirationTime:r})}let Eje={make:xje,makeLiveStore:Sje,_makeLiveStoreCjs:wje};function kje(e,t,r,n,i,o,a){return new wt.Environment({network:e,store:t,getDataID:r,treatMissingFieldsAsNull:n,missingFieldHandlers:i!==void 0?i.concat([dP]):[dP],relayFieldLogger:o,isServer:a})}function qj(e,t,r){let n=[],i=e.getStore().getSource()._records.get(r);return i!==void 0&&Object.entries(i).forEach(o=>{if(o[0].startsWith("__"+t+"_connection")){n.push(o[1].__ref);return}}),n}function Cje(e,t,r,n){let i=n!==void 0?n:[];wt.commitLocalUpdate(e,o=>{qj(e,t,r).forEach(a=>{if(!i.includes(a))return ee(Mi(o.get(a)),s=>{s.invalidateRecord()})})})}let Rje={make:kje,findAllConnectionIds:qj,invalidateAllOfConnection:Cje};var Aje=Nt,Tje=wt,$je=Tje.__internal.createRelayContext,xf=$je(Aje),Vj={exports:{}};(function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(r){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var o in i)({}).hasOwnProperty.call(i,o)&&(r[o]=i[o])}return r},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Vj);var l_=Vj.exports,Gj={exports:{}};(function(e){function t(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Gj);var u_=Gj.exports,Kj={exports:{}},Hj={exports:{}};(function(e){function t(r,n){return e.exports=t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,o){return i.__proto__=o,i},e.exports.__esModule=!0,e.exports.default=e.exports,t(r,n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Hj);var Nje=Hj.exports;(function(e){var t=Nje;function r(n,i){n.prototype=Object.create(i.prototype),n.prototype.constructor=n,t(n,i)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(Kj);var c_=Kj.exports,fP=Be;function Dje(e,t){t&&typeof t=="object"||fP(!1);for(var r in t)if(t.hasOwnProperty(r)){var n=t[r];n&&(typeof n=="object"||typeof n=="function")||fP(!1)}}var Fje=Dje;function Wj(e){return e.displayName||e.name||"Component"}function Ije(e){return"Relay("+Wj(e)+")"}var d_={getComponentName:Wj,getContainerName:Ije},Pje=Nt,Jj=Pje.createContext({rootIsQueryRenderer:!1}),Oje=Je.default,Mje=Oje(l_),Lje=Fje,Qj=d_,zje=Qj.getComponentName,Uje=Qj.getContainerName,Bje=xf,jje=Jj,qje=Be,mw=Nt,Vje=wt,Gje=Vje.getFragment,hP=mw.useContext;function Kje(e,t,r){var n=Uje(e);Lje(zje(e),t);var i={};for(var o in t)i[o]=Gje(t[o]);var a=r(e,i);a.displayName=n;function s(c,d){var f,h=hP(Bje);h==null&&qje(!1);var p=hP(jje);return mw.createElement(a,(0,Mje.default)({},c,{__relayContext:h,__rootIsQueryRenderer:(f=p?.rootIsQueryRenderer)!==null&&f!==void 0?f:!1,componentRef:c.componentRef||d}))}s.displayName=n;var l=mw.forwardRef(s);return l}var WC=Kje;function Hje(e){return typeof e=="object"&&e!==null&&typeof e.check=="function"&&typeof e.lookup=="function"&&typeof e.retain=="function"&&typeof e.execute=="function"&&typeof e.subscribe=="function"}var Wje=Hje,Jje=Wje,Qje=Be;function Yje(e){return Xje(e)||Qje(!1),e}function Xje(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&Jje(e.environment)}var JC={assertRelayContext:Yje},gm=Je.default,Zje=gm(l_),eqe=gm(yf),tqe=gm(u_),rqe=gm(c_),pP=gm(Si),nqe=["componentRef","__relayContext","__rootIsQueryRenderer"],iqe=WC,oqe=d_,aqe=oqe.getContainerName,sqe=JC,mP=sqe.assertRelayContext,lqe=Js,gP=Nt,QC=wt,vP=QC.createFragmentSpecResolver,bP=QC.getDataIDsFromObject,uqe=QC.isScalarAndEqual;function cqe(e,t){var r,n=aqe(e);return r=(function(i){(0,rqe.default)(o,i);function o(s){var l,c;c=i.call(this,s)||this,(0,pP.default)((0,tqe.default)(c),"_handleFragmentDataUpdate",function(){var p=c.state.resolver;c.setState(function(m){return p===m.resolver?{data:m.resolver.resolve(),relayProp:Pg(m.relayProp.environment)}:null})});var d=mP(s.__relayContext),f=(l=s.__rootIsQueryRenderer)!==null&&l!==void 0?l:!1,h=vP(d,n,t,s,f);return c.state={data:h.resolve(),prevProps:s,prevPropsContext:d,relayProp:Pg(d.environment),resolver:h},c}o.getDerivedStateFromProps=function(l,c){var d,f=c.prevProps,h=mP(l.__relayContext),p=(d=l.__rootIsQueryRenderer)!==null&&d!==void 0?d:!1,m=bP(t,f),g=bP(t,l),v=c.resolver;if(c.prevPropsContext.environment!==h.environment||!lqe(m,g))return v=vP(h,n,t,l,p),{data:v.resolve(),prevPropsContext:h,prevProps:l,relayProp:Pg(h.environment),resolver:v};v.setProps(l);var b=v.resolve();return b!==c.data?{data:b,prevProps:l,prevPropsContext:h,relayProp:Pg(h.environment)}:null};var a=o.prototype;return a.componentDidMount=function(){this._subscribeToNewResolverAndRerenderIfStoreHasChanged()},a.componentDidUpdate=function(l,c){this.state.resolver!==c.resolver?(c.resolver.dispose(),this._subscribeToNewResolverAndRerenderIfStoreHasChanged()):this._rerenderIfStoreHasChanged()},a.componentWillUnmount=function(){this.state.resolver.dispose()},a.shouldComponentUpdate=function(l,c){if(c.data!==this.state.data)return!0;for(var d=Object.keys(l),f=0;f<d.length;f++){var h=d[f];if(h==="__relayContext"){if(c.prevPropsContext.environment!==this.state.prevPropsContext.environment)return!0}else if(!t.hasOwnProperty(h)&&!uqe(l[h],this.props[h]))return!0}return!1},a._rerenderIfStoreHasChanged=function(){var l=this.state,c=l.data,d=l.resolver,f=d.resolve();c!==f&&this.setState({data:f})},a._subscribeToNewResolverAndRerenderIfStoreHasChanged=function(){var l=this.state,c=l.data,d=l.resolver,f=d.resolve();d.setCallback(this.props,this._handleFragmentDataUpdate),c!==f&&this.setState({data:f})},a.render=function(){var l=this.props,c=l.componentRef;l.__relayContext,l.__rootIsQueryRenderer;var d=(0,eqe.default)(l,nqe);return gP.createElement(e,(0,Zje.default)({},d,this.state.data,{ref:c,relay:this.state.relayProp}))},o})(gP.Component),(0,pP.default)(r,"displayName",n),r}function Pg(e){return{environment:e}}function dqe(e,t){return iqe(e,t,cqe)}var fqe={createContainer:dqe},f_=Nt,YC=wt;YC.createOperationDescriptor;YC.deepFreeze;YC.getRequest;f_.useLayoutEffect;f_.useState;f_.useRef;f_.useMemo;var hqe=Je.default,_P=hqe(or),pqe=wt,mqe=pqe.getSelector;function gqe(e,t){var r={};return Object.keys(e).forEach(function(n){var i,o,a,s=e[n],l=t[n],c=mqe(s,l),d=c!=null&&c.kind==="PluralReaderSelector"?(i=(o=c.selectors[0])===null||o===void 0?void 0:o.owner.variables)!==null&&i!==void 0?i:{}:(a=c?.owner.variables)!==null&&a!==void 0?a:{};r=(0,_P.default)((0,_P.default)({},r),d)}),r}var Yj=gqe,vqe=Je.default,yP=vqe(Si),K1=Be,XC=wt,bqe=XC.__internal.fetchQuery,_qe=XC.createOperationDescriptor,yqe=XC.isRelayModernEnvironment,xqe=(function(){function e(r){(0,yP.default)(this,"_selectionReferences",[]),(0,yP.default)(this,"_didFetchFinish",!1),r!=null&&(this._cacheSelectionReference=r.cacheSelectionReference,this._selectionReferences=r.selectionReferences)}var t=e.prototype;return t.getSelectionReferences=function(){return{cacheSelectionReference:this._cacheSelectionReference,selectionReferences:this._selectionReferences}},t.lookupInStore=function(n,i,o){return(o==="store-and-network"||o==="store-or-network")&&n.check(i).status==="available"?(this._retainCachedOperation(n,i),n.lookup(i.fragment)):null},t.getFetchResult=function(){if(this._didFetchFinish){if(this._error!=null)return{error:this._error};if(this._snapshot!=null)return{snapshot:this._snapshot}}else return null},t.execute=function(n){var i=this,o=n.environment,a=n.operation,s=n.preservePreviousReferences,l=s===void 0?!1:s,c=o.retain(a),d=function(){i._selectionReferences=i._selectionReferences.concat(c)},f=function(){l||i.disposeSelectionReferences(),i._selectionReferences=i._selectionReferences.concat(c)},h=function(){i._selectionReferences=i._selectionReferences.concat(c)};return yqe(o)?bqe(o,a).do({error:d,complete:f,unsubscribe:h}):o.execute({operation:a}).do({error:d,complete:f,unsubscribe:h})},t.setOnDataChange=function(n){this._fetchOptions||K1(!1),typeof n=="function"&&(this._fetchOptions.onDataChangeCallbacks=this._fetchOptions.onDataChangeCallbacks||[],this._fetchOptions.onDataChangeCallbacks.push(n),this._didFetchFinish&&(this._error!=null?n({error:this._error}):this._snapshot!=null&&n({snapshot:this._snapshot})))},t.fetch=function(n,i){var o=this,a=n.environment,s=n.operation,l=n.onDataChange,c=!1,d;this.disposeRequest();var f=this._fetchOptions&&this._fetchOptions.onDataChangeCallbacks;this._fetchOptions={environment:a,onDataChangeCallbacks:f||[],operation:s},l&&this._fetchOptions.onDataChangeCallbacks.indexOf(l)===-1&&this._fetchOptions.onDataChangeCallbacks.push(l);var h=i?_qe(s.request.node,s.request.variables,i):s,p=this.execute({environment:a,operation:h}).finally(function(){o._pendingRequest=null}).subscribe({next:function(){o._didFetchFinish=!0,o._error=null,o._onQueryDataAvailable({notifyFirstResult:c})},error:function(g){o._didFetchFinish=!0,o._error=g,o._snapshot=null;var v=o._fetchOptions&&o._fetchOptions.onDataChangeCallbacks;c?v&&v.forEach(function(b){b({error:g})}):d=g}});if(this._pendingRequest={dispose:function(){p.unsubscribe()}},c=!0,d)throw d;return this._snapshot},t.retry=function(n){return this._fetchOptions||K1(!1),this.fetch({environment:this._fetchOptions.environment,operation:this._fetchOptions.operation,onDataChange:null},n)},t.dispose=function(){this.disposeRequest(),this.disposeSelectionReferences()},t.disposeRequest=function(){this._error=null,this._snapshot=null,this._pendingRequest&&this._pendingRequest.dispose(),this._rootSubscription&&(this._rootSubscription.dispose(),this._rootSubscription=null)},t._retainCachedOperation=function(n,i){this._disposeCacheSelectionReference(),this._cacheSelectionReference=n.retain(i)},t._disposeCacheSelectionReference=function(){this._cacheSelectionReference&&this._cacheSelectionReference.dispose(),this._cacheSelectionReference=null},t.disposeSelectionReferences=function(){this._disposeCacheSelectionReference(),this._selectionReferences.forEach(function(n){return n.dispose()}),this._selectionReferences=[]},t._onQueryDataAvailable=function(n){var i=this,o=n.notifyFirstResult;this._fetchOptions||K1(!1);var a=this._fetchOptions,s=a.environment,l=a.onDataChangeCallbacks,c=a.operation;if(!this._snapshot&&(this._snapshot=s.lookup(c.fragment),this._rootSubscription=s.subscribe(this._snapshot,function(f){if(i._fetchOptions!=null){var h=i._fetchOptions.onDataChangeCallbacks;Array.isArray(h)&&h.forEach(function(p){return p({snapshot:f})})}}),this._snapshot&&o&&Array.isArray(l))){var d=this._snapshot;l.forEach(function(f){return f({snapshot:d})})}},e})(),ZC=xqe,Sf=Je.default,Sqe=Sf(l_),H1=Sf(yf),th=Sf(u_),wqe=Sf(c_),fu=Sf(Si),ui=Sf(or),Eqe=["componentRef"],kqe=["componentRef","__relayContext","__rootIsQueryRenderer"],Cqe=["componentRef","__relayContext","__rootIsQueryRenderer"],Rqe=WC,W1=Yj,Xj=d_,Aqe=Xj.getComponentName,Tqe=Xj.getContainerName,$qe=xf,Nqe=ZC,Dqe=JC,J1=Dqe.assertRelayContext,Q1=Js,Pa=Be,Y1=Nt,Ys=wt,xP=Ys.ConnectionInterface,SP=Ys.Observable,Og=Ys.RelayFeatureFlags,Mg=Ys.createFragmentSpecResolver,Fqe=Ys.createOperationDescriptor,wP=Ys.getDataIDsFromObject,Iqe=Ys.getRequest,Pqe=Ys.getVariablesFromObject,Oqe=Ys.isScalarAndEqual,EP="forward";function Mqe(e){var t=e.path;return t||Pa(!1),function(r){for(var n=r[e.fragmentName],i=0;i<t.length;i++){if(!n||typeof n!="object")return null;n=n[t[i]]}return n}}function Lqe(e){var t=e.count;return t||Pa(!1),function(r,n){return(0,ui.default)((0,ui.default)({},r),{},(0,fu.default)({},t,n))}}function zqe(e){var t=null,r=!1;for(var n in e){var i=e[n],o=i.metadata&&i.metadata.connection;i.metadata!==void 0&&(r=!0),o&&(o.length!==1&&Pa(!1),t&&Pa(!1),t=(0,ui.default)((0,ui.default)({},o[0]),{},{fragmentName:n}))}return!r||t!==null||Pa(!1),t||{}}function kP(e){return typeof e=="function"?{error:e,complete:e,unsubscribe:function(r){typeof e=="function"&&e()}}:e||{}}function Uqe(e,t,r){var n;Aqe(e);var i=Tqe(e),o=zqe(t),a=r.getConnectionFromProps||Mqe(o),s=r.direction||o.direction;s||Pa(!1);var l=r.getFragmentVariables||Lqe(o);return n=(function(c){(0,wqe.default)(d,c);function d(h){var p,m;m=c.call(this,h)||this,(0,fu.default)((0,th.default)(m),"_handleFragmentDataUpdate",function(){m.setState({data:m._resolver.resolve()})}),(0,fu.default)((0,th.default)(m),"_hasMore",function(){var b=m._getConnectionData();return!!(b&&b.hasMore&&b.cursor)}),(0,fu.default)((0,th.default)(m),"_isLoading",function(){return!!m._refetchSubscription}),(0,fu.default)((0,th.default)(m),"_refetchConnection",function(b,y,S){if(!m._canFetchPage("refetchConnection"))return{dispose:function(){}};m._refetchVariables=S;var w={count:b,cursor:null,totalCount:b},C=m._fetchPage(w,kP(y),{force:!0});return{dispose:C.unsubscribe}}),(0,fu.default)((0,th.default)(m),"_loadMore",function(b,y,S){if(!m._canFetchPage("loadMore"))return{dispose:function(){}};var w=kP(y),C=m._getConnectionData();if(!C)return SP.create(function(M){return M.complete()}).subscribe(w),null;var A=C.edgeCount+b;if(S&&S.force)return m._refetchConnection(A,y);var $=xP.get();$.END_CURSOR,$.START_CURSOR;var R=C.cursor,N={count:b,cursor:R,totalCount:A},I=m._fetchPage(N,w,S);return{dispose:I.unsubscribe}});var g=J1(h.__relayContext),v=(p=h.__rootIsQueryRenderer)!==null&&p!==void 0?p:!1;return m._isARequestInFlight=!1,m._refetchSubscription=null,m._refetchVariables=null,Og.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT===!0?m._resolver=Mg(g,i,t,h,v):m._resolver=Mg(g,i,t,h,v,m._handleFragmentDataUpdate),m.state={data:m._resolver.resolve(),prevContext:g,contextForChildren:g,relayProp:m._buildRelayProp(g),resolverGeneration:0},m._isUnmounted=!1,m._hasFetched=!1,m}var f=d.prototype;return f.componentDidMount=function(){this._isUnmounted=!1,Og.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT===!0&&this._subscribeToNewResolverAndRerenderIfStoreHasChanged()},f.componentDidUpdate=function(p,m){Og.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT===!0&&(m.resolverGeneration!==this.state.resolverGeneration?this._subscribeToNewResolverAndRerenderIfStoreHasChanged():this._rerenderIfStoreHasChanged())},f.UNSAFE_componentWillReceiveProps=function(p){var m=this,g,v=J1(p.__relayContext),b=(g=p.__rootIsQueryRenderer)!==null&&g!==void 0?g:!1,y=wP(t,this.props),S=wP(t,p),w=W1(t,this.props),C=W1(t,p);v.environment!==this.state.prevContext.environment||!Q1(w,C)||!Q1(y,S)?(this._cleanup(),Og.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT===!0?this._resolver=Mg(v,i,t,p,b):this._resolver=Mg(v,i,t,p,b,this._handleFragmentDataUpdate),this.setState(function($){return{prevContext:v,contextForChildren:v,relayProp:m._buildRelayProp(v),resolverGeneration:$.resolverGeneration+1}})):this._hasFetched||this._resolver.setProps(p);var A=this._resolver.resolve();A!==this.state.data&&this.setState({data:A})},f.componentWillUnmount=function(){this._isUnmounted=!0,this._cleanup()},f.shouldComponentUpdate=function(p,m){if(m.data!==this.state.data||m.relayProp!==this.state.relayProp||m.resolverGeneration!==this.state.resolverGeneration)return!0;for(var g=Object.keys(p),v=0;v<g.length;v++){var b=g[v];if(b==="__relayContext"){if(m.prevContext.environment!==this.state.prevContext.environment)return!0}else if(!t.hasOwnProperty(b)&&!Oqe(p[b],this.props[b]))return!0}return!1},f._buildRelayProp=function(p){return{hasMore:this._hasMore,isLoading:this._isLoading,loadMore:this._loadMore,refetchConnection:this._refetchConnection,environment:p.environment}},f._rerenderIfStoreHasChanged=function(){var p=this.state.data,m=this._resolver.resolve();p!==m&&this.setState({data:m})},f._subscribeToNewResolverAndRerenderIfStoreHasChanged=function(){var p=this.state.data,m=this._resolver.resolve();this._resolver.setCallback(this.props,this._handleFragmentDataUpdate),p!==m&&this.setState({data:m})},f._getConnectionData=function(){var p=this.props;p.componentRef;var m=(0,H1.default)(p,Eqe),g=(0,ui.default)((0,ui.default)({},m),this.state.data),v=a(g);if(v==null)return null;var b=xP.get(),y=b.EDGES,S=b.PAGE_INFO,w=b.HAS_NEXT_PAGE,C=b.HAS_PREV_PAGE,A=b.END_CURSOR,$=b.START_CURSOR;typeof v!="object"&&Pa(!1);var R=v[y],N=v[S];if(R==null||N==null)return null;Array.isArray(R)||Pa(!1),typeof N!="object"&&Pa(!1);var I=s===EP?N[w]:N[C],M=s===EP?N[A]:N[$];return typeof I!="boolean"||R.length!==0&&typeof M>"u"?null:{cursor:M,edgeCount:R.length,hasMore:I}},f._getQueryFetcher=function(){return this._queryFetcher||(this._queryFetcher=new Nqe),this._queryFetcher},f._canFetchPage=function(p){return!this._isUnmounted},f._fetchPage=function(p,m,g){var v=this,b=J1(this.props.__relayContext),y=b.environment,S=this.props;S.componentRef,S.__relayContext,S.__rootIsQueryRenderer;var w=(0,H1.default)(S,kqe),C=(0,ui.default)((0,ui.default)({},w),this.state.data),A,$=W1(t,w);A=Pqe(t,w),A=(0,ui.default)((0,ui.default)((0,ui.default)({},$),A),this._refetchVariables);var R=r.getVariables(C,{count:p.count,cursor:p.cursor},A);typeof R=="object"&&R!==null||Pa(!1),R=(0,ui.default)((0,ui.default)({},R),this._refetchVariables),A=(0,ui.default)((0,ui.default)({},R),A);var N=g?{force:!!g.force}:void 0;N!=null&&g?.metadata!=null&&(N.metadata=g?.metadata);var I=Iqe(r.query),M=Fqe(I,R,N),P=null;this._refetchSubscription&&this._refetchSubscription.unsubscribe(),this._hasFetched=!0;var B=function(te,J){var re=v._resolver.resolve();v._resolver.setVariables(l(A,p.totalCount),M.request.node);var se=v._resolver.resolve();Q1(re,se)?J():v.setState({data:se,contextForChildren:{environment:v.props.__relayContext.environment}},J)},j=function(){v._refetchSubscription===P&&(v._refetchSubscription=null,v._isARequestInFlight=!1)};return this._isARequestInFlight=!0,P=this._getQueryFetcher().execute({environment:y,operation:M,preservePreviousReferences:!0}).mergeMap(function(W){return SP.create(function(te){B(W,function(){te.next(),te.complete()})})}).do({error:j,complete:j,unsubscribe:j}).subscribe(m||{}),this._refetchSubscription=this._isARequestInFlight?P:null,P},f._cleanup=function(){this._resolver.dispose(),this._refetchVariables=null,this._hasFetched=!1,this._refetchSubscription&&(this._refetchSubscription.unsubscribe(),this._refetchSubscription=null,this._isARequestInFlight=!1),this._queryFetcher&&this._queryFetcher.dispose()},f.render=function(){var p=this.props,m=p.componentRef;p.__relayContext,p.__rootIsQueryRenderer;var g=(0,H1.default)(p,Cqe);return Y1.createElement($qe.Provider,{value:this.state.contextForChildren},Y1.createElement(e,(0,Sqe.default)({},g,this.state.data,{ref:m,relay:this.state.relayProp})))},d})(Y1.Component),(0,fu.default)(n,"displayName",i),n}function Bqe(e,t,r){return Rqe(e,t,function(n,i){return Uqe(n,i,r)})}var jqe={createContainer:Bqe},h_=Je.default,Zj=h_(or),qqe=h_(u_),Vqe=h_(c_),Gqe=h_(Si),Kqe=xf,Av=ZC,Hqe=Jj,Wqe=Js,X1=Nt,eR=wt,Jqe=eR.createOperationDescriptor;eR.deepFreeze;var tR=eR.getRequest,bo={},Qqe={rootIsQueryRenderer:!0};X1.Component;function gw(){return{error:null,props:null,retry:null}}function Yqe(){return{error:null,props:{},retry:null}}function g0(e,t,r,n){return{error:e||null,props:t?t.data:null,retry:function(o){var a=r.retry(o);a&&typeof n.handleDataChange=="function"?n.handleDataChange({snapshot:a}):e&&typeof n.handleRetryAfterError=="function"&&n.handleRetryAfterError(e)}}}function rR(e,t){return JSON.stringify({id:e.cacheID?e.cacheID:e.id,variables:t})}function CP(e,t){var r=e.query,n=t.queryFetcher.getSelectionReferences();t.queryFetcher.disposeRequest();var i;if(r){var o=tR(r),a=rR(o.params,e.variables);i=bo[a]?bo[a].queryFetcher:new Av(n)}else i=new Av(n);return(0,Zj.default)({prevQuery:e.query,prevPropsEnvironment:e.environment,prevPropsVariables:e.variables,queryFetcher:i},eq(e,i,t.retryCallbacks))}function eq(e,t,r,n){var i=e.environment,o=e.query,a=e.variables,s=e.cacheConfig,l=i;if(o){var c=tR(o),d=Jqe(c,a,s),f={environment:l};if(typeof n=="string"&&bo[n]){var h=bo[n].snapshot;return h?{error:null,relayContext:f,renderProps:g0(null,h,t,r),snapshot:h,requestCacheKey:n}:{error:null,relayContext:f,renderProps:gw(),snapshot:null,requestCacheKey:n}}try{var p=t.lookupInStore(l,d,e.fetchPolicy),m=t.fetch({environment:l,onDataChange:null,operation:d}),g=m||p;return n=n||rR(c.params,e.variables),bo[n]={queryFetcher:t,snapshot:g},g?{error:null,relayContext:f,renderProps:g0(null,g,t,r),snapshot:g,requestCacheKey:n}:{error:null,relayContext:f,renderProps:gw(),snapshot:null,requestCacheKey:n}}catch(b){return{error:b,relayContext:f,renderProps:g0(b,null,t,r),snapshot:null,requestCacheKey:n}}}else{t.dispose();var v={environment:l};return{error:null,relayContext:v,renderProps:Yqe(),requestCacheKey:null}}}var wf=Je.default,Xqe=wf(l_),Zqe=wf(yf),zc=wf(or),RP=wf(u_),eVe=wf(c_),Z1=wf(Si),tVe=["componentRef","__relayContext","__rootIsQueryRenderer"],rVe=WC,ex=Yj,nVe=d_,iVe=nVe.getContainerName,oVe=xf,aVe=ZC,sVe=JC,tx=sVe.assertRelayContext,AP=Js,rx=Nt,yc=wt,lVe=yc.Observable,TP=yc.createFragmentSpecResolver,uVe=yc.createOperationDescriptor,$P=yc.getDataIDsFromObject,cVe=yc.getRequest,dVe=yc.getVariablesFromObject,fVe=yc.isScalarAndEqual;function hVe(e,t,r){var n,i=iVe(e);return n=(function(o){(0,eVe.default)(a,o);function a(l){var c,d;d=o.call(this,l)||this,(0,Z1.default)((0,RP.default)(d),"_handleFragmentDataUpdate",function(){var m=d.state.resolver;d.setState(function(g){return m===g.resolver?{data:g.resolver.resolve()}:null})}),(0,Z1.default)((0,RP.default)(d),"_refetch",function(m,g,v,b){if(d._isUnmounted)return{dispose:function(){}};var y=tx(d.props.__relayContext),S=y.environment,w=ex(t,d.props),C=typeof m=="function"?m(d._getFragmentVariables()):m;C=(0,zc.default)((0,zc.default)({},w),C);var A=g?(0,zc.default)((0,zc.default)({},C),g):C,$=b?{force:!!b.force}:void 0;$!=null&&b?.metadata!=null&&($.metadata=b?.metadata);var R=typeof v=="function"?{next:v,error:v}:v||{},N=cVe(r),I=uVe(N,C,$);d.state.localVariables=C,d._refetchSubscription&&d._refetchSubscription.unsubscribe();var M,P=d._getQueryFetcher().lookupInStore(S,I,b?.fetchPolicy);return P!=null?(d.state.resolver.setVariables(A,I.request.node),d.setState(function(B){return{data:B.resolver.resolve(),contextForChildren:{environment:d.props.__relayContext.environment}}},function(){R.next&&R.next(),R.complete&&R.complete()}),{dispose:function(){}}):(d._getQueryFetcher().execute({environment:S,operation:I,preservePreviousReferences:!0}).mergeMap(function(B){return d.state.resolver.setVariables(A,I.request.node),lVe.create(function(j){return d.setState(function(W){return{data:W.resolver.resolve(),contextForChildren:{environment:d.props.__relayContext.environment}}},function(){j.next(),j.complete()})})}).finally(function(){d._refetchSubscription===M&&(d._refetchSubscription=null)}).subscribe((0,zc.default)((0,zc.default)({},R),{},{start:function(j){d._refetchSubscription=M=j,R.start&&R.start(j)}})),{dispose:function(){M&&M.unsubscribe()}})});var f=tx(l.__relayContext),h=(c=l.__rootIsQueryRenderer)!==null&&c!==void 0?c:!1;d._refetchSubscription=null;var p=TP(f,i,t,l,h);return d.state={data:p.resolve(),localVariables:null,prevProps:l,prevPropsContext:f,contextForChildren:f,relayProp:NP(f.environment,d._refetch),resolver:p},d._isUnmounted=!1,d}var s=a.prototype;return s.componentDidMount=function(){this._isUnmounted=!1,this._subscribeToNewResolverAndRerenderIfStoreHasChanged()},s.componentDidUpdate=function(c,d){this.state.resolver!==d.resolver?(d.resolver.dispose(),this._queryFetcher&&this._queryFetcher.dispose(),this._refetchSubscription&&this._refetchSubscription.unsubscribe(),this._subscribeToNewResolverAndRerenderIfStoreHasChanged()):this._rerenderIfStoreHasChanged()},a.getDerivedStateFromProps=function(c,d){var f,h=d.prevProps,p=tx(c.__relayContext),m=(f=c.__rootIsQueryRenderer)!==null&&f!==void 0?f:!1,g=$P(t,h),v=$P(t,c),b=ex(t,h),y=ex(t,c),S=d.resolver;if(d.prevPropsContext.environment!==p.environment||!AP(b,y)||!AP(g,v))return S=TP(p,i,t,c,m),{data:S.resolve(),localVariables:null,prevProps:c,prevPropsContext:p,contextForChildren:p,relayProp:NP(p.environment,d.relayProp.refetch),resolver:S};d.localVariables||S.setProps(c);var w=S.resolve();return w!==d.data?{data:w,prevProps:c}:null},s.componentWillUnmount=function(){this._isUnmounted=!0,this.state.resolver.dispose(),this._queryFetcher&&this._queryFetcher.dispose(),this._refetchSubscription&&this._refetchSubscription.unsubscribe()},s.shouldComponentUpdate=function(c,d){if(d.data!==this.state.data||d.relayProp!==this.state.relayProp)return!0;for(var f=Object.keys(c),h=0;h<f.length;h++){var p=f[h];if(p==="__relayContext"){if(this.state.prevPropsContext.environment!==d.prevPropsContext.environment)return!0}else if(!t.hasOwnProperty(p)&&!fVe(c[p],this.props[p]))return!0}return!1},s._rerenderIfStoreHasChanged=function(){var c=this.state,d=c.data,f=c.resolver,h=f.resolve();d!==h&&this.setState({data:h})},s._subscribeToNewResolverAndRerenderIfStoreHasChanged=function(){var c=this.state,d=c.data,f=c.resolver,h=f.resolve();f.setCallback(this.props,this._handleFragmentDataUpdate),d!==h&&this.setState({data:h})},s._getFragmentVariables=function(){return dVe(t,this.props)},s._getQueryFetcher=function(){return this._queryFetcher||(this._queryFetcher=new aVe),this._queryFetcher},s.render=function(){var c=this.props,d=c.componentRef;c.__relayContext,c.__rootIsQueryRenderer;var f=(0,Zqe.default)(c,tVe),h=this.state,p=h.relayProp,m=h.contextForChildren;return rx.createElement(oVe.Provider,{value:m},rx.createElement(e,(0,Xqe.default)({},f,this.state.data,{ref:d,relay:p})))},a})(rx.Component),(0,Z1.default)(n,"displayName",i),n}function NP(e,t){return{environment:e,refetch:t}}function pVe(e,t,r){return rVe(e,t,function(n,i){return hVe(n,i,r)})}var mVe={createContainer:pVe},gVe=Nt;gVe.createContext({wrapPrepareQueryResource:function(t){return t()}});var vVe=xf,bVe=Be,_Ve=Nt,yVe=_Ve.useContext;function xVe(){var e=yVe(vVe);return e==null&&bVe(!1),e.environment}var tq=xVe,rq=Nt;rq.useContext;rq.useEffect;var SVe=Je.default,DP=SVe(or),wVe=Be,xc=wt,FP=xc.__internal.fetchQueryDeduped,IP=xc.Observable,PP=xc.PreloadableQueryRegistry,OP=xc.ReplaySubject,MP=xc.createOperationDescriptor,EVe=xc.getRequest,kVe=xc.getRequestIdentifier,LP=100001;function CVe(e,t,r,n,i){var o;LP++;var a=(o=n?.fetchPolicy)!==null&&o!==void 0?o:"store-or-network",s=(0,DP.default)((0,DP.default)({},n?.networkCacheConfig),{},{force:!0}),l,c=!1,d=function(he,K){return c=!0,e.executeWithSource({operation:he,source:K})},f=new OP,h=IP.create(function(se){return f.subscribe(se)}),p,m=null,g=!1,v=function(he,K){g=!0;var ie=new OP,le="raw-network-request-"+kVe(he,r),Z=FP(e,le,function(){var be=e.getNetwork();return be.execute(he,r,s,void 0,void 0,void 0,void 0,K)}),ve=Z.subscribe({error:function(Ge){m=Ge,ie.error(Ge)},next:function(Ge){ie.next(Ge)},complete:function(){ie.complete()}}),pe=ve.unsubscribe;return p=pe,IP.create(function(be){var Ge=ie.subscribe(be);return function(){Ge.unsubscribe(),p()}})},b,y=function(he,K){g=!0;var ie=FP(e,he.request.identifier,K).subscribe({error:function(Z){f.error(Z)},next:function(Z){f.next(Z)},complete:function(){f.complete()}});b=ie.unsubscribe},S=function(he){var K=MP(he,r,s);if(l=e.retain(K),a!=="store-only"){var ie=a!=="store-or-network"||e.check(K).status!=="available";ie&&y(K,function(){var le=v(he.params,function(){return e.check(K)}),Z=d(K,le);return Z})}},w,C,A;if(t.kind==="PreloadableConcreteRequest"){var $=t;w=$.params;var R=w;A=R.id,A===null&&wVe(!1);var N=PP.get(A);if(N!=null)S(N);else{var I=a==="store-only"?null:v(w),M=PP.onLoad(A,function(se){C();var he=MP(se,r,s);l=e.retain(he),I!=null&&y(he,function(){return d(he,I)})});C=M.dispose}}else{var P=t,B=EVe(P);w=B.params,A=w.cacheID!=null?w.cacheID:w.id,S(B)}var j=!1,W=!1,te=!1,J=function(){W||(l&&l.dispose(),W=!0)},re=function(){te||(c?b&&b():p&&p(),C&&C(),te=!0)};return{kind:"PreloadedQuery",environment:e,environmentProviderOptions:i,dispose:function(){j||(J(),re(),j=!0)},releaseQuery:J,cancelNetworkRequest:re,fetchKey:LP,id:A,get isDisposed(){return j||W},get networkError(){return m},name:w.name,networkCacheConfig:s,fetchPolicy:a,source:g?h:void 0,variables:r}}var p_={loadQuery:CVe},RVe=p_;RVe.loadQuery;var AVe=Nt;AVe.useMemo;var TVe=Be,$Ve=(function(){function e(r){this._capacity=r,this._capacity>0||TVe(!1),this._map=new Map}var t=e.prototype;return t.set=function(n,i){if(this._map.delete(n),this._map.set(n,i),this._map.size>this._capacity){var o=this._map.keys().next();o.done||this._map.delete(o.value)}},t.get=function(n){var i=this._map.get(n);return i!=null&&(this._map.delete(n),this._map.set(n,i)),i},t.has=function(n){return this._map.has(n)},t.delete=function(n){this._map.delete(n)},t.size=function(){return this._map.size},t.capacity=function(){return this._capacity-this._map.size},t.clear=function(){this._map.clear()},e})();function NVe(e){return new $Ve(e)}var DVe={create:NVe},FVe=Je.default,nx=FVe(Si),IVe=300*1e3,PVe=(function(){function e(r){var n=this;(0,nx.default)(this,"_retainCount",0),(0,nx.default)(this,"_retainDisposable",null),(0,nx.default)(this,"_releaseTemporaryRetain",null),this._retain=function(i){return n._retainCount++,n._retainCount===1&&(n._retainDisposable=r(i)),{dispose:function(){n._retainCount=Math.max(0,n._retainCount-1),n._retainCount===0&&n._retainDisposable!=null&&(n._retainDisposable.dispose(),n._retainDisposable=null)}}}}var t=e.prototype;return t.temporaryRetain=function(n){var i=this,o;if(n.isServer())return{dispose:function(){}};var a=this._retain(n),s=null,l=function(){clearTimeout(s),s=null,i._releaseTemporaryRetain=null,a.dispose()};return s=setTimeout(l,IVe),(o=this._releaseTemporaryRetain)===null||o===void 0||o.call(this),this._releaseTemporaryRetain=l,{dispose:function(){var d;(d=i._releaseTemporaryRetain)===null||d===void 0||d.call(i)}}},t.permanentRetain=function(n){var i=this._retain(n);return this.releaseTemporaryRetain(),i},t.releaseTemporaryRetain=function(){var n;(n=this._releaseTemporaryRetain)===null||n===void 0||n.call(this),this._releaseTemporaryRetain=null},t.getRetainCount=function(){return this._retainCount},e})(),OVe=PVe,nq=Je.default,Lg=nq(or),iq=nq(Si),MVe=DVe,LVe=OVe,zVe=Be,UVe=wt,BVe=UVe.isPromise,jVe=1e3,oq="store-or-network",aq="store-and-network",qVe=typeof WeakMap=="function";function Tv(e){return e.request.node.params.metadata.live!==void 0}function vw(e,t,r,n,i){var o=r??(Tv(t)?aq:oq),a=n??e.UNSTABLE_getDefaultRenderPolicy(),s="".concat(o,"-").concat(a,"-").concat(t.request.identifier);return i!=null?"".concat(s,"-").concat(i):s}function zP(e,t){var r={__id:e.fragment.dataID,__fragments:(0,iq.default)({},e.fragment.node.name,e.request.variables),__fragmentOwner:e.request};return{cacheIdentifier:t,fragmentNode:e.request.node.fragment,fragmentRef:r,operation:e}}var VVe=2e5;function ix(e,t,r,n,i,o){var a=Tv(t),s=n,l=i,c=new LVe(function(f){var h=f.retain(t);return{dispose:function(){a&&l!=null&&l.unsubscribe(),h.dispose(),o(d)}}}),d={cacheIdentifier:e,id:VVe++,processedPayloadsCount:0,operationAvailability:r,getValue:function(){return s},setValue:function(h){s=h},setNetworkSubscription:function(h){a&&l!=null&&l.unsubscribe(),l=h},temporaryRetain:function(h){return c.temporaryRetain(h)},permanentRetain:function(h){return c.permanentRetain(h)},releaseTemporaryRetain:function(){c.releaseTemporaryRetain()}};return d}var GVe=(function(){function e(r){var n=this;(0,iq.default)(this,"_clearCacheEntry",function(i){n._cache.delete(i.cacheIdentifier)}),this._environment=r,this._cache=MVe.create(jVe)}var t=e.prototype;return t.prepare=function(n,i,o,a,s,l,c){var d=vw(this._environment,n,o,a,l);return this.prepareWithIdentifier(d,n,i,o,a,s,c)},t.prepareWithIdentifier=function(n,i,o,a,s,l,c){var d=this._environment,f=a??(Tv(i)?aq:oq),h=s??d.UNSTABLE_getDefaultRenderPolicy(),p=this._cache.get(n),m=null,g=p!=null;p==null&&(p=this._fetchAndSaveQuery(n,i,o,f,h,c,(0,Lg.default)((0,Lg.default)({},l),{},{unsubscribe:function(y){m?.dispose();var S=l?.unsubscribe;S&&S(y)}}))),m=p.temporaryRetain(d);var v=p.getValue();if(BVe(v))throw d.__log({name:"suspense.query",fetchPolicy:f,isPromiseCached:g,operation:i,queryAvailability:p.operationAvailability,renderPolicy:h}),v;if(v instanceof Error)throw v;return v},t.retain=function(n,i){var o=this._environment,a=n.cacheIdentifier,s=n.operation,l=this._getOrCreateCacheEntry(a,s,null,n,null),c=l.permanentRetain(o);return o.__log({name:"queryresource.retain",profilerContext:i,resourceID:l.id}),{dispose:function(){c.dispose()}}},t.releaseTemporaryRetain=function(n){var i=this._cache.get(n.cacheIdentifier);i?.releaseTemporaryRetain()},t.TESTS_ONLY__getCacheEntry=function(n,i,o,a){var s=this._environment,l=vw(s,n,i,o,a);return this._cache.get(l)},t._getOrCreateCacheEntry=function(n,i,o,a,s){var l=this._cache.get(n);return l==null&&(l=ix(n,i,o,a,s,this._clearCacheEntry),this._cache.set(n,l)),l},t._fetchAndSaveQuery=function(n,i,o,a,s,l,c){var d=this,f=this._environment,h=f.check(i),p=h.status,m=p==="available",g=m||s==="partial"&&p!=="stale",v,b,y=function(){};switch(a){case"store-only":{v=!1,b=!0;break}case"store-or-network":{v=!m,b=g;break}case"store-and-network":{v=!0,b=g;break}case"network-only":default:{v=!0,b=!1;break}}if(b){var S=zP(i,n),w=ix(n,i,h,S,null,this._clearCacheEntry);this._cache.set(n,w)}if(v){var C=zP(i,n),A;o.subscribe({start:function(P){A=P;var B=d._cache.get(n);B&&B.setNetworkSubscription(A);var j=c?.start;if(j){var W=(0,Lg.default)((0,Lg.default)({},P),{},{unsubscribe:function(){Tv(i)&&P.unsubscribe()}});j(W)}},next:function(){var P=d._getOrCreateCacheEntry(n,i,h,C,A);P.processedPayloadsCount+=1,P.setValue(C),y();var B=c?.next;if(B!=null){var j=f.lookup(i.fragment);B(j)}},error:function(P){var B=d._getOrCreateCacheEntry(n,i,h,P,A);B.processedPayloadsCount===0&&B.setValue(P),y(),A=null,B.setNetworkSubscription(null);var j=c?.error;j&&j(P)},complete:function(){y(),A=null;var P=d._cache.get(n);P&&P.setNetworkSubscription(null);var B=c?.complete;B&&B()},unsubscribe:c?.unsubscribe});var $=this._cache.get(n);if(!$){var R=new Promise(function(M){y=M});R.displayName="Relay("+i.fragment.node.name+")",$=ix(n,i,h,R,A,this._clearCacheEntry),this._cache.set(n,$)}}else{var N=c?.complete;N&&N()}var I=this._cache.get(n);return I==null&&zVe(!1),f.__log({name:"queryresource.fetch",resourceID:I.id,operation:i,profilerContext:l,fetchPolicy:a,renderPolicy:s,queryAvailability:h,shouldFetch:v}),I},e})();function KVe(e){return new GVe(e)}var UP=qVe?new WeakMap:new Map;function HVe(e){var t=UP.get(e);if(t)return t;var r=KVe(e);return UP.set(e,r),r}var vm={getQueryResourceForEnvironment:HVe,getQueryCacheIdentifier:vw},WVe=Nt;WVe.useMemo;var sq=Nt;sq.useCallback;sq.useEffect;var JVe=Nt,QVe=wt,YVe=QVe.__internal.createRelayLoggingContext,XVe=YVe(JVe),ZVe=XVe,eGe=Nt,tGe=eGe.useContext;function rGe(){return tGe(ZVe)}var lq=rGe,nR=Je.default,BP=nR(or),Gl=nR(Vr),nGe=nR(Jl),iGe=vm,uq=iGe.getQueryResourceForEnvironment,oGe=tq,aGe=lq,hu=Be,bm=Nt;bm.useDebugValue;var ox=bm.useEffect,ax=bm.useMemo,jP=bm.useRef,zg=bm.useState,Xs=wt,cq=Xs.__internal,sGe=cq.fetchQuery,lGe=cq.getPromiseForActiveRequest,Ug=Xs.RelayFeatureFlags,qP=Xs.areEqualSelectors,uGe=Xs.createOperationDescriptor,cGe=Xs.getPendingOperationsForFragment,dGe=Xs.getSelector,fGe=Xs.getVariablesFromFragment,VP=Xs.handlePotentialSnapshotErrors,GP=Xs.recycleNodesInto;function hGe(e){return e.kind==="bailout"?!1:e.kind==="singular"?e.snapshot.isMissingData:e.snapshots.some(function(t){return t.isMissingData})}function pGe(e){if(e.kind==="bailout")return null;if(e.kind==="singular"){var t;return(t=e.snapshot.missingClientEdges)!==null&&t!==void 0?t:null}else{var r=null,n=(0,Gl.default)(e.snapshots),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;if(o.missingClientEdges){var a;r=(a=r)!==null&&a!==void 0?a:[];var s=(0,Gl.default)(o.missingClientEdges),l;try{for(s.s();!(l=s.n()).done;){var c=l.value;r.push(c)}}catch(d){s.e(d)}finally{s.f()}}}}catch(d){n.e(d)}finally{n.f()}return r}}function mGe(e){if(e.kind==="bailout")return null;if(e.kind==="singular"){var t;return(t=e.snapshot.missingLiveResolverFields)!==null&&t!==void 0?t:null}else{var r=null,n=(0,Gl.default)(e.snapshots),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;if(o.missingLiveResolverFields){var a;r=(a=r)!==null&&a!==void 0?a:[];var s=(0,Gl.default)(o.missingLiveResolverFields),l;try{for(s.s();!(l=s.n()).done;){var c=l.value;r.push(c)}}catch(d){s.e(d)}finally{s.f()}}}}catch(d){n.e(d)}finally{n.f()}return r}}function gGe(e,t,r){if(t.kind==="singular")VP(e,t.snapshot.fieldErrors,r);else if(t.kind==="plural"){var n=(0,Gl.default)(t.snapshots),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;VP(e,o.fieldErrors,r)}}catch(a){n.e(a)}finally{n.f()}}}function $v(e,t){if(t.kind==="bailout")return null;var r=e.getStore().getEpoch();if(r===t.epoch)return null;if(t.kind==="singular"){var n=e.lookup(t.snapshot.selector),i=GP(t.snapshot.data,n.data),o={data:i,isMissingData:n.isMissingData,missingClientEdges:n.missingClientEdges,missingLiveResolverFields:n.missingLiveResolverFields,seenRecords:n.seenRecords,selector:n.selector,fieldErrors:n.fieldErrors};return[i!==t.snapshot.data,{kind:"singular",snapshot:o,epoch:r}]}else{for(var a=!1,s=[],l=0;l<t.snapshots.length;l++){var c=t.snapshots[l],d=e.lookup(c.selector),f=GP(c.data,d.data),h={data:f,isMissingData:d.isMissingData,missingClientEdges:d.missingClientEdges,missingLiveResolverFields:d.missingLiveResolverFields,seenRecords:d.seenRecords,selector:d.selector,fieldErrors:d.fieldErrors};f!==c.data&&(a=!0),s.push(h)}return s.length!==t.snapshots.length&&hu(!1),[a,{kind:"plural",snapshots:s,epoch:r}]}}function vGe(e,t,r,n,i){var o=fGe(t,r),a=(0,BP.default)((0,BP.default)({},o),{},{id:n.clientEdgeDestinationID}),s=uGe(n.request,a,i?.networkCacheConfig),l=uq(e),c=l.prepare(s,sGe(e,s),i?.fetchPolicy);return[c,lGe(e,s.request)]}function bGe(e,t,r,n){if(t.kind==="bailout")return function(){};if(t.kind==="singular"){var i=e.subscribe(t.snapshot,function(a){r(function(s){if(s.kind!=="singular"||s.snapshot.selector!==a.selector){var l=$v(e,s);if(l!=null){var c=l[0],d=l[1];return e.__log({name:"useFragment.subscription.missedUpdates",hasDataChanges:c}),n.current=c,c?d:s}else return s}return n.current=!0,{kind:"singular",snapshot:a,epoch:e.getStore().getEpoch()}})});return function(){i.dispose()}}else{var o=t.snapshots.map(function(a,s){return e.subscribe(a,function(l){r(function(c){var d;if(c.kind!=="plural"||((d=c.snapshots[s])===null||d===void 0?void 0:d.selector)!==l.selector){var f=$v(e,c);if(f!=null){var h=f[0],p=f[1];return e.__log({name:"useFragment.subscription.missedUpdates",hasDataChanges:h}),n.current=n.current||h,h?p:c}else return c}var m=(0,nGe.default)(c.snapshots);return m[s]=l,n.current=!0,{kind:"plural",snapshots:m,epoch:e.getStore().getEpoch()}})})});return function(){var a=(0,Gl.default)(o),s;try{for(a.s();!(s=a.n()).done;){var l=s.value;l.dispose()}}catch(c){a.e(c)}finally{a.f()}}}}function KP(e,t){return t==null?{kind:"bailout"}:t.kind==="PluralReaderSelector"?{kind:"plural",snapshots:t.selectors.map(function(r){return e.lookup(r)}),epoch:e.getStore().getEpoch()}:{kind:"singular",snapshot:e.lookup(t),epoch:e.getStore().getEpoch()}}function _Ge(e,t,r,n){var i,o,a=ax(function(){return dGe(e,t)},[e,t]),s=(e==null||(i=e.metadata)===null||i===void 0?void 0:i.plural)===!0;s?t==null||Array.isArray(t)||hu(!1):Array.isArray(t)&&hu(!1),t==null||s&&Array.isArray(t)&&t.length===0||a!=null||hu(!1);var l=oGe(),c;Ug.ENABLE_UI_CONTEXT_ON_RELAY_LOGGER&&(c=aGe());var d=zg(function(){return KP(l,a)}),f=d[0],h=d[1],p=f,m=zg(p),g=m[0],v=m[1],b=g,y=zg(a),S=y[0],w=y[1],C=zg(l),A=C[0],$=C[1];if(!qP(a,S)||l!==A){w(a),$(l);var R=KP(l,a);h(R),v(R),p=R,b=R}var N=jP(!1);if(ox(function(){N.current=a},[a]),((o=e.metadata)===null||o===void 0?void 0:o.hasClientEdges)===!0||Ug.CHECK_ALL_FRAGMENTS_FOR_MISSING_CLIENT_EDGES){var I=ax(function(){var ie=pGe(p),le,Z=[];if(ie!=null&&ie.length){le=[];var ve=(0,Gl.default)(ie),pe;try{for(ve.s();!(pe=ve.n()).done;){var be=pe.value,Ge=vGe(l,e,t,be,n),zt=Ge[0],At=Ge[1];le.push(zt),At!=null&&Z.push(At)}}catch(Er){ve.e(Er)}finally{ve.f()}}return[le,Z]},[p,l,e,t,n]),M=I[0],P=I[1];if(P.length)throw Promise.all(P);ox(function(){var ie=uq(l);if(M!=null&&M.length){var le=[],Z=(0,Gl.default)(M),ve;try{for(Z.s();!(ve=Z.n()).done;){var pe=ve.value;le.push(ie.retain(pe))}}catch(be){Z.e(be)}finally{Z.f()}return function(){for(var be=0,Ge=le;be<Ge.length;be++){var zt=Ge[be];zt.dispose()}}}},[l,M])}if(hGe(p)){var B=mGe(p);if(B!=null&&B.length>0)throw Promise.all(B.map(function(ie){return l.getStore().getLiveResolverPromise(ie)}));if(Ug.ENABLE_RELAY_OPERATION_TRACKER_SUSPENSE||l!==A||!N.current||!qP(N.current,a)){a==null&&hu(!1);var j=a.kind==="PluralReaderSelector"?a.selectors[0].owner:a.owner,W=cGe(l,e,j);if(W)throw W.promise}}gGe(l,p,c);var te=jP(!1);if(ox(function(){var ie=b,le=$v(l,b);if(le!==null){var Z=le[0],ve=le[1];Z&&h(ve),ie=ve}return bGe(l,ie,h,te)},[l,b]),te.current){var J=$v(l,p);if(J!=null){var re=J[0],se=J[1];re&&(h(se),p=se)}te.current=!1}var he;if(s){var K=t==null;he=ax(function(){return p.kind==="bailout"?K?null:[]:(p.kind!=="plural"&&hu(!1),p.snapshots.map(function(ie){return ie.data}))},[p,K])}else p.kind==="bailout"?he=null:(p.kind!=="singular"&&hu(!1),he=p.snapshot.data);return Ug.LOG_MISSING_RECORDS_IN_PROD&&t!=null&&(he===void 0||Array.isArray(he)&&he.length>0&&he.every(function(ie){return ie===void 0})),he}var yGe=_Ge,iR=Je.default,HP=iR(or),Kl=iR(Vr),xGe=iR(Jl),SGe=vm,dq=SGe.getQueryResourceForEnvironment,wGe=tq,EGe=lq,pu=Be,_m=Nt;_m.useDebugValue;var Bg=_m.useEffect,sx=_m.useMemo,WP=_m.useRef,kGe=_m.useState,Zs=wt,fq=Zs.__internal,CGe=fq.fetchQuery,RGe=fq.getPromiseForActiveRequest,jg=Zs.RelayFeatureFlags,JP=Zs.areEqualSelectors,AGe=Zs.createOperationDescriptor,TGe=Zs.getPendingOperationsForFragment,$Ge=Zs.getSelector,NGe=Zs.getVariablesFromFragment,QP=Zs.handlePotentialSnapshotErrors,YP=Zs.recycleNodesInto;function DGe(e){return e.kind==="bailout"?!1:e.kind==="singular"?e.snapshot.isMissingData:e.snapshots.some(function(t){return t.isMissingData})}function FGe(e){if(e.kind==="bailout")return null;if(e.kind==="singular"){var t;return(t=e.snapshot.missingClientEdges)!==null&&t!==void 0?t:null}else{var r=null,n=(0,Kl.default)(e.snapshots),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;if(o.missingClientEdges){var a;r=(a=r)!==null&&a!==void 0?a:[];var s=(0,Kl.default)(o.missingClientEdges),l;try{for(s.s();!(l=s.n()).done;){var c=l.value;r.push(c)}}catch(d){s.e(d)}finally{s.f()}}}}catch(d){n.e(d)}finally{n.f()}return r}}function IGe(e){if(e.kind==="bailout")return null;if(e.kind==="singular"){var t;return(t=e.snapshot.missingLiveResolverFields)!==null&&t!==void 0?t:null}else{var r=null,n=(0,Kl.default)(e.snapshots),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;if(o.missingLiveResolverFields){var a;r=(a=r)!==null&&a!==void 0?a:[];var s=(0,Kl.default)(o.missingLiveResolverFields),l;try{for(s.s();!(l=s.n()).done;){var c=l.value;r.push(c)}}catch(d){s.e(d)}finally{s.f()}}}}catch(d){n.e(d)}finally{n.f()}return r}}function PGe(e,t,r){if(t.kind==="singular")QP(e,t.snapshot.fieldErrors,r);else if(t.kind==="plural"){var n=(0,Kl.default)(t.snapshots),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;QP(e,o.fieldErrors,r)}}catch(a){n.e(a)}finally{n.f()}}}function bw(e,t){if(t.kind==="bailout")return null;var r=e.getStore().getEpoch();if(r===t.epoch)return null;if(t.kind==="singular"){var n=e.lookup(t.snapshot.selector),i=YP(t.snapshot.data,n.data),o={data:i,isMissingData:n.isMissingData,missingClientEdges:n.missingClientEdges,missingLiveResolverFields:n.missingLiveResolverFields,seenRecords:n.seenRecords,selector:n.selector,fieldErrors:n.fieldErrors};return[i!==t.snapshot.data,{kind:"singular",snapshot:o,epoch:r,selector:t.selector,environment:t.environment}]}else{for(var a=!1,s=[],l=0;l<t.snapshots.length;l++){var c=t.snapshots[l],d=e.lookup(c.selector),f=YP(c.data,d.data),h={data:f,isMissingData:d.isMissingData,missingClientEdges:d.missingClientEdges,missingLiveResolverFields:d.missingLiveResolverFields,seenRecords:d.seenRecords,selector:d.selector,fieldErrors:d.fieldErrors};f!==c.data&&(a=!0),s.push(h)}return s.length!==t.snapshots.length&&pu(!1),[a,{kind:"plural",snapshots:s,epoch:r,selector:t.selector,environment:t.environment}]}}function OGe(e,t,r,n,i){var o=NGe(t,r),a=(0,HP.default)((0,HP.default)({},o),{},{id:n.clientEdgeDestinationID}),s=AGe(n.request,a,i?.networkCacheConfig),l=dq(e),c=l.prepare(s,CGe(e,s),i?.fetchPolicy),d=RGe(e,s.request);return d!=null&&d.displayName==null&&(d.displayName=n.request.params.name),[c,d]}function XP(e,t,r){if(t.kind==="bailout")return function(){};if(t.kind==="singular"){var n=e.subscribe(t.snapshot,function(o){r(function(a){var s=null;if(a.kind!=="singular"||a.snapshot.selector!==o.selector||a.environment!==e){var l=bw(a.environment,a);if(l!=null){var c=l[0],d=l[1];e.__log({name:"useFragment.subscription.missedUpdates",hasDataChanges:c}),s=c?d:a}else s=a}else s={kind:"singular",snapshot:o,epoch:e.getStore().getEpoch(),selector:t.selector,environment:t.environment};return s})});return function(){n.dispose()}}else{var i=t.snapshots.map(function(o,a){return e.subscribe(o,function(s){r(function(l){var c,d=null;if(l.kind!=="plural"||((c=l.snapshots[a])===null||c===void 0?void 0:c.selector)!==s.selector||l.environment!==e){var f=bw(l.environment,l);if(f!=null){var h=f[0],p=f[1];e.__log({name:"useFragment.subscription.missedUpdates",hasDataChanges:h}),d=h?p:l}else d=l}else{var m=(0,xGe.default)(l.snapshots);m[a]=s,d={kind:"plural",snapshots:m,epoch:e.getStore().getEpoch(),selector:t.selector,environment:t.environment}}return d})})});return function(){var o=(0,Kl.default)(i),a;try{for(o.s();!(a=o.n()).done;){var s=a.value;s.dispose()}}catch(l){o.e(l)}finally{o.f()}}}}function ZP(e,t){return t==null?{kind:"bailout",environment:e}:t.kind==="PluralReaderSelector"?{kind:"plural",snapshots:t.selectors.map(function(r){return e.lookup(r)}),epoch:e.getStore().getEpoch(),selector:t,environment:e}:{kind:"singular",snapshot:e.lookup(t),epoch:e.getStore().getEpoch(),selector:t,environment:e}}function MGe(e,t,r,n){var i,o,a=sx(function(){return $Ge(e,t)},[e,t]),s=(e==null||(i=e.metadata)===null||i===void 0?void 0:i.plural)===!0;s?t==null||Array.isArray(t)||pu(!1):Array.isArray(t)&&pu(!1),t==null||s&&Array.isArray(t)&&t.length===0||a!=null||pu(!1);var l=wGe(),c;jg.ENABLE_UI_CONTEXT_ON_RELAY_LOGGER&&(c=EGe());var d=kGe(function(){return ZP(l,a)}),f=d[0],h=d[1],p=f,m=p.environment;if(!JP(a,p.selector)||l!==p.environment){var g=ZP(l,a);h(g),p=g}var v=WP(!1);if(Bg(function(){v.current=a},[a]),((o=e.metadata)===null||o===void 0?void 0:o.hasClientEdges)===!0||jg.CHECK_ALL_FRAGMENTS_FOR_MISSING_CLIENT_EDGES){var b=sx(function(){var P=FGe(p),B,j=[];if(P!=null&&P.length){B=[];var W=(0,Kl.default)(P),te;try{for(W.s();!(te=W.n()).done;){var J=te.value,re=OGe(l,e,t,J,n),se=re[0],he=re[1];B.push(se),he!=null&&j.push(he)}}catch(K){W.e(K)}finally{W.f()}}return[B,j]},[p,l,e,t,n]),y=b[0],S=b[1];if(S.length){var w=Promise.all(S);throw w.displayName="RelayClientEdge(".concat(S.map(function(P){return P.displayName}).join(","),")"),w}Bg(function(){var P=dq(l);if(y!=null&&y.length){var B=[],j=(0,Kl.default)(y),W;try{for(j.s();!(W=j.n()).done;){var te=W.value;B.push(P.retain(te))}}catch(J){j.e(J)}finally{j.f()}return function(){for(var J=0,re=B;J<re.length;J++){var se=re[J];se.dispose()}}}},[l,y])}if(DGe(p)){var C=IGe(p);if(C!=null&&C.length>0){var A=Promise.all(C.map(function(P){return l.getStore().getLiveResolverPromise(P)}));throw A.displayName="RelayLiveResolver("+e.name+")",A}if(jg.ENABLE_RELAY_OPERATION_TRACKER_SUSPENSE||l!==m||!v.current||!JP(v.current,a)){a==null&&pu(!1);var $=a.kind==="PluralReaderSelector"?a.selectors[0].owner:a.owner,R=TGe(l,e,$);if(R)throw R.promise}}PGe(l,p,c);var N=WP(null);Bg(function(){var P=N.current;if(P!=null){if(p.environment===P.environment&&p.selector===P.selector)return;P.dispose()}if(p.kind!=="bailout"){var B=p,j=bw(p.environment,p);if(j!==null){var W=j[0],te=j[1];if(W){h(te);return}B=te}var J=XP(p.environment,B,h);N.current={dispose:J,selector:p.selector,environment:p.environment}}},[p]),Bg(function(){if(N.current==null&&p.kind!=="bailout"){var P=XP(p.environment,p,h);N.current={dispose:P,selector:p.selector,environment:p.environment}}return function(){var B;(B=N.current)===null||B===void 0||B.dispose(),N.current=null}},[]);var I;if(s){var M=t==null;I=sx(function(){return p.kind==="bailout"?M?null:[]:(p.kind!=="plural"&&pu(!1),p.snapshots.map(function(P){return P.data}))},[p,M])}else p.kind==="bailout"?I=null:(p.kind!=="singular"&&pu(!1),I=p.snapshot.data);return jg.LOG_MISSING_RECORDS_IN_PROD&&t!=null&&(I===void 0||Array.isArray(I)&&I.length>0&&I.every(function(P){return P===void 0})),I}var LGe=MGe,hq=Je.default;hq(yGe);hq(LGe);var pq=vm;pq.getQueryCacheIdentifier;pq.getQueryResourceForEnvironment;var m_=Nt;m_.useContext;m_.useEffect;m_.useState;m_.useRef;var zGe=Nt;zGe.useState;var UGe=Nt,mq=wt;mq.createOperationDescriptor;mq.getRequest;UGe.useMemo;var BGe=wt;BGe.__internal.fetchQuery;var jGe=Je.default;jGe(or);var gq=Nt;gq.useEffect;gq.useRef;var qGe=Je.default;qGe(Vr);var g_=Nt;g_.useCallback;g_.useEffect;g_.useRef;g_.useState;var VGe=Nt;VGe.useDebugValue;var GGe=wt;GGe.getFragment;var KGe=Je.default;KGe(or);var v_=Nt,HGe=wt;HGe.commitMutation;v_.useState;v_.useEffect;v_.useRef;v_.useCallback;var vq=wt;vq.ConnectionInterface;vq.getValueAtPath;var oR=Nt,bq=wt;bq.__internal.getObservableForActiveRequest;bq.getSelector;oR.useEffect;oR.useState;oR.useMemo;var WGe=Je.default;WGe(or);var aR=Nt;aR.useCallback;aR.useRef;aR.useState;var ym=wt;ym.__internal.fetchQuery;ym.createOperationDescriptor;ym.getPaginationVariables;ym.getRefetchMetadata;ym.getSelector;var JGe=Je.default;JGe(or);var sR=Nt;sR.useCallback;sR.useEffect;sR.useState;var Ef=wt;Ef.__internal.fetchQuery;Ef.RelayFeatureFlags;Ef.createOperationDescriptor;Ef.getPaginationVariables;Ef.getRefetchMetadata;Ef.getSelector;var _q=Je.default;_q(or);_q(Vr);var QGe=vm;QGe.getQueryResourceForEnvironment;var Sc=wt;Sc.__internal.fetchQuery;Sc.RelayFeatureFlags;Sc.createOperationDescriptor;Sc.getPendingOperationsForFragment;Sc.getSelector;Sc.getVariablesFromFragment;Sc.handlePotentialSnapshotErrors;var YGe=Je.default;YGe(Vr);var XGe=p_;XGe.loadQuery;var xm=Nt;xm.useCallback;xm.useEffect;xm.useInsertionEffect;xm.useRef;xm.useState;var ZGe=wt;ZGe.getRequest;var eKe=Je.default;eKe(Vr);var tKe=p_;tKe.loadQuery;var b_=Nt;b_.useCallback;b_.useEffect;b_.useRef;b_.useState;var yq=wt;yq.RelayFeatureFlags;yq.getRequest;var rKe=Je.default;rKe(or);var nKe=vm;nKe.getQueryResourceForEnvironment;var lR=Nt;lR.useCallback;lR.useContext;lR.useReducer;var kf=wt;kf.__internal.fetchQuery;kf.createOperationDescriptor;kf.getFragmentIdentifier;kf.getRefetchMetadata;kf.getSelector;kf.getValueAtPath;var iKe=Je.default;iKe(or);var uR=Nt;uR.useCallback;uR.useDebugValue;uR.useState;var __=wt;__.RelayFeatureFlags;__.getFragment;__.getFragmentIdentifier;__.getPaginationMetadata;var oKe=Je.default;oKe(or);var wc=Nt;wc.useCallback;wc.useDebugValue;wc.useEffect;wc.useLayoutEffect;wc.useMemo;wc.useRef;wc.useState;var cR=wt;cR.getFragment;cR.getFragmentIdentifier;cR.getPaginationMetadata;var y_=wt;y_.ConnectionInterface;y_.RelayFeatureFlags;y_.getSelector;y_.getValueAtPath;var aKe=Nt;aKe.useDebugValue;var sKe=wt,xq=sKe.__internal;xq.fetchQueryDeduped;xq.fetchQuery;var lKe=Nt;lKe.useDebugValue;var uKe=wt;uKe.getFragment;var Sq=Nt;Sq.useEffect;Sq.useRef;var cKe=Nt;cKe.useEffect;var dKe=wt;dKe.requestSubscription;var fKe=xf,hKe=fqe,pKe=jqe,mKe=mVe,gKe=p_;gKe.loadQuery;var Wo=wt,vKe={ConnectionHandler:Wo.ConnectionHandler,MutationTypes:Wo.MutationTypes,RangeOperations:Wo.RangeOperations,ReactRelayContext:fKe,applyOptimisticMutation:Wo.applyOptimisticMutation,commitLocalUpdate:Wo.commitLocalUpdate,commitMutation:Wo.commitMutation,createFragmentContainer:hKe.createContainer,createPaginationContainer:pKe.createContainer,createRefetchContainer:mKe.createContainer,fetchQuery_DEPRECATED:Wo.fetchQuery_DEPRECATED,graphql:Wo.graphql,readInlineData:Wo.readInlineData,requestSubscription:Wo.requestSubscription,fetchQuery:Wo.fetchQuery},bKe=vKe;function _Ke(e){let t=bKe.ReactRelayContext.Provider;return ur(t,{value:{environment:e.environment},children:e.children})}let yKe={make:_Ke},xKe={Provider:yKe};function SKe(e,t,r){let n=async(i,o,a,s)=>{let l=D(Mi(i.text),""),c=l.includes("Platform")||l.includes("platform")?e.platformApiEndpoint:e.apiEndpoint,d=Object.fromEntries([["content-type","application/json"]]),f=t();f!==void 0&&(d.Authorization="Bearer "+f);let p=(await fetch(c,{method:"POST",headers:d,body:D(JSON.stringify({query:l,variables:o}),"")})).json,m=await p();return ew(m)&&r(),m};return Rje.make(wt.Network.create(n),Eje.make(new wt.RecordSource,void 0,void 0),void 0,void 0,void 0,void 0,void 0)}function wKe(e){let t=e.config,r=xa(),n=Pt(()=>SKe(t,()=>k(r,i=>i.getToken()),()=>ee(r,i=>i.logout())),[t,r]);return _(xKe.Provider.make,{environment:n,children:e.children})}let EKe=wKe;function ro(e){return"var("+e+")"}let kKe=E([u("background",ro(x.surfaceElevated)),u("border","1px solid var("+x.border+")"),u("border-radius",ro(Y.md)),u("padding",ro(O.lg)),z("flex"),_e("column"),X("center"),Ze("center"),u("gap",ro(O.sm)),u("min-height","160px"),Ya("center"),ma({NAME:"percent",VAL:100}),u("box-sizing","border-box")]),CKe=E([u("font-size","32px"),u("line-height","1"),Ip(ke(4))]),RKe=E([u("color",ro(x.textPrimary)),u("font-size",ro(T.sizeMd)),u("font-weight",ro(T.weightMedium)),Ip(ke(4))]),AKe=E([u("color",ro(x.textSecondary)),u("font-size",ro(T.sizeSm)),u("line-height",ro(T.lineHeightNormal))]),TKe=E([u("color",ro(x.textDisabled)),u("font-size",ro(T.sizeXs)),u("font-family",ro(T.fontFamilyMono)),Uo(ke(8))]);function $Ke(e){let t=e.definition;return L("div",{children:[_("div",{children:"[locked]",className:CKe}),_("div",{children:t.title,className:RKe}),_("div",{children:t.description,className:AKe}),_("div",{children:t.extensionPackage,className:TKe})],className:kKe})}let NKe=$Ke,DKe=E([z("flex"),X("center"),Ze("center"),u("min-height","160px"),u("color","var("+x.textSecondary+")"),u("font-size","var("+T.sizeSm+")")]);function FKe(e){return _("div",{children:"Loading…",className:DKe})}E([z("flex"),X("center"),Ze("center"),u("min-height","160px"),u("color","var("+x.error+")"),u("font-size","var("+T.sizeSm+")")]);function IKe(e){let t=Gs(),r=G_e(e.fragmentId);if(r===void 0)return null;let n=r.requiredAccess;return n!==void 0&&!t(n)?_(NKe,{definition:r}):_(eV,{children:r.component(e.props),fallback:_(FKe,{})})}let PKe=IKe;function OKe(e){let t=V_e(e.name),r=e.contextId,n=e.resourceId,i={contextId:r,resourceId:n};return t.length!==0?_("div",{children:t.map(o=>_(PKe,{fragmentId:o.fragmentId,props:i},o.fragmentId)),style:{display:"flex",flexDirection:"column",gap:"1rem"}}):null}let MKe=OKe;function LKe(e){return L("div",{children:[L("header",{children:[_("h1",{children:"Platform overview",style:{margin:"0"}}),_("p",{children:"Summary panels contributed by connected plugins appear below.",style:{color:"#666",margin:"0.25rem 0 0"}})]}),_(MKe,{name:"platform-summary"})],style:{display:"flex",fontFamily:"system-ui",padding:"1.5rem",flexDirection:"column",gap:"1.5rem"}})}let zKe=LKe,UKe="host.home",dR="/",BKe={label:"Home",icon:void 0,group:void 0,sortOrder:0},jKe=dR,qKe={fragmentId:UKe,title:"Home",menuEntry:BKe,requiredAccess:void 0,url:jKe};function VKe(e){return k(q(e.home,t=>t.trim()),t=>{if(!(t===""||t===dR))return t})}function GKe(e){let t=e.config,r=St(im),n=Rk(),i=kz(),o=Iv(void 0),a=VKe(t);return Ae(()=>{!t.autoRedirectFirstPage&&ir(a)&&(ee(r,s=>s.register([qKe])),ee(n,s=>s.register([Uc(pO(l=>l),_(zKe,{}))],Pu())))},[]),Ae(()=>{if((o===""||o===dR)&&i.length!==0){if(a!==void 0)ua(a);else if(t.autoRedirectFirstPage){let l=i.find(c=>Ee(c.url)?Cz(c):!1);if(l!==void 0){let c=l.url;c!==void 0&&ua(c)}}}},[i.length,o]),null}let KKe=GKe,HKe=`mutation UploadPresign($store: ID!, $fileName: String!, $contentType: String) {
|
|
124
|
+
Upload_Presign(store: $store, fileName: $fileName, contentType: $contentType) {
|
|
125
|
+
uploadUrl
|
|
126
|
+
storageRef
|
|
127
|
+
}
|
|
128
|
+
}`,WKe=`mutation UploadRelease($store: ID!, $storageRef: String!) {
|
|
129
|
+
Upload_Release(store: $store, storageRef: $storageRef) {
|
|
130
|
+
released
|
|
131
|
+
reason
|
|
132
|
+
}
|
|
133
|
+
}`;function wq(e,t){return k(k(G(e),r=>F(r,t)),G)}function JKe(e){return k(wq(e,"Upload_Presign"),t=>{let r=k(F(t,"uploadUrl"),oe),n=k(F(t,"storageRef"),oe);if(r!==void 0&&n!==void 0)return{uploadUrl:r,storageRef:n}})}function QKe(e){let t=wq(e,"Upload_Release");return t!==void 0?Re(k(F(t,"released"),Mv),!0)?{TAG:"Ok",_0:void 0}:{TAG:"Error",_0:D(k(F(t,"reason"),oe),"Could not release the uploaded file")}:{TAG:"Error",_0:"Could not release the uploaded file"}}function YKe(e,t,r,n,i){return new Promise((o,a)=>{let s=new XMLHttpRequest;s.open("PUT",e),s.setRequestHeader("Content-Type",n),s.upload.onprogress=l=>{if(l.lengthComputable&&l.total>0)return i(l.loaded/l.total*100)},s.onload=()=>{let l=s.status;return l>=200&&l<300?(i(100),o({TAG:"Ok",_0:t})):o({TAG:"Error",_0:"Upload failed (status "+l.toString()+")"})},s.onerror=()=>o({TAG:"Error",_0:"Upload failed (network error)"}),s.send(r)})}function XKe(e,t){return{upload:(r,n)=>{let i=r.type;return Lt(e()(HKe,Oe([["store",t],["fileName",r.name],["contentType",i]])).then(o=>{let a=JKe(o);return a!==void 0?YKe(a.uploadUrl,a.storageRef,r,i,n):Promise.resolve({TAG:"Error",_0:"Could not obtain an upload target"})}),o=>Promise.resolve({TAG:"Error",_0:"Upload request failed"}))},remove:r=>Lt(e()(WKe,Oe([["store",t],["storageRef",r]])).then(QKe),n=>Promise.resolve({TAG:"Error",_0:"Release request failed"}))}}let ZKe=[],eHe=[],tHe=[],rHe={pages:ZKe,panels:eHe,routes:tHe};function Eq(e){return L("div",{children:[_("h1",{children:"Shell failed to boot"}),_("pre",{children:e.message})],style:{color:"#a00",fontFamily:"system-ui",padding:"2rem"}})}function fR(e){return _("div",{children:"Loading…",style:{fontFamily:"system-ui",padding:"2rem"}})}function nHe(e){let t=e.extensions,r=St(im),n=St(om),i=Rk();return Ae(()=>{t.pages.length!==0&&ee(r,o=>o.register(t.pages)),t.panels.length!==0&&ee(n,o=>o.register(t.panels)),t.routes.length!==0&&ee(i,o=>o.register(t.routes,Pu()))},[]),null}function _w(e){let t=e.uiHints,r=e.config,n=oye(),i=iye(),o=Zce(r),a=L(Bt,{children:[_(LPe,{}),_(gye,{}),_(Mbe,{})]});return Ae(()=>{document.title=o},[o]),L(Bt,{children:[_(KKe,{config:r}),_(lPe,{config:r,uiHints:t}),_(nHe,{extensions:e.extensions}),_(U_e,{appName:o,logoUrl:r.logoUrl,router:n,headerSlot:a,fallback:_(vPe,{config:r,uiHints:t}),routesReady:i,loading:_(fR,{})})]})}function iHe(e){let t=e.discoverPlatforms,r=Iv(void 0),n=Pz(r);if(n===void 0)return t!==void 0?_(Cye,{discover:t}):_(Eq,{message:"config.json sets mode = fleet but the app supplied no discoverPlatforms adapter to ShellApp"});let i=n[0];return _(Oz.make,{scope:i,children:_(_V,{value:{prefix:Ck(i),path:n[1]},children:_(_w,{config:e.config,extensions:e.extensions,uiHints:e.uiHints})})})}function eO(e){let t=e.access;return _(t_e,{access:t,children:_(Jbe.make,{children:_(q_e.make,{access:t,children:_(nye.make,{children:_(iY.make,{children:_(o5.Provider.make,{children:_(qIe.make,{children:e.children})})})})})})})}function oHe(e){let t=e.uiHints,r=e.extensions,n=e.config,i=xa(),o=n.mode,a;if(o==="Single"){let c=n.environment,d=n.platformName;a=c!==void 0&&d!==void 0?_(Oz.make,{scope:{environment:c,platformName:d},children:_(_w,{config:n,extensions:r,uiHints:t})}):_(_w,{config:n,extensions:r,uiHints:t})}else a=_(iHe,{config:n,extensions:r,uiHints:t,discoverPlatforms:e.discoverPlatforms});if(n.authMode==="Anonymous")return _(eO,{access:n.accessTiers,children:a});if(i===void 0)return _(k3,{});let l=i.identity;return l!==void 0&&i.isAuthenticated?_(eO,{access:l.groups.concat(n.accessTiers),children:a}):_(k3,{})}function aHe(e){let t=e.config,r=xa();ZV(t.assetOrigins);let n=Iv(void 0),i=t.mode,o;o=i==="Single"?void 0:q(Pz(n),p=>p[0]);let a=ne(o,"",p=>p.environment+"|"+p.platformName),s=Pt(()=>{let p=cde(t.apiEndpoint,t.platformApiEndpoint,()=>k(r,g=>g.getToken()),()=>ee(r,g=>g.logout())),m=o!==void 0?ude(xye(o))(p):p;return[dde(m),m]},[t,r,a]),l=s[0],c=()=>k(r,p=>p.getToken()),d=De(l);d.current=l,aue.contents=l,Ae(()=>{let p={},m=g=>{let v=p[g];if(v!==void 0)return v;let b=XKe(()=>d.current,g);return p[g]=b,b};uOe(g=>m(g),void 0,void 0)},[]);let f=D(t.theme,"Light"),h=ne(k(r,p=>p.identity),"anonymous",p=>p.userId+"|"+p.groups.toSorted(wd).join(","));return _(cue.make,{execute:l,executeResult:s[1],children:_(EKe,{config:t,children:L(Pce.make,{domainEventsEndpoint:t.domainApiEventsEndpoint,platformEventsEndpoint:t.platformApiEventsEndpoint,liveUpdates:t.liveUpdates,liveReconnectRefetch:t.liveReconnectRefetch,clientEventsNamespace:t.clientEventsNamespace,onAuthFailure:()=>ee(r,p=>p.logout()),platformReadModelPrefixes:t.platformReadModelPrefixes,getToken:c,children:[_(BPe,{config:t,onChange:e.reloadUiHints}),_(bce.make,{initialPreset:f,children:_(oHe,{config:t,extensions:e.extensions,uiHints:e.uiHints,discoverPlatforms:e.discoverPlatforms})})]})})},h)}function sHe(e,t){let r=ce(()=>{}),n=r[1],i=r[0],o=$r(()=>{nde(e.uiHintsUrl).then(s=>n(l=>s))},[e.uiHintsUrl]);return Ae(()=>{o()},[e.uiHintsUrl]),[Pt(()=>q(i,s=>zue(s,D(t.uiHints,{}))),[i]),o]}function lHe(e){let t=e.extensions,r=e.config,n=sHe(r,t),i=n[0];return _(bbe.make,{authMode:r.authMode,apiEndpoint:r.apiEndpoint,cognitoClientId:r.cognitoClientId,cognitoUserPoolId:r.cognitoUserPoolId,region:r.region,children:i!==void 0?_(aHe,{config:r,extensions:t,uiHints:i,reloadUiHints:n[1],discoverPlatforms:e.discoverPlatforms}):_(fR,{})})}function uHe(e){let t=e.registerModes,r=e.extensions,n=r!==void 0?r:rHe,i=ce(()=>"LoadingConfig"),o=i[1],a=i[0];return Ae(()=>{ide().then(s=>{if(s.TAG==="Ok"){let c=s._0;return t!==void 0?Lt(t(c).then(()=>o(d=>({TAG:"Ready",_0:c}))),d=>(console.error("[ShellApp] optional view modes failed to register — continuing without them: "+String(d)),o(f=>({TAG:"Ready",_0:c})),Promise.resolve())):(o(d=>({TAG:"Ready",_0:c})),Promise.resolve())}let l=s._0;return o(c=>({TAG:"Failed",_0:l})),Promise.resolve()})},[]),typeof a!="object"?_(fR,{}):a.TAG==="Ready"?_(lHe,{config:a._0,extensions:n,discoverPlatforms:e.discoverPlatforms}):_(Eq,{message:a._0})}let cHe={make:uHe},tO=document.querySelector("#root");tO!=null&&Wq(tO).render(_(cHe.make,{registerModes:sV}));export{Lt as $,Rt as A,q as B,tEe as C,Fo as D,x as E,O as F,T as G,xHe as H,G as I,Mi as J,Ee as K,Li as L,xr as M,Lle as N,aue as O,d2 as P,Ld as Q,Y as R,Kk as S,nEe as T,$He as a,F as b,Wwe as c,nt as d,Q as e,ee as f,D as g,pt as h,Io as i,Jle as j,Xu as k,Nr as l,oe as m,k as n,O9 as o,Ks as p,Ct as q,ya as r,Gk as s,fc as t,ne as u,vf as v,rm as w,Oe as x,fce as y,Dt as z};
|