@react-grab/visual-edit 0.0.96 → 0.0.97
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 +14 -10
- package/dist/client.js +14 -10
- package/dist/index.global.js +6 -6
- package/dist/server.cjs +1 -1
- package/dist/server.js +1 -1
- package/package.json +2 -2
package/dist/cli.cjs
CHANGED
|
@@ -101,7 +101,7 @@ var require_picocolors = __commonJS({
|
|
|
101
101
|
|
|
102
102
|
// src/cli.ts
|
|
103
103
|
var import_picocolors = __toESM(require_picocolors());
|
|
104
|
-
var VERSION = "0.0.
|
|
104
|
+
var VERSION = "0.0.97";
|
|
105
105
|
console.log(
|
|
106
106
|
`${import_picocolors.default.magenta("\u273F")} ${import_picocolors.default.bold("React Grab")} ${import_picocolors.default.gray(VERSION)} ${import_picocolors.default.dim("(Visual Edit)")}`
|
|
107
107
|
);
|
package/dist/cli.js
CHANGED
|
@@ -99,7 +99,7 @@ var require_picocolors = __commonJS({
|
|
|
99
99
|
|
|
100
100
|
// src/cli.ts
|
|
101
101
|
var import_picocolors = __toESM(require_picocolors());
|
|
102
|
-
var VERSION = "0.0.
|
|
102
|
+
var VERSION = "0.0.97";
|
|
103
103
|
console.log(
|
|
104
104
|
`${import_picocolors.default.magenta("\u273F")} ${import_picocolors.default.bold("React Grab")} ${import_picocolors.default.gray(VERSION)} ${import_picocolors.default.dim("(Visual Edit)")}`
|
|
105
105
|
);
|
package/dist/client.cjs
CHANGED
|
@@ -3064,7 +3064,7 @@ function setup({
|
|
|
3064
3064
|
};
|
|
3065
3065
|
}
|
|
3066
3066
|
|
|
3067
|
-
// ../react-grab/dist/chunk-
|
|
3067
|
+
// ../react-grab/dist/chunk-K6AYIDZE.js
|
|
3068
3068
|
var Wi = (e, t) => e === t;
|
|
3069
3069
|
var Zt = { equals: Wi };
|
|
3070
3070
|
var Bo = jo;
|
|
@@ -3262,7 +3262,7 @@ function ls(e) {
|
|
|
3262
3262
|
} else l();
|
|
3263
3263
|
r(o);
|
|
3264
3264
|
}
|
|
3265
|
-
var Qo = "0.0.
|
|
3265
|
+
var Qo = "0.0.97";
|
|
3266
3266
|
var us = (e) => typeof e == "number" && !Number.isNaN(e) && Number.isFinite(e);
|
|
3267
3267
|
var ds = (e) => {
|
|
3268
3268
|
let t = e.trim();
|
|
@@ -3633,7 +3633,7 @@ W('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 18 18"fill=currentColor><p
|
|
|
3633
3633
|
W('<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">');
|
|
3634
3634
|
W('<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">');
|
|
3635
3635
|
Pe(["pointerdown", "pointermove", "pointerup", "click"]);
|
|
3636
|
-
var Ur = "0.5.
|
|
3636
|
+
var Ur = "0.5.28";
|
|
3637
3637
|
var dn = `bippy-${Ur}`;
|
|
3638
3638
|
var Br = Object.defineProperty;
|
|
3639
3639
|
var Ga = Object.prototype.hasOwnProperty;
|
|
@@ -3838,8 +3838,8 @@ var ti = (e, t) => {
|
|
|
3838
3838
|
};
|
|
3839
3839
|
var ni = (e) => {
|
|
3840
3840
|
if (!e.includes(":")) return [e, void 0, void 0];
|
|
3841
|
-
let t =
|
|
3842
|
-
return [
|
|
3841
|
+
let t = e.startsWith("(") && /:\d+\)$/.test(e), n = t ? e.slice(1, -1) : e, o = /(.+?)(?::(\d+))?(?::(\d+))?$/, i = o.exec(n);
|
|
3842
|
+
return i ? [i[1], i[2] || void 0, i[3] || void 0] : [n, void 0, void 0];
|
|
3843
3843
|
};
|
|
3844
3844
|
var uo = (e, t) => t && t.slice != null ? Array.isArray(t.slice) ? e.slice(t.slice[0], t.slice[1]) : e.slice(0, t.slice) : e;
|
|
3845
3845
|
var Xr = (e, t) => uo(e.split(`
|
|
@@ -4150,7 +4150,9 @@ var El = async (e, t = fetch) => {
|
|
|
4150
4150
|
if (!qr(e)) return null;
|
|
4151
4151
|
let n;
|
|
4152
4152
|
try {
|
|
4153
|
-
|
|
4153
|
+
let i = await t(e);
|
|
4154
|
+
if (!i.ok) return null;
|
|
4155
|
+
n = await i.text();
|
|
4154
4156
|
} catch {
|
|
4155
4157
|
return null;
|
|
4156
4158
|
}
|
|
@@ -4158,7 +4160,9 @@ var El = async (e, t = fetch) => {
|
|
|
4158
4160
|
let o = bl(e, n);
|
|
4159
4161
|
if (!o || !qr(o)) return null;
|
|
4160
4162
|
try {
|
|
4161
|
-
let i = await t(o)
|
|
4163
|
+
let i = await t(o);
|
|
4164
|
+
if (!i.ok) return null;
|
|
4165
|
+
let r = await i.json();
|
|
4162
4166
|
return "sections" in r ? wl(r) : yl(r);
|
|
4163
4167
|
} catch {
|
|
4164
4168
|
return null;
|
|
@@ -7222,7 +7226,7 @@ attachAgent();
|
|
|
7222
7226
|
*/
|
|
7223
7227
|
/*! Bundled license information:
|
|
7224
7228
|
|
|
7225
|
-
bippy/dist/rdt-hook-
|
|
7229
|
+
bippy/dist/rdt-hook-5L_ky0r0.js:
|
|
7226
7230
|
(**
|
|
7227
7231
|
* @license bippy
|
|
7228
7232
|
*
|
|
@@ -7232,7 +7236,7 @@ bippy/dist/rdt-hook-BZMdLD7S.js:
|
|
|
7232
7236
|
* LICENSE file in the root directory of this source tree.
|
|
7233
7237
|
*)
|
|
7234
7238
|
|
|
7235
|
-
bippy/dist/core-
|
|
7239
|
+
bippy/dist/core-U1d648PH.js:
|
|
7236
7240
|
(**
|
|
7237
7241
|
* @license bippy
|
|
7238
7242
|
*
|
|
@@ -7252,7 +7256,7 @@ bippy/dist/source.js:
|
|
|
7252
7256
|
* LICENSE file in the root directory of this source tree.
|
|
7253
7257
|
*)
|
|
7254
7258
|
|
|
7255
|
-
bippy/dist/install-hook-only-
|
|
7259
|
+
bippy/dist/install-hook-only-CgvoC7AQ.js:
|
|
7256
7260
|
(**
|
|
7257
7261
|
* @license bippy
|
|
7258
7262
|
*
|
package/dist/client.js
CHANGED
|
@@ -3062,7 +3062,7 @@ function setup({
|
|
|
3062
3062
|
};
|
|
3063
3063
|
}
|
|
3064
3064
|
|
|
3065
|
-
// ../react-grab/dist/chunk-
|
|
3065
|
+
// ../react-grab/dist/chunk-K6AYIDZE.js
|
|
3066
3066
|
var Wi = (e, t) => e === t;
|
|
3067
3067
|
var Zt = { equals: Wi };
|
|
3068
3068
|
var Bo = jo;
|
|
@@ -3260,7 +3260,7 @@ function ls(e) {
|
|
|
3260
3260
|
} else l();
|
|
3261
3261
|
r(o);
|
|
3262
3262
|
}
|
|
3263
|
-
var Qo = "0.0.
|
|
3263
|
+
var Qo = "0.0.97";
|
|
3264
3264
|
var us = (e) => typeof e == "number" && !Number.isNaN(e) && Number.isFinite(e);
|
|
3265
3265
|
var ds = (e) => {
|
|
3266
3266
|
let t = e.trim();
|
|
@@ -3631,7 +3631,7 @@ W('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 18 18"fill=currentColor><p
|
|
|
3631
3631
|
W('<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">');
|
|
3632
3632
|
W('<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">');
|
|
3633
3633
|
Pe(["pointerdown", "pointermove", "pointerup", "click"]);
|
|
3634
|
-
var Ur = "0.5.
|
|
3634
|
+
var Ur = "0.5.28";
|
|
3635
3635
|
var dn = `bippy-${Ur}`;
|
|
3636
3636
|
var Br = Object.defineProperty;
|
|
3637
3637
|
var Ga = Object.prototype.hasOwnProperty;
|
|
@@ -3836,8 +3836,8 @@ var ti = (e, t) => {
|
|
|
3836
3836
|
};
|
|
3837
3837
|
var ni = (e) => {
|
|
3838
3838
|
if (!e.includes(":")) return [e, void 0, void 0];
|
|
3839
|
-
let t =
|
|
3840
|
-
return [
|
|
3839
|
+
let t = e.startsWith("(") && /:\d+\)$/.test(e), n = t ? e.slice(1, -1) : e, o = /(.+?)(?::(\d+))?(?::(\d+))?$/, i = o.exec(n);
|
|
3840
|
+
return i ? [i[1], i[2] || void 0, i[3] || void 0] : [n, void 0, void 0];
|
|
3841
3841
|
};
|
|
3842
3842
|
var uo = (e, t) => t && t.slice != null ? Array.isArray(t.slice) ? e.slice(t.slice[0], t.slice[1]) : e.slice(0, t.slice) : e;
|
|
3843
3843
|
var Xr = (e, t) => uo(e.split(`
|
|
@@ -4148,7 +4148,9 @@ var El = async (e, t = fetch) => {
|
|
|
4148
4148
|
if (!qr(e)) return null;
|
|
4149
4149
|
let n;
|
|
4150
4150
|
try {
|
|
4151
|
-
|
|
4151
|
+
let i = await t(e);
|
|
4152
|
+
if (!i.ok) return null;
|
|
4153
|
+
n = await i.text();
|
|
4152
4154
|
} catch {
|
|
4153
4155
|
return null;
|
|
4154
4156
|
}
|
|
@@ -4156,7 +4158,9 @@ var El = async (e, t = fetch) => {
|
|
|
4156
4158
|
let o = bl(e, n);
|
|
4157
4159
|
if (!o || !qr(o)) return null;
|
|
4158
4160
|
try {
|
|
4159
|
-
let i = await t(o)
|
|
4161
|
+
let i = await t(o);
|
|
4162
|
+
if (!i.ok) return null;
|
|
4163
|
+
let r = await i.json();
|
|
4160
4164
|
return "sections" in r ? wl(r) : yl(r);
|
|
4161
4165
|
} catch {
|
|
4162
4166
|
return null;
|
|
@@ -7220,7 +7224,7 @@ attachAgent();
|
|
|
7220
7224
|
*/
|
|
7221
7225
|
/*! Bundled license information:
|
|
7222
7226
|
|
|
7223
|
-
bippy/dist/rdt-hook-
|
|
7227
|
+
bippy/dist/rdt-hook-5L_ky0r0.js:
|
|
7224
7228
|
(**
|
|
7225
7229
|
* @license bippy
|
|
7226
7230
|
*
|
|
@@ -7230,7 +7234,7 @@ bippy/dist/rdt-hook-BZMdLD7S.js:
|
|
|
7230
7234
|
* LICENSE file in the root directory of this source tree.
|
|
7231
7235
|
*)
|
|
7232
7236
|
|
|
7233
|
-
bippy/dist/core-
|
|
7237
|
+
bippy/dist/core-U1d648PH.js:
|
|
7234
7238
|
(**
|
|
7235
7239
|
* @license bippy
|
|
7236
7240
|
*
|
|
@@ -7250,7 +7254,7 @@ bippy/dist/source.js:
|
|
|
7250
7254
|
* LICENSE file in the root directory of this source tree.
|
|
7251
7255
|
*)
|
|
7252
7256
|
|
|
7253
|
-
bippy/dist/install-hook-only-
|
|
7257
|
+
bippy/dist/install-hook-only-CgvoC7AQ.js:
|
|
7254
7258
|
(**
|
|
7255
7259
|
* @license bippy
|
|
7256
7260
|
*
|
package/dist/index.global.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
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
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.96";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.27",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=[];for(let o of n)if(/^\s*at\s+/.test(o)){let s=ds(o,void 0)[0];s&&r.push(s);}else if(/^\s*in\s+/.test(o)){let s=o.replace(/^\s*in\s+/,"").replace(/\s*\(at .*\)$/,"");r.push({functionName:s,source:o});}else if(o.match(ls)){let s=ps(o,void 0)[0];s&&r.push(s);}return Wt(r,t)}},hr=e=>{if(!e.includes(":"))return [e,void 0,void 0];let t
|
|
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=[];for(let o of n)if(/^\s*at\s+/.test(o)){let s=ds(o,void 0)[0];s&&r.push(s);}else if(/^\s*in\s+/.test(o)){let s=o.replace(/^\s*in\s+/,"").replace(/\s*\(at .*\)$/,"");r.push({functionName:s,source:o});}else if(o.match(ls)){let s=ps(o,void 0)[0];s&&r.push(s);}return Wt(r,t)}},hr=e=>{if(!e.includes(":"))return [e,void 0,void 0];let t=e.startsWith("(")&&/:\d+\)$/.test(e),n=t?e.slice(1,-1):e,r=/(.+?)(?::(\d+))?(?::(\d+))?$/,o=r.exec(n);return o?[o[1],o[2]||void 0,o[3]||void 0]:[n,void 0,void 0]},Wt=(e,t)=>t&&t.slice!=null?Array.isArray(t.slice)?e.slice(t.slice[0],t.slice[1]):e.slice(0,t.slice):e,ds=(e,t)=>Wt(e.split(`
|
|
5
5
|
`).filter(n=>!!n.match(cs)),t).map(n=>{let r=n;r.includes("(eval ")&&(r=r.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));let o=r.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),s=o.match(/ (\(.+\)$)/);o=s?o.replace(s[0],""):o;let l=hr(s?s[1]:o),c=s&&o||void 0,f=["eval","<anonymous>"].includes(l[0])?void 0:l[0];return {functionName:c,fileName:f,lineNumber:l[1]?+l[1]:void 0,columnNumber:l[2]?+l[2]:void 0,source:r}}),ps=(e,t)=>Wt(e.split(`
|
|
6
6
|
`).filter(n=>!n.match(us)),t).map(n=>{let r=n;if(r.includes(" > eval")&&(r=r.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),!r.includes("@")&&!r.includes(":"))return {functionName:r};{let o=/(([^\n\r"\u2028\u2029]*".[^\n\r"\u2028\u2029]*"[^\n\r@\u2028\u2029]*(?:@[^\n\r"\u2028\u2029]*"[^\n\r@\u2028\u2029]*)*(?:[\n\r\u2028\u2029][^@]*)?)?[^@]*)@/,s=r.match(o),l=s&&s[1]?s[1]:void 0,c=hr(r.replace(o,""));return {functionName:l,fileName:c[0],lineNumber:c[1]?+c[1]:void 0,columnNumber:c[2]?+c[2]:void 0,source:r}}}),fs=es((e,t)=>{(function(n,r){typeof e=="object"&&t!==void 0?r(e):typeof define=="function"&&define.amd?define(["exports"],r):(n=typeof globalThis<"u"?globalThis:n||self,r(n.sourcemapCodec={}));})(void 0,function(n){let r=44,o=59,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=new Uint8Array(64),c=new Uint8Array(128);for(let N=0;N<s.length;N++){let E=s.charCodeAt(N);l[N]=E,c[E]=N;}function f(N,E){let y=0,T=0,k=0;do{let B=N.next();k=c[B],y|=(k&31)<<T,T+=5;}while(k&32);let M=y&1;return y>>>=1,M&&(y=-2147483648|-y),E+y}function g(N,E,y){let T=E-y;T=T<0?-T<<1|1:T<<1;do{let k=T&31;T>>>=5,T>0&&(k|=32),N.write(l[k]);}while(T>0);return E}function S(N,E){return N.pos>=E?false:N.peek()!==r}let v=1024*16,m=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(N){return Buffer.from(N.buffer,N.byteOffset,N.byteLength).toString()}}:{decode(N){let E="";for(let y=0;y<N.length;y++)E+=String.fromCharCode(N[y]);return E}};class x{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(v);}write(E){let{buffer:y}=this;y[this.pos++]=E,this.pos===v&&(this.out+=m.decode(y),this.pos=0);}flush(){let{buffer:E,out:y,pos:T}=this;return T>0?y+m.decode(E.subarray(0,T)):y}}class A{constructor(E){this.pos=0,this.buffer=E;}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(E){let{buffer:y,pos:T}=this,k=y.indexOf(E,T);return k===-1?y.length:k}}let L=[];function P(N){let{length:E}=N,y=new A(N),T=[],k=[],M=0;for(;y.pos<E;y.pos++){M=f(y,M);let B=f(y,0);if(!S(y,E)){let p=k.pop();p[2]=M,p[3]=B;continue}let $=f(y,0),V=f(y,0),z=V&1,b=z?[M,B,0,0,$,f(y,0)]:[M,B,0,0,$],_=L;if(S(y,E)){_=[];do{let p=f(y,0);_.push(p);}while(S(y,E))}b.vars=_,T.push(b),k.push(b);}return T}function G(N){let E=new x;for(let y=0;y<N.length;)y=W(N,y,E,[0]);return E.flush()}function W(N,E,y,T){let k=N[E],{0:M,1:B,2:$,3:V,4:z,vars:b}=k;E>0&&y.write(r),T[0]=g(y,M,T[0]),g(y,B,0),g(y,z,0);let _=k.length===6?1:0;g(y,_,0),k.length===6&&g(y,k[5],0);for(let p of b)g(y,p,0);for(E++;E<N.length;){let p=N[E],{0:i,1:a}=p;if(i>$||i===$&&a>=V)break;E=W(N,E,y,T);}return y.write(r),T[0]=g(y,$,T[0]),g(y,V,0),E}function te(N){let{length:E}=N,y=new A(N),T=[],k=[],M=0,B=0,$=0,V=0,z=0,b=0,_=0,p=0;do{let i=y.indexOf(";"),a=0;for(;y.pos<i;y.pos++){if(a=f(y,a),!S(y,i)){let I=k.pop();I[2]=M,I[3]=a;continue}let u=f(y,0),d=u&1,h=u&2,w=u&4,C=null,D=L,U;if(d){let I=f(y,B);$=f(y,B===I?$:0),B=I,U=[M,a,0,0,I,$];}else U=[M,a,0,0];if(U.isScope=!!w,h){let I=V,ne=z;V=f(y,V);let oe=I===V;z=f(y,oe?z:0),b=f(y,oe&&ne===z?b:0),C=[V,z,b];}if(U.callsite=C,S(y,i)){D=[];do{_=M,p=a;let I=f(y,0),ne;if(I<-1){ne=[[f(y,0)]];for(let oe=-1;oe>I;oe--){let Se=_;_=f(y,_),p=f(y,_===Se?p:0);let gt=f(y,0);ne.push([gt,_,p]);}}else ne=[[I]];D.push(ne);}while(S(y,i))}U.bindings=D,T.push(U),k.push(U);}M++,y.pos=i+1;}while(y.pos<E);return T}function ee(N){if(N.length===0)return "";let E=new x;for(let y=0;y<N.length;)y=Z(N,y,E,[0,0,0,0,0,0,0]);return E.flush()}function Z(N,E,y,T){let k=N[E],{0:M,1:B,2:$,3:V,isScope:z,callsite:b,bindings:_}=k;T[0]<M?(ce(y,T[0],M),T[0]=M,T[1]=0):E>0&&y.write(r),T[1]=g(y,k[1],T[1]);let p=(k.length===6?1:0)|(b?2:0)|(z?4:0);if(g(y,p,0),k.length===6){let{4:i,5:a}=k;i!==T[2]&&(T[3]=0),T[2]=g(y,i,T[2]),T[3]=g(y,a,T[3]);}if(b){let{0:i,1:a,2:u}=k.callsite;i===T[4]?a!==T[5]&&(T[6]=0):(T[5]=0,T[6]=0),T[4]=g(y,i,T[4]),T[5]=g(y,a,T[5]),T[6]=g(y,u,T[6]);}if(_)for(let i of _){i.length>1&&g(y,-i.length,0);let a=i[0][0];g(y,a,0);let u=M,d=B;for(let h=1;h<i.length;h++){let w=i[h];u=g(y,w[1],u),d=g(y,w[2],d),g(y,w[0],0);}}for(E++;E<N.length;){let i=N[E],{0:a,1:u}=i;if(a>$||a===$&&u>=V)break;E=Z(N,E,y,T);}return T[0]<$?(ce(y,T[0],$),T[0]=$,T[1]=0):y.write(r),T[1]=g(y,V,T[1]),E}function ce(N,E,y){do N.write(o);while(++E<y)}function ue(N){let{length:E}=N,y=new A(N),T=[],k=0,M=0,B=0,$=0,V=0;do{let z=y.indexOf(";"),b=[],_=true,p=0;for(k=0;y.pos<z;){let i;k=f(y,k),k<p&&(_=false),p=k,S(y,z)?(M=f(y,M),B=f(y,B),$=f(y,$),S(y,z)?(V=f(y,V),i=[k,M,B,$,V]):i=[k,M,B,$]):i=[k],b.push(i),y.pos++;}_||R(b),T.push(b),y.pos=z+1;}while(y.pos<=E);return T}function R(N){N.sort(j);}function j(N,E){return N[0]-E[0]}function H(N){let E=new x,y=0,T=0,k=0,M=0;for(let B=0;B<N.length;B++){let $=N[B];if(B>0&&E.write(o),$.length===0)continue;let V=0;for(let z=0;z<$.length;z++){let b=$[z];z>0&&E.write(r),V=g(E,b[0],V),b.length!==1&&(y=g(E,b[1],y),T=g(E,b[2],T),k=g(E,b[3],k),b.length!==4&&(M=g(E,b[4],M)));}}return E.flush()}n.decode=ue,n.decodeGeneratedRanges=te,n.decodeOriginalScopes=P,n.encode=H,n.encodeGeneratedRanges=ee,n.encodeOriginalScopes=G,Object.defineProperty(n,"__esModule",{value:true});});}),mr=ns(fs()),gr=/^[a-zA-Z][a-zA-Z\d+\-.]*:/,hs=/^data:application\/json[^,]+base64,/,ms=/(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^*]+?)[ \t]*(?:\*\/)[ \t]*$)/,br=typeof WeakRef<"u",qe=new Map,lt=new Map,gs=e=>br&&e instanceof WeakRef,zn=(e,t,n,r)=>{if(n<0||n>=e.length)return null;let o=e[n];if(!o||o.length===0)return null;let s=null;for(let S of o)if(S[0]<=r)s=S;else break;if(!s||s.length<4)return null;let[,l,c,f]=s;if(l===void 0||c===void 0||f===void 0)return null;let g=t[l];return g?{columnNumber:f,fileName:g,lineNumber:c+1}:null},bs=(e,t,n)=>{if(e.sections){let r=null;for(let l of e.sections)if(t>l.offset.line||t===l.offset.line&&n>=l.offset.column)r=l;else break;if(!r)return null;let o=t-r.offset.line,s=t===r.offset.line?n-r.offset.column:n;return zn(r.map.mappings,r.map.sources,o,s)}return zn(e.mappings,e.sources,t-1,n)},ys=(e,t)=>{let n=t.split(`
|
|
7
|
-
`),r;for(let s=n.length-1;s>=0&&!r;s--){let l=n[s].match(ms);l&&(r=l[1]||l[2]);}if(!r)return null;let o=gr.test(r);if(!(hs.test(r)||o||r.startsWith("/"))){let s=e.split("/");s[s.length-1]=r,r=s.join("/");}return r},vs=e=>({file:e.file,mappings:(0, mr.decode)(e.mappings),names:e.names,sourceRoot:e.sourceRoot,sources:e.sources,sourcesContent:e.sourcesContent,version:3}),ws=e=>{let t=e.sections.map(({map:r,offset:o})=>({map:{...r,mappings:(0, mr.decode)(r.mappings)},offset:o})),n=new Set;for(let r of t)for(let o of r.map.sources)n.add(o);return {file:e.file,mappings:[],names:[],sections:t,sourceRoot:void 0,sources:Array.from(n),sourcesContent:void 0,version:3}},Un=e=>{if(!e)return false;let t=e.trim();if(!t)return false;let n=t.match(gr);if(!n)return true;let r=n[0].toLowerCase();return r==="http:"||r==="https:"},xs=async(e,t=fetch)=>{if(!Un(e))return null;let n;try{
|
|
7
|
+
`),r;for(let s=n.length-1;s>=0&&!r;s--){let l=n[s].match(ms);l&&(r=l[1]||l[2]);}if(!r)return null;let o=gr.test(r);if(!(hs.test(r)||o||r.startsWith("/"))){let s=e.split("/");s[s.length-1]=r,r=s.join("/");}return r},vs=e=>({file:e.file,mappings:(0, mr.decode)(e.mappings),names:e.names,sourceRoot:e.sourceRoot,sources:e.sources,sourcesContent:e.sourcesContent,version:3}),ws=e=>{let t=e.sections.map(({map:r,offset:o})=>({map:{...r,mappings:(0, mr.decode)(r.mappings)},offset:o})),n=new Set;for(let r of t)for(let o of r.map.sources)n.add(o);return {file:e.file,mappings:[],names:[],sections:t,sourceRoot:void 0,sources:Array.from(n),sourcesContent:void 0,version:3}},Un=e=>{if(!e)return false;let t=e.trim();if(!t)return false;let n=t.match(gr);if(!n)return true;let r=n[0].toLowerCase();return r==="http:"||r==="https:"},xs=async(e,t=fetch)=>{if(!Un(e))return null;let n;try{let o=await t(e);if(!o.ok)return null;n=await o.text();}catch{return null}if(!n)return null;let r=ys(e,n);if(!r||!Un(r))return null;try{let o=await t(r);if(!o.ok)return null;let s=await o.json();return "sections"in s?ws(s):vs(s)}catch{return null}},Es=async(e,t=true,n)=>{if(t&&qe.has(e)){let s=qe.get(e);if(s==null)return null;if(gs(s)){let l=s.deref();if(l)return l;qe.delete(e);}else return s}if(t&<.has(e))return lt.get(e);let r=xs(e,n);t&<.set(e,r);let o=await r;return t&<.delete(e),t&&(o===null?qe.set(e,null):qe.set(e,br?new WeakRef(o):o)),o},Ss=async(e,t=true,n)=>await Promise.all(e.map(async r=>{if(!r.fileName)return r;let o=await Es(r.fileName,t,n);if(!o||typeof r.lineNumber!="number"||typeof r.columnNumber!="number")return r;let s=bs(o,r.lineNumber,r.columnNumber);return s?{...r,source:s.fileName&&r.source?r.source.replace(r.fileName,s.fileName):r.source,fileName:s.fileName,lineNumber:s.lineNumber,columnNumber:s.columnNumber,isSymbolicated:true}:r})),Ts=e=>e._debugStack instanceof Error&&typeof e._debugStack?.stack=="string",Cs=()=>{let e=Pe();for(let t of [...Array.from(Xe),...Array.from(e.renderers.values())]){let n=t.currentDispatcherRef;if(n&&typeof n=="object")return "H"in n?n.H:n.current}return null},jn=e=>{for(let t of Xe){let n=t.currentDispatcherRef;n&&typeof n=="object"&&("H"in n?n.H=e:n.current=e);}},le=e=>`
|
|
8
8
|
in ${e}`,_s=(e,t)=>{let n=le(e);return t&&(n+=` (at ${t})`),n},Bt=false,Ft=(e,t)=>{if(!e||Bt)return "";let n=Error.prepareStackTrace;Error.prepareStackTrace=void 0,Bt=true;let r=Cs();jn(null);let o=console.error,s=console.warn;console.error=()=>{},console.warn=()=>{};try{let c={DetermineComponentFrameRoot(){let S;try{if(t){let v=function(){throw Error()};if(Object.defineProperty(v.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(v,[]);}catch(m){S=m;}Reflect.construct(e,[],v);}else {try{v.call();}catch(m){S=m;}e.call(v.prototype);}}else {try{throw Error()}catch(m){S=m;}let v=e();v&&typeof v.catch=="function"&&v.catch(()=>{});}}catch(v){if(v instanceof Error&&S instanceof Error&&typeof v.stack=="string")return [v.stack,S.stack]}return [null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot",Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name")?.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});let[f,g]=c.DetermineComponentFrameRoot();if(f&&g){let S=f.split(`
|
|
9
9
|
`),v=g.split(`
|
|
10
10
|
`),m=0,x=0;for(;m<S.length&&!S[m].includes("DetermineComponentFrameRoot");)m++;for(;x<v.length&&!v[x].includes("DetermineComponentFrameRoot");)x++;if(m===S.length||x===v.length)for(m=S.length-1,x=v.length-1;m>=1&&x>=0&&S[m]!==v[x];)x--;for(;m>=1&&x>=0;m--,x--)if(S[m]!==v[x]){if(m!==1||x!==1)do if(m--,x--,x<0||S[m]!==v[x]){let A=`
|
|
@@ -64,7 +64,7 @@ Continue modifying or output final JavaScript code (without JSON wrapper) when d
|
|
|
64
64
|
*/
|
|
65
65
|
/*! Bundled license information:
|
|
66
66
|
|
|
67
|
-
bippy/dist/rdt-hook-
|
|
67
|
+
bippy/dist/rdt-hook-5L_ky0r0.js:
|
|
68
68
|
(**
|
|
69
69
|
* @license bippy
|
|
70
70
|
*
|
|
@@ -74,7 +74,7 @@ bippy/dist/rdt-hook-BZMdLD7S.js:
|
|
|
74
74
|
* LICENSE file in the root directory of this source tree.
|
|
75
75
|
*)
|
|
76
76
|
|
|
77
|
-
bippy/dist/core-
|
|
77
|
+
bippy/dist/core-U1d648PH.js:
|
|
78
78
|
(**
|
|
79
79
|
* @license bippy
|
|
80
80
|
*
|
|
@@ -94,7 +94,7 @@ bippy/dist/source.js:
|
|
|
94
94
|
* LICENSE file in the root directory of this source tree.
|
|
95
95
|
*)
|
|
96
96
|
|
|
97
|
-
bippy/dist/install-hook-only-
|
|
97
|
+
bippy/dist/install-hook-only-CgvoC7AQ.js:
|
|
98
98
|
(**
|
|
99
99
|
* @license bippy
|
|
100
100
|
*
|
package/dist/server.cjs
CHANGED
|
@@ -7,7 +7,7 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
7
7
|
var pc__default = /*#__PURE__*/_interopDefault(pc);
|
|
8
8
|
|
|
9
9
|
// src/server.ts
|
|
10
|
-
var VERSION = "0.0.
|
|
10
|
+
var VERSION = "0.0.97";
|
|
11
11
|
try {
|
|
12
12
|
fetch(
|
|
13
13
|
`https://www.react-grab.com/api/version?source=visual-edit&t=${Date.now()}`
|
package/dist/server.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-grab/visual-edit",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.97",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"react-grab-visual-edit": "./dist/cli.cjs"
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@types/node": "^24.10.2",
|
|
28
28
|
"picocolors": "^1.1.1",
|
|
29
|
-
"react-grab": "0.0.
|
|
29
|
+
"react-grab": "0.0.97"
|
|
30
30
|
},
|
|
31
31
|
"scripts": {
|
|
32
32
|
"dev": "tsup --watch",
|