@texturehq/edges 5.9.0 → 5.10.1
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/{colors-gtFYJRlG.d.ts → colors-B7iUqDUu.d.ts} +47 -1
- package/dist/{colors-DHG6UEkV.d.cts → colors-DyB9mRDa.d.cts} +47 -1
- package/dist/form/index.cjs +1 -1
- package/dist/form/index.cjs.map +1 -1
- package/dist/form/index.js +1 -1
- package/dist/form/index.js.map +1 -1
- package/dist/index.cjs +10 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +10 -10
- package/dist/index.js.map +1 -1
- package/dist/rhf/index.cjs +2 -2
- package/dist/rhf/index.cjs.map +1 -1
- package/dist/rhf/index.js +2 -2
- package/dist/rhf/index.js.map +1 -1
- package/dist/server.cjs +2 -2
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.cts +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.js +2 -2
- package/dist/server.js.map +1 -1
- package/package.json +1 -1
|
@@ -1886,6 +1886,20 @@ interface VectorLayerSpec extends BaseLayerSpec {
|
|
|
1886
1886
|
* rendered as a bracket over the conductor line. Ignored for non-circle layers.
|
|
1887
1887
|
*/
|
|
1888
1888
|
hideChipWhen?: any;
|
|
1889
|
+
/**
|
|
1890
|
+
* Reveal the chip (circle fill + border) only while the feature is hovered —
|
|
1891
|
+
* the resting render is fully transparent, so only a glyph drawn on top
|
|
1892
|
+
* occupies the map. For dense point layers (e.g. tens of thousands of
|
|
1893
|
+
* support structures) where a permanent chip per feature is visual noise.
|
|
1894
|
+
*
|
|
1895
|
+
* Driven by the `hover` feature-state, which `InteractiveMap` sets/clears in
|
|
1896
|
+
* its shared mouse handlers — so this only works for layers rendered inside
|
|
1897
|
+
* an InteractiveMap, and **requires `promoteId`** (feature-state needs
|
|
1898
|
+
* feature ids, and vector-tile features usually have none). Composes with
|
|
1899
|
+
* `hideChipWhen`: features matching that expression stay chipless even while
|
|
1900
|
+
* hovered. Ignored for non-circle layers.
|
|
1901
|
+
*/
|
|
1902
|
+
revealChipOnHover?: boolean;
|
|
1889
1903
|
}
|
|
1890
1904
|
/**
|
|
1891
1905
|
* GeoJSON layer (client-side data or URL)
|
|
@@ -3096,7 +3110,7 @@ declare const ENTITY_CATEGORY_CONFIG: {
|
|
|
3096
3110
|
};
|
|
3097
3111
|
/** The coarse element-type axis (mirrors `@texturehq/grid-element-config`'s
|
|
3098
3112
|
* `GridElementType`; kept in sync by transcription). */
|
|
3099
|
-
type GridElementSourceType = "CAPACITOR" | "CONSUMER" | "GENERATOR" | "MOTOR" | "NODE" | "OVERCURRENT_DEVICE" | "OVERHEAD_LINE" | "REGULATOR" | "SOURCE" | "SUPPORT_STRUCTURE" | "SWITCH" | "TRANSFORMER" | "UNDERGROUND_LINE";
|
|
3113
|
+
type GridElementSourceType = "CAPACITOR" | "CONSUMER" | "DEVICE_LEADER" | "GENERATOR" | "MOTOR" | "NODE" | "OVERCURRENT_DEVICE" | "OVERHEAD_LINE" | "REGULATOR" | "SOURCE" | "SUPPORT_STRUCTURE" | "SWITCH" | "TRANSFORMER" | "TRANSFORMER_BANK" | "UNDERGROUND_LINE";
|
|
3100
3114
|
/**
|
|
3101
3115
|
* JSONB keys that are ABSENT or PII-zeroed in prod (MR-07 coverage table). No
|
|
3102
3116
|
* grid stat-list row (or headline metric) may reference one of these — enforced
|
|
@@ -3510,6 +3524,8 @@ declare const GRID_STAT_LIST: {
|
|
|
3510
3524
|
readonly decimals: 0;
|
|
3511
3525
|
};
|
|
3512
3526
|
}];
|
|
3527
|
+
readonly DEVICE_LEADER: [];
|
|
3528
|
+
readonly TRANSFORMER_BANK: [];
|
|
3513
3529
|
};
|
|
3514
3530
|
declare const ENTITY_CONFIG: {
|
|
3515
3531
|
readonly app: {
|
|
@@ -4642,6 +4658,34 @@ declare const ENTITY_CONFIG: {
|
|
|
4642
4658
|
};
|
|
4643
4659
|
readonly description: "Structure carrying overhead line equipment";
|
|
4644
4660
|
};
|
|
4661
|
+
readonly deviceLeader: {
|
|
4662
|
+
readonly icon: "FlowArrow";
|
|
4663
|
+
readonly category: "grid";
|
|
4664
|
+
readonly archetype: "grid-line";
|
|
4665
|
+
readonly detailPage: true;
|
|
4666
|
+
readonly properties: {
|
|
4667
|
+
readonly statList: [];
|
|
4668
|
+
};
|
|
4669
|
+
readonly label: {
|
|
4670
|
+
readonly singular: "Device Leader";
|
|
4671
|
+
readonly plural: "Device Leaders";
|
|
4672
|
+
};
|
|
4673
|
+
readonly description: "Cartographic leader line pointing an offset device symbol to its true location";
|
|
4674
|
+
};
|
|
4675
|
+
readonly transformerBank: {
|
|
4676
|
+
readonly icon: "TextureTransformer";
|
|
4677
|
+
readonly category: "grid";
|
|
4678
|
+
readonly archetype: "grid-energized";
|
|
4679
|
+
readonly detailPage: true;
|
|
4680
|
+
readonly properties: {
|
|
4681
|
+
readonly statList: [];
|
|
4682
|
+
};
|
|
4683
|
+
readonly label: {
|
|
4684
|
+
readonly singular: "Transformer Bank";
|
|
4685
|
+
readonly plural: "Transformer Banks";
|
|
4686
|
+
};
|
|
4687
|
+
readonly description: "Grouping of single-phase transformer units sharing a bank id";
|
|
4688
|
+
};
|
|
4645
4689
|
readonly battery: {
|
|
4646
4690
|
readonly icon: "BatteryHigh";
|
|
4647
4691
|
readonly category: "device";
|
|
@@ -5080,6 +5124,8 @@ declare const GRID_ELEMENT_TYPE_BY_ENTITY: {
|
|
|
5080
5124
|
readonly generator: "GENERATOR";
|
|
5081
5125
|
readonly regulator: "REGULATOR";
|
|
5082
5126
|
readonly supportStructure: "SUPPORT_STRUCTURE";
|
|
5127
|
+
readonly deviceLeader: "DEVICE_LEADER";
|
|
5128
|
+
readonly transformerBank: "TRANSFORMER_BANK";
|
|
5083
5129
|
};
|
|
5084
5130
|
/**
|
|
5085
5131
|
* Get entity configuration by type
|
|
@@ -1886,6 +1886,20 @@ interface VectorLayerSpec extends BaseLayerSpec {
|
|
|
1886
1886
|
* rendered as a bracket over the conductor line. Ignored for non-circle layers.
|
|
1887
1887
|
*/
|
|
1888
1888
|
hideChipWhen?: any;
|
|
1889
|
+
/**
|
|
1890
|
+
* Reveal the chip (circle fill + border) only while the feature is hovered —
|
|
1891
|
+
* the resting render is fully transparent, so only a glyph drawn on top
|
|
1892
|
+
* occupies the map. For dense point layers (e.g. tens of thousands of
|
|
1893
|
+
* support structures) where a permanent chip per feature is visual noise.
|
|
1894
|
+
*
|
|
1895
|
+
* Driven by the `hover` feature-state, which `InteractiveMap` sets/clears in
|
|
1896
|
+
* its shared mouse handlers — so this only works for layers rendered inside
|
|
1897
|
+
* an InteractiveMap, and **requires `promoteId`** (feature-state needs
|
|
1898
|
+
* feature ids, and vector-tile features usually have none). Composes with
|
|
1899
|
+
* `hideChipWhen`: features matching that expression stay chipless even while
|
|
1900
|
+
* hovered. Ignored for non-circle layers.
|
|
1901
|
+
*/
|
|
1902
|
+
revealChipOnHover?: boolean;
|
|
1889
1903
|
}
|
|
1890
1904
|
/**
|
|
1891
1905
|
* GeoJSON layer (client-side data or URL)
|
|
@@ -3096,7 +3110,7 @@ declare const ENTITY_CATEGORY_CONFIG: {
|
|
|
3096
3110
|
};
|
|
3097
3111
|
/** The coarse element-type axis (mirrors `@texturehq/grid-element-config`'s
|
|
3098
3112
|
* `GridElementType`; kept in sync by transcription). */
|
|
3099
|
-
type GridElementSourceType = "CAPACITOR" | "CONSUMER" | "GENERATOR" | "MOTOR" | "NODE" | "OVERCURRENT_DEVICE" | "OVERHEAD_LINE" | "REGULATOR" | "SOURCE" | "SUPPORT_STRUCTURE" | "SWITCH" | "TRANSFORMER" | "UNDERGROUND_LINE";
|
|
3113
|
+
type GridElementSourceType = "CAPACITOR" | "CONSUMER" | "DEVICE_LEADER" | "GENERATOR" | "MOTOR" | "NODE" | "OVERCURRENT_DEVICE" | "OVERHEAD_LINE" | "REGULATOR" | "SOURCE" | "SUPPORT_STRUCTURE" | "SWITCH" | "TRANSFORMER" | "TRANSFORMER_BANK" | "UNDERGROUND_LINE";
|
|
3100
3114
|
/**
|
|
3101
3115
|
* JSONB keys that are ABSENT or PII-zeroed in prod (MR-07 coverage table). No
|
|
3102
3116
|
* grid stat-list row (or headline metric) may reference one of these — enforced
|
|
@@ -3510,6 +3524,8 @@ declare const GRID_STAT_LIST: {
|
|
|
3510
3524
|
readonly decimals: 0;
|
|
3511
3525
|
};
|
|
3512
3526
|
}];
|
|
3527
|
+
readonly DEVICE_LEADER: [];
|
|
3528
|
+
readonly TRANSFORMER_BANK: [];
|
|
3513
3529
|
};
|
|
3514
3530
|
declare const ENTITY_CONFIG: {
|
|
3515
3531
|
readonly app: {
|
|
@@ -4642,6 +4658,34 @@ declare const ENTITY_CONFIG: {
|
|
|
4642
4658
|
};
|
|
4643
4659
|
readonly description: "Structure carrying overhead line equipment";
|
|
4644
4660
|
};
|
|
4661
|
+
readonly deviceLeader: {
|
|
4662
|
+
readonly icon: "FlowArrow";
|
|
4663
|
+
readonly category: "grid";
|
|
4664
|
+
readonly archetype: "grid-line";
|
|
4665
|
+
readonly detailPage: true;
|
|
4666
|
+
readonly properties: {
|
|
4667
|
+
readonly statList: [];
|
|
4668
|
+
};
|
|
4669
|
+
readonly label: {
|
|
4670
|
+
readonly singular: "Device Leader";
|
|
4671
|
+
readonly plural: "Device Leaders";
|
|
4672
|
+
};
|
|
4673
|
+
readonly description: "Cartographic leader line pointing an offset device symbol to its true location";
|
|
4674
|
+
};
|
|
4675
|
+
readonly transformerBank: {
|
|
4676
|
+
readonly icon: "TextureTransformer";
|
|
4677
|
+
readonly category: "grid";
|
|
4678
|
+
readonly archetype: "grid-energized";
|
|
4679
|
+
readonly detailPage: true;
|
|
4680
|
+
readonly properties: {
|
|
4681
|
+
readonly statList: [];
|
|
4682
|
+
};
|
|
4683
|
+
readonly label: {
|
|
4684
|
+
readonly singular: "Transformer Bank";
|
|
4685
|
+
readonly plural: "Transformer Banks";
|
|
4686
|
+
};
|
|
4687
|
+
readonly description: "Grouping of single-phase transformer units sharing a bank id";
|
|
4688
|
+
};
|
|
4645
4689
|
readonly battery: {
|
|
4646
4690
|
readonly icon: "BatteryHigh";
|
|
4647
4691
|
readonly category: "device";
|
|
@@ -5080,6 +5124,8 @@ declare const GRID_ELEMENT_TYPE_BY_ENTITY: {
|
|
|
5080
5124
|
readonly generator: "GENERATOR";
|
|
5081
5125
|
readonly regulator: "REGULATOR";
|
|
5082
5126
|
readonly supportStructure: "SUPPORT_STRUCTURE";
|
|
5127
|
+
readonly deviceLeader: "DEVICE_LEADER";
|
|
5128
|
+
readonly transformerBank: "TRANSFORMER_BANK";
|
|
5083
5129
|
};
|
|
5084
5130
|
/**
|
|
5085
5131
|
* Get entity configuration by type
|
package/dist/form/index.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
'use strict';var lt=require('react'),reactAriaComponents=require('react-aria-components'),tailwindMerge=require('tailwind-merge'),jsxRuntime=require('react/jsx-runtime'),et=require('@phosphor-icons/react');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var lt__namespace=/*#__PURE__*/_interopNamespace(lt);var et__namespace=/*#__PURE__*/_interopNamespace(et);var Bt=Object.defineProperty;var Lt=(e,t,o)=>t in e?Bt(e,t,{enumerable:true,configurable:true,writable:true,value:o}):e[t]=o;var Le=(e,t,o)=>Lt(e,typeof t!="symbol"?t+"":t,o);function qe(e,t=false){let[o,r]=lt.useState(t);return lt.useEffect(()=>{if(typeof window>"u")return;let n=window.matchMedia(e);r(n.matches);let a=s=>{r(s.matches);};return n.addEventListener("change",a),()=>{n.removeEventListener("change",a);}},[e]),o}function ve(e=true){let[t,o]=lt.useState(null);return lt.useEffect(()=>{if(!e){o(null);return}let r=typeof window<"u"?window.visualViewport:null;if(!r)return;let n=()=>{let a=Math.max(0,window.innerHeight-r.height-(r.offsetTop??0));o({height:r.height,keyboardOffset:a});};return n(),r.addEventListener("resize",n),r.addEventListener("scroll",n),()=>{r.removeEventListener("resize",n),r.removeEventListener("scroll",n);}},[e]),t}function ye(...e){return e.filter(Boolean).join(" ")}var F={displayXl:"text-display-xl",displayLg:"text-display-lg",displayMd:"text-display-md",displaySm:"text-display-sm",headingXl:"text-heading-xl",headingLg:"text-heading-lg",headingMd:"text-heading-md",headingSm:"text-heading-sm",bodyLg:"text-body-lg",bodyMd:"text-body-md",bodySm:"text-body-sm",labelLg:"text-label-lg",labelMd:"text-label-md",labelSm:"text-label-sm",code:"text-code",agent:"text-agent"};function Xe(e,...t){return ye(F[e],...t)}function Qe(e=false){return `${e?"outline outline-1 outline-border-input data-[focus-visible]:outline-2 data-[focus-visible]:outline-action-default data-[focus-visible]:outline-offset-0 invalid:outline-2 invalid:outline-feedback-error-border group-invalid:outline-2 group-invalid:outline-feedback-error-border forced-colors:focus:outline-[Highlight] forced-colors:focus:outline-2 forced-colors:focus:outline-offset-2":"outline-none data-[focus-visible]:outline data-[focus-visible]:outline-2 data-[focus-visible]:outline-action-default data-[focus-visible]:outline-offset-0 invalid:outline-2 invalid:outline-feedback-error-border group-invalid:outline-2 group-invalid:outline-feedback-error-border forced-colors:focus:outline-[Highlight] forced-colors:focus:outline-2 forced-colors:focus:outline-offset-2"}`}var ee={sm:{text:"text-[length:var(--control-text-sm)]",height:"h-[var(--control-sm-height)]",padding:"px-[var(--control-padding-sm)]",paddingY:"py-[var(--control-gap-sm)]",gap:"gap-[var(--control-gap-sm)]"},md:{text:"text-[length:var(--control-text-md)]",height:"h-[var(--control-md-height)]",padding:"px-[var(--control-padding-md)]",paddingY:"py-[var(--control-gap-md)]",gap:"gap-[var(--control-gap-md)]"},lg:{text:"text-[length:var(--control-text-lg)]",height:"h-[var(--control-lg-height)]",padding:"px-[var(--control-padding-lg)]",paddingY:"py-[var(--control-gap-lg)]",gap:"gap-[var(--control-gap-lg)]"},xl:{text:"text-[length:var(--control-text-xl)]",height:"h-[var(--control-xl-height)]",padding:"px-[var(--control-padding-xl)]",paddingY:"py-[var(--control-gap-xl)]",gap:"gap-[var(--control-gap-xl)]"}};function h(e,t){let o=lt.forwardRef(({size:r=24,color:n="currentColor",className:a,mirrored:s,alt:i,...l},c)=>{let p=!!i||"aria-label"in l;return jsxRuntime.jsx("svg",{ref:c,xmlns:"http://www.w3.org/2000/svg",width:r,height:r,viewBox:"0 0 256 256",fill:n,className:a,transform:s?"scale(-1, 1)":void 0,"aria-hidden":p?void 0:true,role:p?"img":void 0,"aria-label":i,...l,children:t})});return o.displayName=e,o}var Ce=()=>jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("path",{d:"M12 128h44M200 128h44",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round"}),jsxRuntime.jsx("circle",{cx:"76",cy:"128",r:"20",fill:"none",stroke:"currentColor",strokeWidth:"16"}),jsxRuntime.jsx("circle",{cx:"180",cy:"128",r:"20",fill:"none",stroke:"currentColor",strokeWidth:"16"})]}),Je=()=>jsxRuntime.jsx("path",{d:"M166 120 88 70",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round"}),Ke=()=>jsxRuntime.jsx("path",{d:"M162 122 92 128",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round"}),Ze=()=>jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("path",{d:"M112 85.7 A32 32 0 1 1 144 85.7",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round"}),jsxRuntime.jsx("circle",{cx:"128",cy:"58",r:"8",fill:"currentColor",stroke:"none"})]}),Ot=h("TextureRecloser",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("rect",{x:"36",y:"36",width:"184",height:"184",fill:"none",stroke:"currentColor",strokeWidth:"16"}),jsxRuntime.jsx("text",{x:"128",y:"126",textAnchor:"middle",dominantBaseline:"central",fontFamily:"ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",fontSize:"140",fontWeight:"700",fill:"currentColor",stroke:"none",children:"R"})]})),Vt=h("TextureFuse",jsxRuntime.jsx("path",{d:"M20 128h72q18 -84 36 0q18 84 36 0h72",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round",strokeLinejoin:"round"})),Wt=h("TextureBreaker",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("rect",{x:"36",y:"36",width:"184",height:"184",fill:"none",stroke:"currentColor",strokeWidth:"16"}),jsxRuntime.jsx("text",{x:"128",y:"126",textAnchor:"middle",dominantBaseline:"central",fontFamily:"ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",fontSize:"140",fontWeight:"700",fill:"currentColor",stroke:"none",children:"B"})]})),_t=h("TextureSource",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("path",{d:"M4 128h40M212 128h40",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round"}),jsxRuntime.jsx("circle",{cx:"128",cy:"128",r:"84",fill:"none",stroke:"currentColor",strokeWidth:"16"}),jsxRuntime.jsx("path",{d:"M92 128q18 -84 36 0q18 84 36 0",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round",strokeLinejoin:"round"})]})),$t=h("TextureCapacitor",jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx("path",{d:"M4 128h106M146 128h106M110 72v112M146 72v112",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round"})})),Yt=h("TextureRegulator",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("circle",{cx:"128",cy:"128",r:"92",fill:"none",stroke:"currentColor",strokeWidth:"16"}),jsxRuntime.jsx("text",{x:"128",y:"126",textAnchor:"middle",dominantBaseline:"central",fontFamily:"ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",fontSize:"128",fontWeight:"700",fill:"currentColor",stroke:"none",children:"V"})]})),jt=h("TextureSwitch",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Ce,{}),jsxRuntime.jsx(Je,{})]})),Ut=h("TextureSwitchClosed",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Ce,{}),jsxRuntime.jsx(Ke,{})]})),Gt=h("TextureOpenPoint",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("path",{d:"M112 52 C 74 92, 74 164, 112 204",fill:"none",stroke:"currentColor",strokeWidth:"18",strokeLinecap:"round"}),jsxRuntime.jsx("path",{d:"M144 52 C 182 92, 182 164, 144 204",fill:"none",stroke:"currentColor",strokeWidth:"18",strokeLinecap:"round"})]})),qt=h("TextureSectionalizerOpen",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Ce,{}),jsxRuntime.jsx(Je,{}),jsxRuntime.jsx(Ze,{})]})),Xt=h("TextureSectionalizerClosed",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Ce,{}),jsxRuntime.jsx(Ke,{}),jsxRuntime.jsx(Ze,{})]})),Qt=h("TextureTransformer",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("path",{d:"M40 64H88A22 22 0 0 1 88 108A22 22 0 0 1 88 152A22 22 0 0 1 88 196H40",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("path",{d:"M216 64H168A22 22 0 0 0 168 108A22 22 0 0 0 168 152A22 22 0 0 0 168 196H216",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round",strokeLinejoin:"round"})]})),ie={1:[128],2:[110,146],3:[92,128,164]},Me=e=>jsxRuntime.jsx("path",{d:`M24 ${e}h208`,fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round"},e),Ee=e=>jsxRuntime.jsx("path",{d:`M24 ${e}h208`,fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round",pathLength:100,strokeDasharray:"20 20"},e),Jt=h("TextureSinglePhaseOverheadLine",jsxRuntime.jsx(jsxRuntime.Fragment,{children:ie[1].map(Me)})),Kt=h("TextureTwoPhaseOverheadLine",jsxRuntime.jsx(jsxRuntime.Fragment,{children:ie[2].map(Me)})),Zt=h("TextureThreePhaseOverheadLine",jsxRuntime.jsx(jsxRuntime.Fragment,{children:ie[3].map(Me)})),eo=h("TextureSinglePhaseUndergroundLine",jsxRuntime.jsx(jsxRuntime.Fragment,{children:ie[1].map(Ee)})),to=h("TextureTwoPhaseUndergroundLine",jsxRuntime.jsx(jsxRuntime.Fragment,{children:ie[2].map(Ee)})),oo=h("TextureThreePhaseUndergroundLine",jsxRuntime.jsx(jsxRuntime.Fragment,{children:ie[3].map(Ee)})),ro=h("TextureSupportStructure",jsxRuntime.jsx("circle",{cx:"128",cy:"128",r:"40",fill:"currentColor",stroke:"none"})),Pe={TextureRecloser:Ot,TextureFuse:Vt,TextureBreaker:Wt,TextureSource:_t,TextureCapacitor:$t,TextureRegulator:Yt,TextureSwitch:jt,TextureSwitchClosed:Ut,TextureOpenPoint:Gt,TextureSectionalizerOpen:qt,TextureSectionalizerClosed:Xt,TextureTransformer:Qt,TextureSinglePhaseOverheadLine:Jt,TextureTwoPhaseOverheadLine:Kt,TextureThreePhaseOverheadLine:Zt,TextureSinglePhaseUndergroundLine:eo,TextureTwoPhaseUndergroundLine:to,TextureThreePhaseUndergroundLine:oo,TextureSupportStructure:ro};if(process.env.NODE_ENV==="development")for(let e of Object.keys(Pe))e in et__namespace&&console.error(`Custom icon "${e}" collides with a Phosphor icon of the same name. Rename it (use the "Texture" prefix) to keep the icon namespace unambiguous.`);var se={xs:16,sm:20,md:24,lg:32,xl:40,"2xl":48},I=lt.memo(({name:e,size:t="md",color:o,weight:r="regular",className:n,ariaLabel:a,...s})=>{let i=Pe[e]??et__namespace[e];if(!i)return process.env.NODE_ENV==="development"&&console.error(`Icon "${e}" not found in @phosphor-icons/react or the custom icon registry`),null;let l=typeof t=="string"&&t in se?se[t]:t,c=tailwindMerge.twMerge("inline-block flex-shrink-0",!o&&"text-current",n);return jsxRuntime.jsx(i,{...s,size:l,color:o,weight:r,className:c,"aria-label":a||`${e} icon`,"data-testid":`icon-${e}`})});I.displayName="Icon";var no=lt.memo(({variant:e="subtle",shape:t="square",containerSize:o,containerClassName:r,size:n="md",className:a,name:s,color:i,weight:l,ariaLabel:c,ref:p,...u})=>{let x=typeof n=="string"&&n in se?se[n]:n,P=o?typeof o=="string"&&o in se?se[o]:o:x*1.75,v=tailwindMerge.twMerge("inline-flex items-center justify-center flex-shrink-0",t==="circle"?"rounded-full":"rounded-lg",e==="subtle"&&"bg-background-muted",e==="solid"&&"bg-action-brand text-[color:var(--color-action-brand-text)]",e==="outline"&&"border-2 border-current",r);return jsxRuntime.jsx("div",{className:v,style:{width:P,height:P},children:jsxRuntime.jsx(I,{...u,name:s,size:n,color:i,weight:l,className:a,ariaLabel:c})})});no.displayName="IconWithContainer";var so="flex font-medium justify-center items-center gap-2 text-center transition rounded-[var(--control-border-radius)] whitespace-nowrap box-border",lo="bg-action-primary text-[color:var(--color-action-primary-text)] hover:bg-action-primary-hover forced-colors:bg-[ButtonText] forced-colors:text-[ButtonFace] border-2 border-transparent",co={primary:lo,secondary:"bg-action-secondary text-[color:var(--color-action-secondary-text)] border-2 border-border-muted hover:bg-action-secondary-hover forced-colors:border-[ButtonBorder] forced-colors:bg-[ButtonFace] forced-colors:text-[ButtonText]",ghost:"border-none text-text-primary hover:bg-text-primary/5 forced-colors:text-[ButtonText] forced-colors:hover:bg-[ButtonFace]",destructive:"bg-transparent text-feedback-error-text border-2 border-border-muted hover:bg-feedback-error-background/50 forced-colors:border-[ButtonBorder] forced-colors:bg-[ButtonFace] forced-colors:text-[Mark]",link:"!text-action-primary hover:text-action-primary/90 hover:underline hover:decoration-2 hover:underline-offset-4",icon:"border-none text-text-primary hover:bg-background-hover hover:text-text-primary forced-colors:text-[ButtonText] forced-colors:hover:bg-[ButtonFace] p-1 flex-shrink-0 rounded-[var(--control-border-radius)]",unstyled:"bg-transparent"},nt={full:"w-full",default:"w-fit"},uo="opacity-50 cursor-not-allowed pointer-events-none",po="opacity-100 cursor-pointer",fo={"top-right":"-right-2 -top-2","top-left":"-left-2 -top-2","bottom-right":"-right-2 -bottom-2","bottom-left":"-left-2 -bottom-2"},mo={primary:"bg-action-primary text-[color:var(--color-action-primary-text)]",destructive:"bg-feedback-error-border text-text-inverse"};function go(e){return !e||e==="default"||e==="brand"?"primary":e}function ho(e){let{variant:t="primary",size:o="md",isDisabled:r,fullWidth:n=false,isLoading:a=false}=e,s=go(t),i=s==="unstyled"?"":`${so} ${co[s]}`;s!=="unstyled"&&(i+=` ${ee[o].text} ${ee[o].height} ${ee[o].padding} ${ee[o].gap}`),r||a?i+=` ${uo}`:i+=` ${po}`,n?i+=` ${nt.full}`:i+=` ${nt.default}`;let l=s==="primary"?"focus-visible:outline-action-primary":void 0;return [i,Qe(),l].filter(Boolean).join(" ")}function $(e){let{icon:t,children:o,isLoading:r=false,loadingText:n,loadingIndicator:a,size:s="md",iconPosition:i="left",iconWeight:l,href:c,className:p,badgeNumber:u,badgeVariant:x="primary",badgePosition:P="top-right",style:v,target:S,rel:L,...N}=e,m=t?jsxRuntime.jsx(I,{name:t,size:s,weight:l}):null,k=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[i==="left"&&m,typeof o=="function"?null:o,i==="right"&&m]}),R=jsxRuntime.jsxs("div",{className:"relative inline-flex items-center justify-center",children:[jsxRuntime.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:a||jsxRuntime.jsx(I,{name:"CircleNotch",size:s,className:"animate-spin","aria-hidden":"true"})}),jsxRuntime.jsx("div",{className:"invisible","aria-hidden":"true",children:k}),n&&jsxRuntime.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:n})]}),y=(u??0)>0,w=tailwindMerge.twMerge(ho(e),p),U=c?{href:c,target:S,rel:L,...N}:{};if(c){let{onPress:V,onPressStart:E,onPressEnd:ce,onPressChange:G,onPressUp:re,onAuxClick:ue,onContextMenu:ne,onDoubleClick:W,...H}=N;Object.assign(U,H);}let M=c?jsxRuntime.jsx(reactAriaComponents.Link,{...U,...r&&{"aria-busy":true},style:y?void 0:v,className:w,children:r?R:typeof o=="function"?(function(V){return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[i==="left"&&m,o(V),i==="right"&&m]})}):k}):jsxRuntime.jsx(reactAriaComponents.Button,{...N,...r&&{"aria-busy":true},style:y?void 0:v,className:w,children:r?R:typeof o=="function"?(function(V){return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[i==="left"&&m,o(V),i==="right"&&m]})}):k});return y?jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("relative flex",p),style:v,children:[M,jsxRuntime.jsx("span",{className:`absolute ${fo[P]} flex h-5 w-5 items-center justify-center rounded-full ${mo[x]} text-xs font-medium`,"aria-label":`${u} items`,children:u})]}):M}function Ae({action:e,defaultVariant:t,defaultSize:o="lg"}){let r=!!e.formId;return jsxRuntime.jsx($,{type:r?"submit":"button",form:r?e.formId:void 0,size:e.size||o,variant:e.variant||t,onPress:r?void 0:e.onPress,isLoading:e.isLoading,isDisabled:e.isDisabled,children:e.label})}function X({primaryAction:e,secondaryAction:t,tertiaryAction:o,footerContent:r}){let n=e||t||o;return !n&&!r?null:jsxRuntime.jsxs("div",{className:`flex w-full flex-col items-center justify-center border-t p-4 ${r?"h-28":""}`,children:[r&&jsxRuntime.jsx("div",{className:"flex h-10 justify-center",children:r}),n&&jsxRuntime.jsxs("div",{className:"flex w-full items-center justify-between gap-3",children:[jsxRuntime.jsx("div",{children:o&&jsxRuntime.jsx(Ae,{action:o,defaultVariant:"destructive"})}),jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[t&&jsxRuntime.jsx(Ae,{action:t,defaultVariant:"secondary"}),e&&jsxRuntime.jsx(Ae,{action:e,defaultVariant:"primary"})]})]})]})}var bo={heading:{sm:F.headingSm,md:F.headingMd,lg:F.headingLg,xl:F.headingXl},display:{sm:F.displaySm,md:F.displayMd,lg:F.displayLg,xl:F.displayXl}},xo={page:"h-16 leading-[62px]"};function te({tag:e="h1",variant:t="heading",size:o="lg",height:r,className:n="",children:a}){let s=o==="xs"?"sm":o,i=bo[t][s],l=r?xo[r]:"";return jsxRuntime.jsx(e,{className:ye(i,"text-text-primary",l,n),children:a})}var D=({title:e,onClose:t,hideCloseIcon:o=false,titleAlign:r="left",hasBackArrow:n=false,onBack:a,headerContent:s})=>jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("relative flex h-16 w-full flex-shrink-0 items-center justify-between border-b px-6",e&&"border-b",r==="center"?"justify-center":""),children:[n&&jsxRuntime.jsx($,{variant:"icon",onPress:a,className:"absolute left-6","aria-label":"Go back",children:jsxRuntime.jsx(I,{name:"CaretLeft","data-testid":"back-arrow"})}),s||jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[e&&jsxRuntime.jsx(te,{size:"xs",children:e}),t&&!o&&jsxRuntime.jsx($,{variant:"icon",onPress:t,"aria-label":"Close dialog",children:jsxRuntime.jsx(I,{name:"X","data-testid":"close-button"})})]})]});var ko=lt.createContext(false);function it({children:e}){return jsxRuntime.jsx(ko.Provider,{value:true,children:e})}var B=({width:e,height:t,variant:o="rect",animation:r="pulse",gradient:n=false,flex:a=false,stack:s,responsive:i,delay:l=0,adjustAnimationSpeedBasedOnWidth:c=false,ariaLabel:p,className:u,"data-testid":x})=>{let[P,v]=lt.useState(l===0);if(lt.useEffect(()=>{if(l>0){let y=setTimeout(()=>v(true),l);return ()=>clearTimeout(y)}},[l]),!P)return null;let S=n?"bg-gradient-to-r from-[var(--color-skeleton-base)] via-[var(--color-skeleton-highlight)] to-[var(--color-skeleton-base)]":"bg-[var(--color-skeleton-base)]",L=c&&e?(()=>{let y=typeof e=="number"?e:parseFloat(String(e));return isNaN(y)?"":`animation-duration-[${Math.max(.8,y/100)}s]`})():"",N=r==="pulse"?`animate-pulse ${L}`:r==="wave"?`relative overflow-hidden before:absolute before:inset-0 before:bg-gradient-to-r before:from-transparent before:via-[var(--color-skeleton-wave)] before:to-transparent before:animate-wave ${L}`:"",m="rounded-sm";o==="circle"&&(m="rounded-full"),o==="text"&&(m="h-4 w-full rounded-sm");let k=a?"flex-1 min-w-0":"",R=i?Object.entries(i).map(([y,w])=>`${y}:w-[${w}]`).join(" "):"";return s?jsxRuntime.jsx("div",{className:"space-y-2","data-testid":x,children:s.map((y,w)=>jsxRuntime.jsx("div",{className:tailwindMerge.twMerge(S,N,m,k,R,u),style:{width:y,height:t}},w))}):jsxRuntime.jsx("div",{className:tailwindMerge.twMerge(S,N,m,k,R,u),style:{width:e,height:t},role:"presentation","aria-hidden":!p,"aria-label":p??void 0,"data-testid":x})};var So={outlined:"bg-background-surface border border-border-default",elevated:"bg-background-surface border-0 shadow-md",filled:"bg-background-muted border-0",ghost:"bg-transparent border-0 shadow-none"},To="rounded-lg",Ve={square:"aspect-square",video:"aspect-video",wide:"aspect-[2/1]",auto:""},Do={start:"justify-start",end:"justify-end",center:"justify-center",between:"justify-between"};function Io(e){return lt__namespace.default.Children.toArray(e).some(t=>lt__namespace.default.isValidElement(t)&&t.type===We&&!!t.props.title)}function Y({variant:e="outlined",className:t,children:o,isLoading:r=false,layout:n="default"}){let a=Io(o)?jsxRuntime.jsx(it,{children:o}):o;return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("w-full overflow-hidden",So[e],To,n==="flex"&&"flex flex-col",t),"data-testid":"card",children:r?jsxRuntime.jsx(B,{width:"100%",height:"100%",className:"rounded-none"}):a})}function We({title:e,subtitle:t,actions:o,leading:r,className:n,isLoading:a=false}){return a?jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("p-6 pb-4",n),children:[jsxRuntime.jsxs("div",{className:"flex justify-between items-start mb-1",children:[jsxRuntime.jsx(B,{width:120,height:20}),jsxRuntime.jsx(B,{width:24,height:24})]}),t&&jsxRuntime.jsx(B,{width:200,height:16})]}):!e&&!t&&!o&&!r?null:jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("p-6 pb-4",n),children:jsxRuntime.jsxs("div",{className:"flex justify-between items-start gap-4",children:[r&&jsxRuntime.jsx("div",{className:"flex-shrink-0",children:r}),jsxRuntime.jsxs("div",{className:"min-w-0 flex-1",children:[e&&jsxRuntime.jsx("div",{className:"mb-1",children:typeof e=="string"?jsxRuntime.jsx(te,{tag:"h3",size:"sm",className:"text-text-primary",children:e}):e}),t&&jsxRuntime.jsx("div",{className:Xe("bodySm","text-text-secondary"),children:t})]}),o&&jsxRuntime.jsx("div",{className:"flex-shrink-0",children:o})]})})}function dt({src:e,alt:t,aspectRatio:o="auto",className:r,children:n,isLoading:a=false}){return a?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("bg-background-muted",Ve[o],r),children:jsxRuntime.jsx(B,{width:"100%",height:"100%"})}):n?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("overflow-hidden",Ve[o],r),children:n}):e?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("overflow-hidden",Ve[o],r),children:jsxRuntime.jsx("img",{src:e,alt:t||"",className:"w-full h-full object-cover",loading:"lazy"})}):null}function ct({className:e,children:t,isLoading:o=false,fill:r=false,style:n}){let s=e?.match(/p(?:t|b|l|r|x|y)?-(?:\d+(?:\.\d+)?|px|\[.+?\])/)?"":"px-6 py-4";return o?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge(s,r&&"flex-1 flex flex-col min-h-0",e),style:n,children:jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx(B,{width:"100%",height:16}),jsxRuntime.jsx(B,{width:"80%",height:16}),jsxRuntime.jsx(B,{width:"60%",height:16})]})}):t?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge(s,"text-text-primary",r&&"flex-1 flex flex-col min-h-0",e),style:n,children:t}):null}function ut({className:e,children:t,align:o="end",isLoading:r=false}){return r?jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("px-6 py-4 flex gap-2 justify-end",e),children:[jsxRuntime.jsx(B,{width:80,height:32}),jsxRuntime.jsx(B,{width:60,height:32})]}):t?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("px-6 py-4 flex items-center gap-2",Do[o],e),children:t}):null}Y.Header=We;Y.Media=dt;Y.Content=ct;Y.Footer=ut;var z=class extends lt.Component{constructor(){super(...arguments);Le(this,"state",{hasError:false});Le(this,"handleRetry",()=>{this.setState({hasError:false,error:void 0}),typeof window<"u"&&window.location.reload();});}static getDerivedStateFromError(o){return {hasError:true,error:o}}componentDidCatch(o,r){console.error("Error Boundary caught an error:",o,r);}render(){return this.state.hasError?this.props.fallback?this.props.fallback:jsxRuntime.jsxs(Y,{children:[this.props.title&&jsxRuntime.jsx(Y.Header,{title:this.props.title}),jsxRuntime.jsx(Y.Content,{children:jsxRuntime.jsxs("div",{className:"flex flex-col items-center justify-center gap-4","data-testid":"error-boundary",children:[jsxRuntime.jsx("p",{className:"text-feedback-error-text",children:this.state.error?.message||"Something went wrong"}),jsxRuntime.jsx("button",{className:"rounded bg-action-default px-4 py-2 text-[color:var(--color-action-default-text)] hover:bg-action-default-hover",onClick:this.handleRetry,children:"Retry"})]})})]}):this.props.children}};function Q({transparent:e=false,className:t,children:o,...r}){return jsxRuntime.jsx(reactAriaComponents.ModalOverlay,{...r,className:reactAriaComponents.composeRenderProps(t,(n,a)=>tailwindMerge.twMerge("fixed inset-0 z-50","outline-none focus:outline-none focus-visible:outline-none ring-0 focus:ring-0 focus-visible:ring-0",e?"bg-transparent":["bg-gradient-to-br from-background-modal/20 via-background-modal/15 to-background-modal/20","backdrop-blur-[2px]","supports-[backdrop-filter]:bg-background-modal/15"].join(" "),a.isEntering&&["animate-in fade-in","duration-300 ease-out"].join(" "),a.isExiting&&["animate-out fade-out","duration-200 ease-in"].join(" "),n)),children:o})}var zo=.3,Oo=.5;function Re({children:e,title:t,headerContent:o,titleAlign:r="left",hideCloseIcon:n=false,hasBackArrow:a=false,onBack:s,isOpen:i,onClose:l,isDismissable:c=true,transparentOverlay:p=false,primaryAction:u,secondaryAction:x,footerContent:P,maxHeight:v="80vh",height:S,maxWidth:L="640px",contentPadding:N=true,showHandle:m=true,animationVariant:k="scale",className:R}){let[y,w]=lt.useState(false),[U,M]=lt.useState(0),[V,E]=lt.useState(false),ce=ve(i),G=ce?.height??null,re=ce?.keyboardOffset??0,ue=lt.useRef(null),ne=lt.useRef(null),W=lt.useRef(null),H=lt.useRef({isDragging:false,startY:0,startTime:0,pointerId:null});lt.useEffect(()=>{if(i){let g=setTimeout(()=>{w(true),setTimeout(()=>w(false),600);},400);return ()=>clearTimeout(g)}},[i]),lt.useEffect(()=>{i||(M(0),E(false),H.current={isDragging:false,startY:0,startTime:0,pointerId:null});},[i]),lt.useEffect(()=>{let g=ne.current;if(!g||!i)return;let _=null,ae=me=>{let Z=me.target;Z&&["INPUT","TEXTAREA","SELECT"].includes(Z.tagName)&&(_&&clearTimeout(_),_=setTimeout(()=>{Z.scrollIntoView({block:"nearest",behavior:"smooth"});},320));};return g.addEventListener("focusin",ae),()=>{g.removeEventListener("focusin",ae),_&&clearTimeout(_);}},[i]);let J=lt.useCallback(g=>{c&&(g.pointerType!=="touch"&&g.pointerType!=="pen"||(W.current&&(clearTimeout(W.current),W.current=null),H.current={isDragging:true,startY:g.clientY,startTime:Date.now(),pointerId:g.pointerId},E(false),g.currentTarget.setPointerCapture(g.pointerId)));},[c]),K=lt.useCallback(g=>{let{isDragging:_,startY:ae,pointerId:me}=H.current;if(!_||g.pointerId!==me)return;let Z=g.clientY-ae;M(Math.max(0,Z));},[]),pe=lt.useCallback(g=>{let{isDragging:_,startY:ae,startTime:me,pointerId:Z}=H.current;if(!_||g.pointerId!==Z)return;let Be=g.clientY-ae,Tt=Date.now()-me,Dt=Be/Tt;H.current={isDragging:false,startY:0,startTime:0,pointerId:null};let It=(ue.current?.getBoundingClientRect().height??0)*zo;(Be>It||Dt>Oo&&Be>50)&&c?(l?.(),M(0)):(E(true),M(0),W.current=setTimeout(()=>{E(false),W.current=null;},200));},[c,l]);if(!i)return null;let Ie=t||o,fe=u||x||P;return jsxRuntime.jsx(z,{children:jsxRuntime.jsx(Q,{isOpen:i,onOpenChange:g=>{g||l?.();},isDismissable:c,transparent:p,style:{paddingBottom:re>0?`${re}px`:void 0,transition:"padding-bottom 0.25s ease-out"},className:"flex items-end justify-center p-0 sm:p-4",children:jsxRuntime.jsx(reactAriaComponents.Modal,{className:"w-full max-w-full p-0 sm:p-2 outline-none focus:outline-none focus-visible:outline-none ring-0 focus:ring-0 focus-visible:ring-0",isDismissable:c,children:jsxRuntime.jsx("div",{ref:ue,className:tailwindMerge.twMerge("w-full",V&&"transition-transform duration-200"),style:{transform:U>0?`translateY(${U}px)`:void 0},children:jsxRuntime.jsxs(reactAriaComponents.Dialog,{className:tailwindMerge.twMerge("relative flex w-full flex-col overflow-hidden","bg-background-surface","shadow-2xl shadow-black/30 dark:shadow-black/60","border-t border-x border-border-default/40","outline-none focus:outline-none focus-visible:outline-none ring-0 focus:ring-0 focus-visible:ring-0 focus:shadow-none","origin-bottom",k==="scale"?"animate-[tray-enter-scale_400ms_cubic-bezier(0.32,0.72,0,1)]":"animate-[tray-enter_400ms_cubic-bezier(0.32,0.72,0,1)]",k==="scale"?"data-[exiting]:animate-[tray-exit-scale_250ms_cubic-bezier(0.32,0,0.67,0)]":"data-[exiting]:animate-[tray-exit_250ms_cubic-bezier(0.32,0,0.67,0)]",R),style:{maxWidth:L,...S?{height:S}:{maxHeight:/\d/.test(v)?G!==null?`min(${v}, ${Math.max(G-8,0)}px, 100dvh)`:`min(${v}, 100dvh)`:v}},children:[m&&jsxRuntime.jsx("div",{className:"absolute top-0 left-0 right-0 h-8 z-10 flex justify-center items-start pt-2 touch-none cursor-grab active:cursor-grabbing",onPointerDown:J,onPointerMove:K,onPointerUp:pe,onPointerCancel:pe,children:jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("h-1 w-12 rounded-full bg-border-muted transition-all duration-300","hover:bg-border-default hover:w-16",y&&"animate-[handle-wiggle_0.6s_ease-in-out]")})}),Ie&&(a?jsxRuntime.jsx(D,{title:t,headerContent:o,titleAlign:r,hideCloseIcon:n||!l,hasBackArrow:true,onBack:s??(()=>{}),onClose:l||(()=>{})}):jsxRuntime.jsx(D,{title:t,headerContent:o,titleAlign:r,hideCloseIcon:n||!l,onClose:l||(()=>{})})),jsxRuntime.jsx("div",{ref:ne,className:tailwindMerge.twMerge("flex-1 min-h-0 overflow-y-auto overscroll-contain",N?"p-4":"p-0"),children:e}),fe&&jsxRuntime.jsx(X,{primaryAction:u,secondaryAction:x,footerContent:P})]})})})})})}Re.displayName="Tray";function Ue({isOpen:e,onClose:t,title:o,headerContent:r,titleAlign:n="left",hideCloseIcon:a=false,hasBackArrow:s=false,onBack:i,children:l,primaryAction:c,secondaryAction:p,tertiaryAction:u,footerContent:x,transparentOverlay:P=false,maxWidth:v="600px",minWidth:S="400px",maxHeight:L="85vh",height:N,mobileMaxHeight:m="90vh",mobileHeight:k,contentPadding:R=true,className:y}){let w=qe("(max-width: 767px)"),U=ve(w&&e===void 0),M=U?.height??null,V=U?.keyboardOffset??0,E=lt.useRef(null),ce=lt.useCallback(()=>{E.current&&E.current.scrollTop!==0&&(E.current.scrollTop=0);},[]),G=lt.useRef(null),re=lt.useRef(null);lt.useEffect(()=>{let J=re.current;if(!J||!w)return;let K=null,pe=Ie=>{let fe=Ie.target;fe&&["INPUT","TEXTAREA","SELECT"].includes(fe.tagName)&&(K&&clearTimeout(K),K=setTimeout(()=>{fe.scrollIntoView({block:"nearest",behavior:"smooth"});},320));};return J.addEventListener("focusin",pe),()=>{J.removeEventListener("focusin",pe),K&&clearTimeout(K);}},[w]);let ue=lt.useCallback(()=>{G.current&&G.current.scrollTop!==0&&(G.current.scrollTop=0);},[]);if(e===false)return null;let ne=o||r,W=c||p||u||x,H=e!==void 0;return w?H?jsxRuntime.jsx(Re,{isOpen:e,onClose:t,title:o,headerContent:r,titleAlign:n,hideCloseIcon:a,hasBackArrow:s,onBack:i,primaryAction:c,secondaryAction:p,footerContent:x,transparentOverlay:P,maxHeight:m,height:k,maxWidth:v,contentPadding:R,showHandle:true,animationVariant:"scale",className:y,children:l}):jsxRuntime.jsx(z,{children:jsxRuntime.jsx(Q,{isDismissable:true,transparent:P,style:{paddingBottom:V>0?`${V}px`:void 0,transition:"padding-bottom 0.25s ease-out"},className:"flex items-end justify-center",children:jsxRuntime.jsx(reactAriaComponents.Modal,{className:"w-full p-0 outline-none focus:outline-none focus-visible:outline-none ring-0 focus:ring-0 focus-visible:ring-0",children:jsxRuntime.jsxs(reactAriaComponents.Dialog,{ref:E,onScroll:ce,className:tailwindMerge.twMerge("relative flex w-full flex-col","bg-background-surface","shadow-2xl shadow-black/20","border-t border-x border-border-default/40","rounded-t-xl","overflow-hidden","animate-in slide-in-from-bottom","duration-300 ease-out","data-[exiting]:animate-out data-[exiting]:slide-out-to-bottom","data-[exiting]:duration-200 data-[exiting]:ease-in",y),style:{...k?{height:k}:{maxHeight:/\d/.test(m)?M!==null?`min(${m}, ${Math.max(M-8,0)}px, 100dvh)`:`min(${m}, 100dvh)`:m}},children:[jsxRuntime.jsx("div",{className:"flex justify-center pt-2",children:jsxRuntime.jsx("div",{className:"h-1.5 w-12 rounded-full bg-border-muted"})}),ne&&(s?jsxRuntime.jsx(D,{title:o,headerContent:r,titleAlign:n,hideCloseIcon:a||!t,hasBackArrow:true,onBack:i,onClose:t||(()=>{})}):jsxRuntime.jsx(D,{title:o,headerContent:r,titleAlign:n,hideCloseIcon:a||!t,onClose:t||(()=>{})})),jsxRuntime.jsx("div",{ref:re,className:tailwindMerge.twMerge("flex-1 min-h-0 overflow-y-auto overscroll-contain",R?"px-6 py-6":"p-0"),children:l}),W&&jsxRuntime.jsx(X,{primaryAction:c,secondaryAction:p,tertiaryAction:u,footerContent:x})]})})})}):jsxRuntime.jsx(z,{children:jsxRuntime.jsx(Q,{...H?{isOpen:e,onOpenChange:J=>{!J&&t&&t();}}:{},isDismissable:true,transparent:P,className:"flex items-center justify-center",children:jsxRuntime.jsx(reactAriaComponents.Modal,{className:"w-full p-4 outline-none focus:outline-none focus-visible:outline-none ring-0 focus:ring-0 focus-visible:ring-0",style:{maxWidth:v},children:jsxRuntime.jsxs(reactAriaComponents.Dialog,{ref:G,onScroll:ue,className:tailwindMerge.twMerge("relative flex w-full flex-col","bg-background-surface","shadow-2xl shadow-black/20","border border-border-default/50","rounded-md","overflow-hidden","outline-none focus:outline-none focus-visible:outline-none ring-0 focus:ring-0","animate-in fade-in zoom-in-96 slide-in-from-bottom-2","duration-300 ease-out","data-[exiting]:animate-out data-[exiting]:fade-out data-[exiting]:zoom-out-95","data-[exiting]:duration-200 data-[exiting]:ease-in",y),style:{minWidth:S,...N?{height:N}:{maxHeight:L}},children:[ne&&(s?jsxRuntime.jsx(D,{title:o,headerContent:r,titleAlign:n,hideCloseIcon:a||!t,hasBackArrow:true,onBack:i,onClose:t||(()=>{})}):jsxRuntime.jsx(D,{title:o,headerContent:r,titleAlign:n,hideCloseIcon:a||!t,onClose:t||(()=>{})})),jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex-1 min-h-0 overflow-y-auto",R?"px-6 py-6":"p-0"),children:l}),W&&jsxRuntime.jsx(X,{primaryAction:c,secondaryAction:p,tertiaryAction:u,footerContent:x})]})})})})}function be(e){return jsxRuntime.jsx(reactAriaComponents.Form,{validationBehavior:"aria",...e,className:tailwindMerge.twMerge("flex flex-col gap-6",e.className)})}function Va({formId:e="dialog-form",onSubmit:t,primaryLabel:o="Save",secondaryLabel:r="Cancel",onCancel:n,primaryVariant:a,secondaryVariant:s="secondary",children:i,title:l,...c}){return jsxRuntime.jsx(Ue,{title:l,primaryAction:{label:o,onPress:()=>{let u=document.getElementById(e);u&&u.requestSubmit();},variant:a},secondaryAction:n?{label:r,onPress:n,variant:s}:void 0,...c,children:jsxRuntime.jsx(be,{id:e,onSubmit:t,children:i})})}function Te({children:e,title:t,headerContent:o,titleAlign:r="left",hideCloseIcon:n=false,hasBackArrow:a=false,onBack:s,isOpen:i,slideInFrom:l="right",transparentOverlay:c=false,onClose:p,className:u,primaryAction:x,secondaryAction:P,tertiaryAction:v,footerContent:S,contentPadding:L=true,maxWidth:N="400px"}){if(!i)return null;let m=t||o,k=x||P||v||S;return jsxRuntime.jsx(z,{children:jsxRuntime.jsx(Q,{isOpen:i,onOpenChange:R=>!R&&p?.(),isDismissable:true,transparent:c,children:jsxRuntime.jsx(reactAriaComponents.Modal,{className:"outline-none focus:outline-none focus-visible:outline-none ring-0 focus:ring-0 focus-visible:ring-0",children:jsxRuntime.jsxs(reactAriaComponents.Dialog,{className:tailwindMerge.twMerge("fixed top-0 bottom-0 flex flex-col bg-background-surface shadow-xl overflow-hidden",l==="right"?"right-0":"left-0",l==="right"?"animate-in slide-in-from-right duration-300 ease-out":"animate-in slide-in-from-left duration-300 ease-out","data-[exiting]:animate-out",l==="right"?"data-[exiting]:slide-out-to-right":"data-[exiting]:slide-out-to-left","data-[exiting]:duration-200 data-[exiting]:ease-in","outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-action-default focus-visible:outline-offset-0",u),style:{maxWidth:N,width:"100%"},children:[m&&(a&&s?jsxRuntime.jsx(D,{title:t,headerContent:o,titleAlign:r,hideCloseIcon:n,hasBackArrow:true,onBack:s,onClose:p}):jsxRuntime.jsx(D,{title:t,headerContent:o,titleAlign:r,hideCloseIcon:n,onClose:p})),jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex-1 overflow-y-auto overscroll-contain",L?"px-6 py-6":"p-0"),children:e}),k&&jsxRuntime.jsx(X,{primaryAction:x,secondaryAction:P,tertiaryAction:v,footerContent:S})]})})})})}Te.displayName="Drawer";function ti({formId:e="drawer-form",onSubmit:t,primaryLabel:o="Save",secondaryLabel:r="Cancel",onCancel:n,primaryVariant:a,secondaryVariant:s="secondary",children:i,...l}){return jsxRuntime.jsx(Te,{primaryAction:{label:o,onPress:()=>{let p=document.getElementById(e);p&&p.requestSubmit();},variant:a},secondaryAction:n?{label:r,onPress:n,variant:s}:void 0,...l,children:jsxRuntime.jsx(be,{id:e,onSubmit:t,className:"mt-2",children:i})})}function ai({align:e="end",className:t,...o}){return jsxRuntime.jsx("div",{...o,className:tailwindMerge.twMerge("flex gap-2",e==="start"?"justify-start":e==="between"?"justify-between":"justify-end",t)})}var Jo={sm:"gap-2",md:"gap-4",lg:"gap-6"};function Ko(e){if(!e)return "";let t=e.base?`grid-cols-${e.base}`:"",o=e.md?`md:grid-cols-${e.md}`:"",r=e.lg?`lg:grid-cols-${e.lg}`:"";return [t,o,r].filter(Boolean).join(" ")}function di({cols:e={base:1},gap:t="lg",className:o,...r}){return jsxRuntime.jsx("div",{...r,className:tailwindMerge.twMerge("grid",Ko(e),Jo[t],o)})}var tr=lt__namespace.default.forwardRef(({children:e,className:t},o)=>jsxRuntime.jsx("div",{ref:o,className:tailwindMerge.twMerge("relative w-full",t),children:e}));tr.displayName="InputWrapper";function Ct({size:e="md",className:t,children:o,...r}){return jsxRuntime.jsx("div",{...r,className:tailwindMerge.twMerge("leading-[2.25] text-text-secondary",ee[e].text,t),children:o})}function Ci({title:e,description:t,showDivider:o,className:r,children:n,...a}){return jsxRuntime.jsxs("section",{...a,className:tailwindMerge.twMerge("flex flex-col",r),children:[(e||t)&&jsxRuntime.jsxs("div",{className:"flex flex-col gap-1 mb-6",children:[typeof e=="string"?jsxRuntime.jsx(te,{tag:"h3",size:"sm",children:e}):e,t?jsxRuntime.jsx(Ct,{size:"lg",children:t}):null]}),jsxRuntime.jsx("div",{className:"flex flex-col gap-6",children:n}),o&&jsxRuntime.jsx("hr",{className:"mt-2 border-border-muted"})]})}function Pi(){return jsxRuntime.jsx("hr",{className:"border-border-muted"})}function Si({steps:e,currentStepId:t,onStepClick:o,className:r}){let n=e.findIndex(a=>a.id===t);return jsxRuntime.jsx("nav",{"aria-label":"Progress",className:tailwindMerge.twMerge("w-full",r),children:jsxRuntime.jsx("div",{className:"relative mb-12",children:jsxRuntime.jsx("ol",{className:"relative flex items-start justify-between",children:e.map((a,s)=>{let i=a.id===t,l=s<n,c=o&&(l||i);return jsxRuntime.jsxs("li",{className:"relative flex flex-col items-center",style:{flex:`1 1 ${100/e.length}%`},children:[jsxRuntime.jsx("button",{type:"button",disabled:!c,onClick:()=>c&&o?.(a.id),className:tailwindMerge.twMerge("relative z-10 flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full border-2 transition-colors bg-background-body",l&&"border-action-primary bg-action-primary text-text-inverse hover:bg-action-primary/90",i&&"border-action-primary bg-background-body text-action-primary",!l&&!i&&"border-border-default bg-background-body text-text-secondary",c&&"cursor-pointer",!c&&"cursor-default"),"aria-current":i?"step":void 0,children:l?jsxRuntime.jsx(I,{name:"Check",size:20,weight:"bold"}):jsxRuntime.jsx("span",{className:"text-sm font-semibold",children:s+1})}),s<e.length-1&&jsxRuntime.jsx("div",{className:"absolute top-5 h-0.5 transition-colors",style:{left:"50%",width:"100%",marginLeft:"20px",backgroundColor:s<n?"var(--color-action-primary)":"var(--color-border-default)"}}),jsxRuntime.jsxs("div",{className:"mt-3 flex flex-col items-center text-center w-32",children:[jsxRuntime.jsx("span",{className:tailwindMerge.twMerge("text-sm font-medium",i&&"text-text-default",l&&"text-text-primary",!i&&!l&&"text-text-secondary"),children:a.title}),a.description&&jsxRuntime.jsx("span",{className:"mt-1 text-xs text-text-secondary",children:a.description})]})]},a.id)})})})})}function Li({formId:e,show:t,isSubmitting:o,onCancel:r,primaryLabel:n="Save changes",secondaryLabel:a="Cancel",className:s}){return t?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("fixed inset-x-0 bottom-0 z-40 border-t border-border-muted bg-background-surface/95 backdrop-blur supports-[backdrop-filter]:bg-background-surface/70",s),children:jsxRuntime.jsxs("div",{className:"mx-auto flex max-w-screen-lg items-center justify-between gap-3 p-3",children:[jsxRuntime.jsx("div",{className:"text-sm text-text-secondary",children:"You have unsaved changes"}),jsxRuntime.jsxs("div",{className:"flex gap-2",children:[jsxRuntime.jsx($,{variant:"secondary",onPress:r,children:a}),jsxRuntime.jsx($,{type:"submit",form:e,isDisabled:!!o,children:o?"Saving...":n})]})]})}):null}function Hi({when:e,message:t="You have unsaved changes. Leave anyway?"}){return lt__namespace.useEffect(()=>{if(!e)return;let o=r=>(r.preventDefault(),r.returnValue=t,t);return window.addEventListener("beforeunload",o),()=>window.removeEventListener("beforeunload",o)},[e,t]),null}function Ai({steps:e,initialStepId:t,canNavigate:o}){if(e.length===0)throw new Error("useWizard: steps array cannot be empty");let[r,n]=lt__namespace.useState(t||e[0].id),a=e.findIndex(u=>u.id===r),s=a>0,i=a<e.length-1,l=async u=>u===r?true:o&&!await o(r,u)?false:(n(u),true);return {steps:e,currentStepId:r,setCurrentStepId:l,next:async()=>!i||a===-1?false:l(e[a+1].id),prev:async()=>!s||a===-1?false:l(e[a-1].id),hasNext:i,hasPrev:s,stepIndex:a}}
|
|
1
|
+
'use strict';var Ve=require('react'),reactAriaComponents=require('react-aria-components'),tailwindMerge=require('tailwind-merge'),jsxRuntime=require('react/jsx-runtime'),tt=require('@phosphor-icons/react');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var Ve__namespace=/*#__PURE__*/_interopNamespace(Ve);var tt__namespace=/*#__PURE__*/_interopNamespace(tt);var Lt=Object.defineProperty;var Mt=(e,t,o)=>t in e?Lt(e,t,{enumerable:true,configurable:true,writable:true,value:o}):e[t]=o;var Le=(e,t,o)=>Mt(e,typeof t!="symbol"?t+"":t,o);function Xe(e,t=false){let[o,r]=Ve.useState(t);return Ve.useEffect(()=>{if(typeof window>"u")return;let n=window.matchMedia(e);r(n.matches);let a=s=>{r(s.matches);};return n.addEventListener("change",a),()=>{n.removeEventListener("change",a);}},[e]),o}function ve(e=true){let[t,o]=Ve.useState(null);return Ve.useEffect(()=>{if(!e){o(null);return}let r=typeof window<"u"?window.visualViewport:null;if(!r)return;let n=()=>{let a=Math.max(0,window.innerHeight-r.height-(r.offsetTop??0));o({height:r.height,keyboardOffset:a});};return n(),r.addEventListener("resize",n),r.addEventListener("scroll",n),()=>{r.removeEventListener("resize",n),r.removeEventListener("scroll",n);}},[e]),t}function ye(...e){return e.filter(Boolean).join(" ")}var F={displayXl:"text-display-xl",displayLg:"text-display-lg",displayMd:"text-display-md",displaySm:"text-display-sm",headingXl:"text-heading-xl",headingLg:"text-heading-lg",headingMd:"text-heading-md",headingSm:"text-heading-sm",bodyLg:"text-body-lg",bodyMd:"text-body-md",bodySm:"text-body-sm",labelLg:"text-label-lg",labelMd:"text-label-md",labelSm:"text-label-sm",code:"text-code",agent:"text-agent"};function Qe(e,...t){return ye(F[e],...t)}function Je(e=false){return `${e?"outline outline-1 outline-border-input data-[focus-visible]:outline-2 data-[focus-visible]:outline-action-default data-[focus-visible]:outline-offset-0 invalid:outline-2 invalid:outline-feedback-error-border group-invalid:outline-2 group-invalid:outline-feedback-error-border forced-colors:focus:outline-[Highlight] forced-colors:focus:outline-2 forced-colors:focus:outline-offset-2":"outline-none data-[focus-visible]:outline data-[focus-visible]:outline-2 data-[focus-visible]:outline-action-default data-[focus-visible]:outline-offset-0 invalid:outline-2 invalid:outline-feedback-error-border group-invalid:outline-2 group-invalid:outline-feedback-error-border forced-colors:focus:outline-[Highlight] forced-colors:focus:outline-2 forced-colors:focus:outline-offset-2"}`}var ee={sm:{text:"text-[length:var(--control-text-sm)]",height:"h-[var(--control-sm-height)]",padding:"px-[var(--control-padding-sm)]",paddingY:"py-[var(--control-gap-sm)]",gap:"gap-[var(--control-gap-sm)]"},md:{text:"text-[length:var(--control-text-md)]",height:"h-[var(--control-md-height)]",padding:"px-[var(--control-padding-md)]",paddingY:"py-[var(--control-gap-md)]",gap:"gap-[var(--control-gap-md)]"},lg:{text:"text-[length:var(--control-text-lg)]",height:"h-[var(--control-lg-height)]",padding:"px-[var(--control-padding-lg)]",paddingY:"py-[var(--control-gap-lg)]",gap:"gap-[var(--control-gap-lg)]"},xl:{text:"text-[length:var(--control-text-xl)]",height:"h-[var(--control-xl-height)]",padding:"px-[var(--control-padding-xl)]",paddingY:"py-[var(--control-gap-xl)]",gap:"gap-[var(--control-gap-xl)]"}};function h(e,t){let o=Ve.forwardRef(({size:r=24,color:n="currentColor",className:a,mirrored:s,alt:i,...l},c)=>{let p=!!i||"aria-label"in l;return jsxRuntime.jsx("svg",{ref:c,xmlns:"http://www.w3.org/2000/svg",width:r,height:r,viewBox:"0 0 256 256",fill:n,className:a,transform:s?"scale(-1, 1)":void 0,"aria-hidden":p?void 0:true,role:p?"img":void 0,"aria-label":i,...l,children:t})});return o.displayName=e,o}var Ce=()=>jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("path",{d:"M12 128h44M200 128h44",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round"}),jsxRuntime.jsx("circle",{cx:"76",cy:"128",r:"20",fill:"none",stroke:"currentColor",strokeWidth:"16"}),jsxRuntime.jsx("circle",{cx:"180",cy:"128",r:"20",fill:"none",stroke:"currentColor",strokeWidth:"16"})]}),Ke=()=>jsxRuntime.jsx("path",{d:"M166 120 88 70",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round"}),Ze=()=>jsxRuntime.jsx("path",{d:"M162 122 92 128",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round"}),et=()=>jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("path",{d:"M112 85.7 A32 32 0 1 1 144 85.7",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round"}),jsxRuntime.jsx("circle",{cx:"128",cy:"58",r:"8",fill:"currentColor",stroke:"none"})]}),Vt=h("TextureRecloser",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("rect",{x:"36",y:"36",width:"184",height:"184",fill:"none",stroke:"currentColor",strokeWidth:"16"}),jsxRuntime.jsx("text",{x:"128",y:"126",textAnchor:"middle",dominantBaseline:"central",fontFamily:"ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",fontSize:"140",fontWeight:"700",fill:"currentColor",stroke:"none",children:"R"})]})),Wt=h("TextureFuse",jsxRuntime.jsx("path",{d:"M20 128h72q18 -84 36 0q18 84 36 0h72",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round",strokeLinejoin:"round"})),_t=h("TextureBreaker",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("rect",{x:"36",y:"36",width:"184",height:"184",fill:"none",stroke:"currentColor",strokeWidth:"16"}),jsxRuntime.jsx("text",{x:"128",y:"126",textAnchor:"middle",dominantBaseline:"central",fontFamily:"ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",fontSize:"140",fontWeight:"700",fill:"currentColor",stroke:"none",children:"B"})]})),$t=h("TextureSource",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("path",{d:"M4 128h40M212 128h40",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round"}),jsxRuntime.jsx("circle",{cx:"128",cy:"128",r:"84",fill:"none",stroke:"currentColor",strokeWidth:"16"}),jsxRuntime.jsx("path",{d:"M92 128q18 -84 36 0q18 84 36 0",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round",strokeLinejoin:"round"})]})),Yt=h("TextureCapacitor",jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx("path",{d:"M4 128h106M146 128h106M110 72v112M146 72v112",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round"})})),jt=h("TextureRegulator",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("circle",{cx:"128",cy:"128",r:"92",fill:"none",stroke:"currentColor",strokeWidth:"16"}),jsxRuntime.jsx("text",{x:"128",y:"126",textAnchor:"middle",dominantBaseline:"central",fontFamily:"ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",fontSize:"128",fontWeight:"700",fill:"currentColor",stroke:"none",children:"V"})]})),Ut=h("TextureSwitch",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Ce,{}),jsxRuntime.jsx(Ke,{})]})),Gt=h("TextureSwitchClosed",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Ce,{}),jsxRuntime.jsx(Ze,{})]})),qt=h("TextureOpenPoint",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("path",{d:"M112 52 C 74 92, 74 164, 112 204",fill:"none",stroke:"currentColor",strokeWidth:"18",strokeLinecap:"round"}),jsxRuntime.jsx("path",{d:"M144 52 C 182 92, 182 164, 144 204",fill:"none",stroke:"currentColor",strokeWidth:"18",strokeLinecap:"round"})]})),Xt=h("TextureSectionalizerOpen",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Ce,{}),jsxRuntime.jsx(Ke,{}),jsxRuntime.jsx(et,{})]})),Qt=h("TextureSectionalizerClosed",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Ce,{}),jsxRuntime.jsx(Ze,{}),jsxRuntime.jsx(et,{})]})),Jt=h("TextureTransformer",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("path",{d:"M40 64H88A22 22 0 0 1 88 108A22 22 0 0 1 88 152A22 22 0 0 1 88 196H40",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("path",{d:"M216 64H168A22 22 0 0 0 168 108A22 22 0 0 0 168 152A22 22 0 0 0 168 196H216",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round",strokeLinejoin:"round"})]})),ie={1:[128],2:[110,146],3:[92,128,164]},Me=e=>jsxRuntime.jsx("path",{d:`M24 ${e}h208`,fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round"},e),Ee=e=>jsxRuntime.jsx("path",{d:`M24 ${e}h208`,fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round",pathLength:100,strokeDasharray:"20 20"},e),Kt=h("TextureSinglePhaseOverheadLine",jsxRuntime.jsx(jsxRuntime.Fragment,{children:ie[1].map(Me)})),Zt=h("TextureTwoPhaseOverheadLine",jsxRuntime.jsx(jsxRuntime.Fragment,{children:ie[2].map(Me)})),eo=h("TextureThreePhaseOverheadLine",jsxRuntime.jsx(jsxRuntime.Fragment,{children:ie[3].map(Me)})),to=h("TextureSinglePhaseUndergroundLine",jsxRuntime.jsx(jsxRuntime.Fragment,{children:ie[1].map(Ee)})),oo=h("TextureTwoPhaseUndergroundLine",jsxRuntime.jsx(jsxRuntime.Fragment,{children:ie[2].map(Ee)})),ro=h("TextureThreePhaseUndergroundLine",jsxRuntime.jsx(jsxRuntime.Fragment,{children:ie[3].map(Ee)})),no=h("TextureSupportStructure",jsxRuntime.jsx("circle",{cx:"128",cy:"128",r:"40",fill:"currentColor",stroke:"none"})),Pe={TextureRecloser:Vt,TextureFuse:Wt,TextureBreaker:_t,TextureSource:$t,TextureCapacitor:Yt,TextureRegulator:jt,TextureSwitch:Ut,TextureSwitchClosed:Gt,TextureOpenPoint:qt,TextureSectionalizerOpen:Xt,TextureSectionalizerClosed:Qt,TextureTransformer:Jt,TextureSinglePhaseOverheadLine:Kt,TextureTwoPhaseOverheadLine:Zt,TextureThreePhaseOverheadLine:eo,TextureSinglePhaseUndergroundLine:to,TextureTwoPhaseUndergroundLine:oo,TextureThreePhaseUndergroundLine:ro,TextureSupportStructure:no};if(process.env.NODE_ENV==="development")for(let e of Object.keys(Pe))e in tt__namespace&&console.error(`Custom icon "${e}" collides with a Phosphor icon of the same name. Rename it (use the "Texture" prefix) to keep the icon namespace unambiguous.`);var se={xs:16,sm:20,md:24,lg:32,xl:40,"2xl":48},I=Ve.memo(({name:e,size:t="md",color:o,weight:r="regular",className:n,ariaLabel:a,...s})=>{let i=Pe[e]??tt__namespace[e];if(!i)return process.env.NODE_ENV==="development"&&console.error(`Icon "${e}" not found in @phosphor-icons/react or the custom icon registry`),null;let l=typeof t=="string"&&t in se?se[t]:t,c=tailwindMerge.twMerge("inline-block flex-shrink-0",!o&&"text-current",n);return jsxRuntime.jsx(i,{...s,size:l,color:o,weight:r,className:c,"aria-label":a||`${e} icon`,"data-testid":`icon-${e}`})});I.displayName="Icon";var ao=Ve.memo(({variant:e="subtle",shape:t="square",containerSize:o,containerClassName:r,size:n="md",className:a,name:s,color:i,weight:l,ariaLabel:c,ref:p,...u})=>{let x=typeof n=="string"&&n in se?se[n]:n,P=o?typeof o=="string"&&o in se?se[o]:o:x*1.75,v=tailwindMerge.twMerge("inline-flex items-center justify-center flex-shrink-0",t==="circle"?"rounded-full":"rounded-lg",e==="subtle"&&"bg-background-muted",e==="solid"&&"bg-action-brand text-[color:var(--color-action-brand-text)]",e==="outline"&&"border-2 border-current",r);return jsxRuntime.jsx("div",{className:v,style:{width:P,height:P},children:jsxRuntime.jsx(I,{...u,name:s,size:n,color:i,weight:l,className:a,ariaLabel:c})})});ao.displayName="IconWithContainer";var lo="flex font-medium justify-center items-center gap-2 text-center transition rounded-[var(--control-border-radius)] whitespace-nowrap box-border",co="bg-action-primary text-[color:var(--color-action-primary-text)] hover:bg-action-primary-hover forced-colors:bg-[ButtonText] forced-colors:text-[ButtonFace] border-2 border-transparent",uo={primary:co,secondary:"bg-action-secondary text-[color:var(--color-action-secondary-text)] border-2 border-border-muted hover:bg-action-secondary-hover forced-colors:border-[ButtonBorder] forced-colors:bg-[ButtonFace] forced-colors:text-[ButtonText]",ghost:"border-none text-text-primary hover:bg-text-primary/5 forced-colors:text-[ButtonText] forced-colors:hover:bg-[ButtonFace]",destructive:"bg-transparent text-feedback-error-text border-2 border-border-muted hover:bg-feedback-error-background/50 forced-colors:border-[ButtonBorder] forced-colors:bg-[ButtonFace] forced-colors:text-[Mark]",link:"!text-action-primary hover:text-action-primary/90 hover:underline hover:decoration-2 hover:underline-offset-4",icon:"border-none text-text-primary hover:bg-background-hover hover:text-text-primary forced-colors:text-[ButtonText] forced-colors:hover:bg-[ButtonFace] p-1 flex-shrink-0 rounded-[var(--control-border-radius)]",unstyled:"bg-transparent"},at={full:"w-full",default:"w-fit"},po="opacity-50 cursor-not-allowed pointer-events-none",fo="opacity-100 cursor-pointer",mo={"top-right":"-right-2 -top-2","top-left":"-left-2 -top-2","bottom-right":"-right-2 -bottom-2","bottom-left":"-left-2 -bottom-2"},go={primary:"bg-action-primary text-[color:var(--color-action-primary-text)]",destructive:"bg-feedback-error-border text-text-inverse"};function ho(e){return !e||e==="default"||e==="brand"?"primary":e}function bo(e){let{variant:t="primary",size:o="md",isDisabled:r,fullWidth:n=false,isLoading:a=false}=e,s=ho(t),i=s==="unstyled"?"":`${lo} ${uo[s]}`;s!=="unstyled"&&(i+=` ${ee[o].text} ${ee[o].height} ${ee[o].padding} ${ee[o].gap}`),r||a?i+=` ${po}`:i+=` ${fo}`,n?i+=` ${at.full}`:i+=` ${at.default}`;let l=s==="primary"?"focus-visible:outline-action-primary":void 0;return [i,Je(),l].filter(Boolean).join(" ")}function $(e){let{icon:t,children:o,isLoading:r=false,loadingText:n,loadingIndicator:a,size:s="md",iconPosition:i="left",iconWeight:l,href:c,className:p,badgeNumber:u,badgeVariant:x="primary",badgePosition:P="top-right",style:v,target:S,rel:L,...N}=e,m=t?jsxRuntime.jsx(I,{name:t,size:s,weight:l}):null,k=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[i==="left"&&m,typeof o=="function"?null:o,i==="right"&&m]}),R=jsxRuntime.jsxs("div",{className:"relative inline-flex items-center justify-center",children:[jsxRuntime.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:a||jsxRuntime.jsx(I,{name:"CircleNotch",size:s,className:"animate-spin","aria-hidden":"true"})}),jsxRuntime.jsx("div",{className:"invisible","aria-hidden":"true",children:k}),n&&jsxRuntime.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:n})]}),y=(u??0)>0,w=tailwindMerge.twMerge(bo(e),p),U=c?{href:c,target:S,rel:L,...N}:{};if(c){let{onPress:V,onPressStart:E,onPressEnd:ce,onPressChange:G,onPressUp:re,onAuxClick:ue,onContextMenu:ne,onDoubleClick:W,...H}=N;Object.assign(U,H);}let M=c?jsxRuntime.jsx(reactAriaComponents.Link,{...U,...r&&{"aria-busy":true},style:y?void 0:v,className:w,children:r?R:typeof o=="function"?(function(V){return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[i==="left"&&m,o(V),i==="right"&&m]})}):k}):jsxRuntime.jsx(reactAriaComponents.Button,{...N,...r&&{"aria-busy":true},style:y?void 0:v,className:w,children:r?R:typeof o=="function"?(function(V){return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[i==="left"&&m,o(V),i==="right"&&m]})}):k});return y?jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("relative flex",p),style:v,children:[M,jsxRuntime.jsx("span",{className:`absolute ${mo[P]} flex h-5 w-5 items-center justify-center rounded-full ${go[x]} text-xs font-medium`,"aria-label":`${u} items`,children:u})]}):M}function Ae({action:e,defaultVariant:t,defaultSize:o="lg"}){let r=!!e.formId;return jsxRuntime.jsx($,{type:r?"submit":"button",form:r?e.formId:void 0,size:e.size||o,variant:e.variant||t,onPress:r?void 0:e.onPress,isLoading:e.isLoading,isDisabled:e.isDisabled,children:e.label})}function X({primaryAction:e,secondaryAction:t,tertiaryAction:o,footerContent:r}){let n=e||t||o;return !n&&!r?null:jsxRuntime.jsxs("div",{className:`flex w-full flex-col items-center justify-center border-t p-4 ${r?"h-28":""}`,children:[r&&jsxRuntime.jsx("div",{className:"flex h-10 justify-center",children:r}),n&&jsxRuntime.jsxs("div",{className:"flex w-full items-center justify-between gap-3",children:[jsxRuntime.jsx("div",{children:o&&jsxRuntime.jsx(Ae,{action:o,defaultVariant:"destructive"})}),jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[t&&jsxRuntime.jsx(Ae,{action:t,defaultVariant:"secondary"}),e&&jsxRuntime.jsx(Ae,{action:e,defaultVariant:"primary"})]})]})]})}var xo={heading:{sm:F.headingSm,md:F.headingMd,lg:F.headingLg,xl:F.headingXl},display:{sm:F.displaySm,md:F.displayMd,lg:F.displayLg,xl:F.displayXl}},vo={page:"h-16 leading-[62px]"};function te({tag:e="h1",variant:t="heading",size:o="lg",height:r,className:n="",children:a}){let s=o==="xs"?"sm":o,i=xo[t][s],l=r?vo[r]:"";return jsxRuntime.jsx(e,{className:ye(i,"text-text-primary",l,n),children:a})}var D=({title:e,onClose:t,hideCloseIcon:o=false,titleAlign:r="left",hasBackArrow:n=false,onBack:a,headerContent:s})=>jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("relative flex h-16 w-full flex-shrink-0 items-center justify-between border-b px-6",e&&"border-b",r==="center"?"justify-center":""),children:[n&&jsxRuntime.jsx($,{variant:"icon",onPress:a,className:"absolute left-6","aria-label":"Go back",children:jsxRuntime.jsx(I,{name:"CaretLeft","data-testid":"back-arrow"})}),s||jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[e&&jsxRuntime.jsx(te,{size:"xs",children:e}),t&&!o&&jsxRuntime.jsx($,{variant:"icon",onPress:t,"aria-label":"Close dialog",children:jsxRuntime.jsx(I,{name:"X","data-testid":"close-button"})})]})]});var wo=Ve.createContext(false);function st({children:e}){return jsxRuntime.jsx(wo.Provider,{value:true,children:e})}var B=({width:e,height:t,variant:o="rect",animation:r="pulse",gradient:n=false,flex:a=false,stack:s,responsive:i,delay:l=0,adjustAnimationSpeedBasedOnWidth:c=false,ariaLabel:p,className:u,"data-testid":x})=>{let[P,v]=Ve.useState(l===0);if(Ve.useEffect(()=>{if(l>0){let y=setTimeout(()=>v(true),l);return ()=>clearTimeout(y)}},[l]),!P)return null;let S=n?"bg-gradient-to-r from-[var(--color-skeleton-base)] via-[var(--color-skeleton-highlight)] to-[var(--color-skeleton-base)]":"bg-[var(--color-skeleton-base)]",L=c&&e?(()=>{let y=typeof e=="number"?e:parseFloat(String(e));return isNaN(y)?"":`animation-duration-[${Math.max(.8,y/100)}s]`})():"",N=r==="pulse"?`animate-pulse ${L}`:r==="wave"?`relative overflow-hidden before:absolute before:inset-0 before:bg-gradient-to-r before:from-transparent before:via-[var(--color-skeleton-wave)] before:to-transparent before:animate-wave ${L}`:"",m="rounded-sm";o==="circle"&&(m="rounded-full"),o==="text"&&(m="h-4 w-full rounded-sm");let k=a?"flex-1 min-w-0":"",R=i?Object.entries(i).map(([y,w])=>`${y}:w-[${w}]`).join(" "):"";return s?jsxRuntime.jsx("div",{className:"space-y-2","data-testid":x,children:s.map((y,w)=>jsxRuntime.jsx("div",{className:tailwindMerge.twMerge(S,N,m,k,R,u),style:{width:y,height:t}},w))}):jsxRuntime.jsx("div",{className:tailwindMerge.twMerge(S,N,m,k,R,u),style:{width:e,height:t},role:"presentation","aria-hidden":!p,"aria-label":p??void 0,"data-testid":x})};var To={outlined:"bg-background-surface border border-border-default",elevated:"bg-background-surface border-0 shadow-md",filled:"bg-background-muted border-0",ghost:"bg-transparent border-0 shadow-none"},Do="rounded-lg",We={square:"aspect-square",video:"aspect-video",wide:"aspect-[2/1]",auto:""},Io={start:"justify-start",end:"justify-end",center:"justify-center",between:"justify-between"};function dt(e){return Ve__namespace.default.Children.toArray(e).some(t=>Ve__namespace.default.isValidElement(t)?t.type===Ve__namespace.default.Fragment?dt(t.props.children):t.type===_e&&!!t.props.title:false)}function Y({variant:e="outlined",className:t,children:o,isLoading:r=false,layout:n="default"}){let a=dt(o)?jsxRuntime.jsx(st,{children:o}):o;return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("w-full overflow-hidden",To[e],Do,n==="flex"&&"flex flex-col",t),"data-testid":"card",children:r?jsxRuntime.jsx(B,{width:"100%",height:"100%",className:"rounded-none"}):a})}function _e({title:e,subtitle:t,actions:o,leading:r,className:n,isLoading:a=false}){return a?jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("p-6 pb-4",n),children:[jsxRuntime.jsxs("div",{className:"flex justify-between items-start mb-1",children:[jsxRuntime.jsx(B,{width:120,height:20}),jsxRuntime.jsx(B,{width:24,height:24})]}),t&&jsxRuntime.jsx(B,{width:200,height:16})]}):!e&&!t&&!o&&!r?null:jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("p-6 pb-4",n),children:jsxRuntime.jsxs("div",{className:"flex justify-between items-start gap-4",children:[r&&jsxRuntime.jsx("div",{className:"flex-shrink-0",children:r}),jsxRuntime.jsxs("div",{className:"min-w-0 flex-1",children:[e&&jsxRuntime.jsx("div",{className:"mb-1",children:typeof e=="string"?jsxRuntime.jsx(te,{tag:"h3",size:"sm",className:"text-text-primary",children:e}):e}),t&&jsxRuntime.jsx("div",{className:Qe("bodySm","text-text-secondary"),children:t})]}),o&&jsxRuntime.jsx("div",{className:"flex-shrink-0",children:o})]})})}function ct({src:e,alt:t,aspectRatio:o="auto",className:r,children:n,isLoading:a=false}){return a?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("bg-background-muted",We[o],r),children:jsxRuntime.jsx(B,{width:"100%",height:"100%"})}):n?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("overflow-hidden",We[o],r),children:n}):e?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("overflow-hidden",We[o],r),children:jsxRuntime.jsx("img",{src:e,alt:t||"",className:"w-full h-full object-cover",loading:"lazy"})}):null}function ut({className:e,children:t,isLoading:o=false,fill:r=false,style:n}){let s=e?.match(/p(?:t|b|l|r|x|y)?-(?:\d+(?:\.\d+)?|px|\[.+?\])/)?"":"px-6 py-4";return o?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge(s,r&&"flex-1 flex flex-col min-h-0",e),style:n,children:jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx(B,{width:"100%",height:16}),jsxRuntime.jsx(B,{width:"80%",height:16}),jsxRuntime.jsx(B,{width:"60%",height:16})]})}):t?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge(s,"text-text-primary",r&&"flex-1 flex flex-col min-h-0",e),style:n,children:t}):null}function pt({className:e,children:t,align:o="end",isLoading:r=false}){return r?jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("px-6 py-4 flex gap-2 justify-end",e),children:[jsxRuntime.jsx(B,{width:80,height:32}),jsxRuntime.jsx(B,{width:60,height:32})]}):t?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("px-6 py-4 flex items-center gap-2",Io[o],e),children:t}):null}Y.Header=_e;Y.Media=ct;Y.Content=ut;Y.Footer=pt;var z=class extends Ve.Component{constructor(){super(...arguments);Le(this,"state",{hasError:false});Le(this,"handleRetry",()=>{this.setState({hasError:false,error:void 0}),typeof window<"u"&&window.location.reload();});}static getDerivedStateFromError(o){return {hasError:true,error:o}}componentDidCatch(o,r){console.error("Error Boundary caught an error:",o,r);}render(){return this.state.hasError?this.props.fallback?this.props.fallback:jsxRuntime.jsxs(Y,{children:[this.props.title&&jsxRuntime.jsx(Y.Header,{title:this.props.title}),jsxRuntime.jsx(Y.Content,{children:jsxRuntime.jsxs("div",{className:"flex flex-col items-center justify-center gap-4","data-testid":"error-boundary",children:[jsxRuntime.jsx("p",{className:"text-feedback-error-text",children:this.state.error?.message||"Something went wrong"}),jsxRuntime.jsx("button",{className:"rounded bg-action-default px-4 py-2 text-[color:var(--color-action-default-text)] hover:bg-action-default-hover",onClick:this.handleRetry,children:"Retry"})]})})]}):this.props.children}};function Q({transparent:e=false,className:t,children:o,...r}){return jsxRuntime.jsx(reactAriaComponents.ModalOverlay,{...r,className:reactAriaComponents.composeRenderProps(t,(n,a)=>tailwindMerge.twMerge("fixed inset-0 z-50","outline-none focus:outline-none focus-visible:outline-none ring-0 focus:ring-0 focus-visible:ring-0",e?"bg-transparent":["bg-gradient-to-br from-background-modal/20 via-background-modal/15 to-background-modal/20","backdrop-blur-[2px]","supports-[backdrop-filter]:bg-background-modal/15"].join(" "),a.isEntering&&["animate-in fade-in","duration-300 ease-out"].join(" "),a.isExiting&&["animate-out fade-out","duration-200 ease-in"].join(" "),n)),children:o})}var zo=.3,Oo=.5;function Re({children:e,title:t,headerContent:o,titleAlign:r="left",hideCloseIcon:n=false,hasBackArrow:a=false,onBack:s,isOpen:i,onClose:l,isDismissable:c=true,transparentOverlay:p=false,primaryAction:u,secondaryAction:x,footerContent:P,maxHeight:v="80vh",height:S,maxWidth:L="640px",contentPadding:N=true,showHandle:m=true,animationVariant:k="scale",className:R}){let[y,w]=Ve.useState(false),[U,M]=Ve.useState(0),[V,E]=Ve.useState(false),ce=ve(i),G=ce?.height??null,re=ce?.keyboardOffset??0,ue=Ve.useRef(null),ne=Ve.useRef(null),W=Ve.useRef(null),H=Ve.useRef({isDragging:false,startY:0,startTime:0,pointerId:null});Ve.useEffect(()=>{if(i){let g=setTimeout(()=>{w(true),setTimeout(()=>w(false),600);},400);return ()=>clearTimeout(g)}},[i]),Ve.useEffect(()=>{i||(M(0),E(false),H.current={isDragging:false,startY:0,startTime:0,pointerId:null});},[i]),Ve.useEffect(()=>{let g=ne.current;if(!g||!i)return;let _=null,ae=me=>{let Z=me.target;Z&&["INPUT","TEXTAREA","SELECT"].includes(Z.tagName)&&(_&&clearTimeout(_),_=setTimeout(()=>{Z.scrollIntoView({block:"nearest",behavior:"smooth"});},320));};return g.addEventListener("focusin",ae),()=>{g.removeEventListener("focusin",ae),_&&clearTimeout(_);}},[i]);let J=Ve.useCallback(g=>{c&&(g.pointerType!=="touch"&&g.pointerType!=="pen"||(W.current&&(clearTimeout(W.current),W.current=null),H.current={isDragging:true,startY:g.clientY,startTime:Date.now(),pointerId:g.pointerId},E(false),g.currentTarget.setPointerCapture(g.pointerId)));},[c]),K=Ve.useCallback(g=>{let{isDragging:_,startY:ae,pointerId:me}=H.current;if(!_||g.pointerId!==me)return;let Z=g.clientY-ae;M(Math.max(0,Z));},[]),pe=Ve.useCallback(g=>{let{isDragging:_,startY:ae,startTime:me,pointerId:Z}=H.current;if(!_||g.pointerId!==Z)return;let Be=g.clientY-ae,Dt=Date.now()-me,It=Be/Dt;H.current={isDragging:false,startY:0,startTime:0,pointerId:null};let Bt=(ue.current?.getBoundingClientRect().height??0)*zo;(Be>Bt||It>Oo&&Be>50)&&c?(l?.(),M(0)):(E(true),M(0),W.current=setTimeout(()=>{E(false),W.current=null;},200));},[c,l]);if(!i)return null;let Ie=t||o,fe=u||x||P;return jsxRuntime.jsx(z,{children:jsxRuntime.jsx(Q,{isOpen:i,onOpenChange:g=>{g||l?.();},isDismissable:c,transparent:p,style:{paddingBottom:re>0?`${re}px`:void 0,transition:"padding-bottom 0.25s ease-out"},className:"flex items-end justify-center p-0 sm:p-4",children:jsxRuntime.jsx(reactAriaComponents.Modal,{className:"w-full max-w-full p-0 sm:p-2 outline-none focus:outline-none focus-visible:outline-none ring-0 focus:ring-0 focus-visible:ring-0",isDismissable:c,children:jsxRuntime.jsx("div",{ref:ue,className:tailwindMerge.twMerge("w-full",V&&"transition-transform duration-200"),style:{transform:U>0?`translateY(${U}px)`:void 0},children:jsxRuntime.jsxs(reactAriaComponents.Dialog,{className:tailwindMerge.twMerge("relative flex w-full flex-col overflow-hidden","bg-background-surface","shadow-2xl shadow-black/30 dark:shadow-black/60","border-t border-x border-border-default/40","outline-none focus:outline-none focus-visible:outline-none ring-0 focus:ring-0 focus-visible:ring-0 focus:shadow-none","origin-bottom",k==="scale"?"animate-[tray-enter-scale_400ms_cubic-bezier(0.32,0.72,0,1)]":"animate-[tray-enter_400ms_cubic-bezier(0.32,0.72,0,1)]",k==="scale"?"data-[exiting]:animate-[tray-exit-scale_250ms_cubic-bezier(0.32,0,0.67,0)]":"data-[exiting]:animate-[tray-exit_250ms_cubic-bezier(0.32,0,0.67,0)]",R),style:{maxWidth:L,...S?{height:S}:{maxHeight:/\d/.test(v)?G!==null?`min(${v}, ${Math.max(G-8,0)}px, 100dvh)`:`min(${v}, 100dvh)`:v}},children:[m&&jsxRuntime.jsx("div",{className:"absolute top-0 left-0 right-0 h-8 z-10 flex justify-center items-start pt-2 touch-none cursor-grab active:cursor-grabbing",onPointerDown:J,onPointerMove:K,onPointerUp:pe,onPointerCancel:pe,children:jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("h-1 w-12 rounded-full bg-border-muted transition-all duration-300","hover:bg-border-default hover:w-16",y&&"animate-[handle-wiggle_0.6s_ease-in-out]")})}),Ie&&(a?jsxRuntime.jsx(D,{title:t,headerContent:o,titleAlign:r,hideCloseIcon:n||!l,hasBackArrow:true,onBack:s??(()=>{}),onClose:l||(()=>{})}):jsxRuntime.jsx(D,{title:t,headerContent:o,titleAlign:r,hideCloseIcon:n||!l,onClose:l||(()=>{})})),jsxRuntime.jsx("div",{ref:ne,className:tailwindMerge.twMerge("flex-1 min-h-0 overflow-y-auto overscroll-contain",N?"p-4":"p-0"),children:e}),fe&&jsxRuntime.jsx(X,{primaryAction:u,secondaryAction:x,footerContent:P})]})})})})})}Re.displayName="Tray";function Ge({isOpen:e,onClose:t,title:o,headerContent:r,titleAlign:n="left",hideCloseIcon:a=false,hasBackArrow:s=false,onBack:i,children:l,primaryAction:c,secondaryAction:p,tertiaryAction:u,footerContent:x,transparentOverlay:P=false,maxWidth:v="600px",minWidth:S="400px",maxHeight:L="85vh",height:N,mobileMaxHeight:m="90vh",mobileHeight:k,contentPadding:R=true,className:y}){let w=Xe("(max-width: 767px)"),U=ve(w&&e===void 0),M=U?.height??null,V=U?.keyboardOffset??0,E=Ve.useRef(null),ce=Ve.useCallback(()=>{E.current&&E.current.scrollTop!==0&&(E.current.scrollTop=0);},[]),G=Ve.useRef(null),re=Ve.useRef(null);Ve.useEffect(()=>{let J=re.current;if(!J||!w)return;let K=null,pe=Ie=>{let fe=Ie.target;fe&&["INPUT","TEXTAREA","SELECT"].includes(fe.tagName)&&(K&&clearTimeout(K),K=setTimeout(()=>{fe.scrollIntoView({block:"nearest",behavior:"smooth"});},320));};return J.addEventListener("focusin",pe),()=>{J.removeEventListener("focusin",pe),K&&clearTimeout(K);}},[w]);let ue=Ve.useCallback(()=>{G.current&&G.current.scrollTop!==0&&(G.current.scrollTop=0);},[]);if(e===false)return null;let ne=o||r,W=c||p||u||x,H=e!==void 0;return w?H?jsxRuntime.jsx(Re,{isOpen:e,onClose:t,title:o,headerContent:r,titleAlign:n,hideCloseIcon:a,hasBackArrow:s,onBack:i,primaryAction:c,secondaryAction:p,footerContent:x,transparentOverlay:P,maxHeight:m,height:k,maxWidth:v,contentPadding:R,showHandle:true,animationVariant:"scale",className:y,children:l}):jsxRuntime.jsx(z,{children:jsxRuntime.jsx(Q,{isDismissable:true,transparent:P,style:{paddingBottom:V>0?`${V}px`:void 0,transition:"padding-bottom 0.25s ease-out"},className:"flex items-end justify-center",children:jsxRuntime.jsx(reactAriaComponents.Modal,{className:"w-full p-0 outline-none focus:outline-none focus-visible:outline-none ring-0 focus:ring-0 focus-visible:ring-0",children:jsxRuntime.jsxs(reactAriaComponents.Dialog,{ref:E,onScroll:ce,className:tailwindMerge.twMerge("relative flex w-full flex-col","bg-background-surface","shadow-2xl shadow-black/20","border-t border-x border-border-default/40","rounded-t-xl","overflow-hidden","animate-in slide-in-from-bottom","duration-300 ease-out","data-[exiting]:animate-out data-[exiting]:slide-out-to-bottom","data-[exiting]:duration-200 data-[exiting]:ease-in",y),style:{...k?{height:k}:{maxHeight:/\d/.test(m)?M!==null?`min(${m}, ${Math.max(M-8,0)}px, 100dvh)`:`min(${m}, 100dvh)`:m}},children:[jsxRuntime.jsx("div",{className:"flex justify-center pt-2",children:jsxRuntime.jsx("div",{className:"h-1.5 w-12 rounded-full bg-border-muted"})}),ne&&(s?jsxRuntime.jsx(D,{title:o,headerContent:r,titleAlign:n,hideCloseIcon:a||!t,hasBackArrow:true,onBack:i,onClose:t||(()=>{})}):jsxRuntime.jsx(D,{title:o,headerContent:r,titleAlign:n,hideCloseIcon:a||!t,onClose:t||(()=>{})})),jsxRuntime.jsx("div",{ref:re,className:tailwindMerge.twMerge("flex-1 min-h-0 overflow-y-auto overscroll-contain",R?"px-6 py-6":"p-0"),children:l}),W&&jsxRuntime.jsx(X,{primaryAction:c,secondaryAction:p,tertiaryAction:u,footerContent:x})]})})})}):jsxRuntime.jsx(z,{children:jsxRuntime.jsx(Q,{...H?{isOpen:e,onOpenChange:J=>{!J&&t&&t();}}:{},isDismissable:true,transparent:P,className:"flex items-center justify-center",children:jsxRuntime.jsx(reactAriaComponents.Modal,{className:"w-full p-4 outline-none focus:outline-none focus-visible:outline-none ring-0 focus:ring-0 focus-visible:ring-0",style:{maxWidth:v},children:jsxRuntime.jsxs(reactAriaComponents.Dialog,{ref:G,onScroll:ue,className:tailwindMerge.twMerge("relative flex w-full flex-col","bg-background-surface","shadow-2xl shadow-black/20","border border-border-default/50","rounded-md","overflow-hidden","outline-none focus:outline-none focus-visible:outline-none ring-0 focus:ring-0","animate-in fade-in zoom-in-96 slide-in-from-bottom-2","duration-300 ease-out","data-[exiting]:animate-out data-[exiting]:fade-out data-[exiting]:zoom-out-95","data-[exiting]:duration-200 data-[exiting]:ease-in",y),style:{minWidth:S,...N?{height:N}:{maxHeight:L}},children:[ne&&(s?jsxRuntime.jsx(D,{title:o,headerContent:r,titleAlign:n,hideCloseIcon:a||!t,hasBackArrow:true,onBack:i,onClose:t||(()=>{})}):jsxRuntime.jsx(D,{title:o,headerContent:r,titleAlign:n,hideCloseIcon:a||!t,onClose:t||(()=>{})})),jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex-1 min-h-0 overflow-y-auto",R?"px-6 py-6":"p-0"),children:l}),W&&jsxRuntime.jsx(X,{primaryAction:c,secondaryAction:p,tertiaryAction:u,footerContent:x})]})})})})}function be(e){return jsxRuntime.jsx(reactAriaComponents.Form,{validationBehavior:"aria",...e,className:tailwindMerge.twMerge("flex flex-col gap-6",e.className)})}function Va({formId:e="dialog-form",onSubmit:t,primaryLabel:o="Save",secondaryLabel:r="Cancel",onCancel:n,primaryVariant:a,secondaryVariant:s="secondary",children:i,title:l,...c}){return jsxRuntime.jsx(Ge,{title:l,primaryAction:{label:o,onPress:()=>{let u=document.getElementById(e);u&&u.requestSubmit();},variant:a},secondaryAction:n?{label:r,onPress:n,variant:s}:void 0,...c,children:jsxRuntime.jsx(be,{id:e,onSubmit:t,children:i})})}function Te({children:e,title:t,headerContent:o,titleAlign:r="left",hideCloseIcon:n=false,hasBackArrow:a=false,onBack:s,isOpen:i,slideInFrom:l="right",transparentOverlay:c=false,onClose:p,className:u,primaryAction:x,secondaryAction:P,tertiaryAction:v,footerContent:S,contentPadding:L=true,maxWidth:N="400px"}){if(!i)return null;let m=t||o,k=x||P||v||S;return jsxRuntime.jsx(z,{children:jsxRuntime.jsx(Q,{isOpen:i,onOpenChange:R=>!R&&p?.(),isDismissable:true,transparent:c,children:jsxRuntime.jsx(reactAriaComponents.Modal,{className:"outline-none focus:outline-none focus-visible:outline-none ring-0 focus:ring-0 focus-visible:ring-0",children:jsxRuntime.jsxs(reactAriaComponents.Dialog,{className:tailwindMerge.twMerge("fixed top-0 bottom-0 flex flex-col bg-background-surface shadow-xl overflow-hidden",l==="right"?"right-0":"left-0",l==="right"?"animate-in slide-in-from-right duration-300 ease-out":"animate-in slide-in-from-left duration-300 ease-out","data-[exiting]:animate-out",l==="right"?"data-[exiting]:slide-out-to-right":"data-[exiting]:slide-out-to-left","data-[exiting]:duration-200 data-[exiting]:ease-in","outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-action-default focus-visible:outline-offset-0",u),style:{maxWidth:N,width:"100%"},children:[m&&(a&&s?jsxRuntime.jsx(D,{title:t,headerContent:o,titleAlign:r,hideCloseIcon:n,hasBackArrow:true,onBack:s,onClose:p}):jsxRuntime.jsx(D,{title:t,headerContent:o,titleAlign:r,hideCloseIcon:n,onClose:p})),jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex-1 overflow-y-auto overscroll-contain",L?"px-6 py-6":"p-0"),children:e}),k&&jsxRuntime.jsx(X,{primaryAction:x,secondaryAction:P,tertiaryAction:v,footerContent:S})]})})})})}Te.displayName="Drawer";function ti({formId:e="drawer-form",onSubmit:t,primaryLabel:o="Save",secondaryLabel:r="Cancel",onCancel:n,primaryVariant:a,secondaryVariant:s="secondary",children:i,...l}){return jsxRuntime.jsx(Te,{primaryAction:{label:o,onPress:()=>{let p=document.getElementById(e);p&&p.requestSubmit();},variant:a},secondaryAction:n?{label:r,onPress:n,variant:s}:void 0,...l,children:jsxRuntime.jsx(be,{id:e,onSubmit:t,className:"mt-2",children:i})})}function ai({align:e="end",className:t,...o}){return jsxRuntime.jsx("div",{...o,className:tailwindMerge.twMerge("flex gap-2",e==="start"?"justify-start":e==="between"?"justify-between":"justify-end",t)})}var Jo={sm:"gap-2",md:"gap-4",lg:"gap-6"};function Ko(e){if(!e)return "";let t=e.base?`grid-cols-${e.base}`:"",o=e.md?`md:grid-cols-${e.md}`:"",r=e.lg?`lg:grid-cols-${e.lg}`:"";return [t,o,r].filter(Boolean).join(" ")}function di({cols:e={base:1},gap:t="lg",className:o,...r}){return jsxRuntime.jsx("div",{...r,className:tailwindMerge.twMerge("grid",Ko(e),Jo[t],o)})}var tr=Ve__namespace.default.forwardRef(({children:e,className:t},o)=>jsxRuntime.jsx("div",{ref:o,className:tailwindMerge.twMerge("relative w-full",t),children:e}));tr.displayName="InputWrapper";function Pt({size:e="md",className:t,children:o,...r}){return jsxRuntime.jsx("div",{...r,className:tailwindMerge.twMerge("leading-[2.25] text-text-secondary",ee[e].text,t),children:o})}function Ci({title:e,description:t,showDivider:o,className:r,children:n,...a}){return jsxRuntime.jsxs("section",{...a,className:tailwindMerge.twMerge("flex flex-col",r),children:[(e||t)&&jsxRuntime.jsxs("div",{className:"flex flex-col gap-1 mb-6",children:[typeof e=="string"?jsxRuntime.jsx(te,{tag:"h3",size:"sm",children:e}):e,t?jsxRuntime.jsx(Pt,{size:"lg",children:t}):null]}),jsxRuntime.jsx("div",{className:"flex flex-col gap-6",children:n}),o&&jsxRuntime.jsx("hr",{className:"mt-2 border-border-muted"})]})}function Pi(){return jsxRuntime.jsx("hr",{className:"border-border-muted"})}function Si({steps:e,currentStepId:t,onStepClick:o,className:r}){let n=e.findIndex(a=>a.id===t);return jsxRuntime.jsx("nav",{"aria-label":"Progress",className:tailwindMerge.twMerge("w-full",r),children:jsxRuntime.jsx("div",{className:"relative mb-12",children:jsxRuntime.jsx("ol",{className:"relative flex items-start justify-between",children:e.map((a,s)=>{let i=a.id===t,l=s<n,c=o&&(l||i);return jsxRuntime.jsxs("li",{className:"relative flex flex-col items-center",style:{flex:`1 1 ${100/e.length}%`},children:[jsxRuntime.jsx("button",{type:"button",disabled:!c,onClick:()=>c&&o?.(a.id),className:tailwindMerge.twMerge("relative z-10 flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full border-2 transition-colors bg-background-body",l&&"border-action-primary bg-action-primary text-text-inverse hover:bg-action-primary/90",i&&"border-action-primary bg-background-body text-action-primary",!l&&!i&&"border-border-default bg-background-body text-text-secondary",c&&"cursor-pointer",!c&&"cursor-default"),"aria-current":i?"step":void 0,children:l?jsxRuntime.jsx(I,{name:"Check",size:20,weight:"bold"}):jsxRuntime.jsx("span",{className:"text-sm font-semibold",children:s+1})}),s<e.length-1&&jsxRuntime.jsx("div",{className:"absolute top-5 h-0.5 transition-colors",style:{left:"50%",width:"100%",marginLeft:"20px",backgroundColor:s<n?"var(--color-action-primary)":"var(--color-border-default)"}}),jsxRuntime.jsxs("div",{className:"mt-3 flex flex-col items-center text-center w-32",children:[jsxRuntime.jsx("span",{className:tailwindMerge.twMerge("text-sm font-medium",i&&"text-text-default",l&&"text-text-primary",!i&&!l&&"text-text-secondary"),children:a.title}),a.description&&jsxRuntime.jsx("span",{className:"mt-1 text-xs text-text-secondary",children:a.description})]})]},a.id)})})})})}function Li({formId:e,show:t,isSubmitting:o,onCancel:r,primaryLabel:n="Save changes",secondaryLabel:a="Cancel",className:s}){return t?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("fixed inset-x-0 bottom-0 z-40 border-t border-border-muted bg-background-surface/95 backdrop-blur supports-[backdrop-filter]:bg-background-surface/70",s),children:jsxRuntime.jsxs("div",{className:"mx-auto flex max-w-screen-lg items-center justify-between gap-3 p-3",children:[jsxRuntime.jsx("div",{className:"text-sm text-text-secondary",children:"You have unsaved changes"}),jsxRuntime.jsxs("div",{className:"flex gap-2",children:[jsxRuntime.jsx($,{variant:"secondary",onPress:r,children:a}),jsxRuntime.jsx($,{type:"submit",form:e,isDisabled:!!o,children:o?"Saving...":n})]})]})}):null}function Hi({when:e,message:t="You have unsaved changes. Leave anyway?"}){return Ve__namespace.useEffect(()=>{if(!e)return;let o=r=>(r.preventDefault(),r.returnValue=t,t);return window.addEventListener("beforeunload",o),()=>window.removeEventListener("beforeunload",o)},[e,t]),null}function Ai({steps:e,initialStepId:t,canNavigate:o}){if(e.length===0)throw new Error("useWizard: steps array cannot be empty");let[r,n]=Ve__namespace.useState(t||e[0].id),a=e.findIndex(u=>u.id===r),s=a>0,i=a<e.length-1,l=async u=>u===r?true:o&&!await o(r,u)?false:(n(u),true);return {steps:e,currentStepId:r,setCurrentStepId:l,next:async()=>!i||a===-1?false:l(e[a+1].id),prev:async()=>!s||a===-1?false:l(e[a-1].id),hasNext:i,hasPrev:s,stepIndex:a}}
|
|
2
2
|
exports.DialogForm=Va;exports.DrawerForm=ti;exports.FormActions=ai;exports.FormDivider=Pi;exports.FormGrid=di;exports.FormSection=Ci;exports.FormStepper=Si;exports.SaveBar=Li;exports.UnsavedChangesPrompt=Hi;exports.useWizard=Ai;//# sourceMappingURL=index.cjs.map
|
|
3
3
|
//# sourceMappingURL=index.cjs.map
|