diff --git a/Stark.sketchplugin/Contents/Resources/ui.js b/Stark.sketchplugin/Contents/Resources/ui.js index a0c3c0f..ca244bf 100644 --- a/Stark.sketchplugin/Contents/Resources/ui.js +++ b/Stark.sketchplugin/Contents/Resources/ui.js @@ -1,9 +1,9 @@ -!function(e){var t={};function r(n){if(t[n])return t[n].exports;var l=t[n]={i:n,l:!1,exports:{}};return e[n].call(l.exports,l,l.exports,r),l.l=!0,l.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var l in e)r.d(n,l,function(t){return e[t]}.bind(null,l));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=76)}([function(e,t,r){"use strict";e.exports=r(78)},function(e,t,r){var n=r(212),l=r(0),a=r(16),o=r(72);function c(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}c(e.exports,"Primitive",()=>i),c(e.exports,"Root",()=>u),c(e.exports,"dispatchDiscreteCustomEvent",()=>function(e,t){e&&a.flushSync(()=>e.dispatchEvent(t))});const i=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const r=l.forwardRef((e,r)=>{const{asChild:a,...c}=e,i=a?o.Slot:t;return l.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),l.createElement(i,function(e){return e&&e.__esModule?e.default:e}(n)({},c,{ref:r}))});return r.displayName="Primitive."+t,{...e,[t]:r}},{}),u=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(96);Object.defineProperty(t,"Badge",{enumerable:!0,get:function(){return n.default}});var l=r(97);Object.defineProperty(t,"Button",{enumerable:!0,get:function(){return l.default}});var a=r(98);Object.defineProperty(t,"Link",{enumerable:!0,get:function(){return a.default}});var o=r(99);Object.defineProperty(t,"Switch",{enumerable:!0,get:function(){return o.default}});var c=r(100);Object.defineProperty(t,"SystemMessage",{enumerable:!0,get:function(){return c.default}});var i=r(101);Object.defineProperty(t,"Tabs",{enumerable:!0,get:function(){return i.default}});var u=r(102);Object.defineProperty(t,"Tag",{enumerable:!0,get:function(){return u.default}});var s=r(103);Object.defineProperty(t,"Toast",{enumerable:!0,get:function(){return s.default}});var f=r(104);Object.defineProperty(t,"ToggleButton",{enumerable:!0,get:function(){return f.default}});var d=r(105);Object.defineProperty(t,"Checkbox",{enumerable:!0,get:function(){return d.default}});var p=r(106);Object.defineProperty(t,"CheckboxGroup",{enumerable:!0,get:function(){return p.default}});var m=r(107);Object.defineProperty(t,"Input",{enumerable:!0,get:function(){return m.default}});var h=r(108);Object.defineProperty(t,"Radio",{enumerable:!0,get:function(){return h.default}});var v=r(109);Object.defineProperty(t,"RadioGroup",{enumerable:!0,get:function(){return v.default}});var b=r(110);Object.defineProperty(t,"Select",{enumerable:!0,get:function(){return b.default}});var g=r(111);Object.defineProperty(t,"Textarea",{enumerable:!0,get:function(){return g.default}});var y=r(112);Object.defineProperty(t,"IconDropdown",{enumerable:!0,get:function(){return y.default}});var w=r(48);Object.defineProperty(t,"IconDropdownContained",{enumerable:!0,get:function(){return w.default}});var O=r(113);Object.defineProperty(t,"IconExpandCollapse",{enumerable:!0,get:function(){return O.default}});var _=r(114);Object.defineProperty(t,"IconAchromatopsia",{enumerable:!0,get:function(){return _.default}});var x=r(115);Object.defineProperty(t,"IconAltText",{enumerable:!0,get:function(){return x.default}});var M=r(116);Object.defineProperty(t,"IconAriaNotes",{enumerable:!0,get:function(){return M.default}});var C=r(117);Object.defineProperty(t,"IconBlurred",{enumerable:!0,get:function(){return C.default}});var E=r(118);Object.defineProperty(t,"IconBrightLight",{enumerable:!0,get:function(){return E.default}});var j=r(119);Object.defineProperty(t,"IconContrast",{enumerable:!0,get:function(){return j.default}});var Z=r(120);Object.defineProperty(t,"IconDeuteranopia",{enumerable:!0,get:function(){return Z.default}});var P=r(121);Object.defineProperty(t,"IconFail",{enumerable:!0,get:function(){return P.default}});var k=r(122);Object.defineProperty(t,"IconFocusOrder",{enumerable:!0,get:function(){return k.default}});var S=r(123);Object.defineProperty(t,"IconGhosting",{enumerable:!0,get:function(){return S.default}});var T=r(124);Object.defineProperty(t,"IconHeadings",{enumerable:!0,get:function(){return T.default}});var N=r(125);Object.defineProperty(t,"IconIndeterminate",{enumerable:!0,get:function(){return N.default}});var I=r(126);Object.defineProperty(t,"IconLandmarks",{enumerable:!0,get:function(){return I.default}});var L=r(127);Object.defineProperty(t,"IconLossOfContrast",{enumerable:!0,get:function(){return L.default}});var B=r(128);Object.defineProperty(t,"IconPass",{enumerable:!0,get:function(){return B.default}});var R=r(129);Object.defineProperty(t,"IconProtanopia",{enumerable:!0,get:function(){return R.default}});var D=r(130);Object.defineProperty(t,"IconScan",{enumerable:!0,get:function(){return D.default}});var A=r(131);Object.defineProperty(t,"IconScore",{enumerable:!0,get:function(){return A.default}});var H=r(132);Object.defineProperty(t,"IconSidekick",{enumerable:!0,get:function(){return H.default}});var F=r(133);Object.defineProperty(t,"IconTouchTargets",{enumerable:!0,get:function(){return F.default}});var U=r(134);Object.defineProperty(t,"IconTritanopia",{enumerable:!0,get:function(){return U.default}});var V=r(135);Object.defineProperty(t,"IconTunnelVision",{enumerable:!0,get:function(){return V.default}});var z=r(136);Object.defineProperty(t,"IconTypography",{enumerable:!0,get:function(){return z.default}});var G=r(137);Object.defineProperty(t,"IconVisionSimulator",{enumerable:!0,get:function(){return G.default}});var W=r(138);Object.defineProperty(t,"IconWarn",{enumerable:!0,get:function(){return W.default}});var q=r(139);Object.defineProperty(t,"IconYellowing",{enumerable:!0,get:function(){return q.default}});var Y=r(140);Object.defineProperty(t,"IconHelpSmall",{enumerable:!0,get:function(){return Y.default}});var X=r(141);Object.defineProperty(t,"IconLink",{enumerable:!0,get:function(){return X.default}});var $=r(142);Object.defineProperty(t,"IconMove",{enumerable:!0,get:function(){return $.default}});var K=r(143);Object.defineProperty(t,"IconStatusConnected",{enumerable:!0,get:function(){return K.default}});var Q=r(144);Object.defineProperty(t,"IconStatusConnecting",{enumerable:!0,get:function(){return Q.default}});var J=r(145);Object.defineProperty(t,"IconStatusError",{enumerable:!0,get:function(){return J.default}});var ee=r(146);Object.defineProperty(t,"IconStatusOffline",{enumerable:!0,get:function(){return ee.default}});var te=r(147);Object.defineProperty(t,"IconAccount",{enumerable:!0,get:function(){return te.default}});var re=r(148);Object.defineProperty(t,"IconChevronDown",{enumerable:!0,get:function(){return re.default}});var ne=r(149);Object.defineProperty(t,"IconChevronLeft",{enumerable:!0,get:function(){return ne.default}});var le=r(150);Object.defineProperty(t,"IconChevronRight",{enumerable:!0,get:function(){return le.default}});var ae=r(151);Object.defineProperty(t,"IconChevronUp",{enumerable:!0,get:function(){return ae.default}});var oe=r(152);Object.defineProperty(t,"IconColorPicker",{enumerable:!0,get:function(){return oe.default}});var ce=r(36);Object.defineProperty(t,"IconCross",{enumerable:!0,get:function(){return ce.default}});var ie=r(153);Object.defineProperty(t,"IconElementPicker",{enumerable:!0,get:function(){return ie.default}});var ue=r(154);Object.defineProperty(t,"IconHelp",{enumerable:!0,get:function(){return ue.default}});var se=r(155);Object.defineProperty(t,"IconMaximize",{enumerable:!0,get:function(){return se.default}});var fe=r(156);Object.defineProperty(t,"IconMinimize",{enumerable:!0,get:function(){return fe.default}});var de=r(157);Object.defineProperty(t,"IconMinus",{enumerable:!0,get:function(){return de.default}});var pe=r(158);Object.defineProperty(t,"IconPen",{enumerable:!0,get:function(){return pe.default}});var me=r(159);Object.defineProperty(t,"IconPenAlt",{enumerable:!0,get:function(){return me.default}});var he=r(160);Object.defineProperty(t,"IconPlus",{enumerable:!0,get:function(){return he.default}});var ve=r(161);Object.defineProperty(t,"IconSave",{enumerable:!0,get:function(){return ve.default}});var be=r(162);Object.defineProperty(t,"IconSettings",{enumerable:!0,get:function(){return be.default}});var ge=r(163);Object.defineProperty(t,"IconTextAlignCenter",{enumerable:!0,get:function(){return ge.default}});var ye=r(164);Object.defineProperty(t,"IconTextAlignJustified",{enumerable:!0,get:function(){return ye.default}});var we=r(165);Object.defineProperty(t,"IconTextAlignLeft",{enumerable:!0,get:function(){return we.default}});var Oe=r(166);Object.defineProperty(t,"IconTextAlignRight",{enumerable:!0,get:function(){return Oe.default}});var _e=r(167);Object.defineProperty(t,"IconTrash",{enumerable:!0,get:function(){return _e.default}});var xe=r(168);Object.defineProperty(t,"Confetti",{enumerable:!0,get:function(){return xe.default}});var Me=r(169);Object.defineProperty(t,"StarkLargePurple",{enumerable:!0,get:function(){return Me.default}});var Ce=r(170);Object.defineProperty(t,"StarkLargePurpleWavy",{enumerable:!0,get:function(){return Ce.default}});var Ee=r(171);Object.defineProperty(t,"StarkSmallBlack",{enumerable:!0,get:function(){return Ee.default}});var je=r(30);Object.defineProperty(t,"Body",{enumerable:!0,get:function(){return je.default}});var Ze=r(172);Object.defineProperty(t,"Code",{enumerable:!0,get:function(){return Ze.default}});var Pe=r(173);Object.defineProperty(t,"Display",{enumerable:!0,get:function(){return Pe.default}});var ke=r(47);Object.defineProperty(t,"Headline",{enumerable:!0,get:function(){return ke.default}});var Se=r(14);Object.defineProperty(t,"Label",{enumerable:!0,get:function(){return Se.default}})},function(e,t,r){var n=r(0);function l(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function a(...e){return t=>e.forEach(e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t))}l(e.exports,"composeRefs",()=>a),l(e.exports,"useComposedRefs",()=>function(...e){return n.useCallback(a(...e),e)})},function(e,t){!function(e,t,r,n){Object.defineProperty(e,"composeEventHandlers",{get:()=>function(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(null==e||e(n),!1===r||!n.defaultPrevented)return null==t?void 0:t(n)}},set:void 0,enumerable:!0,configurable:!0})}(e.exports)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(210);Object.defineProperty(t,"AlertDialog",{enumerable:!0,get:function(){return n.AlertDialog}}),Object.defineProperty(t,"AlertDialogAction",{enumerable:!0,get:function(){return n.AlertDialogAction}}),Object.defineProperty(t,"AlertDialogCancel",{enumerable:!0,get:function(){return n.AlertDialogCancel}}),Object.defineProperty(t,"AlertDialogContent",{enumerable:!0,get:function(){return n.AlertDialogContent}}),Object.defineProperty(t,"AlertDialogDescription",{enumerable:!0,get:function(){return n.AlertDialogDescription}}),Object.defineProperty(t,"AlertDialogFooter",{enumerable:!0,get:function(){return n.AlertDialogFooter}}),Object.defineProperty(t,"AlertDialogTitle",{enumerable:!0,get:function(){return n.AlertDialogTitle}}),Object.defineProperty(t,"AlertDialogTrigger",{enumerable:!0,get:function(){return n.AlertDialogTrigger}});var l=r(217);Object.defineProperty(t,"Badge",{enumerable:!0,get:function(){return l.default}});var a=r(63);Object.defineProperty(t,"Button",{enumerable:!0,get:function(){return a.default}});var o=r(218);Object.defineProperty(t,"Link",{enumerable:!0,get:function(){return o.default}});var c=r(219);Object.defineProperty(t,"Switch",{enumerable:!0,get:function(){return c.default}});var i=r(220);Object.defineProperty(t,"SystemMessage",{enumerable:!0,get:function(){return i.default}});var u=r(221);Object.defineProperty(t,"Tabs",{enumerable:!0,get:function(){return u.Tabs}}),Object.defineProperty(t,"TabsContent",{enumerable:!0,get:function(){return u.TabsContent}}),Object.defineProperty(t,"TabsList",{enumerable:!0,get:function(){return u.TabsList}}),Object.defineProperty(t,"TabsTrigger",{enumerable:!0,get:function(){return u.TabsTrigger}});var s=r(225);Object.defineProperty(t,"Tag",{enumerable:!0,get:function(){return s.default}});var f=r(226);Object.defineProperty(t,"Toast",{enumerable:!0,get:function(){return f.default}});var d=r(227);Object.defineProperty(t,"Toggle",{enumerable:!0,get:function(){return d.default}});var p=r(228);Object.defineProperty(t,"Checkbox",{enumerable:!0,get:function(){return p.default}});var m=r(229);Object.defineProperty(t,"Input",{enumerable:!0,get:function(){return m.default}});var h=r(230);Object.defineProperty(t,"Radio",{enumerable:!0,get:function(){return h.default}});var v=r(231);Object.defineProperty(t,"RadioGroup",{enumerable:!0,get:function(){return v.default}});var b=r(232);Object.defineProperty(t,"Select",{enumerable:!0,get:function(){return b.default}});var g=r(233);Object.defineProperty(t,"Textarea",{enumerable:!0,get:function(){return g.default}});var y=r(234);Object.defineProperty(t,"IconDropdown",{enumerable:!0,get:function(){return y.default}});var w=r(64);Object.defineProperty(t,"IconDropdownContained",{enumerable:!0,get:function(){return w.default}});var O=r(235);Object.defineProperty(t,"IconExpandCollapse",{enumerable:!0,get:function(){return O.default}});var _=r(236);Object.defineProperty(t,"IconAchromatopsia",{enumerable:!0,get:function(){return _.default}});var x=r(237);Object.defineProperty(t,"IconAltText",{enumerable:!0,get:function(){return x.default}});var M=r(238);Object.defineProperty(t,"IconAriaNotes",{enumerable:!0,get:function(){return M.default}});var C=r(239);Object.defineProperty(t,"IconBlurred",{enumerable:!0,get:function(){return C.default}});var E=r(240);Object.defineProperty(t,"IconBrightLight",{enumerable:!0,get:function(){return E.default}});var j=r(241);Object.defineProperty(t,"IconContrast",{enumerable:!0,get:function(){return j.default}});var Z=r(242);Object.defineProperty(t,"IconDeuteranopia",{enumerable:!0,get:function(){return Z.default}});var P=r(243);Object.defineProperty(t,"IconFail",{enumerable:!0,get:function(){return P.default}});var k=r(244);Object.defineProperty(t,"IconFocusOrder",{enumerable:!0,get:function(){return k.default}});var S=r(245);Object.defineProperty(t,"IconGhosting",{enumerable:!0,get:function(){return S.default}});var T=r(246);Object.defineProperty(t,"IconHeadings",{enumerable:!0,get:function(){return T.default}});var N=r(247);Object.defineProperty(t,"IconIndeterminate",{enumerable:!0,get:function(){return N.default}});var I=r(248);Object.defineProperty(t,"IconLandmarks",{enumerable:!0,get:function(){return I.default}});var L=r(249);Object.defineProperty(t,"IconLossOfContrast",{enumerable:!0,get:function(){return L.default}});var B=r(250);Object.defineProperty(t,"IconPass",{enumerable:!0,get:function(){return B.default}});var R=r(251);Object.defineProperty(t,"IconProtanopia",{enumerable:!0,get:function(){return R.default}});var D=r(252);Object.defineProperty(t,"IconScan",{enumerable:!0,get:function(){return D.default}});var A=r(253);Object.defineProperty(t,"IconScore",{enumerable:!0,get:function(){return A.default}});var H=r(254);Object.defineProperty(t,"IconSidekick",{enumerable:!0,get:function(){return H.default}});var F=r(255);Object.defineProperty(t,"IconTouchTargets",{enumerable:!0,get:function(){return F.default}});var U=r(256);Object.defineProperty(t,"IconTritanopia",{enumerable:!0,get:function(){return U.default}});var V=r(257);Object.defineProperty(t,"IconTunnelVision",{enumerable:!0,get:function(){return V.default}});var z=r(258);Object.defineProperty(t,"IconTypography",{enumerable:!0,get:function(){return z.default}});var G=r(259);Object.defineProperty(t,"IconVisionSimulator",{enumerable:!0,get:function(){return G.default}});var W=r(260);Object.defineProperty(t,"IconWarn",{enumerable:!0,get:function(){return W.default}});var q=r(261);Object.defineProperty(t,"IconYellowing",{enumerable:!0,get:function(){return q.default}});var Y=r(262);Object.defineProperty(t,"IconHelpSmall",{enumerable:!0,get:function(){return Y.default}});var X=r(263);Object.defineProperty(t,"IconLink",{enumerable:!0,get:function(){return X.default}});var $=r(264);Object.defineProperty(t,"IconMove",{enumerable:!0,get:function(){return $.default}});var K=r(265);Object.defineProperty(t,"IconStatusConnected",{enumerable:!0,get:function(){return K.default}});var Q=r(266);Object.defineProperty(t,"IconStatusConnecting",{enumerable:!0,get:function(){return Q.default}});var J=r(267);Object.defineProperty(t,"IconStatusError",{enumerable:!0,get:function(){return J.default}});var ee=r(268);Object.defineProperty(t,"IconStatusOffline",{enumerable:!0,get:function(){return ee.default}});var te=r(269);Object.defineProperty(t,"IconAccount",{enumerable:!0,get:function(){return te.default}});var re=r(270);Object.defineProperty(t,"IconChevronDown",{enumerable:!0,get:function(){return re.default}});var ne=r(271);Object.defineProperty(t,"IconChevronLeft",{enumerable:!0,get:function(){return ne.default}});var le=r(272);Object.defineProperty(t,"IconChevronRight",{enumerable:!0,get:function(){return le.default}});var ae=r(273);Object.defineProperty(t,"IconChevronUp",{enumerable:!0,get:function(){return ae.default}});var oe=r(274);Object.defineProperty(t,"IconColorPicker",{enumerable:!0,get:function(){return oe.default}});var ce=r(41);Object.defineProperty(t,"IconCross",{enumerable:!0,get:function(){return ce.default}});var ie=r(275);Object.defineProperty(t,"IconElementPicker",{enumerable:!0,get:function(){return ie.default}});var ue=r(276);Object.defineProperty(t,"IconHelp",{enumerable:!0,get:function(){return ue.default}});var se=r(277);Object.defineProperty(t,"IconMaximize",{enumerable:!0,get:function(){return se.default}});var fe=r(278);Object.defineProperty(t,"IconMinimize",{enumerable:!0,get:function(){return fe.default}});var de=r(279);Object.defineProperty(t,"IconMinus",{enumerable:!0,get:function(){return de.default}});var pe=r(280);Object.defineProperty(t,"IconPen",{enumerable:!0,get:function(){return pe.default}});var me=r(281);Object.defineProperty(t,"IconPenAlt",{enumerable:!0,get:function(){return me.default}});var he=r(282);Object.defineProperty(t,"IconPlus",{enumerable:!0,get:function(){return he.default}});var ve=r(283);Object.defineProperty(t,"IconSave",{enumerable:!0,get:function(){return ve.default}});var be=r(284);Object.defineProperty(t,"IconSettings",{enumerable:!0,get:function(){return be.default}});var ge=r(285);Object.defineProperty(t,"IconTextAlignCenter",{enumerable:!0,get:function(){return ge.default}});var ye=r(286);Object.defineProperty(t,"IconTextAlignJustified",{enumerable:!0,get:function(){return ye.default}});var we=r(287);Object.defineProperty(t,"IconTextAlignLeft",{enumerable:!0,get:function(){return we.default}});var Oe=r(288);Object.defineProperty(t,"IconTextAlignRight",{enumerable:!0,get:function(){return Oe.default}});var _e=r(289);Object.defineProperty(t,"IconTrash",{enumerable:!0,get:function(){return _e.default}});var xe=r(290);Object.defineProperty(t,"Confetti",{enumerable:!0,get:function(){return xe.default}});var Me=r(291);Object.defineProperty(t,"StarkLargePurple",{enumerable:!0,get:function(){return Me.default}});var Ce=r(292);Object.defineProperty(t,"StarkLargePurpleWavy",{enumerable:!0,get:function(){return Ce.default}});var Ee=r(293);Object.defineProperty(t,"StarkSmallBlack",{enumerable:!0,get:function(){return Ee.default}});var je=r(32);Object.defineProperty(t,"Body",{enumerable:!0,get:function(){return je.default}});var Ze=r(294);Object.defineProperty(t,"Code",{enumerable:!0,get:function(){return Ze.default}});var Pe=r(295);Object.defineProperty(t,"Display",{enumerable:!0,get:function(){return Pe.default}});var ke=r(39);Object.defineProperty(t,"Headline",{enumerable:!0,get:function(){return ke.default}});var Se=r(18);Object.defineProperty(t,"Label",{enumerable:!0,get:function(){return Se.default}})},function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),l=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||t.hasOwnProperty(r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),l(r(92),t),l(r(95),t)},function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),l=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||t.hasOwnProperty(r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),l(r(82),t),l(r(83),t),l(r(84),t)},function(e,t,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&l[l.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!l||a[1]>l[0]&&a[1]0&&l[l.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!l||a[1]>l[0]&&a[1]function(e,t){const r=n.createContext(t);function l(e){const{children:t,...l}=e,a=n.useMemo(()=>l,Object.values(l));return n.createElement(r.Provider,{value:a},t)}return l.displayName=e+"Provider",[l,function(l){const a=n.useContext(r);if(a)return a;if(void 0!==t)return t;throw new Error(`\`${l}\` must be used within \`${e}\``)}]}),l(e.exports,"createContextScope",()=>function(e,t=[]){let r=[];const l=()=>{const t=r.map(e=>n.createContext(e));return function(r){const l=(null==r?void 0:r[e])||t;return n.useMemo(()=>({["__scope"+e]:{...r,[e]:l}}),[r,l])}};return l.scopeName=e,[function(t,l){const a=n.createContext(l),o=r.length;function c(t){const{scope:r,children:l,...c}=t,i=(null==r?void 0:r[e][o])||a,u=n.useMemo(()=>c,Object.values(c));return n.createElement(i.Provider,{value:u},l)}return r=[...r,l],c.displayName=t+"Provider",[c,function(r,c){const i=(null==c?void 0:c[e][o])||a,u=n.useContext(i);if(u)return u;if(void 0!==l)return l;throw new Error(`\`${r}\` must be used within \`${t}\``)}]},function(...e){const t=e[0];if(1===e.length)return t;const r=()=>{const r=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){const l=r.reduce((t,{useScope:r,scopeName:n})=>({...t,...r(e)["__scope"+n]}),{});return n.useMemo(()=>({["__scope"+t.scopeName]:l}),[l])}};return r.scopeName=t.scopeName,r}(l,...t)]})},function(e,t,r){var n=r(211),l=r(0),a=r(59),o=r(31),c=r(60),i=r(61),u=r(62),s=r(327),f=r(328),d=r(329),p=r(213),m=r(73),h=r(215),v=r(317),b=r(216),g=r(72);function y(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function w(e){return e&&e.__esModule?e.default:e}y(e.exports,"createDialogScope",()=>_),y(e.exports,"Dialog",()=>C),y(e.exports,"DialogTrigger",()=>E),y(e.exports,"DialogPortal",()=>P),y(e.exports,"DialogOverlay",()=>k),y(e.exports,"DialogContent",()=>T),y(e.exports,"DialogTitle",()=>B),y(e.exports,"DialogDescription",()=>R),y(e.exports,"DialogClose",()=>D),y(e.exports,"Root",()=>U),y(e.exports,"Trigger",()=>V),y(e.exports,"Portal",()=>z),y(e.exports,"Overlay",()=>G),y(e.exports,"Content",()=>W),y(e.exports,"Title",()=>q),y(e.exports,"Description",()=>Y),y(e.exports,"Close",()=>X),y(e.exports,"WarningProvider",()=>H);const[O,_]=c.createContextScope("Dialog"),[x,M]=O("Dialog"),C=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:a,onOpenChange:o,modal:c=!0}=e,s=l.useRef(null),f=l.useRef(null),[d=!1,p]=u.useControllableState({prop:n,defaultProp:a,onChange:o});return l.createElement(x,{scope:t,triggerRef:s,contentRef:f,contentId:i.useId(),titleId:i.useId(),descriptionId:i.useId(),open:d,onOpenChange:p,onOpenToggle:l.useCallback(()=>p(e=>!e),[p]),modal:c},r)},E=l.forwardRef((e,t)=>{const{__scopeDialog:r,...c}=e,i=M("DialogTrigger",r),u=o.useComposedRefs(t,i.triggerRef);return l.createElement(m.Primitive.button,w(n)({type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":A(i.open)},c,{ref:u,onClick:a.composeEventHandlers(e.onClick,i.onOpenToggle)}))}),[j,Z]=O("DialogPortal",{forceMount:void 0}),P=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:a}=e,o=M("DialogPortal",t);return l.createElement(j,{scope:t,forceMount:r},l.Children.map(n,e=>l.createElement(p.Presence,{present:r||o.open},l.createElement(d.Portal,{asChild:!0,container:a},e))))},k=l.forwardRef((e,t)=>{const r=Z("DialogOverlay",e.__scopeDialog),{forceMount:a=r.forceMount,...o}=e,c=M("DialogOverlay",e.__scopeDialog);return c.modal?l.createElement(p.Presence,{present:a||c.open},l.createElement(S,w(n)({},o,{ref:t}))):null}),S=l.forwardRef((e,t)=>{const{__scopeDialog:r,...a}=e,o=M("DialogOverlay",r);return l.createElement(v.RemoveScroll,{as:g.Slot,allowPinchZoom:!0,shards:[o.contentRef]},l.createElement(m.Primitive.div,w(n)({"data-state":A(o.open)},a,{ref:t,style:{pointerEvents:"auto",...a.style}})))}),T=l.forwardRef((e,t)=>{const r=Z("DialogContent",e.__scopeDialog),{forceMount:a=r.forceMount,...o}=e,c=M("DialogContent",e.__scopeDialog);return l.createElement(p.Presence,{present:a||c.open},c.modal?l.createElement(N,w(n)({},o,{ref:t})):l.createElement(I,w(n)({},o,{ref:t})))}),N=l.forwardRef((e,t)=>{const r=M("DialogContent",e.__scopeDialog),c=l.useRef(null),i=o.useComposedRefs(t,r.contentRef,c);return l.useEffect(()=>{const e=c.current;if(e)return b.hideOthers(e)},[]),l.createElement(L,w(n)({},e,{ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:a.composeEventHandlers(e.onCloseAutoFocus,e=>{var t;e.preventDefault(),null===(t=r.triggerRef.current)||void 0===t||t.focus()}),onPointerDownOutside:a.composeEventHandlers(e.onPointerDownOutside,e=>{const t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;(2===t.button||r)&&e.preventDefault()}),onFocusOutside:a.composeEventHandlers(e.onFocusOutside,e=>e.preventDefault())}))}),I=l.forwardRef((e,t)=>{const r=M("DialogContent",e.__scopeDialog),a=l.useRef(!1),o=l.useRef(!1);return l.createElement(L,w(n)({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var n,l;null===(n=e.onCloseAutoFocus)||void 0===n||n.call(e,t),t.defaultPrevented||(a.current||null===(l=r.triggerRef.current)||void 0===l||l.focus(),t.preventDefault()),a.current=!1,o.current=!1},onInteractOutside:t=>{var n,l;null===(n=e.onInteractOutside)||void 0===n||n.call(e,t),t.defaultPrevented||(a.current=!0,"pointerdown"===t.detail.originalEvent.type&&(o.current=!0));const c=t.target;(null===(l=r.triggerRef.current)||void 0===l?void 0:l.contains(c))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}}))}),L=l.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:a,onOpenAutoFocus:c,onCloseAutoFocus:i,...u}=e,d=M("DialogContent",r),p=l.useRef(null),m=o.useComposedRefs(t,p);return h.useFocusGuards(),l.createElement(l.Fragment,null,l.createElement(f.FocusScope,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:c,onUnmountAutoFocus:i},l.createElement(s.DismissableLayer,w(n)({role:"dialog",id:d.contentId,"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,"data-state":A(d.open)},u,{ref:m,onDismiss:()=>d.onOpenChange(!1)}))),!1)}),B=l.forwardRef((e,t)=>{const{__scopeDialog:r,...a}=e,o=M("DialogTitle",r);return l.createElement(m.Primitive.h2,w(n)({id:o.titleId},a,{ref:t}))}),R=l.forwardRef((e,t)=>{const{__scopeDialog:r,...a}=e,o=M("DialogDescription",r);return l.createElement(m.Primitive.p,w(n)({id:o.descriptionId},a,{ref:t}))}),D=l.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,c=M("DialogClose",r);return l.createElement(m.Primitive.button,w(n)({type:"button"},o,{ref:t,onClick:a.composeEventHandlers(e.onClick,()=>c.onOpenChange(!1))}))});function A(e){return e?"open":"closed"}const[H,F]=c.createContext("DialogTitleWarning",{contentName:"DialogContent",titleName:"DialogTitle",docsSlug:"dialog"}),U=C,V=E,z=P,G=k,W=T,q=B,Y=R,X=D},function(e,t,r){var n=r(0),l=r(38);!function(e,t,r,n){Object.defineProperty(e,"useControllableState",{get:r,set:void 0,enumerable:!0,configurable:!0})}(e.exports,0,()=>function({prop:e,defaultProp:t,onChange:r=(()=>{})}){const[a,o]=function({defaultProp:e,onChange:t}){const r=n.useState(e),[a]=r,o=n.useRef(a),c=l.useCallbackRef(t);return n.useEffect(()=>{o.current!==a&&(c(a),o.current=a)},[a,o,c]),r}({defaultProp:t,onChange:r}),c=void 0!==e,i=c?e:a,u=l.useCallbackRef(r);return[i,n.useCallback(t=>{if(c){const r=t,n="function"==typeof t?r(e):t;n!==e&&u(n)}else o(t)},[c,e,o,u])]})},function(e,t,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;rO),m(e.exports,"RovingFocusGroup",()=>M),m(e.exports,"RovingFocusGroupItem",()=>E),m(e.exports,"Root",()=>P),m(e.exports,"Item",()=>k);const v={bubbles:!1,cancelable:!0},[b,g,y]=o.createCollection("RovingFocusGroup"),[w,O]=i.createContextScope("RovingFocusGroup",[y]),[_,x]=w("RovingFocusGroup"),M=l.forwardRef((e,t)=>l.createElement(b.Provider,{scope:e.__scopeRovingFocusGroup},l.createElement(b.Slot,{scope:e.__scopeRovingFocusGroup},l.createElement(C,h(n)({},e,{ref:t}))))),C=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:o,loop:i=!1,dir:u,currentTabStopId:m,defaultCurrentTabStopId:b,onCurrentTabStopIdChange:y,onEntryFocus:w,...O}=e,x=l.useRef(null),M=c.useComposedRefs(t,x),C=p.useDirection(u),[E=null,j]=d.useControllableState({prop:m,defaultProp:b,onChange:y}),[P,k]=l.useState(!1),S=f.useCallbackRef(w),T=g(r),N=l.useRef(!1),[I,L]=l.useState(0);return l.useEffect(()=>{const e=x.current;if(e)return e.addEventListener("rovingFocusGroup.onEntryFocus",S),()=>e.removeEventListener("rovingFocusGroup.onEntryFocus",S)},[S]),l.createElement(_,{scope:r,orientation:o,dir:C,loop:i,currentTabStopId:E,onItemFocus:l.useCallback(e=>j(e),[j]),onItemShiftTab:l.useCallback(()=>k(!0),[]),onFocusableItemAdd:l.useCallback(()=>L(e=>e+1),[]),onFocusableItemRemove:l.useCallback(()=>L(e=>e-1),[])},l.createElement(s.Primitive.div,h(n)({tabIndex:P||0===I?-1:0,"data-orientation":o},O,{ref:M,style:{outline:"none",...e.style},onMouseDown:a.composeEventHandlers(e.onMouseDown,()=>{N.current=!0}),onFocus:a.composeEventHandlers(e.onFocus,e=>{const t=!N.current;if(e.target===e.currentTarget&&t&&!P){const t=new CustomEvent("rovingFocusGroup.onEntryFocus",v);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=T().filter(e=>e.focusable);Z([e.find(e=>e.active),e.find(e=>e.id===E),...e].filter(Boolean).map(e=>e.ref.current))}}N.current=!1}),onBlur:a.composeEventHandlers(e.onBlur,()=>k(!1))})))}),E=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:o=!0,active:c=!1,tabStopId:i,...f}=e,d=u.useId(),p=i||d,m=x("RovingFocusGroupItem",r),v=m.currentTabStopId===p,y=g(r),{onFocusableItemAdd:w,onFocusableItemRemove:O}=m;return l.useEffect(()=>{if(o)return w(),()=>O()},[o,w,O]),l.createElement(b.ItemSlot,{scope:r,id:p,focusable:o,active:c},l.createElement(s.Primitive.span,h(n)({tabIndex:v?0:-1,"data-orientation":m.orientation},f,{ref:t,onMouseDown:a.composeEventHandlers(e.onMouseDown,e=>{o?m.onItemFocus(p):e.preventDefault()}),onFocus:a.composeEventHandlers(e.onFocus,()=>m.onItemFocus(p)),onKeyDown:a.composeEventHandlers(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void m.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,r){const n=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,r);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(n)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(n)?void 0:j[n]}(e,m.orientation,m.dir);if(void 0!==t){e.preventDefault();let r=y().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)r.reverse();else if("prev"===t||"next"===t){"prev"===t&&r.reverse();const n=r.indexOf(e.currentTarget);r=m.loop?function(e,t){return e.map((r,n)=>e[(t+n)%e.length])}(r,n+1):r.slice(n+1)}setTimeout(()=>Z(r))}})})))}),j={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Z(e){const t=document.activeElement;for(const r of e){if(r===t)return;if(r.focus(),document.activeElement!==t)return}}const P=M,k=E},function(e,t,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;rfunction(e){const t=n.useRef(e);return n.useEffect(()=>{t.current=e}),n.useMemo(()=>(...e)=>{var r;return null===(r=t.current)||void 0===r?void 0:r.call(t,...e)},[])})},function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var l=Object.getOwnPropertyDescriptor(t,r);l&&("get"in l?t.__esModule:!l.writable&&!l.configurable)||(l={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,l)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),l=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),l(r(174),t),l(r(52),t),l(r(55),t),l(r(175),t),l(r(176),t),l(r(177),t),l(r(53),t),l(r(37),t),l(r(178),t),l(r(54),t),l(r(179),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URL_HELP_ACCOUNT=t.URL_HELP_TOUCH=t.URL_HELP_TYPOGRAPHY=t.URL_HELP_ALT=t.URL_HELP_VISION=t.URL_HELP_LANDMARKS=t.URL_HELP_FOCUS=t.URL_HELP_CONTRAST=t.URL_MYACCOUNT=t.URL_SIGNUP=t.URL_SUPPORT=t.URL_PRICING=t.APP_URL=t.BASE_URL=t.RETRY_TIMEOUT=void 0,t.RETRY_TIMEOUT=7500,t.BASE_URL="https://getstark.co/",t.APP_URL="https://account.getstark.co/",t.URL_PRICING=t.BASE_URL+"pricing",t.URL_SUPPORT=t.BASE_URL+"support",t.URL_SIGNUP=t.APP_URL+"sign-up",t.URL_MYACCOUNT=""+t.APP_URL,t.URL_HELP_CONTRAST=t.BASE_URL+"support/getting-started/using-the-contrast-checker#main",t.URL_HELP_FOCUS=t.BASE_URL+"support/getting-started/establishing-focus-order#main",t.URL_HELP_LANDMARKS=t.BASE_URL+"support/getting-started/using-landmarks#main",t.URL_HELP_VISION=t.BASE_URL+"support/getting-started/using-the-vision-simulator#main",t.URL_HELP_ALT=t.BASE_URL+"support/getting-started/using-alt-text#main",t.URL_HELP_TYPOGRAPHY=t.BASE_URL+"support/getting-started/using-typography#main",t.URL_HELP_TOUCH=t.BASE_URL+"support/getting-started/using-touch-targets#main",t.URL_HELP_ACCOUNT=t.BASE_URL+"support/getting-started/logging-into-plugins#main"},function(e,t,r){var n=r(0),l=r(16),a=r(31),o=r(40);!function(e,t,r,n){Object.defineProperty(e,"Presence",{get:()=>c,set:void 0,enumerable:!0,configurable:!0})}(e.exports);const c=e=>{const{present:t,children:r}=e,c=function(e){const[t,r]=n.useState(),a=n.useRef({}),c=n.useRef(e),u=n.useRef("none"),s=e?"mounted":"unmounted",[f,d]=function(e,t){return n.useReducer((e,r)=>{const n=t[e][r];return null!=n?n:e},e)}(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return n.useEffect(()=>{const e=i(a.current);u.current="mounted"===f?e:"none"},[f]),o.useLayoutEffect(()=>{const t=a.current,r=c.current;if(r!==e){const n=u.current,l=i(t);e?d("MOUNT"):"none"===l||"none"===(null==t?void 0:t.display)?d("UNMOUNT"):d(r&&n!==l?"ANIMATION_OUT":"UNMOUNT"),c.current=e}},[e,d]),o.useLayoutEffect(()=>{if(t){const e=e=>{const r=i(a.current).includes(e.animationName);e.target===t&&r&&l.flushSync(()=>d("ANIMATION_END"))},r=e=>{e.target===t&&(u.current=i(a.current))};return t.addEventListener("animationstart",r),t.addEventListener("animationcancel",e),t.addEventListener("animationend",e),()=>{t.removeEventListener("animationstart",r),t.removeEventListener("animationcancel",e),t.removeEventListener("animationend",e)}}d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:n.useCallback(e=>{e&&(a.current=getComputedStyle(e)),r(e)},[])}}(t),u="function"==typeof r?r({present:c.isPresent}):n.Children.only(r),s=a.useComposedRefs(c.ref,u.ref);return"function"==typeof r||c.isPresent?n.cloneElement(u,{ref:s}):null};function i(e){return(null==e?void 0:e.animationName)||"none"}c.displayName="Presence"},function(e,t,r){var n=r(0);!function(e,t,r,n){Object.defineProperty(e,"useLayoutEffect",{get:()=>l,set:void 0,enumerable:!0,configurable:!0})}(e.exports);const l=Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)?n.useLayoutEffect:()=>{}},function(e,t,r){var n=r(214),l=r(0),a=r(31);function o(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function c(e){return e&&e.__esModule?e.default:e}o(e.exports,"Slot",()=>i),o(e.exports,"Slottable",()=>s),o(e.exports,"Root",()=>d);const i=l.forwardRef((e,t)=>{const{children:r,...a}=e,o=l.Children.toArray(r),i=o.find(f);if(i){const e=i.props.children,r=o.map(t=>t===i?l.Children.count(e)>1?l.Children.only(null):l.isValidElement(e)?e.props.children:null:t);return l.createElement(u,c(n)({},a,{ref:t}),l.isValidElement(e)?l.cloneElement(e,void 0,r):null)}return l.createElement(u,c(n)({},a,{ref:t}),r)});i.displayName="Slot";const u=l.forwardRef((e,t)=>{const{children:r,...n}=e;return l.isValidElement(r)?l.cloneElement(r,{...function(e,t){const r={...t};for(const n in t){const l=e[n],a=t[n];/^on[A-Z]/.test(n)?l&&a?r[n]=(...e)=>{a(...e),l(...e)}:l&&(r[n]=l):"style"===n?r[n]={...l,...a}:"className"===n&&(r[n]=[l,a].filter(Boolean).join(" "))}return{...e,...r}}(n,r.props),ref:t?a.composeRefs(t,r.ref):r.ref}):l.Children.count(r)>1?l.Children.only(null):null});u.displayName="SlotClone";const s=({children:e})=>l.createElement(l.Fragment,null,e);function f(e){return l.isValidElement(e)&&e.type===s}const d=i},function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),l=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||t.hasOwnProperty(r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),l(r(93),t),l(r(94),t)},function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),l=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&n(t,e,r);return l(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});var o=a(r(0));t.default=function(e){var t=e.height,r=e.children;return o.createElement("div",{className:"item-list content-overflow overflow-auto",style:{height:t}},r)}},function(e,t,r){var n=r(0);!function(e,t,r,n){Object.defineProperty(e,"usePrevious",{get:r,set:void 0,enumerable:!0,configurable:!0})}(e.exports,0,()=>function(e){const t=n.useRef({value:e,previous:e});return n.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])})},function(e,t,r){var n=r(0),l=r(40);!function(e,t,r,n){Object.defineProperty(e,"useSize",{get:r,set:void 0,enumerable:!0,configurable:!0})}(e.exports,0,()=>function(e){const[t,r]=n.useState(void 0);return l.useLayoutEffect(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver(t=>{if(!Array.isArray(t))return;if(!t.length)return;const n=t[0];let l,a;if("borderBoxSize"in n){const e=n.borderBoxSize,t=Array.isArray(e)?e[0]:e;l=t.inlineSize,a=t.blockSize}else l=e.offsetWidth,a=e.offsetHeight;r({width:l,height:a})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}r(void 0)},[e]),t})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(35);Object.defineProperty(t,"AltTextStatus",{enumerable:!0,get:function(){return n.default}});var l=r(49);Object.defineProperty(t,"ConnectionStatus",{enumerable:!0,get:function(){return l.default}});var a=r(50);Object.defineProperty(t,"LandmarkTag",{enumerable:!0,get:function(){return a.default}});var o=r(51);Object.defineProperty(t,"Swatch",{enumerable:!0,get:function(){return o.default}});var c=r(56);Object.defineProperty(t,"ContainerItem",{enumerable:!0,get:function(){return c.default}});var i=r(26);Object.defineProperty(t,"ItemList",{enumerable:!0,get:function(){return i.default}});var u=r(57);Object.defineProperty(t,"Row",{enumerable:!0,get:function(){return u.default}});var s=r(15);Object.defineProperty(t,"TopBar",{enumerable:!0,get:function(){return s.default}});var f=r(182);Object.defineProperty(t,"WindowHeader",{enumerable:!0,get:function(){return f.default}});var d=r(183);Object.defineProperty(t,"Account",{enumerable:!0,get:function(){return d.default}});var p=r(184);Object.defineProperty(t,"AltText",{enumerable:!0,get:function(){return p.default}});var m=r(187);Object.defineProperty(t,"Contrast",{enumerable:!0,get:function(){return m.default}});var h=r(194);Object.defineProperty(t,"FocusOrder",{enumerable:!0,get:function(){return h.default}});var v=r(199);Object.defineProperty(t,"Landmarks",{enumerable:!0,get:function(){return v.default}});var b=r(202);Object.defineProperty(t,"Main",{enumerable:!0,get:function(){return b.default}});var g=r(203);Object.defineProperty(t,"Settings",{enumerable:!0,get:function(){return g.default}});var y=r(204);Object.defineProperty(t,"TouchTargets",{enumerable:!0,get:function(){return y.default}});var w=r(205);Object.defineProperty(t,"Typography",{enumerable:!0,get:function(){return w.default}});var O=r(207);Object.defineProperty(t,"VisionSimulator",{enumerable:!0,get:function(){return O.default}});var _=r(58);Object.defineProperty(t,"determineAltTextStatus",{enumerable:!0,get:function(){return _.determineAltTextStatus}}),Object.defineProperty(t,"shouldShowProFeatures",{enumerable:!0,get:function(){return _.shouldShowProFeatures}})},function(e,t,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;re.forEach(e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t))}function a(...e){return Object(n.useCallback)(l(...e),e)}},function(e,t,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;rfunction(e){const t=n.useContext(a);return e||t||"ltr"}),l(e.exports,"Provider",()=>c),l(e.exports,"DirectionProvider",()=>o);const a=n.createContext(void 0),o=e=>{const{dir:t,children:r}=e;return n.createElement(a.Provider,{value:t},r)},c=o},function(e,t,r){var n=r(0),l=r(40);!function(e,t,r,n){Object.defineProperty(e,"useId",{get:r,set:void 0,enumerable:!0,configurable:!0})}(e.exports,0,()=>function(e){const[t,r]=n.useState(a());return l.useLayoutEffect(()=>{e||r(e=>null!=e?e:String(o++))},[e]),e||(t?"radix-"+t:"")});const a=n["useId".toString()]||(()=>{});let o=0},function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),l=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&n(t,e,r);return l(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});var o=r(2),c=a(r(0));t.default=function(e){var t=e.index,r=e.status,n=void 0===r?"decorative":r;return c.createElement("div",{className:"flex"},void 0!==t&&c.createElement(o.Tag,{type:"index",className:"inline-flex h-5 items-center !rounded-l-[5px] !rounded-r-none bg-index-bg px-[5px] text-body-medium font-medium text-index-text"},"#"+(t+1)),c.createElement(o.Label,{level:"medium",className:"inline-flex h-5 items-center border border-border-divider pr-1 capitalize "+(void 0!==t?"rounded-r-[5px] rounded-l-none !border-l-0":"rounded-[5px]"),style:{color:"written"===n||"decorative"===n||"to-do"===n?"":"var(--color-destructive-300)"}},"written"===n||"decorative"===n?c.createElement("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"mx-1"},c.createElement("path",{d:"M3.89355 9.94531C4.21045 9.94531 4.45752 9.82178 4.62939 9.56396L9.65674 1.78662C9.78564 1.59326 9.83398 1.42139 9.83398 1.25488C9.83398 0.830566 9.52246 0.524414 9.0874 0.524414C8.78662 0.524414 8.604 0.631836 8.42139 0.921875L3.87207 8.12988L1.54102 5.17578C1.36377 4.95557 1.18115 4.85889 0.917969 4.85889C0.477539 4.85889 0.160645 5.17041 0.160645 5.6001C0.160645 5.78809 0.225098 5.96533 0.380859 6.15332L3.16309 9.58008C3.36719 9.83252 3.59277 9.94531 3.89355 9.94531Z",fill:"var(--color-purple-500)"})):"to-do"===n?c.createElement("svg",{width:"10",height:"2",viewBox:"0 0 10 2",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"mx-1"},c.createElement("path",{d:"M1.14355 1.82031H8.85107C9.21631 1.82031 9.5332 1.50879 9.5332 1.12744C9.5332 0.751465 9.21631 0.43457 8.85107 0.43457H1.14355C0.789062 0.43457 0.461426 0.751465 0.461426 1.12744C0.461426 1.50879 0.789062 1.82031 1.14355 1.82031Z",fill:"var(--color-gray-900)"})):c.createElement("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"mx-1"},c.createElement("path",{d:"M1.88037 11.332H10.125C11.0811 11.332 11.7041 10.6123 11.7041 9.74756C11.7041 9.48438 11.6343 9.21582 11.4946 8.96875L7.36426 1.76074C7.05811 1.23438 6.53711 0.96582 6 0.96582C5.46289 0.96582 4.93652 1.23975 4.63574 1.76074L0.505371 8.97412C0.365723 9.22119 0.295898 9.48438 0.295898 9.74756C0.295898 10.6123 0.918945 11.332 1.88037 11.332ZM2.03613 10.188C1.72998 10.188 1.52588 9.94092 1.52588 9.66162C1.52588 9.58105 1.53662 9.48438 1.58496 9.39844L5.5542 2.43213C5.65088 2.26562 5.82812 2.19043 6 2.19043C6.17188 2.19043 6.34375 2.26562 6.44043 2.4375L10.4097 9.40381C10.458 9.48975 10.4795 9.58643 10.4795 9.66162C10.4795 9.94092 10.2646 10.188 9.96387 10.188H2.03613ZM6.00537 7.54541C6.31689 7.54541 6.50488 7.36816 6.51562 7.03516L6.59619 4.59668C6.6123 4.25293 6.35449 4.01123 6 4.01123C5.63477 4.01123 5.3877 4.25293 5.40381 4.59131L5.479 7.04053C5.49512 7.36816 5.67773 7.54541 6.00537 7.54541ZM6.00537 9.3501C6.37061 9.3501 6.66602 9.09766 6.66602 8.73779C6.66602 8.37793 6.37598 8.12549 6.00537 8.12549C5.62939 8.12549 5.33398 8.3833 5.33398 8.73779C5.33398 9.09766 5.63477 9.3501 6.00537 9.3501Z",fill:"var(--color-destructive-300)"})),n))}},function(e,t,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0?{r:Number(r[1]),g:Number(r[2]),b:Number(r[3]),a:Number(r[4])}:{r:0,g:0,b:0,a:0}},t.ConvertRgbaStringToBaseRgba=function(e){var t=n.RGBA_REGEX,r=e.match(t);return r&&(null==r?void 0:r.length)>0?{r:Number(r[1])/255,g:Number(r[2])/255,b:Number(r[3])/255,a:Number(r[4])}:{r:0,g:0,b:0,a:0}},t.ConvertBaseRgbaToRgba=function(e,t){var r=e.a?e.a:1;return{r:255*e.r,g:255*e.g,b:255*e.b,a:t?255*r:r}},t.ConvertRgbaToBaseRgba=function(e,t){var r=e.a?e.a:255;return{r:e.r/255,g:e.g/255,b:e.b/255,a:t?r/255:r}},t.ConvertRgbaToHsla=function(e){var t,r=e.r/255,n=e.g/255,l=e.b/255,a=Math.max(r,n,l),o=Math.min(r,n,l),c=0,i=(a+o)/2;if(a===o)c=t=0;else{var u=a-o;switch(t=i>.5?u/(2-a-o):u/(a+o),a){case r:c=(n-l)/u+(n.5?u/(2-a-o):u/(a+o),a){case r:c=(n-l)/u+(n{t.current=e}),Object(n.useMemo)(()=>(...e)=>{var r;return null===(r=t.current)||void 0===r?void 0:r.call(t,...e)},[])}},function(e,t,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r{}},function(e,t,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;rc),i(e.exports,"Root",()=>u),i(e.exports,"dispatchDiscreteCustomEvent",()=>function(e,t){e&&l.flushSync(()=>e.dispatchEvent(t))});const c=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const n=a.forwardRef((e,n)=>{const{asChild:l,...i}=e,c=l?o.Slot:t;return a.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),a.createElement(c,function(e){return e&&e.__esModule?e.default:e}(r)({},i,{ref:n}))});return n.displayName="Primitive."+t,{...e,[t]:n}},{}),u=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(76);Object.defineProperty(t,"AlertDialog",{enumerable:!0,get:function(){return r.AlertDialog}}),Object.defineProperty(t,"AlertDialogAction",{enumerable:!0,get:function(){return r.AlertDialogAction}}),Object.defineProperty(t,"AlertDialogCancel",{enumerable:!0,get:function(){return r.AlertDialogCancel}}),Object.defineProperty(t,"AlertDialogContent",{enumerable:!0,get:function(){return r.AlertDialogContent}}),Object.defineProperty(t,"AlertDialogDescription",{enumerable:!0,get:function(){return r.AlertDialogDescription}}),Object.defineProperty(t,"AlertDialogFooter",{enumerable:!0,get:function(){return r.AlertDialogFooter}}),Object.defineProperty(t,"AlertDialogTitle",{enumerable:!0,get:function(){return r.AlertDialogTitle}}),Object.defineProperty(t,"AlertDialogTrigger",{enumerable:!0,get:function(){return r.AlertDialogTrigger}});var a=n(83);Object.defineProperty(t,"Badge",{enumerable:!0,get:function(){return a.default}});var l=n(42);Object.defineProperty(t,"Button",{enumerable:!0,get:function(){return l.default}});var o=n(84);Object.defineProperty(t,"Link",{enumerable:!0,get:function(){return o.default}});var i=n(85);Object.defineProperty(t,"Switch",{enumerable:!0,get:function(){return i.default}});var c=n(86);Object.defineProperty(t,"SystemMessage",{enumerable:!0,get:function(){return c.default}});var u=n(87);Object.defineProperty(t,"Tabs",{enumerable:!0,get:function(){return u.Tabs}}),Object.defineProperty(t,"TabsContent",{enumerable:!0,get:function(){return u.TabsContent}}),Object.defineProperty(t,"TabsList",{enumerable:!0,get:function(){return u.TabsList}}),Object.defineProperty(t,"TabsTrigger",{enumerable:!0,get:function(){return u.TabsTrigger}});var s=n(91);Object.defineProperty(t,"Tag",{enumerable:!0,get:function(){return s.default}});var f=n(92);Object.defineProperty(t,"Toast",{enumerable:!0,get:function(){return f.default}});var d=n(93);Object.defineProperty(t,"Toggle",{enumerable:!0,get:function(){return d.default}});var p=n(94);Object.defineProperty(t,"Checkbox",{enumerable:!0,get:function(){return p.default}});var m=n(95);Object.defineProperty(t,"Input",{enumerable:!0,get:function(){return m.default}});var h=n(96);Object.defineProperty(t,"Radio",{enumerable:!0,get:function(){return h.default}});var v=n(97);Object.defineProperty(t,"RadioGroup",{enumerable:!0,get:function(){return v.default}});var b=n(98);Object.defineProperty(t,"Select",{enumerable:!0,get:function(){return b.default}});var g=n(99);Object.defineProperty(t,"Textarea",{enumerable:!0,get:function(){return g.default}});var y=n(100);Object.defineProperty(t,"IconDropdown",{enumerable:!0,get:function(){return y.default}});var w=n(43);Object.defineProperty(t,"IconDropdownContained",{enumerable:!0,get:function(){return w.default}});var x=n(101);Object.defineProperty(t,"IconExpandCollapse",{enumerable:!0,get:function(){return x.default}});var E=n(102);Object.defineProperty(t,"IconAchromatopsia",{enumerable:!0,get:function(){return E.default}});var C=n(103);Object.defineProperty(t,"IconAltText",{enumerable:!0,get:function(){return C.default}});var O=n(104);Object.defineProperty(t,"IconAriaNotes",{enumerable:!0,get:function(){return O.default}});var _=n(105);Object.defineProperty(t,"IconBlurred",{enumerable:!0,get:function(){return _.default}});var M=n(106);Object.defineProperty(t,"IconBrightLight",{enumerable:!0,get:function(){return M.default}});var k=n(107);Object.defineProperty(t,"IconContrast",{enumerable:!0,get:function(){return k.default}});var j=n(108);Object.defineProperty(t,"IconDeuteranopia",{enumerable:!0,get:function(){return j.default}});var P=n(109);Object.defineProperty(t,"IconFail",{enumerable:!0,get:function(){return P.default}});var S=n(110);Object.defineProperty(t,"IconFocusOrder",{enumerable:!0,get:function(){return S.default}});var Z=n(111);Object.defineProperty(t,"IconGhosting",{enumerable:!0,get:function(){return Z.default}});var T=n(112);Object.defineProperty(t,"IconHeadings",{enumerable:!0,get:function(){return T.default}});var N=n(113);Object.defineProperty(t,"IconIndeterminate",{enumerable:!0,get:function(){return N.default}});var I=n(114);Object.defineProperty(t,"IconLandmarks",{enumerable:!0,get:function(){return I.default}});var L=n(115);Object.defineProperty(t,"IconLossOfContrast",{enumerable:!0,get:function(){return L.default}});var R=n(116);Object.defineProperty(t,"IconPass",{enumerable:!0,get:function(){return R.default}});var B=n(117);Object.defineProperty(t,"IconProtanopia",{enumerable:!0,get:function(){return B.default}});var D=n(118);Object.defineProperty(t,"IconScan",{enumerable:!0,get:function(){return D.default}});var A=n(119);Object.defineProperty(t,"IconScore",{enumerable:!0,get:function(){return A.default}});var F=n(120);Object.defineProperty(t,"IconSidekick",{enumerable:!0,get:function(){return F.default}});var H=n(121);Object.defineProperty(t,"IconTouchTargets",{enumerable:!0,get:function(){return H.default}});var U=n(122);Object.defineProperty(t,"IconTritanopia",{enumerable:!0,get:function(){return U.default}});var z=n(123);Object.defineProperty(t,"IconTunnelVision",{enumerable:!0,get:function(){return z.default}});var V=n(124);Object.defineProperty(t,"IconTypography",{enumerable:!0,get:function(){return V.default}});var G=n(125);Object.defineProperty(t,"IconVisionSimulator",{enumerable:!0,get:function(){return G.default}});var W=n(126);Object.defineProperty(t,"IconWarn",{enumerable:!0,get:function(){return W.default}});var q=n(127);Object.defineProperty(t,"IconYellowing",{enumerable:!0,get:function(){return q.default}});var Y=n(128);Object.defineProperty(t,"IconHelpSmall",{enumerable:!0,get:function(){return Y.default}});var X=n(129);Object.defineProperty(t,"IconLink",{enumerable:!0,get:function(){return X.default}});var $=n(130);Object.defineProperty(t,"IconMove",{enumerable:!0,get:function(){return $.default}});var K=n(131);Object.defineProperty(t,"IconStatusConnected",{enumerable:!0,get:function(){return K.default}});var Q=n(132);Object.defineProperty(t,"IconStatusConnecting",{enumerable:!0,get:function(){return Q.default}});var J=n(133);Object.defineProperty(t,"IconStatusError",{enumerable:!0,get:function(){return J.default}});var ee=n(134);Object.defineProperty(t,"IconStatusOffline",{enumerable:!0,get:function(){return ee.default}});var te=n(135);Object.defineProperty(t,"IconAccount",{enumerable:!0,get:function(){return te.default}});var ne=n(136);Object.defineProperty(t,"IconChevronDown",{enumerable:!0,get:function(){return ne.default}});var re=n(137);Object.defineProperty(t,"IconChevronLeft",{enumerable:!0,get:function(){return re.default}});var ae=n(138);Object.defineProperty(t,"IconChevronRight",{enumerable:!0,get:function(){return ae.default}});var le=n(139);Object.defineProperty(t,"IconChevronUp",{enumerable:!0,get:function(){return le.default}});var oe=n(140);Object.defineProperty(t,"IconColorPicker",{enumerable:!0,get:function(){return oe.default}});var ie=n(30);Object.defineProperty(t,"IconCross",{enumerable:!0,get:function(){return ie.default}});var ce=n(141);Object.defineProperty(t,"IconElementPicker",{enumerable:!0,get:function(){return ce.default}});var ue=n(142);Object.defineProperty(t,"IconHelp",{enumerable:!0,get:function(){return ue.default}});var se=n(143);Object.defineProperty(t,"IconMaximize",{enumerable:!0,get:function(){return se.default}});var fe=n(144);Object.defineProperty(t,"IconMinimize",{enumerable:!0,get:function(){return fe.default}});var de=n(145);Object.defineProperty(t,"IconMinus",{enumerable:!0,get:function(){return de.default}});var pe=n(146);Object.defineProperty(t,"IconPen",{enumerable:!0,get:function(){return pe.default}});var me=n(147);Object.defineProperty(t,"IconPenAlt",{enumerable:!0,get:function(){return me.default}});var he=n(148);Object.defineProperty(t,"IconPlus",{enumerable:!0,get:function(){return he.default}});var ve=n(149);Object.defineProperty(t,"IconSave",{enumerable:!0,get:function(){return ve.default}});var be=n(150);Object.defineProperty(t,"IconSettings",{enumerable:!0,get:function(){return be.default}});var ge=n(151);Object.defineProperty(t,"IconTextAlignCenter",{enumerable:!0,get:function(){return ge.default}});var ye=n(152);Object.defineProperty(t,"IconTextAlignJustified",{enumerable:!0,get:function(){return ye.default}});var we=n(153);Object.defineProperty(t,"IconTextAlignLeft",{enumerable:!0,get:function(){return we.default}});var xe=n(154);Object.defineProperty(t,"IconTextAlignRight",{enumerable:!0,get:function(){return xe.default}});var Ee=n(155);Object.defineProperty(t,"IconTrash",{enumerable:!0,get:function(){return Ee.default}});var Ce=n(156);Object.defineProperty(t,"Confetti",{enumerable:!0,get:function(){return Ce.default}});var Oe=n(157);Object.defineProperty(t,"StarkLargePurple",{enumerable:!0,get:function(){return Oe.default}});var _e=n(158);Object.defineProperty(t,"StarkLargePurpleWavy",{enumerable:!0,get:function(){return _e.default}});var Me=n(159);Object.defineProperty(t,"StarkSmallBlack",{enumerable:!0,get:function(){return Me.default}});var ke=n(24);Object.defineProperty(t,"Body",{enumerable:!0,get:function(){return ke.default}});var je=n(160);Object.defineProperty(t,"Code",{enumerable:!0,get:function(){return je.default}});var Pe=n(161);Object.defineProperty(t,"Display",{enumerable:!0,get:function(){return Pe.default}});var Se=n(28);Object.defineProperty(t,"Headline",{enumerable:!0,get:function(){return Se.default}});var Ze=n(15);Object.defineProperty(t,"Label",{enumerable:!0,get:function(){return Ze.default}})},function(e,t,n){var r=n(0);function a(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}function l(...e){return t=>e.forEach(e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t))}a(e.exports,"composeRefs",()=>l),a(e.exports,"useComposedRefs",()=>function(...e){return r.useCallback(l(...e),e)})},function(e,t){!function(e,t,n,r){Object.defineProperty(e,"composeEventHandlers",{get:()=>function(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}},set:void 0,enumerable:!0,configurable:!0})}(e.exports)},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),a(n(175),t),a(n(178),t)},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),a(n(65),t),a(n(66),t),a(n(67),t)},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&a[a.length-1])&&(6===l[0]||2===l[0])){o=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]0&&a[a.length-1])&&(6===l[0]||2===l[0])){o=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]function(e,t){const n=r.createContext(t);function a(e){const{children:t,...a}=e,l=r.useMemo(()=>a,Object.values(a));return r.createElement(n.Provider,{value:l},t)}return a.displayName=e+"Provider",[a,function(a){const l=r.useContext(n);if(l)return l;if(void 0!==t)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}]}),a(e.exports,"createContextScope",()=>function(e,t=[]){let n=[];const a=()=>{const t=n.map(e=>r.createContext(e));return function(n){const a=(null==n?void 0:n[e])||t;return r.useMemo(()=>({["__scope"+e]:{...n,[e]:a}}),[n,a])}};return a.scopeName=e,[function(t,a){const l=r.createContext(a),o=n.length;function i(t){const{scope:n,children:a,...i}=t,c=(null==n?void 0:n[e][o])||l,u=r.useMemo(()=>i,Object.values(i));return r.createElement(c.Provider,{value:u},a)}return n=[...n,a],i.displayName=t+"Provider",[i,function(n,i){const c=(null==i?void 0:i[e][o])||l,u=r.useContext(c);if(u)return u;if(void 0!==a)return a;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},function(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){const a=n.reduce((t,{useScope:n,scopeName:r})=>({...t,...n(e)["__scope"+r]}),{});return r.useMemo(()=>({["__scope"+t.scopeName]:a}),[a])}};return n.scopeName=t.scopeName,n}(a,...t)]})},function(e,t,n){var r=n(77),a=n(0),l=n(38),o=n(23),i=n(39),c=n(40),u=n(41),s=n(209),f=n(210),d=n(211),p=n(79),m=n(56),h=n(81),v=n(199),b=n(82),g=n(55);function y(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}function w(e){return e&&e.__esModule?e.default:e}y(e.exports,"createDialogScope",()=>E),y(e.exports,"Dialog",()=>_),y(e.exports,"DialogTrigger",()=>M),y(e.exports,"DialogPortal",()=>P),y(e.exports,"DialogOverlay",()=>S),y(e.exports,"DialogContent",()=>T),y(e.exports,"DialogTitle",()=>R),y(e.exports,"DialogDescription",()=>B),y(e.exports,"DialogClose",()=>D),y(e.exports,"Root",()=>U),y(e.exports,"Trigger",()=>z),y(e.exports,"Portal",()=>V),y(e.exports,"Overlay",()=>G),y(e.exports,"Content",()=>W),y(e.exports,"Title",()=>q),y(e.exports,"Description",()=>Y),y(e.exports,"Close",()=>X),y(e.exports,"WarningProvider",()=>F);const[x,E]=i.createContextScope("Dialog"),[C,O]=x("Dialog"),_=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:l,onOpenChange:o,modal:i=!0}=e,s=a.useRef(null),f=a.useRef(null),[d=!1,p]=u.useControllableState({prop:r,defaultProp:l,onChange:o});return a.createElement(C,{scope:t,triggerRef:s,contentRef:f,contentId:c.useId(),titleId:c.useId(),descriptionId:c.useId(),open:d,onOpenChange:p,onOpenToggle:a.useCallback(()=>p(e=>!e),[p]),modal:i},n)},M=a.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,c=O("DialogTrigger",n),u=o.useComposedRefs(t,c.triggerRef);return a.createElement(m.Primitive.button,w(r)({type:"button","aria-haspopup":"dialog","aria-expanded":c.open,"aria-controls":c.contentId,"data-state":A(c.open)},i,{ref:u,onClick:l.composeEventHandlers(e.onClick,c.onOpenToggle)}))}),[k,j]=x("DialogPortal",{forceMount:void 0}),P=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:l}=e,o=O("DialogPortal",t);return a.createElement(k,{scope:t,forceMount:n},a.Children.map(r,e=>a.createElement(p.Presence,{present:n||o.open},a.createElement(d.Portal,{asChild:!0,container:l},e))))},S=a.forwardRef((e,t)=>{const n=j("DialogOverlay",e.__scopeDialog),{forceMount:l=n.forceMount,...o}=e,i=O("DialogOverlay",e.__scopeDialog);return i.modal?a.createElement(p.Presence,{present:l||i.open},a.createElement(Z,w(r)({},o,{ref:t}))):null}),Z=a.forwardRef((e,t)=>{const{__scopeDialog:n,...l}=e,o=O("DialogOverlay",n);return a.createElement(v.RemoveScroll,{as:g.Slot,allowPinchZoom:!0,shards:[o.contentRef]},a.createElement(m.Primitive.div,w(r)({"data-state":A(o.open)},l,{ref:t,style:{pointerEvents:"auto",...l.style}})))}),T=a.forwardRef((e,t)=>{const n=j("DialogContent",e.__scopeDialog),{forceMount:l=n.forceMount,...o}=e,i=O("DialogContent",e.__scopeDialog);return a.createElement(p.Presence,{present:l||i.open},i.modal?a.createElement(N,w(r)({},o,{ref:t})):a.createElement(I,w(r)({},o,{ref:t})))}),N=a.forwardRef((e,t)=>{const n=O("DialogContent",e.__scopeDialog),i=a.useRef(null),c=o.useComposedRefs(t,n.contentRef,i);return a.useEffect(()=>{const e=i.current;if(e)return b.hideOthers(e)},[]),a.createElement(L,w(r)({},e,{ref:c,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:l.composeEventHandlers(e.onCloseAutoFocus,e=>{var t;e.preventDefault(),null===(t=n.triggerRef.current)||void 0===t||t.focus()}),onPointerDownOutside:l.composeEventHandlers(e.onPointerDownOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()}),onFocusOutside:l.composeEventHandlers(e.onFocusOutside,e=>e.preventDefault())}))}),I=a.forwardRef((e,t)=>{const n=O("DialogContent",e.__scopeDialog),l=a.useRef(!1),o=a.useRef(!1);return a.createElement(L,w(r)({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var r,a;null===(r=e.onCloseAutoFocus)||void 0===r||r.call(e,t),t.defaultPrevented||(l.current||null===(a=n.triggerRef.current)||void 0===a||a.focus(),t.preventDefault()),l.current=!1,o.current=!1},onInteractOutside:t=>{var r,a;null===(r=e.onInteractOutside)||void 0===r||r.call(e,t),t.defaultPrevented||(l.current=!0,"pointerdown"===t.detail.originalEvent.type&&(o.current=!0));const i=t.target;(null===(a=n.triggerRef.current)||void 0===a?void 0:a.contains(i))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}}))}),L=a.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:l,onOpenAutoFocus:i,onCloseAutoFocus:c,...u}=e,d=O("DialogContent",n),p=a.useRef(null),m=o.useComposedRefs(t,p);return h.useFocusGuards(),a.createElement(a.Fragment,null,a.createElement(f.FocusScope,{asChild:!0,loop:!0,trapped:l,onMountAutoFocus:i,onUnmountAutoFocus:c},a.createElement(s.DismissableLayer,w(r)({role:"dialog",id:d.contentId,"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,"data-state":A(d.open)},u,{ref:m,onDismiss:()=>d.onOpenChange(!1)}))),!1)}),R=a.forwardRef((e,t)=>{const{__scopeDialog:n,...l}=e,o=O("DialogTitle",n);return a.createElement(m.Primitive.h2,w(r)({id:o.titleId},l,{ref:t}))}),B=a.forwardRef((e,t)=>{const{__scopeDialog:n,...l}=e,o=O("DialogDescription",n);return a.createElement(m.Primitive.p,w(r)({id:o.descriptionId},l,{ref:t}))}),D=a.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=O("DialogClose",n);return a.createElement(m.Primitive.button,w(r)({type:"button"},o,{ref:t,onClick:l.composeEventHandlers(e.onClick,()=>i.onOpenChange(!1))}))});function A(e){return e?"open":"closed"}const[F,H]=i.createContext("DialogTitleWarning",{contentName:"DialogContent",titleName:"DialogTitle",docsSlug:"dialog"}),U=_,z=M,V=P,G=S,W=T,q=R,Y=B,X=D},function(e,t,n){var r=n(0),a=n(27);!function(e,t,n,r){Object.defineProperty(e,"useControllableState",{get:n,set:void 0,enumerable:!0,configurable:!0})}(e.exports,0,()=>function({prop:e,defaultProp:t,onChange:n=(()=>{})}){const[l,o]=function({defaultProp:e,onChange:t}){const n=r.useState(e),[l]=n,o=r.useRef(l),i=a.useCallbackRef(t);return r.useEffect(()=>{o.current!==l&&(i(l),o.current=l)},[l,o,i]),n}({defaultProp:t,onChange:n}),i=void 0!==e,c=i?e:l,u=a.useCallbackRef(n);return[c,r.useCallback(t=>{if(i){const n=t,r="function"==typeof t?n(e):t;r!==e&&u(r)}else o(t)},[i,e,o,u])]})},function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(62)},function(e,t,n){var r=n(88),a=n(0),l=n(38),o=n(89),i=n(23),c=n(39),u=n(40),s=n(56),f=n(27),d=n(41),p=n(90);function m(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}function h(e){return e&&e.__esModule?e.default:e}m(e.exports,"createRovingFocusGroupScope",()=>x),m(e.exports,"RovingFocusGroup",()=>O),m(e.exports,"RovingFocusGroupItem",()=>M),m(e.exports,"Root",()=>P),m(e.exports,"Item",()=>S);const v={bubbles:!1,cancelable:!0},[b,g,y]=o.createCollection("RovingFocusGroup"),[w,x]=c.createContextScope("RovingFocusGroup",[y]),[E,C]=w("RovingFocusGroup"),O=a.forwardRef((e,t)=>a.createElement(b.Provider,{scope:e.__scopeRovingFocusGroup},a.createElement(b.Slot,{scope:e.__scopeRovingFocusGroup},a.createElement(_,h(r)({},e,{ref:t}))))),_=a.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:c=!1,dir:u,currentTabStopId:m,defaultCurrentTabStopId:b,onCurrentTabStopIdChange:y,onEntryFocus:w,...x}=e,C=a.useRef(null),O=i.useComposedRefs(t,C),_=p.useDirection(u),[M=null,k]=d.useControllableState({prop:m,defaultProp:b,onChange:y}),[P,S]=a.useState(!1),Z=f.useCallbackRef(w),T=g(n),N=a.useRef(!1),[I,L]=a.useState(0);return a.useEffect(()=>{const e=C.current;if(e)return e.addEventListener("rovingFocusGroup.onEntryFocus",Z),()=>e.removeEventListener("rovingFocusGroup.onEntryFocus",Z)},[Z]),a.createElement(E,{scope:n,orientation:o,dir:_,loop:c,currentTabStopId:M,onItemFocus:a.useCallback(e=>k(e),[k]),onItemShiftTab:a.useCallback(()=>S(!0),[]),onFocusableItemAdd:a.useCallback(()=>L(e=>e+1),[]),onFocusableItemRemove:a.useCallback(()=>L(e=>e-1),[])},a.createElement(s.Primitive.div,h(r)({tabIndex:P||0===I?-1:0,"data-orientation":o},x,{ref:O,style:{outline:"none",...e.style},onMouseDown:l.composeEventHandlers(e.onMouseDown,()=>{N.current=!0}),onFocus:l.composeEventHandlers(e.onFocus,e=>{const t=!N.current;if(e.target===e.currentTarget&&t&&!P){const t=new CustomEvent("rovingFocusGroup.onEntryFocus",v);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=T().filter(e=>e.focusable);j([e.find(e=>e.active),e.find(e=>e.id===M),...e].filter(Boolean).map(e=>e.ref.current))}}N.current=!1}),onBlur:l.composeEventHandlers(e.onBlur,()=>S(!1))})))}),M=a.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:i=!1,tabStopId:c,...f}=e,d=u.useId(),p=c||d,m=C("RovingFocusGroupItem",n),v=m.currentTabStopId===p,y=g(n),{onFocusableItemAdd:w,onFocusableItemRemove:x}=m;return a.useEffect(()=>{if(o)return w(),()=>x()},[o,w,x]),a.createElement(b.ItemSlot,{scope:n,id:p,focusable:o,active:i},a.createElement(s.Primitive.span,h(r)({tabIndex:v?0:-1,"data-orientation":m.orientation},f,{ref:t,onMouseDown:l.composeEventHandlers(e.onMouseDown,e=>{o?m.onItemFocus(p):e.preventDefault()}),onFocus:l.composeEventHandlers(e.onFocus,()=>m.onItemFocus(p)),onKeyDown:l.composeEventHandlers(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void m.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,n){const r=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,n);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)?void 0:k[r]}(e,m.orientation,m.dir);if(void 0!==t){e.preventDefault();let n=y().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)n.reverse();else if("prev"===t||"next"===t){"prev"===t&&n.reverse();const r=n.indexOf(e.currentTarget);n=m.loop?function(e,t){return e.map((n,r)=>e[(t+r)%e.length])}(n,r+1):n.slice(r+1)}setTimeout(()=>j(n))}})})))}),k={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function j(e){const t=document.activeElement;for(const n of e){if(n===t)return;if(n.focus(),document.activeElement!==t)return}}const P=O,S=M},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;nfunction(e){const t=r.useRef(e);return r.useEffect(()=>{t.current=e}),r.useMemo(()=>(...e)=>{var n;return null===(n=t.current)||void 0===n?void 0:n.call(t,...e)},[])})},function(e,t,n){var r=n(0),a=n(13),l=n(23),o=n(29);!function(e,t,n,r){Object.defineProperty(e,"Presence",{get:()=>i,set:void 0,enumerable:!0,configurable:!0})}(e.exports);const i=e=>{const{present:t,children:n}=e,i=function(e){const[t,n]=r.useState(),l=r.useRef({}),i=r.useRef(e),u=r.useRef("none"),s=e?"mounted":"unmounted",[f,d]=function(e,t){return r.useReducer((e,n)=>{const r=t[e][n];return null!=r?r:e},e)}(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return r.useEffect(()=>{const e=c(l.current);u.current="mounted"===f?e:"none"},[f]),o.useLayoutEffect(()=>{const t=l.current,n=i.current;if(n!==e){const r=u.current,a=c(t);e?d("MOUNT"):"none"===a||"none"===(null==t?void 0:t.display)?d("UNMOUNT"):d(n&&r!==a?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,d]),o.useLayoutEffect(()=>{if(t){const e=e=>{const n=c(l.current).includes(e.animationName);e.target===t&&n&&a.flushSync(()=>d("ANIMATION_END"))},n=e=>{e.target===t&&(u.current=c(l.current))};return t.addEventListener("animationstart",n),t.addEventListener("animationcancel",e),t.addEventListener("animationend",e),()=>{t.removeEventListener("animationstart",n),t.removeEventListener("animationcancel",e),t.removeEventListener("animationend",e)}}d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:r.useCallback(e=>{e&&(l.current=getComputedStyle(e)),n(e)},[])}}(t),u="function"==typeof n?n({present:i.isPresent}):r.Children.only(n),s=l.useComposedRefs(i.ref,u.ref);return"function"==typeof n||i.isPresent?r.cloneElement(u,{ref:s}):null};function c(e){return(null==e?void 0:e.animationName)||"none"}i.displayName="Presence"},function(e,t,n){var r=n(0);!function(e,t,n,r){Object.defineProperty(e,"useLayoutEffect",{get:()=>a,set:void 0,enumerable:!0,configurable:!0})}(e.exports);const a=Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)?r.useLayoutEffect:()=>{}},function(e,t,n){var r=n(80),a=n(0),l=n(23);function o(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}function i(e){return e&&e.__esModule?e.default:e}o(e.exports,"Slot",()=>c),o(e.exports,"Slottable",()=>s),o(e.exports,"Root",()=>d);const c=a.forwardRef((e,t)=>{const{children:n,...l}=e,o=a.Children.toArray(n),c=o.find(f);if(c){const e=c.props.children,n=o.map(t=>t===c?a.Children.count(e)>1?a.Children.only(null):a.isValidElement(e)?e.props.children:null:t);return a.createElement(u,i(r)({},l,{ref:t}),a.isValidElement(e)?a.cloneElement(e,void 0,n):null)}return a.createElement(u,i(r)({},l,{ref:t}),n)});c.displayName="Slot";const u=a.forwardRef((e,t)=>{const{children:n,...r}=e;return a.isValidElement(n)?a.cloneElement(n,{...function(e,t){const n={...t};for(const r in t){const a=e[r],l=t[r];/^on[A-Z]/.test(r)?a&&l?n[r]=(...e)=>{l(...e),a(...e)}:a&&(n[r]=a):"style"===r?n[r]={...a,...l}:"className"===r&&(n[r]=[a,l].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props),ref:t?l.composeRefs(t,n.ref):n.ref}):a.Children.count(n)>1?a.Children.only(null):null});u.displayName="SlotClone";const s=({children:e})=>a.createElement(a.Fragment,null,e);function f(e){return a.isValidElement(e)&&e.type===s}const d=c},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),a(n(176),t),a(n(177),t)},function(e,t,n){var r=n(0);!function(e,t,n,r){Object.defineProperty(e,"usePrevious",{get:n,set:void 0,enumerable:!0,configurable:!0})}(e.exports,0,()=>function(e){const t=r.useRef({value:e,previous:e});return r.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])})},function(e,t,n){var r=n(0),a=n(29);!function(e,t,n,r){Object.defineProperty(e,"useSize",{get:n,set:void 0,enumerable:!0,configurable:!0})}(e.exports,0,()=>function(e){const[t,n]=r.useState(void 0);return a.useLayoutEffect(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver(t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let a,l;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;a=t.inlineSize,l=t.blockSize}else a=e.offsetWidth,l=e.offsetHeight;n({width:a,height:l})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)},[e]),t})},function(e,t,n){"use strict";n.r(t),n.d(t,"composeRefs",(function(){return a})),n.d(t,"useComposedRefs",(function(){return l}));var r=n(0);function a(...e){return t=>e.forEach(e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t))}function l(...e){return Object(r.useCallback)(a(...e),e)}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;nfunction(e){const t=r.useContext(l);return e||t||"ltr"}),a(e.exports,"Provider",()=>i),a(e.exports,"DirectionProvider",()=>o);const l=r.createContext(void 0),o=e=>{const{dir:t,children:n}=e;return r.createElement(l.Provider,{value:t},n)},i=o},function(e,t,n){var r=n(0),a=n(29);!function(e,t,n,r){Object.defineProperty(e,"useId",{get:n,set:void 0,enumerable:!0,configurable:!0})}(e.exports,0,()=>function(e){const[t,n]=r.useState(l());return a.useLayoutEffect(()=>{e||n(e=>null!=e?e:String(o++))},[e]),e||(t?"radix-"+t:"")});const l=r["useId".toString()]||(()=>{});let o=0},function(e,t,n){"use strict";n.r(t),n.d(t,"useCallbackRef",(function(){return a}));var r=n(0);function a(e){const t=Object(r.useRef)(e);return Object(r.useEffect)(()=>{t.current=e}),Object(r.useMemo)(()=>(...e)=>{var n;return null===(n=t.current)||void 0===n?void 0:n.call(t,...e)},[])}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0?{r:Number(n[1]),g:Number(n[2]),b:Number(n[3]),a:Number(n[4])}:{r:0,g:0,b:0,a:0}},t.ConvertRgbaStringToBaseRgba=function(e){var t=r.RGBA_REGEX,n=e.match(t);return n&&(null==n?void 0:n.length)>0?{r:Number(n[1])/255,g:Number(n[2])/255,b:Number(n[3])/255,a:Number(n[4])}:{r:0,g:0,b:0,a:0}},t.ConvertBaseRgbaToRgba=function(e,t){var n=e.a?e.a:1;return{r:255*e.r,g:255*e.g,b:255*e.b,a:t?255*n:n}},t.ConvertRgbaToBaseRgba=function(e,t){var n=e.a?e.a:255;return{r:e.r/255,g:e.g/255,b:e.b/255,a:t?n/255:n}},t.ConvertRgbaToHsla=function(e){var t,n=e.r/255,r=e.g/255,a=e.b/255,l=Math.max(n,r,a),o=Math.min(n,r,a),i=0,c=(l+o)/2;if(l===o)i=t=0;else{var u=l-o;switch(t=c>.5?u/(2-l-o):u/(l+o),l){case n:i=(r-a)/u+(r.5?u/(2-l-o):u/(l+o),l){case n:i=(r-a)/u+(r0&&l[l.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!l||a[1]>l[0]&&a[1]0?s.default.createElement("button",{className:"relative flex h-14 w-full rounded-t-lg border border-border-frame text-left transition-colors",style:{backgroundColor:i.ConvertRgbaToRgbaString(r)},"aria-label":"Show color menu",onClick:function(){return j(!E)}},v.length>0&&s.default.createElement(s.default.Fragment,null,s.default.createElement("div",{className:"mt-1 ml-1 flex h-4 w-4 items-center justify-center rounded border border-border-frame bg-base-background transition-colors group-hover:border-purple-500 group-focus:border-purple-500"},s.default.createElement(u.IconChevronDown,{className:"h-4 w-4 text-gray-900"})),E&&s.default.createElement(s.default.Fragment,null,s.default.createElement("div",{className:"absolute top-[-100px] left-0 z-10 h-screen w-screen "+w,onClick:function(){return j(!1)}}),s.default.createElement("div",{className:"absolute top-6 left-1 z-10 max-h-[354px] animate-slide-down overflow-y-auto overflow-x-hidden rounded border border-border-divider bg-base-background px-3 pt-2 pb-3 "+(o?"pointer-events-auto":"pointer-events-none")+" "+g},!o&&s.default.createElement("div",{className:"pointer-events-none absolute top-0 left-0 z-10 flex h-full w-full items-end justify-center bg-gradient-to-t from-base-background"},s.default.createElement("div",{className:"w-full p-2"},s.default.createElement(u.Body,{className:"pb-2 text-center"},s.default.createElement("strong",null,"Upgrade to Pro"),s.default.createElement("br",null),"to use this feature."),s.default.createElement(u.Button,{buttonType:"primary",isBlock:!0,className:"pointer-events-auto",onClick:m},"Upgrade"))),v.map((function(e,t){return s.default.createElement("div",null,s.default.createElement(u.Headline,{level:"title",className:""+(0!==t&&"mt-4 border-t border-t-gray-100 pt-3")},e.name),e.subgroups.map((function(e,r){return s.default.createElement(s.default.Fragment,null,""!==e.name&&s.default.createElement(u.Body,{level:"small",color:"secondary",className:"mt-2 block"},e.name),s.default.createElement("div",{className:"mt-1 grid grid-cols-[repeat(6,_24px)] gap-2 "+(""!==e.name?"mt-1":"mt-2")},e.colors.map((function(e,n){return s.default.createElement("button",{className:"h-6 w-6 rounded border border-border-frame transition-colors hover:border-purple-500 focus:border-purple-500",title:e.name,style:{backgroundColor:i.ConvertRgbaToRgbaString(e.color)},autoFocus:0===t&&0===r&&0===n,onClick:function(){return function(e){j(!1),p&&o&&p(e)}(e.color)}})}))))})))})))))):s.default.createElement("div",{className:"relative flex h-14 w-full rounded-tl-lg rounded-tr-lg border border-border-frame text-left transition-colors",style:{backgroundColor:i.ConvertRgbaToRgbaString(r)}}),s.default.createElement("div",{className:"flex h-8 min-w-0 items-center justify-between rounded-bl-lg rounded-br-lg border-b border-l border-r border-border-frame focus-within:border-purple-500"},s.default.createElement(u.Code,{className:"ml-2",style:{fontSize:"hex"===a?13:11}},x),s.default.createElement("div",{className:"group relative flex min-w-0 items-center"},s.default.createElement("select",{className:"w-8 opacity-0",value:a,onChange:function(e){d(e.target.value)}},s.default.createElement("option",{value:"hex"},"HEX"),s.default.createElement("option",{value:"rgb"},"RGB"),s.default.createElement("option",{value:"hsl"},"HSL"),s.default.createElement("option",{value:"lab"},"LAB"),s.default.createElement("option",{value:"lch"},"LCH"),s.default.createElement("option",{value:"p3"},"P3")),s.default.createElement(u.IconDropdown,{className:"pointer-events-none absolute right-1 text-gray-900 group-focus-within:text-purple-500 group-hover:text-purple-500"}))))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LightenColor=t.DarkenColor=void 0;var n=r(53),l=r(37);t.DarkenColor=function(e,t){var r=(0,l.ConvertRgbaToBaseHsla)(e);return r.l-=t,r.l<0&&(r.l=0),(0,n.ConvertBaseHslaToRgba)(r)},t.LightenColor=function(e,t){var r=(0,l.ConvertRgbaToBaseHsla)(e);return r.l+=t,r.l>1&&(r.l=1),(0,n.ConvertBaseHslaToRgba)(r)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConvertBaseHslaToRgba=void 0,t.ConvertBaseHslaToRgba=function(e){var t,r,n,l=function(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e};if(0===e.s)t=r=n=e.l;else{var a=e.l<.5?e.l*(1+e.s):e.l+e.s-e.l*e.s,o=2*e.l-a;t=l(o,a,e.h+1/3),r=l(o,a,e.h),n=l(o,a,e.h-1/3)}return{r:Math.round(255*t),g:Math.round(255*r),b:Math.round(255*n),a:e.a}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BLURRED=t.CB_ACHROLY=t.CB_ACHRO=t.CB_TRITALY=t.CB_TRITA=t.CB_DEUTERLY=t.CB_DEUTER=t.CB_PROTALY=t.CB_PROTA=t.RGBA_REGEX=void 0,t.RGBA_REGEX=/rgba?\((\d+.?\d+|\d),\s*(\d+.?\d+|\d),\s*(\d+.?\d+|\d),\s*(\d+.?\d+|\d)?\)/,t.CB_PROTA="Protanopia",t.CB_PROTALY="Protanomaly",t.CB_DEUTER="Deuteranopia",t.CB_DEUTERLY="Deuteranomaly",t.CB_TRITA="Tritanopia",t.CB_TRITALY="Tritanomaly",t.CB_ACHRO="Achromatopsia",t.CB_ACHROLY="Achromatomaly",t.BLURRED="Blurred"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GetContrastRatio=void 0,t.GetContrastRatio=function(e,t,r){var n=function(e){var t,r,n;return t=e.r/255,r=e.g/255,n=e.b/255,.2126*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))},l=(Math.max(n(e),n(t))+.05)/(Math.min(n(e),n(t))+.05);if(r){var a=String(l);if(-1!==a.indexOf(".")){var o=a.split(".");l=1===o.length?Number(a):Number(o[0]+"."+o[1].charAt(0)+o[1].charAt(1))}l=Number(l.toFixed(2))}return l}},function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),l=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&n(t,e,r);return l(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});var o=a(r(0));t.default=function(e){var t=e.children,r=e.onItemClick;return o.createElement("div",{className:"relative m-2 overflow-hidden rounded border border-border-divider py-3 px-4 transition-colors hover:border-purple-500 focus:border-purple-500 active:border-purple-500",tabIndex:0,onClick:r,onKeyPress:function(e){"Enter"===e.key&&r&&r()}},t)}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var l=r(2),a=n(r(0));t.default=function(e){var t,r=e.icon,n=e.title,o=e.badge,c=e.onClick,i=n;if("string"==typeof r)switch(r){case"contrast":t=a.default.createElement(l.IconContrast,null),i="Contrast";break;case"typography":t=a.default.createElement(l.IconTypography,null),i="Typography";break;case"alt-text":t=a.default.createElement(l.IconAltText,null),i="Alt-Text";break;case"touch-targets":t=a.default.createElement(l.IconTouchTargets,null),i="Touch Targets";break;case"focus-order":t=a.default.createElement(l.IconFocusOrder,null),i="Focus Order";break;case"landmarks":t=a.default.createElement(l.IconLandmarks,null),i="Landmarks";break;case"vision-simulator":t=a.default.createElement(l.IconVisionSimulator,null),i="Vision Simulator";break;case"headings":t=a.default.createElement(l.IconHeadings,null),i="Headings";break;case"aria-notes":t=a.default.createElement(l.IconAriaNotes,null),i="ARIA Notes";break;case"scan":t=a.default.createElement(l.IconScan,null),i="WCAG Audit"}else t=r;return a.default.createElement("div",{className:"flex h-14 items-center justify-between pl-3 pr-1 transition-colors hover:bg-gray-20 focus:bg-gray-20 [&:not(:first-child)]:border-t [&:not(:first-child)]:border-border-divider",tabIndex:0,onKeyPress:function(e){"Enter"===e.key&&c&&c()},role:"menuitem",onClick:c},a.default.createElement("div",{className:"flex h-10 w-full flex-row items-center justify-between"},a.default.createElement("div",{className:"flex items-center gap-2"},t,a.default.createElement(l.Label,{level:"large"},i)),a.default.createElement("div",{className:"flex items-center gap-2"},o,a.default.createElement(l.IconChevronRight,{className:"text-gray-900"}))))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.determineAltTextStatus=t.shouldShowProFeatures=void 0,t.shouldShowProFeatures=function(e){return e.plan.startsWith("PRO")&&"active"===e.status||"trialing"===e.status},t.determineAltTextStatus=function(e,t){var r=/\p{Emoji_Presentation}/gu;if(r.test(e))return(e.match(/([\uD800-\uDBFF][\uDC00-\uDFFF]|[\u2030-\u3300]|[\u00A9-\u00AE]|[\uFE0F])(\1){1,}/g)||[]).length>0?"repetitive emoji":(e.match(/\p{Emoji_Presentation}{2,}/gu)||[]).length>0?"dense emoji":e.length>20&&(e.match(r)||[]).length/e.length>=.1?"excessive emoji":"emoji usage";var n=e.toUpperCase();return n.indexOf("PICTURE OF")>-1||n.indexOf("SCREENSHOT OF")>-1||n.indexOf("IMAGE OF")>-1||n.indexOf("PICTURE SHOWING")>-1||n.indexOf("SCREENSHOT SHOWING")>-1||n.indexOf("IMAGE SHOWING")>-1?"redundant info":e.length>200?"character count":""===e?t?"to-do":"decorative":"written"}},function(e,t,r){"use strict";function n(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(null==e||e(n),!1===r||!n.defaultPrevented)return null==t?void 0:t(n)}}r.r(t),r.d(t,"composeEventHandlers",(function(){return n}))},function(e,t,r){"use strict";r.r(t),r.d(t,"createContext",(function(){return l})),r.d(t,"createContextScope",(function(){return a}));var n=r(0);function l(e,t){const r=Object(n.createContext)(t);function l(e){const{children:t,...l}=e,a=Object(n.useMemo)(()=>l,Object.values(l));return Object(n.createElement)(r.Provider,{value:a},t)}return l.displayName=e+"Provider",[l,function(l){const a=Object(n.useContext)(r);if(a)return a;if(void 0!==t)return t;throw new Error(`\`${l}\` must be used within \`${e}\``)}]}function a(e,t=[]){let r=[];const l=()=>{const t=r.map(e=>Object(n.createContext)(e));return function(r){const l=(null==r?void 0:r[e])||t;return Object(n.useMemo)(()=>({["__scope"+e]:{...r,[e]:l}}),[r,l])}};return l.scopeName=e,[function(t,l){const a=Object(n.createContext)(l),o=r.length;function c(t){const{scope:r,children:l,...c}=t,i=(null==r?void 0:r[e][o])||a,u=Object(n.useMemo)(()=>c,Object.values(c));return Object(n.createElement)(i.Provider,{value:u},l)}return r=[...r,l],c.displayName=t+"Provider",[c,function(r,c){const i=(null==c?void 0:c[e][o])||a,u=Object(n.useContext)(i);if(u)return u;if(void 0!==l)return l;throw new Error(`\`${r}\` must be used within \`${t}\``)}]},function(...e){const t=e[0];if(1===e.length)return t;const r=()=>{const r=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){const l=r.reduce((t,{useScope:r,scopeName:n})=>({...t,...r(e)["__scope"+n]}),{});return Object(n.useMemo)(()=>({["__scope"+t.scopeName]:l}),[l])}};return r.scopeName=t.scopeName,r}(l,...t)]}},function(e,t,r){"use strict";r.r(t),r.d(t,"useId",(function(){return c}));var n=r(0),l=r(23);const a=n["useId".toString()]||(()=>{});let o=0;function c(e){const[t,r]=n.useState(a());return Object(l.useLayoutEffect)(()=>{e||r(e=>null!=e?e:String(o++))},[e]),e||(t?"radix-"+t:"")}},function(e,t,r){"use strict";r.r(t),r.d(t,"useControllableState",(function(){return a}));var n=r(0),l=r(19);function a({prop:e,defaultProp:t,onChange:r=(()=>{})}){const[a,o]=function({defaultProp:e,onChange:t}){const r=Object(n.useState)(e),[a]=r,o=Object(n.useRef)(a),c=Object(l.useCallbackRef)(t);return Object(n.useEffect)(()=>{o.current!==a&&(c(a),o.current=a)},[a,o,c]),r}({defaultProp:t,onChange:r}),c=void 0!==e,i=c?e:a,u=Object(l.useCallbackRef)(r);return[i,Object(n.useCallback)(t=>{if(c){const r="function"==typeof t?t(e):t;r!==e&&u(r)}else o(t)},[c,e,o,u])]}},function(e,t,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&l[l.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!l||a[1]>l[0]&&a[1]=4.5?w.default.createElement(g.IconPass,null):w.default.createElement(g.IconFail,null),w.default.createElement(g.Body,{level:"large",className:"flex w-3/4 justify-between"},w.default.createElement("span",{className:"font-medium"},"AA"),w.default.createElement("span",null,"4.5:1"))),w.default.createElement("div",{className:"flex items-center gap-1"},999===l?w.default.createElement(g.IconIndeterminate,null):l>=3?w.default.createElement(g.IconPass,null):w.default.createElement(g.IconFail,null),w.default.createElement(g.Body,{level:"large",className:"flex w-3/4 justify-between"},w.default.createElement("span",{className:"font-medium"},"AA"),w.default.createElement("span",null,"3:1"))),w.default.createElement("div",{className:"flex items-center gap-1"},999===l?w.default.createElement(g.IconIndeterminate,null):l>=7?w.default.createElement(g.IconPass,null):w.default.createElement(g.IconFail,null),w.default.createElement(g.Body,{level:"large",className:"flex w-3/4 justify-between"},w.default.createElement("span",{className:"font-medium"},"AAA"),w.default.createElement("span",null,"7:1"))),w.default.createElement("div",{className:"flex items-center gap-1"},999===l?w.default.createElement(g.IconIndeterminate,null):l>=4.5?w.default.createElement(g.IconPass,null):w.default.createElement(g.IconFail,null),w.default.createElement(g.Body,{level:"large",className:"flex w-3/4 justify-between"},w.default.createElement("span",{className:"font-medium"},"AAA"),w.default.createElement("span",null,"4.5:1")))),"apca"===t&&w.default.createElement("div",n({className:"contrast__results mx-6 mt-9 grid grid-cols-2 gap-x-10 gap-y-1 rounded-lg"},o),w.default.createElement("div",{className:"flex items-center gap-x-1"},999===l?w.default.createElement(g.IconIndeterminate,null):Math.abs(l)>=15?w.default.createElement(g.IconPass,null):w.default.createElement(g.IconFail,null),w.default.createElement(g.Body,{level:"large",className:"flex w-3/4 justify-between"},w.default.createElement("span",{className:"font-medium"},"Elements"),w.default.createElement("span",null,"15"))),w.default.createElement("div",{className:"flex items-center gap-x-1"},999===l?w.default.createElement(g.IconIndeterminate,null):Math.abs(l)>=60?w.default.createElement(g.IconPass,null):w.default.createElement(g.IconFail,null),w.default.createElement(g.Body,{level:"large",className:"flex w-3/4 justify-between"},w.default.createElement("span",{className:"font-medium"},"Large text"),w.default.createElement("span",null,"60"))),w.default.createElement("div",{className:"flex items-center gap-x-1"},999===l?w.default.createElement(g.IconIndeterminate,null):Math.abs(l)>=30?w.default.createElement(g.IconPass,null):w.default.createElement(g.IconFail,null),w.default.createElement(g.Body,{level:"large",className:"flex w-3/4 justify-between"},w.default.createElement("span",{className:"font-medium"},"Any text"),w.default.createElement("span",null,"30"))),w.default.createElement("div",{className:"flex items-center gap-x-1"},999===l?w.default.createElement(g.IconIndeterminate,null):Math.abs(l)>=90?w.default.createElement(g.IconPass,null):w.default.createElement(g.IconFail,null),w.default.createElement(g.Body,{level:"large",className:"flex w-3/4 justify-between"},w.default.createElement("span",{className:"font-medium"},"Body text"),w.default.createElement("span",null,"90")))))},M=function(e){var t=e.isSelected,r=e.isFail,n=e.color,l=e.onClick;return w.default.createElement(g.Toggle,{pressed:t,className:"relative h-12 w-12 rounded transition-all hover:ring-2 hover:ring-purple-500 hover:ring-offset-2 focus:ring-2 focus:ring-purple-500 focus:ring-offset-2 group-[.contrast-error]:!pointer-events-none group-[.contrast-error]:!bg-transparent "+(t&&"!border-2 ring-2 ring-inset ring-base-background ring-offset-1"),style:{backgroundColor:n},onPressedChange:l},r&&w.default.createElement(C,{color:v.GetLuminance(v.ConvertRgbaStringToRgba(n))>.5?"black":"white"}))},C=function(e){var t=e.color;return w.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",fill:"none",viewBox:"0 0 44 44",className:"absolute top-[3px] left-[3px]"},w.default.createElement("rect",{width:"2",height:"30",x:"31.9",y:"10.7",transform:"rotate(45 31.9 10.7)",fill:t}),w.default.createElement("rect",{width:"2",height:"30",x:"33.3",y:"31.9",transform:"rotate(135 33.3 31.9)",fill:t}))},E=function(e){var t=e.backgroundColor,r=void 0===t?O:t,l=e.foregroundColor,a=void 0===l?O:l,o=e.onColorSuggestionClick,c=e.onUpdateClick,i=e.onExpandCollapseClick,s=void 0===i?function(){}:i,f=u(e,["backgroundColor","foregroundColor","onColorSuggestionClick","onUpdateClick","onExpandCollapseClick"]),d=w.useState(r),p=d[0],m=d[1],h=w.useState(a),b=h[0],y=h[1],_=w.useState(!0),x=_[0],C=_[1],E=w.useState(),j=E[0],Z=E[1],P=w.useState(0),k=P[0],S=P[1],T=w.useState(0),N=T[0],I=T[1],L=w.useState([!1,!1,!1,!1,!1]),B=L[0],R=L[1],D=w.useState([!1,!1,!1,!1,!1]),A=D[0],H=D[1],F=function(e,t,r){var n=v.ConvertRgbaStringToRgba(r);if("background"===t){S(e),m(n);var l=[];null==j||j.foregroundSuggestions.forEach((function(e){l.push(v.GetContrastRatio(n,v.ConvertRgbaStringToRgba(e))<4.5)})),H(l)}else if("foreground"===t){I(e),y(n);var a=[];null==j||j.backgroundSuggestions.forEach((function(e){a.push(v.GetContrastRatio(v.ConvertRgbaStringToRgba(e),n)<4.5)})),R(a)}o(t,n)};return w.useEffect((function(){m(r),y(a),S(0),I(0),R([!1,!1,!1,!1,!1]),H([!1,!1,!1,!1,!1]),Z(function(e,t){var r=v.GetColorSuggestions(e,t,4,.05,.1);r.unshift(v.ConvertRgbaToRgbaString(e));var n=v.GetColorSuggestions(t,e,4,.05,.1);return n.unshift(v.ConvertRgbaToRgbaString(t)),{backgroundSuggestions:r,foregroundSuggestions:n}}(r,a))}),[r,a]),w.default.createElement("section",n({className:"contrast__suggestions relative z-0 ml-2 mr-2 mt-6 animate-rotatingGradient rounded-lg py-2 px-4 before:absolute before:top-px before:right-px before:bottom-px before:left-px before:-z-10 before:rounded-lg before:bg-base-background",style:{background:"conic-gradient(from var(--a) at 50% 50%, rgba(92, 193, 131, 0.41) -37.18deg, rgba(233, 133, 53, 0.49) 39.18deg, rgba(224, 85, 52, 0.15) 116.94deg, #7662F6 196.33deg, rgba(74, 158, 244, 0.38) 259.5deg, rgba(92, 193, 131, 0.41) 322.82deg, rgba(233, 133, 53, 0.49) 399.18deg)"}},f),w.default.createElement("div",{className:"flex items-center justify-between",onClick:function(){s(),C(!x)}},w.default.createElement("div",{className:"flex items-center"},w.default.createElement(g.IconSidekick,{className:"mr-2"}),w.default.createElement(g.Headline,{level:"title"},"Suggestions")),x?w.default.createElement(g.IconChevronDown,{className:"text-gray-900"}):w.default.createElement(g.IconChevronUp,{className:"text-gray-900"})),x&&w.default.createElement(w.default.Fragment,null,w.default.createElement("div",{className:"mb-4 mt-2 grid grid-cols-5 justify-between gap-x-4 gap-y-3"},null==j?void 0:j.backgroundSuggestions.map((function(e,t){return w.default.createElement(M,{key:t,isSelected:k===t,isFail:B[t],color:e,onClick:function(){return F(t,"background",e)}})})),null==j?void 0:j.foregroundSuggestions.map((function(e,t){return w.default.createElement(M,{key:t,isSelected:N===t,isFail:A[t],color:e,onClick:function(){return F(t,"foreground",e)}})}))),w.default.createElement(g.Button,{buttonType:"secondary",size:"large",isBlock:!0,className:"mb-2 group-[.contrast-error]:pointer-events-none group-[.contrast-error]:cursor-not-allowed group-[.contrast-error]:!opacity-50",onClick:function(){c(p,b)}},"Apply suggestions")))}},function(e,t,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0){var e=document.getElementsByClassName("heading-item");e[e.length-1].scrollIntoView({behavior:"smooth",block:"end",inline:"end"})}};return d.useEffect((function(){i.postMessageToPlugin(o.WebEvs.headings_loaded,{}),window.headingsLoaded=function(e){var t=JSON.parse(e);t.artboards&&v(t.artboards)}}),[]),d.default.createElement("div",{className:"headings relative flex h-full flex-col"},d.default.createElement(u.TopBar,{leftSide:d.default.createElement(f.Label,{level:"large",className:"animate-slide-left"},"Headings"),onBackClick:t,onHelpClick:function(){i.sendUrlToSketch(o.Url.HeadingsHelp),c.trackMixpanelEvent(r,"Help clicked",{Tool:"Headings"})}}),d.default.createElement("main",{className:"flex h-full flex-col"},d.default.createElement("section",null,d.default.createElement(f.Body,{level:"medium",className:"px-4 pt-3 pb-4"},"Select any text layer to indicate its hierarchy",d.default.createElement("br",null),"and click add"),d.default.createElement("form",{className:"mb-0 flex items-end border-b border-b-border-divider pr-4 pb-4 pl-4",onSubmit:function(e){e.preventDefault()}},d.default.createElement(f.Select,{id:"headingType",label:"Heading type",hideLabel:!0,value:l,onChange:function(e){a(e.target.value)}},d.default.createElement("option",{value:"H1",id:"H1option"},"H1"),d.default.createElement("option",{value:"H2",id:"H2option"},"H2"),d.default.createElement("option",{value:"H3",id:"H3option"},"H3"),d.default.createElement("option",{value:"H4",id:"H4option"},"H4"),d.default.createElement("option",{value:"H5",id:"H5option"},"H5"),d.default.createElement("option",{value:"H6",id:"H6option"},"H6")),d.default.createElement(f.Button,{buttonType:"secondary",className:"ml-3",onClick:function(){i.postMessageToPlugin(o.WebEvs.headings_addItem,{headingType:l}),setTimeout(g,100),c.trackMixpanelEvent(r,"Heading added",{Type:l})}},"Add"))),d.default.createElement("section",{className:"h-[467px] flex-auto overflow-auto bg-gray-10"},h.map((function(e,t){return d.default.createElement(p,{key:t+"_"+e.artboardName,artboard:e,onDeleteItemClick:b})})))))};var p=function(e){var t=e.artboard,r=e.onDeleteItemClick,n=d.useState([]),l=n[0],a=n[1];return d.useEffect((function(){a(t.headings)}),[t]),d.default.createElement(u.CollapsibleItemGroup,{title:t.artboardName},l.map((function(e,t){return d.default.createElement(m,{key:t+"_"+e.layerId,level:e.level,layerId:e.layerId,layerName:e.layerName,onDeleteClick:r})})))},m=function(e){var t=e.level,r=e.layerId,n=e.layerName,l=e.onDeleteClick,a=d.useRef(null);return d.default.createElement("div",{id:r,ref:a,className:"heading-item group relative mt-2 flex items-center justify-between overflow-hidden rounded border border-border-divider py-2 px-3 transition-opacity first:mt-0",tabIndex:0},d.default.createElement("div",{className:"flex items-center gap-2"},d.default.createElement(f.Tag,{type:"index",className:"inline-flex h-5 !min-w-[26px] items-center bg-index-bg px-[5px] text-body-medium font-medium text-index-text"},t),d.default.createElement(f.Label,{color:"purple",className:"line-clamp-1"},n)),d.default.createElement("div",{className:"pointer-events-none ml-4 flex flex-nowrap opacity-0 transition-opacity group-focus-within:pointer-events-auto group-focus-within:opacity-100 group-hover:pointer-events-auto group-hover:opacity-100 group-focus:pointer-events-auto group-focus:opacity-100"},d.default.createElement(f.Button,{buttonType:"secondary-icon-only",className:"text-gray-900",onClick:function(){var e;null===(e=a.current)||void 0===e||e.classList.add("scale-y-0","!h-0","!opacity-0","border-b-none"),setTimeout((function(){l(r)}),250)},tabIndex:0},d.default.createElement(f.IconTrash,null))))}},function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),l=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return l(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});var o=r(7),c=r(8),i=r(9),u=r(10),s=r(6),f=r(29),d=r(5),p=a(r(0));t.default=function(e){var t=e.onBackClick,r=p.useContext(s.UserStateContext),n=p.useState("Aside"),l=n[0],a=n[1],f=p.useState([]),h=f[0],v=f[1],b=function(e){i.postMessageToPlugin(o.WebEvs.landmarks_deleteItem,{layerId:e})},g=function(){if(h&&h.length>0){var e=document.getElementsByClassName("landmark-item");e[e.length-1].scrollIntoView({behavior:"smooth",block:"end",inline:"end"})}};return p.useEffect((function(){i.postMessageToPlugin(o.WebEvs.landmarks_loaded,{}),window.landmarksLoaded=function(e){var t=JSON.parse(e);t.artboards&&v(t.artboards)}}),[]),p.default.createElement("div",{className:"landmarks relative flex h-full flex-col"},p.default.createElement(u.TopBar,{leftSide:p.default.createElement(d.Label,{level:"large",className:"animate-slide-left"},"Landmarks"),onBackClick:t,onHelpClick:function(){i.sendUrlToSketch(o.Url.LandmarksHelp),c.trackMixpanelEvent(r,"Help clicked",{Tool:"Landmarks"})}}),p.default.createElement("main",{className:"flex h-full flex-col"},p.default.createElement("section",null,p.default.createElement(d.Body,{level:"medium",className:"px-4 pt-3 pb-4"},"Select a section on your design then pick a landmark and click the add button."),p.default.createElement("form",{className:"mb-0 flex items-end border-b border-b-border-divider pr-4 pb-4 pl-4",onSubmit:function(e){e.preventDefault()}},p.default.createElement(d.Select,{id:"landmarkType",label:"Landmark type",hideLabel:!0,value:l,onChange:function(e){a(e.target.value)}},p.default.createElement("option",{value:"Aside",id:"Asideoption"},"Aside"),p.default.createElement("option",{value:"Footer",id:"Footeroption"},"Footer"),p.default.createElement("option",{value:"Form",id:"Formoption"},"Form"),p.default.createElement("option",{value:"Header",id:"Headeroption"},"Header"),p.default.createElement("option",{value:"Main",id:"Mainoption"},"Main"),p.default.createElement("option",{value:"Nav",id:"Navoption"},"Nav"),p.default.createElement("option",{value:"Section",id:"Sectionoption"},"Section")),p.default.createElement(d.Button,{buttonType:"secondary",className:"ml-3",onClick:function(){i.postMessageToPlugin(o.WebEvs.landmarks_addItem,{landmarkType:l}),setTimeout(g,100),c.trackMixpanelEvent(r,"Landmark added",{Type:l})}},"Add"))),p.default.createElement("section",{className:"h-[467px] flex-auto overflow-auto bg-gray-10"},h.map((function(e,t){return p.default.createElement(m,{key:t+"_"+e.artboardName,artboard:e,onDeleteItemClick:b})})))))};var m=function(e){var t=e.artboard,r=e.onDeleteItemClick,n=p.useState([]),l=n[0],a=n[1];return p.useEffect((function(){a(t.landmarks)}),[t]),p.default.createElement(u.CollapsibleItemGroup,{title:t.artboardName},l.map((function(e,t){return p.default.createElement(h,{key:t+"_"+e.layerId,type:e.type,layerId:e.layerId,layerName:e.layerName,onDeleteClick:r})})))},h=function(e){var t=e.type,r=e.layerId,n=e.layerName,l=e.onDeleteClick,a=p.useRef(null);return p.default.createElement("div",{id:r,ref:a,className:"landmark-item group relative flex h-12 items-center justify-between border-b border-b-border-divider transition-all last:border-transparent",tabIndex:0},p.default.createElement("div",{className:"flex items-center gap-2"},p.default.createElement(f.LandmarkTag,{type:t}),p.default.createElement(d.Label,null,n)),p.default.createElement("div",{className:"pointer-events-none ml-4 flex flex-nowrap opacity-0 transition-opacity group-focus-within:pointer-events-auto group-focus-within:opacity-100 group-hover:pointer-events-auto group-hover:opacity-100 group-focus:pointer-events-auto group-focus:opacity-100"},p.default.createElement(d.Button,{buttonType:"secondary-icon-only",className:"text-gray-900",onClick:function(){var e;null===(e=a.current)||void 0===e||e.classList.add("scale-y-0","!h-0","!opacity-0","border-b-none"),setTimeout((function(){l(r)}),250)},tabIndex:0},p.default.createElement(d.IconTrash,null))))}},function(e,t,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r11),o(r.showBlankState)}}}),[]),p.default.createElement("div",{className:"typography"},p.default.createElement(s.TopBar,{leftSide:p.default.createElement(d.Label,{level:"large",className:"animate-slide-left"},"Typography"),onBackClick:t,onHelpClick:function(){u.sendUrlToSketch(c.Url.TypographyHelp),i.trackMixpanelEvent(r,"Help clicked",{Tool:"Typography"})}}),p.default.createElement("main",null,p.default.createElement("div",{className:"flex items-center justify-center gap-6 border-b border-b-border-divider py-5"},p.default.createElement(d.Button,{buttonType:"primary-icon-only",className:"px-0 text-gray-900",isDisabled:a,onClick:function(){if(parseInt(g)>1){var e=parseInt(g)-1;y(e),N(e,O)}}},p.default.createElement(d.IconMinus,null)),p.default.createElement(d.Display,{className:"min-w-[158px] text-center tabular-nums"},a?"0":g+"px"),p.default.createElement(d.Button,{buttonType:"primary-icon-only",className:"px-0 text-gray-900",isDisabled:a,onClick:function(){if(parseInt(g)<999){var e=parseInt(g)+1;y(e),N(e,O)}}},p.default.createElement(d.IconPlus,null))),p.default.createElement("div",{className:"flex items-center justify-center border-b border-b-border-divider py-4 px-6"},p.default.createElement("div",{className:"tabs inline-flex h-8 w-full items-center rounded bg-tab-bg"},p.default.createElement("button",{className:"tab group my-0 mx-0.5 flex h-7 grow items-center justify-center rounded-sm border-[0.5px] py-0 px-1.5 text-gray-900 transition-all duration-200 ease-in-out "+("left"===O?"border-border-frame bg-tab-bg-active shadow-tab-selected":"border-transparent"),tabIndex:0,onClick:function(){return T("left")}},p.default.createElement(d.IconTextAlignLeft,null)),p.default.createElement("button",{className:"tab group my-0 mx-0.5 flex h-7 grow items-center justify-center rounded-sm border-[0.5px] py-0 px-1.5 text-gray-900 transition-all duration-200 ease-in-out "+("center"===O?"border-border-frame bg-tab-bg-active shadow-tab-selected":"border-transparent"),tabIndex:0,onClick:function(){return T("center")}},p.default.createElement(d.IconTextAlignCenter,null)),p.default.createElement("button",{className:"tab group my-0 mx-0.5 flex h-7 grow items-center justify-center rounded-sm border-[0.5px] py-0 px-1.5 text-gray-900 transition-all duration-200 ease-in-out "+("right"===O?"border-border-frame bg-tab-bg-active shadow-tab-selected":"border-transparent"),tabIndex:0,onClick:function(){return T("right")}},p.default.createElement(d.IconTextAlignRight,null)),p.default.createElement("button",{className:"tab group my-0 mx-0.5 flex h-7 grow items-center justify-center rounded-sm border-[0.5px] py-0 px-1.5 text-gray-900 transition-all duration-200 ease-in-out "+("justified"===O?"border-border-frame bg-tab-bg-active shadow-tab-selected":"border-transparent"),tabIndex:0,onClick:function(){return T("justified")}},p.default.createElement(d.IconTextAlignJustified,null)))),p.default.createElement("div",{className:"py-5 px-6"},p.default.createElement(d.Headline,{level:"title",className:"mb-2"},"Typography"),p.default.createElement("div",{className:"group mb-2 flex items-center"},g>11?p.default.createElement(p.default.Fragment,null,p.default.createElement(d.IconPass,null),p.default.createElement(d.Label,{level:"large",className:"ml-1.5"},"Font Size above 11px")):p.default.createElement(p.default.Fragment,null,p.default.createElement(d.IconFail,null),p.default.createElement(d.Label,{level:"large",className:"ml-1.5"},"Font Size below 12px")),p.default.createElement("div",{className:"relative ml-auto"},p.default.createElement("div",{className:"invisible absolute bottom-8 -right-[22px] min-w-[216px] rounded border border-gray-900 bg-base-background p-1 opacity-0 transition-opacity delay-700 after:absolute after:-bottom-[7px] after:right-6 after:h-3 after:w-3 after:rotate-45 after:border-b after:border-r after:border-b-gray-900 after:border-r-gray-900 after:bg-base-background group-hover:visible group-hover:opacity-100 group-focus:visible group-focus:opacity-100",role:"tooltip",id:"statusTooltip"},p.default.createElement(d.Body,{className:"relative z-10"},"Text is likely too small to be easily readable. We recommend using a font size of at least 12px.")),p.default.createElement("div",{"aria-describedby":"statusTooltip"},p.default.createElement(d.IconHelp,{height:"16",width:"16",className:"ml-auto text-gray-900"})))),p.default.createElement("div",{className:"group flex items-center"},"justified"===O||a?p.default.createElement(p.default.Fragment,null,p.default.createElement(d.IconFail,null),p.default.createElement(d.Label,{level:"large",className:"ml-1.5"},"Text Align justified")):p.default.createElement(p.default.Fragment,null,p.default.createElement(d.IconPass,null),p.default.createElement(d.Label,{level:"large",className:"ml-1.5"},"Text Align ",O.toLowerCase())),p.default.createElement("div",{className:"relative ml-auto"},p.default.createElement("div",{className:"invisible absolute bottom-8 -right-[22px] min-w-[216px] rounded border border-gray-900 bg-base-background p-1 opacity-0 transition-opacity delay-700 after:absolute after:-bottom-[7px] after:right-6 after:h-3 after:w-3 after:rotate-45 after:border-b after:border-r after:border-b-gray-900 after:border-r-gray-900 after:bg-base-background group-hover:visible group-hover:opacity-100 group-focus:visible group-focus:opacity-100",role:"tooltip",id:"statusTooltip"},p.default.createElement(d.Body,{className:"relative z-10"},"Justified text alignment negatively impacts readability. We recommend using “left” or “right”.")),p.default.createElement("div",{"aria-describedby":"statusTooltip"},p.default.createElement(d.IconHelp,{height:"16",width:"16",className:"ml-auto text-gray-900"}))))),p.default.createElement("footer",{className:"relative z-0 ml-2 mr-2 animate-rotatingGradient rounded-lg py-2 px-4 before:absolute before:top-px before:right-px before:bottom-px before:left-px before:-z-10 before:rounded-lg before:bg-base-background",style:{background:"conic-gradient(from 180deg at 50% 50%, rgba(92, 193, 131, 0.41) -37.18deg, rgba(233, 133, 53, 0.49) 39.18deg, rgba(224, 85, 52, 0.15) 116.94deg, #7662F6 196.33deg, rgba(74, 158, 244, 0.38) 259.5deg, rgba(92, 193, 131, 0.41) 322.82deg, rgba(233, 133, 53, 0.49) 399.18deg)"}},p.default.createElement("div",{className:"flex items-center justify-between",onClick:function(){C(!M),u.postMessageToPlugin(c.WebEvs.typography_expandCollapseClick,{})}},p.default.createElement("div",{className:"flex items-center"},p.default.createElement(d.IconSidekick,{className:"mr-2"}),p.default.createElement(d.Headline,{level:"title"},"Suggestion")),M?p.default.createElement(d.IconChevronDown,{className:"text-gray-900"}):p.default.createElement(d.IconChevronUp,{className:"text-gray-900"})),M&&p.default.createElement(p.default.Fragment,null,p.default.createElement("div",{className:"mb-4 mt-2 flex gap-2"},g<12&&g>0&&p.default.createElement("div",{className:"grow rounded-lg border border-border-divider py-2 px-3 "+(j?"ring-2 ring-purple-500":""),role:"button",tabIndex:0,onKeyPress:function(e){"Enter"===e.key&&Z(!j)},onClick:function(){return Z(!j)}},p.default.createElement(d.Body,{color:"secondary"},"Font Size"),p.default.createElement(d.Body,{color:"secondary"},"12px")),"justified"===O&&p.default.createElement("div",{className:"grow rounded-lg border border-border-divider py-2 px-3 "+(k?"ring-2 ring-purple-500":""),role:"button",tabIndex:0,onKeyPress:function(e){"Enter"===e.key&&S(!k)},onClick:function(){return S(!k)}},p.default.createElement(d.Body,{color:"secondary"},"Text Align"),p.default.createElement(d.Body,{color:"secondary"},"Left")),(a||g>11&&"JUSTIFIED"!==O)&&p.default.createElement("div",{className:"flex h-[58px] grow items-center justify-center rounded-lg border border-border-divider py-2 px-3"},p.default.createElement(d.Body,{level:"medium",color:"secondary"},a?"Select a layer to get suggestions.":"Looks good! Nothing to suggest."))),p.default.createElement(d.Button,{buttonType:"secondary",size:"large",isBlock:!0,isDisabled:g>11&&"justified"!==O||a,className:"mb-2",onClick:function(){var e=j?12:g,t=k?"left":O;y(e),_(t),v(n(n({},h),{size:e,alignment:t})),u.postMessageToPlugin(c.WebEvs.typography_applyTypographyChange,{layerId:h.layerId,fontSize:e,alignment:t}),i.trackMixpanelEvent(r,"Typography suggestion inserted",{Size:e,Alignment:t})}},"Apply suggestion")))))}},function(e,t,r){"use strict";function n(){return(n=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{__scopeRadio:r,name:c,checked:u=!1,required:s,disabled:f,value:d="on",onCheck:p,...m}=e,[h,v]=Object(l.useState)(null),g=Object(o.useComposedRefs)(t,e=>v(e)),y=Object(l.useRef)(!1),w=!h||Boolean(h.closest("form"));return Object(l.createElement)(b,{scope:r,checked:u,disabled:f},Object(l.createElement)(i.Primitive.button,n({type:"button",role:"radio","aria-checked":u,"data-state":_(u),"data-disabled":f?"":void 0,disabled:f,value:d},m,{ref:g,onClick:Object(a.composeEventHandlers)(e.onClick,e=>{u||null==p||p(),w&&(y.current=e.isPropagationStopped(),y.current||e.stopPropagation())})})),w&&Object(l.createElement)(O,{control:h,bubbles:!y.current,name:c,value:d,checked:u,required:s,disabled:f,style:{transform:"translateX(-100%)"}}))}),w=Object(l.forwardRef)((e,t)=>{const{__scopeRadio:r,forceMount:a,...o}=e,c=g("RadioIndicator",r);return Object(l.createElement)(m.Presence,{present:a||c.checked},Object(l.createElement)(i.Primitive.span,n({"data-state":_(c.checked),"data-disabled":c.disabled?"":void 0},o,{ref:t})))}),O=e=>{const{control:t,checked:r,bubbles:a=!0,...o}=e,c=Object(l.useRef)(null),i=Object(p.usePrevious)(r),u=Object(d.useSize)(t);return Object(l.useEffect)(()=>{const e=c.current,t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set;if(i!==r&&n){const t=new Event("click",{bubbles:a});n.call(e,r),e.dispatchEvent(t)}},[i,r,a]),Object(l.createElement)("input",n({type:"radio","aria-hidden":!0,defaultChecked:r},o,{tabIndex:-1,ref:c,style:{...e.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function _(e){return e?"checked":"unchecked"}const x=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],[M,C]=Object(c.createContextScope)("RadioGroup",[u.createRovingFocusGroupScope,v]),E=Object(u.createRovingFocusGroupScope)(),j=v(),[Z,P]=M("RadioGroup"),k=Object(l.forwardRef)((e,t)=>{const{__scopeRadioGroup:r,name:a,defaultValue:o,value:c,required:d=!1,disabled:p=!1,orientation:m,dir:h,loop:v=!0,onValueChange:b,...g}=e,y=E(r),w=Object(f.useDirection)(h),[O,_]=Object(s.useControllableState)({prop:c,defaultProp:o,onChange:b});return Object(l.createElement)(Z,{scope:r,name:a,required:d,disabled:p,value:O,onValueChange:_},Object(l.createElement)(u.Root,n({asChild:!0},y,{orientation:m,dir:w,loop:v}),Object(l.createElement)(i.Primitive.div,n({role:"radiogroup","aria-required":d,"aria-orientation":m,"data-disabled":p?"":void 0,dir:w},g,{ref:t}))))}),S=Object(l.forwardRef)((e,t)=>{const{__scopeRadioGroup:r,disabled:c,...i}=e,s=P("RadioGroupItem",r),f=s.disabled||c,d=E(r),p=j(r),m=Object(l.useRef)(null),h=Object(o.useComposedRefs)(t,m),v=s.value===i.value,b=Object(l.useRef)(!1);return Object(l.useEffect)(()=>{const e=e=>{x.includes(e.key)&&(b.current=!0)},t=()=>b.current=!1;return document.addEventListener("keydown",e),document.addEventListener("keyup",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)}},[]),Object(l.createElement)(u.Item,n({asChild:!0},d,{focusable:!f,active:v}),Object(l.createElement)(y,n({disabled:f,required:s.required,checked:v},p,i,{name:s.name,ref:h,onCheck:()=>s.onValueChange(i.value),onKeyDown:Object(a.composeEventHandlers)(e=>{"Enter"===e.key&&e.preventDefault()}),onFocus:Object(a.composeEventHandlers)(i.onFocus,()=>{var e;b.current&&(null===(e=m.current)||void 0===e||e.click())})})))}),T=Object(l.forwardRef)((e,t)=>{const{__scopeRadioGroup:r,...a}=e,o=j(r);return Object(l.createElement)(w,n({},o,a,{ref:t}))}),N=k,I=S,L=T},function(e,t,r){"use strict";function n(){return(n=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{children:r,...a}=e,o=l.Children.toArray(r),i=o.find(u);if(i){const e=i.props.children,r=o.map(t=>t===i?l.Children.count(e)>1?l.Children.only(null):Object(l.isValidElement)(e)?e.props.children:null:t);return Object(l.createElement)(c,n({},a,{ref:t}),Object(l.isValidElement)(e)?Object(l.cloneElement)(e,void 0,r):null)}return Object(l.createElement)(c,n({},a,{ref:t}),r)});o.displayName="Slot";const c=Object(l.forwardRef)((e,t)=>{const{children:r,...n}=e;return Object(l.isValidElement)(r)?Object(l.cloneElement)(r,{...function(e,t){const r={...t};for(const n in t){const l=e[n],a=t[n];/^on[A-Z]/.test(n)?l&&a?r[n]=(...e)=>{a(...e),l(...e)}:l&&(r[n]=l):"style"===n?r[n]={...l,...a}:"className"===n&&(r[n]=[l,a].filter(Boolean).join(" "))}return{...e,...r}}(n,r.props),ref:t?Object(a.composeRefs)(t,r.ref):r.ref}):l.Children.count(r)>1?l.Children.only(null):null});c.displayName="SlotClone";const i=({children:e})=>Object(l.createElement)(l.Fragment,null,e);function u(e){return Object(l.isValidElement)(e)&&e.type===i}const s=o},function(e,t,r){"use strict";function n(){return(n=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const r=Object(l.forwardRef)((e,r)=>{const{asChild:a,...c}=e,i=a?o.Slot:t;return Object(l.useEffect)(()=>{window[Symbol.for("radix-ui")]=!0},[]),Object(l.createElement)(i,n({},c,{ref:r}))});return r.displayName="Primitive."+t,{...e,[t]:r}},{});function i(e,t){e&&Object(a.flushSync)(()=>e.dispatchEvent(t))}const u=c},function(e,t,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;rfunction(e,t=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const r=l.useCallbackRef(e);n.useEffect(()=>{const e=e=>{"Escape"===e.key&&r(e)};return t.addEventListener("keydown",e),()=>t.removeEventListener("keydown",e)},[r,t])})},function(e,t,r){"use strict";r.r(t);var n=r(0),l=r.n(n),a=r(16),o=r(74),c=r.n(o),i=r(6);r(312),document.addEventListener("contextmenu",(function(e){return e.preventDefault()})),window.prepareFirstLoad=function(e){Object(a.render)(l.a.createElement(i.UserDataProvider,null,l.a.createElement(i.AppSettingsProvider,null,l.a.createElement(c.a,e))),document.getElementById("react-page"))}},,function(e,t,r){"use strict"; +*/var r=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,o,i=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),c=1;ca,Object.values(a));return Object(r.createElement)(n.Provider,{value:l},t)}return a.displayName=e+"Provider",[a,function(a){const l=Object(r.useContext)(n);if(l)return l;if(void 0!==t)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}]}function l(e,t=[]){let n=[];const a=()=>{const t=n.map(e=>Object(r.createContext)(e));return function(n){const a=(null==n?void 0:n[e])||t;return Object(r.useMemo)(()=>({["__scope"+e]:{...n,[e]:a}}),[n,a])}};return a.scopeName=e,[function(t,a){const l=Object(r.createContext)(a),o=n.length;function i(t){const{scope:n,children:a,...i}=t,c=(null==n?void 0:n[e][o])||l,u=Object(r.useMemo)(()=>i,Object.values(i));return Object(r.createElement)(c.Provider,{value:u},a)}return n=[...n,a],i.displayName=t+"Provider",[i,function(n,i){const c=(null==i?void 0:i[e][o])||l,u=Object(r.useContext)(c);if(u)return u;if(void 0!==a)return a;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},function(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){const a=n.reduce((t,{useScope:n,scopeName:r})=>({...t,...n(e)["__scope"+r]}),{});return Object(r.useMemo)(()=>({["__scope"+t.scopeName]:a}),[a])}};return n.scopeName=t.scopeName,n}(a,...t)]}},function(e,t,n){"use strict";n.r(t),n.d(t,"useId",(function(){return i}));var r=n(0),a=n(18);const l=r["useId".toString()]||(()=>{});let o=0;function i(e){const[t,n]=r.useState(l());return Object(a.useLayoutEffect)(()=>{e||n(e=>null!=e?e:String(o++))},[e]),e||(t?"radix-"+t:"")}},function(e,t,n){"use strict";n.r(t),n.d(t,"useControllableState",(function(){return l}));var r=n(0),a=n(16);function l({prop:e,defaultProp:t,onChange:n=(()=>{})}){const[l,o]=function({defaultProp:e,onChange:t}){const n=Object(r.useState)(e),[l]=n,o=Object(r.useRef)(l),i=Object(a.useCallbackRef)(t);return Object(r.useEffect)(()=>{o.current!==l&&(i(l),o.current=l)},[l,o,i]),n}({defaultProp:t,onChange:n}),i=void 0!==e,c=i?e:l,u=Object(a.useCallbackRef)(n);return[c,Object(r.useCallback)(t=>{if(i){const n="function"==typeof t?t(e):t;n!==e&&u(n)}else o(t)},[i,e,o,u])]}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n1&&(n.l=1),(0,r.ConvertBaseHslaToRgba)(n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConvertBaseHslaToRgba=void 0,t.ConvertBaseHslaToRgba=function(e){var t,n,r,a=function(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e};if(0===e.s)t=n=r=e.l;else{var l=e.l<.5?e.l*(1+e.s):e.l+e.s-e.l*e.s,o=2*e.l-l;t=a(o,l,e.h+1/3),n=a(o,l,e.h),r=a(o,l,e.h-1/3)}return{r:Math.round(255*t),g:Math.round(255*n),b:Math.round(255*r),a:e.a}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BLURRED=t.CB_ACHROLY=t.CB_ACHRO=t.CB_TRITALY=t.CB_TRITA=t.CB_DEUTERLY=t.CB_DEUTER=t.CB_PROTALY=t.CB_PROTA=t.RGBA_REGEX=void 0,t.RGBA_REGEX=/rgba?\((\d+.?\d+|\d),\s*(\d+.?\d+|\d),\s*(\d+.?\d+|\d),\s*(\d+.?\d+|\d)?\)/,t.CB_PROTA="Protanopia",t.CB_PROTALY="Protanomaly",t.CB_DEUTER="Deuteranopia",t.CB_DEUTERLY="Deuteranomaly",t.CB_TRITA="Tritanopia",t.CB_TRITALY="Tritanomaly",t.CB_ACHRO="Achromatopsia",t.CB_ACHROLY="Achromatomaly",t.BLURRED="Blurred"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GetContrastRatio=void 0,t.GetContrastRatio=function(e,t,n){var r=function(e){var t,n,r;return t=e.r/255,n=e.g/255,r=e.b/255,.2126*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))},a=(Math.max(r(e),r(t))+.05)/(Math.min(r(e),r(t))+.05);if(n){var l=String(a);if(-1!==l.indexOf(".")){var o=l.split(".");a=1===o.length?Number(l):Number(o[0]+"."+o[1].charAt(0)+o[1].charAt(1))}a=Number(a.toFixed(2))}return a}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&a[a.length-1])&&(6===l[0]||2===l[0])){o=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]=4.5?y.default.createElement(b.IconPass,null):y.default.createElement(b.IconFail,null),y.default.createElement(b.Body,{level:"large",className:"flex w-3/4 justify-between"},y.default.createElement("span",{className:"font-medium"},"AA"),y.default.createElement("span",null,"4.5:1"))),y.default.createElement("div",{className:"flex items-center gap-1"},999===a?y.default.createElement(b.IconIndeterminate,null):a>=3?y.default.createElement(b.IconPass,null):y.default.createElement(b.IconFail,null),y.default.createElement(b.Body,{level:"large",className:"flex w-3/4 justify-between"},y.default.createElement("span",{className:"font-medium"},"AA"),y.default.createElement("span",null,"3:1"))),y.default.createElement("div",{className:"flex items-center gap-1"},999===a?y.default.createElement(b.IconIndeterminate,null):a>=7?y.default.createElement(b.IconPass,null):y.default.createElement(b.IconFail,null),y.default.createElement(b.Body,{level:"large",className:"flex w-3/4 justify-between"},y.default.createElement("span",{className:"font-medium"},"AAA"),y.default.createElement("span",null,"7:1"))),y.default.createElement("div",{className:"flex items-center gap-1"},999===a?y.default.createElement(b.IconIndeterminate,null):a>=4.5?y.default.createElement(b.IconPass,null):y.default.createElement(b.IconFail,null),y.default.createElement(b.Body,{level:"large",className:"flex w-3/4 justify-between"},y.default.createElement("span",{className:"font-medium"},"AAA"),y.default.createElement("span",null,"4.5:1")))),"apca"===t&&y.default.createElement("div",r({className:"contrast__results mx-6 mt-9 grid grid-cols-2 gap-x-10 gap-y-1 rounded-lg"},o),y.default.createElement("div",{className:"flex items-center gap-x-1"},999===a?y.default.createElement(b.IconIndeterminate,null):Math.abs(a)>=45?y.default.createElement(b.IconPass,null):y.default.createElement(b.IconFail,null),y.default.createElement(b.Body,{level:"large",className:"flex w-3/4 justify-between"},y.default.createElement("span",{className:"font-medium"},"Large text"),y.default.createElement("span",null,"45"))),y.default.createElement("div",{className:"flex items-center gap-x-1"},999===a?y.default.createElement(b.IconIndeterminate,null):Math.abs(a)>=75?y.default.createElement(b.IconPass,null):y.default.createElement(b.IconFail,null),y.default.createElement(b.Body,{level:"large",className:"flex w-3/4 justify-between"},y.default.createElement("span",{className:"font-medium"},"Body text"),y.default.createElement("span",null,"75"))),y.default.createElement("div",{className:"flex items-center gap-x-1"},999===a?y.default.createElement(b.IconIndeterminate,null):Math.abs(a)>=60?y.default.createElement(b.IconPass,null):y.default.createElement(b.IconFail,null),y.default.createElement(b.Body,{level:"large",className:"flex w-3/4 justify-between"},y.default.createElement("span",{className:"font-medium"},"Fluent text"),y.default.createElement("span",null,"60"))),y.default.createElement("div",{className:"flex items-center gap-x-1"},999===a?y.default.createElement(b.IconIndeterminate,null):Math.abs(a)>=90?y.default.createElement(b.IconPass,null):y.default.createElement(b.IconFail,null),y.default.createElement(b.Body,{level:"large",className:"flex w-3/4 justify-between"},y.default.createElement("span",{className:"font-medium"},"Preferred"),y.default.createElement("span",null,"90")))))},C=function(e){var t=e.isSelected,n=e.isFail,r=e.color,a=e.onClick;return y.default.createElement(b.Toggle,{pressed:t,className:"relative h-12 w-12 rounded transition-all hover:ring-2 hover:ring-purple-500 hover:ring-offset-2 focus:ring-2 focus:ring-purple-500 focus:ring-offset-2 group-[.contrast-error]:!pointer-events-none group-[.contrast-error]:!bg-transparent "+(t&&"!border-2 ring-2 ring-inset ring-base-background ring-offset-1"),style:{backgroundColor:r},onPressedChange:a},n&&y.default.createElement(O,{color:v.GetLuminance(v.ConvertRgbaStringToRgba(r))>.5?"black":"white"}))},O=function(e){var t=e.color;return y.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",fill:"none",viewBox:"0 0 44 44",className:"absolute top-[3px] left-[3px]"},y.default.createElement("rect",{width:"2",height:"30",x:"31.9",y:"10.7",transform:"rotate(45 31.9 10.7)",fill:t}),y.default.createElement("rect",{width:"2",height:"30",x:"33.3",y:"31.9",transform:"rotate(135 33.3 31.9)",fill:t}))},_=function(e){var t=e.backgroundColor,n=void 0===t?w:t,a=e.foregroundColor,l=void 0===a?w:a,o=e.onColorSuggestionClick,i=e.onUpdateClick,c=e.onExpandCollapseClick,s=void 0===c?function(){}:c,f=u(e,["backgroundColor","foregroundColor","onColorSuggestionClick","onUpdateClick","onExpandCollapseClick"]),d=y.useState(n),p=d[0],m=d[1],h=y.useState(l),g=h[0],x=h[1],E=y.useState(!0),O=E[0],_=E[1],M=y.useState(),k=M[0],j=M[1],P=y.useState(0),S=P[0],Z=P[1],T=y.useState(0),N=T[0],I=T[1],L=y.useState([!1,!1,!1,!1,!1]),R=L[0],B=L[1],D=y.useState([!1,!1,!1,!1,!1]),A=D[0],F=D[1],H=function(e,t,n){var r=v.ConvertRgbaStringToRgba(n);if("background"===t){Z(e),m(r);var a=[];null==k||k.foregroundSuggestions.forEach((function(e){a.push(v.GetContrastRatio(r,v.ConvertRgbaStringToRgba(e))<4.5)})),F(a)}else if("foreground"===t){I(e),x(r);var l=[];null==k||k.backgroundSuggestions.forEach((function(e){l.push(v.GetContrastRatio(v.ConvertRgbaStringToRgba(e),r)<4.5)})),B(l)}o(t,r)};return y.useEffect((function(){m(n),x(l),Z(0),I(0),B([!1,!1,!1,!1,!1]),F([!1,!1,!1,!1,!1]),j(function(e,t){var n=v.GetColorSuggestions(e,t,4,.05,.1);n.unshift(v.ConvertRgbaToRgbaString(e));var r=v.GetColorSuggestions(t,e,4,.05,.1);return r.unshift(v.ConvertRgbaToRgbaString(t)),{backgroundSuggestions:n,foregroundSuggestions:r}}(n,l))}),[n,l]),y.default.createElement("section",r({className:"contrast__suggestions relative z-0 ml-2 mr-2 mt-6 animate-rotatingGradient rounded-lg py-2 px-4 before:absolute before:top-px before:right-px before:bottom-px before:left-px before:-z-10 before:rounded-lg before:bg-base-background",style:{background:"conic-gradient(from var(--a) at 50% 50%, rgba(92, 193, 131, 0.41) -37.18deg, rgba(233, 133, 53, 0.49) 39.18deg, rgba(224, 85, 52, 0.15) 116.94deg, #7662F6 196.33deg, rgba(74, 158, 244, 0.38) 259.5deg, rgba(92, 193, 131, 0.41) 322.82deg, rgba(233, 133, 53, 0.49) 399.18deg)"}},f),y.default.createElement("div",{className:"flex items-center justify-between",onClick:function(){s(),_(!O)}},y.default.createElement("div",{className:"flex items-center"},y.default.createElement(b.IconSidekick,{className:"mr-2"}),y.default.createElement(b.Headline,{level:"title"},"Suggestions")),O?y.default.createElement(b.IconChevronDown,{className:"text-gray-900"}):y.default.createElement(b.IconChevronUp,{className:"text-gray-900"})),O&&y.default.createElement(y.default.Fragment,null,y.default.createElement("div",{className:"mb-4 mt-2 grid grid-cols-5 justify-between gap-x-4 gap-y-3"},null==k?void 0:k.backgroundSuggestions.map((function(e,t){return y.default.createElement(C,{key:t,isSelected:S===t,isFail:R[t],color:e,onClick:function(){return H(t,"background",e)}})})),null==k?void 0:k.foregroundSuggestions.map((function(e,t){return y.default.createElement(C,{key:t,isSelected:N===t,isFail:A[t],color:e,onClick:function(){return H(t,"foreground",e)}})}))),y.default.createElement(b.Button,{buttonType:"secondary",size:"large",isBlock:!0,className:"mb-2 group-[.contrast-error]:pointer-events-none group-[.contrast-error]:cursor-not-allowed group-[.contrast-error]:!opacity-50",onClick:function(){i(p,g)}},"Apply suggestions")))}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0){var e=document.getElementsByClassName("heading-item");e[e.length-1].scrollIntoView({behavior:"smooth",block:"end",inline:"end"})}};return d.useEffect((function(){c.postMessageToPlugin(o.WebEvs.headings_loaded,{}),window.headingsLoaded=function(e){var t=JSON.parse(e);t.artboards&&v(t.artboards)}}),[]),d.default.createElement("div",{className:"headings relative flex h-full flex-col"},d.default.createElement(u.TopBar,{leftSide:d.default.createElement(f.Label,{level:"large",className:"animate-slide-left"},"Headings"),onBackClick:t,onHelpClick:function(){c.sendUrlToSketch(o.Url.HeadingsHelp),i.trackMixpanelEvent(n,"Help clicked",{Tool:"Headings"})}}),d.default.createElement("main",{className:"flex h-full flex-col"},d.default.createElement("section",null,d.default.createElement(f.Body,{level:"medium",className:"px-4 pt-3 pb-4"},"Select any text layer to indicate its hierarchy",d.default.createElement("br",null),"and click add"),d.default.createElement("form",{className:"mb-0 flex items-end border-b border-b-border-divider pr-4 pb-4 pl-4",onSubmit:function(e){e.preventDefault()}},d.default.createElement(f.Select,{id:"headingType",label:"Heading type",hideLabel:!0,value:a,onChange:function(e){l(e.target.value)}},d.default.createElement("option",{value:"H1",id:"H1option"},"H1"),d.default.createElement("option",{value:"H2",id:"H2option"},"H2"),d.default.createElement("option",{value:"H3",id:"H3option"},"H3"),d.default.createElement("option",{value:"H4",id:"H4option"},"H4"),d.default.createElement("option",{value:"H5",id:"H5option"},"H5"),d.default.createElement("option",{value:"H6",id:"H6option"},"H6")),d.default.createElement(f.Button,{buttonType:"secondary",className:"ml-3",onClick:function(){c.postMessageToPlugin(o.WebEvs.headings_addItem,{headingType:a}),setTimeout(g,100),i.trackMixpanelEvent(n,"Heading added",{Type:a})}},"Add"))),d.default.createElement("section",{className:"h-[467px] flex-auto overflow-auto bg-gray-10"},h.map((function(e,t){return d.default.createElement(p,{key:t+"_"+e.artboardName,artboard:e,onDeleteItemClick:b})})))))};var p=function(e){var t=e.artboard,n=e.onDeleteItemClick,r=d.useState([]),a=r[0],l=r[1];return d.useEffect((function(){l(t.headings)}),[t]),d.default.createElement(u.CollapsibleItemGroup,{title:t.artboardName},a.map((function(e,t){return d.default.createElement(m,{key:t+"_"+e.layerId,level:e.level,layerId:e.layerId,layerName:e.layerName,onDeleteClick:n})})))},m=function(e){var t=e.level,n=e.layerId,r=e.layerName,a=e.onDeleteClick,l=d.useRef(null);return d.default.createElement("div",{id:n,ref:l,className:"heading-item group relative mt-2 flex items-center justify-between overflow-hidden rounded border border-border-divider py-2 px-3 transition-opacity first:mt-0",tabIndex:0},d.default.createElement("div",{className:"flex items-center gap-2"},d.default.createElement(f.Tag,{type:"index",className:"inline-flex h-5 !min-w-[26px] items-center bg-index-bg px-[5px] text-body-medium font-medium text-index-text"},t),d.default.createElement(f.Label,{color:"purple",className:"line-clamp-1"},r)),d.default.createElement("div",{className:"pointer-events-none ml-4 flex flex-nowrap opacity-0 transition-opacity group-focus-within:pointer-events-auto group-focus-within:opacity-100 group-hover:pointer-events-auto group-hover:opacity-100 group-focus:pointer-events-auto group-focus:opacity-100"},d.default.createElement(f.Button,{buttonType:"secondary-icon-only",className:"text-gray-900",onClick:function(){var e;null===(e=l.current)||void 0===e||e.classList.add("scale-y-0","!h-0","!opacity-0","border-b-none"),setTimeout((function(){a(n)}),250)},tabIndex:0},d.default.createElement(f.IconTrash,null))))}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),l=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.hasOwnProperty.call(e,n)&&r(t,e,n);return a(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});var o=n(6),i=n(7),c=n(9),u=n(8),s=n(5),f=n(2),d=l(n(0));t.default=function(e){var t=e.onBackClick,n=d.useContext(s.UserStateContext),r=d.useState("Aside"),a=r[0],l=r[1],m=d.useState([]),h=m[0],v=m[1],b=function(e){c.postMessageToPlugin(o.WebEvs.landmarks_deleteItem,{layerId:e})},g=function(){if(h&&h.length>0){var e=document.getElementsByClassName("landmark-item");e[e.length-1].scrollIntoView({behavior:"smooth",block:"end",inline:"end"})}};return d.useEffect((function(){c.postMessageToPlugin(o.WebEvs.landmarks_loaded,{}),window.landmarksLoaded=function(e){var t=JSON.parse(e);t.artboards&&v(t.artboards)}}),[]),d.default.createElement("div",{className:"landmarks relative flex h-full flex-col"},d.default.createElement(u.TopBar,{leftSide:d.default.createElement(f.Label,{level:"large",className:"animate-slide-left"},"Landmarks"),onBackClick:t,onHelpClick:function(){c.sendUrlToSketch(o.Url.LandmarksHelp),i.trackMixpanelEvent(n,"Help clicked",{Tool:"Landmarks"})}}),d.default.createElement("main",{className:"flex h-full flex-col"},d.default.createElement("section",null,d.default.createElement(f.Body,{level:"medium",className:"px-4 pt-3 pb-4"},"Select a section on your design then pick a landmark and click the add button."),d.default.createElement("form",{className:"mb-0 flex items-end border-b border-b-border-divider pr-4 pb-4 pl-4",onSubmit:function(e){e.preventDefault()}},d.default.createElement(f.Select,{id:"landmarkType",label:"Landmark type",hideLabel:!0,value:a,onChange:function(e){l(e.target.value)}},d.default.createElement("option",{value:"Aside",id:"Asideoption"},"Aside"),d.default.createElement("option",{value:"Footer",id:"Footeroption"},"Footer"),d.default.createElement("option",{value:"Form",id:"Formoption"},"Form"),d.default.createElement("option",{value:"Header",id:"Headeroption"},"Header"),d.default.createElement("option",{value:"Main",id:"Mainoption"},"Main"),d.default.createElement("option",{value:"Nav",id:"Navoption"},"Nav"),d.default.createElement("option",{value:"Section",id:"Sectionoption"},"Section")),d.default.createElement(f.Button,{buttonType:"secondary",className:"ml-3",onClick:function(){c.postMessageToPlugin(o.WebEvs.landmarks_addItem,{landmarkType:a}),setTimeout(g,100),i.trackMixpanelEvent(n,"Landmark added",{Type:a})}},"Add"))),d.default.createElement("section",{className:"h-[467px] flex-auto overflow-auto bg-gray-10"},h.map((function(e,t){return d.default.createElement(p,{key:t+"_"+e.artboardName,artboard:e,onDeleteItemClick:b})})))))};var p=function(e){var t=e.artboard,n=e.onDeleteItemClick,r=d.useState([]),a=r[0],l=r[1];return d.useEffect((function(){l(t.landmarks)}),[t]),d.default.createElement(u.CollapsibleItemGroup,{title:t.artboardName},a.map((function(e,t){return d.default.createElement(m,{key:t+"_"+e.layerId,type:e.type,layerId:e.layerId,layerName:e.layerName,onDeleteClick:n})})))},m=function(e){var t=e.type,n=e.layerId,r=e.layerName,a=e.onDeleteClick,l=d.useRef(null);return d.default.createElement("div",{id:n,ref:l,className:"landmark-item group relative flex h-12 items-center justify-between border-b border-b-border-divider transition-all last:border-transparent",tabIndex:0},d.default.createElement("div",{className:"flex items-center gap-2"},d.default.createElement(u.LandmarkTag,{type:t}),d.default.createElement(f.Label,null,r)),d.default.createElement("div",{className:"pointer-events-none ml-4 flex flex-nowrap opacity-0 transition-opacity group-focus-within:pointer-events-auto group-focus-within:opacity-100 group-hover:pointer-events-auto group-hover:opacity-100 group-focus:pointer-events-auto group-focus:opacity-100"},d.default.createElement(f.Button,{buttonType:"secondary-icon-only",className:"text-gray-900",onClick:function(){var e;null===(e=l.current)||void 0===e||e.classList.add("scale-y-0","!h-0","!opacity-0","border-b-none"),setTimeout((function(){a(n)}),250)},tabIndex:0},d.default.createElement(f.IconTrash,null))))}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n11),o(n.showBlankState)}}}),[]),p.default.createElement("div",{className:"typography"},p.default.createElement(s.TopBar,{leftSide:p.default.createElement(d.Label,{level:"large",className:"animate-slide-left"},"Typography"),onBackClick:t,onHelpClick:function(){u.sendUrlToSketch(i.Url.TypographyHelp),c.trackMixpanelEvent(n,"Help clicked",{Tool:"Typography"})}}),p.default.createElement("main",null,p.default.createElement("div",{className:"flex items-center justify-center gap-6 border-b border-b-border-divider py-5"},p.default.createElement(d.Button,{buttonType:"primary-icon-only",className:"px-0 text-gray-900",isDisabled:l,onClick:function(){if(parseInt(g)>1){var e=parseInt(g)-1;y(e),N(e,x)}}},p.default.createElement(d.IconMinus,null)),p.default.createElement(d.Display,{className:"min-w-[158px] text-center tabular-nums"},l?"0":g+"px"),p.default.createElement(d.Button,{buttonType:"primary-icon-only",className:"px-0 text-gray-900",isDisabled:l,onClick:function(){if(parseInt(g)<999){var e=parseInt(g)+1;y(e),N(e,x)}}},p.default.createElement(d.IconPlus,null))),p.default.createElement("div",{className:"flex items-center justify-center border-b border-b-border-divider py-4 px-6"},p.default.createElement("div",{className:"tabs inline-flex h-8 w-full items-center rounded bg-tab-bg"},p.default.createElement("button",{className:"tab group my-0 mx-0.5 flex h-7 grow items-center justify-center rounded-sm border-[0.5px] py-0 px-1.5 text-gray-900 transition-all duration-200 ease-in-out "+("left"===x?"border-border-frame bg-tab-bg-active shadow-tab-selected":"border-transparent"),tabIndex:0,onClick:function(){return T("left")}},p.default.createElement(d.IconTextAlignLeft,null)),p.default.createElement("button",{className:"tab group my-0 mx-0.5 flex h-7 grow items-center justify-center rounded-sm border-[0.5px] py-0 px-1.5 text-gray-900 transition-all duration-200 ease-in-out "+("center"===x?"border-border-frame bg-tab-bg-active shadow-tab-selected":"border-transparent"),tabIndex:0,onClick:function(){return T("center")}},p.default.createElement(d.IconTextAlignCenter,null)),p.default.createElement("button",{className:"tab group my-0 mx-0.5 flex h-7 grow items-center justify-center rounded-sm border-[0.5px] py-0 px-1.5 text-gray-900 transition-all duration-200 ease-in-out "+("right"===x?"border-border-frame bg-tab-bg-active shadow-tab-selected":"border-transparent"),tabIndex:0,onClick:function(){return T("right")}},p.default.createElement(d.IconTextAlignRight,null)),p.default.createElement("button",{className:"tab group my-0 mx-0.5 flex h-7 grow items-center justify-center rounded-sm border-[0.5px] py-0 px-1.5 text-gray-900 transition-all duration-200 ease-in-out "+("justified"===x?"border-border-frame bg-tab-bg-active shadow-tab-selected":"border-transparent"),tabIndex:0,onClick:function(){return T("justified")}},p.default.createElement(d.IconTextAlignJustified,null)))),p.default.createElement("div",{className:"py-5 px-6"},p.default.createElement(d.Headline,{level:"title",className:"mb-2"},"Typography"),p.default.createElement("div",{className:"group mb-2 flex items-center"},g>11?p.default.createElement(p.default.Fragment,null,p.default.createElement(d.IconPass,null),p.default.createElement(d.Label,{level:"large",className:"ml-1.5"},"Font Size above 11px")):p.default.createElement(p.default.Fragment,null,p.default.createElement(d.IconFail,null),p.default.createElement(d.Label,{level:"large",className:"ml-1.5"},"Font Size below 12px")),p.default.createElement("div",{className:"relative ml-auto"},p.default.createElement("div",{className:"invisible absolute bottom-8 -right-[22px] min-w-[216px] rounded border border-gray-900 bg-base-background p-1 opacity-0 transition-opacity delay-700 after:absolute after:-bottom-[7px] after:right-6 after:h-3 after:w-3 after:rotate-45 after:border-b after:border-r after:border-b-gray-900 after:border-r-gray-900 after:bg-base-background group-hover:visible group-hover:opacity-100 group-focus:visible group-focus:opacity-100",role:"tooltip",id:"statusTooltip"},p.default.createElement(d.Body,{className:"relative z-10"},"Text is likely too small to be easily readable. We recommend using a font size of at least 12px.")),p.default.createElement("div",{"aria-describedby":"statusTooltip"},p.default.createElement(d.IconHelp,{height:"16",width:"16",className:"ml-auto text-gray-900"})))),p.default.createElement("div",{className:"group flex items-center"},"justified"===x||l?p.default.createElement(p.default.Fragment,null,p.default.createElement(d.IconFail,null),p.default.createElement(d.Label,{level:"large",className:"ml-1.5"},"Text Align justified")):p.default.createElement(p.default.Fragment,null,p.default.createElement(d.IconPass,null),p.default.createElement(d.Label,{level:"large",className:"ml-1.5"},"Text Align ",x.toLowerCase())),p.default.createElement("div",{className:"relative ml-auto"},p.default.createElement("div",{className:"invisible absolute bottom-8 -right-[22px] min-w-[216px] rounded border border-gray-900 bg-base-background p-1 opacity-0 transition-opacity delay-700 after:absolute after:-bottom-[7px] after:right-6 after:h-3 after:w-3 after:rotate-45 after:border-b after:border-r after:border-b-gray-900 after:border-r-gray-900 after:bg-base-background group-hover:visible group-hover:opacity-100 group-focus:visible group-focus:opacity-100",role:"tooltip",id:"statusTooltip"},p.default.createElement(d.Body,{className:"relative z-10"},"Justified text alignment negatively impacts readability. We recommend using “left” or “right”.")),p.default.createElement("div",{"aria-describedby":"statusTooltip"},p.default.createElement(d.IconHelp,{height:"16",width:"16",className:"ml-auto text-gray-900"}))))),p.default.createElement("footer",{className:"relative z-0 ml-2 mr-2 animate-rotatingGradient rounded-lg py-2 px-4 before:absolute before:top-px before:right-px before:bottom-px before:left-px before:-z-10 before:rounded-lg before:bg-base-background",style:{background:"conic-gradient(from 180deg at 50% 50%, rgba(92, 193, 131, 0.41) -37.18deg, rgba(233, 133, 53, 0.49) 39.18deg, rgba(224, 85, 52, 0.15) 116.94deg, #7662F6 196.33deg, rgba(74, 158, 244, 0.38) 259.5deg, rgba(92, 193, 131, 0.41) 322.82deg, rgba(233, 133, 53, 0.49) 399.18deg)"}},p.default.createElement("div",{className:"flex items-center justify-between",onClick:function(){_(!O),u.postMessageToPlugin(i.WebEvs.typography_expandCollapseClick,{})}},p.default.createElement("div",{className:"flex items-center"},p.default.createElement(d.IconSidekick,{className:"mr-2"}),p.default.createElement(d.Headline,{level:"title"},"Suggestion")),O?p.default.createElement(d.IconChevronDown,{className:"text-gray-900"}):p.default.createElement(d.IconChevronUp,{className:"text-gray-900"})),O&&p.default.createElement(p.default.Fragment,null,p.default.createElement("div",{className:"mb-4 mt-2 flex gap-2"},g<12&&g>0&&p.default.createElement("div",{className:"grow rounded-lg border border-border-divider py-2 px-3 "+(k?"ring-2 ring-purple-500":""),role:"button",tabIndex:0,onKeyPress:function(e){"Enter"===e.key&&j(!k)},onClick:function(){return j(!k)}},p.default.createElement(d.Body,{color:"secondary"},"Font Size"),p.default.createElement(d.Body,{color:"secondary"},"12px")),"justified"===x&&p.default.createElement("div",{className:"grow rounded-lg border border-border-divider py-2 px-3 "+(S?"ring-2 ring-purple-500":""),role:"button",tabIndex:0,onKeyPress:function(e){"Enter"===e.key&&Z(!S)},onClick:function(){return Z(!S)}},p.default.createElement(d.Body,{color:"secondary"},"Text Align"),p.default.createElement(d.Body,{color:"secondary"},"Left")),(l||g>11&&"JUSTIFIED"!==x)&&p.default.createElement("div",{className:"flex h-[58px] grow items-center justify-center rounded-lg border border-border-divider py-2 px-3"},p.default.createElement(d.Body,{level:"medium",color:"secondary"},l?"Select a layer to get suggestions.":"Looks good! Nothing to suggest."))),p.default.createElement(d.Button,{buttonType:"secondary",size:"large",isBlock:!0,isDisabled:g>11&&"justified"!==x||l,className:"mb-2",onClick:function(){var e=k?12:g,t=S?"left":x;y(e),E(t),v(r(r({},h),{size:e,alignment:t})),u.postMessageToPlugin(i.WebEvs.typography_applyTypographyChange,{layerId:h.layerId,fontSize:e,alignment:t}),c.trackMixpanelEvent(n,"Typography suggestion inserted",{Size:e,Alignment:t})}},"Apply suggestion")))))}},function(e,t,n){"use strict";function r(){return(r=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{__scopeRadio:n,name:i,checked:u=!1,required:s,disabled:f,value:d="on",onCheck:p,...m}=e,[h,v]=Object(a.useState)(null),g=Object(o.useComposedRefs)(t,e=>v(e)),y=Object(a.useRef)(!1),w=!h||Boolean(h.closest("form"));return Object(a.createElement)(b,{scope:n,checked:u,disabled:f},Object(a.createElement)(c.Primitive.button,r({type:"button",role:"radio","aria-checked":u,"data-state":E(u),"data-disabled":f?"":void 0,disabled:f,value:d},m,{ref:g,onClick:Object(l.composeEventHandlers)(e.onClick,e=>{u||null==p||p(),w&&(y.current=e.isPropagationStopped(),y.current||e.stopPropagation())})})),w&&Object(a.createElement)(x,{control:h,bubbles:!y.current,name:i,value:d,checked:u,required:s,disabled:f,style:{transform:"translateX(-100%)"}}))}),w=Object(a.forwardRef)((e,t)=>{const{__scopeRadio:n,forceMount:l,...o}=e,i=g("RadioIndicator",n);return Object(a.createElement)(m.Presence,{present:l||i.checked},Object(a.createElement)(c.Primitive.span,r({"data-state":E(i.checked),"data-disabled":i.disabled?"":void 0},o,{ref:t})))}),x=e=>{const{control:t,checked:n,bubbles:l=!0,...o}=e,i=Object(a.useRef)(null),c=Object(p.usePrevious)(n),u=Object(d.useSize)(t);return Object(a.useEffect)(()=>{const e=i.current,t=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(t,"checked").set;if(c!==n&&r){const t=new Event("click",{bubbles:l});r.call(e,n),e.dispatchEvent(t)}},[c,n,l]),Object(a.createElement)("input",r({type:"radio","aria-hidden":!0,defaultChecked:n},o,{tabIndex:-1,ref:i,style:{...e.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function E(e){return e?"checked":"unchecked"}const C=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],[O,_]=Object(i.createContextScope)("RadioGroup",[u.createRovingFocusGroupScope,v]),M=Object(u.createRovingFocusGroupScope)(),k=v(),[j,P]=O("RadioGroup"),S=Object(a.forwardRef)((e,t)=>{const{__scopeRadioGroup:n,name:l,defaultValue:o,value:i,required:d=!1,disabled:p=!1,orientation:m,dir:h,loop:v=!0,onValueChange:b,...g}=e,y=M(n),w=Object(f.useDirection)(h),[x,E]=Object(s.useControllableState)({prop:i,defaultProp:o,onChange:b});return Object(a.createElement)(j,{scope:n,name:l,required:d,disabled:p,value:x,onValueChange:E},Object(a.createElement)(u.Root,r({asChild:!0},y,{orientation:m,dir:w,loop:v}),Object(a.createElement)(c.Primitive.div,r({role:"radiogroup","aria-required":d,"aria-orientation":m,"data-disabled":p?"":void 0,dir:w},g,{ref:t}))))}),Z=Object(a.forwardRef)((e,t)=>{const{__scopeRadioGroup:n,disabled:i,...c}=e,s=P("RadioGroupItem",n),f=s.disabled||i,d=M(n),p=k(n),m=Object(a.useRef)(null),h=Object(o.useComposedRefs)(t,m),v=s.value===c.value,b=Object(a.useRef)(!1);return Object(a.useEffect)(()=>{const e=e=>{C.includes(e.key)&&(b.current=!0)},t=()=>b.current=!1;return document.addEventListener("keydown",e),document.addEventListener("keyup",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)}},[]),Object(a.createElement)(u.Item,r({asChild:!0},d,{focusable:!f,active:v}),Object(a.createElement)(y,r({disabled:f,required:s.required,checked:v},p,c,{name:s.name,ref:h,onCheck:()=>s.onValueChange(c.value),onKeyDown:Object(l.composeEventHandlers)(e=>{"Enter"===e.key&&e.preventDefault()}),onFocus:Object(l.composeEventHandlers)(c.onFocus,()=>{var e;b.current&&(null===(e=m.current)||void 0===e||e.click())})})))}),T=Object(a.forwardRef)((e,t)=>{const{__scopeRadioGroup:n,...l}=e,o=k(n);return Object(a.createElement)(w,r({},o,l,{ref:t}))}),N=S,I=Z,L=T},function(e,t,n){"use strict";function r(){return(r=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{children:n,...l}=e,o=a.Children.toArray(n),c=o.find(u);if(c){const e=c.props.children,n=o.map(t=>t===c?a.Children.count(e)>1?a.Children.only(null):Object(a.isValidElement)(e)?e.props.children:null:t);return Object(a.createElement)(i,r({},l,{ref:t}),Object(a.isValidElement)(e)?Object(a.cloneElement)(e,void 0,n):null)}return Object(a.createElement)(i,r({},l,{ref:t}),n)});o.displayName="Slot";const i=Object(a.forwardRef)((e,t)=>{const{children:n,...r}=e;return Object(a.isValidElement)(n)?Object(a.cloneElement)(n,{...function(e,t){const n={...t};for(const r in t){const a=e[r],l=t[r];/^on[A-Z]/.test(r)?a&&l?n[r]=(...e)=>{l(...e),a(...e)}:a&&(n[r]=a):"style"===r?n[r]={...a,...l}:"className"===r&&(n[r]=[a,l].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props),ref:t?Object(l.composeRefs)(t,n.ref):n.ref}):a.Children.count(n)>1?a.Children.only(null):null});i.displayName="SlotClone";const c=({children:e})=>Object(a.createElement)(a.Fragment,null,e);function u(e){return Object(a.isValidElement)(e)&&e.type===c}const s=o},function(e,t,n){"use strict";function r(){return(r=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const n=Object(a.forwardRef)((e,n)=>{const{asChild:l,...i}=e,c=l?o.Slot:t;return Object(a.useEffect)(()=>{window[Symbol.for("radix-ui")]=!0},[]),Object(a.createElement)(c,r({},i,{ref:n}))});return n.displayName="Primitive."+t,{...e,[t]:n}},{});function c(e,t){e&&Object(l.flushSync)(()=>e.dispatchEvent(t))}const u=i},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;nfunction(e,t=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const n=a.useCallbackRef(e);r.useEffect(()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e),()=>t.removeEventListener("keydown",e)},[n,t])})},function(e,t,n){"use strict";n.r(t);var r=n(0),a=n.n(r),l=n(13),o=n(57),i=n.n(o),c=n(5);n(194),document.addEventListener("contextmenu",(function(e){return e.preventDefault()})),window.prepareFirstLoad=function(e){Object(l.render)(a.a.createElement(c.UserDataProvider,null,a.a.createElement(c.AppSettingsProvider,null,a.a.createElement(i.a,e))),document.getElementById("react-page"))}},,function(e,t,n){"use strict"; /** @license React v16.9.0 * react.production.min.js * @@ -11,7 +11,7 @@ object-assign * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var n=r(44),l="function"==typeof Symbol&&Symbol.for,a=l?Symbol.for("react.element"):60103,o=l?Symbol.for("react.portal"):60106,c=l?Symbol.for("react.fragment"):60107,i=l?Symbol.for("react.strict_mode"):60108,u=l?Symbol.for("react.profiler"):60114,s=l?Symbol.for("react.provider"):60109,f=l?Symbol.for("react.context"):60110,d=l?Symbol.for("react.forward_ref"):60112,p=l?Symbol.for("react.suspense"):60113,m=l?Symbol.for("react.suspense_list"):60120,h=l?Symbol.for("react.memo"):60115,v=l?Symbol.for("react.lazy"):60116;l&&Symbol.for("react.fundamental"),l&&Symbol.for("react.responder");var b="function"==typeof Symbol&&Symbol.iterator;function g(e){for(var t=e.message,r="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;nN.length&&N.push(e)}function B(e,t,r){return null==e?0:function e(t,r,n,l){var c=typeof t;"undefined"!==c&&"boolean"!==c||(t=null);var i=!1;if(null===t)i=!0;else switch(c){case"string":case"number":i=!0;break;case"object":switch(t.$$typeof){case a:case o:i=!0}}if(i)return n(l,t,""===r?"."+R(t,0):r),1;if(i=0,r=""===r?".":r+":",Array.isArray(t))for(var u=0;uN.length&&N.push(e)}function R(e,t,n){return null==e?0:function e(t,n,r,a){var i=typeof t;"undefined"!==i&&"boolean"!==i||(t=null);var c=!1;if(null===t)c=!0;else switch(i){case"string":case"number":c=!0;break;case"object":switch(t.$$typeof){case l:case o:c=!0}}if(c)return r(a,t,""===n?"."+B(t,0):n),1;if(c=0,n=""===n?".":n+":",Array.isArray(t))for(var u=0;uthis.eventPool.length&&this.eventPool.push(e)}function fe(e){e.eventPool=[],e.getPooled=ue,e.release=se}l(ie.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=oe)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=oe)},persist:function(){this.isPersistent=oe},isPersistent:ce,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=ce,this._dispatchInstances=this._dispatchListeners=null}}),ie.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},ie.extend=function(e){function t(){}function r(){return n.apply(this,arguments)}var n=this;t.prototype=n.prototype;var a=new t;return l(a,r.prototype),r.prototype=a,r.prototype.constructor=r,r.Interface=l({},n.Interface,e),r.extend=n.extend,fe(r),r},fe(ie);var de=ie.extend({data:null}),pe=ie.extend({data:null}),me=[9,13,27,32],he=G&&"CompositionEvent"in window,ve=null;G&&"documentMode"in document&&(ve=document.documentMode);var be=G&&"TextEvent"in window&&!ve,ge=G&&(!he||ve&&8=ve),ye=String.fromCharCode(32),we={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},Oe=!1;function _e(e,t){switch(e){case"keyup":return-1!==me.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function xe(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Me=!1,Ce={eventTypes:we,extractEvents:function(e,t,r,n){var l=void 0,a=void 0;if(he)e:{switch(e){case"compositionstart":l=we.compositionStart;break e;case"compositionend":l=we.compositionEnd;break e;case"compositionupdate":l=we.compositionUpdate;break e}l=void 0}else Me?_e(e,r)&&(l=we.compositionEnd):"keydown"===e&&229===r.keyCode&&(l=we.compositionStart);return l?(ge&&"ko"!==r.locale&&(Me||l!==we.compositionStart?l===we.compositionEnd&&Me&&(a=ae()):(ne="value"in(re=n)?re.value:re.textContent,Me=!0)),l=de.getPooled(l,t,r,n),(a||null!==(a=xe(r)))&&(l.data=a),z(l),a=l):a=null,(e=be?function(e,t){switch(e){case"compositionend":return xe(t);case"keypress":return 32!==t.which?null:(Oe=!0,ye);case"textInput":return(e=t.data)===ye&&Oe?null:e;default:return null}}(e,r):function(e,t){if(Me)return"compositionend"===e||!he&&_e(e,t)?(e=ae(),le=ne=re=null,Me=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1