chordia-ui 4.0.3 → 4.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- "use strict";const e=require("react/jsx-runtime"),f=require("react"),m=require("lucide-react"),w=require("./useMediaQuery.cjs.js");function S({open:t,onClose:n,title:r,subtitle:i,children:a,footer:s,width:p=515,height:y=762,toggleLabel:x,toggleChecked:c,onToggle:u,topOffset:d}){const b=f.useRef(null),o=w.useMediaQuery("(max-width: 640px)"),h=d!=null,g=typeof d=="number"?`${d}px`:d;return f.useEffect(()=>{if(!t)return;const l=v=>{v.key==="Escape"&&(n==null||n())};return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[t,n]),t?e.jsxs(e.Fragment,{children:[e.jsx("div",{onClick:n,style:{position:"fixed",inset:0,zIndex:1200,background:"rgba(0, 0, 0, 0.20)"}}),e.jsxs("div",{ref:b,style:{position:"fixed",top:o?0:h?g:"50%",right:0,transform:o||h?"none":"translateY(-50%)",zIndex:1201,display:"flex",width:o?"100vw":p,maxWidth:"100vw",height:o?"100dvh":y,maxHeight:o?"100dvh":h?`calc(100vh - ${g})`:"100vh",padding:"20px",boxSizing:o?"border-box":void 0,flexDirection:"column",alignItems:"flex-start",gap:"20px",borderRadius:o?0:"12px 0 0 12px",background:"#FFF",boxShadow:"648px 0 100px 0 rgba(0, 0, 0, 0.20)"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",flexShrink:0},children:[e.jsx("h2",{style:{fontSize:"24px",fontWeight:600,fontStyle:"normal",color:"var(--Grey-3, #252525)",margin:0,lineHeight:"normal"},children:r}),e.jsx("button",{onClick:n,style:{display:"flex",alignItems:"center",justifyContent:"center",width:"28px",height:"28px",border:"none",background:"transparent",color:"var(--Grey-Strong, #808183)",cursor:"pointer",borderRadius:"4px",transition:"background 0.15s ease"},onMouseEnter:l=>{l.currentTarget.style.background="#ECEEF2"},onMouseLeave:l=>{l.currentTarget.style.background="transparent"},children:e.jsx(m.X,{size:20,strokeWidth:2})})]}),e.jsx("div",{style:{width:"100%",height:"1px",background:"#ECEEF2",flexShrink:0}}),(i||x)&&e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",gap:"12px",flexShrink:0},children:[i&&e.jsx("p",{style:{fontSize:"13px",fontStyle:"normal",fontWeight:400,lineHeight:"140%",color:"#0B0B0B",margin:0,flex:1},children:i}),x&&e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",flexShrink:0},children:[e.jsx("button",{onClick:()=>u==null?void 0:u(!c),style:{position:"relative",width:"40px",height:"22px",borderRadius:"11px",border:"none",background:c?"var(--Base-Strong, #0B0B0B)":"var(--Base-Faint, #D9D9D9)",cursor:"pointer",transition:"background 0.2s ease",padding:0,flexShrink:0},children:e.jsx("div",{style:{position:"absolute",top:"2px",left:c?"20px":"2px",width:"18px",height:"18px",borderRadius:"50%",background:"#FFF",transition:"left 0.2s ease",boxShadow:"0 1px 3px rgba(0,0,0,0.15)"}})}),e.jsx("span",{style:{fontSize:"13px",fontWeight:500,color:"var(--Base-Strong, #1E1E1E)",lineHeight:1.4},children:x})]})]}),e.jsx("div",{style:{flex:1,width:"100%",overflowY:"auto",display:"flex",flexDirection:"column",gap:"16px",minHeight:0},children:a}),s&&e.jsxs(e.Fragment,{children:[e.jsx("div",{style:{width:"100%",height:"1px",background:"#ECEEF2",flexShrink:0}}),e.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:"12px",width:"100%",flexShrink:0},children:s})]})]})]}):null}function k({label:t,variant:n="secondary",onClick:r,disabled:i}){const a=n==="primary";return e.jsx("button",{onClick:r,disabled:i,style:{display:"flex",height:"36px",padding:"0 20px",justifyContent:"center",alignItems:"center",gap:"8px",borderRadius:"6px",border:a?"none":"1px solid #D9D9D9",background:a?"var(--Base-Strong, #0B0B0B)":"var(--Base-White, #FFF)",color:a?"#FFF":"var(--Base-Strong, #1E1E1E)",fontSize:"16px",fontWeight:600,cursor:i?"default":"pointer",opacity:i?.5:1,transition:"all 0.15s ease"},onMouseEnter:s=>{!i&&!a&&(s.currentTarget.style.background="#ECEEF2")},onMouseLeave:s=>{!i&&!a&&(s.currentTarget.style.background="var(--Base-White, #FFF)")},children:t})}function j({children:t,htmlFor:n}){return e.jsx("label",{htmlFor:n,style:{display:"block",color:"var(--Base-Strong, #2E3236)",fontSize:"16px",fontStyle:"normal",fontWeight:400,lineHeight:"normal",marginBottom:"6px"},children:t})}function F(t){return e.jsx("input",{...t,style:{width:"100%",padding:"10px 12px",borderRadius:"6px",border:"1px solid #D9D9D9",color:"var(--Base-Strong, #2E3236)",fontSize:"16px",fontStyle:"normal",fontWeight:400,lineHeight:"normal",outline:"none",boxSizing:"border-box",background:"#FFF",transition:"border-color 0.15s ease",...t.style},onFocus:n=>{var r;n.currentTarget.style.borderColor="#808183",(r=t.onFocus)==null||r.call(t,n)},onBlur:n=>{var r;n.currentTarget.style.borderColor="#D9D9D9",(r=t.onBlur)==null||r.call(t,n)}})}exports.DrawerButton=k;exports.DrawerInput=F;exports.DrawerLabel=j;exports.SideDrawer=S;
1
+ "use strict";const e=require("react/jsx-runtime"),p=require("react"),m=require("lucide-react"),w=require("./useMediaQuery.cjs.js");function S({open:t,onClose:n,title:r,subtitle:i,children:x,footer:a,width:l=515,height:y=762,toggleLabel:c,toggleChecked:u,onToggle:h,topOffset:d}){const b=p.useRef(null),o=w.useMediaQuery("(max-width: 640px)"),g=d!=null,f=typeof d=="number"?`${d}px`:d;return p.useEffect(()=>{if(!t)return;const s=v=>{v.key==="Escape"&&(n==null||n())};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[t,n]),t?e.jsxs(e.Fragment,{children:[e.jsx("div",{onClick:n,style:{position:"fixed",inset:0,zIndex:1200,background:"rgba(0, 0, 0, 0.20)"}}),e.jsxs("div",{ref:b,style:{position:"fixed",top:o?0:g?f:"50%",right:0,transform:o||g?"none":"translateY(-50%)",zIndex:1201,display:"flex",width:o?"100vw":l,maxWidth:"100vw",height:o?"100dvh":y,maxHeight:o?"100dvh":g?`calc(100vh - ${f})`:"100vh",padding:"20px",boxSizing:o?"border-box":void 0,flexDirection:"column",alignItems:"flex-start",gap:"20px",borderRadius:o?0:"12px 0 0 12px",background:"#FFF",boxShadow:"648px 0 100px 0 rgba(0, 0, 0, 0.20)"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",flexShrink:0},children:[e.jsx("h2",{style:{fontSize:"24px",fontWeight:600,fontStyle:"normal",color:"var(--Grey-3, #252525)",margin:0,lineHeight:"normal"},children:r}),e.jsx("button",{onClick:n,style:{display:"flex",alignItems:"center",justifyContent:"center",width:"28px",height:"28px",border:"none",background:"transparent",color:"var(--Grey-Strong, #808183)",cursor:"pointer",borderRadius:"4px",transition:"background 0.15s ease"},onMouseEnter:s=>{s.currentTarget.style.background="#ECEEF2"},onMouseLeave:s=>{s.currentTarget.style.background="transparent"},children:e.jsx(m.X,{size:20,strokeWidth:2})})]}),e.jsx("div",{style:{width:"100%",height:"1px",background:"#ECEEF2",flexShrink:0}}),(i||c)&&e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",gap:"12px",flexShrink:0},children:[i&&e.jsx("p",{style:{fontSize:"13px",fontStyle:"normal",fontWeight:400,lineHeight:"140%",color:"#0B0B0B",margin:0,flex:1},children:i}),c&&e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",flexShrink:0},children:[e.jsx("button",{onClick:()=>h==null?void 0:h(!u),style:{position:"relative",width:"40px",height:"22px",borderRadius:"11px",border:"none",background:u?"var(--Base-Strong, #0B0B0B)":"var(--Base-Faint, #D9D9D9)",cursor:"pointer",transition:"background 0.2s ease",padding:0,flexShrink:0},children:e.jsx("div",{style:{position:"absolute",top:"2px",left:u?"20px":"2px",width:"18px",height:"18px",borderRadius:"50%",background:"#FFF",transition:"left 0.2s ease",boxShadow:"0 1px 3px rgba(0,0,0,0.15)"}})}),e.jsx("span",{style:{fontSize:"13px",fontWeight:500,color:"var(--Base-Strong, #1E1E1E)",lineHeight:1.4},children:c})]})]}),e.jsx("div",{style:{flex:1,width:"100%",overflowY:"auto",display:"flex",flexDirection:"column",gap:"16px",minHeight:0},children:x}),a&&e.jsxs(e.Fragment,{children:[e.jsx("div",{style:{width:"100%",height:"1px",background:"#ECEEF2",flexShrink:0}}),e.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:"12px",width:"100%",flexShrink:0},children:a})]})]})]}):null}function k({label:t,variant:n="secondary",onClick:r,disabled:i,style:x}){const a=n==="primary";return e.jsx("button",{onClick:r,disabled:i,style:{display:"flex",height:"36px",padding:"0 20px",justifyContent:"center",alignItems:"center",gap:"8px",borderRadius:"6px",border:a?"none":"1px solid #D9D9D9",background:a?"var(--Base-Strong, #0B0B0B)":"var(--Base-White, #FFF)",color:a?"#FFF":"var(--Base-Strong, #1E1E1E)",fontSize:"16px",fontWeight:600,cursor:i?"default":"pointer",opacity:i?.5:1,transition:"all 0.15s ease",...x},onMouseEnter:l=>{!i&&!a&&(l.currentTarget.style.background="#ECEEF2")},onMouseLeave:l=>{!i&&!a&&(l.currentTarget.style.background="var(--Base-White, #FFF)")},children:t})}function j({children:t,htmlFor:n}){return e.jsx("label",{htmlFor:n,style:{display:"block",color:"var(--Base-Strong, #2E3236)",fontSize:"16px",fontStyle:"normal",fontWeight:400,lineHeight:"normal",marginBottom:"6px"},children:t})}function F(t){return e.jsx("input",{...t,style:{width:"100%",padding:"10px 12px",borderRadius:"6px",border:"1px solid #D9D9D9",color:"var(--Base-Strong, #2E3236)",fontSize:"16px",fontStyle:"normal",fontWeight:400,lineHeight:"normal",outline:"none",boxSizing:"border-box",background:"#FFF",transition:"border-color 0.15s ease",...t.style},onFocus:n=>{var r;n.currentTarget.style.borderColor="#808183",(r=t.onFocus)==null||r.call(t,n)},onBlur:n=>{var r;n.currentTarget.style.borderColor="#D9D9D9",(r=t.onBlur)==null||r.call(t,n)}})}exports.DrawerButton=k;exports.DrawerInput=F;exports.DrawerLabel=j;exports.SideDrawer=S;
2
2
  //# sourceMappingURL=SideDrawer.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SideDrawer.cjs.js","sources":["../src/components/common/SideDrawer.jsx"],"sourcesContent":["\"use client\";\n\nimport React, { useEffect, useRef } from \"react\";\nimport { X } from \"lucide-react\";\nimport { useMediaQuery } from \"../../utils/useMediaQuery\";\n\n/**\n * SideDrawer — slide-in panel from the right edge.\n *\n * Props:\n * - open boolean Whether the drawer is visible\n * - onClose function Close callback\n * - title string Header title\n * - subtitle string Optional description below the divider\n * - children ReactNode Drawer body content\n * - footer ReactNode Optional fixed footer (e.g. Cancel/Save buttons)\n * - width number|string Drawer width (default 515)\n * - height number|string Drawer height (default 762)\n * - toggleLabel string Optional toggle label (right side of subtitle row)\n * - toggleChecked boolean Toggle state\n * - onToggle function Toggle callback\n * - topOffset number|string Optional top offset (e.g. below navbar)\n */\nexport default function SideDrawer({\n open,\n onClose,\n title,\n subtitle,\n children,\n footer,\n width = 515,\n height = 762,\n toggleLabel,\n toggleChecked,\n onToggle,\n topOffset,\n}) {\n const drawerRef = useRef(null);\n const isPhone = useMediaQuery(\"(max-width: 640px)\");\n const hasTopOffset = topOffset !== undefined && topOffset !== null;\n const normalizedTopOffset = typeof topOffset === \"number\" ? `${topOffset}px` : topOffset;\n\n // Close on Escape key\n useEffect(() => {\n if (!open) return;\n const handleKey = (e) => {\n if (e.key === \"Escape\") onClose?.();\n };\n document.addEventListener(\"keydown\", handleKey);\n return () => document.removeEventListener(\"keydown\", handleKey);\n }, [open, onClose]);\n\n if (!open) return null;\n\n return (\n <>\n {/* Backdrop */}\n <div\n onClick={onClose}\n style={{\n position: \"fixed\",\n inset: 0,\n zIndex: 1200,\n background: \"rgba(0, 0, 0, 0.20)\",\n }}\n />\n\n {/* Drawer panel */}\n <div\n ref={drawerRef}\n style={{\n position: \"fixed\",\n // On phones the drawer fills the screen so its content isn't clipped\n // off the left edge by a fixed width wider than the viewport.\n top: isPhone ? 0 : hasTopOffset ? normalizedTopOffset : \"50%\",\n right: 0,\n transform: isPhone ? \"none\" : hasTopOffset ? \"none\" : \"translateY(-50%)\",\n zIndex: 1201,\n display: \"flex\",\n width: isPhone ? \"100vw\" : width,\n maxWidth: \"100vw\",\n height: isPhone ? \"100dvh\" : height,\n maxHeight: isPhone ? \"100dvh\" : hasTopOffset ? `calc(100vh - ${normalizedTopOffset})` : \"100vh\",\n padding: \"20px\",\n // border-box only on phones (full-screen) so the desktop drawer keeps\n // its original content-box width (515px content + padding).\n boxSizing: isPhone ? \"border-box\" : undefined,\n flexDirection: \"column\",\n alignItems: \"flex-start\",\n gap: \"20px\",\n borderRadius: isPhone ? 0 : \"12px 0 0 12px\",\n background: \"#FFF\",\n boxShadow: \"648px 0 100px 0 rgba(0, 0, 0, 0.20)\",\n }}\n >\n {/* Header: Title + Close */}\n <div\n style={{\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n width: \"100%\",\n flexShrink: 0,\n }}\n >\n <h2\n style={{\n fontSize: \"24px\",\n fontWeight: 600,\n fontStyle: \"normal\",\n color: \"var(--Grey-3, #252525)\",\n margin: 0,\n lineHeight: \"normal\",\n }}\n >\n {title}\n </h2>\n <button\n onClick={onClose}\n style={{\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n width: \"28px\",\n height: \"28px\",\n border: \"none\",\n background: \"transparent\",\n color: \"var(--Grey-Strong, #808183)\",\n cursor: \"pointer\",\n borderRadius: \"4px\",\n transition: \"background 0.15s ease\",\n }}\n onMouseEnter={(e) => {\n e.currentTarget.style.background = \"#ECEEF2\";\n }}\n onMouseLeave={(e) => {\n e.currentTarget.style.background = \"transparent\";\n }}\n >\n <X size={20} strokeWidth={2} />\n </button>\n </div>\n\n {/* Divider */}\n <div\n style={{\n width: \"100%\",\n height: \"1px\",\n background: \"#ECEEF2\",\n flexShrink: 0,\n }}\n />\n\n {/* Subtitle row with optional toggle */}\n {(subtitle || toggleLabel) && (\n <div\n style={{\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n width: \"100%\",\n gap: \"12px\",\n flexShrink: 0,\n }}\n >\n {subtitle && (\n <p\n style={{\n fontSize: \"13px\",\n fontStyle: \"normal\",\n fontWeight: 400,\n lineHeight: \"140%\",\n color: \"#0B0B0B\",\n margin: 0,\n flex: 1,\n }}\n >\n {subtitle}\n </p>\n )}\n {toggleLabel && (\n <div\n style={{\n display: \"flex\",\n alignItems: \"center\",\n gap: \"8px\",\n flexShrink: 0,\n }}\n >\n {/* Toggle switch */}\n <button\n onClick={() => onToggle?.(!toggleChecked)}\n style={{\n position: \"relative\",\n width: \"40px\",\n height: \"22px\",\n borderRadius: \"11px\",\n border: \"none\",\n background: toggleChecked\n ? \"var(--Base-Strong, #0B0B0B)\"\n : \"var(--Base-Faint, #D9D9D9)\",\n cursor: \"pointer\",\n transition: \"background 0.2s ease\",\n padding: 0,\n flexShrink: 0,\n }}\n >\n <div\n style={{\n position: \"absolute\",\n top: \"2px\",\n left: toggleChecked ? \"20px\" : \"2px\",\n width: \"18px\",\n height: \"18px\",\n borderRadius: \"50%\",\n background: \"#FFF\",\n transition: \"left 0.2s ease\",\n boxShadow: \"0 1px 3px rgba(0,0,0,0.15)\",\n }}\n />\n </button>\n <span\n style={{\n fontSize: \"13px\",\n fontWeight: 500,\n color: \"var(--Base-Strong, #1E1E1E)\",\n lineHeight: 1.4,\n }}\n >\n {toggleLabel}\n </span>\n </div>\n )}\n </div>\n )}\n\n {/* Body content — scrollable */}\n <div\n style={{\n flex: 1,\n width: \"100%\",\n overflowY: \"auto\",\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"16px\",\n minHeight: 0,\n }}\n >\n {children}\n </div>\n\n {/* Footer */}\n {footer && (\n <>\n <div\n style={{\n width: \"100%\",\n height: \"1px\",\n background: \"#ECEEF2\",\n flexShrink: 0,\n }}\n />\n <div\n style={{\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"flex-end\",\n gap: \"12px\",\n width: \"100%\",\n flexShrink: 0,\n }}\n >\n {footer}\n </div>\n </>\n )}\n </div>\n </>\n );\n}\n\n/**\n * DrawerButton — standard button for use in SideDrawer footer.\n *\n * Props:\n * - label string\n * - variant \"primary\" | \"secondary\" (default \"secondary\")\n * - onClick function\n * - disabled boolean\n */\nexport function DrawerButton({\n label,\n variant = \"secondary\",\n onClick,\n disabled,\n}) {\n const isPrimary = variant === \"primary\";\n\n return (\n <button\n onClick={onClick}\n disabled={disabled}\n style={{\n display: \"flex\",\n height: \"36px\",\n padding: \"0 20px\",\n justifyContent: \"center\",\n alignItems: \"center\",\n gap: \"8px\",\n borderRadius: \"6px\",\n border: isPrimary ? \"none\" : \"1px solid #D9D9D9\",\n background: isPrimary\n ? \"var(--Base-Strong, #0B0B0B)\"\n : \"var(--Base-White, #FFF)\",\n color: isPrimary ? \"#FFF\" : \"var(--Base-Strong, #1E1E1E)\",\n fontSize: \"16px\",\n fontWeight: 600,\n cursor: disabled ? \"default\" : \"pointer\",\n opacity: disabled ? 0.5 : 1,\n transition: \"all 0.15s ease\",\n }}\n onMouseEnter={(e) => {\n if (!disabled && !isPrimary) {\n e.currentTarget.style.background = \"#ECEEF2\";\n }\n }}\n onMouseLeave={(e) => {\n if (!disabled && !isPrimary) {\n e.currentTarget.style.background = \"var(--Base-White, #FFF)\";\n }\n }}\n >\n {label}\n </button>\n );\n}\n\n/**\n * DrawerLabel — form label for use inside SideDrawer.\n *\n * Props:\n * - children ReactNode\n * - htmlFor string\n */\nexport function DrawerLabel({ children, htmlFor }) {\n return (\n <label\n htmlFor={htmlFor}\n style={{\n display: \"block\",\n color: \"var(--Base-Strong, #2E3236)\",\n fontSize: \"16px\",\n fontStyle: \"normal\",\n fontWeight: 400,\n lineHeight: \"normal\",\n marginBottom: \"6px\",\n }}\n >\n {children}\n </label>\n );\n}\n\n/**\n * DrawerInput — text input for use inside SideDrawer.\n *\n * Props:\n * - All standard <input> props (type, placeholder, value, onChange, etc.)\n */\nexport function DrawerInput(props) {\n return (\n <input\n {...props}\n style={{\n width: \"100%\",\n padding: \"10px 12px\",\n borderRadius: \"6px\",\n border: \"1px solid #D9D9D9\",\n color: \"var(--Base-Strong, #2E3236)\",\n fontSize: \"16px\",\n fontStyle: \"normal\",\n fontWeight: 400,\n lineHeight: \"normal\",\n outline: \"none\",\n boxSizing: \"border-box\",\n background: \"#FFF\",\n transition: \"border-color 0.15s ease\",\n ...props.style,\n }}\n onFocus={(e) => {\n e.currentTarget.style.borderColor = \"#808183\";\n props.onFocus?.(e);\n }}\n onBlur={(e) => {\n e.currentTarget.style.borderColor = \"#D9D9D9\";\n props.onBlur?.(e);\n }}\n />\n );\n}\n"],"names":["SideDrawer","open","onClose","title","subtitle","children","footer","width","height","toggleLabel","toggleChecked","onToggle","topOffset","drawerRef","useRef","isPhone","useMediaQuery","hasTopOffset","normalizedTopOffset","useEffect","handleKey","e","jsxs","Fragment","jsx","X","DrawerButton","label","variant","onClick","disabled","isPrimary","DrawerLabel","htmlFor","DrawerInput","props","_a"],"mappings":"mIAuBA,SAAwBA,EAAW,CACjC,KAAAC,EACA,QAAAC,EACA,MAAAC,EACA,SAAAC,EACA,SAAAC,EACA,OAAAC,EACA,MAAAC,EAAQ,IACR,OAAAC,EAAS,IACT,YAAAC,EACA,cAAAC,EACA,SAAAC,EACA,UAAAC,CACF,EAAG,CACK,MAAAC,EAAYC,SAAO,IAAI,EACvBC,EAAUC,gBAAc,oBAAoB,EAC5CC,EAA0CL,GAAc,KACxDM,EAAsB,OAAON,GAAc,SAAW,GAAGA,CAAS,KAAOA,EAY/E,OATAO,EAAAA,UAAU,IAAM,CACd,GAAI,CAAClB,EAAM,OACL,MAAAmB,EAAaC,GAAM,CACnBA,EAAE,MAAQ,WAAoBnB,GAAA,MAAAA,IAAA,EAE3B,gBAAA,iBAAiB,UAAWkB,CAAS,EACvC,IA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,OAAAX,EAAA,IAAC,QAAA,CACE,GAAGW,EACJ,MAAO,CACL,MAAO,OACP,QAAS,YACT,aAAc,MACd,OAAQ,oBACR,MAAO,8BACP,SAAU,OACV,UAAW,SACX,WAAY,IACZ,WAAY,SACZ,QAAS,OACT,UAAW,aACX,WAAY,OACZ,WAAY,0BACZ,GAAGA,EAAM,KACX,EACA,QAAUd,GAAM,OACZA,EAAA,cAAc,MAAM,YAAc,WACpCe,EAAAD,EAAM,UAAN,MAAAC,EAAA,KAAAD,EAAgBd,EAClB,EACA,OAASA,GAAM,OACXA,EAAA,cAAc,MAAM,YAAc,WACpCe,EAAAD,EAAM,SAAN,MAAAC,EAAA,KAAAD,EAAed,EACjB,CAAA,CAAA,CAGN"}
1
+ {"version":3,"file":"SideDrawer.cjs.js","sources":["../src/components/common/SideDrawer.jsx"],"sourcesContent":["\"use client\";\n\nimport React, { useEffect, useRef } from \"react\";\nimport { X } from \"lucide-react\";\nimport { useMediaQuery } from \"../../utils/useMediaQuery\";\n\n/**\n * SideDrawer — slide-in panel from the right edge.\n *\n * Props:\n * - open boolean Whether the drawer is visible\n * - onClose function Close callback\n * - title string Header title\n * - subtitle string Optional description below the divider\n * - children ReactNode Drawer body content\n * - footer ReactNode Optional fixed footer (e.g. Cancel/Save buttons)\n * - width number|string Drawer width (default 515)\n * - height number|string Drawer height (default 762)\n * - toggleLabel string Optional toggle label (right side of subtitle row)\n * - toggleChecked boolean Toggle state\n * - onToggle function Toggle callback\n * - topOffset number|string Optional top offset (e.g. below navbar)\n */\nexport default function SideDrawer({\n open,\n onClose,\n title,\n subtitle,\n children,\n footer,\n width = 515,\n height = 762,\n toggleLabel,\n toggleChecked,\n onToggle,\n topOffset,\n}) {\n const drawerRef = useRef(null);\n const isPhone = useMediaQuery(\"(max-width: 640px)\");\n const hasTopOffset = topOffset !== undefined && topOffset !== null;\n const normalizedTopOffset = typeof topOffset === \"number\" ? `${topOffset}px` : topOffset;\n\n // Close on Escape key\n useEffect(() => {\n if (!open) return;\n const handleKey = (e) => {\n if (e.key === \"Escape\") onClose?.();\n };\n document.addEventListener(\"keydown\", handleKey);\n return () => document.removeEventListener(\"keydown\", handleKey);\n }, [open, onClose]);\n\n if (!open) return null;\n\n return (\n <>\n {/* Backdrop */}\n <div\n onClick={onClose}\n style={{\n position: \"fixed\",\n inset: 0,\n zIndex: 1200,\n background: \"rgba(0, 0, 0, 0.20)\",\n }}\n />\n\n {/* Drawer panel */}\n <div\n ref={drawerRef}\n style={{\n position: \"fixed\",\n // On phones the drawer fills the screen so its content isn't clipped\n // off the left edge by a fixed width wider than the viewport.\n top: isPhone ? 0 : hasTopOffset ? normalizedTopOffset : \"50%\",\n right: 0,\n transform: isPhone ? \"none\" : hasTopOffset ? \"none\" : \"translateY(-50%)\",\n zIndex: 1201,\n display: \"flex\",\n width: isPhone ? \"100vw\" : width,\n maxWidth: \"100vw\",\n height: isPhone ? \"100dvh\" : height,\n maxHeight: isPhone ? \"100dvh\" : hasTopOffset ? `calc(100vh - ${normalizedTopOffset})` : \"100vh\",\n padding: \"20px\",\n // border-box only on phones (full-screen) so the desktop drawer keeps\n // its original content-box width (515px content + padding).\n boxSizing: isPhone ? \"border-box\" : undefined,\n flexDirection: \"column\",\n alignItems: \"flex-start\",\n gap: \"20px\",\n borderRadius: isPhone ? 0 : \"12px 0 0 12px\",\n background: \"#FFF\",\n boxShadow: \"648px 0 100px 0 rgba(0, 0, 0, 0.20)\",\n }}\n >\n {/* Header: Title + Close */}\n <div\n style={{\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n width: \"100%\",\n flexShrink: 0,\n }}\n >\n <h2\n style={{\n fontSize: \"24px\",\n fontWeight: 600,\n fontStyle: \"normal\",\n color: \"var(--Grey-3, #252525)\",\n margin: 0,\n lineHeight: \"normal\",\n }}\n >\n {title}\n </h2>\n <button\n onClick={onClose}\n style={{\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n width: \"28px\",\n height: \"28px\",\n border: \"none\",\n background: \"transparent\",\n color: \"var(--Grey-Strong, #808183)\",\n cursor: \"pointer\",\n borderRadius: \"4px\",\n transition: \"background 0.15s ease\",\n }}\n onMouseEnter={(e) => {\n e.currentTarget.style.background = \"#ECEEF2\";\n }}\n onMouseLeave={(e) => {\n e.currentTarget.style.background = \"transparent\";\n }}\n >\n <X size={20} strokeWidth={2} />\n </button>\n </div>\n\n {/* Divider */}\n <div\n style={{\n width: \"100%\",\n height: \"1px\",\n background: \"#ECEEF2\",\n flexShrink: 0,\n }}\n />\n\n {/* Subtitle row with optional toggle */}\n {(subtitle || toggleLabel) && (\n <div\n style={{\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n width: \"100%\",\n gap: \"12px\",\n flexShrink: 0,\n }}\n >\n {subtitle && (\n <p\n style={{\n fontSize: \"13px\",\n fontStyle: \"normal\",\n fontWeight: 400,\n lineHeight: \"140%\",\n color: \"#0B0B0B\",\n margin: 0,\n flex: 1,\n }}\n >\n {subtitle}\n </p>\n )}\n {toggleLabel && (\n <div\n style={{\n display: \"flex\",\n alignItems: \"center\",\n gap: \"8px\",\n flexShrink: 0,\n }}\n >\n {/* Toggle switch */}\n <button\n onClick={() => onToggle?.(!toggleChecked)}\n style={{\n position: \"relative\",\n width: \"40px\",\n height: \"22px\",\n borderRadius: \"11px\",\n border: \"none\",\n background: toggleChecked\n ? \"var(--Base-Strong, #0B0B0B)\"\n : \"var(--Base-Faint, #D9D9D9)\",\n cursor: \"pointer\",\n transition: \"background 0.2s ease\",\n padding: 0,\n flexShrink: 0,\n }}\n >\n <div\n style={{\n position: \"absolute\",\n top: \"2px\",\n left: toggleChecked ? \"20px\" : \"2px\",\n width: \"18px\",\n height: \"18px\",\n borderRadius: \"50%\",\n background: \"#FFF\",\n transition: \"left 0.2s ease\",\n boxShadow: \"0 1px 3px rgba(0,0,0,0.15)\",\n }}\n />\n </button>\n <span\n style={{\n fontSize: \"13px\",\n fontWeight: 500,\n color: \"var(--Base-Strong, #1E1E1E)\",\n lineHeight: 1.4,\n }}\n >\n {toggleLabel}\n </span>\n </div>\n )}\n </div>\n )}\n\n {/* Body content — scrollable */}\n <div\n style={{\n flex: 1,\n width: \"100%\",\n overflowY: \"auto\",\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"16px\",\n minHeight: 0,\n }}\n >\n {children}\n </div>\n\n {/* Footer */}\n {footer && (\n <>\n <div\n style={{\n width: \"100%\",\n height: \"1px\",\n background: \"#ECEEF2\",\n flexShrink: 0,\n }}\n />\n <div\n style={{\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"flex-end\",\n gap: \"12px\",\n width: \"100%\",\n flexShrink: 0,\n }}\n >\n {footer}\n </div>\n </>\n )}\n </div>\n </>\n );\n}\n\n/**\n * DrawerButton — standard button for use in SideDrawer footer.\n *\n * Props:\n * - label string\n * - variant \"primary\" | \"secondary\" (default \"secondary\")\n * - onClick function\n * - disabled boolean\n */\nexport function DrawerButton({\n label,\n variant = \"secondary\",\n onClick,\n disabled,\n style,\n}) {\n const isPrimary = variant === \"primary\";\n\n return (\n <button\n onClick={onClick}\n disabled={disabled}\n style={{\n display: \"flex\",\n height: \"36px\",\n padding: \"0 20px\",\n justifyContent: \"center\",\n alignItems: \"center\",\n gap: \"8px\",\n borderRadius: \"6px\",\n border: isPrimary ? \"none\" : \"1px solid #D9D9D9\",\n background: isPrimary\n ? \"var(--Base-Strong, #0B0B0B)\"\n : \"var(--Base-White, #FFF)\",\n color: isPrimary ? \"#FFF\" : \"var(--Base-Strong, #1E1E1E)\",\n fontSize: \"16px\",\n fontWeight: 600,\n cursor: disabled ? \"default\" : \"pointer\",\n opacity: disabled ? 0.5 : 1,\n transition: \"all 0.15s ease\",\n ...style,\n }}\n onMouseEnter={(e) => {\n if (!disabled && !isPrimary) {\n e.currentTarget.style.background = \"#ECEEF2\";\n }\n }}\n onMouseLeave={(e) => {\n if (!disabled && !isPrimary) {\n e.currentTarget.style.background = \"var(--Base-White, #FFF)\";\n }\n }}\n >\n {label}\n </button>\n );\n}\n\n/**\n * DrawerLabel — form label for use inside SideDrawer.\n *\n * Props:\n * - children ReactNode\n * - htmlFor string\n */\nexport function DrawerLabel({ children, htmlFor }) {\n return (\n <label\n htmlFor={htmlFor}\n style={{\n display: \"block\",\n color: \"var(--Base-Strong, #2E3236)\",\n fontSize: \"16px\",\n fontStyle: \"normal\",\n fontWeight: 400,\n lineHeight: \"normal\",\n marginBottom: \"6px\",\n }}\n >\n {children}\n </label>\n );\n}\n\n/**\n * DrawerInput — text input for use inside SideDrawer.\n *\n * Props:\n * - All standard <input> props (type, placeholder, value, onChange, etc.)\n */\nexport function DrawerInput(props) {\n return (\n <input\n {...props}\n style={{\n width: \"100%\",\n padding: \"10px 12px\",\n borderRadius: \"6px\",\n border: \"1px solid #D9D9D9\",\n color: \"var(--Base-Strong, #2E3236)\",\n fontSize: \"16px\",\n fontStyle: \"normal\",\n fontWeight: 400,\n lineHeight: \"normal\",\n outline: \"none\",\n boxSizing: \"border-box\",\n background: \"#FFF\",\n transition: \"border-color 0.15s ease\",\n ...props.style,\n }}\n onFocus={(e) => {\n e.currentTarget.style.borderColor = \"#808183\";\n props.onFocus?.(e);\n }}\n onBlur={(e) => {\n e.currentTarget.style.borderColor = \"#D9D9D9\";\n props.onBlur?.(e);\n }}\n />\n );\n}\n"],"names":["SideDrawer","open","onClose","title","subtitle","children","footer","width","height","toggleLabel","toggleChecked","onToggle","topOffset","drawerRef","useRef","isPhone","useMediaQuery","hasTopOffset","normalizedTopOffset","useEffect","handleKey","e","jsxs","Fragment","jsx","X","DrawerButton","label","variant","onClick","disabled","style","isPrimary","DrawerLabel","htmlFor","DrawerInput","props","_a"],"mappings":"mIAuBA,SAAwBA,EAAW,CACjC,KAAAC,EACA,QAAAC,EACA,MAAAC,EACA,SAAAC,EACA,SAAAC,EACA,OAAAC,EACA,MAAAC,EAAQ,IACR,OAAAC,EAAS,IACT,YAAAC,EACA,cAAAC,EACA,SAAAC,EACA,UAAAC,CACF,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,CAACS,GAAY,CAACE,IACdX,EAAA,cAAc,MAAM,WAAa,0BAEvC,EAEC,SAAAM,CAAA,CAAA,CAGP,CASO,SAASM,EAAY,CAAE,SAAA5B,EAAU,QAAA6B,GAAW,CAE/C,OAAAV,EAAA,IAAC,QAAA,CACC,QAAAU,EACA,MAAO,CACL,QAAS,QACT,MAAO,8BACP,SAAU,OACV,UAAW,SACX,WAAY,IACZ,WAAY,SACZ,aAAc,KAChB,EAEC,SAAA7B,CAAA,CAAA,CAGP,CAQO,SAAS8B,EAAYC,EAAO,CAE/B,OAAAZ,EAAA,IAAC,QAAA,CACE,GAAGY,EACJ,MAAO,CACL,MAAO,OACP,QAAS,YACT,aAAc,MACd,OAAQ,oBACR,MAAO,8BACP,SAAU,OACV,UAAW,SACX,WAAY,IACZ,WAAY,SACZ,QAAS,OACT,UAAW,aACX,WAAY,OACZ,WAAY,0BACZ,GAAGA,EAAM,KACX,EACA,QAAUf,GAAM,OACZA,EAAA,cAAc,MAAM,YAAc,WACpCgB,EAAAD,EAAM,UAAN,MAAAC,EAAA,KAAAD,EAAgBf,EAClB,EACA,OAASA,GAAM,OACXA,EAAA,cAAc,MAAM,YAAc,WACpCgB,EAAAD,EAAM,SAAN,MAAAC,EAAA,KAAAD,EAAef,EACjB,CAAA,CAAA,CAGN"}
@@ -1,4 +1,4 @@
1
- import { jsxs as s, Fragment as g, jsx as n } from "react/jsx-runtime";
1
+ import { jsxs as d, Fragment as y, jsx as n } from "react/jsx-runtime";
2
2
  import { useRef as S, useEffect as k } from "react";
3
3
  import { X as w } from "lucide-react";
4
4
  import { u as E } from "./useMediaQuery.es.js";
@@ -7,24 +7,24 @@ function I({
7
7
  onClose: t,
8
8
  title: r,
9
9
  subtitle: i,
10
- children: o,
11
- footer: l,
12
- width: y = 515,
10
+ children: x,
11
+ footer: o,
12
+ width: s = 515,
13
13
  height: b = 762,
14
- toggleLabel: x,
15
- toggleChecked: u,
16
- onToggle: h,
14
+ toggleLabel: u,
15
+ toggleChecked: h,
16
+ onToggle: f,
17
17
  topOffset: c
18
18
  }) {
19
- const m = S(null), a = E("(max-width: 640px)"), f = c != null, p = typeof c == "number" ? `${c}px` : c;
19
+ const m = S(null), a = E("(max-width: 640px)"), p = c != null, g = typeof c == "number" ? `${c}px` : c;
20
20
  return k(() => {
21
21
  if (!e)
22
22
  return;
23
- const d = (v) => {
23
+ const l = (v) => {
24
24
  v.key === "Escape" && (t == null || t());
25
25
  };
26
- return document.addEventListener("keydown", d), () => document.removeEventListener("keydown", d);
27
- }, [e, t]), e ? /* @__PURE__ */ s(g, { children: [
26
+ return document.addEventListener("keydown", l), () => document.removeEventListener("keydown", l);
27
+ }, [e, t]), e ? /* @__PURE__ */ d(y, { children: [
28
28
  /* @__PURE__ */ n(
29
29
  "div",
30
30
  {
@@ -37,7 +37,7 @@ function I({
37
37
  }
38
38
  }
39
39
  ),
40
- /* @__PURE__ */ s(
40
+ /* @__PURE__ */ d(
41
41
  "div",
42
42
  {
43
43
  ref: m,
@@ -45,15 +45,15 @@ function I({
45
45
  position: "fixed",
46
46
  // On phones the drawer fills the screen so its content isn't clipped
47
47
  // off the left edge by a fixed width wider than the viewport.
48
- top: a ? 0 : f ? p : "50%",
48
+ top: a ? 0 : p ? g : "50%",
49
49
  right: 0,
50
- transform: a || f ? "none" : "translateY(-50%)",
50
+ transform: a || p ? "none" : "translateY(-50%)",
51
51
  zIndex: 1201,
52
52
  display: "flex",
53
- width: a ? "100vw" : y,
53
+ width: a ? "100vw" : s,
54
54
  maxWidth: "100vw",
55
55
  height: a ? "100dvh" : b,
56
- maxHeight: a ? "100dvh" : f ? `calc(100vh - ${p})` : "100vh",
56
+ maxHeight: a ? "100dvh" : p ? `calc(100vh - ${g})` : "100vh",
57
57
  padding: "20px",
58
58
  // border-box only on phones (full-screen) so the desktop drawer keeps
59
59
  // its original content-box width (515px content + padding).
@@ -66,7 +66,7 @@ function I({
66
66
  boxShadow: "648px 0 100px 0 rgba(0, 0, 0, 0.20)"
67
67
  },
68
68
  children: [
69
- /* @__PURE__ */ s(
69
+ /* @__PURE__ */ d(
70
70
  "div",
71
71
  {
72
72
  style: {
@@ -108,11 +108,11 @@ function I({
108
108
  borderRadius: "4px",
109
109
  transition: "background 0.15s ease"
110
110
  },
111
- onMouseEnter: (d) => {
112
- d.currentTarget.style.background = "#ECEEF2";
111
+ onMouseEnter: (l) => {
112
+ l.currentTarget.style.background = "#ECEEF2";
113
113
  },
114
- onMouseLeave: (d) => {
115
- d.currentTarget.style.background = "transparent";
114
+ onMouseLeave: (l) => {
115
+ l.currentTarget.style.background = "transparent";
116
116
  },
117
117
  children: /* @__PURE__ */ n(w, { size: 20, strokeWidth: 2 })
118
118
  }
@@ -131,7 +131,7 @@ function I({
131
131
  }
132
132
  }
133
133
  ),
134
- (i || x) && /* @__PURE__ */ s(
134
+ (i || u) && /* @__PURE__ */ d(
135
135
  "div",
136
136
  {
137
137
  style: {
@@ -158,7 +158,7 @@ function I({
158
158
  children: i
159
159
  }
160
160
  ),
161
- x && /* @__PURE__ */ s(
161
+ u && /* @__PURE__ */ d(
162
162
  "div",
163
163
  {
164
164
  style: {
@@ -171,14 +171,14 @@ function I({
171
171
  /* @__PURE__ */ n(
172
172
  "button",
173
173
  {
174
- onClick: () => h == null ? void 0 : h(!u),
174
+ onClick: () => f == null ? void 0 : f(!h),
175
175
  style: {
176
176
  position: "relative",
177
177
  width: "40px",
178
178
  height: "22px",
179
179
  borderRadius: "11px",
180
180
  border: "none",
181
- background: u ? "var(--Base-Strong, #0B0B0B)" : "var(--Base-Faint, #D9D9D9)",
181
+ background: h ? "var(--Base-Strong, #0B0B0B)" : "var(--Base-Faint, #D9D9D9)",
182
182
  cursor: "pointer",
183
183
  transition: "background 0.2s ease",
184
184
  padding: 0,
@@ -190,7 +190,7 @@ function I({
190
190
  style: {
191
191
  position: "absolute",
192
192
  top: "2px",
193
- left: u ? "20px" : "2px",
193
+ left: h ? "20px" : "2px",
194
194
  width: "18px",
195
195
  height: "18px",
196
196
  borderRadius: "50%",
@@ -211,7 +211,7 @@ function I({
211
211
  color: "var(--Base-Strong, #1E1E1E)",
212
212
  lineHeight: 1.4
213
213
  },
214
- children: x
214
+ children: u
215
215
  }
216
216
  )
217
217
  ]
@@ -232,10 +232,10 @@ function I({
232
232
  gap: "16px",
233
233
  minHeight: 0
234
234
  },
235
- children: o
235
+ children: x
236
236
  }
237
237
  ),
238
- l && /* @__PURE__ */ s(g, { children: [
238
+ o && /* @__PURE__ */ d(y, { children: [
239
239
  /* @__PURE__ */ n(
240
240
  "div",
241
241
  {
@@ -258,7 +258,7 @@ function I({
258
258
  width: "100%",
259
259
  flexShrink: 0
260
260
  },
261
- children: l
261
+ children: o
262
262
  }
263
263
  )
264
264
  ] })
@@ -271,7 +271,8 @@ function W({
271
271
  label: e,
272
272
  variant: t = "secondary",
273
273
  onClick: r,
274
- disabled: i
274
+ disabled: i,
275
+ style: x
275
276
  }) {
276
277
  const o = t === "primary";
277
278
  return /* @__PURE__ */ n(
@@ -294,13 +295,14 @@ function W({
294
295
  fontWeight: 600,
295
296
  cursor: i ? "default" : "pointer",
296
297
  opacity: i ? 0.5 : 1,
297
- transition: "all 0.15s ease"
298
+ transition: "all 0.15s ease",
299
+ ...x
298
300
  },
299
- onMouseEnter: (l) => {
300
- !i && !o && (l.currentTarget.style.background = "#ECEEF2");
301
+ onMouseEnter: (s) => {
302
+ !i && !o && (s.currentTarget.style.background = "#ECEEF2");
301
303
  },
302
- onMouseLeave: (l) => {
303
- !i && !o && (l.currentTarget.style.background = "var(--Base-White, #FFF)");
304
+ onMouseLeave: (s) => {
305
+ !i && !o && (s.currentTarget.style.background = "var(--Base-White, #FFF)");
304
306
  },
305
307
  children: e
306
308
  }
@@ -1 +1 @@
1
- {"version":3,"file":"SideDrawer.es.js","sources":["../src/components/common/SideDrawer.jsx"],"sourcesContent":["\"use client\";\n\nimport React, { useEffect, useRef } from \"react\";\nimport { X } from \"lucide-react\";\nimport { useMediaQuery } from \"../../utils/useMediaQuery\";\n\n/**\n * SideDrawer — slide-in panel from the right edge.\n *\n * Props:\n * - open boolean Whether the drawer is visible\n * - onClose function Close callback\n * - title string Header title\n * - subtitle string Optional description below the divider\n * - children ReactNode Drawer body content\n * - footer ReactNode Optional fixed footer (e.g. Cancel/Save buttons)\n * - width number|string Drawer width (default 515)\n * - height number|string Drawer height (default 762)\n * - toggleLabel string Optional toggle label (right side of subtitle row)\n * - toggleChecked boolean Toggle state\n * - onToggle function Toggle callback\n * - topOffset number|string Optional top offset (e.g. below navbar)\n */\nexport default function SideDrawer({\n open,\n onClose,\n title,\n subtitle,\n children,\n footer,\n width = 515,\n height = 762,\n toggleLabel,\n toggleChecked,\n onToggle,\n topOffset,\n}) {\n const drawerRef = useRef(null);\n const isPhone = useMediaQuery(\"(max-width: 640px)\");\n const hasTopOffset = topOffset !== undefined && topOffset !== null;\n const normalizedTopOffset = typeof topOffset === \"number\" ? `${topOffset}px` : topOffset;\n\n // Close on Escape key\n useEffect(() => {\n if (!open) return;\n const handleKey = (e) => {\n if (e.key === \"Escape\") onClose?.();\n };\n document.addEventListener(\"keydown\", handleKey);\n return () => document.removeEventListener(\"keydown\", handleKey);\n }, [open, onClose]);\n\n if (!open) return null;\n\n return (\n <>\n {/* Backdrop */}\n <div\n onClick={onClose}\n style={{\n position: \"fixed\",\n inset: 0,\n zIndex: 1200,\n background: \"rgba(0, 0, 0, 0.20)\",\n }}\n />\n\n {/* Drawer panel */}\n <div\n ref={drawerRef}\n style={{\n position: \"fixed\",\n // On phones the drawer fills the screen so its content isn't clipped\n // off the left edge by a fixed width wider than the viewport.\n top: isPhone ? 0 : hasTopOffset ? normalizedTopOffset : \"50%\",\n right: 0,\n transform: isPhone ? \"none\" : hasTopOffset ? \"none\" : \"translateY(-50%)\",\n zIndex: 1201,\n display: \"flex\",\n width: isPhone ? \"100vw\" : width,\n maxWidth: \"100vw\",\n height: isPhone ? \"100dvh\" : height,\n maxHeight: isPhone ? \"100dvh\" : hasTopOffset ? `calc(100vh - ${normalizedTopOffset})` : \"100vh\",\n padding: \"20px\",\n // border-box only on phones (full-screen) so the desktop drawer keeps\n // its original content-box width (515px content + padding).\n boxSizing: isPhone ? \"border-box\" : undefined,\n flexDirection: \"column\",\n alignItems: \"flex-start\",\n gap: \"20px\",\n borderRadius: isPhone ? 0 : \"12px 0 0 12px\",\n background: \"#FFF\",\n boxShadow: \"648px 0 100px 0 rgba(0, 0, 0, 0.20)\",\n }}\n >\n {/* Header: Title + Close */}\n <div\n style={{\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n width: \"100%\",\n flexShrink: 0,\n }}\n >\n <h2\n style={{\n fontSize: \"24px\",\n fontWeight: 600,\n fontStyle: \"normal\",\n color: \"var(--Grey-3, #252525)\",\n margin: 0,\n lineHeight: \"normal\",\n }}\n >\n {title}\n </h2>\n <button\n onClick={onClose}\n style={{\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n width: \"28px\",\n height: \"28px\",\n border: \"none\",\n background: \"transparent\",\n color: \"var(--Grey-Strong, #808183)\",\n cursor: \"pointer\",\n borderRadius: \"4px\",\n transition: \"background 0.15s ease\",\n }}\n onMouseEnter={(e) => {\n e.currentTarget.style.background = \"#ECEEF2\";\n }}\n onMouseLeave={(e) => {\n e.currentTarget.style.background = \"transparent\";\n }}\n >\n <X size={20} strokeWidth={2} />\n </button>\n </div>\n\n {/* Divider */}\n <div\n style={{\n width: \"100%\",\n height: \"1px\",\n background: \"#ECEEF2\",\n flexShrink: 0,\n }}\n />\n\n {/* Subtitle row with optional toggle */}\n {(subtitle || toggleLabel) && (\n <div\n style={{\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n width: \"100%\",\n gap: \"12px\",\n flexShrink: 0,\n }}\n >\n {subtitle && (\n <p\n style={{\n fontSize: \"13px\",\n fontStyle: \"normal\",\n fontWeight: 400,\n lineHeight: \"140%\",\n color: \"#0B0B0B\",\n margin: 0,\n flex: 1,\n }}\n >\n {subtitle}\n </p>\n )}\n {toggleLabel && (\n <div\n style={{\n display: \"flex\",\n alignItems: \"center\",\n gap: \"8px\",\n flexShrink: 0,\n }}\n >\n {/* Toggle switch */}\n <button\n onClick={() => onToggle?.(!toggleChecked)}\n style={{\n position: \"relative\",\n width: \"40px\",\n height: \"22px\",\n borderRadius: \"11px\",\n border: \"none\",\n background: toggleChecked\n ? \"var(--Base-Strong, #0B0B0B)\"\n : \"var(--Base-Faint, #D9D9D9)\",\n cursor: \"pointer\",\n transition: \"background 0.2s ease\",\n padding: 0,\n flexShrink: 0,\n }}\n >\n <div\n style={{\n position: \"absolute\",\n top: \"2px\",\n left: toggleChecked ? \"20px\" : \"2px\",\n width: \"18px\",\n height: \"18px\",\n borderRadius: \"50%\",\n background: \"#FFF\",\n transition: \"left 0.2s ease\",\n boxShadow: \"0 1px 3px rgba(0,0,0,0.15)\",\n }}\n />\n </button>\n <span\n style={{\n fontSize: \"13px\",\n fontWeight: 500,\n color: \"var(--Base-Strong, #1E1E1E)\",\n lineHeight: 1.4,\n }}\n >\n {toggleLabel}\n </span>\n </div>\n )}\n </div>\n )}\n\n {/* Body content — scrollable */}\n <div\n style={{\n flex: 1,\n width: \"100%\",\n overflowY: \"auto\",\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"16px\",\n minHeight: 0,\n }}\n >\n {children}\n </div>\n\n {/* Footer */}\n {footer && (\n <>\n <div\n style={{\n width: \"100%\",\n height: \"1px\",\n background: \"#ECEEF2\",\n flexShrink: 0,\n }}\n />\n <div\n style={{\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"flex-end\",\n gap: \"12px\",\n width: \"100%\",\n flexShrink: 0,\n }}\n >\n {footer}\n </div>\n </>\n )}\n </div>\n </>\n );\n}\n\n/**\n * DrawerButton — standard button for use in SideDrawer footer.\n *\n * Props:\n * - label string\n * - variant \"primary\" | \"secondary\" (default \"secondary\")\n * - onClick function\n * - disabled boolean\n */\nexport function DrawerButton({\n label,\n variant = \"secondary\",\n onClick,\n disabled,\n}) {\n const isPrimary = variant === \"primary\";\n\n return (\n <button\n onClick={onClick}\n disabled={disabled}\n style={{\n display: \"flex\",\n height: \"36px\",\n padding: \"0 20px\",\n justifyContent: \"center\",\n alignItems: \"center\",\n gap: \"8px\",\n borderRadius: \"6px\",\n border: isPrimary ? \"none\" : \"1px solid #D9D9D9\",\n background: isPrimary\n ? \"var(--Base-Strong, #0B0B0B)\"\n : \"var(--Base-White, #FFF)\",\n color: isPrimary ? \"#FFF\" : \"var(--Base-Strong, #1E1E1E)\",\n fontSize: \"16px\",\n fontWeight: 600,\n cursor: disabled ? \"default\" : \"pointer\",\n opacity: disabled ? 0.5 : 1,\n transition: \"all 0.15s ease\",\n }}\n onMouseEnter={(e) => {\n if (!disabled && !isPrimary) {\n e.currentTarget.style.background = \"#ECEEF2\";\n }\n }}\n onMouseLeave={(e) => {\n if (!disabled && !isPrimary) {\n e.currentTarget.style.background = \"var(--Base-White, #FFF)\";\n }\n }}\n >\n {label}\n </button>\n );\n}\n\n/**\n * DrawerLabel — form label for use inside SideDrawer.\n *\n * Props:\n * - children ReactNode\n * - htmlFor string\n */\nexport function DrawerLabel({ children, htmlFor }) {\n return (\n <label\n htmlFor={htmlFor}\n style={{\n display: \"block\",\n color: \"var(--Base-Strong, #2E3236)\",\n fontSize: \"16px\",\n fontStyle: \"normal\",\n fontWeight: 400,\n lineHeight: \"normal\",\n marginBottom: \"6px\",\n }}\n >\n {children}\n </label>\n );\n}\n\n/**\n * DrawerInput — text input for use inside SideDrawer.\n *\n * Props:\n * - All standard <input> props (type, placeholder, value, onChange, etc.)\n */\nexport function DrawerInput(props) {\n return (\n <input\n {...props}\n style={{\n width: \"100%\",\n padding: \"10px 12px\",\n borderRadius: \"6px\",\n border: \"1px solid #D9D9D9\",\n color: \"var(--Base-Strong, #2E3236)\",\n fontSize: \"16px\",\n fontStyle: \"normal\",\n fontWeight: 400,\n lineHeight: \"normal\",\n outline: \"none\",\n boxSizing: \"border-box\",\n background: \"#FFF\",\n transition: \"border-color 0.15s ease\",\n ...props.style,\n }}\n onFocus={(e) => {\n e.currentTarget.style.borderColor = \"#808183\";\n props.onFocus?.(e);\n }}\n onBlur={(e) => {\n e.currentTarget.style.borderColor = \"#D9D9D9\";\n props.onBlur?.(e);\n }}\n />\n );\n}\n"],"names":["SideDrawer","open","onClose","title","subtitle","children","footer","width","height","toggleLabel","toggleChecked","onToggle","topOffset","drawerRef","useRef","isPhone","useMediaQuery","hasTopOffset","normalizedTopOffset","useEffect","handleKey","e","jsxs","Fragment","jsx","X","DrawerButton","label","variant","onClick","disabled","isPrimary","DrawerLabel","htmlFor","DrawerInput","props","_a"],"mappings":";;;;AAuBA,SAAwBA,EAAW;AAAA,EACjC,MAAAC;AAAA,EACA,SAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,OAAAC,IAAQ;AAAA,EACR,QAAAC,IAAS;AAAA,EACT,aAAAC;AAAA,EACA,eAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AACF,GAAG;AACK,QAAAC,IAAYC,EAAO,IAAI,GACvBC,IAAUC,EAAc,oBAAoB,GAC5CC,IAA0CL,KAAc,MACxDM,IAAsB,OAAON,KAAc,WAAW,GAAGA,CAAS,OAAOA;AAY/E,SATAO,EAAU,MAAM;AACd,QAAI,CAAClB;AAAM;AACL,UAAAmB,IAAY,CAACC,MAAM;AACvB,MAAIA,EAAE,QAAQ,aAAoBnB,KAAA,QAAAA;AAAA,IAAA;AAE3B,oBAAA,iBAAiB,WAAWkB,CAAS,GACvC,MAAM,SAAS,oBAAoB,WAAWA,CAAS;AAAA,EAAA,GAC7D,CAACnB,GAAMC,CAAO,CAAC,GAEbD,IAKD,gBAAAqB,EAAAC,GAAA,EAAA,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,SAAStB;AAAA,QACT,OAAO;AAAA,UACL,UAAU;AAAA,UAC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;AAAA,MACA,cAAc,CAACA,MAAM;AACf,QAAA,CAACS,KAAY,CAACC,MACdV,EAAA,cAAc,MAAM,aAAa;AAAA,MAEvC;AAAA,MAEC,UAAAM;AAAA,IAAA;AAAA,EAAA;AAGP;AASO,SAASK,EAAY,EAAE,UAAA3B,GAAU,SAAA4B,KAAW;AAE/C,SAAA,gBAAAT;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,SAAAS;AAAA,MACA,OAAO;AAAA,QACL,SAAS;AAAA,QACT,OAAO;AAAA,QACP,UAAU;AAAA,QACV,WAAW;AAAA,QACX,YAAY;AAAA,QACZ,YAAY;AAAA,QACZ,cAAc;AAAA,MAChB;AAAA,MAEC,UAAA5B;AAAA,IAAA;AAAA,EAAA;AAGP;AAQO,SAAS6B,EAAYC,GAAO;AAE/B,SAAA,gBAAAX;AAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAGW;AAAA,MACJ,OAAO;AAAA,QACL,OAAO;AAAA,QACP,SAAS;AAAA,QACT,cAAc;AAAA,QACd,QAAQ;AAAA,QACR,OAAO;AAAA,QACP,UAAU;AAAA,QACV,WAAW;AAAA,QACX,YAAY;AAAA,QACZ,YAAY;AAAA,QACZ,SAAS;AAAA,QACT,WAAW;AAAA,QACX,YAAY;AAAA,QACZ,YAAY;AAAA,QACZ,GAAGA,EAAM;AAAA,MACX;AAAA,MACA,SAAS,CAACd,MAAM;;AACZ,QAAAA,EAAA,cAAc,MAAM,cAAc,YACpCe,IAAAD,EAAM,YAAN,QAAAC,EAAA,KAAAD,GAAgBd;AAAA,MAClB;AAAA,MACA,QAAQ,CAACA,MAAM;;AACX,QAAAA,EAAA,cAAc,MAAM,cAAc,YACpCe,IAAAD,EAAM,WAAN,QAAAC,EAAA,KAAAD,GAAed;AAAA,MACjB;AAAA,IAAA;AAAA,EAAA;AAGN;"}
1
+ {"version":3,"file":"SideDrawer.es.js","sources":["../src/components/common/SideDrawer.jsx"],"sourcesContent":["\"use client\";\n\nimport React, { useEffect, useRef } from \"react\";\nimport { X } from \"lucide-react\";\nimport { useMediaQuery } from \"../../utils/useMediaQuery\";\n\n/**\n * SideDrawer — slide-in panel from the right edge.\n *\n * Props:\n * - open boolean Whether the drawer is visible\n * - onClose function Close callback\n * - title string Header title\n * - subtitle string Optional description below the divider\n * - children ReactNode Drawer body content\n * - footer ReactNode Optional fixed footer (e.g. Cancel/Save buttons)\n * - width number|string Drawer width (default 515)\n * - height number|string Drawer height (default 762)\n * - toggleLabel string Optional toggle label (right side of subtitle row)\n * - toggleChecked boolean Toggle state\n * - onToggle function Toggle callback\n * - topOffset number|string Optional top offset (e.g. below navbar)\n */\nexport default function SideDrawer({\n open,\n onClose,\n title,\n subtitle,\n children,\n footer,\n width = 515,\n height = 762,\n toggleLabel,\n toggleChecked,\n onToggle,\n topOffset,\n}) {\n const drawerRef = useRef(null);\n const isPhone = useMediaQuery(\"(max-width: 640px)\");\n const hasTopOffset = topOffset !== undefined && topOffset !== null;\n const normalizedTopOffset = typeof topOffset === \"number\" ? `${topOffset}px` : topOffset;\n\n // Close on Escape key\n useEffect(() => {\n if (!open) return;\n const handleKey = (e) => {\n if (e.key === \"Escape\") onClose?.();\n };\n document.addEventListener(\"keydown\", handleKey);\n return () => document.removeEventListener(\"keydown\", handleKey);\n }, [open, onClose]);\n\n if (!open) return null;\n\n return (\n <>\n {/* Backdrop */}\n <div\n onClick={onClose}\n style={{\n position: \"fixed\",\n inset: 0,\n zIndex: 1200,\n background: \"rgba(0, 0, 0, 0.20)\",\n }}\n />\n\n {/* Drawer panel */}\n <div\n ref={drawerRef}\n style={{\n position: \"fixed\",\n // On phones the drawer fills the screen so its content isn't clipped\n // off the left edge by a fixed width wider than the viewport.\n top: isPhone ? 0 : hasTopOffset ? normalizedTopOffset : \"50%\",\n right: 0,\n transform: isPhone ? \"none\" : hasTopOffset ? \"none\" : \"translateY(-50%)\",\n zIndex: 1201,\n display: \"flex\",\n width: isPhone ? \"100vw\" : width,\n maxWidth: \"100vw\",\n height: isPhone ? \"100dvh\" : height,\n maxHeight: isPhone ? \"100dvh\" : hasTopOffset ? `calc(100vh - ${normalizedTopOffset})` : \"100vh\",\n padding: \"20px\",\n // border-box only on phones (full-screen) so the desktop drawer keeps\n // its original content-box width (515px content + padding).\n boxSizing: isPhone ? \"border-box\" : undefined,\n flexDirection: \"column\",\n alignItems: \"flex-start\",\n gap: \"20px\",\n borderRadius: isPhone ? 0 : \"12px 0 0 12px\",\n background: \"#FFF\",\n boxShadow: \"648px 0 100px 0 rgba(0, 0, 0, 0.20)\",\n }}\n >\n {/* Header: Title + Close */}\n <div\n style={{\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n width: \"100%\",\n flexShrink: 0,\n }}\n >\n <h2\n style={{\n fontSize: \"24px\",\n fontWeight: 600,\n fontStyle: \"normal\",\n color: \"var(--Grey-3, #252525)\",\n margin: 0,\n lineHeight: \"normal\",\n }}\n >\n {title}\n </h2>\n <button\n onClick={onClose}\n style={{\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n width: \"28px\",\n height: \"28px\",\n border: \"none\",\n background: \"transparent\",\n color: \"var(--Grey-Strong, #808183)\",\n cursor: \"pointer\",\n borderRadius: \"4px\",\n transition: \"background 0.15s ease\",\n }}\n onMouseEnter={(e) => {\n e.currentTarget.style.background = \"#ECEEF2\";\n }}\n onMouseLeave={(e) => {\n e.currentTarget.style.background = \"transparent\";\n }}\n >\n <X size={20} strokeWidth={2} />\n </button>\n </div>\n\n {/* Divider */}\n <div\n style={{\n width: \"100%\",\n height: \"1px\",\n background: \"#ECEEF2\",\n flexShrink: 0,\n }}\n />\n\n {/* Subtitle row with optional toggle */}\n {(subtitle || toggleLabel) && (\n <div\n style={{\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n width: \"100%\",\n gap: \"12px\",\n flexShrink: 0,\n }}\n >\n {subtitle && (\n <p\n style={{\n fontSize: \"13px\",\n fontStyle: \"normal\",\n fontWeight: 400,\n lineHeight: \"140%\",\n color: \"#0B0B0B\",\n margin: 0,\n flex: 1,\n }}\n >\n {subtitle}\n </p>\n )}\n {toggleLabel && (\n <div\n style={{\n display: \"flex\",\n alignItems: \"center\",\n gap: \"8px\",\n flexShrink: 0,\n }}\n >\n {/* Toggle switch */}\n <button\n onClick={() => onToggle?.(!toggleChecked)}\n style={{\n position: \"relative\",\n width: \"40px\",\n height: \"22px\",\n borderRadius: \"11px\",\n border: \"none\",\n background: toggleChecked\n ? \"var(--Base-Strong, #0B0B0B)\"\n : \"var(--Base-Faint, #D9D9D9)\",\n cursor: \"pointer\",\n transition: \"background 0.2s ease\",\n padding: 0,\n flexShrink: 0,\n }}\n >\n <div\n style={{\n position: \"absolute\",\n top: \"2px\",\n left: toggleChecked ? \"20px\" : \"2px\",\n width: \"18px\",\n height: \"18px\",\n borderRadius: \"50%\",\n background: \"#FFF\",\n transition: \"left 0.2s ease\",\n boxShadow: \"0 1px 3px rgba(0,0,0,0.15)\",\n }}\n />\n </button>\n <span\n style={{\n fontSize: \"13px\",\n fontWeight: 500,\n color: \"var(--Base-Strong, #1E1E1E)\",\n lineHeight: 1.4,\n }}\n >\n {toggleLabel}\n </span>\n </div>\n )}\n </div>\n )}\n\n {/* Body content — scrollable */}\n <div\n style={{\n flex: 1,\n width: \"100%\",\n overflowY: \"auto\",\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"16px\",\n minHeight: 0,\n }}\n >\n {children}\n </div>\n\n {/* Footer */}\n {footer && (\n <>\n <div\n style={{\n width: \"100%\",\n height: \"1px\",\n background: \"#ECEEF2\",\n flexShrink: 0,\n }}\n />\n <div\n style={{\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"flex-end\",\n gap: \"12px\",\n width: \"100%\",\n flexShrink: 0,\n }}\n >\n {footer}\n </div>\n </>\n )}\n </div>\n </>\n );\n}\n\n/**\n * DrawerButton — standard button for use in SideDrawer footer.\n *\n * Props:\n * - label string\n * - variant \"primary\" | \"secondary\" (default \"secondary\")\n * - onClick function\n * - disabled boolean\n */\nexport function DrawerButton({\n label,\n variant = \"secondary\",\n onClick,\n disabled,\n style,\n}) {\n const isPrimary = variant === \"primary\";\n\n return (\n <button\n onClick={onClick}\n disabled={disabled}\n style={{\n display: \"flex\",\n height: \"36px\",\n padding: \"0 20px\",\n justifyContent: \"center\",\n alignItems: \"center\",\n gap: \"8px\",\n borderRadius: \"6px\",\n border: isPrimary ? \"none\" : \"1px solid #D9D9D9\",\n background: isPrimary\n ? \"var(--Base-Strong, #0B0B0B)\"\n : \"var(--Base-White, #FFF)\",\n color: isPrimary ? \"#FFF\" : \"var(--Base-Strong, #1E1E1E)\",\n fontSize: \"16px\",\n fontWeight: 600,\n cursor: disabled ? \"default\" : \"pointer\",\n opacity: disabled ? 0.5 : 1,\n transition: \"all 0.15s ease\",\n ...style,\n }}\n onMouseEnter={(e) => {\n if (!disabled && !isPrimary) {\n e.currentTarget.style.background = \"#ECEEF2\";\n }\n }}\n onMouseLeave={(e) => {\n if (!disabled && !isPrimary) {\n e.currentTarget.style.background = \"var(--Base-White, #FFF)\";\n }\n }}\n >\n {label}\n </button>\n );\n}\n\n/**\n * DrawerLabel — form label for use inside SideDrawer.\n *\n * Props:\n * - children ReactNode\n * - htmlFor string\n */\nexport function DrawerLabel({ children, htmlFor }) {\n return (\n <label\n htmlFor={htmlFor}\n style={{\n display: \"block\",\n color: \"var(--Base-Strong, #2E3236)\",\n fontSize: \"16px\",\n fontStyle: \"normal\",\n fontWeight: 400,\n lineHeight: \"normal\",\n marginBottom: \"6px\",\n }}\n >\n {children}\n </label>\n );\n}\n\n/**\n * DrawerInput — text input for use inside SideDrawer.\n *\n * Props:\n * - All standard <input> props (type, placeholder, value, onChange, etc.)\n */\nexport function DrawerInput(props) {\n return (\n <input\n {...props}\n style={{\n width: \"100%\",\n padding: \"10px 12px\",\n borderRadius: \"6px\",\n border: \"1px solid #D9D9D9\",\n color: \"var(--Base-Strong, #2E3236)\",\n fontSize: \"16px\",\n fontStyle: \"normal\",\n fontWeight: 400,\n lineHeight: \"normal\",\n outline: \"none\",\n boxSizing: \"border-box\",\n background: \"#FFF\",\n transition: \"border-color 0.15s ease\",\n ...props.style,\n }}\n onFocus={(e) => {\n e.currentTarget.style.borderColor = \"#808183\";\n props.onFocus?.(e);\n }}\n onBlur={(e) => {\n e.currentTarget.style.borderColor = \"#D9D9D9\";\n props.onBlur?.(e);\n }}\n />\n );\n}\n"],"names":["SideDrawer","open","onClose","title","subtitle","children","footer","width","height","toggleLabel","toggleChecked","onToggle","topOffset","drawerRef","useRef","isPhone","useMediaQuery","hasTopOffset","normalizedTopOffset","useEffect","handleKey","e","jsxs","Fragment","jsx","X","DrawerButton","label","variant","onClick","disabled","style","isPrimary","DrawerLabel","htmlFor","DrawerInput","props","_a"],"mappings":";;;;AAuBA,SAAwBA,EAAW;AAAA,EACjC,MAAAC;AAAA,EACA,SAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,OAAAC,IAAQ;AAAA,EACR,QAAAC,IAAS;AAAA,EACT,aAAAC;AAAA,EACA,eAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AACF,GAAG;AACK,QAAAC,IAAYC,EAAO,IAAI,GACvBC,IAAUC,EAAc,oBAAoB,GAC5CC,IAA0CL,KAAc,MACxDM,IAAsB,OAAON,KAAc,WAAW,GAAGA,CAAS,OAAOA;AAY/E,SATAO,EAAU,MAAM;AACd,QAAI,CAAClB;AAAM;AACL,UAAAmB,IAAY,CAACC,MAAM;AACvB,MAAIA,EAAE,QAAQ,aAAoBnB,KAAA,QAAAA;AAAA,IAAA;AAE3B,oBAAA,iBAAiB,WAAWkB,CAAS,GACvC,MAAM,SAAS,oBAAoB,WAAWA,CAAS;AAAA,EAAA,GAC7D,CAACnB,GAAMC,CAAO,CAAC,GAEbD,IAKD,gBAAAqB,EAAAC,GAAA,EAAA,UAAA;AAAA,IAAA,gBAAAC;AAAA,M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