boottent-design 0.1.131 → 0.1.132
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components.cjs.js +1 -1
- package/dist/components.es.js +2 -2
- package/dist/{portal-container-CTX8yyVr.js → portal-container-BrmW99Cu.js} +30 -30
- package/dist/portal-container-BveN4tv_.cjs +11 -0
- package/dist/provider.cjs.js +1 -1
- package/dist/provider.es.js +1 -1
- package/package.json +1 -1
- package/dist/portal-container-DbRKb1xO.cjs +0 -11
package/dist/components.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),fe=require("./index-DKCqkplO.cjs"),s=require("./index-Cv9m35ew.cjs"),A=require("react"),V=require("./index-z9hRvvSX.cjs"),_=require("./index-ayoS8j25.cjs"),U=require("./portal-container-DbRKb1xO.cjs");function Dn(r){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>r[t]})}}return e.default=r,Object.freeze(e)}const x=Dn(A);var rt="Collapsible",[Vn,Lt]=s.createContextScope(rt),[Bn,nt]=Vn(rt),Ut=x.forwardRef((r,e)=>{const{__scopeCollapsible:t,open:n,defaultOpen:o,disabled:i,onOpenChange:d,...f}=r,[c=!1,g]=s.useControllableState({prop:n,defaultProp:o,onChange:d});return a.jsx(Bn,{scope:t,disabled:i,contentId:s.useId(),open:c,onOpenToggle:x.useCallback(()=>g(v=>!v),[g]),children:a.jsx(s.Primitive.div,{"data-state":at(c),"data-disabled":i?"":void 0,...f,ref:e})})});Ut.displayName=rt;var Wt="CollapsibleTrigger",zt=x.forwardRef((r,e)=>{const{__scopeCollapsible:t,...n}=r,o=nt(Wt,t);return a.jsx(s.Primitive.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":at(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...n,ref:e,onClick:s.composeEventHandlers(r.onClick,o.onOpenToggle)})});zt.displayName=Wt;var ot="CollapsibleContent",Gt=x.forwardRef((r,e)=>{const{forceMount:t,...n}=r,o=nt(ot,r.__scopeCollapsible);return a.jsx(s.Presence,{present:t||o.open,children:({present:i})=>a.jsx(Ln,{...n,ref:e,present:i})})});Gt.displayName=ot;var Ln=x.forwardRef((r,e)=>{const{__scopeCollapsible:t,present:n,children:o,...i}=r,d=nt(ot,t),[f,c]=x.useState(n),g=x.useRef(null),v=s.useComposedRefs(e,g),h=x.useRef(0),l=h.current,m=x.useRef(0),u=m.current,p=d.open||f,b=x.useRef(p),P=x.useRef();return x.useEffect(()=>{const T=requestAnimationFrame(()=>b.current=!1);return()=>cancelAnimationFrame(T)},[]),s.useLayoutEffect2(()=>{const T=g.current;if(T){P.current=P.current||{transitionDuration:T.style.transitionDuration,animationName:T.style.animationName},T.style.transitionDuration="0s",T.style.animationName="none";const C=T.getBoundingClientRect();h.current=C.height,m.current=C.width,b.current||(T.style.transitionDuration=P.current.transitionDuration,T.style.animationName=P.current.animationName),c(n)}},[d.open,n]),a.jsx(s.Primitive.div,{"data-state":at(d.open),"data-disabled":d.disabled?"":void 0,id:d.contentId,hidden:!p,...i,ref:v,style:{"--radix-collapsible-content-height":l?`${l}px`:void 0,"--radix-collapsible-content-width":u?`${u}px`:void 0,...r.style},children:p&&o})});function at(r){return r?"open":"closed"}var Un=Ut,Wn=zt,zn=Gt,K="Accordion",Gn=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[it,$n,Hn]=s.createCollection(K),[_e,Wi]=s.createContextScope(K,[Hn,Lt]),st=Lt(),$t=A.forwardRef((r,e)=>{const{type:t,...n}=r,o=n,i=n;return a.jsx(it.Provider,{scope:r.__scopeAccordion,children:t==="multiple"?a.jsx(Zn,{...i,ref:e}):a.jsx(Xn,{...o,ref:e})})});$t.displayName=K;var[Ht,qn]=_e(K),[qt,Yn]=_e(K,{collapsible:!1}),Xn=A.forwardRef((r,e)=>{const{value:t,defaultValue:n,onValueChange:o=()=>{},collapsible:i=!1,...d}=r,[f,c]=s.useControllableState({prop:t,defaultProp:n,onChange:o});return a.jsx(Ht,{scope:r.__scopeAccordion,value:f?[f]:[],onItemOpen:c,onItemClose:A.useCallback(()=>i&&c(""),[i,c]),children:a.jsx(qt,{scope:r.__scopeAccordion,collapsible:i,children:a.jsx(Yt,{...d,ref:e})})})}),Zn=A.forwardRef((r,e)=>{const{value:t,defaultValue:n,onValueChange:o=()=>{},...i}=r,[d=[],f]=s.useControllableState({prop:t,defaultProp:n,onChange:o}),c=A.useCallback(v=>f((h=[])=>[...h,v]),[f]),g=A.useCallback(v=>f((h=[])=>h.filter(l=>l!==v)),[f]);return a.jsx(Ht,{scope:r.__scopeAccordion,value:d,onItemOpen:c,onItemClose:g,children:a.jsx(qt,{scope:r.__scopeAccordion,collapsible:!0,children:a.jsx(Yt,{...i,ref:e})})})}),[Kn,Re]=_e(K),Yt=A.forwardRef((r,e)=>{const{__scopeAccordion:t,disabled:n,dir:o,orientation:i="vertical",...d}=r,f=A.useRef(null),c=s.useComposedRefs(f,e),g=$n(t),h=s.useDirection(o)==="ltr",l=s.composeEventHandlers(r.onKeyDown,m=>{var re;if(!Gn.includes(m.key))return;const u=m.target,p=g().filter(J=>{var Q;return!((Q=J.ref.current)!=null&&Q.disabled)}),b=p.findIndex(J=>J.ref.current===u),P=p.length;if(b===-1)return;m.preventDefault();let T=b;const C=0,w=P-1,E=()=>{T=b+1,T>w&&(T=C)},R=()=>{T=b-1,T<C&&(T=w)};switch(m.key){case"Home":T=C;break;case"End":T=w;break;case"ArrowRight":i==="horizontal"&&(h?E():R());break;case"ArrowDown":i==="vertical"&&E();break;case"ArrowLeft":i==="horizontal"&&(h?R():E());break;case"ArrowUp":i==="vertical"&&R();break}const $=T%P;(re=p[$].ref.current)==null||re.focus()});return a.jsx(Kn,{scope:t,disabled:n,direction:o,orientation:i,children:a.jsx(it.Slot,{scope:t,children:a.jsx(s.Primitive.div,{...d,"data-orientation":i,ref:c,onKeyDown:n?void 0:l})})})}),Ee="AccordionItem",[Jn,lt]=_e(Ee),Xt=A.forwardRef((r,e)=>{const{__scopeAccordion:t,value:n,...o}=r,i=Re(Ee,t),d=qn(Ee,t),f=st(t),c=s.useId(),g=n&&d.value.includes(n)||!1,v=i.disabled||r.disabled;return a.jsx(Jn,{scope:t,open:g,disabled:v,triggerId:c,children:a.jsx(Un,{"data-orientation":i.orientation,"data-state":tr(g),...f,...o,ref:e,disabled:v,open:g,onOpenChange:h=>{h?d.onItemOpen(n):d.onItemClose(n)}})})});Xt.displayName=Ee;var Zt="AccordionHeader",Kt=A.forwardRef((r,e)=>{const{__scopeAccordion:t,...n}=r,o=Re(K,t),i=lt(Zt,t);return a.jsx(s.Primitive.h3,{"data-orientation":o.orientation,"data-state":tr(i.open),"data-disabled":i.disabled?"":void 0,...n,ref:e})});Kt.displayName=Zt;var Xe="AccordionTrigger",Jt=A.forwardRef((r,e)=>{const{__scopeAccordion:t,...n}=r,o=Re(K,t),i=lt(Xe,t),d=Yn(Xe,t),f=st(t);return a.jsx(it.ItemSlot,{scope:t,children:a.jsx(Wn,{"aria-disabled":i.open&&!d.collapsible||void 0,"data-orientation":o.orientation,id:i.triggerId,...f,...n,ref:e})})});Jt.displayName=Xe;var Qt="AccordionContent",er=A.forwardRef((r,e)=>{const{__scopeAccordion:t,...n}=r,o=Re(K,t),i=lt(Qt,t),d=st(t);return a.jsx(zn,{role:"region","aria-labelledby":i.triggerId,"data-orientation":o.orientation,...d,...n,ref:e,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...r.style}})});er.displayName=Qt;function tr(r){return r?"open":"closed"}var Qn=$t,eo=Xt,to=Kt,rr=Jt,nr=er;const ro=Qn,or=x.forwardRef(({className:r,...e},t)=>a.jsx(eo,{ref:t,className:s.cn("w-full border-b",r),...e}));or.displayName="AccordionItem";const ar=x.forwardRef(({className:r,children:e,disabled:t,...n},o)=>a.jsx(to,{className:"flex",children:a.jsxs(rr,{ref:o,className:s.cn("flex flex-1 items-center justify-between py-4 text-start font-medium transition-all [&[data-state=open]>svg]:rotate-180",r),disabled:t,...n,children:[e,!t&&a.jsx(s.Icon.ArrowDown,{className:"shrink-0 transition-transform duration-200",fill:fe.colors.grey[600],size:"16"})]})}));ar.displayName=rr.displayName;const ir=x.forwardRef(({className:r,children:e,...t},n)=>a.jsx(nr,{ref:n,className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down transition-all",...t,children:a.jsx("div",{className:s.cn("overflow-hidden pb-4 text-sm",r),children:e})}));ir.displayName=nr.displayName;const no={Root:ro,Item:or,Trigger:ar,Content:ir},Oe=({src:r,alt:e,object:t="cover",lazy:n=!0,size:o="auto",className:i,...d})=>{const f={contain:"object-contain h-full",cover:"object-cover h-full",fill:"object-fill h-full","scale-down":"object-scale-down",none:"object-none"},c={full:"w-full",fit:"w-fit",auto:"w-auto"};let g="",v={};return typeof o=="string"?g=c[o]:typeof o=="number"&&(v={width:`${o}px`}),a.jsx("img",{src:r,alt:e?`${e} 이미지`:"이미지",loading:n?"lazy":"eager",className:s.cn(f[t],g,i),style:v,...d})},oo=864e5,sr=6e4,lr=36e5,It=Symbol.for("constructDateFrom");function ct(r,e){return typeof r=="function"?r(e):r&&typeof r=="object"&&It in r?r[It](e):r instanceof Date?new r.constructor(e):new Date(e)}function Ie(r,e){return ct(r,r)}function At(r){const e=Ie(r),t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),+r-+t}function cr(r,...e){const t=ct.bind(null,e.find(n=>typeof n=="object"));return e.map(t)}function Ft(r,e){const t=Ie(r);return t.setHours(0,0,0,0),t}function ao(r,e,t){const[n,o]=cr(t==null?void 0:t.in,r,e),i=Ft(n),d=Ft(o),f=+i-At(i),c=+d-At(d);return Math.round((f-c)/oo)}function io(r,e,t){const[n,o]=cr(t==null?void 0:t.in,r,e),i=Mt(n,o),d=Math.abs(ao(n,o));n.setDate(n.getDate()-i*d);const f=+(Mt(n,o)===-i),c=i*(d-f);return c===0?0:c}function Mt(r,e){const t=r.getFullYear()-e.getFullYear()||r.getMonth()-e.getMonth()||r.getDate()-e.getDate()||r.getHours()-e.getHours()||r.getMinutes()-e.getMinutes()||r.getSeconds()-e.getSeconds()||r.getMilliseconds()-e.getMilliseconds();return t<0?-1:t>0?1:t}function so(r,e){const t=()=>ct(e==null?void 0:e.in,NaN),o=mo(r);let i;if(o.date){const g=po(o.date,2);i=fo(g.restDateString,g.year)}if(!i||isNaN(+i))return t();const d=+i;let f=0,c;if(o.time&&(f=go(o.time),isNaN(f)))return t();if(o.timezone){if(c=bo(o.timezone),isNaN(c))return t()}else{const g=new Date(d+f),v=Ie(0);return v.setFullYear(g.getUTCFullYear(),g.getUTCMonth(),g.getUTCDate()),v.setHours(g.getUTCHours(),g.getUTCMinutes(),g.getUTCSeconds(),g.getUTCMilliseconds()),v}return Ie(d+f+c)}const Pe={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},lo=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,co=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,uo=/^([+-])(\d{2})(?::?(\d{2}))?$/;function mo(r){const e={},t=r.split(Pe.dateTimeDelimiter);let n;if(t.length>2)return e;if(/:/.test(t[0])?n=t[0]:(e.date=t[0],n=t[1],Pe.timeZoneDelimiter.test(e.date)&&(e.date=r.split(Pe.timeZoneDelimiter)[0],n=r.substr(e.date.length,r.length))),n){const o=Pe.timezone.exec(n);o?(e.time=n.replace(o[1],""),e.timezone=o[1]):e.time=n}return e}function po(r,e){const t=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),n=r.match(t);if(!n)return{year:NaN,restDateString:""};const o=n[1]?parseInt(n[1]):null,i=n[2]?parseInt(n[2]):null;return{year:i===null?o:i*100,restDateString:r.slice((n[1]||n[2]).length)}}function fo(r,e){if(e===null)return new Date(NaN);const t=r.match(lo);if(!t)return new Date(NaN);const n=!!t[4],o=pe(t[1]),i=pe(t[2])-1,d=pe(t[3]),f=pe(t[4]),c=pe(t[5])-1;if(n)return yo(e,f,c)?vo(e,f,c):new Date(NaN);{const g=new Date(0);return!wo(e,i,d)||!xo(e,o)?new Date(NaN):(g.setUTCFullYear(e,i,Math.max(o,d)),g)}}function pe(r){return r?parseInt(r):1}function go(r){const e=r.match(co);if(!e)return NaN;const t=Ye(e[1]),n=Ye(e[2]),o=Ye(e[3]);return Co(t,n,o)?t*lr+n*sr+o*1e3:NaN}function Ye(r){return r&&parseFloat(r.replace(",","."))||0}function bo(r){if(r==="Z")return 0;const e=r.match(uo);if(!e)return 0;const t=e[1]==="+"?-1:1,n=parseInt(e[2]),o=e[3]&&parseInt(e[3])||0;return To(n,o)?t*(n*lr+o*sr):NaN}function vo(r,e,t){const n=new Date(0);n.setUTCFullYear(r,0,4);const o=n.getUTCDay()||7,i=(e-1)*7+t+1-o;return n.setUTCDate(n.getUTCDate()+i),n}const ho=[31,null,31,30,31,30,31,31,30,31,30,31];function dr(r){return r%400===0||r%4===0&&r%100!==0}function wo(r,e,t){return e>=0&&e<=11&&t>=1&&t<=(ho[e]||(dr(r)?29:28))}function xo(r,e){return e>=1&&e<=(dr(r)?366:365)}function yo(r,e,t){return e>=1&&e<=53&&t>=0&&t<=6}function Co(r,e,t){return r===24?e===0&&t===0:t>=0&&t<60&&e>=0&&e<60&&r>=0&&r<25}function To(r,e){return e>=0&&e<=59}function jo({adProduct:r,logo:e,title:t,batchName:n="",adTitle:o,startDate:i,tuition:d,nbCardRequired:f,isLoading:c=!1,regEndDate:g,className:v}){if(c)return a.jsx(mr,{className:v});const h=`${So(i)} · ${No(d,f)}`;return a.jsx(ur,{logo:e,title:`${t} ${n}`,adTitle:o,footerText:h,regEndDate:g,className:v,adProduct:r})}function ur({adProduct:r,logo:e,title:t,adTitle:n,footerText:o,regEndDate:i,className:d}){return a.jsxs(s.FlexBox.Col,{className:s.cn("relative z-10 h-full w-full items-start justify-between gap-2 overflow-hidden rounded-xl border border-grey-200 bg-white p-4 text-grey-800 md:p-5 lg:p-6",d),children:[a.jsx(s.Tag,{variant:"ad",style:{background:V.adProducts.event.background,color:V.adProducts.event.color},children:r===V.adProducts.dDay.value&&i?ko(i):V.adProducts.event.value.toUpperCase()}),a.jsx(Oe,{src:e,alt:`${t} 로고`,className:"h-4 object-contain"}),a.jsxs(s.FlexBox.Col,{className:"w-full gap-2",children:[a.jsx("h3",{className:"line-clamp-2 h-auto text-sm font-normal md:text-base lg:h-12",title:t,children:t}),a.jsx("p",{className:"line-clamp-2 h-auto w-full break-keep rounded bg-grey-100 px-2 py-1 text-[13px] font-semibold text-grey-600 md:h-[54px] md:text-[15px] md:text-grey-800",children:n}),a.jsx(s.Box,{className:"text-[13px] leading-[19px] text-grey-600",children:o})]})]})}function mr({className:r}){return a.jsxs(_.Skeleton,{type:"background",className:s.cn("relative z-10 flex h-full w-full flex-col justify-between gap-2 overflow-hidden rounded-xl p-4 md:p-5 lg:p-6",r),children:[a.jsx(s.Tag,{variant:"ad",style:{background:V.adProducts.event.background,color:V.adProducts.event.color},className:s.cn("h-7 w-20 animate-pulse rounded-bl-lg rounded-br-none rounded-tl-none rounded-tr-lg px-2 py-1 text-sm"),children:""}),a.jsx(_.Skeleton,{className:"h-4 w-1/2"}),a.jsxs(s.FlexBox.Col,{className:"gap-2",children:[a.jsx(s.Box,{className:"h-10 w-full",children:a.jsx(_.Skeleton,{className:"h-5 w-4/5"})}),a.jsx(_.Skeleton,{className:"h-14 w-full"})]}),a.jsx(_.Skeleton,{className:"mt-2 h-[19px] w-2/3"})]})}const So=r=>{if(!r)return"";const t=r.split(" ")[0].split("-"),n=Number(t[1]),o=`${n}/${Number(t.slice(2).join("."))}`;switch(t[2]){case"98":return`${n}월중 개강`;case"99":return`${n}월중(예상) 개강`;default:return`${o} 개강`}},No=(r,e)=>{const t=e?"(내배카💳)":"";return r===0||r===void 0?`무료 ${t}`:`유료 ${t}`},Po=r=>{const t=r.split(" ")[0].split("-"),n=Number(t[0]),o=Number(t[1]);let i=t[2];const d=new Date(n,o,0).getDate();return(isNaN(Number(i))||Number(i)>d)&&(i=d.toString()),`${n}-${String(o).padStart(2,"0")}-${String(i).padStart(2,"0")}`},ko=r=>{const e=io(so(Po(r)),new Date);return e<=0?"마감임박":`D-${e}`},Eo={homepage:{label:"홈페이지",value:"homepage",query:!1},boottent:{label:"자세히보기",value:"boottent",query:!1},curriculum:{label:"커리큘럼 보기",value:"curriculum",query:"curriculum"},event:{label:"이벤트",value:"event",query:"event"},reviews:{label:"후기보기",value:"reviews",query:"reviews"}};var Oo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},y={},Ze={exports:{}};(function(r,e){(function(t,n){var o="1.0.39",i="",d="?",f="function",c="undefined",g="object",v="string",h="major",l="model",m="name",u="type",p="vendor",b="version",P="architecture",T="console",C="mobile",w="tablet",E="smarttv",R="wearable",$="embedded",re=500,J="Amazon",Q="Apple",ht="ASUS",wt="BlackBerry",ce="Browser",xe="Chrome",Fn="Edge",ye="Firefox",Ce="Google",xt="Huawei",We="LG",ze="Microsoft",yt="Motorola",de="Opera",ue="Samsung",Ct="Sharp",Te="Sony",Ge="Xiaomi",$e="Zebra",Tt="Facebook",jt="Chromium OS",St="Mac OS",Nt=" Browser",Mn=function(k,O){var N={};for(var F in k)O[F]&&O[F].length%2===0?N[F]=O[F].concat(k[F]):N[F]=k[F];return N},je=function(k){for(var O={},N=0;N<k.length;N++)O[k[N].toUpperCase()]=k[N];return O},Pt=function(k,O){return typeof k===v?ne(O).indexOf(ne(k))!==-1:!1},ne=function(k){return k.toLowerCase()},_n=function(k){return typeof k===v?k.replace(/[^\d\.]/g,i).split(".")[0]:n},He=function(k,O){if(typeof k===v)return k=k.replace(/^\s\s*/,i),typeof O===c?k:k.substring(0,re)},me=function(k,O){for(var N=0,F,Z,q,I,S,Y;N<O.length&&!S;){var qe=O[N],Ot=O[N+1];for(F=Z=0;F<qe.length&&!S&&qe[F];)if(S=qe[F++].exec(k),S)for(q=0;q<Ot.length;q++)Y=S[++Z],I=Ot[q],typeof I===g&&I.length>0?I.length===2?typeof I[1]==f?this[I[0]]=I[1].call(this,Y):this[I[0]]=I[1]:I.length===3?typeof I[1]===f&&!(I[1].exec&&I[1].test)?this[I[0]]=Y?I[1].call(this,Y,I[2]):n:this[I[0]]=Y?Y.replace(I[1],I[2]):n:I.length===4&&(this[I[0]]=Y?I[3].call(this,Y.replace(I[1],I[2])):n):this[I]=Y||n;N+=2}},Se=function(k,O){for(var N in O)if(typeof O[N]===g&&O[N].length>0){for(var F=0;F<O[N].length;F++)if(Pt(O[N][F],k))return N===d?n:N}else if(Pt(O[N],k))return N===d?n:N;return O.hasOwnProperty("*")?O["*"]:k},Rn={"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},kt={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Et={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[b,[m,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[b,[m,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[m,b],[/opios[\/ ]+([\w\.]+)/i],[b,[m,de+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[b,[m,de+" GX"]],[/\bopr\/([\w\.]+)/i],[b,[m,de]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[b,[m,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[m,b],[/quark(?:pc)?\/([-\w\.]+)/i],[b,[m,"Quark"]],[/\bddg\/([\w\.]+)/i],[b,[m,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[b,[m,"UC"+ce]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[b,[m,"WeChat"]],[/konqueror\/([\w\.]+)/i],[b,[m,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[b,[m,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[b,[m,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[b,[m,"Smart Lenovo "+ce]],[/(avast|avg)\/([\w\.]+)/i],[[m,/(.+)/,"$1 Secure "+ce],b],[/\bfocus\/([\w\.]+)/i],[b,[m,ye+" Focus"]],[/\bopt\/([\w\.]+)/i],[b,[m,de+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[b,[m,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[b,[m,"Dolphin"]],[/coast\/([\w\.]+)/i],[b,[m,de+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[b,[m,"MIUI "+ce]],[/fxios\/([-\w\.]+)/i],[b,[m,ye]],[/\bqihu|(qi?ho?o?|360)browser/i],[[m,"360"+Nt]],[/\b(qq)\/([\w\.]+)/i],[[m,/(.+)/,"$1Browser"],b],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[m,/(.+)/,"$1"+Nt],b],[/samsungbrowser\/([\w\.]+)/i],[b,[m,ue+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[m,/_/g," "],b],[/metasr[\/ ]?([\d\.]+)/i],[b,[m,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[m,"Sogou Mobile"],b],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[m,b],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[m],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[m,Tt],b],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[m,b],[/\bgsa\/([\w\.]+) .*safari\//i],[b,[m,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[b,[m,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[b,[m,xe+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[m,xe+" WebView"],b],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[b,[m,"Android "+ce]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[m,b],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[b,[m,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[b,m],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[m,[b,Se,Rn]],[/(webkit|khtml)\/([\w\.]+)/i],[m,b],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[m,"Netscape"],b],[/(wolvic)\/([\w\.]+)/i],[m,b],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[b,[m,ye+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[m,[b,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[m,[b,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[P,"amd64"]],[/(ia32(?=;))/i],[[P,ne]],[/((?:i[346]|x)86)[;\)]/i],[[P,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[P,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[P,"armhf"]],[/windows (ce|mobile); ppc;/i],[[P,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[P,/ower/,i,ne]],[/(sun4\w)[;\)]/i],[[P,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[P,ne]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[l,[p,ue],[u,w]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[l,[p,ue],[u,C]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[l,[p,Q],[u,C]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[l,[p,Q],[u,w]],[/(macintosh);/i],[l,[p,Q]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[l,[p,Ct],[u,C]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[l,[p,xt],[u,w]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[l,[p,xt],[u,C]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i],[[l,/_/g," "],[p,Ge],[u,C]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[l,/_/g," "],[p,Ge],[u,w]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[l,[p,"OPPO"],[u,C]],[/\b(opd2\d{3}a?) bui/i],[l,[p,"OPPO"],[u,w]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[l,[p,"Vivo"],[u,C]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[l,[p,"Realme"],[u,C]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[l,[p,yt],[u,C]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[l,[p,yt],[u,w]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[l,[p,We],[u,w]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[l,[p,We],[u,C]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[l,[p,"Lenovo"],[u,w]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[l,/_/g," "],[p,"Nokia"],[u,C]],[/(pixel c)\b/i],[l,[p,Ce],[u,w]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[l,[p,Ce],[u,C]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[l,[p,Te],[u,C]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[l,"Xperia Tablet"],[p,Te],[u,w]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[l,[p,"OnePlus"],[u,C]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[l,[p,J],[u,w]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[l,/(.+)/g,"Fire Phone $1"],[p,J],[u,C]],[/(playbook);[-\w\),; ]+(rim)/i],[l,p,[u,w]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[l,[p,wt],[u,C]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[l,[p,ht],[u,w]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[l,[p,ht],[u,C]],[/(nexus 9)/i],[l,[p,"HTC"],[u,w]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[p,[l,/_/g," "],[u,C]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[l,[p,"TCL"],[u,w]],[/(itel) ((\w+))/i],[[p,ne],l,[u,Se,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[l,[p,"Acer"],[u,w]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[l,[p,"Meizu"],[u,C]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[l,[p,"Ulefone"],[u,C]],[/droid.+; (a(?:015|06[35]|142p?))/i],[l,[p,"Nothing"],[u,C]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[p,l,[u,C]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[p,l,[u,w]],[/(surface duo)/i],[l,[p,ze],[u,w]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[l,[p,"Fairphone"],[u,C]],[/(u304aa)/i],[l,[p,"AT&T"],[u,C]],[/\bsie-(\w*)/i],[l,[p,"Siemens"],[u,C]],[/\b(rct\w+) b/i],[l,[p,"RCA"],[u,w]],[/\b(venue[\d ]{2,7}) b/i],[l,[p,"Dell"],[u,w]],[/\b(q(?:mv|ta)\w+) b/i],[l,[p,"Verizon"],[u,w]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[l,[p,"Barnes & Noble"],[u,w]],[/\b(tm\d{3}\w+) b/i],[l,[p,"NuVision"],[u,w]],[/\b(k88) b/i],[l,[p,"ZTE"],[u,w]],[/\b(nx\d{3}j) b/i],[l,[p,"ZTE"],[u,C]],[/\b(gen\d{3}) b.+49h/i],[l,[p,"Swiss"],[u,C]],[/\b(zur\d{3}) b/i],[l,[p,"Swiss"],[u,w]],[/\b((zeki)?tb.*\b) b/i],[l,[p,"Zeki"],[u,w]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[p,"Dragon Touch"],l,[u,w]],[/\b(ns-?\w{0,9}) b/i],[l,[p,"Insignia"],[u,w]],[/\b((nxa|next)-?\w{0,9}) b/i],[l,[p,"NextBook"],[u,w]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[p,"Voice"],l,[u,C]],[/\b(lvtel\-)?(v1[12]) b/i],[[p,"LvTel"],l,[u,C]],[/\b(ph-1) /i],[l,[p,"Essential"],[u,C]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[l,[p,"Envizen"],[u,w]],[/\b(trio[-\w\. ]+) b/i],[l,[p,"MachSpeed"],[u,w]],[/\btu_(1491) b/i],[l,[p,"Rotor"],[u,w]],[/(shield[\w ]+) b/i],[l,[p,"Nvidia"],[u,w]],[/(sprint) (\w+)/i],[p,l,[u,C]],[/(kin\.[onetw]{3})/i],[[l,/\./g," "],[p,ze],[u,C]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[l,[p,$e],[u,w]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[l,[p,$e],[u,C]],[/smart-tv.+(samsung)/i],[p,[u,E]],[/hbbtv.+maple;(\d+)/i],[[l,/^/,"SmartTV"],[p,ue],[u,E]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[p,We],[u,E]],[/(apple) ?tv/i],[p,[l,Q+" TV"],[u,E]],[/crkey/i],[[l,xe+"cast"],[p,Ce],[u,E]],[/droid.+aft(\w+)( bui|\))/i],[l,[p,J],[u,E]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[l,[p,Ct],[u,E]],[/(bravia[\w ]+)( bui|\))/i],[l,[p,Te],[u,E]],[/(mitv-\w{5}) bui/i],[l,[p,Ge],[u,E]],[/Hbbtv.*(technisat) (.*);/i],[p,l,[u,E]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[p,He],[l,He],[u,E]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[u,E]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[p,l,[u,T]],[/droid.+; (shield) bui/i],[l,[p,"Nvidia"],[u,T]],[/(playstation [345portablevi]+)/i],[l,[p,Te],[u,T]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[l,[p,ze],[u,T]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[l,[p,ue],[u,R]],[/((pebble))app/i],[p,l,[u,R]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[l,[p,Q],[u,R]],[/droid.+; (glass) \d/i],[l,[p,Ce],[u,R]],[/droid.+; (wt63?0{2,3})\)/i],[l,[p,$e],[u,R]],[/(quest( \d| pro)?)/i],[l,[p,Tt],[u,R]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[p,[u,$]],[/(aeobc)\b/i],[l,[p,J],[u,$]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[l,[u,C]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[l,[u,w]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[u,w]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[u,C]],[/(android[-\w\. ]{0,9});.+buil/i],[l,[p,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[b,[m,Fn+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[b,[m,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[m,b],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[b,m]],os:[[/microsoft (windows) (vista|xp)/i],[m,b],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[m,[b,Se,kt]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[b,Se,kt],[m,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[b,/_/g,"."],[m,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[m,St],[b,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[b,m],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[m,b],[/\(bb(10);/i],[b,[m,wt]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[b,[m,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[b,[m,ye+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[b,[m,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[b,[m,"watchOS"]],[/crkey\/([\d\.]+)/i],[b,[m,xe+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[m,jt],b],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[m,b],[/(sunos) ?([\w\.\d]*)/i],[[m,"Solaris"],b],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[m,b]]},H=function(k,O){if(typeof k===g&&(O=k,k=n),!(this instanceof H))return new H(k,O).getResult();var N=typeof t!==c&&t.navigator?t.navigator:n,F=k||(N&&N.userAgent?N.userAgent:i),Z=N&&N.userAgentData?N.userAgentData:n,q=O?Mn(Et,O):Et,I=N&&N.userAgent==F;return this.getBrowser=function(){var S={};return S[m]=n,S[b]=n,me.call(S,F,q.browser),S[h]=_n(S[b]),I&&N&&N.brave&&typeof N.brave.isBrave==f&&(S[m]="Brave"),S},this.getCPU=function(){var S={};return S[P]=n,me.call(S,F,q.cpu),S},this.getDevice=function(){var S={};return S[p]=n,S[l]=n,S[u]=n,me.call(S,F,q.device),I&&!S[u]&&Z&&Z.mobile&&(S[u]=C),I&&S[l]=="Macintosh"&&N&&typeof N.standalone!==c&&N.maxTouchPoints&&N.maxTouchPoints>2&&(S[l]="iPad",S[u]=w),S},this.getEngine=function(){var S={};return S[m]=n,S[b]=n,me.call(S,F,q.engine),S},this.getOS=function(){var S={};return S[m]=n,S[b]=n,me.call(S,F,q.os),I&&!S[m]&&Z&&Z.platform&&Z.platform!="Unknown"&&(S[m]=Z.platform.replace(/chrome os/i,jt).replace(/macos/i,St)),S},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return F},this.setUA=function(S){return F=typeof S===v&&S.length>re?He(S,re):S,this},this.setUA(F),this};H.VERSION=o,H.BROWSER=je([m,b,h]),H.CPU=je([P]),H.DEVICE=je([l,p,u,T,C,E,w,R,$]),H.ENGINE=H.OS=je([m,b]),r.exports&&(e=r.exports=H),e.UAParser=H;var oe=typeof t!==c&&(t.jQuery||t.Zepto);if(oe&&!oe.ua){var Ne=new H;oe.ua=Ne.getResult(),oe.ua.get=function(){return Ne.getUA()},oe.ua.set=function(k){Ne.setUA(k);var O=Ne.getResult();for(var N in O)oe.ua[N]=O[N]}}})(typeof window=="object"?window:Oo)})(Ze,Ze.exports);var Io=Ze.exports;Object.defineProperty(y,"__esModule",{value:!0});function Ao(r){return r&&typeof r=="object"&&"default"in r?r.default:r}var B=A,M=Ao(B),pr=Io,ee=new pr,L=ee.getBrowser(),Fo=ee.getCPU(),z=ee.getDevice(),dt=ee.getEngine(),te=ee.getOS(),he=ee.getUA(),fr=function(e){return ee.setUA(e)},we=function(e){if(!e){console.error("No userAgent string was provided");return}var t=new pr(e);return{UA:t,browser:t.getBrowser(),cpu:t.getCPU(),device:t.getDevice(),engine:t.getEngine(),os:t.getOS(),ua:t.getUA(),setUserAgent:function(o){return t.setUA(o)}}},gr=Object.freeze({ClientUAInstance:ee,browser:L,cpu:Fo,device:z,engine:dt,os:te,ua:he,setUa:fr,parseUserAgent:we});function _t(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(r,o).enumerable})),t.push.apply(t,n)}return t}function Mo(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?_t(Object(t),!0).forEach(function(n){Vo(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):_t(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function be(r){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?be=function(e){return typeof e}:be=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},be(r)}function _o(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function Ro(r,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,n.key,n)}}function Do(r,e,t){return e&&Ro(r.prototype,e),r}function Vo(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Ke(){return Ke=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},Ke.apply(this,arguments)}function Bo(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),e&&Qe(r,e)}function Je(r){return Je=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Je(r)}function Qe(r,e){return Qe=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},Qe(r,e)}function Lo(r,e){if(r==null)return{};var t={},n=Object.keys(r),o,i;for(i=0;i<n.length;i++)o=n[i],!(e.indexOf(o)>=0)&&(t[o]=r[o]);return t}function G(r,e){if(r==null)return{};var t=Lo(r,e),n,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);for(o=0;o<i.length;o++)n=i[o],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(r,n)&&(t[n]=r[n])}return t}function ke(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function Uo(r,e){if(e&&(typeof e=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ke(r)}function Wo(r,e){return zo(r)||Go(r,e)||$o(r,e)||Ho()}function zo(r){if(Array.isArray(r))return r}function Go(r,e){var t=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(t!=null){var n=[],o=!0,i=!1,d,f;try{for(t=t.call(r);!(o=(d=t.next()).done)&&(n.push(d.value),!(e&&n.length===e));o=!0);}catch(c){i=!0,f=c}finally{try{!o&&t.return!=null&&t.return()}finally{if(i)throw f}}return n}}function $o(r,e){if(r){if(typeof r=="string")return Rt(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Array.from(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Rt(r,e)}}function Rt(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}function Ho(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),fe=require("./index-DKCqkplO.cjs"),s=require("./index-Cv9m35ew.cjs"),A=require("react"),V=require("./index-z9hRvvSX.cjs"),_=require("./index-ayoS8j25.cjs"),U=require("./portal-container-BveN4tv_.cjs");function Dn(r){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>r[t]})}}return e.default=r,Object.freeze(e)}const x=Dn(A);var rt="Collapsible",[Vn,Lt]=s.createContextScope(rt),[Bn,nt]=Vn(rt),Ut=x.forwardRef((r,e)=>{const{__scopeCollapsible:t,open:n,defaultOpen:o,disabled:i,onOpenChange:d,...f}=r,[c=!1,g]=s.useControllableState({prop:n,defaultProp:o,onChange:d});return a.jsx(Bn,{scope:t,disabled:i,contentId:s.useId(),open:c,onOpenToggle:x.useCallback(()=>g(v=>!v),[g]),children:a.jsx(s.Primitive.div,{"data-state":at(c),"data-disabled":i?"":void 0,...f,ref:e})})});Ut.displayName=rt;var Wt="CollapsibleTrigger",zt=x.forwardRef((r,e)=>{const{__scopeCollapsible:t,...n}=r,o=nt(Wt,t);return a.jsx(s.Primitive.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":at(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...n,ref:e,onClick:s.composeEventHandlers(r.onClick,o.onOpenToggle)})});zt.displayName=Wt;var ot="CollapsibleContent",Gt=x.forwardRef((r,e)=>{const{forceMount:t,...n}=r,o=nt(ot,r.__scopeCollapsible);return a.jsx(s.Presence,{present:t||o.open,children:({present:i})=>a.jsx(Ln,{...n,ref:e,present:i})})});Gt.displayName=ot;var Ln=x.forwardRef((r,e)=>{const{__scopeCollapsible:t,present:n,children:o,...i}=r,d=nt(ot,t),[f,c]=x.useState(n),g=x.useRef(null),v=s.useComposedRefs(e,g),h=x.useRef(0),l=h.current,m=x.useRef(0),u=m.current,p=d.open||f,b=x.useRef(p),P=x.useRef();return x.useEffect(()=>{const T=requestAnimationFrame(()=>b.current=!1);return()=>cancelAnimationFrame(T)},[]),s.useLayoutEffect2(()=>{const T=g.current;if(T){P.current=P.current||{transitionDuration:T.style.transitionDuration,animationName:T.style.animationName},T.style.transitionDuration="0s",T.style.animationName="none";const C=T.getBoundingClientRect();h.current=C.height,m.current=C.width,b.current||(T.style.transitionDuration=P.current.transitionDuration,T.style.animationName=P.current.animationName),c(n)}},[d.open,n]),a.jsx(s.Primitive.div,{"data-state":at(d.open),"data-disabled":d.disabled?"":void 0,id:d.contentId,hidden:!p,...i,ref:v,style:{"--radix-collapsible-content-height":l?`${l}px`:void 0,"--radix-collapsible-content-width":u?`${u}px`:void 0,...r.style},children:p&&o})});function at(r){return r?"open":"closed"}var Un=Ut,Wn=zt,zn=Gt,K="Accordion",Gn=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[it,$n,Hn]=s.createCollection(K),[_e,Wi]=s.createContextScope(K,[Hn,Lt]),st=Lt(),$t=A.forwardRef((r,e)=>{const{type:t,...n}=r,o=n,i=n;return a.jsx(it.Provider,{scope:r.__scopeAccordion,children:t==="multiple"?a.jsx(Zn,{...i,ref:e}):a.jsx(Xn,{...o,ref:e})})});$t.displayName=K;var[Ht,qn]=_e(K),[qt,Yn]=_e(K,{collapsible:!1}),Xn=A.forwardRef((r,e)=>{const{value:t,defaultValue:n,onValueChange:o=()=>{},collapsible:i=!1,...d}=r,[f,c]=s.useControllableState({prop:t,defaultProp:n,onChange:o});return a.jsx(Ht,{scope:r.__scopeAccordion,value:f?[f]:[],onItemOpen:c,onItemClose:A.useCallback(()=>i&&c(""),[i,c]),children:a.jsx(qt,{scope:r.__scopeAccordion,collapsible:i,children:a.jsx(Yt,{...d,ref:e})})})}),Zn=A.forwardRef((r,e)=>{const{value:t,defaultValue:n,onValueChange:o=()=>{},...i}=r,[d=[],f]=s.useControllableState({prop:t,defaultProp:n,onChange:o}),c=A.useCallback(v=>f((h=[])=>[...h,v]),[f]),g=A.useCallback(v=>f((h=[])=>h.filter(l=>l!==v)),[f]);return a.jsx(Ht,{scope:r.__scopeAccordion,value:d,onItemOpen:c,onItemClose:g,children:a.jsx(qt,{scope:r.__scopeAccordion,collapsible:!0,children:a.jsx(Yt,{...i,ref:e})})})}),[Kn,Re]=_e(K),Yt=A.forwardRef((r,e)=>{const{__scopeAccordion:t,disabled:n,dir:o,orientation:i="vertical",...d}=r,f=A.useRef(null),c=s.useComposedRefs(f,e),g=$n(t),h=s.useDirection(o)==="ltr",l=s.composeEventHandlers(r.onKeyDown,m=>{var re;if(!Gn.includes(m.key))return;const u=m.target,p=g().filter(J=>{var Q;return!((Q=J.ref.current)!=null&&Q.disabled)}),b=p.findIndex(J=>J.ref.current===u),P=p.length;if(b===-1)return;m.preventDefault();let T=b;const C=0,w=P-1,E=()=>{T=b+1,T>w&&(T=C)},R=()=>{T=b-1,T<C&&(T=w)};switch(m.key){case"Home":T=C;break;case"End":T=w;break;case"ArrowRight":i==="horizontal"&&(h?E():R());break;case"ArrowDown":i==="vertical"&&E();break;case"ArrowLeft":i==="horizontal"&&(h?R():E());break;case"ArrowUp":i==="vertical"&&R();break}const $=T%P;(re=p[$].ref.current)==null||re.focus()});return a.jsx(Kn,{scope:t,disabled:n,direction:o,orientation:i,children:a.jsx(it.Slot,{scope:t,children:a.jsx(s.Primitive.div,{...d,"data-orientation":i,ref:c,onKeyDown:n?void 0:l})})})}),Ee="AccordionItem",[Jn,lt]=_e(Ee),Xt=A.forwardRef((r,e)=>{const{__scopeAccordion:t,value:n,...o}=r,i=Re(Ee,t),d=qn(Ee,t),f=st(t),c=s.useId(),g=n&&d.value.includes(n)||!1,v=i.disabled||r.disabled;return a.jsx(Jn,{scope:t,open:g,disabled:v,triggerId:c,children:a.jsx(Un,{"data-orientation":i.orientation,"data-state":tr(g),...f,...o,ref:e,disabled:v,open:g,onOpenChange:h=>{h?d.onItemOpen(n):d.onItemClose(n)}})})});Xt.displayName=Ee;var Zt="AccordionHeader",Kt=A.forwardRef((r,e)=>{const{__scopeAccordion:t,...n}=r,o=Re(K,t),i=lt(Zt,t);return a.jsx(s.Primitive.h3,{"data-orientation":o.orientation,"data-state":tr(i.open),"data-disabled":i.disabled?"":void 0,...n,ref:e})});Kt.displayName=Zt;var Xe="AccordionTrigger",Jt=A.forwardRef((r,e)=>{const{__scopeAccordion:t,...n}=r,o=Re(K,t),i=lt(Xe,t),d=Yn(Xe,t),f=st(t);return a.jsx(it.ItemSlot,{scope:t,children:a.jsx(Wn,{"aria-disabled":i.open&&!d.collapsible||void 0,"data-orientation":o.orientation,id:i.triggerId,...f,...n,ref:e})})});Jt.displayName=Xe;var Qt="AccordionContent",er=A.forwardRef((r,e)=>{const{__scopeAccordion:t,...n}=r,o=Re(K,t),i=lt(Qt,t),d=st(t);return a.jsx(zn,{role:"region","aria-labelledby":i.triggerId,"data-orientation":o.orientation,...d,...n,ref:e,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...r.style}})});er.displayName=Qt;function tr(r){return r?"open":"closed"}var Qn=$t,eo=Xt,to=Kt,rr=Jt,nr=er;const ro=Qn,or=x.forwardRef(({className:r,...e},t)=>a.jsx(eo,{ref:t,className:s.cn("w-full border-b",r),...e}));or.displayName="AccordionItem";const ar=x.forwardRef(({className:r,children:e,disabled:t,...n},o)=>a.jsx(to,{className:"flex",children:a.jsxs(rr,{ref:o,className:s.cn("flex flex-1 items-center justify-between py-4 text-start font-medium transition-all [&[data-state=open]>svg]:rotate-180",r),disabled:t,...n,children:[e,!t&&a.jsx(s.Icon.ArrowDown,{className:"shrink-0 transition-transform duration-200",fill:fe.colors.grey[600],size:"16"})]})}));ar.displayName=rr.displayName;const ir=x.forwardRef(({className:r,children:e,...t},n)=>a.jsx(nr,{ref:n,className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down transition-all",...t,children:a.jsx("div",{className:s.cn("overflow-hidden pb-4 text-sm",r),children:e})}));ir.displayName=nr.displayName;const no={Root:ro,Item:or,Trigger:ar,Content:ir},Oe=({src:r,alt:e,object:t="cover",lazy:n=!0,size:o="auto",className:i,...d})=>{const f={contain:"object-contain h-full",cover:"object-cover h-full",fill:"object-fill h-full","scale-down":"object-scale-down",none:"object-none"},c={full:"w-full",fit:"w-fit",auto:"w-auto"};let g="",v={};return typeof o=="string"?g=c[o]:typeof o=="number"&&(v={width:`${o}px`}),a.jsx("img",{src:r,alt:e?`${e} 이미지`:"이미지",loading:n?"lazy":"eager",className:s.cn(f[t],g,i),style:v,...d})},oo=864e5,sr=6e4,lr=36e5,It=Symbol.for("constructDateFrom");function ct(r,e){return typeof r=="function"?r(e):r&&typeof r=="object"&&It in r?r[It](e):r instanceof Date?new r.constructor(e):new Date(e)}function Ie(r,e){return ct(r,r)}function At(r){const e=Ie(r),t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),+r-+t}function cr(r,...e){const t=ct.bind(null,e.find(n=>typeof n=="object"));return e.map(t)}function Ft(r,e){const t=Ie(r);return t.setHours(0,0,0,0),t}function ao(r,e,t){const[n,o]=cr(t==null?void 0:t.in,r,e),i=Ft(n),d=Ft(o),f=+i-At(i),c=+d-At(d);return Math.round((f-c)/oo)}function io(r,e,t){const[n,o]=cr(t==null?void 0:t.in,r,e),i=Mt(n,o),d=Math.abs(ao(n,o));n.setDate(n.getDate()-i*d);const f=+(Mt(n,o)===-i),c=i*(d-f);return c===0?0:c}function Mt(r,e){const t=r.getFullYear()-e.getFullYear()||r.getMonth()-e.getMonth()||r.getDate()-e.getDate()||r.getHours()-e.getHours()||r.getMinutes()-e.getMinutes()||r.getSeconds()-e.getSeconds()||r.getMilliseconds()-e.getMilliseconds();return t<0?-1:t>0?1:t}function so(r,e){const t=()=>ct(e==null?void 0:e.in,NaN),o=mo(r);let i;if(o.date){const g=po(o.date,2);i=fo(g.restDateString,g.year)}if(!i||isNaN(+i))return t();const d=+i;let f=0,c;if(o.time&&(f=go(o.time),isNaN(f)))return t();if(o.timezone){if(c=bo(o.timezone),isNaN(c))return t()}else{const g=new Date(d+f),v=Ie(0);return v.setFullYear(g.getUTCFullYear(),g.getUTCMonth(),g.getUTCDate()),v.setHours(g.getUTCHours(),g.getUTCMinutes(),g.getUTCSeconds(),g.getUTCMilliseconds()),v}return Ie(d+f+c)}const Pe={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},lo=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,co=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,uo=/^([+-])(\d{2})(?::?(\d{2}))?$/;function mo(r){const e={},t=r.split(Pe.dateTimeDelimiter);let n;if(t.length>2)return e;if(/:/.test(t[0])?n=t[0]:(e.date=t[0],n=t[1],Pe.timeZoneDelimiter.test(e.date)&&(e.date=r.split(Pe.timeZoneDelimiter)[0],n=r.substr(e.date.length,r.length))),n){const o=Pe.timezone.exec(n);o?(e.time=n.replace(o[1],""),e.timezone=o[1]):e.time=n}return e}function po(r,e){const t=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),n=r.match(t);if(!n)return{year:NaN,restDateString:""};const o=n[1]?parseInt(n[1]):null,i=n[2]?parseInt(n[2]):null;return{year:i===null?o:i*100,restDateString:r.slice((n[1]||n[2]).length)}}function fo(r,e){if(e===null)return new Date(NaN);const t=r.match(lo);if(!t)return new Date(NaN);const n=!!t[4],o=pe(t[1]),i=pe(t[2])-1,d=pe(t[3]),f=pe(t[4]),c=pe(t[5])-1;if(n)return yo(e,f,c)?vo(e,f,c):new Date(NaN);{const g=new Date(0);return!wo(e,i,d)||!xo(e,o)?new Date(NaN):(g.setUTCFullYear(e,i,Math.max(o,d)),g)}}function pe(r){return r?parseInt(r):1}function go(r){const e=r.match(co);if(!e)return NaN;const t=Ye(e[1]),n=Ye(e[2]),o=Ye(e[3]);return Co(t,n,o)?t*lr+n*sr+o*1e3:NaN}function Ye(r){return r&&parseFloat(r.replace(",","."))||0}function bo(r){if(r==="Z")return 0;const e=r.match(uo);if(!e)return 0;const t=e[1]==="+"?-1:1,n=parseInt(e[2]),o=e[3]&&parseInt(e[3])||0;return To(n,o)?t*(n*lr+o*sr):NaN}function vo(r,e,t){const n=new Date(0);n.setUTCFullYear(r,0,4);const o=n.getUTCDay()||7,i=(e-1)*7+t+1-o;return n.setUTCDate(n.getUTCDate()+i),n}const ho=[31,null,31,30,31,30,31,31,30,31,30,31];function dr(r){return r%400===0||r%4===0&&r%100!==0}function wo(r,e,t){return e>=0&&e<=11&&t>=1&&t<=(ho[e]||(dr(r)?29:28))}function xo(r,e){return e>=1&&e<=(dr(r)?366:365)}function yo(r,e,t){return e>=1&&e<=53&&t>=0&&t<=6}function Co(r,e,t){return r===24?e===0&&t===0:t>=0&&t<60&&e>=0&&e<60&&r>=0&&r<25}function To(r,e){return e>=0&&e<=59}function jo({adProduct:r,logo:e,title:t,batchName:n="",adTitle:o,startDate:i,tuition:d,nbCardRequired:f,isLoading:c=!1,regEndDate:g,className:v}){if(c)return a.jsx(mr,{className:v});const h=`${So(i)} · ${No(d,f)}`;return a.jsx(ur,{logo:e,title:`${t} ${n}`,adTitle:o,footerText:h,regEndDate:g,className:v,adProduct:r})}function ur({adProduct:r,logo:e,title:t,adTitle:n,footerText:o,regEndDate:i,className:d}){return a.jsxs(s.FlexBox.Col,{className:s.cn("relative z-10 h-full w-full items-start justify-between gap-2 overflow-hidden rounded-xl border border-grey-200 bg-white p-4 text-grey-800 md:p-5 lg:p-6",d),children:[a.jsx(s.Tag,{variant:"ad",style:{background:V.adProducts.event.background,color:V.adProducts.event.color},children:r===V.adProducts.dDay.value&&i?ko(i):V.adProducts.event.value.toUpperCase()}),a.jsx(Oe,{src:e,alt:`${t} 로고`,className:"h-4 object-contain"}),a.jsxs(s.FlexBox.Col,{className:"w-full gap-2",children:[a.jsx("h3",{className:"line-clamp-2 h-auto text-sm font-normal md:text-base lg:h-12",title:t,children:t}),a.jsx("p",{className:"line-clamp-2 h-auto w-full break-keep rounded bg-grey-100 px-2 py-1 text-[13px] font-semibold text-grey-600 md:h-[54px] md:text-[15px] md:text-grey-800",children:n}),a.jsx(s.Box,{className:"text-[13px] leading-[19px] text-grey-600",children:o})]})]})}function mr({className:r}){return a.jsxs(_.Skeleton,{type:"background",className:s.cn("relative z-10 flex h-full w-full flex-col justify-between gap-2 overflow-hidden rounded-xl p-4 md:p-5 lg:p-6",r),children:[a.jsx(s.Tag,{variant:"ad",style:{background:V.adProducts.event.background,color:V.adProducts.event.color},className:s.cn("h-7 w-20 animate-pulse rounded-bl-lg rounded-br-none rounded-tl-none rounded-tr-lg px-2 py-1 text-sm"),children:""}),a.jsx(_.Skeleton,{className:"h-4 w-1/2"}),a.jsxs(s.FlexBox.Col,{className:"gap-2",children:[a.jsx(s.Box,{className:"h-10 w-full",children:a.jsx(_.Skeleton,{className:"h-5 w-4/5"})}),a.jsx(_.Skeleton,{className:"h-14 w-full"})]}),a.jsx(_.Skeleton,{className:"mt-2 h-[19px] w-2/3"})]})}const So=r=>{if(!r)return"";const t=r.split(" ")[0].split("-"),n=Number(t[1]),o=`${n}/${Number(t.slice(2).join("."))}`;switch(t[2]){case"98":return`${n}월중 개강`;case"99":return`${n}월중(예상) 개강`;default:return`${o} 개강`}},No=(r,e)=>{const t=e?"(내배카💳)":"";return r===0||r===void 0?`무료 ${t}`:`유료 ${t}`},Po=r=>{const t=r.split(" ")[0].split("-"),n=Number(t[0]),o=Number(t[1]);let i=t[2];const d=new Date(n,o,0).getDate();return(isNaN(Number(i))||Number(i)>d)&&(i=d.toString()),`${n}-${String(o).padStart(2,"0")}-${String(i).padStart(2,"0")}`},ko=r=>{const e=io(so(Po(r)),new Date);return e<=0?"마감임박":`D-${e}`},Eo={homepage:{label:"홈페이지",value:"homepage",query:!1},boottent:{label:"자세히보기",value:"boottent",query:!1},curriculum:{label:"커리큘럼 보기",value:"curriculum",query:"curriculum"},event:{label:"이벤트",value:"event",query:"event"},reviews:{label:"후기보기",value:"reviews",query:"reviews"}};var Oo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},y={},Ze={exports:{}};(function(r,e){(function(t,n){var o="1.0.39",i="",d="?",f="function",c="undefined",g="object",v="string",h="major",l="model",m="name",u="type",p="vendor",b="version",P="architecture",T="console",C="mobile",w="tablet",E="smarttv",R="wearable",$="embedded",re=500,J="Amazon",Q="Apple",ht="ASUS",wt="BlackBerry",ce="Browser",xe="Chrome",Fn="Edge",ye="Firefox",Ce="Google",xt="Huawei",We="LG",ze="Microsoft",yt="Motorola",de="Opera",ue="Samsung",Ct="Sharp",Te="Sony",Ge="Xiaomi",$e="Zebra",Tt="Facebook",jt="Chromium OS",St="Mac OS",Nt=" Browser",Mn=function(k,O){var N={};for(var F in k)O[F]&&O[F].length%2===0?N[F]=O[F].concat(k[F]):N[F]=k[F];return N},je=function(k){for(var O={},N=0;N<k.length;N++)O[k[N].toUpperCase()]=k[N];return O},Pt=function(k,O){return typeof k===v?ne(O).indexOf(ne(k))!==-1:!1},ne=function(k){return k.toLowerCase()},_n=function(k){return typeof k===v?k.replace(/[^\d\.]/g,i).split(".")[0]:n},He=function(k,O){if(typeof k===v)return k=k.replace(/^\s\s*/,i),typeof O===c?k:k.substring(0,re)},me=function(k,O){for(var N=0,F,Z,q,I,S,Y;N<O.length&&!S;){var qe=O[N],Ot=O[N+1];for(F=Z=0;F<qe.length&&!S&&qe[F];)if(S=qe[F++].exec(k),S)for(q=0;q<Ot.length;q++)Y=S[++Z],I=Ot[q],typeof I===g&&I.length>0?I.length===2?typeof I[1]==f?this[I[0]]=I[1].call(this,Y):this[I[0]]=I[1]:I.length===3?typeof I[1]===f&&!(I[1].exec&&I[1].test)?this[I[0]]=Y?I[1].call(this,Y,I[2]):n:this[I[0]]=Y?Y.replace(I[1],I[2]):n:I.length===4&&(this[I[0]]=Y?I[3].call(this,Y.replace(I[1],I[2])):n):this[I]=Y||n;N+=2}},Se=function(k,O){for(var N in O)if(typeof O[N]===g&&O[N].length>0){for(var F=0;F<O[N].length;F++)if(Pt(O[N][F],k))return N===d?n:N}else if(Pt(O[N],k))return N===d?n:N;return O.hasOwnProperty("*")?O["*"]:k},Rn={"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},kt={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Et={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[b,[m,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[b,[m,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[m,b],[/opios[\/ ]+([\w\.]+)/i],[b,[m,de+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[b,[m,de+" GX"]],[/\bopr\/([\w\.]+)/i],[b,[m,de]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[b,[m,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[m,b],[/quark(?:pc)?\/([-\w\.]+)/i],[b,[m,"Quark"]],[/\bddg\/([\w\.]+)/i],[b,[m,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[b,[m,"UC"+ce]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[b,[m,"WeChat"]],[/konqueror\/([\w\.]+)/i],[b,[m,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[b,[m,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[b,[m,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[b,[m,"Smart Lenovo "+ce]],[/(avast|avg)\/([\w\.]+)/i],[[m,/(.+)/,"$1 Secure "+ce],b],[/\bfocus\/([\w\.]+)/i],[b,[m,ye+" Focus"]],[/\bopt\/([\w\.]+)/i],[b,[m,de+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[b,[m,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[b,[m,"Dolphin"]],[/coast\/([\w\.]+)/i],[b,[m,de+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[b,[m,"MIUI "+ce]],[/fxios\/([-\w\.]+)/i],[b,[m,ye]],[/\bqihu|(qi?ho?o?|360)browser/i],[[m,"360"+Nt]],[/\b(qq)\/([\w\.]+)/i],[[m,/(.+)/,"$1Browser"],b],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[m,/(.+)/,"$1"+Nt],b],[/samsungbrowser\/([\w\.]+)/i],[b,[m,ue+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[m,/_/g," "],b],[/metasr[\/ ]?([\d\.]+)/i],[b,[m,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[m,"Sogou Mobile"],b],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[m,b],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[m],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[m,Tt],b],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[m,b],[/\bgsa\/([\w\.]+) .*safari\//i],[b,[m,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[b,[m,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[b,[m,xe+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[m,xe+" WebView"],b],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[b,[m,"Android "+ce]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[m,b],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[b,[m,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[b,m],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[m,[b,Se,Rn]],[/(webkit|khtml)\/([\w\.]+)/i],[m,b],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[m,"Netscape"],b],[/(wolvic)\/([\w\.]+)/i],[m,b],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[b,[m,ye+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[m,[b,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[m,[b,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[P,"amd64"]],[/(ia32(?=;))/i],[[P,ne]],[/((?:i[346]|x)86)[;\)]/i],[[P,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[P,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[P,"armhf"]],[/windows (ce|mobile); ppc;/i],[[P,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[P,/ower/,i,ne]],[/(sun4\w)[;\)]/i],[[P,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[P,ne]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[l,[p,ue],[u,w]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[l,[p,ue],[u,C]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[l,[p,Q],[u,C]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[l,[p,Q],[u,w]],[/(macintosh);/i],[l,[p,Q]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[l,[p,Ct],[u,C]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[l,[p,xt],[u,w]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[l,[p,xt],[u,C]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i],[[l,/_/g," "],[p,Ge],[u,C]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[l,/_/g," "],[p,Ge],[u,w]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[l,[p,"OPPO"],[u,C]],[/\b(opd2\d{3}a?) bui/i],[l,[p,"OPPO"],[u,w]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[l,[p,"Vivo"],[u,C]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[l,[p,"Realme"],[u,C]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[l,[p,yt],[u,C]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[l,[p,yt],[u,w]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[l,[p,We],[u,w]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[l,[p,We],[u,C]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[l,[p,"Lenovo"],[u,w]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[l,/_/g," "],[p,"Nokia"],[u,C]],[/(pixel c)\b/i],[l,[p,Ce],[u,w]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[l,[p,Ce],[u,C]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[l,[p,Te],[u,C]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[l,"Xperia Tablet"],[p,Te],[u,w]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[l,[p,"OnePlus"],[u,C]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[l,[p,J],[u,w]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[l,/(.+)/g,"Fire Phone $1"],[p,J],[u,C]],[/(playbook);[-\w\),; ]+(rim)/i],[l,p,[u,w]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[l,[p,wt],[u,C]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[l,[p,ht],[u,w]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[l,[p,ht],[u,C]],[/(nexus 9)/i],[l,[p,"HTC"],[u,w]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[p,[l,/_/g," "],[u,C]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[l,[p,"TCL"],[u,w]],[/(itel) ((\w+))/i],[[p,ne],l,[u,Se,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[l,[p,"Acer"],[u,w]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[l,[p,"Meizu"],[u,C]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[l,[p,"Ulefone"],[u,C]],[/droid.+; (a(?:015|06[35]|142p?))/i],[l,[p,"Nothing"],[u,C]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[p,l,[u,C]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[p,l,[u,w]],[/(surface duo)/i],[l,[p,ze],[u,w]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[l,[p,"Fairphone"],[u,C]],[/(u304aa)/i],[l,[p,"AT&T"],[u,C]],[/\bsie-(\w*)/i],[l,[p,"Siemens"],[u,C]],[/\b(rct\w+) b/i],[l,[p,"RCA"],[u,w]],[/\b(venue[\d ]{2,7}) b/i],[l,[p,"Dell"],[u,w]],[/\b(q(?:mv|ta)\w+) b/i],[l,[p,"Verizon"],[u,w]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[l,[p,"Barnes & Noble"],[u,w]],[/\b(tm\d{3}\w+) b/i],[l,[p,"NuVision"],[u,w]],[/\b(k88) b/i],[l,[p,"ZTE"],[u,w]],[/\b(nx\d{3}j) b/i],[l,[p,"ZTE"],[u,C]],[/\b(gen\d{3}) b.+49h/i],[l,[p,"Swiss"],[u,C]],[/\b(zur\d{3}) b/i],[l,[p,"Swiss"],[u,w]],[/\b((zeki)?tb.*\b) b/i],[l,[p,"Zeki"],[u,w]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[p,"Dragon Touch"],l,[u,w]],[/\b(ns-?\w{0,9}) b/i],[l,[p,"Insignia"],[u,w]],[/\b((nxa|next)-?\w{0,9}) b/i],[l,[p,"NextBook"],[u,w]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[p,"Voice"],l,[u,C]],[/\b(lvtel\-)?(v1[12]) b/i],[[p,"LvTel"],l,[u,C]],[/\b(ph-1) /i],[l,[p,"Essential"],[u,C]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[l,[p,"Envizen"],[u,w]],[/\b(trio[-\w\. ]+) b/i],[l,[p,"MachSpeed"],[u,w]],[/\btu_(1491) b/i],[l,[p,"Rotor"],[u,w]],[/(shield[\w ]+) b/i],[l,[p,"Nvidia"],[u,w]],[/(sprint) (\w+)/i],[p,l,[u,C]],[/(kin\.[onetw]{3})/i],[[l,/\./g," "],[p,ze],[u,C]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[l,[p,$e],[u,w]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[l,[p,$e],[u,C]],[/smart-tv.+(samsung)/i],[p,[u,E]],[/hbbtv.+maple;(\d+)/i],[[l,/^/,"SmartTV"],[p,ue],[u,E]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[p,We],[u,E]],[/(apple) ?tv/i],[p,[l,Q+" TV"],[u,E]],[/crkey/i],[[l,xe+"cast"],[p,Ce],[u,E]],[/droid.+aft(\w+)( bui|\))/i],[l,[p,J],[u,E]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[l,[p,Ct],[u,E]],[/(bravia[\w ]+)( bui|\))/i],[l,[p,Te],[u,E]],[/(mitv-\w{5}) bui/i],[l,[p,Ge],[u,E]],[/Hbbtv.*(technisat) (.*);/i],[p,l,[u,E]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[p,He],[l,He],[u,E]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[u,E]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[p,l,[u,T]],[/droid.+; (shield) bui/i],[l,[p,"Nvidia"],[u,T]],[/(playstation [345portablevi]+)/i],[l,[p,Te],[u,T]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[l,[p,ze],[u,T]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[l,[p,ue],[u,R]],[/((pebble))app/i],[p,l,[u,R]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[l,[p,Q],[u,R]],[/droid.+; (glass) \d/i],[l,[p,Ce],[u,R]],[/droid.+; (wt63?0{2,3})\)/i],[l,[p,$e],[u,R]],[/(quest( \d| pro)?)/i],[l,[p,Tt],[u,R]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[p,[u,$]],[/(aeobc)\b/i],[l,[p,J],[u,$]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[l,[u,C]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[l,[u,w]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[u,w]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[u,C]],[/(android[-\w\. ]{0,9});.+buil/i],[l,[p,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[b,[m,Fn+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[b,[m,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[m,b],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[b,m]],os:[[/microsoft (windows) (vista|xp)/i],[m,b],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[m,[b,Se,kt]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[b,Se,kt],[m,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[b,/_/g,"."],[m,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[m,St],[b,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[b,m],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[m,b],[/\(bb(10);/i],[b,[m,wt]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[b,[m,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[b,[m,ye+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[b,[m,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[b,[m,"watchOS"]],[/crkey\/([\d\.]+)/i],[b,[m,xe+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[m,jt],b],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[m,b],[/(sunos) ?([\w\.\d]*)/i],[[m,"Solaris"],b],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[m,b]]},H=function(k,O){if(typeof k===g&&(O=k,k=n),!(this instanceof H))return new H(k,O).getResult();var N=typeof t!==c&&t.navigator?t.navigator:n,F=k||(N&&N.userAgent?N.userAgent:i),Z=N&&N.userAgentData?N.userAgentData:n,q=O?Mn(Et,O):Et,I=N&&N.userAgent==F;return this.getBrowser=function(){var S={};return S[m]=n,S[b]=n,me.call(S,F,q.browser),S[h]=_n(S[b]),I&&N&&N.brave&&typeof N.brave.isBrave==f&&(S[m]="Brave"),S},this.getCPU=function(){var S={};return S[P]=n,me.call(S,F,q.cpu),S},this.getDevice=function(){var S={};return S[p]=n,S[l]=n,S[u]=n,me.call(S,F,q.device),I&&!S[u]&&Z&&Z.mobile&&(S[u]=C),I&&S[l]=="Macintosh"&&N&&typeof N.standalone!==c&&N.maxTouchPoints&&N.maxTouchPoints>2&&(S[l]="iPad",S[u]=w),S},this.getEngine=function(){var S={};return S[m]=n,S[b]=n,me.call(S,F,q.engine),S},this.getOS=function(){var S={};return S[m]=n,S[b]=n,me.call(S,F,q.os),I&&!S[m]&&Z&&Z.platform&&Z.platform!="Unknown"&&(S[m]=Z.platform.replace(/chrome os/i,jt).replace(/macos/i,St)),S},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return F},this.setUA=function(S){return F=typeof S===v&&S.length>re?He(S,re):S,this},this.setUA(F),this};H.VERSION=o,H.BROWSER=je([m,b,h]),H.CPU=je([P]),H.DEVICE=je([l,p,u,T,C,E,w,R,$]),H.ENGINE=H.OS=je([m,b]),r.exports&&(e=r.exports=H),e.UAParser=H;var oe=typeof t!==c&&(t.jQuery||t.Zepto);if(oe&&!oe.ua){var Ne=new H;oe.ua=Ne.getResult(),oe.ua.get=function(){return Ne.getUA()},oe.ua.set=function(k){Ne.setUA(k);var O=Ne.getResult();for(var N in O)oe.ua[N]=O[N]}}})(typeof window=="object"?window:Oo)})(Ze,Ze.exports);var Io=Ze.exports;Object.defineProperty(y,"__esModule",{value:!0});function Ao(r){return r&&typeof r=="object"&&"default"in r?r.default:r}var B=A,M=Ao(B),pr=Io,ee=new pr,L=ee.getBrowser(),Fo=ee.getCPU(),z=ee.getDevice(),dt=ee.getEngine(),te=ee.getOS(),he=ee.getUA(),fr=function(e){return ee.setUA(e)},we=function(e){if(!e){console.error("No userAgent string was provided");return}var t=new pr(e);return{UA:t,browser:t.getBrowser(),cpu:t.getCPU(),device:t.getDevice(),engine:t.getEngine(),os:t.getOS(),ua:t.getUA(),setUserAgent:function(o){return t.setUA(o)}}},gr=Object.freeze({ClientUAInstance:ee,browser:L,cpu:Fo,device:z,engine:dt,os:te,ua:he,setUa:fr,parseUserAgent:we});function _t(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(r,o).enumerable})),t.push.apply(t,n)}return t}function Mo(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?_t(Object(t),!0).forEach(function(n){Vo(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):_t(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function be(r){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?be=function(e){return typeof e}:be=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},be(r)}function _o(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function Ro(r,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,n.key,n)}}function Do(r,e,t){return e&&Ro(r.prototype,e),r}function Vo(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Ke(){return Ke=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},Ke.apply(this,arguments)}function Bo(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),e&&Qe(r,e)}function Je(r){return Je=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Je(r)}function Qe(r,e){return Qe=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},Qe(r,e)}function Lo(r,e){if(r==null)return{};var t={},n=Object.keys(r),o,i;for(i=0;i<n.length;i++)o=n[i],!(e.indexOf(o)>=0)&&(t[o]=r[o]);return t}function G(r,e){if(r==null)return{};var t=Lo(r,e),n,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);for(o=0;o<i.length;o++)n=i[o],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(r,n)&&(t[n]=r[n])}return t}function ke(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function Uo(r,e){if(e&&(typeof e=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ke(r)}function Wo(r,e){return zo(r)||Go(r,e)||$o(r,e)||Ho()}function zo(r){if(Array.isArray(r))return r}function Go(r,e){var t=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(t!=null){var n=[],o=!0,i=!1,d,f;try{for(t=t.call(r);!(o=(d=t.next()).done)&&(n.push(d.value),!(e&&n.length===e));o=!0);}catch(c){i=!0,f=c}finally{try{!o&&t.return!=null&&t.return()}finally{if(i)throw f}}return n}}function $o(r,e){if(r){if(typeof r=="string")return Rt(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Array.from(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Rt(r,e)}}function Rt(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}function Ho(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var D={Mobile:"mobile",Tablet:"tablet",SmartTv:"smarttv",Console:"console",Wearable:"wearable",Embedded:"embedded",Browser:void 0},W={Chrome:"Chrome",Firefox:"Firefox",Opera:"Opera",Yandex:"Yandex",Safari:"Safari",InternetExplorer:"Internet Explorer",Edge:"Edge",Chromium:"Chromium",Ie:"IE",MobileSafari:"Mobile Safari",EdgeChromium:"Edge Chromium",MIUI:"MIUI Browser",SamsungBrowser:"Samsung Browser"},se={IOS:"iOS",Android:"Android",WindowsPhone:"Windows Phone",Windows:"Windows",MAC_OS:"Mac OS"},qo={isMobile:!1,isTablet:!1,isBrowser:!1,isSmartTV:!1,isConsole:!1,isWearable:!1},Yo=function(e){switch(e){case D.Mobile:return{isMobile:!0};case D.Tablet:return{isTablet:!0};case D.SmartTv:return{isSmartTV:!0};case D.Console:return{isConsole:!0};case D.Wearable:return{isWearable:!0};case D.Browser:return{isBrowser:!0};case D.Embedded:return{isEmbedded:!0};default:return qo}},Xo=function(e){return fr(e)},j=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"none";return e||t},ut=function(){return typeof window<"u"&&(window.navigator||navigator)?window.navigator||navigator:!1},mt=function(e){var t=ut();return t&&t.platform&&(t.platform.indexOf(e)!==-1||t.platform==="MacIntel"&&t.maxTouchPoints>1&&!window.MSStream)},Zo=function(e,t,n,o,i){return{isBrowser:e,browserMajorVersion:j(t.major),browserFullVersion:j(t.version),browserName:j(t.name),engineName:j(n.name),engineVersion:j(n.version),osName:j(o.name),osVersion:j(o.version),userAgent:j(i)}},Dt=function(e,t,n,o){return Mo({},e,{vendor:j(t.vendor),model:j(t.model),os:j(n.name),osVersion:j(n.version),ua:j(o)})},Ko=function(e,t,n,o){return{isSmartTV:e,engineName:j(t.name),engineVersion:j(t.version),osName:j(n.name),osVersion:j(n.version),userAgent:j(o)}},Jo=function(e,t,n,o){return{isConsole:e,engineName:j(t.name),engineVersion:j(t.version),osName:j(n.name),osVersion:j(n.version),userAgent:j(o)}},Qo=function(e,t,n,o){return{isWearable:e,engineName:j(t.name),engineVersion:j(t.version),osName:j(n.name),osVersion:j(n.version),userAgent:j(o)}},ea=function(e,t,n,o,i){return{isEmbedded:e,vendor:j(t.vendor),model:j(t.model),engineName:j(n.name),engineVersion:j(n.version),osName:j(o.name),osVersion:j(o.version),userAgent:j(i)}};function ta(r){var e=r?we(r):gr,t=e.device,n=e.browser,o=e.engine,i=e.os,d=e.ua,f=Yo(t.type),c=f.isBrowser,g=f.isMobile,v=f.isTablet,h=f.isSmartTV,l=f.isConsole,m=f.isWearable,u=f.isEmbedded;if(c)return Zo(c,n,o,i,d);if(h)return Ko(h,o,i,d);if(l)return Jo(l,o,i,d);if(g||v)return Dt(f,t,i,d);if(m)return Qo(m,o,i,d);if(u)return ea(u,t,o,i,d)}var br=function(e){var t=e.type;return t===D.Mobile},vr=function(e){var t=e.type;return t===D.Tablet},hr=function(e){var t=e.type;return t===D.Mobile||t===D.Tablet},wr=function(e){var t=e.type;return t===D.SmartTv},Ae=function(e){var t=e.type;return t===D.Browser},xr=function(e){var t=e.type;return t===D.Wearable},yr=function(e){var t=e.type;return t===D.Console},Cr=function(e){var t=e.type;return t===D.Embedded},Tr=function(e){var t=e.vendor;return j(t)},jr=function(e){var t=e.model;return j(t)},Sr=function(e){var t=e.type;return j(t,"browser")},Nr=function(e){var t=e.name;return t===se.Android},Pr=function(e){var t=e.name;return t===se.Windows},kr=function(e){var t=e.name;return t===se.MAC_OS},Er=function(e){var t=e.name;return t===se.WindowsPhone},Or=function(e){var t=e.name;return t===se.IOS},Ir=function(e){var t=e.version;return j(t)},Ar=function(e){var t=e.name;return j(t)},Fr=function(e){var t=e.name;return t===W.Chrome},Mr=function(e){var t=e.name;return t===W.Firefox},_r=function(e){var t=e.name;return t===W.Chromium},Fe=function(e){var t=e.name;return t===W.Edge},Rr=function(e){var t=e.name;return t===W.Yandex},Dr=function(e){var t=e.name;return t===W.Safari||t===W.MobileSafari},Vr=function(e){var t=e.name;return t===W.MobileSafari},Br=function(e){var t=e.name;return t===W.Opera},Lr=function(e){var t=e.name;return t===W.InternetExplorer||t===W.Ie},Ur=function(e){var t=e.name;return t===W.MIUI},Wr=function(e){var t=e.name;return t===W.SamsungBrowser},zr=function(e){var t=e.version;return j(t)},Gr=function(e){var t=e.major;return j(t)},$r=function(e){var t=e.name;return j(t)},Hr=function(e){var t=e.name;return j(t)},qr=function(e){var t=e.version;return j(t)},Yr=function(){var e=ut(),t=e&&e.userAgent&&e.userAgent.toLowerCase();return typeof t=="string"?/electron/.test(t):!1},ae=function(e){return typeof e=="string"&&e.indexOf("Edg/")!==-1},Xr=function(){var e=ut();return e&&(/iPad|iPhone|iPod/.test(e.platform)||e.platform==="MacIntel"&&e.maxTouchPoints>1)&&!window.MSStream},X=function(){return mt("iPad")},Zr=function(){return mt("iPhone")},Kr=function(){return mt("iPod")},Jr=function(e){return j(e)};function Qr(r){var e=r||gr,t=e.device,n=e.browser,o=e.os,i=e.engine,d=e.ua;return{isSmartTV:wr(t),isConsole:yr(t),isWearable:xr(t),isEmbedded:Cr(t),isMobileSafari:Vr(n)||X(),isChromium:_r(n),isMobile:hr(t)||X(),isMobileOnly:br(t),isTablet:vr(t)||X(),isBrowser:Ae(t),isDesktop:Ae(t),isAndroid:Nr(o),isWinPhone:Er(o),isIOS:Or(o)||X(),isChrome:Fr(n),isFirefox:Mr(n),isSafari:Dr(n),isOpera:Br(n),isIE:Lr(n),osVersion:Ir(o),osName:Ar(o),fullBrowserVersion:zr(n),browserVersion:Gr(n),browserName:$r(n),mobileVendor:Tr(t),mobileModel:jr(t),engineName:Hr(i),engineVersion:qr(i),getUA:Jr(d),isEdge:Fe(n)||ae(d),isYandex:Rr(n),deviceType:Sr(t),isIOS13:Xr(),isIPad13:X(),isIPhone13:Zr(),isIPod13:Kr(),isElectron:Yr(),isEdgeChromium:ae(d),isLegacyEdge:Fe(n)&&!ae(d),isWindows:Pr(o),isMacOs:kr(o),isMIUI:Ur(n),isSamsungBrowser:Wr(n)}}var en=wr(z),tn=yr(z),rn=xr(z),ra=Cr(z),na=Vr(L)||X(),oa=_r(L),De=hr(z)||X(),nn=br(z),on=vr(z)||X(),an=Ae(z),aa=Ae(z),sn=Nr(te),ln=Er(te),cn=Or(te)||X(),ia=Fr(L),sa=Mr(L),la=Dr(L),ca=Br(L),dn=Lr(L),da=Ir(te),ua=Ar(te),ma=zr(L),pa=Gr(L),fa=$r(L),ga=Tr(z),ba=jr(z),va=Hr(dt),ha=qr(dt),wa=Jr(he),xa=Fe(L)||ae(he),ya=Rr(L),Ca=Sr(z),Ta=Xr(),ja=X(),Sa=Zr(),Na=Kr(),Pa=Yr(),ka=ae(he),Ea=Fe(L)&&!ae(he),Oa=Pr(te),Ia=kr(te),Aa=Ur(L),Fa=Wr(L),Ma=function(e){if(!e||typeof e!="string"){console.error("No valid user agent string was provided");return}var t=we(e),n=t.device,o=t.browser,i=t.os,d=t.engine,f=t.ua;return Qr({device:n,browser:o,os:i,engine:d,ua:f})},_a=function(e){var t=e.renderWithFragment,n=e.children,o=G(e,["renderWithFragment","children"]);return sn?t?M.createElement(B.Fragment,null,n):M.createElement("div",o,n):null},Ra=function(e){var t=e.renderWithFragment,n=e.children,o=G(e,["renderWithFragment","children"]);return an?t?M.createElement(B.Fragment,null,n):M.createElement("div",o,n):null},Da=function(e){var t=e.renderWithFragment,n=e.children,o=G(e,["renderWithFragment","children"]);return dn?t?M.createElement(B.Fragment,null,n):M.createElement("div",o,n):null},Va=function(e){var t=e.renderWithFragment,n=e.children,o=G(e,["renderWithFragment","children"]);return cn?t?M.createElement(B.Fragment,null,n):M.createElement("div",o,n):null},Ba=function(e){var t=e.renderWithFragment,n=e.children,o=G(e,["renderWithFragment","children"]);return De?t?M.createElement(B.Fragment,null,n):M.createElement("div",o,n):null},La=function(e){var t=e.renderWithFragment,n=e.children,o=G(e,["renderWithFragment","children"]);return on?t?M.createElement(B.Fragment,null,n):M.createElement("div",o,n):null},Ua=function(e){var t=e.renderWithFragment,n=e.children,o=G(e,["renderWithFragment","children"]);return ln?t?M.createElement(B.Fragment,null,n):M.createElement("div",o,n):null},Wa=function(e){var t=e.renderWithFragment,n=e.children;e.viewClassName,e.style;var o=G(e,["renderWithFragment","children","viewClassName","style"]);return nn?t?M.createElement(B.Fragment,null,n):M.createElement("div",o,n):null},za=function(e){var t=e.renderWithFragment,n=e.children,o=G(e,["renderWithFragment","children"]);return en?t?M.createElement(B.Fragment,null,n):M.createElement("div",o,n):null},Ga=function(e){var t=e.renderWithFragment,n=e.children,o=G(e,["renderWithFragment","children"]);return tn?t?M.createElement(B.Fragment,null,n):M.createElement("div",o,n):null},$a=function(e){var t=e.renderWithFragment,n=e.children,o=G(e,["renderWithFragment","children"]);return rn?t?M.createElement(B.Fragment,null,n):M.createElement("div",o,n):null},Ha=function(e){var t=e.renderWithFragment,n=e.children;e.viewClassName,e.style;var o=e.condition,i=G(e,["renderWithFragment","children","viewClassName","style","condition"]);return o?t?M.createElement(B.Fragment,null,n):M.createElement("div",i,n):null};function qa(r){return function(e){Bo(t,e);function t(n){var o;return _o(this,t),o=Uo(this,Je(t).call(this,n)),o.isEventListenerAdded=!1,o.handleOrientationChange=o.handleOrientationChange.bind(ke(o)),o.onOrientationChange=o.onOrientationChange.bind(ke(o)),o.onPageLoad=o.onPageLoad.bind(ke(o)),o.state={isLandscape:!1,isPortrait:!1},o}return Do(t,[{key:"handleOrientationChange",value:function(){this.isEventListenerAdded||(this.isEventListenerAdded=!0);var o=window.innerWidth>window.innerHeight?90:0;this.setState({isPortrait:o===0,isLandscape:o===90})}},{key:"onOrientationChange",value:function(){this.handleOrientationChange()}},{key:"onPageLoad",value:function(){this.handleOrientationChange()}},{key:"componentDidMount",value:function(){(typeof window>"u"?"undefined":be(window))!==void 0&&De&&(this.isEventListenerAdded?window.removeEventListener("load",this.onPageLoad,!1):(this.handleOrientationChange(),window.addEventListener("load",this.onPageLoad,!1)),window.addEventListener("resize",this.onOrientationChange,!1))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.onOrientationChange,!1)}},{key:"render",value:function(){return M.createElement(r,Ke({},this.props,{isLandscape:this.state.isLandscape,isPortrait:this.state.isPortrait}))}}]),t}(M.Component)}function Ya(){var r=B.useState(function(){var i=window.innerWidth>window.innerHeight?90:0;return{isPortrait:i===0,isLandscape:i===90,orientation:i===0?"portrait":"landscape"}}),e=Wo(r,2),t=e[0],n=e[1],o=B.useCallback(function(){var i=window.innerWidth>window.innerHeight?90:0,d={isPortrait:i===0,isLandscape:i===90,orientation:i===0?"portrait":"landscape"};t.orientation!==d.orientation&&n(d)},[t.orientation]);return B.useEffect(function(){return(typeof window>"u"?"undefined":be(window))!==void 0&&De&&(o(),window.addEventListener("load",o,!1),window.addEventListener("resize",o,!1)),function(){window.removeEventListener("resize",o,!1),window.removeEventListener("load",o,!1)}},[o]),t}function un(r){var e=r||window.navigator.userAgent;return we(e)}function Xa(r){var e=r||window.navigator.userAgent,t=un(e),n=Qr(t);return[n,t]}y.AndroidView=_a;y.BrowserTypes=W;y.BrowserView=Ra;y.ConsoleView=Ga;y.CustomView=Ha;y.IEView=Da;y.IOSView=Va;y.MobileOnlyView=Wa;y.MobileView=Ba;y.OsTypes=se;y.SmartTVView=za;y.TabletView=La;y.WearableView=$a;y.WinPhoneView=Ua;y.browserName=fa;y.browserVersion=pa;y.deviceDetect=ta;y.deviceType=Ca;y.engineName=va;y.engineVersion=ha;y.fullBrowserVersion=ma;y.getSelectorsByUserAgent=Ma;y.getUA=wa;y.isAndroid=sn;y.isBrowser=an;y.isChrome=ia;y.isChromium=oa;y.isConsole=tn;y.isDesktop=aa;y.isEdge=xa;y.isEdgeChromium=ka;y.isElectron=Pa;y.isEmbedded=ra;y.isFirefox=sa;y.isIE=dn;y.isIOS=cn;y.isIOS13=Ta;y.isIPad13=ja;y.isIPhone13=Sa;y.isIPod13=Na;y.isLegacyEdge=Ea;y.isMIUI=Aa;y.isMacOs=Ia;var ge=y.isMobile=De;y.isMobileOnly=nn;y.isMobileSafari=na;y.isOpera=ca;y.isSafari=la;y.isSamsungBrowser=Fa;y.isSmartTV=en;y.isTablet=on;y.isWearable=rn;y.isWinPhone=ln;y.isWindows=Oa;y.isYandex=ya;y.mobileModel=ba;y.mobileVendor=ga;y.osName=ua;y.osVersion=da;y.parseUserAgent=we;y.setUserAgent=Xo;y.useDeviceData=un;y.useDeviceSelectors=Xa;y.useMobileOrientation=Ya;y.withOrientationChange=qa;function Za({adKey:r,filename:e,title:t,backgroundColor:n,hideButton:o=!1,buttonColors:i,linkType:d="homepage",isLoading:f=!1,className:c}){var m;const g=r&&e,v=`https://cdn.sayun.studio/boottent/images/banners/${r}/${e}`,h={background:i?i.button:V.defaultBannerColor.button,color:i?i.buttonText:V.defaultBannerColor.buttonText,border:i?i.button:V.defaultBannerColor.button},l=f?_.Skeleton:s.Box;return a.jsx(l,{style:{backgroundColor:f?void 0:n},type:f?"background":void 0,className:s.cn("relative h-40 w-full overflow-hidden md:h-[200px]",f?"bg-white":"border-y border-y-grey-200",c),children:f?a.jsx(mn,{}):a.jsx(a.Fragment,{children:a.jsxs(s.FlexBox.Row,{className:"absolute inset-0 mx-auto h-full w-full max-w-screen-xl px-0 pb-6 pt-0 md:h-auto md:px-6 md:pb-0 md:pt-10 lg:px-10 lg:pt-6",children:[g?a.jsx("div",{className:"mx-auto flex h-full w-full items-center md:items-start",children:a.jsx("img",{loading:"lazy",src:v,alt:`${t} 이미지`,className:"h-auto max-h-[136px] w-full object-contain md:max-h-40 lg:max-h-[176px]"})}):a.jsx(s.Box,{className:"h-full w-full bg-grey-100 text-muted",children:t}),!o&&a.jsx(s.Box,{className:"absolute inset-0 mx-auto max-w-screen-xl px-4 md:px-6 lg:px-10",children:a.jsx(s.Button,{style:h,theme:"etc",variant:"solid",size:ge?"sm":"md",className:"absolute bottom-4 right-4 h-9 w-24 md:bottom-6 md:right-6 md:h-11 md:w-32 lg:bottom-4 lg:right-10",children:((m=Eo[d])==null?void 0:m.label)+" →"||"홈페이지 →"})})]})})})}function mn(){return a.jsxs(s.FlexBox.Col,{className:"relative mx-auto flex h-full w-full max-w-screen-xl items-start gap-5 px-4 pt-4 md:px-6 md:pt-10 lg:px-10",children:[a.jsx(_.Skeleton,{type:"text",className:"h-6 w-4/5 rounded-xl md:h-10"}),a.jsx(_.Skeleton,{type:"text",className:"h-10 w-1/2 rounded-xl md:h-16 lg:w-3/5"}),a.jsx(_.Skeleton,{type:"text",className:"absolute bottom-4 right-4 aspect-[3/1] w-[120px] shrink-0 md:right-6 md:w-[140px] lg:right-10"})]})}const Ka=({logo:r,title:e,subtitle:t,thumbnail:n,batchTitle:o,batchName:i="",brandName:d,tag:f,isLoading:c=!1,className:g})=>{const v=c?_.Skeleton:s.Box;return a.jsxs(v,{title:e,type:"background",className:s.cn("xs:h-full relative z-10 box-border h-[154px] w-full max-w-[720px] cursor-pointer overflow-hidden rounded-xl bg-white p-4 md:h-[174px] md:max-w-[592px] md:p-5 lg:h-[174px] lg:p-6 xl:h-[174px]",c?"":"border border-grey-200",g),children:[a.jsx(s.Tag,{variant:"ad",style:{background:V.adProducts.premiumCard.background,color:V.adProducts.premiumCard.color},className:s.cn(c&&"h-7 w-28 animate-pulse"),children:c?"":f}),c?a.jsx(Qa,{}):a.jsx(Ja,{logo:r,brandName:d,batchTitle:o,batchName:i,subtitle:t,thumbnail:n})]})},Ja=({logo:r,brandName:e,batchTitle:t,batchName:n,subtitle:o,thumbnail:i})=>a.jsxs(s.FlexBox.Col,{className:"h-full justify-start gap-2",children:[a.jsx(Oe,{src:r,alt:`${e} 로고`,className:"h-4 object-contain"}),a.jsxs(s.FlexBox.Row,{className:"w-full items-start justify-between gap-6",children:[a.jsxs(s.FlexBox.Col,{className:"flex h-full grow flex-col justify-between gap-2 pb-2",children:[a.jsxs("h3",{className:"line-clamp-2 h-auto text-sm font-normal md:h-12 md:text-base",title:`${e} ${t} ${n}`,children:[t," ",n]}),a.jsx("h4",{className:"line-clamp-2 max-h-[56px] w-full break-keep rounded bg-grey-100 px-2 py-1 text-[13px] font-semibold text-grey-600 md:text-[15px] md:text-grey-800",title:o,children:o})]}),a.jsx(Oe,{src:i,alt:`${t} 썸네일`,className:"h-[86px] w-[86px] shrink-0 grow-0 rounded-xl border border-grey-200 object-cover md:h-[96px] md:w-[96px]"})]})]}),Qa=()=>a.jsxs(s.FlexBox.Col,{className:"h-full justify-center gap-2",children:[a.jsx(_.Skeleton,{className:"h-4 w-1/2"}),a.jsxs(s.FlexBox.Row,{className:"w-full items-start justify-between gap-6",children:[a.jsxs(s.FlexBox.Col,{className:"flex h-full w-full flex-col justify-between gap-2 pb-2",children:[a.jsx(_.Skeleton,{className:"h-5 w-4/5 lg:h-12"}),a.jsx(_.Skeleton,{className:"h-5 w-4/5"})]}),a.jsx(_.Skeleton,{className:"h-[86px] w-[86px] shrink-0 grow-0 rounded-xl md:h-[96px] md:w-[96px]"})]})]}),ei=({tags:r,coverImage:e,brandName:t,title:n,batchName:o="",titleTagType:i,adTitle:d,changedAspect:f="aspect-[8/5]",isLoading:c=!1,className:g})=>c?a.jsx(ti,{changedAspect:f,className:g,titleTagType:i}):a.jsxs(s.FlexBox.Col,{className:s.cn("shadow-base h-full w-full shrink-0 cursor-pointer overflow-hidden rounded-xl border border-grey-700 bg-white transition-all",g),children:[a.jsxs(s.Box,{style:{background:"linear-gradient(0deg, rgba(24, 25, 25, 0.00) 17.43%, #181919 91.02%)"},className:`relative flex ${f} w-full flex-col items-center justify-center overflow-hidden`,children:[a.jsx(Oe,{src:e,alt:`${t} ${n} ${o} 이미지`,className:"h-full w-full object-cover"}),i&&a.jsx(s.Tag,{variant:"ad",style:{background:V.adProducts.titleTag.background,color:V.adProducts.titleTag.color},children:i}),d&&a.jsxs(a.Fragment,{children:[a.jsx(s.Box,{className:"absolute left-4 top-4 z-10 w-36 whitespace-pre-wrap break-keep text-[18px] font-semibold text-white md:left-5 md:top-7",children:d}),a.jsx(s.Box,{className:"absolute inset-0 opacity-50",style:{background:"linear-gradient(270deg, rgba(24, 25, 25, 0.00) 17.43%, #181919 91.02%)"}})]})]}),a.jsxs(s.FlexBox.Col,{className:"w-full justify-between gap-2 p-4 text-grey-800 md:p-5 lg:p-6",children:[a.jsxs("h4",{className:"flex flex-col gap-2",title:`${t} ${n} ${o}`,children:[a.jsx("p",{className:"text-sm",children:t}),a.jsx("p",{className:"truncate3 break-keep text-base font-semibold",children:`${n} ${o}`})]}),r&&a.jsx("ul",{className:"flex w-full max-w-full flex-wrap gap-1",children:r.map((v,h)=>{var m;const l=Object.values(V.campCategoryColors).find(u=>u.tags.some(p=>p.value===v));return l&&a.jsx("li",{children:a.jsx(s.Tag,{size:"sm",style:{background:l.background,color:l.color},children:(m=l.tags.find(u=>u.value===v))==null?void 0:m.text})},h)})})]})]}),ti=({changedAspect:r,className:e,titleTagType:t})=>a.jsxs(_.Skeleton,{type:"background",className:s.cn("relative h-full w-full shrink-0 cursor-pointer overflow-hidden rounded-xl bg-grey-50 transition-all",e),children:[t&&a.jsx(s.Tag,{variant:"ad",style:{background:V.adProducts.titleTag.background,color:V.adProducts.titleTag.color},className:s.cn("h-7 w-28 animate-pulse rounded-bl-lg rounded-br-none rounded-tl-none rounded-tr-lg px-2 py-1 text-sm"),children:""}),a.jsx(s.Box,{style:{background:"linear-gradient(270deg, rgba(24, 25, 25, 0.00) 17.43%, #181919 91.02%)"},className:`relative flex ${r} w-full`,children:a.jsx(_.Skeleton,{className:"h-full w-full",type:"background"})}),a.jsxs(s.FlexBox.Col,{className:"w-full justify-between gap-2 p-4",children:[a.jsxs(s.FlexBox.Col,{className:"relative w-full gap-2",children:[a.jsx(_.Skeleton,{className:"h-5 w-1/2",type:"text"}),a.jsx(_.Skeleton,{className:"h-12 w-full",type:"text"})]}),a.jsxs(s.FlexBox.Row,{className:"w-full gap-1",children:[a.jsx(_.Skeleton,{className:"h-5 w-1/4",type:"text"}),a.jsx(_.Skeleton,{className:"h-5 w-2/5",type:"text"}),a.jsx(_.Skeleton,{className:"h-5 w-1/4",type:"text"})]})]})]}),ri=({name:r,control:e,heading:t,label:n,description:o,required:i=!1,text:d,type:f,errorMsg:c=!1,onChange:g,rules:v})=>{const{field:h,fieldState:{error:l}}=s.useController({name:r,control:e,rules:v}),m=n||t||o;return a.jsx(s.FormField,{control:e,name:r,render:()=>a.jsxs(s.FormItem,{children:[m&&a.jsx(s.FormLabel,{required:i,heading:t,label:n,description:o}),a.jsx(s.FormControl,{children:a.jsxs("div",{className:"flex flex-row items-center gap-2",children:[a.jsx(s.Checkbox,{...h,id:r,checked:f==="boolean"?h.value:h.value===d,onCheckedChange:u=>{h.onChange(f==="boolean"?u:u?d:""),g&&g()}}),a.jsx(s.Label,{className:"cursor-pointer",htmlFor:r,children:d})]})}),c&&a.jsx(s.FormMessage,{children:l==null?void 0:l.message})]})})},ni=({name:r,control:e,heading:t,label:n,description:o,options:i,required:d=!1,additional:f,type:c="checkbox",onChange:g,rules:v})=>{const{field:h,fieldState:{error:l}}=s.useController({name:r,control:e,rules:v}),m=(b,P)=>{var T;h.onChange(P?[...h.value||[],b]:(T=h.value)==null?void 0:T.filter(C=>C!==b)),g==null||g()},u=()=>i.map(b=>{var P;return a.jsxs(s.FormItem,{className:"flex flex-row items-center",children:[a.jsx(s.FormControl,{children:a.jsx(s.Checkbox,{id:b.value+r,checked:(P=h.value)==null?void 0:P.includes(b.value),onCheckedChange:T=>m(b.value,T)})}),a.jsx(s.Label,{htmlFor:b.value+r,className:"cursor-pointer",children:b.text})]},b.value)}),p=()=>i.map(({value:b,text:P})=>{var C;const T=(C=h.value)==null?void 0:C.includes(b);return a.jsx(s.FormItem,{className:"flex flex-row items-start gap-2",children:a.jsx(s.FormControl,{children:a.jsx(s.Button,{shape:"rounded",size:"xs",theme:T?"primary":"secondary",variant:T?"solid":"outline",onClick:w=>{w.preventDefault(),m(b,!T)},children:P})})},b)});return a.jsx(s.FormField,{control:e,name:r,render:()=>a.jsxs(s.FormItem,{children:[(n||t||o)&&a.jsx(s.FormLabel,{required:d,heading:t,label:n,description:o}),a.jsx(s.FormControl,{children:c==="checkbox"?a.jsx("div",{className:"space-y-4",children:u()}):a.jsx("ul",{className:"flex w-full flex-wrap gap-2 text-sm font-normal",children:p()})}),f,a.jsx(s.FormMessage,{children:l==null?void 0:l.message})]})})},oi=({name:r,control:e,label:t,description:n,required:o=!1,children:i,className:d,errorMsg:f=!0})=>a.jsx(s.FormField,{control:e,name:r,render:()=>a.jsxs(s.FormItem,{children:[t&&a.jsxs(s.FormLabel,{required:o,children:[a.jsx(s.Text,{children:t}),n&&a.jsx(s.FormDescription,{children:n})]}),a.jsx(s.FormControl,{children:a.jsx("div",{className:d,children:i})}),f&&a.jsx(s.FormMessage,{})]})}),ai=({name:r,control:e,heading:t,label:n,description:o,options:i,required:d=!1,className:f,additional:c,direction:g="vertical",onChange:v,rules:h})=>{const{field:l,fieldState:{error:m}}=s.useController({name:r,control:e,rules:h}),u=n||t||o;return a.jsx(s.FormField,{control:e,name:r,render:()=>a.jsxs(s.FormItem,{className:"relative",children:[u&&a.jsx(s.FormLabel,{required:d,heading:t,label:n,description:o}),a.jsx(s.FormControl,{children:a.jsxs("div",{className:s.cn("flex max-w-screen-sm items-center gap-2",f),children:[a.jsx(s.RadioGroup,{onValueChange:p=>{l.onChange(p),v&&v()},value:l.value,className:s.cn(g==="vertical"&&"flex flex-col gap-4",g==="horizontal"&&"flex flex-wrap gap-8",g==="grid"&&"grid w-full grid-cols-2 gap-x-8 gap-y-4"),children:i.map(p=>a.jsxs(s.FormItem,{className:"flex flex-row items-center",children:[a.jsx(s.FormControl,{children:a.jsx(s.RadioGroupItem,{value:p.value,id:p.text,checked:p.value===l.value})}),a.jsx(s.Label,{className:"cursor-pointer font-normal",htmlFor:p.text,children:p.text})]},p.key))}),c&&a.jsx(a.Fragment,{children:c})]})}),a.jsx(s.FormMessage,{children:m==null?void 0:m.message})]})})},ii=({required:r,heading:e,name:t,label:n,description:o,placeholder:i,control:d,tagDirection:f="flex-col",tagSize:c="md",rules:g})=>{const{setValue:v,getValues:h}=s.useFormContext(),{field:l,fieldState:{error:m}}=s.useController({name:t,control:d,defaultValue:[],rules:g}),[u,p]=A.useState(""),b=()=>{if(u.trim()!==""){const w=h(t)||[];v(t,[...w,u.trim()]),p("")}},P=w=>{w.key==="Enter"&&!w.nativeEvent.isComposing&&(w.preventDefault(),b())},T=w=>{const E=h(t)||[];E.splice(w,1),v(t,E)},C=n||e||o;return a.jsx(s.FormField,{control:d,name:t,render:()=>a.jsxs(s.FormItem,{children:[C&&a.jsx(s.FormLabel,{required:r,heading:e,label:n,description:o}),a.jsx(s.FormControl,{children:a.jsxs("div",{className:"flex flex-col gap-2",children:[l.value&&l.value.length>0&&a.jsx("ul",{className:s.cn("flex flex-col flex-wrap gap-1",f),children:l.value.map((w,E)=>a.jsx("li",{children:a.jsx(s.Tag,{size:c,variant:"solid-secondary-100",onClick:()=>T(E),icRight:a.jsx(s.Icon.Cancel,{size:"10",className:"text-grey-600"}),children:a.jsx("span",{children:w})})},E))}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(s.Input,{value:u,onChange:w=>p(w.target.value),onKeyDown:P,className:"max-w-screen-sm",placeholder:i,error:!!m}),a.jsx(s.Button,{size:"md",variant:"outline",disabled:!u.trim(),theme:"secondary",onClick:b,className:"whitespace-nowrap",children:"추가"})]})]})}),a.jsx(s.FormMessage,{children:m==null?void 0:m.message})]})})},si=({name:r,control:e,heading:t,label:n,description:o,placeholder:i,required:d=!1,isTextArea:f=!1,unitLabel:c,unitLabelBefore:g,inputType:v="text",className:h,onChange:l,onBlur:m,icon:u,disabled:p,errorMsg:b=!0,rules:P})=>{const{field:T,formState:{errors:C}}=s.useController({name:r,control:e,rules:P}),w=R=>{const $=v==="number"?Number(R.target.value):R.target.value;T.onChange($),l==null||l($)},E=n||t||o;return a.jsx(s.FormField,{control:e,name:r,render:()=>a.jsxs(s.FormItem,{children:[E&&a.jsx(s.FormLabel,{required:d,heading:t,label:n,description:o}),a.jsx(s.FormControl,{children:a.jsxs("div",{className:s.cn("flex w-full max-w-screen-sm items-center gap-2",h),children:[g&&a.jsx("div",{className:"whitespace-nowrap",children:g}),f?a.jsx(s.Textarea,{...T,placeholder:i,className:"h-32",disabled:p,error:!!C[r],onChange:w}):a.jsx(s.Input,{...T,type:v,placeholder:i,disabled:p,error:!!C[r],onChange:w,onBlur:m,icon:u,iconPosition:"right"}),c&&a.jsx("div",{className:"whitespace-nowrap",children:c})]})}),b&&a.jsx(s.FormMessage,{})]})})},li=({name:r,control:e,heading:t,label:n,description:o,placeholder:i="",buttonLabel:d="보기",required:f,onClick:c,disabled:g=!1,children:v,urlTitle:h,rules:l})=>{const{trigger:m,setValue:u}=s.useFormContext(),{field:p,fieldState:{error:b}}=s.useController({name:r,control:e,rules:{required:f?"URL을 입력해주세요.":!1,pattern:{value:/^(https?:\/\/)?([\w-]+\.)+[\w-]{2,4}(\/.*)?$/,message:"올바른 URL을 입력해주세요."},...l}}),P=w=>{p.onChange(w),u(r,w.target.value)},T=w=>{if(w.preventDefault(),c)c(w);else if(p.value&&!b){const E=p.value.startsWith("http")?p.value:`https://${p.value}`;window.open(E,"_blank")}},C=n||t||o;return a.jsx(s.FormField,{control:e,name:r,render:()=>a.jsxs(s.FormItem,{children:[C&&a.jsx(s.FormLabel,{required:f,heading:t,label:n,description:o}),v,a.jsxs("div",{className:"flex items-center gap-2",children:[h&&a.jsx(s.Callout,{size:"sm",className:"flex w-32 justify-center truncate shadow-none",children:h}),a.jsx(s.FormControl,{children:a.jsx(s.Input,{...p,onBlur:()=>m(r),onChange:P,placeholder:i,className:"w-auto grow",error:!!b})}),a.jsx(s.Button,{variant:"outline",theme:"secondary",size:"md",disabled:g||!!b||!p.value,onClick:T,children:d})]}),a.jsx(s.FormMessage,{children:b==null?void 0:b.message})]})})},ci=()=>{const[r,e]=A.useState([]);return A.useEffect(()=>{const c=(v,h)=>{e(h?l=>l.includes(v.id)?l:[...l,v.id]:l=>l.filter(m=>m!==v.id))},g=U.portalManager.subscribe(c);return e(U.portalManager.getOpenPortals()),()=>{g()}},[]),{modal:c=>{const{onClose:g=()=>{}}=c;return U.portalManager.showPortal("modal",{...c,onClose:g})},toast:c=>{let g;return typeof c=="string"?g={description:c}:g=c,U.portalManager.showPortal("toast",g)},alert:c=>{let g;return typeof c=="string"?g={description:c,onClose:()=>{}}:g={...c,onClose:c.onClose||(()=>{})},U.portalManager.showPortal("alert",g)},dialog:c=>{const{onClose:g=()=>{}}=c;return U.portalManager.showPortal("dialog",{...c,onClose:g})},getIsOpen:c=>U.portalManager.getIsPortalOpen(c),closePortal:c=>{U.portalManager.closePortal(c)},openPortals:r}};var[Ve,zi]=s.createContextScope("Tooltip",[s.createPopperScope]),Be=s.createPopperScope(),pn="TooltipProvider",di=700,et="tooltip.open",[ui,pt]=Ve(pn),fn=r=>{const{__scopeTooltip:e,delayDuration:t=di,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:i}=r,[d,f]=x.useState(!0),c=x.useRef(!1),g=x.useRef(0);return x.useEffect(()=>{const v=g.current;return()=>window.clearTimeout(v)},[]),a.jsx(ui,{scope:e,isOpenDelayed:d,delayDuration:t,onOpen:x.useCallback(()=>{window.clearTimeout(g.current),f(!1)},[]),onClose:x.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>f(!0),n)},[n]),isPointerInTransitRef:c,onPointerInTransitChange:x.useCallback(v=>{c.current=v},[]),disableHoverableContent:o,children:i})};fn.displayName=pn;var Le="Tooltip",[mi,Ue]=Ve(Le),gn=r=>{const{__scopeTooltip:e,children:t,open:n,defaultOpen:o=!1,onOpenChange:i,disableHoverableContent:d,delayDuration:f}=r,c=pt(Le,r.__scopeTooltip),g=Be(e),[v,h]=x.useState(null),l=s.useId(),m=x.useRef(0),u=d??c.disableHoverableContent,p=f??c.delayDuration,b=x.useRef(!1),[P=!1,T]=s.useControllableState({prop:n,defaultProp:o,onChange:$=>{$?(c.onOpen(),document.dispatchEvent(new CustomEvent(et))):c.onClose(),i==null||i($)}}),C=x.useMemo(()=>P?b.current?"delayed-open":"instant-open":"closed",[P]),w=x.useCallback(()=>{window.clearTimeout(m.current),m.current=0,b.current=!1,T(!0)},[T]),E=x.useCallback(()=>{window.clearTimeout(m.current),m.current=0,T(!1)},[T]),R=x.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{b.current=!0,T(!0),m.current=0},p)},[p,T]);return x.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),a.jsx(s.Root2,{...g,children:a.jsx(mi,{scope:e,contentId:l,open:P,stateAttribute:C,trigger:v,onTriggerChange:h,onTriggerEnter:x.useCallback(()=>{c.isOpenDelayed?R():w()},[c.isOpenDelayed,R,w]),onTriggerLeave:x.useCallback(()=>{u?E():(window.clearTimeout(m.current),m.current=0)},[E,u]),onOpen:w,onClose:E,disableHoverableContent:u,children:t})})};gn.displayName=Le;var tt="TooltipTrigger",bn=x.forwardRef((r,e)=>{const{__scopeTooltip:t,...n}=r,o=Ue(tt,t),i=pt(tt,t),d=Be(t),f=x.useRef(null),c=s.useComposedRefs(e,f,o.onTriggerChange),g=x.useRef(!1),v=x.useRef(!1),h=x.useCallback(()=>g.current=!1,[]);return x.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),a.jsx(s.Anchor,{asChild:!0,...d,children:a.jsx(s.Primitive.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:c,onPointerMove:s.composeEventHandlers(r.onPointerMove,l=>{l.pointerType!=="touch"&&!v.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),v.current=!0)}),onPointerLeave:s.composeEventHandlers(r.onPointerLeave,()=>{o.onTriggerLeave(),v.current=!1}),onPointerDown:s.composeEventHandlers(r.onPointerDown,()=>{g.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:s.composeEventHandlers(r.onFocus,()=>{g.current||o.onOpen()}),onBlur:s.composeEventHandlers(r.onBlur,o.onClose),onClick:s.composeEventHandlers(r.onClick,o.onClose)})})});bn.displayName=tt;var pi="TooltipPortal",[Gi,fi]=Ve(pi,{forceMount:void 0}),ie="TooltipContent",vn=x.forwardRef((r,e)=>{const t=fi(ie,r.__scopeTooltip),{forceMount:n=t.forceMount,side:o="top",...i}=r,d=Ue(ie,r.__scopeTooltip);return a.jsx(s.Presence,{present:n||d.open,children:d.disableHoverableContent?a.jsx(hn,{side:o,...i,ref:e}):a.jsx(gi,{side:o,...i,ref:e})})}),gi=x.forwardRef((r,e)=>{const t=Ue(ie,r.__scopeTooltip),n=pt(ie,r.__scopeTooltip),o=x.useRef(null),i=s.useComposedRefs(e,o),[d,f]=x.useState(null),{trigger:c,onClose:g}=t,v=o.current,{onPointerInTransitChange:h}=n,l=x.useCallback(()=>{f(null),h(!1)},[h]),m=x.useCallback((u,p)=>{const b=u.currentTarget,P={x:u.clientX,y:u.clientY},T=wi(P,b.getBoundingClientRect()),C=xi(P,T),w=yi(p.getBoundingClientRect()),E=Ti([...C,...w]);f(E),h(!0)},[h]);return x.useEffect(()=>()=>l(),[l]),x.useEffect(()=>{if(c&&v){const u=b=>m(b,v),p=b=>m(b,c);return c.addEventListener("pointerleave",u),v.addEventListener("pointerleave",p),()=>{c.removeEventListener("pointerleave",u),v.removeEventListener("pointerleave",p)}}},[c,v,m,l]),x.useEffect(()=>{if(d){const u=p=>{const b=p.target,P={x:p.clientX,y:p.clientY},T=(c==null?void 0:c.contains(b))||(v==null?void 0:v.contains(b)),C=!Ci(P,d);T?l():C&&(l(),g())};return document.addEventListener("pointermove",u),()=>document.removeEventListener("pointermove",u)}},[c,v,d,g,l]),a.jsx(hn,{...r,ref:i})}),[bi,vi]=Ve(Le,{isInside:!1}),hn=x.forwardRef((r,e)=>{const{__scopeTooltip:t,children:n,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:d,...f}=r,c=Ue(ie,t),g=Be(t),{onClose:v}=c;return x.useEffect(()=>(document.addEventListener(et,v),()=>document.removeEventListener(et,v)),[v]),x.useEffect(()=>{if(c.trigger){const h=l=>{const m=l.target;m!=null&&m.contains(c.trigger)&&v()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[c.trigger,v]),a.jsx(s.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:d,onFocusOutside:h=>h.preventDefault(),onDismiss:v,children:a.jsxs(s.Content,{"data-state":c.stateAttribute,...g,...f,ref:e,style:{...f.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[a.jsx(s.Slottable,{children:n}),a.jsx(bi,{scope:t,isInside:!0,children:a.jsx(U.Root,{id:c.contentId,role:"tooltip",children:o||n})})]})})});vn.displayName=ie;var wn="TooltipArrow",hi=x.forwardRef((r,e)=>{const{__scopeTooltip:t,...n}=r,o=Be(t);return vi(wn,t).isInside?null:a.jsx(s.Arrow,{...o,...n,ref:e})});hi.displayName=wn;function wi(r,e){const t=Math.abs(e.top-r.y),n=Math.abs(e.bottom-r.y),o=Math.abs(e.right-r.x),i=Math.abs(e.left-r.x);switch(Math.min(t,n,o,i)){case i:return"left";case o:return"right";case t:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function xi(r,e,t=5){const n=[];switch(e){case"top":n.push({x:r.x-t,y:r.y+t},{x:r.x+t,y:r.y+t});break;case"bottom":n.push({x:r.x-t,y:r.y-t},{x:r.x+t,y:r.y-t});break;case"left":n.push({x:r.x+t,y:r.y-t},{x:r.x+t,y:r.y+t});break;case"right":n.push({x:r.x-t,y:r.y-t},{x:r.x-t,y:r.y+t});break}return n}function yi(r){const{top:e,right:t,bottom:n,left:o}=r;return[{x:o,y:e},{x:t,y:e},{x:t,y:n},{x:o,y:n}]}function Ci(r,e){const{x:t,y:n}=r;let o=!1;for(let i=0,d=e.length-1;i<e.length;d=i++){const f=e[i].x,c=e[i].y,g=e[d].x,v=e[d].y;c>n!=v>n&&t<(g-f)*(n-c)/(v-c)+f&&(o=!o)}return o}function Ti(r){const e=r.slice();return e.sort((t,n)=>t.x<n.x?-1:t.x>n.x?1:t.y<n.y?-1:t.y>n.y?1:0),ji(e)}function ji(r){if(r.length<=1)return r.slice();const e=[];for(let n=0;n<r.length;n++){const o=r[n];for(;e.length>=2;){const i=e[e.length-1],d=e[e.length-2];if((i.x-d.x)*(o.y-d.y)>=(i.y-d.y)*(o.x-d.x))e.pop();else break}e.push(o)}e.pop();const t=[];for(let n=r.length-1;n>=0;n--){const o=r[n];for(;t.length>=2;){const i=t[t.length-1],d=t[t.length-2];if((i.x-d.x)*(o.y-d.y)>=(i.y-d.y)*(o.x-d.x))t.pop();else break}t.push(o)}return t.pop(),e.length===1&&t.length===1&&e[0].x===t[0].x&&e[0].y===t[0].y?e:e.concat(t)}var Si=fn,Ni=gn,Pi=bn,xn=vn;const Vt={primary:"bg-main-600 text-white",secondary:"bg-grey-800 text-white",white:"bg-grey-50 text-grey-800"},ki={sm:"p-2 text-[13px] rounded",md:"p-2 text-sm font-normal rounded"},Ei=Si,Oi=Ni,Ii=Pi,Ai=(r,e)=>{const t=e==="primary"?fe.colors.main[600]:e==="secondary"?fe.colors.grey[800]:fe.colors.grey[50],n=e==="white"?fe.colors.grey[200]:t;return{...{width:"12px",height:"12px",backgroundColor:t,border:"1px solid",borderColor:n,opacity:e==="white"?1:.9,transform:"rotate(45deg)",borderRadius:"2px",zIndex:20},...{"top-left":{left:"1.5rem",top:"100%",transform:"translateX(-50%) translateY(-60%) rotate(45deg)"},"top-center":{left:"50%",top:"100%",transform:"translateX(-50%) translateY(-60%) rotate(45deg)"},"top-right":{right:"1.5rem",top:"100%",transform:"translateX(50%) translateY(-60%) rotate(45deg)"},"bottom-left":{left:"1.5rem",bottom:"100%",transform:"translateX(-50%) translateY(60%) rotate(45deg)"},"bottom-center":{left:"50%",bottom:"100%",transform:"translateX(-50%) translateY(60%) rotate(45deg)"},"bottom-right":{right:"1.5rem",bottom:"100%",transform:"translateX(50%) translateY(60%) rotate(45deg)"},right:{right:"100%",top:"50%",transform:"translateX(60%) translateY(-50%) rotate(45deg)"},left:{left:"100%",top:"50%",transform:"translateX(-60%) translateY(-50%) rotate(45deg)"}}[r]}},yn=x.forwardRef(({className:r,variant:e="primary",size:t="pc",position:n="top-center",sideOffset:o=8,icLeft:i,icRight:d,children:f,bubbleTip:c=!0,...g},v)=>{const h=Ai(n,e),l=n.startsWith("top"),m=n==="right"||n==="left"?n:l?"top":"bottom",u=n==="right"||n==="left"?"center":n.includes("left")?"start":n.includes("right")?"end":"center";return a.jsx(xn,{ref:v,avoidCollisions:!1,sideOffset:c?o:4,side:m,align:u,style:{zIndex:50},...g,children:a.jsxs("div",{className:s.cn("relative z-50 rounded",c&&"m-1",e==="white"&&"border-border border",Vt[e],r),children:[c&&a.jsx("div",{style:h,className:"absolute z-20"}),a.jsx("div",{className:"absolute inset-0 z-30 bg-white"}),a.jsxs("div",{className:s.cn("relative z-40 flex max-w-sm items-center font-normal",e!=="white"&&"bg-opacity-90",Vt[e],ki[t]),children:[i&&a.jsx("span",{className:"mr-1",children:i}),a.jsx("span",{className:"whitespace-pre-wrap break-keep",children:f}),d&&a.jsx("span",{className:"ml-1",children:d})]})]})})});yn.displayName=xn.displayName;const ft=({label:r,variant:e="secondary",size:t="md",children:n,icLeft:o,icRight:i,position:d="top-center",bubbleTip:f=!0,forceMount:c,isMobile:g=ge})=>{const[v,h]=x.useState(!1),l=x.useRef(null),m=typeof g=="number"?g:3e3,u=()=>{v?h(!1):(h(!0),l.current&&clearTimeout(l.current),l.current=setTimeout(()=>h(!1),m))};return x.useEffect(()=>()=>{l.current&&clearTimeout(l.current)},[]),a.jsx(Ei,{delayDuration:200,children:a.jsxs(Oi,{delayDuration:200,children:[a.jsx(Ii,{asChild:!0,"data-state":v?"delayed-open":"closed",onMouseLeave:ge?void 0:()=>h(!1),onMouseEnter:ge?void 0:()=>h(!0),onClick:ge?u:void 0,children:n}),a.jsx(yn,{variant:e,size:t,icLeft:o,icRight:i,position:d,forceMount:c||v||void 0,bubbleTip:f,children:r})]})})};function Fi(r,e=[]){let t=[];function n(i,d){const f=x.createContext(d),c=t.length;t=[...t,d];function g(h){const{scope:l,children:m,...u}=h,p=(l==null?void 0:l[r][c])||f,b=x.useMemo(()=>u,Object.values(u));return a.jsx(p.Provider,{value:b,children:m})}function v(h,l){const m=(l==null?void 0:l[r][c])||f,u=x.useContext(m);if(u)return u;if(d!==void 0)return d;throw new Error(`\`${h}\` must be used within \`${i}\``)}return g.displayName=i+"Provider",[g,v]}const o=()=>{const i=t.map(d=>x.createContext(d));return function(f){const c=(f==null?void 0:f[r])||i;return x.useMemo(()=>({[`__scope${r}`]:{...f,[r]:c}}),[f,c])}};return o.scopeName=r,[n,Mi(o,...e)]}function Mi(...r){const e=r[0];if(r.length===1)return e;const t=()=>{const n=r.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const d=n.reduce((f,{useScope:c,scopeName:g})=>{const h=c(i)[`__scope${g}`];return{...f,...h}},{});return x.useMemo(()=>({[`__scope${e.scopeName}`]:d}),[d])}};return t.scopeName=e.scopeName,t}var _i="Toggle",Cn=x.forwardRef((r,e)=>{const{pressed:t,defaultPressed:n=!1,onPressedChange:o,...i}=r,[d=!1,f]=s.useControllableState({prop:t,onChange:o,defaultProp:n});return a.jsx(s.Primitive.button,{type:"button","aria-pressed":d,"data-state":d?"on":"off","data-disabled":r.disabled?"":void 0,...i,ref:e,onClick:s.composeEventHandlers(r.onClick,()=>{r.disabled||f(!d)})})});Cn.displayName=_i;var le="ToggleGroup",[Tn,$i]=Fi(le,[s.createRovingFocusGroupScope]),jn=s.createRovingFocusGroupScope(),gt=A.forwardRef((r,e)=>{const{type:t,...n}=r;if(t==="single"){const o=n;return a.jsx(Ri,{...o,ref:e})}if(t==="multiple"){const o=n;return a.jsx(Di,{...o,ref:e})}throw new Error(`Missing prop \`type\` expected on \`${le}\``)});gt.displayName=le;var[Sn,Nn]=Tn(le),Ri=A.forwardRef((r,e)=>{const{value:t,defaultValue:n,onValueChange:o=()=>{},...i}=r,[d,f]=s.useControllableState({prop:t,defaultProp:n,onChange:o});return a.jsx(Sn,{scope:r.__scopeToggleGroup,type:"single",value:d?[d]:[],onItemActivate:f,onItemDeactivate:A.useCallback(()=>f(""),[f]),children:a.jsx(Pn,{...i,ref:e})})}),Di=A.forwardRef((r,e)=>{const{value:t,defaultValue:n,onValueChange:o=()=>{},...i}=r,[d=[],f]=s.useControllableState({prop:t,defaultProp:n,onChange:o}),c=A.useCallback(v=>f((h=[])=>[...h,v]),[f]),g=A.useCallback(v=>f((h=[])=>h.filter(l=>l!==v)),[f]);return a.jsx(Sn,{scope:r.__scopeToggleGroup,type:"multiple",value:d,onItemActivate:c,onItemDeactivate:g,children:a.jsx(Pn,{...i,ref:e})})});gt.displayName=le;var[Vi,Bi]=Tn(le),Pn=A.forwardRef((r,e)=>{const{__scopeToggleGroup:t,disabled:n=!1,rovingFocus:o=!0,orientation:i,dir:d,loop:f=!0,...c}=r,g=jn(t),v=s.useDirection(d),h={role:"group",dir:v,...c};return a.jsx(Vi,{scope:t,rovingFocus:o,disabled:n,children:o?a.jsx(s.Root$1,{asChild:!0,...g,orientation:i,dir:v,loop:f,children:a.jsx(s.Primitive.div,{...h,ref:e})}):a.jsx(s.Primitive.div,{...h,ref:e})})}),Me="ToggleGroupItem",kn=A.forwardRef((r,e)=>{const t=Nn(Me,r.__scopeToggleGroup),n=Bi(Me,r.__scopeToggleGroup),o=jn(r.__scopeToggleGroup),i=t.value.includes(r.value),d=n.disabled||r.disabled,f={...r,pressed:i,disabled:d},c=A.useRef(null);return n.rovingFocus?a.jsx(s.Item,{asChild:!0,...o,focusable:!d,active:i,ref:c,children:a.jsx(Bt,{...f,ref:e})}):a.jsx(Bt,{...f,ref:e})});kn.displayName=Me;var Bt=A.forwardRef((r,e)=>{const{__scopeToggleGroup:t,value:n,...o}=r,i=Nn(Me,t),d={role:"radio","aria-checked":r.pressed,"aria-pressed":void 0},f=i.type==="single"?d:void 0;return a.jsx(Cn,{...f,...o,ref:e,onPressedChange:c=>{c?i.onItemActivate(n):i.onItemDeactivate(n)}})}),En=gt,On=kn;const Li=s.cva("inline-flex items-center justify-center gap-1 whitespace-nowrap text-sm font-normal ring-offset-background transition-all focus-visible:outline-none disabled:pointer-events-none",{variants:{variant:{solid:"disabled:bg-muted disabled:text-muted-foreground disabled:border-muted",outline:"disabled:bg-white disabled:text-muted disabled:border-border"},theme:{primary:"bg-white border border-main-200 text-primary hover:bg-main-100",secondary:"bg-white border border-grey-200 text-secondary hover:bg-grey-100"},size:{xs:"h-8 py-1 px-2 text-sm",sm:"h-9 py-2 px-3 text-sm",md:"h-11 px-3 py-3 text-sm",lg:"h-[52px] px-12 py-[14px] text-base",icon:"h-auto w-auto"},shape:{square:"rounded-lg",rounded:"rounded-full"},checked:{true:"",false:""}},compoundVariants:[{theme:"primary",checked:!0,className:"bg-main-600 border-main-600 text-white hover:bg-main-700 hover:border-main-700"},{theme:"secondary",checked:!0,className:"bg-grey-800 border-grey-800 text-white hover:bg-grey-900 hover:border-grey-900"}],defaultVariants:{theme:"primary",size:"md",shape:"square",checked:!1}}),bt=x.createContext({theme:"primary",size:"md",shape:"square"});bt.displayName="ToggleGroupContext";const vt=x.forwardRef(({className:r,variant:e,theme:t,size:n,shape:o,children:i,...d},f)=>a.jsx(bt.Provider,{value:{theme:t,size:n,shape:o},children:a.jsx(En,{ref:f,className:s.cn("flex items-center justify-center gap-1",r),...d,children:i})}));vt.displayName=En.displayName;const ve=x.forwardRef(({className:r,checked:e=!1,children:t,...n},o)=>{const i=x.useContext(bt);return a.jsx(On,{ref:o,className:s.cn(Li({theme:n.theme||i.theme||"primary",size:n.size||i.size||"md",shape:n.shape||i.shape||"square",variant:n.variant||"outline",checked:e}),r),...n,children:t})});ve.displayName=On.displayName;const In=({options:r,variant:e="outline",theme:t="primary",size:n="md",shape:o="square",value:i,onChange:d,nullable:f=!0,className:c})=>a.jsx(vt,{type:"single",value:i,onValueChange:g=>{!f&&!g||d(g)},theme:t,size:n,shape:o,className:c,children:r.map(g=>g.tooltip?a.jsx(ft,{label:g.tooltip.label,variant:g.tooltip.variant,size:g.tooltip.size,icLeft:g.tooltip.icLeft,icRight:g.tooltip.icRight,position:g.tooltip.position,bubbleTip:g.tooltip.bubbleTip,children:a.jsx(ve,{value:g.value,checked:i===g.value,disabled:g.disabled,variant:e,children:g.label})},g.value):a.jsx(ve,{value:g.value,checked:i===g.value,disabled:g.disabled,variant:e,children:g.label},g.value))}),An=({options:r,variant:e="outline",theme:t="primary",size:n="md",shape:o="square",value:i,onChange:d,className:f})=>a.jsx(vt,{type:"multiple",value:i,onValueChange:d,theme:t,size:n,shape:o,className:f,children:r.map(c=>c.tooltip?a.jsx(ft,{label:c.tooltip.label,variant:c.tooltip.variant,size:c.tooltip.size,icLeft:c.tooltip.icLeft,icRight:c.tooltip.icRight,position:c.tooltip.position,bubbleTip:c.tooltip.bubbleTip,children:a.jsx(ve,{value:c.value,checked:(i||[]).includes(c.value),disabled:c.disabled,variant:e,children:c.label})},c.value):a.jsx(ve,{value:c.value,checked:(i||[]).includes(c.value),disabled:c.disabled,variant:e,children:c.label},c.value))}),Ui={Single:In,Multiple:An};exports.Alert=U.Alert;exports.Dialog=U.Dialog;exports.Modal=U.Modal;exports.PortalContainer=U.PortalContainer;exports.Toaster=U.Toaster;exports.Accordion=no;exports.CheckboxBooleanFormField=ri;exports.CheckboxGroupFormField=ni;exports.ContentsCard=ur;exports.DefaultFormField=oi;exports.EventCard=jo;exports.LoadingCard=mr;exports.MainBannerImage=Za;exports.MainBannerLoading=mn;exports.Multiple=An;exports.PremiumCard=Ka;exports.RadioFormField=ai;exports.Single=In;exports.StringArrayFormField=ii;exports.StringInputField=si;exports.TitleTagCard=ei;exports.ToggleButtonGroup=Ui;exports.Tooltip=ft;exports.UrlFormField=li;exports.usePortal=ci;
|
package/dist/components.es.js
CHANGED
|
@@ -5,8 +5,8 @@ import * as w from "react";
|
|
|
5
5
|
import R, { useState as pr, useEffect as Po } from "react";
|
|
6
6
|
import { a as $, d as ct, c as So } from "./index-CEwEyzHV.js";
|
|
7
7
|
import { S as D } from "./index-TpPaGoFn.js";
|
|
8
|
-
import { p as ie, R as Eo } from "./portal-container-
|
|
9
|
-
import { A as Xs, D as Zs, M as Ks, P as Js, T as Qs } from "./portal-container-
|
|
8
|
+
import { p as ie, R as Eo } from "./portal-container-BrmW99Cu.js";
|
|
9
|
+
import { A as Xs, D as Zs, M as Ks, P as Js, T as Qs } from "./portal-container-BrmW99Cu.js";
|
|
10
10
|
var Tt = "Collapsible", [ko, fr] = wt(Tt), [Oo, Nt] = ko(Tt), gr = w.forwardRef(
|
|
11
11
|
(r, e) => {
|
|
12
12
|
const {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
var co = Object.defineProperty;
|
|
2
2
|
var uo = (e, t, o) => t in e ? co(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o;
|
|
3
3
|
var G = (e, t, o) => uo(e, typeof t != "symbol" ? t + "" : t, o);
|
|
4
|
-
import { jsx as n, jsxs as y, Fragment as
|
|
4
|
+
import { jsx as n, jsxs as y, Fragment as Y } from "react/jsx-runtime";
|
|
5
5
|
import { p as we, q as k, P as C, r as D, s as re, v as po, S as fo, w as mo, x as go, y as vo, z as ho, A as wo, E as We, G as ue, H as Ue, J as yo, c as g, b as ne, I as Ke, K as To, M as xo, N as te, O as Do, Q as Eo, U as No, V as Ro } from "./index-CWHiF7D_.js";
|
|
6
6
|
import * as s from "react";
|
|
7
7
|
import Ao, { Fragment as bo, useState as Co, useEffect as Po } from "react";
|
|
8
8
|
import * as _o from "react-dom";
|
|
9
9
|
import So from "react-dom";
|
|
10
|
-
let
|
|
10
|
+
let Q;
|
|
11
11
|
const Oo = new Uint8Array(16);
|
|
12
12
|
function Io() {
|
|
13
|
-
if (!
|
|
13
|
+
if (!Q && (Q = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !Q))
|
|
14
14
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
15
|
-
return
|
|
15
|
+
return Q(Oo);
|
|
16
16
|
}
|
|
17
17
|
const x = [];
|
|
18
18
|
for (let e = 0; e < 256; ++e)
|
|
@@ -157,11 +157,11 @@ const fe = /* @__PURE__ */ new Map(), ke = (e) => {
|
|
|
157
157
|
toasts: e.toasts.filter((o) => o.id !== t.toastId)
|
|
158
158
|
};
|
|
159
159
|
}
|
|
160
|
-
},
|
|
161
|
-
let
|
|
160
|
+
}, Z = [];
|
|
161
|
+
let ee = { toasts: [] };
|
|
162
162
|
function q(e) {
|
|
163
|
-
|
|
164
|
-
t(
|
|
163
|
+
ee = Wo(ee, e), Z.forEach((t) => {
|
|
164
|
+
t(ee);
|
|
165
165
|
});
|
|
166
166
|
}
|
|
167
167
|
function Uo({ ...e }) {
|
|
@@ -186,10 +186,10 @@ function Uo({ ...e }) {
|
|
|
186
186
|
};
|
|
187
187
|
}
|
|
188
188
|
function Ko() {
|
|
189
|
-
const [e, t] = s.useState(
|
|
190
|
-
return s.useEffect(() => (
|
|
191
|
-
const o =
|
|
192
|
-
o > -1 &&
|
|
189
|
+
const [e, t] = s.useState(ee);
|
|
190
|
+
return s.useEffect(() => (Z.push(t), () => {
|
|
191
|
+
const o = Z.indexOf(t);
|
|
192
|
+
o > -1 && Z.splice(o, 1);
|
|
193
193
|
}), [e]), {
|
|
194
194
|
...e,
|
|
195
195
|
toast: Uo,
|
|
@@ -338,7 +338,7 @@ var qo = s.forwardRef(
|
|
|
338
338
|
), Ze = s.forwardRef(
|
|
339
339
|
(e, t) => {
|
|
340
340
|
const { __scopeDialog: o, trapFocus: a, onOpenAutoFocus: r, onCloseAutoFocus: i, ...c } = e, d = P(L, o), f = s.useRef(null), l = k(t, f);
|
|
341
|
-
return go(), /* @__PURE__ */ y(
|
|
341
|
+
return go(), /* @__PURE__ */ y(Y, { children: [
|
|
342
342
|
/* @__PURE__ */ n(
|
|
343
343
|
vo,
|
|
344
344
|
{
|
|
@@ -362,7 +362,7 @@ var qo = s.forwardRef(
|
|
|
362
362
|
)
|
|
363
363
|
}
|
|
364
364
|
),
|
|
365
|
-
/* @__PURE__ */ y(
|
|
365
|
+
/* @__PURE__ */ y(Y, { children: [
|
|
366
366
|
/* @__PURE__ */ n(Bo, { titleId: d.titleId }),
|
|
367
367
|
/* @__PURE__ */ n(Qo, { contentRef: f, descriptionId: d.descriptionId })
|
|
368
368
|
] })
|
|
@@ -682,7 +682,7 @@ const va = Ao.forwardRef(
|
|
|
682
682
|
{
|
|
683
683
|
ref: h,
|
|
684
684
|
className: g(
|
|
685
|
-
"
|
|
685
|
+
"flex flex-col gap-0 px-0 py-0",
|
|
686
686
|
{
|
|
687
687
|
"max-w-sm": r === "sm",
|
|
688
688
|
"max-w-md": r === "md",
|
|
@@ -705,7 +705,7 @@ const va = Ao.forwardRef(
|
|
|
705
705
|
] })
|
|
706
706
|
] }),
|
|
707
707
|
o && /* @__PURE__ */ n(Ft, { children: o }),
|
|
708
|
-
i && i,
|
|
708
|
+
i && /* @__PURE__ */ n(Y, { children: i }),
|
|
709
709
|
l && /* @__PURE__ */ n(It, { children: l })
|
|
710
710
|
]
|
|
711
711
|
}
|
|
@@ -873,8 +873,8 @@ var kt = "ToastViewport", Da = ["F8"], ge = "toast.viewportPause", ve = "toast.v
|
|
|
873
873
|
(N = l.current) == null || N.focus();
|
|
874
874
|
return;
|
|
875
875
|
}
|
|
876
|
-
const $ = v({ tabbingDirection: V ? "backwards" : "forwards" }),
|
|
877
|
-
me($.slice(
|
|
876
|
+
const $ = v({ tabbingDirection: V ? "backwards" : "forwards" }), j = $.findIndex((u) => u === K);
|
|
877
|
+
me($.slice(j + 1)) ? w.preventDefault() : V ? (A = l.current) == null || A.focus() : (F = m.current) == null || F.focus();
|
|
878
878
|
}
|
|
879
879
|
};
|
|
880
880
|
return p.addEventListener("keydown", R), () => p.removeEventListener("keydown", R);
|
|
@@ -1019,16 +1019,16 @@ var [ba, Ca] = $t(le, {
|
|
|
1019
1019
|
}, [v.viewport, N, f, l, $]), s.useEffect(() => {
|
|
1020
1020
|
i && !v.isClosePausedRef.current && $(N);
|
|
1021
1021
|
}, [i, N, v.isClosePausedRef, $]), s.useEffect(() => (V(), () => ce()), [V, ce]);
|
|
1022
|
-
const
|
|
1023
|
-
return v.viewport ? /* @__PURE__ */ y(
|
|
1024
|
-
|
|
1022
|
+
const j = s.useMemo(() => p ? jt(p) : null, [p]);
|
|
1023
|
+
return v.viewport ? /* @__PURE__ */ y(Y, { children: [
|
|
1024
|
+
j && /* @__PURE__ */ n(
|
|
1025
1025
|
_a,
|
|
1026
1026
|
{
|
|
1027
1027
|
__scopeToast: o,
|
|
1028
1028
|
role: "status",
|
|
1029
1029
|
"aria-live": a === "foreground" ? "assertive" : "polite",
|
|
1030
1030
|
"aria-atomic": !0,
|
|
1031
|
-
children:
|
|
1031
|
+
children: j
|
|
1032
1032
|
}
|
|
1033
1033
|
),
|
|
1034
1034
|
/* @__PURE__ */ n(ba, { scope: o, onClose: W, children: _o.createPortal(
|
|
@@ -1059,10 +1059,10 @@ var [ba, Ca] = $t(le, {
|
|
|
1059
1059
|
}),
|
|
1060
1060
|
onPointerMove: D(e.onPointerMove, (u) => {
|
|
1061
1061
|
if (!T.current) return;
|
|
1062
|
-
const b = u.clientX - T.current.x, O = u.clientY - T.current.y, H = !!E.current, z = ["left", "right"].includes(v.swipeDirection),
|
|
1063
|
-
H ? (E.current =
|
|
1062
|
+
const b = u.clientX - T.current.x, O = u.clientY - T.current.y, H = !!E.current, z = ["left", "right"].includes(v.swipeDirection), B = ["left", "up"].includes(v.swipeDirection) ? Math.min : Math.max, io = z ? B(0, b) : 0, lo = z ? 0 : B(0, O), de = u.pointerType === "touch" ? 10 : 2, X = { x: io, y: lo }, $e = { originalEvent: u, delta: X };
|
|
1063
|
+
H ? (E.current = X, J(Na, h, $e, {
|
|
1064
1064
|
discrete: !1
|
|
1065
|
-
})) : Ve(
|
|
1065
|
+
})) : Ve(X, v.swipeDirection, de) ? (E.current = X, J(Ea, m, $e, {
|
|
1066
1066
|
discrete: !1
|
|
1067
1067
|
}), u.target.setPointerCapture(u.pointerId)) : (Math.abs(b) > de || Math.abs(O) > de) && (T.current = null);
|
|
1068
1068
|
}),
|
|
@@ -1070,16 +1070,16 @@ var [ba, Ca] = $t(le, {
|
|
|
1070
1070
|
const b = E.current, O = u.target;
|
|
1071
1071
|
if (O.hasPointerCapture(u.pointerId) && O.releasePointerCapture(u.pointerId), E.current = null, T.current = null, b) {
|
|
1072
1072
|
const H = u.currentTarget, z = { originalEvent: u, delta: b };
|
|
1073
|
-
Ve(b, v.swipeDirection, v.swipeThreshold) ?
|
|
1073
|
+
Ve(b, v.swipeDirection, v.swipeThreshold) ? J(Aa, I, z, {
|
|
1074
1074
|
discrete: !0
|
|
1075
|
-
}) :
|
|
1075
|
+
}) : J(
|
|
1076
1076
|
Ra,
|
|
1077
1077
|
_,
|
|
1078
1078
|
z,
|
|
1079
1079
|
{
|
|
1080
1080
|
discrete: !0
|
|
1081
1081
|
}
|
|
1082
|
-
), H.addEventListener("click", (
|
|
1082
|
+
), H.addEventListener("click", (B) => B.preventDefault(), {
|
|
1083
1083
|
once: !0
|
|
1084
1084
|
});
|
|
1085
1085
|
}
|
|
@@ -1097,7 +1097,7 @@ var [ba, Ca] = $t(le, {
|
|
|
1097
1097
|
return Ia(() => c(!0)), s.useEffect(() => {
|
|
1098
1098
|
const l = window.setTimeout(() => f(!0), 1e3);
|
|
1099
1099
|
return () => window.clearTimeout(l);
|
|
1100
|
-
}, []), d ? null : /* @__PURE__ */ n(Ue, { asChild: !0, children: /* @__PURE__ */ n(se, { ...a, children: i && /* @__PURE__ */ y(
|
|
1100
|
+
}, []), d ? null : /* @__PURE__ */ n(Ue, { asChild: !0, children: /* @__PURE__ */ n(se, { ...a, children: i && /* @__PURE__ */ y(Y, { children: [
|
|
1101
1101
|
r.label,
|
|
1102
1102
|
" ",
|
|
1103
1103
|
o
|
|
@@ -1166,7 +1166,7 @@ function jt(e) {
|
|
|
1166
1166
|
}
|
|
1167
1167
|
}), t;
|
|
1168
1168
|
}
|
|
1169
|
-
function
|
|
1169
|
+
function J(e, t, o, { discrete: a }) {
|
|
1170
1170
|
const r = o.originalEvent.currentTarget, i = new CustomEvent(e, { bubbles: !0, cancelable: !0, detail: o });
|
|
1171
1171
|
t && r.addEventListener(e, t, { once: !0 }), a ? No(r, i) : r.dispatchEvent(i);
|
|
1172
1172
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";var so=Object.defineProperty;var no=(e,t,o)=>t in e?so(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var H=(e,t,o)=>no(e,typeof t!="symbol"?t+"":t,o);const n=require("react/jsx-runtime"),r=require("./index-Cv9m35ew.cjs"),U=require("react"),_e=require("react-dom");function Se(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const s=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,s.get?s:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const i=Se(U),ao=Se(_e);let G;const ro=new Uint8Array(16);function io(){if(!G&&(G=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!G))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return G(ro)}const y=[];for(let e=0;e<256;++e)y.push((e+256).toString(16).slice(1));function lo(e,t=0){return y[e[t+0]]+y[e[t+1]]+y[e[t+2]]+y[e[t+3]]+"-"+y[e[t+4]]+y[e[t+5]]+"-"+y[e[t+6]]+y[e[t+7]]+"-"+y[e[t+8]]+y[e[t+9]]+"-"+y[e[t+10]]+y[e[t+11]]+y[e[t+12]]+y[e[t+13]]+y[e[t+14]]+y[e[t+15]]}const co=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Pe={randomUUID:co};function uo(e,t,o){if(Pe.randomUUID&&!t&&!e)return Pe.randomUUID();e=e||{};const s=e.random||(e.rng||io)();return s[6]=s[6]&15|64,s[8]=s[8]&63|128,lo(s)}class po{constructor(){H(this,"listeners",new Set);H(this,"portals",new Map);H(this,"queue",[]);H(this,"isProcessing",!1)}processQueue(){if(!(this.isProcessing||this.queue.length===0)){for(this.isProcessing=!0;this.queue.length>0;){const t=this.queue.shift();t&&t()}this.isProcessing=!1}}isPortalOpen(t){var o;return((o=this.portals.get(t))==null?void 0:o.isOpen)??!1}subscribe(t){return this.listeners.add(t),()=>{this.listeners.delete(t)}}showPortal(t,o){console.log(o.id);const s=o.id||this.generateId(t);if(this.isPortalOpen(s))return console.warn(`Portal with id "${s}" is already open.`),null;const a={id:s,type:t,props:o};return this.portals.set(s,{...a,isOpen:!0}),this.queue.push(()=>{this.listeners.forEach(l=>{l(a,!0)})}),this.processQueue(),s}setPortalOpen(t,o){const s=this.portals.get(t);s&&(s.isOpen=o,this.portals.set(t,s),this.queue.push(()=>{this.listeners.forEach(a=>{a(s,o)})}),this.processQueue())}getIsPortalOpen(t){var o;return((o=this.portals.get(t))==null?void 0:o.isOpen)??!1}getOpenPortals(){const t=[];for(const[o,s]of this.portals.entries())s.isOpen&&t.push(o);return t}closePortal(t){const o=this.portals.get(t);o&&(o.isOpen=!1,this.portals.set(t,o),this.queue.push(()=>{this.listeners.forEach(s=>{s(o,!1)})}),this.processQueue())}generateId(t){const o=`${t}_${window.location.pathname}`;return t==="toast"?`${o}_${uo()}`:o}}const fo=new po,mo=5,go=2e3;let ne=0;function Oe(){return ne=(ne+1)%Number.MAX_SAFE_INTEGER,ne.toString()}const ae=new Map,Ae=e=>{if(ae.has(e))return;const t=setTimeout(()=>{ae.delete(e),W({type:"REMOVE_TOAST",toastId:e})},go);ae.set(e,t)},xo=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,mo)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(o=>o.id===t.toast.id?{...o,...t.toast}:o)};case"DISMISS_TOAST":{const{toastId:o}=t;return o?Ae(o):e.toasts.forEach(s=>{Ae(s.id||Oe())}),{...e,toasts:e.toasts.map(s=>s.id===o||o===void 0?{...s,open:!1}:s)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(o=>o.id!==t.toastId)}}},B=[];let X={toasts:[]};function W(e){X=xo(X,e),B.forEach(t=>{t(X)})}function Ie({...e}){const t=Oe(),o=a=>W({type:"UPDATE_TOAST",toast:{...a,id:t}}),s=()=>W({type:"DISMISS_TOAST",toastId:t});return W({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:a=>{a||(s(),e.onClose&&e.onClose())}}}),{id:t,dismiss:s,update:o}}function vo(){const[e,t]=i.useState(X);return i.useEffect(()=>(B.push(t),()=>{const o=B.indexOf(t);o>-1&&B.splice(o,1)}),[e]),{...e,toast:Ie,dismiss:o=>W({type:"DISMISS_TOAST",toastId:o})}}var de="Dialog",[Me,Fe]=r.createContextScope(de),[ho,C]=Me(de),$e=e=>{const{__scopeDialog:t,children:o,open:s,defaultOpen:a,onOpenChange:l,modal:d=!0}=e,u=i.useRef(null),m=i.useRef(null),[c=!1,g]=r.useControllableState({prop:s,defaultProp:a,onChange:l});return n.jsx(ho,{scope:t,triggerRef:u,contentRef:m,contentId:r.useId(),titleId:r.useId(),descriptionId:r.useId(),open:c,onOpenChange:g,onOpenToggle:i.useCallback(()=>g(v=>!v),[g]),modal:d,children:o})};$e.displayName=de;var ke="DialogTrigger",Le=i.forwardRef((e,t)=>{const{__scopeDialog:o,...s}=e,a=C(ke,o),l=r.useComposedRefs(t,a.triggerRef);return n.jsx(r.Primitive.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":fe(a.open),...s,ref:l,onClick:r.composeEventHandlers(e.onClick,a.onOpenToggle)})});Le.displayName=ke;var ue="DialogPortal",[wo,Ve]=Me(ue,{forceMount:void 0}),He=e=>{const{__scopeDialog:t,forceMount:o,children:s,container:a}=e,l=C(ue,t);return n.jsx(wo,{scope:t,forceMount:o,children:i.Children.map(s,d=>n.jsx(r.Presence,{present:o||l.open,children:n.jsx(r.Portal,{asChild:!0,container:a,children:d})}))})};He.displayName=ue;var Q="DialogOverlay",We=i.forwardRef((e,t)=>{const o=Ve(Q,e.__scopeDialog),{forceMount:s=o.forceMount,...a}=e,l=C(Q,e.__scopeDialog);return l.modal?n.jsx(r.Presence,{present:s||l.open,children:n.jsx(yo,{...a,ref:t})}):null});We.displayName=Q;var yo=i.forwardRef((e,t)=>{const{__scopeDialog:o,...s}=e,a=C(Q,o);return n.jsx(r.ReactRemoveScroll,{as:r.Slot,allowPinchZoom:!0,shards:[a.contentRef],children:n.jsx(r.Primitive.div,{"data-state":fe(a.open),...s,ref:t,style:{pointerEvents:"auto",...s.style}})})}),I="DialogContent",Ue=i.forwardRef((e,t)=>{const o=Ve(I,e.__scopeDialog),{forceMount:s=o.forceMount,...a}=e,l=C(I,e.__scopeDialog);return n.jsx(r.Presence,{present:s||l.open,children:l.modal?n.jsx(To,{...a,ref:t}):n.jsx(Eo,{...a,ref:t})})});Ue.displayName=I;var To=i.forwardRef((e,t)=>{const o=C(I,e.__scopeDialog),s=i.useRef(null),a=r.useComposedRefs(t,o.contentRef,s);return i.useEffect(()=>{const l=s.current;if(l)return r.hideOthers(l)},[]),n.jsx(Ke,{...e,ref:a,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:r.composeEventHandlers(e.onCloseAutoFocus,l=>{var d;l.preventDefault(),(d=o.triggerRef.current)==null||d.focus()}),onPointerDownOutside:r.composeEventHandlers(e.onPointerDownOutside,l=>{const d=l.detail.originalEvent,u=d.button===0&&d.ctrlKey===!0;(d.button===2||u)&&l.preventDefault()}),onFocusOutside:r.composeEventHandlers(e.onFocusOutside,l=>l.preventDefault())})}),Eo=i.forwardRef((e,t)=>{const o=C(I,e.__scopeDialog),s=i.useRef(!1),a=i.useRef(!1);return n.jsx(Ke,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:l=>{var d,u;(d=e.onCloseAutoFocus)==null||d.call(e,l),l.defaultPrevented||(s.current||(u=o.triggerRef.current)==null||u.focus(),l.preventDefault()),s.current=!1,a.current=!1},onInteractOutside:l=>{var m,c;(m=e.onInteractOutside)==null||m.call(e,l),l.defaultPrevented||(s.current=!0,l.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const d=l.target;((c=o.triggerRef.current)==null?void 0:c.contains(d))&&l.preventDefault(),l.detail.originalEvent.type==="focusin"&&a.current&&l.preventDefault()}})}),Ke=i.forwardRef((e,t)=>{const{__scopeDialog:o,trapFocus:s,onOpenAutoFocus:a,onCloseAutoFocus:l,...d}=e,u=C(I,o),m=i.useRef(null),c=r.useComposedRefs(t,m);return r.useFocusGuards(),n.jsxs(n.Fragment,{children:[n.jsx(r.FocusScope,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:a,onUnmountAutoFocus:l,children:n.jsx(r.DismissableLayer,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":fe(u.open),...d,ref:c,onDismiss:()=>u.onOpenChange(!1)})}),n.jsxs(n.Fragment,{children:[n.jsx(No,{titleId:u.titleId}),n.jsx(bo,{contentRef:m,descriptionId:u.descriptionId})]})]})}),pe="DialogTitle",qe=i.forwardRef((e,t)=>{const{__scopeDialog:o,...s}=e,a=C(pe,o);return n.jsx(r.Primitive.h2,{id:a.titleId,...s,ref:t})});qe.displayName=pe;var ze="DialogDescription",Ge=i.forwardRef((e,t)=>{const{__scopeDialog:o,...s}=e,a=C(ze,o);return n.jsx(r.Primitive.p,{id:a.descriptionId,...s,ref:t})});Ge.displayName=ze;var Ye="DialogClose",Be=i.forwardRef((e,t)=>{const{__scopeDialog:o,...s}=e,a=C(Ye,o);return n.jsx(r.Primitive.button,{type:"button",...s,ref:t,onClick:r.composeEventHandlers(e.onClick,()=>a.onOpenChange(!1))})});Be.displayName=Ye;function fe(e){return e?"open":"closed"}var Xe="DialogTitleWarning",[Do,Qe]=r.createContext2(Xe,{contentName:I,titleName:pe,docsSlug:"dialog"}),No=({titleId:e})=>{const t=Qe(Xe),o=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
2
|
+
|
|
3
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
4
|
+
|
|
5
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return i.useEffect(()=>{e&&(document.getElementById(e)||console.error(o))},[o,e]),null},Ro="DialogDescriptionWarning",bo=({contentRef:e,descriptionId:t})=>{const s=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Qe(Ro).contentName}}.`;return i.useEffect(()=>{var l;const a=(l=e.current)==null?void 0:l.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(s))},[s,e,t]),null},Ze=$e,Co=Le,Je=He,me=We,ge=Ue,xe=qe,ve=Ge,he=Be,et="AlertDialog",[Po,xs]=r.createContextScope(et,[Fe]),P=Fe(),tt=e=>{const{__scopeAlertDialog:t,...o}=e,s=P(t);return n.jsx(Ze,{...s,...o,modal:!0})};tt.displayName=et;var Ao="AlertDialogTrigger",jo=i.forwardRef((e,t)=>{const{__scopeAlertDialog:o,...s}=e,a=P(o);return n.jsx(Co,{...a,...s,ref:t})});jo.displayName=Ao;var _o="AlertDialogPortal",ot=e=>{const{__scopeAlertDialog:t,...o}=e,s=P(t);return n.jsx(Je,{...s,...o})};ot.displayName=_o;var So="AlertDialogOverlay",st=i.forwardRef((e,t)=>{const{__scopeAlertDialog:o,...s}=e,a=P(o);return n.jsx(me,{...a,...s,ref:t})});st.displayName=So;var $="AlertDialogContent",[Oo,Io]=Po($),nt=i.forwardRef((e,t)=>{const{__scopeAlertDialog:o,children:s,...a}=e,l=P(o),d=i.useRef(null),u=r.useComposedRefs(t,d),m=i.useRef(null);return n.jsx(Do,{contentName:$,titleName:at,docsSlug:"alert-dialog",children:n.jsx(Oo,{scope:o,cancelRef:m,children:n.jsxs(ge,{role:"alertdialog",...l,...a,ref:u,onOpenAutoFocus:r.composeEventHandlers(a.onOpenAutoFocus,c=>{var g;c.preventDefault(),(g=m.current)==null||g.focus({preventScroll:!0})}),onPointerDownOutside:c=>c.preventDefault(),onInteractOutside:c=>c.preventDefault(),children:[n.jsx(r.Slottable,{children:s}),n.jsx(Fo,{contentRef:d})]})})})});nt.displayName=$;var at="AlertDialogTitle",rt=i.forwardRef((e,t)=>{const{__scopeAlertDialog:o,...s}=e,a=P(o);return n.jsx(xe,{...a,...s,ref:t})});rt.displayName=at;var it="AlertDialogDescription",lt=i.forwardRef((e,t)=>{const{__scopeAlertDialog:o,...s}=e,a=P(o);return n.jsx(ve,{...a,...s,ref:t})});lt.displayName=it;var Mo="AlertDialogAction",ct=i.forwardRef((e,t)=>{const{__scopeAlertDialog:o,...s}=e,a=P(o);return n.jsx(he,{...a,...s,ref:t})});ct.displayName=Mo;var dt="AlertDialogCancel",ut=i.forwardRef((e,t)=>{const{__scopeAlertDialog:o,...s}=e,{cancelRef:a}=Io(dt,o),l=P(o),d=r.useComposedRefs(t,a);return n.jsx(he,{...l,...s,ref:d})});ut.displayName=dt;var Fo=({contentRef:e})=>{const t=`\`${$}\` requires a description for the component to be accessible for screen reader users.
|
|
6
|
+
|
|
7
|
+
You can add a description to the \`${$}\` by passing a \`${it}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
8
|
+
|
|
9
|
+
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${$}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
10
|
+
|
|
11
|
+
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return i.useEffect(()=>{var s;document.getElementById((s=e.current)==null?void 0:s.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},$o=tt,ko=ot,pt=st,ft=nt,mt=ct,gt=ut,xt=rt,vt=lt;const ht=$o,Lo=ko,wt=i.forwardRef(({className:e,...t},o)=>n.jsx(pt,{className:r.cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/60",e),...t,ref:o}));wt.displayName=pt.displayName;const Vo={sm:"max-w-[344px]",md:"max-w-[500px]",lg:"max-w-[640px]",fit:"max-w-fit"},we=i.forwardRef(({className:e,size:t="sm",...o},s)=>n.jsxs(Lo,{children:[n.jsx(wt,{}),n.jsx(ft,{ref:s,className:r.cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] bg-background fixed left-[50%] top-[50%] z-50 grid w-full translate-x-[-50%] translate-y-[-50%] gap-2 rounded-lg border p-4 shadow-lg duration-200",Vo[t],e),...o})]}));we.displayName=ft.displayName;const ye=({className:e,...t})=>n.jsx("div",{className:r.cn("flex flex-col space-y-2 text-center sm:text-left",e),...t});ye.displayName="AlertDialogHeader";const Te=({className:e,...t})=>n.jsx("div",{className:r.cn("flex flex-col-reverse sm:flex-row sm:justify-between sm:space-x-2",e),...t});Te.displayName="AlertDialogFooter";const Ee=i.forwardRef(({className:e,...t},o)=>n.jsx(xt,{ref:o,className:r.cn("whitespace-pre-wrap text-base font-semibold",e),...t}));Ee.displayName=xt.displayName;const Z=i.forwardRef(({className:e,...t},o)=>n.jsx(vt,{ref:o,className:r.cn("text-grey-600 whitespace-pre-wrap text-xs font-normal",e),...t}));Z.displayName=vt.displayName;const De=i.forwardRef(({className:e,...t},o)=>n.jsx(mt,{ref:o,className:r.cn(r.buttonVariants({size:"sm"}),e),...t}));De.displayName=mt.displayName;const yt=i.forwardRef(({className:e,...t},o)=>n.jsx(gt,{ref:o,className:r.cn(r.buttonVariants({variant:"outline",size:"sm",theme:"secondary"}),"mt-2 w-1/2 sm:mt-0",e),...t}));yt.displayName=gt.displayName;const Tt=({title:e="알림",description:t,confirmText:o="확인",onConfirm:s,size:a="sm",onClose:l})=>n.jsx(ht,{open:!0,onOpenChange:d=>{!d&&l&&l()},children:n.jsxs(we,{size:a,className:"gap-4",children:[n.jsxs(ye,{children:[n.jsx(Ee,{children:e}),n.jsx(Z,{className:"text-sm",children:t})]}),n.jsx(Te,{children:n.jsx(De,{className:r.cn("w-full font-normal"),onClick:()=>{s&&s()},children:o})})]})});Tt.displayName="Alert";const Ho=Ze,Wo=Je,Uo=he,Et=i.forwardRef(({className:e,...t},o)=>n.jsx(me,{ref:o,className:r.cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t}));Et.displayName=me.displayName;const Dt=i.forwardRef(({className:e,children:t,...o},s)=>n.jsxs(Wo,{children:[n.jsx(Et,{}),n.jsx(ge,{ref:s,className:r.cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] fixed left-[50%] top-[50%] z-50 grid w-full max-w-xl translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200",e),...o,children:t})]}));Dt.displayName=ge.displayName;const Nt=({className:e,...t})=>n.jsx("div",{className:r.cn("flex flex-col text-left md:text-center",e),...t});Nt.displayName="DialogHeader";const Rt=({className:e,...t})=>n.jsx("div",{className:r.cn("flex items-center gap-2",e),...t});Rt.displayName="DialogFooter";const bt=i.forwardRef(({className:e,...t},o)=>n.jsx(xe,{ref:o,className:r.cn("text-lg font-semibold leading-none tracking-tight",e),...t}));bt.displayName=xe.displayName;const Ct=i.forwardRef(({className:e,...t},o)=>n.jsx(ve,{ref:o,className:r.cn("text-sm text-muted",e),...t}));Ct.displayName=ve.displayName;const Pt=U.forwardRef(({id:e,title:t,description:o,onClose:s,size:a="md",content:l,className:d,open:u,onOpenChange:m,footer:c,...g},v)=>n.jsx(Ho,{open:!0,onOpenChange:b=>{!b&&s&&s()},children:n.jsxs(Dt,{ref:v,className:r.cn("flex flex-col gap-0 px-0 py-0",{"max-w-sm":a==="sm","max-w-md":a==="md","max-w-lg":a==="lg","max-w-xl":a==="xl","max-w-[90%]":a==="max","max-w-fit":a==="fit","max-w-full":a==="full","max-w-auto":a==="auto"},d),...g,children:[n.jsxs(Nt,{className:"sticky left-0 right-0 top-0 z-50 border-b border-b-border bg-white",children:[n.jsx(bt,{className:"flex h-[57px] w-full items-center justify-start px-5 md:h-[65px] md:justify-center md:px-[30px]",children:t}),n.jsxs(Uo,{className:"absolute right-4 top-5 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground md:right-[30px] md:top-[25px]",children:[n.jsx(r.Icon.Cancel,{size:"16"}),n.jsx("span",{className:"sr-only",children:"Close"})]})]}),o&&n.jsx(Ct,{children:o}),l&&n.jsx(n.Fragment,{children:l}),c&&n.jsx(Rt,{children:c})]})}));Pt.displayName="Dialog";const At=i.forwardRef(({title:e,description:t,subDescription:o,contents:s,onConfirm:a,confirmText:l="확인",cancelText:d="취소",size:u="sm",className:m,onClose:c,...g},v)=>n.jsx(ht,{open:!0,onOpenChange:b=>{!b&&c&&c()},children:n.jsxs(we,{size:u,className:m,...g,ref:v,children:[n.jsxs(ye,{children:[n.jsx(Ee,{children:e}),t&&n.jsx(Z,{className:"text-sm text-grey-800",children:t}),o&&n.jsx(Z,{className:"text-xs text-grey-600",children:o})]}),s&&s,n.jsxs(Te,{className:"mt-2",children:[n.jsx(yt,{className:r.cn("w-full font-normal"),children:d}),n.jsx(De,{className:r.cn("w-full font-normal"),onClick:()=>{a&&a()},children:l})]})]})}));At.displayName="Modal";var Ko="VisuallyHidden",J=i.forwardRef((e,t)=>n.jsx(r.Primitive.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));J.displayName=Ko;var qo=J,Ne="ToastProvider",[Re,zo,Go]=r.createCollection("Toast"),[jt,vs]=r.createContextScope("Toast",[Go]),[Yo,ee]=jt(Ne),_t=e=>{const{__scopeToast:t,label:o="Notification",duration:s=5e3,swipeDirection:a="right",swipeThreshold:l=50,children:d}=e,[u,m]=i.useState(null),[c,g]=i.useState(0),v=i.useRef(!1),b=i.useRef(!1);return o.trim()||console.error(`Invalid prop \`label\` supplied to \`${Ne}\`. Expected non-empty \`string\`.`),n.jsx(Re.Provider,{scope:t,children:n.jsx(Yo,{scope:t,label:o,duration:s,swipeDirection:a,swipeThreshold:l,toastCount:c,viewport:u,onViewportChange:m,onToastAdd:i.useCallback(()=>g(j=>j+1),[]),onToastRemove:i.useCallback(()=>g(j=>j-1),[]),isFocusedToastEscapeKeyDownRef:v,isClosePausedRef:b,children:d})})};_t.displayName=Ne;var St="ToastViewport",Bo=["F8"],ie="toast.viewportPause",le="toast.viewportResume",Ot=i.forwardRef((e,t)=>{const{__scopeToast:o,hotkey:s=Bo,label:a="Notifications ({hotkey})",...l}=e,d=ee(St,o),u=zo(o),m=i.useRef(null),c=i.useRef(null),g=i.useRef(null),v=i.useRef(null),b=r.useComposedRefs(t,v,d.onViewportChange),j=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),_=d.toastCount>0;i.useEffect(()=>{const f=D=>{var w;s.length!==0&&s.every(T=>D[T]||D.code===T)&&((w=v.current)==null||w.focus())};return document.addEventListener("keydown",f),()=>document.removeEventListener("keydown",f)},[s]),i.useEffect(()=>{const f=m.current,D=v.current;if(_&&f&&D){const h=()=>{if(!d.isClosePausedRef.current){const N=new CustomEvent(ie);D.dispatchEvent(N),d.isClosePausedRef.current=!0}},w=()=>{if(d.isClosePausedRef.current){const N=new CustomEvent(le);D.dispatchEvent(N),d.isClosePausedRef.current=!1}},T=N=>{!f.contains(N.relatedTarget)&&w()},E=()=>{f.contains(document.activeElement)||w()};return f.addEventListener("focusin",h),f.addEventListener("focusout",T),f.addEventListener("pointermove",h),f.addEventListener("pointerleave",E),window.addEventListener("blur",h),window.addEventListener("focus",w),()=>{f.removeEventListener("focusin",h),f.removeEventListener("focusout",T),f.removeEventListener("pointermove",h),f.removeEventListener("pointerleave",E),window.removeEventListener("blur",h),window.removeEventListener("focus",w)}}},[_,d.isClosePausedRef]);const x=i.useCallback(({tabbingDirection:f})=>{const h=u().map(w=>{const T=w.ref.current,E=[T,...ls(T)];return f==="forwards"?E:E.reverse()});return(f==="forwards"?h.reverse():h).flat()},[u]);return i.useEffect(()=>{const f=v.current;if(f){const D=h=>{var E,N,S;const w=h.altKey||h.ctrlKey||h.metaKey;if(h.key==="Tab"&&!w){const k=document.activeElement,M=h.shiftKey;if(h.target===f&&M){(E=c.current)==null||E.focus();return}const O=x({tabbingDirection:M?"backwards":"forwards"}),K=O.findIndex(p=>p===k);re(O.slice(K+1))?h.preventDefault():M?(N=c.current)==null||N.focus():(S=g.current)==null||S.focus()}};return f.addEventListener("keydown",D),()=>f.removeEventListener("keydown",D)}},[u,x]),n.jsxs(r.Branch,{ref:m,role:"region","aria-label":a.replace("{hotkey}",j),tabIndex:-1,style:{pointerEvents:_?void 0:"none"},children:[_&&n.jsx(ce,{ref:c,onFocusFromOutsideViewport:()=>{const f=x({tabbingDirection:"forwards"});re(f)}}),n.jsx(Re.Slot,{scope:o,children:n.jsx(r.Primitive.ol,{tabIndex:-1,...l,ref:b})}),_&&n.jsx(ce,{ref:g,onFocusFromOutsideViewport:()=>{const f=x({tabbingDirection:"backwards"});re(f)}})]})});Ot.displayName=St;var It="ToastFocusProxy",ce=i.forwardRef((e,t)=>{const{__scopeToast:o,onFocusFromOutsideViewport:s,...a}=e,l=ee(It,o);return n.jsx(J,{"aria-hidden":!0,tabIndex:0,...a,ref:t,style:{position:"fixed"},onFocus:d=>{var c;const u=d.relatedTarget;!((c=l.viewport)!=null&&c.contains(u))&&s()}})});ce.displayName=It;var te="Toast",Xo="toast.swipeStart",Qo="toast.swipeMove",Zo="toast.swipeCancel",Jo="toast.swipeEnd",Mt=i.forwardRef((e,t)=>{const{forceMount:o,open:s,defaultOpen:a,onOpenChange:l,...d}=e,[u=!0,m]=r.useControllableState({prop:s,defaultProp:a,onChange:l});return n.jsx(r.Presence,{present:o||u,children:n.jsx(os,{open:u,...d,ref:t,onClose:()=>m(!1),onPause:r.useCallbackRef(e.onPause),onResume:r.useCallbackRef(e.onResume),onSwipeStart:r.composeEventHandlers(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:r.composeEventHandlers(e.onSwipeMove,c=>{const{x:g,y:v}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${g}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${v}px`)}),onSwipeCancel:r.composeEventHandlers(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:r.composeEventHandlers(e.onSwipeEnd,c=>{const{x:g,y:v}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${g}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${v}px`),m(!1)})})})});Mt.displayName=te;var[es,ts]=jt(te,{onClose(){}}),os=i.forwardRef((e,t)=>{const{__scopeToast:o,type:s="foreground",duration:a,open:l,onClose:d,onEscapeKeyDown:u,onPause:m,onResume:c,onSwipeStart:g,onSwipeMove:v,onSwipeCancel:b,onSwipeEnd:j,..._}=e,x=ee(te,o),[f,D]=i.useState(null),h=r.useComposedRefs(t,p=>D(p)),w=i.useRef(null),T=i.useRef(null),E=a||x.duration,N=i.useRef(0),S=i.useRef(E),k=i.useRef(0),{onToastAdd:M,onToastRemove:oe}=x,F=r.useCallbackRef(()=>{var R;(f==null?void 0:f.contains(document.activeElement))&&((R=x.viewport)==null||R.focus()),d()}),O=i.useCallback(p=>{!p||p===1/0||(window.clearTimeout(k.current),N.current=new Date().getTime(),k.current=window.setTimeout(F,p))},[F]);i.useEffect(()=>{const p=x.viewport;if(p){const R=()=>{O(S.current),c==null||c()},A=()=>{const L=new Date().getTime()-N.current;S.current=S.current-L,window.clearTimeout(k.current),m==null||m()};return p.addEventListener(ie,A),p.addEventListener(le,R),()=>{p.removeEventListener(ie,A),p.removeEventListener(le,R)}}},[x.viewport,E,m,c,O]),i.useEffect(()=>{l&&!x.isClosePausedRef.current&&O(E)},[l,E,x.isClosePausedRef,O]),i.useEffect(()=>(M(),()=>oe()),[M,oe]);const K=i.useMemo(()=>f?Wt(f):null,[f]);return x.viewport?n.jsxs(n.Fragment,{children:[K&&n.jsx(ss,{__scopeToast:o,role:"status","aria-live":s==="foreground"?"assertive":"polite","aria-atomic":!0,children:K}),n.jsx(es,{scope:o,onClose:F,children:ao.createPortal(n.jsx(Re.ItemSlot,{scope:o,children:n.jsx(r.Root,{asChild:!0,onEscapeKeyDown:r.composeEventHandlers(u,()=>{x.isFocusedToastEscapeKeyDownRef.current||F(),x.isFocusedToastEscapeKeyDownRef.current=!1}),children:n.jsx(r.Primitive.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":l?"open":"closed","data-swipe-direction":x.swipeDirection,..._,ref:h,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:r.composeEventHandlers(e.onKeyDown,p=>{p.key==="Escape"&&(u==null||u(p.nativeEvent),p.nativeEvent.defaultPrevented||(x.isFocusedToastEscapeKeyDownRef.current=!0,F()))}),onPointerDown:r.composeEventHandlers(e.onPointerDown,p=>{p.button===0&&(w.current={x:p.clientX,y:p.clientY})}),onPointerMove:r.composeEventHandlers(e.onPointerMove,p=>{if(!w.current)return;const R=p.clientX-w.current.x,A=p.clientY-w.current.y,L=!!T.current,V=["left","right"].includes(x.swipeDirection),q=["left","up"].includes(x.swipeDirection)?Math.min:Math.max,to=V?q(0,R):0,oo=V?0:q(0,A),se=p.pointerType==="touch"?10:2,z={x:to,y:oo},Ce={originalEvent:p,delta:z};L?(T.current=z,Y(Qo,v,Ce,{discrete:!1})):je(z,x.swipeDirection,se)?(T.current=z,Y(Xo,g,Ce,{discrete:!1}),p.target.setPointerCapture(p.pointerId)):(Math.abs(R)>se||Math.abs(A)>se)&&(w.current=null)}),onPointerUp:r.composeEventHandlers(e.onPointerUp,p=>{const R=T.current,A=p.target;if(A.hasPointerCapture(p.pointerId)&&A.releasePointerCapture(p.pointerId),T.current=null,w.current=null,R){const L=p.currentTarget,V={originalEvent:p,delta:R};je(R,x.swipeDirection,x.swipeThreshold)?Y(Jo,j,V,{discrete:!0}):Y(Zo,b,V,{discrete:!0}),L.addEventListener("click",q=>q.preventDefault(),{once:!0})}})})})}),x.viewport)})]}):null}),ss=e=>{const{__scopeToast:t,children:o,...s}=e,a=ee(te,t),[l,d]=i.useState(!1),[u,m]=i.useState(!1);return rs(()=>d(!0)),i.useEffect(()=>{const c=window.setTimeout(()=>m(!0),1e3);return()=>window.clearTimeout(c)},[]),u?null:n.jsx(r.Portal,{asChild:!0,children:n.jsx(J,{...s,children:l&&n.jsxs(n.Fragment,{children:[a.label," ",o]})})})},ns="ToastTitle",Ft=i.forwardRef((e,t)=>{const{__scopeToast:o,...s}=e;return n.jsx(r.Primitive.div,{...s,ref:t})});Ft.displayName=ns;var as="ToastDescription",$t=i.forwardRef((e,t)=>{const{__scopeToast:o,...s}=e;return n.jsx(r.Primitive.div,{...s,ref:t})});$t.displayName=as;var kt="ToastAction",Lt=i.forwardRef((e,t)=>{const{altText:o,...s}=e;return o.trim()?n.jsx(Ht,{altText:o,asChild:!0,children:n.jsx(be,{...s,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${kt}\`. Expected non-empty \`string\`.`),null)});Lt.displayName=kt;var Vt="ToastClose",be=i.forwardRef((e,t)=>{const{__scopeToast:o,...s}=e,a=ts(Vt,o);return n.jsx(Ht,{asChild:!0,children:n.jsx(r.Primitive.button,{type:"button",...s,ref:t,onClick:r.composeEventHandlers(e.onClick,a.onClose)})})});be.displayName=Vt;var Ht=i.forwardRef((e,t)=>{const{__scopeToast:o,altText:s,...a}=e;return n.jsx(r.Primitive.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":s||void 0,...a,ref:t})});function Wt(e){const t=[];return Array.from(e.childNodes).forEach(s=>{if(s.nodeType===s.TEXT_NODE&&s.textContent&&t.push(s.textContent),is(s)){const a=s.ariaHidden||s.hidden||s.style.display==="none",l=s.dataset.radixToastAnnounceExclude==="";if(!a)if(l){const d=s.dataset.radixToastAnnounceAlt;d&&t.push(d)}else t.push(...Wt(s))}}),t}function Y(e,t,o,{discrete:s}){const a=o.originalEvent.currentTarget,l=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:o});t&&a.addEventListener(e,t,{once:!0}),s?r.dispatchDiscreteCustomEvent(a,l):a.dispatchEvent(l)}var je=(e,t,o=0)=>{const s=Math.abs(e.x),a=Math.abs(e.y),l=s>a;return t==="left"||t==="right"?l&&s>o:!l&&a>o};function rs(e=()=>{}){const t=r.useCallbackRef(e);r.useLayoutEffect2(()=>{let o=0,s=0;return o=window.requestAnimationFrame(()=>s=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(o),window.cancelAnimationFrame(s)}},[t])}function is(e){return e.nodeType===e.ELEMENT_NODE}function ls(e){const t=[],o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const a=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||a?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)t.push(o.currentNode);return t}function re(e){const t=document.activeElement;return e.some(o=>o===t?!0:(o.focus(),document.activeElement!==t))}var cs=_t,Ut=Ot,Kt=Mt,qt=Ft,zt=$t,Gt=Lt,Yt=be;const ds=cs,us={"top-left":"top-0 left-0 bottom-auto mt-10 items-start","top-center":"top-0 left-1/2 bottom-auto transform -translate-x-1/2 mt-10 items-center","top-right":"top-0 right-0 bottom-auto items-end mt-10","bottom-left":"top-auto bottom-4 left-0 items-start","bottom-center":"top-auto bottom-4 left-1/2 transform -translate-x-1/2 items-center","bottom-right":"top-auto bottom-4 right-0 items-end"},Bt=i.forwardRef(({className:e,id:t,position:o="top-center",...s},a)=>n.jsx(Ut,{ref:a,id:t,className:r.cn("fixed z-[100] flex flex-col-reverse gap-2 p-4 outline-none ring-transparent md:p-10",us[o],e),...s}));Bt.displayName=Ut.displayName;const ps=r.cva("group pointer-events-auto relative flex w-full whitespace-pre-wrap bg-opacity-90 items-end justify-between space-x-4 overflow-hidden rounded-lg border p-4 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-top-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-top-full",{variants:{variant:{black:"group border bg-grey-800 border-grey-800 text-grey-50",white:"group border bg-grey-50 border-grey-50 text-grey-800"},size:{sm:"w-[300px]",md:"w-[400px]",lg:"w-[600px]",xl:"w-[800px]",full:"w-[90vw]",fit:"w-fit"}},defaultVariants:{variant:"black",size:"fit"}}),Xt=i.forwardRef(({className:e,variant:t,size:o,...s},a)=>n.jsx(Kt,{ref:a,className:r.cn(ps({variant:t,size:o}),e),...s,duration:2500}));Xt.displayName=Kt.displayName;const Qt=i.forwardRef(({className:e,...t},o)=>n.jsx(Gt,{ref:o,className:r.cn(r.buttonVariants({variant:"outline",size:"sm",theme:"secondary"}),e),...t}));Qt.displayName=Gt.displayName;const Zt=i.forwardRef(({className:e,...t},o)=>n.jsx(Yt,{ref:o,className:r.cn("absolute right-1.5 top-1.5 rounded-md p-1 text-grey-50/50 opacity-0 transition-opacity hover:text-grey-50 focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.white]:text-grey-300 group-[.white]:hover:text-grey-50 group-[.white]:focus:ring-grey-400",e),"toast-close":"",...t,children:n.jsx(r.Icon.Cancel,{size:"12"})}));Zt.displayName=Yt.displayName;const Jt=i.forwardRef(({className:e,...t},o)=>n.jsx(qt,{ref:o,className:r.cn("text-sm font-semibold",e),...t}));Jt.displayName=qt.displayName;const eo=i.forwardRef(({className:e,...t},o)=>n.jsx(zt,{ref:o,className:r.cn("text-sm font-normal",e),...t}));eo.displayName=zt.displayName;function fs(){const{toasts:e}=vo(),t=e.reduce((o,s)=>{const a=s.position||"top-center";return o[a]||(o[a]=[]),o[a].push(s),o},{});return n.jsxs(U.Fragment,{children:[Object.entries(t).map(([o,s])=>n.jsxs(ds,{children:[n.jsx(Bt,{position:o}),s.map(function({id:a,title:l,description:d,action:u,actionText:m="확인",closeButton:c=!1,variant:g="black",...v}){const b=g==="black"?"solid":"outline";return n.jsxs(Xt,{variant:g,...v,children:[n.jsxs("div",{className:"flex flex-col gap-1",children:[l&&n.jsx(Jt,{children:l}),n.jsx(eo,{children:d})]}),u&&n.jsx(Qt,{altText:a||"toast action",onClick:u,className:r.cn(r.buttonVariants({variant:b,size:"sm",theme:"secondary"})),children:m}),c&&n.jsx(Zt,{})]},a)})]},o))," "]})}const ms=({children:e})=>{const[t,o]=U.useState(null);return U.useEffect(()=>{let s=document.getElementById("portal");s||(s=document.createElement("div"),s.id="portal",document.body.appendChild(s)),o(s)},[]),t?_e.createPortal(e,t):null};exports.Alert=Tt;exports.Dialog=Pt;exports.Modal=At;exports.PortalContainer=ms;exports.Root=qo;exports.Toaster=fs;exports.portalManager=fo;exports.toast=Ie;
|
package/dist/provider.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),t=require("./portal-container-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),t=require("./portal-container-BveN4tv_.cjs"),n=require("react"),p=()=>{const[i,d]=n.useState([]);n.useEffect(()=>{const e=t.portalManager.subscribe((s,a)=>{d(o=>{const l=o.find(c=>c.id===s.id);return a?l?o:[...o,{...s,isOpen:a}]:o.map(c=>c.id===s.id?{...c,isOpen:!1}:c)})});return()=>{e()}},[]);const r=n.useCallback(e=>{t.portalManager.setPortalOpen(e,!1)},[]);n.useEffect(()=>{const e=[];return i.forEach(s=>{if(!s.isOpen){const a=setTimeout(()=>{d(o=>o.filter(l=>l.id!==s.id))},300);e.push(a)}}),()=>{e.forEach(s=>clearTimeout(s))}},[i]);const f=n.useCallback(e=>{const s=e.props;t.toast({title:s.title,description:s.description,action:s.action,closeButton:s.closeButton,variant:s.variant,position:s.position,size:s.size,className:s.className}),r(e.id)},[r]);return n.useEffect(()=>{i.forEach(e=>{e.type==="toast"&&e.isOpen&&f(e)})},[i,f]),u.jsxs(t.PortalContainer,{children:[u.jsx(t.Toaster,{}),i.map(e=>{var s;if(!e.isOpen)return null;switch(e.type){case"modal":return u.jsx(t.Modal,{...e.props,onClose:()=>{e.props.onClose&&e.props.onClose(),r(e.id)},description:(s=e.props.description)==null?void 0:s.toString()},e.id);case"alert":return u.jsx(t.Alert,{...e.props,onClose:()=>{e.props.onClose&&e.props.onClose(),r(e.id)}},e.id);case"dialog":return u.jsx(t.Dialog,{...e.props,onClose:()=>{e.props.onClose&&e.props.onClose(),r(e.id)}},e.id);case"toast":return null;default:return null}})]})};exports.PortalProvider=p;
|
package/dist/provider.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as m, jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { p as f, t as C, P as h, T as P, D as b, A as g, M as T } from "./portal-container-
|
|
2
|
+
import { p as f, t as C, P as h, T as P, D as b, A as g, M as T } from "./portal-container-BrmW99Cu.js";
|
|
3
3
|
import { useState as x, useEffect as u, useCallback as p } from "react";
|
|
4
4
|
const j = () => {
|
|
5
5
|
const [i, d] = x([]);
|
package/package.json
CHANGED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";var so=Object.defineProperty;var ao=(e,t,o)=>t in e?so(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var H=(e,t,o)=>ao(e,typeof t!="symbol"?t+"":t,o);const a=require("react/jsx-runtime"),r=require("./index-Cv9m35ew.cjs"),U=require("react"),_e=require("react-dom");function Se(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const s=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,s.get?s:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const i=Se(U),no=Se(_e);let G;const ro=new Uint8Array(16);function io(){if(!G&&(G=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!G))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return G(ro)}const y=[];for(let e=0;e<256;++e)y.push((e+256).toString(16).slice(1));function lo(e,t=0){return y[e[t+0]]+y[e[t+1]]+y[e[t+2]]+y[e[t+3]]+"-"+y[e[t+4]]+y[e[t+5]]+"-"+y[e[t+6]]+y[e[t+7]]+"-"+y[e[t+8]]+y[e[t+9]]+"-"+y[e[t+10]]+y[e[t+11]]+y[e[t+12]]+y[e[t+13]]+y[e[t+14]]+y[e[t+15]]}const co=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Pe={randomUUID:co};function uo(e,t,o){if(Pe.randomUUID&&!t&&!e)return Pe.randomUUID();e=e||{};const s=e.random||(e.rng||io)();return s[6]=s[6]&15|64,s[8]=s[8]&63|128,lo(s)}class po{constructor(){H(this,"listeners",new Set);H(this,"portals",new Map);H(this,"queue",[]);H(this,"isProcessing",!1)}processQueue(){if(!(this.isProcessing||this.queue.length===0)){for(this.isProcessing=!0;this.queue.length>0;){const t=this.queue.shift();t&&t()}this.isProcessing=!1}}isPortalOpen(t){var o;return((o=this.portals.get(t))==null?void 0:o.isOpen)??!1}subscribe(t){return this.listeners.add(t),()=>{this.listeners.delete(t)}}showPortal(t,o){console.log(o.id);const s=o.id||this.generateId(t);if(this.isPortalOpen(s))return console.warn(`Portal with id "${s}" is already open.`),null;const n={id:s,type:t,props:o};return this.portals.set(s,{...n,isOpen:!0}),this.queue.push(()=>{this.listeners.forEach(l=>{l(n,!0)})}),this.processQueue(),s}setPortalOpen(t,o){const s=this.portals.get(t);s&&(s.isOpen=o,this.portals.set(t,s),this.queue.push(()=>{this.listeners.forEach(n=>{n(s,o)})}),this.processQueue())}getIsPortalOpen(t){var o;return((o=this.portals.get(t))==null?void 0:o.isOpen)??!1}getOpenPortals(){const t=[];for(const[o,s]of this.portals.entries())s.isOpen&&t.push(o);return t}closePortal(t){const o=this.portals.get(t);o&&(o.isOpen=!1,this.portals.set(t,o),this.queue.push(()=>{this.listeners.forEach(s=>{s(o,!1)})}),this.processQueue())}generateId(t){const o=`${t}_${window.location.pathname}`;return t==="toast"?`${o}_${uo()}`:o}}const fo=new po,mo=5,go=2e3;let ae=0;function Oe(){return ae=(ae+1)%Number.MAX_SAFE_INTEGER,ae.toString()}const ne=new Map,Ae=e=>{if(ne.has(e))return;const t=setTimeout(()=>{ne.delete(e),W({type:"REMOVE_TOAST",toastId:e})},go);ne.set(e,t)},xo=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,mo)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(o=>o.id===t.toast.id?{...o,...t.toast}:o)};case"DISMISS_TOAST":{const{toastId:o}=t;return o?Ae(o):e.toasts.forEach(s=>{Ae(s.id||Oe())}),{...e,toasts:e.toasts.map(s=>s.id===o||o===void 0?{...s,open:!1}:s)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(o=>o.id!==t.toastId)}}},B=[];let X={toasts:[]};function W(e){X=xo(X,e),B.forEach(t=>{t(X)})}function Ie({...e}){const t=Oe(),o=n=>W({type:"UPDATE_TOAST",toast:{...n,id:t}}),s=()=>W({type:"DISMISS_TOAST",toastId:t});return W({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:n=>{n||(s(),e.onClose&&e.onClose())}}}),{id:t,dismiss:s,update:o}}function vo(){const[e,t]=i.useState(X);return i.useEffect(()=>(B.push(t),()=>{const o=B.indexOf(t);o>-1&&B.splice(o,1)}),[e]),{...e,toast:Ie,dismiss:o=>W({type:"DISMISS_TOAST",toastId:o})}}var de="Dialog",[Me,Fe]=r.createContextScope(de),[ho,C]=Me(de),$e=e=>{const{__scopeDialog:t,children:o,open:s,defaultOpen:n,onOpenChange:l,modal:d=!0}=e,u=i.useRef(null),m=i.useRef(null),[c=!1,g]=r.useControllableState({prop:s,defaultProp:n,onChange:l});return a.jsx(ho,{scope:t,triggerRef:u,contentRef:m,contentId:r.useId(),titleId:r.useId(),descriptionId:r.useId(),open:c,onOpenChange:g,onOpenToggle:i.useCallback(()=>g(v=>!v),[g]),modal:d,children:o})};$e.displayName=de;var ke="DialogTrigger",Le=i.forwardRef((e,t)=>{const{__scopeDialog:o,...s}=e,n=C(ke,o),l=r.useComposedRefs(t,n.triggerRef);return a.jsx(r.Primitive.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":fe(n.open),...s,ref:l,onClick:r.composeEventHandlers(e.onClick,n.onOpenToggle)})});Le.displayName=ke;var ue="DialogPortal",[wo,Ve]=Me(ue,{forceMount:void 0}),He=e=>{const{__scopeDialog:t,forceMount:o,children:s,container:n}=e,l=C(ue,t);return a.jsx(wo,{scope:t,forceMount:o,children:i.Children.map(s,d=>a.jsx(r.Presence,{present:o||l.open,children:a.jsx(r.Portal,{asChild:!0,container:n,children:d})}))})};He.displayName=ue;var Q="DialogOverlay",We=i.forwardRef((e,t)=>{const o=Ve(Q,e.__scopeDialog),{forceMount:s=o.forceMount,...n}=e,l=C(Q,e.__scopeDialog);return l.modal?a.jsx(r.Presence,{present:s||l.open,children:a.jsx(yo,{...n,ref:t})}):null});We.displayName=Q;var yo=i.forwardRef((e,t)=>{const{__scopeDialog:o,...s}=e,n=C(Q,o);return a.jsx(r.ReactRemoveScroll,{as:r.Slot,allowPinchZoom:!0,shards:[n.contentRef],children:a.jsx(r.Primitive.div,{"data-state":fe(n.open),...s,ref:t,style:{pointerEvents:"auto",...s.style}})})}),I="DialogContent",Ue=i.forwardRef((e,t)=>{const o=Ve(I,e.__scopeDialog),{forceMount:s=o.forceMount,...n}=e,l=C(I,e.__scopeDialog);return a.jsx(r.Presence,{present:s||l.open,children:l.modal?a.jsx(To,{...n,ref:t}):a.jsx(Eo,{...n,ref:t})})});Ue.displayName=I;var To=i.forwardRef((e,t)=>{const o=C(I,e.__scopeDialog),s=i.useRef(null),n=r.useComposedRefs(t,o.contentRef,s);return i.useEffect(()=>{const l=s.current;if(l)return r.hideOthers(l)},[]),a.jsx(Ke,{...e,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:r.composeEventHandlers(e.onCloseAutoFocus,l=>{var d;l.preventDefault(),(d=o.triggerRef.current)==null||d.focus()}),onPointerDownOutside:r.composeEventHandlers(e.onPointerDownOutside,l=>{const d=l.detail.originalEvent,u=d.button===0&&d.ctrlKey===!0;(d.button===2||u)&&l.preventDefault()}),onFocusOutside:r.composeEventHandlers(e.onFocusOutside,l=>l.preventDefault())})}),Eo=i.forwardRef((e,t)=>{const o=C(I,e.__scopeDialog),s=i.useRef(!1),n=i.useRef(!1);return a.jsx(Ke,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:l=>{var d,u;(d=e.onCloseAutoFocus)==null||d.call(e,l),l.defaultPrevented||(s.current||(u=o.triggerRef.current)==null||u.focus(),l.preventDefault()),s.current=!1,n.current=!1},onInteractOutside:l=>{var m,c;(m=e.onInteractOutside)==null||m.call(e,l),l.defaultPrevented||(s.current=!0,l.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const d=l.target;((c=o.triggerRef.current)==null?void 0:c.contains(d))&&l.preventDefault(),l.detail.originalEvent.type==="focusin"&&n.current&&l.preventDefault()}})}),Ke=i.forwardRef((e,t)=>{const{__scopeDialog:o,trapFocus:s,onOpenAutoFocus:n,onCloseAutoFocus:l,...d}=e,u=C(I,o),m=i.useRef(null),c=r.useComposedRefs(t,m);return r.useFocusGuards(),a.jsxs(a.Fragment,{children:[a.jsx(r.FocusScope,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:n,onUnmountAutoFocus:l,children:a.jsx(r.DismissableLayer,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":fe(u.open),...d,ref:c,onDismiss:()=>u.onOpenChange(!1)})}),a.jsxs(a.Fragment,{children:[a.jsx(No,{titleId:u.titleId}),a.jsx(bo,{contentRef:m,descriptionId:u.descriptionId})]})]})}),pe="DialogTitle",qe=i.forwardRef((e,t)=>{const{__scopeDialog:o,...s}=e,n=C(pe,o);return a.jsx(r.Primitive.h2,{id:n.titleId,...s,ref:t})});qe.displayName=pe;var ze="DialogDescription",Ge=i.forwardRef((e,t)=>{const{__scopeDialog:o,...s}=e,n=C(ze,o);return a.jsx(r.Primitive.p,{id:n.descriptionId,...s,ref:t})});Ge.displayName=ze;var Ye="DialogClose",Be=i.forwardRef((e,t)=>{const{__scopeDialog:o,...s}=e,n=C(Ye,o);return a.jsx(r.Primitive.button,{type:"button",...s,ref:t,onClick:r.composeEventHandlers(e.onClick,()=>n.onOpenChange(!1))})});Be.displayName=Ye;function fe(e){return e?"open":"closed"}var Xe="DialogTitleWarning",[Do,Qe]=r.createContext2(Xe,{contentName:I,titleName:pe,docsSlug:"dialog"}),No=({titleId:e})=>{const t=Qe(Xe),o=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
2
|
-
|
|
3
|
-
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
4
|
-
|
|
5
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return i.useEffect(()=>{e&&(document.getElementById(e)||console.error(o))},[o,e]),null},Ro="DialogDescriptionWarning",bo=({contentRef:e,descriptionId:t})=>{const s=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Qe(Ro).contentName}}.`;return i.useEffect(()=>{var l;const n=(l=e.current)==null?void 0:l.getAttribute("aria-describedby");t&&n&&(document.getElementById(t)||console.warn(s))},[s,e,t]),null},Ze=$e,Co=Le,Je=He,me=We,ge=Ue,xe=qe,ve=Ge,he=Be,et="AlertDialog",[Po,xs]=r.createContextScope(et,[Fe]),P=Fe(),tt=e=>{const{__scopeAlertDialog:t,...o}=e,s=P(t);return a.jsx(Ze,{...s,...o,modal:!0})};tt.displayName=et;var Ao="AlertDialogTrigger",jo=i.forwardRef((e,t)=>{const{__scopeAlertDialog:o,...s}=e,n=P(o);return a.jsx(Co,{...n,...s,ref:t})});jo.displayName=Ao;var _o="AlertDialogPortal",ot=e=>{const{__scopeAlertDialog:t,...o}=e,s=P(t);return a.jsx(Je,{...s,...o})};ot.displayName=_o;var So="AlertDialogOverlay",st=i.forwardRef((e,t)=>{const{__scopeAlertDialog:o,...s}=e,n=P(o);return a.jsx(me,{...n,...s,ref:t})});st.displayName=So;var $="AlertDialogContent",[Oo,Io]=Po($),at=i.forwardRef((e,t)=>{const{__scopeAlertDialog:o,children:s,...n}=e,l=P(o),d=i.useRef(null),u=r.useComposedRefs(t,d),m=i.useRef(null);return a.jsx(Do,{contentName:$,titleName:nt,docsSlug:"alert-dialog",children:a.jsx(Oo,{scope:o,cancelRef:m,children:a.jsxs(ge,{role:"alertdialog",...l,...n,ref:u,onOpenAutoFocus:r.composeEventHandlers(n.onOpenAutoFocus,c=>{var g;c.preventDefault(),(g=m.current)==null||g.focus({preventScroll:!0})}),onPointerDownOutside:c=>c.preventDefault(),onInteractOutside:c=>c.preventDefault(),children:[a.jsx(r.Slottable,{children:s}),a.jsx(Fo,{contentRef:d})]})})})});at.displayName=$;var nt="AlertDialogTitle",rt=i.forwardRef((e,t)=>{const{__scopeAlertDialog:o,...s}=e,n=P(o);return a.jsx(xe,{...n,...s,ref:t})});rt.displayName=nt;var it="AlertDialogDescription",lt=i.forwardRef((e,t)=>{const{__scopeAlertDialog:o,...s}=e,n=P(o);return a.jsx(ve,{...n,...s,ref:t})});lt.displayName=it;var Mo="AlertDialogAction",ct=i.forwardRef((e,t)=>{const{__scopeAlertDialog:o,...s}=e,n=P(o);return a.jsx(he,{...n,...s,ref:t})});ct.displayName=Mo;var dt="AlertDialogCancel",ut=i.forwardRef((e,t)=>{const{__scopeAlertDialog:o,...s}=e,{cancelRef:n}=Io(dt,o),l=P(o),d=r.useComposedRefs(t,n);return a.jsx(he,{...l,...s,ref:d})});ut.displayName=dt;var Fo=({contentRef:e})=>{const t=`\`${$}\` requires a description for the component to be accessible for screen reader users.
|
|
6
|
-
|
|
7
|
-
You can add a description to the \`${$}\` by passing a \`${it}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
8
|
-
|
|
9
|
-
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${$}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
10
|
-
|
|
11
|
-
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return i.useEffect(()=>{var s;document.getElementById((s=e.current)==null?void 0:s.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},$o=tt,ko=ot,pt=st,ft=at,mt=ct,gt=ut,xt=rt,vt=lt;const ht=$o,Lo=ko,wt=i.forwardRef(({className:e,...t},o)=>a.jsx(pt,{className:r.cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/60",e),...t,ref:o}));wt.displayName=pt.displayName;const Vo={sm:"max-w-[344px]",md:"max-w-[500px]",lg:"max-w-[640px]",fit:"max-w-fit"},we=i.forwardRef(({className:e,size:t="sm",...o},s)=>a.jsxs(Lo,{children:[a.jsx(wt,{}),a.jsx(ft,{ref:s,className:r.cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] bg-background fixed left-[50%] top-[50%] z-50 grid w-full translate-x-[-50%] translate-y-[-50%] gap-2 rounded-lg border p-4 shadow-lg duration-200",Vo[t],e),...o})]}));we.displayName=ft.displayName;const ye=({className:e,...t})=>a.jsx("div",{className:r.cn("flex flex-col space-y-2 text-center sm:text-left",e),...t});ye.displayName="AlertDialogHeader";const Te=({className:e,...t})=>a.jsx("div",{className:r.cn("flex flex-col-reverse sm:flex-row sm:justify-between sm:space-x-2",e),...t});Te.displayName="AlertDialogFooter";const Ee=i.forwardRef(({className:e,...t},o)=>a.jsx(xt,{ref:o,className:r.cn("whitespace-pre-wrap text-base font-semibold",e),...t}));Ee.displayName=xt.displayName;const Z=i.forwardRef(({className:e,...t},o)=>a.jsx(vt,{ref:o,className:r.cn("text-grey-600 whitespace-pre-wrap text-xs font-normal",e),...t}));Z.displayName=vt.displayName;const De=i.forwardRef(({className:e,...t},o)=>a.jsx(mt,{ref:o,className:r.cn(r.buttonVariants({size:"sm"}),e),...t}));De.displayName=mt.displayName;const yt=i.forwardRef(({className:e,...t},o)=>a.jsx(gt,{ref:o,className:r.cn(r.buttonVariants({variant:"outline",size:"sm",theme:"secondary"}),"mt-2 w-1/2 sm:mt-0",e),...t}));yt.displayName=gt.displayName;const Tt=({title:e="알림",description:t,confirmText:o="확인",onConfirm:s,size:n="sm",onClose:l})=>a.jsx(ht,{open:!0,onOpenChange:d=>{!d&&l&&l()},children:a.jsxs(we,{size:n,className:"gap-4",children:[a.jsxs(ye,{children:[a.jsx(Ee,{children:e}),a.jsx(Z,{className:"text-sm",children:t})]}),a.jsx(Te,{children:a.jsx(De,{className:r.cn("w-full font-normal"),onClick:()=>{s&&s()},children:o})})]})});Tt.displayName="Alert";const Ho=Ze,Wo=Je,Uo=he,Et=i.forwardRef(({className:e,...t},o)=>a.jsx(me,{ref:o,className:r.cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t}));Et.displayName=me.displayName;const Dt=i.forwardRef(({className:e,children:t,...o},s)=>a.jsxs(Wo,{children:[a.jsx(Et,{}),a.jsx(ge,{ref:s,className:r.cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] fixed left-[50%] top-[50%] z-50 grid w-full max-w-xl translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200",e),...o,children:t})]}));Dt.displayName=ge.displayName;const Nt=({className:e,...t})=>a.jsx("div",{className:r.cn("flex flex-col text-left md:text-center",e),...t});Nt.displayName="DialogHeader";const Rt=({className:e,...t})=>a.jsx("div",{className:r.cn("flex items-center gap-2",e),...t});Rt.displayName="DialogFooter";const bt=i.forwardRef(({className:e,...t},o)=>a.jsx(xe,{ref:o,className:r.cn("text-lg font-semibold leading-none tracking-tight",e),...t}));bt.displayName=xe.displayName;const Ct=i.forwardRef(({className:e,...t},o)=>a.jsx(ve,{ref:o,className:r.cn("text-sm text-muted",e),...t}));Ct.displayName=ve.displayName;const Pt=U.forwardRef(({id:e,title:t,description:o,onClose:s,size:n="md",content:l,className:d,open:u,onOpenChange:m,footer:c,...g},v)=>a.jsx(Ho,{open:!0,onOpenChange:b=>{!b&&s&&s()},children:a.jsxs(Dt,{ref:v,className:r.cn("relative z-[100] flex flex-col gap-0 px-0 py-0",{"max-w-sm":n==="sm","max-w-md":n==="md","max-w-lg":n==="lg","max-w-xl":n==="xl","max-w-[90%]":n==="max","max-w-fit":n==="fit","max-w-full":n==="full","max-w-auto":n==="auto"},d),...g,children:[a.jsxs(Nt,{className:"sticky left-0 right-0 top-0 z-50 border-b border-b-border bg-white",children:[a.jsx(bt,{className:"flex h-[57px] w-full items-center justify-start px-5 md:h-[65px] md:justify-center md:px-[30px]",children:t}),a.jsxs(Uo,{className:"absolute right-4 top-5 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground md:right-[30px] md:top-[25px]",children:[a.jsx(r.Icon.Cancel,{size:"16"}),a.jsx("span",{className:"sr-only",children:"Close"})]})]}),o&&a.jsx(Ct,{children:o}),l&&l,c&&a.jsx(Rt,{children:c})]})}));Pt.displayName="Dialog";const At=i.forwardRef(({title:e,description:t,subDescription:o,contents:s,onConfirm:n,confirmText:l="확인",cancelText:d="취소",size:u="sm",className:m,onClose:c,...g},v)=>a.jsx(ht,{open:!0,onOpenChange:b=>{!b&&c&&c()},children:a.jsxs(we,{size:u,className:m,...g,ref:v,children:[a.jsxs(ye,{children:[a.jsx(Ee,{children:e}),t&&a.jsx(Z,{className:"text-sm text-grey-800",children:t}),o&&a.jsx(Z,{className:"text-xs text-grey-600",children:o})]}),s&&s,a.jsxs(Te,{className:"mt-2",children:[a.jsx(yt,{className:r.cn("w-full font-normal"),children:d}),a.jsx(De,{className:r.cn("w-full font-normal"),onClick:()=>{n&&n()},children:l})]})]})}));At.displayName="Modal";var Ko="VisuallyHidden",J=i.forwardRef((e,t)=>a.jsx(r.Primitive.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));J.displayName=Ko;var qo=J,Ne="ToastProvider",[Re,zo,Go]=r.createCollection("Toast"),[jt,vs]=r.createContextScope("Toast",[Go]),[Yo,ee]=jt(Ne),_t=e=>{const{__scopeToast:t,label:o="Notification",duration:s=5e3,swipeDirection:n="right",swipeThreshold:l=50,children:d}=e,[u,m]=i.useState(null),[c,g]=i.useState(0),v=i.useRef(!1),b=i.useRef(!1);return o.trim()||console.error(`Invalid prop \`label\` supplied to \`${Ne}\`. Expected non-empty \`string\`.`),a.jsx(Re.Provider,{scope:t,children:a.jsx(Yo,{scope:t,label:o,duration:s,swipeDirection:n,swipeThreshold:l,toastCount:c,viewport:u,onViewportChange:m,onToastAdd:i.useCallback(()=>g(j=>j+1),[]),onToastRemove:i.useCallback(()=>g(j=>j-1),[]),isFocusedToastEscapeKeyDownRef:v,isClosePausedRef:b,children:d})})};_t.displayName=Ne;var St="ToastViewport",Bo=["F8"],ie="toast.viewportPause",le="toast.viewportResume",Ot=i.forwardRef((e,t)=>{const{__scopeToast:o,hotkey:s=Bo,label:n="Notifications ({hotkey})",...l}=e,d=ee(St,o),u=zo(o),m=i.useRef(null),c=i.useRef(null),g=i.useRef(null),v=i.useRef(null),b=r.useComposedRefs(t,v,d.onViewportChange),j=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),_=d.toastCount>0;i.useEffect(()=>{const f=D=>{var w;s.length!==0&&s.every(T=>D[T]||D.code===T)&&((w=v.current)==null||w.focus())};return document.addEventListener("keydown",f),()=>document.removeEventListener("keydown",f)},[s]),i.useEffect(()=>{const f=m.current,D=v.current;if(_&&f&&D){const h=()=>{if(!d.isClosePausedRef.current){const N=new CustomEvent(ie);D.dispatchEvent(N),d.isClosePausedRef.current=!0}},w=()=>{if(d.isClosePausedRef.current){const N=new CustomEvent(le);D.dispatchEvent(N),d.isClosePausedRef.current=!1}},T=N=>{!f.contains(N.relatedTarget)&&w()},E=()=>{f.contains(document.activeElement)||w()};return f.addEventListener("focusin",h),f.addEventListener("focusout",T),f.addEventListener("pointermove",h),f.addEventListener("pointerleave",E),window.addEventListener("blur",h),window.addEventListener("focus",w),()=>{f.removeEventListener("focusin",h),f.removeEventListener("focusout",T),f.removeEventListener("pointermove",h),f.removeEventListener("pointerleave",E),window.removeEventListener("blur",h),window.removeEventListener("focus",w)}}},[_,d.isClosePausedRef]);const x=i.useCallback(({tabbingDirection:f})=>{const h=u().map(w=>{const T=w.ref.current,E=[T,...ls(T)];return f==="forwards"?E:E.reverse()});return(f==="forwards"?h.reverse():h).flat()},[u]);return i.useEffect(()=>{const f=v.current;if(f){const D=h=>{var E,N,S;const w=h.altKey||h.ctrlKey||h.metaKey;if(h.key==="Tab"&&!w){const k=document.activeElement,M=h.shiftKey;if(h.target===f&&M){(E=c.current)==null||E.focus();return}const O=x({tabbingDirection:M?"backwards":"forwards"}),K=O.findIndex(p=>p===k);re(O.slice(K+1))?h.preventDefault():M?(N=c.current)==null||N.focus():(S=g.current)==null||S.focus()}};return f.addEventListener("keydown",D),()=>f.removeEventListener("keydown",D)}},[u,x]),a.jsxs(r.Branch,{ref:m,role:"region","aria-label":n.replace("{hotkey}",j),tabIndex:-1,style:{pointerEvents:_?void 0:"none"},children:[_&&a.jsx(ce,{ref:c,onFocusFromOutsideViewport:()=>{const f=x({tabbingDirection:"forwards"});re(f)}}),a.jsx(Re.Slot,{scope:o,children:a.jsx(r.Primitive.ol,{tabIndex:-1,...l,ref:b})}),_&&a.jsx(ce,{ref:g,onFocusFromOutsideViewport:()=>{const f=x({tabbingDirection:"backwards"});re(f)}})]})});Ot.displayName=St;var It="ToastFocusProxy",ce=i.forwardRef((e,t)=>{const{__scopeToast:o,onFocusFromOutsideViewport:s,...n}=e,l=ee(It,o);return a.jsx(J,{"aria-hidden":!0,tabIndex:0,...n,ref:t,style:{position:"fixed"},onFocus:d=>{var c;const u=d.relatedTarget;!((c=l.viewport)!=null&&c.contains(u))&&s()}})});ce.displayName=It;var te="Toast",Xo="toast.swipeStart",Qo="toast.swipeMove",Zo="toast.swipeCancel",Jo="toast.swipeEnd",Mt=i.forwardRef((e,t)=>{const{forceMount:o,open:s,defaultOpen:n,onOpenChange:l,...d}=e,[u=!0,m]=r.useControllableState({prop:s,defaultProp:n,onChange:l});return a.jsx(r.Presence,{present:o||u,children:a.jsx(os,{open:u,...d,ref:t,onClose:()=>m(!1),onPause:r.useCallbackRef(e.onPause),onResume:r.useCallbackRef(e.onResume),onSwipeStart:r.composeEventHandlers(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:r.composeEventHandlers(e.onSwipeMove,c=>{const{x:g,y:v}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${g}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${v}px`)}),onSwipeCancel:r.composeEventHandlers(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:r.composeEventHandlers(e.onSwipeEnd,c=>{const{x:g,y:v}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${g}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${v}px`),m(!1)})})})});Mt.displayName=te;var[es,ts]=jt(te,{onClose(){}}),os=i.forwardRef((e,t)=>{const{__scopeToast:o,type:s="foreground",duration:n,open:l,onClose:d,onEscapeKeyDown:u,onPause:m,onResume:c,onSwipeStart:g,onSwipeMove:v,onSwipeCancel:b,onSwipeEnd:j,..._}=e,x=ee(te,o),[f,D]=i.useState(null),h=r.useComposedRefs(t,p=>D(p)),w=i.useRef(null),T=i.useRef(null),E=n||x.duration,N=i.useRef(0),S=i.useRef(E),k=i.useRef(0),{onToastAdd:M,onToastRemove:oe}=x,F=r.useCallbackRef(()=>{var R;(f==null?void 0:f.contains(document.activeElement))&&((R=x.viewport)==null||R.focus()),d()}),O=i.useCallback(p=>{!p||p===1/0||(window.clearTimeout(k.current),N.current=new Date().getTime(),k.current=window.setTimeout(F,p))},[F]);i.useEffect(()=>{const p=x.viewport;if(p){const R=()=>{O(S.current),c==null||c()},A=()=>{const L=new Date().getTime()-N.current;S.current=S.current-L,window.clearTimeout(k.current),m==null||m()};return p.addEventListener(ie,A),p.addEventListener(le,R),()=>{p.removeEventListener(ie,A),p.removeEventListener(le,R)}}},[x.viewport,E,m,c,O]),i.useEffect(()=>{l&&!x.isClosePausedRef.current&&O(E)},[l,E,x.isClosePausedRef,O]),i.useEffect(()=>(M(),()=>oe()),[M,oe]);const K=i.useMemo(()=>f?Wt(f):null,[f]);return x.viewport?a.jsxs(a.Fragment,{children:[K&&a.jsx(ss,{__scopeToast:o,role:"status","aria-live":s==="foreground"?"assertive":"polite","aria-atomic":!0,children:K}),a.jsx(es,{scope:o,onClose:F,children:no.createPortal(a.jsx(Re.ItemSlot,{scope:o,children:a.jsx(r.Root,{asChild:!0,onEscapeKeyDown:r.composeEventHandlers(u,()=>{x.isFocusedToastEscapeKeyDownRef.current||F(),x.isFocusedToastEscapeKeyDownRef.current=!1}),children:a.jsx(r.Primitive.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":l?"open":"closed","data-swipe-direction":x.swipeDirection,..._,ref:h,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:r.composeEventHandlers(e.onKeyDown,p=>{p.key==="Escape"&&(u==null||u(p.nativeEvent),p.nativeEvent.defaultPrevented||(x.isFocusedToastEscapeKeyDownRef.current=!0,F()))}),onPointerDown:r.composeEventHandlers(e.onPointerDown,p=>{p.button===0&&(w.current={x:p.clientX,y:p.clientY})}),onPointerMove:r.composeEventHandlers(e.onPointerMove,p=>{if(!w.current)return;const R=p.clientX-w.current.x,A=p.clientY-w.current.y,L=!!T.current,V=["left","right"].includes(x.swipeDirection),q=["left","up"].includes(x.swipeDirection)?Math.min:Math.max,to=V?q(0,R):0,oo=V?0:q(0,A),se=p.pointerType==="touch"?10:2,z={x:to,y:oo},Ce={originalEvent:p,delta:z};L?(T.current=z,Y(Qo,v,Ce,{discrete:!1})):je(z,x.swipeDirection,se)?(T.current=z,Y(Xo,g,Ce,{discrete:!1}),p.target.setPointerCapture(p.pointerId)):(Math.abs(R)>se||Math.abs(A)>se)&&(w.current=null)}),onPointerUp:r.composeEventHandlers(e.onPointerUp,p=>{const R=T.current,A=p.target;if(A.hasPointerCapture(p.pointerId)&&A.releasePointerCapture(p.pointerId),T.current=null,w.current=null,R){const L=p.currentTarget,V={originalEvent:p,delta:R};je(R,x.swipeDirection,x.swipeThreshold)?Y(Jo,j,V,{discrete:!0}):Y(Zo,b,V,{discrete:!0}),L.addEventListener("click",q=>q.preventDefault(),{once:!0})}})})})}),x.viewport)})]}):null}),ss=e=>{const{__scopeToast:t,children:o,...s}=e,n=ee(te,t),[l,d]=i.useState(!1),[u,m]=i.useState(!1);return rs(()=>d(!0)),i.useEffect(()=>{const c=window.setTimeout(()=>m(!0),1e3);return()=>window.clearTimeout(c)},[]),u?null:a.jsx(r.Portal,{asChild:!0,children:a.jsx(J,{...s,children:l&&a.jsxs(a.Fragment,{children:[n.label," ",o]})})})},as="ToastTitle",Ft=i.forwardRef((e,t)=>{const{__scopeToast:o,...s}=e;return a.jsx(r.Primitive.div,{...s,ref:t})});Ft.displayName=as;var ns="ToastDescription",$t=i.forwardRef((e,t)=>{const{__scopeToast:o,...s}=e;return a.jsx(r.Primitive.div,{...s,ref:t})});$t.displayName=ns;var kt="ToastAction",Lt=i.forwardRef((e,t)=>{const{altText:o,...s}=e;return o.trim()?a.jsx(Ht,{altText:o,asChild:!0,children:a.jsx(be,{...s,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${kt}\`. Expected non-empty \`string\`.`),null)});Lt.displayName=kt;var Vt="ToastClose",be=i.forwardRef((e,t)=>{const{__scopeToast:o,...s}=e,n=ts(Vt,o);return a.jsx(Ht,{asChild:!0,children:a.jsx(r.Primitive.button,{type:"button",...s,ref:t,onClick:r.composeEventHandlers(e.onClick,n.onClose)})})});be.displayName=Vt;var Ht=i.forwardRef((e,t)=>{const{__scopeToast:o,altText:s,...n}=e;return a.jsx(r.Primitive.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":s||void 0,...n,ref:t})});function Wt(e){const t=[];return Array.from(e.childNodes).forEach(s=>{if(s.nodeType===s.TEXT_NODE&&s.textContent&&t.push(s.textContent),is(s)){const n=s.ariaHidden||s.hidden||s.style.display==="none",l=s.dataset.radixToastAnnounceExclude==="";if(!n)if(l){const d=s.dataset.radixToastAnnounceAlt;d&&t.push(d)}else t.push(...Wt(s))}}),t}function Y(e,t,o,{discrete:s}){const n=o.originalEvent.currentTarget,l=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:o});t&&n.addEventListener(e,t,{once:!0}),s?r.dispatchDiscreteCustomEvent(n,l):n.dispatchEvent(l)}var je=(e,t,o=0)=>{const s=Math.abs(e.x),n=Math.abs(e.y),l=s>n;return t==="left"||t==="right"?l&&s>o:!l&&n>o};function rs(e=()=>{}){const t=r.useCallbackRef(e);r.useLayoutEffect2(()=>{let o=0,s=0;return o=window.requestAnimationFrame(()=>s=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(o),window.cancelAnimationFrame(s)}},[t])}function is(e){return e.nodeType===e.ELEMENT_NODE}function ls(e){const t=[],o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const n=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||n?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)t.push(o.currentNode);return t}function re(e){const t=document.activeElement;return e.some(o=>o===t?!0:(o.focus(),document.activeElement!==t))}var cs=_t,Ut=Ot,Kt=Mt,qt=Ft,zt=$t,Gt=Lt,Yt=be;const ds=cs,us={"top-left":"top-0 left-0 bottom-auto mt-10 items-start","top-center":"top-0 left-1/2 bottom-auto transform -translate-x-1/2 mt-10 items-center","top-right":"top-0 right-0 bottom-auto items-end mt-10","bottom-left":"top-auto bottom-4 left-0 items-start","bottom-center":"top-auto bottom-4 left-1/2 transform -translate-x-1/2 items-center","bottom-right":"top-auto bottom-4 right-0 items-end"},Bt=i.forwardRef(({className:e,id:t,position:o="top-center",...s},n)=>a.jsx(Ut,{ref:n,id:t,className:r.cn("fixed z-[100] flex flex-col-reverse gap-2 p-4 outline-none ring-transparent md:p-10",us[o],e),...s}));Bt.displayName=Ut.displayName;const ps=r.cva("group pointer-events-auto relative flex w-full whitespace-pre-wrap bg-opacity-90 items-end justify-between space-x-4 overflow-hidden rounded-lg border p-4 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-top-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-top-full",{variants:{variant:{black:"group border bg-grey-800 border-grey-800 text-grey-50",white:"group border bg-grey-50 border-grey-50 text-grey-800"},size:{sm:"w-[300px]",md:"w-[400px]",lg:"w-[600px]",xl:"w-[800px]",full:"w-[90vw]",fit:"w-fit"}},defaultVariants:{variant:"black",size:"fit"}}),Xt=i.forwardRef(({className:e,variant:t,size:o,...s},n)=>a.jsx(Kt,{ref:n,className:r.cn(ps({variant:t,size:o}),e),...s,duration:2500}));Xt.displayName=Kt.displayName;const Qt=i.forwardRef(({className:e,...t},o)=>a.jsx(Gt,{ref:o,className:r.cn(r.buttonVariants({variant:"outline",size:"sm",theme:"secondary"}),e),...t}));Qt.displayName=Gt.displayName;const Zt=i.forwardRef(({className:e,...t},o)=>a.jsx(Yt,{ref:o,className:r.cn("absolute right-1.5 top-1.5 rounded-md p-1 text-grey-50/50 opacity-0 transition-opacity hover:text-grey-50 focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.white]:text-grey-300 group-[.white]:hover:text-grey-50 group-[.white]:focus:ring-grey-400",e),"toast-close":"",...t,children:a.jsx(r.Icon.Cancel,{size:"12"})}));Zt.displayName=Yt.displayName;const Jt=i.forwardRef(({className:e,...t},o)=>a.jsx(qt,{ref:o,className:r.cn("text-sm font-semibold",e),...t}));Jt.displayName=qt.displayName;const eo=i.forwardRef(({className:e,...t},o)=>a.jsx(zt,{ref:o,className:r.cn("text-sm font-normal",e),...t}));eo.displayName=zt.displayName;function fs(){const{toasts:e}=vo(),t=e.reduce((o,s)=>{const n=s.position||"top-center";return o[n]||(o[n]=[]),o[n].push(s),o},{});return a.jsxs(U.Fragment,{children:[Object.entries(t).map(([o,s])=>a.jsxs(ds,{children:[a.jsx(Bt,{position:o}),s.map(function({id:n,title:l,description:d,action:u,actionText:m="확인",closeButton:c=!1,variant:g="black",...v}){const b=g==="black"?"solid":"outline";return a.jsxs(Xt,{variant:g,...v,children:[a.jsxs("div",{className:"flex flex-col gap-1",children:[l&&a.jsx(Jt,{children:l}),a.jsx(eo,{children:d})]}),u&&a.jsx(Qt,{altText:n||"toast action",onClick:u,className:r.cn(r.buttonVariants({variant:b,size:"sm",theme:"secondary"})),children:m}),c&&a.jsx(Zt,{})]},n)})]},o))," "]})}const ms=({children:e})=>{const[t,o]=U.useState(null);return U.useEffect(()=>{let s=document.getElementById("portal");s||(s=document.createElement("div"),s.id="portal",document.body.appendChild(s)),o(s)},[]),t?_e.createPortal(e,t):null};exports.Alert=Tt;exports.Dialog=Pt;exports.Modal=At;exports.PortalContainer=ms;exports.Root=qo;exports.Toaster=fs;exports.portalManager=fo;exports.toast=Ie;
|