@react-grab/visual-edit 0.0.97 → 0.0.98
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/cli.cjs +1 -1
- package/dist/cli.js +1 -1
- package/dist/client.cjs +725 -3910
- package/dist/client.js +739 -3924
- package/dist/index.global.js +46 -48
- package/dist/server.cjs +1 -1
- package/dist/server.js +1 -1
- package/package.json +2 -2
package/dist/index.global.js
CHANGED
|
@@ -1,44 +1,42 @@
|
|
|
1
|
-
var ReactGrabVisualEdit=(function(exports){'use strict';function Sr(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global}function Tr(){let e=Sr();if(e.__xstate__)return e.__xstate__}var Jt=e=>{if(typeof window>"u")return;let t=Tr();t&&t.register(e);};var Je=class{constructor(t){this._process=t,this._active=false,this._current=null,this._last=null;}start(){this._active=true,this.flush();}clear(){this._current&&(this._current.next=null,this._last=this._current);}enqueue(t){let n={value:t,next:null};if(this._current){this._last.next=n,this._last=n;return}this._current=n,this._last=n,this._active&&this.flush();}flush(){for(;this._current;){let t=this._current;this._process(t.value),this._current=t.next;}this._last=null;}},Ct=".",Cr="",_t="",_r="#",Ar="*",on="xstate.init",sn="xstate.error",vt="xstate.stop";function Nr(e,t){return {type:`xstate.after.${e}.${t}`}}function wt(e,t){return {type:`xstate.done.state.${e}`,output:t}}function Mr(e,t){return {type:`xstate.done.actor.${e}`,output:t,actorId:e}}function At(e,t){return {type:`xstate.error.actor.${e}`,error:t,actorId:e}}function Nt(e){return {type:on,input:e}}function ie(e){setTimeout(()=>{throw e});}var kr=typeof Symbol=="function"&&Symbol.observable||"@@observable";function an(e,t){let n=Qt(e),r=Qt(t);return typeof r=="string"?typeof n=="string"?r===n:false:typeof n=="string"?n in r:Object.keys(n).every(o=>o in r?an(n[o],r[o]):false)}function et(e){if(cn(e))return e;let t=[],n="";for(let r=0;r<e.length;r++){switch(e.charCodeAt(r)){case 92:n+=e[r+1],r++;continue;case 46:t.push(n),n="";continue}n+=e[r];}return t.push(n),t}function Qt(e){if(no(e))return e.value;if(typeof e!="string")return e;let t=et(e);return Lr(t)}function Lr(e){if(e.length===1)return e[0];let t={},n=t;for(let r=0;r<e.length-1;r++)if(r===e.length-2)n[e[r]]=e[r+1];else {let o=n;n={},o[e[r]]=n;}return t}function Mt(e,t){let n={},r=Object.keys(e);for(let o=0;o<r.length;o++){let s=r[o];n[s]=t(e[s],s,e,o);}return n}function ln(e){return cn(e)?e:[e]}function se(e){return e===void 0?[]:ln(e)}function xt(e,t,n,r){return typeof e=="function"?e({context:t,event:n,self:r}):e}function cn(e){return Array.isArray(e)}function Ir(e){return e.type.startsWith("xstate.error.actor")}function be(e){return ln(e).map(t=>typeof t>"u"||typeof t=="string"?{target:t}:t)}function un(e){if(!(e===void 0||e===Cr))return se(e)}function Et(e,t,n){let r=typeof e=="object",o=r?e:void 0;return {next:(r?e.next:e)?.bind(o),error:(r?e.error:t)?.bind(o),complete:(r?e.complete:n)?.bind(o)}}function kt(e,t){return `${t}.${e}`}function Re(e,t){let n=t.match(/^xstate\.invoke\.(\d+)\.(.*)/);if(!n)return e.implementations.actors[t];let[,r,o]=n,l=e.getStateNodeById(o).config.invoke;return (Array.isArray(l)?l[r]:l).src}function dn(e,t){if(t===e||t===Ar)return true;if(!t.endsWith(".*"))return false;let n=t.split("."),r=e.split(".");for(let o=0;o<n.length;o++){let s=n[o],l=r[o];if(s==="*")return o===n.length-1;if(s!==l)return false}return true}function en(e,t){return `${e.sessionId}.${t}`}var Or=0;function Pr(e,t){let n=new Map,r=new Map,o=new WeakMap,s=new Set,l={},{clock:c,logger:f}=t,g={schedule:(m,x,A,L,P=Math.random().toString(36).slice(2))=>{let G={source:m,target:x,event:A,delay:L,id:P,startedAt:Date.now()},W=en(m,P);v._snapshot._scheduledEvents[W]=G;let te=c.setTimeout(()=>{delete l[W],delete v._snapshot._scheduledEvents[W],v._relay(m,x,A);},L);l[W]=te;},cancel:(m,x)=>{let A=en(m,x),L=l[A];delete l[A],delete v._snapshot._scheduledEvents[A],L!==void 0&&c.clearTimeout(L);},cancelAll:m=>{for(let x in v._snapshot._scheduledEvents){let A=v._snapshot._scheduledEvents[x];A.source===m&&g.cancel(m,A.id);}}},S=m=>{if(!s.size)return;let x={...m,rootId:e.sessionId};s.forEach(A=>A.next?.(x));},v={_snapshot:{_scheduledEvents:(t?.snapshot&&t.snapshot.scheduler)??{}},_bookId:()=>`x:${Or++}`,_register:(m,x)=>(n.set(m,x),m),_unregister:m=>{n.delete(m.sessionId);let x=o.get(m);x!==void 0&&(r.delete(x),o.delete(m));},get:m=>r.get(m),getAll:()=>Object.fromEntries(r.entries()),_set:(m,x)=>{let A=r.get(m);if(A&&A!==x)throw new Error(`Actor with system ID '${m}' already exists.`);r.set(m,x),o.set(x,m);},inspect:m=>{let x=Et(m);return s.add(x),{unsubscribe(){s.delete(x);}}},_sendInspectionEvent:S,_relay:(m,x,A)=>{v._sendInspectionEvent({type:"@xstate.event",sourceRef:m,actorRef:x,event:A}),x._send(A);},scheduler:g,getSnapshot:()=>({_scheduledEvents:{...v._snapshot._scheduledEvents}}),start:()=>{let m=v._snapshot._scheduledEvents;v._snapshot._scheduledEvents={};for(let x in m){let{source:A,target:L,event:P,delay:G,id:W}=m[x];g.schedule(A,L,P,G,W);}},_clock:c,_logger:f};return v}var bt=false,tt=1,Q=(function(e){return e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped",e})({}),Dr={clock:{setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e)},logger:console.log.bind(console),devTools:false},St=class{constructor(t,n){this.logic=t,this._snapshot=void 0,this.clock=void 0,this.options=void 0,this.id=void 0,this.mailbox=new Je(this._process.bind(this)),this.observers=new Set,this.eventListeners=new Map,this.logger=void 0,this._processingStatus=Q.NotStarted,this._parent=void 0,this._syncSnapshot=void 0,this.ref=void 0,this._actorScope=void 0,this.systemId=void 0,this.sessionId=void 0,this.system=void 0,this._doneEvent=void 0,this.src=void 0,this._deferred=[];let r={...Dr,...n},{clock:o,logger:s,parent:l,syncSnapshot:c,id:f,systemId:g,inspect:S}=r;this.system=l?l.system:Pr(this,{clock:o,logger:s}),S&&!l&&this.system.inspect(Et(S)),this.sessionId=this.system._bookId(),this.id=f??this.sessionId,this.logger=n?.logger??this.system._logger,this.clock=n?.clock??this.system._clock,this._parent=l,this._syncSnapshot=c,this.options=r,this.src=r.src??t,this.ref=this,this._actorScope={self:this,id:this.id,sessionId:this.sessionId,logger:this.logger,defer:v=>{this._deferred.push(v);},system:this.system,stopChild:v=>{if(v._parent!==this)throw new Error(`Cannot stop child actor ${v.id} of ${this.id} because it is not a child`);v._stop();},emit:v=>{let m=this.eventListeners.get(v.type),x=this.eventListeners.get("*");if(!m&&!x)return;let A=[...m?m.values():[],...x?x.values():[]];for(let L of A)try{L(v);}catch(P){ie(P);}},actionExecutor:v=>{let m=()=>{if(this._actorScope.system._sendInspectionEvent({type:"@xstate.action",actorRef:this,action:{type:v.type,params:v.params}}),!v.exec)return;let x=bt;try{bt=!0,v.exec(v.info,v.params);}finally{bt=x;}};this._processingStatus===Q.Running?m():this._deferred.push(m);}},this.send=this.send.bind(this),this.system._sendInspectionEvent({type:"@xstate.actor",actorRef:this}),g&&(this.systemId=g,this.system._set(g,this)),this._initState(n?.snapshot??n?.state),g&&this._snapshot.status!=="active"&&this.system._unregister(this);}_initState(t){try{this._snapshot=t?this.logic.restoreSnapshot?this.logic.restoreSnapshot(t,this._actorScope):t:this.logic.getInitialSnapshot(this._actorScope,this.options?.input);}catch(n){this._snapshot={status:"error",output:void 0,error:n};}}update(t,n){this._snapshot=t;let r;for(;r=this._deferred.shift();)try{r();}catch(o){this._deferred.length=0,this._snapshot={...t,status:"error",error:o};}switch(this._snapshot.status){case "active":for(let o of this.observers)try{o.next?.(t);}catch(s){ie(s);}break;case "done":for(let o of this.observers)try{o.next?.(t);}catch(s){ie(s);}this._stopProcedure(),this._complete(),this._doneEvent=Mr(this.id,this._snapshot.output),this._parent&&this.system._relay(this,this._parent,this._doneEvent);break;case "error":this._error(this._snapshot.error);break}this.system._sendInspectionEvent({type:"@xstate.snapshot",actorRef:this,event:n,snapshot:t});}subscribe(t,n,r){let o=Et(t,n,r);if(this._processingStatus!==Q.Stopped)this.observers.add(o);else switch(this._snapshot.status){case "done":try{o.complete?.();}catch(s){ie(s);}break;case "error":{let s=this._snapshot.error;if(!o.error)ie(s);else try{o.error(s);}catch(l){ie(l);}break}}return {unsubscribe:()=>{this.observers.delete(o);}}}on(t,n){let r=this.eventListeners.get(t);r||(r=new Set,this.eventListeners.set(t,r));let o=n.bind(void 0);return r.add(o),{unsubscribe:()=>{r.delete(o);}}}start(){if(this._processingStatus===Q.Running)return this;this._syncSnapshot&&this.subscribe({next:r=>{r.status==="active"&&this.system._relay(this,this._parent,{type:`xstate.snapshot.${this.id}`,snapshot:r});},error:()=>{}}),this.system._register(this.sessionId,this),this.systemId&&this.system._set(this.systemId,this),this._processingStatus=Q.Running;let t=Nt(this.options.input);switch(this.system._sendInspectionEvent({type:"@xstate.event",sourceRef:this._parent,actorRef:this,event:t}),this._snapshot.status){case "done":return this.update(this._snapshot,t),this;case "error":return this._error(this._snapshot.error),this}if(this._parent||this.system.start(),this.logic.start)try{this.logic.start(this._snapshot,this._actorScope);}catch(r){return this._snapshot={...this._snapshot,status:"error",error:r},this._error(r),this}return this.update(this._snapshot,t),this.options.devTools&&this.attachDevTools(),this.mailbox.start(),this}_process(t){let n,r;try{n=this.logic.transition(this._snapshot,t,this._actorScope);}catch(o){r={err:o};}if(r){let{err:o}=r;this._snapshot={...this._snapshot,status:"error",error:o},this._error(o);return}this.update(n,t),t.type===vt&&(this._stopProcedure(),this._complete());}_stop(){return this._processingStatus===Q.Stopped?this:(this.mailbox.clear(),this._processingStatus===Q.NotStarted?(this._processingStatus=Q.Stopped,this):(this.mailbox.enqueue({type:vt}),this))}stop(){if(this._parent)throw new Error("A non-root actor cannot be stopped directly.");return this._stop()}_complete(){for(let t of this.observers)try{t.complete?.();}catch(n){ie(n);}this.observers.clear();}_reportError(t){if(!this.observers.size){this._parent||ie(t);return}let n=false;for(let r of this.observers){let o=r.error;n||=!o;try{o?.(t);}catch(s){ie(s);}}this.observers.clear(),n&&ie(t);}_error(t){this._stopProcedure(),this._reportError(t),this._parent&&this.system._relay(this,this._parent,At(this.id,t));}_stopProcedure(){return this._processingStatus!==Q.Running?this:(this.system.scheduler.cancelAll(this),this.mailbox.clear(),this.mailbox=new Je(this._process.bind(this)),this._processingStatus=Q.Stopped,this.system._unregister(this),this)}_send(t){this._processingStatus!==Q.Stopped&&this.mailbox.enqueue(t);}send(t){this.system._relay(void 0,this,t);}attachDevTools(){let{devTools:t}=this.options;t&&(typeof t=="function"?t:Jt)(this);}toJSON(){return {xstate$$type:tt,id:this.id}}getPersistedSnapshot(t){return this.logic.getPersistedSnapshot(this._snapshot,t)}[kr](){return this}getSnapshot(){return this._snapshot}};function we(e,...[t]){return new St(e,t)}function Rr(e,t,n,r,{sendId:o}){let s=typeof o=="function"?o(n,r):o;return [t,{sendId:s},void 0]}function $r(e,t){e.defer(()=>{e.system.scheduler.cancel(e.self,t.sendId);});}function $e(e){function t(n,r){}return t.type="xstate.cancel",t.sendId=e,t.resolve=Rr,t.execute=$r,t}function Hr(e,t,n,r,{id:o,systemId:s,src:l,input:c,syncSnapshot:f}){let g=typeof l=="string"?Re(t.machine,l):l,S=typeof o=="function"?o(n):o,v,m;return g&&(m=typeof c=="function"?c({context:t.context,event:n.event,self:e.self}):c,v=we(g,{id:S,src:l,parent:e.self,syncSnapshot:f,systemId:s,input:m})),[fe(t,{children:{...t.children,[S]:v}}),{id:o,systemId:s,actorRef:v,src:l,input:m},void 0]}function Br(e,{actorRef:t}){t&&e.defer(()=>{t._processingStatus!==Q.Stopped&&t.start();});}function He(...[e,{id:t,systemId:n,input:r,syncSnapshot:o=false}={}]){function s(l,c){}return s.type="xstate.spawnChild",s.id=t,s.systemId=n,s.src=e,s.input=r,s.syncSnapshot=o,s.resolve=Hr,s.execute=Br,s}function Fr(e,t,n,r,{actorRef:o}){let s=typeof o=="function"?o(n,r):o,l=typeof s=="string"?t.children[s]:s,c=t.children;return l&&(c={...c},delete c[l.id]),[fe(t,{children:c}),l,void 0]}function zr(e,t){if(t){if(e.system._unregister(t),t._processingStatus!==Q.Running){e.stopChild(t);return}e.defer(()=>{e.stopChild(t);});}}function Ae(e){function t(n,r){}return t.type="xstate.stopChild",t.actorRef=e,t.resolve=Fr,t.execute=zr,t}function Ne(e,t,n,r){let{machine:o}=r,s=typeof e=="function",l=s?e:o.implementations.guards[typeof e=="string"?e:e.type];if(!s&&!l)throw new Error(`Guard '${typeof e=="string"?e:e.type}' is not implemented.'.`);if(typeof l!="function")return Ne(l,t,n,r);let c={context:t,event:n},f=s||typeof e=="string"?void 0:"params"in e?typeof e.params=="function"?e.params({context:t,event:n}):e.params:void 0;return "check"in l?l.check(r,c,l):l(c,f)}var Lt=e=>e.type==="atomic"||e.type==="final";function Ce(e){return Object.values(e.states).filter(t=>t.type!=="history")}function Be(e,t){let n=[];if(t===e)return n;let r=e.parent;for(;r&&r!==t;)n.push(r),r=r.parent;return n}function Fe(e){let t=new Set(e),n=fn(t);for(let r of t)if(r.type==="compound"&&(!n.get(r)||!n.get(r).length))tn(r).forEach(o=>t.add(o));else if(r.type==="parallel"){for(let o of Ce(r))if(o.type!=="history"&&!t.has(o)){let s=tn(o);for(let l of s)t.add(l);}}for(let r of t){let o=r.parent;for(;o;)t.add(o),o=o.parent;}return t}function pn(e,t){let n=t.get(e);if(!n)return {};if(e.type==="compound"){let o=n[0];if(o){if(Lt(o))return o.key}else return {}}let r={};for(let o of n)r[o.key]=pn(o,t);return r}function fn(e){let t=new Map;for(let n of e)t.has(n)||t.set(n,[]),n.parent&&(t.has(n.parent)||t.set(n.parent,[]),t.get(n.parent).push(n));return t}function hn(e,t){let n=Fe(t);return pn(e,fn(n))}function nt(e,t){return t.type==="compound"?Ce(t).some(n=>n.type==="final"&&e.has(n)):t.type==="parallel"?Ce(t).every(n=>nt(e,n)):t.type==="final"}var ze=e=>e[0]===_r;function mn(e,t){return e.transitions.get(t)||[...e.transitions.keys()].filter(r=>dn(t,r)).sort((r,o)=>o.length-r.length).flatMap(r=>e.transitions.get(r))}function gn(e){let t=e.config.after;if(!t)return [];let n=o=>{let s=Nr(o,e.id),l=s.type;return e.entry.push(Ve(s,{id:l,delay:o})),e.exit.push($e(l)),l};return Object.keys(t).flatMap(o=>{let s=t[o],l=typeof s=="string"?{target:s}:s,c=Number.isNaN(+o)?o:+o,f=n(c);return se(l).map(g=>({...g,event:f,delay:c}))}).map(o=>{let{delay:s}=o;return {...de(e,o.event,o),delay:s}})}function de(e,t,n){let r=un(n.target),o=n.reenter??false,s=Ur(e,r),l={...n,actions:se(n.actions),guard:n.guard,target:s,source:e,reenter:o,eventType:t,toJSON:()=>({...l,source:`#${e.id}`,target:s?s.map(c=>`#${c.id}`):void 0})};return l}function bn(e){let t=new Map;if(e.config.on)for(let n of Object.keys(e.config.on)){if(n===_t)throw new Error('Null events ("") cannot be specified as a transition key. Use `always: { ... }` instead.');let r=e.config.on[n];t.set(n,be(r).map(o=>de(e,n,o)));}if(e.config.onDone){let n=`xstate.done.state.${e.id}`;t.set(n,be(e.config.onDone).map(r=>de(e,n,r)));}for(let n of e.invoke){if(n.onDone){let r=`xstate.done.actor.${n.id}`;t.set(r,be(n.onDone).map(o=>de(e,r,o)));}if(n.onError){let r=`xstate.error.actor.${n.id}`;t.set(r,be(n.onError).map(o=>de(e,r,o)));}if(n.onSnapshot){let r=`xstate.snapshot.${n.id}`;t.set(r,be(n.onSnapshot).map(o=>de(e,r,o)));}}for(let n of e.after){let r=t.get(n.eventType);r||(r=[],t.set(n.eventType,r)),r.push(n);}return t}function yn(e,t){let n=typeof t=="string"?e.states[t]:t?e.states[t.target]:void 0;if(!n&&t)throw new Error(`Initial state node "${t}" not found on parent state node #${e.id}`);let r={source:e,actions:!t||typeof t=="string"?[]:se(t.actions),eventType:null,reenter:false,target:n?[n]:[],toJSON:()=>({...r,source:`#${e.id}`,target:n?[`#${n.id}`]:[]})};return r}function Ur(e,t){if(t!==void 0)return t.map(n=>{if(typeof n!="string")return n;if(ze(n))return e.machine.getStateNodeById(n);let r=n[0]===Ct;if(r&&!e.parent)return De(e,n.slice(1));let o=r?e.key+n:n;if(e.parent)try{return De(e.parent,o)}catch(s){throw new Error(`Invalid transition definition for state node '${e.id}':
|
|
2
|
-
${s.message}`)}else throw new Error(`Invalid target: "${n}" is not a valid target from the root node. Did you mean ".${n}"?`)})}function vn(e){let t=un(e.config.target);return t?{target:t.map(n=>typeof n=="string"?De(e.parent,n):n)}:e.parent.initial}function ye(e){return e.type==="history"}function tn(e){let t=It(e);for(let n of t)for(let r of Be(n,e))t.add(r);return t}function It(e){let t=new Set;function n(r){if(!t.has(r)){if(t.add(r),r.type==="compound")n(r.initial.target[0]);else if(r.type==="parallel")for(let o of Ce(r))n(o);}}return n(e),t}function _e(e,t){if(ze(t))return e.machine.getStateNodeById(t);if(!e.states)throw new Error(`Unable to retrieve child state '${t}' from '${e.id}'; no child states exist.`);let n=e.states[t];if(!n)throw new Error(`Child state '${t}' does not exist on '${e.id}'`);return n}function De(e,t){if(typeof t=="string"&&ze(t))try{return e.machine.getStateNodeById(t)}catch{}let n=et(t).slice(),r=e;for(;n.length;){let o=n.shift();if(!o.length)break;r=_e(r,o);}return r}function Ue(e,t){if(typeof t=="string"){let o=e.states[t];if(!o)throw new Error(`State '${t}' does not exist on '${e.id}'`);return [e,o]}let n=Object.keys(t),r=n.map(o=>_e(e,o)).filter(Boolean);return [e.machine.root,e].concat(r,n.reduce((o,s)=>{let l=_e(e,s);if(!l)return o;let c=Ue(l,t[s]);return o.concat(c)},[]))}function jr(e,t,n,r){let s=_e(e,t).next(n,r);return !s||!s.length?e.next(n,r):s}function Vr(e,t,n,r){let o=Object.keys(t),s=_e(e,o[0]),l=rt(s,t[o[0]],n,r);return !l||!l.length?e.next(n,r):l}function Gr(e,t,n,r){let o=[];for(let s of Object.keys(t)){let l=t[s];if(!l)continue;let c=_e(e,s),f=rt(c,l,n,r);f&&o.push(...f);}return o.length?o:e.next(n,r)}function rt(e,t,n,r){return typeof t=="string"?jr(e,t,n,r):Object.keys(t).length===1?Vr(e,t,n,r):Gr(e,t,n,r)}function Kr(e){return Object.keys(e.states).map(t=>e.states[t]).filter(t=>t.type==="history")}function pe(e,t){let n=e;for(;n.parent&&n.parent!==t;)n=n.parent;return n.parent===t}function Wr(e,t){let n=new Set(e),r=new Set(t);for(let o of n)if(r.has(o))return true;for(let o of r)if(n.has(o))return true;return false}function wn(e,t,n){let r=new Set;for(let o of e){let s=false,l=new Set;for(let c of r)if(Wr(Tt([o],t,n),Tt([c],t,n)))if(pe(o.source,c.source))l.add(c);else {s=true;break}if(!s){for(let c of l)r.delete(c);r.add(o);}}return Array.from(r)}function qr(e){let[t,...n]=e;for(let r of Be(t,void 0))if(n.every(o=>pe(o,r)))return r}function Ot(e,t){if(!e.target)return [];let n=new Set;for(let r of e.target)if(ye(r))if(t[r.id])for(let o of t[r.id])n.add(o);else for(let o of Ot(vn(r),t))n.add(o);else n.add(r);return [...n]}function xn(e,t){let n=Ot(e,t);if(!n)return;if(!e.reenter&&n.every(o=>o===e.source||pe(o,e.source)))return e.source;let r=qr(n.concat(e.source));if(r)return r;if(!e.reenter)return e.source.machine.root}function Tt(e,t,n){let r=new Set;for(let o of e)if(o.target?.length){let s=xn(o,n);o.reenter&&o.source===s&&r.add(s);for(let l of t)pe(l,s)&&r.add(l);}return [...r]}function Yr(e,t){if(e.length!==t.size)return false;for(let n of e)if(!t.has(n))return false;return true}function Qe(e,t,n,r,o,s){if(!e.length)return t;let l=new Set(t._nodes),c=t.historyValue,f=wn(e,l,c),g=t;o||([g,c]=Qr(g,r,n,f,l,c,s,n.actionExecutor)),g=ve(g,r,n,f.flatMap(v=>v.actions),s,void 0),g=Zr(g,r,n,f,l,s,c,o);let S=[...l];g.status==="done"&&(g=ve(g,r,n,S.sort((v,m)=>m.order-v.order).flatMap(v=>v.exit),s,void 0));try{return c===t.historyValue&&Yr(t._nodes,l)?g:fe(g,{_nodes:S,historyValue:c})}catch(v){throw v}}function Xr(e,t,n,r,o){if(r.output===void 0)return;let s=wt(o.id,o.output!==void 0&&o.parent?xt(o.output,e.context,t,n.self):void 0);return xt(r.output,e.context,s,n.self)}function Zr(e,t,n,r,o,s,l,c){let f=e,g=new Set,S=new Set;Jr(r,l,S,g),c&&S.add(e.machine.root);let v=new Set;for(let m of [...g].sort((x,A)=>x.order-A.order)){o.add(m);let x=[];x.push(...m.entry);for(let A of m.invoke)x.push(He(A.src,{...A,syncSnapshot:!!A.onSnapshot}));if(S.has(m)){let A=m.initial.actions;x.push(...A);}if(f=ve(f,t,n,x,s,m.invoke.map(A=>A.id)),m.type==="final"){let A=m.parent,L=A?.type==="parallel"?A:A?.parent,P=L||m;for(A?.type==="compound"&&s.push(wt(A.id,m.output!==void 0?xt(m.output,f.context,t,n.self):void 0));L?.type==="parallel"&&!v.has(L)&&nt(o,L);)v.add(L),s.push(wt(L.id)),P=L,L=L.parent;if(L)continue;f=fe(f,{status:"done",output:Xr(f,t,n,f.machine.root,P)});}}return f}function Jr(e,t,n,r){for(let o of e){let s=xn(o,t);for(let c of o.target||[])!ye(c)&&(o.source!==c||o.source!==s||o.reenter)&&(r.add(c),n.add(c)),Te(c,t,n,r);let l=Ot(o,t);for(let c of l){let f=Be(c,s);s?.type==="parallel"&&f.push(s),En(r,t,n,f,!o.source.parent&&o.reenter?void 0:s);}}}function Te(e,t,n,r){if(ye(e))if(t[e.id]){let o=t[e.id];for(let s of o)r.add(s),Te(s,t,n,r);for(let s of o)yt(s,e.parent,r,t,n);}else {let o=vn(e);for(let s of o.target)r.add(s),o===e.parent?.initial&&n.add(e.parent),Te(s,t,n,r);for(let s of o.target)yt(s,e.parent,r,t,n);}else if(e.type==="compound"){let[o]=e.initial.target;ye(o)||(r.add(o),n.add(o)),Te(o,t,n,r),yt(o,e,r,t,n);}else if(e.type==="parallel")for(let o of Ce(e).filter(s=>!ye(s)))[...r].some(s=>pe(s,o))||(ye(o)||(r.add(o),n.add(o)),Te(o,t,n,r));}function En(e,t,n,r,o){for(let s of r)if((!o||pe(s,o))&&e.add(s),s.type==="parallel")for(let l of Ce(s).filter(c=>!ye(c)))[...e].some(c=>pe(c,l))||(e.add(l),Te(l,t,n,e));}function yt(e,t,n,r,o){En(n,r,o,Be(e,t));}function Qr(e,t,n,r,o,s,l,c){let f=e,g=Tt(r,o,s);g.sort((v,m)=>m.order-v.order);let S;for(let v of g)for(let m of Kr(v)){let x;m.history==="deep"?x=A=>Lt(A)&&pe(A,v):x=A=>A.parent===v,S??={...s},S[m.id]=Array.from(o).filter(x);}for(let v of g)f=ve(f,t,n,[...v.exit,...v.invoke.map(m=>Ae(m.id))],l,void 0),o.delete(v);return [f,S||s]}function eo(e,t){return e.implementations.actions[t]}function Sn(e,t,n,r,o,s){let{machine:l}=e,c=e;for(let f of r){let g=typeof f=="function",S=g?f:eo(l,typeof f=="string"?f:f.type),v={context:c.context,event:t,self:n.self,system:n.system},m=g||typeof f=="string"?void 0:"params"in f?typeof f.params=="function"?f.params({context:c.context,event:t}):f.params:void 0;if(!S||!("resolve"in S)){n.actionExecutor({type:typeof f=="string"?f:typeof f=="object"?f.type:f.name||"(anonymous)",info:v,params:m,exec:S});continue}let x=S,[A,L,P]=x.resolve(n,c,v,m,S,o);c=A,"retryResolve"in x&&s?.push([x,L]),"execute"in x&&n.actionExecutor({type:x.type,info:v,params:L,exec:x.execute.bind(null,n,L)}),P&&(c=Sn(c,t,n,P,o,s));}return c}function ve(e,t,n,r,o,s){let l=s?[]:void 0,c=Sn(e,t,n,r,{internalQueue:o,deferredActorIds:s},l);return l?.forEach(([f,g])=>{f.retryResolve(n,c,g);}),c}function ot(e,t,n,r){let o=e,s=[];function l(g,S,v){n.system._sendInspectionEvent({type:"@xstate.microstep",actorRef:n.self,event:S,snapshot:g,_transitions:v}),s.push(g);}if(t.type===vt)return o=fe(nn(o,t,n),{status:"stopped"}),l(o,t,[]),{snapshot:o,microstates:s};let c=t;if(c.type!==on){let g=c,S=Ir(g),v=rn(g,o);if(S&&!v.length)return o=fe(e,{status:"error",error:g.error}),l(o,g,[]),{snapshot:o,microstates:s};o=Qe(v,e,n,c,false,r),l(o,g,v);}let f=true;for(;o.status==="active";){let g=f?to(o,c):[],S=g.length?o:void 0;if(!g.length){if(!r.length)break;c=r.shift(),g=rn(c,o);}o=Qe(g,o,n,c,false,r),f=o!==S,l(o,c,g);}return o.status!=="active"&&nn(o,c,n),{snapshot:o,microstates:s}}function nn(e,t,n){return ve(e,t,n,Object.values(e.children).map(r=>Ae(r)),[],void 0)}function rn(e,t){return t.machine.getTransitionData(t,e)}function to(e,t){let n=new Set,r=e._nodes.filter(Lt);for(let o of r)e:for(let s of [o].concat(Be(o,void 0)))if(s.always){for(let l of s.always)if(l.guard===void 0||Ne(l.guard,e.context,t,e)){n.add(l);break e}}return wn(Array.from(n),new Set(e._nodes),e.historyValue)}function Tn(e,t){let n=Fe(Ue(e,t));return hn(e,[...n])}function no(e){return !!e&&typeof e=="object"&&"machine"in e&&"value"in e}var ro=function(t){return an(t,this.value)},oo=function(t){return this.tags.has(t)},io=function(t){let n=this.machine.getTransitionData(this,t);return !!n?.length&&n.some(r=>r.target!==void 0||r.actions.length)},so=function(){let{_nodes:t,tags:n,machine:r,getMeta:o,toJSON:s,can:l,hasTag:c,matches:f,...g}=this;return {...g,tags:Array.from(n)}},ao=function(){return this._nodes.reduce((t,n)=>(n.meta!==void 0&&(t[n.id]=n.meta),t),{})};function je(e,t){return {status:e.status,output:e.output,error:e.error,machine:t,context:e.context,_nodes:e._nodes,value:hn(t.root,e._nodes),tags:new Set(e._nodes.flatMap(n=>n.tags)),children:e.children,historyValue:e.historyValue||{},matches:ro,hasTag:oo,can:io,getMeta:ao,toJSON:so}}function fe(e,t={}){return je({...e,...t},e.machine)}function lo(e){if(typeof e!="object"||e===null)return {};let t={};for(let n in e){let r=e[n];Array.isArray(r)&&(t[n]=r.map(o=>({id:o.id})));}return t}function Cn(e,t){let{_nodes:n,tags:r,machine:o,children:s,context:l,can:c,hasTag:f,matches:g,getMeta:S,toJSON:v,...m}=e,x={};for(let L in s){let P=s[L];x[L]={snapshot:P.getPersistedSnapshot(t),src:P.src,systemId:P.systemId,syncSnapshot:P._syncSnapshot};}return {...m,context:_n(l),children:x,historyValue:lo(m.historyValue)}}function _n(e){let t;for(let n in e){let r=e[n];if(r&&typeof r=="object")if("sessionId"in r&&"send"in r&&"ref"in r)t??=Array.isArray(e)?e.slice():{...e},t[n]={xstate$$type:tt,id:r.id};else {let o=_n(r);o!==r&&(t??=Array.isArray(e)?e.slice():{...e},t[n]=o);}}return t??e}function co(e,t,n,r,{event:o,id:s,delay:l},{internalQueue:c}){let f=t.machine.implementations.delays;if(typeof o=="string")throw new Error(`Only event objects may be used with raise; use raise({ type: "${o}" }) instead`);let g=typeof o=="function"?o(n,r):o,S;if(typeof l=="string"){let v=f&&f[l];S=typeof v=="function"?v(n,r):v;}else S=typeof l=="function"?l(n,r):l;return typeof S!="number"&&c.push(g),[t,{event:g,id:s,delay:S},void 0]}function uo(e,t){let{event:n,delay:r,id:o}=t;if(typeof r=="number"){e.defer(()=>{let s=e.self;e.system.scheduler.schedule(s,s,n,r,o);});return}}function Ve(e,t){function n(r,o){}return n.type="xstate.raise",n.event=e,n.id=t?.id,n.delay=t?.delay,n.resolve=co,n.execute=uo,n}function po(e,{machine:t,context:n},r,o){let s=(l,c)=>{if(typeof l=="string"){let f=Re(t,l);if(!f)throw new Error(`Actor logic '${l}' not implemented in machine '${t.id}'`);let g=we(f,{id:c?.id,parent:e.self,syncSnapshot:c?.syncSnapshot,input:typeof c?.input=="function"?c.input({context:n,event:r,self:e.self}):c?.input,src:l,systemId:c?.systemId});return o[g.id]=g,g}else return we(l,{id:c?.id,parent:e.self,syncSnapshot:c?.syncSnapshot,input:c?.input,src:l,systemId:c?.systemId})};return (l,c)=>{let f=s(l,c);return o[f.id]=f,e.defer(()=>{f._processingStatus!==Q.Stopped&&f.start();}),f}}function fo(e,t,n,r,{assignment:o}){if(!t.context)throw new Error("Cannot assign to undefined `context`. Ensure that `context` is defined in the machine config.");let s={},l={context:t.context,event:n.event,spawn:po(e,t,n.event,s),self:e.self,system:e.system},c={};if(typeof o=="function")c=o(l,r);else for(let g of Object.keys(o)){let S=o[g];c[g]=typeof S=="function"?S(l,r):S;}let f=Object.assign({},t.context,c);return [fe(t,{context:f,children:Object.keys(s).length?{...t.children,...s}:t.children}),void 0,void 0]}function O(e){function t(n,r){}return t.type="xstate.assign",t.assignment=e,t.resolve=fo,t}var Nn=new WeakMap;function Me(e,t,n){let r=Nn.get(e);return r?t in r||(r[t]=n()):(r={[t]:n()},Nn.set(e,r)),r[t]}var ho={},Ge=e=>typeof e=="string"?{type:e}:typeof e=="function"?"resolve"in e?{type:e.type}:{type:e.name}:e,it=class e{constructor(t,n){if(this.config=t,this.key=void 0,this.id=void 0,this.type=void 0,this.path=void 0,this.states=void 0,this.history=void 0,this.entry=void 0,this.exit=void 0,this.parent=void 0,this.machine=void 0,this.meta=void 0,this.output=void 0,this.order=-1,this.description=void 0,this.tags=[],this.transitions=void 0,this.always=void 0,this.parent=n._parent,this.key=n._key,this.machine=n._machine,this.path=this.parent?this.parent.path.concat(this.key):[],this.id=this.config.id||[this.machine.id,...this.path].join(Ct),this.type=this.config.type||(this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.description=this.config.description,this.order=this.machine.idMap.size,this.machine.idMap.set(this.id,this),this.states=this.config.states?Mt(this.config.states,(r,o)=>new e(r,{_parent:this,_key:o,_machine:this.machine})):ho,this.type==="compound"&&!this.config.initial)throw new Error(`No initial state specified for compound state node "#${this.id}". Try adding { initial: "${Object.keys(this.states)[0]}" } to the state config.`);this.history=this.config.history===true?"shallow":this.config.history||false,this.entry=se(this.config.entry).slice(),this.exit=se(this.config.exit).slice(),this.meta=this.config.meta,this.output=this.type==="final"||!this.parent?this.config.output:void 0,this.tags=se(t.tags).slice();}_initialize(){this.transitions=bn(this),this.config.always&&(this.always=be(this.config.always).map(t=>de(this,_t,t))),Object.keys(this.states).forEach(t=>{this.states[t]._initialize();});}get definition(){return {id:this.id,key:this.key,version:this.machine.version,type:this.type,initial:this.initial?{target:this.initial.target,source:this,actions:this.initial.actions.map(Ge),eventType:null,reenter:false,toJSON:()=>({target:this.initial.target.map(t=>`#${t.id}`),source:`#${this.id}`,actions:this.initial.actions.map(Ge),eventType:null})}:void 0,history:this.history,states:Mt(this.states,t=>t.definition),on:this.on,transitions:[...this.transitions.values()].flat().map(t=>({...t,actions:t.actions.map(Ge)})),entry:this.entry.map(Ge),exit:this.exit.map(Ge),meta:this.meta,order:this.order||-1,output:this.output,invoke:this.invoke,description:this.description,tags:this.tags}}toJSON(){return this.definition}get invoke(){return Me(this,"invoke",()=>se(this.config.invoke).map((t,n)=>{let{src:r,systemId:o}=t,s=t.id??kt(this.id,n),l=typeof r=="string"?r:`xstate.invoke.${kt(this.id,n)}`;return {...t,src:l,id:s,systemId:o,toJSON(){let{onDone:c,onError:f,...g}=t;return {...g,type:"xstate.invoke",src:l,id:s}}}}))}get on(){return Me(this,"on",()=>[...this.transitions].flatMap(([n,r])=>r.map(o=>[n,o])).reduce((n,[r,o])=>(n[r]=n[r]||[],n[r].push(o),n),{}))}get after(){return Me(this,"delayedTransitions",()=>gn(this))}get initial(){return Me(this,"initial",()=>yn(this,this.config.initial))}next(t,n){let r=n.type,o=[],s,l=Me(this,`candidates-${r}`,()=>mn(this,r));for(let c of l){let{guard:f}=c,g=t.context,S=false;try{S=!f||Ne(f,g,n,t);}catch(v){let m=typeof f=="string"?f:typeof f=="object"?f.type:void 0;throw new Error(`Unable to evaluate guard ${m?`'${m}' `:""}in transition for event '${r}' in state node '${this.id}':
|
|
3
|
-
${v.message}`)}if(S){o.push(...c.actions),s=c;break}}return s?[s]:void 0}get events(){return Me(this,"events",()=>{let{states:t}=this,n=new Set(this.ownEvents);if(t)for(let r of Object.keys(t)){let o=t[r];if(o.states)for(let s of o.events)n.add(`${s}`);}return Array.from(n)})}get ownEvents(){let t=Object.keys(Object.fromEntries(this.transitions)),n=new Set(t.filter(r=>this.transitions.get(r).some(o=>!(!o.target&&!o.actions.length&&!o.reenter))));return Array.from(n)}},mo="#",st=class e{constructor(t,n){this.config=t,this.version=void 0,this.schemas=void 0,this.implementations=void 0,this.__xstatenode=true,this.idMap=new Map,this.root=void 0,this.id=void 0,this.states=void 0,this.events=void 0,this.id=t.id||"(machine)",this.implementations={actors:n?.actors??{},actions:n?.actions??{},delays:n?.delays??{},guards:n?.guards??{}},this.version=this.config.version,this.schemas=this.config.schemas,this.transition=this.transition.bind(this),this.getInitialSnapshot=this.getInitialSnapshot.bind(this),this.getPersistedSnapshot=this.getPersistedSnapshot.bind(this),this.restoreSnapshot=this.restoreSnapshot.bind(this),this.start=this.start.bind(this),this.root=new it(t,{_key:this.id,_machine:this}),this.root._initialize(),this.states=this.root.states,this.events=this.root.events;}provide(t){let{actions:n,guards:r,actors:o,delays:s}=this.implementations;return new e(this.config,{actions:{...n,...t.actions},guards:{...r,...t.guards},actors:{...o,...t.actors},delays:{...s,...t.delays}})}resolveState(t){let n=Tn(this.root,t.value),r=Fe(Ue(this.root,n));return je({_nodes:[...r],context:t.context||{},children:{},status:nt(r,this.root)?"done":t.status||"active",output:t.output,error:t.error,historyValue:t.historyValue},this)}transition(t,n,r){return ot(t,n,r,[]).snapshot}microstep(t,n,r){return ot(t,n,r,[]).microstates}getTransitionData(t,n){return rt(this.root,t.value,t,n)||[]}getPreInitialState(t,n,r){let{context:o}=this.config,s=je({context:typeof o!="function"&&o?o:{},_nodes:[this.root],children:{},status:"active"},this);return typeof o=="function"?ve(s,n,t,[O(({spawn:c,event:f,self:g})=>o({spawn:c,input:f.input,self:g}))],r,void 0):s}getInitialSnapshot(t,n){let r=Nt(n),o=[],s=this.getPreInitialState(t,r,o),l=Qe([{target:[...It(this.root)],source:this.root,reenter:true,actions:[],eventType:null,toJSON:null}],s,t,r,true,o),{snapshot:c}=ot(l,r,t,o);return c}start(t){Object.values(t.children).forEach(n=>{n.getSnapshot().status==="active"&&n.start();});}getStateNodeById(t){let n=et(t),r=n.slice(1),o=ze(n[0])?n[0].slice(mo.length):n[0],s=this.idMap.get(o);if(!s)throw new Error(`Child state node '#${o}' does not exist on machine '${this.id}'`);return De(s,r)}get definition(){return this.root.definition}toJSON(){return this.definition}getPersistedSnapshot(t,n){return Cn(t,n)}restoreSnapshot(t,n){let r={},o=t.children;Object.keys(o).forEach(v=>{let m=o[v],x=m.snapshot,A=m.src,L=typeof A=="string"?Re(this,A):A;if(!L)return;let P=we(L,{id:v,parent:n.self,syncSnapshot:m.syncSnapshot,snapshot:x,src:A,systemId:m.systemId});r[v]=P;});function s(v,m){if(m instanceof it)return m;try{return v.machine.getStateNodeById(m.id)}catch{}}function l(v,m){if(!m||typeof m!="object")return {};let x={};for(let A in m){let L=m[A];for(let P of L){let G=s(v,P);G&&(x[A]??=[],x[A].push(G));}}return x}let c=l(this.root,t.historyValue),f=je({...t,children:r,_nodes:Array.from(Fe(Ue(this.root,t.value))),historyValue:c},this),g=new Set;function S(v,m){if(!g.has(v)){g.add(v);for(let x in v){let A=v[x];if(A&&typeof A=="object"){if("xstate$$type"in A&&A.xstate$$type===tt){v[x]=m[A.id];continue}S(A,m);}}}}return S(f.context,r),f}};function go(e,t,n,r,{event:o}){let s=typeof o=="function"?o(n,r):o;return [t,{event:s},void 0]}function bo(e,{event:t}){e.defer(()=>e.emit(t));}function Dt(e){function t(n,r){}return t.type="xstate.emit",t.event=e,t.resolve=go,t.execute=bo,t}var Pt=(function(e){return e.Parent="#_parent",e.Internal="#_internal",e})({});function yo(e,t,n,r,{to:o,event:s,id:l,delay:c},f){let g=t.machine.implementations.delays;if(typeof s=="string")throw new Error(`Only event objects may be used with sendTo; use sendTo({ type: "${s}" }) instead`);let S=typeof s=="function"?s(n,r):s,v;if(typeof c=="string"){let A=g&&g[c];v=typeof A=="function"?A(n,r):A;}else v=typeof c=="function"?c(n,r):c;let m=typeof o=="function"?o(n,r):o,x;if(typeof m=="string"){if(m===Pt.Parent?x=e.self._parent:m===Pt.Internal?x=e.self:m.startsWith("#_")?x=t.children[m.slice(2)]:x=f.deferredActorIds?.includes(m)?m:t.children[m],!x)throw new Error(`Unable to send event to actor '${m}' from machine '${t.machine.id}'.`)}else x=m||e.self;return [t,{to:x,targetId:typeof m=="string"?m:void 0,event:S,id:l,delay:v},void 0]}function vo(e,t,n){typeof n.to=="string"&&(n.to=t.children[n.to]);}function wo(e,t){e.defer(()=>{let{to:n,event:r,delay:o,id:s}=t;if(typeof o=="number"){e.system.scheduler.schedule(e.self,n,r,o,s);return}e.system._relay(e.self,n,r.type===sn?At(e.self.id,r.data):r);});}function at(e,t,n){function r(o,s){}return r.type="xstate.sendTo",r.to=e,r.event=t,r.id=n?.id,r.delay=n?.delay,r.resolve=yo,r.retryResolve=vo,r.execute=wo,r}function xo(e,t){return at(Pt.Parent,e,t)}function Eo(e,t,n,r,{collect:o}){let s=[],l=function(f){s.push(f);};return l.assign=(...c)=>{s.push(O(...c));},l.cancel=(...c)=>{s.push($e(...c));},l.raise=(...c)=>{s.push(Ve(...c));},l.sendTo=(...c)=>{s.push(at(...c));},l.sendParent=(...c)=>{s.push(xo(...c));},l.spawnChild=(...c)=>{s.push(He(...c));},l.stopChild=(...c)=>{s.push(Ae(...c));},l.emit=(...c)=>{s.push(Dt(...c));},o({context:n.context,event:n.event,enqueue:l,check:c=>Ne(c,t.context,n.event,t),self:e.self,system:e.system},r),[t,void 0,s]}function Mn(e){function t(n,r){}return t.type="xstate.enqueueActions",t.collect=e,t.resolve=Eo,t}function So(e,t,n,r,{value:o,label:s}){return [t,{value:typeof o=="function"?o(n,r):o,label:s},void 0]}function To({logger:e},{value:t,label:n}){n?e(n,t):e(t);}function kn(e=({context:n,event:r})=>({context:n,event:r}),t){function n(r,o){}return n.type="xstate.log",n.value=e,n.label=t,n.resolve=So,n.execute=To,n}function Co(e,t){return new st(e,t)}function Rt({schemas:e,actors:t,actions:n,guards:r,delays:o}){return {assign:O,sendTo:at,raise:Ve,log:kn,cancel:$e,stopChild:Ae,enqueueActions:Mn,emit:Dt,spawnChild:He,createStateConfig:s=>s,createAction:s=>s,createMachine:s=>Co({...s,schemas:e},{actors:t,actions:n,guards:r,delays:o}),extend:s=>Rt({schemas:e,actors:t,actions:{...n,...s.actions},guards:{...r,...s.guards},delays:{...o,...s.delays}})}}var _o=(e,t)=>e===t,Ln={equals:_o},Ao=qn,Ie=1,ut=2;var ct=null,ke=null,In=null,X=null,J=null,xe=null,ft=0;function No(e,t){t=t?Object.assign({},Ln,t):Ln;let n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=o=>(typeof o=="function"&&(o=o(n.value)),Gn(n,o));return [ko.bind(n),r]}function Mo(e){if(X===null)return e();let t=X;X=null;try{return In?In.untrack(e):e()}finally{X=t;}}No(false);function ko(){let e=ke;if(this.sources&&this.state)if(this.state===Ie)Kn(this);else {let t=J;J=null,ht(()=>dt(this)),J=t;}if(X){let t=this.observers?this.observers.length:0;X.sources?(X.sources.push(this),X.sourceSlots.push(t)):(X.sources=[this],X.sourceSlots=[t]),this.observers?(this.observers.push(X),this.observerSlots.push(X.sources.length-1)):(this.observers=[X],this.observerSlots=[X.sources.length-1]);}return e&&ke.sources.has(this)?this.tValue:this.value}function Gn(e,t,n){let r=e.value;return (!e.comparator||!e.comparator(r,t))&&(e.value=t,e.observers&&e.observers.length&&ht(()=>{for(let o=0;o<e.observers.length;o+=1){let s=e.observers[o],l=ke&&ke.running;l&&ke.disposed.has(s)||((l?!s.tState:!s.state)&&(s.pure?J.push(s):xe.push(s),s.observers&&Yn(s)),l?s.tState=Ie:s.state=Ie);}if(J.length>1e6)throw J=[],new Error})),t}function Kn(e){if(!e.fn)return;pt(e);let t=ft;Lo(e,e.value,t);}function Lo(e,t,n){let r,o=ct,s=X;X=ct=e;try{r=e.fn(t);}catch(l){return e.pure&&(e.state=Ie,e.owned&&e.owned.forEach(pt),e.owned=null),e.updatedAt=n+1,Xn(l)}finally{X=s,ct=o;}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?Gn(e,r):e.value=r,e.updatedAt=n);}function Wn(e){if(e.state===0)return;if(e.state===ut)return dt(e);if(e.suspense&&Mo(e.suspense.inFallback))return e.suspense.effects.push(e);let n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<ft);)e.state&&n.push(e);for(let r=n.length-1;r>=0;r--)if(e=n[r],e.state===Ie)Kn(e);else if(e.state===ut){let o=J;J=null,ht(()=>dt(e,n[0])),J=o;}}function ht(e,t){if(J)return e();let n=false;(J=[]),xe?n=true:xe=[],ft++;try{let r=e();return Io(n),r}catch(r){n||(xe=null),J=null,Xn(r);}}function Io(e){if(J&&(qn(J),J=null),e)return;let t=xe;xe=null,t.length&&ht(()=>Ao(t));}function qn(e){for(let t=0;t<e.length;t++)Wn(e[t]);}function dt(e,t){e.state=0;for(let n=0;n<e.sources.length;n+=1){let r=e.sources[n];if(r.sources){let o=r.state;o===Ie?r!==t&&(!r.updatedAt||r.updatedAt<ft)&&Wn(r):o===ut&&dt(r,t);}}}function Yn(e){for(let t=0;t<e.observers.length;t+=1){let n=e.observers[t];!n.state&&(n.state=ut,n.pure?J.push(n):xe.push(n),n.observers&&Yn(n));}}function pt(e){let t;if(e.sources)for(;e.sources.length;){let n=e.sources.pop(),r=e.sourceSlots.pop(),o=n.observers;if(o&&o.length){let s=o.pop(),l=n.observerSlots.pop();r<o.length&&(s.sourceSlots[l]=r,o[r]=s,n.observerSlots[r]=l);}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)pt(e.tOwned[t]);delete e.tOwned;}if(e.owned){for(t=e.owned.length-1;t>=0;t--)pt(e.owned[t]);e.owned=null;}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null;}e.state=0;}function Oo(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function Xn(e,t=ct){throw Oo(e)}var On="_$DX_DELEGATE";function K(e,t,n,r){let o,s=()=>{let c=document.createElement("template");return c.innerHTML=e,c.content.firstChild},l=()=>(o||(o=s())).cloneNode(true);return l.cloneNode=l,l}function Ee(e,t=window.document){let n=t[On]||(t[On]=new Set);for(let r=0,o=e.length;r<o;r++){let s=e[r];n.has(s)||(n.add(s),t.addEventListener(s,Po));}}function Po(e){let t=e.target,n=`$$${e.type}`,r=e.target,o=e.currentTarget,s=f=>Object.defineProperty(e,"target",{configurable:true,value:f}),l=()=>{let f=t[n];if(f&&!t.disabled){let g=t[`${n}Data`];if(g!==void 0?f.call(t,g,e):f.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&s(t.host),true},c=()=>{for(;l()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:true,get(){return t||document}}),e.composedPath){let f=e.composedPath();s(f[0]);for(let g=0;g<f.length-2&&(t=f[g],!!l());g++){if(t._$host){t=t._$host,c();break}if(t.parentNode===o)break}}else c();s(r);}var Do="0.0.97";var Ro=e=>typeof e=="number"&&!Number.isNaN(e)&&Number.isFinite(e),$o=e=>{let t=e.trim();if(!t)return null;let n=parseFloat(t);return Ro(n)?n:null},Pn=(e,t)=>{let n=e.split(",");if(n.length!==t)return null;let r=[];for(let o of n){let s=$o(o);if(s===null)return null;r.push(s);}return r},Zn=(e,t,n,r)=>e===1&&t===0&&n===0&&r===1,Ho=e=>e[0]===1&&e[1]===0&&e[2]===0&&e[3]===0&&e[4]===0&&e[5]===1&&e[6]===0&&e[7]===0&&e[8]===0&&e[9]===0&&e[10]===1&&e[11]===0&&e[15]===1,Bo=e=>{if(!e||e==="none")return "none";if(e.charCodeAt(0)===109)if(e.charCodeAt(6)===51){let t=e.length-1,n=Pn(e.slice(9,t),16);if(n)return n[12]=0,n[13]=0,n[14]=0,Ho(n)?"none":`matrix3d(${n[0]}, ${n[1]}, ${n[2]}, ${n[3]}, ${n[4]}, ${n[5]}, ${n[6]}, ${n[7]}, ${n[8]}, ${n[9]}, ${n[10]}, ${n[11]}, 0, 0, 0, ${n[15]})`}else {let t=e.length-1,n=Pn(e.slice(7,t),6);if(n){let r=n[0],o=n[1],s=n[2],l=n[3];return Zn(r,o,s,l)?"none":`matrix(${r}, ${o}, ${s}, ${l}, 0, 0)`}}return "none"},Fo=e=>e.isIdentity?"none":e.is2D?Zn(e.a,e.b,e.c,e.d)?"none":`matrix(${e.a}, ${e.b}, ${e.c}, ${e.d}, 0, 0)`:e.m11===1&&e.m12===0&&e.m13===0&&e.m14===0&&e.m21===0&&e.m22===1&&e.m23===0&&e.m24===0&&e.m31===0&&e.m32===0&&e.m33===1&&e.m34===0&&e.m44===1?"none":`matrix3d(${e.m11}, ${e.m12}, ${e.m13}, ${e.m14}, ${e.m21}, ${e.m22}, ${e.m23}, ${e.m24}, ${e.m31}, ${e.m32}, ${e.m33}, ${e.m34}, 0, 0, 0, ${e.m44})`,zo=6,Uo=3,jo=(e,t)=>{let n=t&&t!=="none",r=null,o=e.parentElement,s=0;for(;o&&o!==document.documentElement&&s<zo;){let l=window.getComputedStyle(o).transform;if(l&&l!=="none")r=r?new DOMMatrix(l).multiply(r):new DOMMatrix(l);else if(!n&&!r&&s>=Uo)return "none";o=o.parentElement,s++;}return r?(n&&(r=r.multiply(new DOMMatrix(t))),Fo(r)):n?Bo(t):"none"},$t=e=>{let t=e.getBoundingClientRect(),n=window.getComputedStyle(e),r=jo(e,n.transform);if(r!=="none"&&e instanceof HTMLElement){let o=e.offsetWidth,s=e.offsetHeight;if(o>0&&s>0){let l=t.left+t.width*.5,c=t.top+t.height*.5;return {borderRadius:n.borderRadius||"0px",height:s,transform:r,width:o,x:l-o*.5,y:c-s*.5}}}return {borderRadius:n.borderRadius||"0px",height:t.height,transform:r,width:t.width,x:t.left,y:t.top}},Vo=e=>({isToggleMode:false,hasAgentProvider:false,keyHoldDuration:200,mousePosition:{x:-1e3,y:-1e3},dragStart:{x:-1e3,y:-1e3},copyStart:{x:-1e3,y:-1e3},copyOffsetFromCenterX:0,detectedElement:null,frozenElement:null,frozenElements:[],lastGrabbedElement:null,lastCopiedElement:null,selectionFilePath:null,selectionLineNumber:null,inputText:"",pendingClickData:null,replySessionId:null,viewportVersion:0,grabbedBoxes:[],labelInstances:[],agentSessions:new Map,sessionElements:new Map,abortControllers:new Map,isTouchMode:false,theme:e,activationTimestamp:null,previouslyFocusedElement:null,canUndo:false,canRedo:false,isAgentConnected:false,supportsUndo:false,supportsFollowUp:false,dismissButtonText:void 0,pendingAbortSessionId:null}),Go=({context:e})=>e.hasAgentProvider,Ko=({context:e})=>e.frozenElement!==null||e.detectedElement!==null,Wo=({context:e})=>e.inputText.trim().length>0,qo=({context:e})=>e.isToggleMode,Yo=({context:e})=>e.pendingClickData!==null,Xo=({context:e})=>Array.from(e.agentSessions.values()).some(t=>t.isStreaming),Zo=({context:e})=>e.lastCopiedElement!==null&&document.contains(e.lastCopiedElement);Rt({delays:{KEY_HOLD_DURATION:({context:e})=>e.keyHoldDuration,DOUBLE_CLICK_THRESHOLD:250,SUCCESS_LABEL_DURATION:1700,COPIED_LABEL_DURATION:1500},guards:{hasAgentProvider:Go,hasElement:Ko,hasInputText:Wo,isToggleMode:qo,hasPendingClick:Yo,isAgentStreaming:Xo,hasLastCopiedElement:Zo},actions:{setMousePosition:O({mousePosition:({event:e})=>e.type==="MOUSE_MOVE"?e.position:{x:-1e3,y:-1e3}}),setDetectedElement:O({detectedElement:({event:e})=>e.type==="ELEMENT_DETECTED"?e.element:null}),setFrozenElement:O({frozenElement:({event:e})=>e.type==="FREEZE_ELEMENT"?e.element:null,frozenElements:({event:e})=>e.type==="FREEZE_ELEMENT"?[e.element]:[]}),setFrozenElements:O({frozenElements:({event:e})=>e.type==="FREEZE_ELEMENTS"?e.elements:[],frozenElement:({event:e})=>e.type==="FREEZE_ELEMENTS"&&e.elements.length>0?e.elements[0]:null}),clearFrozenElement:O({frozenElement:()=>null,frozenElements:()=>[]}),setDragStart:O({dragStart:({event:e})=>e.type==="DRAG_START"?{x:e.position.x+window.scrollX,y:e.position.y+window.scrollY}:{x:-1e3,y:-1e3}}),resetDragStart:O({dragStart:()=>({x:-1e3,y:-1e3})}),setCopyStart:O({copyStart:({event:e})=>e.type==="SET_COPY_START"?e.position:{x:-1e3,y:-1e3},copyOffsetFromCenterX:({event:e})=>{if(e.type==="SET_COPY_START"&&e.element){let t=$t(e.element),n=t.x+t.width/2;return e.position.x-n}return 0}}),setInputText:O({inputText:({event:e})=>e.type==="INPUT_CHANGE"?e.value:""}),clearInputText:O({inputText:()=>""}),enableToggleMode:O({isToggleMode:()=>true}),disableToggleMode:O({isToggleMode:()=>false}),setToggleMode:O({isToggleMode:({event:e})=>e.type==="SET_TOGGLE_MODE"?e.value:false}),setLastGrabbedElement:O({lastGrabbedElement:({event:e})=>e.type==="SET_LAST_GRABBED"?e.element:null}),setLastCopiedElement:O({lastCopiedElement:({event:e})=>e.type==="SET_LAST_COPIED"||e.type==="COPY_DONE"?e.element??null:null}),clearLastCopiedElement:O({lastCopiedElement:()=>null}),incrementViewportVersion:O({viewportVersion:({context:e})=>e.viewportVersion+1}),addGrabbedBox:O({grabbedBoxes:({context:e,event:t})=>t.type==="ADD_GRABBED_BOX"?[...e.grabbedBoxes,t.box]:e.grabbedBoxes}),removeGrabbedBox:O({grabbedBoxes:({context:e,event:t})=>t.type==="REMOVE_GRABBED_BOX"?e.grabbedBoxes.filter(n=>n.id!==t.boxId):e.grabbedBoxes}),clearGrabbedBoxes:O({grabbedBoxes:()=>[]}),addLabelInstance:O({labelInstances:({context:e,event:t})=>t.type==="ADD_LABEL_INSTANCE"?[...e.labelInstances,t.instance]:e.labelInstances}),updateLabelInstance:O({labelInstances:({context:e,event:t})=>t.type==="UPDATE_LABEL_INSTANCE"?e.labelInstances.map(n=>n.id===t.instanceId?{...n,status:t.status}:n):e.labelInstances}),removeLabelInstance:O({labelInstances:({context:e,event:t})=>t.type==="REMOVE_LABEL_INSTANCE"?e.labelInstances.filter(n=>n.id!==t.instanceId):e.labelInstances}),clearLabelInstances:O({labelInstances:()=>[]}),setTouchMode:O({isTouchMode:({event:e})=>e.type==="SET_TOUCH_MODE"?e.value:false}),setSelectionSource:O({selectionFilePath:({event:e})=>e.type==="SET_SELECTION_SOURCE"?e.filePath:null,selectionLineNumber:({event:e})=>e.type==="SET_SELECTION_SOURCE"?e.lineNumber:null}),clearSelectionSource:O({selectionFilePath:()=>null,selectionLineNumber:()=>null}),setPendingClickData:O({pendingClickData:({event:e})=>e.type==="SET_PENDING_CLICK"?e.data:null}),clearPendingClickData:O({pendingClickData:()=>null}),setReplySessionId:O({replySessionId:({event:e})=>e.type==="SET_REPLY_SESSION"?e.sessionId:null}),clearReplySessionId:O({replySessionId:()=>null}),addAgentSession:O({agentSessions:({context:e,event:t})=>{if(t.type!=="SESSION_START")return e.agentSessions;let n=new Map(e.agentSessions);return n.set(t.sessionId,t.session),n}}),setSessionElement:O({sessionElements:({context:e,event:t})=>{if(t.type!=="SESSION_START")return e.sessionElements;let n=new Map(e.sessionElements);return n.set(t.sessionId,t.element),n}}),updateAgentSessionStatus:O({agentSessions:({context:e,event:t})=>{if(t.type!=="STREAM_STATUS")return e.agentSessions;let n=e.agentSessions.get(t.sessionId);if(!n)return e.agentSessions;let r=new Map(e.agentSessions);return r.set(t.sessionId,{...n,lastStatus:t.status}),r}}),completeAgentSession:O({agentSessions:({context:e,event:t})=>{if(t.type!=="STREAM_DONE")return e.agentSessions;let n=e.agentSessions.get(t.sessionId);if(!n)return e.agentSessions;let r=new Map(e.agentSessions);return r.set(t.sessionId,{...n,isStreaming:false,lastStatus:t.status??n.lastStatus}),r}}),setAgentSessionError:O({agentSessions:({context:e,event:t})=>{if(t.type!=="STREAM_ERROR")return e.agentSessions;let n=e.agentSessions.get(t.sessionId);if(!n)return e.agentSessions;let r=new Map(e.agentSessions);return r.set(t.sessionId,{...n,isStreaming:false,error:t.error}),r}}),removeAgentSession:O({agentSessions:({context:e,event:t})=>{if(t.type!=="SESSION_DISMISS"&&t.type!=="ERROR_ACKNOWLEDGE")return e.agentSessions;let n=new Map(e.agentSessions);return n.delete(t.sessionId),n},sessionElements:({context:e,event:t})=>{if(t.type!=="SESSION_DISMISS"&&t.type!=="ERROR_ACKNOWLEDGE")return e.sessionElements;let n=new Map(e.sessionElements);return n.delete(t.sessionId),n}}),storeActivationTimestamp:O({activationTimestamp:()=>Date.now(),previouslyFocusedElement:()=>document.activeElement}),clearActivationTimestamp:O({activationTimestamp:()=>null,previouslyFocusedElement:()=>null}),setKeyHoldDuration:O({keyHoldDuration:({event:e,context:t})=>e.type==="HOLD_START"&&e.duration!==void 0?e.duration:t.keyHoldDuration}),setHasAgentProvider:O({hasAgentProvider:({event:e})=>e.type==="SET_HAS_AGENT_PROVIDER"?e.value:false}),setUndoRedoState:O({canUndo:({event:e})=>e.type==="SET_UNDO_REDO_STATE"?e.canUndo:false,canRedo:({event:e})=>e.type==="SET_UNDO_REDO_STATE"?e.canRedo:false}),setAgentCapabilities:O({supportsUndo:({event:e})=>e.type==="SET_AGENT_CAPABILITIES"?e.supportsUndo:false,supportsFollowUp:({event:e})=>e.type==="SET_AGENT_CAPABILITIES"?e.supportsFollowUp:false,dismissButtonText:({event:e})=>e.type==="SET_AGENT_CAPABILITIES"?e.dismissButtonText:void 0,isAgentConnected:({event:e})=>e.type==="SET_AGENT_CAPABILITIES"?e.isAgentConnected:false}),setPendingAbortSessionId:O({pendingAbortSessionId:({event:e})=>e.type==="SET_PENDING_ABORT_SESSION"?e.sessionId:null}),resetActivationState:O({isToggleMode:()=>false,inputText:()=>"",frozenElement:()=>null,frozenElements:()=>[],pendingClickData:()=>null,activationTimestamp:()=>null}),updateSessionBounds:O({agentSessions:({context:e})=>{if(e.agentSessions.size===0)return e.agentSessions;let t=new Map(e.agentSessions),n=false;for(let[r,o]of e.agentSessions){let s=e.sessionElements.get(r);if(s&&document.contains(s)){let l=$t(s),c=o.selectionBounds[0],f=o.position;if(c){let g=c.x+c.width/2,S=o.position.x-g,v=l.x+l.width/2;f={...o.position,x:v+S};}t.set(r,{...o,selectionBounds:[l],position:f}),n=true;}}return n?t:e.agentSessions}}),freezeCurrentElement:O({frozenElement:({context:e})=>e.frozenElement??e.detectedElement}),saveInputModePosition:O({copyStart:({event:e,context:t})=>e.type==="INPUT_MODE_ENTER"?e.position:t.copyStart,copyOffsetFromCenterX:({event:e})=>{if(e.type==="INPUT_MODE_ENTER"&&e.element){let t=$t(e.element),n=t.x+t.width/2;return e.position.x-n}return 0},mousePosition:({event:e,context:t})=>e.type==="INPUT_MODE_ENTER"?e.position:t.mousePosition,frozenElement:({event:e,context:t})=>e.type==="INPUT_MODE_ENTER"?e.element:t.frozenElement})}}).createMachine({id:"grabMachine",type:"parallel",context:({input:e})=>({...Vo(e.theme),hasAgentProvider:e.hasAgentProvider,keyHoldDuration:e.keyHoldDuration}),states:{activation:{initial:"idle",states:{idle:{on:{HOLD_START:{target:"holding",actions:["setKeyHoldDuration"]},ACTIVATE:{target:"active",actions:["enableToggleMode","storeActivationTimestamp"]}}},holding:{after:{KEY_HOLD_DURATION:{target:"active",actions:["storeActivationTimestamp"]}},on:{RELEASE:{target:"idle"},ACTIVATE:{target:"active",actions:["enableToggleMode","storeActivationTimestamp"]}}},active:{initial:"hovering",states:{hovering:{on:{FREEZE:{target:"frozen",actions:["freezeCurrentElement"]},DRAG_START:{target:"dragging",actions:["setDragStart"]}}},frozen:{on:{UNFREEZE:{target:"hovering",actions:["clearFrozenElement"]},DRAG_START:{target:"dragging",actions:["setDragStart"]}}},dragging:{on:{DRAG_END:{target:"justDragged",actions:["resetDragStart"]},DRAG_CANCEL:{target:"hovering",actions:["resetDragStart"]}}},justDragged:{on:{DRAG_START:{target:"dragging",actions:["setDragStart"]}},after:{SUCCESS_LABEL_DURATION:{target:"hovering"}}}},on:{DEACTIVATE:{target:"idle",actions:["resetActivationState","clearActivationTimestamp"]},MOUSE_MOVE:{actions:["setMousePosition"]},ELEMENT_DETECTED:{actions:["setDetectedElement"]},SET_TOUCH_MODE:{actions:["setTouchMode"]},SET_SELECTION_SOURCE:{actions:["setSelectionSource"]}}}},on:{TOGGLE:[{guard:({context:e})=>e.activationTimestamp!==null,target:".idle",actions:["resetActivationState","clearActivationTimestamp"]},{target:".active",actions:["enableToggleMode","storeActivationTimestamp"]}],VIEWPORT_CHANGE:{actions:["incrementViewportVersion","updateSessionBounds"]},ADD_GRABBED_BOX:{actions:["addGrabbedBox"]},REMOVE_GRABBED_BOX:{actions:["removeGrabbedBox"]},CLEAR_GRABBED_BOXES:{actions:["clearGrabbedBoxes"]},SET_LAST_GRABBED:{actions:["setLastGrabbedElement"]},SET_LAST_COPIED:{actions:["setLastCopiedElement"]},SET_HAS_AGENT_PROVIDER:{actions:["setHasAgentProvider"]},SET_UNDO_REDO_STATE:{actions:["setUndoRedoState"]},SET_AGENT_CAPABILITIES:{actions:["setAgentCapabilities"]},SET_TOGGLE_MODE:{actions:["setToggleMode"]},FREEZE_ELEMENT:{actions:["setFrozenElement"]},FREEZE_ELEMENTS:{actions:["setFrozenElements"]},SET_PENDING_ABORT_SESSION:{actions:["setPendingAbortSessionId"]}}},interaction:{initial:"idle",states:{idle:{on:{CLICK:{target:"awaitingDoubleClick",actions:["setPendingClickData"]},INPUT_MODE_ENTER:{target:"inputMode",actions:["saveInputModePosition","enableToggleMode"]},COPY_START:{target:"copying"}}},awaitingDoubleClick:{after:{DOUBLE_CLICK_THRESHOLD:{target:"copying"}},on:{DOUBLE_CLICK:{target:"inputMode",guard:"hasAgentProvider",actions:["clearPendingClickData","saveInputModePosition"]},CLICK:{target:"inputMode",guard:"hasAgentProvider",actions:["clearPendingClickData","saveInputModePosition"]}}},copying:{on:{COPY_DONE:{target:"justCopied",actions:["clearPendingClickData","setLastCopiedElement"]}}},justCopied:{after:{COPIED_LABEL_DURATION:{target:"idle"}}},inputMode:{initial:"typing",states:{typing:{on:{ESC:[{target:"confirmingDismiss",guard:"hasInputText"},{target:"#grabMachine.interaction.idle"}],INPUT_SUBMIT:{target:"#grabMachine.interaction.copying"}}},confirmingDismiss:{on:{CANCEL_DISMISS:{target:"typing"},CONFIRM_DISMISS:{target:"#grabMachine.interaction.idle",actions:["clearInputText","clearReplySessionId"]}}}},on:{INPUT_CHANGE:{actions:["setInputText"]},INPUT_CANCEL:{target:"idle",actions:["clearInputText","clearReplySessionId"]}}}},on:{ADD_LABEL_INSTANCE:{actions:["addLabelInstance"]},UPDATE_LABEL_INSTANCE:{actions:["updateLabelInstance"]},REMOVE_LABEL_INSTANCE:{actions:["removeLabelInstance"]},SET_COPY_START:{actions:["setCopyStart"]},SET_PENDING_CLICK:{actions:["setPendingClickData"]},SET_REPLY_SESSION:{actions:["setReplySessionId"]},DEACTIVATE:{target:".idle",actions:["clearInputText","clearReplySessionId","clearPendingClickData"]}}},agentSessions:{initial:"idle",states:{idle:{on:{SESSION_START:{target:"streaming",actions:["addAgentSession","setSessionElement"]}}},streaming:{on:{STREAM_STATUS:{actions:["updateAgentSessionStatus"]},STREAM_DONE:{target:"completed",actions:["completeAgentSession"]},STREAM_ERROR:{target:"error",actions:["setAgentSessionError"]},SESSION_ABORT:{target:"idle",actions:["removeAgentSession"]}}},completed:{on:{SESSION_DISMISS:{target:"idle",actions:["removeAgentSession"]},SESSION_START:{target:"streaming",actions:["addAgentSession","setSessionElement"]}}},error:{on:{ERROR_ACKNOWLEDGE:{target:"idle",actions:["removeAgentSession"]},SESSION_START:{target:"streaming",actions:["addAgentSession","setSessionElement"]}}}},on:{UPDATE_SESSION_BOUNDS:{actions:["updateSessionBounds"]}}}}});var Kt="-",Jo=e=>{let t=ei(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return {getClassGroupId:o=>{let s=o.split(Kt);return s[0]===""&&s.length!==1&&s.shift(),Jn(s,t)||Qo(o)},getConflictingClassGroupIds:(o,s)=>{let l=n[o]||[];return s&&r[o]?[...l,...r[o]]:l}}},Jn=(e,t)=>{if(e.length===0)return t.classGroupId;let n=e[0],r=t.nextPart.get(n),o=r?Jn(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;let s=e.join(Kt);return t.validators.find(({validator:l})=>l(s))?.classGroupId},Dn=/^\[(.+)\]$/,Qo=e=>{if(Dn.test(e)){let t=Dn.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return "arbitrary.."+n}},ei=e=>{let{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return ni(Object.entries(e.classGroups),n).forEach(([o,s])=>{zt(s,r,o,t);}),r},zt=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){let s=o===""?t:Rn(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(ti(o)){zt(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,l])=>{zt(l,Rn(t,s),n,r);});});},Rn=(e,t)=>{let n=e;return t.split(Kt).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r);}),n},ti=e=>e.isThemeGetter,ni=(e,t)=>t?e.map(([n,r])=>{let o=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([l,c])=>[t+l,c])):s);return [n,o]}):e,ri=e=>{if(e<1)return {get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map,o=(s,l)=>{n.set(s,l),t++,t>e&&(t=0,r=n,n=new Map);};return {get(s){let l=n.get(s);if(l!==void 0)return l;if((l=r.get(s))!==void 0)return o(s,l),l},set(s,l){n.has(s)?n.set(s,l):o(s,l);}}},Qn="!",oi=e=>{let{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],s=t.length,l=c=>{let f=[],g=0,S=0,v;for(let P=0;P<c.length;P++){let G=c[P];if(g===0){if(G===o&&(r||c.slice(P,P+s)===t)){f.push(c.slice(S,P)),S=P+s;continue}if(G==="/"){v=P;continue}}G==="["?g++:G==="]"&&g--;}let m=f.length===0?c:c.substring(S),x=m.startsWith(Qn),A=x?m.substring(1):m,L=v&&v>S?v-S:void 0;return {modifiers:f,hasImportantModifier:x,baseClassName:A,maybePostfixModifierPosition:L}};return n?c=>n({className:c,parseClassName:l}):l},ii=e=>{if(e.length<=1)return e;let t=[],n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r);}),t.push(...n.sort()),t},si=e=>({cache:ri(e.cacheSize),parseClassName:oi(e),...Jo(e)}),ai=/\s+/,li=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,s=[],l=e.trim().split(ai),c="";for(let f=l.length-1;f>=0;f-=1){let g=l[f],{modifiers:S,hasImportantModifier:v,baseClassName:m,maybePostfixModifierPosition:x}=n(g),A=!!x,L=r(A?m.substring(0,x):m);if(!L){if(!A){c=g+(c.length>0?" "+c:c);continue}if(L=r(m),!L){c=g+(c.length>0?" "+c:c);continue}A=false;}let P=ii(S).join(":"),G=v?P+Qn:P,W=G+L;if(s.includes(W))continue;s.push(W);let te=o(L,A);for(let ee=0;ee<te.length;++ee){let Z=te[ee];s.push(G+Z);}c=g+(c.length>0?" "+c:c);}return c};function ci(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=er(t))&&(r&&(r+=" "),r+=n);return r}var er=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=er(e[r]))&&(n&&(n+=" "),n+=t);return n};function ui(e,...t){let n,r,o,s=l;function l(f){let g=t.reduce((S,v)=>v(S),e());return n=si(g),r=n.cache.get,o=n.cache.set,s=c,c(f)}function c(f){let g=r(f);if(g)return g;let S=li(f,n);return o(f,S),S}return function(){return s(ci.apply(null,arguments))}}var q=e=>{let t=n=>n[e]||[];return t.isThemeGetter=true,t},tr=/^\[(?:([a-z-]+):)?(.+)\]$/i,di=/^\d+\/\d+$/,pi=new Set(["px","full","screen"]),fi=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,hi=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,mi=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,gi=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,bi=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ae=e=>Le(e)||pi.has(e)||di.test(e),he=e=>Oe(e,"length",Ci),Le=e=>!!e&&!Number.isNaN(Number(e)),Ht=e=>Oe(e,"number",Le),Ke=e=>!!e&&Number.isInteger(Number(e)),yi=e=>e.endsWith("%")&&Le(e.slice(0,-1)),F=e=>tr.test(e),me=e=>fi.test(e),vi=new Set(["length","size","percentage"]),wi=e=>Oe(e,vi,nr),xi=e=>Oe(e,"position",nr),Ei=new Set(["image","url"]),Si=e=>Oe(e,Ei,Ai),Ti=e=>Oe(e,"",_i),We=()=>true,Oe=(e,t,n)=>{let r=tr.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):false},Ci=e=>hi.test(e)&&!mi.test(e),nr=()=>false,_i=e=>gi.test(e),Ai=e=>bi.test(e),Ni=()=>{let e=q("colors"),t=q("spacing"),n=q("blur"),r=q("brightness"),o=q("borderColor"),s=q("borderRadius"),l=q("borderSpacing"),c=q("borderWidth"),f=q("contrast"),g=q("grayscale"),S=q("hueRotate"),v=q("invert"),m=q("gap"),x=q("gradientColorStops"),A=q("gradientColorStopPositions"),L=q("inset"),P=q("margin"),G=q("opacity"),W=q("padding"),te=q("saturate"),ee=q("scale"),Z=q("sepia"),ce=q("skew"),ue=q("space"),R=q("translate"),j=()=>["auto","contain","none"],H=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto",F,t],E=()=>[F,t],y=()=>["",ae,he],T=()=>["auto",Le,F],k=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],M=()=>["solid","dashed","dotted","double","none"],B=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],$=()=>["start","end","center","between","around","evenly","stretch"],V=()=>["","0",F],z=()=>["auto","avoid","all","avoid-page","page","left","right","column"],b=()=>[Le,F];return {cacheSize:500,separator:":",theme:{colors:[We],spacing:[ae,he],blur:["none","",me,F],brightness:b(),borderColor:[e],borderRadius:["none","","full",me,F],borderSpacing:E(),borderWidth:y(),contrast:b(),grayscale:V(),hueRotate:b(),invert:V(),gap:E(),gradientColorStops:[e],gradientColorStopPositions:[yi,he],inset:N(),margin:N(),opacity:b(),padding:E(),saturate:b(),scale:b(),sepia:V(),skew:b(),space:E(),translate:E()},classGroups:{aspect:[{aspect:["auto","square","video",F]}],container:["container"],columns:[{columns:[me]}],"break-after":[{"break-after":z()}],"break-before":[{"break-before":z()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...k(),F]}],overflow:[{overflow:H()}],"overflow-x":[{"overflow-x":H()}],"overflow-y":[{"overflow-y":H()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[L]}],"inset-x":[{"inset-x":[L]}],"inset-y":[{"inset-y":[L]}],start:[{start:[L]}],end:[{end:[L]}],top:[{top:[L]}],right:[{right:[L]}],bottom:[{bottom:[L]}],left:[{left:[L]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ke,F]}],basis:[{basis:N()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",F]}],grow:[{grow:V()}],shrink:[{shrink:V()}],order:[{order:["first","last","none",Ke,F]}],"grid-cols":[{"grid-cols":[We]}],"col-start-end":[{col:["auto",{span:["full",Ke,F]},F]}],"col-start":[{"col-start":T()}],"col-end":[{"col-end":T()}],"grid-rows":[{"grid-rows":[We]}],"row-start-end":[{row:["auto",{span:[Ke,F]},F]}],"row-start":[{"row-start":T()}],"row-end":[{"row-end":T()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",F]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",F]}],gap:[{gap:[m]}],"gap-x":[{"gap-x":[m]}],"gap-y":[{"gap-y":[m]}],"justify-content":[{justify:["normal",...$()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...$(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...$(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[W]}],px:[{px:[W]}],py:[{py:[W]}],ps:[{ps:[W]}],pe:[{pe:[W]}],pt:[{pt:[W]}],pr:[{pr:[W]}],pb:[{pb:[W]}],pl:[{pl:[W]}],m:[{m:[P]}],mx:[{mx:[P]}],my:[{my:[P]}],ms:[{ms:[P]}],me:[{me:[P]}],mt:[{mt:[P]}],mr:[{mr:[P]}],mb:[{mb:[P]}],ml:[{ml:[P]}],"space-x":[{"space-x":[ue]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[ue]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",F,t]}],"min-w":[{"min-w":[F,t,"min","max","fit"]}],"max-w":[{"max-w":[F,t,"none","full","min","max","fit","prose",{screen:[me]},me]}],h:[{h:[F,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[F,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[F,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[F,t,"auto","min","max","fit"]}],"font-size":[{text:["base",me,he]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ht]}],"font-family":[{font:[We]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",F]}],"line-clamp":[{"line-clamp":["none",Le,Ht]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ae,F]}],"list-image":[{"list-image":["none",F]}],"list-style-type":[{list:["none","disc","decimal",F]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[G]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[G]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...M(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ae,he]}],"underline-offset":[{"underline-offset":["auto",ae,F]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",F]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",F]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[G]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...k(),xi]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",wi]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Si]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[A]}],"gradient-via-pos":[{via:[A]}],"gradient-to-pos":[{to:[A]}],"gradient-from":[{from:[x]}],"gradient-via":[{via:[x]}],"gradient-to":[{to:[x]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[c]}],"border-w-x":[{"border-x":[c]}],"border-w-y":[{"border-y":[c]}],"border-w-s":[{"border-s":[c]}],"border-w-e":[{"border-e":[c]}],"border-w-t":[{"border-t":[c]}],"border-w-r":[{"border-r":[c]}],"border-w-b":[{"border-b":[c]}],"border-w-l":[{"border-l":[c]}],"border-opacity":[{"border-opacity":[G]}],"border-style":[{border:[...M(),"hidden"]}],"divide-x":[{"divide-x":[c]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[c]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[G]}],"divide-style":[{divide:M()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...M()]}],"outline-offset":[{"outline-offset":[ae,F]}],"outline-w":[{outline:[ae,he]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:y()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[G]}],"ring-offset-w":[{"ring-offset":[ae,he]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",me,Ti]}],"shadow-color":[{shadow:[We]}],opacity:[{opacity:[G]}],"mix-blend":[{"mix-blend":[...B(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":B()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[f]}],"drop-shadow":[{"drop-shadow":["","none",me,F]}],grayscale:[{grayscale:[g]}],"hue-rotate":[{"hue-rotate":[S]}],invert:[{invert:[v]}],saturate:[{saturate:[te]}],sepia:[{sepia:[Z]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[f]}],"backdrop-grayscale":[{"backdrop-grayscale":[g]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[S]}],"backdrop-invert":[{"backdrop-invert":[v]}],"backdrop-opacity":[{"backdrop-opacity":[G]}],"backdrop-saturate":[{"backdrop-saturate":[te]}],"backdrop-sepia":[{"backdrop-sepia":[Z]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",F]}],duration:[{duration:b()}],ease:[{ease:["linear","in","out","in-out",F]}],delay:[{delay:b()}],animate:[{animate:["none","spin","ping","pulse","bounce",F]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[ee]}],"scale-x":[{"scale-x":[ee]}],"scale-y":[{"scale-y":[ee]}],rotate:[{rotate:[Ke,F]}],"translate-x":[{"translate-x":[R]}],"translate-y":[{"translate-y":[R]}],"skew-x":[{"skew-x":[ce]}],"skew-y":[{"skew-y":[ce]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",F]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",F]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",F]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ae,he,Ht]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};ui(Ni);K("<div style=overflow:visible>");K("<canvas style=position:fixed;top:0;left:0;pointer-events:none;z-index:2147483645>");K('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 22 19"fill=none><path d="M6.76263 18.6626C7.48251 18.6626 7.95474 18.1682 7.95474 17.4895C7.95474 17.1207 7.80474 16.8576 7.58683 16.6361L5.3018 14.4137L2.84621 12.3589L2.44374 13.0037L5.92137 13.1622H17.9232C20.4842 13.1622 21.593 12.021 21.593 9.47237V3.66983C21.593 1.10875 20.4842 0 17.9232 0H12.5414C11.8179 0 11.3018 0.545895 11.3018 1.21695C11.3018 1.888 11.8179 2.43389 12.5414 2.43389H17.8424C18.7937 2.43389 19.1897 2.83653 19.1897 3.78784V9.35747C19.1897 10.3257 18.7937 10.7314 17.8424 10.7314H5.92137L2.44374 10.8832L2.84621 11.5281L5.3018 9.47993L7.58683 7.2606C7.80474 7.03914 7.95474 6.7693 7.95474 6.40049C7.95474 5.72854 7.48251 5.22747 6.76263 5.22747C6.46129 5.22747 6.12975 5.36905 5.89231 5.6096L0.376815 11.0425C0.134921 11.2777 0 11.6141 0 11.9452C0 12.2728 0.134921 12.6158 0.376815 12.848L5.89231 18.2871C6.12975 18.5276 6.46129 18.6626 6.76263 18.6626Z"fill=currentColor>');K('<div class="absolute w-0 h-0"style="border-left:8px solid transparent;border-right:8px solid transparent">');K('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2><path d="M12 6H6a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-6"></path><path d="M11 13l9-9"></path><path d="M15 4h5v5">');K("<div><span>");Ee(["click"]);K("<span class=text-black/50>");K('<div role=button><div class="text-[13px] leading-4 shrink-0 font-sans font-medium w-fit h-fit"><span class=text-black>');Ee(["click"]);K('<div class="[font-synthesis:none] contain-layout shrink-0 flex flex-col items-start px-2 py-[5px] w-auto h-fit self-stretch [border-top-width:0.5px] border-t-solid border-t-[#D9D9D9] antialiased rounded-t-none rounded-b-sm -mt-px">');K('<div class="contain-layout shrink-0 flex items-center justify-end gap-[5px] w-full h-fit"><button class="contain-layout shrink-0 flex items-center justify-center px-[3px] py-px rounded-sm bg-white [border-width:0.5px] border-solid border-[#B3B3B3] cursor-pointer transition-all hover:bg-[#F5F5F5] h-[17px]"><span class="text-black text-[13px] leading-3.5 font-sans font-medium">No</span></button><button class="contain-layout shrink-0 flex items-center justify-center gap-1 px-[3px] py-px rounded-sm bg-white [border-width:0.5px] border-solid border-[#7e0002] cursor-pointer transition-all hover:bg-[#FEF2F2] h-[17px]"><span class="text-[#B91C1C] text-[13px] leading-3.5 font-sans font-medium">Yes');K('<div class="contain-layout shrink-0 flex flex-col justify-center items-end gap-1 w-fit h-fit"><div class="contain-layout shrink-0 flex items-center gap-1 pt-1 px-1.5 w-full h-fit"><span class="text-black text-[13px] leading-4 shrink-0 font-sans font-medium w-fit h-fit">Discard?');Ee(["pointerdown","click"]);K('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none><path d="M17.65 6.35C16.2 4.9 14.21 4 12 4C7.58 4 4.01 7.58 4.01 12C4.01 16.42 7.58 20 12 20C15.73 20 18.84 17.45 19.73 14H17.65C16.83 16.33 14.61 18 12 18C8.69 18 6 15.31 6 12C6 8.69 8.69 6 12 6C13.66 6 15.14 6.69 16.22 7.78L13 11H20V4L17.65 6.35Z"fill=currentColor>');K('<div class="contain-layout shrink-0 flex items-center justify-end gap-[5px] w-full h-fit"><button class="contain-layout shrink-0 flex items-center justify-center gap-1 px-[3px] py-px rounded-sm bg-white [border-width:0.5px] border-solid border-[#B3B3B3] cursor-pointer transition-all hover:bg-[#F5F5F5] h-[17px]"><span class="text-black text-[13px] leading-3.5 font-sans font-medium">Retry</span></button><button class="contain-layout shrink-0 flex items-center justify-center gap-1 px-[3px] py-px rounded-sm bg-white [border-width:0.5px] border-solid border-[#B3B3B3] cursor-pointer transition-all hover:bg-[#F5F5F5] h-[17px]"><span class="text-black text-[13px] leading-3.5 font-sans font-medium">Ok');K('<div class="contain-layout shrink-0 flex flex-col justify-center items-end gap-1 w-fit h-fit max-w-[280px]"><div class="contain-layout shrink-0 flex items-center gap-1 pt-1 px-1.5 w-full h-fit"><span class="text-[#B91C1C] text-[13px] leading-4 font-sans font-medium">');Ee(["pointerdown","click"]);K('<button class="contain-layout shrink-0 flex items-center justify-center px-[3px] py-px rounded-sm bg-white [border-width:0.5px] border-solid border-[#7e0002] cursor-pointer transition-all hover:bg-[#FEF2F2] h-[17px]"><span class="text-[#B91C1C] text-[13px] leading-3.5 font-sans font-medium">Undo');K('<button class="contain-layout shrink-0 flex items-center justify-center gap-1 px-[3px] py-px rounded-sm bg-white [border-width:0.5px] border-solid border-[#B3B3B3] cursor-pointer transition-all hover:bg-[#F5F5F5] h-[17px]"><span class="text-black text-[13px] leading-3.5 font-sans font-medium">');K('<div class="contain-layout shrink-0 flex items-center justify-between gap-2 pt-1.5 pb-1 px-1.5 w-full h-fit"><span class="text-black text-[13px] leading-4 shrink-0 font-sans font-medium w-fit h-fit tabular-nums"></span><div class="contain-layout shrink-0 flex items-center gap-[5px] h-fit">');K('<div class="contain-layout shrink-0 flex items-center gap-1 pt-1.5 pb-1 px-1.5 w-full h-fit"><span class="text-black text-[13px] leading-4 shrink-0 font-sans font-medium w-fit h-fit tabular-nums">');K('<div class="shrink-0 flex justify-between items-end w-full min-h-4"><textarea data-react-grab-ignore-events class="text-black text-[13px] leading-4 font-medium bg-transparent border-none outline-none resize-none flex-1 p-0 m-0 wrap-break-word overflow-y-auto"rows=1 style=field-sizing:content;min-height:16px;max-height:95px;scrollbar-width:none></textarea><button class="contain-layout shrink-0 flex flex-col items-start px-[3px] py-[3px] rounded-sm bg-white [border-width:0.5px] border-solid border-[#B3B3B3] size-fit cursor-pointer transition-all hover:scale-105 ml-1">');K('<div class="[font-synthesis:none] contain-layout shrink-0 flex flex-col justify-center items-end rounded-sm bg-white antialiased w-fit h-fit max-w-[280px]">');Ee(["pointerdown","click","input","keydown"]);K('<button data-react-grab-ignore-events class="contain-layout shrink-0 flex flex-col items-start rounded-sm bg-white [border-width:0.5px] border-solid border-[#B3B3B3] p-1 size-fit cursor-pointer ml-1 transition-none hover:scale-105"><div data-react-grab-ignore-events class="shrink-0 w-[7px] h-[7px] rounded-[1px] bg-black pointer-events-none">');K('<div class="shrink-0 flex justify-between items-end w-full min-h-4"><textarea data-react-grab-ignore-events class="text-black text-[13px] leading-4 font-medium bg-transparent border-none outline-none resize-none flex-1 p-0 m-0 opacity-50 wrap-break-word overflow-y-auto"placeholder="type to edit"rows=1 disabled style=field-sizing:content;min-height:16px;max-height:95px;scrollbar-width:none>');K('<div class="contain-layout shrink-0 flex flex-col justify-center items-start gap-1 w-fit h-fit max-w-[280px]"><div class="contain-layout shrink-0 flex items-center gap-1 pt-1 px-1.5 w-auto h-fit"><div class="contain-layout flex items-center px-0 py-px w-auto h-fit rounded-sm gap-[3px]"><span class="text-[13px] leading-4 font-sans font-medium w-auto h-fit whitespace-normal text-[#71717a] animate-pulse tabular-nums">');K('<div class="contain-layout shrink-0 flex flex-col justify-center items-start gap-1 w-fit h-fit"><div class="contain-layout shrink-0 flex items-center gap-1 pt-1 w-fit h-fit pl-1.5 pr-1">');K('<div class="shrink-0 flex items-center gap-0.5 w-full mb-0.5 overflow-hidden"><span class="text-[#a1a1aa] text-[10px] leading-3 shrink-0">>previously:</span><span class="text-[#a1a1aa] text-[10px] leading-3 italic truncate whitespace-nowrap">');K('<div class="shrink-0 flex justify-between items-end w-full min-h-4"><textarea data-react-grab-ignore-events class="text-black text-[13px] leading-4 font-medium bg-transparent border-none outline-none resize-none flex-1 p-0 m-0 wrap-break-word overflow-y-auto"placeholder="type prompt"rows=1 style=field-sizing:content;min-height:16px;max-height:95px;scrollbar-width:none></textarea><button class="contain-layout shrink-0 flex flex-col items-start px-[3px] py-[3px] rounded-sm bg-white [border-width:0.5px] border-solid border-[#B3B3B3] size-fit cursor-pointer transition-all hover:scale-105 ml-1">');K('<div class="contain-layout shrink-0 flex flex-col justify-center items-start gap-1 w-fit h-fit max-w-[280px]"><div class="contain-layout shrink-0 flex items-center gap-1 pt-1 w-fit h-fit pl-1.5 pr-1">');K('<div data-react-grab-ignore-events class="fixed font-sans text-[13px] antialiased transition-opacity duration-300 ease-out filter-[drop-shadow(0px_0px_4px_#51515180)] select-none"style=z-index:2147483647><div class="[font-synthesis:none] contain-layout flex items-center gap-[5px] rounded-sm bg-white antialiased w-fit h-fit p-0">');Ee(["pointerdown","mousedown","click","pointerup","input","keydown"]);K('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 18 18"fill=currentColor><path opacity=0.4 d="M7.65631 10.9565C7.31061 10.0014 7.54012 8.96635 8.25592 8.25195C8.74522 7.76615 9.38771 7.49951 10.0694 7.49951C10.3682 7.49951 10.6641 7.55171 10.9483 7.65381L16.0001 9.49902V4.75C16.0001 3.2334 14.7667 2 13.2501 2H4.75012C3.23352 2 2.00012 3.2334 2.00012 4.75V13.25C2.00012 14.7666 3.23352 16 4.75012 16H9.49962L7.65631 10.9565Z"></path><path d="M17.296 11.5694L10.4415 9.06545C10.0431 8.92235 9.61441 9.01658 9.31551 9.31338C9.01671 9.61168 8.92101 10.0429 9.06551 10.4413L11.5704 17.2948C11.7247 17.7191 12.128 18.0004 12.5772 18.0004C12.585 18.0004 12.5918 17.9999 12.5987 17.9999C13.0577 17.9906 13.4591 17.6913 13.5987 17.2543L14.4854 14.4857L17.2559 13.5985C17.6914 13.4589 17.9903 13.057 18 12.599C18.0097 12.141 17.7267 11.7276 17.296 11.5694Z">');K('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2.5 stroke-linecap=round stroke-linejoin=round><path d="m18 15-6-6-6 6">');K('<div data-react-grab-ignore-events style=z-index:2147483647><div><div><button data-react-grab-ignore-events class="contain-layout shrink-0 flex items-center justify-center cursor-pointer transition-all hover:scale-105"></button></div><button data-react-grab-ignore-events class="contain-layout shrink-0 flex items-center justify-center cursor-pointer transition-all hover:scale-105">');Ee(["pointerdown","pointermove","pointerup","click"]);var Mi="0.5.28",rr=`bippy-${Mi}`,$n=Object.defineProperty,ki=Object.prototype.hasOwnProperty,Ye=()=>{},or=e=>{try{Function.prototype.toString.call(e).indexOf("^_^")>-1&&setTimeout(()=>{throw Error("React is running in production mode, but dead code elimination has not been applied. Read how to correctly configure React for production: https://reactjs.org/link/perf-use-production-build")});}catch{}},ir=(e=Pe())=>"getFiberRoots"in e,sr=false,Hn,Ut=(e=Pe())=>sr?true:(typeof e.inject=="function"&&(Hn=e.inject.toString()),!!Hn?.includes("(injected)")),jt=new Set,Xe=new Set,Li=e=>{let t=new Map,n=0,r={_instrumentationIsActive:false,_instrumentationSource:rr,checkDCE:or,hasUnsupportedRendererAttached:false,inject(o){let s=++n;return t.set(s,o),Xe.add(o),r._instrumentationIsActive||(r._instrumentationIsActive=true,jt.forEach(l=>l())),s},on:Ye,onCommitFiberRoot:Ye,onCommitFiberUnmount:Ye,onPostCommitFiberRoot:Ye,renderers:t,supportsFiber:true,supportsFlight:true};try{$n(globalThis,"__REACT_DEVTOOLS_GLOBAL_HOOK__",{configurable:!0,enumerable:!0,get(){return r},set(l){if(l&&typeof l=="object"){let c=r.renderers;r=l,c.size>0&&(c.forEach((f,g)=>{Xe.add(f),l.renderers.set(g,f);}),Vt(e));}}});let o=window.hasOwnProperty,s=!1;$n(window,"hasOwnProperty",{configurable:!0,value:function(...l){try{if(!s&&l[0]==="__REACT_DEVTOOLS_GLOBAL_HOOK__")return globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__=void 0,s=!0,-0}catch{}return o.apply(this,l)},writable:!0});}catch{Vt(e);}return r},Vt=e=>{try{let t=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!t)return;if(!t._instrumentationSource){t.checkDCE=or,t.supportsFiber=!0,t.supportsFlight=!0,t.hasUnsupportedRendererAttached=!1,t._instrumentationSource=rr,t._instrumentationIsActive=!1;let n=ir(t);if(n||(t.on=Ye),t.renderers.size){t._instrumentationIsActive=!0,jt.forEach(s=>s());return}let r=t.inject,o=Ut(t);o&&!n&&(sr=!0,t.inject({scheduleRefresh(){}})&&(t._instrumentationIsActive=!0)),t.inject=s=>{let l=r(s);return Xe.add(s),o&&t.renderers.set(l,s),t._instrumentationIsActive=!0,jt.forEach(c=>c()),l};}(t.renderers.size||t._instrumentationIsActive||Ut())&&e?.();}catch{}},Ii=()=>ki.call(globalThis,"__REACT_DEVTOOLS_GLOBAL_HOOK__"),Pe=e=>Ii()?(Vt(e),globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__):Li(e),Oi=()=>!!(typeof window<"u"&&(window.document?.createElement||window.navigator?.product==="ReactNative")),Pi=()=>{try{Oi()&&Pe();}catch{}},Di=0,Ri=1,$i=5,Hi=11,Bi=13,Fi=15,zi=16,Ui=19,ji=26,Vi=27,Gi=28,Ki=30;function Wi(e,t,n=false){if(!e)return null;let r=t(e);if(r instanceof Promise)return (async()=>{if(await r===true)return e;let s=n?e.return:e.child;for(;s;){let l=await lr(s,t,n);if(l)return l;s=n?null:s.sibling;}return null})();if(r===true)return e;let o=n?e.return:e.child;for(;o;){let s=ar(o,t,n);if(s)return s;o=n?null:o.sibling;}return null}var ar=(e,t,n=false)=>{if(!e)return null;if(t(e)===true)return e;let r=n?e.return:e.child;for(;r;){let o=ar(r,t,n);if(o)return o;r=n?null:r.sibling;}return null},lr=async(e,t,n=false)=>{if(!e)return null;if(await t(e)===true)return e;let r=n?e.return:e.child;for(;r;){let o=await lr(r,t,n);if(o)return o;r=n?null:r.sibling;}return null},cr=e=>{let t=e;return typeof t=="function"?t:typeof t=="object"&&t?cr(t.type||t.render):null},Gt=e=>{let t=e;if(typeof t=="string")return t;if(typeof t!="function"&&!(typeof t=="object"&&t))return null;let n=t.displayName||t.name||null;if(n)return n;let r=cr(t);return r&&(r.displayName||r.name)||null},ur=()=>!!Pe()._instrumentationIsActive||ir()||Ut(),qi=e=>{let t=Pe();for(let n of t.renderers.values())try{let r=n.findFiberByHostInstance?.(e);if(r)return r}catch{}if(typeof e=="object"&&e){if("_reactRootContainer"in e)return e._reactRootContainer?._internalRoot?.current?.child;for(let n in e)if(n.startsWith("__reactContainer$")||n.startsWith("__reactInternalInstance$")||n.startsWith("__reactFiber"))return e[n]||null}return null},Yi=Object.create,dr=Object.defineProperty,Xi=Object.getOwnPropertyDescriptor,Zi=Object.getOwnPropertyNames,Ji=Object.getPrototypeOf,Qi=Object.prototype.hasOwnProperty,es=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ts=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var o=Zi(t),s=0,l=o.length,c;s<l;s++)c=o[s],!Qi.call(e,c)&&c!==n&&dr(e,c,{get:(f=>t[f]).bind(null,c),enumerable:!(r=Xi(t,c))||r.enumerable});return e},ns=(e,t,n)=>(n=e==null?{}:Yi(Ji(e)),ts(dr(n,"default",{value:e,enumerable:true}),e)),Bn=/^[a-zA-Z][a-zA-Z\d+\-.]*:/,rs=["rsc://","file:///","webpack://","webpack-internal://","node:","turbopack://","metro://","/app-pages-browser/"],Fn="about://React/",os=["<anonymous>","eval",""],is=/\.(jsx|tsx|ts|js)$/,ss=/(\.min|bundle|chunk|vendor|vendors|runtime|polyfill|polyfills)\.(js|mjs|cjs)$|(chunk|bundle|vendor|vendors|runtime|polyfill|polyfills|framework|app|main|index)[-_.][A-Za-z0-9_-]{4,}\.(js|mjs|cjs)$|[\da-f]{8,}\.(js|mjs|cjs)$|[-_.][\da-f]{20,}\.(js|mjs|cjs)$|\/dist\/|\/build\/|\/.next\/|\/out\/|\/node_modules\/|\.webpack\.|\.vite\.|\.turbopack\./i,as=/^\?[\w~.\-]+(?:=[^&#]*)?(?:&[\w~.\-]+(?:=[^&#]*)?)*$/,pr="(at Server)",ls=/(^|@)\S+:\d+/,cs=/^\s*at .*(\S+:\d+|\(native\))/m,us=/^(eval@)?(\[native code\])?$/,fr=(e,t)=>{{let n=e.split(`
|
|
4
|
-
`),r=
|
|
5
|
-
`)
|
|
6
|
-
|
|
7
|
-
`),
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
${
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
`);if(
|
|
16
|
-
`,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
${
|
|
21
|
-
${x}`;}let m=g(l);return m&&(S+=`
|
|
22
|
-
|
|
23
|
-
</${t}>`:`<${t}${r} />`};var Us="application/x-react-grab",Yt=(e,t)=>{let n=JSON.stringify({version:Do,content:e,timestamp:Date.now(),...t?.prompt}),r=s=>{s.preventDefault(),s.clipboardData?.setData("text/plain",e),s.clipboardData?.setData(Us,n);};document.addEventListener("copy",r);let o=document.createElement("textarea");o.value=e,o.style.position="fixed",o.style.left="-9999px",o.ariaHidden="true",document.body.appendChild(o),o.select();try{let s=document.execCommand("copy");return s&&t?.onSuccess?.(),s}finally{document.removeEventListener("copy",r),o.remove();}};var js=new Set(["parentElement","parentNode","firstChild","lastChild","nextSibling","previousSibling","firstElementChild","lastElementChild","nextElementSibling","previousElementSibling"]),Vs=new Set(["querySelector","closest"]),Gs=new Set(["querySelectorAll","getElementsByClassName","getElementsByTagName","getElementsByTagNameNS"]),Ks=new Set(["setAttribute","removeAttribute","toggleAttribute","setAttributeNS","removeAttributeNS","setAttributeNode","removeAttributeNode","appendChild","removeChild","insertBefore","replaceChild","remove","append","prepend","after","before","replaceWith","replaceChildren","insertAdjacentHTML","insertAdjacentElement","insertAdjacentText","setHTML","normalize","cloneNode","addEventListener","removeEventListener","attachShadow","animate","showModal","show","close","showPopover","hidePopover","togglePopover","scrollTo","scrollBy","scrollIntoView","setSelectionRange","setRangeText","splitText","appendData","deleteData","insertData","replaceData","focus","blur","reset","submit","requestSubmit","setCustomValidity","insertRow","deleteRow","insertCell","deleteCell","createTHead","deleteTHead","createTFoot","deleteTFoot","createTBody","createCaption","deleteCaption","add","stepUp","stepDown","play","pause","load","fastSeek","setPointerCapture","webkitMatchesSelector","contains","compareDocumentPosition","getRootNode","isEqualNode","isSameNode"]),Ws=new Set(["scrollTop","scrollLeft"]),qs=new Set(["value","checked","selected","selectedIndex","disabled","readOnly","required","defaultValue","defaultChecked"]),Ys=new Set(["hidden","tabIndex","title","lang","dir","contentEditable","draggable","spellcheck","inert","slot","id","className","accessKey","autocapitalize","enterKeyHint","inputMode","nonce","popover","open","returnValue","indeterminate","type","name","placeholder","pattern","min","max","step","multiple","accept","src","href","alt","loading","crossOrigin","referrerPolicy","download","cols","rows","wrap","srcdoc","allowFullscreen","allow","rel","target","hreflang","media","sizes","srcset","decoding","fetchPriority","isMap","useMap","formAction","formEnctype","formMethod","formNoValidate","formTarget","maxLength","minLength","size","autocomplete","autofocus","dirName","list","noValidate","action","enctype","method","acceptCharset","cite","dateTime","label","span","headers","scope","abbr","colSpan","rowSpan","start","reversed","high","low","optimum","default","kind","srclang","integrity","as","blocking","async","defer","noModule","htmlFor","httpEquiv","content","charset","coords","shape","ping","seamless","width","height","data","form","summary","nodeValue"]),Xs=new Set(["currentTime","volume","muted","playbackRate","defaultPlaybackRate","autoplay","loop","controls","preload","poster","playsInline","disableRemotePlayback","preservesPitch","defaultMuted"]),Zs=new Set(["nodeName","nodeType","tagName","localName","namespaceURI","prefix","baseURI","isConnected","ownerDocument","offsetWidth","offsetHeight","offsetTop","offsetLeft","offsetParent","clientWidth","clientHeight","clientTop","clientLeft","scrollWidth","scrollHeight","computedStyleMap","assignedSlot","sheet","naturalWidth","naturalHeight","complete","currentSrc","videoWidth","videoHeight","duration","paused","ended","seeking","readyState","networkState","buffered","played","seekable","error","textTracks","audioTracks","videoTracks","mediaKeys","validity","validationMessage","willValidate","files","labels","form","selectionStart","selectionEnd","selectionDirection","textLength","options","selectedOptions","length","tHead","tFoot","tBodies","caption","rowIndex","sectionRowIndex","cellIndex","cells","control","internals","part"]),wr=new Set(["relList","sandbox","controlsList","part"]),mt=e=>{let t=[],n=b=>t.push(b),r=new WeakMap,o=new WeakMap,s=new WeakMap,l=new WeakMap,c=new WeakMap,f=new WeakMap,g=new WeakMap,S=new WeakMap,m=b=>r.get(b)??b,A=b=>b.map(_=>typeof _=="string"?_:m(_)),L=b=>({parent:b.parentNode,nextSibling:b.nextSibling}),P=(b,_)=>{_.parent&&_.parent.insertBefore(b,_.nextSibling);},G=b=>b instanceof DocumentFragment?Array.from(b.childNodes):[],W=(b,_)=>((...p)=>{let i=A(p),a=new Map;for(let w of i)typeof w!="string"&&!(w instanceof DocumentFragment)&&w.parentNode&&a.set(w,L(w));let u=_();b(...i);let h=_().filter(w=>!u.includes(w));n(()=>{for(let w of h)w.parentNode?.removeChild(w);for(let[w,C]of a)P(w,C);});}),te=b=>{let _=s.get(b);if(_)return _;let p=new Proxy(b,{get(i,a){if(a==="setProperty")return (d,h,w)=>{let C=i.getPropertyValue(d),D=i.getPropertyPriority(d);i.setProperty(d,h,w),n(()=>i.setProperty(d,C,D));};if(a==="removeProperty")return d=>{let h=i.getPropertyValue(d),w=i.getPropertyPriority(d),C=i.removeProperty(d);return h&&n(()=>i.setProperty(d,h,w)),C};let u=Reflect.get(i,a);return typeof u=="function"?u.bind(i):u},set(i,a,u){if(typeof a=="string"){let d=i.getPropertyValue(a)||i[a]||"";n(()=>{i[a]=d;});}return Reflect.set(i,a,u)}});return s.set(b,p),p},ee=b=>{let _=l.get(b);if(_)return _;let p=new Proxy(b,{get(i,a){if(a==="add")return (...d)=>{let h=d.filter(w=>!i.contains(w));return n(()=>i.remove(...h)),i.add(...d)};if(a==="remove")return (...d)=>{let h=d.filter(w=>i.contains(w));return n(()=>i.add(...h)),i.remove(...d)};if(a==="toggle")return (d,h)=>{let w=i.contains(d),C=i.toggle(d,h);return n(()=>w?i.add(d):i.remove(d)),C};if(a==="replace")return (d,h)=>{let w=i.contains(d),C=i.contains(h),D=i.replace(d,h);return w&&n(()=>{C||i.remove(h),i.add(d);}),D};if(a==="value")return i.value;let u=Reflect.get(i,a);return typeof u=="function"?u.bind(i):u},set(i,a,u){if(a==="value"){let d=i.value;n(()=>{i.value=d;});}return Reflect.set(i,a,u)}});return l.set(b,p),p},Z=b=>{let _=c.get(b);if(_)return _;let p=new Proxy(b,{set(i,a,u){if(typeof a=="string"){let d=i[a],h=a in i;n(()=>h?i[a]=d:delete i[a]);}return Reflect.set(i,a,u)},deleteProperty(i,a){if(typeof a=="string"&&a in i){let u=i[a];n(()=>{i[a]=u;});}return Reflect.deleteProperty(i,a)}});return c.set(b,p),p},ce=b=>{let _=f.get(b);if(_)return _;let p=new Proxy(b,{get(i,a){if(typeof a=="string"&&!isNaN(Number(a))){let d=i[Number(a)];return d?R(d):void 0}if(a==="item")return d=>{let h=i.item(d);return h?R(h):null};if(a==="getNamedItem")return d=>{let h=i.getNamedItem(d);return h?R(h):null};if(a==="getNamedItemNS")return (d,h)=>{let w=i.getNamedItemNS(d,h);return w?R(w):null};if(a==="setNamedItem")return d=>{let h=i.getNamedItem(d.name),w=h?.value,C=i.setNamedItem(d);return n(()=>{h&&w!==void 0?(h.value=w,i.setNamedItem(h)):i.removeNamedItem(d.name);}),C};if(a==="setNamedItemNS")return d=>{let h=i.getNamedItemNS(d.namespaceURI,d.localName),w=h?.value,C=i.setNamedItemNS(d);return n(()=>{h&&w!==void 0?(h.value=w,i.setNamedItemNS(h)):d.namespaceURI?i.removeNamedItemNS(d.namespaceURI,d.localName):i.removeNamedItem(d.name);}),C};if(a==="removeNamedItem")return d=>{let h=i.getNamedItem(d);if(h){let w=h.value,C=i.removeNamedItem(d);return n(()=>{let D=document.createAttribute(d);D.value=w,i.setNamedItem(D);}),C}return i.removeNamedItem(d)};if(a==="removeNamedItemNS")return (d,h)=>{let w=i.getNamedItemNS(d,h);if(w){let C=w.value,D=w.name,U=i.removeNamedItemNS(d,h);return n(()=>{let I=d?document.createAttributeNS(d,D):document.createAttribute(h);I.value=C,d?i.setNamedItemNS(I):i.setNamedItem(I);}),U}return i.removeNamedItemNS(d,h)};if(a===Symbol.iterator)return function*(){for(let d=0;d<i.length;d++)yield R(i[d]);};let u=Reflect.get(i,a);return typeof u=="function"?u.bind(i):u}});return f.set(b,p),p},ue=new WeakMap,R=b=>{let _=ue.get(b);if(_)return _;let p=new Proxy(b,{get(i,a){let u=Reflect.get(i,a);return typeof u=="function"?u.bind(i):u},set(i,a,u){if(a==="value"){let d=i.value;n(()=>{i.value=d;});}return Reflect.set(i,a,u)}});return ue.set(b,p),p},j=b=>{let _=g.get(b);if(_)return _;let p=new Proxy(b,{get(i,a){if(a==="set")return (d,...h)=>{let w=i.get(d);i.set(d,...h),n(()=>{w?i.set(d,w):i.delete(d);});};if(a==="delete")return d=>{let h=i.get(d);i.delete(d),h&&n(()=>i.set(d,h));};if(a==="append")return (d,...h)=>{let w=i.getAll(d);i.append(d,...h),n(()=>{i.delete(d);for(let C of w)i.append(d,C);});};if(a==="clear")return ()=>{let d=[];i.forEach((h,w)=>{d.push([w,i.getAll(w)]);}),i.clear(),n(()=>{for(let[h,w]of d)for(let C of w)i.append(h,C);});};if(a===Symbol.iterator)return i[Symbol.iterator].bind(i);let u=Reflect.get(i,a);return typeof u=="function"?u.bind(i):u}});return g.set(b,p),p},H=b=>new Proxy(b,{get(_,p){if(typeof p=="string"&&!isNaN(Number(p)))return M(_[Number(p)]??null);if(p==="item")return a=>M(_.item(a));if(p===Symbol.iterator)return function*(){for(let a=0;a<_.length;a++)yield M(_[a]);};if(p==="forEach")return (a,u)=>{_.forEach((d,h,w)=>{a.call(u,M(d),h,w);});};if(p==="entries")return function*(){for(let a=0;a<_.length;a++)yield [a,M(_[a])];};if(p==="keys")return _.keys.bind(_);if(p==="values")return function*(){for(let a=0;a<_.length;a++)yield M(_[a]);};let i=Reflect.get(_,p);return typeof i=="function"?i.bind(_):i}}),N=b=>b?new Proxy(b,{get(_,p){if(typeof p=="string"&&!isNaN(Number(p)))return M(_[Number(p)]??null);if(p==="item")return a=>M(_.item(a));if(p==="namedItem"&&"namedItem"in _)return a=>M(_.namedItem(a));if(p===Symbol.iterator)return function*(){for(let a=0;a<_.length;a++)yield M(_[a]);};let i=Reflect.get(_,p);return typeof i=="function"?i.bind(_):i}}):null,E=(b,_)=>{let p=S.get(b);if(p)return p;let i=new Proxy(b,{get(a,u){if(typeof u=="string"&&!isNaN(Number(u)))return M(a[Number(u)]??null);if(u==="item")return h=>M(a.item(h));if(u==="namedItem")return h=>M(a.namedItem(h));if(u==="add")return (h,w)=>{let C=m(h),D=typeof w=="number"||w==null?w:m(w);a.add(C,D),n(()=>C.parentNode?.removeChild(C));};if(u==="remove")return h=>{let w=a[h];if(w){let C=w.outerHTML,D=h;a.remove(h),n(()=>{let U=document.createElement("div");U.innerHTML=C;let I=U.firstChild;I&&(D>=a.length?_.appendChild(I):_.insertBefore(I,a[D]));});}};if(u==="selectedIndex")return a.selectedIndex;if(u==="length")return a.length;if(u===Symbol.iterator)return function*(){for(let h=0;h<a.length;h++)yield M(a[h]);};let d=Reflect.get(a,u);return typeof d=="function"?d.bind(a):d},set(a,u,d){if(u==="selectedIndex"){let h=a.selectedIndex;n(()=>{a.selectedIndex=h;});}if(u==="length"){let h=[];for(let w=0;w<a.length;w++)h.push(a[w].outerHTML);n(()=>{for(;a.length>0;)a.remove(0);for(let w of h){let C=document.createElement("div");C.innerHTML=w;let D=C.firstChild;D&&_.appendChild(D);}});}return Reflect.set(a,u,d)}});return S.set(b,i),i},y=(b,_)=>{let p=b;switch(_){case "setAttribute":return (i,a)=>{let u=p.hasAttribute(i),d=p.getAttribute(i);return n(()=>u?p.setAttribute(i,d):p.removeAttribute(i)),p.setAttribute(i,a)};case "removeAttribute":return i=>{if(p.hasAttribute(i)){let a=p.getAttribute(i);n(()=>p.setAttribute(i,a));}return p.removeAttribute(i)};case "toggleAttribute":return (i,a)=>{let u=p.hasAttribute(i),d=u?p.getAttribute(i):null,h=p.toggleAttribute(i,a);return n(()=>{u?p.setAttribute(i,d):p.removeAttribute(i);}),h};case "setAttributeNS":return (i,a,u)=>{let d=a.includes(":")?a.split(":")[1]:a,h=p.hasAttributeNS(i,d),w=p.getAttributeNS(i,d),C=p.getAttributeNodeNS(i,d)?.name??d;return n(()=>h?p.setAttributeNS(i,C,w):p.removeAttributeNS(i,d)),p.setAttributeNS(i,a,u)};case "removeAttributeNS":return (i,a)=>{if(p.hasAttributeNS(i,a)){let u=p.getAttributeNS(i,a),d=p.getAttributeNodeNS(i,a)?.name??a;n(()=>p.setAttributeNS(i,d,u));}return p.removeAttributeNS(i,a)};case "setAttributeNode":return i=>{let a=p.getAttributeNode(i.name),u=a?.value,d=p.setAttributeNode(i);return n(()=>{a&&u!==void 0?(a.value=u,p.setAttributeNode(a)):p.removeAttribute(i.name);}),d};case "removeAttributeNode":return i=>{let a=i.value,u=i.name,d=p.removeAttributeNode(i);return n(()=>{let h=document.createAttribute(u);h.value=a,p.setAttributeNode(h);}),d};case "appendChild":return i=>{let a=m(i),u=a.parentNode?L(a):null,d=G(a),h=p.appendChild(a);return n(()=>{if(d.length>0)for(let w of d)w.parentNode?.removeChild(w);else a.parentNode?.removeChild(a);u&&P(a,u);}),M(h)};case "removeChild":return i=>{let a=m(i),u=a.nextSibling,d=p.removeChild(a);return n(()=>p.insertBefore(a,u)),M(d)};case "insertBefore":return (i,a)=>{let u=m(i),d=a?m(a):null,h=u.parentNode?L(u):null,w=G(u),C=p.insertBefore(u,d);return n(()=>{if(w.length>0)for(let D of w)D.parentNode?.removeChild(D);else u.parentNode?.removeChild(u);h&&P(u,h);}),M(C)};case "replaceChild":return (i,a)=>{let u=m(i),d=m(a),h=d.nextSibling,w=u.parentNode?L(u):null,C=G(u),D=p.replaceChild(u,d);return n(()=>{if(C.length>0){let U=C[0];U?.parentNode&&U.parentNode.replaceChild(d,U);for(let I=1;I<C.length;I++)C[I].parentNode?.removeChild(C[I]);}else p.replaceChild(d,u);h&&h.parentNode===p&&d.nextSibling!==h&&p.insertBefore(d,h),w&&P(u,w);}),M(D)};case "remove":return ()=>{let i=b.parentNode,a=b.nextSibling;p.remove(),n(()=>i?.insertBefore(b,a));};case "append":return W(p.append.bind(p),()=>Array.from(p.childNodes));case "prepend":return W(p.prepend.bind(p),()=>Array.from(p.childNodes));case "after":return W(p.after.bind(p),()=>p.parentNode?Array.from(p.parentNode.childNodes):[]);case "before":return W(p.before.bind(p),()=>p.parentNode?Array.from(p.parentNode.childNodes):[]);case "replaceWith":return (...i)=>{let a=A(i),u=b.parentNode,d=b.nextSibling,h=new Map;for(let U of a)typeof U!="string"&&!(U instanceof DocumentFragment)&&U.parentNode&&h.set(U,L(U));let w=u?Array.from(u.childNodes):[];p.replaceWith(...a);let D=(u?Array.from(u.childNodes):[]).filter(U=>!w.includes(U));n(()=>{let U=D[0];if(u){u.insertBefore(b,U??d);for(let I of D)I!==b&&I.parentNode?.removeChild(I);}for(let[I,ne]of h)P(I,ne);});};case "replaceChildren":return (...i)=>{let a=A(i),u=Array.from(p.childNodes),d=new Map;for(let h of a)typeof h!="string"&&h.parentNode&&h.parentNode!==p&&d.set(h,L(h));p.replaceChildren(...a),n(()=>{p.replaceChildren(...u);for(let[h,w]of d)P(h,w);});};case "insertAdjacentHTML":return (i,a)=>{let u=Array.from(p.childNodes),d=p.parentNode?Array.from(p.parentNode.childNodes):[];p.insertAdjacentHTML(i,a);let h=Array.from(p.childNodes).filter(C=>!u.includes(C)),w=p.parentNode?Array.from(p.parentNode.childNodes).filter(C=>!d.includes(C)):[];n(()=>[...h,...w].forEach(C=>C.parentNode?.removeChild(C)));};case "insertAdjacentElement":return (i,a)=>{let u=m(a),d=u.parentNode?L(u):null,h=p.insertAdjacentElement(i,u);return h&&n(()=>{h.parentNode?.removeChild(h),d&&P(u,d);}),h?M(h):null};case "insertAdjacentText":return (i,a)=>{let u=Array.from(p.childNodes),d=p.parentNode?Array.from(p.parentNode.childNodes):[];p.insertAdjacentText(i,a);let h=Array.from(p.childNodes).filter(C=>!u.includes(C)),w=p.parentNode?Array.from(p.parentNode.childNodes).filter(C=>!d.includes(C)):[];n(()=>[...h,...w].forEach(C=>C.parentNode?.removeChild(C)));};case "setHTML":return (i,a)=>{if("setHTML"in p){let u=p.innerHTML;p.setHTML(i,a),n(()=>{p.innerHTML=u;});}};case "normalize":return ()=>{let i=[],a=document.createTreeWalker(p,NodeFilter.SHOW_TEXT),u=a.nextNode();for(;u;){let C=u.nextSibling;for(;C&&C.nodeType===Node.TEXT_NODE;)C=C.nextSibling;i.push({parent:u.parentNode,data:u.data,nextNonTextSibling:C}),u=a.nextNode();}p.normalize();let d=[],h=document.createTreeWalker(p,NodeFilter.SHOW_TEXT),w=h.nextNode();for(;w;)d.push(w),w=h.nextNode();n(()=>{for(let I of d)I.parentNode?.removeChild(I);let C=null,D=null,U;for(let{parent:I,data:ne,nextNonTextSibling:oe}of i){let Se=document.createTextNode(ne);I===D&&oe===U&&C?I.insertBefore(Se,C.nextSibling):I.insertBefore(Se,oe),C=Se,D=I,U=oe;}});};case "cloneNode":return i=>{let a=p.cloneNode(i);return M(a)};case "addEventListener":return (i,a,u)=>{p.addEventListener(i,a,u),n(()=>p.removeEventListener(i,a,u));};case "removeEventListener":return (i,a,u)=>{p.removeEventListener(i,a,u),n(()=>p.addEventListener(i,a,u));};case "attachShadow":return i=>{let a=p.attachShadow(i);return n(()=>{a.innerHTML="";}),M(a)};case "animate":return (i,a)=>{let u=p.animate(i,a);return n(()=>u.cancel()),u};case "showModal":return ()=>{let i=b;if("showModal"in i){let a=i.open;i.showModal(),a||n(()=>i.close());}};case "show":return ()=>{let i=b;if("show"in i){let a=i.open;i.show(),a||n(()=>i.close());}};case "close":return i=>{let a=b;if("close"in a){let u=a.open,d=a.matches(":modal"),h=a.returnValue;a.close(i),u&&n(()=>{a.returnValue=h,d?a.showModal():a.show();});}};case "showPopover":return ()=>{if("showPopover"in p&&"hidePopover"in p){let i=p,a=p.matches(":popover-open");i.showPopover(),a||n(()=>i.hidePopover());}};case "hidePopover":return ()=>{if("hidePopover"in p&&"showPopover"in p){let i=p,a=p.matches(":popover-open");i.hidePopover(),a&&n(()=>i.showPopover());}};case "togglePopover":return i=>{if("togglePopover"in p){let a=p,u=p.matches(":popover-open"),d=a.togglePopover(i);return n(()=>a.togglePopover(u)),d}return false};case "scrollTo":return (i,a)=>{let u=p.scrollLeft,d=p.scrollTop;typeof i=="number"?p.scrollTo(i,a??p.scrollTop):p.scrollTo(i),n(()=>p.scrollTo(u,d));};case "scrollBy":return (i,a)=>{let u=p.scrollLeft,d=p.scrollTop;typeof i=="number"?p.scrollBy(i,a??0):p.scrollBy(i),n(()=>p.scrollTo(u,d));};case "scrollIntoView":return i=>{let a=T(p),u=a?.scrollLeft??0,d=a?.scrollTop??0;p.scrollIntoView(i),a&&n(()=>a.scrollTo(u,d));};case "setSelectionRange":return (i,a,u)=>{let d=b;if("setSelectionRange"in d){let h=d.selectionStart,w=d.selectionEnd,C=d.selectionDirection;d.setSelectionRange(i,a,u),n(()=>d.setSelectionRange(h,w,C??void 0));}};case "setRangeText":return (i,a,u,d)=>{let h=b;if("setRangeText"in h){let w=h.value,C=h.selectionStart,D=h.selectionEnd;a!==void 0&&u!==void 0?h.setRangeText(i,a,u,d):h.setRangeText(i),n(()=>{h.value=w,h.setSelectionRange(C,D);});}};case "splitText":return i=>{let a=b;if("splitText"in a){let u=a.data,d=a.splitText(i);return n(()=>{a.data=u,d.parentNode?.removeChild(d);}),M(d)}return null};case "appendData":return i=>{let a=b;if("appendData"in a){let u=a.length;a.appendData(i),n(()=>a.deleteData(u,i.length));}};case "deleteData":return (i,a)=>{let u=b;if("deleteData"in u){let d=u.substringData(i,a);u.deleteData(i,a),n(()=>u.insertData(i,d));}};case "insertData":return (i,a)=>{let u=b;"insertData"in u&&(u.insertData(i,a),n(()=>u.deleteData(i,a.length)));};case "replaceData":return (i,a,u)=>{let d=b;if("replaceData"in d){let h=d.substringData(i,a);d.replaceData(i,a,u),n(()=>d.replaceData(i,u.length,h));}};case "focus":return i=>{let a=document.activeElement;p.focus(i),n(()=>{a&&a!==document.body&&"focus"in a?a.focus():p.blur();});};case "blur":return ()=>{let i=document.activeElement===p;p.blur(),i&&n(()=>p.focus());};case "reset":return ()=>{let i=b;if("reset"in i&&"elements"in i){let a=new Map;for(let u=0;u<i.elements.length;u++){let d=i.elements[u];if("value"in d)if(d instanceof HTMLInputElement&&(d.type==="checkbox"||d.type==="radio"))a.set(d,d.checked);else if(d instanceof HTMLSelectElement)if(d.multiple){let h=[];for(let w=0;w<d.options.length;w++)h.push(d.options[w].selected);a.set(d,h);}else a.set(d,d.selectedIndex);else a.set(d,d.value);}i.reset(),n(()=>{for(let[u,d]of a)if(u instanceof HTMLInputElement&&(u.type==="checkbox"||u.type==="radio"))u.checked=d;else if(u instanceof HTMLSelectElement)if(u.multiple){let h=d;for(let w=0;w<u.options.length;w++)u.options[w].selected=h[w]??false;}else u.selectedIndex=d;else "value"in u&&(u.value=d);});}};case "submit":return ()=>{let i=b;"submit"in i&&i.submit();};case "requestSubmit":return i=>{let a=b;if("requestSubmit"in a){let u=i&&m(i);a.requestSubmit(u);}};case "setCustomValidity":return i=>{let a=b;if("setCustomValidity"in a){let d=a.validity.customError?a.validationMessage:"";a.setCustomValidity(i),n(()=>a.setCustomValidity(d));}};case "insertRow":return i=>{let a=b;if("insertRow"in a){let u=a.insertRow(i);return n(()=>u.parentNode?.removeChild(u)),M(u)}return null};case "deleteRow":return i=>{let a=b;if("deleteRow"in a&&"rows"in a){let u=i<0?a.rows.length+i:i,d=a.rows[u];if(d){let h=d.outerHTML;a.deleteRow(i),n(()=>{let w=document.createElement("table");w.innerHTML=h;let C=w.rows[0];C&&(u>=a.rows.length?a.appendChild(C):a.insertBefore(C,a.rows[u]));});}}};case "insertCell":return i=>{let a=b;if("insertCell"in a){let u=a.insertCell(i);return n(()=>u.parentNode?.removeChild(u)),M(u)}return null};case "deleteCell":return i=>{let a=b;if("deleteCell"in a&&"cells"in a){let u=i<0?a.cells.length+i:i,d=a.cells[u];if(d){let h=d.outerHTML;a.deleteCell(i),n(()=>{let w=document.createElement("tr");w.innerHTML=h;let C=w.cells[0];C&&(u>=a.cells.length?a.appendChild(C):a.insertBefore(C,a.cells[u]));});}}};case "createTHead":return ()=>{let i=b;if("createTHead"in i){let a=i.tHead,u=i.createTHead();return a||n(()=>i.deleteTHead()),M(u)}return null};case "deleteTHead":return ()=>{let i=b;if("deleteTHead"in i&&i.tHead){let a=i.tHead.outerHTML;i.deleteTHead(),n(()=>{let u=document.createElement("table");u.innerHTML=a;let d=u.tHead;d&&(i.firstChild?i.insertBefore(d,i.firstChild):i.appendChild(d));});}};case "createTFoot":return ()=>{let i=b;if("createTFoot"in i){let a=i.tFoot,u=i.createTFoot();return a||n(()=>i.deleteTFoot()),M(u)}return null};case "deleteTFoot":return ()=>{let i=b;if("deleteTFoot"in i&&i.tFoot){let a=i.tFoot.outerHTML;i.deleteTFoot(),n(()=>{let u=document.createElement("table");u.innerHTML=a;let d=u.tFoot;d&&i.appendChild(d);});}};case "createTBody":return ()=>{let i=b;if("createTBody"in i){let a=i.createTBody();return n(()=>a.parentNode?.removeChild(a)),M(a)}return null};case "createCaption":return ()=>{let i=b;if("createCaption"in i){let a=i.caption,u=i.createCaption();return a||n(()=>i.deleteCaption()),M(u)}return null};case "deleteCaption":return ()=>{let i=b;if("deleteCaption"in i&&i.caption){let a=i.caption.outerHTML;i.deleteCaption(),n(()=>{let u=document.createElement("table");u.innerHTML=a;let d=u.caption;d&&(i.firstChild?i.insertBefore(d,i.firstChild):i.appendChild(d));});}};case "add":return (i,a)=>{let u=b;if("add"in u&&"options"in u){let d=m(i),h=typeof a=="number"||a==null?a:m(a);u.add(d,h),n(()=>d.parentNode?.removeChild(d));}};case "stepUp":return i=>{let a=b;if("stepUp"in a){let u=a.value;a.stepUp(i),n(()=>{a.value=u;});}};case "stepDown":return i=>{let a=b;if("stepDown"in a){let u=a.value;a.stepDown(i),n(()=>{a.value=u;});}};case "play":return ()=>{let i=b;if("play"in i){let a=i.paused,u=i.currentTime,d=i.play();return a&&n(()=>{i.pause(),i.currentTime=u;}),d}return Promise.resolve()};case "pause":return ()=>{let i=b;if("pause"in i){let a=i.paused,u=i.currentTime;i.pause(),a||n(()=>{i.currentTime=u,i.play();});}};case "load":return ()=>{let i=b;if("load"in i){let a=i.currentTime,u=i.src;i.load(),n(()=>{i.src===u&&(i.currentTime=a);});}};case "fastSeek":return i=>{let a=b;if("fastSeek"in a){let u=a.currentTime;a.fastSeek(i),n(()=>{a.currentTime=u;});}};case "setPointerCapture":return i=>{let a=b;"setPointerCapture"in a&&(a.setPointerCapture(i),n(()=>{try{a.releasePointerCapture(i);}catch{}}));};case "webkitMatchesSelector":return i=>{let a=b,u=a;return u.webkitMatchesSelector?u.webkitMatchesSelector(i):a.matches(i)};case "contains":return i=>b.contains(i?m(i):null);case "compareDocumentPosition":return i=>b.compareDocumentPosition(m(i));case "getRootNode":return i=>M(b.getRootNode(i));case "isEqualNode":return i=>b.isEqualNode(i?m(i):null);case "isSameNode":return i=>b.isSameNode(i?m(i):null);default:return null}},T=b=>{let _=b.parentElement;for(;_;){let{overflow:p,overflowY:i,overflowX:a}=getComputedStyle(_);if(p==="auto"||p==="scroll"||i==="auto"||i==="scroll"||a==="auto"||a==="scroll")return _;_=_.parentElement;}return document.documentElement},k=(b,_)=>{if(typeof _=="symbol")return false;if(Zs.has(_))return true;let p=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(b),_);return !!(p&&p.get&&!p.set)},M=b=>{if(!b)return null;let _=o.get(b);if(_)return _;let p=new Proxy(b,{get(i,a){if(a===Symbol.toStringTag)return i[Symbol.toStringTag];if(a===Symbol.toPrimitive)return i[Symbol.toPrimitive]?.bind(i);if(a===Symbol.iterator&&Symbol.iterator in i)return i[Symbol.iterator].bind(i);if(a==="constructor")return i.constructor;let u=i;if(a==="style"&&"style"in i)return te(u.style);if(a==="classList"&&"classList"in i)return ee(u.classList);if(a==="dataset"&&"dataset"in i)return Z(u.dataset);if(a==="attributes"&&"attributes"in i)return ce(u.attributes);if(a==="attributeStyleMap"&&"attributeStyleMap"in i)return j(u.attributeStyleMap);if(a==="shadowRoot"&&"shadowRoot"in i)return u.shadowRoot?M(u.shadowRoot):null;if(a==="content"&&i instanceof HTMLTemplateElement)return M(i.content);if(typeof a=="string"&&wr.has(a)&&a in i){let h=i[a];if(h instanceof DOMTokenList)return ee(h)}if(a==="options"&&i instanceof HTMLSelectElement)return E(i.options,i);if(typeof a=="string"&&js.has(a))return M(i[a]);if(a==="children"||a==="childNodes")return N(i[a]);if(typeof a=="string"&&Vs.has(a)){let h=i;return w=>{let C=h[a]?.(w);return C?M(C):null}}if(typeof a=="string"&&Gs.has(a)){let h=i;if(a==="querySelectorAll")return w=>H(h.querySelectorAll(w));if(a==="getElementsByClassName")return w=>N(h.getElementsByClassName(w));if(a==="getElementsByTagName")return w=>N(h.getElementsByTagName(w));if(a==="getElementsByTagNameNS")return (w,C)=>N(h.getElementsByTagNameNS(w,C))}if(typeof a=="string"&&Ks.has(a)){let h=y(i,a);if(h)return h}let d=Reflect.get(i,a);return typeof d=="function"?d.bind(i):d},set(i,a,u){if(k(i,a))return Reflect.set(i,a,u);let d=typeof a=="string"?a:String(a),h=i,w=()=>{let C=h[d];n(()=>{h[d]=C;});};if(Ws.has(d))w();else if(qs.has(d)&&B(i))w();else if(d==="innerText"||d==="textContent"||d==="innerHTML"){let C=i,D=C.innerHTML;n(()=>{C.innerHTML=D;});}else if(wr.has(d)&&d in i){let C=h[d];if(C instanceof DOMTokenList){let D=C.value;n(()=>{h[d]=D;});}else w();}else if(Ys.has(d))w();else if(Xs.has(d)&&$(i))w();else if(d==="outerHTML"){let C=i,D=C.parentNode,U=C.nextSibling,I=C.outerHTML,ne=D?Array.from(D.childNodes):[],oe=Reflect.set(i,a,u),gt=(D?Array.from(D.childNodes):[]).filter(re=>!ne.includes(re));return n(()=>{for(let Y of gt)Y.parentNode?.removeChild(Y);let re=C.tagName.toLowerCase(),ge=null;if(re==="tr"){let Y=document.createElement("table");Y.innerHTML=I,ge=Y.querySelector("tr");}else if(re==="td"||re==="th"){let Y=document.createElement("table");Y.innerHTML=`<tbody><tr>${I}</tr></tbody>`,ge=Y.querySelector(re);}else if(re==="thead"||re==="tbody"||re==="tfoot"||re==="caption"||re==="colgroup"){let Y=document.createElement("table");Y.innerHTML=I,ge=Y.querySelector(re);}else if(re==="col"){let Y=document.createElement("table");Y.innerHTML=`<colgroup>${I}</colgroup>`,ge=Y.querySelector("col");}else {let Y=document.createElement("div");Y.innerHTML=I,ge=Y.firstChild;}ge&&D&&D.insertBefore(ge,U);}),oe}else w();return Reflect.set(i,a,u)}});return r.set(p,b),o.set(b,p),p},B=b=>b instanceof HTMLInputElement||b instanceof HTMLTextAreaElement||b instanceof HTMLSelectElement||b instanceof HTMLOptionElement,$=b=>b instanceof HTMLMediaElement;return {proxy:M(e),undo:()=>{for(let b=t.length-1;b>=0;b--)t[b]();}}},Js=e=>{let t=e.cloneNode(false),n=document.createElement("div");n.appendChild(t);let r=n.innerHTML,o=r.match(/<\/[^>]+>$/);return o?r.slice(0,-o[0].length):r},Qs=e=>`</${e.tagName.toLowerCase()}>`,xr=e=>{let t=document.createElement("div");t.innerHTML=e;let n=t.querySelectorAll("svg");for(let r of n){let o=document.createElementNS("http://www.w3.org/2000/svg","svg");r.hasAttribute("class")&&o.setAttribute("class",r.getAttribute("class")),r.hasAttribute("id")&&o.setAttribute("id",r.getAttribute("id")),o.textContent="...",r.replaceWith(o);}return t.innerHTML},Ze=e=>{let t=[],n=e.parentElement;for(let c=0;c<5&&n&&!(n===document.body||n===document.documentElement);c++)t.push(n),n=n.parentElement;if(t.length===0)return xr(e.outerHTML);t.reverse();let r="",o="";for(let c of t)r+=`${o}${Js(c)}
|
|
24
|
-
|
|
25
|
-
`;
|
|
26
|
-
|
|
27
|
-
`;r
|
|
28
|
-
|
|
29
|
-
`;return r.trim()};var ea=[/\beval\s*\(/,/\bFunction\s*\(/,/\bdocument\.cookie\b/,/\bfetch\s*\(/,/\bXMLHttpRequest\b/],ta=e=>e.replace(/[\u2018\u2019\u2032\u2035]/g,"'").replace(/[\u201C\u201D\u2033\u2036]/g,'"').replace(/[\u2014\u2013\u2212]/g,"-").replace(/\u2026/g,"...").replace(/[\u00A0\u2000-\u200A\u202F\u205F]/g," ").replace(/[\u200B-\u200D\uFEFF]/g,""),Xt=e=>{let t=ta(e);try{new Function("$el",t);}catch(n){return {isValid:false,error:`Invalid JavaScript syntax${n instanceof Error?`: ${n.message}`:""}`,sanitizedCode:t}}for(let n of ea)if(n.test(t))return {isValid:false,error:`Potentially unsafe code detected: ${n.source}`,sanitizedCode:t};return {isValid:true,sanitizedCode:t}};var Er=async(e,t,n)=>{let r=await qt(e),s=document.contains(e)?e.outerHTML:"(removed)",l=n.length>0?`Prompts:
|
|
30
|
-
${n.join(`
|
|
1
|
+
var ReactGrabVisualEdit=(function(exports){'use strict';var Bt=(e,o)=>e===o,qe={equals:Bt},Rt=ut,ge=1,Te=2;var Se=null,fe=null,Ge=null,Y=null,Z=null,de=null,Ae=0;function Ft(e,o){o=o?Object.assign({},qe,o):qe;let r={value:e,observers:null,observerSlots:null,comparator:o.equals||void 0},i=l=>(typeof l=="function"&&(l=l(r.value)),at(r,l));return [jt.bind(r),i]}function zt(e){if(Y===null)return e();let o=Y;Y=null;try{return Ge?Ge.untrack(e):e()}finally{Y=o;}}Ft(false);function jt(){let e=fe;if(this.sources&&this.state)if(this.state===ge)st(this);else {let o=Z;Z=null,Le(()=>Ee(this)),Z=o;}if(Y){let o=this.observers?this.observers.length:0;Y.sources?(Y.sources.push(this),Y.sourceSlots.push(o)):(Y.sources=[this],Y.sourceSlots=[o]),this.observers?(this.observers.push(Y),this.observerSlots.push(Y.sources.length-1)):(this.observers=[Y],this.observerSlots=[Y.sources.length-1]);}return e&&fe.sources.has(this)?this.tValue:this.value}function at(e,o,r){let i=e.value;return (!e.comparator||!e.comparator(i,o))&&(e.value=o,e.observers&&e.observers.length&&Le(()=>{for(let l=0;l<e.observers.length;l+=1){let c=e.observers[l],g=fe&&fe.running;g&&fe.disposed.has(c)||((g?!c.tState:!c.state)&&(c.pure?Z.push(c):de.push(c),c.observers&&ct(c)),g?c.tState=ge:c.state=ge);}if(Z.length>1e6)throw Z=[],new Error})),o}function st(e){if(!e.fn)return;Ne(e);let o=Ae;_t(e,e.value,o);}function _t(e,o,r){let i,l=Se,c=Y;Y=Se=e;try{i=e.fn(o);}catch(g){return e.pure&&(e.state=ge,e.owned&&e.owned.forEach(Ne),e.owned=null),e.updatedAt=r+1,dt(g)}finally{Y=c,Se=l;}(!e.updatedAt||e.updatedAt<=r)&&(e.updatedAt!=null&&"observers"in e?at(e,i):e.value=i,e.updatedAt=r);}function lt(e){if(e.state===0)return;if(e.state===Te)return Ee(e);if(e.suspense&&zt(e.suspense.inFallback))return e.suspense.effects.push(e);let r=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<Ae);)e.state&&r.push(e);for(let i=r.length-1;i>=0;i--)if(e=r[i],e.state===ge)st(e);else if(e.state===Te){let l=Z;Z=null,Le(()=>Ee(e,r[0])),Z=l;}}function Le(e,o){if(Z)return e();let r=false;(Z=[]),de?r=true:de=[],Ae++;try{let i=e();return Vt(r),i}catch(i){r||(de=null),Z=null,dt(i);}}function Vt(e){if(Z&&(ut(Z),Z=null),e)return;let o=de;de=null,o.length&&Le(()=>Rt(o));}function ut(e){for(let o=0;o<e.length;o++)lt(e[o]);}function Ee(e,o){e.state=0;for(let r=0;r<e.sources.length;r+=1){let i=e.sources[r];if(i.sources){let l=i.state;l===ge?i!==o&&(!i.updatedAt||i.updatedAt<Ae)&<(i):l===Te&&Ee(i,o);}}}function ct(e){for(let o=0;o<e.observers.length;o+=1){let r=e.observers[o];!r.state&&(r.state=Te,r.pure?Z.push(r):de.push(r),r.observers&&ct(r));}}function Ne(e){let o;if(e.sources)for(;e.sources.length;){let r=e.sources.pop(),i=e.sourceSlots.pop(),l=r.observers;if(l&&l.length){let c=l.pop(),g=r.observerSlots.pop();i<l.length&&(c.sourceSlots[g]=i,l[i]=c,r.observerSlots[i]=g);}}if(e.tOwned){for(o=e.tOwned.length-1;o>=0;o--)Ne(e.tOwned[o]);delete e.tOwned;}if(e.owned){for(o=e.owned.length-1;o>=0;o--)Ne(e.owned[o]);e.owned=null;}if(e.cleanups){for(o=e.cleanups.length-1;o>=0;o--)e.cleanups[o]();e.cleanups=null;}e.state=0;}function Ut(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function dt(e,o=Se){throw Ut(e)}var Ye="_$DX_DELEGATE";function R(e,o,r,i){let l,c=()=>{let h=document.createElement("template");return h.innerHTML=e,h.content.firstChild},g=()=>(l||(l=c())).cloneNode(true);return g.cloneNode=g,g}function ue(e,o=window.document){let r=o[Ye]||(o[Ye]=new Set);for(let i=0,l=e.length;i<l;i++){let c=e[i];r.has(c)||(r.add(c),o.addEventListener(c,Kt));}}function Kt(e){let o=e.target,r=`$$${e.type}`,i=e.target,l=e.currentTarget,c=k=>Object.defineProperty(e,"target",{configurable:true,value:k}),g=()=>{let k=o[r];if(k&&!o.disabled){let M=o[`${r}Data`];if(M!==void 0?k.call(o,M,e):k.call(o,e),e.cancelBubble)return}return o.host&&typeof o.host!="string"&&!o.host._$host&&o.contains(e.target)&&c(o.host),true},h=()=>{for(;g()&&(o=o._$host||o.parentNode||o.host););};if(Object.defineProperty(e,"currentTarget",{configurable:true,get(){return o||document}}),e.composedPath){let k=e.composedPath();c(k[0]);for(let M=0;M<k.length-2&&(o=k[M],!!g());M++){if(o._$host){o=o._$host,h();break}if(o.parentNode===l)break}}else h();c(i);}var Wt="0.0.98";var je="-",qt=e=>{let o=Yt(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:i}=e;return {getClassGroupId:l=>{let c=l.split(je);return c[0]===""&&c.length!==1&&c.shift(),pt(c,o)||Gt(l)},getConflictingClassGroupIds:(l,c)=>{let g=r[l]||[];return c&&i[l]?[...g,...i[l]]:g}}},pt=(e,o)=>{if(e.length===0)return o.classGroupId;let r=e[0],i=o.nextPart.get(r),l=i?pt(e.slice(1),i):void 0;if(l)return l;if(o.validators.length===0)return;let c=e.join(je);return o.validators.find(({validator:g})=>g(c))?.classGroupId},Xe=/^\[(.+)\]$/,Gt=e=>{if(Xe.test(e)){let o=Xe.exec(e)[1],r=o?.substring(0,o.indexOf(":"));if(r)return "arbitrary.."+r}},Yt=e=>{let{theme:o,prefix:r}=e,i={nextPart:new Map,validators:[]};return Zt(Object.entries(e.classGroups),r).forEach(([l,c])=>{Ie(c,i,l,o);}),i},Ie=(e,o,r,i)=>{e.forEach(l=>{if(typeof l=="string"){let c=l===""?o:Ze(o,l);c.classGroupId=r;return}if(typeof l=="function"){if(Xt(l)){Ie(l(i),o,r,i);return}o.validators.push({validator:l,classGroupId:r});return}Object.entries(l).forEach(([c,g])=>{Ie(g,Ze(o,c),r,i);});});},Ze=(e,o)=>{let r=e;return o.split(je).forEach(i=>{r.nextPart.has(i)||r.nextPart.set(i,{nextPart:new Map,validators:[]}),r=r.nextPart.get(i);}),r},Xt=e=>e.isThemeGetter,Zt=(e,o)=>o?e.map(([r,i])=>{let l=i.map(c=>typeof c=="string"?o+c:typeof c=="object"?Object.fromEntries(Object.entries(c).map(([g,h])=>[o+g,h])):c);return [r,l]}):e,Jt=e=>{if(e<1)return {get:()=>{},set:()=>{}};let o=0,r=new Map,i=new Map,l=(c,g)=>{r.set(c,g),o++,o>e&&(o=0,i=r,r=new Map);};return {get(c){let g=r.get(c);if(g!==void 0)return g;if((g=i.get(c))!==void 0)return l(c,g),g},set(c,g){r.has(c)?r.set(c,g):l(c,g);}}},ft="!",Qt=e=>{let{separator:o,experimentalParseClassName:r}=e,i=o.length===1,l=o[0],c=o.length,g=h=>{let k=[],M=0,E=0,D;for(let j=0;j<h.length;j++){let W=h[j];if(M===0){if(W===l&&(i||h.slice(j,j+c)===o)){k.push(h.slice(E,j)),E=j+c;continue}if(W==="/"){D=j;continue}}W==="["?M++:W==="]"&&M--;}let T=k.length===0?h:h.substring(E),L=T.startsWith(ft),U=L?T.substring(1):T,B=D&&D>E?D-E:void 0;return {modifiers:k,hasImportantModifier:L,baseClassName:U,maybePostfixModifierPosition:B}};return r?h=>r({className:h,parseClassName:g}):g},en=e=>{if(e.length<=1)return e;let o=[],r=[];return e.forEach(i=>{i[0]==="["?(o.push(...r.sort(),i),r=[]):r.push(i);}),o.push(...r.sort()),o},tn=e=>({cache:Jt(e.cacheSize),parseClassName:Qt(e),...qt(e)}),nn=/\s+/,rn=(e,o)=>{let{parseClassName:r,getClassGroupId:i,getConflictingClassGroupIds:l}=o,c=[],g=e.trim().split(nn),h="";for(let k=g.length-1;k>=0;k-=1){let M=g[k],{modifiers:E,hasImportantModifier:D,baseClassName:T,maybePostfixModifierPosition:L}=r(M),U=!!L,B=i(U?T.substring(0,L):T);if(!B){if(!U){h=M+(h.length>0?" "+h:h);continue}if(B=i(T),!B){h=M+(h.length>0?" "+h:h);continue}U=false;}let j=en(E).join(":"),W=D?j+ft:j,q=W+B;if(c.includes(q))continue;c.push(q);let te=l(B,U);for(let J=0;J<te.length;++J){let X=te[J];c.push(W+X);}h=M+(h.length>0?" "+h:h);}return h};function on(){let e=0,o,r,i="";for(;e<arguments.length;)(o=arguments[e++])&&(r=mt(o))&&(i&&(i+=" "),i+=r);return i}var mt=e=>{if(typeof e=="string")return e;let o,r="";for(let i=0;i<e.length;i++)e[i]&&(o=mt(e[i]))&&(r&&(r+=" "),r+=o);return r};function an(e,...o){let r,i,l,c=g;function g(k){let M=o.reduce((E,D)=>D(E),e());return r=tn(M),i=r.cache.get,l=r.cache.set,c=h,h(k)}function h(k){let M=i(k);if(M)return M;let E=rn(k,r);return l(k,E),E}return function(){return c(on.apply(null,arguments))}}var K=e=>{let o=r=>r[e]||[];return o.isThemeGetter=true,o},gt=/^\[(?:([a-z-]+):)?(.+)\]$/i,sn=/^\d+\/\d+$/,ln=new Set(["px","full","screen"]),un=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,cn=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,dn=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,pn=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,fn=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,re=e=>me(e)||ln.has(e)||sn.test(e),se=e=>he(e,"length",xn),me=e=>!!e&&!Number.isNaN(Number(e)),Oe=e=>he(e,"number",me),we=e=>!!e&&Number.isInteger(Number(e)),mn=e=>e.endsWith("%")&&me(e.slice(0,-1)),I=e=>gt.test(e),le=e=>un.test(e),gn=new Set(["length","size","percentage"]),hn=e=>he(e,gn,ht),bn=e=>he(e,"position",ht),wn=new Set(["image","url"]),yn=e=>he(e,wn,kn),vn=e=>he(e,"",Cn),ye=()=>true,he=(e,o,r)=>{let i=gt.exec(e);return i?i[1]?typeof o=="string"?i[1]===o:o.has(i[1]):r(i[2]):false},xn=e=>cn.test(e)&&!dn.test(e),ht=()=>false,Cn=e=>pn.test(e),kn=e=>fn.test(e),Mn=()=>{let e=K("colors"),o=K("spacing"),r=K("blur"),i=K("brightness"),l=K("borderColor"),c=K("borderRadius"),g=K("borderSpacing"),h=K("borderWidth"),k=K("contrast"),M=K("grayscale"),E=K("hueRotate"),D=K("invert"),T=K("gap"),L=K("gradientColorStops"),U=K("gradientColorStopPositions"),B=K("inset"),j=K("margin"),W=K("opacity"),q=K("padding"),te=K("saturate"),J=K("scale"),X=K("sepia"),ie=K("skew"),ae=K("space"),P=K("translate"),_=()=>["auto","contain","none"],H=()=>["auto","hidden","clip","visible","scroll"],x=()=>["auto",I,o],b=()=>[I,o],f=()=>["",re,se],w=()=>["auto",me,I],S=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],C=()=>["solid","dashed","dotted","double","none"],$=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],O=()=>["start","end","center","between","around","evenly","stretch"],V=()=>["","0",I],F=()=>["auto","avoid","all","avoid-page","page","left","right","column"],p=()=>[me,I];return {cacheSize:500,separator:":",theme:{colors:[ye],spacing:[re,se],blur:["none","",le,I],brightness:p(),borderColor:[e],borderRadius:["none","","full",le,I],borderSpacing:b(),borderWidth:f(),contrast:p(),grayscale:V(),hueRotate:p(),invert:V(),gap:b(),gradientColorStops:[e],gradientColorStopPositions:[mn,se],inset:x(),margin:x(),opacity:p(),padding:b(),saturate:p(),scale:p(),sepia:V(),skew:p(),space:b(),translate:b()},classGroups:{aspect:[{aspect:["auto","square","video",I]}],container:["container"],columns:[{columns:[le]}],"break-after":[{"break-after":F()}],"break-before":[{"break-before":F()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...S(),I]}],overflow:[{overflow:H()}],"overflow-x":[{"overflow-x":H()}],"overflow-y":[{"overflow-y":H()}],overscroll:[{overscroll:_()}],"overscroll-x":[{"overscroll-x":_()}],"overscroll-y":[{"overscroll-y":_()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[B]}],"inset-x":[{"inset-x":[B]}],"inset-y":[{"inset-y":[B]}],start:[{start:[B]}],end:[{end:[B]}],top:[{top:[B]}],right:[{right:[B]}],bottom:[{bottom:[B]}],left:[{left:[B]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",we,I]}],basis:[{basis:x()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",I]}],grow:[{grow:V()}],shrink:[{shrink:V()}],order:[{order:["first","last","none",we,I]}],"grid-cols":[{"grid-cols":[ye]}],"col-start-end":[{col:["auto",{span:["full",we,I]},I]}],"col-start":[{"col-start":w()}],"col-end":[{"col-end":w()}],"grid-rows":[{"grid-rows":[ye]}],"row-start-end":[{row:["auto",{span:[we,I]},I]}],"row-start":[{"row-start":w()}],"row-end":[{"row-end":w()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",I]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",I]}],gap:[{gap:[T]}],"gap-x":[{"gap-x":[T]}],"gap-y":[{"gap-y":[T]}],"justify-content":[{justify:["normal",...O()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...O(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...O(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[q]}],px:[{px:[q]}],py:[{py:[q]}],ps:[{ps:[q]}],pe:[{pe:[q]}],pt:[{pt:[q]}],pr:[{pr:[q]}],pb:[{pb:[q]}],pl:[{pl:[q]}],m:[{m:[j]}],mx:[{mx:[j]}],my:[{my:[j]}],ms:[{ms:[j]}],me:[{me:[j]}],mt:[{mt:[j]}],mr:[{mr:[j]}],mb:[{mb:[j]}],ml:[{ml:[j]}],"space-x":[{"space-x":[ae]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[ae]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",I,o]}],"min-w":[{"min-w":[I,o,"min","max","fit"]}],"max-w":[{"max-w":[I,o,"none","full","min","max","fit","prose",{screen:[le]},le]}],h:[{h:[I,o,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[I,o,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[I,o,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[I,o,"auto","min","max","fit"]}],"font-size":[{text:["base",le,se]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Oe]}],"font-family":[{font:[ye]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",I]}],"line-clamp":[{"line-clamp":["none",me,Oe]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",re,I]}],"list-image":[{"list-image":["none",I]}],"list-style-type":[{list:["none","disc","decimal",I]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[W]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[W]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...C(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",re,se]}],"underline-offset":[{"underline-offset":["auto",re,I]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:b()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",I]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",I]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[W]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...S(),bn]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",hn]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},yn]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[U]}],"gradient-via-pos":[{via:[U]}],"gradient-to-pos":[{to:[U]}],"gradient-from":[{from:[L]}],"gradient-via":[{via:[L]}],"gradient-to":[{to:[L]}],rounded:[{rounded:[c]}],"rounded-s":[{"rounded-s":[c]}],"rounded-e":[{"rounded-e":[c]}],"rounded-t":[{"rounded-t":[c]}],"rounded-r":[{"rounded-r":[c]}],"rounded-b":[{"rounded-b":[c]}],"rounded-l":[{"rounded-l":[c]}],"rounded-ss":[{"rounded-ss":[c]}],"rounded-se":[{"rounded-se":[c]}],"rounded-ee":[{"rounded-ee":[c]}],"rounded-es":[{"rounded-es":[c]}],"rounded-tl":[{"rounded-tl":[c]}],"rounded-tr":[{"rounded-tr":[c]}],"rounded-br":[{"rounded-br":[c]}],"rounded-bl":[{"rounded-bl":[c]}],"border-w":[{border:[h]}],"border-w-x":[{"border-x":[h]}],"border-w-y":[{"border-y":[h]}],"border-w-s":[{"border-s":[h]}],"border-w-e":[{"border-e":[h]}],"border-w-t":[{"border-t":[h]}],"border-w-r":[{"border-r":[h]}],"border-w-b":[{"border-b":[h]}],"border-w-l":[{"border-l":[h]}],"border-opacity":[{"border-opacity":[W]}],"border-style":[{border:[...C(),"hidden"]}],"divide-x":[{"divide-x":[h]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[h]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[W]}],"divide-style":[{divide:C()}],"border-color":[{border:[l]}],"border-color-x":[{"border-x":[l]}],"border-color-y":[{"border-y":[l]}],"border-color-s":[{"border-s":[l]}],"border-color-e":[{"border-e":[l]}],"border-color-t":[{"border-t":[l]}],"border-color-r":[{"border-r":[l]}],"border-color-b":[{"border-b":[l]}],"border-color-l":[{"border-l":[l]}],"divide-color":[{divide:[l]}],"outline-style":[{outline:["",...C()]}],"outline-offset":[{"outline-offset":[re,I]}],"outline-w":[{outline:[re,se]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:f()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[W]}],"ring-offset-w":[{"ring-offset":[re,se]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",le,vn]}],"shadow-color":[{shadow:[ye]}],opacity:[{opacity:[W]}],"mix-blend":[{"mix-blend":[...$(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":$()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[i]}],contrast:[{contrast:[k]}],"drop-shadow":[{"drop-shadow":["","none",le,I]}],grayscale:[{grayscale:[M]}],"hue-rotate":[{"hue-rotate":[E]}],invert:[{invert:[D]}],saturate:[{saturate:[te]}],sepia:[{sepia:[X]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[i]}],"backdrop-contrast":[{"backdrop-contrast":[k]}],"backdrop-grayscale":[{"backdrop-grayscale":[M]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[E]}],"backdrop-invert":[{"backdrop-invert":[D]}],"backdrop-opacity":[{"backdrop-opacity":[W]}],"backdrop-saturate":[{"backdrop-saturate":[te]}],"backdrop-sepia":[{"backdrop-sepia":[X]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[g]}],"border-spacing-x":[{"border-spacing-x":[g]}],"border-spacing-y":[{"border-spacing-y":[g]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",I]}],duration:[{duration:p()}],ease:[{ease:["linear","in","out","in-out",I]}],delay:[{delay:p()}],animate:[{animate:["none","spin","ping","pulse","bounce",I]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[J]}],"scale-x":[{"scale-x":[J]}],"scale-y":[{"scale-y":[J]}],rotate:[{rotate:[we,I]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"skew-x":[{"skew-x":[ie]}],"skew-y":[{"skew-y":[ie]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",I]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",I]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":b()}],"scroll-mx":[{"scroll-mx":b()}],"scroll-my":[{"scroll-my":b()}],"scroll-ms":[{"scroll-ms":b()}],"scroll-me":[{"scroll-me":b()}],"scroll-mt":[{"scroll-mt":b()}],"scroll-mr":[{"scroll-mr":b()}],"scroll-mb":[{"scroll-mb":b()}],"scroll-ml":[{"scroll-ml":b()}],"scroll-p":[{"scroll-p":b()}],"scroll-px":[{"scroll-px":b()}],"scroll-py":[{"scroll-py":b()}],"scroll-ps":[{"scroll-ps":b()}],"scroll-pe":[{"scroll-pe":b()}],"scroll-pt":[{"scroll-pt":b()}],"scroll-pr":[{"scroll-pr":b()}],"scroll-pb":[{"scroll-pb":b()}],"scroll-pl":[{"scroll-pl":b()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",I]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[re,se,Oe]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};an(Mn);R("<div style=overflow:visible>");R("<canvas data-react-grab-crosshair style=position:fixed;top:0;left:0;pointer-events:none;z-index:2147483645>");R('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 22 19"fill=none><path d="M6.76263 18.6626C7.48251 18.6626 7.95474 18.1682 7.95474 17.4895C7.95474 17.1207 7.80474 16.8576 7.58683 16.6361L5.3018 14.4137L2.84621 12.3589L2.44374 13.0037L5.92137 13.1622H17.9232C20.4842 13.1622 21.593 12.021 21.593 9.47237V3.66983C21.593 1.10875 20.4842 0 17.9232 0H12.5414C11.8179 0 11.3018 0.545895 11.3018 1.21695C11.3018 1.888 11.8179 2.43389 12.5414 2.43389H17.8424C18.7937 2.43389 19.1897 2.83653 19.1897 3.78784V9.35747C19.1897 10.3257 18.7937 10.7314 17.8424 10.7314H5.92137L2.44374 10.8832L2.84621 11.5281L5.3018 9.47993L7.58683 7.2606C7.80474 7.03914 7.95474 6.7693 7.95474 6.40049C7.95474 5.72854 7.48251 5.22747 6.76263 5.22747C6.46129 5.22747 6.12975 5.36905 5.89231 5.6096L0.376815 11.0425C0.134921 11.2777 0 11.6141 0 11.9452C0 12.2728 0.134921 12.6158 0.376815 12.848L5.89231 18.2871C6.12975 18.5276 6.46129 18.6626 6.76263 18.6626Z"fill=currentColor>');R('<div class="absolute w-0 h-0"style="border-left:8px solid transparent;border-right:8px solid transparent">');R('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2><path d="M12 6H6a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-6"></path><path d="M11 13l9-9"></path><path d="M15 4h5v5">');R("<div><span>");ue(["click"]);R("<span class=text-black/50>");R('<div role=button><div class="text-[13px] leading-4 shrink-0 font-sans font-medium w-fit h-fit"><span class=text-black>');ue(["click"]);R('<div class="[font-synthesis:none] contain-layout shrink-0 flex flex-col items-start px-2 py-[5px] w-auto h-fit self-stretch [border-top-width:0.5px] border-t-solid border-t-[#D9D9D9] antialiased rounded-t-none rounded-b-sm -mt-px">');R('<div class="contain-layout shrink-0 flex items-center justify-end gap-[5px] w-full h-fit"><button data-react-grab-discard-no class="contain-layout shrink-0 flex items-center justify-center px-[3px] py-px rounded-sm bg-white [border-width:0.5px] border-solid border-[#B3B3B3] cursor-pointer transition-all hover:bg-[#F5F5F5] h-[17px]"><span class="text-black text-[13px] leading-3.5 font-sans font-medium">No</span></button><button data-react-grab-discard-yes class="contain-layout shrink-0 flex items-center justify-center gap-1 px-[3px] py-px rounded-sm bg-white [border-width:0.5px] border-solid border-[#7e0002] cursor-pointer transition-all hover:bg-[#FEF2F2] h-[17px]"><span class="text-[#B91C1C] text-[13px] leading-3.5 font-sans font-medium">Yes');R('<div data-react-grab-discard-prompt class="contain-layout shrink-0 flex flex-col justify-center items-end gap-1 w-fit h-fit"><div class="contain-layout shrink-0 flex items-center gap-1 pt-1 px-1.5 w-full h-fit"><span class="text-black text-[13px] leading-4 shrink-0 font-sans font-medium w-fit h-fit">Discard?');ue(["pointerdown","click"]);R('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none><path d="M17.65 6.35C16.2 4.9 14.21 4 12 4C7.58 4 4.01 7.58 4.01 12C4.01 16.42 7.58 20 12 20C15.73 20 18.84 17.45 19.73 14H17.65C16.83 16.33 14.61 18 12 18C8.69 18 6 15.31 6 12C6 8.69 8.69 6 12 6C13.66 6 15.14 6.69 16.22 7.78L13 11H20V4L17.65 6.35Z"fill=currentColor>');R('<div class="contain-layout shrink-0 flex items-center justify-end gap-[5px] w-full h-fit"><button data-react-grab-retry class="contain-layout shrink-0 flex items-center justify-center gap-1 px-[3px] py-px rounded-sm bg-white [border-width:0.5px] border-solid border-[#B3B3B3] cursor-pointer transition-all hover:bg-[#F5F5F5] h-[17px]"><span class="text-black text-[13px] leading-3.5 font-sans font-medium">Retry</span></button><button data-react-grab-error-ok class="contain-layout shrink-0 flex items-center justify-center gap-1 px-[3px] py-px rounded-sm bg-white [border-width:0.5px] border-solid border-[#B3B3B3] cursor-pointer transition-all hover:bg-[#F5F5F5] h-[17px]"><span class="text-black text-[13px] leading-3.5 font-sans font-medium">Ok');R('<div data-react-grab-error class="contain-layout shrink-0 flex flex-col justify-center items-end gap-1 w-fit h-fit max-w-[280px]"><div class="contain-layout shrink-0 flex items-center gap-1 px-1.5 w-full h-fit"><span class="text-[#B91C1C] text-[13px] leading-4 font-sans font-medium">');ue(["pointerdown","click"]);R('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><circle cx=5 cy=12 r=2></circle><circle cx=12 cy=12 r=2></circle><circle cx=19 cy=12 r=2>');R('<button data-react-grab-ignore-events data-react-grab-more-options class="flex items-center justify-center size-[18px] rounded-sm cursor-pointer bg-transparent hover:bg-black/10 text-black/30 hover:text-black border-none outline-none p-0 shrink-0">');R('<button data-react-grab-undo class="contain-layout shrink-0 flex items-center justify-center px-[3px] py-px rounded-sm bg-white [border-width:0.5px] border-solid border-[#7e0002] cursor-pointer transition-all hover:bg-[#FEF2F2] h-[17px]"><span class="text-[#B91C1C] text-[13px] leading-3.5 font-sans font-medium">Undo');R('<button data-react-grab-dismiss class="contain-layout shrink-0 flex items-center justify-center gap-1 px-[3px] py-px rounded-sm bg-white [border-width:0.5px] border-solid border-[#B3B3B3] cursor-pointer transition-all hover:bg-[#F5F5F5] h-[17px]"><span class="text-black text-[13px] leading-3.5 font-sans font-medium">');R('<div class="contain-layout shrink-0 flex items-center justify-between gap-2 pt-1.5 pb-1 px-1.5 w-full h-fit"><div class="contain-layout shrink-0 flex items-center gap-1 h-fit"><span class="text-black text-[13px] leading-4 shrink-0 font-sans font-medium w-fit h-fit tabular-nums"></span></div><div class="contain-layout shrink-0 flex items-center gap-[5px] h-fit">');R('<div class="contain-layout shrink-0 flex items-center gap-1 pt-1.5 pb-1 px-1.5 w-full h-fit"><span class="text-black text-[13px] leading-4 shrink-0 font-sans font-medium w-fit h-fit tabular-nums">');R('<div class="shrink-0 flex justify-between items-end w-full min-h-4"><textarea data-react-grab-ignore-events data-react-grab-followup-input class="text-black text-[13px] leading-4 font-medium bg-transparent border-none outline-none resize-none flex-1 p-0 m-0 wrap-break-word overflow-y-auto"rows=1 style=field-sizing:content;min-height:16px;max-height:95px;scrollbar-width:none></textarea><button data-react-grab-followup-submit class="contain-layout shrink-0 flex flex-col items-start px-[3px] py-[3px] rounded-sm bg-white [border-width:0.5px] border-solid border-[#B3B3B3] size-fit cursor-pointer transition-all hover:scale-105 ml-1">');R('<div data-react-grab-completion class="[font-synthesis:none] contain-layout shrink-0 flex flex-col justify-center items-end rounded-sm bg-white antialiased w-fit h-fit max-w-[280px] transition-opacity duration-100 ease-out">');ue(["pointerdown","click","input","keydown"]);R('<button data-react-grab-ignore-events data-react-grab-abort class="contain-layout shrink-0 flex flex-col items-start rounded-sm bg-white [border-width:0.5px] border-solid border-[#B3B3B3] p-1 size-fit cursor-pointer ml-1 transition-none hover:scale-105"><div data-react-grab-ignore-events class="shrink-0 w-[7px] h-[7px] rounded-[1px] bg-black pointer-events-none">');R('<div class="shrink-0 flex justify-between items-end w-full min-h-4"><textarea data-react-grab-ignore-events class="text-black text-[13px] leading-4 font-medium bg-transparent border-none outline-none resize-none flex-1 p-0 m-0 opacity-50 wrap-break-word overflow-y-auto"placeholder="type to edit"rows=1 disabled style=field-sizing:content;min-height:16px;max-height:95px;scrollbar-width:none>');R('<div class="contain-layout shrink-0 flex flex-col justify-center items-start gap-1 w-fit h-fit max-w-[280px]"><div class="contain-layout shrink-0 flex items-center gap-1 py-1 px-1.5 w-auto h-fit"><span class="text-[13px] leading-4 font-sans font-medium w-auto h-fit whitespace-normal text-[#71717a] animate-pulse tabular-nums">');R('<div class="contain-layout shrink-0 flex flex-col justify-center items-start gap-1 w-fit h-fit"><div class="contain-layout shrink-0 flex items-center gap-1 pt-1 w-fit h-fit pl-1.5 pr-1">');R('<div class="shrink-0 flex items-center gap-0.5 w-full mb-0.5 overflow-hidden"><span class="text-[#a1a1aa] text-[10px] leading-3 shrink-0">>previously:</span><span class="text-[#a1a1aa] text-[10px] leading-3 italic truncate whitespace-nowrap">');R('<div class="shrink-0 flex justify-between items-end w-full min-h-4"><textarea data-react-grab-ignore-events data-react-grab-input class="text-black text-[13px] leading-4 font-medium bg-transparent border-none outline-none resize-none flex-1 p-0 m-0 wrap-break-word overflow-y-auto"placeholder="type prompt"rows=1 style=field-sizing:content;min-height:16px;max-height:95px;scrollbar-width:none></textarea><button data-react-grab-submit class="contain-layout shrink-0 flex flex-col items-start px-[3px] py-[3px] rounded-sm bg-white [border-width:0.5px] border-solid border-[#B3B3B3] size-fit cursor-pointer transition-all hover:scale-105 ml-1">');R('<div class="contain-layout shrink-0 flex flex-col justify-center items-start gap-1 w-fit h-fit max-w-[280px]"><div class="contain-layout shrink-0 flex items-center gap-1 pt-1 w-fit h-fit pl-1.5 pr-1">');R('<div data-react-grab-ignore-events data-react-grab-selection-label class="fixed font-sans text-[13px] antialiased transition-opacity duration-100 ease-out filter-[drop-shadow(0px_0px_4px_#51515180)] select-none"style=z-index:2147483647><div class="[font-synthesis:none] contain-layout flex items-center gap-[5px] rounded-sm bg-white antialiased w-fit h-fit p-0">');ue(["pointerdown","mousedown","click","pointerup","input","keydown"]);R('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 18 18"fill=currentColor><path opacity=0.4 d="M7.65631 10.9565C7.31061 10.0014 7.54012 8.96635 8.25592 8.25195C8.74522 7.76615 9.38771 7.49951 10.0694 7.49951C10.3682 7.49951 10.6641 7.55171 10.9483 7.65381L16.0001 9.49902V4.75C16.0001 3.2334 14.7667 2 13.2501 2H4.75012C3.23352 2 2.00012 3.2334 2.00012 4.75V13.25C2.00012 14.7666 3.23352 16 4.75012 16H9.49962L7.65631 10.9565Z"></path><path d="M17.296 11.5694L10.4415 9.06545C10.0431 8.92235 9.61441 9.01658 9.31551 9.31338C9.01671 9.61168 8.92101 10.0429 9.06551 10.4413L11.5704 17.2948C11.7247 17.7191 12.128 18.0004 12.5772 18.0004C12.585 18.0004 12.5918 17.9999 12.5987 17.9999C13.0577 17.9906 13.4591 17.6913 13.5987 17.2543L14.4854 14.4857L17.2559 13.5985C17.6914 13.4589 17.9903 13.057 18 12.599C18.0097 12.141 17.7267 11.7276 17.296 11.5694Z">');R('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2.5 stroke-linecap=round stroke-linejoin=round><path d="m18 15-6-6-6 6">');R('<div data-react-grab-ignore-events data-react-grab-toolbar style=z-index:2147483647><div><div><button data-react-grab-ignore-events data-react-grab-toolbar-toggle class="contain-layout shrink-0 flex items-center justify-center cursor-pointer transition-all hover:scale-105"></button></div><button data-react-grab-ignore-events data-react-grab-toolbar-collapse class="contain-layout shrink-0 flex items-center justify-center cursor-pointer transition-all hover:scale-105">');ue(["pointerdown","pointermove","pointerup","click"]);R('<div class="flex flex-col w-[calc(100%+16px)] -mx-2 -my-[5px]">');R('<div data-react-grab-ignore-events data-react-grab-context-menu class="fixed font-sans text-[13px] antialiased transition-opacity duration-150 ease-out filter-[drop-shadow(0px_0px_4px_#51515180)] select-none"style=z-index:2147483647;pointer-events:auto><div class="[font-synthesis:none] contain-layout flex flex-col justify-center items-start gap-1 rounded-sm bg-white antialiased w-fit h-fit min-w-[100px]"><div class="contain-layout shrink-0 flex items-center gap-1 pt-1 w-fit h-fit pl-1.5 pr-1">');R('<span class="text-[11px] font-sans text-black/50 ml-4">');R('<button data-react-grab-ignore-events class="contain-layout flex items-center justify-between w-full px-2 py-1 cursor-pointer transition-colors hover:bg-black/5 text-left border-none bg-transparent disabled:opacity-40 disabled:cursor-default disabled:hover:bg-transparent"><span class="text-[13px] leading-4 font-sans font-medium text-black">');ue(["pointerdown","mousedown","click","contextmenu"]);var Sn="0.5.28",bt=`bippy-${Sn}`,Je=Object.defineProperty,Tn=Object.prototype.hasOwnProperty,xe=()=>{},wt=e=>{try{Function.prototype.toString.call(e).indexOf("^_^")>-1&&setTimeout(()=>{throw Error("React is running in production mode, but dead code elimination has not been applied. Read how to correctly configure React for production: https://reactjs.org/link/perf-use-production-build")});}catch{}},yt=(e=be())=>"getFiberRoots"in e,vt=false,Qe,Be=(e=be())=>vt?true:(typeof e.inject=="function"&&(Qe=e.inject.toString()),!!Qe?.includes("(injected)")),Re=new Set,Ce=new Set,En=e=>{let o=new Map,r=0,i={_instrumentationIsActive:false,_instrumentationSource:bt,checkDCE:wt,hasUnsupportedRendererAttached:false,inject(l){let c=++r;return o.set(c,l),Ce.add(l),i._instrumentationIsActive||(i._instrumentationIsActive=true,Re.forEach(g=>g())),c},on:xe,onCommitFiberRoot:xe,onCommitFiberUnmount:xe,onPostCommitFiberRoot:xe,renderers:o,supportsFiber:true,supportsFlight:true};try{Je(globalThis,"__REACT_DEVTOOLS_GLOBAL_HOOK__",{configurable:!0,enumerable:!0,get(){return i},set(g){if(g&&typeof g=="object"){let h=i.renderers;i=g,h.size>0&&(h.forEach((k,M)=>{Ce.add(k),g.renderers.set(M,k);}),Fe(e));}}});let l=window.hasOwnProperty,c=!1;Je(window,"hasOwnProperty",{configurable:!0,value:function(...g){try{if(!c&&g[0]==="__REACT_DEVTOOLS_GLOBAL_HOOK__")return globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__=void 0,c=!0,-0}catch{}return l.apply(this,g)},writable:!0});}catch{Fe(e);}return i},Fe=e=>{try{let o=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!o)return;if(!o._instrumentationSource){o.checkDCE=wt,o.supportsFiber=!0,o.supportsFlight=!0,o.hasUnsupportedRendererAttached=!1,o._instrumentationSource=bt,o._instrumentationIsActive=!1;let r=yt(o);if(r||(o.on=xe),o.renderers.size){o._instrumentationIsActive=!0,Re.forEach(c=>c());return}let i=o.inject,l=Be(o);l&&!r&&(vt=!0,o.inject({scheduleRefresh(){}})&&(o._instrumentationIsActive=!0)),o.inject=c=>{let g=i(c);return Ce.add(c),l&&o.renderers.set(g,c),o._instrumentationIsActive=!0,Re.forEach(h=>h()),g};}(o.renderers.size||o._instrumentationIsActive||Be())&&e?.();}catch{}},Nn=()=>Tn.call(globalThis,"__REACT_DEVTOOLS_GLOBAL_HOOK__"),be=e=>Nn()?(Fe(e),globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__):En(e),An=()=>!!(typeof window<"u"&&(window.document?.createElement||window.navigator?.product==="ReactNative")),Ln=()=>{try{An()&&be();}catch{}},Pn=0,Dn=1,On=5,Hn=11,$n=13,In=15,Bn=16,Rn=19,Fn=26,zn=27,jn=28,_n=30;function Vn(e,o,r=false){if(!e)return null;let i=o(e);if(i instanceof Promise)return (async()=>{if(await i===true)return e;let c=r?e.return:e.child;for(;c;){let g=await Ct(c,o,r);if(g)return g;c=r?null:c.sibling;}return null})();if(i===true)return e;let l=r?e.return:e.child;for(;l;){let c=xt(l,o,r);if(c)return c;l=r?null:l.sibling;}return null}var xt=(e,o,r=false)=>{if(!e)return null;if(o(e)===true)return e;let i=r?e.return:e.child;for(;i;){let l=xt(i,o,r);if(l)return l;i=r?null:i.sibling;}return null},Ct=async(e,o,r=false)=>{if(!e)return null;if(await o(e)===true)return e;let i=r?e.return:e.child;for(;i;){let l=await Ct(i,o,r);if(l)return l;i=r?null:i.sibling;}return null},kt=e=>{let o=e;return typeof o=="function"?o:typeof o=="object"&&o?kt(o.type||o.render):null},ze=e=>{let o=e;if(typeof o=="string")return o;if(typeof o!="function"&&!(typeof o=="object"&&o))return null;let r=o.displayName||o.name||null;if(r)return r;let i=kt(o);return i&&(i.displayName||i.name)||null},Mt=()=>!!be()._instrumentationIsActive||yt()||Be(),Un=e=>{let o=be();for(let r of o.renderers.values())try{let i=r.findFiberByHostInstance?.(e);if(i)return i}catch{}if(typeof e=="object"&&e){if("_reactRootContainer"in e)return e._reactRootContainer?._internalRoot?.current?.child;for(let r in e)if(r.startsWith("__reactContainer$")||r.startsWith("__reactInternalInstance$")||r.startsWith("__reactFiber"))return e[r]||null}return null},Kn=Object.create,St=Object.defineProperty,Wn=Object.getOwnPropertyDescriptor,qn=Object.getOwnPropertyNames,Gn=Object.getPrototypeOf,Yn=Object.prototype.hasOwnProperty,Xn=(e,o)=>()=>(o||e((o={exports:{}}).exports,o),o.exports),Zn=(e,o,r,i)=>{if(o&&typeof o=="object"||typeof o=="function")for(var l=qn(o),c=0,g=l.length,h;c<g;c++)h=l[c],!Yn.call(e,h)&&h!==r&&St(e,h,{get:(k=>o[k]).bind(null,h),enumerable:!(i=Wn(o,h))||i.enumerable});return e},Jn=(e,o,r)=>(r=e==null?{}:Kn(Gn(e)),Zn(St(r,"default",{value:e,enumerable:true}),e)),et=/^[a-zA-Z][a-zA-Z\d+\-.]*:/,Qn=["rsc://","file:///","webpack://","webpack-internal://","node:","turbopack://","metro://","/app-pages-browser/"],tt="about://React/",er=["<anonymous>","eval",""],tr=/\.(jsx|tsx|ts|js)$/,nr=/(\.min|bundle|chunk|vendor|vendors|runtime|polyfill|polyfills)\.(js|mjs|cjs)$|(chunk|bundle|vendor|vendors|runtime|polyfill|polyfills|framework|app|main|index)[-_.][A-Za-z0-9_-]{4,}\.(js|mjs|cjs)$|[\da-f]{8,}\.(js|mjs|cjs)$|[-_.][\da-f]{20,}\.(js|mjs|cjs)$|\/dist\/|\/build\/|\/.next\/|\/out\/|\/node_modules\/|\.webpack\.|\.vite\.|\.turbopack\./i,rr=/^\?[\w~.\-]+(?:=[^&#]*)?(?:&[\w~.\-]+(?:=[^&#]*)?)*$/,Tt="(at Server)",or=/(^|@)\S+:\d+/,ir=/^\s*at .*(\S+:\d+|\(native\))/m,ar=/^(eval@)?(\[native code\])?$/,Et=(e,o)=>{{let r=e.split(`
|
|
2
|
+
`),i=[];for(let l of r)if(/^\s*at\s+/.test(l)){let c=sr(l,void 0)[0];c&&i.push(c);}else if(/^\s*in\s+/.test(l)){let c=l.replace(/^\s*in\s+/,"").replace(/\s*\(at .*\)$/,"");i.push({functionName:c,source:l});}else if(l.match(or)){let c=lr(l,void 0)[0];c&&i.push(c);}return _e(i,o)}},Nt=e=>{if(!e.includes(":"))return [e,void 0,void 0];let o=e.startsWith("(")&&/:\d+\)$/.test(e),r=o?e.slice(1,-1):e,i=/(.+?)(?::(\d+))?(?::(\d+))?$/,l=i.exec(r);return l?[l[1],l[2]||void 0,l[3]||void 0]:[r,void 0,void 0]},_e=(e,o)=>o&&o.slice!=null?Array.isArray(o.slice)?e.slice(o.slice[0],o.slice[1]):e.slice(0,o.slice):e,sr=(e,o)=>_e(e.split(`
|
|
3
|
+
`).filter(r=>!!r.match(ir)),o).map(r=>{let i=r;i.includes("(eval ")&&(i=i.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));let l=i.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),c=l.match(/ (\(.+\)$)/);l=c?l.replace(c[0],""):l;let g=Nt(c?c[1]:l),h=c&&l||void 0,k=["eval","<anonymous>"].includes(g[0])?void 0:g[0];return {functionName:h,fileName:k,lineNumber:g[1]?+g[1]:void 0,columnNumber:g[2]?+g[2]:void 0,source:i}}),lr=(e,o)=>_e(e.split(`
|
|
4
|
+
`).filter(r=>!r.match(ar)),o).map(r=>{let i=r;if(i.includes(" > eval")&&(i=i.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),!i.includes("@")&&!i.includes(":"))return {functionName:i};{let l=/(([^\n\r"\u2028\u2029]*".[^\n\r"\u2028\u2029]*"[^\n\r@\u2028\u2029]*(?:@[^\n\r"\u2028\u2029]*"[^\n\r@\u2028\u2029]*)*(?:[\n\r\u2028\u2029][^@]*)?)?[^@]*)@/,c=i.match(l),g=c&&c[1]?c[1]:void 0,h=Nt(i.replace(l,""));return {functionName:g,fileName:h[0],lineNumber:h[1]?+h[1]:void 0,columnNumber:h[2]?+h[2]:void 0,source:i}}}),ur=Xn((e,o)=>{(function(r,i){typeof e=="object"&&o!==void 0?i(e):typeof define=="function"&&define.amd?define(["exports"],i):(r=typeof globalThis<"u"?globalThis:r||self,i(r.sourcemapCodec={}));})(void 0,function(r){let i=44,l=59,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",g=new Uint8Array(64),h=new Uint8Array(128);for(let x=0;x<c.length;x++){let b=c.charCodeAt(x);g[x]=b,h[b]=x;}function k(x,b){let f=0,w=0,S=0;do{let $=x.next();S=h[$],f|=(S&31)<<w,w+=5;}while(S&32);let C=f&1;return f>>>=1,C&&(f=-2147483648|-f),b+f}function M(x,b,f){let w=b-f;w=w<0?-w<<1|1:w<<1;do{let S=w&31;w>>>=5,w>0&&(S|=32),x.write(g[S]);}while(w>0);return b}function E(x,b){return x.pos>=b?false:x.peek()!==i}let D=1024*16,T=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(x){return Buffer.from(x.buffer,x.byteOffset,x.byteLength).toString()}}:{decode(x){let b="";for(let f=0;f<x.length;f++)b+=String.fromCharCode(x[f]);return b}};class L{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(D);}write(b){let{buffer:f}=this;f[this.pos++]=b,this.pos===D&&(this.out+=T.decode(f),this.pos=0);}flush(){let{buffer:b,out:f,pos:w}=this;return w>0?f+T.decode(b.subarray(0,w)):f}}class U{constructor(b){this.pos=0,this.buffer=b;}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(b){let{buffer:f,pos:w}=this,S=f.indexOf(b,w);return S===-1?f.length:S}}let B=[];function j(x){let{length:b}=x,f=new U(x),w=[],S=[],C=0;for(;f.pos<b;f.pos++){C=k(f,C);let $=k(f,0);if(!E(f,b)){let u=S.pop();u[2]=C,u[3]=$;continue}let O=k(f,0),V=k(f,0),F=V&1,p=F?[C,$,0,0,O,k(f,0)]:[C,$,0,0,O],v=B;if(E(f,b)){v=[];do{let u=k(f,0);v.push(u);}while(E(f,b))}p.vars=v,w.push(p),S.push(p);}return w}function W(x){let b=new L;for(let f=0;f<x.length;)f=q(x,f,b,[0]);return b.flush()}function q(x,b,f,w){let S=x[b],{0:C,1:$,2:O,3:V,4:F,vars:p}=S;b>0&&f.write(i),w[0]=M(f,C,w[0]),M(f,$,0),M(f,F,0);let v=S.length===6?1:0;M(f,v,0),S.length===6&&M(f,S[5],0);for(let u of p)M(f,u,0);for(b++;b<x.length;){let u=x[b],{0:t,1:n}=u;if(t>O||t===O&&n>=V)break;b=q(x,b,f,w);}return f.write(i),w[0]=M(f,O,w[0]),M(f,V,0),b}function te(x){let{length:b}=x,f=new U(x),w=[],S=[],C=0,$=0,O=0,V=0,F=0,p=0,v=0,u=0;do{let t=f.indexOf(";"),n=0;for(;f.pos<t;f.pos++){if(n=k(f,n),!E(f,t)){let N=S.pop();N[2]=C,N[3]=n;continue}let a=k(f,0),s=a&1,d=a&2,m=a&4,y=null,A=B,z;if(s){let N=k(f,$);O=k(f,$===N?O:0),$=N,z=[C,n,0,0,N,O];}else z=[C,n,0,0];if(z.isScope=!!m,d){let N=V,Q=F;V=k(f,V);let ne=N===V;F=k(f,ne?F:0),p=k(f,ne&&Q===F?p:0),y=[V,F,p];}if(z.callsite=y,E(f,t)){A=[];do{v=C,u=n;let N=k(f,0),Q;if(N<-1){Q=[[k(f,0)]];for(let ne=-1;ne>N;ne--){let pe=v;v=k(f,v),u=k(f,v===pe?u:0);let De=k(f,0);Q.push([De,v,u]);}}else Q=[[N]];A.push(Q);}while(E(f,t))}z.bindings=A,w.push(z),S.push(z);}C++,f.pos=t+1;}while(f.pos<b);return w}function J(x){if(x.length===0)return "";let b=new L;for(let f=0;f<x.length;)f=X(x,f,b,[0,0,0,0,0,0,0]);return b.flush()}function X(x,b,f,w){let S=x[b],{0:C,1:$,2:O,3:V,isScope:F,callsite:p,bindings:v}=S;w[0]<C?(ie(f,w[0],C),w[0]=C,w[1]=0):b>0&&f.write(i),w[1]=M(f,S[1],w[1]);let u=(S.length===6?1:0)|(p?2:0)|(F?4:0);if(M(f,u,0),S.length===6){let{4:t,5:n}=S;t!==w[2]&&(w[3]=0),w[2]=M(f,t,w[2]),w[3]=M(f,n,w[3]);}if(p){let{0:t,1:n,2:a}=S.callsite;t===w[4]?n!==w[5]&&(w[6]=0):(w[5]=0,w[6]=0),w[4]=M(f,t,w[4]),w[5]=M(f,n,w[5]),w[6]=M(f,a,w[6]);}if(v)for(let t of v){t.length>1&&M(f,-t.length,0);let n=t[0][0];M(f,n,0);let a=C,s=$;for(let d=1;d<t.length;d++){let m=t[d];a=M(f,m[1],a),s=M(f,m[2],s),M(f,m[0],0);}}for(b++;b<x.length;){let t=x[b],{0:n,1:a}=t;if(n>O||n===O&&a>=V)break;b=X(x,b,f,w);}return w[0]<O?(ie(f,w[0],O),w[0]=O,w[1]=0):f.write(i),w[1]=M(f,V,w[1]),b}function ie(x,b,f){do x.write(l);while(++b<f)}function ae(x){let{length:b}=x,f=new U(x),w=[],S=0,C=0,$=0,O=0,V=0;do{let F=f.indexOf(";"),p=[],v=true,u=0;for(S=0;f.pos<F;){let t;S=k(f,S),S<u&&(v=false),u=S,E(f,F)?(C=k(f,C),$=k(f,$),O=k(f,O),E(f,F)?(V=k(f,V),t=[S,C,$,O,V]):t=[S,C,$,O]):t=[S],p.push(t),f.pos++;}v||P(p),w.push(p),f.pos=F+1;}while(f.pos<=b);return w}function P(x){x.sort(_);}function _(x,b){return x[0]-b[0]}function H(x){let b=new L,f=0,w=0,S=0,C=0;for(let $=0;$<x.length;$++){let O=x[$];if($>0&&b.write(l),O.length===0)continue;let V=0;for(let F=0;F<O.length;F++){let p=O[F];F>0&&b.write(i),V=M(b,p[0],V),p.length!==1&&(f=M(b,p[1],f),w=M(b,p[2],w),S=M(b,p[3],S),p.length!==4&&(C=M(b,p[4],C)));}}return b.flush()}r.decode=ae,r.decodeGeneratedRanges=te,r.decodeOriginalScopes=j,r.encode=H,r.encodeGeneratedRanges=J,r.encodeOriginalScopes=W,Object.defineProperty(r,"__esModule",{value:true});});}),At=Jn(ur()),Lt=/^[a-zA-Z][a-zA-Z\d+\-.]*:/,cr=/^data:application\/json[^,]+base64,/,dr=/(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^*]+?)[ \t]*(?:\*\/)[ \t]*$)/,Pt=typeof WeakRef<"u",ve=new Map,Me=new Map,pr=e=>Pt&&e instanceof WeakRef,nt=(e,o,r,i)=>{if(r<0||r>=e.length)return null;let l=e[r];if(!l||l.length===0)return null;let c=null;for(let E of l)if(E[0]<=i)c=E;else break;if(!c||c.length<4)return null;let[,g,h,k]=c;if(g===void 0||h===void 0||k===void 0)return null;let M=o[g];return M?{columnNumber:k,fileName:M,lineNumber:h+1}:null},fr=(e,o,r)=>{if(e.sections){let i=null;for(let g of e.sections)if(o>g.offset.line||o===g.offset.line&&r>=g.offset.column)i=g;else break;if(!i)return null;let l=o-i.offset.line,c=o===i.offset.line?r-i.offset.column:r;return nt(i.map.mappings,i.map.sources,l,c)}return nt(e.mappings,e.sources,o-1,r)},mr=(e,o)=>{let r=o.split(`
|
|
5
|
+
`),i;for(let c=r.length-1;c>=0&&!i;c--){let g=r[c].match(dr);g&&(i=g[1]||g[2]);}if(!i)return null;let l=Lt.test(i);if(!(cr.test(i)||l||i.startsWith("/"))){let c=e.split("/");c[c.length-1]=i,i=c.join("/");}return i},gr=e=>({file:e.file,mappings:(0, At.decode)(e.mappings),names:e.names,sourceRoot:e.sourceRoot,sources:e.sources,sourcesContent:e.sourcesContent,version:3}),hr=e=>{let o=e.sections.map(({map:i,offset:l})=>({map:{...i,mappings:(0, At.decode)(i.mappings)},offset:l})),r=new Set;for(let i of o)for(let l of i.map.sources)r.add(l);return {file:e.file,mappings:[],names:[],sections:o,sourceRoot:void 0,sources:Array.from(r),sourcesContent:void 0,version:3}},rt=e=>{if(!e)return false;let o=e.trim();if(!o)return false;let r=o.match(Lt);if(!r)return true;let i=r[0].toLowerCase();return i==="http:"||i==="https:"},br=async(e,o=fetch)=>{if(!rt(e))return null;let r;try{let l=await o(e);if(!l.ok)return null;r=await l.text();}catch{return null}if(!r)return null;let i=mr(e,r);if(!i||!rt(i))return null;try{let l=await o(i);if(!l.ok)return null;let c=await l.json();return "sections"in c?hr(c):gr(c)}catch{return null}},wr=async(e,o=true,r)=>{if(o&&ve.has(e)){let c=ve.get(e);if(c==null)return null;if(pr(c)){let g=c.deref();if(g)return g;ve.delete(e);}else return c}if(o&&Me.has(e))return Me.get(e);let i=br(e,r);o&&Me.set(e,i);let l=await i;return o&&Me.delete(e),o&&(l===null?ve.set(e,null):ve.set(e,Pt?new WeakRef(l):l)),l},yr=async(e,o=true,r)=>await Promise.all(e.map(async i=>{if(!i.fileName)return i;let l=await wr(i.fileName,o,r);if(!l||typeof i.lineNumber!="number"||typeof i.columnNumber!="number")return i;let c=fr(l,i.lineNumber,i.columnNumber);return c?{...i,source:c.fileName&&i.source?i.source.replace(i.fileName,c.fileName):i.source,fileName:c.fileName,lineNumber:c.lineNumber,columnNumber:c.columnNumber,isSymbolicated:true}:i})),vr=e=>e._debugStack instanceof Error&&typeof e._debugStack?.stack=="string",xr=()=>{let e=be();for(let o of [...Array.from(Ce),...Array.from(e.renderers.values())]){let r=o.currentDispatcherRef;if(r&&typeof r=="object")return "H"in r?r.H:r.current}return null},ot=e=>{for(let o of Ce){let r=o.currentDispatcherRef;r&&typeof r=="object"&&("H"in r?r.H=e:r.current=e);}},oe=e=>`
|
|
6
|
+
in ${e}`,Cr=(e,o)=>{let r=oe(e);return o&&(r+=` (at ${o})`),r},He=false,$e=(e,o)=>{if(!e||He)return "";let r=Error.prepareStackTrace;Error.prepareStackTrace=void 0,He=true;let i=xr();ot(null);let l=console.error,c=console.warn;console.error=()=>{},console.warn=()=>{};try{let h={DetermineComponentFrameRoot(){let E;try{if(o){let D=function(){throw Error()};if(Object.defineProperty(D.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(D,[]);}catch(T){E=T;}Reflect.construct(e,[],D);}else {try{D.call();}catch(T){E=T;}e.call(D.prototype);}}else {try{throw Error()}catch(T){E=T;}let D=e();D&&typeof D.catch=="function"&&D.catch(()=>{});}}catch(D){if(D instanceof Error&&E instanceof Error&&typeof D.stack=="string")return [D.stack,E.stack]}return [null,null]}};h.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot",Object.getOwnPropertyDescriptor(h.DetermineComponentFrameRoot,"name")?.configurable&&Object.defineProperty(h.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});let[k,M]=h.DetermineComponentFrameRoot();if(k&&M){let E=k.split(`
|
|
7
|
+
`),D=M.split(`
|
|
8
|
+
`),T=0,L=0;for(;T<E.length&&!E[T].includes("DetermineComponentFrameRoot");)T++;for(;L<D.length&&!D[L].includes("DetermineComponentFrameRoot");)L++;if(T===E.length||L===D.length)for(T=E.length-1,L=D.length-1;T>=1&&L>=0&&E[T]!==D[L];)L--;for(;T>=1&&L>=0;T--,L--)if(E[T]!==D[L]){if(T!==1||L!==1)do if(T--,L--,L<0||E[T]!==D[L]){let U=`
|
|
9
|
+
${E[T].replace(" at new "," at ")}`,B=ze(e);return B&&U.includes("<anonymous>")&&(U=U.replace("<anonymous>",B)),U}while(T>=1&&L>=0);break}}}finally{He=false,Error.prepareStackTrace=r,ot(i),console.error=l,console.warn=c;}let g=e?ze(e):"";return g?oe(g):""},kr=(e,o)=>{let r=e.tag,i="";switch(r){case jn:i=oe("Activity");break;case Dn:i=$e(e.type,true);break;case Hn:i=$e(e.type.render,false);break;case Pn:case In:i=$e(e.type,false);break;case On:case Fn:case zn:i=oe(e.type);break;case Bn:i=oe("Lazy");break;case $n:i=e.child!==o&&o!==null?oe("Suspense Fallback"):oe("Suspense");break;case Rn:i=oe("SuspenseList");break;case _n:i=oe("ViewTransition");break;default:return ""}return i},Mr=e=>{try{let o="",r=e,i=null;do{o+=kr(r,i);let l=r._debugInfo;if(l&&Array.isArray(l))for(let c=l.length-1;c>=0;c--){let g=l[c];typeof g.name=="string"&&(o+=Cr(g.name,g.env));}i=r,r=r.return;}while(r);return o}catch(o){return o instanceof Error?`
|
|
10
|
+
Error generating stack: ${o.message}
|
|
11
|
+
${o.stack}`:""}},Sr=e=>{let o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;let r=e;if(!r)return "";Error.prepareStackTrace=o,r.startsWith(`Error: react-stack-top-frame
|
|
12
|
+
`)&&(r=r.slice(29));let i=r.indexOf(`
|
|
13
|
+
`);if(i!==-1&&(r=r.slice(i+1)),i=Math.max(r.indexOf("react_stack_bottom_frame"),r.indexOf("react-stack-bottom-frame")),i!==-1&&(i=r.lastIndexOf(`
|
|
14
|
+
`,i)),i!==-1)r=r.slice(0,i);else return "";return r},Tr=e=>!!(e.fileName?.startsWith("rsc://")&&e.functionName),Er=(e,o)=>e.fileName===o.fileName&&e.lineNumber===o.lineNumber&&e.columnNumber===o.columnNumber,Nr=e=>{let o=new Map;for(let r of e)for(let i of r.stackFrames){if(!Tr(i))continue;let l=i.functionName,c=o.get(l)??[];c.some(g=>Er(g,i))||(c.push(i),o.set(l,c));}return o},Ar=(e,o,r)=>{if(!e.functionName)return {...e,isServer:true};let i=o.get(e.functionName);if(!i||i.length===0)return {...e,isServer:true};let l=r.get(e.functionName)??0,c=i[l%i.length];return r.set(e.functionName,l+1),{...e,isServer:true,fileName:c.fileName,lineNumber:c.lineNumber,columnNumber:c.columnNumber,source:e.source?.replace(Tt,`(${c.fileName}:${c.lineNumber}:${c.columnNumber})`)}},Lr=e=>{let o=[];return Vn(e,r=>{if(!vr(r))return;let i=typeof r.type=="string"?r.type:ze(r.type)||"<anonymous>";o.push({componentName:i,stackFrames:Et(Sr(r._debugStack?.stack))});},true),o},Pr=async(e,o=true,r)=>{let i=Lr(e),l=Et(Mr(e)),c=Nr(i),g=new Map,h=l.map(M=>M.source?.includes(Tt)??false?Ar(M,c,g):M),k=h.filter((M,E,D)=>{if(E===0)return true;let T=D[E-1];return M.functionName!==T.functionName});return yr(k,o,r)},Dt=e=>{if(!e||er.some(l=>l===e))return "";let o=e;if(o.startsWith("http://")||o.startsWith("https://"))try{o=new URL(o).pathname;}catch{}if(o.startsWith(tt)){let l=o.slice(tt.length),c=l.indexOf("/"),g=l.indexOf(":");o=c!==-1&&(g===-1||c<g)?l.slice(c+1):l;}let r=true;for(;r;){r=false;for(let l of Qn)if(o.startsWith(l)){o=o.slice(l.length),l==="file:///"&&(o=`/${o.replace(/^\/+/,"")}`),r=true;break}}if(et.test(o)){let l=o.match(et);l&&(o=o.slice(l[0].length));}if(o.startsWith("//")){let l=o.indexOf("/",2);o=l===-1?"":o.slice(l);}let i=o.indexOf("?");if(i!==-1){let l=o.slice(i);rr.test(l)&&(o=o.slice(0,i));}return o},Dr=e=>{let o=Dt(e);return !(!o||!tr.test(o)||nr.test(o))},Or=e=>e.length>0&&/^[A-Z]/.test(e);Ln();var Hr=new Set(["InnerLayoutRouter","RedirectErrorBoundary","RedirectBoundary","HTTPAccessFallbackErrorBoundary","HTTPAccessFallbackBoundary","LoadingBoundary","ErrorBoundary","InnerScrollAndFocusHandler","ScrollAndFocusHandler","RenderFromTemplateContext","OuterLayoutRouter","body","html","DevRootHTTPAccessFallbackBoundary","AppDevOverlayErrorBoundary","AppDevOverlay","HotReload","Router","ErrorBoundaryHandler","AppRouter","ServerRoot","SegmentStateProvider","RootErrorBoundary","LoadableComponent","MotionDOMComponent"]),$r=()=>typeof document>"u"?false:!!(document.getElementById("__NEXT_DATA__")||document.querySelector("nextjs-portal")),Ir=e=>!!(e.startsWith("_")||Hr.has(e)),it=e=>!(e.length<=1||Ir(e)||!Or(e)||e.startsWith("Primitive.")||e.includes("Provider")&&e.includes("Context")),Ot=async e=>{if(!Mt())return [];try{let o=Un(e);return o?await Pr(o):null}catch{return null}};var Ve=async(e,o={})=>{let{maxLines:r=3}=o,i=Br(e),l=await Ot(e),c=$r(),g=[];if(l)for(let h of l){if(g.length>=r)break;if(h.isServer&&(!h.functionName||it(h.functionName))){g.push(`
|
|
15
|
+
in ${h.functionName||"<anonymous>"} (at Server)`);continue}if(h.fileName&&Dr(h.fileName)){let k=`
|
|
16
|
+
in `,M=h.functionName&&it(h.functionName);M&&(k+=`${h.functionName} (at `),k+=Dt(h.fileName),c&&h.lineNumber&&h.columnNumber&&(k+=`:${h.lineNumber}:${h.columnNumber}`),M&&(k+=")"),g.push(k);}}return `${i}${g.join("")}`},Br=e=>{let o=e.tagName.toLowerCase();if(!(e instanceof HTMLElement))return `<${o} />`;let r=e.innerText?.trim()??e.textContent?.trim()??"",i="",l=Array.from(e.attributes);for(let L of l){let U=L.name,B=L.value;B.length>20&&(B=`${B.slice(0,20)}...`),i+=` ${U}="${B}"`;}let c=[],g=[],h=false,k=Array.from(e.childNodes);for(let L of k)L.nodeType!==Node.COMMENT_NODE&&(L.nodeType===Node.TEXT_NODE?L.textContent&&L.textContent.trim().length>0&&(h=true):L instanceof Element&&(h?g.push(L):c.push(L)));let M=L=>L.length===0?"":L.length<=2?L.map(U=>`<${U.tagName.toLowerCase()} ...>`).join(`
|
|
17
|
+
`):`(${L.length} elements)`,E="",D=M(c);if(D&&(E+=`
|
|
18
|
+
${D}`),r.length>0){let L=r.length>100?`${r.slice(0,100)}...`:r;E+=`
|
|
19
|
+
${L}`;}let T=M(g);return T&&(E+=`
|
|
20
|
+
${T}`),E.length>0?`<${o}${i}>${E}
|
|
21
|
+
</${o}>`:`<${o}${i} />`};var Rr="application/x-react-grab",Ue=(e,o)=>{let r=JSON.stringify({version:Wt,content:e,timestamp:Date.now(),...o?.prompt}),i=c=>{c.preventDefault(),c.clipboardData?.setData("text/plain",e),c.clipboardData?.setData(Rr,r);};document.addEventListener("copy",i);let l=document.createElement("textarea");l.value=e,l.style.position="fixed",l.style.left="-9999px",l.ariaHidden="true",document.body.appendChild(l),l.select();try{let c=document.execCommand("copy");return c&&o?.onSuccess?.(),c}finally{document.removeEventListener("copy",i),l.remove();}};var Fr=new Set(["parentElement","parentNode","firstChild","lastChild","nextSibling","previousSibling","firstElementChild","lastElementChild","nextElementSibling","previousElementSibling"]),zr=new Set(["querySelector","closest"]),jr=new Set(["querySelectorAll","getElementsByClassName","getElementsByTagName","getElementsByTagNameNS"]),_r=new Set(["setAttribute","removeAttribute","toggleAttribute","setAttributeNS","removeAttributeNS","setAttributeNode","removeAttributeNode","appendChild","removeChild","insertBefore","replaceChild","remove","append","prepend","after","before","replaceWith","replaceChildren","insertAdjacentHTML","insertAdjacentElement","insertAdjacentText","setHTML","normalize","cloneNode","addEventListener","removeEventListener","attachShadow","animate","showModal","show","close","showPopover","hidePopover","togglePopover","scrollTo","scrollBy","scrollIntoView","setSelectionRange","setRangeText","splitText","appendData","deleteData","insertData","replaceData","focus","blur","reset","submit","requestSubmit","setCustomValidity","insertRow","deleteRow","insertCell","deleteCell","createTHead","deleteTHead","createTFoot","deleteTFoot","createTBody","createCaption","deleteCaption","add","stepUp","stepDown","play","pause","load","fastSeek","setPointerCapture","webkitMatchesSelector","contains","compareDocumentPosition","getRootNode","isEqualNode","isSameNode"]),Vr=new Set(["scrollTop","scrollLeft"]),Ur=new Set(["value","checked","selected","selectedIndex","disabled","readOnly","required","defaultValue","defaultChecked"]),Kr=new Set(["hidden","tabIndex","title","lang","dir","contentEditable","draggable","spellcheck","inert","slot","id","className","accessKey","autocapitalize","enterKeyHint","inputMode","nonce","popover","open","returnValue","indeterminate","type","name","placeholder","pattern","min","max","step","multiple","accept","src","href","alt","loading","crossOrigin","referrerPolicy","download","cols","rows","wrap","srcdoc","allowFullscreen","allow","rel","target","hreflang","media","sizes","srcset","decoding","fetchPriority","isMap","useMap","formAction","formEnctype","formMethod","formNoValidate","formTarget","maxLength","minLength","size","autocomplete","autofocus","dirName","list","noValidate","action","enctype","method","acceptCharset","cite","dateTime","label","span","headers","scope","abbr","colSpan","rowSpan","start","reversed","high","low","optimum","default","kind","srclang","integrity","as","blocking","async","defer","noModule","htmlFor","httpEquiv","content","charset","coords","shape","ping","seamless","width","height","data","form","summary","nodeValue"]),Wr=new Set(["currentTime","volume","muted","playbackRate","defaultPlaybackRate","autoplay","loop","controls","preload","poster","playsInline","disableRemotePlayback","preservesPitch","defaultMuted"]),qr=new Set(["nodeName","nodeType","tagName","localName","namespaceURI","prefix","baseURI","isConnected","ownerDocument","offsetWidth","offsetHeight","offsetTop","offsetLeft","offsetParent","clientWidth","clientHeight","clientTop","clientLeft","scrollWidth","scrollHeight","computedStyleMap","assignedSlot","sheet","naturalWidth","naturalHeight","complete","currentSrc","videoWidth","videoHeight","duration","paused","ended","seeking","readyState","networkState","buffered","played","seekable","error","textTracks","audioTracks","videoTracks","mediaKeys","validity","validationMessage","willValidate","files","labels","form","selectionStart","selectionEnd","selectionDirection","textLength","options","selectedOptions","length","tHead","tFoot","tBodies","caption","rowIndex","sectionRowIndex","cellIndex","cells","control","internals","part"]),Ht=new Set(["relList","sandbox","controlsList","part"]),Pe=e=>{let o=[],r=p=>o.push(p),i=new WeakMap,l=new WeakMap,c=new WeakMap,g=new WeakMap,h=new WeakMap,k=new WeakMap,M=new WeakMap,E=new WeakMap,T=p=>i.get(p)??p,U=p=>p.map(v=>typeof v=="string"?v:T(v)),B=p=>({parent:p.parentNode,nextSibling:p.nextSibling}),j=(p,v)=>{v.parent&&v.parent.insertBefore(p,v.nextSibling);},W=p=>p instanceof DocumentFragment?Array.from(p.childNodes):[],q=(p,v)=>((...u)=>{let t=U(u),n=new Map;for(let m of t)typeof m!="string"&&!(m instanceof DocumentFragment)&&m.parentNode&&n.set(m,B(m));let a=v();p(...t);let d=v().filter(m=>!a.includes(m));r(()=>{for(let m of d)m.parentNode?.removeChild(m);for(let[m,y]of n)j(m,y);});}),te=p=>{let v=c.get(p);if(v)return v;let u=new Proxy(p,{get(t,n){if(n==="setProperty")return (s,d,m)=>{let y=t.getPropertyValue(s),A=t.getPropertyPriority(s);t.setProperty(s,d,m),r(()=>t.setProperty(s,y,A));};if(n==="removeProperty")return s=>{let d=t.getPropertyValue(s),m=t.getPropertyPriority(s),y=t.removeProperty(s);return d&&r(()=>t.setProperty(s,d,m)),y};let a=Reflect.get(t,n);return typeof a=="function"?a.bind(t):a},set(t,n,a){if(typeof n=="string"){let s=t.getPropertyValue(n)||t[n]||"";r(()=>{t[n]=s;});}return Reflect.set(t,n,a)}});return c.set(p,u),u},J=p=>{let v=g.get(p);if(v)return v;let u=new Proxy(p,{get(t,n){if(n==="add")return (...s)=>{let d=s.filter(m=>!t.contains(m));return r(()=>t.remove(...d)),t.add(...s)};if(n==="remove")return (...s)=>{let d=s.filter(m=>t.contains(m));return r(()=>t.add(...d)),t.remove(...s)};if(n==="toggle")return (s,d)=>{let m=t.contains(s),y=t.toggle(s,d);return r(()=>m?t.add(s):t.remove(s)),y};if(n==="replace")return (s,d)=>{let m=t.contains(s),y=t.contains(d),A=t.replace(s,d);return m&&r(()=>{y||t.remove(d),t.add(s);}),A};if(n==="value")return t.value;let a=Reflect.get(t,n);return typeof a=="function"?a.bind(t):a},set(t,n,a){if(n==="value"){let s=t.value;r(()=>{t.value=s;});}return Reflect.set(t,n,a)}});return g.set(p,u),u},X=p=>{let v=h.get(p);if(v)return v;let u=new Proxy(p,{set(t,n,a){if(typeof n=="string"){let s=t[n],d=n in t;r(()=>d?t[n]=s:delete t[n]);}return Reflect.set(t,n,a)},deleteProperty(t,n){if(typeof n=="string"&&n in t){let a=t[n];r(()=>{t[n]=a;});}return Reflect.deleteProperty(t,n)}});return h.set(p,u),u},ie=p=>{let v=k.get(p);if(v)return v;let u=new Proxy(p,{get(t,n){if(typeof n=="string"&&!isNaN(Number(n))){let s=t[Number(n)];return s?P(s):void 0}if(n==="item")return s=>{let d=t.item(s);return d?P(d):null};if(n==="getNamedItem")return s=>{let d=t.getNamedItem(s);return d?P(d):null};if(n==="getNamedItemNS")return (s,d)=>{let m=t.getNamedItemNS(s,d);return m?P(m):null};if(n==="setNamedItem")return s=>{let d=t.getNamedItem(s.name),m=d?.value,y=t.setNamedItem(s);return r(()=>{d&&m!==void 0?(d.value=m,t.setNamedItem(d)):t.removeNamedItem(s.name);}),y};if(n==="setNamedItemNS")return s=>{let d=t.getNamedItemNS(s.namespaceURI,s.localName),m=d?.value,y=t.setNamedItemNS(s);return r(()=>{d&&m!==void 0?(d.value=m,t.setNamedItemNS(d)):s.namespaceURI?t.removeNamedItemNS(s.namespaceURI,s.localName):t.removeNamedItem(s.name);}),y};if(n==="removeNamedItem")return s=>{let d=t.getNamedItem(s);if(d){let m=d.value,y=t.removeNamedItem(s);return r(()=>{let A=document.createAttribute(s);A.value=m,t.setNamedItem(A);}),y}return t.removeNamedItem(s)};if(n==="removeNamedItemNS")return (s,d)=>{let m=t.getNamedItemNS(s,d);if(m){let y=m.value,A=m.name,z=t.removeNamedItemNS(s,d);return r(()=>{let N=s?document.createAttributeNS(s,A):document.createAttribute(d);N.value=y,s?t.setNamedItemNS(N):t.setNamedItem(N);}),z}return t.removeNamedItemNS(s,d)};if(n===Symbol.iterator)return function*(){for(let s=0;s<t.length;s++)yield P(t[s]);};let a=Reflect.get(t,n);return typeof a=="function"?a.bind(t):a}});return k.set(p,u),u},ae=new WeakMap,P=p=>{let v=ae.get(p);if(v)return v;let u=new Proxy(p,{get(t,n){let a=Reflect.get(t,n);return typeof a=="function"?a.bind(t):a},set(t,n,a){if(n==="value"){let s=t.value;r(()=>{t.value=s;});}return Reflect.set(t,n,a)}});return ae.set(p,u),u},_=p=>{let v=M.get(p);if(v)return v;let u=new Proxy(p,{get(t,n){if(n==="set")return (s,...d)=>{let m=t.get(s);t.set(s,...d),r(()=>{m?t.set(s,m):t.delete(s);});};if(n==="delete")return s=>{let d=t.get(s);t.delete(s),d&&r(()=>t.set(s,d));};if(n==="append")return (s,...d)=>{let m=t.getAll(s);t.append(s,...d),r(()=>{t.delete(s);for(let y of m)t.append(s,y);});};if(n==="clear")return ()=>{let s=[];t.forEach((d,m)=>{s.push([m,t.getAll(m)]);}),t.clear(),r(()=>{for(let[d,m]of s)for(let y of m)t.append(d,y);});};if(n===Symbol.iterator)return t[Symbol.iterator].bind(t);let a=Reflect.get(t,n);return typeof a=="function"?a.bind(t):a}});return M.set(p,u),u},H=p=>new Proxy(p,{get(v,u){if(typeof u=="string"&&!isNaN(Number(u)))return C(v[Number(u)]??null);if(u==="item")return n=>C(v.item(n));if(u===Symbol.iterator)return function*(){for(let n=0;n<v.length;n++)yield C(v[n]);};if(u==="forEach")return (n,a)=>{v.forEach((s,d,m)=>{n.call(a,C(s),d,m);});};if(u==="entries")return function*(){for(let n=0;n<v.length;n++)yield [n,C(v[n])];};if(u==="keys")return v.keys.bind(v);if(u==="values")return function*(){for(let n=0;n<v.length;n++)yield C(v[n]);};let t=Reflect.get(v,u);return typeof t=="function"?t.bind(v):t}}),x=p=>p?new Proxy(p,{get(v,u){if(typeof u=="string"&&!isNaN(Number(u)))return C(v[Number(u)]??null);if(u==="item")return n=>C(v.item(n));if(u==="namedItem"&&"namedItem"in v)return n=>C(v.namedItem(n));if(u===Symbol.iterator)return function*(){for(let n=0;n<v.length;n++)yield C(v[n]);};let t=Reflect.get(v,u);return typeof t=="function"?t.bind(v):t}}):null,b=(p,v)=>{let u=E.get(p);if(u)return u;let t=new Proxy(p,{get(n,a){if(typeof a=="string"&&!isNaN(Number(a)))return C(n[Number(a)]??null);if(a==="item")return d=>C(n.item(d));if(a==="namedItem")return d=>C(n.namedItem(d));if(a==="add")return (d,m)=>{let y=T(d),A=typeof m=="number"||m==null?m:T(m);n.add(y,A),r(()=>y.parentNode?.removeChild(y));};if(a==="remove")return d=>{let m=n[d];if(m){let y=m.outerHTML,A=d;n.remove(d),r(()=>{let z=document.createElement("div");z.innerHTML=y;let N=z.firstChild;N&&(A>=n.length?v.appendChild(N):v.insertBefore(N,n[A]));});}};if(a==="selectedIndex")return n.selectedIndex;if(a==="length")return n.length;if(a===Symbol.iterator)return function*(){for(let d=0;d<n.length;d++)yield C(n[d]);};let s=Reflect.get(n,a);return typeof s=="function"?s.bind(n):s},set(n,a,s){if(a==="selectedIndex"){let d=n.selectedIndex;r(()=>{n.selectedIndex=d;});}if(a==="length"){let d=[];for(let m=0;m<n.length;m++)d.push(n[m].outerHTML);r(()=>{for(;n.length>0;)n.remove(0);for(let m of d){let y=document.createElement("div");y.innerHTML=m;let A=y.firstChild;A&&v.appendChild(A);}});}return Reflect.set(n,a,s)}});return E.set(p,t),t},f=(p,v)=>{let u=p;switch(v){case "setAttribute":return (t,n)=>{let a=u.hasAttribute(t),s=u.getAttribute(t);return r(()=>a?u.setAttribute(t,s):u.removeAttribute(t)),u.setAttribute(t,n)};case "removeAttribute":return t=>{if(u.hasAttribute(t)){let n=u.getAttribute(t);r(()=>u.setAttribute(t,n));}return u.removeAttribute(t)};case "toggleAttribute":return (t,n)=>{let a=u.hasAttribute(t),s=a?u.getAttribute(t):null,d=u.toggleAttribute(t,n);return r(()=>{a?u.setAttribute(t,s):u.removeAttribute(t);}),d};case "setAttributeNS":return (t,n,a)=>{let s=n.includes(":")?n.split(":")[1]:n,d=u.hasAttributeNS(t,s),m=u.getAttributeNS(t,s),y=u.getAttributeNodeNS(t,s)?.name??s;return r(()=>d?u.setAttributeNS(t,y,m):u.removeAttributeNS(t,s)),u.setAttributeNS(t,n,a)};case "removeAttributeNS":return (t,n)=>{if(u.hasAttributeNS(t,n)){let a=u.getAttributeNS(t,n),s=u.getAttributeNodeNS(t,n)?.name??n;r(()=>u.setAttributeNS(t,s,a));}return u.removeAttributeNS(t,n)};case "setAttributeNode":return t=>{let n=u.getAttributeNode(t.name),a=n?.value,s=u.setAttributeNode(t);return r(()=>{n&&a!==void 0?(n.value=a,u.setAttributeNode(n)):u.removeAttribute(t.name);}),s};case "removeAttributeNode":return t=>{let n=t.value,a=t.name,s=u.removeAttributeNode(t);return r(()=>{let d=document.createAttribute(a);d.value=n,u.setAttributeNode(d);}),s};case "appendChild":return t=>{let n=T(t),a=n.parentNode?B(n):null,s=W(n),d=u.appendChild(n);return r(()=>{if(s.length>0)for(let m of s)m.parentNode?.removeChild(m);else n.parentNode?.removeChild(n);a&&j(n,a);}),C(d)};case "removeChild":return t=>{let n=T(t),a=n.nextSibling,s=u.removeChild(n);return r(()=>u.insertBefore(n,a)),C(s)};case "insertBefore":return (t,n)=>{let a=T(t),s=n?T(n):null,d=a.parentNode?B(a):null,m=W(a),y=u.insertBefore(a,s);return r(()=>{if(m.length>0)for(let A of m)A.parentNode?.removeChild(A);else a.parentNode?.removeChild(a);d&&j(a,d);}),C(y)};case "replaceChild":return (t,n)=>{let a=T(t),s=T(n),d=s.nextSibling,m=a.parentNode?B(a):null,y=W(a),A=u.replaceChild(a,s);return r(()=>{if(y.length>0){let z=y[0];z?.parentNode&&z.parentNode.replaceChild(s,z);for(let N=1;N<y.length;N++)y[N].parentNode?.removeChild(y[N]);}else u.replaceChild(s,a);d&&d.parentNode===u&&s.nextSibling!==d&&u.insertBefore(s,d),m&&j(a,m);}),C(A)};case "remove":return ()=>{let t=p.parentNode,n=p.nextSibling;u.remove(),r(()=>t?.insertBefore(p,n));};case "append":return q(u.append.bind(u),()=>Array.from(u.childNodes));case "prepend":return q(u.prepend.bind(u),()=>Array.from(u.childNodes));case "after":return q(u.after.bind(u),()=>u.parentNode?Array.from(u.parentNode.childNodes):[]);case "before":return q(u.before.bind(u),()=>u.parentNode?Array.from(u.parentNode.childNodes):[]);case "replaceWith":return (...t)=>{let n=U(t),a=p.parentNode,s=p.nextSibling,d=new Map;for(let z of n)typeof z!="string"&&!(z instanceof DocumentFragment)&&z.parentNode&&d.set(z,B(z));let m=a?Array.from(a.childNodes):[];u.replaceWith(...n);let A=(a?Array.from(a.childNodes):[]).filter(z=>!m.includes(z));r(()=>{let z=A[0];if(a){a.insertBefore(p,z??s);for(let N of A)N!==p&&N.parentNode?.removeChild(N);}for(let[N,Q]of d)j(N,Q);});};case "replaceChildren":return (...t)=>{let n=U(t),a=Array.from(u.childNodes),s=new Map;for(let d of n)typeof d!="string"&&d.parentNode&&d.parentNode!==u&&s.set(d,B(d));u.replaceChildren(...n),r(()=>{u.replaceChildren(...a);for(let[d,m]of s)j(d,m);});};case "insertAdjacentHTML":return (t,n)=>{let a=Array.from(u.childNodes),s=u.parentNode?Array.from(u.parentNode.childNodes):[];u.insertAdjacentHTML(t,n);let d=Array.from(u.childNodes).filter(y=>!a.includes(y)),m=u.parentNode?Array.from(u.parentNode.childNodes).filter(y=>!s.includes(y)):[];r(()=>[...d,...m].forEach(y=>y.parentNode?.removeChild(y)));};case "insertAdjacentElement":return (t,n)=>{let a=T(n),s=a.parentNode?B(a):null,d=u.insertAdjacentElement(t,a);return d&&r(()=>{d.parentNode?.removeChild(d),s&&j(a,s);}),d?C(d):null};case "insertAdjacentText":return (t,n)=>{let a=Array.from(u.childNodes),s=u.parentNode?Array.from(u.parentNode.childNodes):[];u.insertAdjacentText(t,n);let d=Array.from(u.childNodes).filter(y=>!a.includes(y)),m=u.parentNode?Array.from(u.parentNode.childNodes).filter(y=>!s.includes(y)):[];r(()=>[...d,...m].forEach(y=>y.parentNode?.removeChild(y)));};case "setHTML":return (t,n)=>{if("setHTML"in u){let a=u.innerHTML;u.setHTML(t,n),r(()=>{u.innerHTML=a;});}};case "normalize":return ()=>{let t=[],n=document.createTreeWalker(u,NodeFilter.SHOW_TEXT),a=n.nextNode();for(;a;){let y=a.nextSibling;for(;y&&y.nodeType===Node.TEXT_NODE;)y=y.nextSibling;t.push({parent:a.parentNode,data:a.data,nextNonTextSibling:y}),a=n.nextNode();}u.normalize();let s=[],d=document.createTreeWalker(u,NodeFilter.SHOW_TEXT),m=d.nextNode();for(;m;)s.push(m),m=d.nextNode();r(()=>{for(let N of s)N.parentNode?.removeChild(N);let y=null,A=null,z;for(let{parent:N,data:Q,nextNonTextSibling:ne}of t){let pe=document.createTextNode(Q);N===A&&ne===z&&y?N.insertBefore(pe,y.nextSibling):N.insertBefore(pe,ne),y=pe,A=N,z=ne;}});};case "cloneNode":return t=>{let n=u.cloneNode(t);return C(n)};case "addEventListener":return (t,n,a)=>{u.addEventListener(t,n,a),r(()=>u.removeEventListener(t,n,a));};case "removeEventListener":return (t,n,a)=>{u.removeEventListener(t,n,a),r(()=>u.addEventListener(t,n,a));};case "attachShadow":return t=>{let n=u.attachShadow(t);return r(()=>{n.innerHTML="";}),C(n)};case "animate":return (t,n)=>{let a=u.animate(t,n);return r(()=>a.cancel()),a};case "showModal":return ()=>{let t=p;if("showModal"in t){let n=t.open;t.showModal(),n||r(()=>t.close());}};case "show":return ()=>{let t=p;if("show"in t){let n=t.open;t.show(),n||r(()=>t.close());}};case "close":return t=>{let n=p;if("close"in n){let a=n.open,s=n.matches(":modal"),d=n.returnValue;n.close(t),a&&r(()=>{n.returnValue=d,s?n.showModal():n.show();});}};case "showPopover":return ()=>{if("showPopover"in u&&"hidePopover"in u){let t=u,n=u.matches(":popover-open");t.showPopover(),n||r(()=>t.hidePopover());}};case "hidePopover":return ()=>{if("hidePopover"in u&&"showPopover"in u){let t=u,n=u.matches(":popover-open");t.hidePopover(),n&&r(()=>t.showPopover());}};case "togglePopover":return t=>{if("togglePopover"in u){let n=u,a=u.matches(":popover-open"),s=n.togglePopover(t);return r(()=>n.togglePopover(a)),s}return false};case "scrollTo":return (t,n)=>{let a=u.scrollLeft,s=u.scrollTop;typeof t=="number"?u.scrollTo(t,n??u.scrollTop):u.scrollTo(t),r(()=>u.scrollTo(a,s));};case "scrollBy":return (t,n)=>{let a=u.scrollLeft,s=u.scrollTop;typeof t=="number"?u.scrollBy(t,n??0):u.scrollBy(t),r(()=>u.scrollTo(a,s));};case "scrollIntoView":return t=>{let n=w(u),a=n?.scrollLeft??0,s=n?.scrollTop??0;u.scrollIntoView(t),n&&r(()=>n.scrollTo(a,s));};case "setSelectionRange":return (t,n,a)=>{let s=p;if("setSelectionRange"in s){let d=s.selectionStart,m=s.selectionEnd,y=s.selectionDirection;s.setSelectionRange(t,n,a),r(()=>s.setSelectionRange(d,m,y??void 0));}};case "setRangeText":return (t,n,a,s)=>{let d=p;if("setRangeText"in d){let m=d.value,y=d.selectionStart,A=d.selectionEnd;n!==void 0&&a!==void 0?d.setRangeText(t,n,a,s):d.setRangeText(t),r(()=>{d.value=m,d.setSelectionRange(y,A);});}};case "splitText":return t=>{let n=p;if("splitText"in n){let a=n.data,s=n.splitText(t);return r(()=>{n.data=a,s.parentNode?.removeChild(s);}),C(s)}return null};case "appendData":return t=>{let n=p;if("appendData"in n){let a=n.length;n.appendData(t),r(()=>n.deleteData(a,t.length));}};case "deleteData":return (t,n)=>{let a=p;if("deleteData"in a){let s=a.substringData(t,n);a.deleteData(t,n),r(()=>a.insertData(t,s));}};case "insertData":return (t,n)=>{let a=p;"insertData"in a&&(a.insertData(t,n),r(()=>a.deleteData(t,n.length)));};case "replaceData":return (t,n,a)=>{let s=p;if("replaceData"in s){let d=s.substringData(t,n);s.replaceData(t,n,a),r(()=>s.replaceData(t,a.length,d));}};case "focus":return t=>{let n=document.activeElement;u.focus(t),r(()=>{n&&n!==document.body&&"focus"in n?n.focus():u.blur();});};case "blur":return ()=>{let t=document.activeElement===u;u.blur(),t&&r(()=>u.focus());};case "reset":return ()=>{let t=p;if("reset"in t&&"elements"in t){let n=new Map;for(let a=0;a<t.elements.length;a++){let s=t.elements[a];if("value"in s)if(s instanceof HTMLInputElement&&(s.type==="checkbox"||s.type==="radio"))n.set(s,s.checked);else if(s instanceof HTMLSelectElement)if(s.multiple){let d=[];for(let m=0;m<s.options.length;m++)d.push(s.options[m].selected);n.set(s,d);}else n.set(s,s.selectedIndex);else n.set(s,s.value);}t.reset(),r(()=>{for(let[a,s]of n)if(a instanceof HTMLInputElement&&(a.type==="checkbox"||a.type==="radio"))a.checked=s;else if(a instanceof HTMLSelectElement)if(a.multiple){let d=s;for(let m=0;m<a.options.length;m++)a.options[m].selected=d[m]??false;}else a.selectedIndex=s;else "value"in a&&(a.value=s);});}};case "submit":return ()=>{let t=p;"submit"in t&&t.submit();};case "requestSubmit":return t=>{let n=p;if("requestSubmit"in n){let a=t&&T(t);n.requestSubmit(a);}};case "setCustomValidity":return t=>{let n=p;if("setCustomValidity"in n){let s=n.validity.customError?n.validationMessage:"";n.setCustomValidity(t),r(()=>n.setCustomValidity(s));}};case "insertRow":return t=>{let n=p;if("insertRow"in n){let a=n.insertRow(t);return r(()=>a.parentNode?.removeChild(a)),C(a)}return null};case "deleteRow":return t=>{let n=p;if("deleteRow"in n&&"rows"in n){let a=t<0?n.rows.length+t:t,s=n.rows[a];if(s){let d=s.outerHTML;n.deleteRow(t),r(()=>{let m=document.createElement("table");m.innerHTML=d;let y=m.rows[0];y&&(a>=n.rows.length?n.appendChild(y):n.insertBefore(y,n.rows[a]));});}}};case "insertCell":return t=>{let n=p;if("insertCell"in n){let a=n.insertCell(t);return r(()=>a.parentNode?.removeChild(a)),C(a)}return null};case "deleteCell":return t=>{let n=p;if("deleteCell"in n&&"cells"in n){let a=t<0?n.cells.length+t:t,s=n.cells[a];if(s){let d=s.outerHTML;n.deleteCell(t),r(()=>{let m=document.createElement("tr");m.innerHTML=d;let y=m.cells[0];y&&(a>=n.cells.length?n.appendChild(y):n.insertBefore(y,n.cells[a]));});}}};case "createTHead":return ()=>{let t=p;if("createTHead"in t){let n=t.tHead,a=t.createTHead();return n||r(()=>t.deleteTHead()),C(a)}return null};case "deleteTHead":return ()=>{let t=p;if("deleteTHead"in t&&t.tHead){let n=t.tHead.outerHTML;t.deleteTHead(),r(()=>{let a=document.createElement("table");a.innerHTML=n;let s=a.tHead;s&&(t.firstChild?t.insertBefore(s,t.firstChild):t.appendChild(s));});}};case "createTFoot":return ()=>{let t=p;if("createTFoot"in t){let n=t.tFoot,a=t.createTFoot();return n||r(()=>t.deleteTFoot()),C(a)}return null};case "deleteTFoot":return ()=>{let t=p;if("deleteTFoot"in t&&t.tFoot){let n=t.tFoot.outerHTML;t.deleteTFoot(),r(()=>{let a=document.createElement("table");a.innerHTML=n;let s=a.tFoot;s&&t.appendChild(s);});}};case "createTBody":return ()=>{let t=p;if("createTBody"in t){let n=t.createTBody();return r(()=>n.parentNode?.removeChild(n)),C(n)}return null};case "createCaption":return ()=>{let t=p;if("createCaption"in t){let n=t.caption,a=t.createCaption();return n||r(()=>t.deleteCaption()),C(a)}return null};case "deleteCaption":return ()=>{let t=p;if("deleteCaption"in t&&t.caption){let n=t.caption.outerHTML;t.deleteCaption(),r(()=>{let a=document.createElement("table");a.innerHTML=n;let s=a.caption;s&&(t.firstChild?t.insertBefore(s,t.firstChild):t.appendChild(s));});}};case "add":return (t,n)=>{let a=p;if("add"in a&&"options"in a){let s=T(t),d=typeof n=="number"||n==null?n:T(n);a.add(s,d),r(()=>s.parentNode?.removeChild(s));}};case "stepUp":return t=>{let n=p;if("stepUp"in n){let a=n.value;n.stepUp(t),r(()=>{n.value=a;});}};case "stepDown":return t=>{let n=p;if("stepDown"in n){let a=n.value;n.stepDown(t),r(()=>{n.value=a;});}};case "play":return ()=>{let t=p;if("play"in t){let n=t.paused,a=t.currentTime,s=t.play();return n&&r(()=>{t.pause(),t.currentTime=a;}),s}return Promise.resolve()};case "pause":return ()=>{let t=p;if("pause"in t){let n=t.paused,a=t.currentTime;t.pause(),n||r(()=>{t.currentTime=a,t.play();});}};case "load":return ()=>{let t=p;if("load"in t){let n=t.currentTime,a=t.src;t.load(),r(()=>{t.src===a&&(t.currentTime=n);});}};case "fastSeek":return t=>{let n=p;if("fastSeek"in n){let a=n.currentTime;n.fastSeek(t),r(()=>{n.currentTime=a;});}};case "setPointerCapture":return t=>{let n=p;"setPointerCapture"in n&&(n.setPointerCapture(t),r(()=>{try{n.releasePointerCapture(t);}catch{}}));};case "webkitMatchesSelector":return t=>{let n=p,a=n;return a.webkitMatchesSelector?a.webkitMatchesSelector(t):n.matches(t)};case "contains":return t=>p.contains(t?T(t):null);case "compareDocumentPosition":return t=>p.compareDocumentPosition(T(t));case "getRootNode":return t=>C(p.getRootNode(t));case "isEqualNode":return t=>p.isEqualNode(t?T(t):null);case "isSameNode":return t=>p.isSameNode(t?T(t):null);default:return null}},w=p=>{let v=p.parentElement;for(;v;){let{overflow:u,overflowY:t,overflowX:n}=getComputedStyle(v);if(u==="auto"||u==="scroll"||t==="auto"||t==="scroll"||n==="auto"||n==="scroll")return v;v=v.parentElement;}return document.documentElement},S=(p,v)=>{if(typeof v=="symbol")return false;if(qr.has(v))return true;let u=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(p),v);return !!(u&&u.get&&!u.set)},C=p=>{if(!p)return null;let v=l.get(p);if(v)return v;let u=new Proxy(p,{get(t,n){if(n===Symbol.toStringTag)return t[Symbol.toStringTag];if(n===Symbol.toPrimitive)return t[Symbol.toPrimitive]?.bind(t);if(n===Symbol.iterator&&Symbol.iterator in t)return t[Symbol.iterator].bind(t);if(n==="constructor")return t.constructor;let a=t;if(n==="style"&&"style"in t)return te(a.style);if(n==="classList"&&"classList"in t)return J(a.classList);if(n==="dataset"&&"dataset"in t)return X(a.dataset);if(n==="attributes"&&"attributes"in t)return ie(a.attributes);if(n==="attributeStyleMap"&&"attributeStyleMap"in t)return _(a.attributeStyleMap);if(n==="shadowRoot"&&"shadowRoot"in t)return a.shadowRoot?C(a.shadowRoot):null;if(n==="content"&&t instanceof HTMLTemplateElement)return C(t.content);if(typeof n=="string"&&Ht.has(n)&&n in t){let d=t[n];if(d instanceof DOMTokenList)return J(d)}if(n==="options"&&t instanceof HTMLSelectElement)return b(t.options,t);if(typeof n=="string"&&Fr.has(n))return C(t[n]);if(n==="children"||n==="childNodes")return x(t[n]);if(typeof n=="string"&&zr.has(n)){let d=t;return m=>{let y=d[n]?.(m);return y?C(y):null}}if(typeof n=="string"&&jr.has(n)){let d=t;if(n==="querySelectorAll")return m=>H(d.querySelectorAll(m));if(n==="getElementsByClassName")return m=>x(d.getElementsByClassName(m));if(n==="getElementsByTagName")return m=>x(d.getElementsByTagName(m));if(n==="getElementsByTagNameNS")return (m,y)=>x(d.getElementsByTagNameNS(m,y))}if(typeof n=="string"&&_r.has(n)){let d=f(t,n);if(d)return d}let s=Reflect.get(t,n);return typeof s=="function"?s.bind(t):s},set(t,n,a){if(S(t,n))return Reflect.set(t,n,a);let s=typeof n=="string"?n:String(n),d=t,m=()=>{let y=d[s];r(()=>{d[s]=y;});};if(Vr.has(s))m();else if(Ur.has(s)&&$(t))m();else if(s==="innerText"||s==="textContent"||s==="innerHTML"){let y=t,A=y.innerHTML;r(()=>{y.innerHTML=A;});}else if(Ht.has(s)&&s in t){let y=d[s];if(y instanceof DOMTokenList){let A=y.value;r(()=>{d[s]=A;});}else m();}else if(Kr.has(s))m();else if(Wr.has(s)&&O(t))m();else if(s==="outerHTML"){let y=t,A=y.parentNode,z=y.nextSibling,N=y.outerHTML,Q=A?Array.from(A.childNodes):[],ne=Reflect.set(t,n,a),De=(A?Array.from(A.childNodes):[]).filter(ee=>!Q.includes(ee));return r(()=>{for(let G of De)G.parentNode?.removeChild(G);let ee=y.tagName.toLowerCase(),ce=null;if(ee==="tr"){let G=document.createElement("table");G.innerHTML=N,ce=G.querySelector("tr");}else if(ee==="td"||ee==="th"){let G=document.createElement("table");G.innerHTML=`<tbody><tr>${N}</tr></tbody>`,ce=G.querySelector(ee);}else if(ee==="thead"||ee==="tbody"||ee==="tfoot"||ee==="caption"||ee==="colgroup"){let G=document.createElement("table");G.innerHTML=N,ce=G.querySelector(ee);}else if(ee==="col"){let G=document.createElement("table");G.innerHTML=`<colgroup>${N}</colgroup>`,ce=G.querySelector("col");}else {let G=document.createElement("div");G.innerHTML=N,ce=G.firstChild;}ce&&A&&A.insertBefore(ce,z);}),ne}else m();return Reflect.set(t,n,a)}});return i.set(u,p),l.set(p,u),u},$=p=>p instanceof HTMLInputElement||p instanceof HTMLTextAreaElement||p instanceof HTMLSelectElement||p instanceof HTMLOptionElement,O=p=>p instanceof HTMLMediaElement;return {proxy:C(e),undo:()=>{for(let p=o.length-1;p>=0;p--)o[p]();}}},Gr=e=>{let o=e.cloneNode(false),r=document.createElement("div");r.appendChild(o);let i=r.innerHTML,l=i.match(/<\/[^>]+>$/);return l?i.slice(0,-l[0].length):i},Yr=e=>`</${e.tagName.toLowerCase()}>`,$t=e=>{let o=document.createElement("div");o.innerHTML=e;let r=o.querySelectorAll("svg");for(let i of r){let l=document.createElementNS("http://www.w3.org/2000/svg","svg");i.hasAttribute("class")&&l.setAttribute("class",i.getAttribute("class")),i.hasAttribute("id")&&l.setAttribute("id",i.getAttribute("id")),l.textContent="...",i.replaceWith(l);}return o.innerHTML},ke=e=>{let o=[],r=e.parentElement;for(let h=0;h<5&&r&&!(r===document.body||r===document.documentElement);h++)o.push(r),r=r.parentElement;if(o.length===0)return $t(e.outerHTML);o.reverse();let i="",l="";for(let h of o)i+=`${l}${Gr(h)}
|
|
22
|
+
`,l+=" ";i+=`${l}<!-- START $el -->
|
|
23
|
+
`;let g=$t(e.outerHTML).split(`
|
|
24
|
+
`);for(let h of g)i+=`${l}${h}
|
|
25
|
+
`;i+=`${l}<!-- END $el -->
|
|
26
|
+
`;for(let h=o.length-1;h>=0;h--)l=" ".repeat(h),i+=`${l}${Yr(o[h])}
|
|
27
|
+
`;return i.trim()};var Xr=[/\beval\s*\(/,/\bFunction\s*\(/,/\bdocument\.cookie\b/,/\bfetch\s*\(/,/\bXMLHttpRequest\b/],Zr=e=>e.replace(/[\u2018\u2019\u2032\u2035]/g,"'").replace(/[\u201C\u201D\u2033\u2036]/g,'"').replace(/[\u2014\u2013\u2212]/g,"-").replace(/\u2026/g,"...").replace(/[\u00A0\u2000-\u200A\u202F\u205F]/g," ").replace(/[\u200B-\u200D\uFEFF]/g,""),Ke=e=>{let o=Zr(e);try{new Function("$el",o);}catch(r){return {isValid:false,error:`Invalid JavaScript syntax${r instanceof Error?`: ${r.message}`:""}`,sanitizedCode:o}}for(let r of Xr)if(r.test(o))return {isValid:false,error:`Potentially unsafe code detected: ${r.source}`,sanitizedCode:o};return {isValid:true,sanitizedCode:o}};var It=async(e,o,r)=>{let i=await Ve(e),c=document.contains(e)?e.outerHTML:"(removed)",g=r.length>0?`Prompts:
|
|
28
|
+
${r.join(`
|
|
31
29
|
`)}
|
|
32
30
|
|
|
33
|
-
`:"",
|
|
34
|
-
${
|
|
35
|
-
${
|
|
31
|
+
`:"",h=`Before:
|
|
32
|
+
${o}`,k=`After:
|
|
33
|
+
${c}`;return `${g}${i}
|
|
36
34
|
|
|
37
|
-
${
|
|
35
|
+
${h}
|
|
38
36
|
|
|
39
|
-
${
|
|
37
|
+
${k}`};var Jr=e=>{let o=e.trim();if(o.startsWith("{")&&o.endsWith("}"))try{let r=JSON.parse(o);if(typeof r=="object"&&"code"in r)return r}catch{}return o},Qr=(e,o,r)=>r?`Here is the HTML to modify:
|
|
40
38
|
|
|
41
|
-
${
|
|
39
|
+
${o}
|
|
42
40
|
|
|
43
41
|
Modification request: ${e}
|
|
44
42
|
|
|
@@ -48,20 +46,20 @@ You can either:
|
|
|
48
46
|
|
|
49
47
|
When iterating, the code will be executed and you'll see the updated HTML to refine further.`:`Follow-up modification request: ${e}
|
|
50
48
|
|
|
51
|
-
Remember: Output ONLY the JavaScript code for this modification. The $el variable still references the same element.`,
|
|
49
|
+
Remember: Output ONLY the JavaScript code for this modification. The $el variable still references the same element.`,eo=(e,o)=>{let r=`Here is the updated HTML after executing your code:
|
|
52
50
|
|
|
53
|
-
${e}`;return
|
|
51
|
+
${e}`;return o&&(r+=`
|
|
54
52
|
|
|
55
|
-
Execution result: ${
|
|
53
|
+
Execution result: ${o}`),r+=`
|
|
56
54
|
|
|
57
|
-
Continue modifying or output final JavaScript code (without JSON wrapper) when done.`,
|
|
58
|
-
* @license MIT
|
|
59
|
-
*
|
|
60
|
-
* Copyright (c) 2025 Aiden Bai
|
|
61
|
-
*
|
|
62
|
-
* This source code is licensed under the MIT license found in the
|
|
63
|
-
* LICENSE file in the root directory of this source tree.
|
|
64
|
-
*/
|
|
55
|
+
Continue modifying or output final JavaScript code (without JSON wrapper) when done.`,r},to="https://www.react-grab.com/api/visual-edit",no="https://www.react-grab.com/api/check-visual-edit",ro=(e={})=>{let o=e.apiEndpoint??to,r=e.maxIterations??3,i=new Map,l=new Map,c=new Map,g=new Map,h=new Map,k=new Map,M=new Map,E=new Map,D=[],T=[],L=new Map,U=null,B=()=>({requestId:`req-${Date.now()}-${Math.random().toString(36).slice(2)}`}),j=(P,_)=>{let H=P.context.options?.requestId;if(!H||_.length===0)return;let x=_.map(w=>ke(w)),b=_.map(w=>w.outerHTML);i.set(H,x),l.set(H,b),c.set(H,_);let f=P.id;f&&!E.has(f)&&E.set(f,b);},W=async function*(P,_){let H=null,x=null,b=Date.now(),f=fetch(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({messages:P}),signal:_}).then(w=>{H=w;}).catch(w=>{x=w;});for(;!H&&!x;){let w=(Date.now()-b)/1e3;yield w>=.1?`Generating\u2026 ${w.toFixed(1)}s`:"Generating\u2026",await Promise.race([f,new Promise(S=>setTimeout(S,100))]);}if(x)throw x;if(!H.ok){let w=await H.text().catch(()=>"Unknown error"),S=w;try{let C=JSON.parse(w);C.error&&(S=typeof C.error=="string"?C.error:JSON.stringify(C.error));}catch{}throw new Error(S)}return yield await H.text(),""},q=(P,_)=>{if(!document.contains(P))return {success:false,result:"Element was removed from DOM",updatedHtml:"",undo:()=>{},elementRemoved:true};let{isValid:H,error:x,sanitizedCode:b}=Ke(_);if(!H)return {success:false,result:x??"Invalid code",updatedHtml:ke(P),undo:()=>{},elementRemoved:false};let{proxy:f,undo:w}=Pe(P);try{let S=new Function("$el",b).bind(null)(f),C=S!==void 0?String(S):null,$=document.contains(P);return {success:!0,result:C,updatedHtml:$?ke(P):"",undo:w,elementRemoved:!$}}catch(S){return w(),{success:false,result:S instanceof Error?S.message:"Execution failed",updatedHtml:ke(P),undo:()=>{},elementRemoved:false}}},te=async function*(P,_,H,x,b,f,w,S,C){let $=x&&!C?k.get(x)??[]:[],O=$.length===0,V=Qr(H,_,O),F=[...$,{role:"user",content:V}],p=0,v=null,u=[];for(;p<=r;){let t="";for await(let N of W(F,f))typeof N=="string"&&!N.startsWith("{")&&(yield `${S>1?`[${w+1}/${S}] `:""}${N}`),t=N;let n=Jr(t);if(typeof n=="string"){v=n,F.push({role:"assistant",content:t});break}if(!n.iterate){v=n.code,F.push({role:"assistant",content:t});break}F.push({role:"assistant",content:t}),yield `${S>1?`[${w+1}/${S}] `:""}Applying\u2026`;let{success:s,result:d,updatedHtml:m,undo:y,elementRemoved:A}=q(P,n.code);if(u.push(y),A){for(let N=u.length-1;N>=0;N--)u[N]();throw new Error("Element was removed from the page during editing. This can happen if the page re-rendered.")}let z=eo(m,s?d:`Error: ${d}`);F.push({role:"user",content:z}),p++;}for(let t=u.length-1;t>=0;t--)u[t]();return k.set(x??b,F),v},J={send:async function*(P,_){let H=P.options?.requestId??"",x=P.sessionId,b=i.get(H),f=c.get(H);if(!b||!f||f.length===0)throw new Error("Could not capture element HTML");for(let O of f)if(!document.contains(O))throw new Error("Element was removed from the page. This can happen if the page re-rendered.");let w=x?M.get(x)??[]:[],S=w.length===0,C=[...w,P.prompt];U=Date.now();let $=[];for(let O=0;O<f.length;O++){let V=f[O],F=b[O];f.length>1&&(yield `Processing element ${O+1} of ${f.length}...`);let p=yield*te(V,F,P.prompt,x,H,_,O,f.length,S);if(p===null)throw new Error(`Max iterations reached without final code for element ${O+1}`);$.push(p);}g.set(H,JSON.stringify($)),M.set(x??H,C),yield "Applying changes\u2026";},undo:async()=>{let P=D.pop();if(!P)return;let _=h.get(P);if(_)try{_(),T.push(P);}finally{h.delete(P);}},canUndo:()=>D.length>0,redo:async()=>{let P=T.pop();if(!P)return;let _=L.get(P);if(!_)return;let{code:H,elements:x}=_,b=JSON.parse(H),f=[];for(let w=0;w<x.length;w++){let S=x[w],C=b[w];if(!document.contains(S)||!C)continue;let{proxy:$,undo:O}=Pe(S);try{new Function("$el",C).bind(null)($),f.push(O);}catch{O();}}f.length>0&&(h.set(P,()=>{for(let w=f.length-1;w>=0;w--)f[w]();}),D.push(P));},canRedo:()=>T.length>0,supportsFollowUp:true,dismissButtonText:"Keep",getCompletionMessage:()=>U===null?void 0:`Completed in ${((Date.now()-U)/1e3).toFixed(1)}s`},X=P=>{i.delete(P),l.delete(P),c.delete(P),g.delete(P);};return {provider:J,getOptions:B,onStart:j,onComplete:async(P,_)=>{let H=P.context.options?.requestId;if(!H)return;let x=g.get(H);if(!x)return;let b;try{b=JSON.parse(x);}catch{return X(H),{error:"Failed to edit: invalid code format"}}if(_.length===0)return X(H),{error:"Failed to edit: no elements found"};for(let u of _)if(!document.contains(u))return X(H),{error:"Failed to edit: element was removed from the page. This can happen if the page re-rendered."};let f=P.id,w=(f?E.get(f):null)??l.get(H)??[],S=[],C=[],$=[];for(let u=0;u<_.length;u++){let t=_[u],n=b[u]?.trim()??"";if(n==="")continue;let{isValid:a,error:s,sanitizedCode:d}=Ke(n);if(!a){for(let A=S.length-1;A>=0;A--)S[A]();return X(H),{error:`Failed to edit element ${u+1}: ${s??"invalid code"}`}}let{proxy:m,undo:y}=Pe(t);try{new Function("$el",d).bind(null)(m),S.push(y),C.push(d),$.push(t);}catch(A){y();for(let N=S.length-1;N>=0;N--)S[N]();X(H);let z=A instanceof Error?A.message:"Execution failed";return {error:`Failed to edit element ${u+1}: ${z}`}}}let O=()=>{for(let u=S.length-1;u>=0;u--)S[u]();};h.set(H,O),D.push(H),L.set(H,{code:JSON.stringify(C),elements:$}),T.length=0;let V=M.get(f??H)??[],F=_[0],p=w[0]??"",v=await It(F,p,V);Ue(v),X(H);},onUndo:(P,_)=>{}}},We=e=>typeof e=="object"&&e!==null&&"setAgent"in e,oo=async()=>{let e=new AbortController,o=setTimeout(()=>e.abort(),1e3);try{let r=await fetch(no,{method:"GET",signal:e.signal});return clearTimeout(o),r.ok?(await r.json().catch(()=>null))?.healthy===!0:!1}catch{return clearTimeout(o),false}},io=async()=>{if(typeof window>"u"||!await oo())return;let{provider:o,getOptions:r,onStart:i,onComplete:l,onUndo:c}=ro(),g=M=>{M.setAgent({provider:o,getOptions:r,onStart:i,onComplete:l,onUndo:c});},h=window.__REACT_GRAB__;if(We(h)){g(h);return}window.addEventListener("react-grab:init",M=>{M instanceof CustomEvent&&We(M.detail)&&g(M.detail);},{once:true});let k=window.__REACT_GRAB__;We(k)&&g(k);};io();/**
|
|
56
|
+
* @license MIT
|
|
57
|
+
*
|
|
58
|
+
* Copyright (c) 2025 Aiden Bai
|
|
59
|
+
*
|
|
60
|
+
* This source code is licensed under the MIT license found in the
|
|
61
|
+
* LICENSE file in the root directory of this source tree.
|
|
62
|
+
*/
|
|
65
63
|
/*! Bundled license information:
|
|
66
64
|
|
|
67
65
|
bippy/dist/rdt-hook-5L_ky0r0.js:
|
|
@@ -113,4 +111,4 @@ bippy/dist/index.js:
|
|
|
113
111
|
* This source code is licensed under the MIT license found in the
|
|
114
112
|
* LICENSE file in the root directory of this source tree.
|
|
115
113
|
*)
|
|
116
|
-
*/exports.attachAgent=
|
|
114
|
+
*/exports.attachAgent=io;exports.createVisualEditAgentProvider=ro;return exports;})({});
|