@ihabdevteam/core 0.445.0 → 0.446.0

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.
@@ -814,8 +814,8 @@
814
814
  * This source code is licensed under the ISC license.
815
815
  * See the LICENSE file in the root directory of this source tree.
816
816
  */const ig=[["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}],["path",{d:"M7 10v12",key:"1qc93n"}]],ug=se("thumbs-up",ig),mo={"alert-triangle":_l,"align-start-vertical":Ih,anchor:BC,armchair:AC,"arrow-down":zh,"arrow-up":Hh,"arrow-left":qh,"arrow-right":Gh,"arrow-right-left":Yh,"audio-lines":Xh,ban:Qh,bell:tm,"book-marked":rm,"book-open":om,"bow-arrow":lm,braces:um,bug:dm,calendar:$l,"calendar-check":hm,"calendar-days":fm,camera:gm,car:jC,"chart-column":ym,"chart-line":xm,"chart-pie":wm,check:wl,"chevron-down":Ll,"chevron-left":Bl,"chevron-right":kl,"chevron-up":Rl,circle:tg,"clipboard-list":Em,coffee:SC,combine:Dm,copy:Tm,"chevrons-left-right-ellipsis":$m,"credit-card":Rm,database:Al,diff:Im,download:Nl,ear:Wm,edit:Vm,"edit-2":Um,"edit-3":Km,ellipsis:El,eraser:Xm,"external-link":Qm,eye:t0,"eye-off":r0,"file-text":o0,"flip-horizontal":l0,folder:u0,"folder-open":d0,"folder-plus":h0,"folder-tree":f0,gamepad:g0,"gamepad-2":MC,clock:LC,lock:sf,"search-x":d1,"share-2":g1,tag:z1,target:PC,percent:IC,gavel:y0,"git-merge":jl,globe:_0,"grip-vertical":B0,headphones:A0,heart:E0,home:D0,inbox:zC,info:T0,"key-round":$0,landmark:R0,layers:F0,"layout-dashboard":O0,leaf:W0,lightbulb:V0,link:U0,"link-2":K0,"link-2-off":Z0,list:J0,"list-checks":ef,"list-ordered":nf,loader:af,"log-out":uf,mail:df,"map-pin":hf,menu:og,"message-circle":ff,"message-circle-question-mark":gf,"message-square":yf,"message-square-more":HC,"message-square-text":xf,minus:qC,"minus-circle":wf,moon:lg,"more-horizontal":El,package:kf,"party-popper":Nf,pause:jf,pencil:Sf,phone:Mf,play:Lf,"play-circle":Pf,plus:If,printer:zf,"refresh-cw":Hf,repeat:qf,replace:Gf,rocket:Yf,"rotate-ccw":Xf,"rotate-cw":Qf,salad:t1,"scan-search":r1,search:l1,"circle-alert":Dl,"alert-circle":Dl,"check-circle":Sl,scissors:u1,send:h1,settings:f1,"shield-check":y1,"shopping-cart":x1,shuffle:w1,"skip-back":k1,"skip-forward":N1,sparkles:GC,square:j1,star:S1,store:M1,"sun-medium":L1,table:P1,"table-2":I1,terminal:H1,"text-cursor-input":q1,"text-initial":G1,"thumbs-up":ug,ticket:Y1,trash:Q1,triangle:rg,"trash-2":X1,"trending-up":tC,"triangle-alert":_l,trophy:rC,type:YC,unlink:oC,upload:lC,user:ho,"user-plus":cC,"user-round":pC,"user-round-check":mC,users:CC,"users-round":bC,volume:XC,"volume-2":Tl,wrench:xC,x:Ml};Object.freeze(Object.keys(mo));function cg(e){return mo[e]??null}const Pl=new Set;function dg(e){return Zn&&!(e in mo)&&!Pl.has(e)&&(Pl.add(e),console.warn(`[ihabdevteam-core] lucide \uC544\uC774\uCF58 '${e}' \uC774 \uC815\uC801 \uBAA9\uB85D\uC5D0 \uC5C6\uC5B4 \uB80C\uB354\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. utils/lucideIconSet.ts \uC758 STATIC_LUCIDE_ICONS \uC5D0 \uCD94\uAC00\uD558\uC138\uC694.`)),Promise.resolve(null)}const pg=e=>e.replace(/([A-Z]+)([A-Z][a-z])/g,"$1-$2").replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Za-z])([0-9])/g,"$1-$2").replace(/[_ ]+/g,"-").toLowerCase();function hg(e){const t=e.toLowerCase();if(t.startsWith("http://")||t.startsWith("https://")||t.startsWith("data:")||e.includes("/assets/")||/\.(png|jpe?g|gif|webp|avif|bmp|ico)$/i.test(t))return null;const r=(e.split("/").pop()||"").replace(/\.svg$/,"");return r?pg(r):null}const Fl=new Map;function mg(e){const t=typeof e=="string"?hg(e):null,r=t?cg(t)??Fl.get(t)??null:null,[a,s]=o.useState(null);return o.useEffect(()=>{if(!t||r)return;let l=!1;return dg(t).then(i=>{Fl.set(t,i),l||s(i)}),()=>{l=!0}},[t,r]),r??a}/*! @license DOMPurify 3.4.14 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.14/LICENSE */function Il(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,a=Array(t);r<t;r++)a[r]=e[r];return a}function fg(e){if(Array.isArray(e))return e}function Cg(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var a,s,l,i,u=[],c=!0,p=!1;try{if(l=(r=r.call(e)).next,t!==0)for(;!(c=(a=l.call(r)).done)&&(u.push(a.value),u.length!==t);c=!0);}catch(h){p=!0,s=h}finally{try{if(!c&&r.return!=null&&(i=r.return(),Object(i)!==i))return}finally{if(p)throw s}}return u}}function gg(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
817
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bg(e,t){return fg(e)||Cg(e,t)||yg(e,t)||gg()}function yg(e,t){if(e){if(typeof e=="string")return Il(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Il(e,t):void 0}}const Ol=Object.entries,zl=Object.setPrototypeOf,vg=Object.isFrozen,xg=Object.getPrototypeOf,_g=Object.getOwnPropertyDescriptor;let Kt=Object.freeze,Zt=Object.seal,xr=Object.create,Wl=typeof Reflect<"u"&&Reflect,fo=Wl.apply,Co=Wl.construct;Kt||(Kt=function(t){return t}),Zt||(Zt=function(t){return t}),fo||(fo=function(t,r){for(var a=arguments.length,s=new Array(a>2?a-2:0),l=2;l<a;l++)s[l-2]=arguments[l];return t.apply(r,s)}),Co||(Co=function(t){for(var r=arguments.length,a=new Array(r>1?r-1:0),s=1;s<r;s++)a[s-1]=arguments[s];return new t(...a)});const or=Gt(Array.prototype.forEach),wg=Gt(Array.prototype.lastIndexOf),Hl=Gt(Array.prototype.pop),Or=Gt(Array.prototype.push),Bg=Gt(Array.prototype.splice),_r=Array.isArray,zr=Gt(String.prototype.toLowerCase),go=Gt(String.prototype.toString),Vl=Gt(String.prototype.match),Wr=Gt(String.prototype.replace),ql=Gt(String.prototype.indexOf),kg=Gt(String.prototype.trim),Ag=Gt(Number.prototype.toString),Ng=Gt(Boolean.prototype.toString),Ul=typeof BigInt>"u"?null:Gt(BigInt.prototype.toString),Gl=typeof Symbol>"u"?null:Gt(Symbol.prototype.toString),pn=Gt(Object.prototype.hasOwnProperty),Hr=Gt(Object.prototype.toString),an=Gt(RegExp.prototype.test),sr=Eg(TypeError);function Gt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,a=new Array(r>1?r-1:0),s=1;s<r;s++)a[s-1]=arguments[s];return fo(e,t,a)}}function Eg(e){return function(){for(var t=arguments.length,r=new Array(t),a=0;a<t;a++)r[a]=arguments[a];return Co(e,r)}}function Bt(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:zr;if(zl&&zl(e,null),!_r(t))return e;let a=t.length;for(;a--;){let s=t[a];if(typeof s=="string"){const l=r(s);l!==s&&(vg(t)||(t[a]=l),s=l)}e[s]=!0}return e}function jg(e){for(let t=0;t<e.length;t++)pn(e,t)||(e[t]=null);return e}function yn(e){const t=xr(null);for(const a of Ol(e)){var r=bg(a,2);const s=r[0],l=r[1];pn(e,s)&&(_r(l)?t[s]=jg(l):l&&typeof l=="object"&&l.constructor===Object?t[s]=yn(l):t[s]=l)}return t}function Dg(e){switch(typeof e){case"string":return e;case"number":return Ag(e);case"boolean":return Ng(e);case"bigint":return Ul?Ul(e):"0";case"symbol":return Gl?Gl(e):"Symbol()";case"undefined":return Hr(e);case"function":case"object":{if(e===null)return Hr(e);const t=e,r=En(t,"toString");if(typeof r=="function"){const a=r(t);return typeof a=="string"?a:Hr(a)}return Hr(e)}default:return Hr(e)}}function En(e,t){for(;e!==null;){const a=_g(e,t);if(a){if(a.get)return Gt(a.get);if(typeof a.value=="function")return Gt(a.value)}e=xg(e)}function r(){return null}return r}function Sg(e){try{return an(e,""),!0}catch{return!1}}const Kl=Kt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),bo=Kt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),yo=Kt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Tg=Kt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),vo=Kt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Mg=Kt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Yl=Kt(["#text"]),Zl=Kt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),xo=Kt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Xl=Kt(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),va=Kt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),$g=Zt(/{{[\w\W]*|^[\w\W]*}}/g),Lg=Zt(/<%[\w\W]*|^[\w\W]*%>/g),Rg=Zt(/\${[\w\W]*/g),Pg=Zt(/^data-[\-\w.\u00B7-\uFFFF]+$/),Fg=Zt(/^aria-[\-\w]+$/),Jl=Zt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Ig=Zt(/^(?:\w+script|data):/i),Og=Zt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),zg=Zt(/^html$/i),Wg=Zt(/^[a-z][.\w]*(-[.\w]+)+$/i),Ql=Zt(/<[/\w!]/g),ei=Zt(/<[/\w]/g),Hg=Zt(/<\/no(script|embed|frames)/i),Vg=Zt(/\/>/i),vn={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},ti=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],qg=Kt(Bt({},ti)),Ug=(function(){const e={};return or(ti,t=>{e[t]=Zt(new RegExp("</"+t+"(?=[\\t\\n\\f\\r />])","i"))}),Kt(e)})(),Gg=function(){return typeof window>"u"?null:window},Kg=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let a=null;const s="data-tt-policy-suffix";r&&r.hasAttribute(s)&&(a=r.getAttribute(s));const l="dompurify"+(a?"#"+a:"");try{return t.createPolicy(l,{createHTML(i){return i},createScriptURL(i){return i}})}catch{return console.warn("TrustedTypes policy "+l+" could not be created."),null}},ni=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Xn=function(t,r,a,s){return pn(t,r)&&_r(t[r])?Bt(s.base?yn(s.base):{},t[r],s.transform):a},_o=function(t,r,a){const s=pn(t,r)?t[r]:void 0;return s&&typeof s=="object"?yn(s):a()};function ri(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Gg();const t=ge=>ri(ge);if(t.version="3.4.14",t.removed=[],!e||!e.document||e.document.nodeType!==vn.document||!e.Element)return t.isSupported=!1,t;let r=e.document;const a=r,s=a.currentScript;e.DocumentFragment;const l=e.HTMLTemplateElement,i=e.Node,u=e.Element,c=e.NodeFilter,p=e.NamedNodeMap;p===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const h=e.DOMParser,d=e.trustedTypes,m=u.prototype,C=En(m,"cloneNode"),x=En(m,"remove"),g=En(m,"nextSibling"),y=En(m,"childNodes"),v=En(m,"parentNode"),_=En(m,"shadowRoot"),b=En(m,"attributes"),B=i&&i.prototype?En(i.prototype,"nodeType"):null,N=i&&i.prototype?En(i.prototype,"nodeName"):null,f=i&&i.prototype?En(i.prototype,"ownerDocument"):null,w=function(M){return B?B(M):M.nodeType},k=function(M){return N?N(M):M.nodeName};if(typeof l=="function"){const ge=r.createElement("template");ge.content&&ge.content.ownerDocument&&(r=ge.content.ownerDocument)}let E,A="",D,j=!1,$=0;const H=function(){if($>0)throw sr('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},F=function(M){H(),$++;try{return E.createHTML(M)}finally{$--}},U=function(M){H(),$++;try{return E.createScriptURL(M)}finally{$--}},T=function(){return j||(D=Kg(d,s),j=!0),D},I=r,z=I.implementation,ie=I.createNodeIterator,te=I.createDocumentFragment,P=I.getElementsByTagName,G=a.importNode;let X=ni();t.isSupported=typeof Ol=="function"&&typeof v=="function"&&z&&z.createHTMLDocument!==void 0;const K=$g,L=Lg,R=Rg,S=Pg,V=Fg,ae=Ig,ne=Og,re=Wg;let ue=Jl,Be=null;const le=Bt({},[...Kl,...bo,...yo,...vo,...Yl]);let J=null;const O=Bt({},[...Zl,...xo,...Xl,...va]);let W=Object.seal(xr(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),q=null,oe=null;const ee=Object.seal(xr(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let be=!0,je=!0,De=!1,we=!0,ze=!1,ye=!0,_e=!1,ve=!1,Ee=null,Oe=null,ot=!1,it=!1,Fe=!1,Ue=!1,nt=!0,Te=!1;const Xe="user-content-";let rt=!0,ut=!1,gt={},_t=null;const pt=Bt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Yt=null;const kt=Bt({},["audio","video","img","source","image","track"]);let ct=null;const Ae=Bt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),st="http://www.w3.org/1998/Math/MathML",ft="http://www.w3.org/2000/svg",Ct="http://www.w3.org/1999/xhtml";let Nt=Ct,Ft=!1,yt=null;const vt=Bt({},[st,ft,Ct],go),Et=Kt(["mi","mo","mn","ms","mtext"]);let It=Bt({},Et);const Je=Kt(["annotation-xml"]);let At=Bt({},Je);const Qe=Bt({},["title","style","font","a","script"]);let he=null;const Le=["application/xhtml+xml","text/html"],Pe="text/html";let We=null,dt=null;const on=r.createElement("form"),ht=function(M){return M instanceof RegExp||M instanceof Function},Ke=function(){let M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(dt&&dt===M)return;(!M||typeof M!="object")&&(M={}),M=yn(M),he=Le.indexOf(M.PARSER_MEDIA_TYPE)===-1?Pe:M.PARSER_MEDIA_TYPE,We=he==="application/xhtml+xml"?go:zr,Be=Xn(M,"ALLOWED_TAGS",le,{transform:We}),J=Xn(M,"ALLOWED_ATTR",O,{transform:We}),yt=Xn(M,"ALLOWED_NAMESPACES",vt,{transform:go}),ct=Xn(M,"ADD_URI_SAFE_ATTR",Ae,{transform:We,base:Ae}),Yt=Xn(M,"ADD_DATA_URI_TAGS",kt,{transform:We,base:kt}),_t=Xn(M,"FORBID_CONTENTS",pt,{transform:We}),q=Xn(M,"FORBID_TAGS",yn({}),{transform:We}),oe=Xn(M,"FORBID_ATTR",yn({}),{transform:We}),gt=pn(M,"USE_PROFILES")?M.USE_PROFILES&&typeof M.USE_PROFILES=="object"?yn(M.USE_PROFILES):M.USE_PROFILES:!1,be=M.ALLOW_ARIA_ATTR!==!1,je=M.ALLOW_DATA_ATTR!==!1,De=M.ALLOW_UNKNOWN_PROTOCOLS||!1,we=M.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ze=M.SAFE_FOR_TEMPLATES||!1,ye=M.SAFE_FOR_XML!==!1,_e=M.WHOLE_DOCUMENT||!1,it=M.RETURN_DOM||!1,Fe=M.RETURN_DOM_FRAGMENT||!1,Ue=M.RETURN_TRUSTED_TYPE||!1,ot=M.FORCE_BODY||!1,nt=M.SANITIZE_DOM!==!1,Te=M.SANITIZE_NAMED_PROPS||!1,rt=M.KEEP_CONTENT!==!1,ut=M.IN_PLACE||!1,ue=Sg(M.ALLOWED_URI_REGEXP)?M.ALLOWED_URI_REGEXP:Jl,Nt=typeof M.NAMESPACE=="string"?M.NAMESPACE:Ct,It=_o(M,"MATHML_TEXT_INTEGRATION_POINTS",()=>Bt({},Et)),At=_o(M,"HTML_INTEGRATION_POINTS",()=>Bt({},Je));const Z=_o(M,"CUSTOM_ELEMENT_HANDLING",()=>xr(null));if(W=xr(null),pn(Z,"tagNameCheck")&&ht(Z.tagNameCheck)&&(W.tagNameCheck=Z.tagNameCheck),pn(Z,"attributeNameCheck")&&ht(Z.attributeNameCheck)&&(W.attributeNameCheck=Z.attributeNameCheck),pn(Z,"allowCustomizedBuiltInElements")&&typeof Z.allowCustomizedBuiltInElements=="boolean"&&(W.allowCustomizedBuiltInElements=Z.allowCustomizedBuiltInElements),Zt(W),ze&&(je=!1),Fe&&(it=!0),gt&&(Be=Bt({},Yl),J=xr(null),gt.html===!0&&(Bt(Be,Kl),Bt(J,Zl)),gt.svg===!0&&(Bt(Be,bo),Bt(J,xo),Bt(J,va)),gt.svgFilters===!0&&(Bt(Be,yo),Bt(J,xo),Bt(J,va)),gt.mathMl===!0&&(Bt(Be,vo),Bt(J,Xl),Bt(J,va))),ee.tagCheck=null,ee.attributeCheck=null,pn(M,"ADD_TAGS")&&(typeof M.ADD_TAGS=="function"?ee.tagCheck=M.ADD_TAGS:_r(M.ADD_TAGS)&&(Be===le&&(Be=yn(Be)),Bt(Be,M.ADD_TAGS,We))),pn(M,"ADD_ATTR")&&(typeof M.ADD_ATTR=="function"?ee.attributeCheck=M.ADD_ATTR:_r(M.ADD_ATTR)&&(J===O&&(J=yn(J)),Bt(J,M.ADD_ATTR,We))),pn(M,"ADD_FORBID_CONTENTS")&&_r(M.ADD_FORBID_CONTENTS)&&(_t===pt&&(_t=yn(_t)),Bt(_t,M.ADD_FORBID_CONTENTS,We)),rt&&(Be["#text"]=!0),_e&&Bt(Be,["html","head","body"]),Be.table&&(Bt(Be,["tbody"]),delete q.tbody),M.TRUSTED_TYPES_POLICY){if(typeof M.TRUSTED_TYPES_POLICY.createHTML!="function")throw sr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof M.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw sr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const Ce=E;E=M.TRUSTED_TYPES_POLICY;try{A=F("")}catch(Re){throw E=Ce,Re}}else M.TRUSTED_TYPES_POLICY===null?(E=void 0,A=""):(E===void 0&&(E=T()),E&&typeof A=="string"&&(A=F("")));Kt&&Kt(M),dt=M},xt=Bt({},[...bo,...yo,...Tg]),jt=Bt({},[...vo,...Mg]),Q=function(M,Z,Ce){return Z.namespaceURI===Ct?M==="svg":Z.namespaceURI===st?M==="svg"&&(Ce==="annotation-xml"||It[Ce]):!!xt[M]},fe=function(M,Z,Ce){return Z.namespaceURI===Ct?M==="math":Z.namespaceURI===ft?M==="math"&&At[Ce]:!!jt[M]},Ge=function(M,Z,Ce){return Z.namespaceURI===ft&&!At[Ce]||Z.namespaceURI===st&&!It[Ce]?!1:!jt[M]&&(Qe[M]||!xt[M])},Ye=function(M){let Z=v(M);(!Z||!Z.tagName)&&(Z={namespaceURI:Nt,tagName:"template"});const Ce=zr(M.tagName),Re=zr(Z.tagName);return yt[M.namespaceURI]?M.namespaceURI===ft?Q(Ce,Z,Re):M.namespaceURI===st?fe(Ce,Z,Re):M.namespaceURI===Ct?Ge(Ce,Z,Re):!!(he==="application/xhtml+xml"&&yt[M.namespaceURI]):!1},at=function(M){Or(t.removed,{element:M});try{v(M).removeChild(M)}catch{if(x(M),!v(M))throw sr("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},mt=function(M,Z,Ce){try{M.removeAttributeNode(Z)}catch{try{M.removeAttribute(Ce)}catch{}}},Mt=function(M){Xt(M);const Z=y(M);if(Z){const Re=[];or(Z,qe=>{Or(Re,qe)}),or(Re,qe=>{try{x(qe)}catch{}})}const Ce=b(M);if(Ce)for(let Re=Ce.length-1;Re>=0;--Re){const qe=Ce[Re],tt=qe&&qe.name;typeof tt=="string"&&mt(M,qe,tt)}},Ot=function(M,Z,Ce){if(!Ce)try{Ce=Z.getAttributeNode(M)}catch{Ce=null}Or(t.removed,{attribute:Ce||null,from:Z});try{Ce?Z.removeAttributeNode(Ce):Z.removeAttribute(M)}catch{try{Z.removeAttribute(M)}catch{}}if(M==="is")if(it||Fe)try{at(Z)}catch{}else try{Z.setAttribute(M,"")}catch{}},Tn=function(M){const Z=b(M);if(Z)for(let Ce=Z.length-1;Ce>=0;--Ce){const Re=Z[Ce],qe=Re&&Re.name;typeof qe!="string"||J[We(qe)]||mt(M,Re,qe)}},Xt=function(M){const Z=[M];for(;Z.length>0;){const Ce=Z.pop();w(Ce)===vn.element&&Tn(Ce);const qe=y(Ce);if(qe)for(let tt=qe.length-1;tt>=0;--tt)Z.push(qe[tt])}},Mn=function(M,Z){return ye?M==="patchsrc"?!0:M==="for"&&Z!=="label"&&Z!=="output":!1},dn=function(M){if(!ye)return;const Z=[M];for(;Z.length>0;){const Ce=Z.pop(),Re=w(Ce);if(Re===vn.processingInstruction||Re===vn.comment&&an(ei,Ce.data)){try{x(Ce)}catch{}continue}if(Re===vn.element){const tt=Ce,St=We(k(Ce));try{tt.hasAttribute&&tt.hasAttribute("patchsrc")&&tt.removeAttribute("patchsrc"),tt.hasAttribute&&tt.hasAttribute("for")&&Mn("for",St)&&tt.removeAttribute("for")}catch{}}const qe=y(Ce);if(qe)for(let tt=qe.length-1;tt>=0;--tt)Z.push(qe[tt])}},Jt=function(M){let Z=null,Ce=null;if(ot)M="<remove></remove>"+M;else{const tt=Vl(M,/^[\r\n\t ]+/);Ce=tt&&tt[0]}he==="application/xhtml+xml"&&Nt===Ct&&(M='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+M+"</body></html>");const Re=E?F(M):M;if(Nt===Ct)try{Z=new h().parseFromString(Re,he)}catch{}if(!Z||!Z.documentElement){Z=z.createDocument(Nt,"template",null);try{Z.documentElement.innerHTML=Ft?A:Re}catch{}}const qe=Z.body||Z.documentElement;return M&&Ce&&qe.insertBefore(r.createTextNode(Ce),qe.childNodes[0]||null),Nt===Ct?P.call(Z,_e?"html":"body")[0]:_e?Z.documentElement:qe},en=function(M){const Z=f?f(M):M.ownerDocument;return ie.call(Z||M,M,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},gn=function(M){return M=Wr(M,K," "),M=Wr(M,L," "),M=Wr(M,R," "),M},tn=function(M){var Z;M.normalize();const Ce=f?f(M):M.ownerDocument,Re=ie.call(Ce||M,M,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null);let qe=Re.nextNode();for(;qe;)qe.data=gn(qe.data),qe=Re.nextNode();const tt=(Z=M.querySelectorAll)===null||Z===void 0?void 0:Z.call(M,"template");tt&&or(tt,St=>{Dt(St.content)&&tn(St.content)})},Rt=function(M){const Z=N?N(M):null;return typeof Z!="string"||We(Z)!=="form"?!1:typeof M.nodeName!="string"||typeof M.textContent!="string"||typeof M.removeChild!="function"||M.attributes!==b(M)||typeof M.removeAttribute!="function"||typeof M.setAttribute!="function"||typeof M.namespaceURI!="string"||typeof M.insertBefore!="function"||typeof M.hasChildNodes!="function"||M.nodeType!==B(M)||M.childNodes!==y(M)},Dt=function(M){if(!B||typeof M!="object"||M===null)return!1;try{return B(M)===vn.documentFragment}catch{return!1}},Ut=function(M){if(!B||typeof M!="object"||M===null)return!1;try{return typeof B(M)=="number"}catch{return!1}};function zt(ge,M,Z){ge.length!==0&&or(ge,Ce=>{Ce.call(t,M,Z,dt)})}const $n=function(M,Z){return!!(ye&&M.hasChildNodes()&&!Ut(M.firstElementChild)&&an(Ql,M.textContent)&&an(Ql,M.innerHTML)||ye&&M.namespaceURI===Ct&&qg[Z]&&(Ut(M.firstElementChild)||typeof M.textContent=="string"&&an(Ug[Z],M.textContent))||M.nodeType===vn.processingInstruction||ye&&M.nodeType===vn.comment&&an(ei,M.data))},Ln=function(M,Z){if(M instanceof RegExp)return an(M,Z);if(M instanceof Function){for(var Ce=arguments.length,Re=new Array(Ce>2?Ce-2:0),qe=2;qe<Ce;qe++)Re[qe-2]=arguments[qe];return!!M(Z,...Re)}return!1},Fn=function(M,Z,Ce){if(!q[Z]&&ke(Z)&&Ln(W.tagNameCheck,Z))return!1;if(rt&&!_t[Z]){const Re=v(M),qe=y(M);if(qe&&Re){const tt=qe.length;for(let St=tt-1;St>=0;--St){const $t=M===Ce?C(qe[St],!0):qe[St];Re.insertBefore($t,g(M))}}}return at(M),!0},pe=function(M,Z,Ce,Re){return M.length===0?Z:Z===Ce||Z===Re?yn(Z):Z},Se=function(M,Z){return M===Z||v(M)!==null?!1:(ut&&Xt(M),!0)},He=function(M,Z){if(zt(X.beforeSanitizeElements,M,null),Se(M,Z))return!0;if(Rt(M))return at(M),!0;const Ce=We(k(M));if(Be=pe(X.uponSanitizeElement,Be,le,Ee),zt(X.uponSanitizeElement,M,{tagName:Ce,allowedTags:Be}),Se(M,Z))return!0;if($n(M,Ce))return at(M),!0;if(q[Ce]||!(ee.tagCheck instanceof Function&&ee.tagCheck(Ce))&&!Be[Ce]){const qe=Fn(M,Ce,Z);return qe===!1&&zt(X.afterSanitizeElements,M,null),qe}if(w(M)===vn.element&&!Ye(M)||(Ce==="noscript"||Ce==="noembed"||Ce==="noframes")&&an(Hg,M.innerHTML))return at(M),!0;if(ze&&M.nodeType===vn.text){const qe=gn(M.textContent);M.textContent!==qe&&(Or(t.removed,{element:M.cloneNode()}),M.textContent=qe)}return zt(X.afterSanitizeElements,M,null),!1},Y=function(M,Z,Ce){if(oe[Z]||Mn(Z,M)||nt&&(Z==="id"||Z==="name")&&(Ce in r||Ce in on))return!1;const Re=J[Z]||ee.attributeCheck instanceof Function&&ee.attributeCheck(Z,M);return je&&an(S,Z)||be&&an(V,Z)?!0:Re?ct[Z]||an(ue,Wr(Ce,ne,""))||(Z==="src"||Z==="xlink:href"||Z==="href")&&M!=="script"&&ql(Ce,"data:")===0&&Yt[M]||De&&!an(ae,Wr(Ce,ne,""))?!0:!Ce:ke(M)&&Ln(W.tagNameCheck,M)&&Ln(W.attributeNameCheck,Z,M)||Z==="is"&&W.allowCustomizedBuiltInElements&&Ln(W.tagNameCheck,Ce)},de=Bt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),ke=function(M){return!de[zr(M)]&&an(re,M)},$e=function(M,Z,Ce,Re){if(E&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!Ce)switch(d.getAttributeType(M,Z)){case"TrustedHTML":return F(Re);case"TrustedScriptURL":return U(Re)}return Re},Ve=function(M,Z,Ce,Re){try{Ce?M.setAttributeNS(Ce,Z,Re):M.setAttribute(Z,Re),Rt(M)?at(M):Hl(t.removed)}catch{Ot(Z,M)}},Ze=function(M){zt(X.beforeSanitizeAttributes,M,null);const Z=M.attributes;if(!Z||Rt(M))return;J=pe(X.uponSanitizeAttribute,J,O,Oe);const Ce={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:J,forceKeepAttr:void 0};let Re=Z.length;const qe=We(M.nodeName);for(;Re--;){const tt=Z[Re],St=tt.name,$t=tt.namespaceURI,nn=tt.value,rn=We(St),Ir=nn;let Me=St==="value"?Ir:kg(Ir);if(Ce.attrName=rn,Ce.attrValue=Me,Ce.keepAttr=!0,Ce.forceKeepAttr=void 0,zt(X.uponSanitizeAttribute,M,Ce),Me=Ce.attrValue,Te&&(rn==="id"||rn==="name")&&ql(Me,Xe)!==0&&(Ot(St,M,tt),Me=Xe+Me),ye&&an(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Me)){Ot(St,M,tt);continue}if(rn==="attributename"&&Vl(Me,"href")){Ot(St,M,tt);continue}if(!Ce.forceKeepAttr){if(!Ce.keepAttr){Ot(St,M,tt);continue}if(!we&&an(Vg,Me)){Ot(St,M,tt);continue}if(ze&&(Me=gn(Me)),!Y(qe,rn,Me)){Ot(St,M,tt);continue}Me=$e(qe,rn,$t,Me),Me!==Ir&&Ve(M,St,$t,Me)}}zt(X.afterSanitizeAttributes,M,null)},wt=function(M){let Z=null;const Ce=en(M);for(zt(X.beforeSanitizeShadowDOM,M,null);Z=Ce.nextNode();)if(zt(X.uponSanitizeShadowNode,Z,null),He(Z,M),Ze(Z),Dt(Z.content)&&wt(Z.content),w(Z)===vn.element){const Re=_(Z);Dt(Re)&&(bt(Re),wt(Re))}zt(X.afterSanitizeShadowDOM,M,null)},bt=function(M){const Z=[{node:M,shadow:null}];for(;Z.length>0;){const Ce=Z.pop();if(Ce.shadow){wt(Ce.shadow);continue}const Re=Ce.node,tt=w(Re)===vn.element,St=y(Re);if(St)for(let $t=St.length-1;$t>=0;--$t)Z.push({node:St[$t],shadow:null});if(tt){const $t=N?N(Re):null;if(typeof $t=="string"&&We($t)==="template"){const nn=Re.content;Dt(nn)&&Z.push({node:nn,shadow:null})}}if(tt){const $t=_(Re);Dt($t)&&Z.push({node:null,shadow:$t},{node:$t,shadow:null})}}};return t.sanitize=function(ge){let M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Z=null,Ce=null,Re=null,qe=null;if(Ft=!ge,Ft&&(ge="<!-->"),typeof ge!="string"&&!Ut(ge)&&(ge=Dg(ge),typeof ge!="string"))throw sr("dirty is not a string, aborting");if(!t.isSupported)return ge;ve?(Be=Ee,J=Oe):Ke(M),(X.uponSanitizeElement.length>0||X.uponSanitizeAttribute.length>0)&&(Be=yn(Be)),X.uponSanitizeAttribute.length>0&&(J=yn(J)),t.removed=[];const tt=ut&&typeof ge!="string"&&Ut(ge);if(tt){dn(ge);const nn=k(ge);if(typeof nn=="string"){const rn=We(nn);if(!Be[rn]||q[rn])throw Mt(ge),sr("root node is forbidden and cannot be sanitized in-place")}if(Rt(ge))throw Mt(ge),sr("root node is clobbered and cannot be sanitized in-place");try{bt(ge)}catch(rn){throw Mt(ge),rn}}else if(Ut(ge))Z=Jt("<!---->"),Ce=Z.ownerDocument.importNode(ge,!0),Ce.nodeType===vn.element&&Ce.nodeName==="BODY"||Ce.nodeName==="HTML"?Z=Ce:Z.appendChild(Ce),bt(Ce);else{if(!it&&!ze&&!_e&&ge.indexOf("<")===-1)return E&&Ue?F(ge):ge;if(Z=Jt(ge),!Z)return it?null:Ue?A:""}Z&&ot&&at(Z.firstChild);const St=tt?ge:Z;try{const nn=en(St);for(;Re=nn.nextNode();)He(Re,St),Ze(Re),Dt(Re.content)&&wt(Re.content)}catch(nn){throw tt&&(Mt(ge),or(t.removed,rn=>{rn.element&&Xt(rn.element)})),nn}if(tt)return or(t.removed,nn=>{nn.element&&Xt(nn.element)}),ze&&tn(ge),ge;if(it){if(ze&&tn(Z),Fe)for(qe=te.call(Z.ownerDocument);Z.firstChild;)qe.appendChild(Z.firstChild);else qe=Z;return(J.shadowroot||J.shadowrootmode)&&(qe=G.call(a,qe,!0)),qe}let $t=_e?Z.outerHTML:Z.innerHTML;return _e&&Be["!doctype"]&&Z.ownerDocument&&Z.ownerDocument.doctype&&Z.ownerDocument.doctype.name&&an(zg,Z.ownerDocument.doctype.name)&&($t="<!DOCTYPE "+Z.ownerDocument.doctype.name+`>
818
- `+$t),ze&&($t=gn($t)),E&&Ue?F($t):$t},t.setConfig=function(){let ge=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ke(ge),ve=!0,Ee=Be,Oe=J},t.clearConfig=function(){dt=null,ve=!1,Ee=null,Oe=null,E=D,A=""},t.isValidAttribute=function(ge,M,Z){dt||Ke({});const Ce=We(ge),Re=We(M);return Y(Ce,Re,Z)},t.addHook=function(ge,M){typeof M=="function"&&pn(X,ge)&&Or(X[ge],M)},t.removeHook=function(ge,M){if(pn(X,ge)){if(M!==void 0){const Z=wg(X[ge],M);return Z===-1?void 0:Bg(X[ge],Z,1)[0]}return Hl(X[ge])}},t.removeHooks=function(ge){pn(X,ge)&&(X[ge]=[])},t.removeAllHooks=function(){X=ni()},t}var wr=ri();let wo=null;const Yg=1500;function Bo(){wo?.clear(),wo=null}function Zg(e,{onEnd:t,rate:r=.9}={}){if(typeof window>"u"||typeof SpeechSynthesisUtterance>"u"||!("speechSynthesis"in window)){t?.();return}const a=window.speechSynthesis;Bo();let s=!1;const l=()=>{if(!s){s=!0;try{t?.()}catch{}}};try{a.cancel()}catch{l();return}const i=()=>{Bo();try{a.cancel();const p=new SpeechSynthesisUtterance(e),h=a.getVoices().find(d=>d.lang.startsWith("ko"));h&&(p.voice=h),p.rate=r,p.onend=t?l:null,p.onerror=t?l:null,a.speak(p)}catch{l()}};let u;try{u=a.getVoices()}catch{l();return}if(u.length>0){i();return}const c=setTimeout(i,Yg);try{a.addEventListener("voiceschanged",i,{once:!0})}catch{clearTimeout(c),l();return}wo={clear:()=>{clearTimeout(c),a.removeEventListener("voiceschanged",i)}}}function ko(){Bo(),typeof window<"u"&&"speechSynthesis"in window&&window.speechSynthesis.cancel()}const Xg=/^(?:[a-z]+:)?\/\//i,Jg="__ihab_core_asset_base_url__";function Qg(){return globalThis[Jg]??""}function Ao(e){const t=String(e||"").trim();if(!t)return"";if(Xg.test(t)||t.startsWith("data:")||t.startsWith("blob:"))return t;const r=t.startsWith("/")?t:`/${t}`,a=Qg();return a?`${a}${r}`:r}const ai="__ihab_core_storage_resolvers__";function Vr(){return globalThis[ai]??null}function eb(e){globalThis[ai]=e}let oi=class extends Error{constructor(t){super(`
817
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bg(e,t){return fg(e)||Cg(e,t)||yg(e,t)||gg()}function yg(e,t){if(e){if(typeof e=="string")return Il(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Il(e,t):void 0}}const Ol=Object.entries,zl=Object.setPrototypeOf,vg=Object.isFrozen,xg=Object.getPrototypeOf,_g=Object.getOwnPropertyDescriptor;let Kt=Object.freeze,Zt=Object.seal,xr=Object.create,Wl=typeof Reflect<"u"&&Reflect,fo=Wl.apply,Co=Wl.construct;Kt||(Kt=function(t){return t}),Zt||(Zt=function(t){return t}),fo||(fo=function(t,r){for(var a=arguments.length,s=new Array(a>2?a-2:0),l=2;l<a;l++)s[l-2]=arguments[l];return t.apply(r,s)}),Co||(Co=function(t){for(var r=arguments.length,a=new Array(r>1?r-1:0),s=1;s<r;s++)a[s-1]=arguments[s];return new t(...a)});const or=Gt(Array.prototype.forEach),wg=Gt(Array.prototype.lastIndexOf),Hl=Gt(Array.prototype.pop),zr=Gt(Array.prototype.push),Bg=Gt(Array.prototype.splice),_r=Array.isArray,Wr=Gt(String.prototype.toLowerCase),go=Gt(String.prototype.toString),Vl=Gt(String.prototype.match),Hr=Gt(String.prototype.replace),ql=Gt(String.prototype.indexOf),kg=Gt(String.prototype.trim),Ag=Gt(Number.prototype.toString),Ng=Gt(Boolean.prototype.toString),Ul=typeof BigInt>"u"?null:Gt(BigInt.prototype.toString),Gl=typeof Symbol>"u"?null:Gt(Symbol.prototype.toString),hn=Gt(Object.prototype.hasOwnProperty),Vr=Gt(Object.prototype.toString),an=Gt(RegExp.prototype.test),sr=Eg(TypeError);function Gt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,a=new Array(r>1?r-1:0),s=1;s<r;s++)a[s-1]=arguments[s];return fo(e,t,a)}}function Eg(e){return function(){for(var t=arguments.length,r=new Array(t),a=0;a<t;a++)r[a]=arguments[a];return Co(e,r)}}function Bt(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Wr;if(zl&&zl(e,null),!_r(t))return e;let a=t.length;for(;a--;){let s=t[a];if(typeof s=="string"){const l=r(s);l!==s&&(vg(t)||(t[a]=l),s=l)}e[s]=!0}return e}function jg(e){for(let t=0;t<e.length;t++)hn(e,t)||(e[t]=null);return e}function yn(e){const t=xr(null);for(const a of Ol(e)){var r=bg(a,2);const s=r[0],l=r[1];hn(e,s)&&(_r(l)?t[s]=jg(l):l&&typeof l=="object"&&l.constructor===Object?t[s]=yn(l):t[s]=l)}return t}function Dg(e){switch(typeof e){case"string":return e;case"number":return Ag(e);case"boolean":return Ng(e);case"bigint":return Ul?Ul(e):"0";case"symbol":return Gl?Gl(e):"Symbol()";case"undefined":return Vr(e);case"function":case"object":{if(e===null)return Vr(e);const t=e,r=En(t,"toString");if(typeof r=="function"){const a=r(t);return typeof a=="string"?a:Vr(a)}return Vr(e)}default:return Vr(e)}}function En(e,t){for(;e!==null;){const a=_g(e,t);if(a){if(a.get)return Gt(a.get);if(typeof a.value=="function")return Gt(a.value)}e=xg(e)}function r(){return null}return r}function Sg(e){try{return an(e,""),!0}catch{return!1}}const Kl=Kt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),bo=Kt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),yo=Kt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Tg=Kt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),vo=Kt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Mg=Kt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Yl=Kt(["#text"]),Zl=Kt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),xo=Kt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Xl=Kt(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),va=Kt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),$g=Zt(/{{[\w\W]*|^[\w\W]*}}/g),Lg=Zt(/<%[\w\W]*|^[\w\W]*%>/g),Rg=Zt(/\${[\w\W]*/g),Pg=Zt(/^data-[\-\w.\u00B7-\uFFFF]+$/),Fg=Zt(/^aria-[\-\w]+$/),Jl=Zt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Ig=Zt(/^(?:\w+script|data):/i),Og=Zt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),zg=Zt(/^html$/i),Wg=Zt(/^[a-z][.\w]*(-[.\w]+)+$/i),Ql=Zt(/<[/\w!]/g),ei=Zt(/<[/\w]/g),Hg=Zt(/<\/no(script|embed|frames)/i),Vg=Zt(/\/>/i),vn={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},ti=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],qg=Kt(Bt({},ti)),Ug=(function(){const e={};return or(ti,t=>{e[t]=Zt(new RegExp("</"+t+"(?=[\\t\\n\\f\\r />])","i"))}),Kt(e)})(),Gg=function(){return typeof window>"u"?null:window},Kg=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let a=null;const s="data-tt-policy-suffix";r&&r.hasAttribute(s)&&(a=r.getAttribute(s));const l="dompurify"+(a?"#"+a:"");try{return t.createPolicy(l,{createHTML(i){return i},createScriptURL(i){return i}})}catch{return console.warn("TrustedTypes policy "+l+" could not be created."),null}},ni=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Xn=function(t,r,a,s){return hn(t,r)&&_r(t[r])?Bt(s.base?yn(s.base):{},t[r],s.transform):a},_o=function(t,r,a){const s=hn(t,r)?t[r]:void 0;return s&&typeof s=="object"?yn(s):a()};function ri(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Gg();const t=ge=>ri(ge);if(t.version="3.4.14",t.removed=[],!e||!e.document||e.document.nodeType!==vn.document||!e.Element)return t.isSupported=!1,t;let r=e.document;const a=r,s=a.currentScript;e.DocumentFragment;const l=e.HTMLTemplateElement,i=e.Node,u=e.Element,c=e.NodeFilter,p=e.NamedNodeMap;p===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const h=e.DOMParser,d=e.trustedTypes,m=u.prototype,C=En(m,"cloneNode"),x=En(m,"remove"),g=En(m,"nextSibling"),y=En(m,"childNodes"),v=En(m,"parentNode"),_=En(m,"shadowRoot"),b=En(m,"attributes"),B=i&&i.prototype?En(i.prototype,"nodeType"):null,N=i&&i.prototype?En(i.prototype,"nodeName"):null,f=i&&i.prototype?En(i.prototype,"ownerDocument"):null,w=function(M){return B?B(M):M.nodeType},k=function(M){return N?N(M):M.nodeName};if(typeof l=="function"){const ge=r.createElement("template");ge.content&&ge.content.ownerDocument&&(r=ge.content.ownerDocument)}let E,A="",D,j=!1,$=0;const H=function(){if($>0)throw sr('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},F=function(M){H(),$++;try{return E.createHTML(M)}finally{$--}},U=function(M){H(),$++;try{return E.createScriptURL(M)}finally{$--}},T=function(){return j||(D=Kg(d,s),j=!0),D},I=r,z=I.implementation,ie=I.createNodeIterator,te=I.createDocumentFragment,P=I.getElementsByTagName,G=a.importNode;let X=ni();t.isSupported=typeof Ol=="function"&&typeof v=="function"&&z&&z.createHTMLDocument!==void 0;const K=$g,L=Lg,R=Rg,S=Pg,V=Fg,ae=Ig,ne=Og,re=Wg;let ue=Jl,Be=null;const le=Bt({},[...Kl,...bo,...yo,...vo,...Yl]);let J=null;const O=Bt({},[...Zl,...xo,...Xl,...va]);let W=Object.seal(xr(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),q=null,oe=null;const ee=Object.seal(xr(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let be=!0,je=!0,De=!1,we=!0,ze=!1,ye=!0,_e=!1,ve=!1,Ee=null,Oe=null,ot=!1,it=!1,Fe=!1,Ue=!1,nt=!0,Te=!1;const Xe="user-content-";let rt=!0,ut=!1,gt={},_t=null;const pt=Bt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Yt=null;const kt=Bt({},["audio","video","img","source","image","track"]);let ct=null;const Ae=Bt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),st="http://www.w3.org/1998/Math/MathML",ft="http://www.w3.org/2000/svg",Ct="http://www.w3.org/1999/xhtml";let Nt=Ct,Ft=!1,yt=null;const vt=Bt({},[st,ft,Ct],go),Et=Kt(["mi","mo","mn","ms","mtext"]);let It=Bt({},Et);const Je=Kt(["annotation-xml"]);let At=Bt({},Je);const Qe=Bt({},["title","style","font","a","script"]);let he=null;const Le=["application/xhtml+xml","text/html"],Pe="text/html";let We=null,dt=null;const on=r.createElement("form"),ht=function(M){return M instanceof RegExp||M instanceof Function},Ke=function(){let M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(dt&&dt===M)return;(!M||typeof M!="object")&&(M={}),M=yn(M),he=Le.indexOf(M.PARSER_MEDIA_TYPE)===-1?Pe:M.PARSER_MEDIA_TYPE,We=he==="application/xhtml+xml"?go:Wr,Be=Xn(M,"ALLOWED_TAGS",le,{transform:We}),J=Xn(M,"ALLOWED_ATTR",O,{transform:We}),yt=Xn(M,"ALLOWED_NAMESPACES",vt,{transform:go}),ct=Xn(M,"ADD_URI_SAFE_ATTR",Ae,{transform:We,base:Ae}),Yt=Xn(M,"ADD_DATA_URI_TAGS",kt,{transform:We,base:kt}),_t=Xn(M,"FORBID_CONTENTS",pt,{transform:We}),q=Xn(M,"FORBID_TAGS",yn({}),{transform:We}),oe=Xn(M,"FORBID_ATTR",yn({}),{transform:We}),gt=hn(M,"USE_PROFILES")?M.USE_PROFILES&&typeof M.USE_PROFILES=="object"?yn(M.USE_PROFILES):M.USE_PROFILES:!1,be=M.ALLOW_ARIA_ATTR!==!1,je=M.ALLOW_DATA_ATTR!==!1,De=M.ALLOW_UNKNOWN_PROTOCOLS||!1,we=M.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ze=M.SAFE_FOR_TEMPLATES||!1,ye=M.SAFE_FOR_XML!==!1,_e=M.WHOLE_DOCUMENT||!1,it=M.RETURN_DOM||!1,Fe=M.RETURN_DOM_FRAGMENT||!1,Ue=M.RETURN_TRUSTED_TYPE||!1,ot=M.FORCE_BODY||!1,nt=M.SANITIZE_DOM!==!1,Te=M.SANITIZE_NAMED_PROPS||!1,rt=M.KEEP_CONTENT!==!1,ut=M.IN_PLACE||!1,ue=Sg(M.ALLOWED_URI_REGEXP)?M.ALLOWED_URI_REGEXP:Jl,Nt=typeof M.NAMESPACE=="string"?M.NAMESPACE:Ct,It=_o(M,"MATHML_TEXT_INTEGRATION_POINTS",()=>Bt({},Et)),At=_o(M,"HTML_INTEGRATION_POINTS",()=>Bt({},Je));const Z=_o(M,"CUSTOM_ELEMENT_HANDLING",()=>xr(null));if(W=xr(null),hn(Z,"tagNameCheck")&&ht(Z.tagNameCheck)&&(W.tagNameCheck=Z.tagNameCheck),hn(Z,"attributeNameCheck")&&ht(Z.attributeNameCheck)&&(W.attributeNameCheck=Z.attributeNameCheck),hn(Z,"allowCustomizedBuiltInElements")&&typeof Z.allowCustomizedBuiltInElements=="boolean"&&(W.allowCustomizedBuiltInElements=Z.allowCustomizedBuiltInElements),Zt(W),ze&&(je=!1),Fe&&(it=!0),gt&&(Be=Bt({},Yl),J=xr(null),gt.html===!0&&(Bt(Be,Kl),Bt(J,Zl)),gt.svg===!0&&(Bt(Be,bo),Bt(J,xo),Bt(J,va)),gt.svgFilters===!0&&(Bt(Be,yo),Bt(J,xo),Bt(J,va)),gt.mathMl===!0&&(Bt(Be,vo),Bt(J,Xl),Bt(J,va))),ee.tagCheck=null,ee.attributeCheck=null,hn(M,"ADD_TAGS")&&(typeof M.ADD_TAGS=="function"?ee.tagCheck=M.ADD_TAGS:_r(M.ADD_TAGS)&&(Be===le&&(Be=yn(Be)),Bt(Be,M.ADD_TAGS,We))),hn(M,"ADD_ATTR")&&(typeof M.ADD_ATTR=="function"?ee.attributeCheck=M.ADD_ATTR:_r(M.ADD_ATTR)&&(J===O&&(J=yn(J)),Bt(J,M.ADD_ATTR,We))),hn(M,"ADD_FORBID_CONTENTS")&&_r(M.ADD_FORBID_CONTENTS)&&(_t===pt&&(_t=yn(_t)),Bt(_t,M.ADD_FORBID_CONTENTS,We)),rt&&(Be["#text"]=!0),_e&&Bt(Be,["html","head","body"]),Be.table&&(Bt(Be,["tbody"]),delete q.tbody),M.TRUSTED_TYPES_POLICY){if(typeof M.TRUSTED_TYPES_POLICY.createHTML!="function")throw sr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof M.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw sr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const Ce=E;E=M.TRUSTED_TYPES_POLICY;try{A=F("")}catch(Re){throw E=Ce,Re}}else M.TRUSTED_TYPES_POLICY===null?(E=void 0,A=""):(E===void 0&&(E=T()),E&&typeof A=="string"&&(A=F("")));Kt&&Kt(M),dt=M},xt=Bt({},[...bo,...yo,...Tg]),jt=Bt({},[...vo,...Mg]),Q=function(M,Z,Ce){return Z.namespaceURI===Ct?M==="svg":Z.namespaceURI===st?M==="svg"&&(Ce==="annotation-xml"||It[Ce]):!!xt[M]},fe=function(M,Z,Ce){return Z.namespaceURI===Ct?M==="math":Z.namespaceURI===ft?M==="math"&&At[Ce]:!!jt[M]},Ge=function(M,Z,Ce){return Z.namespaceURI===ft&&!At[Ce]||Z.namespaceURI===st&&!It[Ce]?!1:!jt[M]&&(Qe[M]||!xt[M])},Ye=function(M){let Z=v(M);(!Z||!Z.tagName)&&(Z={namespaceURI:Nt,tagName:"template"});const Ce=Wr(M.tagName),Re=Wr(Z.tagName);return yt[M.namespaceURI]?M.namespaceURI===ft?Q(Ce,Z,Re):M.namespaceURI===st?fe(Ce,Z,Re):M.namespaceURI===Ct?Ge(Ce,Z,Re):!!(he==="application/xhtml+xml"&&yt[M.namespaceURI]):!1},at=function(M){zr(t.removed,{element:M});try{v(M).removeChild(M)}catch{if(x(M),!v(M))throw sr("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},mt=function(M,Z,Ce){try{M.removeAttributeNode(Z)}catch{try{M.removeAttribute(Ce)}catch{}}},Mt=function(M){Xt(M);const Z=y(M);if(Z){const Re=[];or(Z,qe=>{zr(Re,qe)}),or(Re,qe=>{try{x(qe)}catch{}})}const Ce=b(M);if(Ce)for(let Re=Ce.length-1;Re>=0;--Re){const qe=Ce[Re],tt=qe&&qe.name;typeof tt=="string"&&mt(M,qe,tt)}},Ot=function(M,Z,Ce){if(!Ce)try{Ce=Z.getAttributeNode(M)}catch{Ce=null}zr(t.removed,{attribute:Ce||null,from:Z});try{Ce?Z.removeAttributeNode(Ce):Z.removeAttribute(M)}catch{try{Z.removeAttribute(M)}catch{}}if(M==="is")if(it||Fe)try{at(Z)}catch{}else try{Z.setAttribute(M,"")}catch{}},Tn=function(M){const Z=b(M);if(Z)for(let Ce=Z.length-1;Ce>=0;--Ce){const Re=Z[Ce],qe=Re&&Re.name;typeof qe!="string"||J[We(qe)]||mt(M,Re,qe)}},Xt=function(M){const Z=[M];for(;Z.length>0;){const Ce=Z.pop();w(Ce)===vn.element&&Tn(Ce);const qe=y(Ce);if(qe)for(let tt=qe.length-1;tt>=0;--tt)Z.push(qe[tt])}},Mn=function(M,Z){return ye?M==="patchsrc"?!0:M==="for"&&Z!=="label"&&Z!=="output":!1},pn=function(M){if(!ye)return;const Z=[M];for(;Z.length>0;){const Ce=Z.pop(),Re=w(Ce);if(Re===vn.processingInstruction||Re===vn.comment&&an(ei,Ce.data)){try{x(Ce)}catch{}continue}if(Re===vn.element){const tt=Ce,St=We(k(Ce));try{tt.hasAttribute&&tt.hasAttribute("patchsrc")&&tt.removeAttribute("patchsrc"),tt.hasAttribute&&tt.hasAttribute("for")&&Mn("for",St)&&tt.removeAttribute("for")}catch{}}const qe=y(Ce);if(qe)for(let tt=qe.length-1;tt>=0;--tt)Z.push(qe[tt])}},Jt=function(M){let Z=null,Ce=null;if(ot)M="<remove></remove>"+M;else{const tt=Vl(M,/^[\r\n\t ]+/);Ce=tt&&tt[0]}he==="application/xhtml+xml"&&Nt===Ct&&(M='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+M+"</body></html>");const Re=E?F(M):M;if(Nt===Ct)try{Z=new h().parseFromString(Re,he)}catch{}if(!Z||!Z.documentElement){Z=z.createDocument(Nt,"template",null);try{Z.documentElement.innerHTML=Ft?A:Re}catch{}}const qe=Z.body||Z.documentElement;return M&&Ce&&qe.insertBefore(r.createTextNode(Ce),qe.childNodes[0]||null),Nt===Ct?P.call(Z,_e?"html":"body")[0]:_e?Z.documentElement:qe},en=function(M){const Z=f?f(M):M.ownerDocument;return ie.call(Z||M,M,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},gn=function(M){return M=Hr(M,K," "),M=Hr(M,L," "),M=Hr(M,R," "),M},tn=function(M){var Z;M.normalize();const Ce=f?f(M):M.ownerDocument,Re=ie.call(Ce||M,M,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null);let qe=Re.nextNode();for(;qe;)qe.data=gn(qe.data),qe=Re.nextNode();const tt=(Z=M.querySelectorAll)===null||Z===void 0?void 0:Z.call(M,"template");tt&&or(tt,St=>{Dt(St.content)&&tn(St.content)})},Rt=function(M){const Z=N?N(M):null;return typeof Z!="string"||We(Z)!=="form"?!1:typeof M.nodeName!="string"||typeof M.textContent!="string"||typeof M.removeChild!="function"||M.attributes!==b(M)||typeof M.removeAttribute!="function"||typeof M.setAttribute!="function"||typeof M.namespaceURI!="string"||typeof M.insertBefore!="function"||typeof M.hasChildNodes!="function"||M.nodeType!==B(M)||M.childNodes!==y(M)},Dt=function(M){if(!B||typeof M!="object"||M===null)return!1;try{return B(M)===vn.documentFragment}catch{return!1}},Ut=function(M){if(!B||typeof M!="object"||M===null)return!1;try{return typeof B(M)=="number"}catch{return!1}};function zt(ge,M,Z){ge.length!==0&&or(ge,Ce=>{Ce.call(t,M,Z,dt)})}const $n=function(M,Z){return!!(ye&&M.hasChildNodes()&&!Ut(M.firstElementChild)&&an(Ql,M.textContent)&&an(Ql,M.innerHTML)||ye&&M.namespaceURI===Ct&&qg[Z]&&(Ut(M.firstElementChild)||typeof M.textContent=="string"&&an(Ug[Z],M.textContent))||M.nodeType===vn.processingInstruction||ye&&M.nodeType===vn.comment&&an(ei,M.data))},Ln=function(M,Z){if(M instanceof RegExp)return an(M,Z);if(M instanceof Function){for(var Ce=arguments.length,Re=new Array(Ce>2?Ce-2:0),qe=2;qe<Ce;qe++)Re[qe-2]=arguments[qe];return!!M(Z,...Re)}return!1},Fn=function(M,Z,Ce){if(!q[Z]&&ke(Z)&&Ln(W.tagNameCheck,Z))return!1;if(rt&&!_t[Z]){const Re=v(M),qe=y(M);if(qe&&Re){const tt=qe.length;for(let St=tt-1;St>=0;--St){const $t=M===Ce?C(qe[St],!0):qe[St];Re.insertBefore($t,g(M))}}}return at(M),!0},pe=function(M,Z,Ce,Re){return M.length===0?Z:Z===Ce||Z===Re?yn(Z):Z},Se=function(M,Z){return M===Z||v(M)!==null?!1:(ut&&Xt(M),!0)},He=function(M,Z){if(zt(X.beforeSanitizeElements,M,null),Se(M,Z))return!0;if(Rt(M))return at(M),!0;const Ce=We(k(M));if(Be=pe(X.uponSanitizeElement,Be,le,Ee),zt(X.uponSanitizeElement,M,{tagName:Ce,allowedTags:Be}),Se(M,Z))return!0;if($n(M,Ce))return at(M),!0;if(q[Ce]||!(ee.tagCheck instanceof Function&&ee.tagCheck(Ce))&&!Be[Ce]){const qe=Fn(M,Ce,Z);return qe===!1&&zt(X.afterSanitizeElements,M,null),qe}if(w(M)===vn.element&&!Ye(M)||(Ce==="noscript"||Ce==="noembed"||Ce==="noframes")&&an(Hg,M.innerHTML))return at(M),!0;if(ze&&M.nodeType===vn.text){const qe=gn(M.textContent);M.textContent!==qe&&(zr(t.removed,{element:M.cloneNode()}),M.textContent=qe)}return zt(X.afterSanitizeElements,M,null),!1},Y=function(M,Z,Ce){if(oe[Z]||Mn(Z,M)||nt&&(Z==="id"||Z==="name")&&(Ce in r||Ce in on))return!1;const Re=J[Z]||ee.attributeCheck instanceof Function&&ee.attributeCheck(Z,M);return je&&an(S,Z)||be&&an(V,Z)?!0:Re?ct[Z]||an(ue,Hr(Ce,ne,""))||(Z==="src"||Z==="xlink:href"||Z==="href")&&M!=="script"&&ql(Ce,"data:")===0&&Yt[M]||De&&!an(ae,Hr(Ce,ne,""))?!0:!Ce:ke(M)&&Ln(W.tagNameCheck,M)&&Ln(W.attributeNameCheck,Z,M)||Z==="is"&&W.allowCustomizedBuiltInElements&&Ln(W.tagNameCheck,Ce)},de=Bt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),ke=function(M){return!de[Wr(M)]&&an(re,M)},$e=function(M,Z,Ce,Re){if(E&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!Ce)switch(d.getAttributeType(M,Z)){case"TrustedHTML":return F(Re);case"TrustedScriptURL":return U(Re)}return Re},Ve=function(M,Z,Ce,Re){try{Ce?M.setAttributeNS(Ce,Z,Re):M.setAttribute(Z,Re),Rt(M)?at(M):Hl(t.removed)}catch{Ot(Z,M)}},Ze=function(M){zt(X.beforeSanitizeAttributes,M,null);const Z=M.attributes;if(!Z||Rt(M))return;J=pe(X.uponSanitizeAttribute,J,O,Oe);const Ce={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:J,forceKeepAttr:void 0};let Re=Z.length;const qe=We(M.nodeName);for(;Re--;){const tt=Z[Re],St=tt.name,$t=tt.namespaceURI,nn=tt.value,rn=We(St),Or=nn;let Me=St==="value"?Or:kg(Or);if(Ce.attrName=rn,Ce.attrValue=Me,Ce.keepAttr=!0,Ce.forceKeepAttr=void 0,zt(X.uponSanitizeAttribute,M,Ce),Me=Ce.attrValue,Te&&(rn==="id"||rn==="name")&&ql(Me,Xe)!==0&&(Ot(St,M,tt),Me=Xe+Me),ye&&an(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Me)){Ot(St,M,tt);continue}if(rn==="attributename"&&Vl(Me,"href")){Ot(St,M,tt);continue}if(!Ce.forceKeepAttr){if(!Ce.keepAttr){Ot(St,M,tt);continue}if(!we&&an(Vg,Me)){Ot(St,M,tt);continue}if(ze&&(Me=gn(Me)),!Y(qe,rn,Me)){Ot(St,M,tt);continue}Me=$e(qe,rn,$t,Me),Me!==Or&&Ve(M,St,$t,Me)}}zt(X.afterSanitizeAttributes,M,null)},wt=function(M){let Z=null;const Ce=en(M);for(zt(X.beforeSanitizeShadowDOM,M,null);Z=Ce.nextNode();)if(zt(X.uponSanitizeShadowNode,Z,null),He(Z,M),Ze(Z),Dt(Z.content)&&wt(Z.content),w(Z)===vn.element){const Re=_(Z);Dt(Re)&&(bt(Re),wt(Re))}zt(X.afterSanitizeShadowDOM,M,null)},bt=function(M){const Z=[{node:M,shadow:null}];for(;Z.length>0;){const Ce=Z.pop();if(Ce.shadow){wt(Ce.shadow);continue}const Re=Ce.node,tt=w(Re)===vn.element,St=y(Re);if(St)for(let $t=St.length-1;$t>=0;--$t)Z.push({node:St[$t],shadow:null});if(tt){const $t=N?N(Re):null;if(typeof $t=="string"&&We($t)==="template"){const nn=Re.content;Dt(nn)&&Z.push({node:nn,shadow:null})}}if(tt){const $t=_(Re);Dt($t)&&Z.push({node:null,shadow:$t},{node:$t,shadow:null})}}};return t.sanitize=function(ge){let M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Z=null,Ce=null,Re=null,qe=null;if(Ft=!ge,Ft&&(ge="<!-->"),typeof ge!="string"&&!Ut(ge)&&(ge=Dg(ge),typeof ge!="string"))throw sr("dirty is not a string, aborting");if(!t.isSupported)return ge;ve?(Be=Ee,J=Oe):Ke(M),(X.uponSanitizeElement.length>0||X.uponSanitizeAttribute.length>0)&&(Be=yn(Be)),X.uponSanitizeAttribute.length>0&&(J=yn(J)),t.removed=[];const tt=ut&&typeof ge!="string"&&Ut(ge);if(tt){pn(ge);const nn=k(ge);if(typeof nn=="string"){const rn=We(nn);if(!Be[rn]||q[rn])throw Mt(ge),sr("root node is forbidden and cannot be sanitized in-place")}if(Rt(ge))throw Mt(ge),sr("root node is clobbered and cannot be sanitized in-place");try{bt(ge)}catch(rn){throw Mt(ge),rn}}else if(Ut(ge))Z=Jt("<!---->"),Ce=Z.ownerDocument.importNode(ge,!0),Ce.nodeType===vn.element&&Ce.nodeName==="BODY"||Ce.nodeName==="HTML"?Z=Ce:Z.appendChild(Ce),bt(Ce);else{if(!it&&!ze&&!_e&&ge.indexOf("<")===-1)return E&&Ue?F(ge):ge;if(Z=Jt(ge),!Z)return it?null:Ue?A:""}Z&&ot&&at(Z.firstChild);const St=tt?ge:Z;try{const nn=en(St);for(;Re=nn.nextNode();)He(Re,St),Ze(Re),Dt(Re.content)&&wt(Re.content)}catch(nn){throw tt&&(Mt(ge),or(t.removed,rn=>{rn.element&&Xt(rn.element)})),nn}if(tt)return or(t.removed,nn=>{nn.element&&Xt(nn.element)}),ze&&tn(ge),ge;if(it){if(ze&&tn(Z),Fe)for(qe=te.call(Z.ownerDocument);Z.firstChild;)qe.appendChild(Z.firstChild);else qe=Z;return(J.shadowroot||J.shadowrootmode)&&(qe=G.call(a,qe,!0)),qe}let $t=_e?Z.outerHTML:Z.innerHTML;return _e&&Be["!doctype"]&&Z.ownerDocument&&Z.ownerDocument.doctype&&Z.ownerDocument.doctype.name&&an(zg,Z.ownerDocument.doctype.name)&&($t="<!DOCTYPE "+Z.ownerDocument.doctype.name+`>
818
+ `+$t),ze&&($t=gn($t)),E&&Ue?F($t):$t},t.setConfig=function(){let ge=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ke(ge),ve=!0,Ee=Be,Oe=J},t.clearConfig=function(){dt=null,ve=!1,Ee=null,Oe=null,E=D,A=""},t.isValidAttribute=function(ge,M,Z){dt||Ke({});const Ce=We(ge),Re=We(M);return Y(Ce,Re,Z)},t.addHook=function(ge,M){typeof M=="function"&&hn(X,ge)&&zr(X[ge],M)},t.removeHook=function(ge,M){if(hn(X,ge)){if(M!==void 0){const Z=wg(X[ge],M);return Z===-1?void 0:Bg(X[ge],Z,1)[0]}return Hl(X[ge])}},t.removeHooks=function(ge){hn(X,ge)&&(X[ge]=[])},t.removeAllHooks=function(){X=ni()},t}var wr=ri();let wo=null;const Yg=1500;function Bo(){wo?.clear(),wo=null}function Zg(e,{onEnd:t,rate:r=.9}={}){if(typeof window>"u"||typeof SpeechSynthesisUtterance>"u"||!("speechSynthesis"in window)){t?.();return}const a=window.speechSynthesis;Bo();let s=!1;const l=()=>{if(!s){s=!0;try{t?.()}catch{}}};try{a.cancel()}catch{l();return}const i=()=>{Bo();try{a.cancel();const p=new SpeechSynthesisUtterance(e),h=a.getVoices().find(d=>d.lang.startsWith("ko"));h&&(p.voice=h),p.rate=r,p.onend=t?l:null,p.onerror=t?l:null,a.speak(p)}catch{l()}};let u;try{u=a.getVoices()}catch{l();return}if(u.length>0){i();return}const c=setTimeout(i,Yg);try{a.addEventListener("voiceschanged",i,{once:!0})}catch{clearTimeout(c),l();return}wo={clear:()=>{clearTimeout(c),a.removeEventListener("voiceschanged",i)}}}function ko(){Bo(),typeof window<"u"&&"speechSynthesis"in window&&window.speechSynthesis.cancel()}const Xg=/^(?:[a-z]+:)?\/\//i,Jg="__ihab_core_asset_base_url__";function Qg(){return globalThis[Jg]??""}function Ao(e){const t=String(e||"").trim();if(!t)return"";if(Xg.test(t)||t.startsWith("data:")||t.startsWith("blob:"))return t;const r=t.startsWith("/")?t:`/${t}`,a=Qg();return a?`${a}${r}`:r}const ai="__ihab_core_storage_resolvers__";function qr(){return globalThis[ai]??null}function eb(e){globalThis[ai]=e}let oi=class extends Error{constructor(t){super(`
819
819
  [ihabdevteam-core] ${t}() \uD638\uCD9C \uC2E4\uD328 \u2014 configureStorage()\uAC00 \uC124\uC815\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
820
820
 
821
821
  \uC571 \uCD08\uAE30\uD654 \uC2DC\uC810(main.tsx \uB4F1)\uC5D0 \uC544\uB798\uC640 \uAC19\uC774 \uD55C \uBC88 \uD638\uCD9C\uD558\uC138\uC694:
@@ -834,19 +834,19 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
834
834
  \uC124\uCE58 \uBA85\uB839\uC5B4 (\uC2A4\uD1A0\uB9AC\uC9C0 SDK \uBBF8\uC124\uCE58 \uC2DC):
835
835
  npm install @supabase/supabase-js
836
836
  pnpm add @supabase/supabase-js
837
- `),this.name="StorageNotConfiguredError"}};function tb(e){eb(e)}function si(e,t){if(!e)return null;const r=Vr();return r?.resolvePath?r.resolvePath(e,t):t?`${t}/${e}.mp3`:null}async function li(e){if(!e)return null;const t=Vr();if(!t)throw new oi("getSignedOrPublicUrl");try{return await t.resolveUrl(e)}catch{return null}}async function ii(e){const t=Vr();if(!t)throw new oi("downloadSound");return t.download(e)}function nb(){return Vr()?.noiseBaseUrl??"/sounds/noise"}function rb(){const e=Number(Vr()?.noiseFileGain);return Number.isFinite(e)&&e>0?e:1}function ab(e){const t=AbortSignal.timeout;if(typeof t=="function")return t.call(AbortSignal,e);const r=new AbortController;return setTimeout(()=>r.abort(),e),r.signal}function ob(e){return e===400||e===404||e===410}const ui="__ihab_core_tts_config__";function qr(){return globalThis[ui]?.urlResolver??null}function xa(){return globalThis[ui]?.fallbackUrlResolver??null}const sb="__ihab_core_pronunciation_resolver__";function lb(){return globalThis[sb]??null}let Jn=null;const Ur=new WeakMap,No=new WeakMap,Eo=new WeakMap;let ci=!1;const di=e=>Math.max(0,Math.min(1,Number.isFinite(e)?e:0));function ib(){if(ci||typeof document>"u")return;ci=!0;const e=()=>{try{Jn&&Jn.state!=="running"&&Jn.resume()}catch{}};for(const t of["pointerdown","touchend","keydown"])document.addEventListener(t,e,{capture:!0,passive:!0})}function pi(){if(Jn)return Jn;try{const e=window.AudioContext||window.webkitAudioContext;return e?(Jn=new e,ib(),Jn):null}catch{return null}}function jo(){try{Jn?.resume()}catch{}}function Do(e,t){const r=Ur.get(t);if(r)return r;try{const a=e.createMediaElementSource(t),s=e.createGain(),l=e.createAnalyser();l.fftSize=1024,l.smoothingTimeConstant=.6,s.gain.value=di(No.get(t)??t.volume),a.connect(s),s.connect(l),s.connect(e.destination);try{t.volume=1}catch{}const i={gain:s,analyser:l};return Ur.set(t,i),i}catch{return null}}function _a(e){if(!e)return Promise.resolve(null);const t=Ur.get(e);if(t)return Promise.resolve(t.analyser);const r=pi();if(!r)return Promise.resolve(null);if(r.state==="running")return Promise.resolve(Do(r,e)?.analyser??null);const a=Eo.get(e);if(a)return a;const s=Promise.resolve().then(()=>r.resume()).then(()=>r.state==="running"?Do(r,e)?.analyser??null:null).catch(()=>null).finally(()=>{Eo.delete(e)});return Eo.set(e,s),s}function ub(e){if(!e)return null;const t=Ur.get(e);if(t)return t.analyser;const r=pi();return r?r.state==="running"?Do(r,e)?.analyser??null:(_a(e),null):null}function Qn(e,t){const r=di(t);No.set(e,r);const a=Ur.get(e);if(a){try{e.volume!==1&&(e.volume=1)}catch{}const s=a.gain.gain;try{const l=a.gain.context.currentTime;s.cancelScheduledValues(l),s.setTargetAtTime(r,l,.01)}catch{try{s.value=r}catch{}}return"gain"}try{e.volume=r}catch{}return"element"}function wa(e){return No.get(e)??e.volume}function cb(e,t){e.getFloatTimeDomainData(t);let r=0;for(let a=0;a<t.length;a++){const s=t[a];r+=s*s}return Math.sqrt(r/t.length)}const db="__ihab_core_image_config__";function Br(){return globalThis[db]??null}const hi="word_image_existence_map_v1",pb="ihab:image-existence-updated";let Gr=null;function hb(){Gr!==null&&(clearTimeout(Gr),Gr=null),typeof window<"u"&&window.dispatchEvent(new Event(pb))}function mb(){Gr===null&&(Gr=setTimeout(hb,200))}let lr=null,So=0;const Kr=new Map;function fb(){if(lr)return lr;try{const e=typeof localStorage<"u"?localStorage.getItem(hi):null,t=e?JSON.parse(e):null,r={};if(t&&typeof t=="object"&&!Array.isArray(t))for(const[a,s]of Object.entries(t))typeof s=="boolean"&&(r[a]=s);lr=r}catch{lr={}}return lr}let To=null;function Cb(){To===null&&(To=setTimeout(()=>{To=null;try{typeof localStorage<"u"&&lr&&localStorage.setItem(hi,JSON.stringify(lr))}catch{}},200))}function gb(e,t){return`${e}_${t??1}`}async function bb(e,t,r=!1){const a=fb(),s=gb(e,t);if(!r&&s in a)return a[s];if(!r&&Kr.has(s))return Kr.get(s);const l=Br();if(!l)return!1;let i;try{i=l(e,t)}catch{return!1}if(!i)return!1;let u;try{u=fetch(i,{method:"HEAD",signal:ab(8e3)})}catch{return!1}const c=u.then(p=>p.ok?!0:ob(p.status)?!1:null,()=>null).then(p=>Kr.get(s)!==c?p??!1:(Kr.delete(s),p===null?!1:(a[s]=p,So++,Cb(),p)));return Kr.set(s,c),c}async function mi(e,t){const r=So,a=await bb(e,t);return So!==r&&mb(),a}const fi=90;function Ci(e){let t=0;for(const r of e){const a=r.codePointAt(0)??0;r===`
838
- `||r==="\r"?t+=2:t+=a<128?1:2}return t}function yb(e){return Ci(e)>90?"LMS":"SMS"}function gi(e,t=85){const r=Ci(e),a=yb(e),s=a==="SMS"?90:2e3,l=typeof t=="number"?t:null;return{bytes:r,type:a,limit:s,over:r>s,target:l,overTarget:l!==null&&r>l}}const vb=["onset","vowel","coda","glide"],bi="none",xb={\uCD08\uC131:"onset",\uBAA8\uC74C:"vowel",\uC885\uC131:"coda",\uD65C\uC74C:"glide"},_b="\uC5C6\uC74C";function wb(e){return vb.includes(e)}function Bb(e){const t={};for(const[r,a]of Object.entries(e)){const s=wb(r)?r:xb[r];s&&(t[s]=a===_b?bi:a)}return t}const kb={\u314F:{nucleus:"\u314F"},\u3151:{glide:"j",nucleus:"\u314F"},\u3153:{nucleus:"\u3153"},\u3155:{glide:"j",nucleus:"\u3153"},\u3157:{nucleus:"\u3157"},\u315B:{glide:"j",nucleus:"\u3157"},\u315C:{nucleus:"\u315C"},\u3160:{glide:"j",nucleus:"\u315C"},\u3161:{nucleus:"\u3161"},\u3163:{nucleus:"\u3163"},\u3150:{nucleus:"\u3154/\u3150"},\u3152:{glide:"j",nucleus:"\u3154/\u3150"},\u3154:{nucleus:"\u3154/\u3150"},\u3156:{glide:"j",nucleus:"\u3154/\u3150"},\u3158:{glide:"w",nucleus:"\u314F"},\u3159:{glide:"w",nucleus:"\u3154/\u3150"},\u315A:{glide:"w",nucleus:"\u3154/\u3150"},\u315D:{glide:"w",nucleus:"\u3153"},\u315E:{glide:"w",nucleus:"\u3154/\u3150"},\u315F:{glide:"w",nucleus:"\u3163"},\u3162:{glide:"\u0270",nucleus:"\u3163"}},yi=["\u3131","\u3132","\u3134","\u3137","\u3138","\u3139","\u3141","\u3142","\u3143","\u3145","\u3146","\u3147","\u3148","\u3149","\u314A","\u314B","\u314C","\u314D","\u314E"],vi=["\u314F","\u3150","\u3151","\u3152","\u3153","\u3154","\u3155","\u3156","\u3157","\u3158","\u3159","\u315A","\u315B","\u315C","\u315D","\u315E","\u315F","\u3160","\u3161","\u3162","\u3163"],Ab=["","\u3131","\u3132","\u3133","\u3134","\u3135","\u3136","\u3137","\u3139","\u313A","\u313B","\u313C","\u313D","\u313E","\u313F","\u3140","\u3141","\u3142","\u3144","\u3145","\u3146","\u3147","\u3148","\u314A","\u314B","\u314C","\u314D","\u314E"];function Yr(e){if(!e)return null;const t=e.charCodeAt(0)-44032;return t<0||t>=11172?null:{cho:Math.floor(t/588),jung:Math.floor(t%588/28),jong:t%28}}function Nb(e){const t=Yr(e[0]||"");return t?yi[t.cho]:""}function Eb(e){if(!e)return()=>!0;e=e.normalize("NFC");const t=[...e],r=i=>yi.includes(i),a=i=>vi.includes(i),s=t.map(i=>r(i)?"cho":a(i)?"jung":Yr(i)?"syl":"other"),l=t.map(i=>Yr(i));if(s.includes("other")){const i=e.toLowerCase();return u=>u.normalize("NFC").toLowerCase().includes(i)}return i=>{const u=[...i.normalize("NFC")];for(let c=0;c+t.length<=u.length;c++){let p=!0;for(let h=0;h<t.length;h++){const d=u[c+h],m=s[h];if(m==="cho"){if(Nb(d)!==t[h]){p=!1;break}}else if(m==="jung"){const C=Yr(d);if(!C||vi[C.jung]!==t[h]){p=!1;break}}else{const C=l[h];if(C&&C.jong===0){const x=Yr(d);if(!x||x.cho!==C.cho||x.jung!==C.jung){p=!1;break}}else if(d!==t[h]){p=!1;break}}}if(p)return!0}return!1}}const jb={3:["\u3131","\u3145"],5:["\u3134","\u3148"],6:["\u3134","\u314E"],9:["\u3139","\u3131"],10:["\u3139","\u3141"],11:["\u3139","\u3142"],12:["\u3139","\u3145"],13:["\u3139","\u314C"],14:["\u3139","\u314D"],15:["\u3139","\u314E"],18:["\u3142","\u3145"]};Object.fromEntries(Object.entries(jb).map(([e,t])=>[t.join(""),Ab[Number(e)]]));const Db="word_pair_index_v2",Sb="word_pair_index_sig_v2";let Ba=null;function Tb(e){if(e===null||typeof e!="object"||Array.isArray(e))return!1;for(const t of Object.values(e)){if(t===null||typeof t!="object"||Array.isArray(t))return!1;const r=t;for(const a of["cho","jung","jong"])if(!Array.isArray(r[a])||!r[a].every(s=>typeof s=="string"))return!1}return!0}function Mb(){try{if(typeof localStorage>"u")return null;const e=localStorage.getItem(Db),t=localStorage.getItem(Sb);if(!e||!t)return null;const r=JSON.parse(e);return Tb(r)?{index:r,sig:t}:null}catch{return null}}function $b(){if(Ba)return Ba;const e=Mb();return e?(Ba=e.index,e.sig,Ba):null}function Lb(e,t,r){return!(e>0)||!(t>0)?1:Math.max(1,Math.floor((e+r)/(t+r)))}function Rb(e,t){if(!(e>0))return 1;const r=Math.max(1,Math.floor(t));if(e<=r)return e;const a=Math.ceil(e/r);return Math.max(1,Math.ceil(e/a))}const Mo=/[ㄱ-ㅎ]/,Pb=/[ㅏ-ㅣ]/;function xi(e){e=e.normalize("NFC");for(let t=e.length-1;t>=0;t--){const r=e[t],a=r.charCodeAt(0);if(a>=44032&&a<=55203||Mo.test(r)||Pb.test(r))return r}return null}function Fb(e){const t=xi(e);if(!t)return"\uAC00";const r=t.charCodeAt(0);return r>=44032&&r<=55203?(r-44032)%28!==0?"\uC774":"\uAC00":Mo.test(t)?"\uC774":"\uAC00"}function Ib(e){return`${e}${Fb(e)}`}function Ob(e){const t=xi(e);if(!t)return"\uB97C";const r=t.charCodeAt(0);return r>=44032&&r<=55203?(r-44032)%28!==0?"\uC744":"\uB97C":Mo.test(t)?"\uC744":"\uB97C"}function zb(e){return`${e}${Ob(e)}`}function Wb(e,t,r){const a=e.slice(),[s]=a.splice(t,1);return a.splice(r,0,s),a}function Zr(e,t=Math.random){const r=e.slice();for(let a=r.length-1;a>0;a--){const s=Math.floor(t()*(a+1));[r[a],r[s]]=[r[s],r[a]]}return r}const Hb=()=>{const e="\uC54C \uC218 \uC5C6\uB294 \uC624\uB958",t=typeof Pt?.t=="function"?Pt.t("common.unknownError",{defaultValue:e}):void 0;return typeof t=="string"&&t?t:e};function $o(e,t){if(t===void 0&&(t=Hb()),e instanceof Error)return e.message||t;if(typeof e=="string")return e||t;if(e&&typeof e=="object"){const r=e;for(const a of[r.message,r.error_description,r.error])if(typeof a=="string"&&a)return a}return t}const ka=e=>e.split("/").filter(t=>t!=="");function Lo(e){const t=ka(e);return t[t.length-1]??e}function Ro(e){const t=ka(e);return t.length>1?t.slice(0,-1).join("/"):null}const Po=(e,t)=>!!e&&(e===t||e.startsWith(t+"/"));function _i(e){const t=new Set,r=[];for(const a of e){const s=ka(a);for(let l=1;l<=s.length;l+=1){const i=s.slice(0,l).join("/");t.has(i)||(t.add(i),r.push(i))}}return r}function Vb(e,t){return _i(e).filter(r=>Ro(r)===t)}function qb(e){const t=ka(e);return t.map((r,a)=>({path:t.slice(0,a+1).join("/"),label:r}))}function Ub(e){const t=_i(e),r=(a,s)=>t.filter(l=>Ro(l)===a).flatMap(l=>[{path:l,label:Lo(l),depth:s},...r(l,s+1)]);return r(null,0)}const Gb=(e,t)=>Ro(e)!==t&&!(t!==null&&Po(t,e)),Kb="__ihab_core_word_pool__";function wi(){return globalThis[Kb]??null}const Bi=globalThis;function ki(e,t){const r=a=>{};try{const a=t();a&&typeof a.catch=="function"&&a.catch(r)}catch(a){r(a)}}function Yb(e){ki("time",()=>Bi.__ihabTrainingTimeLogger?.(e))}function Zb(e){ki("completion",()=>Bi.__ihabTrainingCompletionLogger?.(e))}const Xb="Asia/Seoul",Jb=/^(\d{4}-\d{2}-\d{2})[T ](\d{2}:\d{2})(?::(\d{2})(?:\.(\d+))?)?$/;function Xr(e){let t;if(e instanceof Date)t=e;else if(typeof e=="string"){const r=e.trim(),a=/^(\d{4}-\d{2}-\d{2})(?:$|[T ])/.exec(r)?.[1];if(a){const l=new Date(`${a}T00:00:00Z`);if(Number.isNaN(l.getTime())||l.toISOString().slice(0,10)!==a)return null}const s=Jb.exec(r);t=new Date(s?`${s[1]}T${s[2]}:${s[3]??"00"}${s[4]?`.${s[4].slice(0,3).padEnd(3,"0")}`:""}+09:00`:r)}else t=new Date(e);return Number.isNaN(t.getTime())?null:t}function Qb(e){return Xr(e)!==null}const ey=e=>Xr(e);function Ai(e,t){const r=t.startsWith("ko")?"ko-KR":"en-US",a=ey(e);return a?a.toLocaleDateString(r,{timeZone:Xb,year:"numeric",month:"short",day:"numeric"}):""}function Fo(e){return e&&e.startsWith("ko")?"ko-KR":e||"en-US"}function ty(e,t,r){return!Number.isFinite(e)||!Number.isFinite(t)||t<1||t>12?`${e}-${t}`:new Intl.DateTimeFormat(Fo(r),{year:"numeric",month:"long"}).format(new Date(e,t-1,1))}function ny(e,t,r){return!Number.isFinite(e)||!Number.isFinite(t)||t<1||t>12?`${e}-${t}`:new Intl.DateTimeFormat(Fo(r),{year:"numeric",month:"short"}).format(new Date(e,t-1,1))}function Ni(e,t,r,a){return e("calendar.yearMonth",{year:r,month:a,defaultValue:""})||ty(r,a,t)}function Jr(){return Io(new Date)}function Aa(e){return e&&/^\d{4}-\d{2}-\d{2}$/.test(e)&&Xr(e)?.toISOString().slice(0,10)===e?e:Jr()}function kr(){return ay(Jr())}const ry=540*60*1e3;function Ei(e,t,r){return new Date(Date.UTC(e,t,r)-ry)}function ay(e){const[t,r,a]=e.split("-").map(Number);return new Date(t,(r||1)-1,a||1)}function Io(e){if(e==null||e==="")return"";const t=Xr(e);return t?new Intl.DateTimeFormat("fr-CA",{timeZone:"Asia/Seoul"}).format(t):""}function ji(e,t){if(!e)return"";const r=Xr(e);if(!r)return"";const a=r.getTime(),s=Math.max(0,Math.floor((Date.now()-a)/1e3)),l=Math.floor(s/60),i=Math.floor(l/60),u=Math.floor(i/24),c=Math.floor(u/7),p=Math.floor(u/30),h=Math.floor(u/365);return l<1?t("store.time.justNow","\uBC29\uAE08 \uC804"):l<60?t("store.time.minutesAgo",{n:l}):i<24?t("store.time.hoursAgo",{n:i}):u<7?t("store.time.daysAgo",{n:u}):c<5?t("store.time.weeksAgo",{n:c}):u<365?t("store.time.monthsAgo",{n:Math.min(p,11)}):t("store.time.yearsAgo",{n:h})}function Di(e,t={}){const{sep:r=".",pad:a=!0,trailingDot:s=!1,fallback:l="\u2014"}=t;if(!e)return l;const i=Io(e instanceof Date?e:String(e));if(!i)return l;const[u,c,p]=i.split("-"),h=a?c:String(Number(c)),d=a?p:String(Number(p));return`${u}${r}${h}${r}${d}${s?".":""}`}function Na(e){if(typeof e=="string"){const t=e.trim();return t&&Qb(t)?t:null}if(e instanceof Date)return Number.isNaN(e.getTime())?null:e.toISOString();if(typeof e=="number"&&Number.isFinite(e)){const t=new Date(e);return Number.isNaN(t.getTime())?null:t.toISOString()}return null}function hn(e){return typeof e=="string"?e.trim()||null:typeof e=="number"?String(e):null}function oy(e){for(const t of["correct","isCorrect","heard","judgement"])if(typeof e[t]=="boolean")return e[t];return e.score===1?!0:e.score===0?!1:null}function sy(e){return Array.isArray(e)?e.map((t,r)=>{const a=t??{};return{index:r,itemId:hn(a.contextCode)??hn(a.itemId)??hn(a.itemCode)??hn(a.id),question:hn(a.question)??hn(a.q)??hn(a.sentence)??hn(a.text)??hn(a.prompt)??hn(a.word)??hn(a.targetSyllable),answer:hn(a.answer),selected:hn(a.selectedText)??hn(a.selected),correct:oy(a),shownAt:Na(a.shownAt)??Na(a.shown_at),answeredAt:Na(a.answeredAt)??Na(a.answered_at)}}):[]}const Oo=globalThis;async function ly(){try{return await Oo.__ihabNoiseSettingsStore?.load()??null}catch{return null}}function zo(e){const t=r=>{};try{const r=Oo.__ihabNoiseSettingsStore?.save(e);r&&typeof r.catch=="function"&&r.catch(t)}catch(r){t(r)}}function Ea(e){try{Oo.__ihabNoiseSettingsStore?.applied?.(e)}catch{}}async function iy(e){if(typeof document<"u"){const t=document.activeElement;let r=null;try{if(r=document.createElement("textarea"),r.value=e,r.setAttribute("readonly",""),r.style.position="fixed",r.style.top="0",r.style.left="0",r.style.opacity="0",r.style.pointerEvents="none",document.body.appendChild(r),r.focus(),r.select(),r.setSelectionRange(0,e.length),document.execCommand("copy"))return!0}catch{}finally{if(r?.parentNode&&r.parentNode.removeChild(r),t&&t!==document.activeElement&&typeof t.focus=="function"&&t.isConnected)try{t.focus({preventScroll:!0})}catch{}}}try{if(typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText=="function")return await navigator.clipboard.writeText(e),!0}catch{}return!1}function Ar(e){if(!e)return e;const t=e.trim();return/^[₩$]/.test(t)?t:/원\s*$/.test(t)?"\u20A9"+t.replace(/\s*원\s*$/,"").trim():t}function Si(e,t){if(!e)return"-";const r=/^(\d{1,2}):(\d{2})$/.exec(e.trim());if(!r)return e;const a=Number(r[1]),s=Number(r[2]),l=r[1].padStart(2,"0");return s===0?t("date.timeH",{h:a,hh:l,mm:r[2]}):t("date.timeHM",{h:a,hh:l,m:s,mm:r[2]})}function Wo(e){return(e??0).toLocaleString("ko-KR")}const uy=[{key:"FOOD",label:"\uC74C\uC2DD",icon:"salad",color:"#FF8A65",subs:[{key:"TRKRFD",label:"\uD55C\uAD6D \uC804\uD1B5\uC74C\uC2DD"},{key:"MDKRFD",label:"\uD55C\uAD6D \uD604\uB300\uC74C\uC2DD"},{key:"WRLDFD",label:"\uC138\uACC4\uC758 \uC74C\uC2DD"},{key:"MTRFRT",label:"\uC2DD\uC7AC\uB8CC\uC640 \uACFC\uC77C"},{key:"GEFDKL",label:"\uC74C\uC2DD \uC0C1\uC2DD"}]},{key:"HLTH",label:"\uAC74\uAC15",icon:"heart",color:"#66BB6A",subs:[{key:"HTETHB",label:"\uAC74\uAC15\uD55C \uC2DD\uC2B5\uAD00"},{key:"DISILL",label:"\uBCD1\uACFC \uC9C8\uD658"},{key:"EXCISE",label:"\uC6B4\uB3D9"},{key:"GEHTKL",label:"\uAC74\uAC15\uC0C1\uC2DD"}]},{key:"WETH",label:"\uB0A0\uC528",icon:"sun-medium",color:"#42A5F5",subs:[{key:"GESSKL",label:"\uACC4\uC808\uC0C1\uC2DD"},{key:"SNWRAN",label:"\uB208\uACFC \uBE44"},{key:"WTHFCT",label:"\uC77C\uAE30\uC608\uBCF4"},{key:"GEWTKL",label:"\uB0A0\uC528\uC0C1\uC2DD"}]},{key:"PRSN",label:"\uC778\uBB3C",icon:"user-round",color:"#AB47BC",subs:[{key:"JODYPS",label:"\uC870\uC120\uC2DC\uB300"},{key:"MDKRPS",label:"\uD55C\uAD6D \uADFC\uD604\uB300"},{key:"THKDPS",label:"\uC0BC\uAD6D\uC2DC\uB300"},{key:"WRLART",label:"\uC138\uACC4\uC758 \uC608\uC220\uAC00"},{key:"WRLPSN",label:"\uC138\uACC4\uC758 \uC778\uBB3C"}]},{key:"KRCT",label:"\uD55C\uAD6D\uBB38\uD654",icon:"bow-arrow",color:"#EC407A",subs:[{key:"KRLANG",label:"\uC6B0\uB9AC\uB9D0"},{key:"TRPLCT",label:"\uC804\uD1B5\uB180\uC774"},{key:"HERITG",label:"\uBB38\uD654\uC7AC"},{key:"EVTFES",label:"\uD589\uC0AC\uC640 \uCD95\uC81C"},{key:"GECTKL",label:"\uC0C1\uC2DD"}]},{key:"STRY",label:"\uC774\uC57C\uAE30",icon:"message-circle",color:"#8D6E63",subs:[{key:"FRYTAL",label:"\uB3D9\uD654"},{key:"AMZING",label:"\uC2E0\uAE30\uD55C \uC774\uC57C\uAE30"},{key:"DAYSTR",label:"\uC77C\uC0C1 \uC18D \uC774\uC57C\uAE30"}]},{key:"LOCA",label:"\uC9C0\uC5ED",icon:"map-pin",color:"#26A69A",subs:[{key:"KRLDMK",label:"\uD55C\uAD6D\uC758 \uBA85\uC18C"},{key:"SELNMK",label:"\uC11C\uC6B8\uC758 \uBA85\uC18C"},{key:"WRDTRB",label:"\uC138\uACC4\uC5EC\uD589"},{key:"NAVIGT",label:"\uAE38 \uCC3E\uAE30"}]},{key:"SOAR",label:"\uC0AC\uD68C\uC640 \uC608\uC220",icon:"landmark",color:"#5C6BC0",subs:[{key:"KRSOCI",label:"\uD55C\uAD6D"},{key:"ECONEW",label:"\uACBD\uC81C\uC640 \uB274\uC2A4"},{key:"GENART",label:"\uC608\uC220"},{key:"GELFKL",label:"\uC0DD\uD65C \uC0C1\uC2DD"}]},{key:"NTSC",label:"\uC790\uC5F0\uACFC \uACFC\uD559",icon:"leaf",color:"#9CCC65",subs:[{key:"ANIMAL",label:"\uB3D9\uBB3C"},{key:"PLANTS",label:"\uC2DD\uBB3C"},{key:"ETHPLT",label:"\uC9C0\uAD6C"},{key:"TOLELC",label:"\uB3C4\uAD6C\uC640 \uC804\uC790\uC81C\uD488"},{key:"GESCKL",label:"\uACFC\uD559\uC0C1\uC2DD"}]},{key:"SPRT",label:"\uC2A4\uD3EC\uCE20",icon:"trophy",color:"#FFCA28",subs:[{key:"INVDSP",label:"\uAC1C\uC778\uACBD\uAE30"},{key:"MARART",label:"\uACA9\uD22C\uAE30"},{key:"TEAMSP",label:"\uB2E8\uCCB4\uACBD\uAE30"},{key:"FOOTBL",label:"\uCD95\uAD6C"},{key:"GESPKL",label:"\uC2A4\uD3EC\uCE20 \uC0C1\uC2DD"}]}],cy=[{key:"LISTEN_IN_NOISE",label:"\uC18C\uC74C \uD558 \uBB38\uC7A5 \uB4E3\uAE30",icon:"audio-lines",desc:"\uC18C\uC74C \uD658\uACBD \uC18D \uBB38\uC7A5 \uC774\uD574 \uD6C8\uB828"},{key:"SHORT_STORY",label:"\uC9E7\uC740 \uC774\uC57C\uAE30 \uB4E3\uAE30",icon:"message-square",desc:"\uC9E7\uC740 \uC774\uC57C\uAE30 + 4\uBB38\uC81C"},{key:"LONG_STORY",label:"\uAE34 \uC774\uC57C\uAE30 \uB4E3\uAE30",icon:"message-square-text",desc:"\uAE34 \uC774\uC57C\uAE30 \uC2EC\uD654 \uD6C8\uB828"},{key:"ORDERING_SENTENCE",label:"\uBB38\uC7A5 \uC21C\uC11C\uD654 \uD558\uAE30",icon:"align-start-vertical",desc:"\uC21C\uC11C \uBC30\uC5F4 \uD6C8\uB828"}];function Ti(){return uy}function dy(){return cy}const py=[],hy=[],my=[],fy=[];function Cy(){return{LISTEN_IN_NOISE:py,SHORT_STORY:hy,LONG_STORY:my,ORDERING_SENTENCE:fy}}const gy=[{key:"LISTEN_IN_NOISE",label:"\uC18C\uC74C \uD558 \uBB38\uC7A5 \uB4E3\uAE30",icon:"audio-lines",desc:"\uB2E4\uC591\uD55C \uC18C\uC74C \uD658\uACBD\uC5D0\uC11C \uBB38\uC7A5 \uCCAD\uB825\uC744 \uD6C8\uB828\uD569\uB2C8\uB2E4."},{key:"SHORT_STORY",label:"\uC9E7\uC740 \uC774\uC57C\uAE30 \uB4E3\uAE30",icon:"message-square",desc:"\uC9E7\uC740 \uC774\uC57C\uAE30\uB97C \uB4E3\uACE0 \uAE30\uC5B5\uD558\uC5EC \uBB38\uC81C\uB97C \uD480\uC5B4\uBD05\uB2C8\uB2E4."},{key:"LONG_STORY",label:"\uAE34 \uC774\uC57C\uAE30 \uB4E3\uAE30",icon:"message-square-text",desc:"\uAE34 \uC774\uC57C\uAE30\uB97C \uB4E3\uACE0 \uAE30\uC5B5\uD558\uC5EC \uB2E4\uC218\uC758 \uBB38\uC81C\uB97C \uD480\uC5B4\uBD05\uB2C8\uB2E4."},{key:"ORDERING_SENTENCE",label:"\uBB38\uC7A5 \uC21C\uC11C\uD654 \uD558\uAE30",icon:"align-start-vertical",desc:"\uC5EC\uB7EC\uAC1C\uC758 \uC9E7\uC740 \uBB38\uC7A5\uC744 \uB4E3\uACE0 \uAE30\uC5B5\uD558\uC5EC \uADF8 \uC21C\uC11C\uC5D0 \uB9DE\uAC8C \uBC30\uC5F4\uD569\uB2C8\uB2E4."}],Mi={LISTEN_IN_NOISE:"listenInNoise",SHORT_STORY:"shortStory",LONG_STORY:"longStory",ORDERING_SENTENCE:"orderingSentence"};function by(e){return gy.map(t=>{const r=Mi[t.key];return r?{...t,label:e(`trainingType.${r}.title`),desc:e(`trainingType.${r}.desc`)}:t})}var yy={statusFilter:"\uC0C1\uD0DC \uD544\uD130",pageSizeSelect:"\uD398\uC774\uC9C0\uB2F9 \uD45C\uC2DC \uAC1C\uC218",selectedCount:"{{count}}\uAC1C \uC120\uD0DD\uB428",selectedOfMax:"\uCD5C\uB300 {{max}}\uAC1C \uC911 {{count}}\uAC1C",cancel:"\uCDE8\uC18C",info:"\uC124\uBA85",errorState:{message:"\uBD88\uB7EC\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.",retry:"\uB2E4\uC2DC \uC2DC\uB3C4"},save:"\uC800\uC7A5",confirm:"\uD655\uC778",discardConfirm:{title:"\uC785\uB825\uC744 \uCDE8\uC18C\uD560\uAE4C\uC694?",body:"\uC800\uC7A5\uD558\uC9C0 \uC54A\uC73C\uBA74 \uC9C0\uAE08\uAE4C\uC9C0 \uC785\uB825\uD55C \uB0B4\uC6A9\uC774 \uC0AC\uB77C\uC9D1\uB2C8\uB2E4.",confirm:"\uC785\uB825 \uCDE8\uC18C"},close:"\uB2EB\uAE30",back:"\uB4A4\uB85C",emptyTrainingName:"\uD6C8\uB828 \uC774\uB984\uC774 \uBE44\uC5B4 \uC788\uC2B5\uB2C8\uB2E4.",remove:"\uC81C\uAC70",image:"\uC774\uBBF8\uC9C0",delete:"\uC0AD\uC81C",reset:"\uCD08\uAE30\uD654",update:"\uC5C5\uB370\uC774\uD2B8",download:"\uB2E4\uC6B4\uB85C\uB4DC",likeCount:"\uC88B\uC544\uC694 {{count}}",downloadCount:"\uAC00\uC838\uAC04 \uC218 {{count}}",descriptionFor:"{{name}} \uC124\uBA85",search:"\uAC80\uC0C9",empty:"\uB370\uC774\uD130\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",yes:"\uC608",no:"\uC544\uB2C8\uC624",all:"\uC804\uCCB4",none:"\uC5C6\uC74C",days:"{{count}}\uC77C",loadMore:"\uB354\uBCF4\uAE30",more:"\uB354\uBCF4\uAE30",moreFor:"{{name}} \uB354\uBCF4\uAE30",collapseFor:"{{name}} \uC811\uAE30",expandFor:"{{name}} \uD3BC\uCE58\uAE30",sortFor:"{{name}} \uC815\uB82C",retry:"\uB2E4\uC2DC \uC2DC\uB3C4",prevPage:"\uC774\uC804 \uD398\uC774\uC9C0",nextPage:"\uB2E4\uC74C \uD398\uC774\uC9C0",play:"\uC7AC\uC0DD",loading:"\uBD88\uB7EC\uC624\uB294 \uC911",playFor:"{{name}} \uC7AC\uC0DD",pauseFor:"{{name}} \uBA48\uCDA4",pause:"\uBA48\uCDA4",playPause:"\uC7AC\uC0DD / \uBA48\uCDA4",replay:"\uB2E4\uC2DC\uB4E3\uAE30",subscription:"\uC774\uC6A9\uAD8C",done:"\uC644\uB8CC",failed:"\uC2E4\uD328",continue:"\uACC4\uC18D",notification:"\uC54C\uB9BC",emptyList:"\uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",noMatches:"\uB9DE\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4",menu:"\uBA54\uB274",resetSelection:"\uC120\uD0DD \uCD08\uAE30\uD654",pageSizeLabel:"{{n}}\uAC1C\uC529 \uBCF4\uAE30",totalCountPrefix:"\uCD1D ",totalCountSuffix:"\uAC1C",expand:"\uD3BC\uCE58\uAE30",collapse:"\uC811\uAE30",popup:"\uD31D\uC5C5",codeBlock:"\uCF54\uB4DC \uBE14\uB85D",totalPrefix:"\uCD1D ",copyCode:"\uCF54\uB4DC \uBCF5\uC0AC",copied:"\uBCF5\uC0AC\uB428",col:{problem:"\uBB38\uC81C"},phonetics:{place:{labial:"\uC591\uC21C\uC74C",alveolar:"\uCE58\uC870\uC74C",palatal:"\uACBD\uAD6C\uAC1C\uC74C",velar:"\uC5F0\uAD6C\uAC1C\uC74C",glottal:"\uC131\uBB38\uC74C"},vowel:{frontHigh:"\uC804\uC124 \uACE0\uBAA8\uC74C",backHighUnrounded:"\uD6C4\uC124 \uACE0\uBAA8\uC74C \uD3C9\uC21C",backHighRounded:"\uD6C4\uC124 \uACE0\uBAA8\uC74C \uC6D0\uC21C",frontMid:"\uC804\uC124 \uC911\uBAA8\uC74C",backMidUnrounded:"\uD6C4\uC124 \uC911\uBAA8\uC74C \uD3C9\uC21C",backMidRounded:"\uD6C4\uC124 \uC911\uBAA8\uC74C \uC6D0\uC21C",low:"\uC800\uBAA8\uC74C"},glide:{j:"j\uD65C\uC74C",w:"w\uD65C\uC74C",velar:"\u0270\uD65C\uC74C"}},unknownError:"\uC54C \uC218 \uC5C6\uB294 \uC624\uB958",networkError:"\uB124\uD2B8\uC6CC\uD06C \uC5F0\uACB0\uC774 \uBD88\uC548\uC815\uD569\uB2C8\uB2E4. \uC5F0\uACB0 \uC0C1\uD0DC\uB97C \uD655\uC778\uD55C \uB4A4 \uB2E4\uC2DC \uC2DC\uB3C4\uD574 \uC8FC\uC138\uC694.",add:"\uCD94\uAC00"},vy={rangeSelect:"\uAE30\uAC04 \uC120\uD0DD",dow:["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"],weekOrdinal:["\uCCAB\uC9F8","\uB458\uC9F8","\uC14B\uC9F8","\uB137\uC9F8","\uB2E4\uC12F\uC9F8","\uC5EC\uC12F\uC9F8","\uC77C\uACF1\uC9F8"],yearMonthCompact:"{{year}}.{{month}}",weekLabel:"{{ord}}\uC8FC",weekLabelCompact:"{{ord}}\uC8FC",prevMonth:"\uC774\uC804 \uB2EC",addOnDate:"{{date}}\uC5D0 \uBC29\uBB38 \uB4F1\uB85D",nextMonth:"\uB2E4\uC74C \uB2EC",prevWeek:"\uC774\uC804 \uC8FC",nextWeek:"\uB2E4\uC74C \uC8FC",legend:{visited:"\uBC29\uBB38",scheduled:"\uC608\uC57D",noVisit:"\uBBF8\uBC29\uBB38"},periodSelect:"\uAE30\uAC04 \uB2E8\uC704",visitCount:"\uBC29\uBB38 {{count}}\uAC74",statusCount:"{{label}} {{count}}\uAC74"},xy={planSuffix:"\uC774\uC6A9\uAD8C",labeledPlan:"{{label}} \uC774\uC6A9\uAD8C",couponCode:"\uC774\uC6A9\uAD8C \uCF54\uB4DC",specialLabel:"\uC624\uD508\uD2B9\uAC00",unitDay:"\uC77C",unitYear:"\uB144",remainingDay:"{{n}}\uC77C \uB0A8\uC74C",remainingHour:"{{n}}\uC2DC\uAC04 \uB0A8\uC74C",remainingMinute:"{{n}}\uBD84 \uB0A8\uC74C",remainingSecond:"{{n}}\uCD08 \uB0A8\uC74C",expired:"\uB9CC\uB8CC\uB428",menu:{use:"\uC0AC\uC6A9\uD558\uAE30",refund:"\uD658\uBD88\uD558\uAE30",delete:"\uC0AD\uC81C\uD558\uAE30"}},_y={starLabel:"{{n}}\uBC88\uC9F8 \uBCC4 \uC120\uD0DD",valueLabel:"{{max}}\uC810 \uB9CC\uC810\uC5D0 {{value}}\uC810",groupLabel:"\uBCC4\uC810"},wy={selected:"\uC120\uD0DD\uB428"},By={placeholder:"\uC120\uD0DD"},ky={collapse:"\uC811\uAE30",expand:"\uD3BC\uCE58\uAE30"},Ay={biArea:"BI \uC601\uC5ED",biSymbol:"BI \uC2EC\uBCFC",logoMalgwi:"\uB9D0\uADC0 \uB85C\uACE0",logoManager:"\uB9D0\uADC0\uB9E4\uB2C8\uC800 \uB85C\uACE0",menuOpen:"\uBA54\uB274 \uC5F4\uAE30",utilMenu:"\uC720\uD2F8\uB9AC\uD2F0 \uBA54\uB274",menuClose:"\uBA54\uB274 \uB2EB\uAE30"},Ny={mainMenu:"\uBA54\uC778 \uBA54\uB274",bottomNav:"\uD558\uB2E8 \uB124\uBE44\uAC8C\uC774\uC158",goToManager:"\uB9D0\uADC0\uB9E4\uB2C8\uC800\uB85C \uC774\uB3D9",goToMalgwi:"\uB9D0\uADC0\uB85C \uC774\uB3D9",modeLabelManager:"\uB9D0\uADC0 \uB9E4\uB2C8\uC800",modeLabelMalgwi:"\uB9D0\uADC0",training:"\uD6C8\uB828",settings:"\uC124\uC815",notifications:"\uC54C\uB9BC",account:"\uACC4\uC815",help:"\uB3C4\uC6C0\uB9D0",feedback:"\uBC84\uADF8\uC2E0\uACE0",debug:"\uB514\uBC84\uADF8",coupons:"\uCFE0\uD3F0",topic:"\uC8FC\uC81C\uBCC4 \uB4E3\uAE30",trainingType:"\uD6C8\uB828\uBCC4 \uB4E3\uAE30",wordPairs:"\uB300\uB9BD\uC30D \uCC3E\uAE30",wordSearch:"\uB2E8\uC5B4 \uCC3E\uAE30",wordTable:"\uB2E8\uC5B4\uD45C \uB9CC\uB4E4\uAE30",company:"\uC5C5\uCCB4\uC815\uBCF4",more:"\uB354\uBCF4\uAE30",moreMenu:"\uB354\uBCF4\uAE30 \uBA54\uB274",badgeLabel:"{{label}}, {{count}}\uAC1C",badgeInsideLabel:"{{label}}, \uC548\uC5D0 \uC54C\uB9BC {{count}}\uAC1C"},Ey={cache:{cleared:"\uCE90\uC2DC\uAC00 \uC0AD\uC81C\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",group:{wordData:{label:"\uB2E8\uC5B4 \uB370\uC774\uD130",sub:"\uB2E8\uC5B4 \uBAA9\uB85D \uBC0F \uBC84\uC804 \uC815\uBCF4"},pairIndex:{label:"\uB2E8\uC5B4\uC30D \uC778\uB371\uC2A4",sub:"\uCD08\uC131\xB7\uC911\uC131\xB7\uC885\uC131 \uB300\uB9BD\uC30D \uBD84\uC11D \uCE90\uC2DC"},imageCache:{label:"\uC774\uBBF8\uC9C0 \uCE90\uC2DC",sub:"\uB2E8\uC5B4\uBCC4 \uC774\uBBF8\uC9C0 \uC874\uC7AC \uC5EC\uBD80 \uD655\uC778 \uACB0\uACFC"}}}},jy={couponButton:"\uCFE0\uD3F0 \uC785\uB825"},Dy={security:{password:{currentRequired:"\uD604\uC7AC \uBE44\uBC00\uBC88\uD638\uB97C \uC785\uB825\uD558\uC138\uC694.",newRequired:"\uC0C8 \uBE44\uBC00\uBC88\uD638\uB97C \uC785\uB825\uD558\uC138\uC694.",mismatch:"\uC0C8 \uBE44\uBC00\uBC88\uD638\uAC00 \uC77C\uCE58\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",changed:"\uBE44\uBC00\uBC88\uD638\uAC00 \uBCC0\uACBD\uB418\uC5C8\uC2B5\uB2C8\uB2E4."}}},Sy={settings:"\uC124\uC815",filter:{random:"\uBB34\uC791\uC704",trainOnset:"\uCD08\uC131",trainVowel:"\uBAA8\uC74C",trainCoda:"\uC885\uC131",phonemeGroup:"\uD6C8\uB828 \uC74C\uC808",noLimit:"\uBB34\uAD00",codaExclude:"\uC81C\uC678",gradeLabel:"\uB09C\uC774\uB3C4",excludeImageInfo:"\uC774\uBBF8\uC9C0 \uC788\uB294 \uB2E8\uC5B4\uB9CC: \uB2E8\uC5B4 \uC911\uC5D0 \uC774\uBBF8\uC9C0\uAC00 \uC788\uB294 \uB2E8\uC5B4\uB9CC \uACB0\uACFC\uC5D0 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4.",sameStructureInfo:"\uC74C\uC18C \uAD6C\uC870 \uAC19\uC740 \uB2E8\uC5B4\uB9CC: \uC815\uB2F5\uACFC \uC624\uB2F5\uC758 \uC74C\uC808 \uAD6C\uC870(\uAE00\uC790 \uC218\xB7\uBC1B\uCE68 \uC720\uBB34 \uB4F1)\uAC00 \uAC19\uC740 \uACB0\uACFC\uB9CC \uB0A8\uACA8\uC694.",selectSection:"\uC120\uD0DD",excludeImage:"\uC774\uBBF8\uC9C0 \uC788\uB294 \uB2E8\uC5B4\uB9CC",sameStructure:"\uC74C\uC18C \uAD6C\uC870 \uAC19\uC740 \uB2E8\uC5B4\uB9CC"},noQuestions:"\uBB38\uC81C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",countQuestions:"{{n}}\uBB38\uC81C",countSentences:"{{n}}\uBB38\uC7A5",nextQuestion:"\uB2E4\uC74C \uBB38\uC81C",noiseRatioTitle:"\uC18C\uC74C \uBE44\uC728",noiseRatioValue:"{{ratio}}\uBC30",noiseTypeTitle:"\uC18C\uC74C \uC885\uB958",playVolumeTitle:"\uC804\uCCB4 \uC18C\uB9AC",playSpeedTitle:"\uC7AC\uC0DD \uC18D\uB3C4",meter:{sentence:"\uC7AC\uC0DD",noise:"\uC18C\uC74C",toggle:"\uC624\uB514\uC624 \uBBF8\uD130 \uD45C\uC2DC"},viewResult:"\uACB0\uACFC\uBCF4\uAE30",problemNotice:"{{n}}\uBC88 \uBB38\uC81C \uC785\uB2C8\uB2E4.",trainingSettingsTitle:"\uD6C8\uB828 \uC124\uC815",sentencePreview:"\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30",notHeard:"\uC548 \uB4E4\uB838\uC5B4\uC694.",heardWell:"\uC798 \uB4E4\uB838\uC5B4\uC694.",confirmTitle:"\uBB38\uC7A5\uC744 \uD655\uC778\uD558\uACE0 \uC798 \uB4E4\uB838\uB294\uC9C0 \uC120\uD0DD\uD558\uC138\uC694.",noSoundWaveform:"\uC18C\uB9AC \uBE44\uAD50 \uBB38\uC81C\uB294 \uC6E8\uC774\uBE0C\uD3FC\uC744 \uD45C\uD604\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",noise:{level:{none:"\uC5C6\uC74C",weak:"\uC57D\uD568",medium:"\uBCF4\uD1B5",strong:"\uAC15\uD568",veryStrong:"\uB9E4\uC6B0 \uAC15\uD568"},type:{none:"\uC5C6\uC74C",default:"\uAE30\uBCF8",street:"\uAE38\uAC70\uB9AC",buzz:"\uC640\uAE00\uC640\uAE00",restaurant:"\uC2DD\uB2F9"}},listenTitle:"\uC81C\uC2DC\uD558\uB294 \uBB38\uC7A5\uC744 \uB4E4\uC5B4\uC8FC\uC138\uC694.",listenButton:"\uBB38\uC7A5 \uB4E3\uAE30",playSound:"\uC18C\uB9AC \uB4E3\uAE30",playSoundFor:"{{name}} \uC18C\uB9AC \uB4E3\uAE30",playAll:"\uBAA8\uB450 \uB4E3\uAE30",selectInOrder:"\uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uCE74\uB4DC\uB97C \uC120\uD0DD\uD558\uC138\uC694.",stop:"\uC815\uC9C0",preview:"\uBBF8\uB9AC \uB4E3\uAE30",previewFor:"{{name}} \uBBF8\uB9AC \uB4E3\uAE30",stopFor:"{{name}} \uC815\uC9C0",next:"\uB2E4\uC74C",completed:"\uD6C8\uB828 \uC644\uB8CC",selected:"\uC120\uD0DD\uB428",nthSelected:"{{n}}\uBC88\uC9F8 \uC120\uD0DD",fontSizeMin:"\uAE00\uC528 \uD06C\uAE30\uAC00 \uCD5C\uC18C\uC785\uB2C8\uB2E4.",fontSizeMax:"\uAE00\uC528 \uD06C\uAE30\uAC00 \uCD5C\uB300\uC785\uB2C8\uB2E4.",fontSizeDecrease:"\uAE00\uC790 \uD06C\uAE30 \uAC10\uC18C",fontSizeIncrease:"\uAE00\uC790 \uD06C\uAE30 \uC99D\uAC00",toggleBackground:"\uBC30\uACBD \uC804\uD658",cardInstructions:"\uB0B1\uB9D0 \uCE74\uB4DC\uB97C \uBCF4\uACE0 \uC18C\uB9AC\uB97C \uB4E3\uACE0 \uD655\uC778\uD558\uC138\uC694.",noCards:"\uCE74\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",audioFetchError:"\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.",ttsUnavailable:"\uC774 \uAE30\uAE30\uC5D0\uC11C\uB294 \uC74C\uC131\uC744 \uB4E4\uB824\uC904 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.",selectConfirm:"\uBB38\uC81C\uB97C \uBCF4\uACE0 \uD574\uB2F9\uD558\uB294 \uB0B4\uC6A9\uC744 \uC120\uD0DD\uD558\uC138\uC694.",orderListDefault:"\uBB38\uC7A5\uC744 \uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uBC30\uCE58\uD558\uC138\uC694.",result:{pendingDone:"\uACB0\uACFC\uB97C \uACC4\uC0B0\uD558\uB294 \uC911\uC774\uB77C \uC544\uC9C1 \uC644\uB8CC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.",eyebrow:"\uD6C8\uB828 \uC644\uB8CC",title:"\uD6C8\uB828\uC744 \uBAA8\uB450 \uB9C8\uCCE4\uC2B5\uB2C8\uB2E4.",scoreAria:"{{correct}} / {{total}} \uBB38\uD56D",elapsed:"\uC18C\uC694 \uC2DC\uAC04",tableAriaLabel:"\uBB38\uD56D\uBCC4 \uD310\uC815",colJudge:"\uD310\uC815",colAnswerSelected:"\uC815\uB2F5 \xB7 \uC120\uD0DD",colAnswer:"\uC815\uB2F5",colSelected:"\uC120\uD0DD",heardWell:"\uC798 \uB4E4\uC5C8\uC5B4\uC694",notHeard:"\uBABB \uB4E4\uC5C8\uC5B4\uC694",notJudged:"\uBBF8\uD310\uC815",replay:"\uB2E4\uC2DC\uD558\uAE30",replaySound:"{{no}}\uBC88 \uB2E4\uC2DC \uB4E3\uAE30",replaySoundStop:"{{no}}\uBC88 \uB4E3\uAE30 \uBA48\uCDA4",done:"\uC644\uB8CC",noContent:"(\uB0B4\uC6A9\uC5C6\uC74C)"},up:"\uC704\uB85C",down:"\uC544\uB798\uB85C",prev:"\uC774\uC804",listenLabel:"\uBB38\uC7A5 \uB4E3\uAE30",sourcePlay:"\uC18C\uC2A4 {{n}} \uC7AC\uC0DD",listen:"\uB4E3\uAE30",audioStatus:{synthesizing:"\uC18C\uB9AC\uB97C \uB9CC\uB4E4\uACE0 \uC788\uC2B5\uB2C8\uB2E4\u2026",preparing:"\uC18C\uB9AC\uB97C \uC900\uBE44\uD558\uACE0 \uC788\uC2B5\uB2C8\uB2E4\u2026"}},Ty={totalCount:"\uBA85\uC758 \uACE0\uAC1D",loadError:"\uBAA9\uB85D\uC744 \uBD88\uB7EC\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.",device:{title:"\uCCAD\uAC01\uC7AC\uD65C\uAE30\uAE30",addButton:"\uAE30\uAE30 \uCD94\uAC00",historyEmpty:"\uB4F1\uB85D\uB41C \uAE30\uAE30 \uC774\uB825\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",wearing:"\uCE21 \uCC29\uC6A9\uC911",notRegistered:"\uBBF8\uB4F1\uB85D",unit:"\uAC1C",wearingNow:"\uCC29\uC6A9",wear:"\uCC29\uC6A9",unwear:"\uCC29\uC6A9 \uD574\uC81C",wornSince:"{{date}}\uBD80\uD130",historyTitle:"\uCCAD\uAC01\uC7AC\uD65C\uAE30\uAE30 \uC774\uB825"},schedule:{registerTitle:" \uACE0\uAC1D\uB2D8 \uBC29\uBB38 \uC608\uC815 \uB4F1\uB85D"},visitHistory:{empty:"\uC544\uC9C1 \uBC29\uBB38 \uAE30\uB85D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",popupTitle:" \uACE0\uAC1D\uB2D8 \uBC29\uBB38 \uC774\uB825",registerTitle:" \uACE0\uAC1D\uB2D8 \uC2E0\uADDC \uBC29\uBB38 \uB4F1\uB85D"},moreItems:"\uB354 \uC788\uC74C",viewAll:"\uC804\uCCB4 \uBCF4\uAE30",duration:{minSec:"{{m}}\uBD84 {{s}}\uCD08",min:"{{m}}\uBD84",sec:"{{s}}\uCD08"},consent:{record:"\uB3D9\uC758 \uBC1B\uAE30",kinds:"\uBC1B\uC740 \uAC08\uB798",methodTitle:"\uBC1B\uC740 \uBC29\uBC95",sourceTitle:"\uC218\uC9D1 \uCD9C\uCC98",day:"\uBC1B\uC740 \uB0A0",note:"\uBA54\uBAA8",notePlaceholder:"\uC758\uB8B0\uAE30\uAD00 \uC774\uB984 \uB4F1 \u2014 \uBBFC\uAC10\uD55C \uB0B4\uC6A9\uC740 \uC801\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4",submit:"\uC800\uC7A5\uD558\uAE30",allTaken:"\uC138 \uAC08\uB798\uB97C \uC774\uBBF8 \uB2E4 \uBC1B\uC558\uC2B5\uB2C8\uB2E4. \uB2E4\uC2DC \uBC1B\uC73C\uB824\uBA74 \uBA3C\uC800 \uCCA0\uD68C\uD558\uC138\uC694.",kind:{personal:"\uC77C\uBC18 \uAC1C\uC778\uC815\uBCF4",sensitive:"\uBBFC\uAC10\uC815\uBCF4(\uCCAD\uB825\xB7\uC9C4\uB2E8)",marketing:"\uAD11\uACE0\uC131 \uC815\uBCF4 \uC218\uC2E0"},method:{paper:"\uC11C\uBA74",verbal:"\uAD6C\uB450",electronic:"\uC804\uC790"},source:{self:"\uBCF8\uC778",guardian:"\uBCF4\uD638\uC790",referral:"\uC758\uB8B0\uAE30\uAD00"}}},My={plan:{recommendedFor:"\uC774\uB7F0 \uBD84\uAED8 \uCD94\uCC9C\uD569\uB2C8\uB2E4.",features:"\uD575\uC2EC \uAE30\uB2A5",freePrice:"\uBB34\uB8CC",contact:"\uBB38\uC758\uD558\uAE30",tierFallback:"\uC774\uC6A9\uAD8C",openPromo:"\uC624\uD508 \uD2B9\uAC00"},products:{mgrEnterprise:{tier:{price:"\uBB38\uC758"}}}},$y={input:{label:"\uCFE0\uD3F0 \uCF54\uB4DC",placeholder:"\uCFE0\uD3F0 \uCF54\uB4DC \uC785\uB825"},applyButton:"\uC801\uC6A9"},Ly={showN:"{{n}}\uAC1C\uC529"},Ry={title:"\uD6C8\uB828\uBCC4 \uB4E3\uAE30",subtitle:"\uC6D0\uD558\uB294 \uD6C8\uB828 \uC720\uD615\uC744 \uC120\uD0DD\uD558\uC138\uC694.",listenInNoise:{title:"\uC18C\uC74C \uD558 \uBB38\uC7A5 \uB4E3\uAE30",desc:"\uB2E4\uC591\uD55C \uC18C\uC74C \uD658\uACBD\uC5D0\uC11C \uBB38\uC7A5 \uCCAD\uB825\uC744 \uD6C8\uB828\uD569\uB2C8\uB2E4."},shortStory:{title:"\uC9E7\uC740 \uC774\uC57C\uAE30 \uB4E3\uAE30",desc:"\uC9E7\uC740 \uC774\uC57C\uAE30\uB97C \uB4E3\uACE0 \uB0B4\uC6A9\uC744 \uC774\uD574\uD569\uB2C8\uB2E4."},longStory:{title:"\uAE34 \uC774\uC57C\uAE30 \uB4E3\uAE30",desc:"\uAE34 \uC774\uC57C\uAE30\uB97C \uC9D1\uC911\uD574\uC11C \uB4E3\uACE0 \uB0B4\uC6A9\uC744 \uD30C\uC545\uD569\uB2C8\uB2E4."},orderingSentence:{title:"\uBB38\uC7A5 \uC21C\uC11C\uD654",desc:"\uB4E4\uC740 \uBB38\uC7A5\uB4E4\uC744 \uC62C\uBC14\uB978 \uC21C\uC11C\uB85C \uBC30\uC5F4\uD569\uB2C8\uB2E4."},SAME_SOUND_PICK:{label:"\uAC19\uC740 \uC18C\uB9AC \uACE0\uB974\uAE30",sub:"\uB4E4\uC740 \uC18C\uB9AC\uC640 \uAC19\uC740 \uB2E8\uC5B4 \uCE74\uB4DC\uB97C \uACE0\uB974\uC138\uC694."},SAME_OR_DIFF:{label:"\uAC19\uC740\uC9C0 \uB2E4\uB978\uC9C0 \uB9DE\uD788\uAE30",sub:"\uB450 \uC18C\uB9AC\uAC00 \uAC19\uC740\uC9C0, \uB2E4\uB978\uC9C0 \uAD6C\uBD84\uD558\uC138\uC694."},HEAR_AND_PICK_SAME:{label:"\uC77C\uCE58\uD558\uB294 \uB2E8\uC5B4 \uB9DE\uD788\uAE30",sub:"\uB4E4\uC740 \uC18C\uB9AC\uC758 \uB2E8\uC5B4 \uCE74\uB4DC\uB97C \uACE0\uB974\uC138\uC694."},HEAR_AND_PICK_INCLUDED:{label:"\uD55C \uC74C\uC808 \uD3EC\uD568 \uB2E8\uC5B4 \uB9DE\uD788\uAE30",sub:"\uB4E4\uC740 \uC74C\uC808\uC774 \uD3EC\uD568\uB41C \uB2E8\uC5B4 \uCE74\uB4DC\uB97C \uACE0\uB974\uC138\uC694."},STARTS_WITH_SAME_SOUND:{label:"\uCCAB \uC74C\uC808\uC774 \uAC19\uC740 \uB2E8\uC5B4 \uB9DE\uD788\uAE30",sub:"\uB4E4\uC740 \uB2E8\uC5B4\uC640 \uAC19\uC740 \uC18C\uB9AC\uB85C \uC2DC\uC791\uD558\uB294 \uB2E8\uC5B4\uB97C \uACE0\uB974\uC138\uC694."},LISTEN_AND_REMEMBER_ORDER:{label:"\uB4E3\uACE0 \uC21C\uC11C\uB300\uB85C \uAE30\uC5B5\uD558\uAE30",sub:"\uC138 \uB2E8\uC5B4\uB97C \uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uCE74\uB4DC\uB97C \uC120\uD0DD\uD558\uC138\uC694."},MERGE_2_SYLLABLES:{label:"\uC74C\uC808 2\uAC1C \uD569\uCE58\uAE30",sub:"\uB450 \uC74C\uC808\uC744 \uD569\uCE58\uBA74 \uC5B4\uB5A4 \uB2E8\uC5B4\uAC00 \uB420\uAE4C\uC694?"},MERGE_3_SYLLABLES:{label:"\uC74C\uC808 3\uAC1C \uD569\uCE58\uAE30",sub:"\uC138 \uC74C\uC808\uC744 \uD569\uCE58\uBA74 \uC5B4\uB5A4 \uB2E8\uC5B4\uAC00 \uB420\uAE4C\uC694?"},MERGE_2_PHONEMES:{label:"\uC74C\uC18C 2\uAC1C \uD569\uCE58\uAE30",sub:"\uB450 \uC74C\uC18C\uB97C \uD569\uCE58\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"},MERGE_3_PHONEMES:{label:"\uC74C\uC18C 3\uAC1C \uD569\uCE58\uAE30",sub:"\uC138 \uC74C\uC18C\uB97C \uD569\uCE58\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"},DROP_1_FROM_2SYLL:{label:"2\uC74C\uC808\uC5D0\uC11C \uD55C \uC74C\uC808 \uD0C8\uB77D",sub:"2\uC74C\uC808 \uB2E8\uC5B4\uC5D0\uC11C \uD55C \uC74C\uC808\uC744 \uBE7C\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"},DROP_1_FROM_3SYLL:{label:"3\uC74C\uC808\uC5D0\uC11C \uD55C \uC74C\uC808 \uD0C8\uB77D",sub:"3\uC74C\uC808 \uB2E8\uC5B4\uC5D0\uC11C \uD55C \uC74C\uC808\uC744 \uBE7C\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"},DROP_PART_FROM_COMPOUND:{label:"\uD569\uC131\uC5B4\uC5D0\uC11C \uBD80\uBD84 \uD0C8\uB77D",sub:"\uD569\uC131\uC5B4\uC758 \uC77C\uBD80\uB97C \uBE7C\uBA74 \uC5B4\uB5A4 \uB2E8\uC5B4\uAC00 \uB420\uAE4C\uC694?"},DROP_FINAL_CONSONANT_FROM_1SYLL:{label:"1\uC74C\uC808\uC5D0\uC11C \uBC1B\uCE68 \uD0C8\uB77D",sub:"\uBC1B\uCE68\uC744 \uBE7C\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"},REMOVE_CONSONANT_AND_IDENTIFY_PHONEME:{label:"1\uC74C\uC808\uC5D0\uC11C \uC790\uC74C \uD0C8\uB77D",sub:"\uC790\uC74C\uC744 \uBE7C\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB0A8\uC744\uAE4C\uC694?"},CHANGE_1_SYLL_IN_2SYLL:{label:"2\uC74C\uC808\uC5D0\uC11C \uD55C \uC74C\uC808 \uBC14\uAFB8\uAE30",sub:"2\uC74C\uC808 \uB2E8\uC5B4\uC758 \uD55C \uC74C\uC808\uC744 \uBC14\uAFD4 \uC0C8 \uB2E8\uC5B4\uB97C \uB9CC\uB4DC\uC138\uC694."},CHANGE_1_SYLL_IN_3SYLL:{label:"3\uC74C\uC808\uC5D0\uC11C \uD55C \uC74C\uC808 \uBC14\uAFB8\uAE30",sub:"3\uC74C\uC808 \uB2E8\uC5B4\uC758 \uD55C \uC74C\uC808\uC744 \uBC14\uAFD4 \uC0C8 \uB2E8\uC5B4\uB97C \uB9CC\uB4DC\uC138\uC694."},CHANGE_1_PHONEME_IN_1SYLL:{label:"1\uC74C\uC808 \uB2E8\uC5B4 \uC911 1\uAC1C \uC74C\uC18C \uBC14\uAFB8\uAE30",sub:"1\uC74C\uC808 \uB2E8\uC5B4\uC758 \uD55C \uC74C\uC18C\uB97C \uBC14\uAFD4 \uC0C8 \uC18C\uB9AC\uB97C \uB9CC\uB4DC\uC138\uC694."},CHANGE_1_PHONEME_IN_2SYLL:{label:"2\uC74C\uC808 \uB2E8\uC5B4 \uC911 1\uAC1C \uC74C\uC18C \uBC14\uAFB8\uAE30",sub:"2\uC74C\uC808 \uB2E8\uC5B4\uC758 \uD55C \uC74C\uC18C\uB97C \uBC14\uAFD4 \uC0C8 \uB2E8\uC5B4\uB97C \uB9CC\uB4DC\uC138\uC694."}},Py={newBadge:"\uC0C8\uB85C \uB9CC\uB4E0 \uD45C",publishedBadge:"\uBC1C\uD589\uB428",sharedBadge:"\uACF5\uC720 \uC911"},Fy={title:"\uC8FC\uC694 \uB2E8\uC5B4",empty:"\uCD94\uCD9C\uB41C \uC8FC\uC694 \uB2E8\uC5B4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."},Iy={defaultName:"\uB2E8\uC5B4 \uD45C",title:"\uB2E8\uC5B4 \uD45C \uB9CC\uB4E4\uAE30",subtitle:"\uCE78\uC744 \uC124\uC815\uD558\uACE0 \uB2E8\uC5B4\uB97C \uCD94\uAC00\uD558\uC5EC \uD45C\uB97C \uB9CC\uB4ED\uB2C8\uB2E4.",filterTitle:"\uD45C \uC124\uC815",filter:{composition:"\uAD6C\uC131",image:"\uC774\uBBF8\uC9C0",word:"\uB2E8\uC5B4",caption:"\uC720\uD615",standardPron:"\uD45C\uC900 \uBC1C\uC74C",colloquialPron:"\uAD6C\uC5B4\uCCB4 \uBC1C\uC74C",paperOrientation:"\uC6A9\uC9C0 \uBC29\uD5A5",landscape:"\uAC00\uB85C",portrait:"\uC138\uB85C",columns:"\uCE78 \uC218",column:"{{count}}\uCE78",itemsPerPageWord:"\uD398\uC774\uC9C0\uB2F9 \uB2E8\uC5B4 \uC218",itemsPerPagePair:"\uD398\uC774\uC9C0\uB2F9 \uB300\uB9BD\uC30D \uC218",itemsPerPageOption:"{{count}}\uAC1C",pageIndicator:"{{current}} / {{total}}",pageNumber:"\uD398\uC774\uC9C0 \uBC88\uD638",pageNumberLeft:"\uC67C\uCABD",pageNumberCenter:"\uC911\uC559",pageNumberRight:"\uC624\uB978\uCABD",border:"\uC678\uACFD\uC120",topInfo:"\uC0C1\uB2E8 \uC815\uBCF4",bottomInfo:"\uD558\uB2E8 \uC815\uBCF4",cutLine:"\uC808\uCDE8\uC120",show:"\uD45C\uC2DC",hide:"\uBBF8\uD45C\uC2DC",dotted:"\uC810\uC120",corner:"\uCF54\uB108"},addWord:"\uCD94\uAC00\uD558\uAE30",copyItem:"\uD55C \uCE78 \uB354",copyItemAria:"{{n}}\uBC88 \uCE78 \uB0B1\uB9D0\uC744 \uD55C \uCE78 \uB354",wordInfo:"{{word}} \uB0B1\uB9D0 \uC815\uBCF4",emptyItems:"\uB2E8\uC5B4\uB97C 1\uAC1C \uC774\uC0C1 \uCD94\uAC00\uD574\uC8FC\uC138\uC694.",load:"\uBD88\uB7EC\uC624\uAE30",openNewWindow:"\uC0C8 \uCC3D\uC73C\uB85C \uBCF4\uAE30",saveButton:"\uC800\uC7A5\uD558\uAE30",saveAsNewButton:"\uB2E4\uB978 \uC774\uB984\uC73C\uB85C \uC800\uC7A5",print:"\uC778\uC1C4\uD558\uAE30",popupBlocked:"\uD31D\uC5C5\uC774 \uCC28\uB2E8\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uBE0C\uB77C\uC6B0\uC800 \uC124\uC815\uC5D0\uC11C \uD31D\uC5C5\uC744 \uD5C8\uC6A9\uD574 \uC8FC\uC138\uC694.",printFileNameSingle:"\uB2E8\uC5B4\uD45C",printFileNamePair:"\uB300\uB9BD\uC30D\uD45C",save:{title:"\uB2E8\uC5B4\uD45C \uC800\uC7A5\uD558\uAE30",nameLabel:"\uC774\uB984",desc:"\uC800\uC7A5\uD560 \uB2E8\uC5B4 \uD45C\uC758 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.",placeholder:"\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694.",descriptionLabel:"\uC124\uBA85",descriptionPlaceholder:"\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC124\uBA85\uC744 \uC785\uB825\uD558\uC138\uC694.",duplicateName:"\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4.",nameRequired:"\uD45C \uC774\uB984\uC744 \uC785\uB825\uD574 \uC8FC\uC138\uC694.",autoFillHint:" (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)",copyName:"{{name}} (\uBCF5\uC0AC)"},loadTable:{title:"\uC800\uC7A5\uB41C \uB2E8\uC5B4 \uD45C \uBD88\uB7EC\uC624\uAE30",empty:"\uC800\uC7A5\uB41C \uB2E8\uC5B4 \uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",loadButton:"\uBD88\uB7EC\uC624\uAE30",itemCount:"{{count}}\uAC1C",deleteAriaLabel:"{{name}} \uC0AD\uC81C",viewLabel:"\uBCF4\uAE30 \uBC29\uC2DD",sortLabel:"\uC815\uB82C",sort:{newest:"\uCD5C\uC2E0\uC21C",oldest:"\uC624\uB798\uB41C\uC21C",name:"\uC774\uB984\uC21C",count:"\uB2E8\uC5B4 \uC218"},view:{grid:"\uD45C\uB85C \uBCF4\uAE30",list:"\uB9AC\uC2A4\uD2B8\uB85C \uBCF4\uAE30"}},publisherFilter:"{{name}} \uAC8C\uC2DC\uD55C \uAC83\uB9CC \uBCF4\uAE30",groupDeleteMessage:"\uADF8\uB8F9 \uB0B4 \uB2E8\uC5B4\uD45C\uB294 '\uADF8\uB8F9 \uC5C6\uC74C'\uC73C\uB85C \uC774\uB3D9\uD569\uB2C8\uB2E4.",groupNamePlaceholder:"\uADF8\uB8F9 \uC774\uB984",scoring:{o:"{{word}} \uB9DE\uC74C",triangle:"{{word}} \uC560\uB9E4",x:"{{word}} \uD2C0\uB9BC",markName:{o:"\uB9DE\uC74C",triangle:"\uC560\uB9E4",x:"\uD2C0\uB9BC"},button:"\uCC44\uC810\uD558\uAE30",pickTitle:"\uB204\uAD6C\uB97C \uCC44\uC810\uD560\uAE4C\uC694?",pickSubtitle:"\u2018{{name}}\u2019 \uD45C\uB85C \uD6C8\uB828\uD55C \uACE0\uAC1D\uC744 \uACE0\uB974\uC138\uC694.",pickSearch:"\uC774\uB984 \uB610\uB294 \uC804\uD654\uBC88\uD638\uB85C \uCC3E\uAE30",pickEmpty:"\uB4F1\uB85D\uB41C \uACE0\uAC1D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",pickNoMatch:"\uCC3E\uB294 \uACE0\uAC1D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",pickAgain:"\uACE0\uAC1D \uB2E4\uC2DC \uACE0\uB974\uAE30",scoringFor:"{{name}} \uB2D8 \uCC44\uC810 \uC911",none:"\uCE78 \uC544\uB798 \u25CB \xB7 \u25B3 \xB7 \u2715 \uB97C \uB20C\uB7EC \uB9E4\uAE30\uC138\uC694. \uB9C8\uC6B0\uC2A4\uB85C\uB294 \uCE78\uC5D0 \uC190\uC744 \uC5B9\uC73C\uBA74, \uC790\uD310\uC73C\uB85C\uB294 \uCE78\uC5D0 \uCD08\uC810\uC774 \uAC00\uBA74 \uB098\uD0C0\uB0A9\uB2C8\uB2E4.",tally:"{{marked}}\uCE78 \uCC44\uC810 \xB7 \u25CB {{o}} \xB7 \u25B3 {{triangle}} \xB7 \u2715 {{x}} \xB7 \uC815\uB2F5\uB960 {{rate}}%",save:"\uCC44\uC810 \uC800\uC7A5",saved:"{{name}} \uB2D8\uC758 \uCC44\uC810 {{count}}\uCE78\uC744 \uC800\uC7A5\uD588\uC2B5\uB2C8\uB2E4.",reviewTitle:"\uBCF5\uC2B5\uD45C\uB97C \uB9CC\uB4E4\uAE4C\uC694?",reviewMessage:"{{name}} \uB2D8\uC774 \uD2C0\uB9AC\uAC70\uB098 \uC560\uB9E4\uD588\uB358 {{count}}\uCE78\uC73C\uB85C \uC0C8 \uD45C\uB97C \uB9CC\uB4ED\uB2C8\uB2E4. \uB9DE\uD78C \uCE78\uC740 \uBE60\uC9D1\uB2C8\uB2E4.",reviewConfirm:"\uBCF5\uC2B5\uD45C \uB9CC\uB4E4\uAE30",reviewDescription:"\u2018{{name}}\u2019 \uCC44\uC810\uC5D0\uC11C \uD2C0\uB9AC\uAC70\uB098 \uC560\uB9E4\uD588\uB358 {{count}}\uCE78\uC744 \uBAA8\uC740 \uD45C\uC785\uB2C8\uB2E4.",reviewCreated:"\u2018{{name}}\u2019\uC744(\uB97C) \uB9CC\uB4E4\uC5C8\uC2B5\uB2C8\uB2E4 \u2014 {{count}}\uCE78.",discardTitle:"\uB9E4\uAE34 \uCC44\uC810\uC744 \uBC84\uB9B4\uAE4C\uC694?",discardMessage:"{{count}}\uCE78\uC744 \uB9E4\uACBC\uC9C0\uB9CC \uC544\uC9C1 \uC800\uC7A5\uD558\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4. \uB098\uAC00\uBA74 \uC0AC\uB77C\uC9D1\uB2C8\uB2E4.",discardConfirm:"\uBC84\uB9AC\uACE0 \uB098\uAC00\uAE30"},info:{grade:"\uB09C\uC774\uB3C4: {{n}}\uB4F1\uAE09",syllables:"\uC74C\uC808 \uC218: {{n}}\uC74C\uC808",pos:"\uD488\uC0AC: {{v}}",wordType:"\uC720\uD615: {{v}}"},pos:{noun:"\uBA85\uC0AC",verb:"\uB3D9\uC0AC",adjective:"\uD615\uC6A9\uC0AC",adverb:"\uBD80\uC0AC",numeral:"\uC218\uC0AC",determiner:"\uAD00\uD615\uC0AC",interjection:"\uAC10\uD0C4\uC0AC",particle:"\uC870\uC0AC",affix:"\uC811\uC0AC",dependentNoun:"\uC758\uC874\uBA85\uC0AC",pronoun:"\uB300\uBA85\uC0AC",auxVerb:"\uBCF4\uC870\uB3D9\uC0AC",auxAdjective:"\uBCF4\uC870\uD615\uC6A9\uC0AC"},reorder:{moved:"{{total}}\uCE78 \uAC00\uC6B4\uB370 {{n}}\uBC88\uC9F8\uB85C \uC62E\uAE40",handle:"{{word}} \uC21C\uC11C \uBC14\uAFB8\uAE30 (Alt + \uD654\uC0B4\uD45C)",hint:"Alt + \u2190 \u2192 \uB85C \uC21C\uC11C \uBC14\uAFB8\uAE30"},thumbMore:"+{{count}}",replaceItem:"\uB2E4\uB978 \uB2E8\uC5B4\uB85C",replacePair:"\uB2E4\uB978 \uC30D\uC73C\uB85C",replaceItemAria:"{{n}}\uBC88 \uCE78\uB9CC \uB2E4\uB978 \uB2E8\uC5B4\uB85C",replacePairAria:"{{n}}\uBC88 \uCE78\uB9CC \uB2E4\uB978 \uC30D\uC73C\uB85C",thumbMoreAria:"\uADF8 \uBC16 {{count}}\uCE78: {{words}}",pickForm:"\uB2E4\uB978 \uAF34\uB85C",pickFormAria:"{{n}}\uBC88 \uCE78 \uB0B1\uB9D0\uC744 \uB2E4\uB978 \uAF34\uB85C",pickFormBaseAria:"\uAE30\uBCF8\uD615 \uB0B1\uB9D0\uC744 \uB2E4\uB978 \uAF34\uB85C"},Oy={filterTitle:"\uB2E8\uC5B4 \uAC80\uC0C9 \uC124\uC815",filter:{positionAny:"\uBB34\uAD00",positionHead:"\uC5B4\uB450",positionMid:"\uC5B4\uC911",positionTail:"\uC5B4\uB9D0",difficulty:"\uB09C\uC774\uB3C4",grade:"{{n}}\uB4F1\uAE09",age:"{{n}}\uC138",agePlus:"{{n}}\uC138 \uC774\uC0C1",ageRange:"{{from}}\uC138~{{to}}\uC138",difficultyInfoAge:"3\uC138~7\uC138: \uAC00\uC7A5 \uC26C\uC6B4 \uB0B1\uB9D0(1\uB4F1\uAE09)\uC744 \uB610\uB798\uBCC4\uB85C \uB098\uB208 \uAC83\uC785\uB2C8\uB2E4.",difficultyInfoGrade:"2~4\uB4F1\uAE09: \uADF8\uBCF4\uB2E4 \uC5B4\uB824\uC6B4 \uB0B1\uB9D0\uC774\uACE0, \uB098\uC774\uB85C\uB294 \uB098\uB204\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",difficultyInfoNone:"\uC5C6\uC74C: \uB09C\uC774\uB3C4\uAC00 \uB9E4\uACA8\uC9C0\uC9C0 \uC54A\uC740 \uB0B1\uB9D0\uC785\uB2C8\uB2E4.",difficultyInfoBandAge:"{{ages}}: {{grade}} \uB0B1\uB9D0\uC744 \uB098\uC774\uBCC4\uB85C \uB098\uB208 \uAC83\uC785\uB2C8\uB2E4.",difficultyInfoBandAgeOne:"{{ages}}: {{grade}} \uB0B1\uB9D0\uC785\uB2C8\uB2E4.",difficultyInfoBandGrade:"{{grade}}: {{ages}} \uB0B1\uB9D0\uC785\uB2C8\uB2E4.",difficultyInfoBandAgeNamed:"{{ages}}: \uB098\uC774\uB85C \uB098\uB208 \uB0B1\uB9D0\uC785\uB2C8\uB2E4.",gradeNone:"\uC5C6\uC74C",syllables:"\uC74C\uC808 \uC218",syllable:"{{n}}\uC74C\uC808",syllable5plus:"5\uC74C\uC808 \uC774\uC0C1",partOfSpeech:"\uD488\uC0AC",pos:{noun:"\uCCB4\uC5B8(\uBA85\uC0AC, \uC218\uC0AC)",verb:"\uC6A9\uC5B8(\uB3D9\uC0AC, \uD615\uC6A9\uC0AC)",modifier:"\uC218\uC2DD\uC5B8(\uBD80\uC0AC, \uAD00\uD615\uC0AC)"},wordType:"\uC720\uD615",field:"\uC758\uBBF8\uBC94\uC8FC",type:{native:"\uACE0\uC720\uC5B4",sino:"\uD55C\uC790\uC5B4",foreign:"\uC678\uB798\uC5B4",mixed:"\uD63C\uC885\uC5B4"},exclude:"\uC81C\uC678",excludeNoImage:"\uC774\uBBF8\uC9C0 \uC5C6\uC74C"},searchButton:"\uAC80\uC0C9\uD558\uAE30",resultUnit:"\uB2E8\uC5B4",remaining:"{{count}}\uAC1C \uB0A8\uC74C",resultDisc:"\uC6D0\uD558\uB294 {{unit}} \uC120\uD0DD\uD558\uC138\uC694. {{max}}\uAC1C\uAE4C\uC9C0 \uC120\uD0DD\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. ({{selected}}/{{max}})",resultTitlePrefix:"\uCD1D ",resultTitleSuffix:"\uAC1C\uC758 {{unit}} \uAC80\uC0C9\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",emptyResult:"\uAC80\uC0C9 \uACB0\uACFC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",groupCount:"{{count}}\uAC1C",sort:{aria:"\uC815\uB82C",match:"\uC2DC\uC791 \uC6B0\uC120",ganada:"\uAC00\uB098\uB2E4\uC21C \u2191",ganadaDesc:"\uAC00\uB098\uB2E4\uC21C \u2193",syllable:"\uC74C\uC808 \uC218 \u2191",syllableDesc:"\uC74C\uC808 \uC218 \u2193",grade:"\uB4F1\uAE09\uC21C \u2191",gradeDesc:"\uB4F1\uAE09\uC21C \u2193",original:"\uBC1B\uC740 \uC21C\uC11C"},pageSize:"{{count}}\uAC1C\uC529 \uBCF4\uAE30",pageSizeAria:"\uD398\uC774\uC9C0 \uD06C\uAE30"},zy={clearAllSelection:"\uBAA8\uB450 \uC120\uD0DD \uD574\uC81C",divLine:"\uB300\uB9BD\uC120",removePair:"\uB300\uB9BD\uC30D \uBE7C\uAE30",removePairFor:"{{name}} \uB300\uB9BD\uC30D \uBE7C\uAE30",removeWord:"\uB2E8\uC5B4 \uBE7C\uAE30",removeWordFor:"{{name}} \uBE7C\uAE30"},Wy={title:"\uC8FC\uC81C\uBCC4 \uB4E3\uAE30",subtitle:"\uC8FC\uC81C\uB97C \uC120\uD0DD\uD558\uACE0 \uB4E3\uAE30 \uD6C8\uB828\uC744 \uC2DC\uC791\uD558\uC138\uC694.",noiseTitle:"\uC18C\uC74C \uD558 \uBB38\uC7A5\uB4E3\uAE30",shortStoryTitle:"\uC9E7\uC740 \uC774\uC57C\uAE30 \uB4E3\uAE30",FOOD:"\uC74C\uC2DD",HLTH:"\uAC74\uAC15",WETH:"\uB0A0\uC528",PRSN:"\uC778\uBB3C",KRCT:"\uD55C\uAD6D\uBB38\uD654",STRY:"\uC774\uC57C\uAE30",LOCA:"\uC9C0\uC5ED",SOAR:"\uC0AC\uD68C\uC640 \uC608\uC220",NTSC:"\uC790\uC5F0\uACFC \uACFC\uD559",SPRT:"\uC2A4\uD3EC\uCE20",sub:{TRKRFD:"\uD55C\uAD6D \uC804\uD1B5\uC74C\uC2DD",MDKRFD:"\uD55C\uAD6D \uD604\uB300\uC74C\uC2DD",WRLDFD:"\uC138\uACC4\uC758 \uC74C\uC2DD",MTRFRT:"\uC2DD\uC7AC\uB8CC\uC640 \uACFC\uC77C",GEFDKL:"\uC74C\uC2DD \uC0C1\uC2DD",HTETHB:"\uAC74\uAC15\uD55C \uC2DD\uC2B5\uAD00",DISILL:"\uBCD1\uACFC \uC9C8\uD658",EXCISE:"\uC6B4\uB3D9",GEHTKL:"\uAC74\uAC15\uC0C1\uC2DD",GESSKL:"\uACC4\uC808\uC0C1\uC2DD",SNWRAN:"\uB208\uACFC \uBE44",WTHFCT:"\uC77C\uAE30\uC608\uBCF4",GEWTKL:"\uB0A0\uC528\uC0C1\uC2DD",JODYPS:"\uC870\uC120\uC2DC\uB300",MDKRPS:"\uD55C\uAD6D \uADFC\uD604\uB300",THKDPS:"\uC0BC\uAD6D\uC2DC\uB300",WRLART:"\uC138\uACC4\uC758 \uC608\uC220\uAC00",WRLPSN:"\uC138\uACC4\uC758 \uC778\uBB3C",KRLANG:"\uC6B0\uB9AC\uB9D0",TRPLCT:"\uC804\uD1B5\uB180\uC774",HERITG:"\uBB38\uD654\uC7AC",EVTFES:"\uD589\uC0AC\uC640 \uCD95\uC81C",GECTKL:"\uC0C1\uC2DD",FRYTAL:"\uB3D9\uD654",AMZING:"\uC2E0\uAE30\uD55C \uC774\uC57C\uAE30",DAYSTR:"\uC77C\uC0C1 \uC18D \uC774\uC57C\uAE30",KRLDMK:"\uD55C\uAD6D\uC758 \uBA85\uC18C",SELNMK:"\uC11C\uC6B8\uC758 \uBA85\uC18C",WRDTRB:"\uC138\uACC4\uC5EC\uD589",NAVIGT:"\uAE38 \uCC3E\uAE30",KRSOCI:"\uD55C\uAD6D",ECONEW:"\uACBD\uC81C\uC640 \uB274\uC2A4",GENART:"\uC608\uC220",GELFKL:"\uC0DD\uD65C \uC0C1\uC2DD",ANIMAL:"\uB3D9\uBB3C",PLANTS:"\uC2DD\uBB3C",ETHPLT:"\uC9C0\uAD6C",TOLELC:"\uB3C4\uAD6C\uC640 \uC804\uC790\uC81C\uD488",GESCKL:"\uACFC\uD559\uC0C1\uC2DD",INVDSP:"\uAC1C\uC778\uACBD\uAE30",MARART:"\uACA9\uD22C\uAE30",TEAMSP:"\uB2E8\uCCB4\uACBD\uAE30",FOOTBL:"\uCD95\uAD6C",GESPKL:"\uC2A4\uD3EC\uCE20 \uC0C1\uC2DD"}},Hy={direction:{left:"\uC88C",right:"\uC6B0",label:"\uBC29\uD5A5"},wornDate:"\uCC29\uC6A9\uC77C",deviceType:"\uC885\uB958",brand:"\uBE0C\uB79C\uB4DC",fitType:"\uCC29\uC6A9\uD615\uD0DC",productName:"\uC81C\uD488\uBA85",addNew:"\uC0C8 \uAE30\uAE30 \uCD94\uAC00",selectFromList:"\uBAA9\uB85D\uC5D0\uC11C \uC120\uD0DD",removeDevice:"\uCC29\uC6A9 \uD574\uC81C",type:{hearingAid:"\uBCF4\uCCAD\uAE30",cochlearImplant:"\uC778\uACF5\uC640\uC6B0",other:"\uAE30\uD0C0"}},Vy={stat:{totalCustomers:"\uCD1D \uACE0\uAC1D",monthlyVisits:"\uC774\uB2EC \uCD1D \uBC29\uBB38"},chart:{visitDetail:"\uC0C1\uC138 \uBC29\uBB38 \uD604\uD669",trainingDetail:"\uC0C1\uC138 \uD6C8\uB828 \uD604\uD669",weekly:"\uC8FC\uBCC4",periodMonth:"\uC6D4",periodWeek:"\uC8FC",weeklyPrefix:"\uC8FC\uAC04",monthlyPrefix:"\uC6D4\uAC04",visit:"\uBC29\uBB38",reservation:"\uC608\uC57D",trainingDone:"\uD6C8\uB828 \uC644\uB8CC",trainingInProgress:"\uD6C8\uB828 \uC911",weekRange:"{{start}}~{{end}}",week:"{{n}}\uC8FC"}},qy={phonemeSelect:{vs:"\uB300"},caution:"\uC720\uC758\uC0AC\uD56D",mode:{include:"\uC74C\uC18C \uD3EC\uD568",pick:"\uC74C\uC18C \uB300\uB9BD",contrast:"\uC74C\uC18C \uB300\uB9BD \uC9C0\uC815",infoTitle:"\uB300\uB9BD \uBC29\uC2DD",infoInclude:"\uC74C\uC18C \uD3EC\uD568 \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uAC00 \uBAA8\uB450 \uB4E4\uC5B4\uAC04 \uB2E8\uC5B4\uC640 \uADF8 \uB300\uB9BD\uC30D\uC744 \uCC3E\uC544\uC694.",infoPick:"\uC74C\uC18C \uB300\uB9BD \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uAC00 \uB300\uB9BD\uC30D \uB450 \uB2E8\uC5B4\uC758 \uC2E4\uC81C \uCC28\uC774\uC810\uC77C \uB54C\uB9CC \uB9E4\uCE6D\uB3FC\uC694.",infoContrast:"\uC74C\uC18C \uB300\uB9BD \uC9C0\uC815 \u2014 \uAE30\uC900 \uB2E8\uC5B4\uC640 \uB300\uB9BD \uB2E8\uC5B4\uC758 \uC74C\uC18C\uB97C \uAC01\uAC01 \uC9C1\uC811 \uC120\uD0DD\uD574 \uB300\uB9BD\uC30D\uC744 \uCC3E\uC544\uC694."},count:"{{n}}\uAC1C",countLabel:"\uC74C\uC18C \uAC1C\uC218",input:{char:"\uAE00\uC790 \uC120\uD0DD",pron:"\uBC1C\uC74C \uC120\uD0DD",infoTitle:"\uC785\uB825 \uBC29\uC2DD",infoChar:"\uAE00\uC790 \uC120\uD0DD \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uB85C \uB2E8\uC5B4(\uAE00\uC790 \uAE30\uC900)\uB97C \uCC3E\uC740 \uD6C4, \uB2E8\uC5B4\uC758 \uD45C\uC900 \uBC1C\uC74C \uB300\uB9BD\uC30D\uC744 \uCC3E\uC2B5\uB2C8\uB2E4.",infoPron:"\uBC1C\uC74C \uC120\uD0DD \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uB85C \uD45C\uC900 \uBC1C\uC74C \uB300\uB9BD\uC30D\uC744 \uCC3E\uC2B5\uB2C8\uB2E4."},phonemeN:"{{n}}\uBC88 \uC74C\uC808",phonemeSingleLabel:"\uC74C\uC808",phonemeContrastSingleLabel:"\uB300\uB9BD \uC74C\uC808",ordinals:["\uCCAB\uBC88\uC9F8","\uB450\uBC88\uC9F8","\uC138\uBC88\uC9F8","\uB124\uBC88\uC9F8"],phonemeOrdinalLabel:"{{ordinal}} \uC74C\uC808",phonemeContrastOrdinalLabel:"\uB300\uB9BD {{ordinal}} \uC74C\uC808",composition:"\uC815\uB2F5 \uB2E8\uC5B4 \uAD6C\uC131",syllableCount:"\uC74C\uC808 \uC218",syllableN:"{{n}}\uC74C\uC808",syllableNPlus:"{{n}}\uC74C\uC808 \uC774\uC0C1",onset:"\uCD08\uC131",vowel:"\uBAA8\uC74C",coda:"\uC885\uC131",filter:{searchOptionsTitle:"\uB300\uB9BD \uC124\uC815",searchModeLabel:"\uB300\uB9BD \uBC29\uC2DD",countLabel:"\uC785\uB825 \uC74C\uC808 \uAC2F\uC218",inputModeLabel:"\uC785\uB825 \uBC29\uC2DD",phonemeOrder:"\uC785\uB825 \uC74C\uC808 \uC704\uCE58",phonemeOrderInfo:["\uC77C\uCE58: \uB300\uB9BD\uC30D\uC774 \uC815\uD655\uD788 \uAC19\uC740 \uC704\uCE58(\uC74C\uC808)\uC5D0\uC11C\uB9CC \uCC28\uC774 \uB098\uC57C \uB9E4\uCE6D\uB3FC\uC694.","\uBB34\uAD00: \uCC28\uC774 \uB098\uB294 \uC704\uCE58\uB294 \uC0C1\uAD00\uC5C6\uC774 \uB9E4\uCE6D\uB3FC\uC694."],orderAny:"\uBB34\uAD00",orderMatch:"\uC77C\uCE58",difficultyInfo:["1\uB4F1\uAE09 : \uD559\uB839\uC804\uAE30\uC5D0 \uC2B5\uB4DD\uD558\uC5EC \uD3C9\uC0DD\uC5D0 \uAC78\uCCD0 \uC77C\uC0C1 \uC5B8\uC5B4\uC0DD\uD65C\uC744 \uD558\uB294 \uB370 \uC0AC\uC6A9\uB418\uB294 \uC5B4\uD718","2\uB4F1\uAE09 : \uCD08\uB4F1\uD559\uAD50 1-2\uD559\uB144 \uB09C\uC774\uB3C4 \uC5B4\uD718","3\uB4F1\uAE09 : \uCD08\uB4F1\uD559\uAD50 3-4\uD559\uB144 \uB09C\uC774\uB3C4 \uC5B4\uD718","4\uB4F1\uAE09 : \uCD08\uB4F1\uD559\uAD50 5-6\uD559\uB144 \uB09C\uC774\uB3C4 \uC5B4\uD718","\uB4F1\uAE09\uC5C6\uC74C : \uAD6D\uB9BD\uAD6D\uC5B4\uC6D0 \uD45C\uC900 \uC5B4\uD718 \uC678 \uACE0\uBE48\uB3C4 \uC0DD\uD65C \uC5B4\uD718, \uC2E0\uC870\uC5B4 \uBC0F \uC678\uB798\uC5B4"],selectLabel:"\uC120\uD0DD",onlyHasImage:"\uC774\uBBF8\uC9C0 \uC788\uB294 \uB2E8\uC5B4\uB9CC",onlyHighUsage:"\uD65C\uC6A9\uB3C4 \uB192\uC740 \uB2E8\uC5B4\uB9CC",onlySameStructure:"\uC74C\uC18C \uAD6C\uC870 \uAC19\uC740 \uB2E8\uC5B4\uB9CC"},confirmMessage:"\uC120\uD0DD\uD55C {{unit}} {{count}}\uAC1C\uB97C \uD3EC\uD568\uD55C \uB2E8\uC5B4 \uD45C \uC815\uBCF4\uAC00 \uC0AC\uB77C\uC9D1\uB2C8\uB2E4.",resetOptions:"\uAC80\uC0C9 \uC635\uC158 \uCD08\uAE30\uD654",phonemeContrast:"\uB300\uB9BD {{n}}\uBC88 \uC74C\uC808",infoNotes:["\uBBF8\uB9AC\uBCF4\uAE30 \uAE00\uC790\uB294 \uC120\uD0DD\uD55C \uC74C\uC18C\uC758 \uC870\uD569 \uC608\uC2DC\uC785\uB2C8\uB2E4. \uC2E4\uC81C \uAC80\uC0C9\uC740 \uD574\uB2F9 \uC74C\uC18C\uAC00 \uD3EC\uD568\uB41C \uBAA8\uB4E0 \uB2E8\uC5B4\uB97C \uB300\uC0C1\uC73C\uB85C \uD569\uB2C8\uB2E4.","\uCD08\uC131 '\u3147'\uC740 \uC120\uD0DD\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uB2E8\uC5B4 \uC55E\uC5D0 \uC624\uB294 \u3147\uC740 \uC2E4\uC9C8\uC801\uC73C\uB85C \uBB34\uC74C\uC774\uC5B4\uC11C \uB300\uB9BD\uC30D \uC131\uB9BD\uC5D0 \uC601\uD5A5\uC744 \uC8FC\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.","\uCD08\uC131\uACFC \uC885\uC131\uB9CC \uC120\uD0DD\uD558\uBA74 \uBAA8\uC74C\uC740 '\u314F'\uB85C \uC790\uB3D9 \uD45C\uC2DC\uB429\uB2C8\uB2E4.","\uC74C\uC18C \uAC1C\uC218\uB97C \uB298\uB9AC\uBA74 \uAC01 \uC74C\uC18C \uC0AC\uC774\uC758 \uB300\uB9BD\uC30D\uC744 \uAC80\uC0C9\uD569\uB2C8\uB2E4."]},Uy={lead:`\uC544\uC774\uD574\uBE0C\uB294 \uC18C\uB9AC\uB97C \uD1B5\uD574
837
+ `),this.name="StorageNotConfiguredError"}};function tb(e){eb(e)}function si(e,t){if(!e)return null;const r=qr();return r?.resolvePath?r.resolvePath(e,t):t?`${t}/${e}.mp3`:null}async function li(e){if(!e)return null;const t=qr();if(!t)throw new oi("getSignedOrPublicUrl");try{return await t.resolveUrl(e)}catch{return null}}async function ii(e){const t=qr();if(!t)throw new oi("downloadSound");return t.download(e)}function nb(){return qr()?.noiseBaseUrl??"/sounds/noise"}function rb(){const e=Number(qr()?.noiseFileGain);return Number.isFinite(e)&&e>0?e:1}function ab(e){const t=AbortSignal.timeout;if(typeof t=="function")return t.call(AbortSignal,e);const r=new AbortController;return setTimeout(()=>r.abort(),e),r.signal}function ob(e){return e===400||e===404||e===410}const ui="__ihab_core_tts_config__";function Ur(){return globalThis[ui]?.urlResolver??null}function xa(){return globalThis[ui]?.fallbackUrlResolver??null}const sb="__ihab_core_pronunciation_resolver__";function lb(){return globalThis[sb]??null}let Jn=null;const Gr=new WeakMap,No=new WeakMap,Eo=new WeakMap;let ci=!1;const di=e=>Math.max(0,Math.min(1,Number.isFinite(e)?e:0));function ib(){if(ci||typeof document>"u")return;ci=!0;const e=()=>{try{Jn&&Jn.state!=="running"&&Jn.resume()}catch{}};for(const t of["pointerdown","touchend","keydown"])document.addEventListener(t,e,{capture:!0,passive:!0})}function pi(){if(Jn)return Jn;try{const e=window.AudioContext||window.webkitAudioContext;return e?(Jn=new e,ib(),Jn):null}catch{return null}}function jo(){try{Jn?.resume()}catch{}}function Do(e,t){const r=Gr.get(t);if(r)return r;try{const a=e.createMediaElementSource(t),s=e.createGain(),l=e.createAnalyser();l.fftSize=1024,l.smoothingTimeConstant=.6,s.gain.value=di(No.get(t)??t.volume),a.connect(s),s.connect(l),s.connect(e.destination);try{t.volume=1}catch{}const i={gain:s,analyser:l};return Gr.set(t,i),i}catch{return null}}function _a(e){if(!e)return Promise.resolve(null);const t=Gr.get(e);if(t)return Promise.resolve(t.analyser);const r=pi();if(!r)return Promise.resolve(null);if(r.state==="running")return Promise.resolve(Do(r,e)?.analyser??null);const a=Eo.get(e);if(a)return a;const s=Promise.resolve().then(()=>r.resume()).then(()=>r.state==="running"?Do(r,e)?.analyser??null:null).catch(()=>null).finally(()=>{Eo.delete(e)});return Eo.set(e,s),s}function ub(e){if(!e)return null;const t=Gr.get(e);if(t)return t.analyser;const r=pi();return r?r.state==="running"?Do(r,e)?.analyser??null:(_a(e),null):null}function Qn(e,t){const r=di(t);No.set(e,r);const a=Gr.get(e);if(a){try{e.volume!==1&&(e.volume=1)}catch{}const s=a.gain.gain;try{const l=a.gain.context.currentTime;s.cancelScheduledValues(l),s.setTargetAtTime(r,l,.01)}catch{try{s.value=r}catch{}}return"gain"}try{e.volume=r}catch{}return"element"}function wa(e){return No.get(e)??e.volume}function cb(e,t){e.getFloatTimeDomainData(t);let r=0;for(let a=0;a<t.length;a++){const s=t[a];r+=s*s}return Math.sqrt(r/t.length)}const db="__ihab_core_image_config__";function Br(){return globalThis[db]??null}const hi="word_image_existence_map_v1",pb="ihab:image-existence-updated";let Kr=null;function hb(){Kr!==null&&(clearTimeout(Kr),Kr=null),typeof window<"u"&&window.dispatchEvent(new Event(pb))}function mb(){Kr===null&&(Kr=setTimeout(hb,200))}let lr=null,So=0;const Yr=new Map;function fb(){if(lr)return lr;try{const e=typeof localStorage<"u"?localStorage.getItem(hi):null,t=e?JSON.parse(e):null,r={};if(t&&typeof t=="object"&&!Array.isArray(t))for(const[a,s]of Object.entries(t))typeof s=="boolean"&&(r[a]=s);lr=r}catch{lr={}}return lr}let To=null;function Cb(){To===null&&(To=setTimeout(()=>{To=null;try{typeof localStorage<"u"&&lr&&localStorage.setItem(hi,JSON.stringify(lr))}catch{}},200))}function gb(e,t){return`${e}_${t??1}`}async function bb(e,t,r=!1){const a=fb(),s=gb(e,t);if(!r&&s in a)return a[s];if(!r&&Yr.has(s))return Yr.get(s);const l=Br();if(!l)return!1;let i;try{i=l(e,t)}catch{return!1}if(!i)return!1;let u;try{u=fetch(i,{method:"HEAD",signal:ab(8e3)})}catch{return!1}const c=u.then(p=>p.ok?!0:ob(p.status)?!1:null,()=>null).then(p=>Yr.get(s)!==c?p??!1:(Yr.delete(s),p===null?!1:(a[s]=p,So++,Cb(),p)));return Yr.set(s,c),c}async function mi(e,t){const r=So,a=await bb(e,t);return So!==r&&mb(),a}const fi=90;function Ci(e){let t=0;for(const r of e){const a=r.codePointAt(0)??0;r===`
838
+ `||r==="\r"?t+=2:t+=a<128?1:2}return t}function yb(e){return Ci(e)>90?"LMS":"SMS"}function gi(e,t=85){const r=Ci(e),a=yb(e),s=a==="SMS"?90:2e3,l=typeof t=="number"?t:null;return{bytes:r,type:a,limit:s,over:r>s,target:l,overTarget:l!==null&&r>l}}const vb=["onset","vowel","coda","glide"],bi="none",xb={\uCD08\uC131:"onset",\uBAA8\uC74C:"vowel",\uC885\uC131:"coda",\uD65C\uC74C:"glide"},_b="\uC5C6\uC74C";function wb(e){return vb.includes(e)}function Bb(e){const t={};for(const[r,a]of Object.entries(e)){const s=wb(r)?r:xb[r];s&&(t[s]=a===_b?bi:a)}return t}const kb={\u314F:{nucleus:"\u314F"},\u3151:{glide:"j",nucleus:"\u314F"},\u3153:{nucleus:"\u3153"},\u3155:{glide:"j",nucleus:"\u3153"},\u3157:{nucleus:"\u3157"},\u315B:{glide:"j",nucleus:"\u3157"},\u315C:{nucleus:"\u315C"},\u3160:{glide:"j",nucleus:"\u315C"},\u3161:{nucleus:"\u3161"},\u3163:{nucleus:"\u3163"},\u3150:{nucleus:"\u3154/\u3150"},\u3152:{glide:"j",nucleus:"\u3154/\u3150"},\u3154:{nucleus:"\u3154/\u3150"},\u3156:{glide:"j",nucleus:"\u3154/\u3150"},\u3158:{glide:"w",nucleus:"\u314F"},\u3159:{glide:"w",nucleus:"\u3154/\u3150"},\u315A:{glide:"w",nucleus:"\u3154/\u3150"},\u315D:{glide:"w",nucleus:"\u3153"},\u315E:{glide:"w",nucleus:"\u3154/\u3150"},\u315F:{glide:"w",nucleus:"\u3163"},\u3162:{glide:"\u0270",nucleus:"\u3163"}},yi=["\u3131","\u3132","\u3134","\u3137","\u3138","\u3139","\u3141","\u3142","\u3143","\u3145","\u3146","\u3147","\u3148","\u3149","\u314A","\u314B","\u314C","\u314D","\u314E"],vi=["\u314F","\u3150","\u3151","\u3152","\u3153","\u3154","\u3155","\u3156","\u3157","\u3158","\u3159","\u315A","\u315B","\u315C","\u315D","\u315E","\u315F","\u3160","\u3161","\u3162","\u3163"],Ab=["","\u3131","\u3132","\u3133","\u3134","\u3135","\u3136","\u3137","\u3139","\u313A","\u313B","\u313C","\u313D","\u313E","\u313F","\u3140","\u3141","\u3142","\u3144","\u3145","\u3146","\u3147","\u3148","\u314A","\u314B","\u314C","\u314D","\u314E"];function Zr(e){if(!e)return null;const t=e.charCodeAt(0)-44032;return t<0||t>=11172?null:{cho:Math.floor(t/588),jung:Math.floor(t%588/28),jong:t%28}}function Nb(e){const t=Zr(e[0]||"");return t?yi[t.cho]:""}function Eb(e){if(!e)return()=>!0;e=e.normalize("NFC");const t=[...e],r=i=>yi.includes(i),a=i=>vi.includes(i),s=t.map(i=>r(i)?"cho":a(i)?"jung":Zr(i)?"syl":"other"),l=t.map(i=>Zr(i));if(s.includes("other")){const i=e.toLowerCase();return u=>u.normalize("NFC").toLowerCase().includes(i)}return i=>{const u=[...i.normalize("NFC")];for(let c=0;c+t.length<=u.length;c++){let p=!0;for(let h=0;h<t.length;h++){const d=u[c+h],m=s[h];if(m==="cho"){if(Nb(d)!==t[h]){p=!1;break}}else if(m==="jung"){const C=Zr(d);if(!C||vi[C.jung]!==t[h]){p=!1;break}}else{const C=l[h];if(C&&C.jong===0){const x=Zr(d);if(!x||x.cho!==C.cho||x.jung!==C.jung){p=!1;break}}else if(d!==t[h]){p=!1;break}}}if(p)return!0}return!1}}const jb={3:["\u3131","\u3145"],5:["\u3134","\u3148"],6:["\u3134","\u314E"],9:["\u3139","\u3131"],10:["\u3139","\u3141"],11:["\u3139","\u3142"],12:["\u3139","\u3145"],13:["\u3139","\u314C"],14:["\u3139","\u314D"],15:["\u3139","\u314E"],18:["\u3142","\u3145"]};Object.fromEntries(Object.entries(jb).map(([e,t])=>[t.join(""),Ab[Number(e)]]));const Db="word_pair_index_v2",Sb="word_pair_index_sig_v2";let Ba=null;function Tb(e){if(e===null||typeof e!="object"||Array.isArray(e))return!1;for(const t of Object.values(e)){if(t===null||typeof t!="object"||Array.isArray(t))return!1;const r=t;for(const a of["cho","jung","jong"])if(!Array.isArray(r[a])||!r[a].every(s=>typeof s=="string"))return!1}return!0}function Mb(){try{if(typeof localStorage>"u")return null;const e=localStorage.getItem(Db),t=localStorage.getItem(Sb);if(!e||!t)return null;const r=JSON.parse(e);return Tb(r)?{index:r,sig:t}:null}catch{return null}}function $b(){if(Ba)return Ba;const e=Mb();return e?(Ba=e.index,e.sig,Ba):null}function Lb(e,t,r){return!(e>0)||!(t>0)?1:Math.max(1,Math.floor((e+r)/(t+r)))}function Rb(e,t){if(!(e>0))return 1;const r=Math.max(1,Math.floor(t));if(e<=r)return e;const a=Math.ceil(e/r);return Math.max(1,Math.ceil(e/a))}const Mo=/[ㄱ-ㅎ]/,Pb=/[ㅏ-ㅣ]/;function xi(e){e=e.normalize("NFC");for(let t=e.length-1;t>=0;t--){const r=e[t],a=r.charCodeAt(0);if(a>=44032&&a<=55203||Mo.test(r)||Pb.test(r))return r}return null}function Fb(e){const t=xi(e);if(!t)return"\uAC00";const r=t.charCodeAt(0);return r>=44032&&r<=55203?(r-44032)%28!==0?"\uC774":"\uAC00":Mo.test(t)?"\uC774":"\uAC00"}function Ib(e){return`${e}${Fb(e)}`}function Ob(e){const t=xi(e);if(!t)return"\uB97C";const r=t.charCodeAt(0);return r>=44032&&r<=55203?(r-44032)%28!==0?"\uC744":"\uB97C":Mo.test(t)?"\uC744":"\uB97C"}function zb(e){return`${e}${Ob(e)}`}function Wb(e,t,r){const a=e.slice(),[s]=a.splice(t,1);return a.splice(r,0,s),a}function Xr(e,t=Math.random){const r=e.slice();for(let a=r.length-1;a>0;a--){const s=Math.floor(t()*(a+1));[r[a],r[s]]=[r[s],r[a]]}return r}const Hb=()=>{const e="\uC54C \uC218 \uC5C6\uB294 \uC624\uB958",t=typeof Pt?.t=="function"?Pt.t("common.unknownError",{defaultValue:e}):void 0;return typeof t=="string"&&t?t:e};function $o(e,t){if(t===void 0&&(t=Hb()),e instanceof Error)return e.message||t;if(typeof e=="string")return e||t;if(e&&typeof e=="object"){const r=e;for(const a of[r.message,r.error_description,r.error])if(typeof a=="string"&&a)return a}return t}const ka=e=>e.split("/").filter(t=>t!=="");function Lo(e){const t=ka(e);return t[t.length-1]??e}function Ro(e){const t=ka(e);return t.length>1?t.slice(0,-1).join("/"):null}const Po=(e,t)=>!!e&&(e===t||e.startsWith(t+"/"));function _i(e){const t=new Set,r=[];for(const a of e){const s=ka(a);for(let l=1;l<=s.length;l+=1){const i=s.slice(0,l).join("/");t.has(i)||(t.add(i),r.push(i))}}return r}function Vb(e,t){return _i(e).filter(r=>Ro(r)===t)}function qb(e){const t=ka(e);return t.map((r,a)=>({path:t.slice(0,a+1).join("/"),label:r}))}function Ub(e){const t=_i(e),r=(a,s)=>t.filter(l=>Ro(l)===a).flatMap(l=>[{path:l,label:Lo(l),depth:s},...r(l,s+1)]);return r(null,0)}const Gb=(e,t)=>Ro(e)!==t&&!(t!==null&&Po(t,e)),Kb="__ihab_core_word_pool__";function wi(){return globalThis[Kb]??null}const Bi=globalThis;function ki(e,t){const r=a=>{};try{const a=t();a&&typeof a.catch=="function"&&a.catch(r)}catch(a){r(a)}}function Yb(e){ki("time",()=>Bi.__ihabTrainingTimeLogger?.(e))}function Zb(e){ki("completion",()=>Bi.__ihabTrainingCompletionLogger?.(e))}const Xb="Asia/Seoul",Jb=/^(\d{4}-\d{2}-\d{2})[T ](\d{2}:\d{2})(?::(\d{2})(?:\.(\d+))?)?$/;function Jr(e){let t;if(e instanceof Date)t=e;else if(typeof e=="string"){const r=e.trim(),a=/^(\d{4}-\d{2}-\d{2})(?:$|[T ])/.exec(r)?.[1];if(a){const l=new Date(`${a}T00:00:00Z`);if(Number.isNaN(l.getTime())||l.toISOString().slice(0,10)!==a)return null}const s=Jb.exec(r);t=new Date(s?`${s[1]}T${s[2]}:${s[3]??"00"}${s[4]?`.${s[4].slice(0,3).padEnd(3,"0")}`:""}+09:00`:r)}else t=new Date(e);return Number.isNaN(t.getTime())?null:t}function Qb(e){return Jr(e)!==null}const ey=e=>Jr(e);function Ai(e,t){const r=t.startsWith("ko")?"ko-KR":"en-US",a=ey(e);return a?a.toLocaleDateString(r,{timeZone:Xb,year:"numeric",month:"short",day:"numeric"}):""}function Fo(e){return e&&e.startsWith("ko")?"ko-KR":e||"en-US"}function ty(e,t,r){return!Number.isFinite(e)||!Number.isFinite(t)||t<1||t>12?`${e}-${t}`:new Intl.DateTimeFormat(Fo(r),{year:"numeric",month:"long"}).format(new Date(e,t-1,1))}function ny(e,t,r){return!Number.isFinite(e)||!Number.isFinite(t)||t<1||t>12?`${e}-${t}`:new Intl.DateTimeFormat(Fo(r),{year:"numeric",month:"short"}).format(new Date(e,t-1,1))}function Ni(e,t,r,a){return e("calendar.yearMonth",{year:r,month:a,defaultValue:""})||ty(r,a,t)}function Qr(){return Io(new Date)}function Aa(e){return e&&/^\d{4}-\d{2}-\d{2}$/.test(e)&&Jr(e)?.toISOString().slice(0,10)===e?e:Qr()}function kr(){return ay(Qr())}const ry=540*60*1e3;function Ei(e,t,r){return new Date(Date.UTC(e,t,r)-ry)}function ay(e){const[t,r,a]=e.split("-").map(Number);return new Date(t,(r||1)-1,a||1)}function Io(e){if(e==null||e==="")return"";const t=Jr(e);return t?new Intl.DateTimeFormat("fr-CA",{timeZone:"Asia/Seoul"}).format(t):""}function ji(e,t){if(!e)return"";const r=Jr(e);if(!r)return"";const a=r.getTime(),s=Math.max(0,Math.floor((Date.now()-a)/1e3)),l=Math.floor(s/60),i=Math.floor(l/60),u=Math.floor(i/24),c=Math.floor(u/7),p=Math.floor(u/30),h=Math.floor(u/365);return l<1?t("store.time.justNow","\uBC29\uAE08 \uC804"):l<60?t("store.time.minutesAgo",{n:l}):i<24?t("store.time.hoursAgo",{n:i}):u<7?t("store.time.daysAgo",{n:u}):c<5?t("store.time.weeksAgo",{n:c}):u<365?t("store.time.monthsAgo",{n:Math.min(p,11)}):t("store.time.yearsAgo",{n:h})}function Di(e,t={}){const{sep:r=".",pad:a=!0,trailingDot:s=!1,fallback:l="\u2014"}=t;if(!e)return l;const i=Io(e instanceof Date?e:String(e));if(!i)return l;const[u,c,p]=i.split("-"),h=a?c:String(Number(c)),d=a?p:String(Number(p));return`${u}${r}${h}${r}${d}${s?".":""}`}function Na(e){if(typeof e=="string"){const t=e.trim();return t&&Qb(t)?t:null}if(e instanceof Date)return Number.isNaN(e.getTime())?null:e.toISOString();if(typeof e=="number"&&Number.isFinite(e)){const t=new Date(e);return Number.isNaN(t.getTime())?null:t.toISOString()}return null}function mn(e){return typeof e=="string"?e.trim()||null:typeof e=="number"?String(e):null}function oy(e){for(const t of["correct","isCorrect","heard","judgement"])if(typeof e[t]=="boolean")return e[t];return e.score===1?!0:e.score===0?!1:null}function sy(e){return Array.isArray(e)?e.map((t,r)=>{const a=t??{};return{index:r,itemId:mn(a.contextCode)??mn(a.itemId)??mn(a.itemCode)??mn(a.id),question:mn(a.question)??mn(a.q)??mn(a.sentence)??mn(a.text)??mn(a.prompt)??mn(a.word)??mn(a.targetSyllable),answer:mn(a.answer),selected:mn(a.selectedText)??mn(a.selected),correct:oy(a),shownAt:Na(a.shownAt)??Na(a.shown_at),answeredAt:Na(a.answeredAt)??Na(a.answered_at)}}):[]}const Oo=globalThis;async function ly(){try{return await Oo.__ihabNoiseSettingsStore?.load()??null}catch{return null}}function zo(e){const t=r=>{};try{const r=Oo.__ihabNoiseSettingsStore?.save(e);r&&typeof r.catch=="function"&&r.catch(t)}catch(r){t(r)}}function Ea(e){try{Oo.__ihabNoiseSettingsStore?.applied?.(e)}catch{}}async function iy(e){if(typeof document<"u"){const t=document.activeElement;let r=null;try{if(r=document.createElement("textarea"),r.value=e,r.setAttribute("readonly",""),r.style.position="fixed",r.style.top="0",r.style.left="0",r.style.opacity="0",r.style.pointerEvents="none",document.body.appendChild(r),r.focus(),r.select(),r.setSelectionRange(0,e.length),document.execCommand("copy"))return!0}catch{}finally{if(r?.parentNode&&r.parentNode.removeChild(r),t&&t!==document.activeElement&&typeof t.focus=="function"&&t.isConnected)try{t.focus({preventScroll:!0})}catch{}}}try{if(typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText=="function")return await navigator.clipboard.writeText(e),!0}catch{}return!1}function Ar(e){if(!e)return e;const t=e.trim();return/^[₩$]/.test(t)?t:/원\s*$/.test(t)?"\u20A9"+t.replace(/\s*원\s*$/,"").trim():t}function Si(e,t){if(!e)return"-";const r=/^(\d{1,2}):(\d{2})$/.exec(e.trim());if(!r)return e;const a=Number(r[1]),s=Number(r[2]),l=r[1].padStart(2,"0");return s===0?t("date.timeH",{h:a,hh:l,mm:r[2]}):t("date.timeHM",{h:a,hh:l,m:s,mm:r[2]})}function Wo(e){return(e??0).toLocaleString("ko-KR")}const uy=[{key:"FOOD",label:"\uC74C\uC2DD",icon:"salad",color:"#FF8A65",subs:[{key:"TRKRFD",label:"\uD55C\uAD6D \uC804\uD1B5\uC74C\uC2DD"},{key:"MDKRFD",label:"\uD55C\uAD6D \uD604\uB300\uC74C\uC2DD"},{key:"WRLDFD",label:"\uC138\uACC4\uC758 \uC74C\uC2DD"},{key:"MTRFRT",label:"\uC2DD\uC7AC\uB8CC\uC640 \uACFC\uC77C"},{key:"GEFDKL",label:"\uC74C\uC2DD \uC0C1\uC2DD"}]},{key:"HLTH",label:"\uAC74\uAC15",icon:"heart",color:"#66BB6A",subs:[{key:"HTETHB",label:"\uAC74\uAC15\uD55C \uC2DD\uC2B5\uAD00"},{key:"DISILL",label:"\uBCD1\uACFC \uC9C8\uD658"},{key:"EXCISE",label:"\uC6B4\uB3D9"},{key:"GEHTKL",label:"\uAC74\uAC15\uC0C1\uC2DD"}]},{key:"WETH",label:"\uB0A0\uC528",icon:"sun-medium",color:"#42A5F5",subs:[{key:"GESSKL",label:"\uACC4\uC808\uC0C1\uC2DD"},{key:"SNWRAN",label:"\uB208\uACFC \uBE44"},{key:"WTHFCT",label:"\uC77C\uAE30\uC608\uBCF4"},{key:"GEWTKL",label:"\uB0A0\uC528\uC0C1\uC2DD"}]},{key:"PRSN",label:"\uC778\uBB3C",icon:"user-round",color:"#AB47BC",subs:[{key:"JODYPS",label:"\uC870\uC120\uC2DC\uB300"},{key:"MDKRPS",label:"\uD55C\uAD6D \uADFC\uD604\uB300"},{key:"THKDPS",label:"\uC0BC\uAD6D\uC2DC\uB300"},{key:"WRLART",label:"\uC138\uACC4\uC758 \uC608\uC220\uAC00"},{key:"WRLPSN",label:"\uC138\uACC4\uC758 \uC778\uBB3C"}]},{key:"KRCT",label:"\uD55C\uAD6D\uBB38\uD654",icon:"bow-arrow",color:"#EC407A",subs:[{key:"KRLANG",label:"\uC6B0\uB9AC\uB9D0"},{key:"TRPLCT",label:"\uC804\uD1B5\uB180\uC774"},{key:"HERITG",label:"\uBB38\uD654\uC7AC"},{key:"EVTFES",label:"\uD589\uC0AC\uC640 \uCD95\uC81C"},{key:"GECTKL",label:"\uC0C1\uC2DD"}]},{key:"STRY",label:"\uC774\uC57C\uAE30",icon:"message-circle",color:"#8D6E63",subs:[{key:"FRYTAL",label:"\uB3D9\uD654"},{key:"AMZING",label:"\uC2E0\uAE30\uD55C \uC774\uC57C\uAE30"},{key:"DAYSTR",label:"\uC77C\uC0C1 \uC18D \uC774\uC57C\uAE30"}]},{key:"LOCA",label:"\uC9C0\uC5ED",icon:"map-pin",color:"#26A69A",subs:[{key:"KRLDMK",label:"\uD55C\uAD6D\uC758 \uBA85\uC18C"},{key:"SELNMK",label:"\uC11C\uC6B8\uC758 \uBA85\uC18C"},{key:"WRDTRB",label:"\uC138\uACC4\uC5EC\uD589"},{key:"NAVIGT",label:"\uAE38 \uCC3E\uAE30"}]},{key:"SOAR",label:"\uC0AC\uD68C\uC640 \uC608\uC220",icon:"landmark",color:"#5C6BC0",subs:[{key:"KRSOCI",label:"\uD55C\uAD6D"},{key:"ECONEW",label:"\uACBD\uC81C\uC640 \uB274\uC2A4"},{key:"GENART",label:"\uC608\uC220"},{key:"GELFKL",label:"\uC0DD\uD65C \uC0C1\uC2DD"}]},{key:"NTSC",label:"\uC790\uC5F0\uACFC \uACFC\uD559",icon:"leaf",color:"#9CCC65",subs:[{key:"ANIMAL",label:"\uB3D9\uBB3C"},{key:"PLANTS",label:"\uC2DD\uBB3C"},{key:"ETHPLT",label:"\uC9C0\uAD6C"},{key:"TOLELC",label:"\uB3C4\uAD6C\uC640 \uC804\uC790\uC81C\uD488"},{key:"GESCKL",label:"\uACFC\uD559\uC0C1\uC2DD"}]},{key:"SPRT",label:"\uC2A4\uD3EC\uCE20",icon:"trophy",color:"#FFCA28",subs:[{key:"INVDSP",label:"\uAC1C\uC778\uACBD\uAE30"},{key:"MARART",label:"\uACA9\uD22C\uAE30"},{key:"TEAMSP",label:"\uB2E8\uCCB4\uACBD\uAE30"},{key:"FOOTBL",label:"\uCD95\uAD6C"},{key:"GESPKL",label:"\uC2A4\uD3EC\uCE20 \uC0C1\uC2DD"}]}],cy=[{key:"LISTEN_IN_NOISE",label:"\uC18C\uC74C \uD558 \uBB38\uC7A5 \uB4E3\uAE30",icon:"audio-lines",desc:"\uC18C\uC74C \uD658\uACBD \uC18D \uBB38\uC7A5 \uC774\uD574 \uD6C8\uB828"},{key:"SHORT_STORY",label:"\uC9E7\uC740 \uC774\uC57C\uAE30 \uB4E3\uAE30",icon:"message-square",desc:"\uC9E7\uC740 \uC774\uC57C\uAE30 + 4\uBB38\uC81C"},{key:"LONG_STORY",label:"\uAE34 \uC774\uC57C\uAE30 \uB4E3\uAE30",icon:"message-square-text",desc:"\uAE34 \uC774\uC57C\uAE30 \uC2EC\uD654 \uD6C8\uB828"},{key:"ORDERING_SENTENCE",label:"\uBB38\uC7A5 \uC21C\uC11C\uD654 \uD558\uAE30",icon:"align-start-vertical",desc:"\uC21C\uC11C \uBC30\uC5F4 \uD6C8\uB828"}];function Ti(){return uy}function dy(){return cy}const py=[],hy=[],my=[],fy=[];function Cy(){return{LISTEN_IN_NOISE:py,SHORT_STORY:hy,LONG_STORY:my,ORDERING_SENTENCE:fy}}const gy=[{key:"LISTEN_IN_NOISE",label:"\uC18C\uC74C \uD558 \uBB38\uC7A5 \uB4E3\uAE30",icon:"audio-lines",desc:"\uB2E4\uC591\uD55C \uC18C\uC74C \uD658\uACBD\uC5D0\uC11C \uBB38\uC7A5 \uCCAD\uB825\uC744 \uD6C8\uB828\uD569\uB2C8\uB2E4."},{key:"SHORT_STORY",label:"\uC9E7\uC740 \uC774\uC57C\uAE30 \uB4E3\uAE30",icon:"message-square",desc:"\uC9E7\uC740 \uC774\uC57C\uAE30\uB97C \uB4E3\uACE0 \uAE30\uC5B5\uD558\uC5EC \uBB38\uC81C\uB97C \uD480\uC5B4\uBD05\uB2C8\uB2E4."},{key:"LONG_STORY",label:"\uAE34 \uC774\uC57C\uAE30 \uB4E3\uAE30",icon:"message-square-text",desc:"\uAE34 \uC774\uC57C\uAE30\uB97C \uB4E3\uACE0 \uAE30\uC5B5\uD558\uC5EC \uB2E4\uC218\uC758 \uBB38\uC81C\uB97C \uD480\uC5B4\uBD05\uB2C8\uB2E4."},{key:"ORDERING_SENTENCE",label:"\uBB38\uC7A5 \uC21C\uC11C\uD654 \uD558\uAE30",icon:"align-start-vertical",desc:"\uC5EC\uB7EC\uAC1C\uC758 \uC9E7\uC740 \uBB38\uC7A5\uC744 \uB4E3\uACE0 \uAE30\uC5B5\uD558\uC5EC \uADF8 \uC21C\uC11C\uC5D0 \uB9DE\uAC8C \uBC30\uC5F4\uD569\uB2C8\uB2E4."}],Mi={LISTEN_IN_NOISE:"listenInNoise",SHORT_STORY:"shortStory",LONG_STORY:"longStory",ORDERING_SENTENCE:"orderingSentence"};function by(e){return gy.map(t=>{const r=Mi[t.key];return r?{...t,label:e(`trainingType.${r}.title`),desc:e(`trainingType.${r}.desc`)}:t})}var yy={statusFilter:"\uC0C1\uD0DC \uD544\uD130",pageSizeSelect:"\uD398\uC774\uC9C0\uB2F9 \uD45C\uC2DC \uAC1C\uC218",selectedCount:"{{count}}\uAC1C \uC120\uD0DD\uB428",selectedOfMax:"\uCD5C\uB300 {{max}}\uAC1C \uC911 {{count}}\uAC1C",cancel:"\uCDE8\uC18C",info:"\uC124\uBA85",errorState:{message:"\uBD88\uB7EC\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.",retry:"\uB2E4\uC2DC \uC2DC\uB3C4"},save:"\uC800\uC7A5",confirm:"\uD655\uC778",discardConfirm:{title:"\uC785\uB825\uC744 \uCDE8\uC18C\uD560\uAE4C\uC694?",body:"\uC800\uC7A5\uD558\uC9C0 \uC54A\uC73C\uBA74 \uC9C0\uAE08\uAE4C\uC9C0 \uC785\uB825\uD55C \uB0B4\uC6A9\uC774 \uC0AC\uB77C\uC9D1\uB2C8\uB2E4.",confirm:"\uC785\uB825 \uCDE8\uC18C"},close:"\uB2EB\uAE30",back:"\uB4A4\uB85C",emptyTrainingName:"\uD6C8\uB828 \uC774\uB984\uC774 \uBE44\uC5B4 \uC788\uC2B5\uB2C8\uB2E4.",remove:"\uC81C\uAC70",image:"\uC774\uBBF8\uC9C0",delete:"\uC0AD\uC81C",reset:"\uCD08\uAE30\uD654",update:"\uC5C5\uB370\uC774\uD2B8",download:"\uB2E4\uC6B4\uB85C\uB4DC",likeCount:"\uC88B\uC544\uC694 {{count}}",downloadCount:"\uAC00\uC838\uAC04 \uC218 {{count}}",descriptionFor:"{{name}} \uC124\uBA85",search:"\uAC80\uC0C9",empty:"\uB370\uC774\uD130\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",yes:"\uC608",no:"\uC544\uB2C8\uC624",all:"\uC804\uCCB4",none:"\uC5C6\uC74C",days:"{{count}}\uC77C",loadMore:"\uB354\uBCF4\uAE30",more:"\uB354\uBCF4\uAE30",moreFor:"{{name}} \uB354\uBCF4\uAE30",collapseFor:"{{name}} \uC811\uAE30",expandFor:"{{name}} \uD3BC\uCE58\uAE30",sortFor:"{{name}} \uC815\uB82C",retry:"\uB2E4\uC2DC \uC2DC\uB3C4",prevPage:"\uC774\uC804 \uD398\uC774\uC9C0",nextPage:"\uB2E4\uC74C \uD398\uC774\uC9C0",play:"\uC7AC\uC0DD",loading:"\uBD88\uB7EC\uC624\uB294 \uC911",playFor:"{{name}} \uC7AC\uC0DD",pauseFor:"{{name}} \uBA48\uCDA4",pause:"\uBA48\uCDA4",playPause:"\uC7AC\uC0DD / \uBA48\uCDA4",replay:"\uB2E4\uC2DC\uB4E3\uAE30",subscription:"\uC774\uC6A9\uAD8C",done:"\uC644\uB8CC",failed:"\uC2E4\uD328",continue:"\uACC4\uC18D",notification:"\uC54C\uB9BC",emptyList:"\uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",noMatches:"\uB9DE\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4",menu:"\uBA54\uB274",resetSelection:"\uC120\uD0DD \uCD08\uAE30\uD654",pageSizeLabel:"{{n}}\uAC1C\uC529 \uBCF4\uAE30",totalCountPrefix:"\uCD1D ",totalCountSuffix:"\uAC1C",expand:"\uD3BC\uCE58\uAE30",collapse:"\uC811\uAE30",popup:"\uD31D\uC5C5",codeBlock:"\uCF54\uB4DC \uBE14\uB85D",totalPrefix:"\uCD1D ",copyCode:"\uCF54\uB4DC \uBCF5\uC0AC",copied:"\uBCF5\uC0AC\uB428",col:{problem:"\uBB38\uC81C"},phonetics:{place:{labial:"\uC591\uC21C\uC74C",alveolar:"\uCE58\uC870\uC74C",palatal:"\uACBD\uAD6C\uAC1C\uC74C",velar:"\uC5F0\uAD6C\uAC1C\uC74C",glottal:"\uC131\uBB38\uC74C"},vowel:{frontHigh:"\uC804\uC124 \uACE0\uBAA8\uC74C",backHighUnrounded:"\uD6C4\uC124 \uACE0\uBAA8\uC74C \uD3C9\uC21C",backHighRounded:"\uD6C4\uC124 \uACE0\uBAA8\uC74C \uC6D0\uC21C",frontMid:"\uC804\uC124 \uC911\uBAA8\uC74C",backMidUnrounded:"\uD6C4\uC124 \uC911\uBAA8\uC74C \uD3C9\uC21C",backMidRounded:"\uD6C4\uC124 \uC911\uBAA8\uC74C \uC6D0\uC21C",low:"\uC800\uBAA8\uC74C"},glide:{j:"j\uD65C\uC74C",w:"w\uD65C\uC74C",velar:"\u0270\uD65C\uC74C"}},unknownError:"\uC54C \uC218 \uC5C6\uB294 \uC624\uB958",networkError:"\uB124\uD2B8\uC6CC\uD06C \uC5F0\uACB0\uC774 \uBD88\uC548\uC815\uD569\uB2C8\uB2E4. \uC5F0\uACB0 \uC0C1\uD0DC\uB97C \uD655\uC778\uD55C \uB4A4 \uB2E4\uC2DC \uC2DC\uB3C4\uD574 \uC8FC\uC138\uC694.",add:"\uCD94\uAC00"},vy={rangeSelect:"\uAE30\uAC04 \uC120\uD0DD",dow:["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"],weekOrdinal:["\uCCAB\uC9F8","\uB458\uC9F8","\uC14B\uC9F8","\uB137\uC9F8","\uB2E4\uC12F\uC9F8","\uC5EC\uC12F\uC9F8","\uC77C\uACF1\uC9F8"],yearMonthCompact:"{{year}}.{{month}}",weekLabel:"{{ord}}\uC8FC",weekLabelCompact:"{{ord}}\uC8FC",prevMonth:"\uC774\uC804 \uB2EC",addOnDate:"{{date}}\uC5D0 \uBC29\uBB38 \uB4F1\uB85D",nextMonth:"\uB2E4\uC74C \uB2EC",prevWeek:"\uC774\uC804 \uC8FC",nextWeek:"\uB2E4\uC74C \uC8FC",legend:{visited:"\uBC29\uBB38",scheduled:"\uC608\uC57D",noVisit:"\uBBF8\uBC29\uBB38"},periodSelect:"\uAE30\uAC04 \uB2E8\uC704",visitCount:"\uBC29\uBB38 {{count}}\uAC74",statusCount:"{{label}} {{count}}\uAC74"},xy={planSuffix:"\uC774\uC6A9\uAD8C",labeledPlan:"{{label}} \uC774\uC6A9\uAD8C",couponCode:"\uC774\uC6A9\uAD8C \uCF54\uB4DC",specialLabel:"\uC624\uD508\uD2B9\uAC00",unitDay:"\uC77C",unitYear:"\uB144",remainingDay:"{{n}}\uC77C \uB0A8\uC74C",remainingHour:"{{n}}\uC2DC\uAC04 \uB0A8\uC74C",remainingMinute:"{{n}}\uBD84 \uB0A8\uC74C",remainingSecond:"{{n}}\uCD08 \uB0A8\uC74C",expired:"\uB9CC\uB8CC\uB428",menu:{use:"\uC0AC\uC6A9\uD558\uAE30",refund:"\uD658\uBD88\uD558\uAE30",delete:"\uC0AD\uC81C\uD558\uAE30"}},_y={starLabel:"{{n}}\uBC88\uC9F8 \uBCC4 \uC120\uD0DD",valueLabel:"{{max}}\uC810 \uB9CC\uC810\uC5D0 {{value}}\uC810",groupLabel:"\uBCC4\uC810"},wy={selected:"\uC120\uD0DD\uB428"},By={placeholder:"\uC120\uD0DD"},ky={collapse:"\uC811\uAE30",expand:"\uD3BC\uCE58\uAE30"},Ay={biArea:"BI \uC601\uC5ED",biSymbol:"BI \uC2EC\uBCFC",logoMalgwi:"\uB9D0\uADC0 \uB85C\uACE0",logoManager:"\uB9D0\uADC0\uB9E4\uB2C8\uC800 \uB85C\uACE0",menuOpen:"\uBA54\uB274 \uC5F4\uAE30",utilMenu:"\uC720\uD2F8\uB9AC\uD2F0 \uBA54\uB274",menuClose:"\uBA54\uB274 \uB2EB\uAE30"},Ny={mainMenu:"\uBA54\uC778 \uBA54\uB274",bottomNav:"\uD558\uB2E8 \uB124\uBE44\uAC8C\uC774\uC158",goToManager:"\uB9D0\uADC0\uB9E4\uB2C8\uC800\uB85C \uC774\uB3D9",goToMalgwi:"\uB9D0\uADC0\uB85C \uC774\uB3D9",modeLabelManager:"\uB9D0\uADC0 \uB9E4\uB2C8\uC800",modeLabelMalgwi:"\uB9D0\uADC0",training:"\uD6C8\uB828",settings:"\uC124\uC815",notifications:"\uC54C\uB9BC",account:"\uACC4\uC815",help:"\uB3C4\uC6C0\uB9D0",feedback:"\uBC84\uADF8\uC2E0\uACE0",debug:"\uB514\uBC84\uADF8",coupons:"\uCFE0\uD3F0",topic:"\uC8FC\uC81C\uBCC4 \uB4E3\uAE30",trainingType:"\uD6C8\uB828\uBCC4 \uB4E3\uAE30",wordPairs:"\uB300\uB9BD\uC30D \uCC3E\uAE30",wordSearch:"\uB2E8\uC5B4 \uCC3E\uAE30",wordTable:"\uB2E8\uC5B4\uD45C \uB9CC\uB4E4\uAE30",company:"\uC5C5\uCCB4\uC815\uBCF4",more:"\uB354\uBCF4\uAE30",moreMenu:"\uB354\uBCF4\uAE30 \uBA54\uB274",badgeLabel:"{{label}}, {{count}}\uAC1C",badgeInsideLabel:"{{label}}, \uC548\uC5D0 \uC54C\uB9BC {{count}}\uAC1C"},Ey={cache:{cleared:"\uCE90\uC2DC\uAC00 \uC0AD\uC81C\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",group:{wordData:{label:"\uB2E8\uC5B4 \uB370\uC774\uD130",sub:"\uB2E8\uC5B4 \uBAA9\uB85D \uBC0F \uBC84\uC804 \uC815\uBCF4"},pairIndex:{label:"\uB2E8\uC5B4\uC30D \uC778\uB371\uC2A4",sub:"\uCD08\uC131\xB7\uC911\uC131\xB7\uC885\uC131 \uB300\uB9BD\uC30D \uBD84\uC11D \uCE90\uC2DC"},imageCache:{label:"\uC774\uBBF8\uC9C0 \uCE90\uC2DC",sub:"\uB2E8\uC5B4\uBCC4 \uC774\uBBF8\uC9C0 \uC874\uC7AC \uC5EC\uBD80 \uD655\uC778 \uACB0\uACFC"}}}},jy={couponButton:"\uCFE0\uD3F0 \uC785\uB825"},Dy={security:{password:{currentRequired:"\uD604\uC7AC \uBE44\uBC00\uBC88\uD638\uB97C \uC785\uB825\uD558\uC138\uC694.",newRequired:"\uC0C8 \uBE44\uBC00\uBC88\uD638\uB97C \uC785\uB825\uD558\uC138\uC694.",mismatch:"\uC0C8 \uBE44\uBC00\uBC88\uD638\uAC00 \uC77C\uCE58\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",changed:"\uBE44\uBC00\uBC88\uD638\uAC00 \uBCC0\uACBD\uB418\uC5C8\uC2B5\uB2C8\uB2E4."}}},Sy={settings:"\uC124\uC815",filter:{random:"\uBB34\uC791\uC704",trainOnset:"\uCD08\uC131",trainVowel:"\uBAA8\uC74C",trainCoda:"\uC885\uC131",phonemeGroup:"\uD6C8\uB828 \uC74C\uC808",noLimit:"\uBB34\uAD00",codaExclude:"\uC81C\uC678",gradeLabel:"\uB09C\uC774\uB3C4",excludeImageInfo:"\uC774\uBBF8\uC9C0 \uC788\uB294 \uB2E8\uC5B4\uB9CC: \uB2E8\uC5B4 \uC911\uC5D0 \uC774\uBBF8\uC9C0\uAC00 \uC788\uB294 \uB2E8\uC5B4\uB9CC \uACB0\uACFC\uC5D0 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4.",sameStructureInfo:"\uC74C\uC18C \uAD6C\uC870 \uAC19\uC740 \uB2E8\uC5B4\uB9CC: \uC815\uB2F5\uACFC \uC624\uB2F5\uC758 \uC74C\uC808 \uAD6C\uC870(\uAE00\uC790 \uC218\xB7\uBC1B\uCE68 \uC720\uBB34 \uB4F1)\uAC00 \uAC19\uC740 \uACB0\uACFC\uB9CC \uB0A8\uACA8\uC694.",selectSection:"\uC120\uD0DD",excludeImage:"\uC774\uBBF8\uC9C0 \uC788\uB294 \uB2E8\uC5B4\uB9CC",sameStructure:"\uC74C\uC18C \uAD6C\uC870 \uAC19\uC740 \uB2E8\uC5B4\uB9CC"},noQuestions:"\uBB38\uC81C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",countQuestions:"{{n}}\uBB38\uC81C",countSentences:"{{n}}\uBB38\uC7A5",nextQuestion:"\uB2E4\uC74C \uBB38\uC81C",noiseRatioTitle:"\uC18C\uC74C \uBE44\uC728",noiseRatioValue:"{{ratio}}\uBC30",noiseTypeTitle:"\uC18C\uC74C \uC885\uB958",playVolumeTitle:"\uC804\uCCB4 \uC18C\uB9AC",playSpeedTitle:"\uC7AC\uC0DD \uC18D\uB3C4",meter:{sentence:"\uC7AC\uC0DD",noise:"\uC18C\uC74C",toggle:"\uC624\uB514\uC624 \uBBF8\uD130 \uD45C\uC2DC"},viewResult:"\uACB0\uACFC\uBCF4\uAE30",problemNotice:"{{n}}\uBC88 \uBB38\uC81C \uC785\uB2C8\uB2E4.",trainingSettingsTitle:"\uD6C8\uB828 \uC124\uC815",sentencePreview:"\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30",notHeard:"\uC548 \uB4E4\uB838\uC5B4\uC694.",heardWell:"\uC798 \uB4E4\uB838\uC5B4\uC694.",confirmTitle:"\uBB38\uC7A5\uC744 \uD655\uC778\uD558\uACE0 \uC798 \uB4E4\uB838\uB294\uC9C0 \uC120\uD0DD\uD558\uC138\uC694.",noSoundWaveform:"\uC18C\uB9AC \uBE44\uAD50 \uBB38\uC81C\uB294 \uC6E8\uC774\uBE0C\uD3FC\uC744 \uD45C\uD604\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",noise:{level:{none:"\uC5C6\uC74C",weak:"\uC57D\uD568",medium:"\uBCF4\uD1B5",strong:"\uAC15\uD568",veryStrong:"\uB9E4\uC6B0 \uAC15\uD568"},type:{none:"\uC5C6\uC74C",default:"\uAE30\uBCF8",street:"\uAE38\uAC70\uB9AC",buzz:"\uC640\uAE00\uC640\uAE00",restaurant:"\uC2DD\uB2F9"}},listenTitle:"\uC81C\uC2DC\uD558\uB294 \uBB38\uC7A5\uC744 \uB4E4\uC5B4\uC8FC\uC138\uC694.",listenButton:"\uBB38\uC7A5 \uB4E3\uAE30",playSound:"\uC18C\uB9AC \uB4E3\uAE30",playSoundFor:"{{name}} \uC18C\uB9AC \uB4E3\uAE30",playAll:"\uBAA8\uB450 \uB4E3\uAE30",selectInOrder:"\uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uCE74\uB4DC\uB97C \uC120\uD0DD\uD558\uC138\uC694.",stop:"\uC815\uC9C0",preview:"\uBBF8\uB9AC \uB4E3\uAE30",previewFor:"{{name}} \uBBF8\uB9AC \uB4E3\uAE30",stopFor:"{{name}} \uC815\uC9C0",next:"\uB2E4\uC74C",completed:"\uD6C8\uB828 \uC644\uB8CC",selected:"\uC120\uD0DD\uB428",nthSelected:"{{n}}\uBC88\uC9F8 \uC120\uD0DD",fontSizeMin:"\uAE00\uC528 \uD06C\uAE30\uAC00 \uCD5C\uC18C\uC785\uB2C8\uB2E4.",fontSizeMax:"\uAE00\uC528 \uD06C\uAE30\uAC00 \uCD5C\uB300\uC785\uB2C8\uB2E4.",fontSizeDecrease:"\uAE00\uC790 \uD06C\uAE30 \uAC10\uC18C",fontSizeIncrease:"\uAE00\uC790 \uD06C\uAE30 \uC99D\uAC00",toggleBackground:"\uBC30\uACBD \uC804\uD658",cardInstructions:"\uB0B1\uB9D0 \uCE74\uB4DC\uB97C \uBCF4\uACE0 \uC18C\uB9AC\uB97C \uB4E3\uACE0 \uD655\uC778\uD558\uC138\uC694.",noCards:"\uCE74\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",audioFetchError:"\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.",ttsUnavailable:"\uC774 \uAE30\uAE30\uC5D0\uC11C\uB294 \uC74C\uC131\uC744 \uB4E4\uB824\uC904 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.",selectConfirm:"\uBB38\uC81C\uB97C \uBCF4\uACE0 \uD574\uB2F9\uD558\uB294 \uB0B4\uC6A9\uC744 \uC120\uD0DD\uD558\uC138\uC694.",orderListDefault:"\uBB38\uC7A5\uC744 \uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uBC30\uCE58\uD558\uC138\uC694.",result:{pendingDone:"\uACB0\uACFC\uB97C \uACC4\uC0B0\uD558\uB294 \uC911\uC774\uB77C \uC544\uC9C1 \uC644\uB8CC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.",eyebrow:"\uD6C8\uB828 \uC644\uB8CC",title:"\uD6C8\uB828\uC744 \uBAA8\uB450 \uB9C8\uCCE4\uC2B5\uB2C8\uB2E4.",scoreAria:"{{correct}} / {{total}} \uBB38\uD56D",elapsed:"\uC18C\uC694 \uC2DC\uAC04",tableAriaLabel:"\uBB38\uD56D\uBCC4 \uD310\uC815",colJudge:"\uD310\uC815",colAnswerSelected:"\uC815\uB2F5 \xB7 \uC120\uD0DD",colAnswer:"\uC815\uB2F5",colSelected:"\uC120\uD0DD",heardWell:"\uC798 \uB4E4\uC5C8\uC5B4\uC694",notHeard:"\uBABB \uB4E4\uC5C8\uC5B4\uC694",notJudged:"\uBBF8\uD310\uC815",replay:"\uB2E4\uC2DC\uD558\uAE30",replaySound:"{{no}}\uBC88 \uB2E4\uC2DC \uB4E3\uAE30",replaySoundStop:"{{no}}\uBC88 \uB4E3\uAE30 \uBA48\uCDA4",done:"\uC644\uB8CC",noContent:"(\uB0B4\uC6A9\uC5C6\uC74C)"},up:"\uC704\uB85C",down:"\uC544\uB798\uB85C",prev:"\uC774\uC804",listenLabel:"\uBB38\uC7A5 \uB4E3\uAE30",sourcePlay:"\uC18C\uC2A4 {{n}} \uC7AC\uC0DD",listen:"\uB4E3\uAE30",audioStatus:{synthesizing:"\uC18C\uB9AC\uB97C \uB9CC\uB4E4\uACE0 \uC788\uC2B5\uB2C8\uB2E4\u2026",preparing:"\uC18C\uB9AC\uB97C \uC900\uBE44\uD558\uACE0 \uC788\uC2B5\uB2C8\uB2E4\u2026"}},Ty={totalCount:"\uBA85\uC758 \uACE0\uAC1D",loadError:"\uBAA9\uB85D\uC744 \uBD88\uB7EC\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.",device:{title:"\uCCAD\uAC01\uC7AC\uD65C\uAE30\uAE30",addButton:"\uAE30\uAE30 \uCD94\uAC00",historyEmpty:"\uB4F1\uB85D\uB41C \uAE30\uAE30 \uC774\uB825\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",wearing:"\uCE21 \uCC29\uC6A9\uC911",notRegistered:"\uBBF8\uB4F1\uB85D",unit:"\uAC1C",wearingNow:"\uCC29\uC6A9",wear:"\uCC29\uC6A9",unwear:"\uCC29\uC6A9 \uD574\uC81C",wornSince:"{{date}}\uBD80\uD130",historyTitle:"\uCCAD\uAC01\uC7AC\uD65C\uAE30\uAE30 \uC774\uB825"},schedule:{registerTitle:" \uACE0\uAC1D\uB2D8 \uBC29\uBB38 \uC608\uC815 \uB4F1\uB85D"},visitHistory:{empty:"\uC544\uC9C1 \uBC29\uBB38 \uAE30\uB85D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",popupTitle:" \uACE0\uAC1D\uB2D8 \uBC29\uBB38 \uC774\uB825",registerTitle:" \uACE0\uAC1D\uB2D8 \uC2E0\uADDC \uBC29\uBB38 \uB4F1\uB85D"},moreItems:"\uB354 \uC788\uC74C",viewAll:"\uC804\uCCB4 \uBCF4\uAE30",duration:{minSec:"{{m}}\uBD84 {{s}}\uCD08",min:"{{m}}\uBD84",sec:"{{s}}\uCD08"},consent:{record:"\uB3D9\uC758 \uBC1B\uAE30",kinds:"\uBC1B\uC740 \uAC08\uB798",methodTitle:"\uBC1B\uC740 \uBC29\uBC95",sourceTitle:"\uC218\uC9D1 \uCD9C\uCC98",day:"\uBC1B\uC740 \uB0A0",note:"\uBA54\uBAA8",notePlaceholder:"\uC758\uB8B0\uAE30\uAD00 \uC774\uB984 \uB4F1 \u2014 \uBBFC\uAC10\uD55C \uB0B4\uC6A9\uC740 \uC801\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4",submit:"\uC800\uC7A5\uD558\uAE30",allTaken:"\uC138 \uAC08\uB798\uB97C \uC774\uBBF8 \uB2E4 \uBC1B\uC558\uC2B5\uB2C8\uB2E4. \uB2E4\uC2DC \uBC1B\uC73C\uB824\uBA74 \uBA3C\uC800 \uCCA0\uD68C\uD558\uC138\uC694.",kind:{personal:"\uC77C\uBC18 \uAC1C\uC778\uC815\uBCF4",sensitive:"\uBBFC\uAC10\uC815\uBCF4(\uCCAD\uB825\xB7\uC9C4\uB2E8)",marketing:"\uAD11\uACE0\uC131 \uC815\uBCF4 \uC218\uC2E0"},method:{paper:"\uC11C\uBA74",verbal:"\uAD6C\uB450",electronic:"\uC804\uC790"},source:{self:"\uBCF8\uC778",guardian:"\uBCF4\uD638\uC790",referral:"\uC758\uB8B0\uAE30\uAD00"}}},My={plan:{recommendedFor:"\uC774\uB7F0 \uBD84\uAED8 \uCD94\uCC9C\uD569\uB2C8\uB2E4.",features:"\uD575\uC2EC \uAE30\uB2A5",freePrice:"\uBB34\uB8CC",contact:"\uBB38\uC758\uD558\uAE30",tierFallback:"\uC774\uC6A9\uAD8C",openPromo:"\uC624\uD508 \uD2B9\uAC00"},products:{mgrEnterprise:{tier:{price:"\uBB38\uC758"}}}},$y={input:{label:"\uCFE0\uD3F0 \uCF54\uB4DC",placeholder:"\uCFE0\uD3F0 \uCF54\uB4DC \uC785\uB825"},applyButton:"\uC801\uC6A9"},Ly={showN:"{{n}}\uAC1C\uC529"},Ry={title:"\uD6C8\uB828\uBCC4 \uB4E3\uAE30",subtitle:"\uC6D0\uD558\uB294 \uD6C8\uB828 \uC720\uD615\uC744 \uC120\uD0DD\uD558\uC138\uC694.",listenInNoise:{title:"\uC18C\uC74C \uD558 \uBB38\uC7A5 \uB4E3\uAE30",desc:"\uB2E4\uC591\uD55C \uC18C\uC74C \uD658\uACBD\uC5D0\uC11C \uBB38\uC7A5 \uCCAD\uB825\uC744 \uD6C8\uB828\uD569\uB2C8\uB2E4."},shortStory:{title:"\uC9E7\uC740 \uC774\uC57C\uAE30 \uB4E3\uAE30",desc:"\uC9E7\uC740 \uC774\uC57C\uAE30\uB97C \uB4E3\uACE0 \uB0B4\uC6A9\uC744 \uC774\uD574\uD569\uB2C8\uB2E4."},longStory:{title:"\uAE34 \uC774\uC57C\uAE30 \uB4E3\uAE30",desc:"\uAE34 \uC774\uC57C\uAE30\uB97C \uC9D1\uC911\uD574\uC11C \uB4E3\uACE0 \uB0B4\uC6A9\uC744 \uD30C\uC545\uD569\uB2C8\uB2E4."},orderingSentence:{title:"\uBB38\uC7A5 \uC21C\uC11C\uD654",desc:"\uB4E4\uC740 \uBB38\uC7A5\uB4E4\uC744 \uC62C\uBC14\uB978 \uC21C\uC11C\uB85C \uBC30\uC5F4\uD569\uB2C8\uB2E4."},SAME_SOUND_PICK:{label:"\uAC19\uC740 \uC18C\uB9AC \uACE0\uB974\uAE30",sub:"\uB4E4\uC740 \uC18C\uB9AC\uC640 \uAC19\uC740 \uB2E8\uC5B4 \uCE74\uB4DC\uB97C \uACE0\uB974\uC138\uC694."},SAME_OR_DIFF:{label:"\uAC19\uC740\uC9C0 \uB2E4\uB978\uC9C0 \uB9DE\uD788\uAE30",sub:"\uB450 \uC18C\uB9AC\uAC00 \uAC19\uC740\uC9C0, \uB2E4\uB978\uC9C0 \uAD6C\uBD84\uD558\uC138\uC694."},HEAR_AND_PICK_SAME:{label:"\uC77C\uCE58\uD558\uB294 \uB2E8\uC5B4 \uB9DE\uD788\uAE30",sub:"\uB4E4\uC740 \uC18C\uB9AC\uC758 \uB2E8\uC5B4 \uCE74\uB4DC\uB97C \uACE0\uB974\uC138\uC694."},HEAR_AND_PICK_INCLUDED:{label:"\uD55C \uC74C\uC808 \uD3EC\uD568 \uB2E8\uC5B4 \uB9DE\uD788\uAE30",sub:"\uB4E4\uC740 \uC74C\uC808\uC774 \uD3EC\uD568\uB41C \uB2E8\uC5B4 \uCE74\uB4DC\uB97C \uACE0\uB974\uC138\uC694."},STARTS_WITH_SAME_SOUND:{label:"\uCCAB \uC74C\uC808\uC774 \uAC19\uC740 \uB2E8\uC5B4 \uB9DE\uD788\uAE30",sub:"\uB4E4\uC740 \uB2E8\uC5B4\uC640 \uAC19\uC740 \uC18C\uB9AC\uB85C \uC2DC\uC791\uD558\uB294 \uB2E8\uC5B4\uB97C \uACE0\uB974\uC138\uC694."},LISTEN_AND_REMEMBER_ORDER:{label:"\uB4E3\uACE0 \uC21C\uC11C\uB300\uB85C \uAE30\uC5B5\uD558\uAE30",sub:"\uC138 \uB2E8\uC5B4\uB97C \uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uCE74\uB4DC\uB97C \uC120\uD0DD\uD558\uC138\uC694."},MERGE_2_SYLLABLES:{label:"\uC74C\uC808 2\uAC1C \uD569\uCE58\uAE30",sub:"\uB450 \uC74C\uC808\uC744 \uD569\uCE58\uBA74 \uC5B4\uB5A4 \uB2E8\uC5B4\uAC00 \uB420\uAE4C\uC694?"},MERGE_3_SYLLABLES:{label:"\uC74C\uC808 3\uAC1C \uD569\uCE58\uAE30",sub:"\uC138 \uC74C\uC808\uC744 \uD569\uCE58\uBA74 \uC5B4\uB5A4 \uB2E8\uC5B4\uAC00 \uB420\uAE4C\uC694?"},MERGE_2_PHONEMES:{label:"\uC74C\uC18C 2\uAC1C \uD569\uCE58\uAE30",sub:"\uB450 \uC74C\uC18C\uB97C \uD569\uCE58\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"},MERGE_3_PHONEMES:{label:"\uC74C\uC18C 3\uAC1C \uD569\uCE58\uAE30",sub:"\uC138 \uC74C\uC18C\uB97C \uD569\uCE58\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"},DROP_1_FROM_2SYLL:{label:"2\uC74C\uC808\uC5D0\uC11C \uD55C \uC74C\uC808 \uD0C8\uB77D",sub:"2\uC74C\uC808 \uB2E8\uC5B4\uC5D0\uC11C \uD55C \uC74C\uC808\uC744 \uBE7C\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"},DROP_1_FROM_3SYLL:{label:"3\uC74C\uC808\uC5D0\uC11C \uD55C \uC74C\uC808 \uD0C8\uB77D",sub:"3\uC74C\uC808 \uB2E8\uC5B4\uC5D0\uC11C \uD55C \uC74C\uC808\uC744 \uBE7C\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"},DROP_PART_FROM_COMPOUND:{label:"\uD569\uC131\uC5B4\uC5D0\uC11C \uBD80\uBD84 \uD0C8\uB77D",sub:"\uD569\uC131\uC5B4\uC758 \uC77C\uBD80\uB97C \uBE7C\uBA74 \uC5B4\uB5A4 \uB2E8\uC5B4\uAC00 \uB420\uAE4C\uC694?"},DROP_FINAL_CONSONANT_FROM_1SYLL:{label:"1\uC74C\uC808\uC5D0\uC11C \uBC1B\uCE68 \uD0C8\uB77D",sub:"\uBC1B\uCE68\uC744 \uBE7C\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"},REMOVE_CONSONANT_AND_IDENTIFY_PHONEME:{label:"1\uC74C\uC808\uC5D0\uC11C \uC790\uC74C \uD0C8\uB77D",sub:"\uC790\uC74C\uC744 \uBE7C\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB0A8\uC744\uAE4C\uC694?"},CHANGE_1_SYLL_IN_2SYLL:{label:"2\uC74C\uC808\uC5D0\uC11C \uD55C \uC74C\uC808 \uBC14\uAFB8\uAE30",sub:"2\uC74C\uC808 \uB2E8\uC5B4\uC758 \uD55C \uC74C\uC808\uC744 \uBC14\uAFD4 \uC0C8 \uB2E8\uC5B4\uB97C \uB9CC\uB4DC\uC138\uC694."},CHANGE_1_SYLL_IN_3SYLL:{label:"3\uC74C\uC808\uC5D0\uC11C \uD55C \uC74C\uC808 \uBC14\uAFB8\uAE30",sub:"3\uC74C\uC808 \uB2E8\uC5B4\uC758 \uD55C \uC74C\uC808\uC744 \uBC14\uAFD4 \uC0C8 \uB2E8\uC5B4\uB97C \uB9CC\uB4DC\uC138\uC694."},CHANGE_1_PHONEME_IN_1SYLL:{label:"1\uC74C\uC808 \uB2E8\uC5B4 \uC911 1\uAC1C \uC74C\uC18C \uBC14\uAFB8\uAE30",sub:"1\uC74C\uC808 \uB2E8\uC5B4\uC758 \uD55C \uC74C\uC18C\uB97C \uBC14\uAFD4 \uC0C8 \uC18C\uB9AC\uB97C \uB9CC\uB4DC\uC138\uC694."},CHANGE_1_PHONEME_IN_2SYLL:{label:"2\uC74C\uC808 \uB2E8\uC5B4 \uC911 1\uAC1C \uC74C\uC18C \uBC14\uAFB8\uAE30",sub:"2\uC74C\uC808 \uB2E8\uC5B4\uC758 \uD55C \uC74C\uC18C\uB97C \uBC14\uAFD4 \uC0C8 \uB2E8\uC5B4\uB97C \uB9CC\uB4DC\uC138\uC694."}},Py={newBadge:"\uC0C8\uB85C \uB9CC\uB4E0 \uD45C",publishedBadge:"\uBC1C\uD589\uB428",sharedBadge:"\uACF5\uC720 \uC911"},Fy={title:"\uC8FC\uC694 \uB2E8\uC5B4",empty:"\uCD94\uCD9C\uB41C \uC8FC\uC694 \uB2E8\uC5B4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."},Iy={defaultName:"\uB2E8\uC5B4 \uD45C",title:"\uB2E8\uC5B4 \uD45C \uB9CC\uB4E4\uAE30",subtitle:"\uCE78\uC744 \uC124\uC815\uD558\uACE0 \uB2E8\uC5B4\uB97C \uCD94\uAC00\uD558\uC5EC \uD45C\uB97C \uB9CC\uB4ED\uB2C8\uB2E4.",filterTitle:"\uD45C \uC124\uC815",filter:{composition:"\uAD6C\uC131",image:"\uC774\uBBF8\uC9C0",word:"\uB2E8\uC5B4",caption:"\uC720\uD615",standardPron:"\uD45C\uC900 \uBC1C\uC74C",colloquialPron:"\uAD6C\uC5B4\uCCB4 \uBC1C\uC74C",paperOrientation:"\uC6A9\uC9C0 \uBC29\uD5A5",landscape:"\uAC00\uB85C",portrait:"\uC138\uB85C",columns:"\uCE78 \uC218",column:"{{count}}\uCE78",itemsPerPageWord:"\uD398\uC774\uC9C0\uB2F9 \uB2E8\uC5B4 \uC218",itemsPerPagePair:"\uD398\uC774\uC9C0\uB2F9 \uB300\uB9BD\uC30D \uC218",itemsPerPageOption:"{{count}}\uAC1C",pageIndicator:"{{current}} / {{total}}",pageNumber:"\uD398\uC774\uC9C0 \uBC88\uD638",pageNumberLeft:"\uC67C\uCABD",pageNumberCenter:"\uC911\uC559",pageNumberRight:"\uC624\uB978\uCABD",border:"\uC678\uACFD\uC120",topInfo:"\uC0C1\uB2E8 \uC815\uBCF4",bottomInfo:"\uD558\uB2E8 \uC815\uBCF4",cutLine:"\uC808\uCDE8\uC120",show:"\uD45C\uC2DC",hide:"\uBBF8\uD45C\uC2DC",dotted:"\uC810\uC120",corner:"\uCF54\uB108"},addWord:"\uCD94\uAC00\uD558\uAE30",copyItem:"\uD55C \uCE78 \uB354",copyItemAria:"{{n}}\uBC88 \uCE78 \uB0B1\uB9D0\uC744 \uD55C \uCE78 \uB354",wordInfo:"{{word}} \uB0B1\uB9D0 \uC815\uBCF4",emptyItems:"\uB2E8\uC5B4\uB97C 1\uAC1C \uC774\uC0C1 \uCD94\uAC00\uD574\uC8FC\uC138\uC694.",load:"\uBD88\uB7EC\uC624\uAE30",openNewWindow:"\uC0C8 \uCC3D\uC73C\uB85C \uBCF4\uAE30",saveButton:"\uC800\uC7A5\uD558\uAE30",saveAsNewButton:"\uB2E4\uB978 \uC774\uB984\uC73C\uB85C \uC800\uC7A5",print:"\uC778\uC1C4\uD558\uAE30",popupBlocked:"\uD31D\uC5C5\uC774 \uCC28\uB2E8\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uBE0C\uB77C\uC6B0\uC800 \uC124\uC815\uC5D0\uC11C \uD31D\uC5C5\uC744 \uD5C8\uC6A9\uD574 \uC8FC\uC138\uC694.",printFileNameSingle:"\uB2E8\uC5B4\uD45C",printFileNamePair:"\uB300\uB9BD\uC30D\uD45C",save:{title:"\uB2E8\uC5B4\uD45C \uC800\uC7A5\uD558\uAE30",nameLabel:"\uC774\uB984",desc:"\uC800\uC7A5\uD560 \uB2E8\uC5B4 \uD45C\uC758 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.",placeholder:"\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694.",descriptionLabel:"\uC124\uBA85",descriptionPlaceholder:"\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC124\uBA85\uC744 \uC785\uB825\uD558\uC138\uC694.",duplicateName:"\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4.",nameRequired:"\uD45C \uC774\uB984\uC744 \uC785\uB825\uD574 \uC8FC\uC138\uC694.",autoFillHint:" (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)",copyName:"{{name}} (\uBCF5\uC0AC)"},loadTable:{title:"\uC800\uC7A5\uB41C \uB2E8\uC5B4 \uD45C \uBD88\uB7EC\uC624\uAE30",empty:"\uC800\uC7A5\uB41C \uB2E8\uC5B4 \uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",loadButton:"\uBD88\uB7EC\uC624\uAE30",itemCount:"{{count}}\uAC1C",deleteAriaLabel:"{{name}} \uC0AD\uC81C",viewLabel:"\uBCF4\uAE30 \uBC29\uC2DD",sortLabel:"\uC815\uB82C",sort:{newest:"\uCD5C\uC2E0\uC21C",oldest:"\uC624\uB798\uB41C\uC21C",name:"\uC774\uB984\uC21C",count:"\uB2E8\uC5B4 \uC218"},view:{grid:"\uD45C\uB85C \uBCF4\uAE30",list:"\uB9AC\uC2A4\uD2B8\uB85C \uBCF4\uAE30"}},publisherFilter:"{{name}} \uAC8C\uC2DC\uD55C \uAC83\uB9CC \uBCF4\uAE30",groupDeleteMessage:"\uADF8\uB8F9 \uB0B4 \uB2E8\uC5B4\uD45C\uB294 '\uADF8\uB8F9 \uC5C6\uC74C'\uC73C\uB85C \uC774\uB3D9\uD569\uB2C8\uB2E4.",groupNamePlaceholder:"\uADF8\uB8F9 \uC774\uB984",scoring:{o:"{{word}} \uB9DE\uC74C",triangle:"{{word}} \uC560\uB9E4",x:"{{word}} \uD2C0\uB9BC",markName:{o:"\uB9DE\uC74C",triangle:"\uC560\uB9E4",x:"\uD2C0\uB9BC"},button:"\uCC44\uC810\uD558\uAE30",pickTitle:"\uB204\uAD6C\uB97C \uCC44\uC810\uD560\uAE4C\uC694?",pickSubtitle:"\u2018{{name}}\u2019 \uD45C\uB85C \uD6C8\uB828\uD55C \uACE0\uAC1D\uC744 \uACE0\uB974\uC138\uC694.",pickSearch:"\uC774\uB984 \uB610\uB294 \uC804\uD654\uBC88\uD638\uB85C \uCC3E\uAE30",pickEmpty:"\uB4F1\uB85D\uB41C \uACE0\uAC1D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",pickNoMatch:"\uCC3E\uB294 \uACE0\uAC1D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",pickAgain:"\uACE0\uAC1D \uB2E4\uC2DC \uACE0\uB974\uAE30",scoringFor:"{{name}} \uB2D8 \uCC44\uC810 \uC911",none:"\uCE78 \uC544\uB798 \u25CB \xB7 \u25B3 \xB7 \u2715 \uB97C \uB20C\uB7EC \uB9E4\uAE30\uC138\uC694. \uB9C8\uC6B0\uC2A4\uB85C\uB294 \uCE78\uC5D0 \uC190\uC744 \uC5B9\uC73C\uBA74, \uC790\uD310\uC73C\uB85C\uB294 \uCE78\uC5D0 \uCD08\uC810\uC774 \uAC00\uBA74 \uB098\uD0C0\uB0A9\uB2C8\uB2E4.",tally:"{{marked}}\uCE78 \uCC44\uC810 \xB7 \u25CB {{o}} \xB7 \u25B3 {{triangle}} \xB7 \u2715 {{x}} \xB7 \uC815\uB2F5\uB960 {{rate}}%",save:"\uCC44\uC810 \uC800\uC7A5",saved:"{{name}} \uB2D8\uC758 \uCC44\uC810 {{count}}\uCE78\uC744 \uC800\uC7A5\uD588\uC2B5\uB2C8\uB2E4.",reviewTitle:"\uBCF5\uC2B5\uD45C\uB97C \uB9CC\uB4E4\uAE4C\uC694?",reviewMessage:"{{name}} \uB2D8\uC774 \uD2C0\uB9AC\uAC70\uB098 \uC560\uB9E4\uD588\uB358 {{count}}\uCE78\uC73C\uB85C \uC0C8 \uD45C\uB97C \uB9CC\uB4ED\uB2C8\uB2E4. \uB9DE\uD78C \uCE78\uC740 \uBE60\uC9D1\uB2C8\uB2E4.",reviewConfirm:"\uBCF5\uC2B5\uD45C \uB9CC\uB4E4\uAE30",reviewDescription:"\u2018{{name}}\u2019 \uCC44\uC810\uC5D0\uC11C \uD2C0\uB9AC\uAC70\uB098 \uC560\uB9E4\uD588\uB358 {{count}}\uCE78\uC744 \uBAA8\uC740 \uD45C\uC785\uB2C8\uB2E4.",reviewCreated:"\u2018{{name}}\u2019\uC744(\uB97C) \uB9CC\uB4E4\uC5C8\uC2B5\uB2C8\uB2E4 \u2014 {{count}}\uCE78.",discardTitle:"\uB9E4\uAE34 \uCC44\uC810\uC744 \uBC84\uB9B4\uAE4C\uC694?",discardMessage:"{{count}}\uCE78\uC744 \uB9E4\uACBC\uC9C0\uB9CC \uC544\uC9C1 \uC800\uC7A5\uD558\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4. \uB098\uAC00\uBA74 \uC0AC\uB77C\uC9D1\uB2C8\uB2E4.",discardConfirm:"\uBC84\uB9AC\uACE0 \uB098\uAC00\uAE30"},info:{grade:"\uB09C\uC774\uB3C4: {{n}}\uB4F1\uAE09",syllables:"\uC74C\uC808 \uC218: {{n}}\uC74C\uC808",pos:"\uD488\uC0AC: {{v}}",wordType:"\uC720\uD615: {{v}}"},pos:{noun:"\uBA85\uC0AC",verb:"\uB3D9\uC0AC",adjective:"\uD615\uC6A9\uC0AC",adverb:"\uBD80\uC0AC",numeral:"\uC218\uC0AC",determiner:"\uAD00\uD615\uC0AC",interjection:"\uAC10\uD0C4\uC0AC",particle:"\uC870\uC0AC",affix:"\uC811\uC0AC",dependentNoun:"\uC758\uC874\uBA85\uC0AC",pronoun:"\uB300\uBA85\uC0AC",auxVerb:"\uBCF4\uC870\uB3D9\uC0AC",auxAdjective:"\uBCF4\uC870\uD615\uC6A9\uC0AC"},reorder:{moved:"{{total}}\uCE78 \uAC00\uC6B4\uB370 {{n}}\uBC88\uC9F8\uB85C \uC62E\uAE40",handle:"{{word}} \uC21C\uC11C \uBC14\uAFB8\uAE30 (Alt + \uD654\uC0B4\uD45C)",hint:"Alt + \u2190 \u2192 \uB85C \uC21C\uC11C \uBC14\uAFB8\uAE30"},thumbMore:"+{{count}}",replaceItem:"\uB2E4\uB978 \uB2E8\uC5B4\uB85C",replacePair:"\uB2E4\uB978 \uC30D\uC73C\uB85C",replaceItemAria:"{{n}}\uBC88 \uCE78\uB9CC \uB2E4\uB978 \uB2E8\uC5B4\uB85C",replacePairAria:"{{n}}\uBC88 \uCE78\uB9CC \uB2E4\uB978 \uC30D\uC73C\uB85C",thumbMoreAria:"\uADF8 \uBC16 {{count}}\uCE78: {{words}}",pickForm:"\uB2E4\uB978 \uAF34\uB85C",pickFormAria:"{{n}}\uBC88 \uCE78 \uB0B1\uB9D0\uC744 \uB2E4\uB978 \uAF34\uB85C",pickFormBaseAria:"\uAE30\uBCF8\uD615 \uB0B1\uB9D0\uC744 \uB2E4\uB978 \uAF34\uB85C"},Oy={filterTitle:"\uB2E8\uC5B4 \uAC80\uC0C9 \uC124\uC815",filter:{positionAny:"\uBB34\uAD00",positionHead:"\uC5B4\uB450",positionMid:"\uC5B4\uC911",positionTail:"\uC5B4\uB9D0",difficulty:"\uB09C\uC774\uB3C4",grade:"{{n}}\uB4F1\uAE09",age:"{{n}}\uC138",agePlus:"{{n}}\uC138 \uC774\uC0C1",ageRange:"{{from}}\uC138~{{to}}\uC138",difficultyInfoAge:"3\uC138~7\uC138: \uAC00\uC7A5 \uC26C\uC6B4 \uB0B1\uB9D0(1\uB4F1\uAE09)\uC744 \uB610\uB798\uBCC4\uB85C \uB098\uB208 \uAC83\uC785\uB2C8\uB2E4.",difficultyInfoGrade:"2~4\uB4F1\uAE09: \uADF8\uBCF4\uB2E4 \uC5B4\uB824\uC6B4 \uB0B1\uB9D0\uC774\uACE0, \uB098\uC774\uB85C\uB294 \uB098\uB204\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",difficultyInfoNone:"\uC5C6\uC74C: \uB09C\uC774\uB3C4\uAC00 \uB9E4\uACA8\uC9C0\uC9C0 \uC54A\uC740 \uB0B1\uB9D0\uC785\uB2C8\uB2E4.",difficultyInfoBandAge:"{{ages}}: {{grade}} \uB0B1\uB9D0\uC744 \uB098\uC774\uBCC4\uB85C \uB098\uB208 \uAC83\uC785\uB2C8\uB2E4.",difficultyInfoBandAgeOne:"{{ages}}: {{grade}} \uB0B1\uB9D0\uC785\uB2C8\uB2E4.",difficultyInfoBandGrade:"{{grade}}: {{ages}} \uB0B1\uB9D0\uC785\uB2C8\uB2E4.",difficultyInfoBandAgeNamed:"{{ages}}: \uB098\uC774\uB85C \uB098\uB208 \uB0B1\uB9D0\uC785\uB2C8\uB2E4.",gradeNone:"\uC5C6\uC74C",syllables:"\uC74C\uC808 \uC218",syllable:"{{n}}\uC74C\uC808",syllable5plus:"5\uC74C\uC808 \uC774\uC0C1",partOfSpeech:"\uD488\uC0AC",pos:{noun:"\uCCB4\uC5B8(\uBA85\uC0AC, \uC218\uC0AC)",verb:"\uC6A9\uC5B8(\uB3D9\uC0AC, \uD615\uC6A9\uC0AC)",modifier:"\uC218\uC2DD\uC5B8(\uBD80\uC0AC, \uAD00\uD615\uC0AC)"},wordType:"\uC720\uD615",field:"\uC758\uBBF8\uBC94\uC8FC",type:{native:"\uACE0\uC720\uC5B4",sino:"\uD55C\uC790\uC5B4",foreign:"\uC678\uB798\uC5B4",mixed:"\uD63C\uC885\uC5B4"},exclude:"\uC81C\uC678",excludeNoImage:"\uC774\uBBF8\uC9C0 \uC5C6\uC74C"},searchButton:"\uAC80\uC0C9\uD558\uAE30",resultUnit:"\uB2E8\uC5B4",remaining:"{{count}}\uAC1C \uB0A8\uC74C",resultDisc:"\uC6D0\uD558\uB294 {{unit}} \uC120\uD0DD\uD558\uC138\uC694. {{max}}\uAC1C\uAE4C\uC9C0 \uC120\uD0DD\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. ({{selected}}/{{max}})",resultTitlePrefix:"\uCD1D ",resultTitleSuffix:"\uAC1C\uC758 {{unit}} \uAC80\uC0C9\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",emptyResult:"\uAC80\uC0C9 \uACB0\uACFC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",groupCount:"{{count}}\uAC1C",sort:{aria:"\uC815\uB82C",match:"\uC2DC\uC791 \uC6B0\uC120",ganada:"\uAC00\uB098\uB2E4\uC21C \u2191",ganadaDesc:"\uAC00\uB098\uB2E4\uC21C \u2193",syllable:"\uC74C\uC808 \uC218 \u2191",syllableDesc:"\uC74C\uC808 \uC218 \u2193",grade:"\uB4F1\uAE09\uC21C \u2191",gradeDesc:"\uB4F1\uAE09\uC21C \u2193",original:"\uBC1B\uC740 \uC21C\uC11C"},pageSize:"{{count}}\uAC1C\uC529 \uBCF4\uAE30",pageSizeAria:"\uD398\uC774\uC9C0 \uD06C\uAE30"},zy={clearAllSelection:"\uBAA8\uB450 \uC120\uD0DD \uD574\uC81C",divLine:"\uB300\uB9BD\uC120",removePair:"\uB300\uB9BD\uC30D \uBE7C\uAE30",removePairFor:"{{name}} \uB300\uB9BD\uC30D \uBE7C\uAE30",removeWord:"\uB2E8\uC5B4 \uBE7C\uAE30",removeWordFor:"{{name}} \uBE7C\uAE30"},Wy={title:"\uC8FC\uC81C\uBCC4 \uB4E3\uAE30",subtitle:"\uC8FC\uC81C\uB97C \uC120\uD0DD\uD558\uACE0 \uB4E3\uAE30 \uD6C8\uB828\uC744 \uC2DC\uC791\uD558\uC138\uC694.",noiseTitle:"\uC18C\uC74C \uD558 \uBB38\uC7A5\uB4E3\uAE30",shortStoryTitle:"\uC9E7\uC740 \uC774\uC57C\uAE30 \uB4E3\uAE30",FOOD:"\uC74C\uC2DD",HLTH:"\uAC74\uAC15",WETH:"\uB0A0\uC528",PRSN:"\uC778\uBB3C",KRCT:"\uD55C\uAD6D\uBB38\uD654",STRY:"\uC774\uC57C\uAE30",LOCA:"\uC9C0\uC5ED",SOAR:"\uC0AC\uD68C\uC640 \uC608\uC220",NTSC:"\uC790\uC5F0\uACFC \uACFC\uD559",SPRT:"\uC2A4\uD3EC\uCE20",sub:{TRKRFD:"\uD55C\uAD6D \uC804\uD1B5\uC74C\uC2DD",MDKRFD:"\uD55C\uAD6D \uD604\uB300\uC74C\uC2DD",WRLDFD:"\uC138\uACC4\uC758 \uC74C\uC2DD",MTRFRT:"\uC2DD\uC7AC\uB8CC\uC640 \uACFC\uC77C",GEFDKL:"\uC74C\uC2DD \uC0C1\uC2DD",HTETHB:"\uAC74\uAC15\uD55C \uC2DD\uC2B5\uAD00",DISILL:"\uBCD1\uACFC \uC9C8\uD658",EXCISE:"\uC6B4\uB3D9",GEHTKL:"\uAC74\uAC15\uC0C1\uC2DD",GESSKL:"\uACC4\uC808\uC0C1\uC2DD",SNWRAN:"\uB208\uACFC \uBE44",WTHFCT:"\uC77C\uAE30\uC608\uBCF4",GEWTKL:"\uB0A0\uC528\uC0C1\uC2DD",JODYPS:"\uC870\uC120\uC2DC\uB300",MDKRPS:"\uD55C\uAD6D \uADFC\uD604\uB300",THKDPS:"\uC0BC\uAD6D\uC2DC\uB300",WRLART:"\uC138\uACC4\uC758 \uC608\uC220\uAC00",WRLPSN:"\uC138\uACC4\uC758 \uC778\uBB3C",KRLANG:"\uC6B0\uB9AC\uB9D0",TRPLCT:"\uC804\uD1B5\uB180\uC774",HERITG:"\uBB38\uD654\uC7AC",EVTFES:"\uD589\uC0AC\uC640 \uCD95\uC81C",GECTKL:"\uC0C1\uC2DD",FRYTAL:"\uB3D9\uD654",AMZING:"\uC2E0\uAE30\uD55C \uC774\uC57C\uAE30",DAYSTR:"\uC77C\uC0C1 \uC18D \uC774\uC57C\uAE30",KRLDMK:"\uD55C\uAD6D\uC758 \uBA85\uC18C",SELNMK:"\uC11C\uC6B8\uC758 \uBA85\uC18C",WRDTRB:"\uC138\uACC4\uC5EC\uD589",NAVIGT:"\uAE38 \uCC3E\uAE30",KRSOCI:"\uD55C\uAD6D",ECONEW:"\uACBD\uC81C\uC640 \uB274\uC2A4",GENART:"\uC608\uC220",GELFKL:"\uC0DD\uD65C \uC0C1\uC2DD",ANIMAL:"\uB3D9\uBB3C",PLANTS:"\uC2DD\uBB3C",ETHPLT:"\uC9C0\uAD6C",TOLELC:"\uB3C4\uAD6C\uC640 \uC804\uC790\uC81C\uD488",GESCKL:"\uACFC\uD559\uC0C1\uC2DD",INVDSP:"\uAC1C\uC778\uACBD\uAE30",MARART:"\uACA9\uD22C\uAE30",TEAMSP:"\uB2E8\uCCB4\uACBD\uAE30",FOOTBL:"\uCD95\uAD6C",GESPKL:"\uC2A4\uD3EC\uCE20 \uC0C1\uC2DD"}},Hy={direction:{left:"\uC88C",right:"\uC6B0",label:"\uBC29\uD5A5"},wornDate:"\uCC29\uC6A9\uC77C",deviceType:"\uC885\uB958",brand:"\uBE0C\uB79C\uB4DC",fitType:"\uCC29\uC6A9\uD615\uD0DC",productName:"\uC81C\uD488\uBA85",addNew:"\uC0C8 \uAE30\uAE30 \uCD94\uAC00",selectFromList:"\uBAA9\uB85D\uC5D0\uC11C \uC120\uD0DD",removeDevice:"\uCC29\uC6A9 \uD574\uC81C",type:{hearingAid:"\uBCF4\uCCAD\uAE30",cochlearImplant:"\uC778\uACF5\uC640\uC6B0",other:"\uAE30\uD0C0"}},Vy={stat:{totalCustomers:"\uCD1D \uACE0\uAC1D",monthlyVisits:"\uC774\uB2EC \uCD1D \uBC29\uBB38"},chart:{visitDetail:"\uC0C1\uC138 \uBC29\uBB38 \uD604\uD669",trainingDetail:"\uC0C1\uC138 \uD6C8\uB828 \uD604\uD669",weekly:"\uC8FC\uBCC4",periodMonth:"\uC6D4",periodWeek:"\uC8FC",weeklyPrefix:"\uC8FC\uAC04",monthlyPrefix:"\uC6D4\uAC04",visit:"\uBC29\uBB38",reservation:"\uC608\uC57D",trainingDone:"\uD6C8\uB828 \uC644\uB8CC",trainingInProgress:"\uD6C8\uB828 \uC911",weekRange:"{{start}}~{{end}}",week:"{{n}}\uC8FC"}},qy={phonemeSelect:{vs:"\uB300"},caution:"\uC720\uC758\uC0AC\uD56D",mode:{include:"\uC74C\uC18C \uD3EC\uD568",pick:"\uC74C\uC18C \uB300\uB9BD",contrast:"\uC74C\uC18C \uB300\uB9BD \uC9C0\uC815",infoTitle:"\uB300\uB9BD \uBC29\uC2DD",infoInclude:"\uC74C\uC18C \uD3EC\uD568 \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uAC00 \uBAA8\uB450 \uB4E4\uC5B4\uAC04 \uB2E8\uC5B4\uC640 \uADF8 \uB300\uB9BD\uC30D\uC744 \uCC3E\uC544\uC694.",infoPick:"\uC74C\uC18C \uB300\uB9BD \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uAC00 \uB300\uB9BD\uC30D \uB450 \uB2E8\uC5B4\uC758 \uC2E4\uC81C \uCC28\uC774\uC810\uC77C \uB54C\uB9CC \uB9E4\uCE6D\uB3FC\uC694.",infoContrast:"\uC74C\uC18C \uB300\uB9BD \uC9C0\uC815 \u2014 \uAE30\uC900 \uB2E8\uC5B4\uC640 \uB300\uB9BD \uB2E8\uC5B4\uC758 \uC74C\uC18C\uB97C \uAC01\uAC01 \uC9C1\uC811 \uC120\uD0DD\uD574 \uB300\uB9BD\uC30D\uC744 \uCC3E\uC544\uC694."},count:"{{n}}\uAC1C",countLabel:"\uC74C\uC18C \uAC1C\uC218",input:{char:"\uAE00\uC790 \uC120\uD0DD",pron:"\uBC1C\uC74C \uC120\uD0DD",infoTitle:"\uC785\uB825 \uBC29\uC2DD",infoChar:"\uAE00\uC790 \uC120\uD0DD \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uB85C \uB2E8\uC5B4(\uAE00\uC790 \uAE30\uC900)\uB97C \uCC3E\uC740 \uD6C4, \uB2E8\uC5B4\uC758 \uD45C\uC900 \uBC1C\uC74C \uB300\uB9BD\uC30D\uC744 \uCC3E\uC2B5\uB2C8\uB2E4.",infoPron:"\uBC1C\uC74C \uC120\uD0DD \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uB85C \uD45C\uC900 \uBC1C\uC74C \uB300\uB9BD\uC30D\uC744 \uCC3E\uC2B5\uB2C8\uB2E4."},phonemeN:"{{n}}\uBC88 \uC74C\uC808",phonemeSingleLabel:"\uC74C\uC808",phonemeContrastSingleLabel:"\uB300\uB9BD \uC74C\uC808",ordinals:["\uCCAB\uBC88\uC9F8","\uB450\uBC88\uC9F8","\uC138\uBC88\uC9F8","\uB124\uBC88\uC9F8"],phonemeOrdinalLabel:"{{ordinal}} \uC74C\uC808",phonemeContrastOrdinalLabel:"\uB300\uB9BD {{ordinal}} \uC74C\uC808",composition:"\uC815\uB2F5 \uB2E8\uC5B4 \uAD6C\uC131",syllableCount:"\uC74C\uC808 \uC218",syllableN:"{{n}}\uC74C\uC808",syllableNPlus:"{{n}}\uC74C\uC808 \uC774\uC0C1",onset:"\uCD08\uC131",vowel:"\uBAA8\uC74C",coda:"\uC885\uC131",filter:{searchOptionsTitle:"\uB300\uB9BD \uC124\uC815",searchModeLabel:"\uB300\uB9BD \uBC29\uC2DD",countLabel:"\uC785\uB825 \uC74C\uC808 \uAC2F\uC218",inputModeLabel:"\uC785\uB825 \uBC29\uC2DD",phonemeOrder:"\uC785\uB825 \uC74C\uC808 \uC704\uCE58",phonemeOrderInfo:["\uC77C\uCE58: \uB300\uB9BD\uC30D\uC774 \uC815\uD655\uD788 \uAC19\uC740 \uC704\uCE58(\uC74C\uC808)\uC5D0\uC11C\uB9CC \uCC28\uC774 \uB098\uC57C \uB9E4\uCE6D\uB3FC\uC694.","\uBB34\uAD00: \uCC28\uC774 \uB098\uB294 \uC704\uCE58\uB294 \uC0C1\uAD00\uC5C6\uC774 \uB9E4\uCE6D\uB3FC\uC694."],orderAny:"\uBB34\uAD00",orderMatch:"\uC77C\uCE58",difficultyInfo:["1\uB4F1\uAE09 : \uD559\uB839\uC804\uAE30\uC5D0 \uC2B5\uB4DD\uD558\uC5EC \uD3C9\uC0DD\uC5D0 \uAC78\uCCD0 \uC77C\uC0C1 \uC5B8\uC5B4\uC0DD\uD65C\uC744 \uD558\uB294 \uB370 \uC0AC\uC6A9\uB418\uB294 \uC5B4\uD718","2\uB4F1\uAE09 : \uCD08\uB4F1\uD559\uAD50 1-2\uD559\uB144 \uB09C\uC774\uB3C4 \uC5B4\uD718","3\uB4F1\uAE09 : \uCD08\uB4F1\uD559\uAD50 3-4\uD559\uB144 \uB09C\uC774\uB3C4 \uC5B4\uD718","4\uB4F1\uAE09 : \uCD08\uB4F1\uD559\uAD50 5-6\uD559\uB144 \uB09C\uC774\uB3C4 \uC5B4\uD718","\uB4F1\uAE09\uC5C6\uC74C : \uAD6D\uB9BD\uAD6D\uC5B4\uC6D0 \uD45C\uC900 \uC5B4\uD718 \uC678 \uACE0\uBE48\uB3C4 \uC0DD\uD65C \uC5B4\uD718, \uC2E0\uC870\uC5B4 \uBC0F \uC678\uB798\uC5B4"],selectLabel:"\uC120\uD0DD",onlyHasImage:"\uC774\uBBF8\uC9C0 \uC788\uB294 \uB2E8\uC5B4\uB9CC",onlyHighUsage:"\uD65C\uC6A9\uB3C4 \uB192\uC740 \uB2E8\uC5B4\uB9CC",onlySameStructure:"\uC74C\uC18C \uAD6C\uC870 \uAC19\uC740 \uB2E8\uC5B4\uB9CC"},confirmMessage:"\uC120\uD0DD\uD55C {{unit}} {{count}}\uAC1C\uB97C \uD3EC\uD568\uD55C \uB2E8\uC5B4 \uD45C \uC815\uBCF4\uAC00 \uC0AC\uB77C\uC9D1\uB2C8\uB2E4.",resetOptions:"\uAC80\uC0C9 \uC635\uC158 \uCD08\uAE30\uD654",phonemeContrast:"\uB300\uB9BD {{n}}\uBC88 \uC74C\uC808",infoNotes:["\uBBF8\uB9AC\uBCF4\uAE30 \uAE00\uC790\uB294 \uC120\uD0DD\uD55C \uC74C\uC18C\uC758 \uC870\uD569 \uC608\uC2DC\uC785\uB2C8\uB2E4. \uC2E4\uC81C \uAC80\uC0C9\uC740 \uD574\uB2F9 \uC74C\uC18C\uAC00 \uD3EC\uD568\uB41C \uBAA8\uB4E0 \uB2E8\uC5B4\uB97C \uB300\uC0C1\uC73C\uB85C \uD569\uB2C8\uB2E4.","\uCD08\uC131 '\u3147'\uC740 \uC120\uD0DD\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uB2E8\uC5B4 \uC55E\uC5D0 \uC624\uB294 \u3147\uC740 \uC2E4\uC9C8\uC801\uC73C\uB85C \uBB34\uC74C\uC774\uC5B4\uC11C \uB300\uB9BD\uC30D \uC131\uB9BD\uC5D0 \uC601\uD5A5\uC744 \uC8FC\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.","\uCD08\uC131\uACFC \uC885\uC131\uB9CC \uC120\uD0DD\uD558\uBA74 \uBAA8\uC74C\uC740 '\u314F'\uB85C \uC790\uB3D9 \uD45C\uC2DC\uB429\uB2C8\uB2E4.","\uC74C\uC18C \uAC1C\uC218\uB97C \uB298\uB9AC\uBA74 \uAC01 \uC74C\uC18C \uC0AC\uC774\uC758 \uB300\uB9BD\uC30D\uC744 \uAC80\uC0C9\uD569\uB2C8\uB2E4."]},Uy={lead:`\uC544\uC774\uD574\uBE0C\uB294 \uC18C\uB9AC\uB97C \uD1B5\uD574
839
839
  \uC2E0\uB8B0\uB97C \uC313\uACE0
840
- \uD68C\uBCF5\uC744 \uB3D5\uC2B5\uB2C8\uB2E4.`,site:{title:"\uC0AC\uC774\uD2B8",malgwi:"\uB9D0\uADC0",soundDirection:"\uC18C\uB9AC\uBC29\uD5A5\uC131\uC2DC\uC2A4\uD15C",vrSoundDirection:"VR\uC18C\uB9AC\uBC29\uD5A5\uC131\uC2DC\uC2A4\uD15C",hearingTest:"\uCCAD\uB825\uD14C\uC2A4\uD2B8 \uD504\uB85C"},sns:{title:"SNS",naverBlog:"\uB124\uC774\uBC84 \uBE14\uB85C\uADF8"},policy:{title:"\uC815\uCC45",terms:"\uC774\uC6A9\uC57D\uAD00",privacy:"\uAC1C\uC778\uC815\uBCF4 \uCC98\uB9AC\uBC29\uCE68"},ceo:"\uB300\uD45C",address:"\uC8FC\uC18C",bizNo:"\uC0AC\uC5C5\uC790\uB4F1\uB85D\uBC88\uD638",support:"\uACE0\uAC1D\uC13C\uD130",ceoName:"\uD55C\uC9C0\uD61C",addressValue:"\uAC15\uC6D0\uB3C4 \uCD98\uCC9C\uC2DC \uC2DC\uCCAD\uAE38 32 \uD574\uCC2C\uBE4C\uB529 3\uCE35 302\uD638",bizNoValue:"526-81-02926"},Gy={timeHM:"{{h}}\uC2DC {{m}}\uBD84",timeH:"{{h}}\uC2DC"},Ky={phaseWordDownload:"\uB2E8\uC5B4 \uB370\uC774\uD130 \uB2E4\uC6B4\uB85C\uB4DC",phaseImageCheck:"\uC774\uBBF8\uC9C0 \uD655\uC778",phasePairAnalysis:"\uB2E8\uC5B4\uC30D \uBD84\uC11D",downloadingCount:"{{n}}\uAC1C \uB2E4\uC6B4\uB85C\uB4DC \uC911",checkingPage:"{{page}}\uD398\uC774\uC9C0 \uBAA9\uB85D \uD655\uC778 \uC911",imageCount:"{{done}} / {{total}}\uAC1C"},Yy={clearAriaLabel:"\uC785\uB825\uAC12 \uC9C0\uC6B0\uAE30",showPassword:"\uBE44\uBC00\uBC88\uD638 \uBCF4\uAE30"},Zy={ariaLabel:"\uC120\uD0DD \uD0ED"},Xy={ariaLabel:"\uD0ED"},Jy={dragPrompt:"\uD30C\uC77C\uC744 \uC774\uACF3\uC5D0 \uB4DC\uB798\uADF8\uD558\uC5EC \uC5C5\uB85C\uB4DC",browseButton:"\uD30C\uC77C \uC120\uD0DD",removeAriaLabel:"{{name}} \uC81C\uAC70"},Qy={ariaLabel:"\uC0AC\uC6A9\uC790 \uC544\uBC14\uD0C0"},e2={relativeDay:{today:"\uC624\uB298",yesterday:"\uC5B4\uC81C",daysAgo:"{{n}}\uC77C \uC804"}},t2={weekly:{title:"\uC8FC\uAC04 \uD6C8\uB828 \uD604\uD669",daily:"\uC624\uB298\uC758 \uB4E3\uAE30"},homework:{title:"\uC219\uC81C \uC9C4\uD589\uD604\uD669",totalRate:"\uC804\uCCB4 \uC644\uB8CC\uC728",done:"\uC644\uB8CC"},today:{tooltipTotal:"\uC804\uCCB4",tooltipDone:"\uC644\uB8CC"},visit:{title:"\uBC29\uBB38 \uC5F0\uB3D9 \uAE30\uB85D"},detail:"\uC0C1\uC138\uBCF4\uAE30",detailFor:"{{name}} \uC0C1\uC138\uBCF4\uAE30"},n2={time:{justNow:"\uBC29\uAE08 \uC804",minutesAgo:"{{n}}\uBD84 \uC804",hoursAgo:"{{n}}\uC2DC\uAC04 \uC804",daysAgo:"{{n}}\uC77C \uC804",weeksAgo:"{{n}}\uC8FC \uC804",monthsAgo:"{{n}}\uAC1C\uC6D4 \uC804",yearsAgo:"{{n}}\uB144 \uC804"}},r2={steps:"\uC9C4\uD589 \uB2E8\uACC4 {{current}} / {{total}}"},a2={skippedOnly:"\uC61B \uAE30\uB85D {{n}}\uAC74\uC740 \uBB34\uC5C7\uC744 \uD47C \uAC83\uC778\uC9C0 \uC548 \uB0A8\uC544 \uC788\uC5B4 \uC148\uC5D0\uC11C \uBE90\uC2B5\uB2C8\uB2E4.",runs:"{{count}}\uD310"},o2={resetColumns:"\uCE78 \uB108\uBE44 \uCD08\uAE30\uD654",scrollRegion:"\uAC00\uB85C\uB85C \uAD74\uB9B4 \uC218 \uC788\uB294 \uD45C",rowActionHint:"\uC904\uC744 \uB204\uB974\uBA74 \uC790\uC138\uD788 \uBD05\uB2C8\uB2E4"},s2={viewWords:"\uB0B1\uB9D0"},l2={ariaLabel:"\uBC30\uB108",dotAriaLabel:"{{count}}\uAC1C \uC911 {{index}}\uBC88\uC9F8 \uBC30\uB108"},i2={chooseDate:"\uB0A0\uC9DC \uC120\uD0DD",selectYear:"\uC5F0 \uC120\uD0DD",selectMonth:"\uC6D4 \uC120\uD0DD"},u2={previewRegion:"\uBCF4\uACE0\uC11C \uBBF8\uB9AC\uBCF4\uAE30 \u2014 \uC88C\uC6B0\uB85C \uAD74\uB824 \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4"},c2={description:"\uC124\uBA85",textbox:"\uBCF8\uBB38",training:"\uD6C8\uB828 \uC548\uB0B4",menu:"\uBA54\uB274"},d2={place:{labial:"\uC591\uC21C\uC74C",alveolar:"\uCE58\uC870\uC74C",palatal:"\uACBD\uAD6C\uAC1C\uC74C",velar:"\uC5F0\uAD6C\uAC1C\uC74C",glottal:"\uC131\uBB38\uC74C"}},p2={clearSelection:"\uC120\uD0DD \uD574\uC81C"},h2={showResult:"{{type}} \uACB0\uACFC\uBCF4\uAE30"},m2={selected:"\uC120\uD0DD\uB428",remove:"\uC81C\uAC70",exclude:"\uC81C\uC678",nthSelected:"{{n}}\uBC88\uC9F8 \uC120\uD0DD"},f2={loading:"\uBD88\uB7EC\uC624\uB294 \uC911\u2026"},C2={state:{active:"\uC18C\uB9AC \uB098\uB294 \uC911",played:"\uB4E4\uC74C",correct:"\uC815\uB2F5",wrong:"\uC624\uB2F5"}},g2={ariaLabel:"\uC774\uB3D9 \uACBD\uB85C"},b2={list:"\uD3F4\uB354",open:"{{name}} \uD3F4\uB354 \uC5F4\uAE30, {{count}}\uAC1C",menu:"{{name}} \uD3F4\uB354 \uBA54\uB274",placeMenu:"{{name}} \uBA54\uB274",tree:"\uD3F4\uB354 \uAD6C\uC870 \uBCF4\uAE30",fold:"{{name}} \uC811\uAE30",unfold:"{{name}} \uD3BC\uCE58\uAE30",add:{title:"\uD3F4\uB354 \uCD94\uAC00",sub:"\uC0C8 \uD3F4\uB354 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.",placeholder:"\uD3F4\uB354 \uC774\uB984"}},y2={empty:"\uB4F1\uB85D\uB41C \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."},v2={main:"\uBA54\uC778 \uADF8\uB77C\uB514\uC5B8\uD2B8",soft:"\uC18C\uD504\uD2B8",sub:"\uC11C\uBE0C \uCEEC\uB7EC",deep:"\uB525 \uADF8\uB77C\uB514\uC5B8\uD2B8",softSub:"\uC18C\uD504\uD2B8 \uC11C\uBE0C",warm:"\uC6DC(\uAC15\uC870)",dark:"\uB2E4\uD06C",radial:"\uBC29\uC0AC\uD615 \uADF8\uB77C\uB514\uC5B8\uD2B8",diagonal:"\uB300\uAC01\uC120 \uD328\uD134",dots:"\uB3C4\uD2B8 \uD328\uD134",outline:"\uC544\uC6C3\uB77C\uC778",success:"\uC131\uACF5/\uC644\uB8CC",naver:"\uB124\uC774\uBC84 \uBE14\uB85C\uADF8 \uC548\uB0B4",instagram:"\uC778\uC2A4\uD0C0\uADF8\uB7A8 \uC548\uB0B4"},x2={common:yy,calendar:vy,passCard:xy,rating:_y,colorPicker:wy,dropdown:By,accordion:ky,header:Ay,nav:Ny,settings:Ey,usage:jy,account:Dy,training:Sy,customers:Ty,payment:My,coupons:$y,visits:Ly,trainingType:Ry,myWordTable:Py,keyWords:Fy,wordTable:Iy,wordSearch:Oy,wordPrint:zy,topic:Wy,device:Hy,manager:Vy,wordPairs:qy,footer:Uy,date:Gy,wordData:Ky,textField:Yy,segmentedControl:Zy,tabs:Xy,fileUpload:Jy,avatar:Qy,myHomework:e2,trainingStatus:t2,store:n2,progress:r2,trainingMiss:a2,table:o2,wordScore:s2,topBanner:l2,datePicker:i2,report:u2,tooltip:c2,phonemeProfile:d2,bulkBar:p2,debug:h2,badge:m2,loader:f2,soundCompass:C2,breadcrumb:g2,folder:b2,board:y2,promoBannerBg:v2},_2={filter:{positionAny:"Any",positionHead:"Start",positionMid:"Middle",positionTail:"End",difficulty:"Difficulty",grade:"Grade {{n}}",age:"Age {{n}}",agePlus:"Age {{n}}+",ageRange:"Age {{from}}\u2013{{to}}",difficultyInfoAge:"Age 3\u20137: the easiest words (grade 1), split by age.",difficultyInfoGrade:"Grades 2\u20134: harder words, not split by age.",difficultyInfoNone:"None: words with no difficulty assigned.",difficultyInfoBandAge:"{{ages}}: {{grade}} words, split by age.",difficultyInfoBandAgeOne:"{{ages}}: {{grade}} words.",difficultyInfoBandGrade:"{{grade}}: words for {{ages}}.",difficultyInfoBandAgeNamed:"{{ages}}: words split by age.",gradeNone:"None",syllables:"Syllables",syllable:"{{n}} Syll.",syllable5plus:"5+ Syllables",partOfSpeech:"Part of Speech",pos:{noun:"Noun/Numeral",verb:"Verb/Adjective",modifier:"Adverb/Determiner"},wordType:"Word Type",field:"Semantic Category",type:{native:"Native Korean",sino:"Sino-Korean",foreign:"Loanword",mixed:"Hybrid"},exclude:"Exclude",excludeNoImage:"No Image"}},w2={filter:{onlyHighUsage:"High-use words only"}},B2={wordSearch:_2,wordPairs:w2};const k2="0.445.0";var $i;const A2=[{code:"ko",label:"\uD55C\uAD6D\uC5B4"},{code:"en",label:"English"}],Ho="ko",N2="ihab_display_language",Vo={en:()=>Promise.resolve().then(function(){return UB})},ja=new Set(["ko"]),qo={},Qr=e=>e.split("-")[0];function Li(e){const t=Qr(e),r=Vo[t];return!r||ja.has(t)?Promise.resolve():qo[t]??(qo[t]=r().then(a=>{const s=a.default??a;Pt.addResourceBundle(t,"translation",s,!0,!1),ja.add(t)},a=>{throw qo[t]=void 0,a}))}function Ri(){if(typeof window>"u")return Ho;try{const e=localStorage.getItem(N2);if(e&&A2.some(t=>t.code===e))return e}catch{}return Ho}function Pi(e){try{document.documentElement.lang=e}catch{}}Pt.on("languageChanged",Pi),Pi(Ri());const Fi=($i=Pt).__ihabRawChangeLanguage??($i.__ihabRawChangeLanguage=Pt.changeLanguage);Pt.changeLanguage=Fi,Pt.use(Ne.initReactI18next).init({resources:{ko:{translation:x2},en:{translation:B2}},lng:Ri(),fallbackLng:Ho,interpolation:{escapeValue:!1},react:{useSuspense:!1}});const Uo=Fi.bind(Pt);let Go;Pt.changeLanguage=((e,t)=>{if(Go=e,!e||ja.has(Qr(e))||!Vo[Qr(e)])return Uo(e,t);const r=()=>Go===e?Uo(e,t):Promise.resolve(Pt.t);return Li(e).then(r,a=>(console.error(a),r()))});{const e=Pt.language;e&&!ja.has(Qr(e))&&Vo[Qr(e)]&&Li(e).then(()=>{Pt.language===e&&(Go??e)===e&&Uo(e)},t=>console.error(t))}const E2=99,j2=new Map;try{Pt.store?.on?.("added",()=>j2.clear())}catch{}Array.from({length:E2},(e,t)=>t+1);let Da=null,Ii=null,Oi=null;function D2(){const e=wi();if(e&&e.entries.length>0){const t=$b();if(Da&&Ii===e&&Oi===t)return Da;const r=new Set,a=[];for(const s of e.entries)!s.word||r.has(s.word)||(r.add(s.word),a.push({w:s.word,s:s.syllables,p:t?.[s.word]?[...t[s.word].cho??[],...t[s.word].jung??[],...t[s.word].jong??[]]:[],pron:s.pronunciation||s.word,grade:s.grade}));return Da=a,Ii=e,Oi=t,Da}return[]}new Proxy([],{get(e,t){const r=D2(),a=r[t];return typeof a=="function"?a.bind(r):a}});function S2(e){return e==null?!1:T2.test($o(e))}const T2=/Failed to fetch dynamically imported module|error loading dynamically imported module|Importing a module script failed|Unable to preload CSS/i;function M2(e){if(e.includes("\\")&&e.includes("("))return!0;if(!/url\s*\(/i.test(e))return!1;const t=e.replace(/url\(\s*(['"]?)#[^)'"]*\1\s*\)/gi,"");return/url\s*\(/i.test(t)}function $2(e){if(typeof window>"u")return"";const t=(r,a)=>{typeof a.attrValue=="string"&&M2(a.attrValue)&&(a.keepAttr=!1)};wr.addHook("uponSanitizeAttribute",t);try{return wr.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:["script","use","style"],FORBID_ATTR:["xlink:href","href"]})}finally{wr.removeHook("uponSanitizeAttribute",t)}}function L2(e){const[t,r]=o.useState(null),[a,s]=o.useState(null),[l,i]=o.useState(null),[u,c]=o.useState(null),[p,h]=o.useState(null);return o.useEffect(()=>{if(!e||typeof e!="string"||!e.endsWith(".svg")){r(null),s(null),i(null),c(null);return}const d=e.split("/").pop();let m=e;d&&(e.startsWith("/")?m=Ao(e):/^(Logo|Symbol)/i.test(d)?m=Ao(`logo/${d}`):(/^https?:\/\//i.test(e)||e.startsWith("data:"),m=e)),i(null),c(null),r(e),s(m)},[e]),o.useEffect(()=>{if(!a)return;let d=!1;async function m(){try{let C=await fetch(a);C.ok||(C=await fetch(a));const x=C.headers.get("content-type")||"";if(d)return;if(x.includes("svg")){i("mask");return}if(x.startsWith("image/")){i("img");return}const g=await fetch(a);if(!g.ok)throw new Error("not ok");const y=await g.text();if(d)return;if(/^\s*<svg[\s>]/i.test(y)){const v=$2(y);if(!v){i("none");return}c(v),i("inline");return}i("none")}catch{d||i("none")}}return m(),()=>{d=!0}},[a]),o.useEffect(()=>{let d=!1,m=null;return l==="mask"&&a&&fetch(a).then(C=>{if(!C.ok)throw new Error("fetch failed");return C.blob()}).then(C=>{d||(m=URL.createObjectURL(C),h(m))}).catch(()=>{d||i("img")}),()=>{d=!0,m&&URL.revokeObjectURL(m),h(null)}},[l,a]),t===e?{iconToUse:a,mode:l,svgText:u,blobUrl:p}:{iconToUse:null,mode:null,svgText:null,blobUrl:null}}function lt(e){const{icon:t,label:r,className:a,imgClassName:s,maskClassName:l,svgClassName:i,wrapperStyle:u,size:c}=e||{},p=a??"iconRenderer-icon",h=s??"iconRenderer-icon-image",d=l??"iconRenderer-icon-mask",m=i??"iconRenderer-icon-svg",C=typeof t=="string"?t:null,x=mg(C),{iconToUse:g,mode:y,svgText:v,blobUrl:_}=L2(C),b=(k,E={})=>n.jsx("span",{className:p,style:u,...E,children:k}),B=typeof c=="number"?{width:c,height:c,objectFit:"contain"}:null,N=(k,E={})=>n.jsx("img",{src:k,alt:typeof r=="string"?r:typeof r=="number"?String(r):"",className:h,...E,style:B?{...E.style,...B}:E.style});if(!t)return null;if(typeof t!="string")return b(t);if(t==="none")return b(n.jsx("span",{className:m,dangerouslySetInnerHTML:{__html:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" aria-hidden="true"></svg>'}}),{"aria-hidden":"true"});if(x)try{return b(o.createElement(x,{className:m,size:typeof c=="number"?c:20}),{"aria-hidden":"true"})}catch{}if(g&&g.endsWith(".svg")){if(y==="mask"){const k={"--icon-url":_?`url(${_})`:`url(${g})`,...typeof c=="number"?{"--icon-size":`${c}px`}:null};return b(n.jsx("span",{className:d,style:k}),{"aria-hidden":"true"})}return y==="img"?b(N(g,{onError:k=>{k.currentTarget.onerror=null,k.currentTarget.style.display="none"}}),{"aria-hidden":"true"}):y==="inline"?b(n.jsx("span",{className:m,dangerouslySetInnerHTML:v?{__html:v}:void 0}),{"aria-hidden":"true"}):b(null,{"aria-hidden":"true"})}if(t.startsWith("/")||t.includes("/assets/")||t.match(/\.(png|jpg|jpeg|webp|gif)$/i))return N(Ao(t),{style:u,onError:k=>{k.currentTarget.onerror=null,k.currentTarget.style.display="none"}});const f=typeof c=="number"?c:20,w=`<svg width="${f}" height="${f}" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><rect x="3" y="3" width="18" height="18" rx="2" ry="2" style="fill:none;stroke:currentColor;stroke-width:2"/></svg>`;return b(n.jsx("span",{className:m,dangerouslySetInnerHTML:{__html:w}}),{"aria-hidden":"true"})}function zi(e){const[t,r]=o.useState(!1),a=o.useRef(!1),s=o.useRef(!0);o.useEffect(()=>(s.current=!0,()=>{s.current=!1}),[]);const l=o.useCallback(()=>{if(!e||a.current)return;const i=e();if(i&&typeof i.then=="function"){a.current=!0,r(!0);const u=()=>{a.current=!1,s.current&&r(!1)};i.then(u,u)}},[e]);return{pending:t,press:l}}function R2({icon:e,title:t,message:r,action:a,className:s}){const{pending:l,press:i}=zi(a?.onClick);return n.jsxs("div",{className:xe("empty-state",s),children:[e&&n.jsx(lt,{icon:e,size:48,className:"empty-state__icon"}),t&&n.jsx("p",{className:"empty-state__title h4",children:t}),r&&n.jsx("p",{className:"empty-state__message body-3",children:r}),a&&n.jsxs("button",{type:"button",className:"empty-state__action button button40 button40--bar button--variant-main button--align-center button--shape-rounded",onClick:i,disabled:l,"aria-busy":l||void 0,children:[a.icon&&n.jsx(lt,{icon:a.icon,className:"button__icon"}),n.jsx("span",{className:"button__label button-1",children:a.label})]})]})}function P2({message:e,hint:t,icon:r="triangle-alert",onRetry:a,retryLabel:s,className:l}){const{t:i}=Ne.useTranslation(),{pending:u,press:c}=zi(a);return n.jsxs("div",{className:xe("empty-state","error-state",l),role:"alert",children:[n.jsx(lt,{icon:r,size:48,className:"empty-state__icon error-state__icon"}),n.jsx("p",{className:"empty-state__message body-3",children:e??i("common.errorState.message",{defaultValue:"\uBD88\uB7EC\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."})}),t&&n.jsx("p",{className:"error-state__hint caption-1",children:t}),a&&n.jsxs("button",{type:"button",className:"empty-state__action button button40 button40--bar button--variant-main button--align-center button--shape-rounded",onClick:c,disabled:u,"aria-busy":u||void 0,children:[n.jsx(lt,{icon:"rotate-cw",className:"button__icon"}),n.jsx("span",{className:"button__label button-1",children:s??i("common.errorState.retry",{defaultValue:"\uB2E4\uC2DC \uC2DC\uB3C4"})})]})]})}function F2({icon:e,title:t,description:r,cta:a,tone:s="main",disabled:l=!1,onClick:i,className:u=""}){const c=o.useId(),p=`${c}-title`,h=`${c}-desc`,d=`${c}-cta`,m=()=>{l||i?.()};return n.jsx("section",{role:"button",tabIndex:l?-1:0,"aria-disabled":l||void 0,"aria-labelledby":p,"aria-describedby":`${h} ${d}`,onClick:m,onKeyDown:C=>{(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),m())},className:xe("action-card",`action-card--${s}`,l&&"action-card--disabled",u),children:n.jsxs("div",{className:"action-card__body",children:[n.jsx("span",{"aria-hidden":!0,className:"action-card__chip",children:n.jsx(lt,{icon:e,size:34})}),n.jsxs("div",{className:"action-card__text",children:[n.jsx("h2",{id:p,className:"action-card__title",children:t}),n.jsx("p",{id:h,className:"action-card__desc",children:r})]}),n.jsxs("div",{className:"action-card__cta",children:[n.jsx("span",{id:d,children:a}),n.jsx("span",{"aria-hidden":!0,className:"action-card__arrow",children:n.jsx(lt,{icon:"arrow-right",size:18})})]})]})})}function I2({as:e="div",className:t="",children:r,storage:a,...s}){a&&tb({resolveUrl:a.resolveUrl,download:a.download??(()=>Promise.reject(new Error("[ihabdevteam-core] CoreScope: download resolver\uAC00 \uC124\uC815\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4."))),exists:a.exists,resolvePath:a.resolvePath,noiseBaseUrl:a.noiseBaseUrl,noiseFileGain:a.noiseFileGain});const l=xe("ihabdevteam-core-scope",t);return n.jsx(e,{className:l,...s,children:r})}function O2(e){if(e.closest('[aria-hidden="true"], [hidden], [inert]'))return!1;for(let t=e;t;t=t.parentElement){const r=window.getComputedStyle(t);if(r.display==="none"||r.visibility==="hidden"||r.visibility==="collapse")return!1}return!0}function Sa(e,t=!0){o.useEffect(()=>{if(!t)return;const r=e.current;if(!r)return;const a=s=>{if(s.key!=="Tab")return;const l=Array.from(r.querySelectorAll(jn)).filter(O2);if(!l.length){s.preventDefault();return}const i=l[0],u=l[l.length-1],c=document.activeElement,p=c===r;s.shiftKey&&(c===i||p)?(s.preventDefault(),u.focus()):!s.shiftKey&&c===u&&(s.preventDefault(),i.focus())};return r.addEventListener("keydown",a),()=>r.removeEventListener("keydown",a)},[e,t])}const jn='a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])',Ko=new WeakMap;function Yo(e,t){e&&Ko.set(e,t)}function Zo(e){let t=e;for(let r=0;t&&!t.isConnected&&r<10;r++){let a=t;for(;a&&!Ko.has(a);)a=a.parentElement;if(!a)return t;t=Ko.get(a)??null}return t}function Wi(e){return!(!e||!e.isConnected||e===document.body||typeof e.focus!="function"||e.disabled||e instanceof HTMLInputElement&&e.type==="hidden"||e.closest('[inert],[aria-hidden="true"],[hidden]'))}function Ta(e,t,r){const a=e?.isConnected?e:r?.isConnected?r:null;if(Wi(t)&&!(e&&e.contains(t)))return t.focus(),t;if(!a)return null;const s=Array.from(document.querySelectorAll(jn)).filter(c=>!(e&&e.contains(c))&&Wi(c));let l=null,i=null;for(const c of s)a.compareDocumentPosition(c)&Node.DOCUMENT_POSITION_PRECEDING?l=c:i||(i=c);const u=l??i;return u?.focus(),u}function z2({title:e="",lines:t=[],notices:r=null,children:a,variant:s="default",dismissible:l=!1,className:i=""}){const{t:u}=Ne.useTranslation(),[c,p]=o.useState(!1),h=o.useRef(null),d=o.useCallback(()=>{const g=h.current;g&&g.contains(document.activeElement)&&Ta(g),p(!0)},[]);if(c)return null;const m=`notice-box notice-box--${s} body-2 ${i}`.trim(),C=l&&n.jsx("button",{type:"button",className:"notice-box__dismiss",onClick:d,"aria-label":u("common.close","\uB2EB\uAE30"),children:"\xD7"});if(r&&Array.isArray(r)&&r.length)return n.jsxs("div",{className:m,role:"note",children:[r.map((g,y)=>n.jsxs("div",{className:"notice-box__inner",children:[g.title?n.jsx("span",{className:"notice-box__title body-3",children:g.title}):null,n.jsx("div",{className:"notice-box__body",children:g.lines&&g.lines.length?n.jsx("div",{children:g.lines.map((v,_)=>n.jsx("span",{className:"notice-box__line body-3",children:v},_))}):g.children??null})]},y)),C]});const x=e||t.length?n.jsxs("div",{className:"notice-box__inner",children:[e?n.jsx("span",{className:"notice-box__title body-1",children:e}):null,n.jsx("div",{className:"notice-box__body",children:t.length?n.jsx("ul",{children:t.map((g,y)=>n.jsx("li",{className:"notice-box__line",children:g},y))}):a})]}):n.jsx("div",{className:"notice-box__inner",children:a});return n.jsxs("div",{ref:h,className:m,role:"note",children:[x,C]})}const Xo=o.createContext(void 0);function wn(){return o.useContext(Xo)}const W2={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0};function Nr(e){const{t}=Ne.useTranslation(),{variant:r="spinner",size:a=24,progress:s=null,label:l}=e||{},i=l||t("loader.loading","Loading");if(r==="bar"){const c=s==null||!Number.isFinite(Number(s)),p=c?0:Math.max(0,Math.min(100,Number(s)));return n.jsx("div",{className:`loader-bar${c?" loader-bar--indeterminate":""}`,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":c?void 0:p,"aria-label":i,children:n.jsx("div",{className:"loader-bar__inner",style:c?void 0:{width:`${p}%`}})})}const u=typeof a=="number"?`${a}px`:a;return n.jsxs("div",{className:"loader-spinner",style:{width:u,height:u},role:"status","aria-label":i,children:[n.jsx("span",{style:W2,children:i}),n.jsxs("svg",{className:"loader-spinner__svg",viewBox:"0 0 50 50",width:a,height:a,children:[n.jsx("circle",{className:"loader-spinner__bg",cx:"25",cy:"25",r:"20",fill:"none",strokeWidth:"4"}),n.jsx("circle",{className:"loader-spinner__fg",cx:"25",cy:"25",r:"20",fill:"none",strokeWidth:"4",strokeLinecap:"round"})]})]})}const Er=[];let Ma=!1;function Hi(e){if(e.key!=="Escape"||e.defaultPrevented||e.isComposing||e.keyCode===229)return;const t=Er[Er.length-1];t&&(e.stopPropagation(),t())}function ir(e){return Er.push(e),!Ma&&typeof document<"u"&&(document.addEventListener("keydown",Hi),Ma=!0),()=>{const t=Er.lastIndexOf(e);t>=0&&Er.splice(t,1),Er.length===0&&Ma&&typeof document<"u"&&(document.removeEventListener("keydown",Hi),Ma=!1)}}const Vi=o.createContext(null);function H2(e){return/max-width:\s*7[0-9][0-9]px/.test(e)}const qi=e=>typeof window>"u"||!window.matchMedia?!1:window.matchMedia(e).matches;function V2(e){const t=o.useCallback(r=>{if(typeof window>"u"||!window.matchMedia)return()=>{};const a=window.matchMedia(e);return a.addEventListener?a.addEventListener("change",r):a.addListener&&a.addListener(r),()=>{a.removeEventListener?a.removeEventListener("change",r):a.removeListener&&a.removeListener(r)}},[e]);return bl.useSyncExternalStore(t,()=>qi(e),()=>!1)}function q2(e){const[t,r]=o.useState(qi(e));return o.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const a=window.matchMedia(e),s=i=>r(i.matches),l=a;return l.addEventListener?l.addEventListener("change",s):l.addListener&&l.addListener(s),r(a.matches),()=>{l.removeEventListener?l.removeEventListener("change",s):l.removeListener&&l.removeListener(s)}},[e]),t}const U2=typeof bl.useSyncExternalStore=="function"?V2:q2;function Bn(e){const t=o.useContext(Vi),r=U2(e);return t&&typeof t.mobile=="boolean"&&H2(e)?t.mobile:r}const Ui="(prefers-reduced-motion: reduce)";function G2(){try{return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia(Ui).matches}catch{return!1}}function $a(){return Bn(Ui)}const Gi={"menu-tooltip":"tooltip-menu","description-tooltip":"tooltip-description","text-box-tooltip":"tooltip-textbox","training-tooltip":"tooltip-training","word-image-tooltip":"tooltip-word-image","info-tooltip":"tooltip-info","noise-settings-tooltip":"noise-settings",tooltip__header:"tooltip-content__header",tooltip__content:"tooltip-content",tooltip__backdrop:"tooltip-backdrop",tooltip__portal:"tooltip-portal","word-table__section":"word-table-block","word-table__content":"word-table-block__content","word-table__card":"word-table-block__card","word-table__card-handle":"word-table-block__card-handle","word-table__card-close":"word-table-block__card-close","word-table__card-actions":"word-table-block__card-actions","word-table__edit-cell":"word-table-block__edit-cell","word-table__pair-divider":"word-table-block__pair-divider","chart-section__legend-dot":"manager-bar-chart-legend-dot","chart-section__legend-item":"manager-bar-chart-legend-item","chart-section__legend":"manager-bar-chart-legend","chart-section__controls":"manager-section-controls","chart-section__sub-row":"barchart-sub-row","chart-section__total":"barchart-total","chart-section":"manager-section","bar-chart__stack-segment":"manager-bar-chart-stack-segment","bar-chart__detail-btn":"manager-bar-chart-detail-btn","bar-chart__gridline":"manager-bar-chart-gridline","bar-chart__loading":"manager-bar-chart-loading","bar-chart__scroll":"manager-bar-chart-scroll","bar-chart__stack":"manager-bar-chart-stack","bar-chart__x-axis":"manager-bar-chart-x-axis","bar-chart__inner":"manager-bar-chart-inner","bar-chart__area":"manager-bar-chart-area","bar-chart__plot":"manager-bar-chart-plot","bar-chart__wrap":"manager-bar-chart-wrap","bar-chart__slot":"manager-bar-chart-slot","bar-chart__col":"manager-bar-chart-col","bar-chart__bar":"manager-bar-chart-bar"};function K2(e,t){const r=Object.keys(e).sort((a,s)=>s.length-a.length);for(const a of r){if(!t.startsWith(a))continue;const s=t.slice(a.length);if(!(s!==""&&!s.startsWith("__")&&!s.startsWith("--")))return e[a]+s}return null}function Y2(e){return K2(Gi,e)}function ce(e){if(!e||Object.keys(Gi).length===0)return e;const t=[];for(const r of e.split(/\s+/)){if(!r)continue;const a=Y2(r);a&&t.push(a)}return t.length?`${e} ${t.join(" ")}`:e}function sn(e){const{anchorRect:t,anchorEl:r,offset:a=20,edgeMargin:s=20,prefer:l="top",onClose:i,closeOnOutsideClick:u=!0,className:c="",role:p="dialog",ariaLabel:h="",children:d,backdrop:m=!1,isMobilePopup:C=!1,useBorder:x=!0,header:g,focusOnOpen:y}=e||{},v=o.useRef(null),[_,b]=o.useState({position:"fixed",left:0,top:-9999}),[B,N]=o.useState(!1),[f,w]=o.useState("bottom"),[k,E]=o.useState(!1),[A,D]=o.useState(!1),j=!t&&!r,$=o.useRef(null),H=o.useCallback((G=!1,X=!1)=>{if(A&&C)return;const K=r?r.getBoundingClientRect():t,L=X&&$.current?$.current:K;if(!L||!v.current)return;const R=v.current,{offsetWidth:S,offsetHeight:V}=R,ae=window.innerWidth,ne=window.innerHeight,re=ae-L.right,ue=L.left,Be=L.top,le=ne-L.bottom;let J=0,O=0,W="top";const q=Be>=V+a,oe=le>=V+a,ee=l==="bottom"?oe?"bottom":q?"top":null:q?"top":oe?"bottom":null;if(ee==="top")W="top",O=L.top-a-V,J=L.left+L.width/2-S/2;else if(ee==="bottom")W="bottom",O=L.bottom+a,J=L.left+L.width/2-S/2;else if(re>=S+a)W="right",J=L.right+a,O=L.top+L.height/2-V/2;else if(ue>=S+a)W="left",J=L.left-a-S,O=L.top+L.height/2-V/2;else{const we=Math.max(Be,le,re,ue);we===Be?(W="top",O=L.top-a-V,J=L.left+L.width/2-S/2):we===le?(W="bottom",O=L.bottom+a,J=L.left+L.width/2-S/2):we===re?(W="right",J=L.right+a,O=L.top+L.height/2-V/2):(W="left",J=L.left-a-S,O=L.top+L.height/2-V/2)}const be=Number.isFinite(Number(s))?Number(s):8;J=Math.min(Math.max(J,be),ae-S-be),O=Math.min(Math.max(O,be),ne-V-be);const je=Math.round(J),De=Math.round(O);G&&v.current?(v.current.style.left=`${je}px`,v.current.style.top=`${De}px`,v.current.dataset.placement=W):(w(W||f),b({position:"fixed",left:je,top:De}),E(!0))},[A,C,r,t,a,s,f,l]);o.useEffect(()=>()=>{$.current=null},[r,t]),o.useLayoutEffect(()=>{if(j)return;if(A&&C){b({position:"fixed",left:"50%",top:"50%",transform:"translate(-50%, -50%)",width:"calc(100% - 40px)",maxWidth:"calc(100% - 40px)"}),E(!0);return}$.current===null&&($.current=r?r.getBoundingClientRect():t??null),H(!1,!0);const G=requestAnimationFrame(()=>H(!1,!0));return()=>cancelAnimationFrame(G)},[t,r,a,d,s,j,A,C,H]),o.useEffect(()=>{if(j||A&&C||!v.current||typeof ResizeObserver>"u")return;const G=new ResizeObserver(()=>{t&&H()});return G.observe(v.current),()=>G.disconnect()},[t,d,s,j,A,C,H]),o.useEffect(()=>{if(j||A&&C)return;let G=null;const X=()=>{if(r&&($.current=r.getBoundingClientRect()),typeof requestAnimationFrame>"u"){H(!0);return}G===null&&(G=requestAnimationFrame(()=>{G=null,H(!0)}))},K=L=>{if(!r&&i){const R=L.target;if(R&&v.current&&v.current.contains(R))return;try{if(R&&R.closest&&R.closest("[data-tooltip-ignore]"))return}catch{}z.current(!0);return}X()};return window.addEventListener("resize",X),document.addEventListener("scroll",K,{passive:!0,capture:!0}),()=>{G!==null&&cancelAnimationFrame(G),window.removeEventListener("resize",X),document.removeEventListener("scroll",K,{capture:!0})}},[t,r,i,a,d,s,j,A,C,H]),o.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const G=window.matchMedia("(max-width: 768px)"),X=()=>D(!!G.matches);X();try{G.addEventListener?G.addEventListener("change",X):G.addListener(X)}catch{try{G.addListener(X)}catch{}}return()=>{try{G.removeEventListener?G.removeEventListener("change",X):G.removeListener(X)}catch{}}},[]);const F=o.useRef(!1),U=o.useRef(null),T=$a(),I=o.useCallback((G=!1)=>{if(i&&!(B||F.current)){if(F.current=!0,G){N(!0);try{i&&i()}catch{F.current=!1,N(!1)}return}N(!0),U.current=setTimeout(()=>{U.current=null;try{i&&i()}catch{F.current=!1,N(!1)}},T?0:200)}},[B,i,N,T]);o.useEffect(()=>()=>{U.current&&clearTimeout(U.current)},[]),o.useEffect(()=>{if(j)return;const G=L=>{const R=v.current;if(!R)return;const S=L.target;if(S&&!R.contains(S)){try{if(S.closest&&S.closest("[data-tooltip-ignore]"))return}catch{}u&&I(!0)}},X=L=>{const R=v.current;if(!R)return;const S=L.target;if(S&&!R.contains(S)){try{if(S.closest&&S.closest("[data-tooltip-ignore]"))return}catch{}u&&I(!0)}},K=L=>{if(L.key==="Tab"){const R=v.current;if(!R)return;const S=R.querySelectorAll(jn);if(!S||S.length===0)return;const V=S[0],ae=S[S.length-1],ne=document.activeElement;L.shiftKey?ne===V&&(L.preventDefault(),ae.focus()):ne===ae&&(L.preventDefault(),V.focus())}};return document.addEventListener("pointerdown",G,!0),document.addEventListener("click",X,!0),document.addEventListener("keydown",K),()=>{document.removeEventListener("pointerdown",G,!0),document.removeEventListener("click",X,!0),document.removeEventListener("keydown",K)}},[i,u,I,j]);const z=o.useRef(I);o.useEffect(()=>{z.current=I});const ie=!!i;o.useEffect(()=>{if(!(j||!ie))return ir(()=>z.current())},[j,ie]),o.useEffect(()=>{const G=()=>{I(!0)};return typeof document<"u"&&document.addEventListener("speechear-close-tooltips",G),()=>{typeof document<"u"&&document.removeEventListener("speechear-close-tooltips",G)}},[I]);const te=o.useRef(null);o.useEffect(()=>{if(j||y===!1||!k)return;const G=v.current;if(!G)return;const X=G.querySelector(jn);if(X)return te.current=document.activeElement,X.focus({preventScroll:!0}),()=>{const K=te.current;te.current=null,K&&document.contains(K)&&K.focus({preventScroll:!0})}},[j,y,k]),o.useEffect(()=>{p==="dialog"&&!h&&Tt("tooltip-no-name",'[ihab/Tooltip] \uC774\uB984 \uC5C6\uB294 role="dialog" \uC785\uB2C8\uB2E4 \u2014 ariaLabel \uC744 \uC8FC\uC138\uC694. \uB0AD\uB3C5\uAE30\uAC00 "\uB300\uD654\uC0C1\uC790" \uB77C\uACE0\uB9CC \uC77D\uC2B5\uB2C8\uB2E4.')},[p,h]);const P=n.jsxs("div",{ref:v,className:ce(`tooltip__content ${j?"tooltip__content--inline":""} ${x?"tooltip__content--bordered":""} ${B?"is-closing":""} ${c} ${A&&C?"is-mobile":""}`),role:p,"aria-label":h||void 0,style:j?{}:{..._,visibility:k?"visible":"hidden"},tabIndex:-1,"data-placement":f,"data-left":j?"":_.left,"data-top":j?"":_.top,"data-anchor-left":t?Math.round(t.left):"","data-anchor-top":t?Math.round(t.top):"","data-anchor-width":t?Math.round(t.width):"","data-anchor-height":t?Math.round(t.height):"",children:[g!=null&&n.jsx("div",{className:ce("tooltip__header h5"),children:g}),d]});if(j||typeof document>"u")return P;if(m||A&&C){const G=n.jsxs("div",{className:ce("tooltip__portal"),children:[n.jsx("div",{className:ce("tooltip__backdrop"),onClick:()=>{u&&I(!0)}}),P]});return bn.createPortal(G,document.body)}return bn.createPortal(P,document.body)}function zn(e){const{anchorRect:t,text:r,offset:a=8,onClose:s,className:l="",ariaLabel:i}=e||{};return r?n.jsx(sn,{anchorRect:t,offset:a,onClose:s,closeOnOutsideClick:!1,className:ce(`info-tooltip ${l}`),ariaLabel:i||r,children:n.jsx("div",{className:ce("info-tooltip__content body-3"),children:r})}):null}function er(e){const{t}=Ne.useTranslation(),{anchorRect:r,title:a,items:s,activeIndex:l=-1,showIndex:i=!0,onClose:u,offset:c=12,closeOnOutsideClick:p=!0,columns:h}=e||{},d=(Array.isArray(s)?s:s?[s]:[]).map(m=>typeof m=="string"?{text:m}:m);return!d.length&&!a?null:n.jsx(sn,{anchorRect:r,offset:c,onClose:u,closeOnOutsideClick:p,useBorder:!1,className:ce("description-tooltip"),ariaLabel:a||t("tooltip.description","\uC124\uBA85"),children:n.jsxs("div",{className:ce("description-tooltip__box"),children:[a&&n.jsx("span",{className:ce("description-tooltip__title body-2"),children:a}),n.jsx("ol",{className:ce(`description-tooltip__items${h&&h>1?" description-tooltip__items--columns":""}`),style:h&&h>1?{columnCount:h}:void 0,children:d.map((m,C)=>n.jsxs("li",{className:ce(`description-tooltip__item body-3${C===l?" description-tooltip__item--active":""}`),children:[i&&d.length>1&&n.jsxs("span",{className:ce("description-tooltip__index button-1"),children:[C+1,"."]}),m.color&&n.jsx("span",{className:ce("description-tooltip__dot"),style:{background:m.color},"aria-hidden":"true"}),n.jsx("span",{children:m.text})]},C))})]})})}function ea(e){const t=o.useRef(e);return o.useEffect(()=>{t.current=e}),t}let Jo=0,Ki=!1;function Yi(){Ki||typeof document>"u"||(Ki=!0,document.addEventListener("pointerdown",e=>{e.pointerType==="touch"&&(Jo=Date.now())},!0),document.addEventListener("touchstart",()=>{Jo=Date.now()},{capture:!0,passive:!0}))}Yi();function tr(e){return!!e&&e.pointerType==="touch"}function ur(e=1e3){return Yi(),Date.now()-Jo<e}function La(e,t,r,{enabled:a=!0,fallbackOnParent:s=!1}={}){const l=ea(e),i=ea(t),u=o.useRef(null),c=o.useRef(0);o.useEffect(()=>{if(!a||typeof document>"u")return;const h=d=>{const m=d,C=d.target,x=r.current,g=!!(C&&x&&x.contains(C));if(m.pointerType!=="touch"){g&&(u.current=null);return}if(g){u.current=l.current;return}u.current=null,l.current&&!(C&&C.closest?.(".tooltip__content"))&&i.current(!1,x)};return document.addEventListener("pointerdown",h,!0),()=>document.removeEventListener("pointerdown",h,!0)},[a,r,l,i]);const p=o.useCallback(h=>{const d=u.current;return d===null?!1:(u.current=null,c.current=Date.now(),i.current(!d,h??r.current),!0)},[r,i]);return o.useEffect(()=>{if(!a||!s)return;const h=r.current,d=h?.parentElement;if(!h||!d)return;let m=null;const C=y=>{const v=y.changedTouches?.[0];if(!v)return!1;const _=h.getBoundingClientRect();return v.clientX>=_.left&&v.clientX<=_.right&&v.clientY>=_.top&&v.clientY<=_.bottom},x=y=>{m=C(y)?l.current:null},g=y=>{const v=m;m=null,!(v===null||Date.now()-c.current<700||!C(y))&&(u.current=null,c.current=Date.now(),i.current(!v,h))};return d.addEventListener("touchstart",x,{passive:!0}),d.addEventListener("touchend",g),()=>{d.removeEventListener("touchstart",x),d.removeEventListener("touchend",g)}},[a,s,r,l,i]),{touchPress:p}}function Z2(e,t){const{size:r,type:a,htmlType:s,href:l,target:i,rel:u,icon:c,rightIcon:p,label:h,count:d,subLabel:m,children:C,ariaLabel:x,variant:g="default",align:y="center",nowrap:v=!1,ellipsis:_=!1,selected:b,toggleable:B=!1,ariaExpanded:N,ariaControls:f,disabled:w=!1,loading:k=!1,useLabel:E=!0,useBorder:A=!0,useBG:D=!0,useDisabledCovered:j=!1,useDisabledInvisible:$=!1,useDisabledFilled:H=!1,width:F,minWidth:U,onClick:T,onDisabledClick:I,showTooltipInfo:z=!1,tooltipInfoText:ie=null,tooltipDescription:te=null,tooltipOnly:P=!1,iconSize:G="medium",iconColor:X,shape:K="rounded",color:L,className:R,...S}=e,V=wn(),ae=r??V??48,ne=typeof ae=="string"&&isNaN(Number(ae))?ae.toLowerCase():String(Number(ae)||48),re=ne.match(/^\d+$/)?`button${ne}`:`button-${ne}`,ue=Number(ae),Be=!isNaN(ue)&&ue<40?"button-2":"button-1",le=h??C,J=w||!!S.disabled,O=J?j?"disabled-covered":$?"disabled-invisibled":H?"disabled-filled":"disabled":g,W=O?`button--variant-${O}`:"",q=y?`button--align-${y}`:"",oe=v?"button--nowrap":"",ee=_?"button--ellipsis":"",be=K?`button--shape-${K}`:"",je=typeof X=="string"&&X.startsWith("--")?`var(${X})`:X,De={...F?{width:typeof F=="number"?`${F}px`:F}:{},...U?{minWidth:typeof U=="number"?`${U}px`:U}:{},...A?{}:{"--button-border":J?"0":"1px solid transparent"},...je?{"--button-icon-color":je}:{},...L?{"--color-main":L}:{}},we=E===!1?"":le,ze=Array.isArray(we)?we.length>0:!!we,ye=!!p,_e=a??(ze||c||ye?"bar":"dot"),ve=`${re}--${_e}`,Ee=o.useRef(null);o.useEffect(()=>{!Zn||s!==void 0||Ee.current?.closest("form")&&Tt(`button-in-form:${typeof le=="string"?le:""}`,'[ihab/Button] <form> \uC548\uC778\uB370 htmlType \uC774 \uC5C6\uC2B5\uB2C8\uB2E4 \u2014 \uC774 \uB2E8\uCD94\uB294 type="button" \uC774\uB77C \uD3FC\uC744 \uBCF4\uB0B4\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uBCF4\uB0B4\uB294 \uB2E8\uCD94\uBA74 htmlType="submit" \uC744 \uC8FC\uC138\uC694. \uD3FC\uC5D0 \uBCF4\uB0B4\uB294 \uB2E8\uCD94\uAC00 \uD558\uB098\uB3C4 \uC5C6\uC73C\uBA74 **Enter \uB85C\uB3C4 \uC548 \uBCF4\uB0B4\uC9D1\uB2C8\uB2E4**(\uCE78\uC774 \uB458 \uC774\uC0C1\uC77C \uB54C).'+(typeof le=="string"&&le?` \uB2E8\uCD94: ${le}`:""))},[s,le]);const Oe=o.useRef(t);Oe.current=t;const ot=o.useCallback(Ke=>{Ee.current=Ke;const xt=Oe.current;typeof xt=="function"?xt(Ke):xt&&(xt.current=Ke)},[]),it=o.useRef(J),[Fe,Ue]=o.useState(!!b),[nt,Te]=o.useState(!1),[Xe,rt]=o.useState(null),ut=o.useCallback(()=>Te(!1),[]),[gt,_t]=o.useState(!1),pt=o.useId();o.useEffect(()=>{typeof b=="boolean"&&Ue(b)},[b]),o.useEffect(()=>{if(it.current&&!J&&Ee.current){const Ke=Ee.current;let xt=!1;try{xt=Ke.matches(":focus:not(:focus-visible)")}catch{xt=!1}xt&&Ke.blur(),Ke.style.pointerEvents="none";const jt=requestAnimationFrame(()=>{requestAnimationFrame(()=>{Ee.current&&(Ee.current.style.pointerEvents="")})});return()=>cancelAnimationFrame(jt)}it.current=J},[J]);const Yt=typeof b=="boolean"?!!b:Fe,kt=typeof N=="boolean"?void 0:B||typeof b=="boolean"?Yt?"true":"false":S["aria-pressed"],ct=xe("button",re,ve,W,q,oe,ee,be,Yt?"is-selected":null,D?null:"button--no-bg",P?"button--tooltip-only":null,R),Ae=`button__icon button__icon--${G}`,st=Array.isArray(m)?m:m!==void 0?[m]:[],ft=()=>{if(Array.isArray(we))return we.map((xt,jt)=>{const Q=st[jt];return n.jsxs("span",{className:`button__label-text${Q!==void 0?" button__label-text--has-sub":""}`,children:[xt,Q!==void 0&&n.jsx("span",{className:"button__sub-label-text caption-1",children:Q})]},jt)});const Ke=m!==void 0;return n.jsxs("span",{className:`button__label-text${Ke?" button__label-text--has-sub":""}`,children:[we,d!=null&&n.jsx("span",{className:"button__count",children:d}),Ke&&n.jsx("span",{className:"button__sub-label-text caption-1",children:m})]})},Ct=Ke=>{typeof b!="boolean"&&!B&&Ue(!1),Ke.currentTarget.blur()},Nt=Ke=>{J||(typeof S.onMouseLeave=="function"&&S.onMouseLeave(Ke),Ct(Ke))},Ft=Ke=>{if(P&&Et&&It.touchPress(Ke.currentTarget),J){Et&&It.touchPress(Ke.currentTarget),Ke.preventDefault(),I?.(Ke);return}typeof b!="boolean"&&B&&Ue(xt=>!xt),T?.(Ke)},yt=o.useCallback(()=>{(z||te)&&(Te(!0),rt(Ee.current?.getBoundingClientRect()??null))},[z,te]),vt=o.useCallback(()=>{(z||te)&&(Te(!1),rt(null))},[z,te]),Et=!!(z||te),It=La(nt,Ke=>{Ke?yt():vt()},Ee,{enabled:Et&&(J||P),fallbackOnParent:Et&&J}),Je={...S};delete Je.disabled,delete Je.className,delete Je.faded,delete Je.useFaded,delete Je.loading,delete Je.onMouseLeave,delete Je.onPointerEnter,delete Je.onPointerLeave,delete Je.onPointerUp,delete Je.onFocus,delete Je.onBlur,J&&(Object.keys(Je).forEach(Ke=>{/^on[A-Z]/.test(Ke)&&typeof Je[Ke]=="function"&&delete Je[Ke]}),Je["aria-disabled"]="true"),k&&(Je["aria-busy"]="true");const At=(typeof z=="string"?z:null)??(typeof ie=="string"?ie:null)??(typeof x=="string"?x:null)??(typeof le=="string"?le:null)??void 0,Qe=typeof x=="string"?x:typeof le=="string"?le:At,he=te?[te.title,...te.items??[]].filter(Boolean).join(". "):z&&At&&At!==Qe?At:"",Le=[typeof S["aria-describedby"]=="string"?S["aria-describedby"]:void 0,he?pt:null].filter(Boolean).join(" ")||void 0,Pe=()=>n.jsx("span",{className:`${Ae} button__spinner`,"aria-hidden":"true",children:n.jsx(Nr,{variant:"spinner",size:"100%"})}),We=(Ke,xt)=>n.jsx(lt,{icon:Ke,label:xt??Qe,className:Ae,imgClassName:"button__icon-img",maskClassName:"button__icon-mask",svgClassName:"button__icon-svg"}),dt=Ke=>k?Pe():We(c,Ke),on=()=>_e==="dot"?n.jsxs(n.Fragment,{children:[dt(),ze&&n.jsx("span",{className:`button__label ${Be}`,children:ft()})]}):y==="center"&&(c||k)?n.jsxs(n.Fragment,{children:[n.jsxs("span",{className:"button__center-group",children:[n.jsx("span",{className:"button__left",children:dt()}),ze&&n.jsx("span",{className:`button__label ${Be}`,children:ft()})]}),ye&&n.jsx("span",{className:"button__right",children:We(p)})]}):n.jsxs(n.Fragment,{children:[(c||k)&&n.jsx("span",{className:"button__left",children:dt(x??le)}),ze&&n.jsx("span",{className:`button__label ${Be}`,children:ft()}),ye&&n.jsx("span",{className:"button__right",children:We(p)})]}),ht=!!l&&!J;return n.jsxs(n.Fragment,{children:[n.jsxs(ht?"a":"button",{...Je,ref:ot,...ht?{href:l,target:i,rel:u??(i==="_blank"?"noreferrer":void 0)}:{type:s??"button",disabled:J&&!I&&!gt},className:ct,"aria-pressed":kt,"aria-expanded":typeof N=="boolean"?N:S["aria-expanded"],"aria-controls":f??S["aria-controls"],"aria-label":Qe,"aria-disabled":J&&(ht||I||gt)?!0:void 0,"aria-describedby":Le,style:De,onClick:Ft,onMouseLeave:Nt,onPointerEnter:Ke=>{tr(Ke)||yt(),!J&&typeof S.onPointerEnter=="function"&&S.onPointerEnter(Ke)},onPointerLeave:Ke=>{tr(Ke)||vt(),!J&&typeof S.onPointerLeave=="function"&&S.onPointerLeave(Ke)},onPointerUp:Ke=>{J&&Et&&It.touchPress(Ke.currentTarget),!J&&typeof S.onPointerUp=="function"&&S.onPointerUp(Ke)},onFocus:Ke=>{_t(!0),ur()||yt(),!J&&typeof S.onFocus=="function"&&S.onFocus(Ke)},onBlur:Ke=>{_t(!1),J||Ct(Ke),vt(),!J&&typeof S.onBlur=="function"&&S.onBlur(Ke)},children:[on(),he?n.jsx("span",{id:pt,hidden:!0,"aria-label":he}):null]}),nt&&te?n.jsx(er,{anchorRect:Xe,title:te.title,items:te.items,onClose:ut}):nt&&At?n.jsx(zn,{anchorRect:Xe,text:At,onClose:ut}):null]})}const me=o.forwardRef(Z2);me.displayName="Button";function Ht(e,t,r){const a=o.useRef(null);return o.useLayoutEffect(()=>{const s=a.current?.parentElement??null;return t(s,e),()=>r(s)},[e,t,r]),a}const ta={title:"--promo-banner-bg-title",description:"--promo-banner-bg-description"},Qo=new WeakMap;function es(e){if(e)return Qo.get(e)}function ln(e,t){e&&(e.style.setProperty(ta.title,t.title),e.style.setProperty(ta.description,t.description),Qo.set(e,t))}function un(e){e&&(e.style.removeProperty(ta.title),e.style.removeProperty(ta.description),Qo.delete(e))}const Zi={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"default"};function Xi(){const e=Ht(Zi,ln,un);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-main","aria-hidden":"true"})}const Ji={title:"var(--color-main)",description:"var(--color-gray)",actionVariant:"main"};function Qi(){const e=Ht(Ji,ln,un);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-soft","aria-hidden":"true"})}const eu={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function tu(){const e=Ht(eu,ln,un);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-sub","aria-hidden":"true"})}const nu={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function ru(){const e=Ht(nu,ln,un);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-deep","aria-hidden":"true"})}const au={title:"var(--color-darkSub)",description:"var(--color-gray)",actionVariant:"main"};function ou(){const e=Ht(au,ln,un);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-soft-sub","aria-hidden":"true"})}const su={title:"var(--color-black)",description:"var(--color-darkGray)",actionVariant:"main"};function lu(){const e=Ht(su,ln,un);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-warm","aria-hidden":"true"})}const iu={title:"var(--color-white)",description:"var(--color-lightGray)",actionVariant:"main"};function uu(){const e=Ht(iu,ln,un);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-dark","aria-hidden":"true"})}const cu={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function du(){const e=Ht(cu,ln,un);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-radial","aria-hidden":"true"})}const pu={title:"var(--color-darkMain)",description:"var(--color-gray)",actionVariant:"main"};function hu(){const e=Ht(pu,ln,un);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-diagonal","aria-hidden":"true"})}const mu={title:"var(--color-darkSub)",description:"var(--color-gray)",actionVariant:"main"};function fu(){const e=Ht(mu,ln,un);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-dots","aria-hidden":"true"})}const Cu={title:"var(--color-black)",description:"var(--color-gray)",actionVariant:"main"};function gu(){const e=Ht(Cu,ln,un);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-outline","aria-hidden":"true",children:n.jsx("span",{className:"promo-banner-bg-outline__dot"})})}const bu={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function yu(){const e=Ht(bu,ln,un);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-success","aria-hidden":"true"})}const vu={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"sub"};function xu(){const e=Ht(vu,ln,un);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-naver","aria-hidden":"true"})}const _u={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"transparent-white"};function wu(){const e=Ht(_u,ln,un);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-instagram","aria-hidden":"true"})}const mn=(e,t,r)=>({key:e,get label(){return Pt.t(`promoBannerBg.${e}`,t)},textTone:r}),X2=[mn("main","\uBA54\uC778 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),mn("soft","\uC18C\uD504\uD2B8","dark"),mn("sub","\uC11C\uBE0C \uCEEC\uB7EC","light"),mn("deep","\uB525 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),mn("softSub","\uC18C\uD504\uD2B8 \uC11C\uBE0C","dark"),mn("warm","\uC6DC(\uAC15\uC870)","dark"),mn("dark","\uB2E4\uD06C","light"),mn("radial","\uBC29\uC0AC\uD615 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),mn("diagonal","\uB300\uAC01\uC120 \uD328\uD134","dark"),mn("dots","\uB3C4\uD2B8 \uD328\uD134","dark"),mn("outline","\uC544\uC6C3\uB77C\uC778","dark"),mn("success","\uC131\uACF5/\uC644\uB8CC","light"),mn("naver","\uB124\uC774\uBC84 \uBE14\uB85C\uADF8 \uC548\uB0B4","light"),mn("instagram","\uC778\uC2A4\uD0C0\uADF8\uB7A8 \uC548\uB0B4","light")],Bu={main:Xi,soft:Qi,sub:tu,deep:ru,softSub:ou,warm:lu,dark:uu,radial:du,diagonal:hu,dots:fu,outline:gu,success:yu,naver:xu,instagram:wu};function ku({storageKey:e="fontScale",baseFont:t=20,minScale:r=.8,maxScale:a=1.4,step:s=.1,lineHeightRatio:l=1.4}={}){const i=b=>Math.max(r,Math.min(a,Number(b))),u=b=>{try{const B=localStorage.getItem(b),N=B?Number(B):1;return Number.isFinite(N)?i(N):i(1)}catch{return i(1)}},[c,p]=o.useState(()=>u(e)),[h,d]=o.useState(e);h!==e&&(d(e),p(u(e))),o.useEffect(()=>{try{localStorage.setItem(e,String(c))}catch{}},[e,c]);const m=b=>{p(typeof b=="function"?B=>i(b(B)):i(b))},C=()=>m(b=>+(b+s).toFixed(6)),x=()=>m(b=>+(b-s).toFixed(6)),g=c<a-Number.EPSILON,y=c>r+Number.EPSILON,v=Math.round(t*c),_=Math.round(v*l);return{scale:c,setScale:m,increase:C,decrease:x,canIncrease:g,canDecrease:y,fontSize:v,lineHeight:_}}function Au(e,t){const r=ea(t);o.useEffect(()=>{const a=()=>r.current();try{window.addEventListener(e,a)}catch{}return()=>{try{window.removeEventListener(e,a)}catch{}}},[e,r])}const ts=" \xB7 ",Nu=(()=>{if(typeof document>"u")return"";const e=document.title;return e.includes(ts)?e.split(ts).pop()??e:e})(),J2=o.createContext(!1),cr=[];let Eu=null;function Q2(e){const t=o.useContext(J2);o.useEffect(()=>{if(t||typeof e!="string"||!e)return;cr.length===0&&(Eu=document.title);const r={text:Nu?`${e}${ts}${Nu}`:e};return cr.push(r),document.title=r.text,()=>{const a=cr.lastIndexOf(r);a>=0&&cr.splice(a,1),document.title=cr.length?cr[cr.length-1].text:Eu??document.title}},[e,t])}const ns=[{value:"10",label:"10\uAC1C\uC529 \uBCF4\uAE30"},{value:"25",label:"25\uAC1C\uC529 \uBCF4\uAE30"},{value:"50",label:"50\uAC1C\uC529 \uBCF4\uAE30"},{value:"100",label:"100\uAC1C\uC529 \uBCF4\uAE30"}],ev=(()=>{let e=null;return()=>(e||(e=new Intl.Collator("ko")),e)})();function xn(e,t){return ev().compare(e,t)}const Ra=new Map;function tv(e){const t=Ra.get(e);if(t)return t;const r=[],a=/-?\d+(?:\.\d+)?/g;let s=0;for(let l=a.exec(e);l;l=a.exec(e)){let i=l.index,u=l[0];u[0]==="-"&&i>0&&!/\s/.test(e[i-1])&&(i+=1,u=u.slice(1)),i>s&&r.push(e.slice(s,i)),r.push(Number(u)),s=l.index+l[0].length}return s<e.length&&r.push(e.slice(s)),Ra.size>5e3&&Ra.clear(),Ra.set(e,r),r}function nv(e){if(!/^[\d\s-]+$/.test(e))return null;const t=e.replace(/\D/g,"");return t.length<9||t.length>11?null:t[0]==="0"||t[0]==="1"&&e!==t?t:null}function rv(e,t){const r=p=>p==null||typeof p=="number"&&Number.isNaN(p)?"":String(p).trim(),a=r(e),s=r(t);if(a===s)return 0;const l=(p,h)=>{if(typeof p=="number"&&!Number.isNaN(p))return[p];const d=nv(h);return d!==null?[d]:tv(h)},i=l(e,a),u=l(t,s),c=Math.min(i.length,u.length);for(let p=0;p<c;p++){const h=i[p],d=u[p];if(typeof h=="number"&&typeof d=="number"){if(h!==d)return h-d;continue}if(typeof h=="number")return-1;if(typeof d=="number")return 1;const m=xn(h,d);if(m!==0)return m}return i.length!==u.length?i.length-u.length:xn(a,s)}const ju=e=>e==null||typeof e=="number"&&Number.isNaN(e)||typeof e=="string"&&e.trim()==="";function Pa(e,t,r){const a=ju(e),s=ju(t);if(a||s)return a===s?0:a?1:-1;const l=rv(e,t);return r?l:-l}function av(e,t,r){const{t:a}=Ne.useTranslation(),[s,l]=o.useState(()=>{const x=r?.initialPageSize;return x&&ns.some(g=>g.value===x)?x:"25"}),[i,u]=o.useState(1),[c,p]=o.useState(t);Object.is(c,t)||(p(t),i!==1&&u(1));const h=o.useMemo(()=>ns.map(x=>({...x,label:a("visits.showN",{n:x.value})})),[a]),d=o.useCallback(x=>{ns.some(g=>g.value===x)&&(l(x),u(1))},[]),m=Math.max(1,Math.ceil(e.length/Number(s))),C=Math.min(Math.max(1,Number.isFinite(i)?Math.floor(i):1),m);return i!==C&&u(C),{pageRows:o.useMemo(()=>e.slice((C-1)*Number(s),C*Number(s)),[e,C,s]),pageSizeProps:{options:h,value:s,onChange:d},paginationProps:{page:C,total:m,onChange:u},setPage:u}}function ov(e){const[t,r]=o.useState(()=>e?.defaultKey!=null?{key:e.defaultKey,asc:e.defaultAsc??!0}:null),a=o.useRef(t),s=o.useRef(e?.onSortChange);s.current=e?.onSortChange;const l=o.useCallback(c=>{const p=a.current,h=p?.key===c?{key:c,asc:!p.asc}:{key:c,asc:!0};a.current=h,r(h),s.current?.(h)},[]),i=o.useCallback((c,p)=>({label:c,sortDir:t?.key===p?t.asc?"asc":"desc":null,onClick:()=>l(p)}),[t,l]),u=o.useCallback((c,p)=>{if(!t)return c;const{key:h,asc:d}=t;return[...c].sort((m,C)=>Pa(p(m,h),p(C,h),d))},[t]);return{sort:t,field:i,sortRows:u}}const Dn="\uC804\uCCB4",sv={labial:e=>e("common.phonetics.place.labial",{defaultValue:"\uC591\uC21C\uC74C"}),alveolar:e=>e("common.phonetics.place.alveolar",{defaultValue:"\uCE58\uC870\uC74C"}),palatal:e=>e("common.phonetics.place.palatal",{defaultValue:"\uACBD\uAD6C\uAC1C\uC74C"}),velar:e=>e("common.phonetics.place.velar",{defaultValue:"\uC5F0\uAD6C\uAC1C\uC74C"}),glottal:e=>e("common.phonetics.place.glottal",{defaultValue:"\uC131\uBB38\uC74C"})},lv={frontHigh:e=>e("common.phonetics.vowel.frontHigh",{defaultValue:"\uC804\uC124 \uACE0\uBAA8\uC74C"}),backHighUnrounded:e=>e("common.phonetics.vowel.backHighUnrounded",{defaultValue:"\uD6C4\uC124 \uACE0\uBAA8\uC74C \uD3C9\uC21C"}),backHighRounded:e=>e("common.phonetics.vowel.backHighRounded",{defaultValue:"\uD6C4\uC124 \uACE0\uBAA8\uC74C \uC6D0\uC21C"}),frontMid:e=>e("common.phonetics.vowel.frontMid",{defaultValue:"\uC804\uC124 \uC911\uBAA8\uC74C"}),backMidUnrounded:e=>e("common.phonetics.vowel.backMidUnrounded",{defaultValue:"\uD6C4\uC124 \uC911\uBAA8\uC74C \uD3C9\uC21C"}),backMidRounded:e=>e("common.phonetics.vowel.backMidRounded",{defaultValue:"\uD6C4\uC124 \uC911\uBAA8\uC74C \uC6D0\uC21C"}),low:e=>e("common.phonetics.vowel.low",{defaultValue:"\uC800\uBAA8\uC74C"})},iv={j:e=>e("common.phonetics.glide.j",{defaultValue:"j\uD65C\uC74C"}),w:e=>e("common.phonetics.glide.w",{defaultValue:"w\uD65C\uC74C"}),velar:e=>e("common.phonetics.glide.velar",{defaultValue:"\u0270\uD65C\uC74C"})};function uv(e,t){if("place"in t)return sv[t.place](e);const r=lv[t.vowel](e);return t.glide?`${r} \xB7 ${iv[t.glide](e)}`:r}const cv=(e,{defaultValue:t})=>t,Du=(e,t)=>({jamos:e,phonetic:t,tooltip:uv(cv,t)}),Wn=(e,t)=>t.map(r=>Du([r],{place:e})),Qt=(e,t,r)=>Du([...e],r?{vowel:t,glide:r}:{vowel:t}),rs={cho:[Wn("labial",["\u3142","\u3143","\u314D","\u3141"]),Wn("alveolar",["\u3137","\u3138","\u314C","\u3134","\u3139"]),Wn("alveolar",["\u3145","\u3146"]),Wn("palatal",["\u3148","\u3149","\u314A"]),Wn("velar",["\u3131","\u3132","\u314B"]),Wn("glottal",["\u314E"])],jung:[[Qt("\u3163","frontHigh"),Qt("\u315F","frontHigh","w"),Qt("\u3162","frontHigh","velar")],[Qt("\u3161","backHighUnrounded")],[Qt("\u315C","backHighRounded"),Qt("\u3160","backHighRounded","j")],[Qt("\u3154\u3150","frontMid"),Qt("\u3156\u3152","frontMid","j"),Qt("\u3159\u315A\u315E","frontMid","w")],[Qt("\u3153","backMidUnrounded"),Qt("\u3155","backMidUnrounded","j"),Qt("\u315D","backMidUnrounded","w")],[Qt("\u3157","backMidRounded"),Qt("\u315B","backMidRounded","j")],[Qt("\u314F","low"),Qt("\u3151","low","j"),Qt("\u3158","low","w")]],jong:[Wn("labial",["\u3142","\u3141"]),Wn("alveolar",["\u3137","\u3134","\u3139"]),Wn("velar",["\u3131","\u3147"])]},dv=e=>e===pv?[]:Array.from(e),pv="__NO_CODA__",as=e=>e.map(t=>t.map(({jamos:r,phonetic:a,tooltip:s})=>({v:r.join(""),phonetic:a,tooltip:s}))),Su={cho:as(rs.cho),jung:as(rs.jung),jong:as(rs.jong)};Su.jung.flat().forEach(({v:e})=>{for(const t of dv(e));}),new Set(Su.cho.flat().map(e=>e.v)),Object.fromEntries(Object.entries(kb).map(([e,{nucleus:t}])=>[e,t]));function hv(e,t=!0){const r=ea(e);o.useEffect(()=>{if(t)return ir(()=>{r.current?.()})},[t,r])}function Fa(){const[e,t]=o.useState(null),r=o.useCallback(l=>t(l.getBoundingClientRect()),[]),a=o.useCallback(()=>t(null),[]),s=o.useCallback(l=>{const i=l.getBoundingClientRect();t(u=>u?null:i)},[]);return{anchorRect:e,isOpen:e!=null,openAt:r,close:a,toggleAt:s}}function mv(e){const[t,r]=o.useState(null),[a,s]=o.useState(null),l=o.useRef(null);o.useEffect(()=>()=>{l.current&&clearTimeout(l.current)},[]);const i=o.useCallback((c,p)=>{l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{r(c),s(p)},e)},[e]),u=o.useCallback(()=>{l.current&&clearTimeout(l.current),r(null),s(null)},[]);return{payload:t,anchorRect:a,openAfterDelay:i,close:u}}function Tu(e="warning"){const[t,r]=o.useState(""),[a,s]=o.useState(e),[l,i]=o.useState(0),u=o.useCallback((d,m)=>{s(m),r(d),i(C=>C+1)},[]),c=o.useCallback(d=>u(d,"warning"),[u]),p=o.useCallback(d=>u(d,"normal"),[u]),h=o.useCallback(()=>r(""),[]);return{toastMessage:t,toastType:a,toastKey:l,showToast:u,showWarning:c,showNormal:p,clearToast:h}}function na(e){let t=0;if(e&&typeof window<"u"&&typeof window.getComputedStyle=="function")for(let r=e;r&&r!==document.body&&r!==document.documentElement;r=r.parentElement){const a=parseInt(window.getComputedStyle(r).zIndex,10);!Number.isNaN(a)&&a>t&&(t=a)}return t>0?`max(var(--z-menu, 1500), ${t+1})`:"var(--z-menu, 1500)"}function ra({computeStyle:e,onScroll:t="close",onResize:r="close",ignoreOutsideClickSelector:a}){const[s,l]=o.useState(!1),[i,u]=o.useState({position:"fixed"}),c=o.useRef(null),p=o.useRef(null),h=o.useCallback(()=>{c.current&&u(e(c.current.getBoundingClientRect(),c.current))},[e]);o.useLayoutEffect(()=>{s&&h()},[s,h]),o.useEffect(()=>{if(!s)return;let C=p.current?.offsetHeight??0;C>0&&h();let x=0,g=null;typeof ResizeObserver<"u"&&p.current&&(g=new ResizeObserver(()=>{const w=p.current?.offsetHeight??0;if(w!==C){if(C=w,++x>4){g?.disconnect(),g=null;return}h()}}),g.observe(p.current));const y=w=>{const k=w.target;a&&k.closest?.(a)||c.current?.contains(k)||p.current?.contains(k)||l(!1)};document.addEventListener("mousedown",y),document.addEventListener("pointerdown",y);let v=null;const _=()=>{if(typeof requestAnimationFrame>"u"){h();return}v===null&&(v=requestAnimationFrame(()=>{v=null,h()}))},b=w=>{p.current?.contains(w.target)||(t==="reposition"?_():t==="close"&&l(!1))};t!=="ignore"&&window.addEventListener("scroll",b,!0);const B=()=>{r==="reposition"?_():r==="close"&&l(!1)};let N=null;const f=()=>{B(),N&&clearTimeout(N),N=setTimeout(()=>{N=null,r==="reposition"&&h()},250)};return r!=="ignore"&&(window.addEventListener("resize",B),window.addEventListener("orientationchange",f)),()=>{v!==null&&cancelAnimationFrame(v),g?.disconnect(),document.removeEventListener("mousedown",y),document.removeEventListener("pointerdown",y),t!=="ignore"&&window.removeEventListener("scroll",b,!0),r!=="ignore"&&(window.removeEventListener("resize",B),window.removeEventListener("orientationchange",f)),N&&clearTimeout(N)}},[s,h,t,r,a]),o.useEffect(()=>{if(s)return ir(()=>l(!1))},[s]);const d=o.useCallback(()=>l(C=>!C),[]),m=o.useCallback(()=>l(!1),[]);return{open:s,setOpen:l,toggle:d,close:m,style:i,triggerRef:c,menuRef:p}}function fv(e,{mode:t="playback",autoStart:r=!1,onPlaySpeaker:a,onComplete:s,playMs:l=1100,feedbackMs:i=1500}={}){const[u,c]=o.useState([]),[p,h]=o.useState(0),[d,m]=o.useState("idle"),[C,x]=o.useState(null),[g,y]=o.useState([]),[v,_]=o.useState(null),[b,B]=o.useState(0),N=o.useRef(0),f=o.useCallback(P=>{N.current=typeof P=="function"?P(N.current):P,B(N.current)},[]),w=o.useRef(a),k=o.useRef(s);o.useEffect(()=>{w.current=a,k.current=s},[a,s]);const E=o.useRef([]),A=()=>{E.current.forEach(clearTimeout),E.current=[]},D=(P,G)=>{E.current.push(setTimeout(G,P))};o.useEffect(()=>()=>A(),[]);const j=u[p]?.id??null,$=o.useRef(null),H=o.useCallback(()=>{A(),m("playing"),y([]),_(null),f(0);let P=0;e.forEach((G,X)=>{D(P,()=>{h(X),x(G.id),w.current?.(G)}),D(P+1e3,()=>{x(null),y(K=>[...K,G.id])}),P+=1300}),D(P,()=>{m("done"),k.current?.({score:0,total:e.length})})},[e,f]),F=o.useCallback((P,G)=>{if(G>=P.length){m("done"),k.current?.({score:N.current,total:P.length});return}$.current=null,h(G),_(null),m("playing"),x(P[G].id),w.current?.(P[G]),D(l,()=>{x(null),m("waiting")})},[l]),U=o.useCallback(()=>{A();const P=Zr(e);c(P),f(0),y([]),F(P,0)},[e,F,f]),T=o.useCallback(()=>{t==="playback"?(c(e),H()):U()},[t,e,H,U]),I=o.useCallback(()=>{A(),m("idle"),x(null),y([]),_(null),h(0),f(0),c([])},[f]),z=JSON.stringify(e.map(P=>[P.id,P.label,P.angleDeg,P.deg,P.row,P.shortcut]));o.useEffect(()=>(r?T():I(),()=>A()),[t,z,r]);const ie=o.useCallback(P=>{d!=="waiting"||t==="playback"||$.current===p||($.current=p,_(P),P===u[p]?.id&&f(G=>G+1),t==="exam"?(m("playing"),D(400,()=>F(u,p+1))):(m("feedback"),D(i,()=>F(u,p+1))))},[d,t,u,p,F,i,f]),te=t==="playback"?e.length:u.length;return{bind:{activeSpeakerId:C,playedIds:g,selectedId:v,answerId:j,showFeedback:d==="feedback",clickable:d==="waiting",onSelectSpeaker:ie},index:p,total:te,score:b,phase:d,done:d==="done",start:T,reset:I}}const os=new Map,ss=new Map,Cv=()=>()=>{},gv=()=>!0,bv=()=>!1;function Mu(e){const t=/^data:image\/svg\+xml(;base64)?,([\s\S]*)$/.exec(e);if(!t)return null;try{if(!t[1])return decodeURIComponent(t[2]);const r=Uint8Array.from(atob(t[2]),a=>a.charCodeAt(0));return new TextDecoder("utf-8").decode(r)}catch{return null}}function yv(e){if(typeof window>"u")return"";const t=(r,a)=>{const s=a.attrName.toLowerCase(),l=a.attrValue.trim();(s==="href"||s==="xlink:href")&&!l.startsWith("#")&&(a.keepAttr=!1),(s==="style"||l.includes("\\")&&l.includes("("))&&(a.keepAttr=!1);const i=l.replace(/url\s*\(\s*(['"]?)#[^)\s'"]+\1\s*\)/gi,"");/url\s*\(/i.test(i)&&(a.keepAttr=!1)};wr.addHook("uponSanitizeAttribute",t);try{return wr.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:["script","style","foreignObject"]})}finally{wr.removeHook("uponSanitizeAttribute",t)}}function vv(e,t){const r=new Set;for(const i of e.matchAll(/url\(\s*(['"]?)#([^)\s"']+)\1\s*\)/g))r.add(i[2]);for(const i of e.matchAll(/(?:xlink:)?href="#([^"]+)"/g))r.add(i[1]);const a=new Set([...e.matchAll(/id="([^"]*)"/g)].map(i=>i[1])),s=[...r].filter(i=>a.has(i));if(s.length===0)return e;let l=e;for(const i of s){const u=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),c=`${t}-${i}`;l=l.replace(new RegExp(`id="${u}"`,"g"),`id="${c}"`).replace(new RegExp(`url\\(\\s*(['"]?)#${u}\\1\\s*\\)`,"g"),(p,h)=>`url(${h}#${c}${h})`).replace(new RegExp(`((?:xlink:)?href)="#${u}"`,"g"),`$1="#${c}"`)}return l}function xv(e){const t=ss.get(e);if(t)return t;const r=fetch(e).then(a=>a.ok?a.text():null).then(a=>(a!=null&&os.set(e,a),a)).catch(()=>null).finally(()=>{ss.delete(e)});return ss.set(e,r),r}function _v(e,t=!0){const r=o.useSyncExternalStore(Cv,gv,bv)&&t&&e?Mu(e)??os.get(e)??null:null,[a,s]=o.useState({src:e,enabled:t,svg:r});return o.useEffect(()=>{if(!t||!e){s({src:e,enabled:t,svg:null});return}const l=Mu(e)??os.get(e)??null;if(l!==null){s({src:e,enabled:t,svg:l});return}let i=!0;return xv(e).then(u=>{i&&s({src:e,enabled:t,svg:u})}),()=>{i=!1}},[e,t]),a.src===e&&a.enabled===t?a.svg:r}const wv=e=>String(e);function Bv(e,t=wv){const[r,a]=o.useState(null),[s,l]=o.useState(null),i=o.useCallback(c=>({draggable:!0,onDragStart:p=>{a(c),p.dataTransfer.effectAllowed="move",p.dataTransfer.setData("text/plain",t(c))},onDragEnd:()=>{a(null),l(null)}}),[t]),u=o.useCallback((c,p)=>{const h=r!=null&&(!p||p(r));return{onDragOver:d=>{h&&(d.preventDefault(),d.dataTransfer.dropEffect="move",l(c))},onDragEnter:()=>{h&&l(c)},onDragLeave:d=>{h&&!d.currentTarget.contains(d.relatedTarget)&&l(m=>m===c?null:m)},onDrop:d=>{if(!h||r==null)return;d.preventDefault();const m=r;l(null),a(null),e(m,c)}}},[r,e]);return{dragging:r,draggingId:r==null?null:t(r),dragOverKey:s,cardProps:i,groupProps:u}}const kv=[10,25,50,100];function Av(e=kv){const{t}=Ne.useTranslation(),r=e.join(",");return o.useMemo(()=>e.map(a=>({value:String(a),label:t("common.pageSizeLabel",{n:a,defaultValue:"{{n}}\uAC1C\uC529 \uBCF4\uAE30"})})),[r,t])}function Nv(e){o.useEffect(()=>{if(!e||typeof navigator>"u")return;const t=navigator.wakeLock;if(!t)return;let r=null,a=!1;const s=async()=>{if(!(a||r||document.visibilityState!=="visible"))try{const i=await t.request("screen");if(a){i.release().catch(()=>{});return}r=i,i.addEventListener("release",()=>{r===i&&(r=null)})}catch{}},l=()=>{document.visibilityState==="visible"&&s()};return s(),document.addEventListener("visibilitychange",l),()=>{a=!0,document.removeEventListener("visibilitychange",l),r&&(r.release().catch(()=>{}),r=null)}},[e])}const $u="__ihabBackClosable",dr=[];let Ia=0,Lu=!1,Ev=1;function ls(){try{const e=window.history.state?.[$u];return typeof e=="number"?e:void 0}catch{return}}function Ru(e){try{const t=window.history.state??{};window.history.pushState({...t,[$u]:e},"")}catch{}}function jv(){if(Ia>0){Ia--;return}const e=dr[dr.length-1];if(e&&ls()!==e.id){if(e.onBack()===!1){Ru(e.id);return}dr.pop()}}function Dv(){Lu||typeof window>"u"||(window.addEventListener("popstate",jv),Lu=!0)}function Pu(e,t){const r=o.useRef(t);o.useEffect(()=>{r.current=t});const a=o.useRef(null);o.useEffect(()=>{if(!e||typeof window>"u")return;Dv();const s=a.current??(a.current=Ev++),l={id:s,onBack:()=>r.current()};return dr.push(l),ls()!==s&&Ru(s),()=>{const i=dr.indexOf(l);if(i<0){a.current=null;return}dr.splice(i,1),setTimeout(()=>{if(!dr.some(u=>u.id===s)&&(a.current===s&&(a.current=null),ls()===s)){Ia++;try{window.history.back()}catch{Ia--}}},0)}},[e])}const Fu=260;function Sv({title:e,description:t,actionLabel:r,onAction:a,bg:s,color:l,size:i="medium",actionVariant:u,titleColor:c,descriptionColor:p,className:h=""}){const d=s??l??"main",m=o.useRef(null),[C,x]=o.useState("main"),g=Bn("(max-width: 767px)"),y=o.useRef({title:!1,description:!1});o.useLayoutEffect(()=>{const b=m.current;if(!b)return;const B=es(b),N=(f,w,k)=>{if(k!==void 0)b.style.setProperty(w,k),y.current[f]=!0;else if(y.current[f]){const E=B?.[f];E?b.style.setProperty(w,E):b.style.removeProperty(w),y.current[f]=!1}};N("title","--promo-banner-bg-title",c),N("description","--promo-banner-bg-description",p)},[c,p,d]),o.useLayoutEffect(()=>{const b=m.current;if(!b)return;const B=es(b);x(B?.actionVariant??"main")},[d]);const v=xe("promo-banner",`promo-banner--${i}`,h),_=Bu[d];return n.jsxs("div",{ref:m,className:v,role:"note",children:[n.jsx(_,{}),n.jsxs("div",{className:"promo-banner__text",children:[n.jsx("span",{className:`promo-banner__title ${i==="small"?"body-2":"h2"}`,children:e}),t&&n.jsx("span",{className:"promo-banner__description body-3",children:t})]}),r&&a&&n.jsx(me,{htmlType:"button",size:40,variant:u??C,shape:"pill",useBorder:!0,onClick:a,ariaLabel:r,...g?{type:"dot",icon:"arrow-right"}:{rightIcon:"arrow-right",label:r,minWidth:140}})]})}function Tv({children:e,interval:t=5e3,dotTone:r,className:a="","aria-label":s}){const{t:l}=Ne.useTranslation(),i=s??l("topBanner.ariaLabel","\uBC30\uB108"),u=o.Children.toArray(e),c=u.length,[p,h]=o.useState(0),[d,m]=o.useState(!1),[C,x]=o.useState(!1),[g,y]=o.useState(!1),v=o.useRef(null),_=o.useRef(null),b=o.useRef(null),B=$a(),N=d||C||g,f=c>0?Math.min(p,c-1):0;o.useEffect(()=>{if(c<2||t<=0||N||B)return;const k=window.setInterval(()=>h(E=>(Math.min(E,c-1)+1)%c),t);return()=>window.clearInterval(k)},[c,t,N,B]);const w=k=>{_.current!=null&&window.clearTimeout(_.current),_.current=window.setTimeout(()=>{_.current=null,y(!1)},k)};return o.useEffect(()=>()=>{_.current!=null&&window.clearTimeout(_.current)},[]),o.useEffect(()=>{if(!g)return;const k=E=>{E.pointerType==="touch"&&(b.current&&b.current.contains(E.target)||(_.current!=null&&(window.clearTimeout(_.current),_.current=null),y(!1)))};return document.addEventListener("pointerdown",k,!0),()=>document.removeEventListener("pointerdown",k,!0)},[g]),c===0?null:n.jsxs("section",{ref:b,className:xe("top-banner",a),"aria-label":i,"aria-roledescription":"carousel",onPointerEnter:k=>{v.current=k.pointerType},onPointerDown:k=>{v.current=k.pointerType,k.pointerType==="touch"&&(_.current!=null&&(window.clearTimeout(_.current),_.current=null),y(!0))},onPointerUp:k=>{k.pointerType==="touch"&&w(5e3)},onPointerCancel:k=>{k.pointerType==="touch"&&w(5e3)},onMouseEnter:()=>{v.current!=="touch"&&m(!0)},onMouseLeave:()=>m(!1),onFocus:k=>{let E=!0;try{E=k.target.matches(":focus-visible")}catch{E=!0}x(E)},onBlur:k=>{k.currentTarget.contains(k.relatedTarget)||x(!1)},children:[n.jsx("div",{className:"top-banner__viewport",children:n.jsx("div",{className:"top-banner__track",style:{transform:`translateX(-${f*100}%)`},children:u.map((k,E)=>n.jsx("div",{className:"top-banner__slide","aria-hidden":E!==f,...E!==f?{inert:!0}:{},children:k},E))})}),c>1&&n.jsx("div",{className:`top-banner__dots${(r?.[f]??"light")==="dark"?" top-banner__dots--dark":""}`,children:u.map((k,E)=>n.jsx("button",{type:"button",className:`top-banner__dot${E===f?" top-banner__dot--active":""}`,"aria-label":l("topBanner.dotAriaLabel",{count:c,index:E+1,defaultValue:`${c}\uAC1C \uC911 ${E+1}\uBC88\uC9F8 \uBC30\uB108`}),"aria-current":E===f,onClick:()=>h(E)},E))})]})}function Mv({title:e,body:t,open:r=!1,onToggle:a,avatar:s,titleClassName:l="body-2",bodyClassName:i="body-2",className:u=""}){const{t:c}=Ne.useTranslation();return n.jsxs("div",{className:`accordion-item ${r?"accordion-item--open":""} ${u}`.trim(),role:"listitem",children:[n.jsxs("div",{className:"accordion-item__header",role:"button",tabIndex:0,"aria-expanded":r,"data-accordion-header":!0,onClick:a,onKeyDown:p=>{if(p.key==="Enter"||p.key===" ")p.preventDefault(),a?.();else if(p.key==="ArrowDown"||p.key==="ArrowUp"){p.preventDefault();const h=p.currentTarget.closest('[role="list"]');if(!h)return;const d=Array.from(h.querySelectorAll("[data-accordion-header]")),m=d.indexOf(p.currentTarget);(p.key==="ArrowDown"?d[m+1]:d[m-1])?.focus()}},children:[s&&n.jsx("div",{className:"accordion-item__avatar",children:s}),n.jsx("div",{className:`accordion-item__title ${l}`,children:e}),n.jsx("div",{className:"accordion-item__chevron",children:n.jsx(lt,{icon:r?"chevron-up":"chevron-down",label:r?c("accordion.collapse","\uC811\uAE30"):c("accordion.expand","\uD3BC\uCE58\uAE30"),className:"accordion-item__chevron-icon",imgClassName:"accordion-item__chevron-image"})})]}),r&&n.jsx("div",{className:`accordion-item__body ${i}`,children:typeof t=="string"?n.jsx("p",{children:t}):t})]})}function $v({items:e=[],defaultOpenIndex:t=0,size:r=72,className:a="",bodyClassName:s}){const[l,i]=o.useState({index:t}),u=(c,p)=>l.id!=null&&c.id!=null?c.id===l.id:l.id==null&&p===l.index;return n.jsx("div",{className:`accordion-group accordion-group--s${r} ${a}`.trim(),role:"list",children:e.map((c,p)=>n.jsx(Mv,{title:c.title,body:c.body,avatar:c.avatar,open:u(c,p),onToggle:()=>i(u(c,p)?{index:-1}:{index:p,id:c.id}),bodyClassName:s},c.id??p))})}function Lv(){return n.jsx("svg",{viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:2.2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:n.jsx("polyline",{points:"2,6 5,9 10,3"})})}function Rv(){return n.jsxs("svg",{viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:2.2,strokeLinecap:"round","aria-hidden":"true",children:[n.jsx("line",{x1:"3",y1:"3",x2:"9",y2:"9"}),n.jsx("line",{x1:"9",y1:"3",x2:"3",y2:"9"})]})}function Pv(){return n.jsx("svg",{viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:2.2,strokeLinecap:"round","aria-hidden":"true",children:n.jsx("line",{x1:"2.5",y1:"6",x2:"9.5",y2:"6"})})}function Sn({children:e,icon:t,number:r,position:a="top-left",size:s=24,animate:l=!1,onClick:i,"aria-label":u,"aria-hidden":c,className:p=""}){const{t:h}=Ne.useTranslation(),d=t??"check",m=r!==void 0,C=e!==void 0||m?"number":d,x=e!==void 0?void 0:m?h("badge.nthSelected",{n:r,defaultValue:"{{n}}\uBC88\uC9F8 \uC120\uD0DD"}):{check:h("badge.selected","\uC120\uD0DD\uB428"),remove:h("badge.remove","\uC81C\uAC70"),minus:h("badge.exclude","\uC81C\uC678")}[d],g=c?void 0:u??x;return n.jsxs("span",{className:xe("circle-badge",`circle-badge--${C}`,`circle-badge--${s}`,`circle-badge--${a}`,l?"circle-badge--animate":"",i?"circle-badge--clickable":"",p),onClick:i,onKeyDown:i?y=>{y.key!=="Enter"&&y.key!==" "||(y.preventDefault(),y.currentTarget.click())}:void 0,"aria-label":g,"aria-hidden":c||void 0,role:i?"button":g?"img":void 0,tabIndex:i?0:void 0,children:[e??(m?r:null),e===void 0&&!m&&d==="check"&&n.jsx(Lv,{}),e===void 0&&!m&&d==="remove"&&n.jsx(Rv,{}),e===void 0&&!m&&d==="minus"&&n.jsx(Pv,{})]})}function nr({columns:e=[],onClose:t,className:r="",size:a="medium"}){const{t:s}=Ne.useTranslation(),l=a==="small"?40:48,[i,u]=o.useState([]),c=o.useMemo(()=>{const y=[{title:null,columns:e}];let v=e;for(const _ of i){const b=v?.[_.ci]?.items?.[_.ii];if(!b||!Array.isArray(b.children)||!b.children.length)break;v=[{title:null,items:b.children}],y.push({title:b.label||null,columns:v})}return y},[e,i]),p=c[c.length-1],h=c.length-1,d=o.useCallback(()=>u(y=>y.slice(0,Math.max(0,Math.min(y.length,h)-1))),[h]),m=o.useRef(null),C=o.useRef(null),x=c.length;o.useEffect(()=>{C.current||(C.current=document.activeElement);let y=0,v=0;const _=()=>{const b=m.current?.querySelector("button:not([disabled])");if(b&&b.offsetParent){b.focus({preventScroll:!0});return}v++<20&&(y=requestAnimationFrame(_))};return y=requestAnimationFrame(_),()=>cancelAnimationFrame(y)},[x]),o.useEffect(()=>()=>{C.current?.focus?.({preventScroll:!0})},[]);const g=o.useCallback((y,v,_)=>{if(y){if(Array.isArray(y.children)&&y.children.length){u(b=>[...b.slice(0,h),{ci:v,ii:_}]);return}try{typeof y.onClick=="function"&&y.onClick()}catch{}try{y&&y.closeOnSelect&&typeof t=="function"&&t()}catch{}}},[t,h]);return n.jsxs("div",{className:ce(`menu-tooltip menu-tooltip--${a} ${r}`),children:[(c.length>1||p.title)&&n.jsxs("div",{className:ce("menu-tooltip__header"),children:[c.length>1?n.jsx(me,{htmlType:"button",size:l,type:"dot",icon:"chevron-left",ariaLabel:s("common.back","\uB4A4\uB85C"),onClick:d,variant:"transparent-gray",useBorder:!1}):null,n.jsx("div",{className:ce("menu-tooltip__title button-1"),children:p.title})]}),n.jsx("div",{className:ce("menu-tooltip__columns"),ref:m,children:p.columns&&p.columns.map((y,v)=>{const _=(y.items||[]).some(b=>!!b.icon||b.selected!==void 0);return n.jsxs("div",{className:ce("menu-tooltip__column"),children:[y.title?n.jsx("div",{className:ce("menu-tooltip__column-title body-3"),children:y.title}):null,n.jsx("div",{className:ce("menu-tooltip__items"),children:(y.items||[]).map((b,B)=>n.jsxs(o.Fragment,{children:[b.separatorBefore&&B>0&&n.jsx("div",{className:ce("menu-tooltip__separator"),role:"separator"}),n.jsx(me,{htmlType:"button",className:ce("menu-tooltip__item"),size:l,type:b.label?"bar":"dot",icon:b.selected?"check":b.icon||(_||!b.label?"none":void 0),rightIcon:Array.isArray(b.children)&&b.children.length?"chevron-right":b.badgeCount?n.jsx(Sn,{position:"inline",number:Math.min(b.badgeCount,99),size:24,"aria-hidden":!0}):void 0,label:b.label,ariaLabel:b.label&&b.badgeCount&&b.badgeCount>0?s("nav.badgeLabel",{label:b.label,count:b.badgeCount,defaultValue:"{{label}}, {{count}}\uAC1C"}):b.label,onClick:()=>g(b,v,B),selected:b.selected,disabled:b.disabled,showTooltipInfo:b.tooltip||!1,useBorder:!1,align:"left"})]},B))})]},v)})})]})}const Iu=".content-area";function is(e,t="Nav"){try{const r=typeof e=="string"?document.querySelector(e):e?.current??document.querySelector(Iu);if(r){r.scrollTop=0;return}const a=document.scrollingElement??document.documentElement;a&&a.scrollHeight<=a.clientHeight&&Tt("nav-scroll-container",`[${t}] \uBCF8\uBB38\uC744 \uB9E8 \uC704\uB85C \uB418\uB3CC\uB9B4 \uD1B5\uC744 \uBABB \uCC3E\uC558\uB2E4(\uAE30\uBCF8 ${Iu}) \u2014 \uCC3D\uB3C4 \uAD6C\uB97C \uC218 \uC5C6\uC5B4 \uC544\uBB34 \uC77C\uB3C4 \uD558\uC9C0 \uC54A\uB294\uB2E4. scrollContainer \uB85C \uD1B5\uC744 \uC54C\uB824 \uC900\uB2E4.`),window.scrollTo({top:0})}catch{}}const us=52,Oa=10,Ou=e=>e&&e>0?e:0;function zu({items:e=[],activeKey:t,onChange:r,appMode:a,onAppModeChange:s,moreItems:l=[],scrollContainer:i}){const{t:u}=Ne.useTranslation(),c=a==="manager"?"malgwi":"manager",p=a==="manager"?"arrow-left":"arrow-right",h=a==="manager"?u("nav.modeLabelMalgwi","\uB9D0\uADC0"):u("nav.modeLabelManager","\uB9D0\uADC0 \uB9E4\uB2C8\uC800"),d=o.useRef(null),[m,C]=o.useState(0),x=e.length;o.useEffect(()=>{const P=d.current;if(!P)return;const G=()=>{const L=typeof getComputedStyle=="function"?getComputedStyle(P):null,R=P.clientWidth-(parseFloat(L?.paddingLeft??"")||0)-(parseFloat(L?.paddingRight??"")||0),S=P.querySelector(".bottom-nav__left"),V=S?.nextElementSibling,ae=(S?.offsetWidth??0)+(S&&V?.classList.contains("bottom-nav__divider")?V.offsetWidth:0);C(Math.max(0,R-ae))};if(G(),typeof ResizeObserver>"u")return;const X=new ResizeObserver(G);X.observe(P);const K=P.querySelector(".bottom-nav__left");return K&&X.observe(K),()=>X.disconnect()},[s]);const g=us+1,y=P=>Math.max(0,Math.floor((P+Oa)/(us+Oa))),v=x*(us+Oa)-Oa<=m,_=m<=0||l.length===0&&v?x:Math.min(x,y(m-g)),b=m>0&&_<x,B=b?_:x,N=e.slice(0,B),f=e.slice(B),w=b||l.length>0,k=o.useCallback((P,G)=>({position:"fixed",bottom:window.innerHeight-P.top+8,right:window.innerWidth-P.right,zIndex:na(G)}),[]),E=o.useId(),{open:A,toggle:D,close:j,style:$,triggerRef:H,menuRef:F}=ra({computeStyle:k,onScroll:"ignore",onResize:"reposition"}),U=o.useCallback((P,G)=>G>0?u("nav.badgeLabel",{label:P,count:G,defaultValue:"{{label}}, {{count}}\uAC1C"}):P,[u]),T=o.useCallback((P,G)=>G>0?u("nav.badgeInsideLabel",{label:P,count:G,defaultValue:"{{label}}, \uC548\uC5D0 \uC54C\uB9BC {{count}}\uAC1C"}):P,[u]),I=o.useCallback(()=>s?.(c),[s,c]),z=o.useMemo(()=>f.find(P=>!!P.key&&P.key===t)??l.find(P=>P.selected||P.key&&P.key===t),[f,t,l]),ie=o.useMemo(()=>[{items:[...f.map(P=>({label:P.label,icon:P.icon,badgeCount:P.badgeCount,selected:!!P.key&&P.key===t,closeOnSelect:!0,disabled:P.state==="disabled",onClick:()=>{P.state!=="disabled"&&(P.key&&r&&(r(P.key),is(i,"BottomNav")),j())}})),...l.map(P=>({label:P.label,icon:P.icon,badgeCount:P.badgeCount,selected:P.selected??(!!P.key&&P.key===t),closeOnSelect:!0,onClick:()=>{P.onClick?.(),j()}}))]}],[f,l,t,r,j]),te=[...f,...l].reduce((P,G)=>P+Ou(G.badgeCount),0);return n.jsxs("nav",{className:"bottom-nav",ref:d,"aria-label":u("nav.bottomNav","\uD558\uB2E8 \uB124\uBE44\uAC8C\uC774\uC158"),children:[s&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"bottom-nav__left",children:n.jsx(me,{htmlType:"button",size:52,type:"dot",icon:p,ariaLabel:h,className:"bottom-nav-item",onClick:I})}),n.jsx("div",{className:"bottom-nav__divider","aria-hidden":"true"})]}),n.jsx("div",{className:"bottom-nav__items",children:N.map((P,G)=>{const X=Ou(P.badgeCount);return n.jsxs("span",{className:"bottom-nav__slot",children:[n.jsx(me,{htmlType:"button",size:52,type:"dot",icon:P.icon,ariaLabel:U(P.label,X),selected:!!P.key&&P.key===t,disabled:P.state==="disabled",className:"bottom-nav-item",onClick:()=>{P.key&&(r?.(P.key),is(i,"BottomNav"))}}),X>0&&n.jsx("span",{"aria-hidden":"true",children:n.jsx(Sn,{position:"top-right",number:Math.min(X,99),size:24})})]},P.key??`__slot-${G}`)})}),w&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"bottom-nav__divider","aria-hidden":"true"}),n.jsx("div",{className:"bottom-nav__right",children:n.jsxs("div",{ref:H,className:"bottom-nav__slot",children:[n.jsx(me,{htmlType:"button",size:52,type:"dot",icon:z?.icon??"ellipsis",ariaLabel:T(z?.label??u("nav.more","\uB354\uBCF4\uAE30"),te),selected:!!z,className:"bottom-nav-item",onClick:D,"aria-expanded":A,"aria-controls":A?E:void 0}),te>0&&n.jsx("span",{"aria-hidden":"true",children:n.jsx(Sn,{position:"top-right",number:Math.min(te,99),size:24})}),A&&bn.createPortal(n.jsx("div",{id:E,role:"group","aria-label":u("nav.moreMenu","\uB354\uBCF4\uAE30 \uBA54\uB274"),className:ce("tooltip__content"),style:$,ref:F,children:n.jsx(nr,{columns:ie,onClose:j})}),document.body)]})})]})]})}function Wu(e){if(typeof e!="string")return!1;let t="";for(const a of e){const s=a.charCodeAt(0);s<=32||s>=127&&s<=159||(t+=a)}if(!t)return!1;const r=/^([a-zA-Z][a-zA-Z0-9+.-]*):/.exec(t);return r?["http","https","mailto","tel"].includes(r[1].toLowerCase()):!0}function Hu(e,t,r){return r&&r>0?e("nav.badgeLabel",{label:t,count:r,defaultValue:"{{label}}, {{count}}\uAC1C"}):t}function Fv(e){const{t}=Ne.useTranslation(),{activeKey:r,unreadCount:a,onDebug:s,onNotification:l,onSetting:i,onHelp:u,onFeedback:c,onAccount:p}=e||{},h="default";return s||l||i||u||c||p?n.jsxs("div",{className:"side-nav__footer",children:[s&&n.jsx(me,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"terminal",ariaLabel:t("nav.debug","\uB514\uBC84\uADF8"),onClick:s,selected:r==="debug"}),u&&n.jsx(me,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"message-circle-question-mark",ariaLabel:t("nav.help","\uB3C4\uC6C0\uB9D0"),onClick:u,selected:r==="help"}),l&&n.jsxs("span",{className:"side-nav__notification-wrap",children:[n.jsx(me,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"bell",ariaLabel:Hu(t,t("nav.notifications","\uC54C\uB9BC"),a),onClick:l,selected:r==="notifications"}),!!a&&a>0&&n.jsx(Sn,{position:"top-right",number:Math.min(a,99),size:24,"aria-hidden":!0})]}),i&&n.jsx(me,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"settings",ariaLabel:t("nav.settings","\uC124\uC815"),onClick:i,selected:r==="settings"}),c&&n.jsx(me,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"bug",ariaLabel:t("nav.feedback","\uBC84\uADF8\uC2E0\uACE0"),onClick:c,selected:r==="feedback"}),p&&n.jsx(me,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"user-round",ariaLabel:t("nav.account","\uACC4\uC815"),onClick:p,selected:r==="account"})]}):null}function Vu(e){const{t}=Ne.useTranslation(),{item:r,itemKey:a,label:s,icon:l,active:i,onClick:u,style:c,state:p,labelStyle:h}=e||{},d=r?.key??a??"",m=r?.label??s??"",C=r?.icon??l??"",x=r?.badge??0,g=n.jsx("span",{className:"side-nav__icon-wrap",children:n.jsx(lt,{icon:C,label:typeof m=="string"?m:void 0,className:"side-nav__icon",maskClassName:"side-nav__icon-image",imgClassName:void 0,svgClassName:void 0})}),y=p==="disabled",v=`side-nav__item ${i?"active":""} ${p||""} ${y?"disabled":""} ${r?.child?"side-nav__item--child":""}`,_=o.useCallback(b=>{if(y)return;const B=b.detail>0;if(B)try{b.currentTarget.blur()}catch{}u?.(d,b.currentTarget,B)},[y,d,u]);return n.jsxs("button",{type:"button",className:v,onClick:_,"aria-label":typeof m=="string"?Hu(t,m,x):void 0,"aria-current":i?"page":void 0,style:c,"aria-disabled":y,children:[g,n.jsx("span",{className:"side-nav__label button-1 f",style:h,children:m}),x>0&&n.jsx(Sn,{position:"inline",number:Math.min(x,99),size:24,"aria-hidden":!0}),p==="loading"&&n.jsx("span",{className:"side-nav__spinner",role:"img","aria-label":t("loader.loading","\uBD88\uB7EC\uC624\uB294 \uC911\u2026")})]})}function qu(e){const{t}=Ne.useTranslation(),{items:r=[],activeKey:a,onChange:s,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:p,onHelp:h,onFeedback:d,appMode:m,onAppModeChange:C,scrollContainer:x}=e||{},g=m==="manager",y=o.useCallback(()=>C?.(g?"malgwi":"manager"),[C,g]),v=o.useRef(null),[_,b]=o.useState(null);o.useEffect(()=>{const k=v.current;if(!k)return;let E=null;const A=()=>{const{scrollHeight:$,clientHeight:H,scrollTop:F}=k;if($<=H+1){b(ie=>ie===null?ie:null);return}const U=Math.max(24,H/$*H),T=H-U,I=$-H,z={top:Math.round(F/I*T),height:Math.round(U)};b(ie=>ie&&ie.top===z.top&&ie.height===z.height?ie:z)},D=()=>{if(typeof requestAnimationFrame>"u"){A();return}E===null&&(E=requestAnimationFrame(()=>{E=null,A()}))};A(),k.addEventListener("scroll",D,{passive:!0});const j=typeof ResizeObserver<"u"?new ResizeObserver(D):null;j?.observe(k);for(const $ of Array.from(k.children))j?.observe($);return()=>{E!==null&&cancelAnimationFrame(E),k.removeEventListener("scroll",D),j?.disconnect()}},[r]);const B=o.useRef(null),N=o.useCallback(k=>{const E=v.current;E&&(k.preventDefault(),B.current={y:k.clientY,top:E.scrollTop},k.currentTarget.setPointerCapture(k.pointerId))},[]),f=o.useCallback(k=>{const E=v.current,A=B.current;!E||!A||(E.scrollTop=A.top+(k.clientY-A.y)*(E.scrollHeight/E.clientHeight))},[]),w=o.useCallback(k=>{B.current=null,k.currentTarget.hasPointerCapture(k.pointerId)&&k.currentTarget.releasePointerCapture(k.pointerId)},[]);return n.jsxs("nav",{"aria-label":t("nav.mainMenu","\uBA54\uC778 \uBA54\uB274"),className:"side-nav__menu",children:[n.jsxs("div",{ref:v,className:"side-nav__menu-list",children:[_&&n.jsx("div",{className:"side-nav__scroll","aria-hidden":"true",children:n.jsx("div",{className:"side-nav__scroll-thumb",style:{top:_.top,height:_.height},onPointerDown:N,onPointerMove:f,onPointerUp:w,onPointerCancel:w})}),(r||[]).filter(k=>!k.section&&(k.key||k.label)).map((k,E)=>n.jsxs(o.Fragment,{children:[k.divider&&n.jsx("div",{className:"side-nav__separator"}),n.jsx(Vu,{item:k,active:!!k.key&&k.key===a,state:k.disabled?"disabled":void 0,onClick:(A,D,j)=>{if(k.disabled)return;if(k.href){if(Wu(k.href)&&window.open(k.href,"_blank","noopener,noreferrer"),j)try{D?.blur()}catch{}return}if(s?.(k.key),is(x,"SideNav"),!j)return;try{D?.blur()}catch{}if(typeof window<"u"&&window.matchMedia){if(!window.matchMedia("(min-width: 768px) and (max-width: 1023px)").matches)return}else return;const $=document.querySelector(".header");if($){const H=typeof $.matches=="function";if(!(window.matchMedia("(hover: hover)").matches&&H&&$.matches(":hover"))){$.classList.add("header--force-collapsed");const F=()=>{$.classList.remove("header--force-collapsed"),$.removeEventListener("mouseenter",F)};$.addEventListener("mouseenter",F)}}}})]},k.key??`side-nav__item-${E}`)),C&&n.jsx("div",{className:"side-nav__separator side-nav__separator--short"}),C&&n.jsx(Vu,{item:{key:"__mode-switch__",label:g?t("nav.goToMalgwi","\uB9D0\uADC0\uB85C \uC774\uB3D9"):t("nav.goToManager","\uB9D0\uADC0\uB9E4\uB2C8\uC800\uB85C \uC774\uB3D9"),icon:g?"arrow-left":"arrow-right"},onClick:y})]}),n.jsx(Fv,{activeKey:a,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:p,onHelp:h,onFeedback:d})]})}var za='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Logo_SpeechEar_ko" xmlns="http://www.w3.org/2000/svg" width="583.33" height="240" viewBox="0 0 583.33 240"><g id="text"><path d="M278.07,115.18V47.71h85.73v67.47h-85.73ZM408.4,173.42v20.18h-125.33v-44.02h96.5v-5.96h-96.88v-20.18h124.18v44.02h-96.11v5.96h97.65ZM305.56,70.97v20.76h30.95v-20.76h-30.95ZM423.39,92.88h-16.53v25.37h-27.68V45.98h27.68v20.18h16.53v26.72Z"/><path d="M527.58,113.83v26.33c-7.82,3.59-20.06,5.38-36.71,5.38h-1.73v48.06h-27.68v-48.06h-34.21v-26.33h64.01c16.4,0,28.51-1.79,36.33-5.38ZM435.31,75.77v-26.33h80.35v62.09h-27.68v-35.75h-52.67ZM563.33,193.61h-27.68V45.98h27.68v147.63Z"/></g><g id="symbol"><path d="M183.92,56.08c-8.48-15.54-24.97-26.08-43.92-26.08h-60c-27.61,0-50,22.39-50,50v23.38l-19.22,21.15c-1.15,1.26-1.02,3.24.3,4.33,5.82,4.84,12.22,8.56,18.92,11.21.03,18.92,10.56,35.37,26.08,43.84,8.48,15.54,24.97,26.08,43.92,26.08h45.11c2.7,0,4.89,2.19,4.89,4.89,0,2.86,2.45,5.13,5.3,4.88,30.65-2.68,54.7-28.42,54.7-59.77v-60c0-18.95-10.54-35.44-26.08-43.92Z" fill="%234dcdc0"/><path d="M80,50c-16.57,0-30,13.43-30,30v80c0,8.66,2.21,16.81,6.08,23.92,7.1,3.88,15.25,6.08,23.92,6.08h80c16.57,0,30-13.43,30-30v-80c0-8.66-2.21-16.81-6.08-23.92-7.1-3.88-15.25-6.08-23.92-6.08h-80Z" fill="%23499cdf"/><rect x="69" y="88" width="12" height="24" rx="6" ry="6" fill="%23fff"/><path d="M111,140c-2.92,0-5.85-.75-8.5-2.28-2.39-1.38-3.21-4.44-1.82-6.83,1.38-2.39,4.44-3.21,6.83-1.82,2.74,1.58,6.21,1.13,8.44-1.1,1.08-1.08,1.76-2.45,1.97-3.95.9-6.37,3.71-12.42,8.14-17.5,2.64-3.02,4.03-6.9,3.93-10.92-.21-8.21-6.78-15.05-14.97-15.56-2.76-.18-5.42.33-7.88,1.51-2.49,1.19-5.48.12-6.66-2.37-1.19-2.49-.12-5.48,2.37-6.66,3.96-1.88,8.38-2.73,12.8-2.46,13.32.83,24.01,11.94,24.34,25.29.16,6.53-2.11,12.83-6.39,17.75-3.15,3.61-5.15,7.87-5.77,12.32-.52,3.67-2.18,7-4.8,9.63-3.27,3.27-7.62,4.97-12.02,4.97Z" fill="%23fff"/></g></svg>',cs='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Logo_SpeechEarManager_ko" xmlns="http://www.w3.org/2000/svg" width="1035.43" height="240" viewBox="0 0 1035.43 240"><g id="text"><path d="M278.07,115.18V47.71h85.73v67.47h-85.73ZM408.4,173.42v20.18h-125.33v-44.02h96.5v-5.96h-96.88v-20.18h124.18v44.02h-96.11v5.96h97.65ZM305.56,70.97v20.76h30.95v-20.76h-30.95ZM423.39,92.88h-16.53v25.37h-27.68V45.98h27.68v20.18h16.53v26.72Z"/><path d="M527.58,113.83v26.33c-7.82,3.59-20.06,5.38-36.71,5.38h-1.73v48.06h-27.68v-48.06h-34.21v-26.33h64.01c16.4,0,28.51-1.79,36.33-5.38ZM435.31,75.77v-26.33h80.35v62.09h-27.68v-35.75h-52.67ZM563.33,193.61h-27.68V45.98h27.68v147.63Z"/><path d="M644.64,52.32v131.48h-58.24V52.32h58.24ZM634.45,173.81V62.32h-38.25v111.49h38.25ZM713.65,193.61h-10.19v-75.16h-28.64v72.66h-10V46.94h10v61.32h28.64v-62.28h10.19v147.63Z"/><path d="M819.46,171.6c6.6-1.35,12.08-3.11,16.44-5.29v10.19c-4.23,2.31-9.64,4.1-16.24,5.38-6.6,1.28-13.3,1.92-20.09,1.92h-57.28V51.36h10.57v122.25h46.71c6.66,0,13.29-.67,19.89-2.02ZM851.47,193.8V45.98h10.57v147.63l-10.57.19Z"/><path d="M935.66,113.64l48.44,62.28-8.27,6.34-43.06-56.13c-4.36,16.66-10.38,29.92-18.07,39.79-7.69,9.87-16.72,15.83-27.1,17.88v-10.76c8.71-2.05,16.21-8.07,22.49-18.07,6.28-10,11.05-22.97,14.32-38.92,3.27-15.95,5.03-33.86,5.29-53.73h-39.21v-10h88.61v10h-39.02c-.13,18.84-1.6,35.95-4.42,51.32ZM1015.43,193.61h-10.38v-79.39h-37.87v-10.19h37.87v-58.05h10.38v147.63Z"/></g><g id="symbol"><path d="M183.92,56.08c-8.48-15.54-24.97-26.08-43.92-26.08h-60c-27.61,0-50,22.39-50,50v23.38l-19.22,21.15c-1.15,1.26-1.02,3.24.3,4.33,5.82,4.84,12.22,8.56,18.92,11.21.03,18.92,10.56,35.37,26.08,43.84,8.48,15.54,24.97,26.08,43.92,26.08h45.11c2.7,0,4.89,2.19,4.89,4.89,0,2.86,2.45,5.13,5.3,4.88,30.65-2.68,54.7-28.42,54.7-59.77v-60c0-18.95-10.54-35.44-26.08-43.92Z" fill="%234dcdc0"/><path d="M80,50c-16.57,0-30,13.43-30,30v80c0,8.66,2.21,16.81,6.08,23.92,7.1,3.88,15.25,6.08,23.92,6.08h80c16.57,0,30-13.43,30-30v-80c0-8.66-2.21-16.81-6.08-23.92-7.1-3.88-15.25-6.08-23.92-6.08h-80Z" fill="%23499cdf"/><rect x="69" y="88" width="12" height="24" rx="6" ry="6" fill="%23fff"/><path d="M111,140c-2.92,0-5.85-.75-8.5-2.28-2.39-1.38-3.21-4.44-1.82-6.83,1.38-2.39,4.44-3.21,6.83-1.82,2.74,1.58,6.21,1.13,8.44-1.1,1.08-1.08,1.76-2.45,1.97-3.95.9-6.37,3.71-12.42,8.14-17.5,2.64-3.02,4.03-6.9,3.93-10.92-.21-8.21-6.78-15.05-14.97-15.56-2.76-.18-5.42.33-7.88,1.51-2.49,1.19-5.48.12-6.66-2.37-1.19-2.49-.12-5.48,2.37-6.66,3.96-1.88,8.38-2.73,12.8-2.46,13.32.83,24.01,11.94,24.34,25.29.16,6.53-2.11,12.83-6.39,17.75-3.15,3.61-5.15,7.87-5.77,12.32-.52,3.67-2.18,7-4.8,9.63-3.27,3.27-7.62,4.97-12.02,4.97Z" fill="%23fff"/></g></svg>',Iv='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Symbol_SpeechEar" xmlns="http://www.w3.org/2000/svg" width="240" height="240" viewBox="0 0 240 240"><g id="symbol"><path d="M183.92,56.08c-8.48-15.54-24.97-26.08-43.92-26.08h-60c-27.61,0-50,22.39-50,50v23.38l-19.22,21.15c-1.15,1.26-1.02,3.24.3,4.33,5.82,4.84,12.22,8.56,18.92,11.21.03,18.92,10.56,35.37,26.08,43.84,8.48,15.54,24.97,26.08,43.92,26.08h45.11c2.7,0,4.89,2.19,4.89,4.89,0,2.86,2.45,5.13,5.3,4.88,30.65-2.68,54.7-28.42,54.7-59.77v-60c0-18.95-10.54-35.44-26.08-43.92Z" fill="%234dcdc0"/><path d="M80,50c-16.57,0-30,13.43-30,30v80c0,8.66,2.21,16.81,6.08,23.92,7.1,3.88,15.25,6.08,23.92,6.08h80c16.57,0,30-13.43,30-30v-80c0-8.66-2.21-16.81-6.08-23.92-7.1-3.88-15.25-6.08-23.92-6.08h-80Z" fill="%23499cdf"/><rect x="69" y="88" width="12" height="24" rx="6" ry="6" fill="%23fff"/><path d="M111,140c-2.92,0-5.85-.75-8.5-2.28-2.39-1.38-3.21-4.44-1.82-6.83,1.38-2.39,4.44-3.21,6.83-1.82,2.74,1.58,6.21,1.13,8.44-1.1,1.08-1.08,1.76-2.45,1.97-3.95.9-6.37,3.71-12.42,8.14-17.5,2.64-3.02,4.03-6.9,3.93-10.92-.21-8.21-6.78-15.05-14.97-15.56-2.76-.18-5.42.33-7.88,1.51-2.49,1.19-5.48.12-6.66-2.37-1.19-2.49-.12-5.48,2.37-6.66,3.96-1.88,8.38-2.73,12.8-2.46,13.32.83,24.01,11.94,24.34,25.29.16,6.53-2.11,12.83-6.39,17.75-3.15,3.61-5.15,7.87-5.77,12.32-.52,3.67-2.18,7-4.8,9.63-3.27,3.27-7.62,4.97-12.02,4.97Z" fill="%23fff"/></g></svg>';function Uu({src:e,alt:t,className:r,style:a,tone:s,textColor:l}){const i=!s&&!!l,u=_v(e,i),c="bl"+o.useId().replace(/[^a-zA-Z0-9]/g,"");return s?n.jsx("span",{className:xe("brand-logo","brand-logo--tone",r),role:t?"img":void 0,"aria-label":t||void 0,"aria-hidden":t?void 0:!0,style:{...a,"--brand-logo-src":`url("${e}")`,"--brand-logo-tone":s},children:n.jsx("img",{src:e,alt:"","aria-hidden":"true",className:"brand-logo__sizer",draggable:!1})}):i&&u?n.jsx("span",{className:xe("brand-logo","brand-logo--inline",r),role:t?"img":void 0,"aria-label":t||void 0,"aria-hidden":t?void 0:!0,style:{...a,"--brand-logo-text-color":l},dangerouslySetInnerHTML:{__html:vv(yv(u),c)}}):n.jsx("img",{src:e,alt:t,className:xe("brand-logo",r),style:a,draggable:!1})}function Gu({appMode:e}){const{t}=Ne.useTranslation(),r=e==="manager",a=r?cs:za,s=Iv;return n.jsxs("div",{className:"brand-identity__root","aria-label":t("header.biArea","BI \uC601\uC5ED"),children:[n.jsx("img",{src:s,alt:t("header.biSymbol","BI \uC2EC\uBCFC"),className:"brand-identity__image brand-identity__image--symbol"}),r?n.jsx("img",{src:a,alt:t("header.logoManager","\uB9D0\uADC0\uB9E4\uB2C8\uC800 \uB85C\uACE0"),className:"brand-identity__image brand-identity__image--logo"}):n.jsx(Uu,{src:a,alt:t("header.logoMalgwi","\uB9D0\uADC0 \uB85C\uACE0"),textColor:"light-dark(var(--color-pureBlack), var(--color-text-primary))",className:"brand-identity__image brand-identity__image--logo"})]})}function Ku({activeKey:e,onChange:t,items:r,malgwiItems:a,managerItems:s,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:p,onHelp:h,onFeedback:d,appMode:m,onAppModeChange:C,scrollContainer:x}){const{t:g}=Ne.useTranslation(),y=Bn("(max-width: 767px)"),v=o.useMemo(()=>(r??[]).filter($=>!$.section&&($.key||$.label)).map($=>({key:$.key,label:typeof $.label=="string"?$.label:void 0,icon:$.icon,state:$.disabled?"disabled":void 0,badgeCount:$.badge})),[r]),_=o.useCallback($=>{const H=r?.find(F=>F.key===$);if(!H?.disabled){if(H?.href){Wu(H.href)&&window.open(H.href,"_blank","noopener,noreferrer");return}t?.($)}},[r,t]),b=o.useMemo(()=>{const $=[];return i&&$.push({key:"debug",icon:"terminal",label:g("nav.debug","\uB514\uBC84\uADF8"),onClick:i}),h&&$.push({key:"help",icon:"message-circle-question-mark",label:g("nav.help","\uB3C4\uC6C0\uB9D0"),onClick:h}),u&&$.push({key:"notifications",icon:"bell",label:g("nav.notifications","\uC54C\uB9BC"),badgeCount:l,onClick:u}),p&&$.push({key:"settings",icon:"settings",label:g("nav.settings","\uC124\uC815"),onClick:p}),d&&$.push({key:"feedback",icon:"bug",label:g("nav.feedback","\uBC84\uADF8\uC2E0\uACE0"),onClick:d}),c&&$.push({key:"account",icon:"user-round",label:g("nav.account","\uACC4\uC815"),onClick:c}),$},[g,i,u,p,h,d,c,l]),B=o.useCallback(($,H)=>({position:"fixed",top:$.bottom+8,right:Math.max(8,window.innerWidth-$.right),zIndex:na(H)}),[]),N=o.useId(),{open:f,toggle:w,close:k,style:E,triggerRef:A,menuRef:D}=ra({computeStyle:B,onScroll:"ignore",onResize:"reposition"}),j=o.useMemo(()=>[{items:b.map($=>({label:$.label,icon:$.icon,badgeCount:$.badgeCount,selected:$.selected??(!!$.key&&$.key===e),closeOnSelect:!0,onClick:()=>{$.onClick?.(),k()}}))}],[b,e,k]);return n.jsxs("aside",{className:`header${m==="manager"?" header--manager":""}`,children:[n.jsxs("div",{className:"header__bi",children:[n.jsx(Gu,{appMode:m}),n.jsxs("div",{className:"header__menu-button",ref:A,children:[n.jsx(me,{htmlType:"button",size:48,type:"dot",shape:"pill",variant:"default",useBorder:!1,icon:"menu",ariaLabel:u&&l&&l>0?g("nav.badgeInsideLabel",{label:g("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),count:l,defaultValue:"{{label}}, \uC548\uC5D0 \uC54C\uB9BC {{count}}\uAC1C"}):g("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),onClick:w,"aria-expanded":f,"aria-controls":f?N:void 0}),!!u&&!!l&&l>0&&n.jsx(Sn,{number:Math.min(l,99),size:24,"aria-hidden":!0}),f&&bn.createPortal(n.jsx("div",{id:N,role:"group","aria-label":g("header.utilMenu","\uC720\uD2F8\uB9AC\uD2F0 \uBA54\uB274"),className:ce("tooltip__content"),style:E,ref:D,children:n.jsx(nr,{columns:j,onClose:k})}),document.body)]})]}),n.jsx(qu,{scrollContainer:x,items:r,activeKey:e??void 0,onChange:t,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:p,onHelp:h,onFeedback:d,appMode:m,onAppModeChange:C}),y&&n.jsx(zu,{items:v,activeKey:e??void 0,onChange:_,scrollContainer:x,appMode:m,onAppModeChange:C})]})}const Ov=Ku;function cn(e){const{type:t="dot",size:r,className:a="","aria-label":s,"aria-hidden":l,role:i}=e;(e.icon!==void 0||e.number!==void 0||e.position!==void 0||e.animate!==void 0||e.onClick!==void 0)&&Tt("badge-circle-props","[ihab/core] Badge \uAC00 \uC6D0\uD615 \uBC43\uC9C0\uC758 \uD504\uB86D(icon \xB7 number \xB7 position \xB7 animate \xB7 onClick)\uC744 \uBC1B\uC558\uC2B5\uB2C8\uB2E4. \uC6D0\uD615\uC740 \uC774\uC81C CircleBadge \uAC00 \uADF8\uB9BD\uB2C8\uB2E4 \u2014 Badge \uC758 dot \uB294 \uC791\uC740 \uC54C\uC57D \uC774\uB984\uD45C\uC785\uB2C8\uB2E4. \uADF8 \uC790\uB9AC\uB97C <CircleBadge \u2026/> \uB85C \uBC14\uAFB8\uC138\uC694."),i&&l&&Tt("badge-role-with-hidden",`[ihab/core] Badge \uAC00 role="${i}" \uACFC aria-hidden \uC744 \uD568\uAED8 \uBC1B\uC558\uC2B5\uB2C8\uB2E4. \uC228\uAE34 \uAC83\uC740 \uB0AD\uB3C5\uAE30\uC5D0 \uB07C\uC5B4\uB4E4 \uC218 \uC5C6\uC5B4 \uC544\uBB34\uAC83\uB3C4 \uC548 \uC77D\uD799\uB2C8\uB2E4 \u2014 \uB458 \uC911 \uD558\uB098\uB9CC \uC8FC\uC138\uC694.`);const{label:u,children:c,variant:p="default",fill:h="filled",useBg:d=!0,minWidth:m,iconLeft:C,iconRight:x,color:g}=e,y=t==="bar",v=typeof r=="number"?"medium":r??"medium",_=(y?{small:"caption-2",medium:"body-3",large:"body-2"}:{small:"caption-2b",medium:"body-3b",large:"body-2b"})[v]??(y?"body-2":"body-2b"),b={small:12,medium:14,large:16}[v]??14,B=xe("badge",y?"badge--bar":"",`badge--${p}`,`badge--${v}`,h!=="filled"?`badge--${h}`:"",h==="outline"&&!d?"badge--no-bg":"",_,a),N=g?.startsWith("--")?`var(${g})`:g,f=m!==void 0||N?{...m!==void 0?{minWidth:typeof m=="number"?`${m}px`:m}:{},...N?{"--badge-color":N}:{}}:void 0;return n.jsxs("span",{className:B,style:f,"aria-label":l?void 0:s,role:i??(s&&!l?"img":void 0),"aria-hidden":l||void 0,children:[C&&n.jsx(lt,{icon:C,size:b,className:"badge__icon"}),u??c,x&&n.jsx(lt,{icon:x,size:b,className:"badge__icon"})]})}const zv=()=>Pt.t("passCard.planSuffix","\uC774\uC6A9\uAD8C");function Yu(e){if(!(e==null||e==="")){if(typeof e=="string"&&/^\s*\d[\d,]*\s*$/.test(e)){const t=Number(e.replace(/[,\s]/g,""));if(Number.isFinite(t))return Ar(`${t.toLocaleString("ko-KR")}\uC6D0`)}return Ar(typeof e=="number"?`${e.toLocaleString("ko-KR")}\uC6D0`:e)}}function Wv(e){const t=`${e.code??""} ${e.name??""}`.toLowerCase();return/manager|매니저/.test(t)?"manager":"speechear"}function Hv(e){if(e.durationDays&&e.durationDays>0){const l=e.durationDays;return l%365===0?`${l/365}\uB144`:`${l}\uC77C`}const t=(e.code??"").match(/(\d+)(d|y)\b/i);if(t)return t[2].toLowerCase()==="y"?`${t[1]}\uB144`:`${t[1]}\uC77C`;const r=e.name??"",a=r.match(/(\d+\s*(?:년|개월|주|일))\s*(?:이용권)?\s*$/);if(a)return a[1].replace(/\s+/g,"");const s=r.match(/(\d+)\s*-?\s*(day|year)s?\b/i);return s?s[2].toLowerCase()==="year"?`${s[1]}\uB144`:`${s[1]}\uC77C`:r||zv()}function Vv(e){const t=(e??"").match(/(\d+)(d|y)\b/i);if(!t)return null;const r=Number(t[1]);return t[2].toLowerCase()==="y"?r*365:r}function Zu(e){return{type:e.type??Wv(e),plan:Hv(e),label:e.label,price:Yu(e.price),originalPrice:Yu(e.originalPrice),discountLabel:e.discountLabel}}var qv='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Logo_SpeechEar_ko_mono" xmlns="http://www.w3.org/2000/svg" width="583.33" height="240" viewBox="0 0 583.33 240"><g id="text"><path d="M278.07,115.18V47.71h85.73v67.47h-85.73ZM408.4,173.42v20.18h-125.33v-44.02h96.5v-5.96h-96.88v-20.18h124.18v44.02h-96.11v5.96h97.65ZM305.56,70.97v20.76h30.95v-20.76h-30.95ZM423.39,92.88h-16.53v25.37h-27.68V45.98h27.68v20.18h16.53v26.72Z" fill="%23fff"/><path d="M527.58,113.83v26.33c-7.82,3.59-20.06,5.38-36.71,5.38h-1.73v48.06h-27.68v-48.06h-34.21v-26.33h64.01c16.4,0,28.51-1.79,36.33-5.38ZM435.31,75.77v-26.33h80.35v62.09h-27.68v-35.75h-52.67ZM563.33,193.61h-27.68V45.98h27.68v147.63Z" fill="%23fff"/></g><g id="symbol"><g opacity=".5"><path d="M80,50c-16.57,0-30,13.43-30,30v80c0,8.66,2.21,16.81,6.08,23.92,7.1,3.88,15.25,6.08,23.92,6.08h80c16.57,0,30-13.43,30-30v-80c0-8.66-2.21-16.81-6.08-23.92-7.1-3.88-15.25-6.08-23.92-6.08h-80Z" fill="%23fff"/></g><path d="M140,30h-60c-27.61,0-50,22.39-50,50v23.38l-19.22,21.15c-1.15,1.26-1.02,3.24.3,4.33,5.82,4.84,12.22,8.56,18.92,11.21.03,18.92,10.56,35.37,26.08,43.84-3.88-7.1-6.08-15.25-6.08-23.92v-80c0-16.57,13.43-30,30-30h80c8.66,0,16.81,2.21,23.92,6.08-8.48-15.54-24.97-26.08-43.92-26.08Z" fill="%23fff"/><path d="M183.92,56.08c3.88,7.1,6.08,15.25,6.08,23.92v80c0,16.57-13.43,30-30,30h-80c-8.66,0-16.81-2.21-23.92-6.08,8.48,15.54,24.97,26.08,43.92,26.08h45.11c2.7,0,4.89,2.19,4.89,4.89,0,2.86,2.45,5.13,5.3,4.88,30.65-2.68,54.7-28.42,54.7-59.77v-60c0-18.95-10.54-35.44-26.08-43.92Z" fill="%23fff"/><rect x="69" y="88" width="12" height="24" rx="6" ry="6" fill="%23fff"/><path d="M111,140c-2.92,0-5.85-.75-8.5-2.28-2.39-1.38-3.21-4.44-1.82-6.83,1.38-2.39,4.44-3.21,6.83-1.82,2.74,1.58,6.21,1.13,8.44-1.1,1.08-1.08,1.76-2.45,1.97-3.95.9-6.37,3.71-12.42,8.14-17.5,2.64-3.02,4.03-6.9,3.93-10.92-.21-8.21-6.78-15.05-14.97-15.56-2.76-.18-5.42.33-7.88,1.51-2.49,1.19-5.48.12-6.66-2.37-1.19-2.49-.12-5.48,2.37-6.66,3.96-1.88,8.38-2.73,12.8-2.46,13.32.83,24.01,11.94,24.34,25.29.16,6.53-2.11,12.83-6.39,17.75-3.15,3.61-5.15,7.87-5.77,12.32-.52,3.67-2.18,7-4.8,9.63-3.27,3.27-7.62,4.97-12.02,4.97Z" fill="%23fff"/></g></svg>',Uv='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Logo_SpeechEarManager_ko_mono" xmlns="http://www.w3.org/2000/svg" width="1035.43" height="240" viewBox="0 0 1035.43 240"><g id="text"><path d="M278.07,115.18V47.71h85.73v67.47h-85.73ZM408.4,173.42v20.18h-125.33v-44.02h96.5v-5.96h-96.88v-20.18h124.18v44.02h-96.11v5.96h97.65ZM305.56,70.97v20.76h30.95v-20.76h-30.95ZM423.39,92.88h-16.53v25.37h-27.68V45.98h27.68v20.18h16.53v26.72Z" fill="%23fff"/><path d="M527.58,113.83v26.33c-7.82,3.59-20.06,5.38-36.71,5.38h-1.73v48.06h-27.68v-48.06h-34.21v-26.33h64.01c16.4,0,28.51-1.79,36.33-5.38ZM435.31,75.77v-26.33h80.35v62.09h-27.68v-35.75h-52.67ZM563.33,193.61h-27.68V45.98h27.68v147.63Z" fill="%23fff"/><path d="M644.64,52.32v131.48h-58.24V52.32h58.24ZM634.45,173.81V62.32h-38.25v111.49h38.25ZM713.65,193.61h-10.19v-75.16h-28.64v72.66h-10V46.94h10v61.32h28.64v-62.28h10.19v147.63Z" fill="%23fff"/><path d="M819.46,171.6c6.6-1.35,12.08-3.11,16.44-5.29v10.19c-4.23,2.31-9.64,4.1-16.24,5.38-6.6,1.28-13.3,1.92-20.09,1.92h-57.28V51.36h10.57v122.25h46.71c6.66,0,13.29-.67,19.89-2.02ZM851.47,193.8V45.98h10.57v147.63l-10.57.19Z" fill="%23fff"/><path d="M935.66,113.64l48.44,62.28-8.27,6.34-43.06-56.13c-4.36,16.66-10.38,29.92-18.07,39.79-7.69,9.87-16.72,15.83-27.1,17.88v-10.76c8.71-2.05,16.21-8.07,22.49-18.07,6.28-10,11.05-22.97,14.32-38.92,3.27-15.95,5.03-33.86,5.29-53.73h-39.21v-10h88.61v10h-39.02c-.13,18.84-1.6,35.95-4.42,51.32ZM1015.43,193.61h-10.38v-79.39h-37.87v-10.19h37.87v-58.05h10.38v147.63Z" fill="%23fff"/></g><g id="symbol"><g opacity=".5"><path d="M80,50c-16.57,0-30,13.43-30,30v80c0,8.66,2.21,16.81,6.08,23.92,7.1,3.88,15.25,6.08,23.92,6.08h80c16.57,0,30-13.43,30-30v-80c0-8.66-2.21-16.81-6.08-23.92-7.1-3.88-15.25-6.08-23.92-6.08h-80Z" fill="%23fff"/></g><path d="M140,30h-60c-27.61,0-50,22.39-50,50v23.38l-19.22,21.15c-1.15,1.26-1.02,3.24.3,4.33,5.82,4.84,12.22,8.56,18.92,11.21.03,18.92,10.56,35.37,26.08,43.84-3.88-7.1-6.08-15.25-6.08-23.92v-80c0-16.57,13.43-30,30-30h80c8.66,0,16.81,2.21,23.92,6.08-8.48-15.54-24.97-26.08-43.92-26.08Z" fill="%23fff"/><path d="M183.92,56.08c3.88,7.1,6.08,15.25,6.08,23.92v80c0,16.57-13.43,30-30,30h-80c-8.66,0-16.81-2.21-23.92-6.08,8.48,15.54,24.97,26.08,43.92,26.08h45.11c2.7,0,4.89,2.19,4.89,4.89,0,2.86,2.45,5.13,5.3,4.88,30.65-2.68,54.7-28.42,54.7-59.77v-60c0-18.95-10.54-35.44-26.08-43.92Z" fill="%23fff"/><rect x="69" y="88" width="12" height="24" rx="6" ry="6" fill="%23fff"/><path d="M111,140c-2.92,0-5.85-.75-8.5-2.28-2.39-1.38-3.21-4.44-1.82-6.83,1.38-2.39,4.44-3.21,6.83-1.82,2.74,1.58,6.21,1.13,8.44-1.1,1.08-1.08,1.76-2.45,1.97-3.95.9-6.37,3.71-12.42,8.14-17.5,2.64-3.02,4.03-6.9,3.93-10.92-.21-8.21-6.78-15.05-14.97-15.56-2.76-.18-5.42.33-7.88,1.51-2.49,1.19-5.48.12-6.66-2.37-1.19-2.49-.12-5.48,2.37-6.66,3.96-1.88,8.38-2.73,12.8-2.46,13.32.83,24.01,11.94,24.34,25.29.16,6.53-2.11,12.83-6.39,17.75-3.15,3.61-5.15,7.87-5.77,12.32-.52,3.67-2.18,7-4.8,9.63-3.27,3.27-7.62,4.97-12.02,4.97Z" fill="%23fff"/></g></svg>',Xu='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Symbol_IHAB_mono" xmlns="http://www.w3.org/2000/svg" width="240" height="240" viewBox="0 0 240 240"><path id="symbol" d="M190.71,49.29c-18.1-18.1-43.1-29.29-70.71-29.29s-34.94,28.87-53.03,46.97h0c-18.1,18.1-46.97,25.56-46.97,53.03s11.19,52.61,29.29,70.71c18.1,18.1,43.1,29.29,70.71,29.29s52.61-11.19,70.71-29.29c18.1-18.1,29.29-43.1,29.29-70.71s-11.19-52.61-29.29-70.71ZM155.36,155.36c-9.05,9.05-21.55,14.64-35.36,14.64s-26.31-5.6-35.36-14.64c-9.05-9.05-14.64-21.55-14.64-35.36s5.6-26.31,14.64-35.36c9.05-9.05,21.55-14.64,35.36-14.64s26.31,5.6,35.36,14.64c9.05,9.05,14.64,21.55,14.64,35.36s-5.6,26.31-14.64,35.36Z" fill="%23fff"/></svg>';const pr={text:"--pass-card-text",sub:"--pass-card-sub",copyright:"--pass-card-copyright"},ds=new WeakMap;function Gv(e){if(e)return ds.get(e)}function Hn(e,t){e&&(e.style.setProperty(pr.text,t.text),e.style.setProperty(pr.sub,t.sub),t.copyrightColor&&e.style.setProperty(pr.copyright,t.copyrightColor),ds.set(e,t))}function Vn(e){e&&(e.style.removeProperty(pr.text),e.style.removeProperty(pr.sub),e.style.removeProperty(pr.copyright),ds.delete(e))}const Ju={text:"var(--color-pureBlack)",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-text-primary)"};function Qu(e={}){const t=Ht(Ju,Hn,Vn);return n.jsxs("div",{ref:t,className:"pass-card-bg pass-card-bg-two-circle","aria-hidden":"true",children:[n.jsx("div",{className:"pass-card-bg-two-circle__c1"}),n.jsx("div",{className:"pass-card-bg-two-circle__c3"}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-two-circle__symbol",style:{"--symbol-url":`url("${Xu}")`}})]})}const ec="M190.71,49.29c-18.1-18.1-43.1-29.29-70.71-29.29s-34.94,28.87-53.03,46.97h0c-18.1,18.1-46.97,25.56-46.97,53.03s11.19,52.61,29.29,70.71c18.1,18.1,43.1,29.29,70.71,29.29s52.61-11.19,70.71-29.29c18.1-18.1,29.29-43.1,29.29-70.71s-11.19-52.61-29.29-70.71Z",jr=240;var aa='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Symbol_IHAB" xmlns="http://www.w3.org/2000/svg" width="240" height="240" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 240 240"><defs><linearGradient id="linear-gradient" x1="62.99" y1="62.99" x2="190.71" y2="190.71" gradientUnits="userSpaceOnUse"><stop offset=".2" stop-color="%23499cdf"/><stop offset=".8" stop-color="%234dcdc0"/></linearGradient></defs><path id="symbol" d="M190.71,49.29c-18.1-18.1-43.1-29.29-70.71-29.29s-34.94,28.87-53.03,46.97h0c-18.1,18.1-46.97,25.56-46.97,53.03s11.19,52.61,29.29,70.71c18.1,18.1,43.1,29.29,70.71,29.29s52.61-11.19,70.71-29.29c18.1-18.1,29.29-43.1,29.29-70.71s-11.19-52.61-29.29-70.71ZM155.36,155.36c-9.05,9.05-21.55,14.64-35.36,14.64s-26.31-5.6-35.36-14.64c-9.05-9.05-14.64-21.55-14.64-35.36s5.6-26.31,14.64-35.36c9.05-9.05,21.55-14.64,35.36-14.64s26.31,5.6,35.36,14.64c9.05,9.05,14.64,21.55,14.64,35.36s-5.6,26.31-14.64,35.36Z" fill="url(%23linear-gradient)"/></svg>';const Kv={text:"var(--color-text-primary)",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"},Yv=100,Zv=[{scale:1,opacity:.55},{scale:2,opacity:.4},{scale:3.1,opacity:.28},{scale:4.5,opacity:.18},{scale:6,opacity:.1}];function tc(e={}){const t=Ht(Kv,Hn,Vn),r="var(--color-main)",a=270,s=170;return n.jsxs("div",{ref:t,className:"pass-card-bg pass-card-bg-sound-move","aria-hidden":"true",children:[n.jsx("svg",{className:"pass-card-bg-sound-move__svg",viewBox:"0 0 300 189",preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",children:Zv.map(({scale:l,opacity:i},u)=>n.jsx("g",{transform:`translate(${a} ${s}) scale(${l*Yv/jr}) translate(${-jr/2} ${-jr/2})`,opacity:i,children:n.jsx("path",{d:ec,fill:"none",stroke:r,strokeWidth:"1.5",vectorEffect:"non-scaling-stroke"})},u))}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-sound-move__symbol",style:{"--symbol-url":`url("${aa}")`}})]})}const Xv={text:"#ffffff",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",logoColor:"_mono",copyrightColor:"#ffffff"},Jv=100,Qv=[{scale:1,opacity:.55},{scale:2,opacity:.4},{scale:3.1,opacity:.28},{scale:4.5,opacity:.18},{scale:6,opacity:.1}];function ex(e={}){const t=Ht(Xv,Hn,Vn),r="#ffffff",a=270,s=170;return n.jsxs("div",{ref:t,className:"pass-card-bg pass-card-bg-sound-move-v1","aria-hidden":"true",children:[n.jsx("svg",{className:"pass-card-bg-sound-move-v1__svg",viewBox:"0 0 300 189",preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",children:Qv.map(({scale:l,opacity:i},u)=>n.jsx("g",{transform:`translate(${a} ${s}) scale(${l*Jv/jr}) translate(${-jr/2} ${-jr/2})`,opacity:i,children:n.jsx("path",{d:ec,fill:"none",stroke:r,strokeWidth:"1.5",vectorEffect:"non-scaling-stroke"})},u))}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-sound-move-v1__symbol",style:{"--symbol-url":`url("${Xu}")`}})]})}const tx={text:"var(--color-text-primary)",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"};function nx(e={}){const t=Ht(tx,Hn,Vn);return n.jsxs("div",{ref:t,className:"pass-card-bg pass-card-bg-talk","aria-hidden":"true",children:[n.jsx("div",{className:"pass-card-bg-talk__shape pass-card-bg-talk__shape--left"}),n.jsx("div",{className:"pass-card-bg-talk__shape pass-card-bg-talk__shape--right"}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-talk__symbol",style:{"--symbol-url":`url("${aa}")`}})]})}const rx={Logo_SpeechEar_ko:{"":za,_mono:qv},Logo_SpeechEarManager_ko:{"":cs,_mono:Uv}};function ax(e,t){if(e)return rx[e]?.[t??""]??void 0}const ox={speechear:za,manager:cs},sx={speechear:"Logo_SpeechEar_ko",manager:"Logo_SpeechEarManager_ko"},nc=10;function lx(e){return e<=0?0:e>=86400?Math.floor(e/86400)*86400:e>=3600?Math.floor(e/3600)*3600:e>=60?Math.floor(e/60)*60:Math.floor(e)}function rc(e,t){if(e<=0)return t("passCard.remainingSecond",{n:0});const r=Math.floor(e/86400);if(r>0)return t("passCard.remainingDay",{n:r});const a=Math.floor(e/3600);if(a>0)return t("passCard.remainingHour",{n:a});const s=Math.floor(e/60);return s>0?t("passCard.remainingMinute",{n:s}):t("passCard.remainingSecond",{n:Math.floor(e)})}function ix(e,t,r){if(e==="manager"){const a=/년/.test(t)||/yr|year/i.test(t)||/1년|365/.test(t),s=r==="\uC624\uD508\uD2B9\uAC00"||r===Pt.t("passCard.specialLabel");return a?n.jsx(nx,{}):s?n.jsx(ex,{}):n.jsx(tc,{})}return n.jsx(Qu,{})}function ac({ariaLabel:e,product:t,showPrice:r=!1,plan:a,type:s,endDate:l,remainingSeconds:i,endInclusive:u=!1,state:c="active",bg:p,bgOnly:h=!1,textColor:d,subColor:m,copyrightColor:C,logoSrc:x,label:g,price:y,originalPrice:v,discountLabel:_,onUse:b,onRefund:B,onDelete:N}){const{t:f}=Ne.useTranslation(),w=t?Zu(t):void 0,k=s??w?.type??"speechear",E=a??w?.plan??f("passCard.planSuffix","\uC774\uC6A9\uAD8C"),A=g??w?.label,D=y??(r?w?.price:void 0),j=v??(r?w?.originalPrice:void 0),$=_??w?.discountLabel,H=o.useMemo(()=>{if(D)return null;const J=t?.durationDays??Vv(t?.code);if(!J||J<=0)return i!=null?{percent:null,remainingLabel:rc(i,f)}:null;const O=J*86400;let W;if(i!=null)W=i;else if((c==="active"||c==="expired")&&l){const ee=new Date(l).getTime();if(Number.isNaN(ee))return null;const be=/^(\d{4})-(\d{2})-(\d{2})/.exec(String(l)),je=/^(\d{4})-(\d{2})-(\d{2})/.exec(Jr()),De=Math.round(be&&je?(Date.UTC(+be[1],+be[2]-1,+be[3])-Date.UTC(+je[1],+je[2]-1,+je[3]))/864e5:(ee-Date.now())/864e5);W=Math.max(0,u?De+1:De)*86400}else c==="expired"?W=0:W=O;const q=lx(W),oe=Math.max(0,Math.min(100,Math.floor(Math.min(q,O)/O*100)));return c==="pending"&&oe>=100?null:{percent:oe,remainingLabel:c==="expired"?f("passCard.expired","\uB9CC\uB8CC\uB428"):rc(W,f)}},[D,c,l,i,u,t?.durationDays,t?.code,f]),F=o.useRef(null),[U,T]=o.useState({}),[I,z]=o.useState(null),ie=!!(b||B||N),te=o.useRef(!1),P=o.useRef(void 0),[G,X]=o.useState(x);o.useLayoutEffect(()=>{X(x)},[x]),o.useLayoutEffect(()=>{const J=F.current;J&&(d!==void 0&&J.style.setProperty("--pass-card-text",d),m!==void 0&&J.style.setProperty("--pass-card-sub",m),C!==void 0&&J.style.setProperty("--pass-card-copyright",C))},[d,m,C]),o.useLayoutEffect(()=>{const J=F.current;if(!J)return;const O=Gv(J);if(!x){const W=sx[k],q=c==="expired"?"_mono":O?.logoColor??"",oe=ax(W,q);X(oe)}},[p,x,k,c]);const K=J=>{const O=F.current;if(!O)return null;const{left:W,top:q,width:oe,height:ee}=O.getBoundingClientRect(),be=(J.clientX-W)/oe-.5;return{rotateX:-((J.clientY-q)/ee-.5)*nc,rotateY:be*nc}},L=(J,O)=>{const W=O*-.7,q=J*.7+10,oe=20+(Math.abs(J)+Math.abs(O))*.4;return`${W}px ${q}px ${oe}px rgba(0, 0, 0, 0.18)`},R=o.useCallback(J=>{if(ur())return;te.current=!0,clearTimeout(P.current),P.current=setTimeout(()=>{te.current=!1},200);const O=K(J);O&&T({transform:`perspective(800px) rotateX(${O.rotateX}deg) rotateY(${O.rotateY}deg) scale3d(1.03, 1.03, 1.03)`,boxShadow:L(O.rotateX,O.rotateY),transition:"transform 0.25s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.25s cubic-bezier(0.23, 1, 0.32, 1)"})},[]),S=o.useCallback(J=>{if(ur())return;const O=K(J);if(!O)return;const W=te.current?"transform 0.2s ease, box-shadow 0.2s ease":"none";T({transform:`perspective(800px) rotateX(${O.rotateX}deg) rotateY(${O.rotateY}deg) scale3d(1.03, 1.03, 1.03)`,boxShadow:L(O.rotateX,O.rotateY),transition:W})},[]),V=o.useCallback(()=>{clearTimeout(P.current),te.current=!1,T({transform:"perspective(800px) rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)",boxShadow:"0px 4px 16px rgba(0, 0, 0, 0.08)",transition:"transform 0.5s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.5s cubic-bezier(0.23, 1, 0.32, 1)"})},[]),ae=o.useCallback(()=>z(null),[]),ne=o.useMemo(()=>{const J=f("passCard.planSuffix","\uC774\uC6A9\uAD8C"),O=E.replace("\uC774\uC6A9\uAD8C","").replace(J==="\uC774\uC6A9\uAD8C"?"":J,"").trim(),W=O.match(/^(.*?)(일|년)$/);return W?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"h0 pass-card__plan-number",children:W[1]}),n.jsx("span",{className:"h5b pass-card__plan-unit",children:W[2]==="\uB144"?f("passCard.unitYear","\uB144"):f("passCard.unitDay","\uC77C")})]}):n.jsx("span",{className:"h0",children:O})},[E,f]),re=o.useMemo(()=>{const J=Ar(D);if(!J)return null;const O=J.match(/^([^\d]*)([\d.,]+)(.*)$/);if(!O)return n.jsx("span",{className:"h1",children:J});const[,W,q,oe]=O;return n.jsxs(n.Fragment,{children:[W&&n.jsx("span",{className:"h5 pass-card__price-symbol",children:W}),n.jsx("span",{className:"h1 pass-card__price-amount",children:q}),oe.trim()&&n.jsx("span",{className:"h5 pass-card__price-symbol",children:oe.trim()})]})},[D]),ue=o.useCallback(()=>{ie&&z(J=>{if(J)return null;const O=F.current?.getBoundingClientRect();if(!O)return null;const W=50;return{left:O.left,right:O.right,width:O.width,height:O.height,x:O.x,y:O.y+W,top:O.top+W,bottom:O.bottom+W}})},[ie]),Be=o.useCallback(J=>{ie&&(J.key==="Enter"||J.key===" ")&&(J.preventDefault(),ue())},[ie,ue]),le=[{items:[...b?[{label:f("passCard.menu.use","\uC0AC\uC6A9\uD558\uAE30"),icon:"play",onClick:()=>{b(),z(null)},closeOnSelect:!0}]:[],...B?[{label:f("passCard.menu.refund","\uD658\uBD88\uD558\uAE30"),icon:"rotate-ccw",onClick:()=>{B(),z(null)},closeOnSelect:!0}]:[],...N?[{label:f("passCard.menu.delete","\uC0AD\uC81C\uD558\uAE30"),icon:"trash-2",onClick:()=>{N(),z(null)},closeOnSelect:!0}]:[]]}];return n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"pass-card-frame",children:n.jsxs("div",{ref:F,className:`pass-card pass-card--${c}${ie?" pass-card--clickable":""}`,style:U,onMouseEnter:R,onMouseMove:S,onMouseLeave:V,onPointerUp:J=>{J.pointerType==="touch"&&V()},onPointerCancel:J=>{J.pointerType==="touch"&&V()},onClick:ue,onKeyDown:ie?Be:void 0,role:ie?"button":void 0,tabIndex:ie?0:void 0,"aria-label":e,"aria-haspopup":ie?"menu":void 0,"aria-expanded":ie?!!I:void 0,children:[p??ix(k,E,A),!h&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"pass-card__top",children:n.jsxs("div",{className:"pass-card__top-left",children:[n.jsx("img",{src:G??ox[k],className:"pass-card__logo",alt:k==="manager"?f("header.logoManager","\uB9D0\uADC0\uB9E4\uB2C8\uC800 \uB85C\uACE0"):f("header.logoMalgwi","\uB9D0\uADC0 \uB85C\uACE0")}),n.jsxs("div",{className:"pass-card__plan",children:[n.jsx("div",{children:ne}),n.jsx("span",{className:"h5b pass-card__plan-suffix",children:A?f("passCard.labeledPlan",{label:A}):f("passCard.planSuffix","\uC774\uC6A9\uAD8C")})]})]})}),D?n.jsxs("div",{className:"pass-card__price-area",children:[$&&n.jsx("span",{className:"pass-card__discount body-3",children:$}),n.jsxs("div",{className:"pass-card__price",children:[j&&n.jsx("span",{className:"pass-card__price-original body-3",children:Ar(j)}),re]})]}):H?n.jsxs("div",{className:"pass-card__usage",children:[n.jsx("span",{className:"h5b pass-card__usage-remaining",children:H.remainingLabel}),H.percent!=null&&n.jsxs("span",{className:"pass-card__usage-percent",children:[n.jsx("span",{className:"h1 pass-card__usage-value",children:H.percent}),n.jsx("span",{className:"h5b pass-card__usage-symbol",children:"%"})]})]}):n.jsx("div",{className:"pass-card__copyright caption-2","aria-hidden":"true",children:"\xA9 IHAB Corp. All rights reserved."})]})]})}),I&&n.jsx(sn,{anchorRect:I,onClose:ae,ariaLabel:f("tooltip.menu","\uBA54\uB274"),children:n.jsx(nr,{columns:le,onClose:ae,size:"small"})})]})}const ux={text:"var(--color-text-primary)",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-text-primary)"};function cx(e={}){const t=`passcard-sound-line-grad-${o.useId()}`,r=Ht(ux,Hn,Vn);return n.jsxs("div",{ref:r,className:"pass-card-bg pass-card-bg-sound-line","aria-hidden":"true",children:[n.jsxs("svg",{className:"pass-card-bg-sound-line__svg",viewBox:"0 0 500 300",preserveAspectRatio:"xMidYMid slice",xmlns:"http://www.w3.org/2000/svg",children:[n.jsx("defs",{children:n.jsxs("linearGradient",{id:t,x1:"0",y1:"0",x2:"1",y2:"0",children:[n.jsx("stop",{offset:"20%",stopColor:"var(--color-main)"}),n.jsx("stop",{offset:"80%",stopColor:"var(--color-sub)"})]})}),n.jsx("g",{transform:"translate(25, 45)",children:n.jsx("path",{d:"M -30 150 C 40 80, 100 220, 160 150 S 280 80, 340 150 S 460 220, 510 150",fill:"none",stroke:`url(#${t})`,strokeWidth:"50",strokeLinecap:"round"})})]}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-sound-line__symbol",style:{"--symbol-url":`url("${aa}")`}})]})}const dx={text:"var(--color-text-primary)",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"};function px(e={}){const t=Ht(dx,Hn,Vn);return n.jsxs("div",{ref:t,className:"pass-card-bg pass-card-bg-talk-v1","aria-hidden":"true",children:[n.jsx("div",{className:"pass-card-bg-talk-v1__shape pass-card-bg-talk-v1__shape--left"}),n.jsx("div",{className:"pass-card-bg-talk-v1__shape pass-card-bg-talk-v1__shape--right"}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-talk-v1__symbol",style:{"--symbol-url":`url("${aa}")`}})]})}function hx(e,t){if(e){if(t==="manager_pro")return n.jsx(px,{});if(t==="manager_standard")return n.jsx(cx,{});if(t==="manager_lite")return n.jsx(tc,{})}}function mx(e){const t=Ar(e);if(!t)return null;const r=t.match(/^([^\d]*)([\d.,]+)(.*)$/);if(!r)return t;const[,a,s,l]=r;return n.jsxs(n.Fragment,{children:[a&&n.jsx("span",{className:"payment-plan__pricing-symbol h4",children:a}),s,l.trim()&&n.jsx("span",{className:"payment-plan__pricing-symbol h4",children:l.trim()})]})}function fx(e){const{t}=Ne.useTranslation(),r=t("payment.plan.tierFallback",{defaultValue:"\uC774\uC6A9\uAD8C"}),a=t("payment.plan.openPromo",{defaultValue:"\uC624\uD508 \uD2B9\uAC00"}),{plan:s,onSelect:l,period:i="monthly",ownedCodes:u,titleLevel:c=3}=e||{},p=c?`h${c}`:"div",h=f=>!!f&&!!u?.includes(f),d=f=>f.onceOnly??/오픈\s*특가/.test(f.label??""),m=(s.tiers||[]).some(f=>d(f)&&h(f.code)),C=f=>{const w=f.prices?f.prices[i]:f.price;return w?(s.tiers||[]).some(k=>!!k.badge&&k.originals?.[i]===w):!1},x=s.colorToken?`var(--color-${s.colorToken})`:"var(--color-gray)",g=t("payment.plan.freePrice","\uBB34\uB8CC"),y=t("payment.products.mgrEnterprise.tier.price","\uBB38\uC758"),v=f=>f.prices?f.prices[i]:f.price,_=(s.tiers||[]).length>0&&(s.tiers||[]).every(f=>{const w=v(f);return w==="\uBB34\uB8CC"||w===g||w==="0\uC6D0"||typeof w=="string"&&/\d/.test(w)&&!/[1-9]/.test(w)}),b=(s.tiers||[]).length>0&&(s.tiers||[]).every(f=>{const w=v(f);return w==="\uBB38\uC758"||w===y}),B=s.group==="org",N=B?"manager":"speechear";return n.jsxs("div",{className:"payment-plan__card",style:{borderColor:x,"--plan-color":x},children:[s.cardBadge&&n.jsx("div",{className:"payment-plan__card-badge",children:n.jsx(cn,{label:s.cardBadge,variant:"main",size:"medium",fill:"soft"})}),n.jsxs("div",{className:"payment-plan__title",children:[n.jsx("p",{className:"payment-plan__quote body-3b",style:{color:x},children:s.quote||"\xA0"}),n.jsx(p,{className:"payment-plan__title-heading h1",children:s.tier??s.title}),n.jsx("p",{className:"payment-plan__subtitle body-3",children:s.subtitle})]}),n.jsxs("div",{className:"payment-plan__box",children:[n.jsx("span",{className:"payment-plan__box-title body-3b",children:t("payment.plan.recommendedFor","\uC774\uB7F0 \uBD84\uAED8 \uCD94\uCC9C\uD569\uB2C8\uB2E4.")}),n.jsx("ul",{className:"payment-plan__feature-list",children:(s.recommendedFor||[]).map((f,w)=>n.jsxs("li",{className:"payment-plan__feature-item body-3",children:[n.jsx(lt,{icon:"check",size:18,className:"payment-plan__feature-check",wrapperStyle:{color:x}}),f]},w))})]}),n.jsxs("div",{className:"payment-plan__box",children:[n.jsx("span",{className:"payment-plan__box-title body-3b",children:t("payment.plan.features","\uD575\uC2EC \uAE30\uB2A5")}),n.jsx("ul",{className:"payment-plan__feature-list",children:(s.features||[]).map((f,w)=>n.jsxs("li",{className:"payment-plan__feature-item body-3",children:[n.jsx(lt,{icon:"check",size:18,className:"payment-plan__feature-check",wrapperStyle:{color:x}}),f]},w))})]}),n.jsx("div",{className:"payment-plan__card-pricing",children:_?null:b?n.jsx(me,{htmlType:"button",className:"payment-plan__contact-button",label:t("payment.plan.contact",{defaultValue:"\uBB38\uC758\uD558\uAE30"}),variant:"main",size:56,onClick:()=>s.tiers?.[0]&&l?.({...s.tiers[0],productId:s.id,productTitle:s.title})}):n.jsx(n.Fragment,{children:n.jsx("div",{className:"payment-plan__pricing-list",children:(s.tiers||[]).map(f=>{const w=f.label||r,k=d(f),E=k||f.openPromo===!0,A=w.replace(/^오픈\s*특가\s*/,"")||r,D=f.prices?f.prices[i]:f.price,j=f.badge?E?`${a}
841
- ${f.badge}`:f.badge:void 0;if(k&&h(f.code))return null;if(!f.badge&&!m)return C(f)?null:n.jsxs("div",{className:`payment-plan__pricing-row payment-plan__pricing-row--static${f.highlight?" payment-plan__pricing-row--highlight":""}`,children:[n.jsx("div",{className:"payment-plan__pricing-row-title",children:n.jsx("div",{className:"payment-plan__pricing-row-label h5b",children:f.label})}),n.jsx("div",{className:"payment-plan__pricing-row-price",children:n.jsx("span",{className:"payment-plan__pricing-current h1",children:mx(D)})})]},f.id);const $=s.tier??(B?s.title:void 0),H=n.jsx(ac,{showPrice:!0,product:{type:N,code:f.code,name:A,label:$,price:D,originalPrice:f.originals?.[i]??void 0,discountLabel:j},bg:hx(B,s.id)}),F=()=>l?.({...f,productId:s.id,productTitle:s.title,preview:H});return n.jsx("div",{className:"payment-plan__pricing-card",onClick:F,onKeyDown:l?U=>{U.target===U.currentTarget&&(U.key==="Enter"||U.key===" ")&&(U.preventDefault(),F())}:void 0,role:l?"button":void 0,tabIndex:l?0:void 0,children:H},f.id)})})})})]})}function Cx({variant:e="default"}){return n.jsxs("div",{className:`pass-card-bg pass-card-bg--${e}`,"aria-hidden":"true",children:[n.jsx("div",{className:"pass-card-bg__circle pass-card-bg__circle--1"}),n.jsx("div",{className:"pass-card-bg__circle pass-card-bg__circle--2"}),n.jsx("div",{className:"pass-card-bg__circle pass-card-bg__circle--3"})]})}var ps='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Logo_IHAB_en" xmlns="http://www.w3.org/2000/svg" width="765.08" height="240" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 765.08 240"><defs><linearGradient id="linear-gradient" x1="62.99" y1="62.99" x2="190.71" y2="190.71" gradientUnits="userSpaceOnUse"><stop offset=".2" stop-color="%23499cdf"/><stop offset=".8" stop-color="%234dcdc0"/></linearGradient></defs><path id="symbol" d="M190.71,49.29c-18.1-18.1-43.1-29.29-70.71-29.29s-34.94,28.87-53.03,46.97h0c-18.1,18.1-46.97,25.56-46.97,53.03s11.19,52.61,29.29,70.71c18.1,18.1,43.1,29.29,70.71,29.29s52.61-11.19,70.71-29.29c18.1-18.1,29.29-43.1,29.29-70.71s-11.19-52.61-29.29-70.71ZM155.36,155.36c-9.05,9.05-21.55,14.64-35.36,14.64s-26.31-5.6-35.36-14.64c-9.05-9.05-14.64-21.55-14.64-35.36s5.6-26.31,14.64-35.36c9.05-9.05,21.55-14.64,35.36-14.64s26.31,5.6,35.36,14.64c9.05,9.05,14.64,21.55,14.64,35.36s-5.6,26.31-14.64,35.36Z" fill="url(%23linear-gradient)"/><g id="text"><path d="M316.21,190.6h-36.74V50.61h36.74v139.99Z"/><path d="M335.16,50.61h36.74v55.11h51.63v-55.11h36.93v139.99h-36.93v-55.11h-51.63v55.11h-36.74V50.61Z"/><path d="M473.99,190.6l46.6-139.99h50.08l46.41,139.99h-39.64l-8.31-27.46h-46.99l-8.31,27.46h-39.83ZM560.62,135.3l-14.5-46.99h-1.16l-14.31,46.99h29.97Z"/><path d="M631,50.61h59.94c31.9,0,48.73,13.73,48.73,35.19,0,15.47-11.02,27.26-26.88,30.55v1.35c17.6.58,32.29,13.54,32.29,33.45,0,22.82-18.56,39.45-49.11,39.45h-64.97V50.61ZM701.77,93.53c0-8.89-6.96-13.92-17.02-13.92h-17.02v27.84h16.44c10.25,0,17.6-5.03,17.6-13.92ZM706.22,146.51c0-10.25-7.35-16.05-19.14-16.05h-19.34v30.55h18.76c13.15,0,19.72-5.03,19.72-14.5Z"/></g></svg>';const oc={text:"var(--color-text-primary)",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-text-muted)"};function gx(){const e=Ht(oc,Hn,Vn);return n.jsx("div",{ref:e,className:"pass-card-bg pass-card-bg-ihab","aria-hidden":"true",children:n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-ihab__symbol-top",style:{"--symbol-url":`url("${ps}")`}})})}const sc={text:"#ffffff",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEarManager_ko",logoColor:"_mono",copyrightColor:"#ffffff"};function bx(e={}){const t=Ht(sc,Hn,Vn);return n.jsxs("div",{ref:t,className:"pass-card-bg pass-card-bg-left-color-grid","aria-hidden":"true",children:[n.jsx("div",{className:"pass-card-bg-left-color-grid__bar"}),n.jsx("div",{className:"pass-card-bg-left-color-grid__grid"}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-left-color-grid__symbol",style:{"--symbol-url":`url("${aa}")`}})]})}function lc({keys:e,anchor:t="top-right",scale:r,className:a=""}){const s=Array.isArray(e)?e:[e];return n.jsx("span",{className:xe("shortcut-badge",`shortcut-badge--${t}`,a),style:r===void 0?void 0:{"--shortcut-badge-scale":String(r)},children:s.map((l,i)=>n.jsxs("span",{className:"shortcut-badge__group",children:[i>0&&n.jsx("span",{className:"shortcut-badge__plus",children:"+"}),n.jsx("kbd",{className:"shortcut-badge__key",children:l})]},`${l}-${i}`))})}const oa=(e,t,r)=>e+(t-e)*r;function yx({speakers:e,size:t=300,viewT:r=0,activeSpeakerId:a=null,playedIds:s,selectedId:l=null,answerId:i=null,showFeedback:u=!1,pulseSelected:c=!1,pulseSelectedDuration:p,pulseScale:h,clickable:d=!1,onSelectSpeaker:m,buttonSize:C=40,showIcon:x=!0,onCenterClick:g,centerLabel:y,centerDisabled:v=!1,centerAttention:_=!1,shortcutAnchor:b="top-right",shortcutScale:B,scaleShortcut:N=!1}){const{t:f}=Ne.useTranslation(),w=Math.max(0,Math.min(1,r)),k=t/2,E=110/300,A=.18,D=O=>t*(E+(O-1)*A),j=O=>{const W=D(O.row??1),q=O.angleDeg*Math.PI/180;return{x:k+W*Math.cos(q),y:k+W*Math.sin(q)}},$=Math.max(...e.map(O=>O.row??1),1),H=t*.08,F=t*.1,U=t*.24,T=t-2*H,I=t-F-U,z=t-U/2,ie=o.useMemo(()=>[...new Set(e.map(O=>O.deg))].sort((O,W)=>O-W),[e]),te=ie.length,P=Math.max(68,te>1?T/(te-1):0),G=o.useMemo(()=>new Map(ie.map((O,W)=>[O,W])),[ie]),X=O=>{const W=G.get(O.deg)??0,q=k+(W-(te-1)/2)*P,oe=$>1?Math.min(68,I/($-1)):0,ee=oe*($-1),be=F+(I-ee)/2,je=$===1?F+I*.4:be+($-(O.row??1))*oe;return{x:q,y:je}},K=O=>{const W=j(O),q=X(O);return{x:oa(W.x,q.x,w),y:oa(W.y,q.y,w)}},L={x:k,y:oa(k,z,w)},R=Math.round(C*1.2),S=Math.round(Math.max(16,Math.min(80,C*.7))),V=[],ae=new Map;for(const O of e){const W=O.row??1;ae.has(W)||ae.set(W,[]),ae.get(W).push(O)}for(const[O,W]of ae.entries()){if(W.length<2)continue;const q=[...W].sort((Oe,ot)=>Oe.deg-ot.deg),oe=q.map(Oe=>K(Oe)),ee=q.map(Oe=>Oe.deg),be=ee[ee.length-1]-ee[0],je=be/(ee.length-1),De=360-be,we=q.length>=3&&je>0&&De<=je*1.5,ze=Math.round(D(O)*1e3)/1e3,ye=(Oe,ot,it,Fe)=>{const Ue=(ot.angleDeg-Oe.angleDeg+540)%360-180;if(Ue===0)return`L ${Fe.x} ${Fe.y}`;if(w===0)return`A ${ze} ${ze} 0 0 ${Ue>0?1:0} ${Fe.x} ${Fe.y}`;const nt=(Oe.angleDeg+Ue/2)*Math.PI/180,Te={x:k+ze*Math.cos(nt),y:k+ze*Math.sin(nt)},Xe={x:(it.x+Fe.x)/2,y:(it.y+Fe.y)/2},rt={x:oa(Te.x,Xe.x,w),y:oa(Te.y,Xe.y,w)},ut={x:2*rt.x-Xe.x,y:2*rt.y-Xe.y};return`Q ${ut.x} ${ut.y} ${Fe.x} ${Fe.y}`},_e=we?[...q,q[0]]:q,ve=we?[...oe,oe[0]]:oe;let Ee=`M ${ve[0].x} ${ve[0].y}`;for(let Oe=1;Oe<ve.length;Oe++)Ee+=" "+ye(_e[Oe-1],_e[Oe],ve[Oe-1],ve[Oe]);V.push({key:`arc-${O}`,d:Ee})}const ne=o.useMemo(()=>new Set(s??[]),[s]),re=O=>({idle:"",active:f("soundCompass.state.active","\uC18C\uB9AC \uB098\uB294 \uC911"),played:f("soundCompass.state.played","\uB4E4\uC74C"),correct:f("soundCompass.state.correct","\uC815\uB2F5"),wrong:f("soundCompass.state.wrong","\uC624\uB2F5")})[O],ue=(O,W,q,oe)=>{const ee=O+1,be=new RegExp(`(^|[^0-9])${ee}([^0-9]|$)`).test(W),je=!oe||be?W:`${ee}, ${W}`;return re(q)?`${je}, ${re(q)}`:je},Be=O=>{if(a===O.id)return"active";if(u){if(O.id===i)return"correct";if(O.id===l&&l!==i)return"wrong"}return ne.has(O.id)?"played":"idle"},le=O=>a===O.id?"loop":u?O.id===i?"loop":null:c&&O.id===l?"once":null,J=(O,W)=>{switch(O){case"played":case"correct":return n.jsx(wl,{size:W});case"wrong":return n.jsx(Ml,{size:W});default:return n.jsx(Tl,{size:W})}};return n.jsx("div",{className:"sound-compass",children:n.jsxs("div",{className:"sound-compass__compass-wrap",style:{width:t,height:t},children:[n.jsxs("svg",{width:t,height:t,viewBox:`0 0 ${t} ${t}`,className:"sound-compass__svg",children:[w===0&&e.map(O=>{const{x:W,y:q}=K(O);return n.jsx("line",{x1:L.x,y1:L.y,x2:W,y2:q,stroke:"#dde3ec",strokeWidth:"1"},O.id)}),V.map(O=>n.jsx("path",{d:O.d,fill:"none",stroke:"#dde3ec",strokeWidth:"1"},O.key))]}),_&&!v&&n.jsx("div",{className:"sound-compass__pulse sound-compass__pulse--active sound-compass__pulse--center",style:{width:R,height:R,left:L.x-R/2,top:L.y-R/2}}),g?n.jsx("button",{type:"button",className:`sound-compass__center sound-compass__center--button${v?" sound-compass__center--disabled":""}`,style:{width:R,height:R,left:L.x,top:L.y},"aria-label":y,"aria-disabled":v||void 0,tabIndex:v?-1:0,onClick:v?void 0:g,children:n.jsx(ho,{size:S,color:"currentColor",strokeWidth:1.5})}):n.jsx("div",{className:"sound-compass__center",style:{width:R,height:R,left:L.x,top:L.y},children:n.jsx(ho,{size:S,color:"currentColor",strokeWidth:1.5})}),e.map((O,W)=>{const{x:q,y:oe}=K(O),ee=Be(O),be=le(O),je={...B!==void 0||N?{"--shortcut-badge-scale":String(B??Math.max(.75,Math.min(3,C/56)))}:null,pointerEvents:d?"auto":"none",cursor:d?"pointer":"default",zIndex:ee!=="idle"?10:1},De=C,we=Math.round(Math.max(10,Math.min(56,De*.38))),ze=Math.round(Math.max(7,Math.min(18,De*.2))),ye=Math.round(Math.max(10,Math.min(56,De*.4))),_e=x==="answered"&&(ee==="played"||ee==="correct"||ee==="wrong"),ve=x===!0||_e,Ee=!_e;return n.jsxs("div",{className:"sound-compass__speaker-pos",style:{...je,left:q-De/2,top:oe-De/2},children:[be&&n.jsx("div",{className:`sound-compass__pulse sound-compass__pulse--${ee}`+(be==="once"?" sound-compass__pulse--once":""),style:{width:De,height:De,...be==="once"&&p!==void 0?{"--sc-pulse-duration-once":`${p}ms`}:null,...h!==void 0?{"--sc-pulse-scale":String(h)}:null}}),n.jsxs("button",{type:"button",tabIndex:d?0:-1,"aria-disabled":d?void 0:!0,onClick:d?()=>m?.(O.id):void 0,className:`sound-compass__speaker-btn sound-compass__speaker-btn--${ee}`,style:{width:De,height:De},"aria-label":ue(W,O.label,ee,Ee),"aria-pressed":l!=null?O.id===l:void 0,children:[ve&&J(ee,we),Ee&&n.jsx("span",{className:"sound-compass__speaker-number",style:{fontSize:x===!0?ze:ye},children:W+1})]}),O.shortcut&&n.jsx(lc,{keys:O.shortcut,anchor:b,className:"sound-compass__speaker-shortcut"})]},O.id)})]})})}function vx({id:e,tone:t="plain",bare:r=!1,className:a,style:s,children:l}){return n.jsx("section",{id:e,className:xe("landing-section",t==="line"&&"landing-section--line",a),style:s,children:r?l:n.jsx("div",{className:"landing-section__inner",children:l})})}function xx({badge:e,badgeVariant:t="white",title:r,sub:a,maxWidth:s,subMaxWidth:l,gap:i="m",noGap:u=!1,onBand:c=!1,align:p="left"}){const h={...u?null:{"--landing-title-gap":`var(--spacing-${i})`},...s?{maxWidth:`${s}px`}:null},d=l?{maxWidth:`${l}px`}:{},m=p==="center";return n.jsxs(n.Fragment,{children:[e?n.jsx("p",{className:xe(m&&"landing-title__badge--center"),style:{margin:0},children:n.jsx(cn,{size:"large",fill:t==="white"?"filled":"soft",variant:t,children:e})}):null,n.jsx("h2",{className:xe("landing-title__text",u&&"landing-title__text--no-gap",m&&"landing-title__text--center"),style:h,children:r}),a?n.jsx("p",{className:xe("landing-title__sub",c&&"landing-title__sub--on-band",m&&"landing-title__sub--center"),style:d,children:a}):null]})}function _x({icon:e,title:t,desc:r,children:a,layout:s="stack",leadWidth:l=300,titleStyle:i,tight:u=!1,align:c="left",hover:p=!0,className:h,style:d}){const m=u?"landing-card--pad-tight":"landing-card--pad",C=n.jsxs(n.Fragment,{children:[e,t?n.jsx("h3",{className:"landing-card__title",style:i,children:t}):null,r?n.jsx("p",{className:"landing-card__desc",children:r}):null]});return s==="row"?n.jsxs("div",{className:xe("landing-card","landing-card--row",m,p&&"landing-card--hover",h),style:d,children:[n.jsx("div",{className:"landing-card__lead",style:{"--landing-card-lead-w":`${l}px`},children:C}),n.jsx("div",{className:"landing-card__panel",children:a})]}):n.jsxs("div",{className:xe("landing-card",m,c==="center"&&"landing-card--center",p&&"landing-card--hover",h),style:d,children:[C,a]})}function wx({href:e,tone:t="dark",arrow:r=!1,className:a,children:s}){return n.jsxs("a",{className:xe("landing-button",t!=="dark"&&`landing-button--${t}`,a),href:e,children:[s,r?n.jsx("svg",{"aria-hidden":"true",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{flex:"none"},children:n.jsx("path",{d:"m9 18 6-6-6-6"})}):null]})}const Bx=1200,kx=.3;function Ax(e){if(typeof e!="string")return null;const t=/^(\D*)(\d[\d,]*)(\D*)$/.exec(e.trim());if(!t)return null;const r=Number(t[2].replace(/,/g,""));return Number.isFinite(r)?{prefix:t[1],suffix:t[3],target:r,grouped:t[2].includes(",")}:null}function Nx(e){return String(e).replace(/\B(?=(\d{3})+(?!\d))/g,",")}function Ex(e){const t=o.useRef(null),[r,a]=o.useState(1);return o.useEffect(()=>{const s=t.current;if(e||!s||typeof IntersectionObserver!="function"){a(1);return}a(0);let l=0;const i=new IntersectionObserver(u=>{if(!u.some(h=>h.isIntersecting))return;i.disconnect();const c=performance.now(),p=h=>{const d=Math.min(1,(h-c)/Bx);a(1-(1-d)**3),d<1&&(l=requestAnimationFrame(p))};l=requestAnimationFrame(p)},{threshold:kx});return i.observe(s),()=>{i.disconnect(),cancelAnimationFrame(l)}},[e]),[t,r]}function jx({stats:e,className:t}){const r=$a(),[a,s]=Ex(r);return n.jsx("div",{className:"landing-stat-band-wrap",children:n.jsx("div",{ref:a,className:xe("landing-stat-band",t),style:{gridTemplateColumns:`repeat(${e.length}, minmax(0, 1fr))`},children:e.map((l,i)=>{const u=Ax(l.value),c=u?`${u.prefix}${u.grouped?Nx(Math.round(u.target*s)):Math.round(u.target*s)}${u.suffix}`:null;return n.jsxs("div",{children:[n.jsx("p",{className:"landing-stat-band__value",children:c===null?l.value:n.jsxs(n.Fragment,{children:[n.jsx("span",{"aria-hidden":"true",children:c}),n.jsx("span",{className:"landing-stat-band__sr",children:l.value})]})}),n.jsx("p",{className:"landing-stat-band__label",children:l.label})]},i)})})})}function Dx({orientation:e="horizontal",label:t,className:r=""}){const a=xe("divider",`divider--${e}`,t&&e==="horizontal"?"divider--labeled":"",r);return e==="vertical"?n.jsx("div",{className:a,role:"separator","aria-orientation":"vertical"}):t?n.jsxs("div",{className:a,role:"separator","aria-orientation":"horizontal",children:[n.jsx("span",{className:"divider__line"}),n.jsx("span",{className:"divider__label caption-1",children:t}),n.jsx("span",{className:"divider__line"})]}):n.jsx("div",{className:a,role:"separator","aria-orientation":"horizontal"})}function ic({checked:e,onChange:t,name:r,value:a,disabled:s=!1,label:l,className:i=""}){const u=o.useId();return n.jsxs("label",{className:`radio${s?" radio--disabled":""} ${i}`.trim(),htmlFor:u,children:[n.jsx("input",{id:u,type:"radio",name:r,value:a,checked:e,disabled:s,onChange:c=>t?.(c.target.checked)}),n.jsx("span",{className:"radio__dot"}),l&&n.jsx("span",{className:"radio__label body-2",children:l})]})}function Sx({options:e,value:t,onChange:r,name:a,disabled:s=!1,direction:l="vertical",className:i="",ariaLabel:u}){const c=o.useId(),p=a??`radio-group-${c}`;return n.jsx("div",{className:`radio-group radio-group--${l} ${i}`.trim(),role:"radiogroup","aria-label":u,children:e.map(h=>n.jsx(ic,{name:p,value:h.value,checked:t===h.value,disabled:s||h.disabled,label:h.label,onChange:d=>{d&&r?.(h.value)}},h.value))})}const Tx={info:"info",success:"check-circle",warning:"alert-triangle",danger:"alert-circle"};function Mx({tone:e="info",title:t,message:r,children:a,dismissible:s=!1,onDismiss:l,live:i,className:u=""}){const{t:c}=Ne.useTranslation(),[p,h]=o.useState(!1),d=o.useRef(null),m=o.useCallback(()=>{const _=d.current;_&&_.contains(document.activeElement)&&Ta(_),h(!0),l?.()},[l]);if(p)return null;const C=xe("alert",`alert--${e}`,u),x=i??(e==="danger"||e==="warning"?"assertive":"polite"),g=x==="assertive"?"alert":x==="polite"?"status":void 0,y=!!t,v=!!(r||a);return n.jsxs("div",{ref:d,className:C,role:g,children:[n.jsxs("div",{className:"alert__body",children:[n.jsxs("div",{className:"alert__header",children:[n.jsx(lt,{icon:Tx[e],size:20,className:"alert__icon"}),y&&n.jsx("span",{className:"alert__title body-2",children:t}),!y&&v&&n.jsx("div",{className:"alert__message body-3",children:r||a})]}),y&&v&&n.jsx("div",{className:"alert__message alert__message--indented body-3",children:r||a})]}),s&&n.jsx("button",{type:"button",className:"alert__dismiss",onClick:m,"aria-label":c("common.close","\uB2EB\uAE30"),children:"\xD7"})]})}const $x={ready:"search",guide:"info",error:"circle-alert"};function Lx(e,t){const r=t.filter(Boolean);if(r.length===0)return e;const a=[];let s=0,l=0;for(const i of r){const u=e.indexOf(i,s);u<0||(u>s&&a.push(e.slice(s,u)),a.push(n.jsx("strong",{className:"search-summary__em body-2",children:i},l++)),s=u+i.length)}return s<e.length&&a.push(e.slice(s)),a}function Rx({status:e="guide",label:t,children:r,emphasis:a,icon:s,className:l=""}){const i=s===!1?null:s??$x[e],u=xe("search-summary",`search-summary--${e}`,l),c=t??r,p=typeof c=="string"&&a&&a.length>0?Lx(c,a):c;return n.jsxs("div",{className:u,role:"status","aria-live":"polite",children:[i!=null&&n.jsx(lt,{icon:i,size:18,className:"search-summary__icon"}),n.jsx("span",{className:"search-summary__text body-2",children:p})]})}function sa({title:e,items:t}){const{t:r}=Ne.useTranslation(),{anchorRect:a,openAt:s,close:l}=Fa(),i=o.useRef(null),u=La(!!a,(c,p)=>{c&&p?s(i.current?.querySelector("button")??p):l()},i);return n.jsxs("span",{ref:i,style:{display:"contents"},children:[n.jsx(me,{htmlType:"button",size:24,type:"dot",icon:"info",variant:"transparent-gray",useBorder:!1,selected:!!a,ariaLabel:r("common.info","\uC124\uBA85"),onPointerEnter:c=>{tr(c)||s(c.currentTarget)},onPointerLeave:c=>{tr(c)||l()},onClick:c=>{u.touchPress(c.currentTarget)},onFocus:c=>{ur()||s(c.currentTarget)},onBlur:l}),a&&n.jsx(er,{title:e,items:t,showIndex:t.length>1,anchorRect:a,onClose:l})]})}const fn=40,hr=32;function Px({items:e=[],value:t,onChange:r,className:a="",size:s}){const l=wn(),i=s??l??fn,u=o.useId(),{t:c}=Ne.useTranslation(),p=o.useRef(null),h=e.find(v=>!v.disabled)?.key,d=e.some(v=>v.key===t)?t:h??e[0]?.key,m=e.find(v=>v.key===d&&!v.disabled)?.key??h,C=()=>Array.from(p.current?.querySelectorAll('[role="tab"]:not(:disabled)')??[]),x=(v,_=C())=>{if(_.length===0)return;const b=(v%_.length+_.length)%_.length;_[b]?.focus(),_[b]?.click()},g=v=>{if(!["ArrowRight","ArrowDown","ArrowLeft","ArrowUp","Home","End"].includes(v.key))return;v.preventDefault();const _=C(),b=_.indexOf(v.currentTarget);v.key==="ArrowRight"||v.key==="ArrowDown"?x(b+1,_):v.key==="ArrowLeft"||v.key==="ArrowUp"?x(b-1,_):v.key==="Home"?x(0,_):x(_.length-1,_)},y=e.find(v=>v.key===d);return n.jsxs("div",{className:`tabs ${a}`.trim(),children:[n.jsx("div",{ref:p,className:`tabs__list tabs__list--${i}`,role:"tablist","aria-label":c("tabs.ariaLabel","\uD0ED"),children:e.map(v=>n.jsx("button",{id:`tabs__tab-${u}-${v.key}`,type:"button",role:"tab","aria-selected":v.key===d,"aria-controls":v.key===d?`tabs__panel-${u}-${v.key}`:void 0,disabled:v.disabled,tabIndex:v.key===m?0:-1,className:`tabs__tab body-2${v.key===d?" tabs__tab--active":""}`,onClick:()=>{v.key!==t&&r?.(v.key)},onKeyDown:g,children:v.label},v.key))}),y&&n.jsx("div",{id:`tabs__panel-${u}-${y.key}`,role:"tabpanel","aria-labelledby":`tabs__tab-${u}-${y.key}`,tabIndex:0,className:"tabs__panel",children:y.panel},y.key)]})}const Fx={xs:12,sm:16,md:20,lg:28,xl:36};function Ix(e){const t=e.trim().split(/\s+/).filter(Boolean);return t.length===0?"":t.length===1?[...t[0]].slice(0,2).join("").toUpperCase():([...t[0]][0]+[...t[t.length-1]][0]).toUpperCase()}function Ox({src:e,name:t,size:r="md",shape:a="circle",className:s=""}){const{t:l}=Ne.useTranslation(),[i,u]=o.useState(null),c=!!e&&i===e,p=t?Ix(t):"",h=!!e&&!c,d=!h&&!!p,m=t||l("avatar.ariaLabel","\uC0AC\uC6A9\uC790 \uC544\uBC14\uD0C0");return n.jsxs("span",{className:`avatar avatar--${r} avatar--${a} ${s}`.trim(),role:"img","aria-label":m,children:[h&&n.jsx("img",{className:"avatar__image",src:e,alt:m,onError:()=>u(e??null)}),!h&&d&&n.jsx("span",{className:"avatar__initials","aria-hidden":"true",children:p}),!h&&!d&&n.jsx(lt,{icon:"user-round",size:Fx[r],className:"avatar__icon"})]})}function zx(e,t){if(!t)return!0;const r=t.split(",").map(l=>l.trim()).filter(Boolean);if(r.length===0)return!0;const a=e.name.toLowerCase(),s=e.type.toLowerCase();return r.some(l=>{const i=l.toLowerCase();return i.startsWith(".")?a.endsWith(i):i.endsWith("/*")?s.startsWith(i.slice(0,-1)):s===i})}function Wx({onFilesSelected:e,accept:t,multiple:r=!1,disabled:a=!1,showFileList:s=!0,files:l,onRemove:i,className:u=""}){const{t:c}=Ne.useTranslation(),p=o.useRef(null),[h,d]=o.useState(!1),[m,C]=o.useState([]),x=l??m,g=f=>{if(!f||f.length===0)return;const w=Array.from(f).filter(E=>zx(E,t));if(w.length===0)return;const k=r?w:w.slice(0,1);if(l===void 0){const E=r?[...x,...k]:k;C(E),e?.(E)}else e?.(k)},y=f=>{f.preventDefault(),!a&&d(!0)},v=f=>{f.preventDefault(),d(!1)},_=f=>{f.preventDefault(),d(!1),!a&&g(f.dataTransfer.files)},b=f=>{const w=f.target;try{g(w.files)}finally{w.value=""}},B=()=>{a||p.current?.click()},N=f=>{if(!a&&(i?.(f),l===void 0)){const w=x.filter((k,E)=>E!==f);C(w),i||e?.(w)}};return n.jsxs("div",{className:`file-upload ${u}`.trim(),children:[n.jsxs("div",{className:xe("file-upload__dropzone",h&&"file-upload__dropzone--dragging",a&&"file-upload__dropzone--disabled"),role:"button",tabIndex:a?-1:0,"aria-disabled":a,onClick:B,onKeyDown:f=>{(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),B())},onDragOver:y,onDragLeave:v,onDrop:_,children:[n.jsx(lt,{icon:"upload",size:24,className:"file-upload__icon"}),n.jsx("span",{className:"file-upload__prompt body-2",children:c("fileUpload.dragPrompt","\uD30C\uC77C\uC744 \uC774\uACF3\uC5D0 \uB4DC\uB798\uADF8\uD558\uC5EC \uC5C5\uB85C\uB4DC")}),n.jsx("button",{type:"button",className:"file-upload__browse-button body-3",disabled:a,onClick:f=>{f.stopPropagation(),B()},children:c("fileUpload.browseButton","\uD30C\uC77C \uC120\uD0DD")}),n.jsx("input",{ref:p,type:"file",className:"file-upload__input",accept:t,multiple:r,disabled:a,onChange:b,tabIndex:-1,"aria-hidden":"true"})]}),s&&x.length>0&&n.jsx("ul",{className:"file-upload__list",children:x.map((f,w)=>n.jsxs("li",{className:"file-upload__list-item body-3",children:[n.jsx("span",{className:"file-upload__file-name body-3",children:f.name}),n.jsx("button",{type:"button",className:"file-upload__remove-button","aria-label":c("fileUpload.removeAriaLabel",{name:f.name}),disabled:a,onClick:()=>N(w),children:n.jsx(lt,{icon:"x",size:14})})]},`${f.name}-${w}`))})]})}function uc({items:e,size:t="small",className:r=""}){const{t:a}=Ne.useTranslation(),s=t==="medium"?"body-1":"body-3",l=t==="medium"?18:14,i=t==="medium"?"body-1b":s;return n.jsx("nav",{className:`breadcrumb breadcrumb--${t} ${r}`.trim(),"aria-label":a("breadcrumb.ariaLabel","\uC774\uB3D9 \uACBD\uB85C"),children:n.jsx("ol",{className:"breadcrumb__list",children:e.map((u,c)=>{const p=c===e.length-1;return n.jsxs("li",{className:"breadcrumb__item",children:[p&&u.menu?n.jsxs("button",{type:"button",className:`breadcrumb__current breadcrumb__current--menu ${i}`,"aria-current":"page","aria-haspopup":"menu","aria-expanded":!!u.menu.expanded,"aria-label":u.menu.ariaLabel,onClick:h=>u.menu.onOpen(h.currentTarget),children:[u.label,n.jsx(lt,{icon:"chevron-down",size:l,className:"breadcrumb__menu-mark"})]}):p?n.jsx("span",{className:`breadcrumb__current ${i}`,"aria-current":"page",children:u.label}):u.href?n.jsx("a",{className:`breadcrumb__link ${s}`,href:u.href,target:u.target,rel:u.rel??(u.target==="_blank"?"noopener noreferrer":void 0),onClick:u.onClick,children:u.label}):u.onClick?n.jsx("button",{type:"button",className:`breadcrumb__link ${s}`,onClick:u.onClick,children:u.label}):n.jsx("span",{className:`breadcrumb__text ${s}`,children:u.label}),!p&&n.jsx(lt,{icon:"chevron-right",size:l,className:"breadcrumb__separator"})]},c)})})})}function cc({folders:e,onOpen:t,dropProps:r,dropOver:a,menuItems:s,onMove:l}){const{t:i}=Ne.useTranslation(),[u,c]=o.useState(null),p=Bv((g,y)=>l?.(g,y)),h=p.dragging,d=g=>{const y=l?p.cardProps(g):{};return h===null?{...r?.(g),...y}:!l||h===g?y:{...y,...p.groupProps(g)}},m=g=>h===null?a===g:p.dragOverKey===g,C=o.useRef(null),x=()=>{c(g=>(g&&(C.current={name:g.name,at:Date.now()}),null))};return e.length===0?null:n.jsxs("ul",{className:"folder-grid","aria-label":i("folder.list","\uD3F4\uB354"),children:[e.map(g=>{const y=g.label??g.name;return n.jsxs("li",{className:["folder-grid__cell",m(g.name)&&"folder-grid__cell--over",h===g.name&&"folder-grid__cell--dragging"].filter(Boolean).join(" "),...d(g.name),children:[n.jsx(me,{htmlType:"button",type:"bar",size:48,variant:"default",align:"left",width:"100%",ellipsis:!0,className:m(g.name)?"is-hover":void 0,icon:"folder",label:y,count:g.count,ariaLabel:i("folder.open",{name:y,count:g.count,defaultValue:"{{name}} \uD3F4\uB354 \uC5F4\uAE30, {{count}}\uAC1C"}),rightIcon:s?n.jsx("span",{className:"folder-grid__more-room","aria-hidden":"true"}):void 0,onClick:()=>t(g.name)}),s&&n.jsx("span",{className:"folder-grid__more",children:n.jsx(me,{htmlType:"button",size:32,type:"dot",variant:"transparent-gray",useBorder:!1,icon:"ellipsis",ariaLabel:i("folder.menu",{name:y,defaultValue:"{{name}} \uD3F4\uB354 \uBA54\uB274"}),ariaExpanded:u?.name===g.name,onClick:v=>{if(C.current?.name===g.name&&Date.now()-C.current.at<300)return;const _=v.currentTarget;c(b=>b?.name===g.name?null:{name:g.name,label:y,anchor:_})}})})]},g.name)}),u&&s&&n.jsx(sn,{anchorEl:u.anchor,onClose:x,closeOnOutsideClick:!0,offset:4,prefer:"bottom",ariaLabel:i("folder.menu",{name:u.label,defaultValue:"{{name}} \uD3F4\uB354 \uBA54\uB274"}),children:n.jsx(nr,{columns:[{items:s(u.name)}],size:"small",onClose:x})})]})}const dc="/";function pc({anchorEl:e,onClose:t,rootLabel:r,opened:a,onPick:s,tree:l,ariaLabel:i,onMove:u,itemDropProps:c,itemDropOver:p}){const{t:h}=Ne.useTranslation(),[d,m]=o.useState(new Set),C=w=>{s(w),t()},[x,g]=o.useState(null),[y,v]=o.useState(null),_=w=>{if(x===null)return c?.(w)??{};if(!u||!Gb(x,w))return{};const k=w??dc;return{onDragOver:E=>{E.preventDefault(),E.dataTransfer.dropEffect="move",y!==k&&v(k)},onDragLeave:()=>v(E=>E===k?null:E),onDrop:E=>{E.preventDefault();const A=x;g(null),v(null),u(A,w)}}},b=w=>u?{draggable:!0,onDragStart:k=>{k.dataTransfer.effectAllowed="move",k.dataTransfer.setData("text/plain",w),g(w)},onDragEnd:()=>{g(null),v(null)}}:{},B=w=>m(k=>{const E=new Set(k);return E.has(w)?E.delete(w):E.add(w),E}),N=l.filter(w=>![...d].some(k=>k!==w.path&&Po(w.path,k))),f=w=>["folder-tree-tooltip__row",...w].filter(Boolean).join(" ");return n.jsx(sn,{anchorEl:e,onClose:t,closeOnOutsideClick:!0,offset:4,prefer:"bottom",ariaLabel:i,children:n.jsxs("div",{className:"folder-tree-tooltip",role:"tree","aria-label":i,children:[n.jsx("div",{role:"none",..._(null),className:f([a===null&&"folder-tree-tooltip__row--here",(y===dc||x===null&&!!p?.(null))&&"folder-tree-tooltip__row--over"]),children:n.jsxs("button",{type:"button",className:"folder-tree-tooltip__name body-2",role:"treeitem","aria-level":1,"aria-current":a===null?"page":void 0,onClick:()=>C(null),children:[n.jsx(lt,{icon:"folder-open",size:18,className:"folder-tree-tooltip__icon"}),n.jsx("span",{className:"folder-tree-tooltip__label",children:r})]})}),N.map((w,k)=>{const E=l.some(j=>j.path!==w.path&&Po(j.path,w.path)),A=d.has(w.path),D=a===w.path;return n.jsxs("div",{role:"none",...b(w.path),..._(w.path),className:f([w.depth>0&&"folder-tree-tooltip__row--nested",D&&"folder-tree-tooltip__row--here",(y===w.path||x===null&&!!p?.(w.path))&&"folder-tree-tooltip__row--over",x===w.path&&"folder-tree-tooltip__row--dragging"]),style:{"--folder-depth":w.depth+1},children:[n.jsxs("button",{type:"button",className:"folder-tree-tooltip__name body-2",role:"treeitem","aria-level":w.depth+2,"aria-posinset":k+1,"aria-current":D?"page":void 0,onClick:()=>C(w.path),children:[n.jsx(lt,{icon:D?"folder-open":"folder",size:18,className:"folder-tree-tooltip__icon"}),n.jsx("span",{className:"folder-tree-tooltip__label",children:w.label}),w.count>0&&n.jsx("span",{className:"folder-tree-tooltip__count caption-1",children:w.count})]}),E&&n.jsx("button",{type:"button",className:`folder-tree-tooltip__twist${A?"":" folder-tree-tooltip__twist--open"}`,"aria-label":A?h("folder.unfold",{name:w.label,defaultValue:"{{name}} \uD3BC\uCE58\uAE30"}):h("folder.fold",{name:w.label,defaultValue:"{{name}} \uC811\uAE30"}),"aria-expanded":!A,onClick:()=>B(w.path),children:n.jsx(lt,{icon:"chevron-right",size:16,className:"folder-tree-tooltip__twist-mark"})})]},w.path)})]})})}function hc({rootLabel:e,opened:t,onOpen:r,tree:a,onMove:s,itemDragging:l=!1,itemDropProps:i,itemDropOver:u}){const{t:c}=Ne.useTranslation(),[p,h]=o.useState(null),d=o.useRef(0),m=()=>{h(g=>(g&&(d.current=Date.now()),null))},C=c("folder.tree","\uD3F4\uB354 \uAD6C\uC870 \uBCF4\uAE30"),x=o.useRef(!1);return o.useEffect(()=>{!l&&x.current&&(x.current=!1,h(null))},[l]),n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"folder-tree-button",onDragEnter:l?g=>{p||(x.current=!0,h(g.currentTarget))}:void 0,children:n.jsx(me,{htmlType:"button",size:40,type:"dot",variant:"default",icon:"folder-tree",ariaLabel:C,showTooltipInfo:C,ariaExpanded:!!p,onClick:g=>{if(Date.now()-d.current<300)return;const y=g.currentTarget;h(v=>v?null:y)}})}),p&&n.jsx(pc,{anchorEl:p,onClose:m,ariaLabel:C,rootLabel:e,opened:t,onPick:r,tree:a,onMove:s,itemDropProps:i,itemDropOver:u})]})}function Hx({rootLabel:e,opened:t,onOpen:r,paths:a,countOf:s,folderMenu:l,rootMenu:i,dropProps:u,dropOver:c,onMoveFolder:p,itemDragging:h,rootDropKey:d}){const{t:m}=Ne.useTranslation(),[C,x]=o.useState(null),g=o.useRef(0),y=()=>{x(w=>(w&&(g.current=Date.now()),null))},v=t?Lo(t):e,_=t?m("folder.menu",{name:v,defaultValue:"{{name}} \uD3F4\uB354 \uBA54\uB274"}):m("folder.placeMenu",{name:v,defaultValue:"{{name}} \uBA54\uB274"}),b=!!l||!!i,B=b?{label:v,menu:{onOpen:w=>{Date.now()-g.current<300||x(k=>k?null:w)},expanded:!!C,ariaLabel:_}}:{label:v},N=t?[{label:e,onClick:()=>r(null)},...qb(t).slice(0,-1).map(w=>({label:w.label,onClick:()=>r(w.path)})),B]:[B],f=Vb(a,t).map(w=>({name:w,label:Lo(w),count:s(w)}));return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"folder-head",children:[n.jsx(hc,{rootLabel:e,opened:t,onOpen:r,onMove:p,itemDragging:h,itemDropProps:u?w=>w!==null?u(w):d?u(d):{}:void 0,itemDropOver:w=>c!=null&&c===(w??d),tree:Ub(a).map(w=>({...w,count:s(w.path)}))}),n.jsx(uc,{size:"medium",items:N})]}),n.jsx(cc,{folders:f,onOpen:r,dropProps:u,dropOver:c,menuItems:l,onMove:p}),C&&b&&n.jsx(sn,{anchorEl:C,onClose:y,closeOnOutsideClick:!0,offset:4,prefer:"bottom",ariaLabel:_,children:n.jsx(nr,{columns:[{items:(t?l?.(t):i)??[]}],size:"small",onClose:y})})]})}function Vx({rows:e,rowRender:t,emptySpeech:r,dropProps:a,dropOver:s=!1,className:l}){return e.length===0?r?n.jsx("p",{className:xe("folder-list__empty body-3",l),...a,children:r}):null:n.jsx("div",{className:xe("folder-list",s&&"folder-list--over",l),...a,children:e.map((i,u)=>t(i,u))})}const la=new Map;function kn(e){const{t}=Ne.useTranslation(),{options:r=[],value:a=r.find(f=>!f.disabled)?.key??r[0]?.key,onChange:s=f=>{},className:l="",size:i,shape:u="pill",useBG:c=!0,fullWidth:p=!1,minButtonWidth:h,ariaLabel:d}=e||{},m=wn(),C=i??m??fn,x=o.useRef(null),g=r.filter(f=>!f.disabled),y=o.useId(),v=r.map(f=>f.key).join("\xB7");o.useEffect(()=>{if(!(!Zn||d!=null&&d!=="")){if(la.set(y,v||"(\uBCF4\uAE30 \uC5C6\uC74C)"),la.size>1){const f=[...la.values()].sort();Tt(`segmented-control-unnamed:${f.join("|")}`,`[ihab/SegmentedControl] \uC774\uB984 \uC5C6\uB294 \uB77C\uB514\uC624\uADF8\uB8F9\uC774 \uD55C \uD654\uBA74\uC5D0 ${la.size} \uAC1C \uC11C \uC788\uC2B5\uB2C8\uB2E4 \u2014 \uB0AD\uB3C5\uAE30\uB294 \uBAA8\uB450 "\uC120\uD0DD \uD0ED" \uC73C\uB85C \uC77D\uC5B4 \uC5B4\uB290 \uAC83\uC774 \uBB34\uC5C7\uC778\uC9C0 \uAC00\uB9B4 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. ariaLabel \uC744 \uC8FC\uC138\uC694. \uC9C0\uAE08 \uC120 \uAC83(\uBCF4\uAE30 \uC774\uB984\uC73C\uB85C \uC801\uC74C): ${f.join(" / ")}`)}return()=>{la.delete(y)}}},[d,v,y]);const _=f=>{if(!g.length)return;const w=Math.max(0,g.findIndex(E=>E.key===a)),k=f==="first"?g[0]:f==="last"?g[g.length-1]:g[(w+f+g.length)%g.length];k&&(s(k.key),Array.from(x.current?.querySelectorAll("[data-segkey]")??[]).find(E=>E.dataset.segkey===k.key)?.focus())},b=f=>{switch(f.key){case"ArrowRight":case"ArrowDown":_(1);break;case"ArrowLeft":case"ArrowUp":_(-1);break;case"Home":_("first");break;case"End":_("last");break;default:return}f.preventDefault()},B=f=>{const w=k=>typeof k=="string"||typeof k=="number";if(!(!w(f.label)||f.count==null||f.count===!1||!w(f.count)))return`${f.label}, ${f.count}`},N=g.some(f=>f.key===a)?a:g[0]?.key;return n.jsx("div",{ref:x,onKeyDown:b,className:xe("segmented-control",`segmented-control--${u}`,`segmented-control--${C}`,p&&"segmented-control--full",!c&&"segmented-control--no-bg",h!=null&&"segmented-control--min",l),style:h!=null?{"--segmented-min-button-w":`${h}px`}:void 0,role:"radiogroup","aria-label":d??t("segmentedControl.ariaLabel","\uC120\uD0DD \uD0ED"),children:r.map(f=>n.jsx(me,{htmlType:"button",role:"radio","aria-checked":f.key===a,"data-segkey":f.key,tabIndex:f.key===N?0:-1,label:f.label,count:f.count,ariaLabel:B(f),disabled:f.disabled,className:f.key===a?"is-selected":"",onClick:()=>{f.disabled||s(f.key)},size:C,shape:u,useBorder:!1,useBG:!1},f.key))})}let ia=0,mc="",hs="",ua=0;function fc(){return gc(!1)}function Cc(){return gc(!0)}function gc(e){const t=typeof document<"u";ia===0&&t&&(mc=document.body.style.overflow,document.body.style.overflow="hidden"),e&&t&&(ua===0&&(hs=document.body.style.paddingRight),ua++,document.body.style.paddingRight="0px"),ia++;let r=!1;return()=>{r||(r=!0,ia=Math.max(0,ia-1),e&&t&&(ua=Math.max(0,ua-1),ua===0&&(hs?document.body.style.paddingRight=hs:document.body.style.removeProperty("padding-right"))),ia===0&&t&&(document.body.style.overflow=mc))}}const qx=Fu;function qn(e){const{t}=Ne.useTranslation(),{title:r,subtitle:a,headerActions:s,headerSegment:l,children:i,buttons:u,footer:c,footerStart:p,footerEnd:h,footerNote:d,footerNoteDivider:m=!1,footerClassName:C="",footerLayout:x="center",onClose:g,closeDisabled:y=!1,beforeClose:v,closeOnBackdrop:_=!0,backClosable:b=!0,className:B="",ariaLabel:N,useTitle:f=!0,inline:w=!1,size:k,layer:E="modal",height:A,fillBody:D=!1,resetScrollKey:j}=e||{},[$,H]=o.useState(!1),F=o.useRef(!1),U=o.useRef(null),T=o.useId(),I=o.useRef(null);o.useEffect(()=>{},[w,r,N,B]),o.useEffect(()=>{j!==void 0&&I.current&&(I.current.scrollTop=0)},[j]);const[z,ie]=o.useState(!1);o.useEffect(()=>{const W=I.current;if(!W)return;const q=()=>ie(W.scrollHeight>W.clientHeight+1);if(q(),typeof ResizeObserver>"u")return;const oe=new ResizeObserver(q);oe.observe(W);const ee=W.firstElementChild;return ee&&oe.observe(ee),()=>oe.disconnect()},[i,j]),o.useEffect(()=>{if(!w)return fc()},[w]);const te=o.useRef(typeof document>"u"?null:document.activeElement);o.useEffect(()=>{if(w)return;const W=te.current,q=U.current;return Yo(q,W),q&&!q.contains(document.activeElement)&&(q.querySelector(jn)??q).focus(),()=>{const oe=document.activeElement;(!oe||oe===document.body||q&&q.contains(oe))&&Zo(W)?.focus?.()}},[w]),Sa(U,!w);const P=o.useRef(!0),G=$a(),X=o.useRef(null);o.useEffect(()=>(P.current=!0,()=>{P.current=!1,X.current&&(clearTimeout(X.current),X.current=null)}),[]);const K=o.useCallback(()=>{!P.current||!F.current||(F.current=!1,H(!1))},[]),L=o.useCallback((W,q=!1)=>{if(q&&!P.current||F.current)return;F.current=!0,H(!0);const oe=setTimeout(()=>{X.current===oe&&(X.current=null);let ee;try{ee=W?W():void 0}catch{K();return}ee&&typeof ee.then=="function"&&ee.then(()=>{setTimeout(K,120)},K)},G?0:qx);q&&(X.current=oe)},[K,G]),R=o.useCallback(()=>{y||v&&v()===!1||L(g,!0)},[L,g,y,v]),S=o.useRef(R);o.useEffect(()=>{S.current=R});const V=!w&&!!g;o.useEffect(()=>{if(V)return ir(()=>S.current())},[V]);const ae=o.useRef(v);o.useEffect(()=>{ae.current=v});const ne=o.useRef(y);o.useEffect(()=>{ne.current=y});const re=o.useRef(()=>L(g,!0));o.useEffect(()=>{re.current=()=>L(g,!0)}),Pu(V&&b,()=>{if(ne.current)return!1;const W=ae.current;return W&&W()===!1?!1:(re.current(),!0)});const ue=V&&_,Be=o.useRef(!1),le=W=>{Be.current=W.target===W.currentTarget},J=W=>{const q=Be.current;Be.current=!1,q&&W.target===W.currentTarget&&R()},O=n.jsx("div",{className:`popup ${w?"popup--inline":""} ${E==="belowPagePopup"?"popup--below-page-popup":""} ${$?"popup--closing":""} ${B}`,onPointerDown:ue?le:void 0,onClick:ue?J:void 0,onMouseDown:w?void 0:W=>{W.target===W.currentTarget&&W.preventDefault()},children:n.jsxs("div",{ref:U,className:`popup-panel${k?` popup-panel--${k}`:""}${A!=null?" popup-panel--has-height":""}${D?" popup-panel--fill-body":""}`,style:A!=null?{"--popup-height":typeof A=="number"?`${A}px`:A}:void 0,tabIndex:-1,role:w?void 0:"dialog","aria-modal":w?void 0:!0,"aria-labelledby":!w&&f&&r?T:void 0,"aria-label":!w&&!(f&&r)?N??(typeof r=="string"?r:void 0):void 0,children:[!f&&(s||g)?n.jsxs("div",{className:"popup-close-float",children:[s,g&&n.jsx(me,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,className:"popup-close-btn",onClick:R,disabled:y,ariaLabel:t("common.close","\uB2EB\uAE30")})]}):r||s||g?n.jsxs("div",{className:`popup-header${a?" popup-header--with-subtitle":""}`,children:[n.jsxs("div",{className:"popup-header-main",children:[r?n.jsx("h2",{id:T,className:"popup-title popup-title--left h2",children:r}):n.jsx("span",{id:T,className:"popup-title popup-title--left h2"}),a&&n.jsx("span",{className:"popup-subtitle body-3",children:a})]}),n.jsxs("div",{className:"popup-header-aside",children:[l&&n.jsx("div",{className:"popup-header-segment",children:n.jsx(kn,{size:40,ariaLabel:l.ariaLabel,options:l.options.map(W=>({key:W.key,label:W.label,disabled:W.disabled})),value:l.value,onChange:l.onChange})}),n.jsxs("div",{className:"popup-header-actions",children:[s,g&&n.jsx(me,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,className:"popup-close-btn",onClick:R,disabled:y,ariaLabel:t("common.close","\uB2EB\uAE30")})]})]})]}):null,n.jsx("div",{className:"popup-content",ref:I,tabIndex:z?0:void 0,children:n.jsx("div",{className:"popup-content__inner",children:typeof i=="function"?i({animateThen:L,closeWithAnimation:R}):i})}),d!=null&&d!==!1&&n.jsx("div",{className:`popup-footer-note caption-1${m?" popup-footer-note--divider":""}`,role:"note",children:d}),p||h?n.jsxs("div",{className:`popup-footer popup-footer--bar${C?` ${C}`:""}`,children:[n.jsx("div",{className:"popup-footer__start",children:typeof p=="function"?p({animateThen:L,closeWithAnimation:R}):p}),n.jsx("div",{className:"popup-footer__end",children:typeof h=="function"?h({animateThen:L,closeWithAnimation:R}):h})]}):u?.length?n.jsx("div",{className:`popup-footer popup-footer--buttons${x!=="center"?` popup-footer--${x}`:""}`,children:u.map((W,q)=>n.jsx(me,{htmlType:"button",size:48,variant:W.variant??"default",label:W.label,disabled:W.disabled,onClick:()=>W.onClick?.({animateThen:L,closeWithAnimation:R})},q))}):c?n.jsx("div",{className:`popup-footer${x!=="center"?` popup-footer--${x}`:""}${C?` ${C}`:""}`,children:typeof c=="function"?c({animateThen:L,closeWithAnimation:R}):c}):null]})});return w||typeof document>"u"?O:bn.createPortal(O,document.body)}function bc({checked:e,onChange:t,disabled:r=!1,label:a,ariaLabel:s,labelPosition:l="right",className:i="",id:u}){const c=a&&n.jsx("span",{className:"toggle__label body-3",children:a});return n.jsxs("label",{className:`toggle${r?" toggle--disabled":""} ${i}`.trim(),children:[l==="left"&&c,n.jsx("input",{id:u,type:"checkbox",role:"switch",checked:e,disabled:r,onChange:p=>t?.(p.target.checked),"aria-label":!a&&s?s:void 0}),n.jsx("span",{className:"toggle__slider"}),l==="right"&&c]})}function An({options:e,value:t,onChange:r,placeholder:a,disabled:s=!1,block:l=!1,size:i,error:u=!1,className:c="",ariaLabel:p,ariaDescribedBy:h}){const d=wn(),m=i??d??fn,{t:C}=Ne.useTranslation(),x=a??C("dropdown.placeholder","\uC120\uD0DD"),g=o.useId(),y=o.useId(),v=o.useRef(null),_=o.useCallback((T,I)=>{const z=window.innerHeight,ie=window.innerWidth,te=typeof document<"u"?document.getElementById(g):null,P=260,G=Math.min(P,Math.max(te?.offsetHeight||0,te?.scrollHeight||0)||P),X=Math.max(T.width,te?.offsetWidth||0),K=z-T.bottom,L=T.top,R=K<G&&L>K,S=8,V=(ae,ne)=>Math.min(Math.max(S,ae),Math.max(S,ne));return{position:"fixed",left:V(T.left,ie-X-S),minWidth:T.width,maxWidth:Math.max(T.width,ie-S*2),...R?{top:"auto",bottom:V(z-T.top+6,z-G-S)}:{bottom:"auto",top:V(T.bottom+6,z-G-S)},zIndex:na(I)}},[g]),{open:b,setOpen:B,toggle:N,style:f,triggerRef:w,menuRef:k}=ra({computeStyle:_}),[E,A]=o.useState(-1),D=o.useCallback(()=>A(-1),[]),j=e.find(T=>T.value===t);o.useEffect(()=>{if(b){const T=e.findIndex(I=>I.value===t);A(T>=0?T:e.length?0:-1),requestAnimationFrame(()=>{const I=k.current;if(!I)return;const z=I.querySelectorAll(".dropdown__option")[T];z&&(I.scrollTop=Math.max(0,z.offsetTop-I.clientHeight/2+z.clientHeight/2))})}},[b]),o.useEffect(()=>{b&&A(T=>{if(T>=0&&T<e.length)return T;const I=e.findIndex(z=>z.value===t);return I>=0?I:e.length?0:-1})},[b,e.length]);const $=o.useCallback(()=>{s||N()},[s,N]),H=o.useCallback(T=>{T.disabled||s||(T.value!==t&&r?.(T.value),B(!1))},[r,B,s,t]);o.useEffect(()=>{s&&B(!1)},[s,B]);const F=o.useCallback(T=>{if(!s){if(!b){(T.key==="Enter"||T.key===" "||T.key==="ArrowDown")&&(T.preventDefault(),B(!0));return}if(T.key==="Escape"){T.preventDefault(),B(!1);return}T.key==="ArrowDown"?(T.preventDefault(),A(I=>{let z=I+1;for(;z<e.length&&e[z].disabled;)z++;return z<e.length?z:I})):T.key==="ArrowUp"?(T.preventDefault(),A(I=>{let z=I-1;for(;z>=0&&e[z].disabled;)z--;return z>=0?z:I})):(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),e[E]?H(e[E]):B(!1))}},[s,b,e,E,H,B]),U=b?n.jsx("div",{ref:k,id:g,className:"dropdown__menu","data-tooltip-ignore":!0,role:"listbox",style:f,onMouseLeave:D,onMouseDown:T=>T.preventDefault(),children:e.map((T,I)=>n.jsxs("button",{id:`${g}-option-${I}`,type:"button",role:"option","aria-selected":T.value===t,className:xe("dropdown__option body-2",T.value===t?"dropdown__option--active":"",I===E?"dropdown__option--active":"",T.disabled?"dropdown__option--disabled":""),onMouseDown:z=>z.preventDefault(),onClick:()=>H(T),onMouseEnter:()=>A(I),disabled:T.disabled,children:[n.jsx("span",{className:"dropdown__option-check",children:T.value===t&&n.jsx("svg",{viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polyline",{points:"2 7 5.5 10.5 12 3.5"})})}),T.label]},T.value))}):null;return n.jsxs("div",{ref:v,className:xe("dropdown",`dropdown--s${m}`,b?"dropdown--open":"",l?"dropdown--block":"",u?"dropdown--error":"",c),onKeyDown:F,children:[n.jsxs("button",{ref:w,type:"button",className:"dropdown__trigger",role:"combobox","aria-haspopup":"listbox","aria-expanded":b,"aria-controls":b?g:void 0,"aria-activedescendant":b&&E>=0?`${g}-option-${E}`:void 0,"aria-label":p,"aria-describedby":[p&&j?y:"",h??""].filter(Boolean).join(" ")||void 0,"aria-invalid":u||void 0,disabled:s,onClick:$,onBlur:T=>{b&&!k.current?.contains(T.relatedTarget)&&B(!1)},children:[n.jsx("span",{id:y,className:`dropdown__trigger-label body-2${j?"":" dropdown__trigger-label--placeholder"}`,children:j?j.label:x}),n.jsx("svg",{className:"dropdown__chevron",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polyline",{points:"4 6 8 10 12 6"})})]}),typeof document<"u"&&bn.createPortal(U,v.current?.closest(".ihabdevteam-core-scope")??document.body)]})}const Ux={hearingAid:"hearingAid",cochlearImplant:"cochlearImplant",other:"other",\uBCF4\uCCAD\uAE30:"hearingAid",\uC778\uACF5\uC640\uC6B0:"cochlearImplant",\uAE30\uD0C0:"other"};function yc(e){return e?Ux[e]??null:null}function vc(e){switch(yc(e)){case"hearingAid":return"main";case"cochlearImplant":return"sub";default:return"default"}}function xc(e,t){const r=yc(e);return r?t(`device.type.${r}`,{defaultValue:e??""}):e??""}const Dr=e=>e==null?"":String(e).trim();function ms(e,t,r,a){const s=Dr(e),l=Dr(t),i=Dr(r);if(a&&s&&l&&i){const c=`${s.padStart(4,"0")}-${l.padStart(2,"0")}-${i.padStart(2,"0")}`,p=new Date(c);if(!Number.isNaN(p.getTime())&&p.toISOString().slice(0,10)===c){const h=Ai(c,a);if(h)return h}}const u=[s,l,i];for(;u.length>0&&u[u.length-1]==="";)u.pop();return u.join(".")}function Gx(e,t,r){const a=Dr(e);return a?`${a}-${Dr(t).padStart(2,"0")}-${Dr(r).padStart(2,"0")}`:""}function _c(e){return typeof e=="string"?e:e.label}function wc({value:e,onChange:t,suggestions:r,openOnFocus:a=!1,filterSuggestions:s,onSelectSuggestion:l,autoActiveFirst:i=!1}){const u=o.useId(),[c,p]=o.useState(!1),[h,d]=o.useState(-1),m=o.useRef(null),C=o.useMemo(()=>{if(!r.length)return[];const D=e??"";return s===!1?r:D?typeof s=="function"?s(r,D):r.filter(j=>_c(j).toLowerCase().includes(D.toLowerCase())):a?r:[]},[r,e,a,s]),[x,g]=o.useState(!1),y=o.useRef([]),v=x&&C.length===0?y.current:C;o.useEffect(()=>{v.length&&(y.current=v)},[v]);const _=o.useCallback(()=>g(!0),[]),b=o.useCallback(()=>g(!1),[]),B=i?0:-1;o.useEffect(()=>{c||d(B)},[c,B]),o.useEffect(()=>()=>{m.current&&clearTimeout(m.current)},[]);const N=h<v.length?h:B<v.length?B:-1,f=o.useCallback(D=>{l?l(D):t?.(_c(D)),p(!1)},[t,l]),w=o.useCallback(()=>p(!0),[]),k=o.useCallback(()=>{p(!0),d(B)},[B]),E=o.useCallback(()=>{m.current=setTimeout(()=>p(!1),120)},[]),A=o.useCallback(D=>{D.nativeEvent.isComposing||D.keyCode===229||(D.key==="ArrowDown"?(D.preventDefault(),p(!0),d(j=>Math.min(v.length-1,(j<v.length?j:B)+1))):D.key==="ArrowUp"?(D.preventDefault(),d(j=>Math.max(B,(j<v.length?j:v.length)-1))):D.key==="Enter"?N>=0&&f(v[N]):D.key==="Escape"&&c&&(D.preventDefault(),p(!1)))},[v,N,c,f,B]);return{listId:u,open:c,activeIdx:N,filtered:v,handleFocus:w,handleBlur:E,handleInput:k,handleKeyDown:A,handleSelect:f,handleCompositionStart:_,handleCompositionEnd:b}}const ca=typeof window<"u"?o.useLayoutEffect:o.useEffect;function Un(e){const{value:t,defaultValue:r,name:a,inputRef:s,onChange:l,label:i,ariaLabel:u,ariaDescribedBy:c,required:p,placeholder:h,ghostText:d,ghostHint:m,type:C="text",disabled:x=!1,readOnly:g=!1,error:y,helperText:v,maxLength:_,size:b,variant:B="input",fullWidth:N=!1,newline:f=!1,multiline:w=!1,rows:k=3,leftIcon:E,rightIcon:A,clearable:D=!1,list:j,showCount:$=!0,className:H="",onFocus:F,onBlur:U,onKeyDown:T,onEnter:I,inputMode:z,autoComplete:ie,autoCapitalize:te,autoCorrect:P,revealable:G=!1,autoFocus:X,suggestions:K,filterSuggestions:L,onSelectSuggestion:R,autoActiveFirst:S,openOnFocus:V=!1}=e,ae=wn(),ne=b??ae??fn,re=g||x?void 0:K,{t:ue}=Ne.useTranslation(),Be=o.useId();!i&&!u&&Tt(`TextField:unnamed:${Be}`,"[ihab/TextField] \uC774\uB984\uC774 \uC5C6\uC2B5\uB2C8\uB2E4 \u2014 label \uC774\uB098 ariaLabel \uC911 \uD558\uB098\uB97C \uC8FC\uC138\uC694. placeholder \uB294 \uC774\uB984\uC744 \uB300\uC2E0\uD558\uC9C0 \uBABB\uD569\uB2C8\uB2E4.");const le=`tf-${Be}`,J=`tf-helper-${Be}`,O=o.useRef(null),W=wc({value:t??"",onChange:l,suggestions:re??[],openOnFocus:V,filterSuggestions:L,onSelectSuggestion:R,autoActiveFirst:S}),q=!!re&&W.open&&W.filtered.length>0,oe=o.useRef(null),[ee,be]=o.useState(null),je=o.useCallback(()=>{const Ae=oe.current;if(!Ae||typeof window>"u")return;const st=Ae.getBoundingClientRect(),ft=window.innerHeight,Ct=8,Nt=230,Ft=typeof document<"u"?document.getElementById(W.listId):null,yt=Math.min(Nt,Math.max(Ft?.offsetHeight||0,Ft?.scrollHeight||0)||Nt),vt=ft-st.bottom,Et=st.top,It=vt<yt+Ct&&Et>vt,Je=(At,Qe)=>Math.min(Math.max(Ct,At),Math.max(Ct,Qe));be({position:"fixed",left:st.left,width:st.width,...It?{bottom:Je(ft-st.top+Ct,ft-yt-Ct)}:{top:Je(st.bottom+Ct,ft-yt-Ct)},zIndex:na(Ae)})},[W.listId]);ca(()=>{if(!q)return;je();let Ae=null;const st=()=>{if(typeof requestAnimationFrame>"u"){je();return}Ae===null&&(Ae=requestAnimationFrame(()=>{Ae=null,je()}))},ft=Ct=>{const Nt=Ct.target;Nt&&Nt.nodeType===1&&Nt.closest?.(".text-field__suggestions")||st()};return window.addEventListener("scroll",ft,!0),window.addEventListener("resize",st),()=>{Ae!==null&&cancelAnimationFrame(Ae),window.removeEventListener("scroll",ft,!0),window.removeEventListener("resize",st)}},[q,je,W.filtered.length]);const De=o.useCallback(Ae=>{O.current=Ae,typeof s=="function"?s(Ae):s&&(s.current=Ae)},[s]),we=d?`${d}${m??ue("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)")}`:h,ze=C==="email"||C==="tel"||C==="password"||C==="url"||ie==="username"||ie==="email"||ie==="one-time-code",ye=te??(ze?"none":void 0),_e=P??(ze?"off":void 0),ve=G&&C==="password"&&!f&&!w,[Ee,Oe]=o.useState(!1),ot=ve&&Ee?"text":C,it=t!==void 0,Fe=it&&C==="password",[Ue,nt]=o.useState((r??"").length),Te=it?(t??"").length:Ue,Xe=o.useRef(t);ca(()=>{Xe.current=t}),o.useEffect(()=>{const Ae=O.current;if(!Fe||!Ae)return;const st=t??"";Ae.value!==st&&(Ae.value=st)},[Fe,t]),o.useEffect(()=>{if(!f||!O.current)return;const Ae=O.current;Ae.style.height="",Ae.scrollHeight>Ae.clientHeight&&(Ae.style.height=`${Ae.scrollHeight}px`)},[t,Ue,f]);const rt=_!=null&&Te>_,ut=ne===32?16:20,gt=xe("text-field",`text-field--s${ne}`,B==="display"?"text-field--display":"",N?"text-field--full-width":"",x?"text-field--disabled":"",g?"text-field--readonly":"",y?"text-field--error":"",E?"text-field--has-left-icon":"",A||D||ve?"text-field--has-right-icon":"",H),_t={id:le,...Fe?{}:it?{value:t}:{defaultValue:r},ref:De,placeholder:we,name:a,disabled:x,readOnly:g,autoFocus:X,maxLength:_,list:j,inputMode:z,autoComplete:ie,autoCapitalize:ye,autoCorrect:_e,"aria-label":!i&&u?u:void 0,"aria-required":p,"aria-invalid":!!y,"aria-describedby":[v||y?J:null,c].filter(Boolean).join(" ")||void 0,role:re?"combobox":void 0,"aria-autocomplete":re?"list":void 0,"aria-haspopup":re?"listbox":void 0,"aria-expanded":re?q:void 0,"aria-controls":q?W.listId:void 0,"aria-activedescendant":q&&W.activeIdx>=0?`${W.listId}-option-${W.activeIdx}`:void 0,onChange:Ae=>{const st=Ae.target;it||nt(st.value.length),l?.(st.value),re&&W.handleInput(),Fe&&queueMicrotask(()=>{const ft=Xe.current??"";st.value!==ft&&(st.value=ft)})},onCompositionStart:re?W.handleCompositionStart:void 0,onCompositionEnd:re?W.handleCompositionEnd:void 0,onFocus:(Ae=>{F?.(Ae),re&&W.handleFocus()}),onBlur:(Ae=>{U?.(Ae),re&&W.handleBlur()}),onKeyDown:(Ae=>{const st=(Ae.key==="Tab"&&!Ae.shiftKey||Ae.key===" ")&&!Ae.nativeEvent.isComposing;if(d&&st&&!g&&!x&&!(Ae.currentTarget.value??"").trim()){Ae.preventDefault();const ft=Ae.currentTarget;it||(ft.value=d,nt(d.length)),l?.(d);return}re&&Ae.key==="Enter"&&!Ae.nativeEvent.isComposing&&W.activeIdx>=0?Ae.preventDefault():I&&Ae.key==="Enter"&&!Ae.nativeEvent.isComposing&&(Ae.preventDefault(),I()),T?.(Ae),re&&W.handleKeyDown(Ae)})},pt=D&&!x&&!g&&Te>0,Yt=()=>f?n.jsx("textarea",{..._t,className:"text-field__input text-field__input--auto body-2",rows:1}):w?n.jsx("textarea",{..._t,className:"text-field__input text-field__input--textarea body-2",rows:k}):n.jsx("input",{..._t,type:ot,className:"text-field__input body-2"}),kt=B==="display"&&!f&&!w&&!!we,ct=()=>n.jsxs(n.Fragment,{children:[Yt(),kt&&n.jsx("span",{className:"text-field__placeholder","aria-hidden":"true",children:we})]});return n.jsxs("div",{ref:oe,className:gt,children:[i&&n.jsxs("label",{htmlFor:le,className:"text-field__label caption-1",children:[i,p&&n.jsx("span",{className:"text-field__required",children:"*"})]}),n.jsxs("div",{className:"text-field__wrap",children:[E&&n.jsx("span",{className:"text-field__icon text-field__icon--left",children:n.jsx(lt,{icon:E,label:"",className:"",svgClassName:"text-field__icon-svg",size:ut})}),ct(),_!=null&&$&&n.jsxs("span",{className:`text-field__count caption-2${rt?" text-field__count--over":""}`,children:[Te,"/",_]}),pt&&n.jsx(me,{size:24,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,className:"text-field__clear",ariaLabel:ue("textField.clearAriaLabel","\uC785\uB825\uAC12 \uC9C0\uC6B0\uAE30"),htmlType:"button",onMouseDown:Ae=>{Ae.preventDefault()},onClick:()=>{!it&&O.current&&(O.current.value="",nt(0)),l?.("")},tabIndex:-1}),ve&&n.jsx(me,{size:24,type:"dot",icon:Ee?"eye-off":"eye",variant:"transparent-gray",useBorder:!1,className:"text-field__reveal",ariaLabel:ue("textField.showPassword","\uBE44\uBC00\uBC88\uD638 \uBCF4\uAE30"),"aria-pressed":Ee,htmlType:"button",disabled:x,onMouseDown:Ae=>{Ae.preventDefault()},onClick:()=>Oe(Ae=>!Ae)}),A&&!pt&&n.jsx("span",{className:"text-field__icon text-field__icon--right",children:n.jsx(lt,{icon:A,label:"",className:"",svgClassName:"text-field__icon-svg",size:ut})})]}),!!re&&n.jsx("span",{className:"text-field__status",role:"status","aria-live":"polite",children:W.open&&(t??"").length>0&&W.filtered.length===0?ue("common.noMatches","\uB9DE\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"):""}),q&&(typeof document>"u"?null:bn.createPortal(n.jsx("ul",{id:W.listId,className:"text-field__suggestions",role:"listbox",style:ee??{position:"fixed",visibility:"hidden"},"data-tooltip-ignore":!0,children:W.filtered.map((Ae,st)=>n.jsx("li",{id:`${W.listId}-option-${st}`,role:"option","aria-selected":st===W.activeIdx,className:`text-field__suggestion body-2${st===W.activeIdx?" is-active":""}`,onMouseDown:ft=>ft.preventDefault(),onClick:()=>{W.handleSelect(Ae),O.current?.focus()},children:typeof Ae=="string"?Ae:n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-field__suggestion-label",children:Ae.label}),Ae.hint&&n.jsx("span",{className:"text-field__suggestion-hint caption-1",children:Ae.hint})]})},typeof Ae=="string"?`${Ae}-${st}`:Ae.id))}),document.body)),(v||y)&&n.jsx("div",{className:"text-field__footer",children:n.jsx("span",{id:J,className:"text-field__helper caption-1",role:y?"alert":void 0,children:y||v})})]})}const Bc=()=>{};function Cn(e){const t=o.useId(),r=wn()??fn;if(!("variant"in e)){const{label:b,sub:B,onClick:N,children:f,align:w="horizontal",icon:k,useFullWidth:E=!1,required:A=!1}=e,D=j=>{N&&j.target===j.currentTarget&&(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),N())};return n.jsxs("div",{className:xe("panel-row",w==="vertical"?"panel-row--vertical":"",E?"panel-row--label-fixed panel-row--fill":"",N?"panel-row--clickable":""),onClick:N,onKeyDown:N?D:void 0,role:N?"button":void 0,tabIndex:N?0:void 0,children:[k!=null&&n.jsx("div",{className:"panel-row__icon",children:k}),b!=null&&n.jsxs("div",{className:"panel-row__left",children:[n.jsxs("div",{className:"panel-row__label body-3",children:[b,A&&n.jsx("span",{className:"required-mark",children:"*"})]}),B&&n.jsx("div",{className:"panel-row__sub caption-1",children:B})]}),n.jsx("div",{className:"panel-row__right",children:f})]})}if(e.variant==="description")return n.jsx("div",{className:"panel-row panel-row--block",children:n.jsx("p",{className:"panel-row__description body-3",children:e.children})});if(e.variant==="empty")return n.jsx("div",{className:"panel-row panel-row--empty body-3",children:e.children});if(e.variant==="loading")return n.jsx("div",{className:"panel-row panel-row--loading",children:n.jsx(Nr,{size:28})});if(e.variant==="custom"&&!e.label)return n.jsx("div",{className:"panel-row panel-row--block",children:e.children});const{variant:a,label:s,sub:l,onClick:i,required:u,error:c,align:p="horizontal",useFullWidth:h=!1,icon:d}=e,m=a==="button"?void 0:i;let C=null;const x=a==="toggle"?`panel-toggle-${t}`:void 0,g=c?`panel-error-${t}`:void 0,y=`panel-helper-${t}`;if(a==="toggle"){const b=e;C=n.jsx(bc,{checked:b.checked,onChange:b.onChange,id:x})}else if(a==="segmented"){const b=e;C=n.jsx(kn,{options:b.options,value:b.value,onChange:b.onChange,size:b.size??r,ariaLabel:s})}else if(a==="dropdown"){const b=e,B=b.dropdowns?.length?n.jsx("div",{className:`panel-row__dropdown-group${h?" panel-row__dropdown-group--full":""}`,children:b.dropdowns.map((N,f)=>n.jsx("div",{className:h?"panel-row__dropdown-item--full":void 0,children:n.jsx(An,{options:N.options,value:N.value,onChange:N.onChange,size:r,placeholder:N.placeholder,block:h,error:!!c,ariaDescribedBy:g,ariaLabel:N.ariaLabel??([s,N.placeholder].filter(Boolean).join(" ")||void 0)})},f))}):n.jsx(An,{options:b.options??[],value:b.value??"",onChange:b.onChange??Bc,size:r,block:h,error:!!c,ariaLabel:s,ariaDescribedBy:g});C=c?n.jsxs("div",{className:`panel-row__dropdown-error-wrap${h?" panel-row__dropdown-error-wrap--full":""}`,children:[B,n.jsx("span",{id:g,className:"caption-1 panel-row__error",role:"alert",children:c})]}):B}else if(a==="button"){const b=e;b.buttons?.length?C=n.jsx("div",{className:"panel-row__button-group",children:b.buttons.map((B,N)=>n.jsx(me,{htmlType:"button",size:B.btnSize??r,variant:B.btnVariant??"default",disabled:B.disabled,onClick:B.onClick,children:B.label},N))}):C=n.jsx(me,{htmlType:"button",size:b.btnSize??r,variant:b.btnVariant??"default",disabled:b.disabled,onClick:b.onClick,children:b.buttonLabel})}else if(a==="text"){const b=e;C=n.jsx("span",{className:`panel-row__text body-2${h?" panel-row__text--full":""}`,style:b.valueColor?{color:b.valueColor}:void 0,children:b.value})}else if(a==="input"){const b=e;C=n.jsxs("div",{className:`panel-row__input-wrap${h?" panel-row__input-wrap--full":""}`,children:[n.jsx(Un,{size:r,value:b.value,onChange:b.onChange??Bc,onKeyDown:b.onKeyDown,onEnter:b.onEnter,placeholder:b.placeholder,ghostText:b.ghostText,inputMode:b.inputMode,readOnly:b.readOnly,disabled:b.disabled,type:b.type,autoComplete:b.autoComplete,maxLength:b.maxLength,showCount:b.showCount,multiline:b.multiline,rows:b.rows,fullWidth:h,error:c,ariaLabel:s,required:u,ariaDescribedBy:b.helperText?y:void 0}),b.helperText&&n.jsx("div",{id:y,className:"panel-row__helper caption-1",children:b.helperText})]})}else a==="custom"&&(C=e.children);c&&a!=="input"&&a!=="dropdown"&&(C=n.jsxs("div",{className:`panel-row__dropdown-error-wrap${h?" panel-row__dropdown-error-wrap--full":""}`,children:[C,n.jsx("span",{id:g,className:"caption-1 panel-row__error",role:"alert",children:c})]}));const v=a==="input"||a==="dropdown"||(a==="text"||a==="custom")&&h,_=b=>{m&&b.target===b.currentTarget&&(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),m())};return n.jsxs("div",{className:xe("panel-row",p==="vertical"?"panel-row--vertical":"",v?"panel-row--label-fixed":"",a==="text"?"panel-row--text":"",m?"panel-row--clickable":""),onClick:m,onKeyDown:m?_:void 0,role:m?"button":void 0,tabIndex:m?0:void 0,children:[d!=null&&n.jsx("div",{className:"panel-row__icon",children:d}),n.jsxs("div",{className:"panel-row__left",children:[x?n.jsxs("label",{htmlFor:x,className:"panel-row__label body-3",children:[s,u&&n.jsx("span",{className:"required-mark",children:"*"})]}):n.jsxs("div",{className:"panel-row__label body-3",children:[s,u&&n.jsx("span",{className:"required-mark",children:"*"})]}),l&&n.jsx("div",{className:"panel-row__sub caption-1",children:l})]}),n.jsx("div",{className:"panel-row__right",children:C})]})}function kc(e){const t=e.productName||e.brand,r=[e.brand,e.fitType].filter(a=>!!a&&a!==t);return[...new Set(r)].join(" \xB7 ")}function Kx({devices:e,onRelease:t,emptyLabel:r}){const{t:a,i18n:s}=Ne.useTranslation();return n.jsx("div",{className:"panel-row panel-row--device",children:["left","right"].map(l=>{const i=e[l],u=l==="left"?a("device.direction.left","\uC88C"):a("device.direction.right","\uC6B0");return n.jsxs("div",{className:"panel-row__device-column",children:[n.jsxs("div",{className:"panel-row__device-head",children:[n.jsx("span",{className:"panel-row__device-side body-2b",children:u}),i&&t&&n.jsx(me,{htmlType:"button",size:32,type:"dot",icon:"x",ariaLabel:`${u} ${a("customers.device.unwear","\uCC29\uC6A9 \uD574\uC81C")}`,showTooltipInfo:a("customers.device.unwear","\uCC29\uC6A9 \uD574\uC81C"),onClick:()=>t(l)})]}),i?n.jsxs("div",{className:"panel-row__device-info",children:[n.jsxs("span",{className:"panel-row__device-kind",children:[i.device&&n.jsx(cn,{size:"small",variant:vc(i.device),fill:"soft",label:xc(i.device,a)}),kc(i)&&n.jsx("span",{className:"panel-row__device-detail body-3",children:kc(i)})]}),n.jsx("span",{className:"panel-row__device-name body-2b",children:i.productName||i.brand}),ms(i.wornYear,i.wornMonth,i.wornDay,s.language)&&n.jsx("span",{className:"panel-row__device-date caption-1",children:a("customers.device.wornSince",{date:ms(i.wornYear,i.wornMonth,i.wornDay,s.language)})})]}):n.jsx("span",{className:"panel-row__device-empty body-3",children:r??a("customers.device.notRegistered","\uBBF8\uB4F1\uB85D")})]},l)})})}function da({title:e,titleLevel:t=2,icon:r,disc:a,actions:s,minHeight:l,maxWidth:i,className:u,scrollable:c,scrollbarGutter:p="auto",compactRows:h=!1,useBorder:d=!0,useBg:m=!0,labelWidth:C,form:x=!1,loading:g,empty:y,children:v}){const _=xe("panel",x?"panel--form":"",l!==void 0?"panel--fill":"",d?"":"panel--no-border",m?"":"panel--no-bg",h?"panel--compact-rows":"",u),b={};l!==void 0&&(b.minHeight=l),i!==void 0&&(b.maxWidth=typeof i=="number"?`${i}px`:i),C!==void 0&&(b["--panel-label-width"]=typeof C=="number"?`${C}px`:C);const B=t?`h${t}`:"div",N=d?fn:48;return n.jsx(Xo.Provider,{value:N,children:n.jsxs("div",{className:_,style:Object.keys(b).length?b:void 0,children:[(!!e||a!=null)&&n.jsxs("div",{className:xe("panel__header",a!=null?"panel__header--with-disc":""),children:[r&&n.jsx(lt,{icon:r,label:typeof e=="string"?e:void 0,className:"panel__icon"}),n.jsxs("div",{className:"panel__title-group",children:[!!e&&n.jsx(B,{className:`panel__title ${a!=null?"body-3b":"h5b"}`,children:e}),a!=null&&n.jsx("p",{className:"panel__disc caption-1",children:a})]}),s&&n.jsx("div",{className:"panel__actions",children:s})]}),g?n.jsx(Cn,{variant:"loading"}):y!=null&&o.Children.toArray(v).length===0?n.jsx(Cn,{variant:"empty",children:y}):c?n.jsx("div",{className:xe("panel__body--scroll",p==="stable"&&"panel__body--gutter-stable"),children:v}):v]})})}function Yx({cols:e=2,layout:t="grid",gap:r=1,collapseAt:a,className:s,style:l,children:i}){const u=o.useRef(null),[c,p]=o.useState();o.useEffect(()=>{const d=u.current;if(a===void 0||!d||(p(d.clientWidth),typeof ResizeObserver>"u"))return;const m=new ResizeObserver(([C])=>p(C.contentRect.width));return m.observe(d),()=>m.disconnect()},[a]);const h=a!==void 0&&c!==void 0&&c<=a;return n.jsx("div",{ref:u,className:xe("panel-grid",t==="columns"&&"panel-grid--columns",s),style:{"--panel-grid-cols":h?1:e,"--panel-grid-gap":typeof r=="number"?`${r}px`:r,...l},children:i})}function fs(e){const{title:t,subtitle:r,message:a,topContent:s,details:l,children:i,confirmLabel:u,cancelLabel:c,hideCancel:p=!1,extraAction:h,confirmVariant:d="main",confirmDisabled:m=!1,onConfirm:C,closeOnConfirm:x=!0,onClose:g,inline:y,size:v="small",className:_,initialFocus:b="close"}=e,{t:B}=Ne.useTranslation(),N=o.useRef(null);o.useEffect(()=>{if(y||b==="close")return;const D=N.current?.closest(".popup-panel"),j=Array.from(D?.querySelectorAll(".popup-footer--buttons button")??[]),$=b==="confirm"?j[j.length-1]:p?void 0:j[h?1:0];$&&!$.disabled&&$.focus()},[]);const f=o.useRef(!1),[w,k]=o.useState(!1),E=D=>{let j=!1;return{close:()=>{j=!0,D()},didClose:()=>j}},A=async D=>{if(f.current)return;f.current=!0;const j=typeof document<"u"?document.activeElement:null;k(!0);let $=!1;try{$=await D()}catch(H){typeof console<"u"&&console.error(H)}finally{$||(f.current=!1,k(!1),requestAnimationFrame(()=>{const H=document.activeElement;(!H||H===document.body)&&j?.isConnected&&j.focus()}))}};return n.jsxs(qn,{title:t,subtitle:r,onClose:g,closeDisabled:w,inline:y,size:v,className:xe("confirm-popup",s!=null&&"confirm-popup--has-top",_),buttons:[...h?[{label:h.label,variant:h.variant??"default",disabled:h.disabled||w,onClick:async({closeWithAnimation:D})=>{await A(async()=>{const j=E(D);await h.onClick(j.close);const $=h.closeOnClick??!0;return $&&D(),$||j.didClose()})}}]:[],...p?[]:[{label:c??B("common.cancel","\uCDE8\uC18C"),variant:"default",disabled:w,onClick:({closeWithAnimation:D})=>D()}],{label:u??B("common.confirm","\uD655\uC778"),variant:d,disabled:m||w,onClick:async({closeWithAnimation:D})=>{await A(async()=>{const j=E(D);return await C(j.close),x&&D(),x||j.didClose()})}}],children:[s!=null&&n.jsx("div",{className:"confirm-popup__top",children:s}),l&&l.length>0&&n.jsx(da,{children:l.map((D,j)=>n.jsx(Cn,{label:D.label,children:n.jsx("span",{className:"panel-row__text body-2",children:D.value})},j))}),n.jsx("p",{ref:N,className:"body-2 confirm-popup__message",hidden:a==null,children:a}),i]})}function Zx({value:e,onChange:t,canAdd:r,error:a,onAdd:s,onClose:l,maxLength:i}){const{t:u}=Ne.useTranslation(),c=u("folder.add.placeholder","\uD3F4\uB354 \uC774\uB984");return n.jsx(fs,{title:u("folder.add.title","\uD3F4\uB354 \uCD94\uAC00"),subtitle:u("folder.add.sub","\uC0C8 \uD3F4\uB354 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694."),confirmLabel:u("common.add","\uCD94\uAC00"),confirmDisabled:!r,closeOnConfirm:!1,onConfirm:p=>s(p),onClose:l,children:n.jsx(Un,{autoFocus:!0,value:e,onChange:t,placeholder:c,ariaLabel:c,maxLength:i,size:48,fullWidth:!0,error:a,onEnter:()=>{r&&s(l)}})})}function Ac({title:e,count:t,titleLevel:r=3,actions:a,empty:s=!1,emptyContent:l,className:i,children:u}){const c=`h${r}`;return n.jsxs("section",{className:xe("card-section",i),children:[e!=null&&n.jsxs("header",{className:"card-section__head",children:[n.jsx(c,{className:"card-section__title h5b",children:e}),t!=null&&n.jsx("span",{className:"card-section__count body-3b",children:t}),a!=null&&n.jsx("span",{className:"card-section__actions",children:a})]}),s?n.jsx("div",{className:"card-section__empty body-3",children:l}):n.jsx("div",{className:"card-section__list",children:u})]})}function Xx({bundles:e,noneKey:t,noneLabel:r,titleLevel:a=2,rowRender:s}){return n.jsx(n.Fragment,{children:e.filter(([,l])=>l.length>0).map(([l,i])=>n.jsx(Ac,{titleLevel:a,title:l===t?r:l.split("/").join(" \u203A "),count:i.length,children:i.map((u,c)=>s(u,c))},l))})}const Nc=160;function Jx({children:e,top:t,bottom:r,mode:a="top",contentFull:s=!1,closing:l=!1,onClose:i,backClosable:u=!0,beforeClose:c,className:p,"aria-label":h}){Pu(!!i&&u&&!l,()=>{if(c&&c()===!1)return!1;i?.()});const d=o.useRef(null),m=o.useRef(typeof document>"u"?null:document.activeElement);return o.useEffect(()=>{const C=m.current,x=d.current;return x&&!x.contains(document.activeElement)&&(x.querySelector(jn)??x).focus(),()=>{C?.focus?.()}},[]),Sa(d),n.jsx("div",{className:xe("page-popup",l&&"page-popup--closing",p),role:"dialog","aria-modal":"true","aria-label":h,children:n.jsxs("div",{className:"page-popup__panel",ref:d,tabIndex:-1,children:[t&&n.jsx("div",{className:"page-popup__top",children:t}),n.jsx("div",{className:"page-popup__scroll",children:n.jsx("div",{className:xe("page-popup__content",a==="center"?"page-popup__content--center":"page-popup__content--top",s&&"page-popup__content--full"),children:e})}),r&&n.jsx("div",{className:"page-popup__bottom",children:r})]})})}function Qx(e){const[t,r]=o.useState(!1),a=o.useRef(!1),s=o.useRef(null),l=o.useCallback(()=>{a.current||(a.current=!0,r(!0),s.current=setTimeout(()=>{s.current=null;try{e()}catch(i){a.current=!1,r(!1),console.error(i)}},G2()?0:Nc))},[e]);return o.useEffect(()=>Cc(),[]),o.useEffect(()=>()=>{s.current&&clearTimeout(s.current)},[]),{closing:t,handleClose:l}}function Wa(e){return String(e)}const Ha=["o","triangle","x"];function Ec(e,t){return e===t?null:t}const Cs={o:"circle",triangle:"triangle",x:"x"},gs={o:"main",triangle:"warn",x:"danger"},e4=24,t4=2,bs=3.5,n4=.8;function r4(e){if(!(e>0))return bs;const t=n4*e4/e;return Math.min(bs,Math.max(t4,t))}function a4(e){let t=0,r=0,a=0;for(const l of Object.values(e))l==="o"?t++:l==="triangle"?r++:l==="x"&&a++;const s=t+r+a;return{marked:s,o:t,triangle:r,x:a,rate:s===0?null:(t+r*.5)/s}}function ys(e){const t={};for(const[r,a]of Object.entries(e))(a==="o"||a==="triangle"||a==="x")&&(t[r]=a);return t}function jc(e){const t=[];let r=0;for(const a of e)t.push(r),r+=a;return t}function o4(e,t){return!t&&e>0}function Dc({mark:e,label:t}){return n.jsx("span",{className:"mark-icon",...t?{role:"img","aria-label":t}:{"aria-hidden":!0},children:n.jsx(Sn,{size:24,position:"inline",className:`mark-icon__badge mark-icon__badge--${gs[e]}`,children:n.jsx(lt,{icon:Cs[e],size:14})})})}function s4({o:e,triangle:t,x:r,label:a,className:s}){const l=[["o",e],["triangle",t],["x",r]];return n.jsx("span",{className:xe("score-mark-counts",s),children:l.map(([i,u])=>n.jsxs("span",{className:"score-mark-counts__one",children:[n.jsx(Dc,{mark:i,label:a?a(i,u):""}),n.jsx("span",{className:"score-mark-counts__num",children:u})]},i))})}function l4({children:e}){return Nv(!0),n.jsx(n.Fragment,{children:e})}var i4=Object.defineProperty,u4=(e,t,r)=>t in e?i4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Sc=(e,t,r)=>u4(e,typeof t!="symbol"?t+"":t,r);let c4=class extends o.Component{constructor(){super(...arguments),Sc(this,"state",{hasError:!1}),Sc(this,"releaseHealth")}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,r){this.props.onError?.(t,r),console.error(t,"[ErrorBoundary]",r.componentStack)}componentDidMount(){this.releaseHealth=this.props.registerHealth?.(()=>this.state.hasError)}componentWillUnmount(){this.releaseHealth?.()}componentDidUpdate(t){if(!this.state.hasError)return;const r=t.resetKeys,a=this.props.resetKeys;!r||!a||(r.length!==a.length||r.some((s,l)=>!Object.is(s,a[l])))&&this.setState({hasError:!1,error:void 0})}render(){if(!this.state.hasError)return this.props.children;const t=this.state.error;return this.props.fallback?.({error:t,retry:()=>this.setState({hasError:!1,error:void 0}),reload:this.props.reload??(()=>{window.location.reload()}),staleChunk:S2(t)})??null}};const d4={small:14,medium:20,large:28};function p4({value:e,onChange:t,max:r=5,readOnly:a=!1,size:s="medium",ariaLabel:l,className:i=""}){const{t:u}=Ne.useTranslation(),c=a||!t,[p,h]=o.useState(null),d=c?e:Number.isFinite(e)?Math.round(e):0,m=p??d,C=d4[s],x=f=>{f!==e&&t?.(f)},g=f=>{c||x(f)},y=f=>{c||ur()||h(f)},v=o.useRef(null),_=f=>{const w=Math.min(r,Math.max(1,f));x(w),Array.from(v.current?.querySelectorAll("[data-star]")??[]).find(k=>k.dataset.star===String(w))?.focus()},b=f=>{if(!c){switch(f.key){case"ArrowRight":case"ArrowUp":_((d||0)+1);break;case"ArrowLeft":case"ArrowDown":_((d||1)-1);break;case"Home":_(1);break;case"End":_(r);break;default:return}f.preventDefault()}},B=d>=1&&d<=r?Math.round(d):1,N=()=>{c||h(null)};return n.jsx("div",{className:`rating rating--${s}${c?" rating--readOnly":""} ${i}`.trim(),ref:v,onKeyDown:b,role:c?"img":"radiogroup","aria-label":c?u("rating.valueLabel",{value:e,max:r}):l??u("rating.groupLabel","\uBCC4\uC810"),onMouseLeave:N,onPointerUp:f=>{f.pointerType==="touch"&&N()},onPointerCancel:f=>{f.pointerType==="touch"&&N()},children:Array.from({length:r},(f,w)=>{const k=w+1,E=Math.max(0,Math.min(1,m-w)),A=E>0&&E<1,D=n.jsxs("span",{className:"rating__star-wrap",children:[n.jsx(lt,{icon:"star",size:C,className:"rating__star rating__star--empty"}),E>0&&n.jsx("span",{className:`rating__star-fill${A?" rating__star-fill--half":""}`,style:A?{width:`${E*100}%`}:void 0,children:n.jsx(lt,{icon:"star",size:C,className:"rating__star rating__star--filled"})})]});return c?n.jsx("span",{className:"rating__item","aria-hidden":"true",children:D},k):n.jsx("button",{type:"button",className:"rating__item rating__item--interactive",role:"radio","aria-checked":d===k,"aria-label":u("rating.starLabel",{n:k}),"data-star":k,tabIndex:k===B?0:-1,onClick:()=>g(k),onMouseEnter:()=>y(k),children:D},k)})})}const h4=20,m4=["#499cdf","#4dcdc0","#2fae9e","#e6b94e","#d9534f","#e06b68","#bfc7d1"];function f4({value:e,onChange:t,palette:r=m4,size:a,className:s="",ariaLabel:l}){const i=wn(),u=a??i??fn,{t:c}=Ne.useTranslation();return n.jsx("div",{className:`color-picker ${s}`.trim(),role:"group","aria-label":l,children:r.map(p=>{const h=e?.toLowerCase()===p.toLowerCase();return n.jsx("button",{type:"button",className:`color-picker__swatch color-picker__swatch--${u}`,style:{backgroundColor:p},onClick:()=>t(p),"aria-pressed":h,"aria-label":h?`${p} ${c("colorPicker.selected","\uC120\uD0DD\uB428")}`:p,children:h&&n.jsx(lt,{icon:"check",size:h4,className:"color-picker__check"})},p)})})}function Tc({icon:e,label:t,tooltip:r,wrapperStyle:a,color:s,bgColor:l,useHover:i=!0,iconSize:u="medium"}){const{t:c}=Ne.useTranslation(),p=u==="small",h=xe("category-icon",p?"category-icon--small":""),d=p?16:20,m=o.useRef(null),[C,x]=o.useState(!1),g=o.useMemo(()=>{const k=a&&typeof a=="object"?{...a}:{};return!s&&!l?k:{...k,...s?{color:s,"--t-item-fg":s}:{},...l?{"--t-item-bg":l}:{}}},[a,s,l]),y=r||t,v=i&&!!y,[_,b]=o.useState(null);o.useLayoutEffect(()=>{C&&b(m.current?.getBoundingClientRect()??null)},[C]),o.useEffect(()=>{if(!i&&C)try{x(!1)}catch{}},[i,C]),o.useEffect(()=>{if(!C)return;const k=E=>{const A=m.current;if(!A)return;const D=E.target;D&&!A.contains(D)&&x(!1)};return document.addEventListener("pointerdown",k,!0),()=>document.removeEventListener("pointerdown",k,!0)},[C]);const B=o.useCallback(()=>{i&&x(!0)},[i]),N=o.useCallback(()=>{i&&x(!1)},[i]),f=o.useCallback(()=>x(!1),[]),w=o.useCallback(k=>{if(k.key==="Escape"){x(!1);return}(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),x(E=>!E))},[]);return n.jsxs("span",{ref:m,className:xe("category-icon__wrap",v&&"category-icon__wrap--interactive"),onPointerEnter:B,onPointerLeave:N,onFocus:B,onBlur:N,onKeyDown:w,role:y?"button":void 0,tabIndex:y?0:void 0,"aria-label":typeof y=="string"?c("common.descriptionFor",{name:y,defaultValue:`${y} \uC124\uBA85`}):void 0,"aria-haspopup":!!y,"aria-expanded":C,"data-tooltip-ignore":!0,children:[n.jsx(lt,{icon:e,label:t,className:h,imgClassName:"category-icon__image",maskClassName:"category-icon__mask",svgClassName:"category-icon__svg",wrapperStyle:g,size:d}),C&&y&&n.jsx(zn,{anchorRect:_,text:typeof y=="string"?y:void 0,offset:8,onClose:f,className:"category-icon__tooltip",ariaLabel:typeof y=="string"?y:void 0})]})}let rr=null;function pa(e){if(rr&&rr!==e)try{rr()}catch{}return rr=e,()=>{rr===e&&(rr=null)}}function Va(e){if(rr===e){rr=null;try{e()}catch{}}}function ha(e,t){let r=()=>{};const a=new Promise(u=>{r=u});if(typeof e!="string"||e.trim()===""){Tt("one-shot-empty-url","[core] playOneShot \uC5D0 \uBE48 \uC8FC\uC18C\uAC00 \uC654\uB2E4 \u2014 \uC548 \uD2BC\uB2E4. \uBD80\uB974\uB294 \uCABD\uC774 \uC8FC\uC18C\uB97C \uC5BB\uAE30 \uC804\uC5D0 \uBD88\uB800\uB2E4.",new Error("playOneShot(empty)").stack),r(!1);try{t?.(!1)}catch{}return{el:{},stop:()=>{},done:a}}let s=!1;const l=u=>{if(!s){s=!0;try{t?.(u)}catch{}r(u)}};let i;try{i=new Audio(e)}catch{return l(!1),{el:{},stop:()=>{},done:a}}i.onended=()=>l(!0),i.onerror=()=>l(!1);try{i.play().catch(()=>l(!1))}catch{l(!1)}return{el:i,stop:()=>{try{i.pause()}catch{}l(!1)},done:a}}function C4(e,t){if(!e)return{previewCodes:[],previewBucket:null};const r=e,a=i=>i.map(u=>u?.contextCode||u?.context_code).filter(Boolean).map(String);if(t==="LISTEN_IN_NOISE"){const i=r.sentences||r.items||[],u=Array.isArray(i)&&i.length>0?a(i):[];return u.length===0&&(r.contextCode||r.context_code)&&u.push(String(r.contextCode||r.context_code)),{previewCodes:u,previewBucket:"LIN_D"}}if(t==="SHORT_STORY"){const i=r.items||r.sentences||[],u=Array.isArray(i)&&i.length>0?a(i):[];return u.length===0&&(r.contextCode||r.context_code)&&u.push(String(r.contextCode||r.context_code)),{previewCodes:u,previewBucket:"SHORT_S"}}if(t==="LONG_STORY"){const i=r.items||r.sentences||[],u=Array.isArray(i)&&i.length>0?a(i):[];return u.length===0&&(r.contextCode||r.context_code)&&u.push(String(r.contextCode||r.context_code)),{previewCodes:u,previewBucket:"LONG"}}if(t==="ORDERING_SENTENCE"){const i=r.sentences||r.items||[],u=Array.isArray(i)&&i.length>0?a(i):[];return u.length===0&&(r.contextCode||r.context_code)&&u.push(String(r.contextCode||r.context_code)),{previewCodes:u,previewBucket:"LIN_D"}}const s=r.sentences||r.items||[],l=a(Array.isArray(s)?s:[]);return l.length===0&&(r.contextCode||r.context_code)&&l.push(String(r.contextCode||r.context_code)),{previewCodes:l,previewBucket:null}}function g4(e,t){const[r,a]=o.useState(!1),[s,l]=o.useState(-1),[i,u]=o.useState({key:"",urls:[]}),c=o.useRef(null),p=o.useRef(!1),h=o.useRef(null),d=o.useRef(null),[m,C]=o.useState(!1),x=o.useRef([]),{previewCodes:g,previewBucket:y}=C4(e,t),v=`${g.join(",")}|${y??""}`,_=o.useMemo(()=>i.key===v?i.urls:[],[i,v]);o.useEffect(()=>{if(!g.length)return;let B=!1;return(async()=>{const N=[],f=[];for(const w of g)try{const k=si(w,y);if(!k){N.push("");continue}let E=null;try{E=await li(k)}catch{}if(!E)try{const A=await ii(k);A&&(E=URL.createObjectURL(A),f.push(E))}catch{}N.push(E??"")}catch{N.push("")}B?f.forEach(w=>{try{URL.revokeObjectURL(w)}catch{}}):(x.current.forEach(w=>{try{URL.revokeObjectURL(w)}catch{}}),x.current=f,u({key:v,urls:N}))})(),()=>{B=!0}},[g.join(","),y]),o.useEffect(()=>()=>{x.current.forEach(B=>{try{URL.revokeObjectURL(B)}catch{}}),x.current=[]},[]);const b=o.useCallback(async B=>{if(B.stopPropagation(),B.preventDefault(),p.current){h.current&&Va(h.current),p.current=!1;try{c.current?.pause()}catch{}a(!1),l(-1);return}if(!_.filter(Boolean).length)return;let N=null;const f=()=>{p.current=!1,N?.stop()};h.current=f;const w=pa(f);p.current=!0,a(!0);for(let k=0;k<_.length&&p.current;k++){const E=_[k];if(E&&(l(k),N=ha(E),c.current=N.el,!await N.done))break}w(),h.current===f&&(h.current=null,p.current=!1,a(!1),l(-1))},[_]);return o.useEffect(()=>()=>{h.current&&Va(h.current),p.current=!1;try{c.current?.pause()}catch{}c.current=null},[]),{playing:r,playingIndex:s,previewUrls:_,previewHover:m,setPreviewHover:C,previewBtnRef:d,handlePreview:b}}const b4=e=>{if(!e)return[];const t=typeof e.context=="string"&&e.context.trim()||typeof e.sentence=="string"&&e.sentence.trim()||typeof e.text=="string"&&e.text.trim()||"";if(t)return[String(t)];const r=e.sentences||e.items||e.questions||[];return Array.isArray(r)&&r.length>0?r.map(a=>{if(typeof a=="string")return a;if(a&&typeof a=="object"){const s=a;return s.sentence||s.text||s.context||s.question||s.title||""}return""}).filter(a=>typeof a=="string"&&a.trim().length>0).map(a=>a.trim()):[]};function vs(e){const{index:t,type:r,trainingData:a,ariaLabel:s,depth:l,renderPopup:i,completed:u,completedIds:c,selectedIds:p,tooltipText:h,useDescriptionTooltip:d=!1,onRemove:m,hideCheckBadge:C=!1,showTypeLabel:x=!1,onComplete:g,onSelect:y,onMore:v,countLabelOverride:_,size:b="square"}=e||{},{t:B}=Ne.useTranslation(),[N,f]=o.useState(!1),w=o.useRef(null),[k,E]=o.useState(!1);o.useEffect(()=>{w.current?.matches(":hover")&&E(!0)},[]);const{playing:A,playingIndex:D,previewUrls:j,previewHover:$,setPreviewHover:H,previewBtnRef:F,handlePreview:U}=g4(a,r?.key),T=o.useCallback(()=>{y?y():f(!0)},[y]),I=o.useCallback(()=>f(!1),[]),z=o.useCallback(()=>E(!0),[]),ie=o.useCallback(()=>E(!1),[]),te=o.useCallback(()=>H(!0),[H]),P=o.useCallback(()=>H(!1),[H]),[G,X]=o.useState(null);o.useLayoutEffect(()=>{$&&X(F.current?.getBoundingClientRect()??null)},[$,F]);const[K,L]=o.useState(null);o.useLayoutEffect(()=>{k&&!N&&d&&L(w.current?.getBoundingClientRect()??null)},[k,N,d]);const R=o.useCallback(Te=>{Te.target===Te.currentTarget&&(Te.key==="Enter"||Te.key===" ")&&(Te.preventDefault(),T())},[T]),S=a||null,V=o.useMemo(()=>{if(!d)return null;const Te=h?(Array.isArray(h)?h:[h]).filter(Boolean):null,Xe=Te&&Te.length>0?Te:b4(S);return Xe&&Xe.length>0?Xe:null},[d,h,S]),ae=o.useCallback(Te=>{Te.stopPropagation(),m?.()},[m]),ne=o.useCallback(Te=>Te.stopPropagation(),[]),re=o.useCallback(Te=>{typeof g=="function"&&g(Te)},[g]),ue=u||(c&&a?.id!=null?c.has(String(a.id)):!1),Be=!ue&&(p!=null&&a?.id!=null?p.has(String(a.id)):!1);Au("speechear.popup.close",I);const le=Ti(),J=`${r?.label||""} ${t+1}`,O=S?.title||S?.name||J;let W=r?.icon,q,oe="",ee="";try{const Te=S?.category_0||S?.category_main_code||S?.category_main,Xe=S?.category_1||S?.category_sub_code||S?.category_sub,rt=le.find(ut=>ut.key===Te);rt?.icon&&(W=rt.icon),!q&&rt?.color&&(q={"--t-item-fg":rt.color}),!q&&S?.iconColor&&(q={"--t-item-fg":S.iconColor}),oe=rt?B(`topic.${rt.key}`,{defaultValue:rt.label||""}):"";try{const ut=rt?.subs?.find(gt=>gt.key===Xe);ee=ut?B(`topic.sub.${ut.key}`,{defaultValue:ut.label||""}):""}catch{}}catch{}const be=ee?`${oe} / ${ee}`:oe||r?.label||O,je=Te=>B("training.countQuestions",{n:Te,count:Te}),De=Te=>B("training.countSentences",{n:Te,count:Te});let we="";try{if(S)if(r?.key==="LISTEN_IN_NOISE"){let Te=0;Array.isArray(S.items)&&S.items.length>0?Te=S.items.length:Array.isArray(S.sentences)&&S.sentences.length>0?Te=S.sentences.length:S.sentences&&(Te=1),we=De(Te)}else if(r?.key==="SHORT_STORY"){let Te=1;Array.isArray(a?.items)?Te=a.items.length:Array.isArray(a?.raw&&a.raw?.items)?Te=a.raw.items.length:Array.isArray(S?.questions)?Te=S.questions.length:Array.isArray(S?.sentences)&&(Te=S.sentences.length),we=je(Te)}else if(r?.key==="LONG_STORY"){let Te=1;if(Array.isArray(S.items)&&S.items.length>0){const Xe=S.items.reduce((rt,ut)=>{const gt=ut.questionItems;return Array.isArray(gt)?rt+gt.length:Array.isArray(ut.questions)?rt+ut.questions.length:rt},0);Te=Xe>0?Xe:S.items.length}else Array.isArray(S.questions)&&S.questions.length>0?Te=S.questions.length:Array.isArray(S.sentences)&&S.sentences.length>0&&(Te=S.sentences.length);we=je(Te)}else if(r?.key==="ORDERING_SENTENCE"){let Te=1;Array.isArray(S.items)&&S.items.length>0?Te=S.items.length:Array.isArray(S.sentences)&&S.sentences.length>0&&(Te=S.sentences.length),we=De(Te)}else Array.isArray(S.items)&&(we=S.items.length>0?je(S.items.length):"")}catch{}const ze=b==="row",ye=b==="list"||ze,_e=b==="compact",ve=b==="small",Ee=ve&&r?.key?dy().find(Te=>Te.key===r.key):void 0,Oe=Ee?Mi[Ee.key]:void 0,ot=Ee?Oe?B(`trainingType.${Oe}.title`,{defaultValue:Ee.label}):Ee.label??"":"",it=x&&r?.label&&r.label!==String(O)?String(r.label):ve&&ot&&ot!==String(O)?ot:"",Fe=!!it,Ue=_!==void 0?_:we,nt=[it,typeof O=="string"?O:"",Ue].map(Te=>String(Te??"").trim()).filter(Boolean).join(" ");return n.jsxs(n.Fragment,{children:[n.jsxs("div",{ref:w,className:`training-block-button${ye?" training-block-button--list":""}${ze?" training-block-button--row":""}${_e?" training-block-button--compact":""}${ve?" training-block-button--small":""}${ue?" training-block-button--completed":""}${Be?" training-block-button--selected":""}${Fe&&!ve?" training-block-button--withType":""}${ve&&!Fe?" training-block-button--no-type-label":""}`,onClick:T,onPointerEnter:z,onPointerLeave:ie,role:"button",tabIndex:0,onKeyDown:R,"aria-label":typeof s=="string"?s:nt||void 0,title:!d&&h&&(Array.isArray(h)?h.filter(Boolean).join(`
842
- `):h)||void 0,children:[n.jsxs("div",{className:"training-block-button__left",children:[x&&r?.label&&r.label!==String(O)&&n.jsx("span",{className:"training-block-button__type-label caption-1",children:r.label}),ve&&ot&&ot!==String(O)&&n.jsx("span",{className:"training-block-button__type-label caption-2",children:ot}),n.jsx(Tc,{icon:W,label:O,tooltip:be,wrapperStyle:q,iconSize:ve||_e?"small":"medium"}),!C&&(ue||Be)&&!(m&&k)&&n.jsx(Sn,{className:m?"training-block-button__check--removable":void 0,icon:"check",position:"top-left",size:32,"aria-label":ue?B("training.completed","\uD6C8\uB828 \uC644\uB8CC"):B("training.selected","\uC120\uD0DD\uB428")}),m&&n.jsx(Sn,{className:`training-block-button__remove${k?" is-hover":""}`,icon:"remove",position:"top-left",size:32,"aria-label":B("common.remove","\uC81C\uAC70"),onClick:ae}),n.jsx("div",{className:`training-block-button__title ${_e?"body-3":ve?"body-3b":"h3"}`,children:String(O)}),n.jsxs("div",{className:"training-block-button__description",children:[Ue?n.jsx("div",{className:`training-block-button__count ${ve?"caption-2":"caption-1"}`,children:Ue}):null,n.jsx("div",{className:"training-block-button__chevron",children:n.jsx(lt,{icon:"chevron-right",label:B("training.next","\uB2E4\uC74C"),className:"training-block-button__chevron-icon",imgClassName:"training-block-button__chevron-icon-image",maskClassName:"training-block-button__chevron-icon-mask",svgClassName:"training-block-button__chevron-icon-svg",size:ve?12:20})})]}),(ye&&!ze||ve)&&j.length>0&&n.jsx("div",{ref:F,className:"training-block-button__preview","data-tooltip-ignore":!0,onClick:ne,onPointerEnter:te,onPointerLeave:P,children:n.jsx(me,{htmlType:"button",size:ve?28:32,type:"dot",icon:A?"pause":"play",variant:ve?"transparent-lightGray":"default",useBorder:!1,selected:A,ariaLabel:String(O).trim()?A?B("training.stopFor",{name:O,defaultValue:`${O} \uC815\uC9C0`}):B("training.previewFor",{name:O,defaultValue:`${O} \uBBF8\uB9AC \uB4E3\uAE30`}):A?B("training.stop","\uC815\uC9C0"):B("training.preview","\uBBF8\uB9AC \uB4E3\uAE30"),onClick:U})})]}),v&&n.jsx("div",{className:"training-block-button__more","data-tooltip-ignore":!0,onClick:Te=>{Te.stopPropagation(),v(Te)},children:n.jsx(me,{htmlType:"button",size:40,type:"dot",icon:"more-horizontal",variant:"transparent-lightGray",useBorder:!1,ariaLabel:String(O).trim()?B("common.moreFor",{name:O}):B("common.more","\uB354\uBCF4\uAE30")})})]}),$&&n.jsx(zn,{anchorRect:G,text:A?B("training.stop","\uC815\uC9C0"):B("training.preview","\uBBF8\uB9AC \uB4E3\uAE30"),offset:8,onClose:P}),k&&!N&&d&&(V?n.jsx(er,{anchorRect:K,items:V,activeIndex:D,onClose:ie}):S?.subTitle?n.jsx(zn,{anchorRect:K,text:S.subTitle,offset:8,onClose:ie}):null),N&&i&&i({trainingData:S,typeKey:r?.key??"",onClose:I,onComplete:re,popupTitle:String(O),popupSubTitle:r?.subTitle,depth:l!=null?String(l):void 0,popupIcon:W,popupIconTooltip:String(be),popupWrapperStyle:q})]})}const Mc=200;function y4(e){return e.itemId?(Cy()[e.trainingType]??[]).find(t=>t?.id!=null&&String(t.id)===String(e.itemId))??null:null}function $c({plan:e,groups:t,anchorRect:r,offset:a=12,onClose:s}){const{t:l}=Ne.useTranslation(),i=o.useMemo(()=>t?t.map((c,p)=>({key:c.key??c.type?.key??String(p),label:c.label,type:c.type,data:c.items??[]})).filter(c=>c.data.length>0):by(l).map(c=>{const p=(e?.items??[]).filter(h=>h.trainingType===c.key);return{key:c.key,label:c.label,type:c,pickedCount:p.length,data:p.map(y4).filter(h=>h!=null)}}).filter(c=>c.pickedCount>0),[t,e?.items,l]);if(i.length===0)return null;const u=n.jsx("div",{className:ce("training-tooltip__box"),children:n.jsx("div",{className:ce("training-tooltip__groups"),children:i.flatMap(({key:c,label:p,type:h,data:d},m)=>[m>0?n.jsx("div",{className:ce("training-tooltip__divider")},`div-${c}`):null,n.jsxs("div",{className:ce("training-tooltip__section"),children:[n.jsx("div",{className:ce("training-tooltip__section-header"),children:n.jsx("span",{className:ce("training-tooltip__type-label body-3b"),children:p})}),n.jsx("div",{className:ce("training-tooltip__items"),children:d.map((C,x)=>n.jsx(vs,{index:x,type:h,trainingData:C,size:"compact",hideCheckBadge:!0},String(C.id??x)))})]},c)])})});return r?n.jsx(sn,{anchorRect:r,offset:a,onClose:s,closeOnOutsideClick:!1,className:ce("training-tooltip"),ariaLabel:l("tooltip.training","\uD6C8\uB828 \uC548\uB0B4"),children:u}):u}const v4=200;function x4({icon:e,count:t,title:r,plan:a,tooltip:s=!0,hoverAccent:l=!1,className:i="",onClick:u,onMouseEnter:c,onMouseLeave:p}){const h=!!u||!!c||s&&!!a,d=xe("count-tile",h&&"count-tile--interactive",h&&l&&"count-tile--accent",u&&"count-tile--clickable",i),m=o.useRef(null),[C,x]=o.useState(null),g=o.useRef(null),y=o.useRef(null),v=!!(C&&a&&s),_=o.useCallback(()=>{g.current&&(clearTimeout(g.current),g.current=null),y.current&&(clearTimeout(y.current),y.current=null)},[]),b=o.useCallback(()=>{_(),x(null)},[_]),B=o.useCallback(()=>{!s||!a||(_(),g.current=setTimeout(()=>{g.current=null,x(m.current?.getBoundingClientRect()??null)},Mc))},[s,a,_]),N=o.useCallback(()=>{g.current&&(clearTimeout(g.current),g.current=null),!y.current&&(y.current=setTimeout(()=>{y.current=null,x(null)},v4))},[]);return o.useEffect(()=>()=>{_()},[_]),o.useEffect(()=>{(!s||!a)&&b()},[s,a,b]),o.useEffect(()=>{if(!v)return;const f=k=>k instanceof Element&&(m.current?.contains(k)||!!k.closest(".training-tooltip")),w=k=>{f(k.target)?_():N()};return document.addEventListener("pointerover",w,!0),()=>document.removeEventListener("pointerover",w,!0)},[v,_,N]),n.jsxs(n.Fragment,{children:[n.jsxs("div",{ref:m,className:d,onClick:u?f=>{b(),u(f)}:void 0,onKeyDown:u?f=>{f.key!=="Enter"&&f.key!==" "||(f.preventDefault(),f.currentTarget.click())}:void 0,onPointerEnter:f=>{f.pointerType==="touch"||f.pointerType==="pen"?b():B()},onMouseEnter:c,onMouseLeave:f=>{N(),p?.(f)},role:u?"button":"img",tabIndex:u?0:void 0,"aria-label":`${r} ${t}`,children:[n.jsx(lt,{icon:e,size:20,className:"count-tile__icon"}),n.jsx("span",{className:"count-tile__count h5","aria-hidden":"true",children:t})]}),C&&a&&n.jsx($c,{plan:a,anchorRect:C,onClose:b})]})}function _4(){return n.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round","aria-hidden":!0,children:n.jsx("path",{d:"M6 6l12 12M18 6 6 18"})})}function w4({open:e,onClose:t,ariaLabel:r,title:a,children:s,size:l="md",closeOnBackdrop:i=!0,closeOnEscape:u=!0,showClose:c=!0,className:p,contentClassName:h}){const{t:d}=Ne.useTranslation(),m=o.useId(),C=o.useRef(null),x=o.useCallback(()=>t(),[t]);o.useEffect(()=>{if(!e)return;const _=document.activeElement,b=fc(),B=C.current;return Yo(B,_),B?.focus(),()=>{b();const N=document.activeElement;(!N||N===document.body||B&&B.contains(N))&&Zo(_)?.focus?.()}},[e]);const g=o.useRef(x),y=o.useRef(u);o.useEffect(()=>{g.current=x,y.current=u}),o.useEffect(()=>{if(e)return ir(()=>{y.current&&g.current()})},[e]);const v=o.useRef(!1);return Sa(C,e),!e||typeof document>"u"?null:bn.createPortal(n.jsx("div",{className:xe("dialog",p),onPointerDown:i?_=>{v.current=_.target===_.currentTarget}:void 0,onMouseDown:_=>{_.target===_.currentTarget&&_.preventDefault()},onClick:i?_=>{const b=v.current;v.current=!1,b&&_.target===_.currentTarget&&x()}:void 0,children:n.jsxs("div",{ref:C,role:"dialog","aria-modal":"true","aria-label":a?void 0:r,"aria-labelledby":a?m:void 0,tabIndex:-1,className:xe("dialog__surface",`dialog__surface--${l}`,h),onClick:_=>_.stopPropagation(),children:[a?n.jsx("div",{className:"dialog__header",children:n.jsx("h2",{id:m,className:"dialog__title h4b",children:a})}):null,c?n.jsx("button",{type:"button",className:"dialog__close","aria-label":d("common.close","\uB2EB\uAE30"),onClick:x,children:n.jsx(_4,{})}):null,n.jsx("div",{className:"dialog__body",children:s})]})}),document.body)}function B4({columns:e,rows:t,rowKey:r,title:a,toolbar:s,empty:l,loading:i,caption:u,className:c=""}){const{t:p}=Ne.useTranslation(),h=!i&&t.length===0;return n.jsxs("div",{className:xe("board",c),children:[a||s?n.jsxs("div",{className:"board__head",children:[a?n.jsx("h2",{className:"board__title",children:a}):n.jsx("span",{}),s?n.jsx("div",{className:"board__toolbar",children:s}):null]}):null,n.jsxs("table",{className:"board__table",children:[u?n.jsx("caption",{className:"board__caption",children:u}):null,n.jsx("thead",{children:n.jsx("tr",{children:e.map(d=>n.jsx("th",{scope:"col",className:xe("board__th",`board__cell--${d.headerAlign??d.align??"left"}`),style:d.width?{width:d.width}:void 0,children:d.header},d.key))})}),n.jsx("tbody",{children:i?n.jsx("tr",{children:n.jsx("td",{className:"board__state",colSpan:e.length,children:i})}):h?n.jsx("tr",{children:n.jsx("td",{className:"board__state",colSpan:e.length,children:l??p("board.empty","\uB4F1\uB85D\uB41C \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.")})}):t.map((d,m)=>n.jsx("tr",{className:"board__row",children:e.map(C=>n.jsx("td",{className:xe("board__td",`board__cell--${C.align??"left"}`),children:C.render(d,m)},C.key))},r(d,m)))})]})]})}function k4({name:e,role:t,photo:r,media:a,credentials:s,size:l=190,className:i=""}){return n.jsxs("div",{className:xe("person-card",i),children:[n.jsx("div",{className:"person-card__photo",style:{width:l,height:l},children:a??(r?n.jsx("img",{src:r,alt:t?`${e} ${t}`:e}):null)}),n.jsx("h3",{className:"person-card__name",children:e}),t?n.jsx("p",{className:"person-card__role",children:t}):null,s?.length?n.jsx("ul",{className:"person-card__credentials",children:s.map(u=>n.jsx("li",{children:u},u))}):null]})}function A4({groups:e,className:t=""}){return n.jsx("div",{className:xe("timeline",t),children:e.map(r=>n.jsxs("section",{className:"timeline__group",children:[n.jsx("h3",{className:"timeline__title",children:r.title}),n.jsx("ul",{className:"timeline__rows",children:r.entries.map((a,s)=>n.jsxs("li",{className:"timeline__row",children:[a.label?n.jsx("span",{className:"timeline__label",children:a.label}):null,n.jsx("div",{className:"timeline__items",children:a.items.map((l,i)=>n.jsx("p",{children:l},i))})]},`${a.label??""}-${s}`))})]},r.title))})}function N4({title:e,kind:t,body:r,badge:a,badgeSrc:s,footer:l,width:i,className:u=""}){const c=a??(s?n.jsx("img",{src:s,alt:""}):null);return n.jsxs("div",{className:xe("publication-card",u),style:i?{width:i,flexShrink:0}:void 0,children:[c?n.jsx("div",{className:"publication-card__badge","aria-hidden":"true",children:c}):null,n.jsx("h3",{className:"publication-card__title",children:e}),t?n.jsx("p",{className:"publication-card__kind",children:t}):null,n.jsx("p",{className:"publication-card__body",children:r}),l?n.jsx("div",{className:"publication-card__footer",children:l}):null]})}function E4({logo:e,alt:t,onDone:r,durationMs:a=3e3}){const s=ea(r);return o.useEffect(()=>{const l=setTimeout(()=>s.current?.(),a);return()=>clearTimeout(l)},[a,s]),n.jsx("div",{className:"splash-logo",style:{"--splash-logo-duration":`${a}ms`},"aria-hidden":"true",children:n.jsx("img",{src:e,alt:t,className:"splash-logo__image"})})}function j4({eyebrow:e,eyebrowIndex:t,title:r,description:a,level:s=2,tone:l="dark",className:i=""}){const u=s===1?"h1":"h2";return n.jsxs("div",{className:xe("section-header",`section-header--${l}`,i),children:[e?n.jsxs("p",{className:"section-header__eyebrow",children:[t?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"section-header__index",children:t}),n.jsx("span",{"aria-hidden":!0,className:"section-header__rule"})]}):null,e]}):null,r?n.jsx(u,{className:"section-header__title",children:r}):null,a?n.jsx("div",{className:"section-header__description",children:a}):null]})}function D4({items:e,className:t=""}){return n.jsx("ul",{className:xe("company-meta",t),children:e.map((r,a)=>n.jsxs("li",{className:"company-meta__item",children:[a>0?n.jsx("span",{"aria-hidden":!0,className:"company-meta__divider",children:"|"}):null,r]},r))})}function xs({checked:e=!1,onChange:t,disabled:r,indeterminate:a,label:s,size:l="medium",className:i,title:u,ariaLabel:c}){const p=o.useRef(null),h=o.useId(),d=o.useRef(!!a);return d.current=!!a,o.useEffect(()=>{p.current&&(p.current.indeterminate=!!a)}),n.jsxs("label",{className:xe("checkbox",l==="small"&&"checkbox--small",l==="large"&&"checkbox--large",r&&"checkbox--disabled",i),htmlFor:h,title:u,children:[n.jsx("input",{ref:p,id:h,type:"checkbox",className:"checkbox__input",checked:e,onChange:m=>{t?.(m.target.checked),p.current&&(p.current.indeterminate=d.current)},disabled:r,"aria-label":!s&&c?c:void 0}),n.jsx("span",{className:"checkbox__box"}),s&&n.jsx("span",{className:"checkbox__label body-3",children:s})]})}function Lc(e,t){const r=()=>{if(e){const[g,y]=e.split("-");return{y:+g,m:+y-1}}const[C,x]=Aa(t).split("-");return{y:+C,m:+x-1}},[a,s]=o.useState(()=>r().y),[l,i]=o.useState(()=>r().m),u=o.useRef(e);o.useEffect(()=>{if(e===u.current)return;u.current=e;const C=r();s(C.y),i(C.m)},[e]);const c=o.useRef({y:a,m:l});o.useEffect(()=>{c.current={y:a,m:l}},[a,l]);const p=o.useCallback(C=>{const x=c.current.y*12+c.current.m+C,g=Math.floor(x/12),y=x-g*12;c.current={y:g,m:y},s(g),i(y)},[]),h=o.useCallback(()=>p(-1),[p]),d=o.useCallback(()=>p(1),[p]),m=o.useCallback((C,x)=>{c.current={y:C,m:x},s(C),i(x)},[]);return{viewY:a,viewM:l,prevMonth:h,nextMonth:d,setViewYM:m}}function qa(e,t){return new Date(e,t+1,0).getDate()}function S4(e,t){return new Date(e,t,1).getDay()}function ma(e,t,r){return`${e}-${String(t+1).padStart(2,"0")}-${String(r).padStart(2,"0")}`}function T4(e){if(!e)return"";const[t,r,a]=e.split("-");return`${t}. ${r}. ${a}.`}function Rc(e){const t=e.replace(/\D/g,"");if(t.length!==8)return null;const r=+t.slice(0,4),a=+t.slice(4,6),s=+t.slice(6,8);if(a<1||a>12||s<1||s>31)return null;const l=new Date(r,a-1,s);return l.getFullYear()!==r||l.getMonth()!==a-1||l.getDate()!==s?null:ma(r,a-1,s)}const M4=1900;function $4(e,t,r,a,s){const l=a?+a.split("-")[0]:Math.min(M4,e),i=s?+s.split("-")[0]:Math.max(t+10,e),u=[];for(let c=l;c<=i;c++)u.push({value:String(c),label:r(c)});return u}function Pc(e,t,r,a){const s=[];for(let l=1;l<=12;l++){const i=`${e}-${String(l).padStart(2,"0")}`;r&&i<r.slice(0,7)||a&&i>a.slice(0,7)||s.push({value:String(l),label:t(e,l)})}return s}function Fc({value:e,onChange:t,size:r,min:a,max:s,disabled:l,placeholder:i,className:u,today:c,ariaLabel:p,ariaLabelledBy:h}){const d=wn(),m=r??d??fn;!p&&!h&&Tt("DatePicker:unnamed","[ihab/DatePicker] \uC774\uB984\uC774 \uC5C6\uC2B5\uB2C8\uB2E4 \u2014 ariaLabel \uC774\uB098 ariaLabelledBy \uC911 \uD558\uB098\uB97C \uC8FC\uC138\uC694. placeholder \uB294 \uC774\uB984\uC744 \uB300\uC2E0\uD558\uC9C0 \uBABB\uD569\uB2C8\uB2E4.");const{t:C,i18n:x}=Ne.useTranslation(),g=i??C("datePicker.chooseDate","\uB0A0\uC9DC \uC120\uD0DD"),y=o.useMemo(()=>C("calendar.dow",{returnObjects:!0}),[C]),v=Aa(c),{viewY:_,viewM:b,prevMonth:B,nextMonth:N,setViewYM:f}=Lc(e,c),w=o.useId(),k=o.useCallback((q,oe)=>{const ee=window.innerHeight,be=window.innerWidth,je=typeof document<"u"?document.getElementById(w):null,De=Math.max(je?.offsetHeight||0,je?.scrollHeight||0)||300,we=Math.max(q.width,je?.offsetWidth||0,260),ze=ee-q.bottom,ye=q.top,_e=ze<De&&ye>ze,ve=8,Ee=(Oe,ot)=>Math.min(Math.max(ve,Oe),Math.max(ve,ot));return{position:"fixed",left:Ee(q.left,be-we-ve),width:q.width,minWidth:260,..._e?{top:"auto",bottom:Ee(ee-q.top+6,ee-De-ve)}:{bottom:"auto",top:Ee(q.bottom+6,ee-De-ve)},zIndex:na(oe)}},[w]),{open:E,setOpen:A,toggle:D,style:j,triggerRef:$,menuRef:H}=ra({computeStyle:k,onScroll:"reposition",onResize:"reposition",ignoreOutsideClickSelector:".dropdown__menu"});o.useEffect(()=>{if(!E)return;const q=H.current;return(q?.querySelector(".date-picker__day--selected:not(:disabled)")??q?.querySelector(".date-picker__day--today:not(:disabled)")??q?.querySelector(".date-picker__day:not(:disabled)")??q?.querySelector(jn)??q)?.focus?.(),()=>{const oe=document.activeElement;(!oe||oe===document.body)&&$.current?.focus?.()}},[E,H,$]);const[F,U]=o.useState(1),T=o.useRef(null),I=o.useRef(null);o.useEffect(()=>{if(!E)return;const q=e&&e.slice(0,7)===`${_}-${String(b+1).padStart(2,"0")}`?+e.slice(8):v.slice(0,7)===`${_}-${String(b+1).padStart(2,"0")}`?+v.slice(8):1;U(q)},[E]),o.useEffect(()=>{if(I.current==null)return;const q=I.current;I.current=null,T.current?.querySelector(`[data-day="${q}"]`)?.focus()}),o.useEffect(()=>{U(q=>Math.min(q,qa(_,b)))},[_,b]);const z=o.useCallback(q=>{let oe=ma(q.getFullYear(),q.getMonth(),q.getDate());a&&oe<a&&(oe=a),s&&oe>s&&(oe=s);const[ee,be,je]=oe.split("-").map(Number);(ee!==_||be-1!==b)&&f(ee,be-1),U(je),I.current=je},[a,s,_,b,f]),ie=o.useCallback(q=>{const oe=new Date(_,b,F),ee=je=>{oe.setDate(oe.getDate()+je),z(oe)},be=je=>{const De=oe.getFullYear()*12+oe.getMonth()+je,we=Math.floor(De/12),ze=De-we*12;z(new Date(we,ze,Math.min(oe.getDate(),qa(we,ze))))};switch(q.key){case"ArrowLeft":ee(-1);break;case"ArrowRight":ee(1);break;case"ArrowUp":ee(-7);break;case"ArrowDown":ee(7);break;case"Home":ee(-oe.getDay());break;case"End":ee(6-oe.getDay());break;case"PageUp":q.shiftKey?be(-12):be(-1);break;case"PageDown":q.shiftKey?be(12):be(1);break;default:return}q.preventDefault()},[_,b,F,z]),te=o.useCallback(q=>{l||(t(ma(_,b,q)),A(!1))},[_,b,t,A,l]);o.useEffect(()=>{l&&A(!1)},[l,A]);const P=q=>{const oe=ma(_,b,q);return!!(a&&oe<a||s&&oe>s)},G=(()=>{const q=qa(_,b);if(F>=1&&F<=q&&!P(F))return F;for(let oe=1;oe<=q;oe++)if(!P(oe))return oe;return-1})(),X=[];for(let q=0;q<S4(_,b);q++)X.push(null);for(let q=1;q<=qa(_,b);q++)X.push(q);const K=m===64?20:m===32?14:m===40?16:18,L=Fo(x.language),R=q=>new Intl.DateTimeFormat(L,{year:"numeric"}).format(new Date(q,0,1)),S=(q,oe)=>new Intl.DateTimeFormat(L,{month:"long"}).format(new Date(q,oe-1,1)),V=$4(_,+v.slice(0,4),R,a,s),ae=Pc(_,S,a,s),ne=q=>{const oe=Pc(q,S,a,s);if(oe.length===0)return;const ee=oe.some(be=>+be.value===b+1);f(q,ee?b:+oe[0].value-1)},[re,ue]=o.useState(null);o.useEffect(()=>{ue(null)},[e]);const Be=o.useCallback(q=>{ue(q);const oe=Rc(q);if(!oe||a&&oe<a||s&&oe>s)return;t(oe);const[ee,be]=oe.split("-");f(+ee,+be-1)},[a,s,t,f]),le=(()=>{if(re==null||re.replace(/\D/g,"").length<8)return!1;const q=Rc(re);return!q||!!a&&q<a||!!s&&q>s})(),J=o.useCallback(()=>{ue(null)},[]),O=o.useCallback(q=>{q.key==="Enter"?(q.preventDefault(),J(),A(!1)):q.key==="Escape"?(J(),A(!1)):q.key==="ArrowDown"&&!E&&(q.preventDefault(),A(!0))},[J,A,E]),W=E?bn.createPortal(n.jsxs("div",{ref:H,id:w,className:"date-picker__dropdown",style:j,"data-tooltip-ignore":!0,role:"dialog","aria-label":C("datePicker.chooseDate","\uB0A0\uC9DC \uC120\uD0DD"),tabIndex:-1,children:[n.jsxs("div",{className:"date-picker__nav",children:[n.jsx("button",{type:"button",className:"date-picker__nav-btn",onClick:B,"aria-label":C("calendar.prevMonth","\uC774\uC804 \uB2EC"),children:n.jsx(Bl,{size:16,strokeWidth:2})}),n.jsxs("div",{className:"date-picker__nav-ym",children:[n.jsx(An,{className:"date-picker__nav-dropdown",ariaLabel:C("datePicker.selectYear","\uC5F0 \uC120\uD0DD"),options:V,value:String(_),onChange:q=>ne(+q),size:40}),n.jsx(An,{className:"date-picker__nav-dropdown",ariaLabel:C("datePicker.selectMonth","\uC6D4 \uC120\uD0DD"),options:ae,value:String(b+1),onChange:q=>f(_,+q-1),size:40})]}),n.jsx("button",{type:"button",className:"date-picker__nav-btn",onClick:N,"aria-label":C("calendar.nextMonth","\uB2E4\uC74C \uB2EC"),children:n.jsx(kl,{size:16,strokeWidth:2})})]}),n.jsxs("div",{className:"date-picker__grid",ref:T,onKeyDown:ie,children:[y.map(q=>n.jsx("div",{className:"date-picker__dow caption-1",children:q},q)),X.map((q,oe)=>{if(q===null)return n.jsx("div",{},`e${oe}`);const ee=ma(_,b,q),be=ee===e,je=ee===v,De=P(q),we=oe%7;return n.jsx("button",{type:"button",disabled:De,"data-day":q,tabIndex:q===G?0:-1,"aria-current":je?"date":void 0,onClick:()=>!De&&te(q),className:xe("date-picker__day caption-1",be&&"date-picker__day--selected",je&&!be&&"date-picker__day--today",De&&"date-picker__day--disabled",we===0&&"date-picker__day--sun",we===6&&"date-picker__day--sat"),children:q},q)})]})]}),document.body):null;return n.jsxs("div",{className:xe("date-picker",`date-picker--s${m}`,E&&"date-picker--open",le&&"date-picker--invalid",u),children:[n.jsxs("div",{className:"date-picker__field",children:[n.jsx("input",{ref:$,type:"text",className:"date-picker__trigger body-2",value:re??T4(e),placeholder:g,onChange:q=>Be(q.target.value),onClick:()=>!l&&!E&&D(),onKeyDown:O,onBlur:J,disabled:l,"aria-haspopup":"dialog","aria-expanded":E,"aria-invalid":le||void 0,"aria-label":p,"aria-labelledby":h,inputMode:"numeric",autoComplete:"off"}),n.jsx("button",{type:"button",className:"date-picker__icon-btn",onClick:()=>!l&&D(),disabled:l,tabIndex:-1,"aria-label":g,"aria-haspopup":"dialog","aria-expanded":E,children:n.jsx($l,{size:K,className:"date-picker__icon",strokeWidth:1.5})})]}),W]})}const Ic=["personal","sensitive","marketing"];function L4({takenKinds:e,busy:t,today:r,onClose:a,onSubmit:s,className:l}){const{t:i}=Ne.useTranslation(),[u]=o.useState(()=>Aa(r)),[c,p]=o.useState([]),[h,d]=o.useState("paper"),[m,C]=o.useState("self"),[x,g]=o.useState(u),[y,v]=o.useState(""),_=Ic.filter(B=>!e.includes(B)),b={personal:i("customers.consent.kind.personal","\uC77C\uBC18 \uAC1C\uC778\uC815\uBCF4"),sensitive:i("customers.consent.kind.sensitive","\uBBFC\uAC10\uC815\uBCF4(\uCCAD\uB825\xB7\uC9C4\uB2E8)"),marketing:i("customers.consent.kind.marketing","\uAD11\uACE0\uC131 \uC815\uBCF4 \uC218\uC2E0")};return n.jsx(qn,{title:i("customers.consent.record","\uB3D9\uC758 \uBC1B\uAE30"),closeDisabled:t,onClose:a,className:l,footer:()=>n.jsx(me,{htmlType:"button",size:48,variant:"main",disabled:t||c.length===0,label:i("customers.consent.submit","\uC800\uC7A5\uD558\uAE30"),onClick:()=>s({kinds:c,method:h,source:m,consentedAt:x||null,note:y.trim()||null})}),children:n.jsxs(da,{useBorder:!1,labelWidth:96,children:[n.jsx(Cn,{variant:"custom",useFullWidth:!0,label:i("customers.consent.kinds","\uBC1B\uC740 \uAC08\uB798"),children:n.jsxs("div",{className:"consent-record-popup__kinds",children:[_.map(B=>n.jsx(xs,{checked:c.includes(B),disabled:t,label:b[B],onChange:N=>p(f=>N?[...f,B]:f.filter(w=>w!==B))},B)),_.length===0&&n.jsx("p",{className:"body-3 consent-record-popup__none",children:i("customers.consent.allTaken","\uC138 \uAC08\uB798\uB97C \uC774\uBBF8 \uB2E4 \uBC1B\uC558\uC2B5\uB2C8\uB2E4. \uB2E4\uC2DC \uBC1B\uC73C\uB824\uBA74 \uBA3C\uC800 \uCCA0\uD68C\uD558\uC138\uC694.")})]})}),n.jsx(Cn,{variant:"custom",useFullWidth:!0,label:i("customers.consent.methodTitle","\uBC1B\uC740 \uBC29\uBC95"),children:n.jsx(kn,{size:40,fullWidth:!0,ariaLabel:i("customers.consent.methodTitle","\uBC1B\uC740 \uBC29\uBC95"),options:[{key:"paper",label:i("customers.consent.method.paper","\uC11C\uBA74")},{key:"verbal",label:i("customers.consent.method.verbal","\uAD6C\uB450")},{key:"electronic",label:i("customers.consent.method.electronic","\uC804\uC790")}],value:h,onChange:B=>d(String(B))})}),n.jsx(Cn,{variant:"custom",useFullWidth:!0,label:i("customers.consent.sourceTitle","\uC218\uC9D1 \uCD9C\uCC98"),children:n.jsx(kn,{size:40,fullWidth:!0,ariaLabel:i("customers.consent.sourceTitle","\uC218\uC9D1 \uCD9C\uCC98"),options:[{key:"self",label:i("customers.consent.source.self","\uBCF8\uC778")},{key:"guardian",label:i("customers.consent.source.guardian","\uBCF4\uD638\uC790")},{key:"referral",label:i("customers.consent.source.referral","\uC758\uB8B0\uAE30\uAD00")}],value:m,onChange:B=>C(String(B))})}),n.jsx(Cn,{variant:"custom",useFullWidth:!0,label:i("customers.consent.day","\uBC1B\uC740 \uB0A0"),children:n.jsx(Fc,{size:48,value:x,max:u,today:r,onChange:B=>g(B??"")})}),n.jsx(Cn,{variant:"custom",useFullWidth:!0,label:i("customers.consent.note","\uBA54\uBAA8"),children:n.jsx(Un,{size:48,fullWidth:!0,value:y,onChange:v,disabled:t,ariaLabel:i("customers.consent.note","\uBA54\uBAA8"),placeholder:i("customers.consent.notePlaceholder","\uC758\uB8B0\uAE30\uAD00 \uC774\uB984 \uB4F1 \u2014 \uBBFC\uAC10\uD55C \uB0B4\uC6A9\uC740 \uC801\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4")})})]})})}function _s({page:e,totalPages:t,onChange:r,prevLabel:a,nextLabel:s,className:l=""}){const{t:i}=Ne.useTranslation(),u=a??i("common.prevPage","\uC774\uC804 \uD398\uC774\uC9C0"),c=s??i("common.nextPage","\uB2E4\uC74C \uD398\uC774\uC9C0"),p=Math.max(1,t),h=()=>r(Math.max(1,Math.min(p,e-1))),d=()=>r(Math.min(p,e+1));return n.jsxs("div",{className:xe("pagination",l),children:[n.jsx(me,{htmlType:"button",size:32,type:"dot",shape:"rounded",icon:"chevron-left",ariaLabel:u,disabled:e<=1,onClick:h}),n.jsxs("span",{className:"pagination__info body-3","aria-live":"polite","aria-atomic":"true",children:[Math.min(Math.max(1,e),p)," / ",p]}),n.jsx(me,{htmlType:"button",size:32,type:"dot",shape:"rounded",icon:"chevron-right",ariaLabel:c,disabled:e>=t,onClick:d})]})}function ws({count:e,search:t,segment:r,filters:a,pageSize:s,pagination:l,actions:i,className:u}){const c=wn()??fn,{t:p}=Ne.useTranslation(),h=e!=null&&n.jsxs("p",{className:"toolbar__count body-1",role:"status","aria-atomic":"true",children:[e.prefix??p("common.totalPrefix","\uCD1D "),n.jsx("span",{className:"toolbar__count-highlight",children:e.value}),e.unit,e.suffix]}),d=!!(t||a?.length||s||l||i);return n.jsxs("div",{className:xe("toolbar",u),children:[n.jsxs("div",{className:"toolbar__row",children:[h,r&&(Array.isArray(r)?r:[r]).map((m,C)=>n.jsx(kn,{size:c,...m},m.ariaLabel??C))]}),d&&n.jsx("div",{className:"toolbar__row",children:n.jsxs("div",{className:"toolbar__row-end",children:[t&&n.jsx(Un,{className:"toolbar__search",size:c,value:t.value,onChange:t.onChange,placeholder:t.placeholder??p("common.search","\uAC80\uC0C9"),ariaLabel:t.placeholder??p("common.search","\uAC80\uC0C9"),autoFocus:t.autoFocus,clearable:!0}),a?.map((m,C)=>n.jsx(An,{size:c,options:m.options,value:m.value,onChange:m.onChange,ariaLabel:m.ariaLabel},C)),(s||l)&&n.jsxs("div",{className:"toolbar__pager",children:[s&&n.jsx(An,{size:c,options:s.options,value:s.value,onChange:s.onChange,ariaLabel:s.ariaLabel??p("common.pageSizeSelect","\uD398\uC774\uC9C0\uB2F9 \uD45C\uC2DC \uAC1C\uC218")}),l&&n.jsx(_s,{page:l.page,totalPages:l.total,onChange:l.onChange,prevLabel:l.prevLabel,nextLabel:l.nextLabel})]}),i]})})]})}function Oc(e){return typeof e=="string"?e:typeof e=="number"?String(e):Array.isArray(e)?e.map(Oc).join(""):""}function R4(e){let t=e.replace(/\r\n/g,`
840
+ \uD68C\uBCF5\uC744 \uB3D5\uC2B5\uB2C8\uB2E4.`,site:{title:"\uC0AC\uC774\uD2B8",malgwi:"\uB9D0\uADC0",soundDirection:"\uC18C\uB9AC\uBC29\uD5A5\uC131\uC2DC\uC2A4\uD15C",vrSoundDirection:"VR\uC18C\uB9AC\uBC29\uD5A5\uC131\uC2DC\uC2A4\uD15C",hearingTest:"\uCCAD\uB825\uD14C\uC2A4\uD2B8 \uD504\uB85C"},sns:{title:"SNS",naverBlog:"\uB124\uC774\uBC84 \uBE14\uB85C\uADF8"},policy:{title:"\uC815\uCC45",terms:"\uC774\uC6A9\uC57D\uAD00",privacy:"\uAC1C\uC778\uC815\uBCF4 \uCC98\uB9AC\uBC29\uCE68"},ceo:"\uB300\uD45C",address:"\uC8FC\uC18C",bizNo:"\uC0AC\uC5C5\uC790\uB4F1\uB85D\uBC88\uD638",support:"\uACE0\uAC1D\uC13C\uD130",ceoName:"\uD55C\uC9C0\uD61C",addressValue:"\uAC15\uC6D0\uB3C4 \uCD98\uCC9C\uC2DC \uC2DC\uCCAD\uAE38 32 \uD574\uCC2C\uBE4C\uB529 3\uCE35 302\uD638",bizNoValue:"526-81-02926"},Gy={timeHM:"{{h}}\uC2DC {{m}}\uBD84",timeH:"{{h}}\uC2DC"},Ky={phaseWordDownload:"\uB2E8\uC5B4 \uB370\uC774\uD130 \uB2E4\uC6B4\uB85C\uB4DC",phaseImageCheck:"\uC774\uBBF8\uC9C0 \uD655\uC778",phasePairAnalysis:"\uB2E8\uC5B4\uC30D \uBD84\uC11D",downloadingCount:"{{n}}\uAC1C \uB2E4\uC6B4\uB85C\uB4DC \uC911",checkingPage:"{{page}}\uD398\uC774\uC9C0 \uBAA9\uB85D \uD655\uC778 \uC911",imageCount:"{{done}} / {{total}}\uAC1C"},Yy={clearAriaLabel:"\uC785\uB825\uAC12 \uC9C0\uC6B0\uAE30",showPassword:"\uBE44\uBC00\uBC88\uD638 \uBCF4\uAE30"},Zy={ariaLabel:"\uC120\uD0DD \uD0ED"},Xy={ariaLabel:"\uD0ED"},Jy={dragPrompt:"\uD30C\uC77C\uC744 \uC774\uACF3\uC5D0 \uB4DC\uB798\uADF8\uD558\uC5EC \uC5C5\uB85C\uB4DC",browseButton:"\uD30C\uC77C \uC120\uD0DD",removeAriaLabel:"{{name}} \uC81C\uAC70"},Qy={ariaLabel:"\uC0AC\uC6A9\uC790 \uC544\uBC14\uD0C0"},e2={relativeDay:{today:"\uC624\uB298",yesterday:"\uC5B4\uC81C",daysAgo:"{{n}}\uC77C \uC804"}},t2={weekly:{title:"\uC8FC\uAC04 \uD6C8\uB828 \uD604\uD669",daily:"\uC624\uB298\uC758 \uB4E3\uAE30"},homework:{title:"\uC219\uC81C \uC9C4\uD589\uD604\uD669",totalRate:"\uC804\uCCB4 \uC644\uB8CC\uC728",done:"\uC644\uB8CC"},today:{tooltipTotal:"\uC804\uCCB4",tooltipDone:"\uC644\uB8CC"},visit:{title:"\uBC29\uBB38 \uC5F0\uB3D9 \uAE30\uB85D"},detail:"\uC0C1\uC138\uBCF4\uAE30",detailFor:"{{name}} \uC0C1\uC138\uBCF4\uAE30"},n2={time:{justNow:"\uBC29\uAE08 \uC804",minutesAgo:"{{n}}\uBD84 \uC804",hoursAgo:"{{n}}\uC2DC\uAC04 \uC804",daysAgo:"{{n}}\uC77C \uC804",weeksAgo:"{{n}}\uC8FC \uC804",monthsAgo:"{{n}}\uAC1C\uC6D4 \uC804",yearsAgo:"{{n}}\uB144 \uC804"}},r2={steps:"\uC9C4\uD589 \uB2E8\uACC4 {{current}} / {{total}}"},a2={skippedOnly:"\uC61B \uAE30\uB85D {{n}}\uAC74\uC740 \uBB34\uC5C7\uC744 \uD47C \uAC83\uC778\uC9C0 \uC548 \uB0A8\uC544 \uC788\uC5B4 \uC148\uC5D0\uC11C \uBE90\uC2B5\uB2C8\uB2E4.",runs:"{{count}}\uD310"},o2={resetColumns:"\uCE78 \uB108\uBE44 \uCD08\uAE30\uD654",scrollRegion:"\uAC00\uB85C\uB85C \uAD74\uB9B4 \uC218 \uC788\uB294 \uD45C",rowActionHint:"\uC904\uC744 \uB204\uB974\uBA74 \uC790\uC138\uD788 \uBD05\uB2C8\uB2E4"},s2={viewWords:"\uB0B1\uB9D0"},l2={ariaLabel:"\uBC30\uB108",dotAriaLabel:"{{count}}\uAC1C \uC911 {{index}}\uBC88\uC9F8 \uBC30\uB108"},i2={chooseDate:"\uB0A0\uC9DC \uC120\uD0DD",selectYear:"\uC5F0 \uC120\uD0DD",selectMonth:"\uC6D4 \uC120\uD0DD"},u2={previewRegion:"\uBCF4\uACE0\uC11C \uBBF8\uB9AC\uBCF4\uAE30 \u2014 \uC88C\uC6B0\uB85C \uAD74\uB824 \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4"},c2={description:"\uC124\uBA85",textbox:"\uBCF8\uBB38",training:"\uD6C8\uB828 \uC548\uB0B4",menu:"\uBA54\uB274"},d2={place:{labial:"\uC591\uC21C\uC74C",alveolar:"\uCE58\uC870\uC74C",palatal:"\uACBD\uAD6C\uAC1C\uC74C",velar:"\uC5F0\uAD6C\uAC1C\uC74C",glottal:"\uC131\uBB38\uC74C"}},p2={clearSelection:"\uC120\uD0DD \uD574\uC81C"},h2={showResult:"{{type}} \uACB0\uACFC\uBCF4\uAE30"},m2={selected:"\uC120\uD0DD\uB428",remove:"\uC81C\uAC70",exclude:"\uC81C\uC678",nthSelected:"{{n}}\uBC88\uC9F8 \uC120\uD0DD"},f2={loading:"\uBD88\uB7EC\uC624\uB294 \uC911\u2026"},C2={state:{active:"\uC18C\uB9AC \uB098\uB294 \uC911",played:"\uB4E4\uC74C",correct:"\uC815\uB2F5",wrong:"\uC624\uB2F5"}},g2={ariaLabel:"\uC774\uB3D9 \uACBD\uB85C"},b2={list:"\uD3F4\uB354",open:"{{name}} \uD3F4\uB354 \uC5F4\uAE30, {{count}}\uAC1C",menu:"{{name}} \uD3F4\uB354 \uBA54\uB274",placeMenu:"{{name}} \uBA54\uB274",tree:"\uD3F4\uB354 \uAD6C\uC870 \uBCF4\uAE30",fold:"{{name}} \uC811\uAE30",unfold:"{{name}} \uD3BC\uCE58\uAE30",add:{title:"\uD3F4\uB354 \uCD94\uAC00",sub:"\uC0C8 \uD3F4\uB354 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.",placeholder:"\uD3F4\uB354 \uC774\uB984"}},y2={empty:"\uB4F1\uB85D\uB41C \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."},v2={main:"\uBA54\uC778 \uADF8\uB77C\uB514\uC5B8\uD2B8",soft:"\uC18C\uD504\uD2B8",sub:"\uC11C\uBE0C \uCEEC\uB7EC",deep:"\uB525 \uADF8\uB77C\uB514\uC5B8\uD2B8",softSub:"\uC18C\uD504\uD2B8 \uC11C\uBE0C",warm:"\uC6DC(\uAC15\uC870)",dark:"\uB2E4\uD06C",radial:"\uBC29\uC0AC\uD615 \uADF8\uB77C\uB514\uC5B8\uD2B8",diagonal:"\uB300\uAC01\uC120 \uD328\uD134",dots:"\uB3C4\uD2B8 \uD328\uD134",outline:"\uC544\uC6C3\uB77C\uC778",success:"\uC131\uACF5/\uC644\uB8CC",naver:"\uB124\uC774\uBC84 \uBE14\uB85C\uADF8 \uC548\uB0B4",instagram:"\uC778\uC2A4\uD0C0\uADF8\uB7A8 \uC548\uB0B4"},x2={common:yy,calendar:vy,passCard:xy,rating:_y,colorPicker:wy,dropdown:By,accordion:ky,header:Ay,nav:Ny,settings:Ey,usage:jy,account:Dy,training:Sy,customers:Ty,payment:My,coupons:$y,visits:Ly,trainingType:Ry,myWordTable:Py,keyWords:Fy,wordTable:Iy,wordSearch:Oy,wordPrint:zy,topic:Wy,device:Hy,manager:Vy,wordPairs:qy,footer:Uy,date:Gy,wordData:Ky,textField:Yy,segmentedControl:Zy,tabs:Xy,fileUpload:Jy,avatar:Qy,myHomework:e2,trainingStatus:t2,store:n2,progress:r2,trainingMiss:a2,table:o2,wordScore:s2,topBanner:l2,datePicker:i2,report:u2,tooltip:c2,phonemeProfile:d2,bulkBar:p2,debug:h2,badge:m2,loader:f2,soundCompass:C2,breadcrumb:g2,folder:b2,board:y2,promoBannerBg:v2},_2={filter:{positionAny:"Any",positionHead:"Start",positionMid:"Middle",positionTail:"End",difficulty:"Difficulty",grade:"Grade {{n}}",age:"Age {{n}}",agePlus:"Age {{n}}+",ageRange:"Age {{from}}\u2013{{to}}",difficultyInfoAge:"Age 3\u20137: the easiest words (grade 1), split by age.",difficultyInfoGrade:"Grades 2\u20134: harder words, not split by age.",difficultyInfoNone:"None: words with no difficulty assigned.",difficultyInfoBandAge:"{{ages}}: {{grade}} words, split by age.",difficultyInfoBandAgeOne:"{{ages}}: {{grade}} words.",difficultyInfoBandGrade:"{{grade}}: words for {{ages}}.",difficultyInfoBandAgeNamed:"{{ages}}: words split by age.",gradeNone:"None",syllables:"Syllables",syllable:"{{n}} Syll.",syllable5plus:"5+ Syllables",partOfSpeech:"Part of Speech",pos:{noun:"Noun/Numeral",verb:"Verb/Adjective",modifier:"Adverb/Determiner"},wordType:"Word Type",field:"Semantic Category",type:{native:"Native Korean",sino:"Sino-Korean",foreign:"Loanword",mixed:"Hybrid"},exclude:"Exclude",excludeNoImage:"No Image"}},w2={filter:{onlyHighUsage:"High-use words only"}},B2={wordSearch:_2,wordPairs:w2};const k2="0.446.0";var $i;const A2=[{code:"ko",label:"\uD55C\uAD6D\uC5B4"},{code:"en",label:"English"}],Ho="ko",N2="ihab_display_language",Vo={en:()=>Promise.resolve().then(function(){return UB})},ja=new Set(["ko"]),qo={},ea=e=>e.split("-")[0];function Li(e){const t=ea(e),r=Vo[t];return!r||ja.has(t)?Promise.resolve():qo[t]??(qo[t]=r().then(a=>{const s=a.default??a;Pt.addResourceBundle(t,"translation",s,!0,!1),ja.add(t)},a=>{throw qo[t]=void 0,a}))}function Ri(){if(typeof window>"u")return Ho;try{const e=localStorage.getItem(N2);if(e&&A2.some(t=>t.code===e))return e}catch{}return Ho}function Pi(e){try{document.documentElement.lang=e}catch{}}Pt.on("languageChanged",Pi),Pi(Ri());const Fi=($i=Pt).__ihabRawChangeLanguage??($i.__ihabRawChangeLanguage=Pt.changeLanguage);Pt.changeLanguage=Fi,Pt.use(Ne.initReactI18next).init({resources:{ko:{translation:x2},en:{translation:B2}},lng:Ri(),fallbackLng:Ho,interpolation:{escapeValue:!1},react:{useSuspense:!1}});const Uo=Fi.bind(Pt);let Go;Pt.changeLanguage=((e,t)=>{if(Go=e,!e||ja.has(ea(e))||!Vo[ea(e)])return Uo(e,t);const r=()=>Go===e?Uo(e,t):Promise.resolve(Pt.t);return Li(e).then(r,a=>(console.error(a),r()))});{const e=Pt.language;e&&!ja.has(ea(e))&&Vo[ea(e)]&&Li(e).then(()=>{Pt.language===e&&(Go??e)===e&&Uo(e)},t=>console.error(t))}const E2=99,j2=new Map;try{Pt.store?.on?.("added",()=>j2.clear())}catch{}Array.from({length:E2},(e,t)=>t+1);let Da=null,Ii=null,Oi=null;function D2(){const e=wi();if(e&&e.entries.length>0){const t=$b();if(Da&&Ii===e&&Oi===t)return Da;const r=new Set,a=[];for(const s of e.entries)!s.word||r.has(s.word)||(r.add(s.word),a.push({w:s.word,s:s.syllables,p:t?.[s.word]?[...t[s.word].cho??[],...t[s.word].jung??[],...t[s.word].jong??[]]:[],pron:s.pronunciation||s.word,grade:s.grade}));return Da=a,Ii=e,Oi=t,Da}return[]}new Proxy([],{get(e,t){const r=D2(),a=r[t];return typeof a=="function"?a.bind(r):a}});function S2(e){return e==null?!1:T2.test($o(e))}const T2=/Failed to fetch dynamically imported module|error loading dynamically imported module|Importing a module script failed|Unable to preload CSS/i;function M2(e){if(e.includes("\\")&&e.includes("("))return!0;if(!/url\s*\(/i.test(e))return!1;const t=e.replace(/url\(\s*(['"]?)#[^)'"]*\1\s*\)/gi,"");return/url\s*\(/i.test(t)}function $2(e){if(typeof window>"u")return"";const t=(r,a)=>{typeof a.attrValue=="string"&&M2(a.attrValue)&&(a.keepAttr=!1)};wr.addHook("uponSanitizeAttribute",t);try{return wr.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:["script","use","style"],FORBID_ATTR:["xlink:href","href"]})}finally{wr.removeHook("uponSanitizeAttribute",t)}}function L2(e){const[t,r]=o.useState(null),[a,s]=o.useState(null),[l,i]=o.useState(null),[u,c]=o.useState(null),[p,h]=o.useState(null);return o.useEffect(()=>{if(!e||typeof e!="string"||!e.endsWith(".svg")){r(null),s(null),i(null),c(null);return}const d=e.split("/").pop();let m=e;d&&(e.startsWith("/")?m=Ao(e):/^(Logo|Symbol)/i.test(d)?m=Ao(`logo/${d}`):(/^https?:\/\//i.test(e)||e.startsWith("data:"),m=e)),i(null),c(null),r(e),s(m)},[e]),o.useEffect(()=>{if(!a)return;let d=!1;async function m(){try{let C=await fetch(a);C.ok||(C=await fetch(a));const x=C.headers.get("content-type")||"";if(d)return;if(x.includes("svg")){i("mask");return}if(x.startsWith("image/")){i("img");return}const g=await fetch(a);if(!g.ok)throw new Error("not ok");const y=await g.text();if(d)return;if(/^\s*<svg[\s>]/i.test(y)){const v=$2(y);if(!v){i("none");return}c(v),i("inline");return}i("none")}catch{d||i("none")}}return m(),()=>{d=!0}},[a]),o.useEffect(()=>{let d=!1,m=null;return l==="mask"&&a&&fetch(a).then(C=>{if(!C.ok)throw new Error("fetch failed");return C.blob()}).then(C=>{d||(m=URL.createObjectURL(C),h(m))}).catch(()=>{d||i("img")}),()=>{d=!0,m&&URL.revokeObjectURL(m),h(null)}},[l,a]),t===e?{iconToUse:a,mode:l,svgText:u,blobUrl:p}:{iconToUse:null,mode:null,svgText:null,blobUrl:null}}function lt(e){const{icon:t,label:r,className:a,imgClassName:s,maskClassName:l,svgClassName:i,wrapperStyle:u,size:c}=e||{},p=a??"iconRenderer-icon",h=s??"iconRenderer-icon-image",d=l??"iconRenderer-icon-mask",m=i??"iconRenderer-icon-svg",C=typeof t=="string"?t:null,x=mg(C),{iconToUse:g,mode:y,svgText:v,blobUrl:_}=L2(C),b=(k,E={})=>n.jsx("span",{className:p,style:u,...E,children:k}),B=typeof c=="number"?{width:c,height:c,objectFit:"contain"}:null,N=(k,E={})=>n.jsx("img",{src:k,alt:typeof r=="string"?r:typeof r=="number"?String(r):"",className:h,...E,style:B?{...E.style,...B}:E.style});if(!t)return null;if(typeof t!="string")return b(t);if(t==="none")return b(n.jsx("span",{className:m,dangerouslySetInnerHTML:{__html:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" aria-hidden="true"></svg>'}}),{"aria-hidden":"true"});if(x)try{return b(o.createElement(x,{className:m,size:typeof c=="number"?c:20}),{"aria-hidden":"true"})}catch{}if(g&&g.endsWith(".svg")){if(y==="mask"){const k={"--icon-url":_?`url(${_})`:`url(${g})`,...typeof c=="number"?{"--icon-size":`${c}px`}:null};return b(n.jsx("span",{className:d,style:k}),{"aria-hidden":"true"})}return y==="img"?b(N(g,{onError:k=>{k.currentTarget.onerror=null,k.currentTarget.style.display="none"}}),{"aria-hidden":"true"}):y==="inline"?b(n.jsx("span",{className:m,dangerouslySetInnerHTML:v?{__html:v}:void 0}),{"aria-hidden":"true"}):b(null,{"aria-hidden":"true"})}if(t.startsWith("/")||t.includes("/assets/")||t.match(/\.(png|jpg|jpeg|webp|gif)$/i))return N(Ao(t),{style:u,onError:k=>{k.currentTarget.onerror=null,k.currentTarget.style.display="none"}});const f=typeof c=="number"?c:20,w=`<svg width="${f}" height="${f}" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><rect x="3" y="3" width="18" height="18" rx="2" ry="2" style="fill:none;stroke:currentColor;stroke-width:2"/></svg>`;return b(n.jsx("span",{className:m,dangerouslySetInnerHTML:{__html:w}}),{"aria-hidden":"true"})}function zi(e){const[t,r]=o.useState(!1),a=o.useRef(!1),s=o.useRef(!0);o.useEffect(()=>(s.current=!0,()=>{s.current=!1}),[]);const l=o.useCallback(()=>{if(!e||a.current)return;const i=e();if(i&&typeof i.then=="function"){a.current=!0,r(!0);const u=()=>{a.current=!1,s.current&&r(!1)};i.then(u,u)}},[e]);return{pending:t,press:l}}function R2({icon:e,title:t,message:r,action:a,className:s}){const{pending:l,press:i}=zi(a?.onClick);return n.jsxs("div",{className:xe("empty-state",s),children:[e&&n.jsx(lt,{icon:e,size:48,className:"empty-state__icon"}),t&&n.jsx("p",{className:"empty-state__title h4",children:t}),r&&n.jsx("p",{className:"empty-state__message body-3",children:r}),a&&n.jsxs("button",{type:"button",className:"empty-state__action button button40 button40--bar button--variant-main button--align-center button--shape-rounded",onClick:i,disabled:l,"aria-busy":l||void 0,children:[a.icon&&n.jsx(lt,{icon:a.icon,className:"button__icon"}),n.jsx("span",{className:"button__label button-1",children:a.label})]})]})}function P2({message:e,hint:t,icon:r="triangle-alert",onRetry:a,retryLabel:s,className:l}){const{t:i}=Ne.useTranslation(),{pending:u,press:c}=zi(a);return n.jsxs("div",{className:xe("empty-state","error-state",l),role:"alert",children:[n.jsx(lt,{icon:r,size:48,className:"empty-state__icon error-state__icon"}),n.jsx("p",{className:"empty-state__message body-3",children:e??i("common.errorState.message",{defaultValue:"\uBD88\uB7EC\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."})}),t&&n.jsx("p",{className:"error-state__hint caption-1",children:t}),a&&n.jsxs("button",{type:"button",className:"empty-state__action button button40 button40--bar button--variant-main button--align-center button--shape-rounded",onClick:c,disabled:u,"aria-busy":u||void 0,children:[n.jsx(lt,{icon:"rotate-cw",className:"button__icon"}),n.jsx("span",{className:"button__label button-1",children:s??i("common.errorState.retry",{defaultValue:"\uB2E4\uC2DC \uC2DC\uB3C4"})})]})]})}function F2({icon:e,title:t,description:r,cta:a,tone:s="main",disabled:l=!1,onClick:i,className:u=""}){const c=o.useId(),p=`${c}-title`,h=`${c}-desc`,d=`${c}-cta`,m=()=>{l||i?.()};return n.jsx("section",{role:"button",tabIndex:l?-1:0,"aria-disabled":l||void 0,"aria-labelledby":p,"aria-describedby":`${h} ${d}`,onClick:m,onKeyDown:C=>{(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),m())},className:xe("action-card",`action-card--${s}`,l&&"action-card--disabled",u),children:n.jsxs("div",{className:"action-card__body",children:[n.jsx("span",{"aria-hidden":!0,className:"action-card__chip",children:n.jsx(lt,{icon:e,size:34})}),n.jsxs("div",{className:"action-card__text",children:[n.jsx("h2",{id:p,className:"action-card__title",children:t}),n.jsx("p",{id:h,className:"action-card__desc",children:r})]}),n.jsxs("div",{className:"action-card__cta",children:[n.jsx("span",{id:d,children:a}),n.jsx("span",{"aria-hidden":!0,className:"action-card__arrow",children:n.jsx(lt,{icon:"arrow-right",size:18})})]})]})})}function I2({as:e="div",className:t="",children:r,storage:a,...s}){a&&tb({resolveUrl:a.resolveUrl,download:a.download??(()=>Promise.reject(new Error("[ihabdevteam-core] CoreScope: download resolver\uAC00 \uC124\uC815\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4."))),exists:a.exists,resolvePath:a.resolvePath,noiseBaseUrl:a.noiseBaseUrl,noiseFileGain:a.noiseFileGain});const l=xe("ihabdevteam-core-scope",t);return n.jsx(e,{className:l,...s,children:r})}function O2(e){if(e.closest('[aria-hidden="true"], [hidden], [inert]'))return!1;for(let t=e;t;t=t.parentElement){const r=window.getComputedStyle(t);if(r.display==="none"||r.visibility==="hidden"||r.visibility==="collapse")return!1}return!0}function Sa(e,t=!0){o.useEffect(()=>{if(!t)return;const r=e.current;if(!r)return;const a=s=>{if(s.key!=="Tab")return;const l=Array.from(r.querySelectorAll(jn)).filter(O2);if(!l.length){s.preventDefault();return}const i=l[0],u=l[l.length-1],c=document.activeElement,p=c===r;s.shiftKey&&(c===i||p)?(s.preventDefault(),u.focus()):!s.shiftKey&&c===u&&(s.preventDefault(),i.focus())};return r.addEventListener("keydown",a),()=>r.removeEventListener("keydown",a)},[e,t])}const jn='a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])',Ko=new WeakMap;function Yo(e,t){e&&Ko.set(e,t)}function Zo(e){let t=e;for(let r=0;t&&!t.isConnected&&r<10;r++){let a=t;for(;a&&!Ko.has(a);)a=a.parentElement;if(!a)return t;t=Ko.get(a)??null}return t}function Wi(e){return!(!e||!e.isConnected||e===document.body||typeof e.focus!="function"||e.disabled||e instanceof HTMLInputElement&&e.type==="hidden"||e.closest('[inert],[aria-hidden="true"],[hidden]'))}function Ta(e,t,r){const a=e?.isConnected?e:r?.isConnected?r:null;if(Wi(t)&&!(e&&e.contains(t)))return t.focus(),t;if(!a)return null;const s=Array.from(document.querySelectorAll(jn)).filter(c=>!(e&&e.contains(c))&&Wi(c));let l=null,i=null;for(const c of s)a.compareDocumentPosition(c)&Node.DOCUMENT_POSITION_PRECEDING?l=c:i||(i=c);const u=l??i;return u?.focus(),u}function z2({title:e="",lines:t=[],notices:r=null,children:a,variant:s="default",dismissible:l=!1,className:i=""}){const{t:u}=Ne.useTranslation(),[c,p]=o.useState(!1),h=o.useRef(null),d=o.useCallback(()=>{const g=h.current;g&&g.contains(document.activeElement)&&Ta(g),p(!0)},[]);if(c)return null;const m=`notice-box notice-box--${s} body-2 ${i}`.trim(),C=l&&n.jsx("button",{type:"button",className:"notice-box__dismiss",onClick:d,"aria-label":u("common.close","\uB2EB\uAE30"),children:"\xD7"});if(r&&Array.isArray(r)&&r.length)return n.jsxs("div",{className:m,role:"note",children:[r.map((g,y)=>n.jsxs("div",{className:"notice-box__inner",children:[g.title?n.jsx("span",{className:"notice-box__title body-3",children:g.title}):null,n.jsx("div",{className:"notice-box__body",children:g.lines&&g.lines.length?n.jsx("div",{children:g.lines.map((v,_)=>n.jsx("span",{className:"notice-box__line body-3",children:v},_))}):g.children??null})]},y)),C]});const x=e||t.length?n.jsxs("div",{className:"notice-box__inner",children:[e?n.jsx("span",{className:"notice-box__title body-1",children:e}):null,n.jsx("div",{className:"notice-box__body",children:t.length?n.jsx("ul",{children:t.map((g,y)=>n.jsx("li",{className:"notice-box__line",children:g},y))}):a})]}):n.jsx("div",{className:"notice-box__inner",children:a});return n.jsxs("div",{ref:h,className:m,role:"note",children:[x,C]})}const Xo=o.createContext(void 0);function wn(){return o.useContext(Xo)}const W2={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0};function Nr(e){const{t}=Ne.useTranslation(),{variant:r="spinner",size:a=24,progress:s=null,label:l}=e||{},i=l||t("loader.loading","Loading");if(r==="bar"){const c=s==null||!Number.isFinite(Number(s)),p=c?0:Math.max(0,Math.min(100,Number(s)));return n.jsx("div",{className:`loader-bar${c?" loader-bar--indeterminate":""}`,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":c?void 0:p,"aria-label":i,children:n.jsx("div",{className:"loader-bar__inner",style:c?void 0:{width:`${p}%`}})})}const u=typeof a=="number"?`${a}px`:a;return n.jsxs("div",{className:"loader-spinner",style:{width:u,height:u},role:"status","aria-label":i,children:[n.jsx("span",{style:W2,children:i}),n.jsxs("svg",{className:"loader-spinner__svg",viewBox:"0 0 50 50",width:a,height:a,children:[n.jsx("circle",{className:"loader-spinner__bg",cx:"25",cy:"25",r:"20",fill:"none",strokeWidth:"4"}),n.jsx("circle",{className:"loader-spinner__fg",cx:"25",cy:"25",r:"20",fill:"none",strokeWidth:"4",strokeLinecap:"round"})]})]})}const Er=[];let Ma=!1;function Hi(e){if(e.key!=="Escape"||e.defaultPrevented||e.isComposing||e.keyCode===229)return;const t=Er[Er.length-1];t&&(e.stopPropagation(),t())}function ir(e){return Er.push(e),!Ma&&typeof document<"u"&&(document.addEventListener("keydown",Hi),Ma=!0),()=>{const t=Er.lastIndexOf(e);t>=0&&Er.splice(t,1),Er.length===0&&Ma&&typeof document<"u"&&(document.removeEventListener("keydown",Hi),Ma=!1)}}const Vi=o.createContext(null);function H2(e){return/max-width:\s*7[0-9][0-9]px/.test(e)}const qi=e=>typeof window>"u"||!window.matchMedia?!1:window.matchMedia(e).matches;function V2(e){const t=o.useCallback(r=>{if(typeof window>"u"||!window.matchMedia)return()=>{};const a=window.matchMedia(e);return a.addEventListener?a.addEventListener("change",r):a.addListener&&a.addListener(r),window.addEventListener("resize",r),window.addEventListener("orientationchange",r),()=>{a.removeEventListener?a.removeEventListener("change",r):a.removeListener&&a.removeListener(r),window.removeEventListener("resize",r),window.removeEventListener("orientationchange",r)}},[e]);return bl.useSyncExternalStore(t,()=>qi(e),()=>!1)}function q2(e){const[t,r]=o.useState(qi(e));return o.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const a=window.matchMedia(e),s=i=>r(i.matches),l=a;return l.addEventListener?l.addEventListener("change",s):l.addListener&&l.addListener(s),r(a.matches),()=>{l.removeEventListener?l.removeEventListener("change",s):l.removeListener&&l.removeListener(s)}},[e]),t}const U2=typeof bl.useSyncExternalStore=="function"?V2:q2;function Bn(e){const t=o.useContext(Vi),r=U2(e);return t&&typeof t.mobile=="boolean"&&H2(e)?t.mobile:r}const Ui="(prefers-reduced-motion: reduce)";function G2(){try{return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia(Ui).matches}catch{return!1}}function $a(){return Bn(Ui)}const Gi={"menu-tooltip":"tooltip-menu","description-tooltip":"tooltip-description","text-box-tooltip":"tooltip-textbox","training-tooltip":"tooltip-training","word-image-tooltip":"tooltip-word-image","info-tooltip":"tooltip-info","noise-settings-tooltip":"noise-settings",tooltip__header:"tooltip-content__header",tooltip__content:"tooltip-content",tooltip__backdrop:"tooltip-backdrop",tooltip__portal:"tooltip-portal","word-table__section":"word-table-block","word-table__content":"word-table-block__content","word-table__card":"word-table-block__card","word-table__card-handle":"word-table-block__card-handle","word-table__card-close":"word-table-block__card-close","word-table__card-actions":"word-table-block__card-actions","word-table__edit-cell":"word-table-block__edit-cell","word-table__pair-divider":"word-table-block__pair-divider","chart-section__legend-dot":"manager-bar-chart-legend-dot","chart-section__legend-item":"manager-bar-chart-legend-item","chart-section__legend":"manager-bar-chart-legend","chart-section__controls":"manager-section-controls","chart-section__sub-row":"barchart-sub-row","chart-section__total":"barchart-total","chart-section":"manager-section","bar-chart__stack-segment":"manager-bar-chart-stack-segment","bar-chart__detail-btn":"manager-bar-chart-detail-btn","bar-chart__gridline":"manager-bar-chart-gridline","bar-chart__loading":"manager-bar-chart-loading","bar-chart__scroll":"manager-bar-chart-scroll","bar-chart__stack":"manager-bar-chart-stack","bar-chart__x-axis":"manager-bar-chart-x-axis","bar-chart__inner":"manager-bar-chart-inner","bar-chart__area":"manager-bar-chart-area","bar-chart__plot":"manager-bar-chart-plot","bar-chart__wrap":"manager-bar-chart-wrap","bar-chart__slot":"manager-bar-chart-slot","bar-chart__col":"manager-bar-chart-col","bar-chart__bar":"manager-bar-chart-bar"};function K2(e,t){const r=Object.keys(e).sort((a,s)=>s.length-a.length);for(const a of r){if(!t.startsWith(a))continue;const s=t.slice(a.length);if(!(s!==""&&!s.startsWith("__")&&!s.startsWith("--")))return e[a]+s}return null}function Y2(e){return K2(Gi,e)}function ce(e){if(!e||Object.keys(Gi).length===0)return e;const t=[];for(const r of e.split(/\s+/)){if(!r)continue;const a=Y2(r);a&&t.push(a)}return t.length?`${e} ${t.join(" ")}`:e}function sn(e){const{anchorRect:t,anchorEl:r,offset:a=20,edgeMargin:s=20,prefer:l="top",onClose:i,closeOnOutsideClick:u=!0,className:c="",role:p="dialog",ariaLabel:h="",children:d,backdrop:m=!1,isMobilePopup:C=!1,useBorder:x=!0,header:g,focusOnOpen:y}=e||{},v=o.useRef(null),[_,b]=o.useState({position:"fixed",left:0,top:-9999}),[B,N]=o.useState(!1),[f,w]=o.useState("bottom"),[k,E]=o.useState(!1),[A,D]=o.useState(!1),j=!t&&!r,$=o.useRef(null),H=o.useCallback((G=!1,X=!1)=>{if(A&&C)return;const K=r?r.getBoundingClientRect():t,L=X&&$.current?$.current:K;if(!L||!v.current)return;const R=v.current,{offsetWidth:S,offsetHeight:V}=R,ae=window.innerWidth,ne=window.innerHeight,re=ae-L.right,ue=L.left,Be=L.top,le=ne-L.bottom;let J=0,O=0,W="top";const q=Be>=V+a,oe=le>=V+a,ee=l==="bottom"?oe?"bottom":q?"top":null:q?"top":oe?"bottom":null;if(ee==="top")W="top",O=L.top-a-V,J=L.left+L.width/2-S/2;else if(ee==="bottom")W="bottom",O=L.bottom+a,J=L.left+L.width/2-S/2;else if(re>=S+a)W="right",J=L.right+a,O=L.top+L.height/2-V/2;else if(ue>=S+a)W="left",J=L.left-a-S,O=L.top+L.height/2-V/2;else{const we=Math.max(Be,le,re,ue);we===Be?(W="top",O=L.top-a-V,J=L.left+L.width/2-S/2):we===le?(W="bottom",O=L.bottom+a,J=L.left+L.width/2-S/2):we===re?(W="right",J=L.right+a,O=L.top+L.height/2-V/2):(W="left",J=L.left-a-S,O=L.top+L.height/2-V/2)}const be=Number.isFinite(Number(s))?Number(s):8;J=Math.min(Math.max(J,be),ae-S-be),O=Math.min(Math.max(O,be),ne-V-be);const je=Math.round(J),De=Math.round(O);G&&v.current?(v.current.style.left=`${je}px`,v.current.style.top=`${De}px`,v.current.dataset.placement=W):(w(W||f),b({position:"fixed",left:je,top:De}),E(!0))},[A,C,r,t,a,s,f,l]);o.useEffect(()=>()=>{$.current=null},[r,t]),o.useLayoutEffect(()=>{if(j)return;if(A&&C){b({position:"fixed",left:"50%",top:"50%",transform:"translate(-50%, -50%)",width:"calc(100% - 40px)",maxWidth:"calc(100% - 40px)"}),E(!0);return}$.current===null&&($.current=r?r.getBoundingClientRect():t??null),H(!1,!0);const G=requestAnimationFrame(()=>H(!1,!0));return()=>cancelAnimationFrame(G)},[t,r,a,d,s,j,A,C,H]),o.useEffect(()=>{if(j||A&&C||!v.current||typeof ResizeObserver>"u")return;const G=new ResizeObserver(()=>{t&&H()});return G.observe(v.current),()=>G.disconnect()},[t,d,s,j,A,C,H]),o.useEffect(()=>{if(j||A&&C)return;let G=null;const X=()=>{if(r&&($.current=r.getBoundingClientRect()),typeof requestAnimationFrame>"u"){H(!0);return}G===null&&(G=requestAnimationFrame(()=>{G=null,H(!0)}))},K=L=>{if(!r&&i){const R=L.target;if(R&&v.current&&v.current.contains(R))return;try{if(R&&R.closest&&R.closest("[data-tooltip-ignore]"))return}catch{}z.current(!0);return}X()};return window.addEventListener("resize",X),document.addEventListener("scroll",K,{passive:!0,capture:!0}),()=>{G!==null&&cancelAnimationFrame(G),window.removeEventListener("resize",X),document.removeEventListener("scroll",K,{capture:!0})}},[t,r,i,a,d,s,j,A,C,H]),o.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const G=window.matchMedia("(max-width: 768px)"),X=()=>D(!!G.matches);X();try{G.addEventListener?G.addEventListener("change",X):G.addListener(X)}catch{try{G.addListener(X)}catch{}}return()=>{try{G.removeEventListener?G.removeEventListener("change",X):G.removeListener(X)}catch{}}},[]);const F=o.useRef(!1),U=o.useRef(null),T=$a(),I=o.useCallback((G=!1)=>{if(i&&!(B||F.current)){if(F.current=!0,G){N(!0);try{i&&i()}catch{F.current=!1,N(!1)}return}N(!0),U.current=setTimeout(()=>{U.current=null;try{i&&i()}catch{F.current=!1,N(!1)}},T?0:200)}},[B,i,N,T]);o.useEffect(()=>()=>{U.current&&clearTimeout(U.current)},[]),o.useEffect(()=>{if(j)return;const G=L=>{const R=v.current;if(!R)return;const S=L.target;if(S&&!R.contains(S)){try{if(S.closest&&S.closest("[data-tooltip-ignore]"))return}catch{}u&&I(!0)}},X=L=>{const R=v.current;if(!R)return;const S=L.target;if(S&&!R.contains(S)){try{if(S.closest&&S.closest("[data-tooltip-ignore]"))return}catch{}u&&I(!0)}},K=L=>{if(L.key==="Tab"){const R=v.current;if(!R)return;const S=R.querySelectorAll(jn);if(!S||S.length===0)return;const V=S[0],ae=S[S.length-1],ne=document.activeElement;L.shiftKey?ne===V&&(L.preventDefault(),ae.focus()):ne===ae&&(L.preventDefault(),V.focus())}};return document.addEventListener("pointerdown",G,!0),document.addEventListener("click",X,!0),document.addEventListener("keydown",K),()=>{document.removeEventListener("pointerdown",G,!0),document.removeEventListener("click",X,!0),document.removeEventListener("keydown",K)}},[i,u,I,j]);const z=o.useRef(I);o.useEffect(()=>{z.current=I});const ie=!!i;o.useEffect(()=>{if(!(j||!ie))return ir(()=>z.current())},[j,ie]),o.useEffect(()=>{const G=()=>{I(!0)};return typeof document<"u"&&document.addEventListener("speechear-close-tooltips",G),()=>{typeof document<"u"&&document.removeEventListener("speechear-close-tooltips",G)}},[I]);const te=o.useRef(null);o.useEffect(()=>{if(j||y===!1||!k)return;const G=v.current;if(!G)return;const X=G.querySelector(jn);if(X)return te.current=document.activeElement,X.focus({preventScroll:!0}),()=>{const K=te.current;te.current=null,K&&document.contains(K)&&K.focus({preventScroll:!0})}},[j,y,k]),o.useEffect(()=>{p==="dialog"&&!h&&Tt("tooltip-no-name",'[ihab/Tooltip] \uC774\uB984 \uC5C6\uB294 role="dialog" \uC785\uB2C8\uB2E4 \u2014 ariaLabel \uC744 \uC8FC\uC138\uC694. \uB0AD\uB3C5\uAE30\uAC00 "\uB300\uD654\uC0C1\uC790" \uB77C\uACE0\uB9CC \uC77D\uC2B5\uB2C8\uB2E4.')},[p,h]);const P=n.jsxs("div",{ref:v,className:ce(`tooltip__content ${j?"tooltip__content--inline":""} ${x?"tooltip__content--bordered":""} ${B?"is-closing":""} ${c} ${A&&C?"is-mobile":""}`),role:p,"aria-label":h||void 0,style:j?{}:{..._,visibility:k?"visible":"hidden"},tabIndex:-1,"data-placement":f,"data-left":j?"":_.left,"data-top":j?"":_.top,"data-anchor-left":t?Math.round(t.left):"","data-anchor-top":t?Math.round(t.top):"","data-anchor-width":t?Math.round(t.width):"","data-anchor-height":t?Math.round(t.height):"",children:[g!=null&&n.jsx("div",{className:ce("tooltip__header h5"),children:g}),d]});if(j||typeof document>"u")return P;if(m||A&&C){const G=n.jsxs("div",{className:ce("tooltip__portal"),children:[n.jsx("div",{className:ce("tooltip__backdrop"),onClick:()=>{u&&I(!0)}}),P]});return bn.createPortal(G,document.body)}return bn.createPortal(P,document.body)}function zn(e){const{anchorRect:t,text:r,offset:a=8,onClose:s,className:l="",ariaLabel:i}=e||{};return r?n.jsx(sn,{anchorRect:t,offset:a,onClose:s,closeOnOutsideClick:!1,className:ce(`info-tooltip ${l}`),ariaLabel:i||r,children:n.jsx("div",{className:ce("info-tooltip__content body-3"),children:r})}):null}function er(e){const{t}=Ne.useTranslation(),{anchorRect:r,title:a,items:s,activeIndex:l=-1,showIndex:i=!0,onClose:u,offset:c=12,closeOnOutsideClick:p=!0,columns:h}=e||{},d=(Array.isArray(s)?s:s?[s]:[]).map(m=>typeof m=="string"?{text:m}:m);return!d.length&&!a?null:n.jsx(sn,{anchorRect:r,offset:c,onClose:u,closeOnOutsideClick:p,useBorder:!1,className:ce("description-tooltip"),ariaLabel:a||t("tooltip.description","\uC124\uBA85"),children:n.jsxs("div",{className:ce("description-tooltip__box"),children:[a&&n.jsx("span",{className:ce("description-tooltip__title body-2"),children:a}),n.jsx("ol",{className:ce(`description-tooltip__items${h&&h>1?" description-tooltip__items--columns":""}`),style:h&&h>1?{columnCount:h}:void 0,children:d.map((m,C)=>n.jsxs("li",{className:ce(`description-tooltip__item body-3${C===l?" description-tooltip__item--active":""}`),children:[i&&d.length>1&&n.jsxs("span",{className:ce("description-tooltip__index button-1"),children:[C+1,"."]}),m.color&&n.jsx("span",{className:ce("description-tooltip__dot"),style:{background:m.color},"aria-hidden":"true"}),n.jsx("span",{children:m.text})]},C))})]})})}function ta(e){const t=o.useRef(e);return o.useEffect(()=>{t.current=e}),t}let Jo=0,Ki=!1;function Yi(){Ki||typeof document>"u"||(Ki=!0,document.addEventListener("pointerdown",e=>{e.pointerType==="touch"&&(Jo=Date.now())},!0),document.addEventListener("touchstart",()=>{Jo=Date.now()},{capture:!0,passive:!0}))}Yi();function tr(e){return!!e&&e.pointerType==="touch"}function ur(e=1e3){return Yi(),Date.now()-Jo<e}function La(e,t,r,{enabled:a=!0,fallbackOnParent:s=!1}={}){const l=ta(e),i=ta(t),u=o.useRef(null),c=o.useRef(0);o.useEffect(()=>{if(!a||typeof document>"u")return;const h=d=>{const m=d,C=d.target,x=r.current,g=!!(C&&x&&x.contains(C));if(m.pointerType!=="touch"){g&&(u.current=null);return}if(g){u.current=l.current;return}u.current=null,l.current&&!(C&&C.closest?.(".tooltip__content"))&&i.current(!1,x)};return document.addEventListener("pointerdown",h,!0),()=>document.removeEventListener("pointerdown",h,!0)},[a,r,l,i]);const p=o.useCallback(h=>{const d=u.current;return d===null?!1:(u.current=null,c.current=Date.now(),i.current(!d,h??r.current),!0)},[r,i]);return o.useEffect(()=>{if(!a||!s)return;const h=r.current,d=h?.parentElement;if(!h||!d)return;let m=null;const C=y=>{const v=y.changedTouches?.[0];if(!v)return!1;const _=h.getBoundingClientRect();return v.clientX>=_.left&&v.clientX<=_.right&&v.clientY>=_.top&&v.clientY<=_.bottom},x=y=>{m=C(y)?l.current:null},g=y=>{const v=m;m=null,!(v===null||Date.now()-c.current<700||!C(y))&&(u.current=null,c.current=Date.now(),i.current(!v,h))};return d.addEventListener("touchstart",x,{passive:!0}),d.addEventListener("touchend",g),()=>{d.removeEventListener("touchstart",x),d.removeEventListener("touchend",g)}},[a,s,r,l,i]),{touchPress:p}}function Z2(e,t){const{size:r,type:a,htmlType:s,href:l,target:i,rel:u,icon:c,rightIcon:p,label:h,count:d,subLabel:m,children:C,ariaLabel:x,variant:g="default",align:y="center",nowrap:v=!1,ellipsis:_=!1,selected:b,toggleable:B=!1,ariaExpanded:N,ariaControls:f,disabled:w=!1,loading:k=!1,useLabel:E=!0,useBorder:A=!0,useBG:D=!0,useDisabledCovered:j=!1,useDisabledInvisible:$=!1,useDisabledFilled:H=!1,width:F,minWidth:U,onClick:T,onDisabledClick:I,showTooltipInfo:z=!1,tooltipInfoText:ie=null,tooltipDescription:te=null,tooltipOnly:P=!1,iconSize:G="medium",iconColor:X,shape:K="rounded",color:L,className:R,...S}=e,V=wn(),ae=r??V??48,ne=typeof ae=="string"&&isNaN(Number(ae))?ae.toLowerCase():String(Number(ae)||48),re=ne.match(/^\d+$/)?`button${ne}`:`button-${ne}`,ue=Number(ae),Be=!isNaN(ue)&&ue<40?"button-2":"button-1",le=h??C,J=w||!!S.disabled,O=J?j?"disabled-covered":$?"disabled-invisibled":H?"disabled-filled":"disabled":g,W=O?`button--variant-${O}`:"",q=y?`button--align-${y}`:"",oe=v?"button--nowrap":"",ee=_?"button--ellipsis":"",be=K?`button--shape-${K}`:"",je=typeof X=="string"&&X.startsWith("--")?`var(${X})`:X,De={...F?{width:typeof F=="number"?`${F}px`:F}:{},...U?{minWidth:typeof U=="number"?`${U}px`:U}:{},...A?{}:{"--button-border":J?"0":"1px solid transparent"},...je?{"--button-icon-color":je}:{},...L?{"--color-main":L}:{}},we=E===!1?"":le,ze=Array.isArray(we)?we.length>0:!!we,ye=!!p,_e=a??(ze||c||ye?"bar":"dot"),ve=`${re}--${_e}`,Ee=o.useRef(null);o.useEffect(()=>{!Zn||s!==void 0||Ee.current?.closest("form")&&Tt(`button-in-form:${typeof le=="string"?le:""}`,'[ihab/Button] <form> \uC548\uC778\uB370 htmlType \uC774 \uC5C6\uC2B5\uB2C8\uB2E4 \u2014 \uC774 \uB2E8\uCD94\uB294 type="button" \uC774\uB77C \uD3FC\uC744 \uBCF4\uB0B4\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uBCF4\uB0B4\uB294 \uB2E8\uCD94\uBA74 htmlType="submit" \uC744 \uC8FC\uC138\uC694. \uD3FC\uC5D0 \uBCF4\uB0B4\uB294 \uB2E8\uCD94\uAC00 \uD558\uB098\uB3C4 \uC5C6\uC73C\uBA74 **Enter \uB85C\uB3C4 \uC548 \uBCF4\uB0B4\uC9D1\uB2C8\uB2E4**(\uCE78\uC774 \uB458 \uC774\uC0C1\uC77C \uB54C).'+(typeof le=="string"&&le?` \uB2E8\uCD94: ${le}`:""))},[s,le]);const Oe=o.useRef(t);Oe.current=t;const ot=o.useCallback(Ke=>{Ee.current=Ke;const xt=Oe.current;typeof xt=="function"?xt(Ke):xt&&(xt.current=Ke)},[]),it=o.useRef(J),[Fe,Ue]=o.useState(!!b),[nt,Te]=o.useState(!1),[Xe,rt]=o.useState(null),ut=o.useCallback(()=>Te(!1),[]),[gt,_t]=o.useState(!1),pt=o.useId();o.useEffect(()=>{typeof b=="boolean"&&Ue(b)},[b]),o.useEffect(()=>{if(it.current&&!J&&Ee.current){const Ke=Ee.current;let xt=!1;try{xt=Ke.matches(":focus:not(:focus-visible)")}catch{xt=!1}xt&&Ke.blur(),Ke.style.pointerEvents="none";const jt=requestAnimationFrame(()=>{requestAnimationFrame(()=>{Ee.current&&(Ee.current.style.pointerEvents="")})});return()=>cancelAnimationFrame(jt)}it.current=J},[J]);const Yt=typeof b=="boolean"?!!b:Fe,kt=typeof N=="boolean"?void 0:B||typeof b=="boolean"?Yt?"true":"false":S["aria-pressed"],ct=xe("button",re,ve,W,q,oe,ee,be,Yt?"is-selected":null,D?null:"button--no-bg",P?"button--tooltip-only":null,R),Ae=`button__icon button__icon--${G}`,st=Array.isArray(m)?m:m!==void 0?[m]:[],ft=()=>{if(Array.isArray(we))return we.map((xt,jt)=>{const Q=st[jt];return n.jsxs("span",{className:`button__label-text${Q!==void 0?" button__label-text--has-sub":""}`,children:[xt,Q!==void 0&&n.jsx("span",{className:"button__sub-label-text caption-1",children:Q})]},jt)});const Ke=m!==void 0;return n.jsxs("span",{className:`button__label-text${Ke?" button__label-text--has-sub":""}`,children:[we,d!=null&&n.jsx("span",{className:"button__count",children:d}),Ke&&n.jsx("span",{className:"button__sub-label-text caption-1",children:m})]})},Ct=Ke=>{typeof b!="boolean"&&!B&&Ue(!1),Ke.currentTarget.blur()},Nt=Ke=>{J||(typeof S.onMouseLeave=="function"&&S.onMouseLeave(Ke),Ct(Ke))},Ft=Ke=>{if(P&&Et&&It.touchPress(Ke.currentTarget),J){Et&&It.touchPress(Ke.currentTarget),Ke.preventDefault(),I?.(Ke);return}typeof b!="boolean"&&B&&Ue(xt=>!xt),T?.(Ke)},yt=o.useCallback(()=>{(z||te)&&(Te(!0),rt(Ee.current?.getBoundingClientRect()??null))},[z,te]),vt=o.useCallback(()=>{(z||te)&&(Te(!1),rt(null))},[z,te]),Et=!!(z||te),It=La(nt,Ke=>{Ke?yt():vt()},Ee,{enabled:Et&&(J||P),fallbackOnParent:Et&&J}),Je={...S};delete Je.disabled,delete Je.className,delete Je.faded,delete Je.useFaded,delete Je.loading,delete Je.onMouseLeave,delete Je.onPointerEnter,delete Je.onPointerLeave,delete Je.onPointerUp,delete Je.onFocus,delete Je.onBlur,J&&(Object.keys(Je).forEach(Ke=>{/^on[A-Z]/.test(Ke)&&typeof Je[Ke]=="function"&&delete Je[Ke]}),Je["aria-disabled"]="true"),k&&(Je["aria-busy"]="true");const At=(typeof z=="string"?z:null)??(typeof ie=="string"?ie:null)??(typeof x=="string"?x:null)??(typeof le=="string"?le:null)??void 0,Qe=typeof x=="string"?x:typeof le=="string"?le:At,he=te?[te.title,...te.items??[]].filter(Boolean).join(". "):z&&At&&At!==Qe?At:"",Le=[typeof S["aria-describedby"]=="string"?S["aria-describedby"]:void 0,he?pt:null].filter(Boolean).join(" ")||void 0,Pe=()=>n.jsx("span",{className:`${Ae} button__spinner`,"aria-hidden":"true",children:n.jsx(Nr,{variant:"spinner",size:"100%"})}),We=(Ke,xt)=>n.jsx(lt,{icon:Ke,label:xt??Qe,className:Ae,imgClassName:"button__icon-img",maskClassName:"button__icon-mask",svgClassName:"button__icon-svg"}),dt=Ke=>k?Pe():We(c,Ke),on=()=>_e==="dot"?n.jsxs(n.Fragment,{children:[dt(),ze&&n.jsx("span",{className:`button__label ${Be}`,children:ft()})]}):y==="center"&&(c||k)?n.jsxs(n.Fragment,{children:[n.jsxs("span",{className:"button__center-group",children:[n.jsx("span",{className:"button__left",children:dt()}),ze&&n.jsx("span",{className:`button__label ${Be}`,children:ft()})]}),ye&&n.jsx("span",{className:"button__right",children:We(p)})]}):n.jsxs(n.Fragment,{children:[(c||k)&&n.jsx("span",{className:"button__left",children:dt(x??le)}),ze&&n.jsx("span",{className:`button__label ${Be}`,children:ft()}),ye&&n.jsx("span",{className:"button__right",children:We(p)})]}),ht=!!l&&!J;return n.jsxs(n.Fragment,{children:[n.jsxs(ht?"a":"button",{...Je,ref:ot,...ht?{href:l,target:i,rel:u??(i==="_blank"?"noreferrer":void 0)}:{type:s??"button",disabled:J&&!I&&!gt},className:ct,"aria-pressed":kt,"aria-expanded":typeof N=="boolean"?N:S["aria-expanded"],"aria-controls":f??S["aria-controls"],"aria-label":Qe,"aria-disabled":J&&(ht||I||gt)?!0:void 0,"aria-describedby":Le,style:De,onClick:Ft,onMouseLeave:Nt,onPointerEnter:Ke=>{tr(Ke)||yt(),!J&&typeof S.onPointerEnter=="function"&&S.onPointerEnter(Ke)},onPointerLeave:Ke=>{tr(Ke)||vt(),!J&&typeof S.onPointerLeave=="function"&&S.onPointerLeave(Ke)},onPointerUp:Ke=>{J&&Et&&It.touchPress(Ke.currentTarget),!J&&typeof S.onPointerUp=="function"&&S.onPointerUp(Ke)},onFocus:Ke=>{_t(!0),ur()||yt(),!J&&typeof S.onFocus=="function"&&S.onFocus(Ke)},onBlur:Ke=>{_t(!1),J||Ct(Ke),vt(),!J&&typeof S.onBlur=="function"&&S.onBlur(Ke)},children:[on(),he?n.jsx("span",{id:pt,hidden:!0,"aria-label":he}):null]}),nt&&te?n.jsx(er,{anchorRect:Xe,title:te.title,items:te.items,onClose:ut}):nt&&At?n.jsx(zn,{anchorRect:Xe,text:At,onClose:ut}):null]})}const me=o.forwardRef(Z2);me.displayName="Button";function Ht(e,t,r){const a=o.useRef(null);return o.useLayoutEffect(()=>{const s=a.current?.parentElement??null;return t(s,e),()=>r(s)},[e,t,r]),a}const na={title:"--promo-banner-bg-title",description:"--promo-banner-bg-description"},Qo=new WeakMap;function es(e){if(e)return Qo.get(e)}function ln(e,t){e&&(e.style.setProperty(na.title,t.title),e.style.setProperty(na.description,t.description),Qo.set(e,t))}function un(e){e&&(e.style.removeProperty(na.title),e.style.removeProperty(na.description),Qo.delete(e))}const Zi={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"default"};function Xi(){const e=Ht(Zi,ln,un);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-main","aria-hidden":"true"})}const Ji={title:"var(--color-main)",description:"var(--color-gray)",actionVariant:"main"};function Qi(){const e=Ht(Ji,ln,un);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-soft","aria-hidden":"true"})}const eu={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function tu(){const e=Ht(eu,ln,un);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-sub","aria-hidden":"true"})}const nu={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function ru(){const e=Ht(nu,ln,un);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-deep","aria-hidden":"true"})}const au={title:"var(--color-darkSub)",description:"var(--color-gray)",actionVariant:"main"};function ou(){const e=Ht(au,ln,un);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-soft-sub","aria-hidden":"true"})}const su={title:"var(--color-black)",description:"var(--color-darkGray)",actionVariant:"main"};function lu(){const e=Ht(su,ln,un);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-warm","aria-hidden":"true"})}const iu={title:"var(--color-white)",description:"var(--color-lightGray)",actionVariant:"main"};function uu(){const e=Ht(iu,ln,un);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-dark","aria-hidden":"true"})}const cu={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function du(){const e=Ht(cu,ln,un);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-radial","aria-hidden":"true"})}const pu={title:"var(--color-darkMain)",description:"var(--color-gray)",actionVariant:"main"};function hu(){const e=Ht(pu,ln,un);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-diagonal","aria-hidden":"true"})}const mu={title:"var(--color-darkSub)",description:"var(--color-gray)",actionVariant:"main"};function fu(){const e=Ht(mu,ln,un);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-dots","aria-hidden":"true"})}const Cu={title:"var(--color-black)",description:"var(--color-gray)",actionVariant:"main"};function gu(){const e=Ht(Cu,ln,un);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-outline","aria-hidden":"true",children:n.jsx("span",{className:"promo-banner-bg-outline__dot"})})}const bu={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function yu(){const e=Ht(bu,ln,un);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-success","aria-hidden":"true"})}const vu={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"sub"};function xu(){const e=Ht(vu,ln,un);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-naver","aria-hidden":"true"})}const _u={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"transparent-white"};function wu(){const e=Ht(_u,ln,un);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-instagram","aria-hidden":"true"})}const fn=(e,t,r)=>({key:e,get label(){return Pt.t(`promoBannerBg.${e}`,t)},textTone:r}),X2=[fn("main","\uBA54\uC778 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),fn("soft","\uC18C\uD504\uD2B8","dark"),fn("sub","\uC11C\uBE0C \uCEEC\uB7EC","light"),fn("deep","\uB525 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),fn("softSub","\uC18C\uD504\uD2B8 \uC11C\uBE0C","dark"),fn("warm","\uC6DC(\uAC15\uC870)","dark"),fn("dark","\uB2E4\uD06C","light"),fn("radial","\uBC29\uC0AC\uD615 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),fn("diagonal","\uB300\uAC01\uC120 \uD328\uD134","dark"),fn("dots","\uB3C4\uD2B8 \uD328\uD134","dark"),fn("outline","\uC544\uC6C3\uB77C\uC778","dark"),fn("success","\uC131\uACF5/\uC644\uB8CC","light"),fn("naver","\uB124\uC774\uBC84 \uBE14\uB85C\uADF8 \uC548\uB0B4","light"),fn("instagram","\uC778\uC2A4\uD0C0\uADF8\uB7A8 \uC548\uB0B4","light")],Bu={main:Xi,soft:Qi,sub:tu,deep:ru,softSub:ou,warm:lu,dark:uu,radial:du,diagonal:hu,dots:fu,outline:gu,success:yu,naver:xu,instagram:wu};function ku({storageKey:e="fontScale",baseFont:t=20,minScale:r=.8,maxScale:a=1.4,step:s=.1,lineHeightRatio:l=1.4}={}){const i=b=>Math.max(r,Math.min(a,Number(b))),u=b=>{try{const B=localStorage.getItem(b),N=B?Number(B):1;return Number.isFinite(N)?i(N):i(1)}catch{return i(1)}},[c,p]=o.useState(()=>u(e)),[h,d]=o.useState(e);h!==e&&(d(e),p(u(e))),o.useEffect(()=>{try{localStorage.setItem(e,String(c))}catch{}},[e,c]);const m=b=>{p(typeof b=="function"?B=>i(b(B)):i(b))},C=()=>m(b=>+(b+s).toFixed(6)),x=()=>m(b=>+(b-s).toFixed(6)),g=c<a-Number.EPSILON,y=c>r+Number.EPSILON,v=Math.round(t*c),_=Math.round(v*l);return{scale:c,setScale:m,increase:C,decrease:x,canIncrease:g,canDecrease:y,fontSize:v,lineHeight:_}}function Au(e,t){const r=ta(t);o.useEffect(()=>{const a=()=>r.current();try{window.addEventListener(e,a)}catch{}return()=>{try{window.removeEventListener(e,a)}catch{}}},[e,r])}const ts=" \xB7 ",Nu=(()=>{if(typeof document>"u")return"";const e=document.title;return e.includes(ts)?e.split(ts).pop()??e:e})(),J2=o.createContext(!1),cr=[];let Eu=null;function Q2(e){const t=o.useContext(J2);o.useEffect(()=>{if(t||typeof e!="string"||!e)return;cr.length===0&&(Eu=document.title);const r={text:Nu?`${e}${ts}${Nu}`:e};return cr.push(r),document.title=r.text,()=>{const a=cr.lastIndexOf(r);a>=0&&cr.splice(a,1),document.title=cr.length?cr[cr.length-1].text:Eu??document.title}},[e,t])}const ns=[{value:"10",label:"10\uAC1C\uC529 \uBCF4\uAE30"},{value:"25",label:"25\uAC1C\uC529 \uBCF4\uAE30"},{value:"50",label:"50\uAC1C\uC529 \uBCF4\uAE30"},{value:"100",label:"100\uAC1C\uC529 \uBCF4\uAE30"}],ev=(()=>{let e=null;return()=>(e||(e=new Intl.Collator("ko")),e)})();function xn(e,t){return ev().compare(e,t)}const Ra=new Map;function tv(e){const t=Ra.get(e);if(t)return t;const r=[],a=/-?\d+(?:\.\d+)?/g;let s=0;for(let l=a.exec(e);l;l=a.exec(e)){let i=l.index,u=l[0];u[0]==="-"&&i>0&&!/\s/.test(e[i-1])&&(i+=1,u=u.slice(1)),i>s&&r.push(e.slice(s,i)),r.push(Number(u)),s=l.index+l[0].length}return s<e.length&&r.push(e.slice(s)),Ra.size>5e3&&Ra.clear(),Ra.set(e,r),r}function nv(e){if(!/^[\d\s-]+$/.test(e))return null;const t=e.replace(/\D/g,"");return t.length<9||t.length>11?null:t[0]==="0"||t[0]==="1"&&e!==t?t:null}function rv(e,t){const r=p=>p==null||typeof p=="number"&&Number.isNaN(p)?"":String(p).trim(),a=r(e),s=r(t);if(a===s)return 0;const l=(p,h)=>{if(typeof p=="number"&&!Number.isNaN(p))return[p];const d=nv(h);return d!==null?[d]:tv(h)},i=l(e,a),u=l(t,s),c=Math.min(i.length,u.length);for(let p=0;p<c;p++){const h=i[p],d=u[p];if(typeof h=="number"&&typeof d=="number"){if(h!==d)return h-d;continue}if(typeof h=="number")return-1;if(typeof d=="number")return 1;const m=xn(h,d);if(m!==0)return m}return i.length!==u.length?i.length-u.length:xn(a,s)}const ju=e=>e==null||typeof e=="number"&&Number.isNaN(e)||typeof e=="string"&&e.trim()==="";function Pa(e,t,r){const a=ju(e),s=ju(t);if(a||s)return a===s?0:a?1:-1;const l=rv(e,t);return r?l:-l}function av(e,t,r){const{t:a}=Ne.useTranslation(),[s,l]=o.useState(()=>{const x=r?.initialPageSize;return x&&ns.some(g=>g.value===x)?x:"25"}),[i,u]=o.useState(1),[c,p]=o.useState(t);Object.is(c,t)||(p(t),i!==1&&u(1));const h=o.useMemo(()=>ns.map(x=>({...x,label:a("visits.showN",{n:x.value})})),[a]),d=o.useCallback(x=>{ns.some(g=>g.value===x)&&(l(x),u(1))},[]),m=Math.max(1,Math.ceil(e.length/Number(s))),C=Math.min(Math.max(1,Number.isFinite(i)?Math.floor(i):1),m);return i!==C&&u(C),{pageRows:o.useMemo(()=>e.slice((C-1)*Number(s),C*Number(s)),[e,C,s]),pageSizeProps:{options:h,value:s,onChange:d},paginationProps:{page:C,total:m,onChange:u},setPage:u}}function ov(e){const[t,r]=o.useState(()=>e?.defaultKey!=null?{key:e.defaultKey,asc:e.defaultAsc??!0}:null),a=o.useRef(t),s=o.useRef(e?.onSortChange);s.current=e?.onSortChange;const l=o.useCallback(c=>{const p=a.current,h=p?.key===c?{key:c,asc:!p.asc}:{key:c,asc:!0};a.current=h,r(h),s.current?.(h)},[]),i=o.useCallback((c,p)=>({label:c,sortDir:t?.key===p?t.asc?"asc":"desc":null,onClick:()=>l(p)}),[t,l]),u=o.useCallback((c,p)=>{if(!t)return c;const{key:h,asc:d}=t;return[...c].sort((m,C)=>Pa(p(m,h),p(C,h),d))},[t]);return{sort:t,field:i,sortRows:u}}const Dn="\uC804\uCCB4",sv={labial:e=>e("common.phonetics.place.labial",{defaultValue:"\uC591\uC21C\uC74C"}),alveolar:e=>e("common.phonetics.place.alveolar",{defaultValue:"\uCE58\uC870\uC74C"}),palatal:e=>e("common.phonetics.place.palatal",{defaultValue:"\uACBD\uAD6C\uAC1C\uC74C"}),velar:e=>e("common.phonetics.place.velar",{defaultValue:"\uC5F0\uAD6C\uAC1C\uC74C"}),glottal:e=>e("common.phonetics.place.glottal",{defaultValue:"\uC131\uBB38\uC74C"})},lv={frontHigh:e=>e("common.phonetics.vowel.frontHigh",{defaultValue:"\uC804\uC124 \uACE0\uBAA8\uC74C"}),backHighUnrounded:e=>e("common.phonetics.vowel.backHighUnrounded",{defaultValue:"\uD6C4\uC124 \uACE0\uBAA8\uC74C \uD3C9\uC21C"}),backHighRounded:e=>e("common.phonetics.vowel.backHighRounded",{defaultValue:"\uD6C4\uC124 \uACE0\uBAA8\uC74C \uC6D0\uC21C"}),frontMid:e=>e("common.phonetics.vowel.frontMid",{defaultValue:"\uC804\uC124 \uC911\uBAA8\uC74C"}),backMidUnrounded:e=>e("common.phonetics.vowel.backMidUnrounded",{defaultValue:"\uD6C4\uC124 \uC911\uBAA8\uC74C \uD3C9\uC21C"}),backMidRounded:e=>e("common.phonetics.vowel.backMidRounded",{defaultValue:"\uD6C4\uC124 \uC911\uBAA8\uC74C \uC6D0\uC21C"}),low:e=>e("common.phonetics.vowel.low",{defaultValue:"\uC800\uBAA8\uC74C"})},iv={j:e=>e("common.phonetics.glide.j",{defaultValue:"j\uD65C\uC74C"}),w:e=>e("common.phonetics.glide.w",{defaultValue:"w\uD65C\uC74C"}),velar:e=>e("common.phonetics.glide.velar",{defaultValue:"\u0270\uD65C\uC74C"})};function uv(e,t){if("place"in t)return sv[t.place](e);const r=lv[t.vowel](e);return t.glide?`${r} \xB7 ${iv[t.glide](e)}`:r}const cv=(e,{defaultValue:t})=>t,Du=(e,t)=>({jamos:e,phonetic:t,tooltip:uv(cv,t)}),Wn=(e,t)=>t.map(r=>Du([r],{place:e})),Qt=(e,t,r)=>Du([...e],r?{vowel:t,glide:r}:{vowel:t}),rs={cho:[Wn("labial",["\u3142","\u3143","\u314D","\u3141"]),Wn("alveolar",["\u3137","\u3138","\u314C","\u3134","\u3139"]),Wn("alveolar",["\u3145","\u3146"]),Wn("palatal",["\u3148","\u3149","\u314A"]),Wn("velar",["\u3131","\u3132","\u314B"]),Wn("glottal",["\u314E"])],jung:[[Qt("\u3163","frontHigh"),Qt("\u315F","frontHigh","w"),Qt("\u3162","frontHigh","velar")],[Qt("\u3161","backHighUnrounded")],[Qt("\u315C","backHighRounded"),Qt("\u3160","backHighRounded","j")],[Qt("\u3154\u3150","frontMid"),Qt("\u3156\u3152","frontMid","j"),Qt("\u3159\u315A\u315E","frontMid","w")],[Qt("\u3153","backMidUnrounded"),Qt("\u3155","backMidUnrounded","j"),Qt("\u315D","backMidUnrounded","w")],[Qt("\u3157","backMidRounded"),Qt("\u315B","backMidRounded","j")],[Qt("\u314F","low"),Qt("\u3151","low","j"),Qt("\u3158","low","w")]],jong:[Wn("labial",["\u3142","\u3141"]),Wn("alveolar",["\u3137","\u3134","\u3139"]),Wn("velar",["\u3131","\u3147"])]},dv=e=>e===pv?[]:Array.from(e),pv="__NO_CODA__",as=e=>e.map(t=>t.map(({jamos:r,phonetic:a,tooltip:s})=>({v:r.join(""),phonetic:a,tooltip:s}))),Su={cho:as(rs.cho),jung:as(rs.jung),jong:as(rs.jong)};Su.jung.flat().forEach(({v:e})=>{for(const t of dv(e));}),new Set(Su.cho.flat().map(e=>e.v)),Object.fromEntries(Object.entries(kb).map(([e,{nucleus:t}])=>[e,t]));function hv(e,t=!0){const r=ta(e);o.useEffect(()=>{if(t)return ir(()=>{r.current?.()})},[t,r])}function Fa(){const[e,t]=o.useState(null),r=o.useCallback(l=>t(l.getBoundingClientRect()),[]),a=o.useCallback(()=>t(null),[]),s=o.useCallback(l=>{const i=l.getBoundingClientRect();t(u=>u?null:i)},[]);return{anchorRect:e,isOpen:e!=null,openAt:r,close:a,toggleAt:s}}function mv(e){const[t,r]=o.useState(null),[a,s]=o.useState(null),l=o.useRef(null);o.useEffect(()=>()=>{l.current&&clearTimeout(l.current)},[]);const i=o.useCallback((c,p)=>{l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{r(c),s(p)},e)},[e]),u=o.useCallback(()=>{l.current&&clearTimeout(l.current),r(null),s(null)},[]);return{payload:t,anchorRect:a,openAfterDelay:i,close:u}}function Tu(e="warning"){const[t,r]=o.useState(""),[a,s]=o.useState(e),[l,i]=o.useState(0),u=o.useCallback((d,m)=>{s(m),r(d),i(C=>C+1)},[]),c=o.useCallback(d=>u(d,"warning"),[u]),p=o.useCallback(d=>u(d,"normal"),[u]),h=o.useCallback(()=>r(""),[]);return{toastMessage:t,toastType:a,toastKey:l,showToast:u,showWarning:c,showNormal:p,clearToast:h}}function ra(e){let t=0;if(e&&typeof window<"u"&&typeof window.getComputedStyle=="function")for(let r=e;r&&r!==document.body&&r!==document.documentElement;r=r.parentElement){const a=parseInt(window.getComputedStyle(r).zIndex,10);!Number.isNaN(a)&&a>t&&(t=a)}return t>0?`max(var(--z-menu, 1500), ${t+1})`:"var(--z-menu, 1500)"}function aa({computeStyle:e,onScroll:t="close",onResize:r="close",ignoreOutsideClickSelector:a}){const[s,l]=o.useState(!1),[i,u]=o.useState({position:"fixed"}),c=o.useRef(null),p=o.useRef(null),h=o.useCallback(()=>{c.current&&u(e(c.current.getBoundingClientRect(),c.current))},[e]);o.useLayoutEffect(()=>{s&&h()},[s,h]),o.useEffect(()=>{if(!s)return;let C=p.current?.offsetHeight??0;C>0&&h();let x=0,g=null;typeof ResizeObserver<"u"&&p.current&&(g=new ResizeObserver(()=>{const w=p.current?.offsetHeight??0;if(w!==C){if(C=w,++x>4){g?.disconnect(),g=null;return}h()}}),g.observe(p.current));const y=w=>{const k=w.target;a&&k.closest?.(a)||c.current?.contains(k)||p.current?.contains(k)||l(!1)};document.addEventListener("mousedown",y),document.addEventListener("pointerdown",y);let v=null;const _=()=>{if(typeof requestAnimationFrame>"u"){h();return}v===null&&(v=requestAnimationFrame(()=>{v=null,h()}))},b=w=>{p.current?.contains(w.target)||(t==="reposition"?_():t==="close"&&l(!1))};t!=="ignore"&&window.addEventListener("scroll",b,!0);const B=()=>{r==="reposition"?_():r==="close"&&l(!1)};let N=null;const f=()=>{B(),N&&clearTimeout(N),N=setTimeout(()=>{N=null,r==="reposition"&&h()},250)};return r!=="ignore"&&(window.addEventListener("resize",B),window.addEventListener("orientationchange",f)),()=>{v!==null&&cancelAnimationFrame(v),g?.disconnect(),document.removeEventListener("mousedown",y),document.removeEventListener("pointerdown",y),t!=="ignore"&&window.removeEventListener("scroll",b,!0),r!=="ignore"&&(window.removeEventListener("resize",B),window.removeEventListener("orientationchange",f)),N&&clearTimeout(N)}},[s,h,t,r,a]),o.useEffect(()=>{if(s)return ir(()=>l(!1))},[s]);const d=o.useCallback(()=>l(C=>!C),[]),m=o.useCallback(()=>l(!1),[]);return{open:s,setOpen:l,toggle:d,close:m,style:i,triggerRef:c,menuRef:p}}function fv(e,{mode:t="playback",autoStart:r=!1,onPlaySpeaker:a,onComplete:s,playMs:l=1100,feedbackMs:i=1500}={}){const[u,c]=o.useState([]),[p,h]=o.useState(0),[d,m]=o.useState("idle"),[C,x]=o.useState(null),[g,y]=o.useState([]),[v,_]=o.useState(null),[b,B]=o.useState(0),N=o.useRef(0),f=o.useCallback(P=>{N.current=typeof P=="function"?P(N.current):P,B(N.current)},[]),w=o.useRef(a),k=o.useRef(s);o.useEffect(()=>{w.current=a,k.current=s},[a,s]);const E=o.useRef([]),A=()=>{E.current.forEach(clearTimeout),E.current=[]},D=(P,G)=>{E.current.push(setTimeout(G,P))};o.useEffect(()=>()=>A(),[]);const j=u[p]?.id??null,$=o.useRef(null),H=o.useCallback(()=>{A(),m("playing"),y([]),_(null),f(0);let P=0;e.forEach((G,X)=>{D(P,()=>{h(X),x(G.id),w.current?.(G)}),D(P+1e3,()=>{x(null),y(K=>[...K,G.id])}),P+=1300}),D(P,()=>{m("done"),k.current?.({score:0,total:e.length})})},[e,f]),F=o.useCallback((P,G)=>{if(G>=P.length){m("done"),k.current?.({score:N.current,total:P.length});return}$.current=null,h(G),_(null),m("playing"),x(P[G].id),w.current?.(P[G]),D(l,()=>{x(null),m("waiting")})},[l]),U=o.useCallback(()=>{A();const P=Xr(e);c(P),f(0),y([]),F(P,0)},[e,F,f]),T=o.useCallback(()=>{t==="playback"?(c(e),H()):U()},[t,e,H,U]),I=o.useCallback(()=>{A(),m("idle"),x(null),y([]),_(null),h(0),f(0),c([])},[f]),z=JSON.stringify(e.map(P=>[P.id,P.label,P.angleDeg,P.deg,P.row,P.shortcut]));o.useEffect(()=>(r?T():I(),()=>A()),[t,z,r]);const ie=o.useCallback(P=>{d!=="waiting"||t==="playback"||$.current===p||($.current=p,_(P),P===u[p]?.id&&f(G=>G+1),t==="exam"?(m("playing"),D(400,()=>F(u,p+1))):(m("feedback"),D(i,()=>F(u,p+1))))},[d,t,u,p,F,i,f]),te=t==="playback"?e.length:u.length;return{bind:{activeSpeakerId:C,playedIds:g,selectedId:v,answerId:j,showFeedback:d==="feedback",clickable:d==="waiting",onSelectSpeaker:ie},index:p,total:te,score:b,phase:d,done:d==="done",start:T,reset:I}}const os=new Map,ss=new Map,Cv=()=>()=>{},gv=()=>!0,bv=()=>!1;function Mu(e){const t=/^data:image\/svg\+xml(;base64)?,([\s\S]*)$/.exec(e);if(!t)return null;try{if(!t[1])return decodeURIComponent(t[2]);const r=Uint8Array.from(atob(t[2]),a=>a.charCodeAt(0));return new TextDecoder("utf-8").decode(r)}catch{return null}}function yv(e){if(typeof window>"u")return"";const t=(r,a)=>{const s=a.attrName.toLowerCase(),l=a.attrValue.trim();(s==="href"||s==="xlink:href")&&!l.startsWith("#")&&(a.keepAttr=!1),(s==="style"||l.includes("\\")&&l.includes("("))&&(a.keepAttr=!1);const i=l.replace(/url\s*\(\s*(['"]?)#[^)\s'"]+\1\s*\)/gi,"");/url\s*\(/i.test(i)&&(a.keepAttr=!1)};wr.addHook("uponSanitizeAttribute",t);try{return wr.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:["script","style","foreignObject"]})}finally{wr.removeHook("uponSanitizeAttribute",t)}}function vv(e,t){const r=new Set;for(const i of e.matchAll(/url\(\s*(['"]?)#([^)\s"']+)\1\s*\)/g))r.add(i[2]);for(const i of e.matchAll(/(?:xlink:)?href="#([^"]+)"/g))r.add(i[1]);const a=new Set([...e.matchAll(/id="([^"]*)"/g)].map(i=>i[1])),s=[...r].filter(i=>a.has(i));if(s.length===0)return e;let l=e;for(const i of s){const u=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),c=`${t}-${i}`;l=l.replace(new RegExp(`id="${u}"`,"g"),`id="${c}"`).replace(new RegExp(`url\\(\\s*(['"]?)#${u}\\1\\s*\\)`,"g"),(p,h)=>`url(${h}#${c}${h})`).replace(new RegExp(`((?:xlink:)?href)="#${u}"`,"g"),`$1="#${c}"`)}return l}function xv(e){const t=ss.get(e);if(t)return t;const r=fetch(e).then(a=>a.ok?a.text():null).then(a=>(a!=null&&os.set(e,a),a)).catch(()=>null).finally(()=>{ss.delete(e)});return ss.set(e,r),r}function _v(e,t=!0){const r=o.useSyncExternalStore(Cv,gv,bv)&&t&&e?Mu(e)??os.get(e)??null:null,[a,s]=o.useState({src:e,enabled:t,svg:r});return o.useEffect(()=>{if(!t||!e){s({src:e,enabled:t,svg:null});return}const l=Mu(e)??os.get(e)??null;if(l!==null){s({src:e,enabled:t,svg:l});return}let i=!0;return xv(e).then(u=>{i&&s({src:e,enabled:t,svg:u})}),()=>{i=!1}},[e,t]),a.src===e&&a.enabled===t?a.svg:r}const wv=e=>String(e);function Bv(e,t=wv){const[r,a]=o.useState(null),[s,l]=o.useState(null),i=o.useCallback(c=>({draggable:!0,onDragStart:p=>{a(c),p.dataTransfer.effectAllowed="move",p.dataTransfer.setData("text/plain",t(c))},onDragEnd:()=>{a(null),l(null)}}),[t]),u=o.useCallback((c,p)=>{const h=r!=null&&(!p||p(r));return{onDragOver:d=>{h&&(d.preventDefault(),d.dataTransfer.dropEffect="move",l(c))},onDragEnter:()=>{h&&l(c)},onDragLeave:d=>{h&&!d.currentTarget.contains(d.relatedTarget)&&l(m=>m===c?null:m)},onDrop:d=>{if(!h||r==null)return;d.preventDefault();const m=r;l(null),a(null),e(m,c)}}},[r,e]);return{dragging:r,draggingId:r==null?null:t(r),dragOverKey:s,cardProps:i,groupProps:u}}const kv=[10,25,50,100];function Av(e=kv){const{t}=Ne.useTranslation(),r=e.join(",");return o.useMemo(()=>e.map(a=>({value:String(a),label:t("common.pageSizeLabel",{n:a,defaultValue:"{{n}}\uAC1C\uC529 \uBCF4\uAE30"})})),[r,t])}function Nv(e){o.useEffect(()=>{if(!e||typeof navigator>"u")return;const t=navigator.wakeLock;if(!t)return;let r=null,a=!1;const s=async()=>{if(!(a||r||document.visibilityState!=="visible"))try{const i=await t.request("screen");if(a){i.release().catch(()=>{});return}r=i,i.addEventListener("release",()=>{r===i&&(r=null)})}catch{}},l=()=>{document.visibilityState==="visible"&&s()};return s(),document.addEventListener("visibilitychange",l),()=>{a=!0,document.removeEventListener("visibilitychange",l),r&&(r.release().catch(()=>{}),r=null)}},[e])}const $u="__ihabBackClosable",dr=[];let Ia=0,Lu=!1,Ev=1;function ls(){try{const e=window.history.state?.[$u];return typeof e=="number"?e:void 0}catch{return}}function Ru(e){try{const t=window.history.state??{};window.history.pushState({...t,[$u]:e},"")}catch{}}function jv(){if(Ia>0){Ia--;return}const e=dr[dr.length-1];if(e&&ls()!==e.id){if(e.onBack()===!1){Ru(e.id);return}dr.pop()}}function Dv(){Lu||typeof window>"u"||(window.addEventListener("popstate",jv),Lu=!0)}function Pu(e,t){const r=o.useRef(t);o.useEffect(()=>{r.current=t});const a=o.useRef(null);o.useEffect(()=>{if(!e||typeof window>"u")return;Dv();const s=a.current??(a.current=Ev++),l={id:s,onBack:()=>r.current()};return dr.push(l),ls()!==s&&Ru(s),()=>{const i=dr.indexOf(l);if(i<0){a.current=null;return}dr.splice(i,1),setTimeout(()=>{if(!dr.some(u=>u.id===s)&&(a.current===s&&(a.current=null),ls()===s)){Ia++;try{window.history.back()}catch{Ia--}}},0)}},[e])}const Fu=260;function Sv({title:e,description:t,actionLabel:r,onAction:a,bg:s,color:l,size:i="medium",actionVariant:u,titleColor:c,descriptionColor:p,className:h=""}){const d=s??l??"main",m=o.useRef(null),[C,x]=o.useState("main"),g=Bn("(max-width: 767px)"),y=o.useRef({title:!1,description:!1});o.useLayoutEffect(()=>{const b=m.current;if(!b)return;const B=es(b),N=(f,w,k)=>{if(k!==void 0)b.style.setProperty(w,k),y.current[f]=!0;else if(y.current[f]){const E=B?.[f];E?b.style.setProperty(w,E):b.style.removeProperty(w),y.current[f]=!1}};N("title","--promo-banner-bg-title",c),N("description","--promo-banner-bg-description",p)},[c,p,d]),o.useLayoutEffect(()=>{const b=m.current;if(!b)return;const B=es(b);x(B?.actionVariant??"main")},[d]);const v=xe("promo-banner",`promo-banner--${i}`,h),_=Bu[d];return n.jsxs("div",{ref:m,className:v,role:"note",children:[n.jsx(_,{}),n.jsxs("div",{className:"promo-banner__text",children:[n.jsx("span",{className:`promo-banner__title ${i==="small"?"body-2":"h2"}`,children:e}),t&&n.jsx("span",{className:"promo-banner__description body-3",children:t})]}),r&&a&&n.jsx(me,{htmlType:"button",size:40,variant:u??C,shape:"pill",useBorder:!0,onClick:a,ariaLabel:r,...g?{type:"dot",icon:"arrow-right"}:{rightIcon:"arrow-right",label:r,minWidth:140}})]})}function Tv({children:e,interval:t=5e3,dotTone:r,className:a="","aria-label":s}){const{t:l}=Ne.useTranslation(),i=s??l("topBanner.ariaLabel","\uBC30\uB108"),u=o.Children.toArray(e),c=u.length,[p,h]=o.useState(0),[d,m]=o.useState(!1),[C,x]=o.useState(!1),[g,y]=o.useState(!1),v=o.useRef(null),_=o.useRef(null),b=o.useRef(null),B=$a(),N=d||C||g,f=c>0?Math.min(p,c-1):0;o.useEffect(()=>{if(c<2||t<=0||N||B)return;const k=window.setInterval(()=>h(E=>(Math.min(E,c-1)+1)%c),t);return()=>window.clearInterval(k)},[c,t,N,B]);const w=k=>{_.current!=null&&window.clearTimeout(_.current),_.current=window.setTimeout(()=>{_.current=null,y(!1)},k)};return o.useEffect(()=>()=>{_.current!=null&&window.clearTimeout(_.current)},[]),o.useEffect(()=>{if(!g)return;const k=E=>{E.pointerType==="touch"&&(b.current&&b.current.contains(E.target)||(_.current!=null&&(window.clearTimeout(_.current),_.current=null),y(!1)))};return document.addEventListener("pointerdown",k,!0),()=>document.removeEventListener("pointerdown",k,!0)},[g]),c===0?null:n.jsxs("section",{ref:b,className:xe("top-banner",a),"aria-label":i,"aria-roledescription":"carousel",onPointerEnter:k=>{v.current=k.pointerType},onPointerDown:k=>{v.current=k.pointerType,k.pointerType==="touch"&&(_.current!=null&&(window.clearTimeout(_.current),_.current=null),y(!0))},onPointerUp:k=>{k.pointerType==="touch"&&w(5e3)},onPointerCancel:k=>{k.pointerType==="touch"&&w(5e3)},onMouseEnter:()=>{v.current!=="touch"&&m(!0)},onMouseLeave:()=>m(!1),onFocus:k=>{let E=!0;try{E=k.target.matches(":focus-visible")}catch{E=!0}x(E)},onBlur:k=>{k.currentTarget.contains(k.relatedTarget)||x(!1)},children:[n.jsx("div",{className:"top-banner__viewport",children:n.jsx("div",{className:"top-banner__track",style:{transform:`translateX(-${f*100}%)`},children:u.map((k,E)=>n.jsx("div",{className:"top-banner__slide","aria-hidden":E!==f,...E!==f?{inert:!0}:{},children:k},E))})}),c>1&&n.jsx("div",{className:`top-banner__dots${(r?.[f]??"light")==="dark"?" top-banner__dots--dark":""}`,children:u.map((k,E)=>n.jsx("button",{type:"button",className:`top-banner__dot${E===f?" top-banner__dot--active":""}`,"aria-label":l("topBanner.dotAriaLabel",{count:c,index:E+1,defaultValue:`${c}\uAC1C \uC911 ${E+1}\uBC88\uC9F8 \uBC30\uB108`}),"aria-current":E===f,onClick:()=>h(E)},E))})]})}function Mv({title:e,body:t,open:r=!1,onToggle:a,avatar:s,titleClassName:l="body-2",bodyClassName:i="body-2",className:u=""}){const{t:c}=Ne.useTranslation();return n.jsxs("div",{className:`accordion-item ${r?"accordion-item--open":""} ${u}`.trim(),role:"listitem",children:[n.jsxs("div",{className:"accordion-item__header",role:"button",tabIndex:0,"aria-expanded":r,"data-accordion-header":!0,onClick:a,onKeyDown:p=>{if(p.key==="Enter"||p.key===" ")p.preventDefault(),a?.();else if(p.key==="ArrowDown"||p.key==="ArrowUp"){p.preventDefault();const h=p.currentTarget.closest('[role="list"]');if(!h)return;const d=Array.from(h.querySelectorAll("[data-accordion-header]")),m=d.indexOf(p.currentTarget);(p.key==="ArrowDown"?d[m+1]:d[m-1])?.focus()}},children:[s&&n.jsx("div",{className:"accordion-item__avatar",children:s}),n.jsx("div",{className:`accordion-item__title ${l}`,children:e}),n.jsx("div",{className:"accordion-item__chevron",children:n.jsx(lt,{icon:r?"chevron-up":"chevron-down",label:r?c("accordion.collapse","\uC811\uAE30"):c("accordion.expand","\uD3BC\uCE58\uAE30"),className:"accordion-item__chevron-icon",imgClassName:"accordion-item__chevron-image"})})]}),r&&n.jsx("div",{className:`accordion-item__body ${i}`,children:typeof t=="string"?n.jsx("p",{children:t}):t})]})}function $v({items:e=[],defaultOpenIndex:t=0,size:r=72,className:a="",bodyClassName:s}){const[l,i]=o.useState({index:t}),u=(c,p)=>l.id!=null&&c.id!=null?c.id===l.id:l.id==null&&p===l.index;return n.jsx("div",{className:`accordion-group accordion-group--s${r} ${a}`.trim(),role:"list",children:e.map((c,p)=>n.jsx(Mv,{title:c.title,body:c.body,avatar:c.avatar,open:u(c,p),onToggle:()=>i(u(c,p)?{index:-1}:{index:p,id:c.id}),bodyClassName:s},c.id??p))})}function Lv(){return n.jsx("svg",{viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:2.2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:n.jsx("polyline",{points:"2,6 5,9 10,3"})})}function Rv(){return n.jsxs("svg",{viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:2.2,strokeLinecap:"round","aria-hidden":"true",children:[n.jsx("line",{x1:"3",y1:"3",x2:"9",y2:"9"}),n.jsx("line",{x1:"9",y1:"3",x2:"3",y2:"9"})]})}function Pv(){return n.jsx("svg",{viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:2.2,strokeLinecap:"round","aria-hidden":"true",children:n.jsx("line",{x1:"2.5",y1:"6",x2:"9.5",y2:"6"})})}function Sn({children:e,icon:t,number:r,position:a="top-left",size:s=24,animate:l=!1,onClick:i,"aria-label":u,"aria-hidden":c,className:p=""}){const{t:h}=Ne.useTranslation(),d=t??"check",m=r!==void 0,C=e!==void 0||m?"number":d,x=e!==void 0?void 0:m?h("badge.nthSelected",{n:r,defaultValue:"{{n}}\uBC88\uC9F8 \uC120\uD0DD"}):{check:h("badge.selected","\uC120\uD0DD\uB428"),remove:h("badge.remove","\uC81C\uAC70"),minus:h("badge.exclude","\uC81C\uC678")}[d],g=c?void 0:u??x;return n.jsxs("span",{className:xe("circle-badge",`circle-badge--${C}`,`circle-badge--${s}`,`circle-badge--${a}`,l?"circle-badge--animate":"",i?"circle-badge--clickable":"",p),onClick:i,onKeyDown:i?y=>{y.key!=="Enter"&&y.key!==" "||(y.preventDefault(),y.currentTarget.click())}:void 0,"aria-label":g,"aria-hidden":c||void 0,role:i?"button":g?"img":void 0,tabIndex:i?0:void 0,children:[e??(m?r:null),e===void 0&&!m&&d==="check"&&n.jsx(Lv,{}),e===void 0&&!m&&d==="remove"&&n.jsx(Rv,{}),e===void 0&&!m&&d==="minus"&&n.jsx(Pv,{})]})}function nr({columns:e=[],onClose:t,className:r="",size:a="medium"}){const{t:s}=Ne.useTranslation(),l=a==="small"?40:48,[i,u]=o.useState([]),c=o.useMemo(()=>{const y=[{title:null,columns:e}];let v=e;for(const _ of i){const b=v?.[_.ci]?.items?.[_.ii];if(!b||!Array.isArray(b.children)||!b.children.length)break;v=[{title:null,items:b.children}],y.push({title:b.label||null,columns:v})}return y},[e,i]),p=c[c.length-1],h=c.length-1,d=o.useCallback(()=>u(y=>y.slice(0,Math.max(0,Math.min(y.length,h)-1))),[h]),m=o.useRef(null),C=o.useRef(null),x=c.length;o.useEffect(()=>{C.current||(C.current=document.activeElement);let y=0,v=0;const _=()=>{const b=m.current?.querySelector("button:not([disabled])");if(b&&b.offsetParent){b.focus({preventScroll:!0});return}v++<20&&(y=requestAnimationFrame(_))};return y=requestAnimationFrame(_),()=>cancelAnimationFrame(y)},[x]),o.useEffect(()=>()=>{C.current?.focus?.({preventScroll:!0})},[]);const g=o.useCallback((y,v,_)=>{if(y){if(Array.isArray(y.children)&&y.children.length){u(b=>[...b.slice(0,h),{ci:v,ii:_}]);return}try{typeof y.onClick=="function"&&y.onClick()}catch{}try{y&&y.closeOnSelect&&typeof t=="function"&&t()}catch{}}},[t,h]);return n.jsxs("div",{className:ce(`menu-tooltip menu-tooltip--${a} ${r}`),children:[(c.length>1||p.title)&&n.jsxs("div",{className:ce("menu-tooltip__header"),children:[c.length>1?n.jsx(me,{htmlType:"button",size:l,type:"dot",icon:"chevron-left",ariaLabel:s("common.back","\uB4A4\uB85C"),onClick:d,variant:"transparent-gray",useBorder:!1}):null,n.jsx("div",{className:ce("menu-tooltip__title button-1"),children:p.title})]}),n.jsx("div",{className:ce("menu-tooltip__columns"),ref:m,children:p.columns&&p.columns.map((y,v)=>{const _=(y.items||[]).some(b=>!!b.icon||b.selected!==void 0);return n.jsxs("div",{className:ce("menu-tooltip__column"),children:[y.title?n.jsx("div",{className:ce("menu-tooltip__column-title body-3"),children:y.title}):null,n.jsx("div",{className:ce("menu-tooltip__items"),children:(y.items||[]).map((b,B)=>n.jsxs(o.Fragment,{children:[b.separatorBefore&&B>0&&n.jsx("div",{className:ce("menu-tooltip__separator"),role:"separator"}),n.jsx(me,{htmlType:"button",className:ce("menu-tooltip__item"),size:l,type:b.label?"bar":"dot",icon:b.selected?"check":b.icon||(_||!b.label?"none":void 0),rightIcon:Array.isArray(b.children)&&b.children.length?"chevron-right":b.badgeCount?n.jsx(Sn,{position:"inline",number:Math.min(b.badgeCount,99),size:24,"aria-hidden":!0}):void 0,label:b.label,ariaLabel:b.label&&b.badgeCount&&b.badgeCount>0?s("nav.badgeLabel",{label:b.label,count:b.badgeCount,defaultValue:"{{label}}, {{count}}\uAC1C"}):b.label,onClick:()=>g(b,v,B),selected:b.selected,disabled:b.disabled,showTooltipInfo:b.tooltip||!1,useBorder:!1,align:"left"})]},B))})]},v)})})]})}const Iu=".content-area";function is(e,t="Nav"){try{const r=typeof e=="string"?document.querySelector(e):e?.current??document.querySelector(Iu);if(r){r.scrollTop=0;return}const a=document.scrollingElement??document.documentElement;a&&a.scrollHeight<=a.clientHeight&&Tt("nav-scroll-container",`[${t}] \uBCF8\uBB38\uC744 \uB9E8 \uC704\uB85C \uB418\uB3CC\uB9B4 \uD1B5\uC744 \uBABB \uCC3E\uC558\uB2E4(\uAE30\uBCF8 ${Iu}) \u2014 \uCC3D\uB3C4 \uAD6C\uB97C \uC218 \uC5C6\uC5B4 \uC544\uBB34 \uC77C\uB3C4 \uD558\uC9C0 \uC54A\uB294\uB2E4. scrollContainer \uB85C \uD1B5\uC744 \uC54C\uB824 \uC900\uB2E4.`),window.scrollTo({top:0})}catch{}}const us=52,Oa=10,Ou=e=>e&&e>0?e:0;function zu({items:e=[],activeKey:t,onChange:r,appMode:a,onAppModeChange:s,moreItems:l=[],scrollContainer:i}){const{t:u}=Ne.useTranslation(),c=a==="manager"?"malgwi":"manager",p=a==="manager"?"arrow-left":"arrow-right",h=a==="manager"?u("nav.modeLabelMalgwi","\uB9D0\uADC0"):u("nav.modeLabelManager","\uB9D0\uADC0 \uB9E4\uB2C8\uC800"),d=o.useRef(null),[m,C]=o.useState(0),x=e.length;o.useEffect(()=>{const P=d.current;if(!P)return;const G=()=>{const L=typeof getComputedStyle=="function"?getComputedStyle(P):null,R=P.clientWidth-(parseFloat(L?.paddingLeft??"")||0)-(parseFloat(L?.paddingRight??"")||0),S=P.querySelector(".bottom-nav__left"),V=S?.nextElementSibling,ae=(S?.offsetWidth??0)+(S&&V?.classList.contains("bottom-nav__divider")?V.offsetWidth:0);C(Math.max(0,R-ae))};if(G(),typeof ResizeObserver>"u")return;const X=new ResizeObserver(G);X.observe(P);const K=P.querySelector(".bottom-nav__left");return K&&X.observe(K),()=>X.disconnect()},[s]);const g=us+1,y=P=>Math.max(0,Math.floor((P+Oa)/(us+Oa))),v=x*(us+Oa)-Oa<=m,_=m<=0||l.length===0&&v?x:Math.min(x,y(m-g)),b=m>0&&_<x,B=b?_:x,N=e.slice(0,B),f=e.slice(B),w=b||l.length>0,k=o.useCallback((P,G)=>({position:"fixed",bottom:window.innerHeight-P.top+8,right:window.innerWidth-P.right,zIndex:ra(G)}),[]),E=o.useId(),{open:A,toggle:D,close:j,style:$,triggerRef:H,menuRef:F}=aa({computeStyle:k,onScroll:"ignore",onResize:"reposition"}),U=o.useCallback((P,G)=>G>0?u("nav.badgeLabel",{label:P,count:G,defaultValue:"{{label}}, {{count}}\uAC1C"}):P,[u]),T=o.useCallback((P,G)=>G>0?u("nav.badgeInsideLabel",{label:P,count:G,defaultValue:"{{label}}, \uC548\uC5D0 \uC54C\uB9BC {{count}}\uAC1C"}):P,[u]),I=o.useCallback(()=>s?.(c),[s,c]),z=o.useMemo(()=>f.find(P=>!!P.key&&P.key===t)??l.find(P=>P.selected||P.key&&P.key===t),[f,t,l]),ie=o.useMemo(()=>[{items:[...f.map(P=>({label:P.label,icon:P.icon,badgeCount:P.badgeCount,selected:!!P.key&&P.key===t,closeOnSelect:!0,disabled:P.state==="disabled",onClick:()=>{P.state!=="disabled"&&(P.key&&r&&(r(P.key),is(i,"BottomNav")),j())}})),...l.map(P=>({label:P.label,icon:P.icon,badgeCount:P.badgeCount,selected:P.selected??(!!P.key&&P.key===t),closeOnSelect:!0,onClick:()=>{P.onClick?.(),j()}}))]}],[f,l,t,r,j]),te=[...f,...l].reduce((P,G)=>P+Ou(G.badgeCount),0);return n.jsxs("nav",{className:"bottom-nav",ref:d,"aria-label":u("nav.bottomNav","\uD558\uB2E8 \uB124\uBE44\uAC8C\uC774\uC158"),children:[s&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"bottom-nav__left",children:n.jsx(me,{htmlType:"button",size:52,type:"dot",icon:p,ariaLabel:h,className:"bottom-nav-item",onClick:I})}),n.jsx("div",{className:"bottom-nav__divider","aria-hidden":"true"})]}),n.jsx("div",{className:"bottom-nav__items",children:N.map((P,G)=>{const X=Ou(P.badgeCount);return n.jsxs("span",{className:"bottom-nav__slot",children:[n.jsx(me,{htmlType:"button",size:52,type:"dot",icon:P.icon,ariaLabel:U(P.label,X),selected:!!P.key&&P.key===t,disabled:P.state==="disabled",className:"bottom-nav-item",onClick:()=>{P.key&&(r?.(P.key),is(i,"BottomNav"))}}),X>0&&n.jsx("span",{"aria-hidden":"true",children:n.jsx(Sn,{position:"top-right",number:Math.min(X,99),size:24})})]},P.key??`__slot-${G}`)})}),w&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"bottom-nav__divider","aria-hidden":"true"}),n.jsx("div",{className:"bottom-nav__right",children:n.jsxs("div",{ref:H,className:"bottom-nav__slot",children:[n.jsx(me,{htmlType:"button",size:52,type:"dot",icon:z?.icon??"ellipsis",ariaLabel:T(z?.label??u("nav.more","\uB354\uBCF4\uAE30"),te),selected:!!z,className:"bottom-nav-item",onClick:D,"aria-expanded":A,"aria-controls":A?E:void 0}),te>0&&n.jsx("span",{"aria-hidden":"true",children:n.jsx(Sn,{position:"top-right",number:Math.min(te,99),size:24})}),A&&bn.createPortal(n.jsx("div",{id:E,role:"group","aria-label":u("nav.moreMenu","\uB354\uBCF4\uAE30 \uBA54\uB274"),className:ce("tooltip__content"),style:$,ref:F,children:n.jsx(nr,{columns:ie,onClose:j})}),document.body)]})})]})]})}function Wu(e){if(typeof e!="string")return!1;let t="";for(const a of e){const s=a.charCodeAt(0);s<=32||s>=127&&s<=159||(t+=a)}if(!t)return!1;const r=/^([a-zA-Z][a-zA-Z0-9+.-]*):/.exec(t);return r?["http","https","mailto","tel"].includes(r[1].toLowerCase()):!0}function Hu(e,t,r){return r&&r>0?e("nav.badgeLabel",{label:t,count:r,defaultValue:"{{label}}, {{count}}\uAC1C"}):t}function Fv(e){const{t}=Ne.useTranslation(),{activeKey:r,unreadCount:a,onDebug:s,onNotification:l,onSetting:i,onHelp:u,onFeedback:c,onAccount:p}=e||{},h="default";return s||l||i||u||c||p?n.jsxs("div",{className:"side-nav__footer",children:[s&&n.jsx(me,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"terminal",ariaLabel:t("nav.debug","\uB514\uBC84\uADF8"),onClick:s,selected:r==="debug"}),u&&n.jsx(me,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"message-circle-question-mark",ariaLabel:t("nav.help","\uB3C4\uC6C0\uB9D0"),onClick:u,selected:r==="help"}),l&&n.jsxs("span",{className:"side-nav__notification-wrap",children:[n.jsx(me,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"bell",ariaLabel:Hu(t,t("nav.notifications","\uC54C\uB9BC"),a),onClick:l,selected:r==="notifications"}),!!a&&a>0&&n.jsx(Sn,{position:"top-right",number:Math.min(a,99),size:24,"aria-hidden":!0})]}),i&&n.jsx(me,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"settings",ariaLabel:t("nav.settings","\uC124\uC815"),onClick:i,selected:r==="settings"}),c&&n.jsx(me,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"bug",ariaLabel:t("nav.feedback","\uBC84\uADF8\uC2E0\uACE0"),onClick:c,selected:r==="feedback"}),p&&n.jsx(me,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"user-round",ariaLabel:t("nav.account","\uACC4\uC815"),onClick:p,selected:r==="account"})]}):null}function Vu(e){const{t}=Ne.useTranslation(),{item:r,itemKey:a,label:s,icon:l,active:i,onClick:u,style:c,state:p,labelStyle:h}=e||{},d=r?.key??a??"",m=r?.label??s??"",C=r?.icon??l??"",x=r?.badge??0,g=n.jsx("span",{className:"side-nav__icon-wrap",children:n.jsx(lt,{icon:C,label:typeof m=="string"?m:void 0,className:"side-nav__icon",maskClassName:"side-nav__icon-image",imgClassName:void 0,svgClassName:void 0})}),y=p==="disabled",v=`side-nav__item ${i?"active":""} ${p||""} ${y?"disabled":""} ${r?.child?"side-nav__item--child":""}`,_=o.useCallback(b=>{if(y)return;const B=b.detail>0;if(B)try{b.currentTarget.blur()}catch{}u?.(d,b.currentTarget,B)},[y,d,u]);return n.jsxs("button",{type:"button",className:v,onClick:_,"aria-label":typeof m=="string"?Hu(t,m,x):void 0,"aria-current":i?"page":void 0,style:c,"aria-disabled":y,children:[g,n.jsx("span",{className:"side-nav__label button-1 f",style:h,children:m}),x>0&&n.jsx(Sn,{position:"inline",number:Math.min(x,99),size:24,"aria-hidden":!0}),p==="loading"&&n.jsx("span",{className:"side-nav__spinner",role:"img","aria-label":t("loader.loading","\uBD88\uB7EC\uC624\uB294 \uC911\u2026")})]})}function qu(e){const{t}=Ne.useTranslation(),{items:r=[],activeKey:a,onChange:s,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:p,onHelp:h,onFeedback:d,appMode:m,onAppModeChange:C,scrollContainer:x}=e||{},g=m==="manager",y=o.useCallback(()=>C?.(g?"malgwi":"manager"),[C,g]),v=o.useRef(null),[_,b]=o.useState(null);o.useEffect(()=>{const k=v.current;if(!k)return;let E=null;const A=()=>{const{scrollHeight:$,clientHeight:H,scrollTop:F}=k;if($<=H+1){b(ie=>ie===null?ie:null);return}const U=Math.max(24,H/$*H),T=H-U,I=$-H,z={top:Math.round(F/I*T),height:Math.round(U)};b(ie=>ie&&ie.top===z.top&&ie.height===z.height?ie:z)},D=()=>{if(typeof requestAnimationFrame>"u"){A();return}E===null&&(E=requestAnimationFrame(()=>{E=null,A()}))};A(),k.addEventListener("scroll",D,{passive:!0});const j=typeof ResizeObserver<"u"?new ResizeObserver(D):null;j?.observe(k);for(const $ of Array.from(k.children))j?.observe($);return()=>{E!==null&&cancelAnimationFrame(E),k.removeEventListener("scroll",D),j?.disconnect()}},[r]);const B=o.useRef(null),N=o.useCallback(k=>{const E=v.current;E&&(k.preventDefault(),B.current={y:k.clientY,top:E.scrollTop},k.currentTarget.setPointerCapture(k.pointerId))},[]),f=o.useCallback(k=>{const E=v.current,A=B.current;!E||!A||(E.scrollTop=A.top+(k.clientY-A.y)*(E.scrollHeight/E.clientHeight))},[]),w=o.useCallback(k=>{B.current=null,k.currentTarget.hasPointerCapture(k.pointerId)&&k.currentTarget.releasePointerCapture(k.pointerId)},[]);return n.jsxs("nav",{"aria-label":t("nav.mainMenu","\uBA54\uC778 \uBA54\uB274"),className:"side-nav__menu",children:[n.jsxs("div",{ref:v,className:"side-nav__menu-list",children:[_&&n.jsx("div",{className:"side-nav__scroll","aria-hidden":"true",children:n.jsx("div",{className:"side-nav__scroll-thumb",style:{top:_.top,height:_.height},onPointerDown:N,onPointerMove:f,onPointerUp:w,onPointerCancel:w})}),(r||[]).filter(k=>!k.section&&(k.key||k.label)).map((k,E)=>n.jsxs(o.Fragment,{children:[k.divider&&n.jsx("div",{className:"side-nav__separator"}),n.jsx(Vu,{item:k,active:!!k.key&&k.key===a,state:k.disabled?"disabled":void 0,onClick:(A,D,j)=>{if(k.disabled)return;if(k.href){if(Wu(k.href)&&window.open(k.href,"_blank","noopener,noreferrer"),j)try{D?.blur()}catch{}return}if(s?.(k.key),is(x,"SideNav"),!j)return;try{D?.blur()}catch{}if(typeof window<"u"&&window.matchMedia){if(!window.matchMedia("(min-width: 768px) and (max-width: 1023px)").matches)return}else return;const $=document.querySelector(".header");if($){const H=typeof $.matches=="function";if(!(window.matchMedia("(hover: hover)").matches&&H&&$.matches(":hover"))){$.classList.add("header--force-collapsed");const F=()=>{$.classList.remove("header--force-collapsed"),$.removeEventListener("mouseenter",F)};$.addEventListener("mouseenter",F)}}}})]},k.key??`side-nav__item-${E}`)),C&&n.jsx("div",{className:"side-nav__separator side-nav__separator--short"}),C&&n.jsx(Vu,{item:{key:"__mode-switch__",label:g?t("nav.goToMalgwi","\uB9D0\uADC0\uB85C \uC774\uB3D9"):t("nav.goToManager","\uB9D0\uADC0\uB9E4\uB2C8\uC800\uB85C \uC774\uB3D9"),icon:g?"arrow-left":"arrow-right"},onClick:y})]}),n.jsx(Fv,{activeKey:a,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:p,onHelp:h,onFeedback:d})]})}var za='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Logo_SpeechEar_ko" xmlns="http://www.w3.org/2000/svg" width="583.33" height="240" viewBox="0 0 583.33 240"><g id="text"><path d="M278.07,115.18V47.71h85.73v67.47h-85.73ZM408.4,173.42v20.18h-125.33v-44.02h96.5v-5.96h-96.88v-20.18h124.18v44.02h-96.11v5.96h97.65ZM305.56,70.97v20.76h30.95v-20.76h-30.95ZM423.39,92.88h-16.53v25.37h-27.68V45.98h27.68v20.18h16.53v26.72Z"/><path d="M527.58,113.83v26.33c-7.82,3.59-20.06,5.38-36.71,5.38h-1.73v48.06h-27.68v-48.06h-34.21v-26.33h64.01c16.4,0,28.51-1.79,36.33-5.38ZM435.31,75.77v-26.33h80.35v62.09h-27.68v-35.75h-52.67ZM563.33,193.61h-27.68V45.98h27.68v147.63Z"/></g><g id="symbol"><path d="M183.92,56.08c-8.48-15.54-24.97-26.08-43.92-26.08h-60c-27.61,0-50,22.39-50,50v23.38l-19.22,21.15c-1.15,1.26-1.02,3.24.3,4.33,5.82,4.84,12.22,8.56,18.92,11.21.03,18.92,10.56,35.37,26.08,43.84,8.48,15.54,24.97,26.08,43.92,26.08h45.11c2.7,0,4.89,2.19,4.89,4.89,0,2.86,2.45,5.13,5.3,4.88,30.65-2.68,54.7-28.42,54.7-59.77v-60c0-18.95-10.54-35.44-26.08-43.92Z" fill="%234dcdc0"/><path d="M80,50c-16.57,0-30,13.43-30,30v80c0,8.66,2.21,16.81,6.08,23.92,7.1,3.88,15.25,6.08,23.92,6.08h80c16.57,0,30-13.43,30-30v-80c0-8.66-2.21-16.81-6.08-23.92-7.1-3.88-15.25-6.08-23.92-6.08h-80Z" fill="%23499cdf"/><rect x="69" y="88" width="12" height="24" rx="6" ry="6" fill="%23fff"/><path d="M111,140c-2.92,0-5.85-.75-8.5-2.28-2.39-1.38-3.21-4.44-1.82-6.83,1.38-2.39,4.44-3.21,6.83-1.82,2.74,1.58,6.21,1.13,8.44-1.1,1.08-1.08,1.76-2.45,1.97-3.95.9-6.37,3.71-12.42,8.14-17.5,2.64-3.02,4.03-6.9,3.93-10.92-.21-8.21-6.78-15.05-14.97-15.56-2.76-.18-5.42.33-7.88,1.51-2.49,1.19-5.48.12-6.66-2.37-1.19-2.49-.12-5.48,2.37-6.66,3.96-1.88,8.38-2.73,12.8-2.46,13.32.83,24.01,11.94,24.34,25.29.16,6.53-2.11,12.83-6.39,17.75-3.15,3.61-5.15,7.87-5.77,12.32-.52,3.67-2.18,7-4.8,9.63-3.27,3.27-7.62,4.97-12.02,4.97Z" fill="%23fff"/></g></svg>',cs='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Logo_SpeechEarManager_ko" xmlns="http://www.w3.org/2000/svg" width="1035.43" height="240" viewBox="0 0 1035.43 240"><g id="text"><path d="M278.07,115.18V47.71h85.73v67.47h-85.73ZM408.4,173.42v20.18h-125.33v-44.02h96.5v-5.96h-96.88v-20.18h124.18v44.02h-96.11v5.96h97.65ZM305.56,70.97v20.76h30.95v-20.76h-30.95ZM423.39,92.88h-16.53v25.37h-27.68V45.98h27.68v20.18h16.53v26.72Z"/><path d="M527.58,113.83v26.33c-7.82,3.59-20.06,5.38-36.71,5.38h-1.73v48.06h-27.68v-48.06h-34.21v-26.33h64.01c16.4,0,28.51-1.79,36.33-5.38ZM435.31,75.77v-26.33h80.35v62.09h-27.68v-35.75h-52.67ZM563.33,193.61h-27.68V45.98h27.68v147.63Z"/><path d="M644.64,52.32v131.48h-58.24V52.32h58.24ZM634.45,173.81V62.32h-38.25v111.49h38.25ZM713.65,193.61h-10.19v-75.16h-28.64v72.66h-10V46.94h10v61.32h28.64v-62.28h10.19v147.63Z"/><path d="M819.46,171.6c6.6-1.35,12.08-3.11,16.44-5.29v10.19c-4.23,2.31-9.64,4.1-16.24,5.38-6.6,1.28-13.3,1.92-20.09,1.92h-57.28V51.36h10.57v122.25h46.71c6.66,0,13.29-.67,19.89-2.02ZM851.47,193.8V45.98h10.57v147.63l-10.57.19Z"/><path d="M935.66,113.64l48.44,62.28-8.27,6.34-43.06-56.13c-4.36,16.66-10.38,29.92-18.07,39.79-7.69,9.87-16.72,15.83-27.1,17.88v-10.76c8.71-2.05,16.21-8.07,22.49-18.07,6.28-10,11.05-22.97,14.32-38.92,3.27-15.95,5.03-33.86,5.29-53.73h-39.21v-10h88.61v10h-39.02c-.13,18.84-1.6,35.95-4.42,51.32ZM1015.43,193.61h-10.38v-79.39h-37.87v-10.19h37.87v-58.05h10.38v147.63Z"/></g><g id="symbol"><path d="M183.92,56.08c-8.48-15.54-24.97-26.08-43.92-26.08h-60c-27.61,0-50,22.39-50,50v23.38l-19.22,21.15c-1.15,1.26-1.02,3.24.3,4.33,5.82,4.84,12.22,8.56,18.92,11.21.03,18.92,10.56,35.37,26.08,43.84,8.48,15.54,24.97,26.08,43.92,26.08h45.11c2.7,0,4.89,2.19,4.89,4.89,0,2.86,2.45,5.13,5.3,4.88,30.65-2.68,54.7-28.42,54.7-59.77v-60c0-18.95-10.54-35.44-26.08-43.92Z" fill="%234dcdc0"/><path d="M80,50c-16.57,0-30,13.43-30,30v80c0,8.66,2.21,16.81,6.08,23.92,7.1,3.88,15.25,6.08,23.92,6.08h80c16.57,0,30-13.43,30-30v-80c0-8.66-2.21-16.81-6.08-23.92-7.1-3.88-15.25-6.08-23.92-6.08h-80Z" fill="%23499cdf"/><rect x="69" y="88" width="12" height="24" rx="6" ry="6" fill="%23fff"/><path d="M111,140c-2.92,0-5.85-.75-8.5-2.28-2.39-1.38-3.21-4.44-1.82-6.83,1.38-2.39,4.44-3.21,6.83-1.82,2.74,1.58,6.21,1.13,8.44-1.1,1.08-1.08,1.76-2.45,1.97-3.95.9-6.37,3.71-12.42,8.14-17.5,2.64-3.02,4.03-6.9,3.93-10.92-.21-8.21-6.78-15.05-14.97-15.56-2.76-.18-5.42.33-7.88,1.51-2.49,1.19-5.48.12-6.66-2.37-1.19-2.49-.12-5.48,2.37-6.66,3.96-1.88,8.38-2.73,12.8-2.46,13.32.83,24.01,11.94,24.34,25.29.16,6.53-2.11,12.83-6.39,17.75-3.15,3.61-5.15,7.87-5.77,12.32-.52,3.67-2.18,7-4.8,9.63-3.27,3.27-7.62,4.97-12.02,4.97Z" fill="%23fff"/></g></svg>',Iv='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Symbol_SpeechEar" xmlns="http://www.w3.org/2000/svg" width="240" height="240" viewBox="0 0 240 240"><g id="symbol"><path d="M183.92,56.08c-8.48-15.54-24.97-26.08-43.92-26.08h-60c-27.61,0-50,22.39-50,50v23.38l-19.22,21.15c-1.15,1.26-1.02,3.24.3,4.33,5.82,4.84,12.22,8.56,18.92,11.21.03,18.92,10.56,35.37,26.08,43.84,8.48,15.54,24.97,26.08,43.92,26.08h45.11c2.7,0,4.89,2.19,4.89,4.89,0,2.86,2.45,5.13,5.3,4.88,30.65-2.68,54.7-28.42,54.7-59.77v-60c0-18.95-10.54-35.44-26.08-43.92Z" fill="%234dcdc0"/><path d="M80,50c-16.57,0-30,13.43-30,30v80c0,8.66,2.21,16.81,6.08,23.92,7.1,3.88,15.25,6.08,23.92,6.08h80c16.57,0,30-13.43,30-30v-80c0-8.66-2.21-16.81-6.08-23.92-7.1-3.88-15.25-6.08-23.92-6.08h-80Z" fill="%23499cdf"/><rect x="69" y="88" width="12" height="24" rx="6" ry="6" fill="%23fff"/><path d="M111,140c-2.92,0-5.85-.75-8.5-2.28-2.39-1.38-3.21-4.44-1.82-6.83,1.38-2.39,4.44-3.21,6.83-1.82,2.74,1.58,6.21,1.13,8.44-1.1,1.08-1.08,1.76-2.45,1.97-3.95.9-6.37,3.71-12.42,8.14-17.5,2.64-3.02,4.03-6.9,3.93-10.92-.21-8.21-6.78-15.05-14.97-15.56-2.76-.18-5.42.33-7.88,1.51-2.49,1.19-5.48.12-6.66-2.37-1.19-2.49-.12-5.48,2.37-6.66,3.96-1.88,8.38-2.73,12.8-2.46,13.32.83,24.01,11.94,24.34,25.29.16,6.53-2.11,12.83-6.39,17.75-3.15,3.61-5.15,7.87-5.77,12.32-.52,3.67-2.18,7-4.8,9.63-3.27,3.27-7.62,4.97-12.02,4.97Z" fill="%23fff"/></g></svg>';function Uu({src:e,alt:t,className:r,style:a,tone:s,textColor:l}){const i=!s&&!!l,u=_v(e,i),c="bl"+o.useId().replace(/[^a-zA-Z0-9]/g,"");return s?n.jsx("span",{className:xe("brand-logo","brand-logo--tone",r),role:t?"img":void 0,"aria-label":t||void 0,"aria-hidden":t?void 0:!0,style:{...a,"--brand-logo-src":`url("${e}")`,"--brand-logo-tone":s},children:n.jsx("img",{src:e,alt:"","aria-hidden":"true",className:"brand-logo__sizer",draggable:!1})}):i&&u?n.jsx("span",{className:xe("brand-logo","brand-logo--inline",r),role:t?"img":void 0,"aria-label":t||void 0,"aria-hidden":t?void 0:!0,style:{...a,"--brand-logo-text-color":l},dangerouslySetInnerHTML:{__html:vv(yv(u),c)}}):n.jsx("img",{src:e,alt:t,className:xe("brand-logo",r),style:a,draggable:!1})}function Gu({appMode:e}){const{t}=Ne.useTranslation(),r=e==="manager",a=r?cs:za,s=Iv;return n.jsxs("div",{className:"brand-identity__root","aria-label":t("header.biArea","BI \uC601\uC5ED"),children:[n.jsx("img",{src:s,alt:t("header.biSymbol","BI \uC2EC\uBCFC"),className:"brand-identity__image brand-identity__image--symbol"}),r?n.jsx("img",{src:a,alt:t("header.logoManager","\uB9D0\uADC0\uB9E4\uB2C8\uC800 \uB85C\uACE0"),className:"brand-identity__image brand-identity__image--logo"}):n.jsx(Uu,{src:a,alt:t("header.logoMalgwi","\uB9D0\uADC0 \uB85C\uACE0"),textColor:"light-dark(var(--color-pureBlack), var(--color-text-primary))",className:"brand-identity__image brand-identity__image--logo"})]})}function Ku({activeKey:e,onChange:t,items:r,malgwiItems:a,managerItems:s,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:p,onHelp:h,onFeedback:d,appMode:m,onAppModeChange:C,scrollContainer:x}){const{t:g}=Ne.useTranslation(),y=Bn("(max-width: 767px)"),v=o.useMemo(()=>(r??[]).filter($=>!$.section&&($.key||$.label)).map($=>({key:$.key,label:typeof $.label=="string"?$.label:void 0,icon:$.icon,state:$.disabled?"disabled":void 0,badgeCount:$.badge})),[r]),_=o.useCallback($=>{const H=r?.find(F=>F.key===$);if(!H?.disabled){if(H?.href){Wu(H.href)&&window.open(H.href,"_blank","noopener,noreferrer");return}t?.($)}},[r,t]),b=o.useMemo(()=>{const $=[];return i&&$.push({key:"debug",icon:"terminal",label:g("nav.debug","\uB514\uBC84\uADF8"),onClick:i}),h&&$.push({key:"help",icon:"message-circle-question-mark",label:g("nav.help","\uB3C4\uC6C0\uB9D0"),onClick:h}),u&&$.push({key:"notifications",icon:"bell",label:g("nav.notifications","\uC54C\uB9BC"),badgeCount:l,onClick:u}),p&&$.push({key:"settings",icon:"settings",label:g("nav.settings","\uC124\uC815"),onClick:p}),d&&$.push({key:"feedback",icon:"bug",label:g("nav.feedback","\uBC84\uADF8\uC2E0\uACE0"),onClick:d}),c&&$.push({key:"account",icon:"user-round",label:g("nav.account","\uACC4\uC815"),onClick:c}),$},[g,i,u,p,h,d,c,l]),B=o.useCallback(($,H)=>({position:"fixed",top:$.bottom+8,right:Math.max(8,window.innerWidth-$.right),zIndex:ra(H)}),[]),N=o.useId(),{open:f,toggle:w,close:k,style:E,triggerRef:A,menuRef:D}=aa({computeStyle:B,onScroll:"ignore",onResize:"reposition"}),j=o.useMemo(()=>[{items:b.map($=>({label:$.label,icon:$.icon,badgeCount:$.badgeCount,selected:$.selected??(!!$.key&&$.key===e),closeOnSelect:!0,onClick:()=>{$.onClick?.(),k()}}))}],[b,e,k]);return n.jsxs("aside",{className:`header${m==="manager"?" header--manager":""}`,children:[n.jsxs("div",{className:"header__bi",children:[n.jsx(Gu,{appMode:m}),n.jsxs("div",{className:"header__menu-button",ref:A,children:[n.jsx(me,{htmlType:"button",size:48,type:"dot",shape:"pill",variant:"default",useBorder:!1,icon:"menu",ariaLabel:u&&l&&l>0?g("nav.badgeInsideLabel",{label:g("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),count:l,defaultValue:"{{label}}, \uC548\uC5D0 \uC54C\uB9BC {{count}}\uAC1C"}):g("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),onClick:w,"aria-expanded":f,"aria-controls":f?N:void 0}),!!u&&!!l&&l>0&&n.jsx(Sn,{number:Math.min(l,99),size:24,"aria-hidden":!0}),f&&bn.createPortal(n.jsx("div",{id:N,role:"group","aria-label":g("header.utilMenu","\uC720\uD2F8\uB9AC\uD2F0 \uBA54\uB274"),className:ce("tooltip__content"),style:E,ref:D,children:n.jsx(nr,{columns:j,onClose:k})}),document.body)]})]}),n.jsx(qu,{scrollContainer:x,items:r,activeKey:e??void 0,onChange:t,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:p,onHelp:h,onFeedback:d,appMode:m,onAppModeChange:C}),y&&n.jsx(zu,{items:v,activeKey:e??void 0,onChange:_,scrollContainer:x,appMode:m,onAppModeChange:C})]})}const Ov=Ku;function cn(e){const{type:t="dot",size:r,className:a="","aria-label":s,"aria-hidden":l,role:i}=e;(e.icon!==void 0||e.number!==void 0||e.position!==void 0||e.animate!==void 0||e.onClick!==void 0)&&Tt("badge-circle-props","[ihab/core] Badge \uAC00 \uC6D0\uD615 \uBC43\uC9C0\uC758 \uD504\uB86D(icon \xB7 number \xB7 position \xB7 animate \xB7 onClick)\uC744 \uBC1B\uC558\uC2B5\uB2C8\uB2E4. \uC6D0\uD615\uC740 \uC774\uC81C CircleBadge \uAC00 \uADF8\uB9BD\uB2C8\uB2E4 \u2014 Badge \uC758 dot \uB294 \uC791\uC740 \uC54C\uC57D \uC774\uB984\uD45C\uC785\uB2C8\uB2E4. \uADF8 \uC790\uB9AC\uB97C <CircleBadge \u2026/> \uB85C \uBC14\uAFB8\uC138\uC694."),i&&l&&Tt("badge-role-with-hidden",`[ihab/core] Badge \uAC00 role="${i}" \uACFC aria-hidden \uC744 \uD568\uAED8 \uBC1B\uC558\uC2B5\uB2C8\uB2E4. \uC228\uAE34 \uAC83\uC740 \uB0AD\uB3C5\uAE30\uC5D0 \uB07C\uC5B4\uB4E4 \uC218 \uC5C6\uC5B4 \uC544\uBB34\uAC83\uB3C4 \uC548 \uC77D\uD799\uB2C8\uB2E4 \u2014 \uB458 \uC911 \uD558\uB098\uB9CC \uC8FC\uC138\uC694.`);const{label:u,children:c,variant:p="default",fill:h="filled",useBg:d=!0,minWidth:m,iconLeft:C,iconRight:x,color:g}=e,y=t==="bar",v=typeof r=="number"?"medium":r??"medium",_=(y?{small:"caption-2",medium:"body-3",large:"body-2"}:{small:"caption-2b",medium:"body-3b",large:"body-2b"})[v]??(y?"body-2":"body-2b"),b={small:12,medium:14,large:16}[v]??14,B=xe("badge",y?"badge--bar":"",`badge--${p}`,`badge--${v}`,h!=="filled"?`badge--${h}`:"",h==="outline"&&!d?"badge--no-bg":"",_,a),N=g?.startsWith("--")?`var(${g})`:g,f=m!==void 0||N?{...m!==void 0?{minWidth:typeof m=="number"?`${m}px`:m}:{},...N?{"--badge-color":N}:{}}:void 0;return n.jsxs("span",{className:B,style:f,"aria-label":l?void 0:s,role:i??(s&&!l?"img":void 0),"aria-hidden":l||void 0,children:[C&&n.jsx(lt,{icon:C,size:b,className:"badge__icon"}),u??c,x&&n.jsx(lt,{icon:x,size:b,className:"badge__icon"})]})}const zv=()=>Pt.t("passCard.planSuffix","\uC774\uC6A9\uAD8C");function Yu(e){if(!(e==null||e==="")){if(typeof e=="string"&&/^\s*\d[\d,]*\s*$/.test(e)){const t=Number(e.replace(/[,\s]/g,""));if(Number.isFinite(t))return Ar(`${t.toLocaleString("ko-KR")}\uC6D0`)}return Ar(typeof e=="number"?`${e.toLocaleString("ko-KR")}\uC6D0`:e)}}function Wv(e){const t=`${e.code??""} ${e.name??""}`.toLowerCase();return/manager|매니저/.test(t)?"manager":"speechear"}function Hv(e){if(e.durationDays&&e.durationDays>0){const l=e.durationDays;return l%365===0?`${l/365}\uB144`:`${l}\uC77C`}const t=(e.code??"").match(/(\d+)(d|y)\b/i);if(t)return t[2].toLowerCase()==="y"?`${t[1]}\uB144`:`${t[1]}\uC77C`;const r=e.name??"",a=r.match(/(\d+\s*(?:년|개월|주|일))\s*(?:이용권)?\s*$/);if(a)return a[1].replace(/\s+/g,"");const s=r.match(/(\d+)\s*-?\s*(day|year)s?\b/i);return s?s[2].toLowerCase()==="year"?`${s[1]}\uB144`:`${s[1]}\uC77C`:r||zv()}function Vv(e){const t=(e??"").match(/(\d+)(d|y)\b/i);if(!t)return null;const r=Number(t[1]);return t[2].toLowerCase()==="y"?r*365:r}function Zu(e){return{type:e.type??Wv(e),plan:Hv(e),label:e.label,price:Yu(e.price),originalPrice:Yu(e.originalPrice),discountLabel:e.discountLabel}}var qv='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Logo_SpeechEar_ko_mono" xmlns="http://www.w3.org/2000/svg" width="583.33" height="240" viewBox="0 0 583.33 240"><g id="text"><path d="M278.07,115.18V47.71h85.73v67.47h-85.73ZM408.4,173.42v20.18h-125.33v-44.02h96.5v-5.96h-96.88v-20.18h124.18v44.02h-96.11v5.96h97.65ZM305.56,70.97v20.76h30.95v-20.76h-30.95ZM423.39,92.88h-16.53v25.37h-27.68V45.98h27.68v20.18h16.53v26.72Z" fill="%23fff"/><path d="M527.58,113.83v26.33c-7.82,3.59-20.06,5.38-36.71,5.38h-1.73v48.06h-27.68v-48.06h-34.21v-26.33h64.01c16.4,0,28.51-1.79,36.33-5.38ZM435.31,75.77v-26.33h80.35v62.09h-27.68v-35.75h-52.67ZM563.33,193.61h-27.68V45.98h27.68v147.63Z" fill="%23fff"/></g><g id="symbol"><g opacity=".5"><path d="M80,50c-16.57,0-30,13.43-30,30v80c0,8.66,2.21,16.81,6.08,23.92,7.1,3.88,15.25,6.08,23.92,6.08h80c16.57,0,30-13.43,30-30v-80c0-8.66-2.21-16.81-6.08-23.92-7.1-3.88-15.25-6.08-23.92-6.08h-80Z" fill="%23fff"/></g><path d="M140,30h-60c-27.61,0-50,22.39-50,50v23.38l-19.22,21.15c-1.15,1.26-1.02,3.24.3,4.33,5.82,4.84,12.22,8.56,18.92,11.21.03,18.92,10.56,35.37,26.08,43.84-3.88-7.1-6.08-15.25-6.08-23.92v-80c0-16.57,13.43-30,30-30h80c8.66,0,16.81,2.21,23.92,6.08-8.48-15.54-24.97-26.08-43.92-26.08Z" fill="%23fff"/><path d="M183.92,56.08c3.88,7.1,6.08,15.25,6.08,23.92v80c0,16.57-13.43,30-30,30h-80c-8.66,0-16.81-2.21-23.92-6.08,8.48,15.54,24.97,26.08,43.92,26.08h45.11c2.7,0,4.89,2.19,4.89,4.89,0,2.86,2.45,5.13,5.3,4.88,30.65-2.68,54.7-28.42,54.7-59.77v-60c0-18.95-10.54-35.44-26.08-43.92Z" fill="%23fff"/><rect x="69" y="88" width="12" height="24" rx="6" ry="6" fill="%23fff"/><path d="M111,140c-2.92,0-5.85-.75-8.5-2.28-2.39-1.38-3.21-4.44-1.82-6.83,1.38-2.39,4.44-3.21,6.83-1.82,2.74,1.58,6.21,1.13,8.44-1.1,1.08-1.08,1.76-2.45,1.97-3.95.9-6.37,3.71-12.42,8.14-17.5,2.64-3.02,4.03-6.9,3.93-10.92-.21-8.21-6.78-15.05-14.97-15.56-2.76-.18-5.42.33-7.88,1.51-2.49,1.19-5.48.12-6.66-2.37-1.19-2.49-.12-5.48,2.37-6.66,3.96-1.88,8.38-2.73,12.8-2.46,13.32.83,24.01,11.94,24.34,25.29.16,6.53-2.11,12.83-6.39,17.75-3.15,3.61-5.15,7.87-5.77,12.32-.52,3.67-2.18,7-4.8,9.63-3.27,3.27-7.62,4.97-12.02,4.97Z" fill="%23fff"/></g></svg>',Uv='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Logo_SpeechEarManager_ko_mono" xmlns="http://www.w3.org/2000/svg" width="1035.43" height="240" viewBox="0 0 1035.43 240"><g id="text"><path d="M278.07,115.18V47.71h85.73v67.47h-85.73ZM408.4,173.42v20.18h-125.33v-44.02h96.5v-5.96h-96.88v-20.18h124.18v44.02h-96.11v5.96h97.65ZM305.56,70.97v20.76h30.95v-20.76h-30.95ZM423.39,92.88h-16.53v25.37h-27.68V45.98h27.68v20.18h16.53v26.72Z" fill="%23fff"/><path d="M527.58,113.83v26.33c-7.82,3.59-20.06,5.38-36.71,5.38h-1.73v48.06h-27.68v-48.06h-34.21v-26.33h64.01c16.4,0,28.51-1.79,36.33-5.38ZM435.31,75.77v-26.33h80.35v62.09h-27.68v-35.75h-52.67ZM563.33,193.61h-27.68V45.98h27.68v147.63Z" fill="%23fff"/><path d="M644.64,52.32v131.48h-58.24V52.32h58.24ZM634.45,173.81V62.32h-38.25v111.49h38.25ZM713.65,193.61h-10.19v-75.16h-28.64v72.66h-10V46.94h10v61.32h28.64v-62.28h10.19v147.63Z" fill="%23fff"/><path d="M819.46,171.6c6.6-1.35,12.08-3.11,16.44-5.29v10.19c-4.23,2.31-9.64,4.1-16.24,5.38-6.6,1.28-13.3,1.92-20.09,1.92h-57.28V51.36h10.57v122.25h46.71c6.66,0,13.29-.67,19.89-2.02ZM851.47,193.8V45.98h10.57v147.63l-10.57.19Z" fill="%23fff"/><path d="M935.66,113.64l48.44,62.28-8.27,6.34-43.06-56.13c-4.36,16.66-10.38,29.92-18.07,39.79-7.69,9.87-16.72,15.83-27.1,17.88v-10.76c8.71-2.05,16.21-8.07,22.49-18.07,6.28-10,11.05-22.97,14.32-38.92,3.27-15.95,5.03-33.86,5.29-53.73h-39.21v-10h88.61v10h-39.02c-.13,18.84-1.6,35.95-4.42,51.32ZM1015.43,193.61h-10.38v-79.39h-37.87v-10.19h37.87v-58.05h10.38v147.63Z" fill="%23fff"/></g><g id="symbol"><g opacity=".5"><path d="M80,50c-16.57,0-30,13.43-30,30v80c0,8.66,2.21,16.81,6.08,23.92,7.1,3.88,15.25,6.08,23.92,6.08h80c16.57,0,30-13.43,30-30v-80c0-8.66-2.21-16.81-6.08-23.92-7.1-3.88-15.25-6.08-23.92-6.08h-80Z" fill="%23fff"/></g><path d="M140,30h-60c-27.61,0-50,22.39-50,50v23.38l-19.22,21.15c-1.15,1.26-1.02,3.24.3,4.33,5.82,4.84,12.22,8.56,18.92,11.21.03,18.92,10.56,35.37,26.08,43.84-3.88-7.1-6.08-15.25-6.08-23.92v-80c0-16.57,13.43-30,30-30h80c8.66,0,16.81,2.21,23.92,6.08-8.48-15.54-24.97-26.08-43.92-26.08Z" fill="%23fff"/><path d="M183.92,56.08c3.88,7.1,6.08,15.25,6.08,23.92v80c0,16.57-13.43,30-30,30h-80c-8.66,0-16.81-2.21-23.92-6.08,8.48,15.54,24.97,26.08,43.92,26.08h45.11c2.7,0,4.89,2.19,4.89,4.89,0,2.86,2.45,5.13,5.3,4.88,30.65-2.68,54.7-28.42,54.7-59.77v-60c0-18.95-10.54-35.44-26.08-43.92Z" fill="%23fff"/><rect x="69" y="88" width="12" height="24" rx="6" ry="6" fill="%23fff"/><path d="M111,140c-2.92,0-5.85-.75-8.5-2.28-2.39-1.38-3.21-4.44-1.82-6.83,1.38-2.39,4.44-3.21,6.83-1.82,2.74,1.58,6.21,1.13,8.44-1.1,1.08-1.08,1.76-2.45,1.97-3.95.9-6.37,3.71-12.42,8.14-17.5,2.64-3.02,4.03-6.9,3.93-10.92-.21-8.21-6.78-15.05-14.97-15.56-2.76-.18-5.42.33-7.88,1.51-2.49,1.19-5.48.12-6.66-2.37-1.19-2.49-.12-5.48,2.37-6.66,3.96-1.88,8.38-2.73,12.8-2.46,13.32.83,24.01,11.94,24.34,25.29.16,6.53-2.11,12.83-6.39,17.75-3.15,3.61-5.15,7.87-5.77,12.32-.52,3.67-2.18,7-4.8,9.63-3.27,3.27-7.62,4.97-12.02,4.97Z" fill="%23fff"/></g></svg>',Xu='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Symbol_IHAB_mono" xmlns="http://www.w3.org/2000/svg" width="240" height="240" viewBox="0 0 240 240"><path id="symbol" d="M190.71,49.29c-18.1-18.1-43.1-29.29-70.71-29.29s-34.94,28.87-53.03,46.97h0c-18.1,18.1-46.97,25.56-46.97,53.03s11.19,52.61,29.29,70.71c18.1,18.1,43.1,29.29,70.71,29.29s52.61-11.19,70.71-29.29c18.1-18.1,29.29-43.1,29.29-70.71s-11.19-52.61-29.29-70.71ZM155.36,155.36c-9.05,9.05-21.55,14.64-35.36,14.64s-26.31-5.6-35.36-14.64c-9.05-9.05-14.64-21.55-14.64-35.36s5.6-26.31,14.64-35.36c9.05-9.05,21.55-14.64,35.36-14.64s26.31,5.6,35.36,14.64c9.05,9.05,14.64,21.55,14.64,35.36s-5.6,26.31-14.64,35.36Z" fill="%23fff"/></svg>';const pr={text:"--pass-card-text",sub:"--pass-card-sub",copyright:"--pass-card-copyright"},ds=new WeakMap;function Gv(e){if(e)return ds.get(e)}function Hn(e,t){e&&(e.style.setProperty(pr.text,t.text),e.style.setProperty(pr.sub,t.sub),t.copyrightColor&&e.style.setProperty(pr.copyright,t.copyrightColor),ds.set(e,t))}function Vn(e){e&&(e.style.removeProperty(pr.text),e.style.removeProperty(pr.sub),e.style.removeProperty(pr.copyright),ds.delete(e))}const Ju={text:"var(--color-pureBlack)",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-text-primary)"};function Qu(e={}){const t=Ht(Ju,Hn,Vn);return n.jsxs("div",{ref:t,className:"pass-card-bg pass-card-bg-two-circle","aria-hidden":"true",children:[n.jsx("div",{className:"pass-card-bg-two-circle__c1"}),n.jsx("div",{className:"pass-card-bg-two-circle__c3"}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-two-circle__symbol",style:{"--symbol-url":`url("${Xu}")`}})]})}const ec="M190.71,49.29c-18.1-18.1-43.1-29.29-70.71-29.29s-34.94,28.87-53.03,46.97h0c-18.1,18.1-46.97,25.56-46.97,53.03s11.19,52.61,29.29,70.71c18.1,18.1,43.1,29.29,70.71,29.29s52.61-11.19,70.71-29.29c18.1-18.1,29.29-43.1,29.29-70.71s-11.19-52.61-29.29-70.71Z",jr=240;var oa='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Symbol_IHAB" xmlns="http://www.w3.org/2000/svg" width="240" height="240" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 240 240"><defs><linearGradient id="linear-gradient" x1="62.99" y1="62.99" x2="190.71" y2="190.71" gradientUnits="userSpaceOnUse"><stop offset=".2" stop-color="%23499cdf"/><stop offset=".8" stop-color="%234dcdc0"/></linearGradient></defs><path id="symbol" d="M190.71,49.29c-18.1-18.1-43.1-29.29-70.71-29.29s-34.94,28.87-53.03,46.97h0c-18.1,18.1-46.97,25.56-46.97,53.03s11.19,52.61,29.29,70.71c18.1,18.1,43.1,29.29,70.71,29.29s52.61-11.19,70.71-29.29c18.1-18.1,29.29-43.1,29.29-70.71s-11.19-52.61-29.29-70.71ZM155.36,155.36c-9.05,9.05-21.55,14.64-35.36,14.64s-26.31-5.6-35.36-14.64c-9.05-9.05-14.64-21.55-14.64-35.36s5.6-26.31,14.64-35.36c9.05-9.05,21.55-14.64,35.36-14.64s26.31,5.6,35.36,14.64c9.05,9.05,14.64,21.55,14.64,35.36s-5.6,26.31-14.64,35.36Z" fill="url(%23linear-gradient)"/></svg>';const Kv={text:"var(--color-text-primary)",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"},Yv=100,Zv=[{scale:1,opacity:.55},{scale:2,opacity:.4},{scale:3.1,opacity:.28},{scale:4.5,opacity:.18},{scale:6,opacity:.1}];function tc(e={}){const t=Ht(Kv,Hn,Vn),r="var(--color-main)",a=270,s=170;return n.jsxs("div",{ref:t,className:"pass-card-bg pass-card-bg-sound-move","aria-hidden":"true",children:[n.jsx("svg",{className:"pass-card-bg-sound-move__svg",viewBox:"0 0 300 189",preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",children:Zv.map(({scale:l,opacity:i},u)=>n.jsx("g",{transform:`translate(${a} ${s}) scale(${l*Yv/jr}) translate(${-jr/2} ${-jr/2})`,opacity:i,children:n.jsx("path",{d:ec,fill:"none",stroke:r,strokeWidth:"1.5",vectorEffect:"non-scaling-stroke"})},u))}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-sound-move__symbol",style:{"--symbol-url":`url("${oa}")`}})]})}const Xv={text:"#ffffff",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",logoColor:"_mono",copyrightColor:"#ffffff"},Jv=100,Qv=[{scale:1,opacity:.55},{scale:2,opacity:.4},{scale:3.1,opacity:.28},{scale:4.5,opacity:.18},{scale:6,opacity:.1}];function ex(e={}){const t=Ht(Xv,Hn,Vn),r="#ffffff",a=270,s=170;return n.jsxs("div",{ref:t,className:"pass-card-bg pass-card-bg-sound-move-v1","aria-hidden":"true",children:[n.jsx("svg",{className:"pass-card-bg-sound-move-v1__svg",viewBox:"0 0 300 189",preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",children:Qv.map(({scale:l,opacity:i},u)=>n.jsx("g",{transform:`translate(${a} ${s}) scale(${l*Jv/jr}) translate(${-jr/2} ${-jr/2})`,opacity:i,children:n.jsx("path",{d:ec,fill:"none",stroke:r,strokeWidth:"1.5",vectorEffect:"non-scaling-stroke"})},u))}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-sound-move-v1__symbol",style:{"--symbol-url":`url("${Xu}")`}})]})}const tx={text:"var(--color-text-primary)",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"};function nx(e={}){const t=Ht(tx,Hn,Vn);return n.jsxs("div",{ref:t,className:"pass-card-bg pass-card-bg-talk","aria-hidden":"true",children:[n.jsx("div",{className:"pass-card-bg-talk__shape pass-card-bg-talk__shape--left"}),n.jsx("div",{className:"pass-card-bg-talk__shape pass-card-bg-talk__shape--right"}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-talk__symbol",style:{"--symbol-url":`url("${oa}")`}})]})}const rx={Logo_SpeechEar_ko:{"":za,_mono:qv},Logo_SpeechEarManager_ko:{"":cs,_mono:Uv}};function ax(e,t){if(e)return rx[e]?.[t??""]??void 0}const ox={speechear:za,manager:cs},sx={speechear:"Logo_SpeechEar_ko",manager:"Logo_SpeechEarManager_ko"},nc=10;function lx(e){return e<=0?0:e>=86400?Math.floor(e/86400)*86400:e>=3600?Math.floor(e/3600)*3600:e>=60?Math.floor(e/60)*60:Math.floor(e)}function rc(e,t){if(e<=0)return t("passCard.remainingSecond",{n:0});const r=Math.floor(e/86400);if(r>0)return t("passCard.remainingDay",{n:r});const a=Math.floor(e/3600);if(a>0)return t("passCard.remainingHour",{n:a});const s=Math.floor(e/60);return s>0?t("passCard.remainingMinute",{n:s}):t("passCard.remainingSecond",{n:Math.floor(e)})}function ix(e,t,r){if(e==="manager"){const a=/년/.test(t)||/yr|year/i.test(t)||/1년|365/.test(t),s=r==="\uC624\uD508\uD2B9\uAC00"||r===Pt.t("passCard.specialLabel");return a?n.jsx(nx,{}):s?n.jsx(ex,{}):n.jsx(tc,{})}return n.jsx(Qu,{})}function ac({ariaLabel:e,product:t,showPrice:r=!1,plan:a,type:s,endDate:l,remainingSeconds:i,endInclusive:u=!1,state:c="active",bg:p,bgOnly:h=!1,textColor:d,subColor:m,copyrightColor:C,logoSrc:x,label:g,price:y,originalPrice:v,discountLabel:_,onUse:b,onRefund:B,onDelete:N}){const{t:f}=Ne.useTranslation(),w=t?Zu(t):void 0,k=s??w?.type??"speechear",E=a??w?.plan??f("passCard.planSuffix","\uC774\uC6A9\uAD8C"),A=g??w?.label,D=y??(r?w?.price:void 0),j=v??(r?w?.originalPrice:void 0),$=_??w?.discountLabel,H=o.useMemo(()=>{if(D)return null;const J=t?.durationDays??Vv(t?.code);if(!J||J<=0)return i!=null?{percent:null,remainingLabel:rc(i,f)}:null;const O=J*86400;let W;if(i!=null)W=i;else if((c==="active"||c==="expired")&&l){const ee=new Date(l).getTime();if(Number.isNaN(ee))return null;const be=/^(\d{4})-(\d{2})-(\d{2})/.exec(String(l)),je=/^(\d{4})-(\d{2})-(\d{2})/.exec(Qr()),De=Math.round(be&&je?(Date.UTC(+be[1],+be[2]-1,+be[3])-Date.UTC(+je[1],+je[2]-1,+je[3]))/864e5:(ee-Date.now())/864e5);W=Math.max(0,u?De+1:De)*86400}else c==="expired"?W=0:W=O;const q=lx(W),oe=Math.max(0,Math.min(100,Math.floor(Math.min(q,O)/O*100)));return c==="pending"&&oe>=100?null:{percent:oe,remainingLabel:c==="expired"?f("passCard.expired","\uB9CC\uB8CC\uB428"):rc(W,f)}},[D,c,l,i,u,t?.durationDays,t?.code,f]),F=o.useRef(null),[U,T]=o.useState({}),[I,z]=o.useState(null),ie=!!(b||B||N),te=o.useRef(!1),P=o.useRef(void 0),[G,X]=o.useState(x);o.useLayoutEffect(()=>{X(x)},[x]),o.useLayoutEffect(()=>{const J=F.current;J&&(d!==void 0&&J.style.setProperty("--pass-card-text",d),m!==void 0&&J.style.setProperty("--pass-card-sub",m),C!==void 0&&J.style.setProperty("--pass-card-copyright",C))},[d,m,C]),o.useLayoutEffect(()=>{const J=F.current;if(!J)return;const O=Gv(J);if(!x){const W=sx[k],q=c==="expired"?"_mono":O?.logoColor??"",oe=ax(W,q);X(oe)}},[p,x,k,c]);const K=J=>{const O=F.current;if(!O)return null;const{left:W,top:q,width:oe,height:ee}=O.getBoundingClientRect(),be=(J.clientX-W)/oe-.5;return{rotateX:-((J.clientY-q)/ee-.5)*nc,rotateY:be*nc}},L=(J,O)=>{const W=O*-.7,q=J*.7+10,oe=20+(Math.abs(J)+Math.abs(O))*.4;return`${W}px ${q}px ${oe}px rgba(0, 0, 0, 0.18)`},R=o.useCallback(J=>{if(ur())return;te.current=!0,clearTimeout(P.current),P.current=setTimeout(()=>{te.current=!1},200);const O=K(J);O&&T({transform:`perspective(800px) rotateX(${O.rotateX}deg) rotateY(${O.rotateY}deg) scale3d(1.03, 1.03, 1.03)`,boxShadow:L(O.rotateX,O.rotateY),transition:"transform 0.25s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.25s cubic-bezier(0.23, 1, 0.32, 1)"})},[]),S=o.useCallback(J=>{if(ur())return;const O=K(J);if(!O)return;const W=te.current?"transform 0.2s ease, box-shadow 0.2s ease":"none";T({transform:`perspective(800px) rotateX(${O.rotateX}deg) rotateY(${O.rotateY}deg) scale3d(1.03, 1.03, 1.03)`,boxShadow:L(O.rotateX,O.rotateY),transition:W})},[]),V=o.useCallback(()=>{clearTimeout(P.current),te.current=!1,T({transform:"perspective(800px) rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)",boxShadow:"0px 4px 16px rgba(0, 0, 0, 0.08)",transition:"transform 0.5s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.5s cubic-bezier(0.23, 1, 0.32, 1)"})},[]),ae=o.useCallback(()=>z(null),[]),ne=o.useMemo(()=>{const J=f("passCard.planSuffix","\uC774\uC6A9\uAD8C"),O=E.replace("\uC774\uC6A9\uAD8C","").replace(J==="\uC774\uC6A9\uAD8C"?"":J,"").trim(),W=O.match(/^(.*?)(일|년)$/);return W?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"h0 pass-card__plan-number",children:W[1]}),n.jsx("span",{className:"h5b pass-card__plan-unit",children:W[2]==="\uB144"?f("passCard.unitYear","\uB144"):f("passCard.unitDay","\uC77C")})]}):n.jsx("span",{className:"h0",children:O})},[E,f]),re=o.useMemo(()=>{const J=Ar(D);if(!J)return null;const O=J.match(/^([^\d]*)([\d.,]+)(.*)$/);if(!O)return n.jsx("span",{className:"h1",children:J});const[,W,q,oe]=O;return n.jsxs(n.Fragment,{children:[W&&n.jsx("span",{className:"h5 pass-card__price-symbol",children:W}),n.jsx("span",{className:"h1 pass-card__price-amount",children:q}),oe.trim()&&n.jsx("span",{className:"h5 pass-card__price-symbol",children:oe.trim()})]})},[D]),ue=o.useCallback(()=>{ie&&z(J=>{if(J)return null;const O=F.current?.getBoundingClientRect();if(!O)return null;const W=50;return{left:O.left,right:O.right,width:O.width,height:O.height,x:O.x,y:O.y+W,top:O.top+W,bottom:O.bottom+W}})},[ie]),Be=o.useCallback(J=>{ie&&(J.key==="Enter"||J.key===" ")&&(J.preventDefault(),ue())},[ie,ue]),le=[{items:[...b?[{label:f("passCard.menu.use","\uC0AC\uC6A9\uD558\uAE30"),icon:"play",onClick:()=>{b(),z(null)},closeOnSelect:!0}]:[],...B?[{label:f("passCard.menu.refund","\uD658\uBD88\uD558\uAE30"),icon:"rotate-ccw",onClick:()=>{B(),z(null)},closeOnSelect:!0}]:[],...N?[{label:f("passCard.menu.delete","\uC0AD\uC81C\uD558\uAE30"),icon:"trash-2",onClick:()=>{N(),z(null)},closeOnSelect:!0}]:[]]}];return n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"pass-card-frame",children:n.jsxs("div",{ref:F,className:`pass-card pass-card--${c}${ie?" pass-card--clickable":""}`,style:U,onMouseEnter:R,onMouseMove:S,onMouseLeave:V,onPointerUp:J=>{J.pointerType==="touch"&&V()},onPointerCancel:J=>{J.pointerType==="touch"&&V()},onClick:ue,onKeyDown:ie?Be:void 0,role:ie?"button":void 0,tabIndex:ie?0:void 0,"aria-label":e,"aria-haspopup":ie?"menu":void 0,"aria-expanded":ie?!!I:void 0,children:[p??ix(k,E,A),!h&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"pass-card__top",children:n.jsxs("div",{className:"pass-card__top-left",children:[n.jsx("img",{src:G??ox[k],className:"pass-card__logo",alt:k==="manager"?f("header.logoManager","\uB9D0\uADC0\uB9E4\uB2C8\uC800 \uB85C\uACE0"):f("header.logoMalgwi","\uB9D0\uADC0 \uB85C\uACE0")}),n.jsxs("div",{className:"pass-card__plan",children:[n.jsx("div",{children:ne}),n.jsx("span",{className:"h5b pass-card__plan-suffix",children:A?f("passCard.labeledPlan",{label:A}):f("passCard.planSuffix","\uC774\uC6A9\uAD8C")})]})]})}),D?n.jsxs("div",{className:"pass-card__price-area",children:[$&&n.jsx("span",{className:"pass-card__discount body-3",children:$}),n.jsxs("div",{className:"pass-card__price",children:[j&&n.jsx("span",{className:"pass-card__price-original body-3",children:Ar(j)}),re]})]}):H?n.jsxs("div",{className:"pass-card__usage",children:[n.jsx("span",{className:"h5b pass-card__usage-remaining",children:H.remainingLabel}),H.percent!=null&&n.jsxs("span",{className:"pass-card__usage-percent",children:[n.jsx("span",{className:"h1 pass-card__usage-value",children:H.percent}),n.jsx("span",{className:"h5b pass-card__usage-symbol",children:"%"})]})]}):n.jsx("div",{className:"pass-card__copyright caption-2","aria-hidden":"true",children:"\xA9 IHAB Corp. All rights reserved."})]})]})}),I&&n.jsx(sn,{anchorRect:I,onClose:ae,ariaLabel:f("tooltip.menu","\uBA54\uB274"),children:n.jsx(nr,{columns:le,onClose:ae,size:"small"})})]})}const ux={text:"var(--color-text-primary)",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-text-primary)"};function cx(e={}){const t=`passcard-sound-line-grad-${o.useId()}`,r=Ht(ux,Hn,Vn);return n.jsxs("div",{ref:r,className:"pass-card-bg pass-card-bg-sound-line","aria-hidden":"true",children:[n.jsxs("svg",{className:"pass-card-bg-sound-line__svg",viewBox:"0 0 500 300",preserveAspectRatio:"xMidYMid slice",xmlns:"http://www.w3.org/2000/svg",children:[n.jsx("defs",{children:n.jsxs("linearGradient",{id:t,x1:"0",y1:"0",x2:"1",y2:"0",children:[n.jsx("stop",{offset:"20%",stopColor:"var(--color-main)"}),n.jsx("stop",{offset:"80%",stopColor:"var(--color-sub)"})]})}),n.jsx("g",{transform:"translate(25, 45)",children:n.jsx("path",{d:"M -30 150 C 40 80, 100 220, 160 150 S 280 80, 340 150 S 460 220, 510 150",fill:"none",stroke:`url(#${t})`,strokeWidth:"50",strokeLinecap:"round"})})]}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-sound-line__symbol",style:{"--symbol-url":`url("${oa}")`}})]})}const dx={text:"var(--color-text-primary)",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"};function px(e={}){const t=Ht(dx,Hn,Vn);return n.jsxs("div",{ref:t,className:"pass-card-bg pass-card-bg-talk-v1","aria-hidden":"true",children:[n.jsx("div",{className:"pass-card-bg-talk-v1__shape pass-card-bg-talk-v1__shape--left"}),n.jsx("div",{className:"pass-card-bg-talk-v1__shape pass-card-bg-talk-v1__shape--right"}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-talk-v1__symbol",style:{"--symbol-url":`url("${oa}")`}})]})}function hx(e,t){if(e){if(t==="manager_pro")return n.jsx(px,{});if(t==="manager_standard")return n.jsx(cx,{});if(t==="manager_lite")return n.jsx(tc,{})}}function mx(e){const t=Ar(e);if(!t)return null;const r=t.match(/^([^\d]*)([\d.,]+)(.*)$/);if(!r)return t;const[,a,s,l]=r;return n.jsxs(n.Fragment,{children:[a&&n.jsx("span",{className:"payment-plan__pricing-symbol h4",children:a}),s,l.trim()&&n.jsx("span",{className:"payment-plan__pricing-symbol h4",children:l.trim()})]})}function fx(e){const{t}=Ne.useTranslation(),r=t("payment.plan.tierFallback",{defaultValue:"\uC774\uC6A9\uAD8C"}),a=t("payment.plan.openPromo",{defaultValue:"\uC624\uD508 \uD2B9\uAC00"}),{plan:s,onSelect:l,period:i="monthly",ownedCodes:u,titleLevel:c=3}=e||{},p=c?`h${c}`:"div",h=f=>!!f&&!!u?.includes(f),d=f=>f.onceOnly??/오픈\s*특가/.test(f.label??""),m=(s.tiers||[]).some(f=>d(f)&&h(f.code)),C=f=>{const w=f.prices?f.prices[i]:f.price;return w?(s.tiers||[]).some(k=>!!k.badge&&k.originals?.[i]===w):!1},x=s.colorToken?`var(--color-${s.colorToken})`:"var(--color-gray)",g=t("payment.plan.freePrice","\uBB34\uB8CC"),y=t("payment.products.mgrEnterprise.tier.price","\uBB38\uC758"),v=f=>f.prices?f.prices[i]:f.price,_=(s.tiers||[]).length>0&&(s.tiers||[]).every(f=>{const w=v(f);return w==="\uBB34\uB8CC"||w===g||w==="0\uC6D0"||typeof w=="string"&&/\d/.test(w)&&!/[1-9]/.test(w)}),b=(s.tiers||[]).length>0&&(s.tiers||[]).every(f=>{const w=v(f);return w==="\uBB38\uC758"||w===y}),B=s.group==="org",N=B?"manager":"speechear";return n.jsxs("div",{className:"payment-plan__card",style:{borderColor:x,"--plan-color":x},children:[s.cardBadge&&n.jsx("div",{className:"payment-plan__card-badge",children:n.jsx(cn,{label:s.cardBadge,variant:"main",size:"medium",fill:"soft"})}),n.jsxs("div",{className:"payment-plan__title",children:[n.jsx("p",{className:"payment-plan__quote body-3b",style:{color:x},children:s.quote||"\xA0"}),n.jsx(p,{className:"payment-plan__title-heading h1",children:s.tier??s.title}),n.jsx("p",{className:"payment-plan__subtitle body-3",children:s.subtitle})]}),n.jsxs("div",{className:"payment-plan__box",children:[n.jsx("span",{className:"payment-plan__box-title body-3b",children:t("payment.plan.recommendedFor","\uC774\uB7F0 \uBD84\uAED8 \uCD94\uCC9C\uD569\uB2C8\uB2E4.")}),n.jsx("ul",{className:"payment-plan__feature-list",children:(s.recommendedFor||[]).map((f,w)=>n.jsxs("li",{className:"payment-plan__feature-item body-3",children:[n.jsx(lt,{icon:"check",size:18,className:"payment-plan__feature-check",wrapperStyle:{color:x}}),f]},w))})]}),n.jsxs("div",{className:"payment-plan__box",children:[n.jsx("span",{className:"payment-plan__box-title body-3b",children:t("payment.plan.features","\uD575\uC2EC \uAE30\uB2A5")}),n.jsx("ul",{className:"payment-plan__feature-list",children:(s.features||[]).map((f,w)=>n.jsxs("li",{className:"payment-plan__feature-item body-3",children:[n.jsx(lt,{icon:"check",size:18,className:"payment-plan__feature-check",wrapperStyle:{color:x}}),f]},w))})]}),n.jsx("div",{className:"payment-plan__card-pricing",children:_?null:b?n.jsx(me,{htmlType:"button",className:"payment-plan__contact-button",label:t("payment.plan.contact",{defaultValue:"\uBB38\uC758\uD558\uAE30"}),variant:"main",size:56,onClick:()=>s.tiers?.[0]&&l?.({...s.tiers[0],productId:s.id,productTitle:s.title})}):n.jsx(n.Fragment,{children:n.jsx("div",{className:"payment-plan__pricing-list",children:(s.tiers||[]).map(f=>{const w=f.label||r,k=d(f),E=k||f.openPromo===!0,A=w.replace(/^오픈\s*특가\s*/,"")||r,D=f.prices?f.prices[i]:f.price,j=f.badge?E?`${a}
841
+ ${f.badge}`:f.badge:void 0;if(k&&h(f.code))return null;if(!f.badge&&!m)return C(f)?null:n.jsxs("div",{className:`payment-plan__pricing-row payment-plan__pricing-row--static${f.highlight?" payment-plan__pricing-row--highlight":""}`,children:[n.jsx("div",{className:"payment-plan__pricing-row-title",children:n.jsx("div",{className:"payment-plan__pricing-row-label h5b",children:f.label})}),n.jsx("div",{className:"payment-plan__pricing-row-price",children:n.jsx("span",{className:"payment-plan__pricing-current h1",children:mx(D)})})]},f.id);const $=s.tier??(B?s.title:void 0),H=n.jsx(ac,{showPrice:!0,product:{type:N,code:f.code,name:A,label:$,price:D,originalPrice:f.originals?.[i]??void 0,discountLabel:j},bg:hx(B,s.id)}),F=()=>l?.({...f,productId:s.id,productTitle:s.title,preview:H});return n.jsx("div",{className:"payment-plan__pricing-card",onClick:F,onKeyDown:l?U=>{U.target===U.currentTarget&&(U.key==="Enter"||U.key===" ")&&(U.preventDefault(),F())}:void 0,role:l?"button":void 0,tabIndex:l?0:void 0,children:H},f.id)})})})})]})}function Cx({variant:e="default"}){return n.jsxs("div",{className:`pass-card-bg pass-card-bg--${e}`,"aria-hidden":"true",children:[n.jsx("div",{className:"pass-card-bg__circle pass-card-bg__circle--1"}),n.jsx("div",{className:"pass-card-bg__circle pass-card-bg__circle--2"}),n.jsx("div",{className:"pass-card-bg__circle pass-card-bg__circle--3"})]})}var ps='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Logo_IHAB_en" xmlns="http://www.w3.org/2000/svg" width="765.08" height="240" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 765.08 240"><defs><linearGradient id="linear-gradient" x1="62.99" y1="62.99" x2="190.71" y2="190.71" gradientUnits="userSpaceOnUse"><stop offset=".2" stop-color="%23499cdf"/><stop offset=".8" stop-color="%234dcdc0"/></linearGradient></defs><path id="symbol" d="M190.71,49.29c-18.1-18.1-43.1-29.29-70.71-29.29s-34.94,28.87-53.03,46.97h0c-18.1,18.1-46.97,25.56-46.97,53.03s11.19,52.61,29.29,70.71c18.1,18.1,43.1,29.29,70.71,29.29s52.61-11.19,70.71-29.29c18.1-18.1,29.29-43.1,29.29-70.71s-11.19-52.61-29.29-70.71ZM155.36,155.36c-9.05,9.05-21.55,14.64-35.36,14.64s-26.31-5.6-35.36-14.64c-9.05-9.05-14.64-21.55-14.64-35.36s5.6-26.31,14.64-35.36c9.05-9.05,21.55-14.64,35.36-14.64s26.31,5.6,35.36,14.64c9.05,9.05,14.64,21.55,14.64,35.36s-5.6,26.31-14.64,35.36Z" fill="url(%23linear-gradient)"/><g id="text"><path d="M316.21,190.6h-36.74V50.61h36.74v139.99Z"/><path d="M335.16,50.61h36.74v55.11h51.63v-55.11h36.93v139.99h-36.93v-55.11h-51.63v55.11h-36.74V50.61Z"/><path d="M473.99,190.6l46.6-139.99h50.08l46.41,139.99h-39.64l-8.31-27.46h-46.99l-8.31,27.46h-39.83ZM560.62,135.3l-14.5-46.99h-1.16l-14.31,46.99h29.97Z"/><path d="M631,50.61h59.94c31.9,0,48.73,13.73,48.73,35.19,0,15.47-11.02,27.26-26.88,30.55v1.35c17.6.58,32.29,13.54,32.29,33.45,0,22.82-18.56,39.45-49.11,39.45h-64.97V50.61ZM701.77,93.53c0-8.89-6.96-13.92-17.02-13.92h-17.02v27.84h16.44c10.25,0,17.6-5.03,17.6-13.92ZM706.22,146.51c0-10.25-7.35-16.05-19.14-16.05h-19.34v30.55h18.76c13.15,0,19.72-5.03,19.72-14.5Z"/></g></svg>';const oc={text:"var(--color-text-primary)",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-text-muted)"};function gx(){const e=Ht(oc,Hn,Vn);return n.jsx("div",{ref:e,className:"pass-card-bg pass-card-bg-ihab","aria-hidden":"true",children:n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-ihab__symbol-top",style:{"--symbol-url":`url("${ps}")`}})})}const sc={text:"#ffffff",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEarManager_ko",logoColor:"_mono",copyrightColor:"#ffffff"};function bx(e={}){const t=Ht(sc,Hn,Vn);return n.jsxs("div",{ref:t,className:"pass-card-bg pass-card-bg-left-color-grid","aria-hidden":"true",children:[n.jsx("div",{className:"pass-card-bg-left-color-grid__bar"}),n.jsx("div",{className:"pass-card-bg-left-color-grid__grid"}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-left-color-grid__symbol",style:{"--symbol-url":`url("${oa}")`}})]})}function lc({keys:e,anchor:t="top-right",scale:r,className:a=""}){const s=Array.isArray(e)?e:[e];return n.jsx("span",{className:xe("shortcut-badge",`shortcut-badge--${t}`,a),style:r===void 0?void 0:{"--shortcut-badge-scale":String(r)},children:s.map((l,i)=>n.jsxs("span",{className:"shortcut-badge__group",children:[i>0&&n.jsx("span",{className:"shortcut-badge__plus",children:"+"}),n.jsx("kbd",{className:"shortcut-badge__key",children:l})]},`${l}-${i}`))})}const sa=(e,t,r)=>e+(t-e)*r;function yx({speakers:e,size:t=300,viewT:r=0,activeSpeakerId:a=null,playedIds:s,selectedId:l=null,answerId:i=null,showFeedback:u=!1,pulseSelected:c=!1,pulseSelectedDuration:p,pulseScale:h,clickable:d=!1,onSelectSpeaker:m,buttonSize:C=40,showIcon:x=!0,onCenterClick:g,centerLabel:y,centerDisabled:v=!1,centerAttention:_=!1,shortcutAnchor:b="top-right",shortcutScale:B,scaleShortcut:N=!1}){const{t:f}=Ne.useTranslation(),w=Math.max(0,Math.min(1,r)),k=t/2,E=110/300,A=.18,D=O=>t*(E+(O-1)*A),j=O=>{const W=D(O.row??1),q=O.angleDeg*Math.PI/180;return{x:k+W*Math.cos(q),y:k+W*Math.sin(q)}},$=Math.max(...e.map(O=>O.row??1),1),H=t*.08,F=t*.1,U=t*.24,T=t-2*H,I=t-F-U,z=t-U/2,ie=o.useMemo(()=>[...new Set(e.map(O=>O.deg))].sort((O,W)=>O-W),[e]),te=ie.length,P=Math.max(68,te>1?T/(te-1):0),G=o.useMemo(()=>new Map(ie.map((O,W)=>[O,W])),[ie]),X=O=>{const W=G.get(O.deg)??0,q=k+(W-(te-1)/2)*P,oe=$>1?Math.min(68,I/($-1)):0,ee=oe*($-1),be=F+(I-ee)/2,je=$===1?F+I*.4:be+($-(O.row??1))*oe;return{x:q,y:je}},K=O=>{const W=j(O),q=X(O);return{x:sa(W.x,q.x,w),y:sa(W.y,q.y,w)}},L={x:k,y:sa(k,z,w)},R=Math.round(C*1.2),S=Math.round(Math.max(16,Math.min(80,C*.7))),V=[],ae=new Map;for(const O of e){const W=O.row??1;ae.has(W)||ae.set(W,[]),ae.get(W).push(O)}for(const[O,W]of ae.entries()){if(W.length<2)continue;const q=[...W].sort((Oe,ot)=>Oe.deg-ot.deg),oe=q.map(Oe=>K(Oe)),ee=q.map(Oe=>Oe.deg),be=ee[ee.length-1]-ee[0],je=be/(ee.length-1),De=360-be,we=q.length>=3&&je>0&&De<=je*1.5,ze=Math.round(D(O)*1e3)/1e3,ye=(Oe,ot,it,Fe)=>{const Ue=(ot.angleDeg-Oe.angleDeg+540)%360-180;if(Ue===0)return`L ${Fe.x} ${Fe.y}`;if(w===0)return`A ${ze} ${ze} 0 0 ${Ue>0?1:0} ${Fe.x} ${Fe.y}`;const nt=(Oe.angleDeg+Ue/2)*Math.PI/180,Te={x:k+ze*Math.cos(nt),y:k+ze*Math.sin(nt)},Xe={x:(it.x+Fe.x)/2,y:(it.y+Fe.y)/2},rt={x:sa(Te.x,Xe.x,w),y:sa(Te.y,Xe.y,w)},ut={x:2*rt.x-Xe.x,y:2*rt.y-Xe.y};return`Q ${ut.x} ${ut.y} ${Fe.x} ${Fe.y}`},_e=we?[...q,q[0]]:q,ve=we?[...oe,oe[0]]:oe;let Ee=`M ${ve[0].x} ${ve[0].y}`;for(let Oe=1;Oe<ve.length;Oe++)Ee+=" "+ye(_e[Oe-1],_e[Oe],ve[Oe-1],ve[Oe]);V.push({key:`arc-${O}`,d:Ee})}const ne=o.useMemo(()=>new Set(s??[]),[s]),re=O=>({idle:"",active:f("soundCompass.state.active","\uC18C\uB9AC \uB098\uB294 \uC911"),played:f("soundCompass.state.played","\uB4E4\uC74C"),correct:f("soundCompass.state.correct","\uC815\uB2F5"),wrong:f("soundCompass.state.wrong","\uC624\uB2F5")})[O],ue=(O,W,q,oe)=>{const ee=O+1,be=new RegExp(`(^|[^0-9])${ee}([^0-9]|$)`).test(W),je=!oe||be?W:`${ee}, ${W}`;return re(q)?`${je}, ${re(q)}`:je},Be=O=>{if(a===O.id)return"active";if(u){if(O.id===i)return"correct";if(O.id===l&&l!==i)return"wrong"}return ne.has(O.id)?"played":"idle"},le=O=>a===O.id?"loop":u?O.id===i?"loop":null:c&&O.id===l?"once":null,J=(O,W)=>{switch(O){case"played":case"correct":return n.jsx(wl,{size:W});case"wrong":return n.jsx(Ml,{size:W});default:return n.jsx(Tl,{size:W})}};return n.jsx("div",{className:"sound-compass",children:n.jsxs("div",{className:"sound-compass__compass-wrap",style:{width:t,height:t},children:[n.jsxs("svg",{width:t,height:t,viewBox:`0 0 ${t} ${t}`,className:"sound-compass__svg",children:[w===0&&e.map(O=>{const{x:W,y:q}=K(O);return n.jsx("line",{x1:L.x,y1:L.y,x2:W,y2:q,stroke:"#dde3ec",strokeWidth:"1"},O.id)}),V.map(O=>n.jsx("path",{d:O.d,fill:"none",stroke:"#dde3ec",strokeWidth:"1"},O.key))]}),_&&!v&&n.jsx("div",{className:"sound-compass__pulse sound-compass__pulse--active sound-compass__pulse--center",style:{width:R,height:R,left:L.x-R/2,top:L.y-R/2}}),g?n.jsx("button",{type:"button",className:`sound-compass__center sound-compass__center--button${v?" sound-compass__center--disabled":""}`,style:{width:R,height:R,left:L.x,top:L.y},"aria-label":y,"aria-disabled":v||void 0,tabIndex:v?-1:0,onClick:v?void 0:g,children:n.jsx(ho,{size:S,color:"currentColor",strokeWidth:1.5})}):n.jsx("div",{className:"sound-compass__center",style:{width:R,height:R,left:L.x,top:L.y},children:n.jsx(ho,{size:S,color:"currentColor",strokeWidth:1.5})}),e.map((O,W)=>{const{x:q,y:oe}=K(O),ee=Be(O),be=le(O),je={...B!==void 0||N?{"--shortcut-badge-scale":String(B??Math.max(.75,Math.min(3,C/56)))}:null,pointerEvents:d?"auto":"none",cursor:d?"pointer":"default",zIndex:ee!=="idle"?10:1},De=C,we=Math.round(Math.max(10,Math.min(56,De*.38))),ze=Math.round(Math.max(7,Math.min(18,De*.2))),ye=Math.round(Math.max(10,Math.min(56,De*.4))),_e=x==="answered"&&(ee==="played"||ee==="correct"||ee==="wrong"),ve=x===!0||_e,Ee=!_e;return n.jsxs("div",{className:"sound-compass__speaker-pos",style:{...je,left:q-De/2,top:oe-De/2},children:[be&&n.jsx("div",{className:`sound-compass__pulse sound-compass__pulse--${ee}`+(be==="once"?" sound-compass__pulse--once":""),style:{width:De,height:De,...be==="once"&&p!==void 0?{"--sc-pulse-duration-once":`${p}ms`}:null,...h!==void 0?{"--sc-pulse-scale":String(h)}:null}}),n.jsxs("button",{type:"button",tabIndex:d?0:-1,"aria-disabled":d?void 0:!0,onClick:d?()=>m?.(O.id):void 0,className:`sound-compass__speaker-btn sound-compass__speaker-btn--${ee}`,style:{width:De,height:De},"aria-label":ue(W,O.label,ee,Ee),"aria-pressed":l!=null?O.id===l:void 0,children:[ve&&J(ee,we),Ee&&n.jsx("span",{className:"sound-compass__speaker-number",style:{fontSize:x===!0?ze:ye},children:W+1})]}),O.shortcut&&n.jsx(lc,{keys:O.shortcut,anchor:b,className:"sound-compass__speaker-shortcut"})]},O.id)})]})})}function vx({id:e,tone:t="plain",bare:r=!1,className:a,style:s,children:l}){return n.jsx("section",{id:e,className:xe("landing-section",t==="line"&&"landing-section--line",a),style:s,children:r?l:n.jsx("div",{className:"landing-section__inner",children:l})})}function xx({badge:e,badgeVariant:t="white",title:r,sub:a,maxWidth:s,subMaxWidth:l,gap:i="m",noGap:u=!1,onBand:c=!1,align:p="left"}){const h={...u?null:{"--landing-title-gap":`var(--spacing-${i})`},...s?{maxWidth:`${s}px`}:null},d=l?{maxWidth:`${l}px`}:{},m=p==="center";return n.jsxs(n.Fragment,{children:[e?n.jsx("p",{className:xe(m&&"landing-title__badge--center"),style:{margin:0},children:n.jsx(cn,{size:"large",fill:t==="white"?"filled":"soft",variant:t,children:e})}):null,n.jsx("h2",{className:xe("landing-title__text",u&&"landing-title__text--no-gap",m&&"landing-title__text--center"),style:h,children:r}),a?n.jsx("p",{className:xe("landing-title__sub",c&&"landing-title__sub--on-band",m&&"landing-title__sub--center"),style:d,children:a}):null]})}function _x({icon:e,title:t,desc:r,children:a,layout:s="stack",leadWidth:l=300,titleStyle:i,tight:u=!1,align:c="left",hover:p=!0,className:h,style:d}){const m=u?"landing-card--pad-tight":"landing-card--pad",C=n.jsxs(n.Fragment,{children:[e,t?n.jsx("h3",{className:"landing-card__title",style:i,children:t}):null,r?n.jsx("p",{className:"landing-card__desc",children:r}):null]});return s==="row"?n.jsxs("div",{className:xe("landing-card","landing-card--row",m,p&&"landing-card--hover",h),style:d,children:[n.jsx("div",{className:"landing-card__lead",style:{"--landing-card-lead-w":`${l}px`},children:C}),n.jsx("div",{className:"landing-card__panel",children:a})]}):n.jsxs("div",{className:xe("landing-card",m,c==="center"&&"landing-card--center",p&&"landing-card--hover",h),style:d,children:[C,a]})}function wx({href:e,tone:t="dark",arrow:r=!1,className:a,children:s}){return n.jsxs("a",{className:xe("landing-button",t!=="dark"&&`landing-button--${t}`,a),href:e,children:[s,r?n.jsx("svg",{"aria-hidden":"true",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{flex:"none"},children:n.jsx("path",{d:"m9 18 6-6-6-6"})}):null]})}const Bx=1200,kx=.3;function Ax(e){if(typeof e!="string")return null;const t=/^(\D*)(\d[\d,]*)(\D*)$/.exec(e.trim());if(!t)return null;const r=Number(t[2].replace(/,/g,""));return Number.isFinite(r)?{prefix:t[1],suffix:t[3],target:r,grouped:t[2].includes(",")}:null}function Nx(e){return String(e).replace(/\B(?=(\d{3})+(?!\d))/g,",")}function Ex(e){const t=o.useRef(null),[r,a]=o.useState(1);return o.useEffect(()=>{const s=t.current;if(e||!s||typeof IntersectionObserver!="function"){a(1);return}a(0);let l=0;const i=new IntersectionObserver(u=>{if(!u.some(h=>h.isIntersecting))return;i.disconnect();const c=performance.now(),p=h=>{const d=Math.min(1,(h-c)/Bx);a(1-(1-d)**3),d<1&&(l=requestAnimationFrame(p))};l=requestAnimationFrame(p)},{threshold:kx});return i.observe(s),()=>{i.disconnect(),cancelAnimationFrame(l)}},[e]),[t,r]}function jx({stats:e,className:t}){const r=$a(),[a,s]=Ex(r);return n.jsx("div",{className:"landing-stat-band-wrap",children:n.jsx("div",{ref:a,className:xe("landing-stat-band",t),style:{gridTemplateColumns:`repeat(${e.length}, minmax(0, 1fr))`},children:e.map((l,i)=>{const u=Ax(l.value),c=u?`${u.prefix}${u.grouped?Nx(Math.round(u.target*s)):Math.round(u.target*s)}${u.suffix}`:null;return n.jsxs("div",{children:[n.jsx("p",{className:"landing-stat-band__value",children:c===null?l.value:n.jsxs(n.Fragment,{children:[n.jsx("span",{"aria-hidden":"true",children:c}),n.jsx("span",{className:"landing-stat-band__sr",children:l.value})]})}),n.jsx("p",{className:"landing-stat-band__label",children:l.label})]},i)})})})}function Dx({orientation:e="horizontal",label:t,className:r=""}){const a=xe("divider",`divider--${e}`,t&&e==="horizontal"?"divider--labeled":"",r);return e==="vertical"?n.jsx("div",{className:a,role:"separator","aria-orientation":"vertical"}):t?n.jsxs("div",{className:a,role:"separator","aria-orientation":"horizontal",children:[n.jsx("span",{className:"divider__line"}),n.jsx("span",{className:"divider__label caption-1",children:t}),n.jsx("span",{className:"divider__line"})]}):n.jsx("div",{className:a,role:"separator","aria-orientation":"horizontal"})}function ic({checked:e,onChange:t,name:r,value:a,disabled:s=!1,label:l,className:i=""}){const u=o.useId();return n.jsxs("label",{className:`radio${s?" radio--disabled":""} ${i}`.trim(),htmlFor:u,children:[n.jsx("input",{id:u,type:"radio",name:r,value:a,checked:e,disabled:s,onChange:c=>t?.(c.target.checked)}),n.jsx("span",{className:"radio__dot"}),l&&n.jsx("span",{className:"radio__label body-2",children:l})]})}function Sx({options:e,value:t,onChange:r,name:a,disabled:s=!1,direction:l="vertical",className:i="",ariaLabel:u}){const c=o.useId(),p=a??`radio-group-${c}`;return n.jsx("div",{className:`radio-group radio-group--${l} ${i}`.trim(),role:"radiogroup","aria-label":u,children:e.map(h=>n.jsx(ic,{name:p,value:h.value,checked:t===h.value,disabled:s||h.disabled,label:h.label,onChange:d=>{d&&r?.(h.value)}},h.value))})}const Tx={info:"info",success:"check-circle",warning:"alert-triangle",danger:"alert-circle"};function Mx({tone:e="info",title:t,message:r,children:a,dismissible:s=!1,onDismiss:l,live:i,className:u=""}){const{t:c}=Ne.useTranslation(),[p,h]=o.useState(!1),d=o.useRef(null),m=o.useCallback(()=>{const _=d.current;_&&_.contains(document.activeElement)&&Ta(_),h(!0),l?.()},[l]);if(p)return null;const C=xe("alert",`alert--${e}`,u),x=i??(e==="danger"||e==="warning"?"assertive":"polite"),g=x==="assertive"?"alert":x==="polite"?"status":void 0,y=!!t,v=!!(r||a);return n.jsxs("div",{ref:d,className:C,role:g,children:[n.jsxs("div",{className:"alert__body",children:[n.jsxs("div",{className:"alert__header",children:[n.jsx(lt,{icon:Tx[e],size:20,className:"alert__icon"}),y&&n.jsx("span",{className:"alert__title body-2",children:t}),!y&&v&&n.jsx("div",{className:"alert__message body-3",children:r||a})]}),y&&v&&n.jsx("div",{className:"alert__message alert__message--indented body-3",children:r||a})]}),s&&n.jsx("button",{type:"button",className:"alert__dismiss",onClick:m,"aria-label":c("common.close","\uB2EB\uAE30"),children:"\xD7"})]})}const $x={ready:"search",guide:"info",error:"circle-alert"};function Lx(e,t){const r=t.filter(Boolean);if(r.length===0)return e;const a=[];let s=0,l=0;for(const i of r){const u=e.indexOf(i,s);u<0||(u>s&&a.push(e.slice(s,u)),a.push(n.jsx("strong",{className:"search-summary__em body-2",children:i},l++)),s=u+i.length)}return s<e.length&&a.push(e.slice(s)),a}function Rx({status:e="guide",label:t,children:r,emphasis:a,icon:s,className:l=""}){const i=s===!1?null:s??$x[e],u=xe("search-summary",`search-summary--${e}`,l),c=t??r,p=typeof c=="string"&&a&&a.length>0?Lx(c,a):c;return n.jsxs("div",{className:u,role:"status","aria-live":"polite",children:[i!=null&&n.jsx(lt,{icon:i,size:18,className:"search-summary__icon"}),n.jsx("span",{className:"search-summary__text body-2",children:p})]})}function la({title:e,items:t}){const{t:r}=Ne.useTranslation(),{anchorRect:a,openAt:s,close:l}=Fa(),i=o.useRef(null),u=La(!!a,(c,p)=>{c&&p?s(i.current?.querySelector("button")??p):l()},i);return n.jsxs("span",{ref:i,style:{display:"contents"},children:[n.jsx(me,{htmlType:"button",size:24,type:"dot",icon:"info",variant:"transparent-gray",useBorder:!1,selected:!!a,ariaLabel:r("common.info","\uC124\uBA85"),onPointerEnter:c=>{tr(c)||s(c.currentTarget)},onPointerLeave:c=>{tr(c)||l()},onClick:c=>{u.touchPress(c.currentTarget)},onFocus:c=>{ur()||s(c.currentTarget)},onBlur:l}),a&&n.jsx(er,{title:e,items:t,showIndex:t.length>1,anchorRect:a,onClose:l})]})}const Cn=40,hr=32;function Px({items:e=[],value:t,onChange:r,className:a="",size:s}){const l=wn(),i=s??l??Cn,u=o.useId(),{t:c}=Ne.useTranslation(),p=o.useRef(null),h=e.find(v=>!v.disabled)?.key,d=e.some(v=>v.key===t)?t:h??e[0]?.key,m=e.find(v=>v.key===d&&!v.disabled)?.key??h,C=()=>Array.from(p.current?.querySelectorAll('[role="tab"]:not(:disabled)')??[]),x=(v,_=C())=>{if(_.length===0)return;const b=(v%_.length+_.length)%_.length;_[b]?.focus(),_[b]?.click()},g=v=>{if(!["ArrowRight","ArrowDown","ArrowLeft","ArrowUp","Home","End"].includes(v.key))return;v.preventDefault();const _=C(),b=_.indexOf(v.currentTarget);v.key==="ArrowRight"||v.key==="ArrowDown"?x(b+1,_):v.key==="ArrowLeft"||v.key==="ArrowUp"?x(b-1,_):v.key==="Home"?x(0,_):x(_.length-1,_)},y=e.find(v=>v.key===d);return n.jsxs("div",{className:`tabs ${a}`.trim(),children:[n.jsx("div",{ref:p,className:`tabs__list tabs__list--${i}`,role:"tablist","aria-label":c("tabs.ariaLabel","\uD0ED"),children:e.map(v=>n.jsx("button",{id:`tabs__tab-${u}-${v.key}`,type:"button",role:"tab","aria-selected":v.key===d,"aria-controls":v.key===d?`tabs__panel-${u}-${v.key}`:void 0,disabled:v.disabled,tabIndex:v.key===m?0:-1,className:`tabs__tab body-2${v.key===d?" tabs__tab--active":""}`,onClick:()=>{v.key!==t&&r?.(v.key)},onKeyDown:g,children:v.label},v.key))}),y&&n.jsx("div",{id:`tabs__panel-${u}-${y.key}`,role:"tabpanel","aria-labelledby":`tabs__tab-${u}-${y.key}`,tabIndex:0,className:"tabs__panel",children:y.panel},y.key)]})}const Fx={xs:12,sm:16,md:20,lg:28,xl:36};function Ix(e){const t=e.trim().split(/\s+/).filter(Boolean);return t.length===0?"":t.length===1?[...t[0]].slice(0,2).join("").toUpperCase():([...t[0]][0]+[...t[t.length-1]][0]).toUpperCase()}function Ox({src:e,name:t,size:r="md",shape:a="circle",className:s=""}){const{t:l}=Ne.useTranslation(),[i,u]=o.useState(null),c=!!e&&i===e,p=t?Ix(t):"",h=!!e&&!c,d=!h&&!!p,m=t||l("avatar.ariaLabel","\uC0AC\uC6A9\uC790 \uC544\uBC14\uD0C0");return n.jsxs("span",{className:`avatar avatar--${r} avatar--${a} ${s}`.trim(),role:"img","aria-label":m,children:[h&&n.jsx("img",{className:"avatar__image",src:e,alt:m,onError:()=>u(e??null)}),!h&&d&&n.jsx("span",{className:"avatar__initials","aria-hidden":"true",children:p}),!h&&!d&&n.jsx(lt,{icon:"user-round",size:Fx[r],className:"avatar__icon"})]})}function zx(e,t){if(!t)return!0;const r=t.split(",").map(l=>l.trim()).filter(Boolean);if(r.length===0)return!0;const a=e.name.toLowerCase(),s=e.type.toLowerCase();return r.some(l=>{const i=l.toLowerCase();return i.startsWith(".")?a.endsWith(i):i.endsWith("/*")?s.startsWith(i.slice(0,-1)):s===i})}function Wx({onFilesSelected:e,accept:t,multiple:r=!1,disabled:a=!1,showFileList:s=!0,files:l,onRemove:i,className:u=""}){const{t:c}=Ne.useTranslation(),p=o.useRef(null),[h,d]=o.useState(!1),[m,C]=o.useState([]),x=l??m,g=f=>{if(!f||f.length===0)return;const w=Array.from(f).filter(E=>zx(E,t));if(w.length===0)return;const k=r?w:w.slice(0,1);if(l===void 0){const E=r?[...x,...k]:k;C(E),e?.(E)}else e?.(k)},y=f=>{f.preventDefault(),!a&&d(!0)},v=f=>{f.preventDefault(),d(!1)},_=f=>{f.preventDefault(),d(!1),!a&&g(f.dataTransfer.files)},b=f=>{const w=f.target;try{g(w.files)}finally{w.value=""}},B=()=>{a||p.current?.click()},N=f=>{if(!a&&(i?.(f),l===void 0)){const w=x.filter((k,E)=>E!==f);C(w),i||e?.(w)}};return n.jsxs("div",{className:`file-upload ${u}`.trim(),children:[n.jsxs("div",{className:xe("file-upload__dropzone",h&&"file-upload__dropzone--dragging",a&&"file-upload__dropzone--disabled"),role:"button",tabIndex:a?-1:0,"aria-disabled":a,onClick:B,onKeyDown:f=>{(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),B())},onDragOver:y,onDragLeave:v,onDrop:_,children:[n.jsx(lt,{icon:"upload",size:24,className:"file-upload__icon"}),n.jsx("span",{className:"file-upload__prompt body-2",children:c("fileUpload.dragPrompt","\uD30C\uC77C\uC744 \uC774\uACF3\uC5D0 \uB4DC\uB798\uADF8\uD558\uC5EC \uC5C5\uB85C\uB4DC")}),n.jsx("button",{type:"button",className:"file-upload__browse-button body-3",disabled:a,onClick:f=>{f.stopPropagation(),B()},children:c("fileUpload.browseButton","\uD30C\uC77C \uC120\uD0DD")}),n.jsx("input",{ref:p,type:"file",className:"file-upload__input",accept:t,multiple:r,disabled:a,onChange:b,tabIndex:-1,"aria-hidden":"true"})]}),s&&x.length>0&&n.jsx("ul",{className:"file-upload__list",children:x.map((f,w)=>n.jsxs("li",{className:"file-upload__list-item body-3",children:[n.jsx("span",{className:"file-upload__file-name body-3",children:f.name}),n.jsx("button",{type:"button",className:"file-upload__remove-button","aria-label":c("fileUpload.removeAriaLabel",{name:f.name}),disabled:a,onClick:()=>N(w),children:n.jsx(lt,{icon:"x",size:14})})]},`${f.name}-${w}`))})]})}function uc({items:e,size:t="small",className:r=""}){const{t:a}=Ne.useTranslation(),s=t==="medium"?"body-1":"body-3",l=t==="medium"?18:14,i=t==="medium"?"body-1b":s;return n.jsx("nav",{className:`breadcrumb breadcrumb--${t} ${r}`.trim(),"aria-label":a("breadcrumb.ariaLabel","\uC774\uB3D9 \uACBD\uB85C"),children:n.jsx("ol",{className:"breadcrumb__list",children:e.map((u,c)=>{const p=c===e.length-1;return n.jsxs("li",{className:"breadcrumb__item",children:[p&&u.menu?n.jsxs("button",{type:"button",className:`breadcrumb__current breadcrumb__current--menu ${i}`,"aria-current":"page","aria-haspopup":"menu","aria-expanded":!!u.menu.expanded,"aria-label":u.menu.ariaLabel,onClick:h=>u.menu.onOpen(h.currentTarget),children:[u.label,n.jsx(lt,{icon:"chevron-down",size:l,className:"breadcrumb__menu-mark"})]}):p?n.jsx("span",{className:`breadcrumb__current ${i}`,"aria-current":"page",children:u.label}):u.href?n.jsx("a",{className:`breadcrumb__link ${s}`,href:u.href,target:u.target,rel:u.rel??(u.target==="_blank"?"noopener noreferrer":void 0),onClick:u.onClick,children:u.label}):u.onClick?n.jsx("button",{type:"button",className:`breadcrumb__link ${s}`,onClick:u.onClick,children:u.label}):n.jsx("span",{className:`breadcrumb__text ${s}`,children:u.label}),!p&&n.jsx(lt,{icon:"chevron-right",size:l,className:"breadcrumb__separator"})]},c)})})})}function cc({folders:e,onOpen:t,dropProps:r,dropOver:a,menuItems:s,onMove:l}){const{t:i}=Ne.useTranslation(),[u,c]=o.useState(null),p=Bv((g,y)=>l?.(g,y)),h=p.dragging,d=g=>{const y=l?p.cardProps(g):{};return h===null?{...r?.(g),...y}:!l||h===g?y:{...y,...p.groupProps(g)}},m=g=>h===null?a===g:p.dragOverKey===g,C=o.useRef(null),x=()=>{c(g=>(g&&(C.current={name:g.name,at:Date.now()}),null))};return e.length===0?null:n.jsxs("ul",{className:"folder-grid","aria-label":i("folder.list","\uD3F4\uB354"),children:[e.map(g=>{const y=g.label??g.name;return n.jsxs("li",{className:["folder-grid__cell",m(g.name)&&"folder-grid__cell--over",h===g.name&&"folder-grid__cell--dragging"].filter(Boolean).join(" "),...d(g.name),children:[n.jsx(me,{htmlType:"button",type:"bar",size:48,variant:"default",align:"left",width:"100%",ellipsis:!0,className:m(g.name)?"is-hover":void 0,icon:"folder",label:y,count:g.count,ariaLabel:i("folder.open",{name:y,count:g.count,defaultValue:"{{name}} \uD3F4\uB354 \uC5F4\uAE30, {{count}}\uAC1C"}),rightIcon:s?n.jsx("span",{className:"folder-grid__more-room","aria-hidden":"true"}):void 0,onClick:()=>t(g.name)}),s&&n.jsx("span",{className:"folder-grid__more",children:n.jsx(me,{htmlType:"button",size:32,type:"dot",variant:"transparent-gray",useBorder:!1,icon:"ellipsis",ariaLabel:i("folder.menu",{name:y,defaultValue:"{{name}} \uD3F4\uB354 \uBA54\uB274"}),ariaExpanded:u?.name===g.name,onClick:v=>{if(C.current?.name===g.name&&Date.now()-C.current.at<300)return;const _=v.currentTarget;c(b=>b?.name===g.name?null:{name:g.name,label:y,anchor:_})}})})]},g.name)}),u&&s&&n.jsx(sn,{anchorEl:u.anchor,onClose:x,closeOnOutsideClick:!0,offset:4,prefer:"bottom",ariaLabel:i("folder.menu",{name:u.label,defaultValue:"{{name}} \uD3F4\uB354 \uBA54\uB274"}),children:n.jsx(nr,{columns:[{items:s(u.name)}],size:"small",onClose:x})})]})}const dc="/";function pc({anchorEl:e,onClose:t,rootLabel:r,opened:a,onPick:s,tree:l,ariaLabel:i,onMove:u,itemDropProps:c,itemDropOver:p}){const{t:h}=Ne.useTranslation(),[d,m]=o.useState(new Set),C=w=>{s(w),t()},[x,g]=o.useState(null),[y,v]=o.useState(null),_=w=>{if(x===null)return c?.(w)??{};if(!u||!Gb(x,w))return{};const k=w??dc;return{onDragOver:E=>{E.preventDefault(),E.dataTransfer.dropEffect="move",y!==k&&v(k)},onDragLeave:()=>v(E=>E===k?null:E),onDrop:E=>{E.preventDefault();const A=x;g(null),v(null),u(A,w)}}},b=w=>u?{draggable:!0,onDragStart:k=>{k.dataTransfer.effectAllowed="move",k.dataTransfer.setData("text/plain",w),g(w)},onDragEnd:()=>{g(null),v(null)}}:{},B=w=>m(k=>{const E=new Set(k);return E.has(w)?E.delete(w):E.add(w),E}),N=l.filter(w=>![...d].some(k=>k!==w.path&&Po(w.path,k))),f=w=>["folder-tree-tooltip__row",...w].filter(Boolean).join(" ");return n.jsx(sn,{anchorEl:e,onClose:t,closeOnOutsideClick:!0,offset:4,prefer:"bottom",ariaLabel:i,children:n.jsxs("div",{className:"folder-tree-tooltip",role:"tree","aria-label":i,children:[n.jsx("div",{role:"none",..._(null),className:f([a===null&&"folder-tree-tooltip__row--here",(y===dc||x===null&&!!p?.(null))&&"folder-tree-tooltip__row--over"]),children:n.jsxs("button",{type:"button",className:"folder-tree-tooltip__name body-2",role:"treeitem","aria-level":1,"aria-current":a===null?"page":void 0,onClick:()=>C(null),children:[n.jsx(lt,{icon:"folder-open",size:18,className:"folder-tree-tooltip__icon"}),n.jsx("span",{className:"folder-tree-tooltip__label",children:r})]})}),N.map((w,k)=>{const E=l.some(j=>j.path!==w.path&&Po(j.path,w.path)),A=d.has(w.path),D=a===w.path;return n.jsxs("div",{role:"none",...b(w.path),..._(w.path),className:f([w.depth>0&&"folder-tree-tooltip__row--nested",D&&"folder-tree-tooltip__row--here",(y===w.path||x===null&&!!p?.(w.path))&&"folder-tree-tooltip__row--over",x===w.path&&"folder-tree-tooltip__row--dragging"]),style:{"--folder-depth":w.depth+1},children:[n.jsxs("button",{type:"button",className:"folder-tree-tooltip__name body-2",role:"treeitem","aria-level":w.depth+2,"aria-posinset":k+1,"aria-current":D?"page":void 0,onClick:()=>C(w.path),children:[n.jsx(lt,{icon:D?"folder-open":"folder",size:18,className:"folder-tree-tooltip__icon"}),n.jsx("span",{className:"folder-tree-tooltip__label",children:w.label}),w.count>0&&n.jsx("span",{className:"folder-tree-tooltip__count caption-1",children:w.count})]}),E&&n.jsx("button",{type:"button",className:`folder-tree-tooltip__twist${A?"":" folder-tree-tooltip__twist--open"}`,"aria-label":A?h("folder.unfold",{name:w.label,defaultValue:"{{name}} \uD3BC\uCE58\uAE30"}):h("folder.fold",{name:w.label,defaultValue:"{{name}} \uC811\uAE30"}),"aria-expanded":!A,onClick:()=>B(w.path),children:n.jsx(lt,{icon:"chevron-right",size:16,className:"folder-tree-tooltip__twist-mark"})})]},w.path)})]})})}function hc({rootLabel:e,opened:t,onOpen:r,tree:a,onMove:s,itemDragging:l=!1,itemDropProps:i,itemDropOver:u}){const{t:c}=Ne.useTranslation(),[p,h]=o.useState(null),d=o.useRef(0),m=()=>{h(g=>(g&&(d.current=Date.now()),null))},C=c("folder.tree","\uD3F4\uB354 \uAD6C\uC870 \uBCF4\uAE30"),x=o.useRef(!1);return o.useEffect(()=>{!l&&x.current&&(x.current=!1,h(null))},[l]),n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"folder-tree-button",onDragEnter:l?g=>{p||(x.current=!0,h(g.currentTarget))}:void 0,children:n.jsx(me,{htmlType:"button",size:40,type:"dot",variant:"default",icon:"folder-tree",ariaLabel:C,showTooltipInfo:C,ariaExpanded:!!p,onClick:g=>{if(Date.now()-d.current<300)return;const y=g.currentTarget;h(v=>v?null:y)}})}),p&&n.jsx(pc,{anchorEl:p,onClose:m,ariaLabel:C,rootLabel:e,opened:t,onPick:r,tree:a,onMove:s,itemDropProps:i,itemDropOver:u})]})}function Hx({rootLabel:e,opened:t,onOpen:r,paths:a,countOf:s,folderMenu:l,rootMenu:i,dropProps:u,dropOver:c,onMoveFolder:p,itemDragging:h,rootDropKey:d}){const{t:m}=Ne.useTranslation(),[C,x]=o.useState(null),g=o.useRef(0),y=()=>{x(w=>(w&&(g.current=Date.now()),null))},v=t?Lo(t):e,_=t?m("folder.menu",{name:v,defaultValue:"{{name}} \uD3F4\uB354 \uBA54\uB274"}):m("folder.placeMenu",{name:v,defaultValue:"{{name}} \uBA54\uB274"}),b=!!l||!!i,B=b?{label:v,menu:{onOpen:w=>{Date.now()-g.current<300||x(k=>k?null:w)},expanded:!!C,ariaLabel:_}}:{label:v},N=t?[{label:e,onClick:()=>r(null)},...qb(t).slice(0,-1).map(w=>({label:w.label,onClick:()=>r(w.path)})),B]:[B],f=Vb(a,t).map(w=>({name:w,label:Lo(w),count:s(w)}));return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"folder-head",children:[n.jsx(hc,{rootLabel:e,opened:t,onOpen:r,onMove:p,itemDragging:h,itemDropProps:u?w=>w!==null?u(w):d?u(d):{}:void 0,itemDropOver:w=>c!=null&&c===(w??d),tree:Ub(a).map(w=>({...w,count:s(w.path)}))}),n.jsx(uc,{size:"medium",items:N})]}),n.jsx(cc,{folders:f,onOpen:r,dropProps:u,dropOver:c,menuItems:l,onMove:p}),C&&b&&n.jsx(sn,{anchorEl:C,onClose:y,closeOnOutsideClick:!0,offset:4,prefer:"bottom",ariaLabel:_,children:n.jsx(nr,{columns:[{items:(t?l?.(t):i)??[]}],size:"small",onClose:y})})]})}function Vx({rows:e,rowRender:t,emptySpeech:r,dropProps:a,dropOver:s=!1,className:l}){return e.length===0?r?n.jsx("p",{className:xe("folder-list__empty body-3",l),...a,children:r}):null:n.jsx("div",{className:xe("folder-list",s&&"folder-list--over",l),...a,children:e.map((i,u)=>t(i,u))})}const ia=new Map;function kn(e){const{t}=Ne.useTranslation(),{options:r=[],value:a=r.find(f=>!f.disabled)?.key??r[0]?.key,onChange:s=f=>{},className:l="",size:i,shape:u="pill",useBG:c=!0,fullWidth:p=!1,minButtonWidth:h,ariaLabel:d}=e||{},m=wn(),C=i??m??Cn,x=o.useRef(null),g=r.filter(f=>!f.disabled),y=o.useId(),v=r.map(f=>f.key).join("\xB7");o.useEffect(()=>{if(!(!Zn||d!=null&&d!=="")){if(ia.set(y,v||"(\uBCF4\uAE30 \uC5C6\uC74C)"),ia.size>1){const f=[...ia.values()].sort();Tt(`segmented-control-unnamed:${f.join("|")}`,`[ihab/SegmentedControl] \uC774\uB984 \uC5C6\uB294 \uB77C\uB514\uC624\uADF8\uB8F9\uC774 \uD55C \uD654\uBA74\uC5D0 ${ia.size} \uAC1C \uC11C \uC788\uC2B5\uB2C8\uB2E4 \u2014 \uB0AD\uB3C5\uAE30\uB294 \uBAA8\uB450 "\uC120\uD0DD \uD0ED" \uC73C\uB85C \uC77D\uC5B4 \uC5B4\uB290 \uAC83\uC774 \uBB34\uC5C7\uC778\uC9C0 \uAC00\uB9B4 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. ariaLabel \uC744 \uC8FC\uC138\uC694. \uC9C0\uAE08 \uC120 \uAC83(\uBCF4\uAE30 \uC774\uB984\uC73C\uB85C \uC801\uC74C): ${f.join(" / ")}`)}return()=>{ia.delete(y)}}},[d,v,y]);const _=f=>{if(!g.length)return;const w=Math.max(0,g.findIndex(E=>E.key===a)),k=f==="first"?g[0]:f==="last"?g[g.length-1]:g[(w+f+g.length)%g.length];k&&(s(k.key),Array.from(x.current?.querySelectorAll("[data-segkey]")??[]).find(E=>E.dataset.segkey===k.key)?.focus())},b=f=>{switch(f.key){case"ArrowRight":case"ArrowDown":_(1);break;case"ArrowLeft":case"ArrowUp":_(-1);break;case"Home":_("first");break;case"End":_("last");break;default:return}f.preventDefault()},B=f=>{const w=k=>typeof k=="string"||typeof k=="number";if(!(!w(f.label)||f.count==null||f.count===!1||!w(f.count)))return`${f.label}, ${f.count}`},N=g.some(f=>f.key===a)?a:g[0]?.key;return n.jsx("div",{ref:x,onKeyDown:b,className:xe("segmented-control",`segmented-control--${u}`,`segmented-control--${C}`,p&&"segmented-control--full",!c&&"segmented-control--no-bg",h!=null&&"segmented-control--min",l),style:h!=null?{"--segmented-min-button-w":`${h}px`}:void 0,role:"radiogroup","aria-label":d??t("segmentedControl.ariaLabel","\uC120\uD0DD \uD0ED"),children:r.map(f=>n.jsx(me,{htmlType:"button",role:"radio","aria-checked":f.key===a,"data-segkey":f.key,tabIndex:f.key===N?0:-1,label:f.label,count:f.count,ariaLabel:B(f),disabled:f.disabled,className:f.key===a?"is-selected":"",onClick:()=>{f.disabled||s(f.key)},size:C,shape:u,useBorder:!1,useBG:!1},f.key))})}let ua=0,mc="",hs="",ca=0;function fc(){return gc(!1)}function Cc(){return gc(!0)}function gc(e){const t=typeof document<"u";ua===0&&t&&(mc=document.body.style.overflow,document.body.style.overflow="hidden"),e&&t&&(ca===0&&(hs=document.body.style.paddingRight),ca++,document.body.style.paddingRight="0px"),ua++;let r=!1;return()=>{r||(r=!0,ua=Math.max(0,ua-1),e&&t&&(ca=Math.max(0,ca-1),ca===0&&(hs?document.body.style.paddingRight=hs:document.body.style.removeProperty("padding-right"))),ua===0&&t&&(document.body.style.overflow=mc))}}const qx=Fu;function qn(e){const{t}=Ne.useTranslation(),{title:r,subtitle:a,headerActions:s,headerSegment:l,children:i,buttons:u,footer:c,footerStart:p,footerEnd:h,footerNote:d,footerNoteDivider:m=!1,footerClassName:C="",footerLayout:x="center",onClose:g,closeDisabled:y=!1,beforeClose:v,closeOnBackdrop:_=!0,backClosable:b=!0,className:B="",ariaLabel:N,useTitle:f=!0,inline:w=!1,size:k,layer:E="modal",height:A,fillBody:D=!1,resetScrollKey:j}=e||{},[$,H]=o.useState(!1),F=o.useRef(!1),U=o.useRef(null),T=o.useId(),I=o.useRef(null);o.useEffect(()=>{},[w,r,N,B]),o.useEffect(()=>{j!==void 0&&I.current&&(I.current.scrollTop=0)},[j]);const[z,ie]=o.useState(!1);o.useEffect(()=>{const W=I.current;if(!W)return;const q=()=>ie(W.scrollHeight>W.clientHeight+1);if(q(),typeof ResizeObserver>"u")return;const oe=new ResizeObserver(q);oe.observe(W);const ee=W.firstElementChild;return ee&&oe.observe(ee),()=>oe.disconnect()},[i,j]),o.useEffect(()=>{if(!w)return fc()},[w]);const te=o.useRef(typeof document>"u"?null:document.activeElement);o.useEffect(()=>{if(w)return;const W=te.current,q=U.current;return Yo(q,W),q&&!q.contains(document.activeElement)&&(q.querySelector(jn)??q).focus(),()=>{const oe=document.activeElement;(!oe||oe===document.body||q&&q.contains(oe))&&Zo(W)?.focus?.()}},[w]),Sa(U,!w);const P=o.useRef(!0),G=$a(),X=o.useRef(null);o.useEffect(()=>(P.current=!0,()=>{P.current=!1,X.current&&(clearTimeout(X.current),X.current=null)}),[]);const K=o.useCallback(()=>{!P.current||!F.current||(F.current=!1,H(!1))},[]),L=o.useCallback((W,q=!1)=>{if(q&&!P.current||F.current)return;F.current=!0,H(!0);const oe=setTimeout(()=>{X.current===oe&&(X.current=null);let ee;try{ee=W?W():void 0}catch{K();return}ee&&typeof ee.then=="function"&&ee.then(()=>{setTimeout(K,120)},K)},G?0:qx);q&&(X.current=oe)},[K,G]),R=o.useCallback(()=>{y||v&&v()===!1||L(g,!0)},[L,g,y,v]),S=o.useRef(R);o.useEffect(()=>{S.current=R});const V=!w&&!!g;o.useEffect(()=>{if(V)return ir(()=>S.current())},[V]);const ae=o.useRef(v);o.useEffect(()=>{ae.current=v});const ne=o.useRef(y);o.useEffect(()=>{ne.current=y});const re=o.useRef(()=>L(g,!0));o.useEffect(()=>{re.current=()=>L(g,!0)}),Pu(V&&b,()=>{if(ne.current)return!1;const W=ae.current;return W&&W()===!1?!1:(re.current(),!0)});const ue=V&&_,Be=o.useRef(!1),le=W=>{Be.current=W.target===W.currentTarget},J=W=>{const q=Be.current;Be.current=!1,q&&W.target===W.currentTarget&&R()},O=n.jsx("div",{className:`popup ${w?"popup--inline":""} ${E==="belowPagePopup"?"popup--below-page-popup":""} ${$?"popup--closing":""} ${B}`,onPointerDown:ue?le:void 0,onClick:ue?J:void 0,onMouseDown:w?void 0:W=>{W.target===W.currentTarget&&W.preventDefault()},children:n.jsxs("div",{ref:U,className:`popup-panel${k?` popup-panel--${k}`:""}${A!=null?" popup-panel--has-height":""}${D?" popup-panel--fill-body":""}`,style:A!=null?{"--popup-height":typeof A=="number"?`${A}px`:A}:void 0,tabIndex:-1,role:w?void 0:"dialog","aria-modal":w?void 0:!0,"aria-labelledby":!w&&f&&r?T:void 0,"aria-label":!w&&!(f&&r)?N??(typeof r=="string"?r:void 0):void 0,children:[!f&&(s||g)?n.jsxs("div",{className:"popup-close-float",children:[s,g&&n.jsx(me,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,className:"popup-close-btn",onClick:R,disabled:y,ariaLabel:t("common.close","\uB2EB\uAE30")})]}):r||s||g?n.jsxs("div",{className:`popup-header${a?" popup-header--with-subtitle":""}`,children:[n.jsxs("div",{className:"popup-header-main",children:[r?n.jsx("h2",{id:T,className:"popup-title popup-title--left h2",children:r}):n.jsx("span",{id:T,className:"popup-title popup-title--left h2"}),a&&n.jsx("span",{className:"popup-subtitle body-3",children:a})]}),n.jsxs("div",{className:"popup-header-aside",children:[l&&n.jsx("div",{className:"popup-header-segment",children:n.jsx(kn,{size:40,ariaLabel:l.ariaLabel,options:l.options.map(W=>({key:W.key,label:W.label,disabled:W.disabled})),value:l.value,onChange:l.onChange})}),n.jsxs("div",{className:"popup-header-actions",children:[s,g&&n.jsx(me,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,className:"popup-close-btn",onClick:R,disabled:y,ariaLabel:t("common.close","\uB2EB\uAE30")})]})]})]}):null,n.jsx("div",{className:"popup-content",ref:I,tabIndex:z?0:void 0,children:n.jsx("div",{className:"popup-content__inner",children:typeof i=="function"?i({animateThen:L,closeWithAnimation:R}):i})}),d!=null&&d!==!1&&n.jsx("div",{className:`popup-footer-note caption-1${m?" popup-footer-note--divider":""}`,role:"note",children:d}),p||h?n.jsxs("div",{className:`popup-footer popup-footer--bar${C?` ${C}`:""}`,children:[n.jsx("div",{className:"popup-footer__start",children:typeof p=="function"?p({animateThen:L,closeWithAnimation:R}):p}),n.jsx("div",{className:"popup-footer__end",children:typeof h=="function"?h({animateThen:L,closeWithAnimation:R}):h})]}):u?.length?n.jsx("div",{className:`popup-footer popup-footer--buttons${x!=="center"?` popup-footer--${x}`:""}`,children:u.map((W,q)=>n.jsx(me,{htmlType:"button",size:48,variant:W.variant??"default",label:W.label,disabled:W.disabled,onClick:()=>W.onClick?.({animateThen:L,closeWithAnimation:R})},q))}):c?n.jsx("div",{className:`popup-footer${x!=="center"?` popup-footer--${x}`:""}${C?` ${C}`:""}`,children:typeof c=="function"?c({animateThen:L,closeWithAnimation:R}):c}):null]})});return w||typeof document>"u"?O:bn.createPortal(O,document.body)}function bc({checked:e,onChange:t,disabled:r=!1,label:a,ariaLabel:s,labelPosition:l="right",className:i="",id:u}){const c=a&&n.jsx("span",{className:"toggle__label body-3",children:a});return n.jsxs("label",{className:`toggle${r?" toggle--disabled":""} ${i}`.trim(),children:[l==="left"&&c,n.jsx("input",{id:u,type:"checkbox",role:"switch",checked:e,disabled:r,onChange:p=>t?.(p.target.checked),"aria-label":!a&&s?s:void 0}),n.jsx("span",{className:"toggle__slider"}),l==="right"&&c]})}function An({options:e,value:t,onChange:r,placeholder:a,disabled:s=!1,block:l=!1,size:i,error:u=!1,className:c="",ariaLabel:p,ariaDescribedBy:h}){const d=wn(),m=i??d??Cn,{t:C}=Ne.useTranslation(),x=a??C("dropdown.placeholder","\uC120\uD0DD"),g=o.useId(),y=o.useId(),v=o.useRef(null),_=o.useCallback((T,I)=>{const z=window.innerHeight,ie=window.innerWidth,te=typeof document<"u"?document.getElementById(g):null,P=260,G=Math.min(P,Math.max(te?.offsetHeight||0,te?.scrollHeight||0)||P),X=Math.max(T.width,te?.offsetWidth||0),K=z-T.bottom,L=T.top,R=K<G&&L>K,S=8,V=(ae,ne)=>Math.min(Math.max(S,ae),Math.max(S,ne));return{position:"fixed",left:V(T.left,ie-X-S),minWidth:T.width,maxWidth:Math.max(T.width,ie-S*2),...R?{top:"auto",bottom:V(z-T.top+6,z-G-S)}:{bottom:"auto",top:V(T.bottom+6,z-G-S)},zIndex:ra(I)}},[g]),{open:b,setOpen:B,toggle:N,style:f,triggerRef:w,menuRef:k}=aa({computeStyle:_}),[E,A]=o.useState(-1),D=o.useCallback(()=>A(-1),[]),j=e.find(T=>T.value===t);o.useEffect(()=>{if(b){const T=e.findIndex(I=>I.value===t);A(T>=0?T:e.length?0:-1),requestAnimationFrame(()=>{const I=k.current;if(!I)return;const z=I.querySelectorAll(".dropdown__option")[T];z&&(I.scrollTop=Math.max(0,z.offsetTop-I.clientHeight/2+z.clientHeight/2))})}},[b]),o.useEffect(()=>{b&&A(T=>{if(T>=0&&T<e.length)return T;const I=e.findIndex(z=>z.value===t);return I>=0?I:e.length?0:-1})},[b,e.length]);const $=o.useCallback(()=>{s||N()},[s,N]),H=o.useCallback(T=>{T.disabled||s||(T.value!==t&&r?.(T.value),B(!1))},[r,B,s,t]);o.useEffect(()=>{s&&B(!1)},[s,B]);const F=o.useCallback(T=>{if(!s){if(!b){(T.key==="Enter"||T.key===" "||T.key==="ArrowDown")&&(T.preventDefault(),B(!0));return}if(T.key==="Escape"){T.preventDefault(),B(!1);return}T.key==="ArrowDown"?(T.preventDefault(),A(I=>{let z=I+1;for(;z<e.length&&e[z].disabled;)z++;return z<e.length?z:I})):T.key==="ArrowUp"?(T.preventDefault(),A(I=>{let z=I-1;for(;z>=0&&e[z].disabled;)z--;return z>=0?z:I})):(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),e[E]?H(e[E]):B(!1))}},[s,b,e,E,H,B]),U=b?n.jsx("div",{ref:k,id:g,className:"dropdown__menu","data-tooltip-ignore":!0,role:"listbox",style:f,onMouseLeave:D,onMouseDown:T=>T.preventDefault(),children:e.map((T,I)=>n.jsxs("button",{id:`${g}-option-${I}`,type:"button",role:"option","aria-selected":T.value===t,className:xe("dropdown__option body-2",T.value===t?"dropdown__option--active":"",I===E?"dropdown__option--active":"",T.disabled?"dropdown__option--disabled":""),onMouseDown:z=>z.preventDefault(),onClick:()=>H(T),onMouseEnter:()=>A(I),disabled:T.disabled,children:[n.jsx("span",{className:"dropdown__option-check",children:T.value===t&&n.jsx("svg",{viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polyline",{points:"2 7 5.5 10.5 12 3.5"})})}),T.label]},T.value))}):null;return n.jsxs("div",{ref:v,className:xe("dropdown",`dropdown--s${m}`,b?"dropdown--open":"",l?"dropdown--block":"",u?"dropdown--error":"",c),onKeyDown:F,children:[n.jsxs("button",{ref:w,type:"button",className:"dropdown__trigger",role:"combobox","aria-haspopup":"listbox","aria-expanded":b,"aria-controls":b?g:void 0,"aria-activedescendant":b&&E>=0?`${g}-option-${E}`:void 0,"aria-label":p,"aria-describedby":[p&&j?y:"",h??""].filter(Boolean).join(" ")||void 0,"aria-invalid":u||void 0,disabled:s,onClick:$,onBlur:T=>{b&&!k.current?.contains(T.relatedTarget)&&B(!1)},children:[n.jsx("span",{id:y,className:`dropdown__trigger-label body-2${j?"":" dropdown__trigger-label--placeholder"}`,children:j?j.label:x}),n.jsx("svg",{className:"dropdown__chevron",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polyline",{points:"4 6 8 10 12 6"})})]}),typeof document<"u"&&bn.createPortal(U,v.current?.closest(".ihabdevteam-core-scope")??document.body)]})}const Ux={hearingAid:"hearingAid",cochlearImplant:"cochlearImplant",other:"other",\uBCF4\uCCAD\uAE30:"hearingAid",\uC778\uACF5\uC640\uC6B0:"cochlearImplant",\uAE30\uD0C0:"other"};function yc(e){return e?Ux[e]??null:null}function vc(e){switch(yc(e)){case"hearingAid":return"main";case"cochlearImplant":return"sub";default:return"default"}}function xc(e,t){const r=yc(e);return r?t(`device.type.${r}`,{defaultValue:e??""}):e??""}const Dr=e=>e==null?"":String(e).trim();function ms(e,t,r,a){const s=Dr(e),l=Dr(t),i=Dr(r);if(a&&s&&l&&i){const c=`${s.padStart(4,"0")}-${l.padStart(2,"0")}-${i.padStart(2,"0")}`,p=new Date(c);if(!Number.isNaN(p.getTime())&&p.toISOString().slice(0,10)===c){const h=Ai(c,a);if(h)return h}}const u=[s,l,i];for(;u.length>0&&u[u.length-1]==="";)u.pop();return u.join(".")}function Gx(e,t,r){const a=Dr(e);return a?`${a}-${Dr(t).padStart(2,"0")}-${Dr(r).padStart(2,"0")}`:""}function _c(e){return typeof e=="string"?e:e.label}function wc({value:e,onChange:t,suggestions:r,openOnFocus:a=!1,filterSuggestions:s,onSelectSuggestion:l,autoActiveFirst:i=!1}){const u=o.useId(),[c,p]=o.useState(!1),[h,d]=o.useState(-1),m=o.useRef(null),C=o.useMemo(()=>{if(!r.length)return[];const D=e??"";return s===!1?r:D?typeof s=="function"?s(r,D):r.filter(j=>_c(j).toLowerCase().includes(D.toLowerCase())):a?r:[]},[r,e,a,s]),[x,g]=o.useState(!1),y=o.useRef([]),v=x&&C.length===0?y.current:C;o.useEffect(()=>{v.length&&(y.current=v)},[v]);const _=o.useCallback(()=>g(!0),[]),b=o.useCallback(()=>g(!1),[]),B=i?0:-1;o.useEffect(()=>{c||d(B)},[c,B]),o.useEffect(()=>()=>{m.current&&clearTimeout(m.current)},[]);const N=h<v.length?h:B<v.length?B:-1,f=o.useCallback(D=>{l?l(D):t?.(_c(D)),p(!1)},[t,l]),w=o.useCallback(()=>p(!0),[]),k=o.useCallback(()=>{p(!0),d(B)},[B]),E=o.useCallback(()=>{m.current=setTimeout(()=>p(!1),120)},[]),A=o.useCallback(D=>{D.nativeEvent.isComposing||D.keyCode===229||(D.key==="ArrowDown"?(D.preventDefault(),p(!0),d(j=>Math.min(v.length-1,(j<v.length?j:B)+1))):D.key==="ArrowUp"?(D.preventDefault(),d(j=>Math.max(B,(j<v.length?j:v.length)-1))):D.key==="Enter"?N>=0&&f(v[N]):D.key==="Escape"&&c&&(D.preventDefault(),p(!1)))},[v,N,c,f,B]);return{listId:u,open:c,activeIdx:N,filtered:v,handleFocus:w,handleBlur:E,handleInput:k,handleKeyDown:A,handleSelect:f,handleCompositionStart:_,handleCompositionEnd:b}}const da=typeof window<"u"?o.useLayoutEffect:o.useEffect;function Un(e){const{value:t,defaultValue:r,name:a,inputRef:s,onChange:l,label:i,ariaLabel:u,ariaDescribedBy:c,required:p,placeholder:h,ghostText:d,ghostHint:m,type:C="text",disabled:x=!1,readOnly:g=!1,error:y,helperText:v,maxLength:_,size:b,variant:B="input",fullWidth:N=!1,newline:f=!1,multiline:w=!1,rows:k=3,leftIcon:E,rightIcon:A,clearable:D=!1,list:j,showCount:$=!0,className:H="",onFocus:F,onBlur:U,onKeyDown:T,onEnter:I,inputMode:z,autoComplete:ie,autoCapitalize:te,autoCorrect:P,revealable:G=!1,autoFocus:X,suggestions:K,filterSuggestions:L,onSelectSuggestion:R,autoActiveFirst:S,openOnFocus:V=!1}=e,ae=wn(),ne=b??ae??Cn,re=g||x?void 0:K,{t:ue}=Ne.useTranslation(),Be=o.useId();!i&&!u&&Tt(`TextField:unnamed:${Be}`,"[ihab/TextField] \uC774\uB984\uC774 \uC5C6\uC2B5\uB2C8\uB2E4 \u2014 label \uC774\uB098 ariaLabel \uC911 \uD558\uB098\uB97C \uC8FC\uC138\uC694. placeholder \uB294 \uC774\uB984\uC744 \uB300\uC2E0\uD558\uC9C0 \uBABB\uD569\uB2C8\uB2E4.");const le=`tf-${Be}`,J=`tf-helper-${Be}`,O=o.useRef(null),W=wc({value:t??"",onChange:l,suggestions:re??[],openOnFocus:V,filterSuggestions:L,onSelectSuggestion:R,autoActiveFirst:S}),q=!!re&&W.open&&W.filtered.length>0,oe=o.useRef(null),[ee,be]=o.useState(null),je=o.useCallback(()=>{const Ae=oe.current;if(!Ae||typeof window>"u")return;const st=Ae.getBoundingClientRect(),ft=window.innerHeight,Ct=8,Nt=230,Ft=typeof document<"u"?document.getElementById(W.listId):null,yt=Math.min(Nt,Math.max(Ft?.offsetHeight||0,Ft?.scrollHeight||0)||Nt),vt=ft-st.bottom,Et=st.top,It=vt<yt+Ct&&Et>vt,Je=(At,Qe)=>Math.min(Math.max(Ct,At),Math.max(Ct,Qe));be({position:"fixed",left:st.left,width:st.width,...It?{bottom:Je(ft-st.top+Ct,ft-yt-Ct)}:{top:Je(st.bottom+Ct,ft-yt-Ct)},zIndex:ra(Ae)})},[W.listId]);da(()=>{if(!q)return;je();let Ae=null;const st=()=>{if(typeof requestAnimationFrame>"u"){je();return}Ae===null&&(Ae=requestAnimationFrame(()=>{Ae=null,je()}))},ft=Ct=>{const Nt=Ct.target;Nt&&Nt.nodeType===1&&Nt.closest?.(".text-field__suggestions")||st()};return window.addEventListener("scroll",ft,!0),window.addEventListener("resize",st),()=>{Ae!==null&&cancelAnimationFrame(Ae),window.removeEventListener("scroll",ft,!0),window.removeEventListener("resize",st)}},[q,je,W.filtered.length]);const De=o.useCallback(Ae=>{O.current=Ae,typeof s=="function"?s(Ae):s&&(s.current=Ae)},[s]),we=d?`${d}${m??ue("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)")}`:h,ze=C==="email"||C==="tel"||C==="password"||C==="url"||ie==="username"||ie==="email"||ie==="one-time-code",ye=te??(ze?"none":void 0),_e=P??(ze?"off":void 0),ve=G&&C==="password"&&!f&&!w,[Ee,Oe]=o.useState(!1),ot=ve&&Ee?"text":C,it=t!==void 0,Fe=it&&C==="password",[Ue,nt]=o.useState((r??"").length),Te=it?(t??"").length:Ue,Xe=o.useRef(t);da(()=>{Xe.current=t}),o.useEffect(()=>{const Ae=O.current;if(!Fe||!Ae)return;const st=t??"";Ae.value!==st&&(Ae.value=st)},[Fe,t]),o.useEffect(()=>{if(!f||!O.current)return;const Ae=O.current;Ae.style.height="",Ae.scrollHeight>Ae.clientHeight&&(Ae.style.height=`${Ae.scrollHeight}px`)},[t,Ue,f]);const rt=_!=null&&Te>_,ut=ne===32?16:20,gt=xe("text-field",`text-field--s${ne}`,B==="display"?"text-field--display":"",N?"text-field--full-width":"",x?"text-field--disabled":"",g?"text-field--readonly":"",y?"text-field--error":"",E?"text-field--has-left-icon":"",A||D||ve?"text-field--has-right-icon":"",H),_t={id:le,...Fe?{}:it?{value:t}:{defaultValue:r},ref:De,placeholder:we,name:a,disabled:x,readOnly:g,autoFocus:X,maxLength:_,list:j,inputMode:z,autoComplete:ie,autoCapitalize:ye,autoCorrect:_e,"aria-label":!i&&u?u:void 0,"aria-required":p,"aria-invalid":!!y,"aria-describedby":[v||y?J:null,c].filter(Boolean).join(" ")||void 0,role:re?"combobox":void 0,"aria-autocomplete":re?"list":void 0,"aria-haspopup":re?"listbox":void 0,"aria-expanded":re?q:void 0,"aria-controls":q?W.listId:void 0,"aria-activedescendant":q&&W.activeIdx>=0?`${W.listId}-option-${W.activeIdx}`:void 0,onChange:Ae=>{const st=Ae.target;it||nt(st.value.length),l?.(st.value),re&&W.handleInput(),Fe&&queueMicrotask(()=>{const ft=Xe.current??"";st.value!==ft&&(st.value=ft)})},onCompositionStart:re?W.handleCompositionStart:void 0,onCompositionEnd:re?W.handleCompositionEnd:void 0,onFocus:(Ae=>{F?.(Ae),re&&W.handleFocus()}),onBlur:(Ae=>{U?.(Ae),re&&W.handleBlur()}),onKeyDown:(Ae=>{const st=(Ae.key==="Tab"&&!Ae.shiftKey||Ae.key===" ")&&!Ae.nativeEvent.isComposing;if(d&&st&&!g&&!x&&!(Ae.currentTarget.value??"").trim()){Ae.preventDefault();const ft=Ae.currentTarget;it||(ft.value=d,nt(d.length)),l?.(d);return}re&&Ae.key==="Enter"&&!Ae.nativeEvent.isComposing&&W.activeIdx>=0?Ae.preventDefault():I&&Ae.key==="Enter"&&!Ae.nativeEvent.isComposing&&(Ae.preventDefault(),I()),T?.(Ae),re&&W.handleKeyDown(Ae)})},pt=D&&!x&&!g&&Te>0,Yt=()=>f?n.jsx("textarea",{..._t,className:"text-field__input text-field__input--auto body-2",rows:1}):w?n.jsx("textarea",{..._t,className:"text-field__input text-field__input--textarea body-2",rows:k}):n.jsx("input",{..._t,type:ot,className:"text-field__input body-2"}),kt=B==="display"&&!f&&!w&&!!we,ct=()=>n.jsxs(n.Fragment,{children:[Yt(),kt&&n.jsx("span",{className:"text-field__placeholder","aria-hidden":"true",children:we})]});return n.jsxs("div",{ref:oe,className:gt,children:[i&&n.jsxs("label",{htmlFor:le,className:"text-field__label caption-1",children:[i,p&&n.jsx("span",{className:"text-field__required",children:"*"})]}),n.jsxs("div",{className:"text-field__wrap",children:[E&&n.jsx("span",{className:"text-field__icon text-field__icon--left",children:n.jsx(lt,{icon:E,label:"",className:"",svgClassName:"text-field__icon-svg",size:ut})}),ct(),_!=null&&$&&n.jsxs("span",{className:`text-field__count caption-2${rt?" text-field__count--over":""}`,children:[Te,"/",_]}),pt&&n.jsx(me,{size:24,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,className:"text-field__clear",ariaLabel:ue("textField.clearAriaLabel","\uC785\uB825\uAC12 \uC9C0\uC6B0\uAE30"),htmlType:"button",onMouseDown:Ae=>{Ae.preventDefault()},onClick:()=>{!it&&O.current&&(O.current.value="",nt(0)),l?.("")},tabIndex:-1}),ve&&n.jsx(me,{size:24,type:"dot",icon:Ee?"eye-off":"eye",variant:"transparent-gray",useBorder:!1,className:"text-field__reveal",ariaLabel:ue("textField.showPassword","\uBE44\uBC00\uBC88\uD638 \uBCF4\uAE30"),"aria-pressed":Ee,htmlType:"button",disabled:x,onMouseDown:Ae=>{Ae.preventDefault()},onClick:()=>Oe(Ae=>!Ae)}),A&&!pt&&n.jsx("span",{className:"text-field__icon text-field__icon--right",children:n.jsx(lt,{icon:A,label:"",className:"",svgClassName:"text-field__icon-svg",size:ut})})]}),!!re&&n.jsx("span",{className:"text-field__status",role:"status","aria-live":"polite",children:W.open&&(t??"").length>0&&W.filtered.length===0?ue("common.noMatches","\uB9DE\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"):""}),q&&(typeof document>"u"?null:bn.createPortal(n.jsx("ul",{id:W.listId,className:"text-field__suggestions",role:"listbox",style:ee??{position:"fixed",visibility:"hidden"},"data-tooltip-ignore":!0,children:W.filtered.map((Ae,st)=>n.jsx("li",{id:`${W.listId}-option-${st}`,role:"option","aria-selected":st===W.activeIdx,className:`text-field__suggestion body-2${st===W.activeIdx?" is-active":""}`,onMouseDown:ft=>ft.preventDefault(),onClick:()=>{W.handleSelect(Ae),O.current?.focus()},children:typeof Ae=="string"?Ae:n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-field__suggestion-label",children:Ae.label}),Ae.hint&&n.jsx("span",{className:"text-field__suggestion-hint caption-1",children:Ae.hint})]})},typeof Ae=="string"?`${Ae}-${st}`:Ae.id))}),document.body)),(v||y)&&n.jsx("div",{className:"text-field__footer",children:n.jsx("span",{id:J,className:"text-field__helper caption-1",role:y?"alert":void 0,children:y||v})})]})}const Bc=()=>{};function dn(e){const t=o.useId(),r=wn()??Cn;if(!("variant"in e)){const{label:b,sub:B,onClick:N,children:f,align:w="horizontal",icon:k,useFullWidth:E=!1,required:A=!1}=e,D=j=>{N&&j.target===j.currentTarget&&(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),N())};return n.jsxs("div",{className:xe("panel-row",w==="vertical"?"panel-row--vertical":"",E?"panel-row--label-fixed panel-row--fill":"",N?"panel-row--clickable":""),onClick:N,onKeyDown:N?D:void 0,role:N?"button":void 0,tabIndex:N?0:void 0,children:[k!=null&&n.jsx("div",{className:"panel-row__icon",children:k}),b!=null&&n.jsxs("div",{className:"panel-row__left",children:[n.jsxs("div",{className:"panel-row__label body-3",children:[b,A&&n.jsx("span",{className:"required-mark",children:"*"})]}),B&&n.jsx("div",{className:"panel-row__sub caption-1",children:B})]}),n.jsx("div",{className:"panel-row__right",children:f})]})}if(e.variant==="description")return n.jsx("div",{className:"panel-row panel-row--block",children:n.jsx("p",{className:"panel-row__description body-3",children:e.children})});if(e.variant==="empty")return n.jsx("div",{className:"panel-row panel-row--empty body-3",children:e.children});if(e.variant==="loading")return n.jsx("div",{className:"panel-row panel-row--loading",children:n.jsx(Nr,{size:28})});if(e.variant==="custom"&&!e.label)return n.jsx("div",{className:"panel-row panel-row--block",children:e.children});const{variant:a,label:s,sub:l,onClick:i,required:u,error:c,align:p="horizontal",useFullWidth:h=!1,icon:d}=e,m=a==="button"?void 0:i;let C=null;const x=a==="toggle"?`panel-toggle-${t}`:void 0,g=c?`panel-error-${t}`:void 0,y=`panel-helper-${t}`;if(a==="toggle"){const b=e;C=n.jsx(bc,{checked:b.checked,onChange:b.onChange,id:x})}else if(a==="segmented"){const b=e;C=n.jsx(kn,{options:b.options,value:b.value,onChange:b.onChange,size:b.size??r,ariaLabel:s})}else if(a==="dropdown"){const b=e,B=b.dropdowns?.length?n.jsx("div",{className:`panel-row__dropdown-group${h?" panel-row__dropdown-group--full":""}`,children:b.dropdowns.map((N,f)=>n.jsx("div",{className:h?"panel-row__dropdown-item--full":void 0,children:n.jsx(An,{options:N.options,value:N.value,onChange:N.onChange,size:r,placeholder:N.placeholder,block:h,error:!!c,ariaDescribedBy:g,ariaLabel:N.ariaLabel??([s,N.placeholder].filter(Boolean).join(" ")||void 0)})},f))}):n.jsx(An,{options:b.options??[],value:b.value??"",onChange:b.onChange??Bc,size:r,block:h,error:!!c,ariaLabel:s,ariaDescribedBy:g});C=c?n.jsxs("div",{className:`panel-row__dropdown-error-wrap${h?" panel-row__dropdown-error-wrap--full":""}`,children:[B,n.jsx("span",{id:g,className:"caption-1 panel-row__error",role:"alert",children:c})]}):B}else if(a==="button"){const b=e;b.buttons?.length?C=n.jsx("div",{className:"panel-row__button-group",children:b.buttons.map((B,N)=>n.jsx(me,{htmlType:"button",size:B.btnSize??r,variant:B.btnVariant??"default",disabled:B.disabled,onClick:B.onClick,children:B.label},N))}):C=n.jsx(me,{htmlType:"button",size:b.btnSize??r,variant:b.btnVariant??"default",disabled:b.disabled,onClick:b.onClick,children:b.buttonLabel})}else if(a==="text"){const b=e;C=n.jsx("span",{className:`panel-row__text body-2${h?" panel-row__text--full":""}`,style:b.valueColor?{color:b.valueColor}:void 0,children:b.value})}else if(a==="input"){const b=e;C=n.jsxs("div",{className:`panel-row__input-wrap${h?" panel-row__input-wrap--full":""}`,children:[n.jsx(Un,{size:r,value:b.value,onChange:b.onChange??Bc,onKeyDown:b.onKeyDown,onEnter:b.onEnter,placeholder:b.placeholder,ghostText:b.ghostText,inputMode:b.inputMode,readOnly:b.readOnly,disabled:b.disabled,type:b.type,autoComplete:b.autoComplete,revealable:b.revealable,autoCapitalize:b.autoCapitalize,autoCorrect:b.autoCorrect,maxLength:b.maxLength,showCount:b.showCount,multiline:b.multiline,rows:b.rows,fullWidth:h,error:c,ariaLabel:s,required:u,ariaDescribedBy:b.helperText?y:void 0}),b.helperText&&n.jsx("div",{id:y,className:"panel-row__helper caption-1",children:b.helperText})]})}else a==="custom"&&(C=e.children);c&&a!=="input"&&a!=="dropdown"&&(C=n.jsxs("div",{className:`panel-row__dropdown-error-wrap${h?" panel-row__dropdown-error-wrap--full":""}`,children:[C,n.jsx("span",{id:g,className:"caption-1 panel-row__error",role:"alert",children:c})]}));const v=a==="input"||a==="dropdown"||(a==="text"||a==="custom")&&h,_=b=>{m&&b.target===b.currentTarget&&(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),m())};return n.jsxs("div",{className:xe("panel-row",p==="vertical"?"panel-row--vertical":"",v?"panel-row--label-fixed":"",a==="text"?"panel-row--text":"",m?"panel-row--clickable":""),onClick:m,onKeyDown:m?_:void 0,role:m?"button":void 0,tabIndex:m?0:void 0,children:[d!=null&&n.jsx("div",{className:"panel-row__icon",children:d}),n.jsxs("div",{className:"panel-row__left",children:[x?n.jsxs("label",{htmlFor:x,className:"panel-row__label body-3",children:[s,u&&n.jsx("span",{className:"required-mark",children:"*"})]}):n.jsxs("div",{className:"panel-row__label body-3",children:[s,u&&n.jsx("span",{className:"required-mark",children:"*"})]}),l&&n.jsx("div",{className:"panel-row__sub caption-1",children:l})]}),n.jsx("div",{className:"panel-row__right",children:C})]})}function kc(e){const t=e.productName||e.brand,r=[e.brand,e.fitType].filter(a=>!!a&&a!==t);return[...new Set(r)].join(" \xB7 ")}function Kx({devices:e,onRelease:t,emptyLabel:r}){const{t:a,i18n:s}=Ne.useTranslation();return n.jsx("div",{className:"panel-row panel-row--device",children:["left","right"].map(l=>{const i=e[l],u=l==="left"?a("device.direction.left","\uC88C"):a("device.direction.right","\uC6B0");return n.jsxs("div",{className:"panel-row__device-column",children:[n.jsxs("div",{className:"panel-row__device-head",children:[n.jsx("span",{className:"panel-row__device-side body-2b",children:u}),i&&t&&n.jsx(me,{htmlType:"button",size:32,type:"dot",icon:"x",ariaLabel:`${u} ${a("customers.device.unwear","\uCC29\uC6A9 \uD574\uC81C")}`,showTooltipInfo:a("customers.device.unwear","\uCC29\uC6A9 \uD574\uC81C"),onClick:()=>t(l)})]}),i?n.jsxs("div",{className:"panel-row__device-info",children:[n.jsxs("span",{className:"panel-row__device-kind",children:[i.device&&n.jsx(cn,{size:"small",variant:vc(i.device),fill:"soft",label:xc(i.device,a)}),kc(i)&&n.jsx("span",{className:"panel-row__device-detail body-3",children:kc(i)})]}),n.jsx("span",{className:"panel-row__device-name body-2b",children:i.productName||i.brand}),ms(i.wornYear,i.wornMonth,i.wornDay,s.language)&&n.jsx("span",{className:"panel-row__device-date caption-1",children:a("customers.device.wornSince",{date:ms(i.wornYear,i.wornMonth,i.wornDay,s.language)})})]}):n.jsx("span",{className:"panel-row__device-empty body-3",children:r??a("customers.device.notRegistered","\uBBF8\uB4F1\uB85D")})]},l)})})}function Sr({title:e,titleLevel:t=2,icon:r,disc:a,actions:s,minHeight:l,maxWidth:i,className:u,scrollable:c,scrollbarGutter:p="auto",compactRows:h=!1,useBorder:d=!0,useBg:m=!0,labelWidth:C,form:x=!1,loading:g,empty:y,children:v}){const _=xe("panel",x?"panel--form":"",l!==void 0?"panel--fill":"",d?"":"panel--no-border",m?"":"panel--no-bg",h?"panel--compact-rows":"",u),b={};l!==void 0&&(b.minHeight=l),i!==void 0&&(b.maxWidth=typeof i=="number"?`${i}px`:i),C!==void 0&&(b["--panel-label-width"]=typeof C=="number"?`${C}px`:C);const B=t?`h${t}`:"div",N=d?Cn:48;return n.jsx(Xo.Provider,{value:N,children:n.jsxs("div",{className:_,style:Object.keys(b).length?b:void 0,children:[(!!e||a!=null)&&n.jsxs("div",{className:xe("panel__header",a!=null?"panel__header--with-disc":""),children:[r&&n.jsx(lt,{icon:r,label:typeof e=="string"?e:void 0,className:"panel__icon"}),n.jsxs("div",{className:"panel__title-group",children:[!!e&&n.jsx(B,{className:`panel__title ${a!=null?"body-3b":"h5b"}`,children:e}),a!=null&&n.jsx("p",{className:"panel__disc caption-1",children:a})]}),s&&n.jsx("div",{className:"panel__actions",children:s})]}),g?n.jsx(dn,{variant:"loading"}):y!=null&&o.Children.toArray(v).length===0?n.jsx(dn,{variant:"empty",children:y}):c?n.jsx("div",{className:xe("panel__body--scroll",p==="stable"&&"panel__body--gutter-stable"),children:v}):v]})})}function Yx({cols:e=2,layout:t="grid",gap:r=1,collapseAt:a,className:s,style:l,children:i}){const u=o.useRef(null),[c,p]=o.useState();o.useEffect(()=>{const d=u.current;if(a===void 0||!d||(p(d.clientWidth),typeof ResizeObserver>"u"))return;const m=new ResizeObserver(([C])=>p(C.contentRect.width));return m.observe(d),()=>m.disconnect()},[a]);const h=a!==void 0&&c!==void 0&&c<=a;return n.jsx("div",{ref:u,className:xe("panel-grid",t==="columns"&&"panel-grid--columns",s),style:{"--panel-grid-cols":h?1:e,"--panel-grid-gap":typeof r=="number"?`${r}px`:r,...l},children:i})}function fs(e){const{title:t,subtitle:r,message:a,topContent:s,details:l,children:i,confirmLabel:u,cancelLabel:c,hideCancel:p=!1,extraAction:h,confirmVariant:d="main",confirmDisabled:m=!1,onConfirm:C,closeOnConfirm:x=!0,onClose:g,inline:y,size:v="small",className:_,initialFocus:b="close"}=e,{t:B}=Ne.useTranslation(),N=o.useRef(null);o.useEffect(()=>{if(y||b==="close")return;const D=N.current?.closest(".popup-panel"),j=Array.from(D?.querySelectorAll(".popup-footer--buttons button")??[]),$=b==="confirm"?j[j.length-1]:p?void 0:j[h?1:0];$&&!$.disabled&&$.focus()},[]);const f=o.useRef(!1),[w,k]=o.useState(!1),E=D=>{let j=!1;return{close:()=>{j=!0,D()},didClose:()=>j}},A=async D=>{if(f.current)return;f.current=!0;const j=typeof document<"u"?document.activeElement:null;k(!0);let $=!1;try{$=await D()}catch(H){typeof console<"u"&&console.error(H)}finally{$||(f.current=!1,k(!1),requestAnimationFrame(()=>{const H=document.activeElement;(!H||H===document.body)&&j?.isConnected&&j.focus()}))}};return n.jsxs(qn,{title:t,subtitle:r,onClose:g,closeDisabled:w,inline:y,size:v,className:xe("confirm-popup",s!=null&&"confirm-popup--has-top",_),buttons:[...h?[{label:h.label,variant:h.variant??"default",disabled:h.disabled||w,onClick:async({closeWithAnimation:D})=>{await A(async()=>{const j=E(D);await h.onClick(j.close);const $=h.closeOnClick??!0;return $&&D(),$||j.didClose()})}}]:[],...p?[]:[{label:c??B("common.cancel","\uCDE8\uC18C"),variant:"default",disabled:w,onClick:({closeWithAnimation:D})=>D()}],{label:u??B("common.confirm","\uD655\uC778"),variant:d,disabled:m||w,onClick:async({closeWithAnimation:D})=>{await A(async()=>{const j=E(D);return await C(j.close),x&&D(),x||j.didClose()})}}],children:[s!=null&&n.jsx("div",{className:"confirm-popup__top",children:s}),l&&l.length>0&&n.jsx(Sr,{children:l.map((D,j)=>n.jsx(dn,{label:D.label,children:n.jsx("span",{className:"panel-row__text body-2",children:D.value})},j))}),n.jsx("p",{ref:N,className:"body-2 confirm-popup__message",hidden:a==null,children:a}),i]})}function Zx({value:e,onChange:t,canAdd:r,error:a,onAdd:s,onClose:l,maxLength:i}){const{t:u}=Ne.useTranslation(),c=u("folder.add.placeholder","\uD3F4\uB354 \uC774\uB984");return n.jsx(fs,{title:u("folder.add.title","\uD3F4\uB354 \uCD94\uAC00"),subtitle:u("folder.add.sub","\uC0C8 \uD3F4\uB354 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694."),confirmLabel:u("common.add","\uCD94\uAC00"),confirmDisabled:!r,closeOnConfirm:!1,onConfirm:p=>s(p),onClose:l,children:n.jsx(Sr,{useBorder:!1,children:n.jsx(dn,{useFullWidth:!0,children:n.jsx(Un,{autoFocus:!0,value:e,onChange:t,placeholder:c,ariaLabel:c,maxLength:i,fullWidth:!0,error:a,onEnter:()=>{r&&s(l)}})})})})}function Ac({title:e,count:t,titleLevel:r=3,actions:a,empty:s=!1,emptyContent:l,className:i,children:u}){const c=`h${r}`;return n.jsxs("section",{className:xe("card-section",i),children:[e!=null&&n.jsxs("header",{className:"card-section__head",children:[n.jsx(c,{className:"card-section__title h5b",children:e}),t!=null&&n.jsx("span",{className:"card-section__count body-3b",children:t}),a!=null&&n.jsx("span",{className:"card-section__actions",children:a})]}),s?n.jsx("div",{className:"card-section__empty body-3",children:l}):n.jsx("div",{className:"card-section__list",children:u})]})}function Xx({bundles:e,noneKey:t,noneLabel:r,titleLevel:a=2,rowRender:s}){return n.jsx(n.Fragment,{children:e.filter(([,l])=>l.length>0).map(([l,i])=>n.jsx(Ac,{titleLevel:a,title:l===t?r:l.split("/").join(" \u203A "),count:i.length,children:i.map((u,c)=>s(u,c))},l))})}const Nc=160;function Jx({children:e,top:t,bottom:r,mode:a="top",contentFull:s=!1,closing:l=!1,onClose:i,backClosable:u=!0,beforeClose:c,className:p,"aria-label":h}){Pu(!!i&&u&&!l,()=>{if(c&&c()===!1)return!1;i?.()});const d=o.useRef(null),m=o.useRef(typeof document>"u"?null:document.activeElement);return o.useEffect(()=>{const C=m.current,x=d.current;return x&&!x.contains(document.activeElement)&&(x.querySelector(jn)??x).focus(),()=>{C?.focus?.()}},[]),Sa(d),n.jsx("div",{className:xe("page-popup",l&&"page-popup--closing",p),role:"dialog","aria-modal":"true","aria-label":h,children:n.jsxs("div",{className:"page-popup__panel",ref:d,tabIndex:-1,children:[t&&n.jsx("div",{className:"page-popup__top",children:t}),n.jsx("div",{className:"page-popup__scroll",children:n.jsx("div",{className:xe("page-popup__content",a==="center"?"page-popup__content--center":"page-popup__content--top",s&&"page-popup__content--full"),children:e})}),r&&n.jsx("div",{className:"page-popup__bottom",children:r})]})})}function Qx(e){const[t,r]=o.useState(!1),a=o.useRef(!1),s=o.useRef(null),l=o.useCallback(()=>{a.current||(a.current=!0,r(!0),s.current=setTimeout(()=>{s.current=null;try{e()}catch(i){a.current=!1,r(!1),console.error(i)}},G2()?0:Nc))},[e]);return o.useEffect(()=>Cc(),[]),o.useEffect(()=>()=>{s.current&&clearTimeout(s.current)},[]),{closing:t,handleClose:l}}function Wa(e){return String(e)}const Ha=["o","triangle","x"];function Ec(e,t){return e===t?null:t}const Cs={o:"circle",triangle:"triangle",x:"x"},gs={o:"main",triangle:"warn",x:"danger"},e4=24,t4=2,bs=3.5,n4=.8;function r4(e){if(!(e>0))return bs;const t=n4*e4/e;return Math.min(bs,Math.max(t4,t))}function a4(e){let t=0,r=0,a=0;for(const l of Object.values(e))l==="o"?t++:l==="triangle"?r++:l==="x"&&a++;const s=t+r+a;return{marked:s,o:t,triangle:r,x:a,rate:s===0?null:(t+r*.5)/s}}function ys(e){const t={};for(const[r,a]of Object.entries(e))(a==="o"||a==="triangle"||a==="x")&&(t[r]=a);return t}function jc(e){const t=[];let r=0;for(const a of e)t.push(r),r+=a;return t}function o4(e,t){return!t&&e>0}function Dc({mark:e,label:t}){return n.jsx("span",{className:"mark-icon",...t?{role:"img","aria-label":t}:{"aria-hidden":!0},children:n.jsx(Sn,{size:24,position:"inline",className:`mark-icon__badge mark-icon__badge--${gs[e]}`,children:n.jsx(lt,{icon:Cs[e],size:14})})})}function s4({o:e,triangle:t,x:r,label:a,className:s}){const l=[["o",e],["triangle",t],["x",r]];return n.jsx("span",{className:xe("score-mark-counts",s),children:l.map(([i,u])=>n.jsxs("span",{className:"score-mark-counts__one",children:[n.jsx(Dc,{mark:i,label:a?a(i,u):""}),n.jsx("span",{className:"score-mark-counts__num",children:u})]},i))})}function l4({children:e}){return Nv(!0),n.jsx(n.Fragment,{children:e})}var i4=Object.defineProperty,u4=(e,t,r)=>t in e?i4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Sc=(e,t,r)=>u4(e,typeof t!="symbol"?t+"":t,r);let c4=class extends o.Component{constructor(){super(...arguments),Sc(this,"state",{hasError:!1}),Sc(this,"releaseHealth")}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,r){this.props.onError?.(t,r),console.error(t,"[ErrorBoundary]",r.componentStack)}componentDidMount(){this.releaseHealth=this.props.registerHealth?.(()=>this.state.hasError)}componentWillUnmount(){this.releaseHealth?.()}componentDidUpdate(t){if(!this.state.hasError)return;const r=t.resetKeys,a=this.props.resetKeys;!r||!a||(r.length!==a.length||r.some((s,l)=>!Object.is(s,a[l])))&&this.setState({hasError:!1,error:void 0})}render(){if(!this.state.hasError)return this.props.children;const t=this.state.error;return this.props.fallback?.({error:t,retry:()=>this.setState({hasError:!1,error:void 0}),reload:this.props.reload??(()=>{window.location.reload()}),staleChunk:S2(t)})??null}};const d4={small:14,medium:20,large:28};function p4({value:e,onChange:t,max:r=5,readOnly:a=!1,size:s="medium",ariaLabel:l,className:i=""}){const{t:u}=Ne.useTranslation(),c=a||!t,[p,h]=o.useState(null),d=c?e:Number.isFinite(e)?Math.round(e):0,m=p??d,C=d4[s],x=f=>{f!==e&&t?.(f)},g=f=>{c||x(f)},y=f=>{c||ur()||h(f)},v=o.useRef(null),_=f=>{const w=Math.min(r,Math.max(1,f));x(w),Array.from(v.current?.querySelectorAll("[data-star]")??[]).find(k=>k.dataset.star===String(w))?.focus()},b=f=>{if(!c){switch(f.key){case"ArrowRight":case"ArrowUp":_((d||0)+1);break;case"ArrowLeft":case"ArrowDown":_((d||1)-1);break;case"Home":_(1);break;case"End":_(r);break;default:return}f.preventDefault()}},B=d>=1&&d<=r?Math.round(d):1,N=()=>{c||h(null)};return n.jsx("div",{className:`rating rating--${s}${c?" rating--readOnly":""} ${i}`.trim(),ref:v,onKeyDown:b,role:c?"img":"radiogroup","aria-label":c?u("rating.valueLabel",{value:e,max:r}):l??u("rating.groupLabel","\uBCC4\uC810"),onMouseLeave:N,onPointerUp:f=>{f.pointerType==="touch"&&N()},onPointerCancel:f=>{f.pointerType==="touch"&&N()},children:Array.from({length:r},(f,w)=>{const k=w+1,E=Math.max(0,Math.min(1,m-w)),A=E>0&&E<1,D=n.jsxs("span",{className:"rating__star-wrap",children:[n.jsx(lt,{icon:"star",size:C,className:"rating__star rating__star--empty"}),E>0&&n.jsx("span",{className:`rating__star-fill${A?" rating__star-fill--half":""}`,style:A?{width:`${E*100}%`}:void 0,children:n.jsx(lt,{icon:"star",size:C,className:"rating__star rating__star--filled"})})]});return c?n.jsx("span",{className:"rating__item","aria-hidden":"true",children:D},k):n.jsx("button",{type:"button",className:"rating__item rating__item--interactive",role:"radio","aria-checked":d===k,"aria-label":u("rating.starLabel",{n:k}),"data-star":k,tabIndex:k===B?0:-1,onClick:()=>g(k),onMouseEnter:()=>y(k),children:D},k)})})}const h4=20,m4=["#499cdf","#4dcdc0","#2fae9e","#e6b94e","#d9534f","#e06b68","#bfc7d1"];function f4({value:e,onChange:t,palette:r=m4,size:a,className:s="",ariaLabel:l}){const i=wn(),u=a??i??Cn,{t:c}=Ne.useTranslation();return n.jsx("div",{className:`color-picker ${s}`.trim(),role:"group","aria-label":l,children:r.map(p=>{const h=e?.toLowerCase()===p.toLowerCase();return n.jsx("button",{type:"button",className:`color-picker__swatch color-picker__swatch--${u}`,style:{backgroundColor:p},onClick:()=>t(p),"aria-pressed":h,"aria-label":h?`${p} ${c("colorPicker.selected","\uC120\uD0DD\uB428")}`:p,children:h&&n.jsx(lt,{icon:"check",size:h4,className:"color-picker__check"})},p)})})}function Tc({icon:e,label:t,tooltip:r,wrapperStyle:a,color:s,bgColor:l,useHover:i=!0,iconSize:u="medium"}){const{t:c}=Ne.useTranslation(),p=u==="small",h=xe("category-icon",p?"category-icon--small":""),d=p?16:20,m=o.useRef(null),[C,x]=o.useState(!1),g=o.useMemo(()=>{const k=a&&typeof a=="object"?{...a}:{};return!s&&!l?k:{...k,...s?{color:s,"--t-item-fg":s}:{},...l?{"--t-item-bg":l}:{}}},[a,s,l]),y=r||t,v=i&&!!y,[_,b]=o.useState(null);o.useLayoutEffect(()=>{C&&b(m.current?.getBoundingClientRect()??null)},[C]),o.useEffect(()=>{if(!i&&C)try{x(!1)}catch{}},[i,C]),o.useEffect(()=>{if(!C)return;const k=E=>{const A=m.current;if(!A)return;const D=E.target;D&&!A.contains(D)&&x(!1)};return document.addEventListener("pointerdown",k,!0),()=>document.removeEventListener("pointerdown",k,!0)},[C]);const B=o.useCallback(()=>{i&&x(!0)},[i]),N=o.useCallback(()=>{i&&x(!1)},[i]),f=o.useCallback(()=>x(!1),[]),w=o.useCallback(k=>{if(k.key==="Escape"){x(!1);return}(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),x(E=>!E))},[]);return n.jsxs("span",{ref:m,className:xe("category-icon__wrap",v&&"category-icon__wrap--interactive"),onPointerEnter:B,onPointerLeave:N,onFocus:B,onBlur:N,onKeyDown:w,role:y?"button":void 0,tabIndex:y?0:void 0,"aria-label":typeof y=="string"?c("common.descriptionFor",{name:y,defaultValue:`${y} \uC124\uBA85`}):void 0,"aria-haspopup":!!y,"aria-expanded":C,"data-tooltip-ignore":!0,children:[n.jsx(lt,{icon:e,label:t,className:h,imgClassName:"category-icon__image",maskClassName:"category-icon__mask",svgClassName:"category-icon__svg",wrapperStyle:g,size:d}),C&&y&&n.jsx(zn,{anchorRect:_,text:typeof y=="string"?y:void 0,offset:8,onClose:f,className:"category-icon__tooltip",ariaLabel:typeof y=="string"?y:void 0})]})}let rr=null;function pa(e){if(rr&&rr!==e)try{rr()}catch{}return rr=e,()=>{rr===e&&(rr=null)}}function Va(e){if(rr===e){rr=null;try{e()}catch{}}}function ha(e,t){let r=()=>{};const a=new Promise(u=>{r=u});if(typeof e!="string"||e.trim()===""){Tt("one-shot-empty-url","[core] playOneShot \uC5D0 \uBE48 \uC8FC\uC18C\uAC00 \uC654\uB2E4 \u2014 \uC548 \uD2BC\uB2E4. \uBD80\uB974\uB294 \uCABD\uC774 \uC8FC\uC18C\uB97C \uC5BB\uAE30 \uC804\uC5D0 \uBD88\uB800\uB2E4.",new Error("playOneShot(empty)").stack),r(!1);try{t?.(!1)}catch{}return{el:{},stop:()=>{},done:a}}let s=!1;const l=u=>{if(!s){s=!0;try{t?.(u)}catch{}r(u)}};let i;try{i=new Audio(e)}catch{return l(!1),{el:{},stop:()=>{},done:a}}i.onended=()=>l(!0),i.onerror=()=>l(!1);try{i.play().catch(()=>l(!1))}catch{l(!1)}return{el:i,stop:()=>{try{i.pause()}catch{}l(!1)},done:a}}function C4(e,t){if(!e)return{previewCodes:[],previewBucket:null};const r=e,a=i=>i.map(u=>u?.contextCode||u?.context_code).filter(Boolean).map(String);if(t==="LISTEN_IN_NOISE"){const i=r.sentences||r.items||[],u=Array.isArray(i)&&i.length>0?a(i):[];return u.length===0&&(r.contextCode||r.context_code)&&u.push(String(r.contextCode||r.context_code)),{previewCodes:u,previewBucket:"LIN_D"}}if(t==="SHORT_STORY"){const i=r.items||r.sentences||[],u=Array.isArray(i)&&i.length>0?a(i):[];return u.length===0&&(r.contextCode||r.context_code)&&u.push(String(r.contextCode||r.context_code)),{previewCodes:u,previewBucket:"SHORT_S"}}if(t==="LONG_STORY"){const i=r.items||r.sentences||[],u=Array.isArray(i)&&i.length>0?a(i):[];return u.length===0&&(r.contextCode||r.context_code)&&u.push(String(r.contextCode||r.context_code)),{previewCodes:u,previewBucket:"LONG"}}if(t==="ORDERING_SENTENCE"){const i=r.sentences||r.items||[],u=Array.isArray(i)&&i.length>0?a(i):[];return u.length===0&&(r.contextCode||r.context_code)&&u.push(String(r.contextCode||r.context_code)),{previewCodes:u,previewBucket:"LIN_D"}}const s=r.sentences||r.items||[],l=a(Array.isArray(s)?s:[]);return l.length===0&&(r.contextCode||r.context_code)&&l.push(String(r.contextCode||r.context_code)),{previewCodes:l,previewBucket:null}}function g4(e,t){const[r,a]=o.useState(!1),[s,l]=o.useState(-1),[i,u]=o.useState({key:"",urls:[]}),c=o.useRef(null),p=o.useRef(!1),h=o.useRef(null),d=o.useRef(null),[m,C]=o.useState(!1),x=o.useRef([]),{previewCodes:g,previewBucket:y}=C4(e,t),v=`${g.join(",")}|${y??""}`,_=o.useMemo(()=>i.key===v?i.urls:[],[i,v]);o.useEffect(()=>{if(!g.length)return;let B=!1;return(async()=>{const N=[],f=[];for(const w of g)try{const k=si(w,y);if(!k){N.push("");continue}let E=null;try{E=await li(k)}catch{}if(!E)try{const A=await ii(k);A&&(E=URL.createObjectURL(A),f.push(E))}catch{}N.push(E??"")}catch{N.push("")}B?f.forEach(w=>{try{URL.revokeObjectURL(w)}catch{}}):(x.current.forEach(w=>{try{URL.revokeObjectURL(w)}catch{}}),x.current=f,u({key:v,urls:N}))})(),()=>{B=!0}},[g.join(","),y]),o.useEffect(()=>()=>{x.current.forEach(B=>{try{URL.revokeObjectURL(B)}catch{}}),x.current=[]},[]);const b=o.useCallback(async B=>{if(B.stopPropagation(),B.preventDefault(),p.current){h.current&&Va(h.current),p.current=!1;try{c.current?.pause()}catch{}a(!1),l(-1);return}if(!_.filter(Boolean).length)return;let N=null;const f=()=>{p.current=!1,N?.stop()};h.current=f;const w=pa(f);p.current=!0,a(!0);for(let k=0;k<_.length&&p.current;k++){const E=_[k];if(E&&(l(k),N=ha(E),c.current=N.el,!await N.done))break}w(),h.current===f&&(h.current=null,p.current=!1,a(!1),l(-1))},[_]);return o.useEffect(()=>()=>{h.current&&Va(h.current),p.current=!1;try{c.current?.pause()}catch{}c.current=null},[]),{playing:r,playingIndex:s,previewUrls:_,previewHover:m,setPreviewHover:C,previewBtnRef:d,handlePreview:b}}const b4=e=>{if(!e)return[];const t=typeof e.context=="string"&&e.context.trim()||typeof e.sentence=="string"&&e.sentence.trim()||typeof e.text=="string"&&e.text.trim()||"";if(t)return[String(t)];const r=e.sentences||e.items||e.questions||[];return Array.isArray(r)&&r.length>0?r.map(a=>{if(typeof a=="string")return a;if(a&&typeof a=="object"){const s=a;return s.sentence||s.text||s.context||s.question||s.title||""}return""}).filter(a=>typeof a=="string"&&a.trim().length>0).map(a=>a.trim()):[]};function vs(e){const{index:t,type:r,trainingData:a,ariaLabel:s,depth:l,renderPopup:i,completed:u,completedIds:c,selectedIds:p,tooltipText:h,useDescriptionTooltip:d=!1,onRemove:m,hideCheckBadge:C=!1,showTypeLabel:x=!1,onComplete:g,onSelect:y,onMore:v,countLabelOverride:_,size:b="square"}=e||{},{t:B}=Ne.useTranslation(),[N,f]=o.useState(!1),w=o.useRef(null),[k,E]=o.useState(!1);o.useEffect(()=>{w.current?.matches(":hover")&&E(!0)},[]);const{playing:A,playingIndex:D,previewUrls:j,previewHover:$,setPreviewHover:H,previewBtnRef:F,handlePreview:U}=g4(a,r?.key),T=o.useCallback(()=>{y?y():f(!0)},[y]),I=o.useCallback(()=>f(!1),[]),z=o.useCallback(()=>E(!0),[]),ie=o.useCallback(()=>E(!1),[]),te=o.useCallback(()=>H(!0),[H]),P=o.useCallback(()=>H(!1),[H]),[G,X]=o.useState(null);o.useLayoutEffect(()=>{$&&X(F.current?.getBoundingClientRect()??null)},[$,F]);const[K,L]=o.useState(null);o.useLayoutEffect(()=>{k&&!N&&d&&L(w.current?.getBoundingClientRect()??null)},[k,N,d]);const R=o.useCallback(Te=>{Te.target===Te.currentTarget&&(Te.key==="Enter"||Te.key===" ")&&(Te.preventDefault(),T())},[T]),S=a||null,V=o.useMemo(()=>{if(!d)return null;const Te=h?(Array.isArray(h)?h:[h]).filter(Boolean):null,Xe=Te&&Te.length>0?Te:b4(S);return Xe&&Xe.length>0?Xe:null},[d,h,S]),ae=o.useCallback(Te=>{Te.stopPropagation(),m?.()},[m]),ne=o.useCallback(Te=>Te.stopPropagation(),[]),re=o.useCallback(Te=>{typeof g=="function"&&g(Te)},[g]),ue=u||(c&&a?.id!=null?c.has(String(a.id)):!1),Be=!ue&&(p!=null&&a?.id!=null?p.has(String(a.id)):!1);Au("speechear.popup.close",I);const le=Ti(),J=`${r?.label||""} ${t+1}`,O=S?.title||S?.name||J;let W=r?.icon,q,oe="",ee="";try{const Te=S?.category_0||S?.category_main_code||S?.category_main,Xe=S?.category_1||S?.category_sub_code||S?.category_sub,rt=le.find(ut=>ut.key===Te);rt?.icon&&(W=rt.icon),!q&&rt?.color&&(q={"--t-item-fg":rt.color}),!q&&S?.iconColor&&(q={"--t-item-fg":S.iconColor}),oe=rt?B(`topic.${rt.key}`,{defaultValue:rt.label||""}):"";try{const ut=rt?.subs?.find(gt=>gt.key===Xe);ee=ut?B(`topic.sub.${ut.key}`,{defaultValue:ut.label||""}):""}catch{}}catch{}const be=ee?`${oe} / ${ee}`:oe||r?.label||O,je=Te=>B("training.countQuestions",{n:Te,count:Te}),De=Te=>B("training.countSentences",{n:Te,count:Te});let we="";try{if(S)if(r?.key==="LISTEN_IN_NOISE"){let Te=0;Array.isArray(S.items)&&S.items.length>0?Te=S.items.length:Array.isArray(S.sentences)&&S.sentences.length>0?Te=S.sentences.length:S.sentences&&(Te=1),we=De(Te)}else if(r?.key==="SHORT_STORY"){let Te=1;Array.isArray(a?.items)?Te=a.items.length:Array.isArray(a?.raw&&a.raw?.items)?Te=a.raw.items.length:Array.isArray(S?.questions)?Te=S.questions.length:Array.isArray(S?.sentences)&&(Te=S.sentences.length),we=je(Te)}else if(r?.key==="LONG_STORY"){let Te=1;if(Array.isArray(S.items)&&S.items.length>0){const Xe=S.items.reduce((rt,ut)=>{const gt=ut.questionItems;return Array.isArray(gt)?rt+gt.length:Array.isArray(ut.questions)?rt+ut.questions.length:rt},0);Te=Xe>0?Xe:S.items.length}else Array.isArray(S.questions)&&S.questions.length>0?Te=S.questions.length:Array.isArray(S.sentences)&&S.sentences.length>0&&(Te=S.sentences.length);we=je(Te)}else if(r?.key==="ORDERING_SENTENCE"){let Te=1;Array.isArray(S.items)&&S.items.length>0?Te=S.items.length:Array.isArray(S.sentences)&&S.sentences.length>0&&(Te=S.sentences.length),we=De(Te)}else Array.isArray(S.items)&&(we=S.items.length>0?je(S.items.length):"")}catch{}const ze=b==="row",ye=b==="list"||ze,_e=b==="compact",ve=b==="small",Ee=ve&&r?.key?dy().find(Te=>Te.key===r.key):void 0,Oe=Ee?Mi[Ee.key]:void 0,ot=Ee?Oe?B(`trainingType.${Oe}.title`,{defaultValue:Ee.label}):Ee.label??"":"",it=x&&r?.label&&r.label!==String(O)?String(r.label):ve&&ot&&ot!==String(O)?ot:"",Fe=!!it,Ue=_!==void 0?_:we,nt=[it,typeof O=="string"?O:"",Ue].map(Te=>String(Te??"").trim()).filter(Boolean).join(" ");return n.jsxs(n.Fragment,{children:[n.jsxs("div",{ref:w,className:`training-block-button${ye?" training-block-button--list":""}${ze?" training-block-button--row":""}${_e?" training-block-button--compact":""}${ve?" training-block-button--small":""}${ue?" training-block-button--completed":""}${Be?" training-block-button--selected":""}${Fe&&!ve?" training-block-button--withType":""}${ve&&!Fe?" training-block-button--no-type-label":""}`,onClick:T,onPointerEnter:z,onPointerLeave:ie,role:"button",tabIndex:0,onKeyDown:R,"aria-label":typeof s=="string"?s:nt||void 0,title:!d&&h&&(Array.isArray(h)?h.filter(Boolean).join(`
842
+ `):h)||void 0,children:[n.jsxs("div",{className:"training-block-button__left",children:[x&&r?.label&&r.label!==String(O)&&n.jsx("span",{className:"training-block-button__type-label caption-1",children:r.label}),ve&&ot&&ot!==String(O)&&n.jsx("span",{className:"training-block-button__type-label caption-2",children:ot}),n.jsx(Tc,{icon:W,label:O,tooltip:be,wrapperStyle:q,iconSize:ve||_e?"small":"medium"}),!C&&(ue||Be)&&!(m&&k)&&n.jsx(Sn,{className:m?"training-block-button__check--removable":void 0,icon:"check",position:"top-left",size:32,"aria-label":ue?B("training.completed","\uD6C8\uB828 \uC644\uB8CC"):B("training.selected","\uC120\uD0DD\uB428")}),m&&n.jsx(Sn,{className:`training-block-button__remove${k?" is-hover":""}`,icon:"remove",position:"top-left",size:32,"aria-label":B("common.remove","\uC81C\uAC70"),onClick:ae}),n.jsx("div",{className:`training-block-button__title ${_e?"body-3":ve?"body-3b":"h3"}`,children:String(O)}),n.jsxs("div",{className:"training-block-button__description",children:[Ue?n.jsx("div",{className:`training-block-button__count ${ve?"caption-2":"caption-1"}`,children:Ue}):null,n.jsx("div",{className:"training-block-button__chevron",children:n.jsx(lt,{icon:"chevron-right",label:B("training.next","\uB2E4\uC74C"),className:"training-block-button__chevron-icon",imgClassName:"training-block-button__chevron-icon-image",maskClassName:"training-block-button__chevron-icon-mask",svgClassName:"training-block-button__chevron-icon-svg",size:ve?12:20})})]}),(ye&&!ze||ve)&&j.length>0&&n.jsx("div",{ref:F,className:"training-block-button__preview","data-tooltip-ignore":!0,onClick:ne,onPointerEnter:te,onPointerLeave:P,children:n.jsx(me,{htmlType:"button",size:ve?28:32,type:"dot",icon:A?"pause":"play",variant:ve?"transparent-lightGray":"default",useBorder:!1,selected:A,ariaLabel:String(O).trim()?A?B("training.stopFor",{name:O,defaultValue:`${O} \uC815\uC9C0`}):B("training.previewFor",{name:O,defaultValue:`${O} \uBBF8\uB9AC \uB4E3\uAE30`}):A?B("training.stop","\uC815\uC9C0"):B("training.preview","\uBBF8\uB9AC \uB4E3\uAE30"),onClick:U})})]}),v&&n.jsx("div",{className:"training-block-button__more","data-tooltip-ignore":!0,onClick:Te=>{Te.stopPropagation(),v(Te)},children:n.jsx(me,{htmlType:"button",size:40,type:"dot",icon:"more-horizontal",variant:"transparent-lightGray",useBorder:!1,ariaLabel:String(O).trim()?B("common.moreFor",{name:O}):B("common.more","\uB354\uBCF4\uAE30")})})]}),$&&n.jsx(zn,{anchorRect:G,text:A?B("training.stop","\uC815\uC9C0"):B("training.preview","\uBBF8\uB9AC \uB4E3\uAE30"),offset:8,onClose:P}),k&&!N&&d&&(V?n.jsx(er,{anchorRect:K,items:V,activeIndex:D,onClose:ie}):S?.subTitle?n.jsx(zn,{anchorRect:K,text:S.subTitle,offset:8,onClose:ie}):null),N&&i&&i({trainingData:S,typeKey:r?.key??"",onClose:I,onComplete:re,popupTitle:String(O),popupSubTitle:r?.subTitle,depth:l!=null?String(l):void 0,popupIcon:W,popupIconTooltip:String(be),popupWrapperStyle:q})]})}const Mc=200;function y4(e){return e.itemId?(Cy()[e.trainingType]??[]).find(t=>t?.id!=null&&String(t.id)===String(e.itemId))??null:null}function $c({plan:e,groups:t,anchorRect:r,offset:a=12,onClose:s}){const{t:l}=Ne.useTranslation(),i=o.useMemo(()=>t?t.map((c,p)=>({key:c.key??c.type?.key??String(p),label:c.label,type:c.type,data:c.items??[]})).filter(c=>c.data.length>0):by(l).map(c=>{const p=(e?.items??[]).filter(h=>h.trainingType===c.key);return{key:c.key,label:c.label,type:c,pickedCount:p.length,data:p.map(y4).filter(h=>h!=null)}}).filter(c=>c.pickedCount>0),[t,e?.items,l]);if(i.length===0)return null;const u=n.jsx("div",{className:ce("training-tooltip__box"),children:n.jsx("div",{className:ce("training-tooltip__groups"),children:i.flatMap(({key:c,label:p,type:h,data:d},m)=>[m>0?n.jsx("div",{className:ce("training-tooltip__divider")},`div-${c}`):null,n.jsxs("div",{className:ce("training-tooltip__section"),children:[n.jsx("div",{className:ce("training-tooltip__section-header"),children:n.jsx("span",{className:ce("training-tooltip__type-label body-3b"),children:p})}),n.jsx("div",{className:ce("training-tooltip__items"),children:d.map((C,x)=>n.jsx(vs,{index:x,type:h,trainingData:C,size:"compact",hideCheckBadge:!0},String(C.id??x)))})]},c)])})});return r?n.jsx(sn,{anchorRect:r,offset:a,onClose:s,closeOnOutsideClick:!1,className:ce("training-tooltip"),ariaLabel:l("tooltip.training","\uD6C8\uB828 \uC548\uB0B4"),children:u}):u}const v4=200;function x4({icon:e,count:t,title:r,plan:a,tooltip:s=!0,hoverAccent:l=!1,className:i="",onClick:u,onMouseEnter:c,onMouseLeave:p}){const h=!!u||!!c||s&&!!a,d=xe("count-tile",h&&"count-tile--interactive",h&&l&&"count-tile--accent",u&&"count-tile--clickable",i),m=o.useRef(null),[C,x]=o.useState(null),g=o.useRef(null),y=o.useRef(null),v=!!(C&&a&&s),_=o.useCallback(()=>{g.current&&(clearTimeout(g.current),g.current=null),y.current&&(clearTimeout(y.current),y.current=null)},[]),b=o.useCallback(()=>{_(),x(null)},[_]),B=o.useCallback(()=>{!s||!a||(_(),g.current=setTimeout(()=>{g.current=null,x(m.current?.getBoundingClientRect()??null)},Mc))},[s,a,_]),N=o.useCallback(()=>{g.current&&(clearTimeout(g.current),g.current=null),!y.current&&(y.current=setTimeout(()=>{y.current=null,x(null)},v4))},[]);return o.useEffect(()=>()=>{_()},[_]),o.useEffect(()=>{(!s||!a)&&b()},[s,a,b]),o.useEffect(()=>{if(!v)return;const f=k=>k instanceof Element&&(m.current?.contains(k)||!!k.closest(".training-tooltip")),w=k=>{f(k.target)?_():N()};return document.addEventListener("pointerover",w,!0),()=>document.removeEventListener("pointerover",w,!0)},[v,_,N]),n.jsxs(n.Fragment,{children:[n.jsxs("div",{ref:m,className:d,onClick:u?f=>{b(),u(f)}:void 0,onKeyDown:u?f=>{f.key!=="Enter"&&f.key!==" "||(f.preventDefault(),f.currentTarget.click())}:void 0,onPointerEnter:f=>{f.pointerType==="touch"||f.pointerType==="pen"?b():B()},onMouseEnter:c,onMouseLeave:f=>{N(),p?.(f)},role:u?"button":"img",tabIndex:u?0:void 0,"aria-label":`${r} ${t}`,children:[n.jsx(lt,{icon:e,size:20,className:"count-tile__icon"}),n.jsx("span",{className:"count-tile__count h5","aria-hidden":"true",children:t})]}),C&&a&&n.jsx($c,{plan:a,anchorRect:C,onClose:b})]})}function _4(){return n.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round","aria-hidden":!0,children:n.jsx("path",{d:"M6 6l12 12M18 6 6 18"})})}function w4({open:e,onClose:t,ariaLabel:r,title:a,children:s,size:l="md",closeOnBackdrop:i=!0,closeOnEscape:u=!0,showClose:c=!0,className:p,contentClassName:h}){const{t:d}=Ne.useTranslation(),m=o.useId(),C=o.useRef(null),x=o.useCallback(()=>t(),[t]);o.useEffect(()=>{if(!e)return;const _=document.activeElement,b=fc(),B=C.current;return Yo(B,_),B?.focus(),()=>{b();const N=document.activeElement;(!N||N===document.body||B&&B.contains(N))&&Zo(_)?.focus?.()}},[e]);const g=o.useRef(x),y=o.useRef(u);o.useEffect(()=>{g.current=x,y.current=u}),o.useEffect(()=>{if(e)return ir(()=>{y.current&&g.current()})},[e]);const v=o.useRef(!1);return Sa(C,e),!e||typeof document>"u"?null:bn.createPortal(n.jsx("div",{className:xe("dialog",p),onPointerDown:i?_=>{v.current=_.target===_.currentTarget}:void 0,onMouseDown:_=>{_.target===_.currentTarget&&_.preventDefault()},onClick:i?_=>{const b=v.current;v.current=!1,b&&_.target===_.currentTarget&&x()}:void 0,children:n.jsxs("div",{ref:C,role:"dialog","aria-modal":"true","aria-label":a?void 0:r,"aria-labelledby":a?m:void 0,tabIndex:-1,className:xe("dialog__surface",`dialog__surface--${l}`,h),onClick:_=>_.stopPropagation(),children:[a?n.jsx("div",{className:"dialog__header",children:n.jsx("h2",{id:m,className:"dialog__title h4b",children:a})}):null,c?n.jsx("button",{type:"button",className:"dialog__close","aria-label":d("common.close","\uB2EB\uAE30"),onClick:x,children:n.jsx(_4,{})}):null,n.jsx("div",{className:"dialog__body",children:s})]})}),document.body)}function B4({columns:e,rows:t,rowKey:r,title:a,toolbar:s,empty:l,loading:i,caption:u,className:c=""}){const{t:p}=Ne.useTranslation(),h=!i&&t.length===0;return n.jsxs("div",{className:xe("board",c),children:[a||s?n.jsxs("div",{className:"board__head",children:[a?n.jsx("h2",{className:"board__title",children:a}):n.jsx("span",{}),s?n.jsx("div",{className:"board__toolbar",children:s}):null]}):null,n.jsxs("table",{className:"board__table",children:[u?n.jsx("caption",{className:"board__caption",children:u}):null,n.jsx("thead",{children:n.jsx("tr",{children:e.map(d=>n.jsx("th",{scope:"col",className:xe("board__th",`board__cell--${d.headerAlign??d.align??"left"}`),style:d.width?{width:d.width}:void 0,children:d.header},d.key))})}),n.jsx("tbody",{children:i?n.jsx("tr",{children:n.jsx("td",{className:"board__state",colSpan:e.length,children:i})}):h?n.jsx("tr",{children:n.jsx("td",{className:"board__state",colSpan:e.length,children:l??p("board.empty","\uB4F1\uB85D\uB41C \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.")})}):t.map((d,m)=>n.jsx("tr",{className:"board__row",children:e.map(C=>n.jsx("td",{className:xe("board__td",`board__cell--${C.align??"left"}`),children:C.render(d,m)},C.key))},r(d,m)))})]})]})}function k4({name:e,role:t,photo:r,media:a,credentials:s,size:l=190,className:i=""}){return n.jsxs("div",{className:xe("person-card",i),children:[n.jsx("div",{className:"person-card__photo",style:{width:l,height:l},children:a??(r?n.jsx("img",{src:r,alt:t?`${e} ${t}`:e}):null)}),n.jsx("h3",{className:"person-card__name",children:e}),t?n.jsx("p",{className:"person-card__role",children:t}):null,s?.length?n.jsx("ul",{className:"person-card__credentials",children:s.map(u=>n.jsx("li",{children:u},u))}):null]})}function A4({groups:e,className:t=""}){return n.jsx("div",{className:xe("timeline",t),children:e.map(r=>n.jsxs("section",{className:"timeline__group",children:[n.jsx("h3",{className:"timeline__title",children:r.title}),n.jsx("ul",{className:"timeline__rows",children:r.entries.map((a,s)=>n.jsxs("li",{className:"timeline__row",children:[a.label?n.jsx("span",{className:"timeline__label",children:a.label}):null,n.jsx("div",{className:"timeline__items",children:a.items.map((l,i)=>n.jsx("p",{children:l},i))})]},`${a.label??""}-${s}`))})]},r.title))})}function N4({title:e,kind:t,body:r,badge:a,badgeSrc:s,footer:l,width:i,className:u=""}){const c=a??(s?n.jsx("img",{src:s,alt:""}):null);return n.jsxs("div",{className:xe("publication-card",u),style:i?{width:i,flexShrink:0}:void 0,children:[c?n.jsx("div",{className:"publication-card__badge","aria-hidden":"true",children:c}):null,n.jsx("h3",{className:"publication-card__title",children:e}),t?n.jsx("p",{className:"publication-card__kind",children:t}):null,n.jsx("p",{className:"publication-card__body",children:r}),l?n.jsx("div",{className:"publication-card__footer",children:l}):null]})}function E4({logo:e,alt:t,onDone:r,durationMs:a=3e3}){const s=ta(r);return o.useEffect(()=>{const l=setTimeout(()=>s.current?.(),a);return()=>clearTimeout(l)},[a,s]),n.jsx("div",{className:"splash-logo",style:{"--splash-logo-duration":`${a}ms`},"aria-hidden":"true",children:n.jsx("img",{src:e,alt:t,className:"splash-logo__image"})})}function j4({eyebrow:e,eyebrowIndex:t,title:r,description:a,level:s=2,tone:l="dark",className:i=""}){const u=s===1?"h1":"h2";return n.jsxs("div",{className:xe("section-header",`section-header--${l}`,i),children:[e?n.jsxs("p",{className:"section-header__eyebrow",children:[t?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"section-header__index",children:t}),n.jsx("span",{"aria-hidden":!0,className:"section-header__rule"})]}):null,e]}):null,r?n.jsx(u,{className:"section-header__title",children:r}):null,a?n.jsx("div",{className:"section-header__description",children:a}):null]})}function D4({items:e,className:t=""}){return n.jsx("ul",{className:xe("company-meta",t),children:e.map((r,a)=>n.jsxs("li",{className:"company-meta__item",children:[a>0?n.jsx("span",{"aria-hidden":!0,className:"company-meta__divider",children:"|"}):null,r]},r))})}function xs({checked:e=!1,onChange:t,disabled:r,indeterminate:a,label:s,size:l="medium",className:i,title:u,ariaLabel:c}){const p=o.useRef(null),h=o.useId(),d=o.useRef(!!a);return d.current=!!a,o.useEffect(()=>{p.current&&(p.current.indeterminate=!!a)}),n.jsxs("label",{className:xe("checkbox",l==="small"&&"checkbox--small",l==="large"&&"checkbox--large",r&&"checkbox--disabled",i),htmlFor:h,title:u,children:[n.jsx("input",{ref:p,id:h,type:"checkbox",className:"checkbox__input",checked:e,onChange:m=>{t?.(m.target.checked),p.current&&(p.current.indeterminate=d.current)},disabled:r,"aria-label":!s&&c?c:void 0}),n.jsx("span",{className:"checkbox__box"}),s&&n.jsx("span",{className:"checkbox__label body-3",children:s})]})}function Lc(e,t){const r=()=>{if(e){const[g,y]=e.split("-");return{y:+g,m:+y-1}}const[C,x]=Aa(t).split("-");return{y:+C,m:+x-1}},[a,s]=o.useState(()=>r().y),[l,i]=o.useState(()=>r().m),u=o.useRef(e);o.useEffect(()=>{if(e===u.current)return;u.current=e;const C=r();s(C.y),i(C.m)},[e]);const c=o.useRef({y:a,m:l});o.useEffect(()=>{c.current={y:a,m:l}},[a,l]);const p=o.useCallback(C=>{const x=c.current.y*12+c.current.m+C,g=Math.floor(x/12),y=x-g*12;c.current={y:g,m:y},s(g),i(y)},[]),h=o.useCallback(()=>p(-1),[p]),d=o.useCallback(()=>p(1),[p]),m=o.useCallback((C,x)=>{c.current={y:C,m:x},s(C),i(x)},[]);return{viewY:a,viewM:l,prevMonth:h,nextMonth:d,setViewYM:m}}function qa(e,t){return new Date(e,t+1,0).getDate()}function S4(e,t){return new Date(e,t,1).getDay()}function ma(e,t,r){return`${e}-${String(t+1).padStart(2,"0")}-${String(r).padStart(2,"0")}`}function T4(e){if(!e)return"";const[t,r,a]=e.split("-");return`${t}. ${r}. ${a}.`}function Rc(e){const t=e.replace(/\D/g,"");if(t.length!==8)return null;const r=+t.slice(0,4),a=+t.slice(4,6),s=+t.slice(6,8);if(a<1||a>12||s<1||s>31)return null;const l=new Date(r,a-1,s);return l.getFullYear()!==r||l.getMonth()!==a-1||l.getDate()!==s?null:ma(r,a-1,s)}const M4=1900;function $4(e,t,r,a,s){const l=a?+a.split("-")[0]:Math.min(M4,e),i=s?+s.split("-")[0]:Math.max(t+10,e),u=[];for(let c=l;c<=i;c++)u.push({value:String(c),label:r(c)});return u}function Pc(e,t,r,a){const s=[];for(let l=1;l<=12;l++){const i=`${e}-${String(l).padStart(2,"0")}`;r&&i<r.slice(0,7)||a&&i>a.slice(0,7)||s.push({value:String(l),label:t(e,l)})}return s}function Fc({value:e,onChange:t,size:r,min:a,max:s,disabled:l,placeholder:i,className:u,today:c,ariaLabel:p,ariaLabelledBy:h}){const d=wn(),m=r??d??Cn;!p&&!h&&Tt("DatePicker:unnamed","[ihab/DatePicker] \uC774\uB984\uC774 \uC5C6\uC2B5\uB2C8\uB2E4 \u2014 ariaLabel \uC774\uB098 ariaLabelledBy \uC911 \uD558\uB098\uB97C \uC8FC\uC138\uC694. placeholder \uB294 \uC774\uB984\uC744 \uB300\uC2E0\uD558\uC9C0 \uBABB\uD569\uB2C8\uB2E4.");const{t:C,i18n:x}=Ne.useTranslation(),g=i??C("datePicker.chooseDate","\uB0A0\uC9DC \uC120\uD0DD"),y=o.useMemo(()=>C("calendar.dow",{returnObjects:!0}),[C]),v=Aa(c),{viewY:_,viewM:b,prevMonth:B,nextMonth:N,setViewYM:f}=Lc(e,c),w=o.useId(),k=o.useCallback((q,oe)=>{const ee=window.innerHeight,be=window.innerWidth,je=typeof document<"u"?document.getElementById(w):null,De=Math.max(je?.offsetHeight||0,je?.scrollHeight||0)||300,we=Math.max(q.width,je?.offsetWidth||0,260),ze=ee-q.bottom,ye=q.top,_e=ze<De&&ye>ze,ve=8,Ee=(Oe,ot)=>Math.min(Math.max(ve,Oe),Math.max(ve,ot));return{position:"fixed",left:Ee(q.left,be-we-ve),width:q.width,minWidth:260,..._e?{top:"auto",bottom:Ee(ee-q.top+6,ee-De-ve)}:{bottom:"auto",top:Ee(q.bottom+6,ee-De-ve)},zIndex:ra(oe)}},[w]),{open:E,setOpen:A,toggle:D,style:j,triggerRef:$,menuRef:H}=aa({computeStyle:k,onScroll:"reposition",onResize:"reposition",ignoreOutsideClickSelector:".dropdown__menu"});o.useEffect(()=>{if(!E)return;const q=H.current;return(q?.querySelector(".date-picker__day--selected:not(:disabled)")??q?.querySelector(".date-picker__day--today:not(:disabled)")??q?.querySelector(".date-picker__day:not(:disabled)")??q?.querySelector(jn)??q)?.focus?.(),()=>{const oe=document.activeElement;(!oe||oe===document.body)&&$.current?.focus?.()}},[E,H,$]);const[F,U]=o.useState(1),T=o.useRef(null),I=o.useRef(null);o.useEffect(()=>{if(!E)return;const q=e&&e.slice(0,7)===`${_}-${String(b+1).padStart(2,"0")}`?+e.slice(8):v.slice(0,7)===`${_}-${String(b+1).padStart(2,"0")}`?+v.slice(8):1;U(q)},[E]),o.useEffect(()=>{if(I.current==null)return;const q=I.current;I.current=null,T.current?.querySelector(`[data-day="${q}"]`)?.focus()}),o.useEffect(()=>{U(q=>Math.min(q,qa(_,b)))},[_,b]);const z=o.useCallback(q=>{let oe=ma(q.getFullYear(),q.getMonth(),q.getDate());a&&oe<a&&(oe=a),s&&oe>s&&(oe=s);const[ee,be,je]=oe.split("-").map(Number);(ee!==_||be-1!==b)&&f(ee,be-1),U(je),I.current=je},[a,s,_,b,f]),ie=o.useCallback(q=>{const oe=new Date(_,b,F),ee=je=>{oe.setDate(oe.getDate()+je),z(oe)},be=je=>{const De=oe.getFullYear()*12+oe.getMonth()+je,we=Math.floor(De/12),ze=De-we*12;z(new Date(we,ze,Math.min(oe.getDate(),qa(we,ze))))};switch(q.key){case"ArrowLeft":ee(-1);break;case"ArrowRight":ee(1);break;case"ArrowUp":ee(-7);break;case"ArrowDown":ee(7);break;case"Home":ee(-oe.getDay());break;case"End":ee(6-oe.getDay());break;case"PageUp":q.shiftKey?be(-12):be(-1);break;case"PageDown":q.shiftKey?be(12):be(1);break;default:return}q.preventDefault()},[_,b,F,z]),te=o.useCallback(q=>{l||(t(ma(_,b,q)),A(!1))},[_,b,t,A,l]);o.useEffect(()=>{l&&A(!1)},[l,A]);const P=q=>{const oe=ma(_,b,q);return!!(a&&oe<a||s&&oe>s)},G=(()=>{const q=qa(_,b);if(F>=1&&F<=q&&!P(F))return F;for(let oe=1;oe<=q;oe++)if(!P(oe))return oe;return-1})(),X=[];for(let q=0;q<S4(_,b);q++)X.push(null);for(let q=1;q<=qa(_,b);q++)X.push(q);const K=m===64?20:m===32?14:m===40?16:18,L=Fo(x.language),R=q=>new Intl.DateTimeFormat(L,{year:"numeric"}).format(new Date(q,0,1)),S=(q,oe)=>new Intl.DateTimeFormat(L,{month:"long"}).format(new Date(q,oe-1,1)),V=$4(_,+v.slice(0,4),R,a,s),ae=Pc(_,S,a,s),ne=q=>{const oe=Pc(q,S,a,s);if(oe.length===0)return;const ee=oe.some(be=>+be.value===b+1);f(q,ee?b:+oe[0].value-1)},[re,ue]=o.useState(null);o.useEffect(()=>{ue(null)},[e]);const Be=o.useCallback(q=>{ue(q);const oe=Rc(q);if(!oe||a&&oe<a||s&&oe>s)return;t(oe);const[ee,be]=oe.split("-");f(+ee,+be-1)},[a,s,t,f]),le=(()=>{if(re==null||re.replace(/\D/g,"").length<8)return!1;const q=Rc(re);return!q||!!a&&q<a||!!s&&q>s})(),J=o.useCallback(()=>{ue(null)},[]),O=o.useCallback(q=>{q.key==="Enter"?(q.preventDefault(),J(),A(!1)):q.key==="Escape"?(J(),A(!1)):q.key==="ArrowDown"&&!E&&(q.preventDefault(),A(!0))},[J,A,E]),W=E?bn.createPortal(n.jsxs("div",{ref:H,id:w,className:"date-picker__dropdown",style:j,"data-tooltip-ignore":!0,role:"dialog","aria-label":C("datePicker.chooseDate","\uB0A0\uC9DC \uC120\uD0DD"),tabIndex:-1,children:[n.jsxs("div",{className:"date-picker__nav",children:[n.jsx("button",{type:"button",className:"date-picker__nav-btn",onClick:B,"aria-label":C("calendar.prevMonth","\uC774\uC804 \uB2EC"),children:n.jsx(Bl,{size:16,strokeWidth:2})}),n.jsxs("div",{className:"date-picker__nav-ym",children:[n.jsx(An,{className:"date-picker__nav-dropdown",ariaLabel:C("datePicker.selectYear","\uC5F0 \uC120\uD0DD"),options:V,value:String(_),onChange:q=>ne(+q),size:40}),n.jsx(An,{className:"date-picker__nav-dropdown",ariaLabel:C("datePicker.selectMonth","\uC6D4 \uC120\uD0DD"),options:ae,value:String(b+1),onChange:q=>f(_,+q-1),size:40})]}),n.jsx("button",{type:"button",className:"date-picker__nav-btn",onClick:N,"aria-label":C("calendar.nextMonth","\uB2E4\uC74C \uB2EC"),children:n.jsx(kl,{size:16,strokeWidth:2})})]}),n.jsxs("div",{className:"date-picker__grid",ref:T,onKeyDown:ie,children:[y.map(q=>n.jsx("div",{className:"date-picker__dow caption-1",children:q},q)),X.map((q,oe)=>{if(q===null)return n.jsx("div",{},`e${oe}`);const ee=ma(_,b,q),be=ee===e,je=ee===v,De=P(q),we=oe%7;return n.jsx("button",{type:"button",disabled:De,"data-day":q,tabIndex:q===G?0:-1,"aria-current":je?"date":void 0,onClick:()=>!De&&te(q),className:xe("date-picker__day caption-1",be&&"date-picker__day--selected",je&&!be&&"date-picker__day--today",De&&"date-picker__day--disabled",we===0&&"date-picker__day--sun",we===6&&"date-picker__day--sat"),children:q},q)})]})]}),document.body):null;return n.jsxs("div",{className:xe("date-picker",`date-picker--s${m}`,E&&"date-picker--open",le&&"date-picker--invalid",u),children:[n.jsxs("div",{className:"date-picker__field",children:[n.jsx("input",{ref:$,type:"text",className:"date-picker__trigger body-2",value:re??T4(e),placeholder:g,onChange:q=>Be(q.target.value),onClick:()=>!l&&!E&&D(),onKeyDown:O,onBlur:J,disabled:l,"aria-haspopup":"dialog","aria-expanded":E,"aria-invalid":le||void 0,"aria-label":p,"aria-labelledby":h,inputMode:"numeric",autoComplete:"off"}),n.jsx("button",{type:"button",className:"date-picker__icon-btn",onClick:()=>!l&&D(),disabled:l,tabIndex:-1,"aria-label":g,"aria-haspopup":"dialog","aria-expanded":E,children:n.jsx($l,{size:K,className:"date-picker__icon",strokeWidth:1.5})})]}),W]})}const Ic=["personal","sensitive","marketing"];function L4({takenKinds:e,busy:t,today:r,onClose:a,onSubmit:s,className:l}){const{t:i}=Ne.useTranslation(),[u]=o.useState(()=>Aa(r)),[c,p]=o.useState([]),[h,d]=o.useState("paper"),[m,C]=o.useState("self"),[x,g]=o.useState(u),[y,v]=o.useState(""),_=Ic.filter(B=>!e.includes(B)),b={personal:i("customers.consent.kind.personal","\uC77C\uBC18 \uAC1C\uC778\uC815\uBCF4"),sensitive:i("customers.consent.kind.sensitive","\uBBFC\uAC10\uC815\uBCF4(\uCCAD\uB825\xB7\uC9C4\uB2E8)"),marketing:i("customers.consent.kind.marketing","\uAD11\uACE0\uC131 \uC815\uBCF4 \uC218\uC2E0")};return n.jsx(qn,{title:i("customers.consent.record","\uB3D9\uC758 \uBC1B\uAE30"),closeDisabled:t,onClose:a,className:l,footer:()=>n.jsx(me,{htmlType:"button",size:48,variant:"main",disabled:t||c.length===0,label:i("customers.consent.submit","\uC800\uC7A5\uD558\uAE30"),onClick:()=>s({kinds:c,method:h,source:m,consentedAt:x||null,note:y.trim()||null})}),children:n.jsxs(Sr,{useBorder:!1,labelWidth:96,children:[n.jsx(dn,{variant:"custom",useFullWidth:!0,label:i("customers.consent.kinds","\uBC1B\uC740 \uAC08\uB798"),children:n.jsxs("div",{className:"consent-record-popup__kinds",children:[_.map(B=>n.jsx(xs,{checked:c.includes(B),disabled:t,label:b[B],onChange:N=>p(f=>N?[...f,B]:f.filter(w=>w!==B))},B)),_.length===0&&n.jsx("p",{className:"body-3 consent-record-popup__none",children:i("customers.consent.allTaken","\uC138 \uAC08\uB798\uB97C \uC774\uBBF8 \uB2E4 \uBC1B\uC558\uC2B5\uB2C8\uB2E4. \uB2E4\uC2DC \uBC1B\uC73C\uB824\uBA74 \uBA3C\uC800 \uCCA0\uD68C\uD558\uC138\uC694.")})]})}),n.jsx(dn,{variant:"custom",useFullWidth:!0,label:i("customers.consent.methodTitle","\uBC1B\uC740 \uBC29\uBC95"),children:n.jsx(kn,{size:40,fullWidth:!0,ariaLabel:i("customers.consent.methodTitle","\uBC1B\uC740 \uBC29\uBC95"),options:[{key:"paper",label:i("customers.consent.method.paper","\uC11C\uBA74")},{key:"verbal",label:i("customers.consent.method.verbal","\uAD6C\uB450")},{key:"electronic",label:i("customers.consent.method.electronic","\uC804\uC790")}],value:h,onChange:B=>d(String(B))})}),n.jsx(dn,{variant:"custom",useFullWidth:!0,label:i("customers.consent.sourceTitle","\uC218\uC9D1 \uCD9C\uCC98"),children:n.jsx(kn,{size:40,fullWidth:!0,ariaLabel:i("customers.consent.sourceTitle","\uC218\uC9D1 \uCD9C\uCC98"),options:[{key:"self",label:i("customers.consent.source.self","\uBCF8\uC778")},{key:"guardian",label:i("customers.consent.source.guardian","\uBCF4\uD638\uC790")},{key:"referral",label:i("customers.consent.source.referral","\uC758\uB8B0\uAE30\uAD00")}],value:m,onChange:B=>C(String(B))})}),n.jsx(dn,{variant:"custom",useFullWidth:!0,label:i("customers.consent.day","\uBC1B\uC740 \uB0A0"),children:n.jsx(Fc,{size:48,value:x,max:u,today:r,onChange:B=>g(B??"")})}),n.jsx(dn,{variant:"custom",useFullWidth:!0,label:i("customers.consent.note","\uBA54\uBAA8"),children:n.jsx(Un,{size:48,fullWidth:!0,value:y,onChange:v,disabled:t,ariaLabel:i("customers.consent.note","\uBA54\uBAA8"),placeholder:i("customers.consent.notePlaceholder","\uC758\uB8B0\uAE30\uAD00 \uC774\uB984 \uB4F1 \u2014 \uBBFC\uAC10\uD55C \uB0B4\uC6A9\uC740 \uC801\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4")})})]})})}function _s({page:e,totalPages:t,onChange:r,prevLabel:a,nextLabel:s,className:l=""}){const{t:i}=Ne.useTranslation(),u=a??i("common.prevPage","\uC774\uC804 \uD398\uC774\uC9C0"),c=s??i("common.nextPage","\uB2E4\uC74C \uD398\uC774\uC9C0"),p=Math.max(1,t),h=()=>r(Math.max(1,Math.min(p,e-1))),d=()=>r(Math.min(p,e+1));return n.jsxs("div",{className:xe("pagination",l),children:[n.jsx(me,{htmlType:"button",size:32,type:"dot",shape:"rounded",icon:"chevron-left",ariaLabel:u,disabled:e<=1,onClick:h}),n.jsxs("span",{className:"pagination__info body-3","aria-live":"polite","aria-atomic":"true",children:[Math.min(Math.max(1,e),p)," / ",p]}),n.jsx(me,{htmlType:"button",size:32,type:"dot",shape:"rounded",icon:"chevron-right",ariaLabel:c,disabled:e>=t,onClick:d})]})}function ws({count:e,search:t,segment:r,filters:a,pageSize:s,pagination:l,actions:i,className:u}){const c=wn()??Cn,{t:p}=Ne.useTranslation(),h=e!=null&&n.jsxs("p",{className:"toolbar__count body-1",role:"status","aria-atomic":"true",children:[e.prefix??p("common.totalPrefix","\uCD1D "),n.jsx("span",{className:"toolbar__count-highlight",children:e.value}),e.unit,e.suffix]}),d=!!(t||a?.length||s||l||i);return n.jsxs("div",{className:xe("toolbar",u),children:[n.jsxs("div",{className:"toolbar__row",children:[h,r&&(Array.isArray(r)?r:[r]).map((m,C)=>n.jsx(kn,{size:c,...m},m.ariaLabel??C))]}),d&&n.jsx("div",{className:"toolbar__row",children:n.jsxs("div",{className:"toolbar__row-end",children:[t&&n.jsx(Un,{className:"toolbar__search",size:c,value:t.value,onChange:t.onChange,placeholder:t.placeholder??p("common.search","\uAC80\uC0C9"),ariaLabel:t.placeholder??p("common.search","\uAC80\uC0C9"),autoFocus:t.autoFocus,clearable:!0}),a?.map((m,C)=>n.jsx(An,{size:c,options:m.options,value:m.value,onChange:m.onChange,ariaLabel:m.ariaLabel},C)),(s||l)&&n.jsxs("div",{className:"toolbar__pager",children:[s&&n.jsx(An,{size:c,options:s.options,value:s.value,onChange:s.onChange,ariaLabel:s.ariaLabel??p("common.pageSizeSelect","\uD398\uC774\uC9C0\uB2F9 \uD45C\uC2DC \uAC1C\uC218")}),l&&n.jsx(_s,{page:l.page,totalPages:l.total,onChange:l.onChange,prevLabel:l.prevLabel,nextLabel:l.nextLabel})]}),i]})})]})}function Oc(e){return typeof e=="string"?e:typeof e=="number"?String(e):Array.isArray(e)?e.map(Oc).join(""):""}function R4(e){let t=e.replace(/\r\n/g,`
843
843
  `).replace(/\r/g,`
844
844
  `);t=t.replace(/^\n+/,"").replace(/\n+$/,"");const r=t.split(`
845
845
  `).map(l=>l.replace(/\t/g," ")),a=r.filter(l=>l.trim().length>0),s=a.length>0?Math.min(...a.map(l=>l.match(/^ */)?.[0].length??0)):0;return r.map(l=>l.slice(s)).join(`
846
846
  `)}const P4=new Set(["pnpm","npm","yarn","node","git","curl","docker","cat","ls","cd","rm","mv","cp","echo","export"]),F4=/^(?:const|let|var|function|return|if|else|for|while|switch|case|break|import|from|export|class|new|try|catch|finally|throw|await|async|null|true|false|this|typeof|instanceof)\b/;function I4(e,t){let r=e;const a=[],s=/^(?:sh|bash|zsh|shell|console)$/.test(t.toLowerCase()),l=(i,u)=>a.push({type:i,content:u});for(;r.length>0;){const i=r.match(/^\s+/);if(i){l("whitespace",i[0]),r=r.slice(i[0].length);continue}if(!s&&r.startsWith("//")){const x=r.indexOf(`
847
847
  `),g=x===-1?r:r.slice(0,x);l("comment",g),r=r.slice(g.length);continue}if(s&&r.startsWith("#")){const x=r.indexOf(`
848
- `),g=x===-1?r:r.slice(0,x);l("comment",g),r=r.slice(g.length);continue}const u=r.match(/^\/\*[\s\S]*?\*\//);if(u){l("comment",u[0]),r=r.slice(u[0].length);continue}const c=r.match(/^(`(?:\\.|[^`])*`|"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*')/);if(c){l("string",c[0]),r=r.slice(c[0].length);continue}const p=r.match(/^\d+(?:\.\d+)?/);if(p){l("number",p[0]),r=r.slice(p[0].length);continue}const h=r.match(F4);if(h){l("keyword",h[0]),r=r.slice(h[0].length);continue}const d=r.match(/^[A-Za-z_$][A-Za-z0-9_$-]*/);if(d){const x=d[0];l(s&&P4.has(x)?"command":"identifier",x),r=r.slice(x.length);continue}const m=r.match(/^[=+\-*/%<>!&|^~?:]+/);if(m){l("operator",m[0]),r=r.slice(m[0].length);continue}const C=r.match(/^[()[\]{};.,]/);if(C){l("punctuation",C[0]),r=r.slice(1);continue}l("other",r[0]),r=r.slice(1)}return a}function O4({children:e,language:t="bash",title:r="",showCopy:a=!0,size:s="default",className:l=""}){const{t:i}=Ne.useTranslation(),[u,c]=o.useState(!1),p=R4(Oc(e)),h=o.useRef(null);o.useEffect(()=>()=>{h.current&&clearTimeout(h.current)},[]);const d=async()=>{try{if(!await iy(p))return;c(!0),h.current&&clearTimeout(h.current),h.current=setTimeout(()=>c(!1),2e3)}catch{}},m=I4(p,t),C=s==="small"?"caption-1":"body-3";return n.jsxs("div",{className:xe("code-box",s==="small"?"code-box--small":"",l),children:[(r||a)&&n.jsxs("div",{className:"code-box__header",role:"toolbar","aria-label":i("common.codeBlock","\uCF54\uB4DC \uBE14\uB85D"),children:[n.jsx("div",{className:"code-box__title caption-1",children:r}),a&&n.jsx(me,{htmlType:"button",className:"code-box__copy",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:u?"check":"copy",onClick:d,ariaLabel:u?i("common.copied","\uBCF5\uC0AC\uB428"):i("common.copyCode","\uCF54\uB4DC \uBCF5\uC0AC")})]}),n.jsx("pre",{className:"code-box__inner","data-lang":t,children:n.jsx("code",{children:m.map((x,g)=>n.jsx("span",{className:`code-token ${x.type} ${C}`,children:x.content},g))})})]})}function z4({count:e,actions:t,onClear:r,clearLabel:a,visible:s,content:l,max:i}){const u=wn()??fn,{t:c}=Ne.useTranslation(),p=s!==void 0?s:e>0,h=a??c("bulkBar.clearSelection","\uC120\uD0DD \uD574\uC81C"),d=o.useRef(null),m=o.useRef(null),C=o.useRef(null),x=o.useRef(p);o.useLayoutEffect(()=>{const b=m.current,B=x.current;if(x.current=p,p&&!B){const N=typeof document<"u"?document.activeElement:null;C.current=N&&N!==document.body&&!b?.contains(N)?N:null}else!p&&B&&b&&b.contains(document.activeElement)&&Ta(b,C.current)},[p]);const[g,y]=o.useState(!1),v=o.useRef(!1),_=o.useRef(null);return o.useEffect(()=>{const b=d.current;if(!b)return;const B=A=>{v.current=A,y(A)},N=()=>{const A=b.firstElementChild??b,D=Array.from(A.children);if(D.length<2){B(!1);return}const j=D[0].offsetTop,$=D.some(I=>I.offsetTop!==j);if(!v.current){_.current=b.clientWidth,$&&B(!0);return}if($)return;const H=D[0],F=D[D.length-1],U=F.offsetLeft+F.offsetWidth-H.offsetLeft,T=_.current;(T==null||U<=T)&&B(!1)};if(N(),typeof ResizeObserver>"u")return;const f=new ResizeObserver(N);f.observe(b);const w=b.parentElement;let k=w?.clientWidth??0;const E=new ResizeObserver(()=>{const A=w?.clientWidth??0;A!==k&&(k=A,_.current=null,N())});return w&&E.observe(w),()=>{f.disconnect(),E.disconnect()}},[l,e]),n.jsxs("div",{ref:m,className:`bulk-bar ${p?"bulk-bar--visible":""}`,inert:!p||void 0,"aria-hidden":p?void 0:!0,children:[n.jsx("span",{ref:d,className:"bulk-bar__count body-2",role:"status",children:l??n.jsx("b",{children:c("common.selectedCount",{count:e})})}),i!==void 0&&n.jsx(cn,{size:"small",fill:"soft",variant:"main",label:`${e} / ${i}`,"aria-label":c("common.selectedOfMax",{count:e,max:i,defaultValue:`\uCD5C\uB300 ${i}\uAC1C \uC911 ${e}\uAC1C`})}),n.jsxs("div",{className:`bulk-bar__actions${g?" bulk-bar__actions--stacked":""}`,children:[n.jsx(me,{htmlType:"button",size:u,label:h,onClick:r}),t.map((b,B)=>n.jsx(me,{htmlType:"button",size:u,variant:b.variant??"default",icon:b.icon,label:b.label,onClick:b.onClick},B))]})]})}const W4=[{key:"edit",icon:"edit-2",closeFirst:!0},{key:"duplicate",icon:"copy",closeFirst:!1},{key:"publish",icon:"book-marked",closeFirst:!1},{key:"copyLink",icon:"link",closeFirst:!1},{key:"remove",icon:"trash-2",closeFirst:!0}];function H4(e){const{onClose:t,className:r}=e;return n.jsx("div",{className:xe("item-actions",r),children:W4.map(({key:a,icon:s,closeFirst:l})=>{const i=e[a];if(!i)return null;const u=a==="publish"?i.published?i.unpublish:i.publish:i;return n.jsx(me,{htmlType:"button",size:40,type:"dot",icon:s,ariaLabel:u.label,showTooltipInfo:u.label,onClick:()=>{l&&t(),u.onClick()}},a)})})}function V4({items:e,className:t,ariaLabel:r="\uC54C\uB9BC \uAE00",titleLevel:a=4,targetBytes:s}){const l=a?`h${a}`:"div";return n.jsx("div",{className:`notify-text-preview${t?` ${t}`:""}`,role:"group","aria-label":r,children:e.map(i=>{const u=s===void 0?gi(i.sms):gi(i.sms,s),c=u.type==="LMS";return n.jsxs("section",{className:"notify-text-preview__item",children:[n.jsxs("header",{className:"notify-text-preview__head",children:[n.jsx(l,{className:"notify-text-preview__name h5b",children:i.name}),i.meta&&Object.keys(i.meta).length>0?n.jsx("dl",{className:"notify-text-preview__meta caption-1",children:Object.entries(i.meta).map(([p,h])=>n.jsxs("div",{className:"notify-text-preview__meta-row",children:[n.jsx("dt",{children:p}),n.jsx("dd",{children:h})]},p))}):null]}),n.jsxs("div",{className:"notify-text-preview__body",children:[n.jsxs("div",{className:"notify-text-preview__col",children:[n.jsxs("div",{className:"notify-text-preview__col-head caption-1",children:[n.jsx("span",{children:"\uBB38\uC790"}),n.jsxs("span",{className:`notify-text-preview__bytes${c?" is-over":u.overTarget?" is-over-target":""}`,title:u.over?`${u.limit}\uBC14\uC774\uD2B8\uB97C \uB118\uC5C8\uB2E4 \u2014 \uBCF4\uB0BC \uB54C \uC798\uB9B0\uB2E4`:c?`${fi}\uBC14\uC774\uD2B8\uB97C \uB118\uC5B4 \uC7A5\uBB38\uC774\uB2E4 \u2014 \uD55C \uD1B5 \uAC12\uC774 \uB2E8\uBB38\uC758 \uB450 \uBC30 \uBC18\uC774\uB2E4`:u.overTarget?`\uACA8\uB204\uB294 ${u.target}\uBC14\uC774\uD2B8\uB97C \uB118\uC5C8\uB2E4 \u2014 \uD55C \uAE00\uC790\uB9CC \uB298\uC5B4\uB3C4 ${fi}\uC744 \uB118\uC5B4 \uC7A5\uBB38\uC774 \uB41C\uB2E4`:void 0,children:[u.bytes,u.target!==null?` / \uBAA9\uD45C ${u.target}`:"","\uBC14\uC774\uD2B8 \xB7 ",c?"\uC7A5\uBB38":"\uB2E8\uBB38",u.over?" \xB7 \uD55C\uACC4 \uB118\uC74C":c?" \xB7 \uAC12\uC774 \uB450 \uBC30 \uBC18":u.overTarget?" \xB7 \uBAA9\uD45C \uB118\uC74C":""]})]}),n.jsx("pre",{className:"notify-text-preview__text",children:i.sms})]}),i.ata?n.jsxs("div",{className:"notify-text-preview__col",children:[n.jsx("div",{className:"notify-text-preview__col-head caption-1",children:n.jsx("span",{children:"\uC54C\uB9BC\uD1A1"})}),n.jsx("pre",{className:"notify-text-preview__text",children:i.ata})]}):null]})]},i.name)})})}function zc({children:e,className:t}){const r=o.useRef(null),[a,s]=o.useState(null);return o.useEffect(()=>{s(r.current?.parentElement??null)},[]),o.useEffect(()=>{const l=r.current;if(!l||!a)return;const i=()=>{const c=typeof window<"u"&&window.getComputedStyle(l).position==="absolute"?Math.ceil(l.getBoundingClientRect().width):0;c>0?a.style.setProperty("--section-head-float-w",`${c}px`):a.style.removeProperty("--section-head-float-w")};if(i(),typeof ResizeObserver>"u")return()=>{a.style.removeProperty("--section-head-float-w")};const u=new ResizeObserver(()=>i());return u.observe(l),u.observe(a),()=>{u.disconnect(),a.style.removeProperty("--section-head-float-w")}},[a,e]),n.jsx("div",{ref:r,className:xe("section-head-float",t),children:e})}function Bs({items:e,className:t}){return n.jsx("div",{className:ce(t?`chart-section__legend ${t}`:"chart-section__legend"),children:e.map((r,a)=>n.jsxs("span",{className:ce("chart-section__legend-item"),children:[n.jsx("span",{className:ce("chart-section__legend-dot"),style:{background:r.color}}),r.label]},a))})}const mr=e=>`chart-section__total__num ${e?"h1":"h0"}`;function Sr({label:e,children:t}){return e?n.jsxs("div",{className:ce("chart-section__total chart-section__total--stacked"),children:[n.jsx("span",{className:ce("chart-section__total__label body-3"),children:e}),n.jsx("span",{className:ce("chart-section__total__value"),children:t})]}):n.jsx("div",{className:ce("chart-section__total"),children:t})}const Wc=20,Ua=120,q4=120,U4={xSmall:Ua,small:Ua,medium:Ua*2+Wc,large:Ua*2+Wc},Hc={xSmall:"chart-section--compact chart-section--xsmall",small:"chart-section--compact",medium:"chart-section--compact",xLarge:"chart-section--full"},fa=e=>{const t=parseFloat(e);return Number.isFinite(t)?t:0};function G4(e){if(!e)return 0;const t=Array.from(e.children);if(!t.length)return 0;const r=fa(getComputedStyle(e).columnGap);return t.reduce((a,s)=>a+s.getBoundingClientRect().width,0)+r*(t.length-1)}function Ga({type:e="chart",title:t,titleClassName:r,titleLevel:a,icon:s,disc:l,headRight:i,headFloat:u,headSegment:c,headMenuItems:p,collapseBelow:h=420,onClick:d,ariaLabel:m,tooltip:C,totalNum:x,totalUnit:g,totalMuted:y=!1,totalLabel:v,change:_,changeType:b,size:B,bodyAlign:N="bottom",subRow:f,legend:w,subRowAlign:k="start",className:E,inGrid:A=!1,fitBody:D=!1,children:j}){const $=e==="stat",H=B??($?"small":"large"),F=H==="xSmall"&&$,[U,T]=o.useState(!0),I=H==="xSmall"?F&&U?"xSmall":"small":H,z=F&&!U,ie=I==="xSmall",te=I==="xSmall"||I==="small"||I==="medium",P=r??"h5",G=a??($?0:3),{t:X}=Ne.useTranslation(),K=o.useRef(null),{anchorRect:L,openAt:R,close:S}=Fa(),V=o.useCallback(()=>{C&&K.current&&R(K.current)},[C,R]),[ae,ne]=o.useState(!1);ca(()=>{const Fe=K.current;if(!Fe||!c)return;const Ue=Te=>ne(Te>0&&Te<h);if(Ue(Fe.clientWidth),typeof ResizeObserver>"u")return;const nt=new ResizeObserver(Te=>Ue(Te[0].contentRect.width));return nt.observe(Fe),()=>nt.disconnect()},[c,h]);const[re,ue]=o.useState(null),Be=o.useCallback(()=>ue(null),[]),le=o.useCallback(Fe=>{const Ue=Fe.currentTarget.getBoundingClientRect();ue(nt=>nt?null:{left:Ue.left,right:Ue.right,top:Ue.top,bottom:Ue.bottom,width:Ue.width,height:Ue.height,x:Ue.x,y:Ue.y})},[]),J=!!c&&ae;o.useEffect(()=>{J||ue(null)},[J]);const O=c?[...c.options.map(Fe=>({label:Fe.label,icon:Fe.icon,selected:Fe.key===c.value,disabled:Fe.disabled,onClick:()=>c.onChange(Fe.key),closeOnSelect:!0})),...(p??[]).map((Fe,Ue)=>Ue===0?{...Fe,separatorBefore:!0}:Fe)]:[],W=o.useCallback(Fe=>{if(!d)return;const Ue=Fe.target;Ue&&typeof Ue.closest=="function"&&Ue.closest('button, a, input, select, textarea, [role="radiogroup"]')||d()},[d]),q=o.useCallback(Fe=>{d&&Fe.target===Fe.currentTarget&&(Fe.key==="Enter"||Fe.key===" ")&&(Fe.preventDefault(),d())},[d]),oe=typeof i=="function"?i({collapsed:J}):i,ee=x!=null||v?n.jsxs(Sr,{label:v,children:[x!=null&&n.jsx("span",{className:ce(mr(te)),children:x}),g&&n.jsx("span",{className:ce("chart-section__total__unit body-3"),children:g})]}):null,be=oe||c?n.jsxs("div",{className:ce("chart-section__head-right"),children:[c&&(J?n.jsx(me,{htmlType:"button",size:hr,type:"dot",icon:"ellipsis",ariaLabel:c.ariaLabel??X("common.more","\uB354\uBCF4\uAE30"),showTooltipInfo:c.ariaLabel??X("common.more","\uB354\uBCF4\uAE30"),"aria-haspopup":"menu","aria-expanded":!!re,onClick:le}):n.jsx(kn,{size:hr,ariaLabel:c.ariaLabel,options:c.options.map(Fe=>({key:Fe.key,label:Fe.label,disabled:Fe.disabled})),value:c.value,onChange:c.onChange})),oe]}):null,je=o.useRef(null),[De,we]=o.useState(null);o.useLayoutEffect(()=>{const Fe=je.current;if(!Fe){we(null);return}const Ue=()=>{const Te=Fe.getBoundingClientRect().height;we(Xe=>Xe!=null&&Math.abs(Xe-Te)<1?Xe:Te)};if(Ue(),typeof ResizeObserver>"u")return;const nt=new ResizeObserver(Ue);return nt.observe(Fe),()=>nt.disconnect()},[w]);const ze=o.useId(),ye=G?`h${G}`:"div",_e=typeof I=="number"?I:U4[I],ve=b??(_===void 0?void 0:_>0?"up":_<0?"down":"neutral"),Ee=_===void 0?void 0:_>0?`+${_}`:`${_}`,Oe=o.useRef(null),ot=o.useRef(null);ca(()=>{if(!F)return;const Fe=K.current;if(!Fe||typeof getComputedStyle!="function")return;const Ue=()=>{const Te=getComputedStyle(Fe),Xe=fa(Te.paddingLeft)+fa(Te.paddingRight)+fa(Te.borderLeftWidth)+fa(Te.borderRightWidth),rt=q4-Xe,ut=Math.max(Oe.current?.getBoundingClientRect().width??0,G4(ot.current));!(rt>0)||!(ut>0)||T(ut<=rt+.5)};if(Ue(),typeof ResizeObserver>"u")return;const nt=new ResizeObserver(Ue);return Oe.current&&nt.observe(Oe.current),ot.current&&nt.observe(ot.current),()=>nt.disconnect()},[F,t,x,g,Ee]);const it=C&&L?n.jsx(zn,{anchorRect:{left:L.left,top:L.top+21,right:L.right,bottom:L.bottom,width:L.width,height:L.height},text:C}):null;return $?n.jsxs("div",{ref:K,className:ce(["chart-section","chart-section--stat",A&&"chart-section--grid",N==="center"&&"chart-section--body-center",typeof I=="string"&&Hc[I],z&&"chart-section--span-two",d&&"chart-section--clickable",E].filter(Boolean).join(" ")),style:_e===void 0?void 0:{minHeight:_e},onClick:d?W:void 0,onKeyDown:d?q:void 0,onPointerEnter:C?V:void 0,onPointerLeave:C?S:void 0,onFocus:C?V:void 0,onBlur:C?S:void 0,role:d?"button":void 0,tabIndex:d?0:void 0,"aria-label":d?m??[typeof t=="string"?t:void 0,x,Ee].filter(Fe=>Fe!=null&&Fe!=="").join(" "):void 0,"aria-labelledby":!d&&t!=null?ze:void 0,children:[it,n.jsxs("div",{className:ce("chart-section__head"),children:[n.jsx(ye,{id:ze,className:ce(["chart-section__title",P].filter(Boolean).join(" ")),children:t}),F&&n.jsx("div",{ref:Oe,"aria-hidden":"true",className:ce(["chart-section__title",P,"chart-section__title--probe"].filter(Boolean).join(" ")),children:t}),s&&!ie&&n.jsx("span",{className:ce("chart-section__head-icon"),children:n.jsx(lt,{icon:s,className:ce("chart-section__head-icon-inner")})})]}),n.jsxs(n.Fragment,{children:[n.jsxs("div",{ref:ot,className:ce("chart-section__sub-row"),children:[n.jsxs(Sr,{children:[n.jsx("span",{className:ce([mr(!0),y&&"chart-section__total__num--muted"].filter(Boolean).join(" ")),children:x}),g&&n.jsx("span",{className:ce("chart-section__total__unit body-3"),children:g})]}),Ee&&n.jsx("div",{className:ce(`chart-section__change chart-section__change--${ve??"neutral"} caption-1`),children:Ee})]}),j&&n.jsx("div",{className:ce("chart-section__body"),children:j})]})]}):n.jsxs("section",{ref:K,className:ce(["chart-section",A&&"chart-section--grid",D&&"chart-section--fit",typeof I=="string"&&Hc[I],d&&"chart-section--clickable",E].filter(Boolean).join(" ")),style:{..._e===void 0?null:D?{minHeight:_e,height:_e}:{minHeight:_e},...De==null?null:{"--legend-h":`${De}px`}},onClick:d?W:void 0,onKeyDown:d?q:void 0,onPointerEnter:C?V:void 0,onPointerLeave:C?S:void 0,onFocus:C?V:void 0,onBlur:C?S:void 0,role:d?"button":void 0,tabIndex:d?0:void 0,"aria-label":d?m??(typeof t=="string"?t:void 0):void 0,"aria-labelledby":!d&&t!=null?ze:void 0,children:[C&&L&&n.jsx(zn,{anchorRect:{left:L.left,top:L.top+21,right:L.right,bottom:L.bottom,width:L.width,height:L.height},text:C}),u&&n.jsx(zc,{children:u}),n.jsxs("div",{className:ce("chart-section__head"),children:[n.jsxs("div",{className:ce("chart-section__title-row"),children:[s&&n.jsx(lt,{icon:s,label:typeof t=="string"?t:void 0,className:ce("chart-section__icon")}),n.jsx(ye,{id:ze,className:ce(["chart-section__title",P].filter(Boolean).join(" ")),children:t})]}),be,l&&n.jsx("div",{className:ce("chart-section__disc body-3"),children:l})]}),(ee||f)&&n.jsxs("div",{className:ce(["chart-section__sub-row",k!=="start"&&`chart-section__sub-row--${k}`].filter(Boolean).join(" ")),children:[ee,f]}),w&&n.jsx("div",{ref:je,className:ce("chart-section__legend-slot"),children:w}),j,re&&n.jsx(sn,{anchorRect:re,onClose:Be,ariaLabel:c?.ariaLabel??X("tooltip.menu","\uBA54\uB274"),children:n.jsx(nr,{columns:[{items:O}],onClose:Be,size:"small"})})]})}const Ca=(e,t)=>`${e}-${String(t).padStart(2,"0")}`,ks=e=>Ca(e.getFullYear(),e.getMonth()+1);function Tr(e){const t=/^(\d{4})-(\d{2})$/.exec(e);if(!t)return null;const r=Number(t[2]);return r>=1&&r<=12?{year:Number(t[1]),month1:r}:null}const As=(e,t)=>`${e}#${t}`;function Rn(e,t){const r=new Date(e,t,1).getDay();return 1+(8-(r===0?7:r))%7}function K4(){const e=kr();let t=e.getFullYear(),r=e.getMonth(),a=e.getDate();if(a<Rn(t,r)){const i=new Date(t,r,0);t=i.getFullYear(),r=i.getMonth(),a=i.getDate()}const s=Math.floor((a-Rn(t,r))/7),l=Ca(t,r+1);return{monthKey:l,value:As(l,s)}}function Y4(e){const t=kr(),r=ks(t),a=(c,p)=>Ca(c,p+1),s=new Map;s.set(r,[]);for(const c of e){if(isNaN(c.date.getTime()))continue;const p=a(c.date.getFullYear(),c.date.getMonth());s.has(p)||s.set(p,[]),s.get(p).push(c)}for(const[c,p]of[...s.entries()]){const h=Tr(c);if(!h)continue;const d=h.year,m=h.month1-1,C=Rn(d,m);if(!(c===r&&t.getDate()<C)&&!p.some(y=>y.date.getDate()<C))continue;const x=new Date(d,m,0),g=a(x.getFullYear(),x.getMonth());s.has(g)||s.set(g,[])}const l=new Map;for(const[c,p]of s){const h=Tr(c);if(!h)continue;const d=h.year,m=h.month1-1,C=new Date(d,m+1,0).getDate(),x=p.reduce((B,N)=>Math.max(B,N.parts?.length??0,N.partsB?.length??0),0),g=p.some(B=>B.partsB),y=new Array(C+1).fill(0),v=new Array(C+1).fill(0),_=Array.from({length:C+1},()=>new Array(x).fill(0)),b=Array.from({length:C+1},()=>new Array(x).fill(0));for(const B of p){const N=B.date.getDate();if(y[N]+=B.a,v[N]+=B.b,B.parts)for(let f=0;f<x;f++)_[N][f]+=B.parts[f]??0;if(B.partsB)for(let f=0;f<x;f++)b[N][f]+=B.partsB[f]??0}l.set(c,{year:d,month:m,daysInMonth:C,partsLen:x,hasPartsB:g,dayA:y,dayB:v,dayParts:_,dayPartsB:b})}const i=(c,p,h)=>new Date(c,p,h).getTime()>new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime(),u={};for(const[c,p]of l){const{year:h,month:d,daysInMonth:m,dayA:C,dayB:x,dayParts:g,dayPartsB:y}=p,v=h===t.getFullYear()&&d===t.getMonth(),_=t.getDate(),b=l.get(a(d===11?h+1:h,(d+1)%12)),B=p.partsLen,N=[];for(let w=1;w<=m;w++){const k=v&&w>_;N.push({label:String(w),...k&&C[w]===0&&x[w]===0?{future:!0}:{},a:k&&C[w]===0&&x[w]===0?-1:C[w],b:x[w],...B?{parts:g[w]}:{},...B&&p.hasPartsB?{partsB:y[w]}:{}})}const f=[];for(let w=Rn(h,d);w<=m;w+=7){const k=Math.max(0,w+6-m),E=k&&b?Math.max(B,b.partsLen):B,A=p.hasPartsB||!!(k&&b?.hasPartsB);let D=0,j=0;const $=new Array(E).fill(0),H=new Array(E).fill(0);for(let U=w;U<=Math.min(w+6,m);U++){D+=C[U],j+=x[U];for(let T=0;T<B;T++)$[T]+=g[U][T],H[T]+=y[U][T]}if(k&&b)for(let U=1;U<=k&&!i(b.year,b.month,U);U++){D+=b.dayA[U],j+=b.dayB[U];for(let T=0;T<b.partsLen;T++)$[T]+=b.dayParts[U][T],H[T]+=b.dayPartsB[U][T]}const F=k?`${(d+1)%12+1}/${k}`:`${w+6}`;f.push({label:`${f.length+1}\uC8FC`,sublabel:`[${w}\uC77C~${F}\uC77C]`,a:D,b:j,...E?{parts:$}:{},...E&&A?{partsB:H}:{}})}u[c]={weekly:f,daily:N}}return u}function Vc(){const e=kr(),t=e.getFullYear(),r=e.getMonth()+1,a=[];for(let s=2024;s<=t;s++){const l=s===t?r:12;for(let i=1;i<=l;i++)a.push({value:Ca(s,i),year:s,month:i})}return a.reverse()}Vc();function Z4(){return Vc()}function qc(e,t){const r=e("calendar.weekOrdinal",{returnObjects:!0,defaultValue:[]}),a=Array.isArray(r)&&typeof r[t]=="string"?r[t]:null;return e("calendar.weekLabel",{ord:a??String(t+1)})}function X4(e,t){const r=e("calendar.weekOrdinal",{returnObjects:!0,defaultValue:[]}),a=(Array.isArray(r)&&typeof r[t]=="string"?r[t]:null)??String(t+1);return e("calendar.weekLabelCompact",{ord:a,defaultValue:""})||qc(e,t)}function Uc(e){const{t,i18n:r}=Ne.useTranslation(),[a,s]=o.useState("week"),l=o.useMemo(()=>Z4().filter(A=>A.value in e),[e]),i=o.useMemo(()=>{const A=[];for(const D of l){const j=new Date(D.year,D.month,0).getDate(),$=Rn(D.year,D.month-1),H=Math.ceil((j-$+1)/7);for(let F=H-1;F>=0;F--)A.push({value:As(D.value,F),monthKey:D.value,year:D.year,month:D.month,week:F})}return A},[l]),u=o.useCallback((A,D)=>t("calendar.yearMonthCompact",{year:A,month:D,full:Ni(t,r.language,A,D),short:ny(A,D,r.language),defaultValue:"{{full}}"}),[t,r.language]),c=o.useCallback(A=>`${u(A.year,A.month)} ${X4(t,A.week)}`,[t,u]),p=o.useMemo(()=>l.map(A=>({value:A.value,label:u(A.year,A.month)})),[u,l]),h=o.useMemo(()=>i.map(A=>({value:A.value,label:c(A)})),[i,c]),d=o.useMemo(()=>K4(),[e]),m=o.useMemo(()=>l.find(A=>A.value===d.monthKey)?.value??l[0]?.value??"",[l,d]),C=o.useMemo(()=>i.find(A=>A.value===d.value)?.value??i[0]?.value??"",[i,d]),[x,g]=o.useState(""),[y,v]=o.useState("");o.useEffect(()=>{l.find(A=>A.value===x)||g(m)},[l,x,m]),o.useEffect(()=>{i.find(A=>A.value===y)||v(C)},[i,y,C]);const _=a==="month"?p:h,b=a==="month"?x:y,B=a==="month"?g:v,N=o.useMemo(()=>{const A=t("calendar.dow",{returnObjects:!0});return Array.isArray(A)?A:["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"]},[t]),f=_.findIndex(A=>A.value===b),w=o.useCallback(()=>{const A=_.findIndex(D=>D.value===b);A<_.length-1&&B(_[A+1].value)},[_,b,B]),k=o.useCallback(()=>{const A=_.findIndex(D=>D.value===b);A>0&&B(_[A-1].value)},[_,b,B]),E=o.useMemo(()=>[{key:"week",label:t("manager.chart.periodWeek","\uC8FC")},{key:"month",label:t("manager.chart.periodMonth","\uC6D4")}],[t]);return{period:a,setPeriod:s,range:b,setRange:B,activeOptions:_,activeIdx:f,handlePrev:w,handleNext:k,periodOptions:E,monthRange:x,weekRange:y,weekRanges:i,DOW:N}}const Wt=e=>typeof e=="number"&&Number.isFinite(e)?e:0;function Gn(e,t=!0){return e.future===!0||t&&e.a===-1}function J4({data:e,colorA:t,colorB:r,labelA:a,labelB:s,barWidth:l=10,barGap:i=1,height:u=140,fitHeight:c=!1,maxOverride:p,tightMax:h,seriesColors:d,seriesLabels:m,rateLabels:C,grouped:x=!1,baseline:g,focusableBars:y=!1}){const v=!r,_=!!(d&&d.length>0),b=g,B=o.useMemo(()=>_?Math.max(0,...e.filter(R=>!Gn(R,b==null)).map(R=>x?Math.max(0,...(R.parts??[]).map(Wt)):(R.parts??[]).reduce((S,V)=>S+Math.max(0,Wt(V)),0))):Math.max(0,...e.filter(R=>!Gn(R,b==null)).flatMap(R=>v?[Wt(R.a)]:[Wt(R.a),Wt(R.b)])),[e,v,_,x]),N=o.useMemo(()=>{if(b==null)return 0;const R=e.filter(S=>!Gn(S,b==null)).flatMap(S=>_?(S.parts??[]).map(Wt):v?[Wt(S.a)]:[Wt(S.a),Wt(S.b)]);return Math.max(0,...R.map(S=>Math.abs(S-b)))},[e,b,_,v]),f=o.useMemo(()=>{const R=b!=null?N:B;return p??(h?R>0?R:10:Math.ceil(R/10)*10||10)},[B,N,b,p,h]),w=o.useRef(null),k=o.useRef(null),[E,A]=o.useState(null);o.useLayoutEffect(()=>{if(!c){A(null);return}const R=w.current;if(!R)return;const S=()=>{const ae=k.current,ne=R.clientHeight-(ae?ae.getBoundingClientRect().height:0);ne<=0||A(re=>re!=null&&Math.abs(re-ne)<1?re:ne)};if(S(),typeof ResizeObserver>"u")return;const V=new ResizeObserver(S);return V.observe(R),k.current&&V.observe(k.current),()=>V.disconnect()},[c]);const D=E??u,j=_?x?Math.max(1,d.length):1:v?1:2,$={"--bar-width":`${o.useMemo(()=>{const R=Math.max(1,e.length);return Math.max(2,Math.min(l,Math.round(120/(R*j)+6)))},[e.length,j,l])}px`},H={"--bar-group-gap":`${Math.max(0,i)}px`},F=o.useMemo(()=>{const R=Math.round(f/2);return b!=null?[b+f,...R!==f?[b+R]:[],b,...R!==f?[b-R]:[],b-f]:R!==f?[f,R,0]:[f,0]},[f,b]),U=R=>b!=null?1-(R-(b-f))/(2*f):1-R/f,T=14,I=o.useMemo(()=>{const R=new Set;let S=Number.NEGATIVE_INFINITY;for(const V of F.slice(0,-1)){const ae=(b!=null?1-(V-(b-f))/(2*f):1-V/f)*D;ae-S>=T&&(R.add(V),S=ae)}return R},[F,b,f,D]),[z,ie]=o.useState(null),te=o.useCallback(()=>ie(null),[]),P=o.useCallback((R,S)=>{const V=[R.label,R.sublabel].filter(Boolean).join(" ");let ae;if(_&&x&&R.rawPartsB)ae=(m??[]).map((ne,re)=>{const ue=R.rawPartsB[re]??0;return{text:ue>0?`${ne}: ${S[re]??0}% (${R.rawParts?.[re]??0}/${ue})`:`${ne}: -`,color:(d??[])[re]}});else if(_&&x)ae=(m??[]).map((ne,re)=>({text:`${ne}: ${K(S[re]??0)}`,color:(d??[])[re]}));else if(_){const ne=(m??[]).map((ue,Be)=>({text:`${ue}: ${S[Be]??0}`,color:(d??[])[Be]})),re=ne.filter((ue,Be)=>(S[Be]??0)>0);ae=re.length?re:ne}else C&&!v?ae=[{text:`${a} ${Wt(R.a)}%`,color:t},{text:`${s} ${Wt(R.b)}%`,color:r}]:C&&R.rawB!==void 0?ae=[{text:`${C.total} ${R.rawB}`},{text:`${C.done} ${R.rawA??0}`,color:t}]:v?ae=[{text:`${a}: ${Wt(R.a)}`,color:t}]:ae=[{text:`${a}: ${Wt(R.a)}`,color:t},{text:`${s}: ${Wt(R.b)}`,color:r}];return{title:V,items:ae}},[_,x,m,d,C,v,a,s,t,r,b]),G=o.useCallback((R,S,V)=>{const ae=R.getBoundingClientRect(),{title:ne,items:re}=P(S,V);ie({rect:{left:ae.left,top:ae.top,right:ae.right,bottom:ae.bottom,width:ae.width,height:ae.height},title:ne,items:re})},[P]),X=o.useCallback((R,S)=>{const{title:V,items:ae}=P(R,S);return[V,...ae.map(ne=>ne.text)].filter(Boolean).join(", ")},[P]),K=R=>b!=null&&R>b?`+${R}`:`${R}`,L=z!=null;return o.useEffect(()=>{if(!L)return;const R=()=>ie(null),S=V=>{const ae=V.target;ae&&typeof ae.closest=="function"&&ae.closest(".bar-chart__col")||ie(null)};return window.addEventListener("scroll",R,!0),document.addEventListener("pointerdown",S,!0),()=>{window.removeEventListener("scroll",R,!0),document.removeEventListener("pointerdown",S,!0)}},[L]),n.jsxs("div",{ref:w,className:ce("bar-chart__wrap"),style:H,children:[n.jsx("div",{className:ce("bar-chart__inner"),children:n.jsx("div",{className:ce("bar-chart__scroll"),children:n.jsxs("div",{className:ce("bar-chart__area"),children:[n.jsxs("div",{className:ce("bar-chart__plot"),style:{height:D},children:[F.slice(0,-1).map((R,S)=>n.jsx("div",{className:ce(`bar-chart__gridline${b!=null&&R===b?" bar-chart__gridline--baseline":""}`),style:{top:U(R)*D},children:I.has(R)&&n.jsx("span",{className:ce("bar-chart__gridline__label caption-1"),children:R})},S)),e.map((R,S)=>{const V=Gn(R,b==null),ae=D/2,ne=le=>b!=null?Math.min(ae,Math.abs(Wt(le)-b)/f*ae):Math.min(D,Math.max(0,Wt(le)/f*D)),re=V?0:ne(R.a),ue=V?0:ne(R.b),Be=(R.parts??[]).map(Wt);return n.jsx("div",{className:ce(`bar-chart__col${x&&_?" bar-chart__col--group":""}`),style:{cursor:V?"default":"pointer"},tabIndex:y&&!V?0:void 0,role:y&&!V?"img":void 0,"aria-label":y&&!V?X(R,Be):void 0,onMouseEnter:V?void 0:le=>G(le.currentTarget,R,Be),onFocus:V||!y?void 0:le=>G(le.currentTarget,R,Be),onBlur:y?te:void 0,onMouseLeave:te,children:!V&&(_&&x?(d??[]).map((le,J)=>{const O=Be[J]??0;if(b==null)return n.jsx("div",{className:ce("bar-chart__bar"),style:{...$,height:ne(O),background:le}},J);const W=Wt(O)<b;return n.jsxs("div",{className:ce("bar-chart__slot"),style:$,children:[n.jsx("div",{className:ce("bar-chart__slot__half bar-chart__slot__half--up"),children:!W&&n.jsx("div",{className:ce("bar-chart__bar bar-chart__bar--full"),style:{height:ne(O),background:le}})}),n.jsx("div",{className:ce("bar-chart__slot__half bar-chart__slot__half--down"),children:W&&n.jsx("div",{className:ce("bar-chart__bar bar-chart__bar--full bar-chart__bar--down"),style:{height:ne(O),background:le}})})]},J)}):_?n.jsx("div",{className:ce("bar-chart__stack"),style:$,children:(()=>{const le=Be.reduce((O,W,q)=>W>0?q:O,-1);let J=D;return Be.map((O,W)=>{if(O<=0)return null;const q=Math.min(J,O/f*D);return J-=q,n.jsx("div",{className:ce("bar-chart__stack-segment"),style:{height:q,background:(d??[])[W],borderRadius:W===le?"6px 6px 0 0":void 0}},W)})})()}):b!=null?n.jsx(n.Fragment,{children:[{v:Wt(R.a),c:t},...v?[]:[{v:Wt(R.b),c:r}]].map(({v:le,c:J},O)=>n.jsxs("div",{className:ce("bar-chart__slot"),style:$,children:[n.jsx("div",{className:ce("bar-chart__slot__half bar-chart__slot__half--up"),children:le>=b&&n.jsx("div",{className:ce("bar-chart__bar bar-chart__bar--full"),style:{height:ne(le),background:J}})}),n.jsx("div",{className:ce("bar-chart__slot__half bar-chart__slot__half--down"),children:le<b&&n.jsx("div",{className:ce("bar-chart__bar bar-chart__bar--full bar-chart__bar--down"),style:{height:ne(le),background:J}})})]},O))}):n.jsxs(n.Fragment,{children:[n.jsx("div",{className:ce("bar-chart__bar"),style:{...$,height:re,background:t}}),!v&&n.jsx("div",{className:ce("bar-chart__bar"),style:{...$,height:ue,background:r}})]}))},S)})]}),n.jsx("div",{ref:k,className:ce("bar-chart__x-axis"),children:e.map((R,S)=>{const V=Gn(R,b==null);return n.jsxs("span",{className:ce(`bar-chart__x-axis__label${V?" bar-chart__x-axis__label--future":""}`),children:[n.jsxs("span",{className:ce("caption-1 bar-chart__x-axis__main"),children:[R.isToday&&n.jsx("span",{className:ce("bar-chart__x-axis__today-dot"),style:{background:t}}),R.label]}),R.sublabel&&n.jsx("span",{className:"caption-1",children:R.sublabel})]},S)})})]})})}),z&&n.jsx(er,{anchorRect:z.rect,title:z.title,items:z.items,showIndex:!1,closeOnOutsideClick:!1})]})}function Gc({control:e}){const{t}=Ne.useTranslation(),{activeOptions:r,activeIdx:a,range:s,setRange:l,handlePrev:i,handleNext:u,periodOptions:c,period:p,setPeriod:h}=e,d=p==="week"?t("calendar.prevWeek","\uC774\uC804 \uC8FC"):t("calendar.prevMonth","\uC774\uC804 \uB2EC"),m=p==="week"?t("calendar.nextWeek","\uB2E4\uC74C \uC8FC"):t("calendar.nextMonth","\uB2E4\uC74C \uB2EC");return n.jsxs("div",{className:ce("chart-section__controls"),children:[n.jsx(me,{htmlType:"button",size:hr,type:"dot",icon:"chevron-left",ariaLabel:d,showTooltipInfo:d,disabled:a===r.length-1,onClick:i}),n.jsx(An,{value:s,onChange:l,options:r,size:hr,className:"month-dropdown",ariaLabel:t("calendar.rangeSelect","\uAE30\uAC04 \uC120\uD0DD")}),n.jsx(me,{htmlType:"button",size:hr,type:"dot",icon:"chevron-right",ariaLabel:m,showTooltipInfo:m,disabled:a<=0,onClick:u}),n.jsx(kn,{ariaLabel:t("calendar.periodSelect","\uAE30\uAC04 \uB2E8\uC704"),options:c,value:p,onChange:C=>h(C),size:hr})]})}function Ns(e,t,r,a=!0){const s=new Date(r.getFullYear(),r.getMonth(),r.getDate());return Array.from({length:7},(l,i)=>{const u=new Date(t);u.setDate(t.getDate()+i);const c=(e[ks(u)]?.daily??[])[u.getDate()-1],p=c!=null&&Gn(c,a)||u>s;return{dt:u,entry:c,isFuture:p}})}function Q4(e,t,r,a=!0){const{period:s,monthRange:l,weekRange:i,weekRanges:u,DOW:c}=t,p=kr(),h=p.getFullYear(),d=p.getMonth()+1,m=p.getDate();if(s==="month"){const g=e[l]??{weekly:[],daily:[]},y=Tr(l),v=y?y.year:null,_=y?y.month1:null,b=v&&_?Rn(v,_-1):1;return g.weekly.map((B,N)=>{const f=N+1;let w=B.label,k=!1,E=!1;if(v&&_){const A=b+N*7,D=new Date(v,_-1,A+6),j=D.getMonth()+1,$=D.getDate(),H=j===_?`${$}`:`${j}/${$}`;w=r("manager.chart.weekRange",{start:A,end:H});const F=new Date(h,d-1,m).getTime();k=F>=new Date(v,_-1,A).getTime()&&F<=D.getTime(),E=v>h||v===h&&(_>d||_===d&&A>m)}return{...B,label:w,sublabel:qc(r,f-1),isToday:k,future:B.future===!0||E||void 0,a:E?-1:B.a,b:E?0:B.b}})}const C=u.find(g=>g.value===i);if(!C)return[];const x=new Date(C.year,C.month-1,Rn(C.year,C.month-1)+C.week*7);return Ns(e,x,p,a).map(({dt:g,entry:y,isFuture:v})=>{const _=g.getMonth()+1,b=g.getDate(),B=g.getFullYear();return{label:_===C.month&&B===C.year?`${b}`:`${_}/${b}`,sublabel:c[g.getDay()]??"",future:v||void 0,a:v?-1:y&&y.a>0?y.a:0,b:v?0:y&&y.b>0?y.b:0,isToday:B===h&&_===d&&b===m,...y?.parts?{parts:v?y.parts.map(()=>0):y.parts}:{},...y?.partsB?{partsB:v?y.partsB.map(()=>0):y.partsB}:{}}})}const e_={small:{height:100,barWidth:16},medium:{height:140,barWidth:20},large:{height:180,barWidth:24}};function t_({canvasHeight:e,fitHeight:t,focusableBars:r,size:a="medium",barWidth:s,titleKey:l,titleLevel:i,data:u,colorA:c,colorB:p,labelAKey:h,labelBKey:d,showTotal:m=!1,totalUnitKey:C,totalLabelKey:x,control:g,hideControls:y=!1,rate:v=!1,rateAgg:_="dayMean",tightMax:b=!1,avgMode:B=!1,totalFormat:N,series:f,seriesMode:w="stack",loading:k=!1,onDetail:E,headExtra:A,headSegment:D,icon:j,disc:$,onClick:H,cardAriaLabel:F,cardTooltip:U,detailSize:T=hr,barGap:I,baseline:z,className:ie,inGrid:te=!1}){const{t:P}=Ne.useTranslation(),G={...e_[a],...e===void 0?null:{height:e}},X=Uc(u),K=g??X,L=o.useMemo(()=>Q4(u,K,P,z==null),[u,K,P,z]),R=w==="group"&&!!f&&f.length>0;I!=null&&!R&&Tt("bar-chart-bargap-without-group","[BarChart] barGap \uC740 seriesMode='group' + series \uC5D0\uC11C\uB9CC \uC4F0\uC778\uB2E4 \u2014 \uADF8 \uBC16\uC5D0\uC11C\uB294 \uC544\uBB34 \uC77C\uB3C4 \uD558\uC9C0 \uC54A\uB294\uB2E4.");const S=o.useMemo(()=>{if(!v)return L;const O=K.period==="month"?Tr(K.monthRange):null,W=kr(),q=f?.length??0,oe=ee=>{const be=[],je=[],De=[];for(let we=0;we<q;we++){let ze=0,ye=0,_e=0;for(const ve of ee){const Ee=Wt(ve.a[we]),Oe=Wt(ve.b[we]);Oe<=0||(ze+=Ee,ye+=Oe,_e+=Ee/Oe*100)}be.push(_==="weighted"?ye>0?Math.round(ze/ye*100):0:ee.length?Math.round(_e/ee.length):0),je.push(ze),De.push(ye)}return{pct:be,ra:je,rb:De}};return L.map((ee,be)=>{let je=ee.a===-1?-1:ee.b>0?Math.round(ee.a/ee.b*100):0;if(O&&!Gn(ee)){const we=O.year,ze=O.month1-1,ye=Ns(u,new Date(we,ze,Rn(we,ze)+be*7),W).filter(_e=>!_e.isFuture);if(_==="weighted"){let _e=0,ve=0;for(const{entry:Ee}of ye)Ee&&Ee.b>0&&(_e+=Ee.a,ve+=Ee.b);je=ve>0?Math.round(_e/ve*100):0}else je=ye.length?Math.round(ye.reduce((_e,{entry:ve})=>_e+(ve&&ve.b>0?ve.a/ve.b*100:0),0)/ye.length):0}let De=null;if(R&&!Gn(ee)){let we;if(O){const ye=O.year,_e=O.month1-1;we=Ns(u,new Date(ye,_e,Rn(ye,_e)+be*7),W).filter(ve=>!ve.isFuture).map(({entry:ve})=>({a:ve?.parts??[],b:ve?.partsB??[]}))}else we=[{a:ee.parts??[],b:ee.partsB??[]}];const ze=oe(we);De={parts:ze.pct,rawParts:ze.ra,rawPartsB:ze.rb}}return{...ee,a:je,b:ee.a===-1?0:d&&ee.parts&&ee.parts[1]>0?Math.round(ee.parts[0]/ee.parts[1]*100):0,rawA:ee.a===-1?-1:ee.a,rawB:ee.b,...De??{}}})},[L,v,_,d,K.period,K.monthRange,u,R,f?.length]),V=o.useMemo(()=>{if(v||B){const W=(K.period==="week"?L:u[K.monthRange]?.daily??[]).filter(oe=>oe.a!==-1);if(W.length===0)return 0;if(v&&_==="weighted"){let oe=0,ee=0;for(const be of W)be.b>0&&(oe+=be.a,ee+=be.b);return ee>0?Math.round(oe/ee*100):0}const q=v?W.reduce((oe,ee)=>oe+(ee.b>0?ee.a/ee.b*100:0),0):W.reduce((oe,ee)=>oe+(ee.a>0?ee.a:0),0);return Math.round(q/W.length)}const O=K.period==="month"?u[K.monthRange]?.daily??[]:S;return z!=null?O.reduce((W,q)=>W+(Gn(q,!1)?0:Wt(q.a)+(d?Wt(q.b):0)),0):O.reduce((W,q)=>W+(q.a>0?q.a:0)+(d&&q.b>0?q.b:0),0)},[S,L,v,_,B,z,d,K.period,K.monthRange,u]),ae=f&&f.length>0?f.map(O=>({color:O.color,label:O.label})):[{color:c,label:P(h)},...d?[{color:p,label:P(d)}]:[]],ne=a==="small",re=a==="large",ue=ne?"medium":re?"xLarge":"large",Be=ie||void 0,le=l?P(l):"",J=le?P("trainingStatus.detailFor",{name:le,defaultValue:"{{name}} \uC0C1\uC138\uBCF4\uAE30"}):P("trainingStatus.detail","\uC0C1\uC138\uBCF4\uAE30");return n.jsx(Ga,{className:Be,size:ue,inGrid:te,icon:j,disc:$,onClick:H,ariaLabel:F,tooltip:U,headSegment:D,headMenuItems:E?[{label:J,icon:"list",onClick:E,closeOnSelect:!0}]:void 0,title:P(l),titleLevel:i,headRight:ne?A??void 0:({collapsed:O})=>n.jsxs(n.Fragment,{children:[!y&&n.jsx(Gc,{control:K}),A,E&&!O&&n.jsx("span",{className:ce("bar-chart__detail-btn"),children:n.jsx(me,{htmlType:"button",size:T,type:"dot",icon:"list",ariaLabel:J,showTooltipInfo:J,onClick:E})})]}),legend:n.jsx(Bs,{items:ae,className:"caption-1"}),fitBody:t,subRow:m&&n.jsx(n.Fragment,{children:v||B||x&&N?n.jsx(Sr,{label:ne?void 0:`${P(K.period==="week"?"manager.chart.weeklyPrefix":"manager.chart.monthlyPrefix")} ${P(x??h)}`,children:N?(N(V).match(/([+-]?\d[\d.,]*|[^\d]+)/g)??[]).map((O,W)=>/\d/.test(O)?n.jsx("span",{className:ce(mr(!re)),children:O},W):n.jsx("span",{className:ce("chart-section__total__unit body-3"),children:O},W)):n.jsxs(n.Fragment,{children:[n.jsx("span",{className:ce(mr(!re)),children:V}),C&&n.jsx("span",{className:ce("chart-section__total__unit body-3"),children:P(C)})]})}):n.jsxs(Sr,{children:[n.jsx("span",{className:ce(mr(!re)),children:V}),n.jsx("span",{className:ce("chart-section__total__unit body-3"),children:P(h)}),C&&n.jsx("span",{className:ce("chart-section__total__unit body-3"),children:P(C)})]})}),children:k?n.jsx("div",{className:ce("bar-chart__wrap bar-chart__loading"),"aria-busy":"true",children:n.jsx("div",{className:ce("bar-chart__inner"),children:n.jsxs("div",{className:ce("bar-chart__area bar-chart__area--loading"),children:[n.jsx("div",{className:ce("bar-chart__plot bar-chart__plot--loading"),style:{height:G.height},children:n.jsx(Nr,{size:32})}),n.jsx("div",{className:ce("bar-chart__x-axis"),"aria-hidden":"true",children:n.jsxs("span",{className:ce("bar-chart__x-axis__label"),children:[n.jsx("span",{className:ce("caption-1 bar-chart__x-axis__main"),children:"\xA0"}),S.some(O=>!!O.sublabel)&&n.jsx("span",{className:"caption-1",children:"\xA0"})]})})]})})}):n.jsx(J4,{focusableBars:r,data:S,colorA:c,colorB:d?p:void 0,labelA:P(h),labelB:d?P(d):void 0,barWidth:s??G.barWidth,barGap:I,baseline:z,height:G.height,fitHeight:t,maxOverride:v?100:void 0,tightMax:b,seriesColors:f?.map(O=>O.color),seriesLabels:f?.map(O=>O.label),rateLabels:v?{total:P("trainingStatus.today.tooltipTotal","\uC804\uCCB4"),done:P("trainingStatus.today.tooltipDone","\uC644\uB8CC")}:void 0,grouped:R})})}const Kc=120,n_={left:38,right:16,top:26,bottom:24};function r_({points:e=[],range:t,ticks:r=[],axisTitle:a,color:s,height:l=156,fallbackWidth:i=320,insets:u,overlay:c,ariaLabel:p,className:h}){const[d,m]=o.useState(null),[C,x]=o.useState(null);o.useEffect(()=>{if(!C)return;const T=z=>m(Math.round(z)||null);if(T(C.getBoundingClientRect().width),typeof ResizeObserver>"u")return;const I=new ResizeObserver(([z])=>T(z.contentRect.width));return I.observe(C),()=>{I.disconnect()}},[C]);const{payload:g,anchorRect:y,openAfterDelay:v,close:_}=mv(Kc),b=o.useCallback((T,I)=>{T&&v(T,I.getBoundingClientRect())},[v]),B=d??i,N=l,{left:f,right:w,top:k,bottom:E}={...n_,...u},[A,D]=t,j=T=>D===A?f:f+(B-f-w)*(T-A)/(D-A),$=T=>k+(N-k-E)*(100-T)/100,H={x:j,y:$,plot:{left:f,right:B-w,top:k,bottom:N-E,width:Math.max(0,B-f-w),height:Math.max(0,N-k-E)}},F=e.filter(T=>!T.hollow),U=s??"var(--color-main)";return n.jsxs(n.Fragment,{children:[n.jsxs("svg",{ref:x,className:xe("line-chart",h),viewBox:`0 0 ${B} ${N}`,role:"img","aria-label":p??e.map(T=>T.description).filter(Boolean).join(", "),children:[a&&n.jsx("text",{className:"line-chart__axis-title",x:0,y:12,children:a}),[0,100].map(T=>n.jsxs("g",{children:[n.jsx("line",{className:"line-chart__grid",x1:f,x2:B-w,y1:$(T),y2:$(T)}),n.jsxs("text",{className:"line-chart__tick",x:f-6,y:$(T)+4,textAnchor:"end",children:[T,"%"]})]},T)),c?.(H),r.map(T=>n.jsx("text",{className:"line-chart__tick",x:j(T.x),y:N-5,textAnchor:"middle",children:T.label},T.x)),F.length>1&&n.jsx("polyline",{className:"line-chart__line",fill:"none",stroke:U,points:F.map(T=>`${j(T.x)},${$(T.pct)}`).join(" ")}),e.map(T=>n.jsxs("g",{className:"line-chart__dot",onPointerEnter:I=>b(T.description,I.currentTarget),onPointerLeave:_,children:[n.jsx("circle",{className:"line-chart__dot-hit",cx:j(T.x),cy:$(T.pct),r:12}),n.jsx("circle",{className:xe("line-chart__dot-main",T.hollow&&"is-hollow"),cx:j(T.x),cy:$(T.pct),r:4,stroke:U,fill:T.hollow?void 0:U})]},T.x))]}),g!=null&&n.jsx(sn,{anchorRect:y,offset:10,closeOnOutsideClick:!1,className:"line-chart__tip",role:"tooltip",ariaLabel:g,children:g})]})}function a_({icon:e,iconSize:t=56,title:r,titleClass:a="h2",description:s,tipGroups:l,start:i,className:u}){return n.jsxs("div",{className:xe("game-intro",u),children:[e!=null&&n.jsx("span",{className:"game-intro__icon","aria-hidden":"true",style:{"--game-intro-icon":`${t}px`},children:e}),n.jsx("h2",{className:xe("game-intro__title",a),children:r}),s!=null&&n.jsx("p",{className:"game-intro__description body-3",children:s}),l?.map((c,p)=>n.jsxs("div",{className:"game-intro__tips",children:[c.title!=null&&n.jsx("span",{className:"game-intro__tips-title body-3",children:c.title}),c.tips.map((h,d)=>n.jsxs("span",{className:"game-intro__tip body-3",children:[h.icon!=null&&n.jsx("span",{"aria-hidden":"true",children:h.icon}),n.jsx("span",{children:h.text})]},d))]},p)),i&&n.jsx(me,{htmlType:"button",className:i.className,variant:"main",color:i.color,size:48,width:"100%",disabled:i.disabled,onClick:i.onClick,children:i.label})]})}const Yc=(e,t,r)=>{const a=new Date(Date.UTC(e,t,r));return`${a.getUTCFullYear()}-${String(a.getUTCMonth()+1).padStart(2,"0")}-${String(a.getUTCDate()).padStart(2,"0")}`},Zc=(e,t,r,a)=>({from:Ei(e,t,r),to:new Date(Ei(e,t,r+a).getTime()-1),fromYmd:Yc(e,t,r),toYmd:Yc(e,t,r+a-1)});function o_(e,t=0){if(e.period==="month"){const s=Tr(e.monthRange),l=kr(),i=s?s.year:l.getFullYear(),u=(s?s.month1:l.getMonth()+1)-1+t,c=new Date(Date.UTC(i,u+1,0)).getUTCDate();return Zc(i,u,1,c)}const r=e.weekRanges.find(s=>s.value===e.weekRange);if(!r){const s=new Date,l=Jr();return{from:s,to:s,fromYmd:l,toYmd:l}}const a=Rn(r.year,r.month-1);return Zc(r.year,r.month-1,a+(r.week+t)*7,7)}const Es={small:{diameter:96,strokeWidth:16},medium:{diameter:120,strokeWidth:18},large:{diameter:160,strokeWidth:22}};function Xc(e){return!Number.isFinite(e)||e<=0?0:e>=1?100:Math.min(99,Math.max(1,Math.round(e*100)))}function Jc({done:e,total:t,segments:r,color:a="var(--color-main)",size:s="medium",strokeWidth:l,label:i="%",hideCenter:u=!1,hideLabel:c=!1}){const p=typeof s=="number"?s:Es[s].diameter,h=l??(typeof s=="number"?12:Es[s].strokeWidth),d=p/2,m=(p-h)/2,C=2*Math.PI*m;if(r&&r.length>0){const v=r.reduce((_,b)=>{const B=_.length>0?_[_.length-1].acc:0,N=Number.isFinite(b.ratio)?b.ratio:0,f=Math.max(0,Math.min(N,1-B));return _.push({color:b.color,rotate:-90+B*360,dash:C*f,acc:B+f}),_},[]);return n.jsx("div",{className:"ring-chart",style:{width:p,height:p},children:n.jsxs("svg",{width:p,height:p,viewBox:`0 0 ${p} ${p}`,"aria-hidden":"true",children:[n.jsx("circle",{cx:d,cy:d,r:m,fill:"none",stroke:"var(--color-whiteLine)",strokeWidth:h}),v.map((_,b)=>_.dash>0&&n.jsx("circle",{cx:d,cy:d,r:m,fill:"none",stroke:_.color,strokeWidth:h,strokeDasharray:`${_.dash} ${C}`,strokeLinecap:"round",transform:`rotate(${_.rotate} ${d} ${d})`},b))]})})}const x=(t??0)>0?Math.min((e??0)/t,1):0,g=C*x,y=C-g;return n.jsxs("div",{className:"ring-chart",style:{width:p,height:p},children:[n.jsxs("svg",{width:p,height:p,viewBox:`0 0 ${p} ${p}`,"aria-hidden":"true",children:[n.jsx("circle",{cx:d,cy:d,r:m,fill:"none",stroke:"var(--color-whiteLine)",strokeWidth:h}),x>0&&n.jsx("circle",{cx:d,cy:d,r:m,fill:"none",stroke:a,strokeWidth:h,strokeDasharray:`${g} ${y}`,strokeLinecap:x<.02||x>.98?"butt":"round",transform:`rotate(-90 ${d} ${d})`})]}),!u&&n.jsxs("div",{className:`ring-chart__center${c?"":` ${p<=96?"ring-chart__center--small":s==="medium"?"ring-chart__center--medium":"ring-chart__center--large"}`}`,children:[n.jsx("span",{className:`ring-chart__pct ${p<=96?"h2":"h1"}`,children:Xc(x)}),!c&&n.jsx("span",{className:`ring-chart__label ${p<=96?"caption-2":"caption-1"}${p<=96||s==="medium"?" ring-chart__label--tight":""}`,children:i})]})]})}function s_({titleKey:e,titleLevel:t,headRight:r,icon:a,showTotal:s,totalLabelKey:l,legend:i,loading:u,className:c,inGrid:p=!1,onClick:h,ariaLabel:d,tooltip:m,...C}){const{t:x}=Ne.useTranslation();if(!e)return n.jsx(Jc,{...C});const g=(C.total??0)>0?Xc(Math.min((C.done??0)/C.total,1)):0,y=C.size==="small",v=typeof C.size=="number"?C.size:Es[C.size??"medium"].diameter,_=C.size==="large",b=y?"medium":_?"xLarge":"large",B=c||void 0,N=a&&n.jsx("span",{className:ce("chart-section__head-icon"),children:n.jsx(lt,{icon:a,className:ce("chart-section__head-icon-inner")})});return n.jsx(Ga,{className:B,size:b,inGrid:p,onClick:h,ariaLabel:d,tooltip:m,title:x(e),titleLevel:t,headRight:N||(y?void 0:r),legend:i&&n.jsx(Bs,{items:i}),subRow:s&&n.jsxs(Sr,{label:!y&&l?x(l):void 0,children:[n.jsx("span",{className:ce(mr(y)),children:g}),n.jsx("span",{className:ce("chart-section__total__unit body-3"),children:"%"})]}),children:u?n.jsx("div",{className:ce("ring-chart-section-body ring-chart-section-body--offset"),children:n.jsx("div",{className:"ring-chart ring-chart--loading",style:{width:v,height:v},"aria-busy":"true",children:n.jsx(Nr,{size:32})})}):n.jsx("div",{className:ce("ring-chart-section-body ring-chart-section-body--offset"),children:n.jsx(Jc,{...C,hideCenter:C.hideCenter??y})})})}function l_({label:e,value:t,change:r,changeType:a,icon:s,tooltip:l,onClick:i,size:u="small",bodyAlign:c="bottom",children:p}){return n.jsx(Ga,{type:"stat",title:e,totalNum:t,change:r,changeType:a,icon:s,tooltip:l,onClick:i,size:u,bodyAlign:c,children:p})}function Qc({value:e,onChange:t,min:r=0,max:a=100,step:s=1,orientation:l="horizontal",size:i=24,disabled:u=!1,ariaLabel:c,length:p,className:h,label:d,formatValue:m,labelPos:C,labelAlign:x="right",showMinMax:g=!1,minLabel:y,maxLabel:v,showBgTick:_=!1,showFillTick:b=!1,tickStep:B,tickShape:N="dot"}){t&&!c&&Tt("Slider:unnamed","[ihab/Slider] \uC774\uB984\uC774 \uC5C6\uC2B5\uB2C8\uB2E4 \u2014 ariaLabel \uC744 \uC8FC\uC138\uC694. label prop \uC740 \uAC12 \uD45C\uAE30 \uBC29\uC2DD\uC774\uC9C0 \uC774\uB984\uC774 \uC544\uB2D9\uB2C8\uB2E4.");const f=Math.min(a,Math.max(r,e)),w=a>r?(f-r)/(a-r):0,k=l==="vertical",E=!t,A=X=>t?.(Number(X.target.value)),D=typeof p=="number"?`${p}px`:p,j={"--slider-ratio":String(w),"--slider-thumb":`${i}px`,...D?k?{height:D}:{width:D}:{}},$=B??s,H=(_||b)&&$>0&&a>r?Math.floor((a-r)/$+1e-6):0;if(H>0&&H<=100){const X=N!=="dash",K=ae=>X?`radial-gradient(circle, ${ae} 0.5px, transparent 1px)`:k?`linear-gradient(to bottom, transparent calc(50% - 2px), ${ae} calc(50% - 2px), ${ae} calc(50% + 2px), transparent calc(50% + 2px))`:`linear-gradient(to right, transparent calc(50% - 2px), ${ae} calc(50% - 2px), ${ae} calc(50% + 2px), transparent calc(50% + 2px))`,L=X?"2px":"4px",R=[],S=[],V=[];for(let ae=0;ae<=H;ae++){const ne=ae*$/(a-r);if(ne>1+1e-6)break;const re=`${((k?1-ne:ne)*100).toFixed(4)}%`,ue=ne<=w+1e-6;if(ue?!b:!_)continue;const Be=ue?"var(--slider-tick-color-on-fill, var(--color-deepWhite))":"var(--slider-tick-color, var(--color-lightGray))";R.push(K(Be)),S.push(k?`${L} var(--slider-thumb)`:`var(--slider-thumb) ${L}`),V.push(k?`center ${re}`:`${re} center`)}R.push(k?"linear-gradient(to top, var(--slider-fill-color) var(--slider-fill), var(--color-darkWhite) var(--slider-fill))":"linear-gradient(to right, var(--slider-fill-color) var(--slider-fill), var(--color-darkWhite) var(--slider-fill))"),S.push("100% 100%"),V.push("0 0"),j.backgroundImage=R.join(", "),j.backgroundSize=S.join(", "),j.backgroundPosition=V.join(", "),j.backgroundRepeat="no-repeat"}const F=m?m(f):d==="percent"?`${Math.round(a>r?(f-r)/(a-r)*100:0)}%`:d==="count"?`${f} / ${a}`:f===r&&y?y:f===a&&v?v:void 0,U=n.jsx("input",{type:"range",className:xe("slider",`slider--${l}`,E&&"slider--static",!d&&!g&&h),min:r,max:a,step:s,value:f,disabled:u,readOnly:E,tabIndex:E?-1:void 0,"aria-label":c,"aria-valuetext":F,"aria-orientation":l,onChange:A,style:j});if(!d&&!g)return U;const T=n.jsx("span",{className:"slider-wrap__minmax caption-1",children:y??r}),I=n.jsx("span",{className:"slider-wrap__minmax caption-1",children:v??a}),z=g?n.jsxs("div",{className:xe("slider-track-group",`slider-track-group--${l}`,!d&&h),children:[k?I:T,U,k?T:I]}):U;if(!d)return z;const ie=C??(k?"bottom":"right"),te=`${Math.round(a>r?(f-r)/(a-r)*100:0)}%`,P=m?m(f):d==="percent"?te:d==="count"?`${f} / ${a}`:String(f),G=n.jsx("span",{className:"slider-wrap__value body-3b",children:P});return n.jsxs("div",{className:xe("slider-wrap",`slider-wrap--${l}`,`slider-wrap--label-${ie}`,`slider-wrap--align-${x}`,h),children:[z,G]})}const i_=.86,u_=250,js=(e,t,r,a)=>Math.round(Math.min(a,Math.max(r,e-t))),Ds=(e,t,r,a)=>{const s=js(e,t,r,a);return`${s<0?"-":"+"}${Math.abs(s)} dB`};function Ss({analyser:e,audioElement:t,orientation:r="horizontal",length:a,label:s,labelPos:l,labelAlign:i="right",floorDb:u=-60,refDb:c=-35,displayMin:p=-5,displayMax:h=25,className:d,ariaLabel:m}){const C=o.useRef(null),x=o.useRef(null),g=o.useRef(null),y=o.useRef(null),[v,_]=o.useState(null);o.useEffect(()=>{const f=U=>{const T=Ds(U,c,p,h);g.current&&(g.current.textContent=T);const I=C.current;I&&(I.setAttribute("aria-valuenow",String(js(U,c,p,h))),I.setAttribute("aria-valuetext",T))},w=e??ub(t)??(v&&v.el===t?v.node:null),k=x.current;if(!w||!k){k?.style.setProperty("--meter-level","0"),f(u);let U=!1;return!e&&t&&_a(t).then(T=>{!U&&T&&_({el:t,node:T})}),()=>{U=!0}}jo();const E=new Float32Array(w.fftSize);let A=0,D=0,j=0,$=0,H=null;const F=U=>{const T=cb(w,E);A=T>A?T:A*i_;const I=A>1e-5?20*Math.log10(A):-1/0,z=Math.max(u,I),ie=z-c,te=Math.min(1,Math.max(0,(ie-p)/(h-p)));if(k.style.setProperty("--meter-level",te.toFixed(3)),D+=z,j+=1,U-$>=u_){const P=D/j;H=H==null?P:H*.6+P*.4,f(H),D=0,j=0,$=U}y.current=requestAnimationFrame(F)};return y.current=requestAnimationFrame(F),()=>{y.current!=null&&cancelAnimationFrame(y.current),y.current=null}},[e,t,v,u,c,p,h]);const b=typeof a=="number"?`${a}px`:a,B=n.jsx("div",{className:"audio-meter__track",style:b?r==="vertical"?{height:b}:{width:b}:{},children:n.jsx("div",{ref:x,className:"audio-meter__fill"})}),N=l??(r==="vertical"?"bottom":"right");return n.jsxs("div",{ref:C,className:xe("audio-meter",`audio-meter--${r}`,s&&`audio-meter--label-${N}`,s&&`audio-meter--align-${i}`,d),role:"meter","aria-label":m,"aria-valuemin":p,"aria-valuemax":h,"aria-valuenow":js(u,c,p,h),"aria-valuetext":Ds(u,c,p,h),children:[B,s&&n.jsx("span",{ref:g,className:"audio-meter__value caption-2",children:Ds(u,c,p,h)})]})}const ed=260;function td({message:e,position:t,duration:r,onClose:a}){const[s,l]=o.useState(!1),[i,u]=o.useState(!1),c=o.useRef(i),p=o.useRef(s);o.useEffect(()=>{c.current=i},[i]),o.useEffect(()=>{p.current=s},[s]);const h=o.useRef(null),d=o.useRef(""),m=o.useRef(a);o.useEffect(()=>{m.current=a});const C=r,x=o.useRef(null),g=o.useRef(0),y=o.useRef(0),v=o.useRef(!1),_=o.useRef(null),b=o.useRef(null),B=o.useRef(null),N=o.useRef(null),f=o.useRef(()=>{});f.current=E=>{E<0||(g.current=Date.now(),y.current=E,x.current=setTimeout(()=>{x.current=null,l(!1),_.current=setTimeout(()=>{u(!1);try{m.current()}catch{}},ed)},E))};const w=o.useCallback(()=>{v.current||!x.current||(v.current=!0,clearTimeout(x.current),x.current=null,y.current=Math.max(0,y.current-(Date.now()-g.current)))},[]),k=o.useCallback(()=>{v.current&&(v.current=!1,f.current(y.current))},[]);return o.useEffect(()=>{if(e!==d.current&&(x.current&&(clearTimeout(x.current),x.current=null),_.current&&(clearTimeout(_.current),_.current=null)),e){if(p.current)return C>0&&!x.current&&(v.current?y.current=C:f.current(C)),d.current=e,()=>{x.current&&(clearTimeout(x.current),x.current=null),_.current&&(clearTimeout(_.current),_.current=null)};const E=()=>{const A=h.current;if(A)try{A.classList.remove("is-visible"),A.style.transition="none",t==="top"?A.style.transform="translateX(-50%) translateY(-16px)":A.style.transform="translateX(-50%) translateY(16px)",A.style.opacity="0",A.offsetWidth,A.style.transition="",A.classList.add("is-visible"),N.current&&clearTimeout(N.current),N.current=setTimeout(()=>{N.current=null;try{A.style.opacity="",A.style.transform="",A.style.transition=""}catch{}},60)}catch{}};c.current?(E(),l(!0)):(u(!0),b.current=requestAnimationFrame(()=>{B.current=requestAnimationFrame(()=>{E(),l(!0)})})),C>0&&(v.current=!1,f.current(C))}else l(!1),_.current=setTimeout(()=>u(!1),ed);return d.current=e,()=>{x.current&&clearTimeout(x.current),_.current&&clearTimeout(_.current),b.current&&cancelAnimationFrame(b.current),B.current&&cancelAnimationFrame(B.current),N.current&&clearTimeout(N.current),x.current=null,_.current=null,b.current=null,B.current=null,N.current=null}},[e,C,t]),{mounted:i,showing:s,popupRef:h,pause:w,resume:k}}function Mr({message:e="",position:t="top",type:r="normal",onClose:a=()=>{},duration:s=2e3}){const{mounted:l,showing:i,popupRef:u,pause:c,resume:p}=td({message:e,position:t,duration:s,onClose:a}),h=o.useRef(null),[d,m]=o.useState(!1);if(o.useEffect(()=>{i?m(!0):l||m(!1)},[i,l]),!l)return null;const C=r==="notice"||r==="warning"?r:"normal",x=n.jsx("div",{ref:u,className:`toast toast--${t} ${i?"is-visible":""}`,role:"status","aria-live":"polite",onPointerEnter:g=>{h.current=g.pointerType},onMouseEnter:()=>{h.current!=="touch"&&c()},onMouseLeave:p,onFocusCapture:c,onBlurCapture:p,children:n.jsx("div",{className:`toast__inner toast__inner--${C} body-2`,"aria-hidden":d||i?void 0:!0,children:n.jsx("span",{className:"toast__text",children:e})})});return typeof document<"u"?bn.createPortal(x,document.body):x}const c_=24;function d_({value:e,max:t=100,size:r=8,color:a,trackColor:s,label:l,formatValue:i,labelPos:u,labelAlign:c="right",ariaLabel:p,className:h}){const d=Number.isFinite(t)&&t>0?t:1,m=Math.max(0,Math.min(Number.isFinite(e)?e:0,d)),C=m/d*100,x=Number.isFinite(t)&&t>0?t:0,g=u??(r>=c_?"inside":"bottom"),y=g==="center"?"inside":g,v=y==="inside"&&(c==="left"?C>=15:c==="center"?C>=50:C>=85),_={};return a&&(_["--progress-bar-fill"]=a),s&&(_["--progress-bar-track"]=s),n.jsxs("div",{className:xe("progress-bar",`progress-bar--${r}`,`progress-bar--label-${y}`,l&&`progress-bar--align-${c}`,l&&v&&"progress-bar--label-on-fill",h),style:_,children:[n.jsx("div",{className:"progress-bar__track",role:"progressbar","aria-valuenow":m,"aria-valuemin":0,"aria-valuemax":x,"aria-valuetext":l?i?i(m):l==="percent"?void 0:l==="raw"?String(m):`${m} / ${x}`:void 0,"aria-label":p,children:n.jsx("div",{className:"progress-bar__fill",style:{width:`${C}%`}})}),l&&n.jsx("span",{className:"progress-bar__label caption-1b",children:i?i(m):l==="percent"?`${Math.round(C)}%`:l==="raw"?String(m):`${m} / ${x}`})]})}const nd={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0},p_="rgba(255, 255, 255, 0.16)";function rd({max:e,index:t,inactiveBg:r,inactiveColor:a,transparent:s,variant:l="numbered",announce:i=!1,ariaLabel:u}){const{t:c}=Ne.useTranslation(),p=Bn("(max-width: 767px)");if(!Number.isInteger(e)||e<=0)return null;const h=Number.isInteger(t)?Math.max(0,Math.min(t,e-1)):0,d=u??c("progress.steps",{current:h+1,total:e,defaultValue:"\uC9C4\uD589 \uB2E8\uACC4 {{current}} / {{total}}"}),m={};if(r&&(m["--pi-inactive-bg"]=r),a&&(m["--pi-inactive-color"]=a),s&&(r||(m["--pi-inactive-bg"]=p_),a||(m["--pi-inactive-color"]="var(--color-white)")),l==="dot")return n.jsxs("div",{className:"progress-indicator progress-indicator--dot",style:m,role:i?"status":"img","aria-label":i?void 0:d,children:[i&&n.jsx("span",{style:nd,children:d}),Array.from({length:e}).map((x,g)=>n.jsx("span",{"aria-hidden":"true",className:`progress-indicator-dot--dot${g<h?" done":g===h?" active":""}`},g))]});const C=i?n.jsx("span",{role:"status",style:nd,children:d}):null;return p?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"progress-indicator progress-indicator--mobile",style:m,role:"list","aria-label":d,children:n.jsxs("span",{role:"listitem",className:"progress-indicator-dot active body-3",children:[h+1," / ",e]})}),C]}):n.jsxs(n.Fragment,{children:[C,n.jsx("div",{className:"progress-indicator",style:m,role:"list","aria-label":d,children:Array.from({length:e}).map((x,g)=>n.jsx("span",{role:"listitem","aria-current":g===h?"step":void 0,className:`progress-indicator-dot ${g<h?" done":g===h?" active":""} body-3`,children:g+1},g))})]})}function h_(e){if(!e)return[];const t=[];let r=0,a="";for(const s of e.trim()){if(s==="("?r++:s===")"&&r--,/\s/.test(s)&&r===0){a&&(t.push(a),a="");continue}a+=s}return a&&t.push(a),t}function m_(e,t,r=0){const a=Array.from({length:Math.max(0,t)},()=>0);for(const s of e){let l=0;for(const i of s){if(l>=a.length)break;const u=ad(i.span),c=Math.min(u,a.length-l);if(c===1)a[l]=Math.max(a[l],i.width);else{const p=Math.max(0,(i.width-r*(c-1))/c);for(let h=l;h<l+c;h++)a[h]=Math.max(a[h],p)}l+=c}}return a}function ad(e){const t=typeof e=="number"?e:parseInt(String(e??""),10);return Number.isFinite(t)&&t>=1?Math.floor(t):1}function f_(e,t){const r=/span\s+(\d+)/.exec(`${e??""} ${t??""}`);return r?ad(parseInt(r[1],10)):1}function C_(e,t){const{isFixed:r,floorOf:a,containerWidth:s}=t;if(!(s>0))return!1;const l=e.reduce((i,u,c)=>i+(r(c)?u:0),0);return e.reduce((i,u,c)=>i+(r(c)?0:a(c)),0)>s-l}function g_(e,t){const{isFixed:r,floorOf:a,containerWidth:s}=t,l=e.reduce((d,m,C)=>d+(r(C)?m:0),0),i=e.reduce((d,m,C)=>d+(r(C)?0:m),0),u=s-l;if(!(s>0&&i>0&&u>0))return[...e];const c=u/i,p=e.map((d,m)=>r(m)?d:Math.max(a(m),Math.round(d*c))),h=Math.round(u-p.reduce((d,m,C)=>d+(r(C)?0:m),0));if(h!==0){let d=-1;p.forEach((m,C)=>{!r(C)&&(d<0||m>p[d])&&(d=C)}),d>=0&&(p[d]=Math.max(a(d),p[d]+h))}return p}const b_=16;function y_(e,t=b_){return e.map(r=>{const a=r.sortable&&!r.sorted;return Math.max(r.declaredMin,Math.ceil(r.headWidth+(a?t:0)))})}const od="declared";function v_({children:e,className:t,style:r,span:a,rowLabel:s,onRowClick:l}){const i=a&&a>1?{gridColumn:`span ${a}`,...r}:r;return n.jsx("div",{role:"cell",className:t?`table-cell ${t}`:"table-cell",style:i,"aria-colspan":a&&a>1?a:void 0,children:s&&l?n.jsx("button",{type:"button",className:"table-cell__row-button","aria-label":s,children:e}):e})}function Ts({variant:e="default",children:t,className:r,draggable:a,onClick:s,onMouseEnter:l,onMouseLeave:i,onDragStart:u,onDragEnd:c,expandedContent:p,colSpan:h,describedBy:d,rowHasButton:m}){const C=o.useCallback(x=>{s&&x.target===x.currentTarget&&(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),s())},[s]);return e==="loading"?n.jsx("div",{role:"presentation",className:"table-row-wrap",children:n.jsx("div",{role:"row",className:"table-row table-row--loading",children:n.jsx("div",{role:"cell","aria-colspan":h,className:"table-row__full-cell",children:n.jsx(Nr,{size:28})})})}):e==="empty"?n.jsx("div",{role:"presentation",className:"table-row-wrap",children:n.jsx("div",{role:"row",className:"table-row table-row--empty body-3",children:n.jsx("div",{role:"cell","aria-colspan":h,className:"table-row__full-cell",children:t})})}):n.jsxs("div",{role:"presentation",className:"table-row-wrap",children:[n.jsx("div",{className:r?`table-row ${r}`:"table-row",draggable:a,onClick:s,onKeyDown:s?C:void 0,onMouseEnter:l,onMouseLeave:i,onDragStart:u,onDragEnd:c,role:"row",tabIndex:s&&!m?0:void 0,"aria-describedby":s&&!m?d:void 0,children:t}),p&&n.jsx("div",{role:"row",className:"table-row-expand",children:n.jsx("div",{role:"cell","aria-colspan":h,className:"table-row-expand__cell",children:p})})]})}function x_({dir:e}){return n.jsx(e==="asc"?Rl:Ll,{className:"table-field__sort-arrow",size:16,strokeWidth:2})}function __({children:e,onClick:t,className:r,sortDir:a,ariaSort:s,onResizeStart:l}){const i=n.jsxs(n.Fragment,{children:[e,a&&n.jsx(x_,{dir:a})]});return n.jsxs("div",{onClick:t,role:"columnheader","aria-sort":s,className:xe("table-field body-3",r,a?"table-field--sorted":"",l?"table-field--resizable":""),children:[t?n.jsx("button",{type:"button",className:"table-field__button",children:i}):i,l&&n.jsx("span",{className:"table-field__resizer",onPointerDown:l,onClick:u=>u.stopPropagation(),"aria-hidden":"true"})]})}function sd(e){return e&&e!=="left"?`table-col--${e}`:void 0}function Ms({fields:e=[],sort:t,sortable:r=!0,headerGroups:a,items:s=[],renderRow:l,onRowClick:i,isRowClickable:u,onRowMouseEnter:c,onRowMouseLeave:p,onRowDragStart:h,onRowDragEnd:d,draggingId:m,gridTemplateColumns:C,mobileGridTemplateColumns:x,resizable:g=!0,resizeMode:y="grow",resizeStorageKey:v,refitOn:_,title:b,icon:B,count:N,collapsed:f=!1,onToggleCollapse:w,headerActions:k,empty:E,loading:A,dragOver:D=!1,onDragOver:j,onDragLeave:$,onDrop:H,renderExpandedRow:F,expandedId:U}){const T=fn,{t:I}=Ne.useTranslation(),z=o.useId(),ie=`table-title-${z}`,te=`table-row-hint-${z}`,[P,G]=o.useState(null),X=o.useCallback((Q,fe=0)=>{if(!(Q==null||typeof Q=="boolean")){if(typeof Q=="string"||typeof Q=="number")return String(Q);if(!(fe>6)){if(Array.isArray(Q)){const Ge=Q.map(Ye=>X(Ye,fe+1)).filter(Boolean);return Ge.length?Ge.join(""):void 0}if(o.isValidElement(Q))return X(Q.props.children,fe+1)}}},[]),K=o.useCallback((Q,fe)=>{const Ge=e[fe];if(!Ge)return;if(Ge.sortValue)return Ge.sortValue(Q);if(Ge.sortKey)return Q[Ge.sortKey];const Ye=l(Q)[fe]?.content;return typeof Ye=="string"||typeof Ye=="number"?Ye:X(Ye)},[e,l,X]),L=!t&&r&&!e.some(Q=>Q.sortDir!==void 0||Q.onClick),R=o.useCallback(Q=>{const fe=e[Q];if(!fe||fe.sortable===!1)return!1;if(fe.sortValue||fe.sortKey)return!0;const Ge=s[0];return Ge!==void 0&&K(Ge,Q)!==void 0},[e,s,K]);o.useEffect(()=>{if(!L||s.length===0)return;const Q=e.filter((fe,Ge)=>fe.sortable!==!1&&!R(Ge));Q.length!==0&&Tt(`Table/sort-mute/${Q.map(fe=>String(fe.label??"?")).join(",")}`,`[ihab/Table] \uC815\uB82C\uC5D0\uC11C \uBE60\uC9C4 \uC5F4\uC774 \uC788\uC2B5\uB2C8\uB2E4: ${Q.map(fe=>`'${String(fe.label??"?")}'`).join(" \xB7 ")}`,`
849
- \uCE78\uC5D0 \uAE00\uC790\uAC00 \uC5C6\uC5B4(\uB124\uBAA8\xB7\uADF8\uB9BC\xB7\uB2E8\uCD94 \uAC19\uC740 \uB9C8\uB514) \uBB34\uC5C7\uC73C\uB85C \uC138\uC6B8\uC9C0 \uC54C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.`,"\n\uADF8 \uC5F4\uC758 `sortValue` \uB97C \uC8FC\uC138\uC694 \u2014 \uC608: `sortValue: (w) => !!w.image`.","\n\uC77C\uBD80\uB7EC \uC548 \uC138\uC6B0\uB294 \uC5F4\uC774\uBA74 `sortable: false` \uB97C \uC801\uC73C\uBA74 \uC774 \uC54C\uB9BC\uC774 \uBA4E\uC2B5\uB2C8\uB2E4.")},[L,e,s,R]);const S=o.useMemo(()=>t?e.map(Q=>{if(!Q.sortKey||Q.sortDir!==void 0)return Q;const fe=t.field(String(Q.label??""),Q.sortKey);return{...Q,sortDir:fe.sortDir,onClick:Q.onClick??fe.onClick}}):L?e.map((Q,fe)=>R(fe)?{...Q,sortDir:P?.index===fe?P.asc?"asc":"desc":null,onClick:()=>G(Ge=>Ge?.index===fe?{index:fe,asc:!Ge.asc}:{index:fe,asc:!0})}:Q):e,[e,t,L,P,R]),V=o.useMemo(()=>{if(!L||!P)return s;const{index:Q,asc:fe}=P;return[...s].sort((Ge,Ye)=>Pa(K(Ge,Q),K(Ye,Q),fe))},[s,L,P,K]),ae=Bn("(max-width: 767px)"),ne=x&&ae?x:null,re=g&&!ae,ue=o.useRef(re);ue.current=re;const Be=48,le=40,J=o.useRef(()=>Be),O=o.useRef(null),W=v?`table-cols:${v}`:null,q=o.useRef(null),oe=o.useRef(null),ee=o.useRef(null),be=o.useRef(null),[je,De]=o.useState(!1),[we,ze]=o.useState(0),ye=o.useCallback(()=>{const Q=ee.current;if(!Q)return;const fe=be.current,Ge=q.current;if(fe&&(fe.style.minWidth="",Ge)){const Ye=Ge.scrollWidth,at=ue.current?le:0;fe.style.minWidth=Ye>Q.clientWidth+1?`${Ye+at}px`:""}De(Q.scrollWidth>Q.clientWidth+1),ze(Q.clientWidth),Q.scrollWidth>Q.clientWidth+1?Q.style.setProperty("--table-visible-w",`${Q.clientWidth}px`):Q.style.removeProperty("--table-visible-w")},[]),_e=o.useCallback((Q,fe)=>{const Ge=Q.current;Ge&&oe.current&&oe.current.unobserve(Ge),Q.current=fe,fe?(!oe.current&&typeof ResizeObserver<"u"&&(oe.current=new ResizeObserver(()=>ye())),oe.current?.observe(fe)):!ee.current&&!be.current&&(oe.current?.disconnect(),oe.current=null),ye()},[ye]),ve=o.useCallback(Q=>_e(ee,Q),[_e]),Ee=o.useCallback(Q=>_e(be,Q),[_e]);o.useEffect(()=>{ye()}),o.useEffect(()=>{if(typeof window>"u")return;const Q=typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>ye()):null;return window.addEventListener("resize",ye),()=>{Q!=null&&cancelAnimationFrame(Q),window.removeEventListener("resize",ye)}},[ye]);const Oe=o.useRef(()=>!1),ot=o.useRef([]),it=o.useRef(null),Fe=Q=>{if(!Q||typeof window>"u")return null;try{const fe=JSON.parse(window.localStorage.getItem(Q)??"null");return Array.isArray(fe)&&fe.length>0&&fe.every(Ge=>typeof Ge=="number"&&Number.isFinite(Ge)&&Ge>0)?fe:null}catch{return null}},[Ue,nt]=o.useState(()=>Fe(W)),[Te,Xe]=o.useState(W),[rt,ut]=o.useState(()=>Fe(W)!==null);if(Te!==W){Xe(W);const Q=Fe(W);nt(Q),ut(Q!==null)}const gt=o.useRef(Ue);o.useEffect(()=>{gt.current=Ue},[Ue]);const _t=o.useCallback(Q=>{const fe=it.current;if(!fe)return;const Ge=gt.current;if(Ge){const Ye=[...Ge],at=()=>Be;if(fe.next!=null&&fe.startWNext!=null){const mt=Q.clientX-fe.startX,Mt=Math.max(at()-fe.startW,Math.min(fe.startWNext-at(),mt));Ye[fe.index]=fe.startW+Mt,Ye[fe.next]=fe.startWNext-Mt}else Ye[fe.index]=Math.max(at(),fe.startW+(Q.clientX-fe.startX));gt.current=Ye,nt(Ye)}},[]),pt=o.useCallback(()=>{if(it.current=null,window.removeEventListener("pointermove",_t),window.removeEventListener("pointerup",pt),window.removeEventListener("pointercancel",pt),document.body.style.cursor="",document.body.style.userSelect="",W&&gt.current)try{window.localStorage.setItem(W,JSON.stringify(gt.current))}catch{}},[_t,W]),Yt=o.useCallback((Q,fe)=>{fe.preventDefault(),fe.stopPropagation();const Ge=q.current;if(!Ge)return;const Ye=Array.from(Ge.children).map(mt=>mt.getBoundingClientRect().width),at=y==="fit"?S.findIndex((mt,Mt)=>Mt>Q&&mt.resizable!==!1):-1;it.current=at>=0?{index:Q,startX:fe.clientX,startW:Ye[Q],next:at,startWNext:Ye[at]}:{index:Q,startX:fe.clientX,startW:Ye[Q]},gt.current=Ye,nt(Ye),ut(!0),window.addEventListener("pointermove",_t),window.addEventListener("pointerup",pt),window.addEventListener("pointercancel",pt),document.body.style.cursor="col-resize",document.body.style.userSelect="none"},[_t,pt,y,S]),kt=o.useCallback(()=>{const Q=q.current,fe=Q?.closest(".table-wrap");if(!Q||!fe)return null;const Ge=fe.style.getPropertyValue("--table-grid-cols");fe.style.setProperty("--table-grid-cols",S.map(()=>"max-content").join(" "));const Ye=Array.from(fe.querySelectorAll(".table-row")).filter(Rt=>!Rt.classList.contains("table-row--loading")&&!Rt.classList.contains("table-row--empty")),at=Rt=>Array.from(Rt.children).map(Dt=>{const Ut=window.getComputedStyle(Dt);return{width:Dt.getBoundingClientRect().width,span:f_(Ut.gridColumnStart,Ut.gridColumnEnd)}}),mt=parseFloat(window.getComputedStyle(Q).columnGap)||0,Mt=Ye.map(at),Ot=at(Q),Tn=m_([Ot,...Mt],S.length,mt),Xt=y_(S.map((Rt,Dt)=>({declaredMin:J.current(Dt),headWidth:Ot[Dt]?.width??0,sortable:Rt.sortDir!==void 0||!!Rt.onClick,sorted:!!Rt.sortDir}))),Mn=Rt=>Xt[Rt]??J.current(Rt);O.current=Xt;const dn=S.map((Rt,Dt)=>{const Ut=Tn[Dt],zt=Oe.current(Dt)?parseFloat(ot.current[Dt]):NaN;return Number.isFinite(zt)&&Math.ceil(Ut)>zt&&Tt(`table-fixed-col-overflow:${Dt}:${zt}`,`[ihabdevteam-core] Table \uC758 ${Dt+1}\uBC88\uC9F8 \uC5F4\uC744 ${zt}px \uB85C \uC815\uD574 \uB450\uC5C8\uB294\uB370 \uC548\uC758 \uB0B4\uC6A9\uC740 ${Math.ceil(Ut)}px \uAC00 \uD544\uC694\uD569\uB2C8\uB2E4 \u2014 \uADF8\uB9CC\uD07C \uC798\uB824 \uB098\uAC11\uB2C8\uB2E4. gridTemplateColumns(\uB610\uB294 fields[].width)\uC758 \uADF8 \uC5F4\uC744 ${Math.ceil(Ut)}px \uC774\uC0C1\uC73C\uB85C \uB298\uB9AC\uC138\uC694.`),Number.isFinite(zt)?zt:Math.max(J.current(Dt),Math.ceil(Ut))}),Jt=window.getComputedStyle(Q),en=(parseFloat(Jt.paddingLeft)||0)+(parseFloat(Jt.paddingRight)||0),gn=fe.clientWidth-en;Ge?fe.style.setProperty("--table-grid-cols",Ge):fe.style.removeProperty("--table-grid-cols");const tn={isFixed:Rt=>Oe.current(Rt),floorOf:Mn,containerWidth:gn};return C_(dn,tn)?od:g_(dn,tn)},[S,y]),ct=(Q,fe)=>Q!==null&&Q.length===fe.length&&Q.every((Ge,Ye)=>Ge===fe[Ye]),Ae=o.useRef(kt);o.useEffect(()=>{Ae.current=kt});const[st,ft]=o.useState(0),Ct=V.length>0,Nt=`${W??""}|${st}|${S.length}|${we}|${_??""}`,Ft=!rt&&re&&W!==null&&!A?`${Nt}|${Ct?1:0}`:null,yt=o.useRef(null);o.useEffect(()=>{if(Ft===null||!Ct||yt.current===Nt)return;const Q=Ae.current();if(Q!==null){if(yt.current=Nt,Q===od){nt(null);return}nt(fe=>ct(fe,Q)?fe:Q)}},[Ft]);const vt=o.useCallback(()=>{if(W)try{window.localStorage.removeItem(W)}catch{}ut(!1);const Q=Ae.current(),fe=Array.isArray(Q)?Q:null;nt(fe),gt.current=fe,ft(Ge=>Ge+1)},[W]);o.useEffect(()=>()=>{it.current&&(window.removeEventListener("pointermove",_t),window.removeEventListener("pointerup",pt),window.removeEventListener("pointercancel",pt),document.body.style.cursor="",document.body.style.userSelect="")},[_t,pt]);const Et=S.length>0&&S.every(Q=>Q.width!=null)?S.map(Q=>typeof Q.width=="number"?`${Q.width}px`:String(Q.width)).join(" "):null;S.some(Q=>Q.width!=null)&&!Et&&Tt(`table-field-width:${S.map(Q=>Q.width==null?"-":"w").join("")}`,"[ihabdevteam-core] Table \uC758 fields \uC911 \uC77C\uBD80\uC5D0\uB9CC width \uAC00 \uC788\uC2B5\uB2C8\uB2E4. **\uBAA8\uB4E0 \uC5F4\uC5D0 \uC801\uC5B4\uC57C** \uC4F0\uC785\uB2C8\uB2E4 \u2014 \uC9C0\uAE08\uC740 gridTemplateColumns \uB97C \uC501\uB2C8\uB2E4. \uD55C \uC5F4\uB9CC \uACE0\uC815\uD558\uACE0 \uC2F6\uC73C\uBA74 \uB098\uBA38\uC9C0\uC5D0 `minmax(0, 1fr)` \uCC98\uB7FC \uC801\uC5B4 \uC8FC\uC138\uC694."),Et&&C&&Tt("table-field-width-conflict","[ihabdevteam-core] Table \uC5D0 fields[].width \uC640 gridTemplateColumns \uAC00 \uB458 \uB2E4 \uC788\uC2B5\uB2C8\uB2E4. gridTemplateColumns \uAC00 \uC774\uAE41\uB2C8\uB2E4 \u2014 \uD55C\uCABD\uB9CC \uB450\uC138\uC694.");const It=C??Et??void 0,Je=h_(It),At=Je.filter(Q=>/\b(auto|min-content|max-content)\b|fit-content\(/.test(Q));At.length>0&&Tt(`table-content-track:${C}`,`[ihabdevteam-core] Table \uC758 gridTemplateColumns \uC5D0 \uB0B4\uC6A9\uC73C\uB85C \uD06C\uAE30\uAC00 \uC815\uD574\uC9C0\uB294 \uD2B8\uB799(${At.join(", ")})\uC774 \uC788\uC2B5\uB2C8\uB2E4. \uBA38\uB9AC\uC640 \uBAB8\uD1B5\uC740 \uC11C\uB85C \uB2E4\uB978 \uACA9\uC790\uB77C \uADF8 \uD2B8\uB799\uC774 \uAC01\uC790 \uB2E4\uB974\uAC8C \uD480\uB824 \uC5F4\uC774 \uC5B4\uAE0B\uB0A9\uB2C8\uB2E4. px \uC774\uB098 fr \uC744 \uC4F0\uC138\uC694. (\uBC1B\uC740 \uAC12: ${C})`);const Qe=S.findIndex(Q=>!!Q.sortDir);S.filter(Q=>!!Q.sortDir).length>1&&Tt("table-multi-sort","[ihabdevteam-core] Table \uC758 fields \uC5D0 sortDir \uC774 \uB458 \uC774\uC0C1 \uC788\uC2B5\uB2C8\uB2E4. aria-sort \uB294 \uD45C \uD558\uB098\uC5D0 \uD55C \uCE78\uB9CC \uAC00\uC9C8 \uC218 \uC788\uC5B4 \uCCAB \uCE78\uB9CC \uBC29\uD5A5\uC73C\uB85C \uC54C\uB9AC\uACE0 \uB098\uBA38\uC9C0\uB294 none \uC73C\uB85C \uB461\uB2C8\uB2E4.");const he=Q=>Q===Qe?S[Q].sortDir==="asc"?"ascending":"descending":S[Q].onClick?"none":void 0,Le=Q=>/^\d+(\.\d+)?px$/.test(Je[Q]??""),Pe=Q=>{const fe=Je[Q]??"",Ge=/^minmax\(\s*(\d+(?:\.\d+)?)px\s*,/.exec(fe)??/^(\d+(?:\.\d+)?)px$/.exec(fe);return Ge?parseFloat(Ge[1]):Be};Oe.current=Le,J.current=Pe,ot.current=Je;const We=Q=>y==="fit"&&!Le(Q)?"fr":"px",dt=Ue&&Ue.length===S.length&&!ae,on=y==="fit"&&!rt,ht=(Q,fe)=>{if(Q.resizable===!1&&Je[fe])return Je[fe];const Ge=Ue[fe];if(We(fe)!=="fr"||!on)return`${Ge}${We(fe)}`;const Ye=Math.min(Math.max(Pe(fe),O.current?.[fe]??0),Ge);return Ye>0?`minmax(${Ye}px, ${Ge}fr)`:`${Ge}fr`},Ke=ne??(dt?S.map(ht).join(" "):It),xt=Ke?{"--table-grid-cols":Ke}:void 0,jt=b!==void 0;return n.jsx(Xo.Provider,{value:fn,children:n.jsxs("div",{ref:ve,className:`table-wrap${re?" table-wrap--resizable":""}${D?" table-wrap--dragover":""}${f?" table-wrap--collapsed":""}`,style:xt,onDragOver:j,onDragLeave:$,onDrop:H,tabIndex:je?0:void 0,role:je?"region":void 0,"aria-label":je?typeof b=="string"?b:I("table.scrollRegion","\uAC00\uB85C\uB85C \uAD74\uB9B4 \uC218 \uC788\uB294 \uD45C"):void 0,children:[!!i&&n.jsx("span",{id:te,className:"table-row-hint",children:I("table.rowActionHint","\uC904\uC744 \uB204\uB974\uBA74 \uC790\uC138\uD788 \uBD05\uB2C8\uB2E4")}),n.jsxs("div",{ref:Ee,role:"table","aria-labelledby":jt&&typeof b=="string"?ie:void 0,className:"table body-2",children:[jt&&n.jsxs("div",{className:xe("table-header",w&&"table-header--clickable"),onClick:w,role:"caption",children:[w&&n.jsx(me,{htmlType:"button",size:T,type:"dot",variant:"transparent-gray",useBorder:!1,icon:f?"chevron-right":"chevron-down",ariaLabel:f?I("common.expand","\uD3BC\uCE58\uAE30"):I("common.collapse","\uC811\uAE30"),ariaExpanded:!f,className:"table-header__chevron"}),B&&n.jsx(lt,{icon:B,label:typeof b=="string"?b:void 0,className:"table-header__icon"}),n.jsx("span",{id:ie,className:"table-header__title h5b",children:b}),N!==void 0&&n.jsx("span",{className:"table-header__count body-3b",children:N}),k&&n.jsx("span",{className:"table-header__actions",onClick:Q=>Q.stopPropagation(),children:k})]}),!f&&n.jsxs(n.Fragment,{children:[a&&a.length>0&&n.jsx("div",{role:"row",className:"table-fields table-fields--groups",children:a.map((Q,fe)=>n.jsx("div",{role:"columnheader","aria-colspan":Q.span,className:xe("table-field body-3",Q.className),style:{gridColumn:`span ${Q.span}`},children:Q.label},fe))}),n.jsxs("div",{role:"presentation",className:xe("table-fields-strip",re&&"table-fields-strip--resizable"),children:[n.jsx("div",{role:"row",className:"table-fields",ref:q,children:S.map((Q,fe)=>n.jsx(__,{onClick:Q.onClick,className:xe(Q.className,sd(Q.align)),sortDir:Q.sortDir,ariaSort:he(fe),onResizeStart:re&&fe<S.length-1&&Q.resizable!==!1&&(y!=="fit"||S.some((Ge,Ye)=>Ye>fe&&Ge.resizable!==!1))?Ge=>Yt(fe,Ge):void 0,children:Q.label},fe))}),re&&n.jsx("div",{className:"table-fields__reset-dock",children:n.jsx(me,{htmlType:"button",size:T,type:"dot",variant:"transparent-gray",useBorder:!1,icon:"chevrons-left-right-ellipsis",ariaLabel:I("table.resetColumns","\uCE78 \uB108\uBE44 \uCD08\uAE30\uD654"),showTooltipInfo:I("table.resetColumns","\uCE78 \uB108\uBE44 \uCD08\uAE30\uD654"),className:"table-fields__reset",onClick:vt})})]}),n.jsx("div",{role:"rowgroup",className:"table-body",children:A?n.jsx(Ts,{variant:"loading",colSpan:S.length||void 0}):V.length===0&&E?n.jsx(Ts,{variant:"empty",colSpan:S.length||void 0,children:E}):V.map((Q,fe)=>{const Ge=m!=null&&Q.id===m,Ye=!!i&&(u?u(Q):!0),at=U!=null&&Q.id!=null&&(U instanceof Set?U.has(Q.id)||[...U].some(mt=>String(mt)===String(Q.id)):String(Q.id)===String(U));return n.jsx(Ts,{className:`${Ye?" table-row--clickable":""}${h?" table-row--draggable":""}${Ge?" table-row--dragging":""}`.trim(),draggable:!!h,onClick:Ye?()=>i(Q):void 0,colSpan:S.length||void 0,rowHasButton:l(Q).some(mt=>!!mt.rowLabel),describedBy:te,onMouseEnter:c?mt=>c(Q,mt):void 0,onMouseLeave:p?mt=>p(Q,mt):void 0,onDragStart:h?mt=>h(Q,mt):void 0,onDragEnd:d?mt=>d(Q,mt):void 0,expandedContent:at&&F?F(Q):void 0,children:l(Q).map((mt,Mt)=>n.jsx(v_,{className:xe(mt.className,sd(S[Mt]?.align)),style:mt.style,span:mt.span,rowLabel:Ye?mt.rowLabel:void 0,onRowClick:Ye?()=>i(Q):void 0,children:mt.content},Mt))},Q.id!=null?`${typeof Q.id}:${Q.id}`:`__idx:${fe}`)})})]})]})]})})}function ld(e,t){return t!=="wornAt"?String(e[t]??""):Gx(e.wornYear,e.wornMonth,e.wornDay)}function w_({rows:e,loading:t,onSelect:r,onDelete:a,onWear:s,onRelease:l,onAdd:i}){const{t:u,i18n:c}=Ne.useTranslation(),p=y=>y==="left"?u("device.direction.left","\uC88C"):u("device.direction.right","\uC6B0"),{sort:h,field:d}=ov(),m=o.useMemo(()=>{if(!h)return e;const{key:y,asc:v}=h;return[...e].sort((_,b)=>{if(y==="worn"){const B=Number(b.worn)-Number(_.worn);return v?B:-B}return Pa(ld(_,y),ld(b,y),v)})},[e,h]),{pageRows:C,pageSizeProps:x,paginationProps:g}=av(m,h);return n.jsxs("div",{className:"dlp-side-table",children:[n.jsx(ws,{count:{value:e.length,unit:u("customers.device.unit","\uAC1C")},pageSize:x,pagination:g,actions:i&&n.jsx(me,{htmlType:"button",size:40,type:"bar",variant:"main",icon:"plus",label:u("customers.device.addButton","\uAE30\uAE30 \uCD94\uAC00"),onClick:i})}),n.jsx(Ms,{loading:t,resizable:!0,resizeMode:"fit",resizeStorageKey:"customer-device-history-v2",fields:[{...d(u("customers.device.wearingNow","\uCC29\uC6A9"),"worn"),resizable:!1},d(u("device.direction.label","\uBC29\uD5A5"),"side"),d(u("device.deviceType","\uC885\uB958"),"device"),d(u("device.brand","\uBE0C\uB79C\uB4DC"),"brand"),d(u("device.fitType","\uCC29\uC6A9\uD615\uD0DC"),"fitType"),d(u("device.productName","\uC81C\uD488\uBA85"),"productName"),d(u("device.wornDate","\uCC29\uC6A9\uC77C"),"wornAt"),...a?[{label:"",resizable:!1}]:[]],items:C.map((y,v)=>({id:y.id??`${y.side}-${v}`,row:y})),gridTemplateColumns:`72px 110px 120px minmax(120px, 1fr) 100px minmax(120px, 1fr) 156px${a?" 108px":""}`,renderRow:({row:y})=>[{content:n.jsx("span",{className:"dlp-worn-check",onClick:v=>v.stopPropagation(),children:n.jsx(xs,{checked:y.worn,disabled:y.worn?!l:!s,ariaLabel:y.worn?u("customers.device.unwear","\uCC29\uC6A9 \uD574\uC81C"):u("customers.device.wear","\uCC29\uC6A9"),onChange:v=>{v?s?.(y):l?.(y)}})})},{content:n.jsx("span",{children:p(y.side)})},{content:y.device?n.jsx(cn,{size:"small",variant:vc(y.device),fill:"soft",label:xc(y.device,u)}):n.jsx("span",{})},{content:n.jsx("span",{children:y.brand})},{content:n.jsx("span",{children:y.fitType||"-"})},{content:n.jsx("span",{children:y.productName||"-"})},{content:n.jsx("span",{className:"dlp-date",children:ms(y.wornYear,y.wornMonth,y.wornDay,c.language)||"-"})},...a?[{content:n.jsx("span",{className:"dlp-row-actions",children:n.jsx(me,{htmlType:"button",size:28,type:"bar",variant:"transparent-gray",label:u("common.delete","\uC0AD\uC81C"),onClick:v=>{v?.stopPropagation(),a(y)}})})}]:[]],onRowClick:({row:y})=>r(y),empty:u("customers.device.historyEmpty","\uB4F1\uB85D\uB41C \uAE30\uAE30 \uC774\uB825\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.")})]})}function id(e,t){return e?{role:t?.role??"button",tabIndex:0,...t?.selected===void 0?{}:{"aria-selected":t.selected},onKeyDown:r=>{r.target===r.currentTarget&&(r.key!=="Enter"&&r.key!==" "||(r.preventDefault(),e(r)))}}:{}}function B_(e,t){return new Date(e,t+1,0).getDate()}function k_(e,t){return new Date(e,t,1).getDay()}function A_({visits:e=[],onVisitClick:t,onVisitMove:r,onDayClick:a,today:s}){const{t:l,i18n:i}=Ne.useTranslation(),u=o.useMemo(()=>l("calendar.dow",{returnObjects:!0}),[l]),c=Aa(s),[p,h]=o.useState(()=>Number(c.slice(0,4))),[d,m]=o.useState(()=>Number(c.slice(5,7))-1),[C,x]=o.useState(null),g=o.useRef(null),y=o.useMemo(()=>{const f={};return e.forEach(w=>{f[w.date]||(f[w.date]=[]),f[w.date].push(w)}),f},[e]),v=o.useMemo(()=>{const f=B_(p,d),w=k_(p,d),k=[];for(let E=0;E<w;E++)k.push(null);for(let E=1;E<=f;E++)k.push(E);for(;k.length<35;)k.push(null);return k},[p,d]),_=o.useCallback(()=>{d===0?(h(f=>f-1),m(11)):m(f=>f-1)},[d]),b=o.useCallback(()=>{d===11?(h(f=>f+1),m(0)):m(f=>f+1)},[d]),B=f=>`${p}-${String(d+1).padStart(2,"0")}-${String(f).padStart(2,"0")}`,N=f=>B(f)===c;return n.jsxs("div",{children:[n.jsxs("div",{className:"calendar-nav",children:[n.jsx("button",{type:"button",className:"calendar-nav__button",onClick:_,"aria-label":l("calendar.prevMonth","\uC774\uC804 \uB2EC"),children:n.jsx(lt,{icon:"chevron-left",label:"",className:"",svgClassName:"calendar-nav__button-icon",size:18})}),n.jsx("span",{className:"calendar-nav__title h5","aria-live":"polite",children:Ni(l,i.language,p,d+1)}),n.jsx("button",{type:"button",className:"calendar-nav__button",onClick:b,"aria-label":l("calendar.nextMonth","\uB2E4\uC74C \uB2EC"),children:n.jsx(lt,{icon:"chevron-right",label:"",className:"",svgClassName:"calendar-nav__button-icon",size:18})}),n.jsxs("div",{className:"calendar-nav__legend",children:[n.jsx("span",{className:"calendar-nav__legend-dot calendar-nav__legend-dot--main"}),n.jsx("span",{className:"caption-1",children:l("calendar.legend.visited","\uBC29\uBB38")}),n.jsx("span",{className:"calendar-nav__legend-dot calendar-nav__legend-dot--sub"}),n.jsx("span",{className:"caption-1",children:l("calendar.legend.scheduled","\uC608\uC57D")}),n.jsx("span",{className:"calendar-nav__legend-dot calendar-nav__legend-dot--disabled"}),n.jsx("span",{className:"caption-1",children:l("calendar.legend.noVisit","\uBBF8\uBC29\uBB38")})]})]}),n.jsxs("div",{className:"calendar-grid",children:[u.map(f=>n.jsx("div",{className:"calendar-day-header body-3",children:f},f)),v.map((f,w)=>{if(f===null)return n.jsx("div",{className:"calendar-cell empty"},`empty-${w}`);const k=f,E=B(k),A=y[E]??[],D=Ai(E,i.language),j=C===E;return n.jsxs("div",{className:`calendar-cell${N(k)?" today":""}${j?" drag-over":""}${a?" calendar-cell--clickable":""}`,role:a?"button":void 0,tabIndex:a?0:void 0,"aria-label":a?l("calendar.addOnDate",{date:E}):void 0,"aria-current":N(k)?"date":void 0,onClick:a?()=>a(E):void 0,onKeyDown:a?$=>{$.target===$.currentTarget&&($.key!=="Enter"&&$.key!==" "||($.preventDefault(),a(E)))}:void 0,onDragOver:r?$=>{$.preventDefault(),x(E)}:void 0,onDragLeave:r?$=>{$.currentTarget.contains($.relatedTarget)||x(null)}:void 0,onDrop:r?$=>{$.preventDefault(),g.current!=null&&(r(g.current,E),g.current=null),x(null)}:void 0,children:[n.jsx("div",{className:"calendar-cell__number body-3",children:k}),A.length>0&&(()=>{const $=[{key:"visited",label:l("calendar.legend.visited","\uBC29\uBB38"),count:A.filter(F=>(F.status??"visited")==="visited").length},{key:"scheduled",label:l("calendar.legend.scheduled","\uC608\uC57D"),count:A.filter(F=>F.status==="scheduled").length},{key:"noVisit",label:l("calendar.legend.noVisit","\uBBF8\uBC29\uBB38"),count:A.filter(F=>F.status==="noVisit").length}].filter(F=>F.count>0),H=$.length===1&&$[0].key==="visited"?l("calendar.visitCount",{count:A.length,defaultValue:"\uBC29\uBB38 {{count}}\uAC74"}):$.map(F=>l("calendar.statusCount",{label:F.label,count:F.count,defaultValue:"{{label}} {{count}}\uAC74"})).join(" \xB7 ");return n.jsxs("span",{className:"calendar-cell__visit-count caption-1","aria-label":`${D} ${H}`,children:[$.map(F=>n.jsx("span",{className:`calendar-cell__visit-dot calendar-cell__visit-dot--${F.key}`,"aria-hidden":"true"},F.key)),A.length]})})(),n.jsx("div",{className:"calendar-cell__badges",children:A.map(($,H)=>n.jsxs("div",{draggable:!!r,className:`calendar-visit-badge${$.status==="noVisit"?" calendar-visit-badge--no-visit":$.status==="scheduled"?" calendar-visit-badge--scheduled":""}${t?" calendar-visit-badge--clickable":""}${r?" calendar-visit-badge--draggable":""}`,onDragStart:r?F=>{g.current=$.id,F.dataTransfer.effectAllowed="move"}:void 0,onDragEnd:r?()=>{g.current=null,x(null)}:void 0,onClick:t?F=>{F.stopPropagation(),t($)}:void 0,...id(t?()=>t($):void 0),"aria-label":[D,$.time?Si($.time,l):null,$.customer,l($.status==="noVisit"?"calendar.legend.noVisit":$.status==="scheduled"?"calendar.legend.scheduled":"calendar.legend.visited")].filter(Boolean).join(" "),children:[$.time&&n.jsx("span",{className:"calendar-visit-badge__time body-3",children:Si($.time,l)}),n.jsx("span",{className:"calendar-visit-badge__name body-3",children:$.customer}),$.status==="noVisit"&&n.jsx("span",{className:"calendar-visit-badge__no-visit caption-1",children:l("calendar.legend.noVisit","\uBBF8\uBC29\uBB38")})]},$.id??H))})]},k)})]})]})}const N_={page:"h3",pagePopup:"h4",popup:"h5"};function $r({type:e="page",title:t,headingLevel:r=2,icon:a,action:s,disc:l,children:i,inGrid:u=!1,className:c,style:p}){const h=N_[e],d=t||l||s||a,m=r?`h${r}`:"div";return n.jsxs("div",{className:xe("section",`section--${e}`,u&&"section--in-grid",c),style:p,children:[d&&n.jsxs("div",{className:"section__header",children:[n.jsxs("div",{className:"section__title-row",children:[a&&n.jsx(lt,{icon:a,label:typeof t=="string"?t:void 0,className:"section__icon"}),n.jsxs("div",{className:"section__title-group",children:[t&&n.jsx(m,{className:`section__title ${h}`,children:t}),l&&n.jsx("div",{className:"section__disc body-3",children:l})]})]}),s&&n.jsx("div",{className:"section__action",children:s})]}),i]})}let $s=null,ud=!1;function cd(){if(ud||typeof document>"u")return;ud=!0,document.addEventListener("keydown",t=>{t.metaKey||t.ctrlKey||t.altKey||($s="keyboard")},!0);const e=()=>{$s="pointer"};document.addEventListener("pointerdown",e,!0),document.addEventListener("mousedown",e,!0),document.addEventListener("touchstart",e,{capture:!0,passive:!0})}cd();function Ka(){return cd(),$s==="keyboard"}const Ya=20;function E_(e){const{t}=Ne.useTranslation(),{type:r,trainingDatas:a,depth:s,renderPopup:l,completedIds:i,selectedIds:u,onItemComplete:c,size:p,useDescriptionTooltip:h,onRemove:d,onMore:m,sectionType:C="page"}=e||{},[,x]=o.useState(0),g=typeof a<"u"?Array.isArray(a)?a:[]:[],y=g.length,[v,_]=o.useState(Math.min(y,Ya)),b=o.useMemo(()=>Array.isArray(s)?[...s,r?.label].filter(Boolean).join(" \xB7 "):[s||"",r?.label].filter(Boolean).join(" \xB7 "),[s,r?.label]);o.useEffect(()=>{_(Math.min(y,Ya))},[y]),Au("speechear.data.updated",()=>x(w=>w+1));const B=o.useRef(null),N=o.useRef(null);function f(){const w=document.activeElement;N.current=Ka()&&w&&w.closest?.(".training-block__more")?v:null,_(k=>Math.min(y,k+Ya))}return o.useEffect(()=>{const w=N.current;if(w==null)return;N.current=null;const k=document.activeElement;k&&k!==document.body||B.current?.querySelectorAll(".training-block-button")[w]?.focus()},[v]),n.jsxs($r,{type:C,title:r?.label,icon:r?.icon,disc:r?.desc,className:"training-block",children:[n.jsx("div",{className:"training-list",ref:B,children:(g||[]).slice(0,v).map((w,k)=>{const E=w;return n.jsx(vs,{index:k,type:r,trainingData:E,depth:b,renderPopup:l,completedIds:i,selectedIds:u,size:p,useDescriptionTooltip:h,onRemove:typeof d=="function"&&u!=null&&E?.id!=null&&u.has(String(E.id))?()=>d(E):void 0,onComplete:typeof c=="function"&&E?.id!=null?()=>c(String(E.id)):void 0,onMore:typeof m=="function"?A=>m(E,A):void 0},E?.id!=null?`${r?.key||"t"}-${String(E.id)}`:`${r?.key||"t"}-${k}`)})}),y>Ya&&v<y&&n.jsx("div",{className:"training-block__more",children:n.jsx(me,{htmlType:"button",size:48,type:"bar",icon:"plus",onClick:f,ariaLabel:t("common.loadMore","\uB354\uBCF4\uAE30"),label:t("common.loadMore","\uB354\uBCF4\uAE30"),variant:"main"})})]})}function j_(e){let t=0;const r=a=>{Array.isArray(a)?a.forEach(r):a!=null&&a!==!1&&a!==!0&&a!==""&&t++};return r(e),t}function D_({gap:e=10,count:t,className:r,children:a}){const s=o.useRef(null),[l,i]=o.useState({width:0,card:0}),u=t??j_(a);o.useLayoutEffect(()=>{const m=s.current;if(!m)return;const C=()=>{const b=m.style.maxWidth;m.style.maxWidth="none";const B=m.clientWidth;m.style.maxWidth=b;const N=m.firstElementChild?.offsetWidth??0;i(f=>f.width===B&&f.card===N?f:{width:B,card:N})};if(C(),typeof ResizeObserver>"u")return;const x=new ResizeObserver(C);x.observe(m);const g=m.firstElementChild;g&&x.observe(g);let y=m.parentElement;for(let b=0;b<3&&y&&y!==document.body;b++,y=y.parentElement)x.observe(y);let v=null;const _=()=>{v===null&&(v=requestAnimationFrame(()=>{v=null,C()}))};return window.addEventListener("resize",_),()=>{x.disconnect(),window.removeEventListener("resize",_),v!==null&&cancelAnimationFrame(v)}},[u,e]);const c=l.card>0?l.card:0,p=c>0?Lb(l.width,c,e):0,h=p>0?Rb(u,p):0,d={"--block-grid-gap":`${e}px`,...h>0?{"--block-grid-cols":h,"--block-grid-card":`${c}px`}:{}};return n.jsx("div",{ref:s,className:xe("training-block-grid",h>0&&"training-block-grid--measured",r),style:d,"data-cols":h>0?h:void 0,children:a})}function Ls(e){const t=o.useRef(null),r=o.useRef(e);r.current=e;const[a,s]=o.useState({url:e,loading:!!e,failed:!1}),l=a.url===e?a:{loading:!!e,failed:!1};o.useEffect(()=>{const c=t.current;s({url:e,failed:!1,loading:!!e&&!(c?.complete&&c.naturalWidth>0)})},[e]);const i=o.useCallback(()=>{r.current===e&&s({url:e,loading:!1,failed:!1})},[e]),u=o.useCallback(()=>{r.current===e&&s({url:e,loading:!1,failed:!0})},[e]);return{imgRef:t,loading:l.loading,failed:l.failed,hasImage:!!e&&!l.failed,onLoad:i,onError:u}}var S_='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Symbol_SpeechEar_mono" xmlns="http://www.w3.org/2000/svg" width="240" height="240" viewBox="0 0 240 240"><g id="symbol"><g opacity=".3"><path d="M80,50c-16.57,0-30,13.43-30,30v80c0,8.66,2.21,16.81,6.08,23.92,7.1,3.88,15.25,6.08,23.92,6.08h80c16.57,0,30-13.43,30-30v-80c0-8.66-2.21-16.81-6.08-23.92-7.1-3.88-15.25-6.08-23.92-6.08h-80Z" fill="%23fff"/></g><path d="M140,30h-60c-27.61,0-50,22.39-50,50v23.38l-19.22,21.15c-1.15,1.26-1.02,3.24.3,4.33,5.82,4.84,12.22,8.56,18.92,11.21.03,18.92,10.56,35.37,26.08,43.84-3.88-7.1-6.08-15.25-6.08-23.92v-80c0-16.57,13.43-30,30-30h80c8.66,0,16.81,2.21,23.92,6.08-8.48-15.54-24.97-26.08-43.92-26.08Z" fill="%23fff"/><path d="M183.92,56.08c3.88,7.1,6.08,15.25,6.08,23.92v80c0,16.57-13.43,30-30,30h-80c-8.66,0-16.81-2.21-23.92-6.08,8.48,15.54,24.97,26.08,43.92,26.08h45.11c2.7,0,4.89,2.19,4.89,4.89,0,2.86,2.45,5.13,5.3,4.88,30.65-2.68,54.7-28.42,54.7-59.77v-60c0-18.95-10.54-35.44-26.08-43.92Z" fill="%23fff"/><rect x="69" y="88" width="12" height="24" rx="6" ry="6" fill="%23fff"/><path d="M111,140c-2.92,0-5.85-.75-8.5-2.28-2.39-1.38-3.21-4.44-1.82-6.83,1.38-2.39,4.44-3.21,6.83-1.82,2.74,1.58,6.21,1.13,8.44-1.1,1.08-1.08,1.76-2.45,1.97-3.95.9-6.37,3.71-12.42,8.14-17.5,2.64-3.02,4.03-6.9,3.93-10.92-.21-8.21-6.78-15.05-14.97-15.56-2.76-.18-5.42.33-7.88,1.51-2.49,1.19-5.48.12-6.66-2.37-1.19-2.49-.12-5.48,2.37-6.66,3.96-1.88,8.38-2.73,12.8-2.46,13.32.83,24.01,11.94,24.34,25.29.16,6.53-2.11,12.83-6.39,17.75-3.15,3.61-5.15,7.87-5.77,12.32-.52,3.67-2.18,7-4.8,9.63-3.27,3.27-7.62,4.97-12.02,4.97Z" fill="%23fff"/></g></svg>';const T_=S_,Rs=o.forwardRef(function({item:e,disabled:t=!1,onPlayDone:r,selectable:a=!1,selected:s=!1,onSelect:l,flipDelay:i=0,hideLabel:u=!1,hideAudio:c=!1,orderRank:p=null},h){const{t:d}=Ne.useTranslation(),m=e.word||e.title||"",C=t||!m,x=e.audio??e.sound??e.audioKey,g=e.subLabel||e.pronunciation||"",y=e.colloquialLabel||"",[v,_]=o.useState({label:m,subLabel:g,colloquialLabel:y,homonum:e.homonum});m&&(v.label!==m||v.subLabel!==g||v.colloquialLabel!==y||!Object.is(v.homonum,e.homonum))&&_({label:m,subLabel:g,colloquialLabel:y,homonum:e.homonum});const b=o.useRef(null),B=Bn("(max-width: 767px)"),[N,f]=o.useState(!1),[w,k]=o.useState(!1),E=`${typeof x=="string"?x:x?.src??""}\0${m}`,[A,D]=o.useState({for:"",url:""}),j=A.for===E?A.url:"",$=wi(),H=e.textOnly??(!e.image&&!!v.label&&!!$&&$.entries.length>0&&!$.byWord.has(v.label)),F=H?"":Br()?.(v.label,v.homonum)??e.image??"",{imgRef:U,loading:T,hasImage:I,onLoad:z,onError:ie}=Ls(F);o.useEffect(()=>{let V=!1;return(async()=>{if(x){if(typeof x=="string"){if(x.startsWith("http")||x.includes("/")){D({for:E,url:x});return}}else if(typeof x=="object"&&!Array.isArray(x)){const ne=x.src;if(ne){D({for:E,url:ne});return}}}const ae=qr();if(ae&&m)try{const ne=await Promise.resolve(ae(m));!V&&ne&&D({for:E,url:ne})}catch{}})(),()=>{V=!0}},[x,m,E]);const te=o.useRef(!0),P=o.useRef(null);o.useEffect(()=>(te.current=!0,()=>{te.current=!1,P.current&&Va(P.current),P.current=null;try{b.current?.pause()}catch{}b.current=null}),[]);const G=o.useCallback(()=>new Promise(V=>{if(typeof window<"u"&&window.speechSynthesis&&m){f(!0),window.speechSynthesis.cancel();const ae=new SpeechSynthesisUtterance(m);ae.lang="ko-KR",ae.onend=()=>{f(!1);try{r?.()}catch{}V()},ae.onerror=()=>{f(!1),V()},window.speechSynthesis.speak(ae)}else V()}),[m,r]),X=o.useCallback(V=>{const ae=ha(V,ne=>{if(f(!1),ne)try{r?.()}catch{}});return b.current=ae.el,ae.done},[r]),K=o.useCallback(async()=>{if(t||!te.current)return;const V=()=>{P.current===V&&(P.current=null);try{b.current?.pause()}catch{}try{window.speechSynthesis?.cancel()}catch{}f(!1)},ae=pa(V);P.current=V;try{window.speechSynthesis?.cancel()}catch{}try{if(j&&(f(!0),await X(j)))return;const ne=xa();if(ne&&m)try{k(!0);const re=await Promise.resolve(ne(m));if(!te.current||P.current!==V||(k(!1),re&&(f(!0),await X(re))))return}catch{}if(!te.current||P.current!==V)return;await G()}finally{P.current===V&&k(!1),ae(),P.current===V&&(P.current=null)}},[t,j,m,X,G]);o.useImperativeHandle(h,()=>({play:()=>K()}),[K]);const L=V=>V.stopPropagation(),R=o.useCallback(V=>{if(V.stopPropagation(),!t){if(N){try{b.current?.pause()}catch{}try{window.speechSynthesis?.cancel()}catch{}f(!1);return}K()}},[t,N,K]),S=xe("training-word-card",t?"training-word-card--disabled":"",C?"training-word-card--flipped":"",a?"training-word-card--selectable":"",s?"training-word-card--selected":"");return n.jsx("div",{className:S,onClick:a&&!t?l:void 0,role:a?"button":void 0,"aria-pressed":a?s:void 0,tabIndex:a&&!t?0:void 0,"aria-disabled":a&&t?!0:void 0,onKeyDown:a&&!t?V=>{V.target===V.currentTarget&&(V.key==="Enter"||V.key===" "||V.key==="Spacebar")&&(V.preventDefault(),l?.())}:void 0,children:n.jsxs("div",{className:"training-word-card__flipper",style:{transitionDelay:C?"0ms":`${i}ms`},children:[n.jsxs("div",{className:"training-word-card__front",children:[s&&n.jsx("div",{className:"training-word-card__selected-badge",onClick:L,children:n.jsx(Sn,{size:40,position:"inline",animate:!0,icon:p!=null?void 0:"check",number:p??void 0,"aria-label":p!=null?d("training.nthSelected",{n:p}):d("training.selected","\uC120\uD0DD\uB428")})}),n.jsx("div",{className:"training-word-card__image-wrap",children:H?n.jsx("div",{className:"training-word-card__text-face",children:v.label}):I?n.jsxs(n.Fragment,{children:[T&&n.jsx("div",{className:"training-word-card__spinner"}),n.jsx("img",{ref:U,className:"training-word-card__image",src:F,alt:v.label||d("common.image","\uC774\uBBF8\uC9C0"),style:{opacity:T?0:1},onLoad:z,onError:ie})]}):n.jsx("div",{className:"training-word-card__placeholder"})}),!u&&n.jsxs("div",{className:"training-word-card__body",children:[!H&&n.jsx("div",{className:"training-word-card__word",children:v.label}),v.subLabel&&n.jsxs("div",{className:"training-word-card__pronunciation",children:["[",v.subLabel,"]"]}),v.colloquialLabel&&n.jsxs("div",{className:"training-word-card__colloquial caption-1",children:["[",v.colloquialLabel,"]"]})]}),!c&&n.jsx("div",{className:"training-word-card__bottom",onClick:a?L:void 0,children:n.jsx(me,{htmlType:"button",size:B?40:48,type:B?"dot":"bar",icon:N?"pause":"play",label:B?void 0:d("training.playSound","\uC18C\uB9AC \uB4E3\uAE30"),selected:N,loading:w,onClick:R,disabled:t,ariaLabel:v.label?N?d("training.stopFor",{name:v.label,defaultValue:`${v.label} \uC815\uC9C0`}):d("training.playSoundFor",{name:v.label,defaultValue:`${v.label} \uC18C\uB9AC \uB4E3\uAE30`}):N?d("training.stop","\uC815\uC9C0"):d("training.playSound","\uC18C\uB9AC \uB4E3\uAE30")})})]}),n.jsx("div",{className:"training-word-card__back","aria-hidden":"true",children:n.jsx("span",{className:"training-word-card__disabled-symbol",style:{"--disabled-symbol-src":`url("${T_}")`}})})]})})}),fr={landscape:{width:1123,height:794,printSize:"A4 landscape",printW:"297mm",printH:"210mm"},portrait:{width:794,height:1123,printSize:"A4 portrait",printW:"210mm",printH:"297mm"}};function M_(e="landscape"){Tt("print-word-table-deprecated","[printWordTable] @deprecated \u2014 WordTablePopup renderButtons \uC758 print(\uB610\uB294 useWordTablePrint().print)\uB97C \uC4F0\uC138\uC694. \uC804\uC5ED \uC778\uC1C4\uB294 \uD654\uBA74\uC758 \uBAA8\uB4E0 \uB2E8\uC5B4\uD45C\uB97C \uD568\uAED8 \uCC0D\uC2B5\uB2C8\uB2E4.");const{printSize:t,printW:r,printH:a}=fr[e],s=document.createElement("style");s.textContent=`@page { size: ${t}; margin: 0; } .word-table { width: ${r} !important; height: ${a} !important; }`,document.head.appendChild(s);const l=()=>{document.head.removeChild(s),window.removeEventListener("afterprint",l)};window.addEventListener("afterprint",l),window.print()}function $_(e,t){if(e.length===0)return[[]];const r=Math.max(1,Math.floor(t)),a=[];for(let s=0;s<e.length;s+=r)a.push(e.slice(s,s+r));return a}const L_={landscape:{1:{cols:1,rows:1},2:{cols:2,rows:1},3:{cols:3,rows:1},4:{cols:2,rows:2},5:{cols:3,rows:2},6:{cols:3,rows:2},7:{cols:4,rows:2},8:{cols:4,rows:2},9:{cols:5,rows:2},10:{cols:5,rows:2},11:{cols:4,rows:3},12:{cols:4,rows:3},13:{cols:5,rows:3},14:{cols:5,rows:3},15:{cols:5,rows:3},16:{cols:6,rows:3}},portrait:{1:{cols:1,rows:1},2:{cols:1,rows:2},3:{cols:1,rows:3},4:{cols:1,rows:4},5:{cols:1,rows:5},6:{cols:2,rows:3},7:{cols:2,rows:4},8:{cols:2,rows:4},9:{cols:2,rows:5},10:{cols:2,rows:5},11:{cols:3,rows:4},12:{cols:3,rows:4},13:{cols:4,rows:4},14:{cols:4,rows:4},15:{cols:4,rows:4},16:{cols:4,rows:4}}};function dd(e,t){const r=L_[e][t];if(r)return r;const a=Math.max(1,Math.ceil(t)),s=Math.max(1,Math.ceil(Math.sqrt(a*.707)));let l,i;return e==="landscape"?(i=s,l=Math.ceil(a/i)):(l=s,i=Math.ceil(a/l)),(e==="landscape"?l<i:i<l)&&([l,i]=[i,l]),{cols:l,rows:i}}function R_(e,t){const r=dd(e==="landscape"?"portrait":"landscape",t),a=Math.max(1,Math.ceil(t));if(a<=1)return r;const s=fr[e],l=e==="landscape"?s.width/2:s.width,i=e==="landscape"?s.height:s.height/2,u=(m,C)=>Math.min(l/m/Cd,i/C/gd),c=Math.max(0,r.cols*r.rows-a),p=u(r.cols,r.rows);let h=r,d=p;for(let m=1;m<=a;m++){const C=Math.ceil(a/m);if(m*C-a>c)continue;const x=u(m,C);x>d&&(h={cols:m,rows:C},d=x)}return d>p*1.05?h:r}const P_={show:"word-table__content--cut-show",dashed:"",corner:"word-table__content--cut-corner",hide:""},pd={\uBA85:"\uBA85\uC0AC",\uB3D9:"\uB3D9\uC0AC",\uD615:"\uD615\uC6A9\uC0AC",\uBD80:"\uBD80\uC0AC",\uC218:"\uC218\uC0AC",\uAD00:"\uAD00\uD615\uC0AC",\uAC10:"\uAC10\uD0C4\uC0AC",\uC870:"\uC870\uC0AC",\uC811:"\uC811\uC0AC",\uC758:"\uC758\uC874\uBA85\uC0AC",\uB300:"\uB300\uBA85\uC0AC",\uBCF4\uB3D9:"\uBCF4\uC870\uB3D9\uC0AC",\uBCF4\uD615:"\uBCF4\uC870\uD615\uC6A9\uC0AC"},hd={\uACE0\uC720:"\uACE0\uC720\uC5B4",\uD55C\uC790:"\uD55C\uC790\uC5B4",\uC678\uB798:"\uC678\uB798\uC5B4",\uD63C\uC885:"\uD63C\uC885\uC5B4"},Ps={\uBA85:"noun",\uB3D9:"verb",\uD615:"adjective",\uBD80:"adverb",\uC218:"numeral",\uAD00:"determiner",\uAC10:"interjection",\uC870:"particle",\uC811:"affix",\uC758:"dependentNoun",\uB300:"pronoun",\uBCF4\uB3D9:"auxVerb",\uBCF4\uD615:"auxAdjective"},Fs={\uACE0\uC720:"native",\uD55C\uC790:"sino",\uC678\uB798:"foreign",\uD63C\uC885:"mixed"};function md(e){return Object.fromEntries(Object.entries(pd).map(([t,r])=>[t,Ps[t]?e(`wordTable.pos.${Ps[t]}`,{defaultValue:r}):r]))}function fd(e){return Object.fromEntries(Object.entries(hd).map(([t,r])=>[t,Fs[t]?e(`wordSearch.filter.type.${Fs[t]}`,{defaultValue:r}):r]))}const F_={pos:Ps,wordType:Fs};function Is(e,t){return e?e.split("/").map(r=>t[r]??r).join("/"):""}function Os(e,t,r,a){if(a!=="dashed")return{};const s=e%t,l=Math.floor(e/t),i=s<t-1,u=l<r-1;if(!i&&!u)return{};const c="#ddd",p=C=>`repeating-linear-gradient(to ${C}, ${c} 0, ${c} 5px, transparent 5px, transparent 10px)`,h=[],d=[],m=[];return i&&(h.push(p("bottom")),d.push("1px 100%"),m.push("right center")),u&&(h.push(p("right")),d.push("100% 1px"),m.push("center bottom")),{backgroundImage:h.join(", "),backgroundSize:d.join(", "),backgroundPosition:m.join(", "),backgroundRepeat:"no-repeat",printColorAdjust:"exact",WebkitPrintColorAdjust:"exact"}}const Cd=280,I_=240,O_=280,gd=400,z_=120,W_=280;function bd(e,t){const r=o.useRef(null),[a,s]=o.useState(1),[l,i]=o.useState(0),u=o.useCallback((c,p)=>{if(!(c>0))return;const h=c/e,d=t&&p>0?p/t:1/0,m=Math.min(1,h,d);s(m),i(Math.max(0,(c-e*m)/2))},[e,t]);return o.useEffect(()=>{const c=r.current;if(!c)return;const p=t?c.parentElement??c:c;if(u(p.clientWidth,p.clientHeight),typeof ResizeObserver>"u")return;const h=new ResizeObserver(([d])=>u(d.contentRect.width,d.contentRect.height));return h.observe(p),()=>h.disconnect()},[u,t]),{scalerRef:r,scale:a,offset:l}}const H_=24,V_={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0},q_=400,yd=8;function U_(e){return e<=1?"100%":`repeat(${e}, calc((100% - ${e-1} * var(--wt-cell-gap, 0px)) / ${e}))`}function zs({label:e,subLabel:t,colloquialLabel:r,captionLabel:a,captionBadge:s,imageLabel:l,pickForm:i,homonum:u,showWord:c=!0,showImage:p=!0,showPronunciation:h=!0,showColloquial:d=!0,showCaption:m=!0,buttonSize:C=40,wordInfo:x,outerScale:g=1}){const{t:y}=Ne.useTranslation(),v=o.useRef(null),_=o.useRef(null),b=o.useRef(null),[B,N]=o.useState(1),[f,w]=o.useState(!1),[k,E]=o.useState(!1),[A,D]=o.useState({for:"",url:""}),[j,$]=o.useState(null),H=t&&t.length>0?t:lb()?.(e,u)??"",F=Br()?.(l||e,u)??"",{imgRef:U,loading:T,failed:I,onLoad:z,onError:ie}=Ls(F),te=o.useCallback(()=>$(_.current?.getBoundingClientRect()??null),[]),P=o.useCallback(()=>$(null),[]),G=La(!!j,le=>{le?te():P()},_),X=o.useMemo(()=>{if(!x)return null;const le=[];return x.grade&&le.push(y("wordTable.info.grade",{n:x.grade,defaultValue:"\uB09C\uC774\uB3C4: {{n}}\uB4F1\uAE09"})),x.syllables&&le.push(y("wordTable.info.syllables",{n:x.syllables,defaultValue:"\uC74C\uC808 \uC218: {{n}}\uC74C\uC808"})),x.pos&&le.push(y("wordTable.info.pos",{v:Is(x.pos,md(y)),defaultValue:"\uD488\uC0AC: {{v}}"})),x.wordType&&le.push(y("wordTable.info.wordType",{v:Is(x.wordType,fd(y)),defaultValue:"\uC720\uD615: {{v}}"})),le.length?le:null},[x,y]),K=H||e,L=A.for===K?A.url:"";o.useEffect(()=>{const le=qr(),J=H||e;if(!le||!J)return;let O=!1;return Promise.resolve().then(()=>le(J)).catch(()=>"").then(W=>{!O&&W&&D({for:J,url:W})}),()=>{O=!0}},[H,e]);const R=o.useRef(null),S=o.useRef(null);o.useEffect(()=>()=>{b.current?.pause(),S.current?.()},[]);const V=o.useRef(null);o.useEffect(()=>()=>{V.current&&(V.current.cancelled=!0)},[]);const ae=o.useCallback(le=>{if(le.stopPropagation(),f||k){R.current?.();return}if(!L){const O=xa(),W=H||e;if(!O||!W)return;const q={cancelled:!1,stop:null};V.current=q;const oe=()=>{q.cancelled=!0,q.stop?.(),E(!1),w(!1),S.current?.()};R.current=oe,S.current=pa(oe),E(!0),Promise.resolve().then(()=>O(W)).then(ee=>{if(q.cancelled)return;if(!ee){oe();return}D({for:W,url:ee});const be=ha(ee,()=>{w(!1),S.current?.()});b.current=be.el,q.stop=be.stop,E(!1),w(!0)}).catch(()=>{oe()});return}w(!0);const J=ha(L,()=>{w(!1),S.current?.()});b.current=J.el,R.current=J.stop,S.current=pa(J.stop)},[f,k,L,H,e]),ne=p&&!!F&&!I,re=ne&&c?Cd:ne?O_:I_,ue=ne&&c?gd:ne?W_:z_;o.useEffect(()=>{const le=v.current;if(!le||typeof ResizeObserver>"u")return;const J=new ResizeObserver(([O])=>{const{width:W,height:q}=O.contentRect;N(Math.min(W/re,q/ue))});return J.observe(le),()=>J.disconnect()},[re,ue]);const Be=C*g<H_;return n.jsxs("div",{ref:v,className:xe("word-table-cell",Be&&"word-table-cell--tap-too-small",ne?"word-table-cell--with-image":""),"data-ref-w":re,"data-ref-h":ue,children:[n.jsxs("div",{className:"word-table-cell__inner",style:{transform:`scale(${B})`},children:[ne&&n.jsxs("div",{className:"word-table-cell__image-wrap",children:[T&&n.jsx("div",{className:"word-table-cell__spinner"}),n.jsx("img",{ref:U,className:"word-table-cell__image",src:F,alt:e,draggable:!1,style:{opacity:T?0:1},onLoad:z,onError:ie})]}),m&&(s||a)&&n.jsxs("span",{className:"word-table-cell__caption",children:[s&&n.jsx(cn,{fill:"soft",size:"small",label:s}),a&&n.jsx("span",{className:"word-table-cell__caption-tail h5",children:a})]}),c&&n.jsx("span",{className:"word-table-cell__word h0",children:e}),h&&H&&n.jsxs("span",{className:"word-table-cell__sub h3",children:["[",H,"]"]}),d&&r&&n.jsxs("span",{className:"word-table-cell__colloquial h5",children:["[",r,"]"]})]}),n.jsxs("div",{className:"word-table-cell__side",children:[n.jsxs("div",{className:"word-table-cell__play-button","data-audio-src":L,children:[n.jsx("span",{"data-play-state":"play",style:{display:f?"none":void 0},children:n.jsx(me,{htmlType:"button",size:C,type:"dot",icon:"play",variant:"transparent-lightGray",useBorder:!1,loading:k,showTooltipInfo:k?y("common.loading","\uBD88\uB7EC\uC624\uB294 \uC911"):y("common.play","\uC7AC\uC0DD"),ariaLabel:e?y("common.playFor",{name:e,defaultValue:`${e} \uC7AC\uC0DD`}):y("common.play","\uC7AC\uC0DD"),onClick:ae})}),n.jsx("span",{"data-play-state":"pause",style:{display:f?void 0:"none"},children:n.jsx(me,{htmlType:"button",size:C,type:"dot",icon:"pause",useBorder:!1,selected:!0,showTooltipInfo:y("common.pause","\uBA48\uCDA4"),ariaLabel:e?y("common.pauseFor",{name:e,defaultValue:`${e} \uBA48\uCDA4`}):y("common.pause","\uBA48\uCDA4"),onClick:ae})})]}),x&&n.jsxs("div",{ref:_,className:"word-table-cell__info-button",onPointerEnter:le=>{tr(le)||te()},onPointerLeave:le=>{tr(le)||P()},onFocus:()=>{ur()||te()},onBlur:P,children:[n.jsx(me,{htmlType:"button",size:C,type:"dot",icon:"info",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:!1,ariaLabel:y("wordTable.wordInfo","{{word}} \uB0B1\uB9D0 \uC815\uBCF4",{word:e}),onClick:le=>{le.stopPropagation(),G.touchPress()}}),j&&X&&n.jsx(er,{anchorRect:j,items:X,showIndex:!1})]}),i&&n.jsx("div",{className:"word-table-cell__form-button",children:n.jsx(me,{htmlType:"button",size:C,type:"dot",icon:"replace",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:y("wordTable.pickForm","\uB2E4\uB978 \uAF34\uB85C"),ariaLabel:i.n===null?y("wordTable.pickFormBaseAria","\uAE30\uBCF8\uD615 \uB0B1\uB9D0\uC744 \uB2E4\uB978 \uAF34\uB85C"):y("wordTable.pickFormAria",{n:i.n,defaultValue:"{{n}}\uBC88 \uCE78 \uB0B1\uB9D0\uC744 \uB2E4\uB978 \uAF34\uB85C"}),onClick:le=>{le.stopPropagation(),i.onPick(le.currentTarget.getBoundingClientRect())}})})]})]})}function Lr({title:e,titleIcon:t,disc:r,className:a,orientation:s="landscape",contentTypes:l=["image","word","standardPron"],baseItem:i,baseContentTypes:u,cutLine:c="show",showOutline:p=!0,showDivLine:h=!0,items:d,editCells:m,count:C,activeCell:x=null,onActivateCell:g,onRemoveCell:y,onRemoveItem:v,onReorder:_,onCopyItem:b,onReplaceItem:B,onPickForm:N,indexOffset:f=0,totalCount:w,renderCellAction:k,showFillerAdd:E=!1,fillerAdd:A="first",addableCount:D,contentRef:j,buttonSize:$=40,brand:H,code:F,pageNumber:U,pageNumberPosition:T="right",fitHeight:I=!1,scoring:z=!1,marks:ie,onMarkClick:te,scoreIndexOffset:P=0}){const G=o.useCallback((he,Le)=>{te?.(P+he,Le)},[te,P]),X=(he,Le)=>{const Pe=he.filter(Boolean).join(" / ");return Pe?Le?L("wordPrint.removePairFor",{name:Pe,defaultValue:`${Pe} \uB300\uB9BD\uC30D \uBE7C\uAE30`}):L("wordPrint.removeWordFor",{name:Pe,defaultValue:`${Pe} \uBE7C\uAE30`}):Le?L("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):L("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30")},K=(he,Le)=>{const Pe=ie?.[Wa(P+he)]??null;return n.jsx("div",{className:xe("word-table-cell__score",Pe?"word-table-cell__score--marked":""),style:Et>1?{transform:`translateX(-50%) scale(${Et})`,transformOrigin:"bottom center"}:void 0,children:Ha.map(We=>n.jsx("span",{className:xe("word-table-cell__score-slot",Pe===We?"word-table-cell__score-slot--on":""),children:n.jsx(me,{htmlType:"button",size:$,type:"dot",shape:"pill",icon:Cs[We],variant:Pe===We?gs[We]:"default",selected:Pe===We,useBorder:!1,...vt?{}:{tabIndex:-1,role:"img"},showTooltipInfo:L(`wordTable.scoring.markName.${We}`,{defaultValue:We}),ariaLabel:L(`wordTable.scoring.${We}`,{word:Le,defaultValue:`${Le} ${We}`}),onClick:vt?dt=>{dt.stopPropagation(),G(he,We)}:void 0})},We))})},{t:L}=Ne.useTranslation(),R=m!==void 0,S=e!=null||!!t||!!r,V=Bn("(max-width: 767px)"),ae=o.useRef(null),[ne,re]=o.useState(null),ue=d?.length??0,Be=w??ue,[le,J]=o.useState(null),[O,W]=o.useState(""),q=o.useRef(null),oe=o.useRef(null),ee=o.useRef(null),be=o.useRef(null),je=o.useCallback(he=>{oe.current=he,typeof j=="function"?j(he):j&&(j.current=he)},[j]),De=o.useCallback((he,Le)=>{q.current=f+Le,_?.(he,Le),W(L("wordTable.reorder.moved",{n:f+Le+1,total:Be,defaultValue:"{{total}}\uCE78 \uAC00\uC6B4\uB370 {{n}}\uBC88\uC9F8\uB85C \uC62E\uAE40"}))},[_,L,Be,f]);o.useEffect(()=>{const he=q.current;he!=null&&(q.current=null,(oe.current?.closest(".word-table-block__pages")??oe.current)?.querySelector(`[data-wordtable-index="${he}"] .word-table__card-handle button`)?.focus())}),o.useEffect(()=>()=>{be.current?.()},[]);const we=o.useCallback((he,Le)=>{if(!_||!he.altKey||he.ctrlKey||he.metaKey)return;const Pe=he.key==="ArrowRight";if(!Pe&&he.key!=="ArrowLeft")return;he.preventDefault();const We=Le+(Pe?1:-1),dt=f+We;dt<0||dt>=Be||De(Le,We)},[_,Be,f,De]),ze=o.useCallback((he,Le)=>{if(!_||he.pointerType==="mouse")return;const Pe=he.target.closest?.("button");if(Pe&&!Pe.closest(".word-table__card-handle"))return;be.current?.();const We={x:he.clientX,y:he.clientY};let dt=!1;const on=Ye=>{dt&&Ye.cancelable&&Ye.preventDefault()};let ht=null,Ke=null;const xt=()=>{const Ye=Ke;if(!Ye)return;const at=document.elementFromPoint?.(Ye.x,Ye.y)?.closest?.("[data-wordtable-cell]"),mt=at?Number(at.dataset.wordtableCell):NaN,Mt=Number.isInteger(mt)?mt:null;ee.current=Mt,re(Ot=>Ot===Mt?Ot:Mt)},jt=Ye=>{if(!dt){(Math.abs(Ye.clientX-We.x)>yd||Math.abs(Ye.clientY-We.y)>yd)&&Ge();return}if(Ke={x:Ye.clientX,y:Ye.clientY},typeof requestAnimationFrame>"u"){xt();return}ht===null&&(ht=requestAnimationFrame(()=>{ht=null,xt()}))},Q=()=>{ht!==null&&(cancelAnimationFrame(ht),ht=null,xt());const Ye=ee.current,at=dt;Ge(),at&&Ye!=null&&Ye!==Le&&De(Le,Ye)},fe=setTimeout(()=>{dt=!0,J(Le),ee.current=Le,re(Le),window.addEventListener("touchmove",on,{passive:!1})},q_);function Ge(){clearTimeout(fe),window.removeEventListener("pointermove",jt),window.removeEventListener("pointerup",Q),window.removeEventListener("pointercancel",Q),window.removeEventListener("touchmove",on),dt=!1,ht!==null&&(cancelAnimationFrame(ht),ht=null),ee.current=null,be.current=null,J(null),re(null)}be.current=Ge,window.addEventListener("pointermove",jt),window.addEventListener("pointerup",Q),window.addEventListener("pointercancel",Q)},[_,De]),{width:ye,height:_e}=fr[s],ve=typeof I=="number"?I:I&&typeof I=="object"?V?I.narrow:I.wide:null,{scalerRef:Ee,scale:Oe,offset:ot}=bd(ye,I?_e:void 0),it=R?m?.length??0:d?.length??0,Fe=Math.max(C??it,1),Ue=!R&&!!i,nt=R_(s,Fe),Te=dd(s,Fe),Xe=Ue?nt.cols:Te.cols,rt=Ue?nt.rows:Te.rows,ut=Ue&&s==="landscape"?nt.cols*2:Xe,gt=Ue&&s==="portrait"?nt.rows*2:rt,_t=he=>({word:he.length===0||he.includes("word"),image:he.length===0||he.includes("image"),pron:he.length===0||he.includes("standardPron"),colloq:he.length===0||he.includes("colloquialPron"),caption:he.length===0||he.includes("caption")}),pt=_t(l),Yt=o.useMemo(()=>{const he=(d??[]).map(Pe=>Pe.id),Le=he.every(Pe=>typeof Pe=="string"&&Pe.length>0)&&new Set(he).size===he.length;return!Le&&he.length>0&&Tt("wordTable.cellKeyFallback","[ihab/core] WordTable: items \uC758 id \uAC00 \uACB9\uCE58\uAC70\uB098 \uBE44\uC5B4 \uC788\uC5B4 \uCE78\uC744 \uC790\uB9AC \uBC88\uD638\uB85C \uC13C\uB2E4. \uCE78\uC744 \uBE7C\uAC70\uB098 \uB354\uD560 \uB54C \uB4A4 \uCE78\uB4E4\uC774 \uD1B5\uC9F8\uB85C \uB2E4\uC2DC \uADF8\uB824\uC9C4\uB2E4(\uC18C\uB9AC \uC8FC\uC18C\uB97C \uB2E4\uC2DC \uBC1B\uC544 \uC628\uB2E4). id \uB97C \uD45C \uC548\uC5D0\uC11C \uD558\uB098\uBFD0\uC778 \uAC12\uC73C\uB85C \uC9C0\uC5B4 \uC8FC\uBA74 \uADF8 \uAC12\uC774 \uC0AC\uB77C\uC9C4\uB2E4."),Le?he:null},[d]),kt=_t(u??l),ct=R?(m??[]).some(he=>he!==null&&he.length>1):(d??[]).some(he=>(he.words??[]).length>1),Ae=!!H?.show,st=!!H?.show&&H?.top!==!1,ft=!!H?.show&&H?.bottom!==!1,Ct=H?.copyright??"\xA9 IHAB, Inc. All rights reserved.",Nt=ce(xe("word-table__content",P_[c],p&&"word-table__content--outline",h&&ct&&"word-table__content--div-line",!Ae&&U&&T!=="none"&&"word-table__content--page-number",st&&"word-table__content--brand-top",ft&&"word-table__content--brand-bottom")),Ft={transform:`scale(${1/Oe})`,transformOrigin:"center center"},yt=$*Ha.length+4*(Ha.length-1),vt=!!te,Et=vt?Math.max(1,Math.min(1/Oe,ye/ut/yt)):1,[It,Je]=o.useState(bs);ca(()=>{if(!z)return;const he=oe.current?.querySelector(".word-table-cell__score-slot .button__icon");if(!he)return;const Le=he.getBoundingClientRect().width;Le>0&&Je(r4(Le))},[z,Oe,Et,$,ue]);const At=n.jsxs("div",{ref:Ee,className:"word-table__scaler",style:{height:_e*Oe,"--word-table-mark-stroke":It},children:[n.jsx("div",{className:xe("word-table",z&&!vt&&"word-table--score-readonly",!S&&a),style:{width:ye,height:_e,transform:`scale(${Oe})`,transformOrigin:"top left",marginLeft:ot},children:n.jsxs("div",{ref:je,className:Nt,style:{gridTemplateColumns:`repeat(${ut}, 1fr)`,gridTemplateRows:U_(gt)},children:[R?n.jsx(n.Fragment,{children:(m??[]).map((he,Le)=>n.jsx("div",{className:ce(xe("word-table__edit-cell",he?"word-table__edit-cell--filled":"word-table__edit-cell--empty",x===Le?"word-table__edit-cell--active":"")),style:Os(Le,ut,gt,c),children:he?n.jsxs(n.Fragment,{children:[he.map((Pe,We)=>n.jsxs(o.Fragment,{children:[We>0&&n.jsx("div",{className:ce("word-table__pair-divider")}),n.jsx(zs,{outerScale:Oe,label:Pe.word,subLabel:Pe.pronunciation,colloquialLabel:Pe.colloquialPronunciation,homonum:Pe.homonum,showWord:pt.word,showImage:pt.image,showPronunciation:pt.pron,showColloquial:pt.colloq,showCaption:pt.caption,buttonSize:$})]},We)),z&&K(Le,he.map(Pe=>Pe.word).join(" / ")),y&&n.jsx("div",{className:ce("word-table__card-close"),children:n.jsx(me,{htmlType:"button",size:$,type:"dot",icon:"x",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:he.length>1?L("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):L("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),ariaLabel:X(he.map(Pe=>Pe.word),he.length>1),onClick:()=>y(Le)})})]}):g&&n.jsx("div",{className:ce("word-table__card-add"),style:Ft,children:n.jsx(me,{htmlType:"button",size:$,type:"dot",icon:"plus",variant:"default",ariaLabel:L("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),showTooltipInfo:L("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),onClick:()=>g(Le)})})},Le))}):n.jsxs(n.Fragment,{children:[Ue&&i&&n.jsx("div",{className:ce("word-table__card word-table__card--base"),style:{gridColumn:`1 / span ${nt.cols}`,gridRow:`1 / span ${nt.rows}`,...Os(0,s==="landscape"?2:1,s==="landscape"?1:2,c)},children:(i.words??[]).map((he,Le)=>n.jsxs(o.Fragment,{children:[Le>0&&n.jsx("div",{className:ce("word-table__pair-divider")}),n.jsx(zs,{outerScale:Oe,label:he.label,subLabel:he.subLabel,colloquialLabel:he.colloquialLabel,captionLabel:he.captionLabel,captionBadge:he.captionBadge,imageLabel:he.imageLabel,pickForm:N&&he.canPickForm?{n:null,onPick:Pe=>N(i.id,-1,Pe)}:void 0,homonum:he.homonum,showWord:kt.word,showImage:kt.image,showPronunciation:kt.pron,showColloquial:kt.colloq,showCaption:kt.caption,buttonSize:$,wordInfo:he.grade||he.syllables!=null||he.pos||he.wordType?{grade:he.grade,syllables:he.syllables,pos:he.pos,wordType:he.wordType}:void 0})]},Le))}),(d??[]).map((he,Le)=>n.jsxs("div",{"data-wordtable-cell":_?Le:void 0,"data-wordtable-index":_?f+Le:void 0,className:ce(`word-table__card${_?" word-table__card--draggable":""}${ne===Le?" word-table__card--drag-over":""}${le===Le?" word-table__card--dragging":""}`),style:Os(Le,Xe,rt,c),draggable:!!_,onPointerDown:_?Pe=>ze(Pe,Le):void 0,onKeyDown:_?Pe=>we(Pe,Le):void 0,onDragStart:_?()=>{ae.current=Le}:void 0,onDragOver:_?Pe=>{Pe.preventDefault(),re(Le)}:void 0,onDragLeave:_?()=>re(null):void 0,onDrop:_?Pe=>{Pe.preventDefault(),ae.current!==null&&ae.current!==Le&&_(ae.current,Le),ae.current=null,re(null)}:void 0,onDragEnd:_?()=>{ae.current=null,re(null)}:void 0,children:[(he.words??[]).map((Pe,We)=>n.jsxs(o.Fragment,{children:[We>0&&n.jsx("div",{className:ce("word-table__pair-divider")}),n.jsx(zs,{outerScale:Oe,label:Pe.label,subLabel:Pe.subLabel,colloquialLabel:Pe.colloquialLabel,captionLabel:Pe.captionLabel,captionBadge:Pe.captionBadge,imageLabel:Pe.imageLabel,pickForm:N&&Pe.canPickForm?{n:f+Le+1,onPick:dt=>N(he.id,f+Le,dt)}:void 0,homonum:Pe.homonum,showWord:pt.word,showImage:pt.image,showPronunciation:pt.pron,showColloquial:pt.colloq,showCaption:pt.caption,buttonSize:$,wordInfo:Pe.grade||Pe.syllables!=null||Pe.pos||Pe.wordType?{grade:Pe.grade,syllables:Pe.syllables,pos:Pe.pos,wordType:Pe.wordType}:void 0})]},We)),z&&K(Le,(he.words??[]).map(Pe=>Pe.label).join(" / ")),(k||v||b||B||_)&&n.jsxs("div",{className:ce("word-table__card-actions"),children:[v&&n.jsx("div",{className:ce("word-table__card-close"),children:n.jsx(me,{htmlType:"button",size:$,type:"dot",icon:"x",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:(he.words??[]).length>1?L("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):L("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),ariaLabel:X((he.words??[]).map(Pe=>Pe.label),(he.words??[]).length>1),onClick:()=>v(he.id)})}),b&&n.jsx("div",{className:ce("word-table__card-copy"),children:n.jsx(me,{htmlType:"button",size:$,type:"dot",icon:"copy",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:L("wordTable.copyItem","\uD55C \uCE78 \uB354"),ariaLabel:L("wordTable.copyItemAria",{n:f+Le+1,defaultValue:"{{n}}\uBC88 \uCE78 \uB0B1\uB9D0\uC744 \uD55C \uCE78 \uB354"}),onClick:()=>b(he.id,f+Le)})}),B&&n.jsx("div",{className:ce("word-table__card-replace"),children:n.jsx(me,{htmlType:"button",size:$,type:"dot",icon:"refresh-cw",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:(he.words??[]).length>1?L("wordTable.replacePair","\uB2E4\uB978 \uC30D\uC73C\uB85C"):L("wordTable.replaceItem","\uB2E4\uB978 \uB2E8\uC5B4\uB85C"),ariaLabel:(he.words??[]).length>1?L("wordTable.replacePairAria",{n:f+Le+1,defaultValue:"{{n}}\uBC88 \uCE78\uB9CC \uB2E4\uB978 \uC30D\uC73C\uB85C"}):L("wordTable.replaceItemAria",{n:f+Le+1,defaultValue:"{{n}}\uBC88 \uCE78\uB9CC \uB2E4\uB978 \uB2E8\uC5B4\uB85C"}),onClick:()=>B(he.id,f+Le)})}),k?.(Le,he),_&&n.jsx("div",{className:ce("word-table__card-handle"),children:n.jsx(me,{htmlType:"button",size:$,type:"dot",icon:"grip-vertical",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:L("wordTable.reorder.hint","Alt + \u2190 \u2192 \uB85C \uC21C\uC11C \uBC14\uAFB8\uAE30"),ariaLabel:L("wordTable.reorder.handle",{word:(he.words??[]).map(Pe=>Pe.label).join(" / "),defaultValue:"{{word}} \uC21C\uC11C \uBC14\uAFB8\uAE30 (Alt + \uD654\uC0B4\uD45C)"})})})]})]},Yt?Yt[Le]:Le)),Array.from({length:Math.max(0,Xe*rt-(d?.length??0))}).map((he,Le)=>{const Pe=Xe*rt,We=D??Pe,dt=(d?.length??0)+Le<We;return n.jsx("div",{className:ce("word-table__card word-table__card--filler"),children:E&&g&&dt&&(A==="every"||Le===0)&&n.jsx("div",{className:ce("word-table__card-add"),style:Ft,children:n.jsx(me,{htmlType:"button",size:$,type:"dot",icon:"plus",variant:"default",ariaLabel:L("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),showTooltipInfo:L("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),onClick:()=>g((d?.length??0)+Le)})})},`filler-${Le}`)})]}),st&&n.jsx(n.Fragment,{children:n.jsxs("div",{className:"word-table__band word-table__band--top",children:[n.jsx("img",{className:"word-table__brand-logo",src:H?.topLogo?.src??za,alt:H?.topLogo?.alt??"\uB9D0\uADC0"}),(()=>{const he=[H?.title&&n.jsx("span",{className:"word-table__paper-title",children:H.title},"t"),H?.owner&&n.jsx("span",{className:"word-table__owner",children:H.owner},"o"),F&&n.jsx("span",{className:"word-table__code",children:F},"c")].filter(Boolean);return he.length===0?null:n.jsx("span",{className:"word-table__ident",children:he.map((Le,Pe)=>n.jsxs(o.Fragment,{children:[Pe>0&&n.jsx("span",{className:"word-table__ident-dot","aria-hidden":"true",children:"\xB7"}),Le]},Pe))})})()]})}),ft&&n.jsx(n.Fragment,{children:n.jsxs("div",{className:"word-table__band word-table__band--bottom",children:[n.jsxs("span",{className:"word-table__brand-by",children:[H?.bottomLogo?n.jsx("img",{className:"word-table__brand-logo--ihab word-table__brand-logo--given",src:H.bottomLogo.src,alt:H.bottomLogo.alt}):n.jsx("span",{className:"word-table__brand-logo--ihab",role:"img","aria-label":"IHAB"}),n.jsx("span",{className:"word-table__copyright",children:Ct})]}),n.jsxs("span",{className:"word-table__band-end",children:[H?.link&&n.jsx("span",{className:"word-table__link",children:H.link}),U&&T!=="none"&&n.jsx("span",{className:"word-table__page-count",children:L("wordTable.filter.pageIndicator",{current:U.current,total:U.total})})]})]})}),!Ae&&U&&T!=="none"&&n.jsx("span",{className:`word-table__page-number body-3 word-table__page-number--${T}`,children:L("wordTable.filter.pageIndicator",{current:U.current,total:U.total})})]})}),_&&n.jsx("span",{role:"status",style:V_,children:O})]}),Qe=ve==null?At:n.jsx("div",{className:"word-table__frame",style:{height:ve},children:At});return S?n.jsx($r,{type:"page",icon:t,title:e,disc:r,className:xe(ce("word-table__section"),a),children:Qe}):Qe}function G_(e,t,r){const a=[];for(const s of e??[]){if(s.type==="note"||s.type==="input")continue;const l=s.displayLabel??s.label,i=K_(s,t?.[s.label],r);i!==null&&a.push(`${l} ${i}`)}return a.join(" \xB7 ")}function K_(e,t,r){const a=(Array.isArray(t)?t:t===void 0?[]:[t]).filter(s=>s!==Dn);return a.length===0?e.allOption?e.allLabel??r:null:a.map(s=>Y_(e,s)).join(", ")}function Y_(e,t){const r=[...e.items??[],...(e.groups??[]).flat()];for(const a of r)if(a!=null){if(typeof a=="string"){if(a===t)return a;continue}if(a.value===t)return a.displayLabel??a.labels?.join(" ")??a.value}return t}function Kn({title:e,titleLevel:t=2,headerAction:r,headerSummary:a,collapsible:s=!1,defaultCollapsed:l=!1,collapsed:i,onCollapsedChange:u,footer:c,sections:p,selected:h={},onSelect:d,align:m,sectionAlign:C,className:x}){const g=wn()??fn,y=(m??(C==="vertical"?"newline":"inline"))==="inline",{t:v}=Ne.useTranslation(),[_,b]=o.useState(l),B=i??_,N=()=>{const j=!B;b(j),u?.(j)},f=j=>{if(!s)return;const $=j.target;!$||typeof $.closest!="function"||$.closest(".filter-panel__collapse-toggle")||$.closest('button, a, input, select, textarea, label, [role="radiogroup"], [role="button"], [role="menu"]')||N()},w=o.useMemo(()=>a!==void 0||!B?"":G_(p,h,v("common.all","\uC804\uCCB4")),[a,B,p,h,v]),k=a??(w?n.jsx("span",{className:"filter-panel__header-summary body-3",children:w}):null),E=e||r||a||s,A=o.useId(),D=t?`h${t}`:"span";return n.jsxs("div",{className:xe("filter-panel",s?"filter-panel--collapsible":"",B?"filter-panel--collapsed":"",x),role:typeof e=="string"&&e?"group":void 0,"aria-labelledby":typeof e=="string"&&e?A:void 0,children:[E&&n.jsxs("div",{className:"filter-panel__header",onClick:s?f:void 0,children:[n.jsx("div",{className:"filter-panel__title-row",children:e&&n.jsx(D,{id:A,className:"filter-panel__title h4",children:e})}),n.jsxs("div",{className:"filter-panel__header-actions",children:[B?k:r,s&&n.jsx(me,{htmlType:"button",size:g,type:"dot",variant:"transparent-gray",useBorder:!1,icon:B?"chevron-down":"chevron-up",className:"filter-panel__collapse-toggle",ariaLabel:B?v("common.expand","\uD3BC\uCE58\uAE30"):v("common.collapse","\uC811\uAE30"),showTooltipInfo:B?v("common.expand","\uD3BC\uCE58\uAE30"):v("common.collapse","\uC811\uAE30"),"aria-expanded":!B,onClick:N})]})]}),!B&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:xe("filter-panel__sections",y?"filter-panel__sections--row":""),children:p.map(j=>{const $=h[j.label],H=$===void 0||(Array.isArray($)?$.length===0:!1),F=(j.items??[]).filter(T=>T!=null);j.allOption&&F.some(T=>(typeof T=="string"?T:T.value)===Dn)&&Tt(`filter-panel-all-value:${j.label}`,`[FilterPanel] '${j.label}' \uC808\uC5D0 allOption \uACFC \uAC12 '${Dn}' \uC778 \uBCF4\uAE30\uAC00 \uD568\uAED8 \uC788\uB2E4 \u2014 \uB450 \uC120\uD0DD\uC774 \uAD6C\uBCC4\uB418\uC9C0 \uC54A\uB294\uB2E4. \uBCF4\uAE30 \uAC12\uC744 \uBC14\uAFD4\uB77C.`);const U=T=>{const I=typeof T=="string"?T:T.value,z=typeof T!="string"&&!!T.disabled,ie=typeof T!="string"?T.labels:void 0,te=typeof T!="string"?T.displayLabel:void 0,P=typeof T!="string"?T.tooltip:void 0,G=typeof T!="string"?T.descriptionTooltip:void 0,X=typeof T!="string"?T.shape:void 0,K=Array.isArray($)?$.includes(I):$===I;return n.jsx(me,{htmlType:"button",size:"keyboard",label:ie??te??I,type:j.itemType??(ie?"bar":I.length===1?"dot":void 0),selected:K,disabled:z,shape:X,showTooltipInfo:!!P,tooltipInfoText:P,tooltipDescription:G,onClick:()=>d?.(I,j.label)},I)};return n.jsxs(o.Fragment,{children:[j.groupLabel&&n.jsxs("div",{className:"filter-panel__group-label-row",children:[n.jsx("div",{className:"filter-panel__group-label body-2",children:j.groupLabel}),j.groupAction]}),n.jsxs("div",{className:xe("filter-panel__section",j.layout==="row"?"filter-panel__section--row":"",j.block?"filter-panel__section--block":""),children:[n.jsxs("div",{className:"filter-panel__section-label-row",children:[n.jsx("span",{className:"filter-panel__section-label body-3",children:j.displayLabel??j.label}),j.labelAction??(j.labelInfo?n.jsx(sa,{...j.labelInfo}):null)]}),j.type==="note"?n.jsx("div",{className:"filter-panel__note body-3",children:j.content}):j.type==="input"?n.jsx(Un,{className:"filter-panel__textfield",placeholder:j.placeholder,ariaLabel:j.displayLabel??j.label,value:h[j.label]??"",onChange:T=>d?.(T,j.label),error:j.error}):!j.multiple&&j.display==="segmented"?n.jsx(kn,{ariaLabel:j.displayLabel??j.label,options:[...j.allOption?[{key:Dn,label:j.allLabel??v("common.all","\uC804\uCCB4"),disabled:j.allOptionDisabled}]:[],...F.map(T=>{const I=typeof T=="string"?T:T.value,z=typeof T!="string"?T.displayLabel:void 0,ie=typeof T!="string"?T.disabled:void 0;return{key:I,label:z??I,disabled:ie}})],value:H&&j.allOption?Dn:h[j.label]??"",onChange:T=>d?.(T,j.label),size:32}):!j.multiple&&j.display==="dropdown"?n.jsx(An,{className:"filter-panel__dropdown",ariaLabel:typeof j.label=="string"?j.label:void 0,size:g,options:[...j.allOption?[{value:Dn,label:j.allLabel??v("common.all","\uC804\uCCB4"),disabled:j.allOptionDisabled}]:[],...F.map(T=>{const I=typeof T=="string"?T:T.value,z=typeof T!="string"?T.displayLabel:void 0,ie=typeof T!="string"?T.disabled:void 0;return{value:I,label:z??I,disabled:ie}})],value:H&&j.allOption?Dn:h[j.label],onChange:T=>d?.(T,j.label)}):n.jsxs("div",{className:j.groups?"filter-panel__item-groups":"filter-panel__items",children:[j.allOption&&!j.groups&&n.jsx(me,{htmlType:"button",size:"keyboard",label:j.allLabel??v("common.all","\uC804\uCCB4"),selected:H,disabled:j.allOptionDisabled,onClick:()=>d?.(Dn,j.label)}),j.groups?j.groups.map((T,I)=>n.jsxs("div",{className:"filter-panel__item-group",children:[I===0&&j.allOption&&n.jsx(me,{htmlType:"button",size:"keyboard",label:j.allLabel??v("common.all","\uC804\uCCB4"),selected:H,disabled:j.allOptionDisabled,onClick:()=>d?.(Dn,j.label)}),T.filter(z=>z!=null).map(U)]},I)):F.map(U)]})]})]},j.label)})}),c!=null&&c!==!1&&n.jsx("div",{className:"filter-panel__footer body-3",children:c})]})]})}const Z_=[1,2,3,4,5,6,7,8,9,10,11,12],X_=[8,6,4,2,1],_n="show",Pn="hide",vd=["image","word","caption","standardPron"];function xd(e){return e.some(t=>(t.words??[]).some(r=>!!r.captionBadge||!!r.captionLabel))}function _d(e,t){return{label:e("wordTable.filter.composition","\uAD6C\uC131"),items:[{value:"image",disabled:!t.hasImage,displayLabel:e("wordTable.filter.image","\uC774\uBBF8\uC9C0")},{value:"word",displayLabel:e("wordTable.filter.word","\uB2E8\uC5B4")},{value:"caption",disabled:!t.hasCaption,displayLabel:e("wordTable.filter.caption","\uC720\uD615")},{value:"standardPron",displayLabel:e("wordTable.filter.standardPron","\uD45C\uC900 \uBC1C\uC74C")},{value:"colloquialPron",disabled:!t.hasColloquial,displayLabel:e("wordTable.filter.colloquialPron","\uAD6C\uC5B4\uCCB4 \uBC1C\uC74C")}],multiple:!0,allOption:!0}}function wd(e){return{label:e("wordTable.filter.paperOrientation","\uC6A9\uC9C0 \uBC29\uD5A5"),items:[{value:"landscape",displayLabel:e("wordTable.filter.landscape","\uAC00\uB85C")},{value:"portrait",displayLabel:e("wordTable.filter.portrait","\uC138\uB85C")}],display:"segmented"}}function Bd(e){return{label:e("wordTable.filter.border","\uC678\uACFD\uC120"),items:[{value:_n,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:Pn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function kd(e){return{label:e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4"),items:[{value:_n,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:Pn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Ad(e){return{label:e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4"),items:[{value:_n,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:Pn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Nd(e){return{label:e("wordTable.filter.cutLine","\uC808\uCDE8\uC120"),items:[{value:_n,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:"dashed",displayLabel:e("wordTable.filter.dotted","\uC810\uC120")},{value:"corner",displayLabel:e("wordTable.filter.corner","\uCF54\uB108")},{value:Pn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Ed(e){return{label:e("wordPrint.divLine","\uB300\uB9BD\uC120"),items:[{value:_n,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:Pn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function jd(e,t){const r=Math.max(1,Math.min(t.itemCount,t.max??t.itemCount));return{label:e(t.hasPairs?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord"),items:[r,...X_.filter(a=>a<r)].map(a=>({value:`${a}\uAC1C`,displayLabel:e("wordTable.filter.itemsPerPageOption",{count:a})})),display:"segmented"}}function Dd(e,t){return e>=t?Number.POSITIVE_INFINITY:e}function J_(e){return{label:e("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638"),items:[{value:"left",displayLabel:e("wordTable.filter.pageNumberLeft","\uC67C\uCABD")},{value:"center",displayLabel:e("wordTable.filter.pageNumberCenter","\uC911\uC559")},{value:"right",displayLabel:e("wordTable.filter.pageNumberRight","\uC624\uB978\uCABD")},{value:Pn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Sd(e){return e==="left"||e==="center"||e==="right"?e:"none"}function Td(e,t){return{[e("wordTable.filter.composition","\uAD6C\uC131")]:t.contentTypes,[e("wordTable.filter.paperOrientation","\uC6A9\uC9C0 \uBC29\uD5A5")]:t.orientation,[e("wordTable.filter.border","\uC678\uACFD\uC120")]:t.showOutline?_n:Pn,[e("wordTable.filter.cutLine","\uC808\uCDE8\uC120")]:t.cutLine,[e("wordPrint.divLine","\uB300\uB9BD\uC120")]:t.showDivLine?_n:Pn,...t.showTopInfo!=null?{[e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4")]:t.showTopInfo?_n:Pn}:{},...t.showBottomInfo!=null?{[e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4")]:t.showBottomInfo?_n:Pn}:{}}}function Md(e,t,r,a){return r===e("wordTable.filter.composition","\uAD6C\uC131")?t===Dn?(a.setContentTypes(()=>[]),!0):(a.setContentTypes(s=>s.includes(t)?s.filter(l=>l!==t):[...s,t]),!0):r===e("wordTable.filter.paperOrientation","\uC6A9\uC9C0 \uBC29\uD5A5")?(a.setOrientation(t==="landscape"?"landscape":"portrait"),!0):r===e("wordTable.filter.border","\uC678\uACFD\uC120")?(a.setShowOutline(t===_n),!0):r===e("wordTable.filter.cutLine","\uC808\uCDE8\uC120")?(a.setCutLine(t),!0):r===e("wordPrint.divLine","\uB300\uB9BD\uC120")?(a.setShowDivLine(t===_n),!0):r===e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4")?(a.setShowTopInfo?.(t===_n),!0):r===e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4")?(a.setShowBottomInfo?.(t===_n),!0):!1}function Q_(e){return"sections"in e}function Ws(e){const{t}=Ne.useTranslation(),{title:r,className:a,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c}=e,p={collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c};if(Q_(e))return n.jsx(Kn,{className:a,title:r??t("wordTable.filterTitle","\uD45C \uC124\uC815"),sections:e.sections,selected:e.selected,onSelect:e.onSelect,...p,align:"inline"});const{hasImage:h,hasColloquial:d,hasCaption:m,contentTypes:C,orientation:x,showOutline:g,cutLine:y,showDivLine:v,setters:_,showCutLine:b=!1,showDivLine2:B=!1,middleSections:N=[],extraSelected:f={},onExtraSelect:w,showPaperBands:k=!1,showTopInfo:E=!0,showBottomInfo:A=!0}=e,D=[_d(t,{hasImage:h,hasColloquial:d,hasCaption:m??!1}),wd(t),...N,Bd(t),...b?[Nd(t)]:[],...B?[Ed(t)]:[],...k?[kd(t),Ad(t)]:[]],j={...Td(t,{contentTypes:C,orientation:x,showOutline:g,cutLine:y,showDivLine:v,showTopInfo:E,showBottomInfo:A}),...f},$=(H,F)=>{Md(t,H,F,_)||w?.(H,F)};return n.jsx(Kn,{className:a,title:r??t("wordTable.filterTitle","\uD45C \uC124\uC815"),sections:D,selected:j,onSelect:$,...p,sectionAlign:"horizontal"})}function Hs(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function ew(e){return Hs(e).replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function Vs(e){return e.replace(/[\\/:*?"<>|]/g,"_").trim()}let Za=null,Rr=null;function tw(e,t,r,a="",s=""){if(e.length===0||Rr&&Rr.iframe.isConnected&&Date.now()-Rr.at<1e4)return;const l=a?Vs(a):"";Za?.();let i=null;if(l){const p=document.title;document.title=l,i=()=>{document.title=p,window.removeEventListener("afterprint",i),Za===i&&(Za=null)},Za=i,window.addEventListener("afterprint",i)}const u=document.createElement("iframe");u.style.cssText="position:fixed;left:-10000px;top:0;width:1200px;height:900px;border:0;",document.body.appendChild(u);const c=u.contentDocument;if(!c){u.remove();return}Rr={iframe:u,at:Date.now()},c.open(),c.write(qs(e,t,r,!0,l,s)),c.close(),u.contentWindow?.addEventListener("afterprint",()=>{i?.(),setTimeout(()=>{u.remove(),Rr?.iframe===u&&(Rr=null)},0)})}function qs(e,t,r,a=!1,s="",l=""){s=s?Vs(s):"";const i=Array.from(document.styleSheets).flatMap(d=>{try{return Array.from(d.cssRules).map(m=>m.cssText)}catch{return[]}}).join(`
848
+ `),g=x===-1?r:r.slice(0,x);l("comment",g),r=r.slice(g.length);continue}const u=r.match(/^\/\*[\s\S]*?\*\//);if(u){l("comment",u[0]),r=r.slice(u[0].length);continue}const c=r.match(/^(`(?:\\.|[^`])*`|"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*')/);if(c){l("string",c[0]),r=r.slice(c[0].length);continue}const p=r.match(/^\d+(?:\.\d+)?/);if(p){l("number",p[0]),r=r.slice(p[0].length);continue}const h=r.match(F4);if(h){l("keyword",h[0]),r=r.slice(h[0].length);continue}const d=r.match(/^[A-Za-z_$][A-Za-z0-9_$-]*/);if(d){const x=d[0];l(s&&P4.has(x)?"command":"identifier",x),r=r.slice(x.length);continue}const m=r.match(/^[=+\-*/%<>!&|^~?:]+/);if(m){l("operator",m[0]),r=r.slice(m[0].length);continue}const C=r.match(/^[()[\]{};.,]/);if(C){l("punctuation",C[0]),r=r.slice(1);continue}l("other",r[0]),r=r.slice(1)}return a}function O4({children:e,language:t="bash",title:r="",showCopy:a=!0,size:s="default",className:l=""}){const{t:i}=Ne.useTranslation(),[u,c]=o.useState(!1),p=R4(Oc(e)),h=o.useRef(null);o.useEffect(()=>()=>{h.current&&clearTimeout(h.current)},[]);const d=async()=>{try{if(!await iy(p))return;c(!0),h.current&&clearTimeout(h.current),h.current=setTimeout(()=>c(!1),2e3)}catch{}},m=I4(p,t),C=s==="small"?"caption-1":"body-3";return n.jsxs("div",{className:xe("code-box",s==="small"?"code-box--small":"",l),children:[(r||a)&&n.jsxs("div",{className:"code-box__header",role:"toolbar","aria-label":i("common.codeBlock","\uCF54\uB4DC \uBE14\uB85D"),children:[n.jsx("div",{className:"code-box__title caption-1",children:r}),a&&n.jsx(me,{htmlType:"button",className:"code-box__copy",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:u?"check":"copy",onClick:d,ariaLabel:u?i("common.copied","\uBCF5\uC0AC\uB428"):i("common.copyCode","\uCF54\uB4DC \uBCF5\uC0AC")})]}),n.jsx("pre",{className:"code-box__inner","data-lang":t,children:n.jsx("code",{children:m.map((x,g)=>n.jsx("span",{className:`code-token ${x.type} ${C}`,children:x.content},g))})})]})}function z4({count:e,actions:t,onClear:r,clearLabel:a,visible:s,content:l,max:i}){const u=wn()??Cn,{t:c}=Ne.useTranslation(),p=s!==void 0?s:e>0,h=a??c("bulkBar.clearSelection","\uC120\uD0DD \uD574\uC81C"),d=o.useRef(null),m=o.useRef(null),C=o.useRef(null),x=o.useRef(p);o.useLayoutEffect(()=>{const b=m.current,B=x.current;if(x.current=p,p&&!B){const N=typeof document<"u"?document.activeElement:null;C.current=N&&N!==document.body&&!b?.contains(N)?N:null}else!p&&B&&b&&b.contains(document.activeElement)&&Ta(b,C.current)},[p]);const[g,y]=o.useState(!1),v=o.useRef(!1),_=o.useRef(null);return o.useEffect(()=>{const b=d.current;if(!b)return;const B=A=>{v.current=A,y(A)},N=()=>{const A=b.firstElementChild??b,D=Array.from(A.children);if(D.length<2){B(!1);return}const j=D[0].offsetTop,$=D.some(I=>I.offsetTop!==j);if(!v.current){_.current=b.clientWidth,$&&B(!0);return}if($)return;const H=D[0],F=D[D.length-1],U=F.offsetLeft+F.offsetWidth-H.offsetLeft,T=_.current;(T==null||U<=T)&&B(!1)};if(N(),typeof ResizeObserver>"u")return;const f=new ResizeObserver(N);f.observe(b);const w=b.parentElement;let k=w?.clientWidth??0;const E=new ResizeObserver(()=>{const A=w?.clientWidth??0;A!==k&&(k=A,_.current=null,N())});return w&&E.observe(w),()=>{f.disconnect(),E.disconnect()}},[l,e]),n.jsxs("div",{ref:m,className:`bulk-bar ${p?"bulk-bar--visible":""}`,inert:!p||void 0,"aria-hidden":p?void 0:!0,children:[n.jsx("span",{ref:d,className:"bulk-bar__count body-2",role:"status",children:l??n.jsx("b",{children:c("common.selectedCount",{count:e})})}),i!==void 0&&n.jsx(cn,{size:"small",fill:"soft",variant:"main",label:`${e} / ${i}`,"aria-label":c("common.selectedOfMax",{count:e,max:i,defaultValue:`\uCD5C\uB300 ${i}\uAC1C \uC911 ${e}\uAC1C`})}),n.jsxs("div",{className:`bulk-bar__actions${g?" bulk-bar__actions--stacked":""}`,children:[n.jsx(me,{htmlType:"button",size:u,label:h,onClick:r}),t.map((b,B)=>n.jsx(me,{htmlType:"button",size:u,variant:b.variant??"default",icon:b.icon,label:b.label,onClick:b.onClick},B))]})]})}const W4=[{key:"edit",icon:"edit-2",closeFirst:!0},{key:"duplicate",icon:"copy",closeFirst:!1},{key:"publish",icon:"book-marked",closeFirst:!1},{key:"copyLink",icon:"link",closeFirst:!1},{key:"remove",icon:"trash-2",closeFirst:!0}];function H4(e){const{onClose:t,className:r}=e;return n.jsx("div",{className:xe("item-actions",r),children:W4.map(({key:a,icon:s,closeFirst:l})=>{const i=e[a];if(!i)return null;const u=a==="publish"?i.published?i.unpublish:i.publish:i;return n.jsx(me,{htmlType:"button",size:40,type:"dot",icon:s,ariaLabel:u.label,showTooltipInfo:u.label,onClick:()=>{l&&t(),u.onClick()}},a)})})}function V4({items:e,className:t,ariaLabel:r="\uC54C\uB9BC \uAE00",titleLevel:a=4,targetBytes:s}){const l=a?`h${a}`:"div";return n.jsx("div",{className:`notify-text-preview${t?` ${t}`:""}`,role:"group","aria-label":r,children:e.map(i=>{const u=s===void 0?gi(i.sms):gi(i.sms,s),c=u.type==="LMS";return n.jsxs("section",{className:"notify-text-preview__item",children:[n.jsxs("header",{className:"notify-text-preview__head",children:[n.jsx(l,{className:"notify-text-preview__name h5b",children:i.name}),i.meta&&Object.keys(i.meta).length>0?n.jsx("dl",{className:"notify-text-preview__meta caption-1",children:Object.entries(i.meta).map(([p,h])=>n.jsxs("div",{className:"notify-text-preview__meta-row",children:[n.jsx("dt",{children:p}),n.jsx("dd",{children:h})]},p))}):null]}),n.jsxs("div",{className:"notify-text-preview__body",children:[n.jsxs("div",{className:"notify-text-preview__col",children:[n.jsxs("div",{className:"notify-text-preview__col-head caption-1",children:[n.jsx("span",{children:"\uBB38\uC790"}),n.jsxs("span",{className:`notify-text-preview__bytes${c?" is-over":u.overTarget?" is-over-target":""}`,title:u.over?`${u.limit}\uBC14\uC774\uD2B8\uB97C \uB118\uC5C8\uB2E4 \u2014 \uBCF4\uB0BC \uB54C \uC798\uB9B0\uB2E4`:c?`${fi}\uBC14\uC774\uD2B8\uB97C \uB118\uC5B4 \uC7A5\uBB38\uC774\uB2E4 \u2014 \uD55C \uD1B5 \uAC12\uC774 \uB2E8\uBB38\uC758 \uB450 \uBC30 \uBC18\uC774\uB2E4`:u.overTarget?`\uACA8\uB204\uB294 ${u.target}\uBC14\uC774\uD2B8\uB97C \uB118\uC5C8\uB2E4 \u2014 \uD55C \uAE00\uC790\uB9CC \uB298\uC5B4\uB3C4 ${fi}\uC744 \uB118\uC5B4 \uC7A5\uBB38\uC774 \uB41C\uB2E4`:void 0,children:[u.bytes,u.target!==null?` / \uBAA9\uD45C ${u.target}`:"","\uBC14\uC774\uD2B8 \xB7 ",c?"\uC7A5\uBB38":"\uB2E8\uBB38",u.over?" \xB7 \uD55C\uACC4 \uB118\uC74C":c?" \xB7 \uAC12\uC774 \uB450 \uBC30 \uBC18":u.overTarget?" \xB7 \uBAA9\uD45C \uB118\uC74C":""]})]}),n.jsx("pre",{className:"notify-text-preview__text",children:i.sms})]}),i.ata?n.jsxs("div",{className:"notify-text-preview__col",children:[n.jsx("div",{className:"notify-text-preview__col-head caption-1",children:n.jsx("span",{children:"\uC54C\uB9BC\uD1A1"})}),n.jsx("pre",{className:"notify-text-preview__text",children:i.ata})]}):null]})]},i.name)})})}function zc({children:e,className:t}){const r=o.useRef(null),[a,s]=o.useState(null);return o.useEffect(()=>{s(r.current?.parentElement??null)},[]),o.useEffect(()=>{const l=r.current;if(!l||!a)return;const i=()=>{const c=typeof window<"u"&&window.getComputedStyle(l).position==="absolute"?Math.ceil(l.getBoundingClientRect().width):0;c>0?a.style.setProperty("--section-head-float-w",`${c}px`):a.style.removeProperty("--section-head-float-w")};if(i(),typeof ResizeObserver>"u")return()=>{a.style.removeProperty("--section-head-float-w")};const u=new ResizeObserver(()=>i());return u.observe(l),u.observe(a),()=>{u.disconnect(),a.style.removeProperty("--section-head-float-w")}},[a,e]),n.jsx("div",{ref:r,className:xe("section-head-float",t),children:e})}function Bs({items:e,className:t}){return n.jsx("div",{className:ce(t?`chart-section__legend ${t}`:"chart-section__legend"),children:e.map((r,a)=>n.jsxs("span",{className:ce("chart-section__legend-item"),children:[n.jsx("span",{className:ce("chart-section__legend-dot"),style:{background:r.color}}),r.label]},a))})}const mr=e=>`chart-section__total__num ${e?"h1":"h0"}`;function Tr({label:e,children:t}){return e?n.jsxs("div",{className:ce("chart-section__total chart-section__total--stacked"),children:[n.jsx("span",{className:ce("chart-section__total__label body-3"),children:e}),n.jsx("span",{className:ce("chart-section__total__value"),children:t})]}):n.jsx("div",{className:ce("chart-section__total"),children:t})}const Wc=20,Ua=120,q4=120,U4={xSmall:Ua,small:Ua,medium:Ua*2+Wc,large:Ua*2+Wc},Hc={xSmall:"chart-section--compact chart-section--xsmall",small:"chart-section--compact",medium:"chart-section--compact",xLarge:"chart-section--full"},fa=e=>{const t=parseFloat(e);return Number.isFinite(t)?t:0};function G4(e){if(!e)return 0;const t=Array.from(e.children);if(!t.length)return 0;const r=fa(getComputedStyle(e).columnGap);return t.reduce((a,s)=>a+s.getBoundingClientRect().width,0)+r*(t.length-1)}function Ga({type:e="chart",title:t,titleClassName:r,titleLevel:a,icon:s,disc:l,headRight:i,headFloat:u,headSegment:c,headMenuItems:p,collapseBelow:h=420,onClick:d,ariaLabel:m,tooltip:C,totalNum:x,totalUnit:g,totalMuted:y=!1,totalLabel:v,change:_,changeType:b,size:B,bodyAlign:N="bottom",subRow:f,legend:w,subRowAlign:k="start",className:E,inGrid:A=!1,fitBody:D=!1,children:j}){const $=e==="stat",H=B??($?"small":"large"),F=H==="xSmall"&&$,[U,T]=o.useState(!0),I=H==="xSmall"?F&&U?"xSmall":"small":H,z=F&&!U,ie=I==="xSmall",te=I==="xSmall"||I==="small"||I==="medium",P=r??"h5",G=a??($?0:3),{t:X}=Ne.useTranslation(),K=o.useRef(null),{anchorRect:L,openAt:R,close:S}=Fa(),V=o.useCallback(()=>{C&&K.current&&R(K.current)},[C,R]),[ae,ne]=o.useState(!1);da(()=>{const Fe=K.current;if(!Fe||!c)return;const Ue=Te=>ne(Te>0&&Te<h);if(Ue(Fe.clientWidth),typeof ResizeObserver>"u")return;const nt=new ResizeObserver(Te=>Ue(Te[0].contentRect.width));return nt.observe(Fe),()=>nt.disconnect()},[c,h]);const[re,ue]=o.useState(null),Be=o.useCallback(()=>ue(null),[]),le=o.useCallback(Fe=>{const Ue=Fe.currentTarget.getBoundingClientRect();ue(nt=>nt?null:{left:Ue.left,right:Ue.right,top:Ue.top,bottom:Ue.bottom,width:Ue.width,height:Ue.height,x:Ue.x,y:Ue.y})},[]),J=!!c&&ae;o.useEffect(()=>{J||ue(null)},[J]);const O=c?[...c.options.map(Fe=>({label:Fe.label,icon:Fe.icon,selected:Fe.key===c.value,disabled:Fe.disabled,onClick:()=>c.onChange(Fe.key),closeOnSelect:!0})),...(p??[]).map((Fe,Ue)=>Ue===0?{...Fe,separatorBefore:!0}:Fe)]:[],W=o.useCallback(Fe=>{if(!d)return;const Ue=Fe.target;Ue&&typeof Ue.closest=="function"&&Ue.closest('button, a, input, select, textarea, [role="radiogroup"]')||d()},[d]),q=o.useCallback(Fe=>{d&&Fe.target===Fe.currentTarget&&(Fe.key==="Enter"||Fe.key===" ")&&(Fe.preventDefault(),d())},[d]),oe=typeof i=="function"?i({collapsed:J}):i,ee=x!=null||v?n.jsxs(Tr,{label:v,children:[x!=null&&n.jsx("span",{className:ce(mr(te)),children:x}),g&&n.jsx("span",{className:ce("chart-section__total__unit body-3"),children:g})]}):null,be=oe||c?n.jsxs("div",{className:ce("chart-section__head-right"),children:[c&&(J?n.jsx(me,{htmlType:"button",size:hr,type:"dot",icon:"ellipsis",ariaLabel:c.ariaLabel??X("common.more","\uB354\uBCF4\uAE30"),showTooltipInfo:c.ariaLabel??X("common.more","\uB354\uBCF4\uAE30"),"aria-haspopup":"menu","aria-expanded":!!re,onClick:le}):n.jsx(kn,{size:hr,ariaLabel:c.ariaLabel,options:c.options.map(Fe=>({key:Fe.key,label:Fe.label,disabled:Fe.disabled})),value:c.value,onChange:c.onChange})),oe]}):null,je=o.useRef(null),[De,we]=o.useState(null);o.useLayoutEffect(()=>{const Fe=je.current;if(!Fe){we(null);return}const Ue=()=>{const Te=Fe.getBoundingClientRect().height;we(Xe=>Xe!=null&&Math.abs(Xe-Te)<1?Xe:Te)};if(Ue(),typeof ResizeObserver>"u")return;const nt=new ResizeObserver(Ue);return nt.observe(Fe),()=>nt.disconnect()},[w]);const ze=o.useId(),ye=G?`h${G}`:"div",_e=typeof I=="number"?I:U4[I],ve=b??(_===void 0?void 0:_>0?"up":_<0?"down":"neutral"),Ee=_===void 0?void 0:_>0?`+${_}`:`${_}`,Oe=o.useRef(null),ot=o.useRef(null);da(()=>{if(!F)return;const Fe=K.current;if(!Fe||typeof getComputedStyle!="function")return;const Ue=()=>{const Te=getComputedStyle(Fe),Xe=fa(Te.paddingLeft)+fa(Te.paddingRight)+fa(Te.borderLeftWidth)+fa(Te.borderRightWidth),rt=q4-Xe,ut=Math.max(Oe.current?.getBoundingClientRect().width??0,G4(ot.current));!(rt>0)||!(ut>0)||T(ut<=rt+.5)};if(Ue(),typeof ResizeObserver>"u")return;const nt=new ResizeObserver(Ue);return Oe.current&&nt.observe(Oe.current),ot.current&&nt.observe(ot.current),()=>nt.disconnect()},[F,t,x,g,Ee]);const it=C&&L?n.jsx(zn,{anchorRect:{left:L.left,top:L.top+21,right:L.right,bottom:L.bottom,width:L.width,height:L.height},text:C}):null;return $?n.jsxs("div",{ref:K,className:ce(["chart-section","chart-section--stat",A&&"chart-section--grid",N==="center"&&"chart-section--body-center",typeof I=="string"&&Hc[I],z&&"chart-section--span-two",d&&"chart-section--clickable",E].filter(Boolean).join(" ")),style:_e===void 0?void 0:{minHeight:_e},onClick:d?W:void 0,onKeyDown:d?q:void 0,onPointerEnter:C?V:void 0,onPointerLeave:C?S:void 0,onFocus:C?V:void 0,onBlur:C?S:void 0,role:d?"button":void 0,tabIndex:d?0:void 0,"aria-label":d?m??[typeof t=="string"?t:void 0,x,Ee].filter(Fe=>Fe!=null&&Fe!=="").join(" "):void 0,"aria-labelledby":!d&&t!=null?ze:void 0,children:[it,n.jsxs("div",{className:ce("chart-section__head"),children:[n.jsx(ye,{id:ze,className:ce(["chart-section__title",P].filter(Boolean).join(" ")),children:t}),F&&n.jsx("div",{ref:Oe,"aria-hidden":"true",className:ce(["chart-section__title",P,"chart-section__title--probe"].filter(Boolean).join(" ")),children:t}),s&&!ie&&n.jsx("span",{className:ce("chart-section__head-icon"),children:n.jsx(lt,{icon:s,className:ce("chart-section__head-icon-inner")})})]}),n.jsxs(n.Fragment,{children:[n.jsxs("div",{ref:ot,className:ce("chart-section__sub-row"),children:[n.jsxs(Tr,{children:[n.jsx("span",{className:ce([mr(!0),y&&"chart-section__total__num--muted"].filter(Boolean).join(" ")),children:x}),g&&n.jsx("span",{className:ce("chart-section__total__unit body-3"),children:g})]}),Ee&&n.jsx("div",{className:ce(`chart-section__change chart-section__change--${ve??"neutral"} caption-1`),children:Ee})]}),j&&n.jsx("div",{className:ce("chart-section__body"),children:j})]})]}):n.jsxs("section",{ref:K,className:ce(["chart-section",A&&"chart-section--grid",D&&"chart-section--fit",typeof I=="string"&&Hc[I],d&&"chart-section--clickable",E].filter(Boolean).join(" ")),style:{..._e===void 0?null:D?{minHeight:_e,height:_e}:{minHeight:_e},...De==null?null:{"--legend-h":`${De}px`}},onClick:d?W:void 0,onKeyDown:d?q:void 0,onPointerEnter:C?V:void 0,onPointerLeave:C?S:void 0,onFocus:C?V:void 0,onBlur:C?S:void 0,role:d?"button":void 0,tabIndex:d?0:void 0,"aria-label":d?m??(typeof t=="string"?t:void 0):void 0,"aria-labelledby":!d&&t!=null?ze:void 0,children:[C&&L&&n.jsx(zn,{anchorRect:{left:L.left,top:L.top+21,right:L.right,bottom:L.bottom,width:L.width,height:L.height},text:C}),u&&n.jsx(zc,{children:u}),n.jsxs("div",{className:ce("chart-section__head"),children:[n.jsxs("div",{className:ce("chart-section__title-row"),children:[s&&n.jsx(lt,{icon:s,label:typeof t=="string"?t:void 0,className:ce("chart-section__icon")}),n.jsx(ye,{id:ze,className:ce(["chart-section__title",P].filter(Boolean).join(" ")),children:t})]}),be,l&&n.jsx("div",{className:ce("chart-section__disc body-3"),children:l})]}),(ee||f)&&n.jsxs("div",{className:ce(["chart-section__sub-row",k!=="start"&&`chart-section__sub-row--${k}`].filter(Boolean).join(" ")),children:[ee,f]}),w&&n.jsx("div",{ref:je,className:ce("chart-section__legend-slot"),children:w}),j,re&&n.jsx(sn,{anchorRect:re,onClose:Be,ariaLabel:c?.ariaLabel??X("tooltip.menu","\uBA54\uB274"),children:n.jsx(nr,{columns:[{items:O}],onClose:Be,size:"small"})})]})}const Ca=(e,t)=>`${e}-${String(t).padStart(2,"0")}`,ks=e=>Ca(e.getFullYear(),e.getMonth()+1);function Mr(e){const t=/^(\d{4})-(\d{2})$/.exec(e);if(!t)return null;const r=Number(t[2]);return r>=1&&r<=12?{year:Number(t[1]),month1:r}:null}const As=(e,t)=>`${e}#${t}`;function Rn(e,t){const r=new Date(e,t,1).getDay();return 1+(8-(r===0?7:r))%7}function K4(){const e=kr();let t=e.getFullYear(),r=e.getMonth(),a=e.getDate();if(a<Rn(t,r)){const i=new Date(t,r,0);t=i.getFullYear(),r=i.getMonth(),a=i.getDate()}const s=Math.floor((a-Rn(t,r))/7),l=Ca(t,r+1);return{monthKey:l,value:As(l,s)}}function Y4(e){const t=kr(),r=ks(t),a=(c,p)=>Ca(c,p+1),s=new Map;s.set(r,[]);for(const c of e){if(isNaN(c.date.getTime()))continue;const p=a(c.date.getFullYear(),c.date.getMonth());s.has(p)||s.set(p,[]),s.get(p).push(c)}for(const[c,p]of[...s.entries()]){const h=Mr(c);if(!h)continue;const d=h.year,m=h.month1-1,C=Rn(d,m);if(!(c===r&&t.getDate()<C)&&!p.some(y=>y.date.getDate()<C))continue;const x=new Date(d,m,0),g=a(x.getFullYear(),x.getMonth());s.has(g)||s.set(g,[])}const l=new Map;for(const[c,p]of s){const h=Mr(c);if(!h)continue;const d=h.year,m=h.month1-1,C=new Date(d,m+1,0).getDate(),x=p.reduce((B,N)=>Math.max(B,N.parts?.length??0,N.partsB?.length??0),0),g=p.some(B=>B.partsB),y=new Array(C+1).fill(0),v=new Array(C+1).fill(0),_=Array.from({length:C+1},()=>new Array(x).fill(0)),b=Array.from({length:C+1},()=>new Array(x).fill(0));for(const B of p){const N=B.date.getDate();if(y[N]+=B.a,v[N]+=B.b,B.parts)for(let f=0;f<x;f++)_[N][f]+=B.parts[f]??0;if(B.partsB)for(let f=0;f<x;f++)b[N][f]+=B.partsB[f]??0}l.set(c,{year:d,month:m,daysInMonth:C,partsLen:x,hasPartsB:g,dayA:y,dayB:v,dayParts:_,dayPartsB:b})}const i=(c,p,h)=>new Date(c,p,h).getTime()>new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime(),u={};for(const[c,p]of l){const{year:h,month:d,daysInMonth:m,dayA:C,dayB:x,dayParts:g,dayPartsB:y}=p,v=h===t.getFullYear()&&d===t.getMonth(),_=t.getDate(),b=l.get(a(d===11?h+1:h,(d+1)%12)),B=p.partsLen,N=[];for(let w=1;w<=m;w++){const k=v&&w>_;N.push({label:String(w),...k&&C[w]===0&&x[w]===0?{future:!0}:{},a:k&&C[w]===0&&x[w]===0?-1:C[w],b:x[w],...B?{parts:g[w]}:{},...B&&p.hasPartsB?{partsB:y[w]}:{}})}const f=[];for(let w=Rn(h,d);w<=m;w+=7){const k=Math.max(0,w+6-m),E=k&&b?Math.max(B,b.partsLen):B,A=p.hasPartsB||!!(k&&b?.hasPartsB);let D=0,j=0;const $=new Array(E).fill(0),H=new Array(E).fill(0);for(let U=w;U<=Math.min(w+6,m);U++){D+=C[U],j+=x[U];for(let T=0;T<B;T++)$[T]+=g[U][T],H[T]+=y[U][T]}if(k&&b)for(let U=1;U<=k&&!i(b.year,b.month,U);U++){D+=b.dayA[U],j+=b.dayB[U];for(let T=0;T<b.partsLen;T++)$[T]+=b.dayParts[U][T],H[T]+=b.dayPartsB[U][T]}const F=k?`${(d+1)%12+1}/${k}`:`${w+6}`;f.push({label:`${f.length+1}\uC8FC`,sublabel:`[${w}\uC77C~${F}\uC77C]`,a:D,b:j,...E?{parts:$}:{},...E&&A?{partsB:H}:{}})}u[c]={weekly:f,daily:N}}return u}function Vc(){const e=kr(),t=e.getFullYear(),r=e.getMonth()+1,a=[];for(let s=2024;s<=t;s++){const l=s===t?r:12;for(let i=1;i<=l;i++)a.push({value:Ca(s,i),year:s,month:i})}return a.reverse()}Vc();function Z4(){return Vc()}function qc(e,t){const r=e("calendar.weekOrdinal",{returnObjects:!0,defaultValue:[]}),a=Array.isArray(r)&&typeof r[t]=="string"?r[t]:null;return e("calendar.weekLabel",{ord:a??String(t+1)})}function X4(e,t){const r=e("calendar.weekOrdinal",{returnObjects:!0,defaultValue:[]}),a=(Array.isArray(r)&&typeof r[t]=="string"?r[t]:null)??String(t+1);return e("calendar.weekLabelCompact",{ord:a,defaultValue:""})||qc(e,t)}function Uc(e){const{t,i18n:r}=Ne.useTranslation(),[a,s]=o.useState("week"),l=o.useMemo(()=>Z4().filter(A=>A.value in e),[e]),i=o.useMemo(()=>{const A=[];for(const D of l){const j=new Date(D.year,D.month,0).getDate(),$=Rn(D.year,D.month-1),H=Math.ceil((j-$+1)/7);for(let F=H-1;F>=0;F--)A.push({value:As(D.value,F),monthKey:D.value,year:D.year,month:D.month,week:F})}return A},[l]),u=o.useCallback((A,D)=>t("calendar.yearMonthCompact",{year:A,month:D,full:Ni(t,r.language,A,D),short:ny(A,D,r.language),defaultValue:"{{full}}"}),[t,r.language]),c=o.useCallback(A=>`${u(A.year,A.month)} ${X4(t,A.week)}`,[t,u]),p=o.useMemo(()=>l.map(A=>({value:A.value,label:u(A.year,A.month)})),[u,l]),h=o.useMemo(()=>i.map(A=>({value:A.value,label:c(A)})),[i,c]),d=o.useMemo(()=>K4(),[e]),m=o.useMemo(()=>l.find(A=>A.value===d.monthKey)?.value??l[0]?.value??"",[l,d]),C=o.useMemo(()=>i.find(A=>A.value===d.value)?.value??i[0]?.value??"",[i,d]),[x,g]=o.useState(""),[y,v]=o.useState("");o.useEffect(()=>{l.find(A=>A.value===x)||g(m)},[l,x,m]),o.useEffect(()=>{i.find(A=>A.value===y)||v(C)},[i,y,C]);const _=a==="month"?p:h,b=a==="month"?x:y,B=a==="month"?g:v,N=o.useMemo(()=>{const A=t("calendar.dow",{returnObjects:!0});return Array.isArray(A)?A:["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"]},[t]),f=_.findIndex(A=>A.value===b),w=o.useCallback(()=>{const A=_.findIndex(D=>D.value===b);A<_.length-1&&B(_[A+1].value)},[_,b,B]),k=o.useCallback(()=>{const A=_.findIndex(D=>D.value===b);A>0&&B(_[A-1].value)},[_,b,B]),E=o.useMemo(()=>[{key:"week",label:t("manager.chart.periodWeek","\uC8FC")},{key:"month",label:t("manager.chart.periodMonth","\uC6D4")}],[t]);return{period:a,setPeriod:s,range:b,setRange:B,activeOptions:_,activeIdx:f,handlePrev:w,handleNext:k,periodOptions:E,monthRange:x,weekRange:y,weekRanges:i,DOW:N}}const Wt=e=>typeof e=="number"&&Number.isFinite(e)?e:0;function Gn(e,t=!0){return e.future===!0||t&&e.a===-1}function J4({data:e,colorA:t,colorB:r,labelA:a,labelB:s,barWidth:l=10,barGap:i=1,height:u=140,fitHeight:c=!1,maxOverride:p,tightMax:h,seriesColors:d,seriesLabels:m,rateLabels:C,grouped:x=!1,baseline:g,focusableBars:y=!1}){const v=!r,_=!!(d&&d.length>0),b=g,B=o.useMemo(()=>_?Math.max(0,...e.filter(R=>!Gn(R,b==null)).map(R=>x?Math.max(0,...(R.parts??[]).map(Wt)):(R.parts??[]).reduce((S,V)=>S+Math.max(0,Wt(V)),0))):Math.max(0,...e.filter(R=>!Gn(R,b==null)).flatMap(R=>v?[Wt(R.a)]:[Wt(R.a),Wt(R.b)])),[e,v,_,x]),N=o.useMemo(()=>{if(b==null)return 0;const R=e.filter(S=>!Gn(S,b==null)).flatMap(S=>_?(S.parts??[]).map(Wt):v?[Wt(S.a)]:[Wt(S.a),Wt(S.b)]);return Math.max(0,...R.map(S=>Math.abs(S-b)))},[e,b,_,v]),f=o.useMemo(()=>{const R=b!=null?N:B;return p??(h?R>0?R:10:Math.ceil(R/10)*10||10)},[B,N,b,p,h]),w=o.useRef(null),k=o.useRef(null),[E,A]=o.useState(null);o.useLayoutEffect(()=>{if(!c){A(null);return}const R=w.current;if(!R)return;const S=()=>{const ae=k.current,ne=R.clientHeight-(ae?ae.getBoundingClientRect().height:0);ne<=0||A(re=>re!=null&&Math.abs(re-ne)<1?re:ne)};if(S(),typeof ResizeObserver>"u")return;const V=new ResizeObserver(S);return V.observe(R),k.current&&V.observe(k.current),()=>V.disconnect()},[c]);const D=E??u,j=_?x?Math.max(1,d.length):1:v?1:2,$={"--bar-width":`${o.useMemo(()=>{const R=Math.max(1,e.length);return Math.max(2,Math.min(l,Math.round(120/(R*j)+6)))},[e.length,j,l])}px`},H={"--bar-group-gap":`${Math.max(0,i)}px`},F=o.useMemo(()=>{const R=Math.round(f/2);return b!=null?[b+f,...R!==f?[b+R]:[],b,...R!==f?[b-R]:[],b-f]:R!==f?[f,R,0]:[f,0]},[f,b]),U=R=>b!=null?1-(R-(b-f))/(2*f):1-R/f,T=14,I=o.useMemo(()=>{const R=new Set;let S=Number.NEGATIVE_INFINITY;for(const V of F.slice(0,-1)){const ae=(b!=null?1-(V-(b-f))/(2*f):1-V/f)*D;ae-S>=T&&(R.add(V),S=ae)}return R},[F,b,f,D]),[z,ie]=o.useState(null),te=o.useCallback(()=>ie(null),[]),P=o.useCallback((R,S)=>{const V=[R.label,R.sublabel].filter(Boolean).join(" ");let ae;if(_&&x&&R.rawPartsB)ae=(m??[]).map((ne,re)=>{const ue=R.rawPartsB[re]??0;return{text:ue>0?`${ne}: ${S[re]??0}% (${R.rawParts?.[re]??0}/${ue})`:`${ne}: -`,color:(d??[])[re]}});else if(_&&x)ae=(m??[]).map((ne,re)=>({text:`${ne}: ${K(S[re]??0)}`,color:(d??[])[re]}));else if(_){const ne=(m??[]).map((ue,Be)=>({text:`${ue}: ${S[Be]??0}`,color:(d??[])[Be]})),re=ne.filter((ue,Be)=>(S[Be]??0)>0);ae=re.length?re:ne}else C&&!v?ae=[{text:`${a} ${Wt(R.a)}%`,color:t},{text:`${s} ${Wt(R.b)}%`,color:r}]:C&&R.rawB!==void 0?ae=[{text:`${C.total} ${R.rawB}`},{text:`${C.done} ${R.rawA??0}`,color:t}]:v?ae=[{text:`${a}: ${Wt(R.a)}`,color:t}]:ae=[{text:`${a}: ${Wt(R.a)}`,color:t},{text:`${s}: ${Wt(R.b)}`,color:r}];return{title:V,items:ae}},[_,x,m,d,C,v,a,s,t,r,b]),G=o.useCallback((R,S,V)=>{const ae=R.getBoundingClientRect(),{title:ne,items:re}=P(S,V);ie({rect:{left:ae.left,top:ae.top,right:ae.right,bottom:ae.bottom,width:ae.width,height:ae.height},title:ne,items:re})},[P]),X=o.useCallback((R,S)=>{const{title:V,items:ae}=P(R,S);return[V,...ae.map(ne=>ne.text)].filter(Boolean).join(", ")},[P]),K=R=>b!=null&&R>b?`+${R}`:`${R}`,L=z!=null;return o.useEffect(()=>{if(!L)return;const R=()=>ie(null),S=V=>{const ae=V.target;ae&&typeof ae.closest=="function"&&ae.closest(".bar-chart__col")||ie(null)};return window.addEventListener("scroll",R,!0),document.addEventListener("pointerdown",S,!0),()=>{window.removeEventListener("scroll",R,!0),document.removeEventListener("pointerdown",S,!0)}},[L]),n.jsxs("div",{ref:w,className:ce("bar-chart__wrap"),style:H,children:[n.jsx("div",{className:ce("bar-chart__inner"),children:n.jsx("div",{className:ce("bar-chart__scroll"),children:n.jsxs("div",{className:ce("bar-chart__area"),children:[n.jsxs("div",{className:ce("bar-chart__plot"),style:{height:D},children:[F.slice(0,-1).map((R,S)=>n.jsx("div",{className:ce(`bar-chart__gridline${b!=null&&R===b?" bar-chart__gridline--baseline":""}`),style:{top:U(R)*D},children:I.has(R)&&n.jsx("span",{className:ce("bar-chart__gridline__label caption-1"),children:R})},S)),e.map((R,S)=>{const V=Gn(R,b==null),ae=D/2,ne=le=>b!=null?Math.min(ae,Math.abs(Wt(le)-b)/f*ae):Math.min(D,Math.max(0,Wt(le)/f*D)),re=V?0:ne(R.a),ue=V?0:ne(R.b),Be=(R.parts??[]).map(Wt);return n.jsx("div",{className:ce(`bar-chart__col${x&&_?" bar-chart__col--group":""}`),style:{cursor:V?"default":"pointer"},tabIndex:y&&!V?0:void 0,role:y&&!V?"img":void 0,"aria-label":y&&!V?X(R,Be):void 0,onMouseEnter:V?void 0:le=>G(le.currentTarget,R,Be),onFocus:V||!y?void 0:le=>G(le.currentTarget,R,Be),onBlur:y?te:void 0,onMouseLeave:te,children:!V&&(_&&x?(d??[]).map((le,J)=>{const O=Be[J]??0;if(b==null)return n.jsx("div",{className:ce("bar-chart__bar"),style:{...$,height:ne(O),background:le}},J);const W=Wt(O)<b;return n.jsxs("div",{className:ce("bar-chart__slot"),style:$,children:[n.jsx("div",{className:ce("bar-chart__slot__half bar-chart__slot__half--up"),children:!W&&n.jsx("div",{className:ce("bar-chart__bar bar-chart__bar--full"),style:{height:ne(O),background:le}})}),n.jsx("div",{className:ce("bar-chart__slot__half bar-chart__slot__half--down"),children:W&&n.jsx("div",{className:ce("bar-chart__bar bar-chart__bar--full bar-chart__bar--down"),style:{height:ne(O),background:le}})})]},J)}):_?n.jsx("div",{className:ce("bar-chart__stack"),style:$,children:(()=>{const le=Be.reduce((O,W,q)=>W>0?q:O,-1);let J=D;return Be.map((O,W)=>{if(O<=0)return null;const q=Math.min(J,O/f*D);return J-=q,n.jsx("div",{className:ce("bar-chart__stack-segment"),style:{height:q,background:(d??[])[W],borderRadius:W===le?"6px 6px 0 0":void 0}},W)})})()}):b!=null?n.jsx(n.Fragment,{children:[{v:Wt(R.a),c:t},...v?[]:[{v:Wt(R.b),c:r}]].map(({v:le,c:J},O)=>n.jsxs("div",{className:ce("bar-chart__slot"),style:$,children:[n.jsx("div",{className:ce("bar-chart__slot__half bar-chart__slot__half--up"),children:le>=b&&n.jsx("div",{className:ce("bar-chart__bar bar-chart__bar--full"),style:{height:ne(le),background:J}})}),n.jsx("div",{className:ce("bar-chart__slot__half bar-chart__slot__half--down"),children:le<b&&n.jsx("div",{className:ce("bar-chart__bar bar-chart__bar--full bar-chart__bar--down"),style:{height:ne(le),background:J}})})]},O))}):n.jsxs(n.Fragment,{children:[n.jsx("div",{className:ce("bar-chart__bar"),style:{...$,height:re,background:t}}),!v&&n.jsx("div",{className:ce("bar-chart__bar"),style:{...$,height:ue,background:r}})]}))},S)})]}),n.jsx("div",{ref:k,className:ce("bar-chart__x-axis"),children:e.map((R,S)=>{const V=Gn(R,b==null);return n.jsxs("span",{className:ce(`bar-chart__x-axis__label${V?" bar-chart__x-axis__label--future":""}`),children:[n.jsxs("span",{className:ce("caption-1 bar-chart__x-axis__main"),children:[R.isToday&&n.jsx("span",{className:ce("bar-chart__x-axis__today-dot"),style:{background:t}}),R.label]}),R.sublabel&&n.jsx("span",{className:"caption-1",children:R.sublabel})]},S)})})]})})}),z&&n.jsx(er,{anchorRect:z.rect,title:z.title,items:z.items,showIndex:!1,closeOnOutsideClick:!1})]})}function Gc({control:e}){const{t}=Ne.useTranslation(),{activeOptions:r,activeIdx:a,range:s,setRange:l,handlePrev:i,handleNext:u,periodOptions:c,period:p,setPeriod:h}=e,d=p==="week"?t("calendar.prevWeek","\uC774\uC804 \uC8FC"):t("calendar.prevMonth","\uC774\uC804 \uB2EC"),m=p==="week"?t("calendar.nextWeek","\uB2E4\uC74C \uC8FC"):t("calendar.nextMonth","\uB2E4\uC74C \uB2EC");return n.jsxs("div",{className:ce("chart-section__controls"),children:[n.jsx(me,{htmlType:"button",size:hr,type:"dot",icon:"chevron-left",ariaLabel:d,showTooltipInfo:d,disabled:a===r.length-1,onClick:i}),n.jsx(An,{value:s,onChange:l,options:r,size:hr,className:"month-dropdown",ariaLabel:t("calendar.rangeSelect","\uAE30\uAC04 \uC120\uD0DD")}),n.jsx(me,{htmlType:"button",size:hr,type:"dot",icon:"chevron-right",ariaLabel:m,showTooltipInfo:m,disabled:a<=0,onClick:u}),n.jsx(kn,{ariaLabel:t("calendar.periodSelect","\uAE30\uAC04 \uB2E8\uC704"),options:c,value:p,onChange:C=>h(C),size:hr})]})}function Ns(e,t,r,a=!0){const s=new Date(r.getFullYear(),r.getMonth(),r.getDate());return Array.from({length:7},(l,i)=>{const u=new Date(t);u.setDate(t.getDate()+i);const c=(e[ks(u)]?.daily??[])[u.getDate()-1],p=c!=null&&Gn(c,a)||u>s;return{dt:u,entry:c,isFuture:p}})}function Q4(e,t,r,a=!0){const{period:s,monthRange:l,weekRange:i,weekRanges:u,DOW:c}=t,p=kr(),h=p.getFullYear(),d=p.getMonth()+1,m=p.getDate();if(s==="month"){const g=e[l]??{weekly:[],daily:[]},y=Mr(l),v=y?y.year:null,_=y?y.month1:null,b=v&&_?Rn(v,_-1):1;return g.weekly.map((B,N)=>{const f=N+1;let w=B.label,k=!1,E=!1;if(v&&_){const A=b+N*7,D=new Date(v,_-1,A+6),j=D.getMonth()+1,$=D.getDate(),H=j===_?`${$}`:`${j}/${$}`;w=r("manager.chart.weekRange",{start:A,end:H});const F=new Date(h,d-1,m).getTime();k=F>=new Date(v,_-1,A).getTime()&&F<=D.getTime(),E=v>h||v===h&&(_>d||_===d&&A>m)}return{...B,label:w,sublabel:qc(r,f-1),isToday:k,future:B.future===!0||E||void 0,a:E?-1:B.a,b:E?0:B.b}})}const C=u.find(g=>g.value===i);if(!C)return[];const x=new Date(C.year,C.month-1,Rn(C.year,C.month-1)+C.week*7);return Ns(e,x,p,a).map(({dt:g,entry:y,isFuture:v})=>{const _=g.getMonth()+1,b=g.getDate(),B=g.getFullYear();return{label:_===C.month&&B===C.year?`${b}`:`${_}/${b}`,sublabel:c[g.getDay()]??"",future:v||void 0,a:v?-1:y&&y.a>0?y.a:0,b:v?0:y&&y.b>0?y.b:0,isToday:B===h&&_===d&&b===m,...y?.parts?{parts:v?y.parts.map(()=>0):y.parts}:{},...y?.partsB?{partsB:v?y.partsB.map(()=>0):y.partsB}:{}}})}const e_={small:{height:100,barWidth:16},medium:{height:140,barWidth:20},large:{height:180,barWidth:24}};function t_({canvasHeight:e,fitHeight:t,focusableBars:r,size:a="medium",barWidth:s,titleKey:l,titleLevel:i,data:u,colorA:c,colorB:p,labelAKey:h,labelBKey:d,showTotal:m=!1,totalUnitKey:C,totalLabelKey:x,control:g,hideControls:y=!1,rate:v=!1,rateAgg:_="dayMean",tightMax:b=!1,avgMode:B=!1,totalFormat:N,series:f,seriesMode:w="stack",loading:k=!1,onDetail:E,headExtra:A,headSegment:D,icon:j,disc:$,onClick:H,cardAriaLabel:F,cardTooltip:U,detailSize:T=hr,barGap:I,baseline:z,className:ie,inGrid:te=!1}){const{t:P}=Ne.useTranslation(),G={...e_[a],...e===void 0?null:{height:e}},X=Uc(u),K=g??X,L=o.useMemo(()=>Q4(u,K,P,z==null),[u,K,P,z]),R=w==="group"&&!!f&&f.length>0;I!=null&&!R&&Tt("bar-chart-bargap-without-group","[BarChart] barGap \uC740 seriesMode='group' + series \uC5D0\uC11C\uB9CC \uC4F0\uC778\uB2E4 \u2014 \uADF8 \uBC16\uC5D0\uC11C\uB294 \uC544\uBB34 \uC77C\uB3C4 \uD558\uC9C0 \uC54A\uB294\uB2E4.");const S=o.useMemo(()=>{if(!v)return L;const O=K.period==="month"?Mr(K.monthRange):null,W=kr(),q=f?.length??0,oe=ee=>{const be=[],je=[],De=[];for(let we=0;we<q;we++){let ze=0,ye=0,_e=0;for(const ve of ee){const Ee=Wt(ve.a[we]),Oe=Wt(ve.b[we]);Oe<=0||(ze+=Ee,ye+=Oe,_e+=Ee/Oe*100)}be.push(_==="weighted"?ye>0?Math.round(ze/ye*100):0:ee.length?Math.round(_e/ee.length):0),je.push(ze),De.push(ye)}return{pct:be,ra:je,rb:De}};return L.map((ee,be)=>{let je=ee.a===-1?-1:ee.b>0?Math.round(ee.a/ee.b*100):0;if(O&&!Gn(ee)){const we=O.year,ze=O.month1-1,ye=Ns(u,new Date(we,ze,Rn(we,ze)+be*7),W).filter(_e=>!_e.isFuture);if(_==="weighted"){let _e=0,ve=0;for(const{entry:Ee}of ye)Ee&&Ee.b>0&&(_e+=Ee.a,ve+=Ee.b);je=ve>0?Math.round(_e/ve*100):0}else je=ye.length?Math.round(ye.reduce((_e,{entry:ve})=>_e+(ve&&ve.b>0?ve.a/ve.b*100:0),0)/ye.length):0}let De=null;if(R&&!Gn(ee)){let we;if(O){const ye=O.year,_e=O.month1-1;we=Ns(u,new Date(ye,_e,Rn(ye,_e)+be*7),W).filter(ve=>!ve.isFuture).map(({entry:ve})=>({a:ve?.parts??[],b:ve?.partsB??[]}))}else we=[{a:ee.parts??[],b:ee.partsB??[]}];const ze=oe(we);De={parts:ze.pct,rawParts:ze.ra,rawPartsB:ze.rb}}return{...ee,a:je,b:ee.a===-1?0:d&&ee.parts&&ee.parts[1]>0?Math.round(ee.parts[0]/ee.parts[1]*100):0,rawA:ee.a===-1?-1:ee.a,rawB:ee.b,...De??{}}})},[L,v,_,d,K.period,K.monthRange,u,R,f?.length]),V=o.useMemo(()=>{if(v||B){const W=(K.period==="week"?L:u[K.monthRange]?.daily??[]).filter(oe=>oe.a!==-1);if(W.length===0)return 0;if(v&&_==="weighted"){let oe=0,ee=0;for(const be of W)be.b>0&&(oe+=be.a,ee+=be.b);return ee>0?Math.round(oe/ee*100):0}const q=v?W.reduce((oe,ee)=>oe+(ee.b>0?ee.a/ee.b*100:0),0):W.reduce((oe,ee)=>oe+(ee.a>0?ee.a:0),0);return Math.round(q/W.length)}const O=K.period==="month"?u[K.monthRange]?.daily??[]:S;return z!=null?O.reduce((W,q)=>W+(Gn(q,!1)?0:Wt(q.a)+(d?Wt(q.b):0)),0):O.reduce((W,q)=>W+(q.a>0?q.a:0)+(d&&q.b>0?q.b:0),0)},[S,L,v,_,B,z,d,K.period,K.monthRange,u]),ae=f&&f.length>0?f.map(O=>({color:O.color,label:O.label})):[{color:c,label:P(h)},...d?[{color:p,label:P(d)}]:[]],ne=a==="small",re=a==="large",ue=ne?"medium":re?"xLarge":"large",Be=ie||void 0,le=l?P(l):"",J=le?P("trainingStatus.detailFor",{name:le,defaultValue:"{{name}} \uC0C1\uC138\uBCF4\uAE30"}):P("trainingStatus.detail","\uC0C1\uC138\uBCF4\uAE30");return n.jsx(Ga,{className:Be,size:ue,inGrid:te,icon:j,disc:$,onClick:H,ariaLabel:F,tooltip:U,headSegment:D,headMenuItems:E?[{label:J,icon:"list",onClick:E,closeOnSelect:!0}]:void 0,title:P(l),titleLevel:i,headRight:ne?A??void 0:({collapsed:O})=>n.jsxs(n.Fragment,{children:[!y&&n.jsx(Gc,{control:K}),A,E&&!O&&n.jsx("span",{className:ce("bar-chart__detail-btn"),children:n.jsx(me,{htmlType:"button",size:T,type:"dot",icon:"list",ariaLabel:J,showTooltipInfo:J,onClick:E})})]}),legend:n.jsx(Bs,{items:ae,className:"caption-1"}),fitBody:t,subRow:m&&n.jsx(n.Fragment,{children:v||B||x&&N?n.jsx(Tr,{label:ne?void 0:`${P(K.period==="week"?"manager.chart.weeklyPrefix":"manager.chart.monthlyPrefix")} ${P(x??h)}`,children:N?(N(V).match(/([+-]?\d[\d.,]*|[^\d]+)/g)??[]).map((O,W)=>/\d/.test(O)?n.jsx("span",{className:ce(mr(!re)),children:O},W):n.jsx("span",{className:ce("chart-section__total__unit body-3"),children:O},W)):n.jsxs(n.Fragment,{children:[n.jsx("span",{className:ce(mr(!re)),children:V}),C&&n.jsx("span",{className:ce("chart-section__total__unit body-3"),children:P(C)})]})}):n.jsxs(Tr,{children:[n.jsx("span",{className:ce(mr(!re)),children:V}),n.jsx("span",{className:ce("chart-section__total__unit body-3"),children:P(h)}),C&&n.jsx("span",{className:ce("chart-section__total__unit body-3"),children:P(C)})]})}),children:k?n.jsx("div",{className:ce("bar-chart__wrap bar-chart__loading"),"aria-busy":"true",children:n.jsx("div",{className:ce("bar-chart__inner"),children:n.jsxs("div",{className:ce("bar-chart__area bar-chart__area--loading"),children:[n.jsx("div",{className:ce("bar-chart__plot bar-chart__plot--loading"),style:{height:G.height},children:n.jsx(Nr,{size:32})}),n.jsx("div",{className:ce("bar-chart__x-axis"),"aria-hidden":"true",children:n.jsxs("span",{className:ce("bar-chart__x-axis__label"),children:[n.jsx("span",{className:ce("caption-1 bar-chart__x-axis__main"),children:"\xA0"}),S.some(O=>!!O.sublabel)&&n.jsx("span",{className:"caption-1",children:"\xA0"})]})})]})})}):n.jsx(J4,{focusableBars:r,data:S,colorA:c,colorB:d?p:void 0,labelA:P(h),labelB:d?P(d):void 0,barWidth:s??G.barWidth,barGap:I,baseline:z,height:G.height,fitHeight:t,maxOverride:v?100:void 0,tightMax:b,seriesColors:f?.map(O=>O.color),seriesLabels:f?.map(O=>O.label),rateLabels:v?{total:P("trainingStatus.today.tooltipTotal","\uC804\uCCB4"),done:P("trainingStatus.today.tooltipDone","\uC644\uB8CC")}:void 0,grouped:R})})}const Kc=120,n_={left:38,right:16,top:26,bottom:24};function r_({points:e=[],range:t,ticks:r=[],axisTitle:a,color:s,height:l=156,fallbackWidth:i=320,insets:u,overlay:c,ariaLabel:p,className:h}){const[d,m]=o.useState(null),[C,x]=o.useState(null);o.useEffect(()=>{if(!C)return;const T=z=>m(Math.round(z)||null);if(T(C.getBoundingClientRect().width),typeof ResizeObserver>"u")return;const I=new ResizeObserver(([z])=>T(z.contentRect.width));return I.observe(C),()=>{I.disconnect()}},[C]);const{payload:g,anchorRect:y,openAfterDelay:v,close:_}=mv(Kc),b=o.useCallback((T,I)=>{T&&v(T,I.getBoundingClientRect())},[v]),B=d??i,N=l,{left:f,right:w,top:k,bottom:E}={...n_,...u},[A,D]=t,j=T=>D===A?f:f+(B-f-w)*(T-A)/(D-A),$=T=>k+(N-k-E)*(100-T)/100,H={x:j,y:$,plot:{left:f,right:B-w,top:k,bottom:N-E,width:Math.max(0,B-f-w),height:Math.max(0,N-k-E)}},F=e.filter(T=>!T.hollow),U=s??"var(--color-main)";return n.jsxs(n.Fragment,{children:[n.jsxs("svg",{ref:x,className:xe("line-chart",h),viewBox:`0 0 ${B} ${N}`,role:"img","aria-label":p??e.map(T=>T.description).filter(Boolean).join(", "),children:[a&&n.jsx("text",{className:"line-chart__axis-title",x:0,y:12,children:a}),[0,100].map(T=>n.jsxs("g",{children:[n.jsx("line",{className:"line-chart__grid",x1:f,x2:B-w,y1:$(T),y2:$(T)}),n.jsxs("text",{className:"line-chart__tick",x:f-6,y:$(T)+4,textAnchor:"end",children:[T,"%"]})]},T)),c?.(H),r.map(T=>n.jsx("text",{className:"line-chart__tick",x:j(T.x),y:N-5,textAnchor:"middle",children:T.label},T.x)),F.length>1&&n.jsx("polyline",{className:"line-chart__line",fill:"none",stroke:U,points:F.map(T=>`${j(T.x)},${$(T.pct)}`).join(" ")}),e.map(T=>n.jsxs("g",{className:"line-chart__dot",onPointerEnter:I=>b(T.description,I.currentTarget),onPointerLeave:_,children:[n.jsx("circle",{className:"line-chart__dot-hit",cx:j(T.x),cy:$(T.pct),r:12}),n.jsx("circle",{className:xe("line-chart__dot-main",T.hollow&&"is-hollow"),cx:j(T.x),cy:$(T.pct),r:4,stroke:U,fill:T.hollow?void 0:U})]},T.x))]}),g!=null&&n.jsx(sn,{anchorRect:y,offset:10,closeOnOutsideClick:!1,className:"line-chart__tip",role:"tooltip",ariaLabel:g,children:g})]})}function a_({icon:e,iconSize:t=56,title:r,titleClass:a="h2",description:s,tipGroups:l,start:i,className:u}){return n.jsxs("div",{className:xe("game-intro",u),children:[e!=null&&n.jsx("span",{className:"game-intro__icon","aria-hidden":"true",style:{"--game-intro-icon":`${t}px`},children:e}),n.jsx("h2",{className:xe("game-intro__title",a),children:r}),s!=null&&n.jsx("p",{className:"game-intro__description body-3",children:s}),l?.map((c,p)=>n.jsxs("div",{className:"game-intro__tips",children:[c.title!=null&&n.jsx("span",{className:"game-intro__tips-title body-3",children:c.title}),c.tips.map((h,d)=>n.jsxs("span",{className:"game-intro__tip body-3",children:[h.icon!=null&&n.jsx("span",{"aria-hidden":"true",children:h.icon}),n.jsx("span",{children:h.text})]},d))]},p)),i&&n.jsx(me,{htmlType:"button",className:i.className,variant:"main",color:i.color,size:48,width:"100%",disabled:i.disabled,onClick:i.onClick,children:i.label})]})}const Yc=(e,t,r)=>{const a=new Date(Date.UTC(e,t,r));return`${a.getUTCFullYear()}-${String(a.getUTCMonth()+1).padStart(2,"0")}-${String(a.getUTCDate()).padStart(2,"0")}`},Zc=(e,t,r,a)=>({from:Ei(e,t,r),to:new Date(Ei(e,t,r+a).getTime()-1),fromYmd:Yc(e,t,r),toYmd:Yc(e,t,r+a-1)});function o_(e,t=0){if(e.period==="month"){const s=Mr(e.monthRange),l=kr(),i=s?s.year:l.getFullYear(),u=(s?s.month1:l.getMonth()+1)-1+t,c=new Date(Date.UTC(i,u+1,0)).getUTCDate();return Zc(i,u,1,c)}const r=e.weekRanges.find(s=>s.value===e.weekRange);if(!r){const s=new Date,l=Qr();return{from:s,to:s,fromYmd:l,toYmd:l}}const a=Rn(r.year,r.month-1);return Zc(r.year,r.month-1,a+(r.week+t)*7,7)}const Es={small:{diameter:96,strokeWidth:16},medium:{diameter:120,strokeWidth:18},large:{diameter:160,strokeWidth:22}};function Xc(e){return!Number.isFinite(e)||e<=0?0:e>=1?100:Math.min(99,Math.max(1,Math.round(e*100)))}function Jc({done:e,total:t,segments:r,color:a="var(--color-main)",size:s="medium",strokeWidth:l,label:i="%",hideCenter:u=!1,hideLabel:c=!1}){const p=typeof s=="number"?s:Es[s].diameter,h=l??(typeof s=="number"?12:Es[s].strokeWidth),d=p/2,m=(p-h)/2,C=2*Math.PI*m;if(r&&r.length>0){const v=r.reduce((_,b)=>{const B=_.length>0?_[_.length-1].acc:0,N=Number.isFinite(b.ratio)?b.ratio:0,f=Math.max(0,Math.min(N,1-B));return _.push({color:b.color,rotate:-90+B*360,dash:C*f,acc:B+f}),_},[]);return n.jsx("div",{className:"ring-chart",style:{width:p,height:p},children:n.jsxs("svg",{width:p,height:p,viewBox:`0 0 ${p} ${p}`,"aria-hidden":"true",children:[n.jsx("circle",{cx:d,cy:d,r:m,fill:"none",stroke:"var(--color-whiteLine)",strokeWidth:h}),v.map((_,b)=>_.dash>0&&n.jsx("circle",{cx:d,cy:d,r:m,fill:"none",stroke:_.color,strokeWidth:h,strokeDasharray:`${_.dash} ${C}`,strokeLinecap:"round",transform:`rotate(${_.rotate} ${d} ${d})`},b))]})})}const x=(t??0)>0?Math.min((e??0)/t,1):0,g=C*x,y=C-g;return n.jsxs("div",{className:"ring-chart",style:{width:p,height:p},children:[n.jsxs("svg",{width:p,height:p,viewBox:`0 0 ${p} ${p}`,"aria-hidden":"true",children:[n.jsx("circle",{cx:d,cy:d,r:m,fill:"none",stroke:"var(--color-whiteLine)",strokeWidth:h}),x>0&&n.jsx("circle",{cx:d,cy:d,r:m,fill:"none",stroke:a,strokeWidth:h,strokeDasharray:`${g} ${y}`,strokeLinecap:x<.02||x>.98?"butt":"round",transform:`rotate(-90 ${d} ${d})`})]}),!u&&n.jsxs("div",{className:`ring-chart__center${c?"":` ${p<=96?"ring-chart__center--small":s==="medium"?"ring-chart__center--medium":"ring-chart__center--large"}`}`,children:[n.jsx("span",{className:`ring-chart__pct ${p<=96?"h2":"h1"}`,children:Xc(x)}),!c&&n.jsx("span",{className:`ring-chart__label ${p<=96?"caption-2":"caption-1"}${p<=96||s==="medium"?" ring-chart__label--tight":""}`,children:i})]})]})}function s_({titleKey:e,titleLevel:t,headRight:r,icon:a,showTotal:s,totalLabelKey:l,legend:i,loading:u,className:c,inGrid:p=!1,onClick:h,ariaLabel:d,tooltip:m,...C}){const{t:x}=Ne.useTranslation();if(!e)return n.jsx(Jc,{...C});const g=(C.total??0)>0?Xc(Math.min((C.done??0)/C.total,1)):0,y=C.size==="small",v=typeof C.size=="number"?C.size:Es[C.size??"medium"].diameter,_=C.size==="large",b=y?"medium":_?"xLarge":"large",B=c||void 0,N=a&&n.jsx("span",{className:ce("chart-section__head-icon"),children:n.jsx(lt,{icon:a,className:ce("chart-section__head-icon-inner")})});return n.jsx(Ga,{className:B,size:b,inGrid:p,onClick:h,ariaLabel:d,tooltip:m,title:x(e),titleLevel:t,headRight:N||(y?void 0:r),legend:i&&n.jsx(Bs,{items:i}),subRow:s&&n.jsxs(Tr,{label:!y&&l?x(l):void 0,children:[n.jsx("span",{className:ce(mr(y)),children:g}),n.jsx("span",{className:ce("chart-section__total__unit body-3"),children:"%"})]}),children:u?n.jsx("div",{className:ce("ring-chart-section-body ring-chart-section-body--offset"),children:n.jsx("div",{className:"ring-chart ring-chart--loading",style:{width:v,height:v},"aria-busy":"true",children:n.jsx(Nr,{size:32})})}):n.jsx("div",{className:ce("ring-chart-section-body ring-chart-section-body--offset"),children:n.jsx(Jc,{...C,hideCenter:C.hideCenter??y})})})}function l_({label:e,value:t,change:r,changeType:a,icon:s,tooltip:l,onClick:i,size:u="small",bodyAlign:c="bottom",children:p}){return n.jsx(Ga,{type:"stat",title:e,totalNum:t,change:r,changeType:a,icon:s,tooltip:l,onClick:i,size:u,bodyAlign:c,children:p})}function Qc({value:e,onChange:t,min:r=0,max:a=100,step:s=1,orientation:l="horizontal",size:i=24,disabled:u=!1,ariaLabel:c,length:p,className:h,label:d,formatValue:m,labelPos:C,labelAlign:x="right",showMinMax:g=!1,minLabel:y,maxLabel:v,showBgTick:_=!1,showFillTick:b=!1,tickStep:B,tickShape:N="dot"}){t&&!c&&Tt("Slider:unnamed","[ihab/Slider] \uC774\uB984\uC774 \uC5C6\uC2B5\uB2C8\uB2E4 \u2014 ariaLabel \uC744 \uC8FC\uC138\uC694. label prop \uC740 \uAC12 \uD45C\uAE30 \uBC29\uC2DD\uC774\uC9C0 \uC774\uB984\uC774 \uC544\uB2D9\uB2C8\uB2E4.");const f=Math.min(a,Math.max(r,e)),w=a>r?(f-r)/(a-r):0,k=l==="vertical",E=!t,A=X=>t?.(Number(X.target.value)),D=typeof p=="number"?`${p}px`:p,j={"--slider-ratio":String(w),"--slider-thumb":`${i}px`,...D?k?{height:D}:{width:D}:{}},$=B??s,H=(_||b)&&$>0&&a>r?Math.floor((a-r)/$+1e-6):0;if(H>0&&H<=100){const X=N!=="dash",K=ae=>X?`radial-gradient(circle, ${ae} 0.5px, transparent 1px)`:k?`linear-gradient(to bottom, transparent calc(50% - 2px), ${ae} calc(50% - 2px), ${ae} calc(50% + 2px), transparent calc(50% + 2px))`:`linear-gradient(to right, transparent calc(50% - 2px), ${ae} calc(50% - 2px), ${ae} calc(50% + 2px), transparent calc(50% + 2px))`,L=X?"2px":"4px",R=[],S=[],V=[];for(let ae=0;ae<=H;ae++){const ne=ae*$/(a-r);if(ne>1+1e-6)break;const re=`${((k?1-ne:ne)*100).toFixed(4)}%`,ue=ne<=w+1e-6;if(ue?!b:!_)continue;const Be=ue?"var(--slider-tick-color-on-fill, var(--color-deepWhite))":"var(--slider-tick-color, var(--color-lightGray))";R.push(K(Be)),S.push(k?`${L} var(--slider-thumb)`:`var(--slider-thumb) ${L}`),V.push(k?`center ${re}`:`${re} center`)}R.push(k?"linear-gradient(to top, var(--slider-fill-color) var(--slider-fill), var(--color-darkWhite) var(--slider-fill))":"linear-gradient(to right, var(--slider-fill-color) var(--slider-fill), var(--color-darkWhite) var(--slider-fill))"),S.push("100% 100%"),V.push("0 0"),j.backgroundImage=R.join(", "),j.backgroundSize=S.join(", "),j.backgroundPosition=V.join(", "),j.backgroundRepeat="no-repeat"}const F=m?m(f):d==="percent"?`${Math.round(a>r?(f-r)/(a-r)*100:0)}%`:d==="count"?`${f} / ${a}`:f===r&&y?y:f===a&&v?v:void 0,U=n.jsx("input",{type:"range",className:xe("slider",`slider--${l}`,E&&"slider--static",!d&&!g&&h),min:r,max:a,step:s,value:f,disabled:u,readOnly:E,tabIndex:E?-1:void 0,"aria-label":c,"aria-valuetext":F,"aria-orientation":l,onChange:A,style:j});if(!d&&!g)return U;const T=n.jsx("span",{className:"slider-wrap__minmax caption-1",children:y??r}),I=n.jsx("span",{className:"slider-wrap__minmax caption-1",children:v??a}),z=g?n.jsxs("div",{className:xe("slider-track-group",`slider-track-group--${l}`,!d&&h),children:[k?I:T,U,k?T:I]}):U;if(!d)return z;const ie=C??(k?"bottom":"right"),te=`${Math.round(a>r?(f-r)/(a-r)*100:0)}%`,P=m?m(f):d==="percent"?te:d==="count"?`${f} / ${a}`:String(f),G=n.jsx("span",{className:"slider-wrap__value body-3b",children:P});return n.jsxs("div",{className:xe("slider-wrap",`slider-wrap--${l}`,`slider-wrap--label-${ie}`,`slider-wrap--align-${x}`,h),children:[z,G]})}const i_=.86,u_=250,js=(e,t,r,a)=>Math.round(Math.min(a,Math.max(r,e-t))),Ds=(e,t,r,a)=>{const s=js(e,t,r,a);return`${s<0?"-":"+"}${Math.abs(s)} dB`};function Ss({analyser:e,audioElement:t,orientation:r="horizontal",length:a,label:s,labelPos:l,labelAlign:i="right",floorDb:u=-60,refDb:c=-35,displayMin:p=-5,displayMax:h=25,className:d,ariaLabel:m}){const C=o.useRef(null),x=o.useRef(null),g=o.useRef(null),y=o.useRef(null),[v,_]=o.useState(null);o.useEffect(()=>{const f=U=>{const T=Ds(U,c,p,h);g.current&&(g.current.textContent=T);const I=C.current;I&&(I.setAttribute("aria-valuenow",String(js(U,c,p,h))),I.setAttribute("aria-valuetext",T))},w=e??ub(t)??(v&&v.el===t?v.node:null),k=x.current;if(!w||!k){k?.style.setProperty("--meter-level","0"),f(u);let U=!1;return!e&&t&&_a(t).then(T=>{!U&&T&&_({el:t,node:T})}),()=>{U=!0}}jo();const E=new Float32Array(w.fftSize);let A=0,D=0,j=0,$=0,H=null;const F=U=>{const T=cb(w,E);A=T>A?T:A*i_;const I=A>1e-5?20*Math.log10(A):-1/0,z=Math.max(u,I),ie=z-c,te=Math.min(1,Math.max(0,(ie-p)/(h-p)));if(k.style.setProperty("--meter-level",te.toFixed(3)),D+=z,j+=1,U-$>=u_){const P=D/j;H=H==null?P:H*.6+P*.4,f(H),D=0,j=0,$=U}y.current=requestAnimationFrame(F)};return y.current=requestAnimationFrame(F),()=>{y.current!=null&&cancelAnimationFrame(y.current),y.current=null}},[e,t,v,u,c,p,h]);const b=typeof a=="number"?`${a}px`:a,B=n.jsx("div",{className:"audio-meter__track",style:b?r==="vertical"?{height:b}:{width:b}:{},children:n.jsx("div",{ref:x,className:"audio-meter__fill"})}),N=l??(r==="vertical"?"bottom":"right");return n.jsxs("div",{ref:C,className:xe("audio-meter",`audio-meter--${r}`,s&&`audio-meter--label-${N}`,s&&`audio-meter--align-${i}`,d),role:"meter","aria-label":m,"aria-valuemin":p,"aria-valuemax":h,"aria-valuenow":js(u,c,p,h),"aria-valuetext":Ds(u,c,p,h),children:[B,s&&n.jsx("span",{ref:g,className:"audio-meter__value caption-2",children:Ds(u,c,p,h)})]})}const ed=260;function td({message:e,position:t,duration:r,onClose:a}){const[s,l]=o.useState(!1),[i,u]=o.useState(!1),c=o.useRef(i),p=o.useRef(s);o.useEffect(()=>{c.current=i},[i]),o.useEffect(()=>{p.current=s},[s]);const h=o.useRef(null),d=o.useRef(""),m=o.useRef(a);o.useEffect(()=>{m.current=a});const C=r,x=o.useRef(null),g=o.useRef(0),y=o.useRef(0),v=o.useRef(!1),_=o.useRef(null),b=o.useRef(null),B=o.useRef(null),N=o.useRef(null),f=o.useRef(()=>{});f.current=E=>{E<0||(g.current=Date.now(),y.current=E,x.current=setTimeout(()=>{x.current=null,l(!1),_.current=setTimeout(()=>{u(!1);try{m.current()}catch{}},ed)},E))};const w=o.useCallback(()=>{v.current||!x.current||(v.current=!0,clearTimeout(x.current),x.current=null,y.current=Math.max(0,y.current-(Date.now()-g.current)))},[]),k=o.useCallback(()=>{v.current&&(v.current=!1,f.current(y.current))},[]);return o.useEffect(()=>{if(e!==d.current&&(x.current&&(clearTimeout(x.current),x.current=null),_.current&&(clearTimeout(_.current),_.current=null)),e){if(p.current)return C>0&&!x.current&&(v.current?y.current=C:f.current(C)),d.current=e,()=>{x.current&&(clearTimeout(x.current),x.current=null),_.current&&(clearTimeout(_.current),_.current=null)};const E=()=>{const A=h.current;if(A)try{A.classList.remove("is-visible"),A.style.transition="none",t==="top"?A.style.transform="translateX(-50%) translateY(-16px)":A.style.transform="translateX(-50%) translateY(16px)",A.style.opacity="0",A.offsetWidth,A.style.transition="",A.classList.add("is-visible"),N.current&&clearTimeout(N.current),N.current=setTimeout(()=>{N.current=null;try{A.style.opacity="",A.style.transform="",A.style.transition=""}catch{}},60)}catch{}};c.current?(E(),l(!0)):(u(!0),b.current=requestAnimationFrame(()=>{B.current=requestAnimationFrame(()=>{E(),l(!0)})})),C>0&&(v.current=!1,f.current(C))}else l(!1),_.current=setTimeout(()=>u(!1),ed);return d.current=e,()=>{x.current&&clearTimeout(x.current),_.current&&clearTimeout(_.current),b.current&&cancelAnimationFrame(b.current),B.current&&cancelAnimationFrame(B.current),N.current&&clearTimeout(N.current),x.current=null,_.current=null,b.current=null,B.current=null,N.current=null}},[e,C,t]),{mounted:i,showing:s,popupRef:h,pause:w,resume:k}}function $r({message:e="",position:t="top",type:r="normal",onClose:a=()=>{},duration:s=2e3}){const{mounted:l,showing:i,popupRef:u,pause:c,resume:p}=td({message:e,position:t,duration:s,onClose:a}),h=o.useRef(null),[d,m]=o.useState(!1);if(o.useEffect(()=>{i?m(!0):l||m(!1)},[i,l]),!l)return null;const C=r==="notice"||r==="warning"?r:"normal",x=n.jsx("div",{ref:u,className:`toast toast--${t} ${i?"is-visible":""}`,role:"status","aria-live":"polite",onPointerEnter:g=>{h.current=g.pointerType},onMouseEnter:()=>{h.current!=="touch"&&c()},onMouseLeave:p,onFocusCapture:c,onBlurCapture:p,children:n.jsx("div",{className:`toast__inner toast__inner--${C} body-2`,"aria-hidden":d||i?void 0:!0,children:n.jsx("span",{className:"toast__text",children:e})})});return typeof document<"u"?bn.createPortal(x,document.body):x}const c_=24;function d_({value:e,max:t=100,size:r=8,color:a,trackColor:s,label:l,formatValue:i,labelPos:u,labelAlign:c="right",ariaLabel:p,className:h}){const d=Number.isFinite(t)&&t>0?t:1,m=Math.max(0,Math.min(Number.isFinite(e)?e:0,d)),C=m/d*100,x=Number.isFinite(t)&&t>0?t:0,g=u??(r>=c_?"inside":"bottom"),y=g==="center"?"inside":g,v=y==="inside"&&(c==="left"?C>=15:c==="center"?C>=50:C>=85),_={};return a&&(_["--progress-bar-fill"]=a),s&&(_["--progress-bar-track"]=s),n.jsxs("div",{className:xe("progress-bar",`progress-bar--${r}`,`progress-bar--label-${y}`,l&&`progress-bar--align-${c}`,l&&v&&"progress-bar--label-on-fill",h),style:_,children:[n.jsx("div",{className:"progress-bar__track",role:"progressbar","aria-valuenow":m,"aria-valuemin":0,"aria-valuemax":x,"aria-valuetext":l?i?i(m):l==="percent"?void 0:l==="raw"?String(m):`${m} / ${x}`:void 0,"aria-label":p,children:n.jsx("div",{className:"progress-bar__fill",style:{width:`${C}%`}})}),l&&n.jsx("span",{className:"progress-bar__label caption-1b",children:i?i(m):l==="percent"?`${Math.round(C)}%`:l==="raw"?String(m):`${m} / ${x}`})]})}const nd={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0},p_="rgba(255, 255, 255, 0.16)";function rd({max:e,index:t,inactiveBg:r,inactiveColor:a,transparent:s,variant:l="numbered",announce:i=!1,ariaLabel:u}){const{t:c}=Ne.useTranslation(),p=Bn("(max-width: 767px)");if(!Number.isInteger(e)||e<=0)return null;const h=Number.isInteger(t)?Math.max(0,Math.min(t,e-1)):0,d=u??c("progress.steps",{current:h+1,total:e,defaultValue:"\uC9C4\uD589 \uB2E8\uACC4 {{current}} / {{total}}"}),m={};if(r&&(m["--pi-inactive-bg"]=r),a&&(m["--pi-inactive-color"]=a),s&&(r||(m["--pi-inactive-bg"]=p_),a||(m["--pi-inactive-color"]="var(--color-white)")),l==="dot")return n.jsxs("div",{className:"progress-indicator progress-indicator--dot",style:m,role:i?"status":"img","aria-label":i?void 0:d,children:[i&&n.jsx("span",{style:nd,children:d}),Array.from({length:e}).map((x,g)=>n.jsx("span",{"aria-hidden":"true",className:`progress-indicator-dot--dot${g<h?" done":g===h?" active":""}`},g))]});const C=i?n.jsx("span",{role:"status",style:nd,children:d}):null;return p?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"progress-indicator progress-indicator--mobile",style:m,role:"list","aria-label":d,children:n.jsxs("span",{role:"listitem",className:"progress-indicator-dot active body-3",children:[h+1," / ",e]})}),C]}):n.jsxs(n.Fragment,{children:[C,n.jsx("div",{className:"progress-indicator",style:m,role:"list","aria-label":d,children:Array.from({length:e}).map((x,g)=>n.jsx("span",{role:"listitem","aria-current":g===h?"step":void 0,className:`progress-indicator-dot ${g<h?" done":g===h?" active":""} body-3`,children:g+1},g))})]})}function h_(e){if(!e)return[];const t=[];let r=0,a="";for(const s of e.trim()){if(s==="("?r++:s===")"&&r--,/\s/.test(s)&&r===0){a&&(t.push(a),a="");continue}a+=s}return a&&t.push(a),t}function m_(e,t,r=0){const a=Array.from({length:Math.max(0,t)},()=>0);for(const s of e){let l=0;for(const i of s){if(l>=a.length)break;const u=ad(i.span),c=Math.min(u,a.length-l);if(c===1)a[l]=Math.max(a[l],i.width);else{const p=Math.max(0,(i.width-r*(c-1))/c);for(let h=l;h<l+c;h++)a[h]=Math.max(a[h],p)}l+=c}}return a}function ad(e){const t=typeof e=="number"?e:parseInt(String(e??""),10);return Number.isFinite(t)&&t>=1?Math.floor(t):1}function f_(e,t){const r=/span\s+(\d+)/.exec(`${e??""} ${t??""}`);return r?ad(parseInt(r[1],10)):1}function C_(e,t){const{isFixed:r,floorOf:a,containerWidth:s}=t;if(!(s>0))return!1;const l=e.reduce((i,u,c)=>i+(r(c)?u:0),0);return e.reduce((i,u,c)=>i+(r(c)?0:a(c)),0)>s-l}function g_(e,t){const{isFixed:r,floorOf:a,containerWidth:s}=t,l=e.reduce((d,m,C)=>d+(r(C)?m:0),0),i=e.reduce((d,m,C)=>d+(r(C)?0:m),0),u=s-l;if(!(s>0&&i>0&&u>0))return[...e];const c=u/i,p=e.map((d,m)=>r(m)?d:Math.max(a(m),Math.round(d*c))),h=Math.round(u-p.reduce((d,m,C)=>d+(r(C)?0:m),0));if(h!==0){let d=-1;p.forEach((m,C)=>{!r(C)&&(d<0||m>p[d])&&(d=C)}),d>=0&&(p[d]=Math.max(a(d),p[d]+h))}return p}const b_=16;function y_(e,t=b_){return e.map(r=>{const a=r.sortable&&!r.sorted;return Math.max(r.declaredMin,Math.ceil(r.headWidth+(a?t:0)))})}const od="declared";function v_({children:e,className:t,style:r,span:a,rowLabel:s,onRowClick:l}){const i=a&&a>1?{gridColumn:`span ${a}`,...r}:r;return n.jsx("div",{role:"cell",className:t?`table-cell ${t}`:"table-cell",style:i,"aria-colspan":a&&a>1?a:void 0,children:s&&l?n.jsx("button",{type:"button",className:"table-cell__row-button","aria-label":s,children:e}):e})}function Ts({variant:e="default",children:t,className:r,draggable:a,onClick:s,onMouseEnter:l,onMouseLeave:i,onDragStart:u,onDragEnd:c,expandedContent:p,colSpan:h,describedBy:d,rowHasButton:m}){const C=o.useCallback(x=>{s&&x.target===x.currentTarget&&(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),s())},[s]);return e==="loading"?n.jsx("div",{role:"presentation",className:"table-row-wrap",children:n.jsx("div",{role:"row",className:"table-row table-row--loading",children:n.jsx("div",{role:"cell","aria-colspan":h,className:"table-row__full-cell",children:n.jsx(Nr,{size:28})})})}):e==="empty"?n.jsx("div",{role:"presentation",className:"table-row-wrap",children:n.jsx("div",{role:"row",className:"table-row table-row--empty body-3",children:n.jsx("div",{role:"cell","aria-colspan":h,className:"table-row__full-cell",children:t})})}):n.jsxs("div",{role:"presentation",className:"table-row-wrap",children:[n.jsx("div",{className:r?`table-row ${r}`:"table-row",draggable:a,onClick:s,onKeyDown:s?C:void 0,onMouseEnter:l,onMouseLeave:i,onDragStart:u,onDragEnd:c,role:"row",tabIndex:s&&!m?0:void 0,"aria-describedby":s&&!m?d:void 0,children:t}),p&&n.jsx("div",{role:"row",className:"table-row-expand",children:n.jsx("div",{role:"cell","aria-colspan":h,className:"table-row-expand__cell",children:p})})]})}function x_({dir:e}){return n.jsx(e==="asc"?Rl:Ll,{className:"table-field__sort-arrow",size:16,strokeWidth:2})}function __({children:e,onClick:t,className:r,sortDir:a,ariaSort:s,onResizeStart:l}){const i=n.jsxs(n.Fragment,{children:[e,a&&n.jsx(x_,{dir:a})]});return n.jsxs("div",{onClick:t,role:"columnheader","aria-sort":s,className:xe("table-field body-3",r,a?"table-field--sorted":"",l?"table-field--resizable":""),children:[t?n.jsx("button",{type:"button",className:"table-field__button",children:i}):i,l&&n.jsx("span",{className:"table-field__resizer",onPointerDown:l,onClick:u=>u.stopPropagation(),"aria-hidden":"true"})]})}function sd(e){return e&&e!=="left"?`table-col--${e}`:void 0}function Ms({fields:e=[],sort:t,sortable:r=!0,headerGroups:a,items:s=[],renderRow:l,onRowClick:i,isRowClickable:u,onRowMouseEnter:c,onRowMouseLeave:p,onRowDragStart:h,onRowDragEnd:d,draggingId:m,gridTemplateColumns:C,mobileGridTemplateColumns:x,resizable:g=!0,resizeMode:y="grow",resizeStorageKey:v,refitOn:_,title:b,icon:B,count:N,collapsed:f=!1,onToggleCollapse:w,headerActions:k,empty:E,loading:A,dragOver:D=!1,onDragOver:j,onDragLeave:$,onDrop:H,renderExpandedRow:F,expandedId:U}){const T=Cn,{t:I}=Ne.useTranslation(),z=o.useId(),ie=`table-title-${z}`,te=`table-row-hint-${z}`,[P,G]=o.useState(null),X=o.useCallback((Q,fe=0)=>{if(!(Q==null||typeof Q=="boolean")){if(typeof Q=="string"||typeof Q=="number")return String(Q);if(!(fe>6)){if(Array.isArray(Q)){const Ge=Q.map(Ye=>X(Ye,fe+1)).filter(Boolean);return Ge.length?Ge.join(""):void 0}if(o.isValidElement(Q))return X(Q.props.children,fe+1)}}},[]),K=o.useCallback((Q,fe)=>{const Ge=e[fe];if(!Ge)return;if(Ge.sortValue)return Ge.sortValue(Q);if(Ge.sortKey)return Q[Ge.sortKey];const Ye=l(Q)[fe]?.content;return typeof Ye=="string"||typeof Ye=="number"?Ye:X(Ye)},[e,l,X]),L=!t&&r&&!e.some(Q=>Q.sortDir!==void 0||Q.onClick),R=o.useCallback(Q=>{const fe=e[Q];if(!fe||fe.sortable===!1)return!1;if(fe.sortValue||fe.sortKey)return!0;const Ge=s[0];return Ge!==void 0&&K(Ge,Q)!==void 0},[e,s,K]);o.useEffect(()=>{if(!L||s.length===0)return;const Q=e.filter((fe,Ge)=>fe.sortable!==!1&&!R(Ge));Q.length!==0&&Tt(`Table/sort-mute/${Q.map(fe=>String(fe.label??"?")).join(",")}`,`[ihab/Table] \uC815\uB82C\uC5D0\uC11C \uBE60\uC9C4 \uC5F4\uC774 \uC788\uC2B5\uB2C8\uB2E4: ${Q.map(fe=>`'${String(fe.label??"?")}'`).join(" \xB7 ")}`,`
849
+ \uCE78\uC5D0 \uAE00\uC790\uAC00 \uC5C6\uC5B4(\uB124\uBAA8\xB7\uADF8\uB9BC\xB7\uB2E8\uCD94 \uAC19\uC740 \uB9C8\uB514) \uBB34\uC5C7\uC73C\uB85C \uC138\uC6B8\uC9C0 \uC54C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.`,"\n\uADF8 \uC5F4\uC758 `sortValue` \uB97C \uC8FC\uC138\uC694 \u2014 \uC608: `sortValue: (w) => !!w.image`.","\n\uC77C\uBD80\uB7EC \uC548 \uC138\uC6B0\uB294 \uC5F4\uC774\uBA74 `sortable: false` \uB97C \uC801\uC73C\uBA74 \uC774 \uC54C\uB9BC\uC774 \uBA4E\uC2B5\uB2C8\uB2E4.")},[L,e,s,R]);const S=o.useMemo(()=>t?e.map(Q=>{if(!Q.sortKey||Q.sortDir!==void 0)return Q;const fe=t.field(String(Q.label??""),Q.sortKey);return{...Q,sortDir:fe.sortDir,onClick:Q.onClick??fe.onClick}}):L?e.map((Q,fe)=>R(fe)?{...Q,sortDir:P?.index===fe?P.asc?"asc":"desc":null,onClick:()=>G(Ge=>Ge?.index===fe?{index:fe,asc:!Ge.asc}:{index:fe,asc:!0})}:Q):e,[e,t,L,P,R]),V=o.useMemo(()=>{if(!L||!P)return s;const{index:Q,asc:fe}=P;return[...s].sort((Ge,Ye)=>Pa(K(Ge,Q),K(Ye,Q),fe))},[s,L,P,K]),ae=Bn("(max-width: 767px)"),ne=x&&ae?x:null,re=g&&!ae,ue=o.useRef(re);ue.current=re;const Be=48,le=40,J=o.useRef(()=>Be),O=o.useRef(null),W=v?`table-cols:${v}`:null,q=o.useRef(null),oe=o.useRef(null),ee=o.useRef(null),be=o.useRef(null),[je,De]=o.useState(!1),[we,ze]=o.useState(0),ye=o.useCallback(()=>{const Q=ee.current;if(!Q)return;const fe=be.current,Ge=q.current;if(fe&&(fe.style.minWidth="",Ge)){const Ye=Ge.scrollWidth,at=ue.current?le:0;fe.style.minWidth=Ye>Q.clientWidth+1?`${Ye+at}px`:""}De(Q.scrollWidth>Q.clientWidth+1),ze(Q.clientWidth),Q.scrollWidth>Q.clientWidth+1?Q.style.setProperty("--table-visible-w",`${Q.clientWidth}px`):Q.style.removeProperty("--table-visible-w")},[]),_e=o.useCallback((Q,fe)=>{const Ge=Q.current;Ge&&oe.current&&oe.current.unobserve(Ge),Q.current=fe,fe?(!oe.current&&typeof ResizeObserver<"u"&&(oe.current=new ResizeObserver(()=>ye())),oe.current?.observe(fe)):!ee.current&&!be.current&&(oe.current?.disconnect(),oe.current=null),ye()},[ye]),ve=o.useCallback(Q=>_e(ee,Q),[_e]),Ee=o.useCallback(Q=>_e(be,Q),[_e]);o.useEffect(()=>{ye()}),o.useEffect(()=>{if(typeof window>"u")return;const Q=typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>ye()):null;return window.addEventListener("resize",ye),()=>{Q!=null&&cancelAnimationFrame(Q),window.removeEventListener("resize",ye)}},[ye]);const Oe=o.useRef(()=>!1),ot=o.useRef([]),it=o.useRef(null),Fe=Q=>{if(!Q||typeof window>"u")return null;try{const fe=JSON.parse(window.localStorage.getItem(Q)??"null");return Array.isArray(fe)&&fe.length>0&&fe.every(Ge=>typeof Ge=="number"&&Number.isFinite(Ge)&&Ge>0)?fe:null}catch{return null}},[Ue,nt]=o.useState(()=>Fe(W)),[Te,Xe]=o.useState(W),[rt,ut]=o.useState(()=>Fe(W)!==null);if(Te!==W){Xe(W);const Q=Fe(W);nt(Q),ut(Q!==null)}const gt=o.useRef(Ue);o.useEffect(()=>{gt.current=Ue},[Ue]);const _t=o.useCallback(Q=>{const fe=it.current;if(!fe)return;const Ge=gt.current;if(Ge){const Ye=[...Ge],at=()=>Be;if(fe.next!=null&&fe.startWNext!=null){const mt=Q.clientX-fe.startX,Mt=Math.max(at()-fe.startW,Math.min(fe.startWNext-at(),mt));Ye[fe.index]=fe.startW+Mt,Ye[fe.next]=fe.startWNext-Mt}else Ye[fe.index]=Math.max(at(),fe.startW+(Q.clientX-fe.startX));gt.current=Ye,nt(Ye)}},[]),pt=o.useCallback(()=>{if(it.current=null,window.removeEventListener("pointermove",_t),window.removeEventListener("pointerup",pt),window.removeEventListener("pointercancel",pt),document.body.style.cursor="",document.body.style.userSelect="",W&&gt.current)try{window.localStorage.setItem(W,JSON.stringify(gt.current))}catch{}},[_t,W]),Yt=o.useCallback((Q,fe)=>{fe.preventDefault(),fe.stopPropagation();const Ge=q.current;if(!Ge)return;const Ye=Array.from(Ge.children).map(mt=>mt.getBoundingClientRect().width),at=y==="fit"?S.findIndex((mt,Mt)=>Mt>Q&&mt.resizable!==!1):-1;it.current=at>=0?{index:Q,startX:fe.clientX,startW:Ye[Q],next:at,startWNext:Ye[at]}:{index:Q,startX:fe.clientX,startW:Ye[Q]},gt.current=Ye,nt(Ye),ut(!0),window.addEventListener("pointermove",_t),window.addEventListener("pointerup",pt),window.addEventListener("pointercancel",pt),document.body.style.cursor="col-resize",document.body.style.userSelect="none"},[_t,pt,y,S]),kt=o.useCallback(()=>{const Q=q.current,fe=Q?.closest(".table-wrap");if(!Q||!fe)return null;const Ge=fe.style.getPropertyValue("--table-grid-cols");fe.style.setProperty("--table-grid-cols",S.map(()=>"max-content").join(" "));const Ye=Array.from(fe.querySelectorAll(".table-row")).filter(Rt=>!Rt.classList.contains("table-row--loading")&&!Rt.classList.contains("table-row--empty")),at=Rt=>Array.from(Rt.children).map(Dt=>{const Ut=window.getComputedStyle(Dt);return{width:Dt.getBoundingClientRect().width,span:f_(Ut.gridColumnStart,Ut.gridColumnEnd)}}),mt=parseFloat(window.getComputedStyle(Q).columnGap)||0,Mt=Ye.map(at),Ot=at(Q),Tn=m_([Ot,...Mt],S.length,mt),Xt=y_(S.map((Rt,Dt)=>({declaredMin:J.current(Dt),headWidth:Ot[Dt]?.width??0,sortable:Rt.sortDir!==void 0||!!Rt.onClick,sorted:!!Rt.sortDir}))),Mn=Rt=>Xt[Rt]??J.current(Rt);O.current=Xt;const pn=S.map((Rt,Dt)=>{const Ut=Tn[Dt],zt=Oe.current(Dt)?parseFloat(ot.current[Dt]):NaN;return Number.isFinite(zt)&&Math.ceil(Ut)>zt&&Tt(`table-fixed-col-overflow:${Dt}:${zt}`,`[ihabdevteam-core] Table \uC758 ${Dt+1}\uBC88\uC9F8 \uC5F4\uC744 ${zt}px \uB85C \uC815\uD574 \uB450\uC5C8\uB294\uB370 \uC548\uC758 \uB0B4\uC6A9\uC740 ${Math.ceil(Ut)}px \uAC00 \uD544\uC694\uD569\uB2C8\uB2E4 \u2014 \uADF8\uB9CC\uD07C \uC798\uB824 \uB098\uAC11\uB2C8\uB2E4. gridTemplateColumns(\uB610\uB294 fields[].width)\uC758 \uADF8 \uC5F4\uC744 ${Math.ceil(Ut)}px \uC774\uC0C1\uC73C\uB85C \uB298\uB9AC\uC138\uC694.`),Number.isFinite(zt)?zt:Math.max(J.current(Dt),Math.ceil(Ut))}),Jt=window.getComputedStyle(Q),en=(parseFloat(Jt.paddingLeft)||0)+(parseFloat(Jt.paddingRight)||0),gn=fe.clientWidth-en;Ge?fe.style.setProperty("--table-grid-cols",Ge):fe.style.removeProperty("--table-grid-cols");const tn={isFixed:Rt=>Oe.current(Rt),floorOf:Mn,containerWidth:gn};return C_(pn,tn)?od:g_(pn,tn)},[S,y]),ct=(Q,fe)=>Q!==null&&Q.length===fe.length&&Q.every((Ge,Ye)=>Ge===fe[Ye]),Ae=o.useRef(kt);o.useEffect(()=>{Ae.current=kt});const[st,ft]=o.useState(0),Ct=V.length>0,Nt=`${W??""}|${st}|${S.length}|${we}|${_??""}`,Ft=!rt&&re&&W!==null&&!A?`${Nt}|${Ct?1:0}`:null,yt=o.useRef(null);o.useEffect(()=>{if(Ft===null||!Ct||yt.current===Nt)return;const Q=Ae.current();if(Q!==null){if(yt.current=Nt,Q===od){nt(null);return}nt(fe=>ct(fe,Q)?fe:Q)}},[Ft]);const vt=o.useCallback(()=>{if(W)try{window.localStorage.removeItem(W)}catch{}ut(!1);const Q=Ae.current(),fe=Array.isArray(Q)?Q:null;nt(fe),gt.current=fe,ft(Ge=>Ge+1)},[W]);o.useEffect(()=>()=>{it.current&&(window.removeEventListener("pointermove",_t),window.removeEventListener("pointerup",pt),window.removeEventListener("pointercancel",pt),document.body.style.cursor="",document.body.style.userSelect="")},[_t,pt]);const Et=S.length>0&&S.every(Q=>Q.width!=null)?S.map(Q=>typeof Q.width=="number"?`${Q.width}px`:String(Q.width)).join(" "):null;S.some(Q=>Q.width!=null)&&!Et&&Tt(`table-field-width:${S.map(Q=>Q.width==null?"-":"w").join("")}`,"[ihabdevteam-core] Table \uC758 fields \uC911 \uC77C\uBD80\uC5D0\uB9CC width \uAC00 \uC788\uC2B5\uB2C8\uB2E4. **\uBAA8\uB4E0 \uC5F4\uC5D0 \uC801\uC5B4\uC57C** \uC4F0\uC785\uB2C8\uB2E4 \u2014 \uC9C0\uAE08\uC740 gridTemplateColumns \uB97C \uC501\uB2C8\uB2E4. \uD55C \uC5F4\uB9CC \uACE0\uC815\uD558\uACE0 \uC2F6\uC73C\uBA74 \uB098\uBA38\uC9C0\uC5D0 `minmax(0, 1fr)` \uCC98\uB7FC \uC801\uC5B4 \uC8FC\uC138\uC694."),Et&&C&&Tt("table-field-width-conflict","[ihabdevteam-core] Table \uC5D0 fields[].width \uC640 gridTemplateColumns \uAC00 \uB458 \uB2E4 \uC788\uC2B5\uB2C8\uB2E4. gridTemplateColumns \uAC00 \uC774\uAE41\uB2C8\uB2E4 \u2014 \uD55C\uCABD\uB9CC \uB450\uC138\uC694.");const It=C??Et??void 0,Je=h_(It),At=Je.filter(Q=>/\b(auto|min-content|max-content)\b|fit-content\(/.test(Q));At.length>0&&Tt(`table-content-track:${C}`,`[ihabdevteam-core] Table \uC758 gridTemplateColumns \uC5D0 \uB0B4\uC6A9\uC73C\uB85C \uD06C\uAE30\uAC00 \uC815\uD574\uC9C0\uB294 \uD2B8\uB799(${At.join(", ")})\uC774 \uC788\uC2B5\uB2C8\uB2E4. \uBA38\uB9AC\uC640 \uBAB8\uD1B5\uC740 \uC11C\uB85C \uB2E4\uB978 \uACA9\uC790\uB77C \uADF8 \uD2B8\uB799\uC774 \uAC01\uC790 \uB2E4\uB974\uAC8C \uD480\uB824 \uC5F4\uC774 \uC5B4\uAE0B\uB0A9\uB2C8\uB2E4. px \uC774\uB098 fr \uC744 \uC4F0\uC138\uC694. (\uBC1B\uC740 \uAC12: ${C})`);const Qe=S.findIndex(Q=>!!Q.sortDir);S.filter(Q=>!!Q.sortDir).length>1&&Tt("table-multi-sort","[ihabdevteam-core] Table \uC758 fields \uC5D0 sortDir \uC774 \uB458 \uC774\uC0C1 \uC788\uC2B5\uB2C8\uB2E4. aria-sort \uB294 \uD45C \uD558\uB098\uC5D0 \uD55C \uCE78\uB9CC \uAC00\uC9C8 \uC218 \uC788\uC5B4 \uCCAB \uCE78\uB9CC \uBC29\uD5A5\uC73C\uB85C \uC54C\uB9AC\uACE0 \uB098\uBA38\uC9C0\uB294 none \uC73C\uB85C \uB461\uB2C8\uB2E4.");const he=Q=>Q===Qe?S[Q].sortDir==="asc"?"ascending":"descending":S[Q].onClick?"none":void 0,Le=Q=>/^\d+(\.\d+)?px$/.test(Je[Q]??""),Pe=Q=>{const fe=Je[Q]??"",Ge=/^minmax\(\s*(\d+(?:\.\d+)?)px\s*,/.exec(fe)??/^(\d+(?:\.\d+)?)px$/.exec(fe);return Ge?parseFloat(Ge[1]):Be};Oe.current=Le,J.current=Pe,ot.current=Je;const We=Q=>y==="fit"&&!Le(Q)?"fr":"px",dt=Ue&&Ue.length===S.length&&!ae,on=y==="fit"&&!rt,ht=(Q,fe)=>{if(Q.resizable===!1&&Je[fe])return Je[fe];const Ge=Ue[fe];if(We(fe)!=="fr"||!on)return`${Ge}${We(fe)}`;const Ye=Math.min(Math.max(Pe(fe),O.current?.[fe]??0),Ge);return Ye>0?`minmax(${Ye}px, ${Ge}fr)`:`${Ge}fr`},Ke=ne??(dt?S.map(ht).join(" "):It),xt=Ke?{"--table-grid-cols":Ke}:void 0,jt=b!==void 0;return n.jsx(Xo.Provider,{value:Cn,children:n.jsxs("div",{ref:ve,className:`table-wrap${re?" table-wrap--resizable":""}${D?" table-wrap--dragover":""}${f?" table-wrap--collapsed":""}`,style:xt,onDragOver:j,onDragLeave:$,onDrop:H,tabIndex:je?0:void 0,role:je?"region":void 0,"aria-label":je?typeof b=="string"?b:I("table.scrollRegion","\uAC00\uB85C\uB85C \uAD74\uB9B4 \uC218 \uC788\uB294 \uD45C"):void 0,children:[!!i&&n.jsx("span",{id:te,className:"table-row-hint",children:I("table.rowActionHint","\uC904\uC744 \uB204\uB974\uBA74 \uC790\uC138\uD788 \uBD05\uB2C8\uB2E4")}),n.jsxs("div",{ref:Ee,role:"table","aria-labelledby":jt&&typeof b=="string"?ie:void 0,className:"table body-2",children:[jt&&n.jsxs("div",{className:xe("table-header",w&&"table-header--clickable"),onClick:w,role:"caption",children:[w&&n.jsx(me,{htmlType:"button",size:T,type:"dot",variant:"transparent-gray",useBorder:!1,icon:f?"chevron-right":"chevron-down",ariaLabel:f?I("common.expand","\uD3BC\uCE58\uAE30"):I("common.collapse","\uC811\uAE30"),ariaExpanded:!f,className:"table-header__chevron"}),B&&n.jsx(lt,{icon:B,label:typeof b=="string"?b:void 0,className:"table-header__icon"}),n.jsx("span",{id:ie,className:"table-header__title h5b",children:b}),N!==void 0&&n.jsx("span",{className:"table-header__count body-3b",children:N}),k&&n.jsx("span",{className:"table-header__actions",onClick:Q=>Q.stopPropagation(),children:k})]}),!f&&n.jsxs(n.Fragment,{children:[a&&a.length>0&&n.jsx("div",{role:"row",className:"table-fields table-fields--groups",children:a.map((Q,fe)=>n.jsx("div",{role:"columnheader","aria-colspan":Q.span,className:xe("table-field body-3",Q.className),style:{gridColumn:`span ${Q.span}`},children:Q.label},fe))}),n.jsxs("div",{role:"presentation",className:xe("table-fields-strip",re&&"table-fields-strip--resizable"),children:[n.jsx("div",{role:"row",className:"table-fields",ref:q,children:S.map((Q,fe)=>n.jsx(__,{onClick:Q.onClick,className:xe(Q.className,sd(Q.align)),sortDir:Q.sortDir,ariaSort:he(fe),onResizeStart:re&&fe<S.length-1&&Q.resizable!==!1&&(y!=="fit"||S.some((Ge,Ye)=>Ye>fe&&Ge.resizable!==!1))?Ge=>Yt(fe,Ge):void 0,children:Q.label},fe))}),re&&n.jsx("div",{className:"table-fields__reset-dock",children:n.jsx(me,{htmlType:"button",size:T,type:"dot",variant:"transparent-gray",useBorder:!1,icon:"chevrons-left-right-ellipsis",ariaLabel:I("table.resetColumns","\uCE78 \uB108\uBE44 \uCD08\uAE30\uD654"),showTooltipInfo:I("table.resetColumns","\uCE78 \uB108\uBE44 \uCD08\uAE30\uD654"),className:"table-fields__reset",onClick:vt})})]}),n.jsx("div",{role:"rowgroup",className:"table-body",children:A?n.jsx(Ts,{variant:"loading",colSpan:S.length||void 0}):V.length===0&&E?n.jsx(Ts,{variant:"empty",colSpan:S.length||void 0,children:E}):V.map((Q,fe)=>{const Ge=m!=null&&Q.id===m,Ye=!!i&&(u?u(Q):!0),at=U!=null&&Q.id!=null&&(U instanceof Set?U.has(Q.id)||[...U].some(mt=>String(mt)===String(Q.id)):String(Q.id)===String(U));return n.jsx(Ts,{className:`${Ye?" table-row--clickable":""}${h?" table-row--draggable":""}${Ge?" table-row--dragging":""}`.trim(),draggable:!!h,onClick:Ye?()=>i(Q):void 0,colSpan:S.length||void 0,rowHasButton:l(Q).some(mt=>!!mt.rowLabel),describedBy:te,onMouseEnter:c?mt=>c(Q,mt):void 0,onMouseLeave:p?mt=>p(Q,mt):void 0,onDragStart:h?mt=>h(Q,mt):void 0,onDragEnd:d?mt=>d(Q,mt):void 0,expandedContent:at&&F?F(Q):void 0,children:l(Q).map((mt,Mt)=>n.jsx(v_,{className:xe(mt.className,sd(S[Mt]?.align)),style:mt.style,span:mt.span,rowLabel:Ye?mt.rowLabel:void 0,onRowClick:Ye?()=>i(Q):void 0,children:mt.content},Mt))},Q.id!=null?`${typeof Q.id}:${Q.id}`:`__idx:${fe}`)})})]})]})]})})}function ld(e,t){return t!=="wornAt"?String(e[t]??""):Gx(e.wornYear,e.wornMonth,e.wornDay)}function w_({rows:e,loading:t,onSelect:r,onDelete:a,onWear:s,onRelease:l,onAdd:i}){const{t:u,i18n:c}=Ne.useTranslation(),p=y=>y==="left"?u("device.direction.left","\uC88C"):u("device.direction.right","\uC6B0"),{sort:h,field:d}=ov(),m=o.useMemo(()=>{if(!h)return e;const{key:y,asc:v}=h;return[...e].sort((_,b)=>{if(y==="worn"){const B=Number(b.worn)-Number(_.worn);return v?B:-B}return Pa(ld(_,y),ld(b,y),v)})},[e,h]),{pageRows:C,pageSizeProps:x,paginationProps:g}=av(m,h);return n.jsxs("div",{className:"dlp-side-table",children:[n.jsx(ws,{count:{value:e.length,unit:u("customers.device.unit","\uAC1C")},pageSize:x,pagination:g,actions:i&&n.jsx(me,{htmlType:"button",size:40,type:"bar",variant:"main",icon:"plus",label:u("customers.device.addButton","\uAE30\uAE30 \uCD94\uAC00"),onClick:i})}),n.jsx(Ms,{loading:t,resizable:!0,resizeMode:"fit",resizeStorageKey:"customer-device-history-v2",fields:[{...d(u("customers.device.wearingNow","\uCC29\uC6A9"),"worn"),resizable:!1},d(u("device.direction.label","\uBC29\uD5A5"),"side"),d(u("device.deviceType","\uC885\uB958"),"device"),d(u("device.brand","\uBE0C\uB79C\uB4DC"),"brand"),d(u("device.fitType","\uCC29\uC6A9\uD615\uD0DC"),"fitType"),d(u("device.productName","\uC81C\uD488\uBA85"),"productName"),d(u("device.wornDate","\uCC29\uC6A9\uC77C"),"wornAt"),...a?[{label:"",resizable:!1}]:[]],items:C.map((y,v)=>({id:y.id??`${y.side}-${v}`,row:y})),gridTemplateColumns:`72px 110px 120px minmax(120px, 1fr) 100px minmax(120px, 1fr) 156px${a?" 108px":""}`,renderRow:({row:y})=>[{content:n.jsx("span",{className:"dlp-worn-check",onClick:v=>v.stopPropagation(),children:n.jsx(xs,{checked:y.worn,disabled:y.worn?!l:!s,ariaLabel:y.worn?u("customers.device.unwear","\uCC29\uC6A9 \uD574\uC81C"):u("customers.device.wear","\uCC29\uC6A9"),onChange:v=>{v?s?.(y):l?.(y)}})})},{content:n.jsx("span",{children:p(y.side)})},{content:y.device?n.jsx(cn,{size:"small",variant:vc(y.device),fill:"soft",label:xc(y.device,u)}):n.jsx("span",{})},{content:n.jsx("span",{children:y.brand})},{content:n.jsx("span",{children:y.fitType||"-"})},{content:n.jsx("span",{children:y.productName||"-"})},{content:n.jsx("span",{className:"dlp-date",children:ms(y.wornYear,y.wornMonth,y.wornDay,c.language)||"-"})},...a?[{content:n.jsx("span",{className:"dlp-row-actions",children:n.jsx(me,{htmlType:"button",size:28,type:"bar",variant:"transparent-gray",label:u("common.delete","\uC0AD\uC81C"),onClick:v=>{v?.stopPropagation(),a(y)}})})}]:[]],onRowClick:({row:y})=>r(y),empty:u("customers.device.historyEmpty","\uB4F1\uB85D\uB41C \uAE30\uAE30 \uC774\uB825\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.")})]})}function id(e,t){return e?{role:t?.role??"button",tabIndex:0,...t?.selected===void 0?{}:{"aria-selected":t.selected},onKeyDown:r=>{r.target===r.currentTarget&&(r.key!=="Enter"&&r.key!==" "||(r.preventDefault(),e(r)))}}:{}}function B_(e,t){return new Date(e,t+1,0).getDate()}function k_(e,t){return new Date(e,t,1).getDay()}function A_({visits:e=[],onVisitClick:t,onVisitMove:r,onDayClick:a,today:s}){const{t:l,i18n:i}=Ne.useTranslation(),u=o.useMemo(()=>l("calendar.dow",{returnObjects:!0}),[l]),c=Aa(s),[p,h]=o.useState(()=>Number(c.slice(0,4))),[d,m]=o.useState(()=>Number(c.slice(5,7))-1),[C,x]=o.useState(null),g=o.useRef(null),y=o.useMemo(()=>{const f={};return e.forEach(w=>{f[w.date]||(f[w.date]=[]),f[w.date].push(w)}),f},[e]),v=o.useMemo(()=>{const f=B_(p,d),w=k_(p,d),k=[];for(let E=0;E<w;E++)k.push(null);for(let E=1;E<=f;E++)k.push(E);for(;k.length<35;)k.push(null);return k},[p,d]),_=o.useCallback(()=>{d===0?(h(f=>f-1),m(11)):m(f=>f-1)},[d]),b=o.useCallback(()=>{d===11?(h(f=>f+1),m(0)):m(f=>f+1)},[d]),B=f=>`${p}-${String(d+1).padStart(2,"0")}-${String(f).padStart(2,"0")}`,N=f=>B(f)===c;return n.jsxs("div",{children:[n.jsxs("div",{className:"calendar-nav",children:[n.jsx("button",{type:"button",className:"calendar-nav__button",onClick:_,"aria-label":l("calendar.prevMonth","\uC774\uC804 \uB2EC"),children:n.jsx(lt,{icon:"chevron-left",label:"",className:"",svgClassName:"calendar-nav__button-icon",size:18})}),n.jsx("span",{className:"calendar-nav__title h5","aria-live":"polite",children:Ni(l,i.language,p,d+1)}),n.jsx("button",{type:"button",className:"calendar-nav__button",onClick:b,"aria-label":l("calendar.nextMonth","\uB2E4\uC74C \uB2EC"),children:n.jsx(lt,{icon:"chevron-right",label:"",className:"",svgClassName:"calendar-nav__button-icon",size:18})}),n.jsxs("div",{className:"calendar-nav__legend",children:[n.jsx("span",{className:"calendar-nav__legend-dot calendar-nav__legend-dot--main"}),n.jsx("span",{className:"caption-1",children:l("calendar.legend.visited","\uBC29\uBB38")}),n.jsx("span",{className:"calendar-nav__legend-dot calendar-nav__legend-dot--sub"}),n.jsx("span",{className:"caption-1",children:l("calendar.legend.scheduled","\uC608\uC57D")}),n.jsx("span",{className:"calendar-nav__legend-dot calendar-nav__legend-dot--disabled"}),n.jsx("span",{className:"caption-1",children:l("calendar.legend.noVisit","\uBBF8\uBC29\uBB38")})]})]}),n.jsxs("div",{className:"calendar-grid",children:[u.map(f=>n.jsx("div",{className:"calendar-day-header body-3",children:f},f)),v.map((f,w)=>{if(f===null)return n.jsx("div",{className:"calendar-cell empty"},`empty-${w}`);const k=f,E=B(k),A=y[E]??[],D=Ai(E,i.language),j=C===E;return n.jsxs("div",{className:`calendar-cell${N(k)?" today":""}${j?" drag-over":""}${a?" calendar-cell--clickable":""}`,role:a?"button":void 0,tabIndex:a?0:void 0,"aria-label":a?l("calendar.addOnDate",{date:E}):void 0,"aria-current":N(k)?"date":void 0,onClick:a?()=>a(E):void 0,onKeyDown:a?$=>{$.target===$.currentTarget&&($.key!=="Enter"&&$.key!==" "||($.preventDefault(),a(E)))}:void 0,onDragOver:r?$=>{$.preventDefault(),x(E)}:void 0,onDragLeave:r?$=>{$.currentTarget.contains($.relatedTarget)||x(null)}:void 0,onDrop:r?$=>{$.preventDefault(),g.current!=null&&(r(g.current,E),g.current=null),x(null)}:void 0,children:[n.jsx("div",{className:"calendar-cell__number body-3",children:k}),A.length>0&&(()=>{const $=[{key:"visited",label:l("calendar.legend.visited","\uBC29\uBB38"),count:A.filter(F=>(F.status??"visited")==="visited").length},{key:"scheduled",label:l("calendar.legend.scheduled","\uC608\uC57D"),count:A.filter(F=>F.status==="scheduled").length},{key:"noVisit",label:l("calendar.legend.noVisit","\uBBF8\uBC29\uBB38"),count:A.filter(F=>F.status==="noVisit").length}].filter(F=>F.count>0),H=$.length===1&&$[0].key==="visited"?l("calendar.visitCount",{count:A.length,defaultValue:"\uBC29\uBB38 {{count}}\uAC74"}):$.map(F=>l("calendar.statusCount",{label:F.label,count:F.count,defaultValue:"{{label}} {{count}}\uAC74"})).join(" \xB7 ");return n.jsxs("span",{className:"calendar-cell__visit-count caption-1","aria-label":`${D} ${H}`,children:[$.map(F=>n.jsx("span",{className:`calendar-cell__visit-dot calendar-cell__visit-dot--${F.key}`,"aria-hidden":"true"},F.key)),A.length]})})(),n.jsx("div",{className:"calendar-cell__badges",children:A.map(($,H)=>n.jsxs("div",{draggable:!!r,className:`calendar-visit-badge${$.status==="noVisit"?" calendar-visit-badge--no-visit":$.status==="scheduled"?" calendar-visit-badge--scheduled":""}${t?" calendar-visit-badge--clickable":""}${r?" calendar-visit-badge--draggable":""}`,onDragStart:r?F=>{g.current=$.id,F.dataTransfer.effectAllowed="move"}:void 0,onDragEnd:r?()=>{g.current=null,x(null)}:void 0,onClick:t?F=>{F.stopPropagation(),t($)}:void 0,...id(t?()=>t($):void 0),"aria-label":[D,$.time?Si($.time,l):null,$.customer,l($.status==="noVisit"?"calendar.legend.noVisit":$.status==="scheduled"?"calendar.legend.scheduled":"calendar.legend.visited")].filter(Boolean).join(" "),children:[$.time&&n.jsx("span",{className:"calendar-visit-badge__time body-3",children:Si($.time,l)}),n.jsx("span",{className:"calendar-visit-badge__name body-3",children:$.customer}),$.status==="noVisit"&&n.jsx("span",{className:"calendar-visit-badge__no-visit caption-1",children:l("calendar.legend.noVisit","\uBBF8\uBC29\uBB38")})]},$.id??H))})]},k)})]})]})}const N_={page:"h3",pagePopup:"h4",popup:"h5"};function Lr({type:e="page",title:t,headingLevel:r=2,icon:a,action:s,disc:l,children:i,inGrid:u=!1,className:c,style:p}){const h=N_[e],d=t||l||s||a,m=r?`h${r}`:"div";return n.jsxs("div",{className:xe("section",`section--${e}`,u&&"section--in-grid",c),style:p,children:[d&&n.jsxs("div",{className:"section__header",children:[n.jsxs("div",{className:"section__title-row",children:[a&&n.jsx(lt,{icon:a,label:typeof t=="string"?t:void 0,className:"section__icon"}),n.jsxs("div",{className:"section__title-group",children:[t&&n.jsx(m,{className:`section__title ${h}`,children:t}),l&&n.jsx("div",{className:"section__disc body-3",children:l})]})]}),s&&n.jsx("div",{className:"section__action",children:s})]}),i]})}let $s=null,ud=!1;function cd(){if(ud||typeof document>"u")return;ud=!0,document.addEventListener("keydown",t=>{t.metaKey||t.ctrlKey||t.altKey||($s="keyboard")},!0);const e=()=>{$s="pointer"};document.addEventListener("pointerdown",e,!0),document.addEventListener("mousedown",e,!0),document.addEventListener("touchstart",e,{capture:!0,passive:!0})}cd();function Ka(){return cd(),$s==="keyboard"}const Ya=20;function E_(e){const{t}=Ne.useTranslation(),{type:r,trainingDatas:a,depth:s,renderPopup:l,completedIds:i,selectedIds:u,onItemComplete:c,size:p,useDescriptionTooltip:h,onRemove:d,onMore:m,sectionType:C="page"}=e||{},[,x]=o.useState(0),g=typeof a<"u"?Array.isArray(a)?a:[]:[],y=g.length,[v,_]=o.useState(Math.min(y,Ya)),b=o.useMemo(()=>Array.isArray(s)?[...s,r?.label].filter(Boolean).join(" \xB7 "):[s||"",r?.label].filter(Boolean).join(" \xB7 "),[s,r?.label]);o.useEffect(()=>{_(Math.min(y,Ya))},[y]),Au("speechear.data.updated",()=>x(w=>w+1));const B=o.useRef(null),N=o.useRef(null);function f(){const w=document.activeElement;N.current=Ka()&&w&&w.closest?.(".training-block__more")?v:null,_(k=>Math.min(y,k+Ya))}return o.useEffect(()=>{const w=N.current;if(w==null)return;N.current=null;const k=document.activeElement;k&&k!==document.body||B.current?.querySelectorAll(".training-block-button")[w]?.focus()},[v]),n.jsxs(Lr,{type:C,title:r?.label,icon:r?.icon,disc:r?.desc,className:"training-block",children:[n.jsx("div",{className:"training-list",ref:B,children:(g||[]).slice(0,v).map((w,k)=>{const E=w;return n.jsx(vs,{index:k,type:r,trainingData:E,depth:b,renderPopup:l,completedIds:i,selectedIds:u,size:p,useDescriptionTooltip:h,onRemove:typeof d=="function"&&u!=null&&E?.id!=null&&u.has(String(E.id))?()=>d(E):void 0,onComplete:typeof c=="function"&&E?.id!=null?()=>c(String(E.id)):void 0,onMore:typeof m=="function"?A=>m(E,A):void 0},E?.id!=null?`${r?.key||"t"}-${String(E.id)}`:`${r?.key||"t"}-${k}`)})}),y>Ya&&v<y&&n.jsx("div",{className:"training-block__more",children:n.jsx(me,{htmlType:"button",size:48,type:"bar",icon:"plus",onClick:f,ariaLabel:t("common.loadMore","\uB354\uBCF4\uAE30"),label:t("common.loadMore","\uB354\uBCF4\uAE30"),variant:"main"})})]})}function j_(e){let t=0;const r=a=>{Array.isArray(a)?a.forEach(r):a!=null&&a!==!1&&a!==!0&&a!==""&&t++};return r(e),t}function D_({gap:e=10,count:t,className:r,children:a}){const s=o.useRef(null),[l,i]=o.useState({width:0,card:0}),u=t??j_(a);o.useLayoutEffect(()=>{const m=s.current;if(!m)return;const C=()=>{const b=m.style.maxWidth;m.style.maxWidth="none";const B=m.clientWidth;m.style.maxWidth=b;const N=m.firstElementChild?.offsetWidth??0;i(f=>f.width===B&&f.card===N?f:{width:B,card:N})};if(C(),typeof ResizeObserver>"u")return;const x=new ResizeObserver(C);x.observe(m);const g=m.firstElementChild;g&&x.observe(g);let y=m.parentElement;for(let b=0;b<3&&y&&y!==document.body;b++,y=y.parentElement)x.observe(y);let v=null;const _=()=>{v===null&&(v=requestAnimationFrame(()=>{v=null,C()}))};return window.addEventListener("resize",_),()=>{x.disconnect(),window.removeEventListener("resize",_),v!==null&&cancelAnimationFrame(v)}},[u,e]);const c=l.card>0?l.card:0,p=c>0?Lb(l.width,c,e):0,h=p>0?Rb(u,p):0,d={"--block-grid-gap":`${e}px`,...h>0?{"--block-grid-cols":h,"--block-grid-card":`${c}px`}:{}};return n.jsx("div",{ref:s,className:xe("training-block-grid",h>0&&"training-block-grid--measured",r),style:d,"data-cols":h>0?h:void 0,children:a})}function Ls(e){const t=o.useRef(null),r=o.useRef(e);r.current=e;const[a,s]=o.useState({url:e,loading:!!e,failed:!1}),l=a.url===e?a:{loading:!!e,failed:!1};o.useEffect(()=>{const c=t.current;s({url:e,failed:!1,loading:!!e&&!(c?.complete&&c.naturalWidth>0)})},[e]);const i=o.useCallback(()=>{r.current===e&&s({url:e,loading:!1,failed:!1})},[e]),u=o.useCallback(()=>{r.current===e&&s({url:e,loading:!1,failed:!0})},[e]);return{imgRef:t,loading:l.loading,failed:l.failed,hasImage:!!e&&!l.failed,onLoad:i,onError:u}}var S_='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Symbol_SpeechEar_mono" xmlns="http://www.w3.org/2000/svg" width="240" height="240" viewBox="0 0 240 240"><g id="symbol"><g opacity=".3"><path d="M80,50c-16.57,0-30,13.43-30,30v80c0,8.66,2.21,16.81,6.08,23.92,7.1,3.88,15.25,6.08,23.92,6.08h80c16.57,0,30-13.43,30-30v-80c0-8.66-2.21-16.81-6.08-23.92-7.1-3.88-15.25-6.08-23.92-6.08h-80Z" fill="%23fff"/></g><path d="M140,30h-60c-27.61,0-50,22.39-50,50v23.38l-19.22,21.15c-1.15,1.26-1.02,3.24.3,4.33,5.82,4.84,12.22,8.56,18.92,11.21.03,18.92,10.56,35.37,26.08,43.84-3.88-7.1-6.08-15.25-6.08-23.92v-80c0-16.57,13.43-30,30-30h80c8.66,0,16.81,2.21,23.92,6.08-8.48-15.54-24.97-26.08-43.92-26.08Z" fill="%23fff"/><path d="M183.92,56.08c3.88,7.1,6.08,15.25,6.08,23.92v80c0,16.57-13.43,30-30,30h-80c-8.66,0-16.81-2.21-23.92-6.08,8.48,15.54,24.97,26.08,43.92,26.08h45.11c2.7,0,4.89,2.19,4.89,4.89,0,2.86,2.45,5.13,5.3,4.88,30.65-2.68,54.7-28.42,54.7-59.77v-60c0-18.95-10.54-35.44-26.08-43.92Z" fill="%23fff"/><rect x="69" y="88" width="12" height="24" rx="6" ry="6" fill="%23fff"/><path d="M111,140c-2.92,0-5.85-.75-8.5-2.28-2.39-1.38-3.21-4.44-1.82-6.83,1.38-2.39,4.44-3.21,6.83-1.82,2.74,1.58,6.21,1.13,8.44-1.1,1.08-1.08,1.76-2.45,1.97-3.95.9-6.37,3.71-12.42,8.14-17.5,2.64-3.02,4.03-6.9,3.93-10.92-.21-8.21-6.78-15.05-14.97-15.56-2.76-.18-5.42.33-7.88,1.51-2.49,1.19-5.48.12-6.66-2.37-1.19-2.49-.12-5.48,2.37-6.66,3.96-1.88,8.38-2.73,12.8-2.46,13.32.83,24.01,11.94,24.34,25.29.16,6.53-2.11,12.83-6.39,17.75-3.15,3.61-5.15,7.87-5.77,12.32-.52,3.67-2.18,7-4.8,9.63-3.27,3.27-7.62,4.97-12.02,4.97Z" fill="%23fff"/></g></svg>';const T_=S_,Rs=o.forwardRef(function({item:e,disabled:t=!1,onPlayDone:r,selectable:a=!1,selected:s=!1,onSelect:l,flipDelay:i=0,hideLabel:u=!1,hideAudio:c=!1,orderRank:p=null},h){const{t:d}=Ne.useTranslation(),m=e.word||e.title||"",C=t||!m,x=e.audio??e.sound??e.audioKey,g=e.subLabel||e.pronunciation||"",y=e.colloquialLabel||"",[v,_]=o.useState({label:m,subLabel:g,colloquialLabel:y,homonum:e.homonum});m&&(v.label!==m||v.subLabel!==g||v.colloquialLabel!==y||!Object.is(v.homonum,e.homonum))&&_({label:m,subLabel:g,colloquialLabel:y,homonum:e.homonum});const b=o.useRef(null),B=Bn("(max-width: 767px)"),[N,f]=o.useState(!1),[w,k]=o.useState(!1),E=`${typeof x=="string"?x:x?.src??""}\0${m}`,[A,D]=o.useState({for:"",url:""}),j=A.for===E?A.url:"",$=wi(),H=e.textOnly??(!e.image&&!!v.label&&!!$&&$.entries.length>0&&!$.byWord.has(v.label)),F=H?"":Br()?.(v.label,v.homonum)??e.image??"",{imgRef:U,loading:T,hasImage:I,onLoad:z,onError:ie}=Ls(F);o.useEffect(()=>{let V=!1;return(async()=>{if(x){if(typeof x=="string"){if(x.startsWith("http")||x.includes("/")){D({for:E,url:x});return}}else if(typeof x=="object"&&!Array.isArray(x)){const ne=x.src;if(ne){D({for:E,url:ne});return}}}const ae=Ur();if(ae&&m)try{const ne=await Promise.resolve(ae(m));!V&&ne&&D({for:E,url:ne})}catch{}})(),()=>{V=!0}},[x,m,E]);const te=o.useRef(!0),P=o.useRef(null);o.useEffect(()=>(te.current=!0,()=>{te.current=!1,P.current&&Va(P.current),P.current=null;try{b.current?.pause()}catch{}b.current=null}),[]);const G=o.useCallback(()=>new Promise(V=>{if(typeof window<"u"&&window.speechSynthesis&&m){f(!0),window.speechSynthesis.cancel();const ae=new SpeechSynthesisUtterance(m);ae.lang="ko-KR",ae.onend=()=>{f(!1);try{r?.()}catch{}V()},ae.onerror=()=>{f(!1),V()},window.speechSynthesis.speak(ae)}else V()}),[m,r]),X=o.useCallback(V=>{const ae=ha(V,ne=>{if(f(!1),ne)try{r?.()}catch{}});return b.current=ae.el,ae.done},[r]),K=o.useCallback(async()=>{if(t||!te.current)return;const V=()=>{P.current===V&&(P.current=null);try{b.current?.pause()}catch{}try{window.speechSynthesis?.cancel()}catch{}f(!1)},ae=pa(V);P.current=V;try{window.speechSynthesis?.cancel()}catch{}try{if(j&&(f(!0),await X(j)))return;const ne=xa();if(ne&&m)try{k(!0);const re=await Promise.resolve(ne(m));if(!te.current||P.current!==V||(k(!1),re&&(f(!0),await X(re))))return}catch{}if(!te.current||P.current!==V)return;await G()}finally{P.current===V&&k(!1),ae(),P.current===V&&(P.current=null)}},[t,j,m,X,G]);o.useImperativeHandle(h,()=>({play:()=>K()}),[K]);const L=V=>V.stopPropagation(),R=o.useCallback(V=>{if(V.stopPropagation(),!t){if(N){try{b.current?.pause()}catch{}try{window.speechSynthesis?.cancel()}catch{}f(!1);return}K()}},[t,N,K]),S=xe("training-word-card",t?"training-word-card--disabled":"",C?"training-word-card--flipped":"",a?"training-word-card--selectable":"",s?"training-word-card--selected":"");return n.jsx("div",{className:S,onClick:a&&!t?l:void 0,role:a?"button":void 0,"aria-pressed":a?s:void 0,tabIndex:a&&!t?0:void 0,"aria-disabled":a&&t?!0:void 0,onKeyDown:a&&!t?V=>{V.target===V.currentTarget&&(V.key==="Enter"||V.key===" "||V.key==="Spacebar")&&(V.preventDefault(),l?.())}:void 0,children:n.jsxs("div",{className:"training-word-card__flipper",style:{transitionDelay:C?"0ms":`${i}ms`},children:[n.jsxs("div",{className:"training-word-card__front",children:[s&&n.jsx("div",{className:"training-word-card__selected-badge",onClick:L,children:n.jsx(Sn,{size:40,position:"inline",animate:!0,icon:p!=null?void 0:"check",number:p??void 0,"aria-label":p!=null?d("training.nthSelected",{n:p}):d("training.selected","\uC120\uD0DD\uB428")})}),n.jsx("div",{className:"training-word-card__image-wrap",children:H?n.jsx("div",{className:"training-word-card__text-face",children:v.label}):I?n.jsxs(n.Fragment,{children:[T&&n.jsx("div",{className:"training-word-card__spinner"}),n.jsx("img",{ref:U,className:"training-word-card__image",src:F,alt:v.label||d("common.image","\uC774\uBBF8\uC9C0"),style:{opacity:T?0:1},onLoad:z,onError:ie})]}):n.jsx("div",{className:"training-word-card__placeholder"})}),!u&&n.jsxs("div",{className:"training-word-card__body",children:[!H&&n.jsx("div",{className:"training-word-card__word",children:v.label}),v.subLabel&&n.jsxs("div",{className:"training-word-card__pronunciation",children:["[",v.subLabel,"]"]}),v.colloquialLabel&&n.jsxs("div",{className:"training-word-card__colloquial caption-1",children:["[",v.colloquialLabel,"]"]})]}),!c&&n.jsx("div",{className:"training-word-card__bottom",onClick:a?L:void 0,children:n.jsx(me,{htmlType:"button",size:B?40:48,type:B?"dot":"bar",icon:N?"pause":"play",label:B?void 0:d("training.playSound","\uC18C\uB9AC \uB4E3\uAE30"),selected:N,loading:w,onClick:R,disabled:t,ariaLabel:v.label?N?d("training.stopFor",{name:v.label,defaultValue:`${v.label} \uC815\uC9C0`}):d("training.playSoundFor",{name:v.label,defaultValue:`${v.label} \uC18C\uB9AC \uB4E3\uAE30`}):N?d("training.stop","\uC815\uC9C0"):d("training.playSound","\uC18C\uB9AC \uB4E3\uAE30")})})]}),n.jsx("div",{className:"training-word-card__back","aria-hidden":"true",children:n.jsx("span",{className:"training-word-card__disabled-symbol",style:{"--disabled-symbol-src":`url("${T_}")`}})})]})})}),fr={landscape:{width:1123,height:794,printSize:"A4 landscape",printW:"297mm",printH:"210mm"},portrait:{width:794,height:1123,printSize:"A4 portrait",printW:"210mm",printH:"297mm"}};function M_(e="landscape"){Tt("print-word-table-deprecated","[printWordTable] @deprecated \u2014 WordTablePopup renderButtons \uC758 print(\uB610\uB294 useWordTablePrint().print)\uB97C \uC4F0\uC138\uC694. \uC804\uC5ED \uC778\uC1C4\uB294 \uD654\uBA74\uC758 \uBAA8\uB4E0 \uB2E8\uC5B4\uD45C\uB97C \uD568\uAED8 \uCC0D\uC2B5\uB2C8\uB2E4.");const{printSize:t,printW:r,printH:a}=fr[e],s=document.createElement("style");s.textContent=`@page { size: ${t}; margin: 0; } .word-table { width: ${r} !important; height: ${a} !important; }`,document.head.appendChild(s);const l=()=>{document.head.removeChild(s),window.removeEventListener("afterprint",l)};window.addEventListener("afterprint",l),window.print()}function $_(e,t){if(e.length===0)return[[]];const r=Math.max(1,Math.floor(t)),a=[];for(let s=0;s<e.length;s+=r)a.push(e.slice(s,s+r));return a}const L_={landscape:{1:{cols:1,rows:1},2:{cols:2,rows:1},3:{cols:3,rows:1},4:{cols:2,rows:2},5:{cols:3,rows:2},6:{cols:3,rows:2},7:{cols:4,rows:2},8:{cols:4,rows:2},9:{cols:5,rows:2},10:{cols:5,rows:2},11:{cols:4,rows:3},12:{cols:4,rows:3},13:{cols:5,rows:3},14:{cols:5,rows:3},15:{cols:5,rows:3},16:{cols:6,rows:3}},portrait:{1:{cols:1,rows:1},2:{cols:1,rows:2},3:{cols:1,rows:3},4:{cols:1,rows:4},5:{cols:1,rows:5},6:{cols:2,rows:3},7:{cols:2,rows:4},8:{cols:2,rows:4},9:{cols:2,rows:5},10:{cols:2,rows:5},11:{cols:3,rows:4},12:{cols:3,rows:4},13:{cols:4,rows:4},14:{cols:4,rows:4},15:{cols:4,rows:4},16:{cols:4,rows:4}}};function dd(e,t){const r=L_[e][t];if(r)return r;const a=Math.max(1,Math.ceil(t)),s=Math.max(1,Math.ceil(Math.sqrt(a*.707)));let l,i;return e==="landscape"?(i=s,l=Math.ceil(a/i)):(l=s,i=Math.ceil(a/l)),(e==="landscape"?l<i:i<l)&&([l,i]=[i,l]),{cols:l,rows:i}}function R_(e,t){const r=dd(e==="landscape"?"portrait":"landscape",t),a=Math.max(1,Math.ceil(t));if(a<=1)return r;const s=fr[e],l=e==="landscape"?s.width/2:s.width,i=e==="landscape"?s.height:s.height/2,u=(m,C)=>Math.min(l/m/Cd,i/C/gd),c=Math.max(0,r.cols*r.rows-a),p=u(r.cols,r.rows);let h=r,d=p;for(let m=1;m<=a;m++){const C=Math.ceil(a/m);if(m*C-a>c)continue;const x=u(m,C);x>d&&(h={cols:m,rows:C},d=x)}return d>p*1.05?h:r}const P_={show:"word-table__content--cut-show",dashed:"",corner:"word-table__content--cut-corner",hide:""},pd={\uBA85:"\uBA85\uC0AC",\uB3D9:"\uB3D9\uC0AC",\uD615:"\uD615\uC6A9\uC0AC",\uBD80:"\uBD80\uC0AC",\uC218:"\uC218\uC0AC",\uAD00:"\uAD00\uD615\uC0AC",\uAC10:"\uAC10\uD0C4\uC0AC",\uC870:"\uC870\uC0AC",\uC811:"\uC811\uC0AC",\uC758:"\uC758\uC874\uBA85\uC0AC",\uB300:"\uB300\uBA85\uC0AC",\uBCF4\uB3D9:"\uBCF4\uC870\uB3D9\uC0AC",\uBCF4\uD615:"\uBCF4\uC870\uD615\uC6A9\uC0AC"},hd={\uACE0\uC720:"\uACE0\uC720\uC5B4",\uD55C\uC790:"\uD55C\uC790\uC5B4",\uC678\uB798:"\uC678\uB798\uC5B4",\uD63C\uC885:"\uD63C\uC885\uC5B4"},Ps={\uBA85:"noun",\uB3D9:"verb",\uD615:"adjective",\uBD80:"adverb",\uC218:"numeral",\uAD00:"determiner",\uAC10:"interjection",\uC870:"particle",\uC811:"affix",\uC758:"dependentNoun",\uB300:"pronoun",\uBCF4\uB3D9:"auxVerb",\uBCF4\uD615:"auxAdjective"},Fs={\uACE0\uC720:"native",\uD55C\uC790:"sino",\uC678\uB798:"foreign",\uD63C\uC885:"mixed"};function md(e){return Object.fromEntries(Object.entries(pd).map(([t,r])=>[t,Ps[t]?e(`wordTable.pos.${Ps[t]}`,{defaultValue:r}):r]))}function fd(e){return Object.fromEntries(Object.entries(hd).map(([t,r])=>[t,Fs[t]?e(`wordSearch.filter.type.${Fs[t]}`,{defaultValue:r}):r]))}const F_={pos:Ps,wordType:Fs};function Is(e,t){return e?e.split("/").map(r=>t[r]??r).join("/"):""}function Os(e,t,r,a){if(a!=="dashed")return{};const s=e%t,l=Math.floor(e/t),i=s<t-1,u=l<r-1;if(!i&&!u)return{};const c="#ddd",p=C=>`repeating-linear-gradient(to ${C}, ${c} 0, ${c} 5px, transparent 5px, transparent 10px)`,h=[],d=[],m=[];return i&&(h.push(p("bottom")),d.push("1px 100%"),m.push("right center")),u&&(h.push(p("right")),d.push("100% 1px"),m.push("center bottom")),{backgroundImage:h.join(", "),backgroundSize:d.join(", "),backgroundPosition:m.join(", "),backgroundRepeat:"no-repeat",printColorAdjust:"exact",WebkitPrintColorAdjust:"exact"}}const Cd=280,I_=240,O_=280,gd=400,z_=120,W_=280;function bd(e,t){const r=o.useRef(null),[a,s]=o.useState(1),[l,i]=o.useState(0),u=o.useCallback((c,p)=>{if(!(c>0))return;const h=c/e,d=t&&p>0?p/t:1/0,m=Math.min(1,h,d);s(m),i(Math.max(0,(c-e*m)/2))},[e,t]);return o.useEffect(()=>{const c=r.current;if(!c)return;const p=t?c.parentElement??c:c;if(u(p.clientWidth,p.clientHeight),typeof ResizeObserver>"u")return;const h=new ResizeObserver(([d])=>u(d.contentRect.width,d.contentRect.height));return h.observe(p),()=>h.disconnect()},[u,t]),{scalerRef:r,scale:a,offset:l}}const H_=24,V_={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0},q_=400,yd=8;function U_(e){return e<=1?"100%":`repeat(${e}, calc((100% - ${e-1} * var(--wt-cell-gap, 0px)) / ${e}))`}function zs({label:e,subLabel:t,colloquialLabel:r,captionLabel:a,captionBadge:s,imageLabel:l,pickForm:i,homonum:u,showWord:c=!0,showImage:p=!0,showPronunciation:h=!0,showColloquial:d=!0,showCaption:m=!0,buttonSize:C=40,wordInfo:x,outerScale:g=1}){const{t:y}=Ne.useTranslation(),v=o.useRef(null),_=o.useRef(null),b=o.useRef(null),[B,N]=o.useState(1),[f,w]=o.useState(!1),[k,E]=o.useState(!1),[A,D]=o.useState({for:"",url:""}),[j,$]=o.useState(null),H=t&&t.length>0?t:lb()?.(e,u)??"",F=Br()?.(l||e,u)??"",{imgRef:U,loading:T,failed:I,onLoad:z,onError:ie}=Ls(F),te=o.useCallback(()=>$(_.current?.getBoundingClientRect()??null),[]),P=o.useCallback(()=>$(null),[]),G=La(!!j,le=>{le?te():P()},_),X=o.useMemo(()=>{if(!x)return null;const le=[];return x.grade&&le.push(y("wordTable.info.grade",{n:x.grade,defaultValue:"\uB09C\uC774\uB3C4: {{n}}\uB4F1\uAE09"})),x.syllables&&le.push(y("wordTable.info.syllables",{n:x.syllables,defaultValue:"\uC74C\uC808 \uC218: {{n}}\uC74C\uC808"})),x.pos&&le.push(y("wordTable.info.pos",{v:Is(x.pos,md(y)),defaultValue:"\uD488\uC0AC: {{v}}"})),x.wordType&&le.push(y("wordTable.info.wordType",{v:Is(x.wordType,fd(y)),defaultValue:"\uC720\uD615: {{v}}"})),le.length?le:null},[x,y]),K=H||e,L=A.for===K?A.url:"";o.useEffect(()=>{const le=Ur(),J=H||e;if(!le||!J)return;let O=!1;return Promise.resolve().then(()=>le(J)).catch(()=>"").then(W=>{!O&&W&&D({for:J,url:W})}),()=>{O=!0}},[H,e]);const R=o.useRef(null),S=o.useRef(null);o.useEffect(()=>()=>{b.current?.pause(),S.current?.()},[]);const V=o.useRef(null);o.useEffect(()=>()=>{V.current&&(V.current.cancelled=!0)},[]);const ae=o.useCallback(le=>{if(le.stopPropagation(),f||k){R.current?.();return}if(!L){const O=xa(),W=H||e;if(!O||!W)return;const q={cancelled:!1,stop:null};V.current=q;const oe=()=>{q.cancelled=!0,q.stop?.(),E(!1),w(!1),S.current?.()};R.current=oe,S.current=pa(oe),E(!0),Promise.resolve().then(()=>O(W)).then(ee=>{if(q.cancelled)return;if(!ee){oe();return}D({for:W,url:ee});const be=ha(ee,()=>{w(!1),S.current?.()});b.current=be.el,q.stop=be.stop,E(!1),w(!0)}).catch(()=>{oe()});return}w(!0);const J=ha(L,()=>{w(!1),S.current?.()});b.current=J.el,R.current=J.stop,S.current=pa(J.stop)},[f,k,L,H,e]),ne=p&&!!F&&!I,re=ne&&c?Cd:ne?O_:I_,ue=ne&&c?gd:ne?W_:z_;o.useEffect(()=>{const le=v.current;if(!le||typeof ResizeObserver>"u")return;const J=new ResizeObserver(([O])=>{const{width:W,height:q}=O.contentRect;N(Math.min(W/re,q/ue))});return J.observe(le),()=>J.disconnect()},[re,ue]);const Be=C*g<H_;return n.jsxs("div",{ref:v,className:xe("word-table-cell",Be&&"word-table-cell--tap-too-small",ne?"word-table-cell--with-image":""),"data-ref-w":re,"data-ref-h":ue,children:[n.jsxs("div",{className:"word-table-cell__inner",style:{transform:`scale(${B})`},children:[ne&&n.jsxs("div",{className:"word-table-cell__image-wrap",children:[T&&n.jsx("div",{className:"word-table-cell__spinner"}),n.jsx("img",{ref:U,className:"word-table-cell__image",src:F,alt:e,draggable:!1,style:{opacity:T?0:1},onLoad:z,onError:ie})]}),m&&(s||a)&&n.jsxs("span",{className:"word-table-cell__caption",children:[s&&n.jsx(cn,{fill:"soft",size:"small",label:s}),a&&n.jsx("span",{className:"word-table-cell__caption-tail h5",children:a})]}),c&&n.jsx("span",{className:"word-table-cell__word h0",children:e}),h&&H&&n.jsxs("span",{className:"word-table-cell__sub h3",children:["[",H,"]"]}),d&&r&&n.jsxs("span",{className:"word-table-cell__colloquial h5",children:["[",r,"]"]})]}),n.jsxs("div",{className:"word-table-cell__side",children:[n.jsxs("div",{className:"word-table-cell__play-button","data-audio-src":L,children:[n.jsx("span",{"data-play-state":"play",style:{display:f?"none":void 0},children:n.jsx(me,{htmlType:"button",size:C,type:"dot",icon:"play",variant:"transparent-lightGray",useBorder:!1,loading:k,showTooltipInfo:k?y("common.loading","\uBD88\uB7EC\uC624\uB294 \uC911"):y("common.play","\uC7AC\uC0DD"),ariaLabel:e?y("common.playFor",{name:e,defaultValue:`${e} \uC7AC\uC0DD`}):y("common.play","\uC7AC\uC0DD"),onClick:ae})}),n.jsx("span",{"data-play-state":"pause",style:{display:f?void 0:"none"},children:n.jsx(me,{htmlType:"button",size:C,type:"dot",icon:"pause",useBorder:!1,selected:!0,showTooltipInfo:y("common.pause","\uBA48\uCDA4"),ariaLabel:e?y("common.pauseFor",{name:e,defaultValue:`${e} \uBA48\uCDA4`}):y("common.pause","\uBA48\uCDA4"),onClick:ae})})]}),x&&n.jsxs("div",{ref:_,className:"word-table-cell__info-button",onPointerEnter:le=>{tr(le)||te()},onPointerLeave:le=>{tr(le)||P()},onFocus:()=>{ur()||te()},onBlur:P,children:[n.jsx(me,{htmlType:"button",size:C,type:"dot",icon:"info",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:!1,ariaLabel:y("wordTable.wordInfo","{{word}} \uB0B1\uB9D0 \uC815\uBCF4",{word:e}),onClick:le=>{le.stopPropagation(),G.touchPress()}}),j&&X&&n.jsx(er,{anchorRect:j,items:X,showIndex:!1})]}),i&&n.jsx("div",{className:"word-table-cell__form-button",children:n.jsx(me,{htmlType:"button",size:C,type:"dot",icon:"replace",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:y("wordTable.pickForm","\uB2E4\uB978 \uAF34\uB85C"),ariaLabel:i.n===null?y("wordTable.pickFormBaseAria","\uAE30\uBCF8\uD615 \uB0B1\uB9D0\uC744 \uB2E4\uB978 \uAF34\uB85C"):y("wordTable.pickFormAria",{n:i.n,defaultValue:"{{n}}\uBC88 \uCE78 \uB0B1\uB9D0\uC744 \uB2E4\uB978 \uAF34\uB85C"}),onClick:le=>{le.stopPropagation(),i.onPick(le.currentTarget.getBoundingClientRect())}})})]})]})}function Rr({title:e,titleIcon:t,disc:r,className:a,orientation:s="landscape",contentTypes:l=["image","word","standardPron"],baseItem:i,baseContentTypes:u,cutLine:c="show",showOutline:p=!0,showDivLine:h=!0,items:d,editCells:m,count:C,activeCell:x=null,onActivateCell:g,onRemoveCell:y,onRemoveItem:v,onReorder:_,onCopyItem:b,onReplaceItem:B,onPickForm:N,indexOffset:f=0,totalCount:w,renderCellAction:k,showFillerAdd:E=!1,fillerAdd:A="first",addableCount:D,contentRef:j,buttonSize:$=40,brand:H,code:F,pageNumber:U,pageNumberPosition:T="right",fitHeight:I=!1,scoring:z=!1,marks:ie,onMarkClick:te,scoreIndexOffset:P=0}){const G=o.useCallback((he,Le)=>{te?.(P+he,Le)},[te,P]),X=(he,Le)=>{const Pe=he.filter(Boolean).join(" / ");return Pe?Le?L("wordPrint.removePairFor",{name:Pe,defaultValue:`${Pe} \uB300\uB9BD\uC30D \uBE7C\uAE30`}):L("wordPrint.removeWordFor",{name:Pe,defaultValue:`${Pe} \uBE7C\uAE30`}):Le?L("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):L("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30")},K=(he,Le)=>{const Pe=ie?.[Wa(P+he)]??null;return n.jsx("div",{className:xe("word-table-cell__score",Pe?"word-table-cell__score--marked":""),style:Et>1?{transform:`translateX(-50%) scale(${Et})`,transformOrigin:"bottom center"}:void 0,children:Ha.map(We=>n.jsx("span",{className:xe("word-table-cell__score-slot",Pe===We?"word-table-cell__score-slot--on":""),children:n.jsx(me,{htmlType:"button",size:$,type:"dot",shape:"pill",icon:Cs[We],variant:Pe===We?gs[We]:"default",selected:Pe===We,useBorder:!1,...vt?{}:{tabIndex:-1,role:"img"},showTooltipInfo:L(`wordTable.scoring.markName.${We}`,{defaultValue:We}),ariaLabel:L(`wordTable.scoring.${We}`,{word:Le,defaultValue:`${Le} ${We}`}),onClick:vt?dt=>{dt.stopPropagation(),G(he,We)}:void 0})},We))})},{t:L}=Ne.useTranslation(),R=m!==void 0,S=e!=null||!!t||!!r,V=Bn("(max-width: 767px)"),ae=o.useRef(null),[ne,re]=o.useState(null),ue=d?.length??0,Be=w??ue,[le,J]=o.useState(null),[O,W]=o.useState(""),q=o.useRef(null),oe=o.useRef(null),ee=o.useRef(null),be=o.useRef(null),je=o.useCallback(he=>{oe.current=he,typeof j=="function"?j(he):j&&(j.current=he)},[j]),De=o.useCallback((he,Le)=>{q.current=f+Le,_?.(he,Le),W(L("wordTable.reorder.moved",{n:f+Le+1,total:Be,defaultValue:"{{total}}\uCE78 \uAC00\uC6B4\uB370 {{n}}\uBC88\uC9F8\uB85C \uC62E\uAE40"}))},[_,L,Be,f]);o.useEffect(()=>{const he=q.current;he!=null&&(q.current=null,(oe.current?.closest(".word-table-block__pages")??oe.current)?.querySelector(`[data-wordtable-index="${he}"] .word-table__card-handle button`)?.focus())}),o.useEffect(()=>()=>{be.current?.()},[]);const we=o.useCallback((he,Le)=>{if(!_||!he.altKey||he.ctrlKey||he.metaKey)return;const Pe=he.key==="ArrowRight";if(!Pe&&he.key!=="ArrowLeft")return;he.preventDefault();const We=Le+(Pe?1:-1),dt=f+We;dt<0||dt>=Be||De(Le,We)},[_,Be,f,De]),ze=o.useCallback((he,Le)=>{if(!_||he.pointerType==="mouse")return;const Pe=he.target.closest?.("button");if(Pe&&!Pe.closest(".word-table__card-handle"))return;be.current?.();const We={x:he.clientX,y:he.clientY};let dt=!1;const on=Ye=>{dt&&Ye.cancelable&&Ye.preventDefault()};let ht=null,Ke=null;const xt=()=>{const Ye=Ke;if(!Ye)return;const at=document.elementFromPoint?.(Ye.x,Ye.y)?.closest?.("[data-wordtable-cell]"),mt=at?Number(at.dataset.wordtableCell):NaN,Mt=Number.isInteger(mt)?mt:null;ee.current=Mt,re(Ot=>Ot===Mt?Ot:Mt)},jt=Ye=>{if(!dt){(Math.abs(Ye.clientX-We.x)>yd||Math.abs(Ye.clientY-We.y)>yd)&&Ge();return}if(Ke={x:Ye.clientX,y:Ye.clientY},typeof requestAnimationFrame>"u"){xt();return}ht===null&&(ht=requestAnimationFrame(()=>{ht=null,xt()}))},Q=()=>{ht!==null&&(cancelAnimationFrame(ht),ht=null,xt());const Ye=ee.current,at=dt;Ge(),at&&Ye!=null&&Ye!==Le&&De(Le,Ye)},fe=setTimeout(()=>{dt=!0,J(Le),ee.current=Le,re(Le),window.addEventListener("touchmove",on,{passive:!1})},q_);function Ge(){clearTimeout(fe),window.removeEventListener("pointermove",jt),window.removeEventListener("pointerup",Q),window.removeEventListener("pointercancel",Q),window.removeEventListener("touchmove",on),dt=!1,ht!==null&&(cancelAnimationFrame(ht),ht=null),ee.current=null,be.current=null,J(null),re(null)}be.current=Ge,window.addEventListener("pointermove",jt),window.addEventListener("pointerup",Q),window.addEventListener("pointercancel",Q)},[_,De]),{width:ye,height:_e}=fr[s],ve=typeof I=="number"?I:I&&typeof I=="object"?V?I.narrow:I.wide:null,{scalerRef:Ee,scale:Oe,offset:ot}=bd(ye,I?_e:void 0),it=R?m?.length??0:d?.length??0,Fe=Math.max(C??it,1),Ue=!R&&!!i,nt=R_(s,Fe),Te=dd(s,Fe),Xe=Ue?nt.cols:Te.cols,rt=Ue?nt.rows:Te.rows,ut=Ue&&s==="landscape"?nt.cols*2:Xe,gt=Ue&&s==="portrait"?nt.rows*2:rt,_t=he=>({word:he.length===0||he.includes("word"),image:he.length===0||he.includes("image"),pron:he.length===0||he.includes("standardPron"),colloq:he.length===0||he.includes("colloquialPron"),caption:he.length===0||he.includes("caption")}),pt=_t(l),Yt=o.useMemo(()=>{const he=(d??[]).map(Pe=>Pe.id),Le=he.every(Pe=>typeof Pe=="string"&&Pe.length>0)&&new Set(he).size===he.length;return!Le&&he.length>0&&Tt("wordTable.cellKeyFallback","[ihab/core] WordTable: items \uC758 id \uAC00 \uACB9\uCE58\uAC70\uB098 \uBE44\uC5B4 \uC788\uC5B4 \uCE78\uC744 \uC790\uB9AC \uBC88\uD638\uB85C \uC13C\uB2E4. \uCE78\uC744 \uBE7C\uAC70\uB098 \uB354\uD560 \uB54C \uB4A4 \uCE78\uB4E4\uC774 \uD1B5\uC9F8\uB85C \uB2E4\uC2DC \uADF8\uB824\uC9C4\uB2E4(\uC18C\uB9AC \uC8FC\uC18C\uB97C \uB2E4\uC2DC \uBC1B\uC544 \uC628\uB2E4). id \uB97C \uD45C \uC548\uC5D0\uC11C \uD558\uB098\uBFD0\uC778 \uAC12\uC73C\uB85C \uC9C0\uC5B4 \uC8FC\uBA74 \uADF8 \uAC12\uC774 \uC0AC\uB77C\uC9C4\uB2E4."),Le?he:null},[d]),kt=_t(u??l),ct=R?(m??[]).some(he=>he!==null&&he.length>1):(d??[]).some(he=>(he.words??[]).length>1),Ae=!!H?.show,st=!!H?.show&&H?.top!==!1,ft=!!H?.show&&H?.bottom!==!1,Ct=H?.copyright??"\xA9 IHAB, Inc. All rights reserved.",Nt=ce(xe("word-table__content",P_[c],p&&"word-table__content--outline",h&&ct&&"word-table__content--div-line",!Ae&&U&&T!=="none"&&"word-table__content--page-number",st&&"word-table__content--brand-top",ft&&"word-table__content--brand-bottom")),Ft={transform:`scale(${1/Oe})`,transformOrigin:"center center"},yt=$*Ha.length+4*(Ha.length-1),vt=!!te,Et=vt?Math.max(1,Math.min(1/Oe,ye/ut/yt)):1,[It,Je]=o.useState(bs);da(()=>{if(!z)return;const he=oe.current?.querySelector(".word-table-cell__score-slot .button__icon");if(!he)return;const Le=he.getBoundingClientRect().width;Le>0&&Je(r4(Le))},[z,Oe,Et,$,ue]);const At=n.jsxs("div",{ref:Ee,className:"word-table__scaler",style:{height:_e*Oe,"--word-table-mark-stroke":It},children:[n.jsx("div",{className:xe("word-table",z&&!vt&&"word-table--score-readonly",!S&&a),style:{width:ye,height:_e,transform:`scale(${Oe})`,transformOrigin:"top left",marginLeft:ot},children:n.jsxs("div",{ref:je,className:Nt,style:{gridTemplateColumns:`repeat(${ut}, 1fr)`,gridTemplateRows:U_(gt)},children:[R?n.jsx(n.Fragment,{children:(m??[]).map((he,Le)=>n.jsx("div",{className:ce(xe("word-table__edit-cell",he?"word-table__edit-cell--filled":"word-table__edit-cell--empty",x===Le?"word-table__edit-cell--active":"")),style:Os(Le,ut,gt,c),children:he?n.jsxs(n.Fragment,{children:[he.map((Pe,We)=>n.jsxs(o.Fragment,{children:[We>0&&n.jsx("div",{className:ce("word-table__pair-divider")}),n.jsx(zs,{outerScale:Oe,label:Pe.word,subLabel:Pe.pronunciation,colloquialLabel:Pe.colloquialPronunciation,homonum:Pe.homonum,showWord:pt.word,showImage:pt.image,showPronunciation:pt.pron,showColloquial:pt.colloq,showCaption:pt.caption,buttonSize:$})]},We)),z&&K(Le,he.map(Pe=>Pe.word).join(" / ")),y&&n.jsx("div",{className:ce("word-table__card-close"),children:n.jsx(me,{htmlType:"button",size:$,type:"dot",icon:"x",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:he.length>1?L("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):L("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),ariaLabel:X(he.map(Pe=>Pe.word),he.length>1),onClick:()=>y(Le)})})]}):g&&n.jsx("div",{className:ce("word-table__card-add"),style:Ft,children:n.jsx(me,{htmlType:"button",size:$,type:"dot",icon:"plus",variant:"default",ariaLabel:L("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),showTooltipInfo:L("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),onClick:()=>g(Le)})})},Le))}):n.jsxs(n.Fragment,{children:[Ue&&i&&n.jsx("div",{className:ce("word-table__card word-table__card--base"),style:{gridColumn:`1 / span ${nt.cols}`,gridRow:`1 / span ${nt.rows}`,...Os(0,s==="landscape"?2:1,s==="landscape"?1:2,c)},children:(i.words??[]).map((he,Le)=>n.jsxs(o.Fragment,{children:[Le>0&&n.jsx("div",{className:ce("word-table__pair-divider")}),n.jsx(zs,{outerScale:Oe,label:he.label,subLabel:he.subLabel,colloquialLabel:he.colloquialLabel,captionLabel:he.captionLabel,captionBadge:he.captionBadge,imageLabel:he.imageLabel,pickForm:N&&he.canPickForm?{n:null,onPick:Pe=>N(i.id,-1,Pe)}:void 0,homonum:he.homonum,showWord:kt.word,showImage:kt.image,showPronunciation:kt.pron,showColloquial:kt.colloq,showCaption:kt.caption,buttonSize:$,wordInfo:he.grade||he.syllables!=null||he.pos||he.wordType?{grade:he.grade,syllables:he.syllables,pos:he.pos,wordType:he.wordType}:void 0})]},Le))}),(d??[]).map((he,Le)=>n.jsxs("div",{"data-wordtable-cell":_?Le:void 0,"data-wordtable-index":_?f+Le:void 0,className:ce(`word-table__card${_?" word-table__card--draggable":""}${ne===Le?" word-table__card--drag-over":""}${le===Le?" word-table__card--dragging":""}`),style:Os(Le,Xe,rt,c),draggable:!!_,onPointerDown:_?Pe=>ze(Pe,Le):void 0,onKeyDown:_?Pe=>we(Pe,Le):void 0,onDragStart:_?()=>{ae.current=Le}:void 0,onDragOver:_?Pe=>{Pe.preventDefault(),re(Le)}:void 0,onDragLeave:_?()=>re(null):void 0,onDrop:_?Pe=>{Pe.preventDefault(),ae.current!==null&&ae.current!==Le&&_(ae.current,Le),ae.current=null,re(null)}:void 0,onDragEnd:_?()=>{ae.current=null,re(null)}:void 0,children:[(he.words??[]).map((Pe,We)=>n.jsxs(o.Fragment,{children:[We>0&&n.jsx("div",{className:ce("word-table__pair-divider")}),n.jsx(zs,{outerScale:Oe,label:Pe.label,subLabel:Pe.subLabel,colloquialLabel:Pe.colloquialLabel,captionLabel:Pe.captionLabel,captionBadge:Pe.captionBadge,imageLabel:Pe.imageLabel,pickForm:N&&Pe.canPickForm?{n:f+Le+1,onPick:dt=>N(he.id,f+Le,dt)}:void 0,homonum:Pe.homonum,showWord:pt.word,showImage:pt.image,showPronunciation:pt.pron,showColloquial:pt.colloq,showCaption:pt.caption,buttonSize:$,wordInfo:Pe.grade||Pe.syllables!=null||Pe.pos||Pe.wordType?{grade:Pe.grade,syllables:Pe.syllables,pos:Pe.pos,wordType:Pe.wordType}:void 0})]},We)),z&&K(Le,(he.words??[]).map(Pe=>Pe.label).join(" / ")),(k||v||b||B||_)&&n.jsxs("div",{className:ce("word-table__card-actions"),children:[v&&n.jsx("div",{className:ce("word-table__card-close"),children:n.jsx(me,{htmlType:"button",size:$,type:"dot",icon:"x",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:(he.words??[]).length>1?L("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):L("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),ariaLabel:X((he.words??[]).map(Pe=>Pe.label),(he.words??[]).length>1),onClick:()=>v(he.id)})}),b&&n.jsx("div",{className:ce("word-table__card-copy"),children:n.jsx(me,{htmlType:"button",size:$,type:"dot",icon:"copy",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:L("wordTable.copyItem","\uD55C \uCE78 \uB354"),ariaLabel:L("wordTable.copyItemAria",{n:f+Le+1,defaultValue:"{{n}}\uBC88 \uCE78 \uB0B1\uB9D0\uC744 \uD55C \uCE78 \uB354"}),onClick:()=>b(he.id,f+Le)})}),B&&n.jsx("div",{className:ce("word-table__card-replace"),children:n.jsx(me,{htmlType:"button",size:$,type:"dot",icon:"refresh-cw",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:(he.words??[]).length>1?L("wordTable.replacePair","\uB2E4\uB978 \uC30D\uC73C\uB85C"):L("wordTable.replaceItem","\uB2E4\uB978 \uB2E8\uC5B4\uB85C"),ariaLabel:(he.words??[]).length>1?L("wordTable.replacePairAria",{n:f+Le+1,defaultValue:"{{n}}\uBC88 \uCE78\uB9CC \uB2E4\uB978 \uC30D\uC73C\uB85C"}):L("wordTable.replaceItemAria",{n:f+Le+1,defaultValue:"{{n}}\uBC88 \uCE78\uB9CC \uB2E4\uB978 \uB2E8\uC5B4\uB85C"}),onClick:()=>B(he.id,f+Le)})}),k?.(Le,he),_&&n.jsx("div",{className:ce("word-table__card-handle"),children:n.jsx(me,{htmlType:"button",size:$,type:"dot",icon:"grip-vertical",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:L("wordTable.reorder.hint","Alt + \u2190 \u2192 \uB85C \uC21C\uC11C \uBC14\uAFB8\uAE30"),ariaLabel:L("wordTable.reorder.handle",{word:(he.words??[]).map(Pe=>Pe.label).join(" / "),defaultValue:"{{word}} \uC21C\uC11C \uBC14\uAFB8\uAE30 (Alt + \uD654\uC0B4\uD45C)"})})})]})]},Yt?Yt[Le]:Le)),Array.from({length:Math.max(0,Xe*rt-(d?.length??0))}).map((he,Le)=>{const Pe=Xe*rt,We=D??Pe,dt=(d?.length??0)+Le<We;return n.jsx("div",{className:ce("word-table__card word-table__card--filler"),children:E&&g&&dt&&(A==="every"||Le===0)&&n.jsx("div",{className:ce("word-table__card-add"),style:Ft,children:n.jsx(me,{htmlType:"button",size:$,type:"dot",icon:"plus",variant:"default",ariaLabel:L("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),showTooltipInfo:L("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),onClick:()=>g((d?.length??0)+Le)})})},`filler-${Le}`)})]}),st&&n.jsx(n.Fragment,{children:n.jsxs("div",{className:"word-table__band word-table__band--top",children:[n.jsx("img",{className:"word-table__brand-logo",src:H?.topLogo?.src??za,alt:H?.topLogo?.alt??"\uB9D0\uADC0"}),(()=>{const he=[H?.title&&n.jsx("span",{className:"word-table__paper-title",children:H.title},"t"),H?.owner&&n.jsx("span",{className:"word-table__owner",children:H.owner},"o"),F&&n.jsx("span",{className:"word-table__code",children:F},"c")].filter(Boolean);return he.length===0?null:n.jsx("span",{className:"word-table__ident",children:he.map((Le,Pe)=>n.jsxs(o.Fragment,{children:[Pe>0&&n.jsx("span",{className:"word-table__ident-dot","aria-hidden":"true",children:"\xB7"}),Le]},Pe))})})()]})}),ft&&n.jsx(n.Fragment,{children:n.jsxs("div",{className:"word-table__band word-table__band--bottom",children:[n.jsxs("span",{className:"word-table__brand-by",children:[H?.bottomLogo?n.jsx("img",{className:"word-table__brand-logo--ihab word-table__brand-logo--given",src:H.bottomLogo.src,alt:H.bottomLogo.alt}):n.jsx("span",{className:"word-table__brand-logo--ihab",role:"img","aria-label":"IHAB"}),n.jsx("span",{className:"word-table__copyright",children:Ct})]}),n.jsxs("span",{className:"word-table__band-end",children:[H?.link&&n.jsx("span",{className:"word-table__link",children:H.link}),U&&T!=="none"&&n.jsx("span",{className:"word-table__page-count",children:L("wordTable.filter.pageIndicator",{current:U.current,total:U.total})})]})]})}),!Ae&&U&&T!=="none"&&n.jsx("span",{className:`word-table__page-number body-3 word-table__page-number--${T}`,children:L("wordTable.filter.pageIndicator",{current:U.current,total:U.total})})]})}),_&&n.jsx("span",{role:"status",style:V_,children:O})]}),Qe=ve==null?At:n.jsx("div",{className:"word-table__frame",style:{height:ve},children:At});return S?n.jsx(Lr,{type:"page",icon:t,title:e,disc:r,className:xe(ce("word-table__section"),a),children:Qe}):Qe}function G_(e,t,r){const a=[];for(const s of e??[]){if(s.type==="note"||s.type==="input")continue;const l=s.displayLabel??s.label,i=K_(s,t?.[s.label],r);i!==null&&a.push(`${l} ${i}`)}return a.join(" \xB7 ")}function K_(e,t,r){const a=(Array.isArray(t)?t:t===void 0?[]:[t]).filter(s=>s!==Dn);return a.length===0?e.allOption?e.allLabel??r:null:a.map(s=>Y_(e,s)).join(", ")}function Y_(e,t){const r=[...e.items??[],...(e.groups??[]).flat()];for(const a of r)if(a!=null){if(typeof a=="string"){if(a===t)return a;continue}if(a.value===t)return a.displayLabel??a.labels?.join(" ")??a.value}return t}function Kn({title:e,titleLevel:t=2,headerAction:r,headerSummary:a,collapsible:s=!1,defaultCollapsed:l=!1,collapsed:i,onCollapsedChange:u,footer:c,sections:p,selected:h={},onSelect:d,align:m,sectionAlign:C,className:x}){const g=wn()??Cn,y=(m??(C==="vertical"?"newline":"inline"))==="inline",{t:v}=Ne.useTranslation(),[_,b]=o.useState(l),B=i??_,N=()=>{const j=!B;b(j),u?.(j)},f=j=>{if(!s)return;const $=j.target;!$||typeof $.closest!="function"||$.closest(".filter-panel__collapse-toggle")||$.closest('button, a, input, select, textarea, label, [role="radiogroup"], [role="button"], [role="menu"]')||N()},w=o.useMemo(()=>a!==void 0||!B?"":G_(p,h,v("common.all","\uC804\uCCB4")),[a,B,p,h,v]),k=a??(w?n.jsx("span",{className:"filter-panel__header-summary body-3",children:w}):null),E=e||r||a||s,A=o.useId(),D=t?`h${t}`:"span";return n.jsxs("div",{className:xe("filter-panel",s?"filter-panel--collapsible":"",B?"filter-panel--collapsed":"",x),role:typeof e=="string"&&e?"group":void 0,"aria-labelledby":typeof e=="string"&&e?A:void 0,children:[E&&n.jsxs("div",{className:"filter-panel__header",onClick:s?f:void 0,children:[n.jsx("div",{className:"filter-panel__title-row",children:e&&n.jsx(D,{id:A,className:"filter-panel__title h4",children:e})}),n.jsxs("div",{className:"filter-panel__header-actions",children:[B?k:r,s&&n.jsx(me,{htmlType:"button",size:g,type:"dot",variant:"transparent-gray",useBorder:!1,icon:B?"chevron-down":"chevron-up",className:"filter-panel__collapse-toggle",ariaLabel:B?v("common.expand","\uD3BC\uCE58\uAE30"):v("common.collapse","\uC811\uAE30"),showTooltipInfo:B?v("common.expand","\uD3BC\uCE58\uAE30"):v("common.collapse","\uC811\uAE30"),"aria-expanded":!B,onClick:N})]})]}),!B&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:xe("filter-panel__sections",y?"filter-panel__sections--row":""),children:p.map(j=>{const $=h[j.label],H=$===void 0||(Array.isArray($)?$.length===0:!1),F=(j.items??[]).filter(T=>T!=null);j.allOption&&F.some(T=>(typeof T=="string"?T:T.value)===Dn)&&Tt(`filter-panel-all-value:${j.label}`,`[FilterPanel] '${j.label}' \uC808\uC5D0 allOption \uACFC \uAC12 '${Dn}' \uC778 \uBCF4\uAE30\uAC00 \uD568\uAED8 \uC788\uB2E4 \u2014 \uB450 \uC120\uD0DD\uC774 \uAD6C\uBCC4\uB418\uC9C0 \uC54A\uB294\uB2E4. \uBCF4\uAE30 \uAC12\uC744 \uBC14\uAFD4\uB77C.`);const U=T=>{const I=typeof T=="string"?T:T.value,z=typeof T!="string"&&!!T.disabled,ie=typeof T!="string"?T.labels:void 0,te=typeof T!="string"?T.displayLabel:void 0,P=typeof T!="string"?T.tooltip:void 0,G=typeof T!="string"?T.descriptionTooltip:void 0,X=typeof T!="string"?T.shape:void 0,K=Array.isArray($)?$.includes(I):$===I;return n.jsx(me,{htmlType:"button",size:"keyboard",label:ie??te??I,type:j.itemType??(ie?"bar":I.length===1?"dot":void 0),selected:K,disabled:z,shape:X,showTooltipInfo:!!P,tooltipInfoText:P,tooltipDescription:G,onClick:()=>d?.(I,j.label)},I)};return n.jsxs(o.Fragment,{children:[j.groupLabel&&n.jsxs("div",{className:"filter-panel__group-label-row",children:[n.jsx("div",{className:"filter-panel__group-label body-2",children:j.groupLabel}),j.groupAction]}),n.jsxs("div",{className:xe("filter-panel__section",j.layout==="row"?"filter-panel__section--row":"",j.block?"filter-panel__section--block":""),children:[n.jsxs("div",{className:"filter-panel__section-label-row",children:[n.jsx("span",{className:"filter-panel__section-label body-3",children:j.displayLabel??j.label}),j.labelAction??(j.labelInfo?n.jsx(la,{...j.labelInfo}):null)]}),j.type==="note"?n.jsx("div",{className:"filter-panel__note body-3",children:j.content}):j.type==="input"?n.jsx(Un,{className:"filter-panel__textfield",placeholder:j.placeholder,ariaLabel:j.displayLabel??j.label,value:h[j.label]??"",onChange:T=>d?.(T,j.label),error:j.error}):!j.multiple&&j.display==="segmented"?n.jsx(kn,{ariaLabel:j.displayLabel??j.label,options:[...j.allOption?[{key:Dn,label:j.allLabel??v("common.all","\uC804\uCCB4"),disabled:j.allOptionDisabled}]:[],...F.map(T=>{const I=typeof T=="string"?T:T.value,z=typeof T!="string"?T.displayLabel:void 0,ie=typeof T!="string"?T.disabled:void 0;return{key:I,label:z??I,disabled:ie}})],value:H&&j.allOption?Dn:h[j.label]??"",onChange:T=>d?.(T,j.label),size:32}):!j.multiple&&j.display==="dropdown"?n.jsx(An,{className:"filter-panel__dropdown",ariaLabel:typeof j.label=="string"?j.label:void 0,size:g,options:[...j.allOption?[{value:Dn,label:j.allLabel??v("common.all","\uC804\uCCB4"),disabled:j.allOptionDisabled}]:[],...F.map(T=>{const I=typeof T=="string"?T:T.value,z=typeof T!="string"?T.displayLabel:void 0,ie=typeof T!="string"?T.disabled:void 0;return{value:I,label:z??I,disabled:ie}})],value:H&&j.allOption?Dn:h[j.label],onChange:T=>d?.(T,j.label)}):n.jsxs("div",{className:j.groups?"filter-panel__item-groups":"filter-panel__items",children:[j.allOption&&!j.groups&&n.jsx(me,{htmlType:"button",size:"keyboard",label:j.allLabel??v("common.all","\uC804\uCCB4"),selected:H,disabled:j.allOptionDisabled,onClick:()=>d?.(Dn,j.label)}),j.groups?j.groups.map((T,I)=>n.jsxs("div",{className:"filter-panel__item-group",children:[I===0&&j.allOption&&n.jsx(me,{htmlType:"button",size:"keyboard",label:j.allLabel??v("common.all","\uC804\uCCB4"),selected:H,disabled:j.allOptionDisabled,onClick:()=>d?.(Dn,j.label)}),T.filter(z=>z!=null).map(U)]},I)):F.map(U)]})]})]},j.label)})}),c!=null&&c!==!1&&n.jsx("div",{className:"filter-panel__footer body-3",children:c})]})]})}const Z_=[1,2,3,4,5,6,7,8,9,10,11,12],X_=[8,6,4,2,1],_n="show",Pn="hide",vd=["image","word","caption","standardPron"];function xd(e){return e.some(t=>(t.words??[]).some(r=>!!r.captionBadge||!!r.captionLabel))}function _d(e,t){return{label:e("wordTable.filter.composition","\uAD6C\uC131"),items:[{value:"image",disabled:!t.hasImage,displayLabel:e("wordTable.filter.image","\uC774\uBBF8\uC9C0")},{value:"word",displayLabel:e("wordTable.filter.word","\uB2E8\uC5B4")},{value:"caption",disabled:!t.hasCaption,displayLabel:e("wordTable.filter.caption","\uC720\uD615")},{value:"standardPron",displayLabel:e("wordTable.filter.standardPron","\uD45C\uC900 \uBC1C\uC74C")},{value:"colloquialPron",disabled:!t.hasColloquial,displayLabel:e("wordTable.filter.colloquialPron","\uAD6C\uC5B4\uCCB4 \uBC1C\uC74C")}],multiple:!0,allOption:!0}}function wd(e){return{label:e("wordTable.filter.paperOrientation","\uC6A9\uC9C0 \uBC29\uD5A5"),items:[{value:"landscape",displayLabel:e("wordTable.filter.landscape","\uAC00\uB85C")},{value:"portrait",displayLabel:e("wordTable.filter.portrait","\uC138\uB85C")}],display:"segmented"}}function Bd(e){return{label:e("wordTable.filter.border","\uC678\uACFD\uC120"),items:[{value:_n,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:Pn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function kd(e){return{label:e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4"),items:[{value:_n,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:Pn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Ad(e){return{label:e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4"),items:[{value:_n,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:Pn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Nd(e){return{label:e("wordTable.filter.cutLine","\uC808\uCDE8\uC120"),items:[{value:_n,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:"dashed",displayLabel:e("wordTable.filter.dotted","\uC810\uC120")},{value:"corner",displayLabel:e("wordTable.filter.corner","\uCF54\uB108")},{value:Pn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Ed(e){return{label:e("wordPrint.divLine","\uB300\uB9BD\uC120"),items:[{value:_n,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:Pn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function jd(e,t){const r=Math.max(1,Math.min(t.itemCount,t.max??t.itemCount));return{label:e(t.hasPairs?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord"),items:[r,...X_.filter(a=>a<r)].map(a=>({value:`${a}\uAC1C`,displayLabel:e("wordTable.filter.itemsPerPageOption",{count:a})})),display:"segmented"}}function Dd(e,t){return e>=t?Number.POSITIVE_INFINITY:e}function J_(e){return{label:e("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638"),items:[{value:"left",displayLabel:e("wordTable.filter.pageNumberLeft","\uC67C\uCABD")},{value:"center",displayLabel:e("wordTable.filter.pageNumberCenter","\uC911\uC559")},{value:"right",displayLabel:e("wordTable.filter.pageNumberRight","\uC624\uB978\uCABD")},{value:Pn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Sd(e){return e==="left"||e==="center"||e==="right"?e:"none"}function Td(e,t){return{[e("wordTable.filter.composition","\uAD6C\uC131")]:t.contentTypes,[e("wordTable.filter.paperOrientation","\uC6A9\uC9C0 \uBC29\uD5A5")]:t.orientation,[e("wordTable.filter.border","\uC678\uACFD\uC120")]:t.showOutline?_n:Pn,[e("wordTable.filter.cutLine","\uC808\uCDE8\uC120")]:t.cutLine,[e("wordPrint.divLine","\uB300\uB9BD\uC120")]:t.showDivLine?_n:Pn,...t.showTopInfo!=null?{[e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4")]:t.showTopInfo?_n:Pn}:{},...t.showBottomInfo!=null?{[e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4")]:t.showBottomInfo?_n:Pn}:{}}}function Md(e,t,r,a){return r===e("wordTable.filter.composition","\uAD6C\uC131")?t===Dn?(a.setContentTypes(()=>[]),!0):(a.setContentTypes(s=>s.includes(t)?s.filter(l=>l!==t):[...s,t]),!0):r===e("wordTable.filter.paperOrientation","\uC6A9\uC9C0 \uBC29\uD5A5")?(a.setOrientation(t==="landscape"?"landscape":"portrait"),!0):r===e("wordTable.filter.border","\uC678\uACFD\uC120")?(a.setShowOutline(t===_n),!0):r===e("wordTable.filter.cutLine","\uC808\uCDE8\uC120")?(a.setCutLine(t),!0):r===e("wordPrint.divLine","\uB300\uB9BD\uC120")?(a.setShowDivLine(t===_n),!0):r===e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4")?(a.setShowTopInfo?.(t===_n),!0):r===e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4")?(a.setShowBottomInfo?.(t===_n),!0):!1}function Q_(e){return"sections"in e}function Ws(e){const{t}=Ne.useTranslation(),{title:r,className:a,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c}=e,p={collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c};if(Q_(e))return n.jsx(Kn,{className:a,title:r??t("wordTable.filterTitle","\uD45C \uC124\uC815"),sections:e.sections,selected:e.selected,onSelect:e.onSelect,...p,align:"inline"});const{hasImage:h,hasColloquial:d,hasCaption:m,contentTypes:C,orientation:x,showOutline:g,cutLine:y,showDivLine:v,setters:_,showCutLine:b=!1,showDivLine2:B=!1,middleSections:N=[],extraSelected:f={},onExtraSelect:w,showPaperBands:k=!1,showTopInfo:E=!0,showBottomInfo:A=!0}=e,D=[_d(t,{hasImage:h,hasColloquial:d,hasCaption:m??!1}),wd(t),...N,Bd(t),...b?[Nd(t)]:[],...B?[Ed(t)]:[],...k?[kd(t),Ad(t)]:[]],j={...Td(t,{contentTypes:C,orientation:x,showOutline:g,cutLine:y,showDivLine:v,showTopInfo:E,showBottomInfo:A}),...f},$=(H,F)=>{Md(t,H,F,_)||w?.(H,F)};return n.jsx(Kn,{className:a,title:r??t("wordTable.filterTitle","\uD45C \uC124\uC815"),sections:D,selected:j,onSelect:$,...p,sectionAlign:"horizontal"})}function Hs(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function ew(e){return Hs(e).replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function Vs(e){return e.replace(/[\\/:*?"<>|]/g,"_").trim()}let Za=null,Pr=null;function tw(e,t,r,a="",s=""){if(e.length===0||Pr&&Pr.iframe.isConnected&&Date.now()-Pr.at<1e4)return;const l=a?Vs(a):"";Za?.();let i=null;if(l){const p=document.title;document.title=l,i=()=>{document.title=p,window.removeEventListener("afterprint",i),Za===i&&(Za=null)},Za=i,window.addEventListener("afterprint",i)}const u=document.createElement("iframe");u.style.cssText="position:fixed;left:-10000px;top:0;width:1200px;height:900px;border:0;",document.body.appendChild(u);const c=u.contentDocument;if(!c){u.remove();return}Pr={iframe:u,at:Date.now()},c.open(),c.write(qs(e,t,r,!0,l,s)),c.close(),u.contentWindow?.addEventListener("afterprint",()=>{i?.(),setTimeout(()=>{u.remove(),Pr?.iframe===u&&(Pr=null)},0)})}function qs(e,t,r,a=!1,s="",l=""){s=s?Vs(s):"";const i=Array.from(document.styleSheets).flatMap(d=>{try{return Array.from(d.cssRules).map(m=>m.cssText)}catch{return[]}}).join(`
850
850
  `),u="light",c=(()=>{try{return document.documentElement.lang||""}catch{return""}})(),p=l?`<div class="paper-head">${Hs(l)}</div>`:"",h=e.map(d=>{const m=d.cloneNode(!0);return m.querySelectorAll('[data-play-state="play"]').forEach(C=>C.style.display=""),m.querySelectorAll('[data-play-state="pause"]').forEach(C=>C.style.display="none"),m.querySelectorAll(".word-table-cell__score-slot:not(.word-table-cell__score-slot--on)").forEach(C=>C.remove()),m.querySelectorAll(".word-table-cell__spinner").forEach(C=>C.remove()),m.querySelectorAll("img").forEach(C=>{C.style.opacity==="0"&&(C.setAttribute("onload","this.style.opacity=''"),C.setAttribute("onerror","this.style.visibility='hidden'"))}),`<div class="paper-wrap">${p}${m.outerHTML}</div>`}).join(`
851
851
  `);return`<!DOCTYPE html>
852
852
  <html${c?` lang="${ew(c)}"`:""} data-theme="${u}">
@@ -1056,10 +1056,10 @@ ${f.badge}`:f.badge:void 0;if(k&&h(f.code))return null;if(!f.badge&&!m)return C(
1056
1056
  `:""}
1057
1057
  <\/script>
1058
1058
  </body>
1059
- </html>`}const nw=1e3;function Us({getElements:e,paperW:t,paperH:r,fileName:a="",onPopupBlocked:s,header:l=""}){const{t:i}=Ne.useTranslation(),u=o.useCallback(()=>{tw(e(),t,r,a,l)},[e,t,r,a,l]),c=o.useCallback(()=>{const h=e();if(h.length===0)return;const d=window.open("","_blank");if(!d){s?.();return}d.document.write(qs(h,t,r,!1,a,l)),d.document.close()},[e,t,r,a,s,l]),p=o.useCallback(()=>{const h=e();if(h.length===0)return;const d=qs(h,t,r,!1,a,l),m=new Blob([d],{type:"text/html;charset=utf-8"}),C=URL.createObjectURL(m),x=(a?Vs(a):"")||i("wordTable.printFileNameSingle","\uB2E8\uC5B4\uD45C"),g=Object.assign(document.createElement("a"),{href:C,download:`${x}.html`});document.body.appendChild(g),g.click(),document.body.removeChild(g),setTimeout(()=>URL.revokeObjectURL(C),nw)},[e,t,r,a,l,i]);return{print:u,openNewWindow:c,downloadHtml:p}}function $d(e,t){const{t:r}=Ne.useTranslation(),a=t?.paperBands===!0,s=t?.maxItemsPerPage,[l,i]=o.useState("landscape"),[u,c]=o.useState([...vd]),[p,h]=o.useState("show"),[d,m]=o.useState(!0),[C,x]=o.useState(!0),[g,y]=o.useState(!0),[v,_]=o.useState(!0),[b,B]=o.useState(8),[N,f]=o.useState("right"),w=e.length,k=e.some(te=>(te.words??[]).length>1),E=e.some(te=>(te.words??[]).some(P=>!!P.colloquialLabel)),A=xd(e),D=Math.max(1,Math.min(Math.max(w,1),s??Math.max(w,1))),j=Math.min(b,D),$=o.useMemo(()=>$_(e,j),[e,j]),H=$.length>1,F=j,[U,T]=o.useState(!1);o.useEffect(()=>{let te=!1;if(!Br()){T(!1);return}return Promise.all(e.flatMap(P=>(P.words??[]).map(G=>mi(G.label,G.homonum)))).then(P=>{te||T(P.some(Boolean))},()=>{}),()=>{te=!0}},[e]);const I=o.useMemo(()=>[_d(r,{hasImage:U,hasColloquial:E,hasCaption:A}),wd(r),...w>0?[jd(r,{hasPairs:k,itemCount:w,max:s})]:[],Bd(r),...F>1?[Nd(r)]:[],...k?[Ed(r)]:[],...a?[kd(r),Ad(r)]:[]],[r,U,E,A,w,k,H,F,a,s]),z={...Td(r,{contentTypes:u,orientation:l,showOutline:d,cutLine:p,showDivLine:v,showTopInfo:C,showBottomInfo:g}),...w>0?{[r(k?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")]:`${j}\uAC1C`}:{},...H?{[r("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")]:N}:{}},ie=o.useCallback((te,P)=>{Md(r,te,P,{setContentTypes:c,setOrientation:i,setShowOutline:m,setCutLine:h,setShowDivLine:_,setShowTopInfo:x,setShowBottomInfo:y})||(P===r("wordTable.filter.itemsPerPagePair","\uD398\uC774\uC9C0\uB2F9 \uB300\uB9BD\uC30D \uC218")||P===r("wordTable.filter.itemsPerPageWord","\uD398\uC774\uC9C0\uB2F9 \uB2E8\uC5B4 \uC218")?B(Dd(parseInt(te),w)):P===r("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")&&f(Sd(te)))},[r,w]);return{settings:{orientation:l,contentTypes:u,cutLine:p,showOutline:d,showDivLine:v,count:F,showTopInfo:C,showBottomInfo:g},filterSections:I,filterSelected:z,handleSelect:ie,pages:$,isPaginated:H,pageNumberPosition:N}}function rw({items:e,words:t,baseItem:r,baseContentTypes:a,maxItemsPerPage:s,title:l,subtitle:i,emptyText:u,buttons:c,renderButtons:p,renderFooter:h,footerClassName:d,footerLayout:m,printFileName:C,showSettings:x,autoPrint:g,className:y,onClose:v,scoring:_=!1,onScoreChange:b,printHeader:B,brand:N,code:f,beforeClose:w}){const{t:k}=Ne.useTranslation(),E=o.useMemo(()=>Array.isArray(e)?e:(Array.isArray(t)?t:[]).filter(O=>typeof O=="string"&&O.length>0).map((O,W)=>({id:`${O}-${W}`,words:[{label:O}]})),[e,t]),{settings:A,filterSections:D,filterSelected:j,handleSelect:$,pages:H,isPaginated:F,pageNumberPosition:U}=$d(E,{paperBands:!!N?.show,maxItemsPerPage:s}),T=o.useMemo(()=>jc(H.map(O=>O.length)),[H]),[I,z]=o.useState({}),ie=o.useCallback((O,W)=>{z(q=>({...q,[Wa(O)]:Ec(q[Wa(O)]??null,W)}))},[]),te=o.useRef(b);o.useEffect(()=>{te.current=b});const P=o.useRef(I);o.useEffect(()=>{P.current!==I&&(P.current=I,te.current?.(ys(I)))},[I]);const G=o.useMemo(()=>ys(I),[I]),X=o.useRef(null),{toastMessage:K,toastKey:L,showWarning:R,clearToast:S}=Tu("warning"),V=o.useRef([]),ae=o.useCallback(()=>F?V.current.filter(O=>O!==null):X.current?[X.current]:[],[F]),{print:ne,openNewWindow:re}=Us({getElements:ae,paperW:fr[A.orientation].width,paperH:fr[A.orientation].height,fileName:C??"",header:B??"",onPopupBlocked:()=>R(k("wordTable.popupBlocked","\uD31D\uC5C5\uC774 \uCC28\uB2E8\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uBE0C\uB77C\uC6B0\uC800 \uC124\uC815\uC5D0\uC11C \uD31D\uC5C5\uC744 \uD5C8\uC6A9\uD574 \uC8FC\uC138\uC694."))}),ue=o.useMemo(()=>h?void 0:p?p({print:ne,openNewWindow:re}):C?[{label:k("wordTable.openNewWindow","\uC0C8 \uCC3D\uC73C\uB85C \uBCF4\uAE30"),variant:"default",onClick:()=>re()},{label:k("wordTable.print","\uC778\uC1C4\uD558\uAE30"),variant:"default",onClick:()=>ne()},...c??[]]:c,[h,p,C,c,k,ne,re]),Be=o.useMemo(()=>h?h({print:ne,openNewWindow:re}):void 0,[h,ne,re]),le=o.useRef(!1),J=o.useRef(ne);return o.useEffect(()=>{J.current=ne},[ne]),o.useEffect(()=>{if(!g||le.current)return;const O=window.setTimeout(()=>{le.current=!0,J.current()},100);return()=>window.clearTimeout(O)},[g]),n.jsxs(qn,{title:l??k("keyWords.title","\uC8FC\uC694 \uB2E8\uC5B4"),subtitle:i,size:"large",className:xe("word-table-popup",y),buttons:ue,footer:Be,footerClassName:d,footerLayout:m,beforeClose:w,onClose:v,children:[E.length>0?n.jsxs("div",{className:"word-table-popup__body",children:[x&&n.jsx(Ws,{sections:D,selected:j,onSelect:$}),F?n.jsx("div",{className:"word-table-popup__pages",children:H.map((O,W)=>n.jsx(Lr,{items:O,orientation:A.orientation,contentTypes:A.contentTypes,baseItem:r,baseContentTypes:a,cutLine:A.cutLine,showOutline:A.showOutline,showDivLine:A.showDivLine,count:A.count,contentRef:q=>{V.current[W]=q},pageNumber:{current:W+1,total:H.length},pageNumberPosition:U,brand:N&&{...N,top:A.showTopInfo,bottom:A.showBottomInfo},code:f,scoring:_,scoreIndexOffset:T[W],marks:G,onMarkClick:ie},W))}):n.jsx("div",{className:"word-table-popup__table",children:n.jsx(Lr,{items:E,orientation:A.orientation,contentTypes:A.contentTypes,baseItem:r,baseContentTypes:a,cutLine:A.cutLine,showOutline:A.showOutline,showDivLine:A.showDivLine,count:A.count,contentRef:X,fitHeight:!0,scoring:_,marks:G,onMarkClick:ie,brand:N&&{...N,top:A.showTopInfo,bottom:A.showBottomInfo},code:f})})]}):n.jsx("p",{className:"word-table-popup__empty body-3",children:u??k("keyWords.empty","\uCD94\uCD9C\uB41C \uC8FC\uC694 \uB2E8\uC5B4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}),n.jsx(Mr,{message:K,position:"top",onClose:S},L)]})}const aw=new Set(["x","triangle"]);function ow(e,t){const r=[];for(let a=0;a<e.length;a++){const s=t[String(a)];s&&aw.has(s)&&r.push(e[a])}return r}const sw=/\s*(?:(\d+)차\s*)?복습\s*\d{2}\.\d{2}$/;function Ld(e){const t=e.name.trim(),r=e.reviewRound;if(typeof r=="number"&&Number.isFinite(r)&&r>=0){const l=Math.floor(r);if(l===0)return{base:t,round:1};const i=(l===1?/\s*복습\s*\d{2}\.\d{2}$/:new RegExp(`(?:^|\\s)${l}\uCC28\\s*\uBCF5\uC2B5\\s*\\d{2}\\.\\d{2}$`)).exec(t);return{base:i?t.slice(0,i.index).trim():t,round:l+1}}let a=t,s=1;for(;;){const l=sw.exec(a);if(!l)break;s=Math.max(s,(l[1]?Number(l[1]):1)+1),a=a.slice(0,l.index).trim()}return{base:a,round:s}}function lw(e,t){const[,r,a]=Io(t).split("-"),s=`${r}.${a}`,{base:l,round:i}=Ld(typeof e=="string"?{name:e}:e),u=i>=2?`${i}\uCC28 `:"";return`${l||"\uB2E8\uC5B4\uD45C"} ${u}\uBCF5\uC2B5 ${s}`}function iw(e){return{reviewOf:e.reviewOf??e.id??void 0,reviewRound:Ld(e).round}}function uw(e,t){const r={};for(const[a,s]of Object.entries(t)){if(s!=="o"&&s!=="triangle"&&s!=="x")continue;const l=Number(a),i=e[l];i&&(r[a]=i)}return r}function cw(e){return e.map(t=>t.label).join(" / ")}function dw(e){return e.map(t=>t.homonum!=null?`${t.label}#${t.homonum}`:t.label).join(" / ")}function Rd(e){return e.split(" / ").map(t=>t.replace(/#\d+$/,"")).join(" / ")}function pw(e,t,r){const a=Di(r);return[e.trim(),a,t.trim()].filter(Boolean).join(" \xB7 ")}function Pd(e,t,r){return r===0?0:(e+t*.5)/r}function hw(e){const t=new Map,r=[...e].sort((s,l)=>s.scoredAt.localeCompare(l.scoredAt));for(const s of r)for(const[l,i]of Object.entries(s.marks)){const u=s.labels?.[l];if(!u)continue;const c=t.get(u)??{o:0,triangle:0,x:0,latest:i,latestAt:s.scoredAt};if(i==="o")c.o++;else if(i==="triangle")c.triangle++;else if(i==="x")c.x++;else continue;c.latest=i,c.latestAt=s.scoredAt,t.set(u,c)}const a=[];for(const[s,l]of t){const i=l.o+l.triangle+l.x;a.push({label:Rd(s),key:s,tried:i,o:l.o,triangle:l.triangle,x:l.x,rate:Pd(l.o,l.triangle,i),latest:l.latest,latestAt:l.latestAt})}return a.sort((s,l)=>s.rate-l.rate||l.tried-s.tried||xn(s.label,l.label)||xn(s.key??s.label,l.key??l.label)),a}function mw(e){const t=new Map;for(const a of e){const s=a.tableId??`name:${a.tableName}`,l=t.get(s)??{tableName:a.tableName,tableId:a.tableId,rows:[]};l.rows.push(a),t.set(s,l)}const r=[];for(const a of t.values()){const s=u=>Object.values(u.marks).filter(c=>c==="o"||c==="triangle"||c==="x").length,l=a.rows.filter(u=>s(u)>0).sort((u,c)=>u.scoredAt.localeCompare(c.scoredAt));if(l.length===0)continue;const i=l.map(u=>{const c=Object.values(u.marks),p=c.filter(d=>d==="o").length,h=c.filter(d=>d==="triangle").length;return Pd(p,h,s(u))});r.push({tableName:a.tableName,tableId:a.tableId,rates:i,times:l.map(u=>u.scoredAt),delta:i.length>=2?i[i.length-1]-i[0]:null})}return r.sort((a,s)=>(s.times[s.times.length-1]??"").localeCompare(a.times[a.times.length-1]??"")),r}function fw(e,t=8){return e.filter(r=>r.latest!=="o").slice(0,t)}function Cw(e,t){if(e==null||t==null||e===""||t==="")return 0;if(typeof e=="number"&&typeof t=="number")return e-t;const r=String(e),a=String(t);return+(r>a)-+(r<a)}function gw(e){const t=new Map;let r=0,a=0;const s=e.map((i,u)=>({r:i,at:u})).sort((i,u)=>i.r.answeredAt.localeCompare(u.r.answeredAt)||Cw(i.r.id,u.r.id)||i.at-u.at).map(i=>i.r);for(const i of s){if(i.isCorrect==null)continue;const u=i.itemTitle?.trim();if(!u){a++;continue}r++;const c=i.itemId?.trim()||u,p=`${i.trainingType}|${c}`,h=t.get(p)??{trainingType:i.trainingType,itemId:c,title:u,tried:0,wrong:0,latestCorrect:i.isCorrect,latestAt:i.answeredAt,lastSelected:i.selected,setIds:[]};if(h.tried++,i.isCorrect||h.wrong++,h.title=u,h.latestCorrect=i.isCorrect,h.latestAt=i.answeredAt,h.lastSelected=i.selected,i.setId){const d=h.setIds.indexOf(i.setId);d>0&&h.setIds.splice(d,1),d!==0&&h.setIds.unshift(i.setId)}t.set(p,h)}const l=[...t.entries()].map(([i,u])=>({key:i,trainingType:u.trainingType,itemId:u.itemId,title:u.title,tried:u.tried,wrong:u.wrong,rate:u.tried===0?0:(u.tried-u.wrong)/u.tried,latestCorrect:u.latestCorrect,latestAt:u.latestAt,lastSelected:u.lastSelected,setIds:u.setIds}));return l.sort((i,u)=>i.rate-u.rate||u.tried-i.tried||xn(i.title,u.title)),{items:l,counted:r,skippedNoTitle:a}}function bw(e,t=8){return e.filter(r=>!r.latestCorrect).slice(0,t)}function yw(e){const t=new Map;for(const a of e){const s=t.get(a.trainingType)??[];s.push(a),t.set(a.trainingType,s)}const r=[...t.entries()].map(([a,s])=>({trainingType:a,items:s,pending:s.filter(l=>!l.latestCorrect).length}));return r.sort((a,s)=>s.pending-a.pending||a.trainingType.localeCompare(s.trainingType)),r}const Gs=["LISTEN_IN_NOISE","SHORT_STORY","LONG_STORY","ORDERING_SENTENCE"];function vw(e){const t=new Map;let r=0;for(const l of e){if(l.latestCorrect)continue;const i=l.setIds[0];if(!i){r++;continue}const u=`${l.trainingType}|${i}`,c=t.get(u)??{setId:i,trainingType:l.trainingType,pending:0};c.pending++,t.set(u,c)}const a=(l,i)=>i.pending-l.pending||l.trainingType.localeCompare(i.trainingType)||l.setId.localeCompare(i.setId),s=[...t.values()];return{sentence:s.filter(l=>Gs.includes(l.trainingType)).sort(a),word:s.filter(l=>!Gs.includes(l.trainingType)).sort(a),noSet:r}}function xw(e,t,r=5){const a=new Set(t);if(a.size===0)return[];const s=[];for(const l of e){const i=new Set,u=[];for(const c of l.cellLabels)a.has(c)&&!i.has(c)&&(i.add(c),u.push(c));u.length!==0&&s.push({id:l.id,name:l.name,kind:l.kind,covered:u,totalCells:l.cellLabels.length})}return s.sort((l,i)=>i.covered.length-l.covered.length||l.totalCells-i.totalCells||xn(l.name,i.name)),s.slice(0,Math.max(0,r))}function _w(e,t){const r=new Set(e.flatMap(a=>a.covered));return t.filter(a=>!r.has(a))}function ww(e,t){const r=new Map;for(const s of e)for(const l of s.cells){const i=s.labelOf(l);r.has(i)||r.set(i,l)}const a=[];for(const s of t){const l=r.get(s);l!==void 0&&a.push(l)}return a}function Ks(e,t,r){return typeof e=="string"&&e?e:t.replace(/\{\{(\w+)\}\}/g,(a,s)=>String(r[s]))}function Bw(e,t){const r=Number.isFinite(e)?Math.round(e):0;if(!r||r<=0)return"-";const a=Math.floor(r/60),s=r%60;return t?t(a,s):a>0&&s>0?Ks(Pt.t("customers.duration.minSec",{m:a,s,defaultValue:"{{m}}\uBD84 {{s}}\uCD08"}),"{{m}}\uBD84 {{s}}\uCD08",{m:a,s}):a>0?Ks(Pt.t("customers.duration.min",{m:a,defaultValue:"{{m}}\uBD84"}),"{{m}}\uBD84",{m:a}):Ks(Pt.t("customers.duration.sec",{s,defaultValue:"{{s}}\uCD08"}),"{{s}}\uCD08",{s})}function kw(e,t){const r=[],a=new Set;for(const s of e){const l=t(s);a.has(l)||(a.add(l),r.push({key:l,value:s,pinned:!1}))}return r}function Aw(e,t){return e.map(r=>r.key===t?{...r,pinned:!r.pinned}:r)}function Nw(e,t){return e.filter(r=>r.key!==t)}function Ew(e,t,r){const a=e.filter(p=>p.pinned),s=new Set(a.map(p=>p.key)),l=e.length-a.length,i=[],u=new Set(s);for(const p of t){if(i.length>=l)break;const h=r(p);u.has(h)||(u.add(h),i.push({key:h,value:p,pinned:!1}))}const c=[...i];return e.map(p=>p.pinned?p:c.shift()).filter(p=>p!==void 0)}function jw(e){return e.map(t=>t.value)}function Dw(e){const{category:t={},isSelected:r=!1,onClick:a}=e||{},s=t?.key?` icon-grid-menu__button--${t.key}`:"",l=o.useId();return n.jsxs("div",{className:`icon-grid-menu__button-wrapper${s}`,children:[n.jsx("button",{className:`icon-grid-menu__button${r?" icon-grid-menu__button--selected":""}`,"data-key":t?.key,type:"button",onClick:r?void 0:a,"aria-pressed":r,"aria-labelledby":l,children:n.jsx(lt,{icon:t.icon,label:t.label,className:"icon-grid-menu__button-icon",imgClassName:"icon-grid-menu__button-icon-image",maskClassName:"icon-grid-menu__button-icon-mask",svgClassName:"icon-grid-menu__button-icon-svg"})}),n.jsx("span",{id:l,className:"icon-grid-menu__button-label button-1",children:t.label})]})}function Sw(e){const{categories:t=[],selected:r,onSelect:a,size:s="medium"}=e||{},l=r!==void 0,[i,u]=o.useState(()=>l?null:(t&&t[0]?.key)??null),c=l?r:i,p=o.useRef(a);o.useEffect(()=>{p.current=a});const h=o.useRef(!1),d=(t&&t[0]?.key)??null;o.useEffect(()=>{if(l||h.current||!d)return;h.current=!0;const C=i??d;i==null&&u(C),p.current?.(C)},[l,d]);const m=o.useCallback(C=>{const x=c===C?null:C;h.current=!0,l||u(x),a?.(x)},[c,l,a]);return n.jsx("div",{className:`icon-grid-menu icon-grid-menu--${s}`,children:(t||[]).map(C=>n.jsx(Dw,{category:C,isSelected:c===C.key,onClick:()=>m(C.key)},C.key))})}function Tw({subs:e=[],selected:t,onSelect:r,size:a="medium"}){const s=a==="small"?32:40;return n.jsx("div",{className:`choice-chips choice-chips--${a}`,children:n.jsx("div",{className:"choice-chips__list",children:e.map(l=>n.jsx(me,{htmlType:"button",size:s,type:"bar",label:l.label,selected:t===l.key,className:"choice-chips__button",onClick:()=>r?.(l.key)},l.key))})})}function Mw({onTermsClick:e,onPrivacyClick:t,contact:r}={}){const a=r?.email??"support@ihab.co.kr",s=r?.tel??"031-380-3724",{t:l}=Ne.useTranslation();return n.jsx("footer",{className:"site-footer",children:n.jsxs("div",{className:"safearea",children:[n.jsxs("div",{className:"site-footer__top",children:[n.jsx("div",{className:"site-footer__brand",children:n.jsx("div",{className:"site-footer__lead h3",children:l("footer.lead",`\uC544\uC774\uD574\uBE0C\uB294 \uC18C\uB9AC\uB97C \uD1B5\uD574
1059
+ </html>`}const nw=1e3;function Us({getElements:e,paperW:t,paperH:r,fileName:a="",onPopupBlocked:s,header:l=""}){const{t:i}=Ne.useTranslation(),u=o.useCallback(()=>{tw(e(),t,r,a,l)},[e,t,r,a,l]),c=o.useCallback(()=>{const h=e();if(h.length===0)return;const d=window.open("","_blank");if(!d){s?.();return}d.document.write(qs(h,t,r,!1,a,l)),d.document.close()},[e,t,r,a,s,l]),p=o.useCallback(()=>{const h=e();if(h.length===0)return;const d=qs(h,t,r,!1,a,l),m=new Blob([d],{type:"text/html;charset=utf-8"}),C=URL.createObjectURL(m),x=(a?Vs(a):"")||i("wordTable.printFileNameSingle","\uB2E8\uC5B4\uD45C"),g=Object.assign(document.createElement("a"),{href:C,download:`${x}.html`});document.body.appendChild(g),g.click(),document.body.removeChild(g),setTimeout(()=>URL.revokeObjectURL(C),nw)},[e,t,r,a,l,i]);return{print:u,openNewWindow:c,downloadHtml:p}}function $d(e,t){const{t:r}=Ne.useTranslation(),a=t?.paperBands===!0,s=t?.maxItemsPerPage,[l,i]=o.useState("landscape"),[u,c]=o.useState([...vd]),[p,h]=o.useState("show"),[d,m]=o.useState(!0),[C,x]=o.useState(!0),[g,y]=o.useState(!0),[v,_]=o.useState(!0),[b,B]=o.useState(8),[N,f]=o.useState("right"),w=e.length,k=e.some(te=>(te.words??[]).length>1),E=e.some(te=>(te.words??[]).some(P=>!!P.colloquialLabel)),A=xd(e),D=Math.max(1,Math.min(Math.max(w,1),s??Math.max(w,1))),j=Math.min(b,D),$=o.useMemo(()=>$_(e,j),[e,j]),H=$.length>1,F=j,[U,T]=o.useState(!1);o.useEffect(()=>{let te=!1;if(!Br()){T(!1);return}return Promise.all(e.flatMap(P=>(P.words??[]).map(G=>mi(G.label,G.homonum)))).then(P=>{te||T(P.some(Boolean))},()=>{}),()=>{te=!0}},[e]);const I=o.useMemo(()=>[_d(r,{hasImage:U,hasColloquial:E,hasCaption:A}),wd(r),...w>0?[jd(r,{hasPairs:k,itemCount:w,max:s})]:[],Bd(r),...F>1?[Nd(r)]:[],...k?[Ed(r)]:[],...a?[kd(r),Ad(r)]:[]],[r,U,E,A,w,k,H,F,a,s]),z={...Td(r,{contentTypes:u,orientation:l,showOutline:d,cutLine:p,showDivLine:v,showTopInfo:C,showBottomInfo:g}),...w>0?{[r(k?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")]:`${j}\uAC1C`}:{},...H?{[r("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")]:N}:{}},ie=o.useCallback((te,P)=>{Md(r,te,P,{setContentTypes:c,setOrientation:i,setShowOutline:m,setCutLine:h,setShowDivLine:_,setShowTopInfo:x,setShowBottomInfo:y})||(P===r("wordTable.filter.itemsPerPagePair","\uD398\uC774\uC9C0\uB2F9 \uB300\uB9BD\uC30D \uC218")||P===r("wordTable.filter.itemsPerPageWord","\uD398\uC774\uC9C0\uB2F9 \uB2E8\uC5B4 \uC218")?B(Dd(parseInt(te),w)):P===r("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")&&f(Sd(te)))},[r,w]);return{settings:{orientation:l,contentTypes:u,cutLine:p,showOutline:d,showDivLine:v,count:F,showTopInfo:C,showBottomInfo:g},filterSections:I,filterSelected:z,handleSelect:ie,pages:$,isPaginated:H,pageNumberPosition:N}}function rw({items:e,words:t,baseItem:r,baseContentTypes:a,maxItemsPerPage:s,title:l,subtitle:i,emptyText:u,buttons:c,renderButtons:p,renderFooter:h,footerClassName:d,footerLayout:m,printFileName:C,showSettings:x,autoPrint:g,className:y,onClose:v,scoring:_=!1,onScoreChange:b,printHeader:B,brand:N,code:f,beforeClose:w}){const{t:k}=Ne.useTranslation(),E=o.useMemo(()=>Array.isArray(e)?e:(Array.isArray(t)?t:[]).filter(O=>typeof O=="string"&&O.length>0).map((O,W)=>({id:`${O}-${W}`,words:[{label:O}]})),[e,t]),{settings:A,filterSections:D,filterSelected:j,handleSelect:$,pages:H,isPaginated:F,pageNumberPosition:U}=$d(E,{paperBands:!!N?.show,maxItemsPerPage:s}),T=o.useMemo(()=>jc(H.map(O=>O.length)),[H]),[I,z]=o.useState({}),ie=o.useCallback((O,W)=>{z(q=>({...q,[Wa(O)]:Ec(q[Wa(O)]??null,W)}))},[]),te=o.useRef(b);o.useEffect(()=>{te.current=b});const P=o.useRef(I);o.useEffect(()=>{P.current!==I&&(P.current=I,te.current?.(ys(I)))},[I]);const G=o.useMemo(()=>ys(I),[I]),X=o.useRef(null),{toastMessage:K,toastKey:L,showWarning:R,clearToast:S}=Tu("warning"),V=o.useRef([]),ae=o.useCallback(()=>F?V.current.filter(O=>O!==null):X.current?[X.current]:[],[F]),{print:ne,openNewWindow:re}=Us({getElements:ae,paperW:fr[A.orientation].width,paperH:fr[A.orientation].height,fileName:C??"",header:B??"",onPopupBlocked:()=>R(k("wordTable.popupBlocked","\uD31D\uC5C5\uC774 \uCC28\uB2E8\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uBE0C\uB77C\uC6B0\uC800 \uC124\uC815\uC5D0\uC11C \uD31D\uC5C5\uC744 \uD5C8\uC6A9\uD574 \uC8FC\uC138\uC694."))}),ue=o.useMemo(()=>h?void 0:p?p({print:ne,openNewWindow:re}):C?[{label:k("wordTable.openNewWindow","\uC0C8 \uCC3D\uC73C\uB85C \uBCF4\uAE30"),variant:"default",onClick:()=>re()},{label:k("wordTable.print","\uC778\uC1C4\uD558\uAE30"),variant:"default",onClick:()=>ne()},...c??[]]:c,[h,p,C,c,k,ne,re]),Be=o.useMemo(()=>h?h({print:ne,openNewWindow:re}):void 0,[h,ne,re]),le=o.useRef(!1),J=o.useRef(ne);return o.useEffect(()=>{J.current=ne},[ne]),o.useEffect(()=>{if(!g||le.current)return;const O=window.setTimeout(()=>{le.current=!0,J.current()},100);return()=>window.clearTimeout(O)},[g]),n.jsxs(qn,{title:l??k("keyWords.title","\uC8FC\uC694 \uB2E8\uC5B4"),subtitle:i,size:"large",className:xe("word-table-popup",y),buttons:ue,footer:Be,footerClassName:d,footerLayout:m,beforeClose:w,onClose:v,children:[E.length>0?n.jsxs("div",{className:"word-table-popup__body",children:[x&&n.jsx(Ws,{sections:D,selected:j,onSelect:$}),F?n.jsx("div",{className:"word-table-popup__pages",children:H.map((O,W)=>n.jsx(Rr,{items:O,orientation:A.orientation,contentTypes:A.contentTypes,baseItem:r,baseContentTypes:a,cutLine:A.cutLine,showOutline:A.showOutline,showDivLine:A.showDivLine,count:A.count,contentRef:q=>{V.current[W]=q},pageNumber:{current:W+1,total:H.length},pageNumberPosition:U,brand:N&&{...N,top:A.showTopInfo,bottom:A.showBottomInfo},code:f,scoring:_,scoreIndexOffset:T[W],marks:G,onMarkClick:ie},W))}):n.jsx("div",{className:"word-table-popup__table",children:n.jsx(Rr,{items:E,orientation:A.orientation,contentTypes:A.contentTypes,baseItem:r,baseContentTypes:a,cutLine:A.cutLine,showOutline:A.showOutline,showDivLine:A.showDivLine,count:A.count,contentRef:X,fitHeight:!0,scoring:_,marks:G,onMarkClick:ie,brand:N&&{...N,top:A.showTopInfo,bottom:A.showBottomInfo},code:f})})]}):n.jsx("p",{className:"word-table-popup__empty body-3",children:u??k("keyWords.empty","\uCD94\uCD9C\uB41C \uC8FC\uC694 \uB2E8\uC5B4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}),n.jsx($r,{message:K,position:"top",onClose:S},L)]})}const aw=new Set(["x","triangle"]);function ow(e,t){const r=[];for(let a=0;a<e.length;a++){const s=t[String(a)];s&&aw.has(s)&&r.push(e[a])}return r}const sw=/\s*(?:(\d+)차\s*)?복습\s*\d{2}\.\d{2}$/;function Ld(e){const t=e.name.trim(),r=e.reviewRound;if(typeof r=="number"&&Number.isFinite(r)&&r>=0){const l=Math.floor(r);if(l===0)return{base:t,round:1};const i=(l===1?/\s*복습\s*\d{2}\.\d{2}$/:new RegExp(`(?:^|\\s)${l}\uCC28\\s*\uBCF5\uC2B5\\s*\\d{2}\\.\\d{2}$`)).exec(t);return{base:i?t.slice(0,i.index).trim():t,round:l+1}}let a=t,s=1;for(;;){const l=sw.exec(a);if(!l)break;s=Math.max(s,(l[1]?Number(l[1]):1)+1),a=a.slice(0,l.index).trim()}return{base:a,round:s}}function lw(e,t){const[,r,a]=Io(t).split("-"),s=`${r}.${a}`,{base:l,round:i}=Ld(typeof e=="string"?{name:e}:e),u=i>=2?`${i}\uCC28 `:"";return`${l||"\uB2E8\uC5B4\uD45C"} ${u}\uBCF5\uC2B5 ${s}`}function iw(e){return{reviewOf:e.reviewOf??e.id??void 0,reviewRound:Ld(e).round}}function uw(e,t){const r={};for(const[a,s]of Object.entries(t)){if(s!=="o"&&s!=="triangle"&&s!=="x")continue;const l=Number(a),i=e[l];i&&(r[a]=i)}return r}function cw(e){return e.map(t=>t.label).join(" / ")}function dw(e){return e.map(t=>t.homonum!=null?`${t.label}#${t.homonum}`:t.label).join(" / ")}function Rd(e){return e.split(" / ").map(t=>t.replace(/#\d+$/,"")).join(" / ")}function pw(e,t,r){const a=Di(r);return[e.trim(),a,t.trim()].filter(Boolean).join(" \xB7 ")}function Pd(e,t,r){return r===0?0:(e+t*.5)/r}function hw(e){const t=new Map,r=[...e].sort((s,l)=>s.scoredAt.localeCompare(l.scoredAt));for(const s of r)for(const[l,i]of Object.entries(s.marks)){const u=s.labels?.[l];if(!u)continue;const c=t.get(u)??{o:0,triangle:0,x:0,latest:i,latestAt:s.scoredAt};if(i==="o")c.o++;else if(i==="triangle")c.triangle++;else if(i==="x")c.x++;else continue;c.latest=i,c.latestAt=s.scoredAt,t.set(u,c)}const a=[];for(const[s,l]of t){const i=l.o+l.triangle+l.x;a.push({label:Rd(s),key:s,tried:i,o:l.o,triangle:l.triangle,x:l.x,rate:Pd(l.o,l.triangle,i),latest:l.latest,latestAt:l.latestAt})}return a.sort((s,l)=>s.rate-l.rate||l.tried-s.tried||xn(s.label,l.label)||xn(s.key??s.label,l.key??l.label)),a}function mw(e){const t=new Map;for(const a of e){const s=a.tableId??`name:${a.tableName}`,l=t.get(s)??{tableName:a.tableName,tableId:a.tableId,rows:[]};l.rows.push(a),t.set(s,l)}const r=[];for(const a of t.values()){const s=u=>Object.values(u.marks).filter(c=>c==="o"||c==="triangle"||c==="x").length,l=a.rows.filter(u=>s(u)>0).sort((u,c)=>u.scoredAt.localeCompare(c.scoredAt));if(l.length===0)continue;const i=l.map(u=>{const c=Object.values(u.marks),p=c.filter(d=>d==="o").length,h=c.filter(d=>d==="triangle").length;return Pd(p,h,s(u))});r.push({tableName:a.tableName,tableId:a.tableId,rates:i,times:l.map(u=>u.scoredAt),delta:i.length>=2?i[i.length-1]-i[0]:null})}return r.sort((a,s)=>(s.times[s.times.length-1]??"").localeCompare(a.times[a.times.length-1]??"")),r}function fw(e,t=8){return e.filter(r=>r.latest!=="o").slice(0,t)}function Cw(e,t){if(e==null||t==null||e===""||t==="")return 0;if(typeof e=="number"&&typeof t=="number")return e-t;const r=String(e),a=String(t);return+(r>a)-+(r<a)}function gw(e){const t=new Map;let r=0,a=0;const s=e.map((i,u)=>({r:i,at:u})).sort((i,u)=>i.r.answeredAt.localeCompare(u.r.answeredAt)||Cw(i.r.id,u.r.id)||i.at-u.at).map(i=>i.r);for(const i of s){if(i.isCorrect==null)continue;const u=i.itemTitle?.trim();if(!u){a++;continue}r++;const c=i.itemId?.trim()||u,p=`${i.trainingType}|${c}`,h=t.get(p)??{trainingType:i.trainingType,itemId:c,title:u,tried:0,wrong:0,latestCorrect:i.isCorrect,latestAt:i.answeredAt,lastSelected:i.selected,setIds:[]};if(h.tried++,i.isCorrect||h.wrong++,h.title=u,h.latestCorrect=i.isCorrect,h.latestAt=i.answeredAt,h.lastSelected=i.selected,i.setId){const d=h.setIds.indexOf(i.setId);d>0&&h.setIds.splice(d,1),d!==0&&h.setIds.unshift(i.setId)}t.set(p,h)}const l=[...t.entries()].map(([i,u])=>({key:i,trainingType:u.trainingType,itemId:u.itemId,title:u.title,tried:u.tried,wrong:u.wrong,rate:u.tried===0?0:(u.tried-u.wrong)/u.tried,latestCorrect:u.latestCorrect,latestAt:u.latestAt,lastSelected:u.lastSelected,setIds:u.setIds}));return l.sort((i,u)=>i.rate-u.rate||u.tried-i.tried||xn(i.title,u.title)),{items:l,counted:r,skippedNoTitle:a}}function bw(e,t=8){return e.filter(r=>!r.latestCorrect).slice(0,t)}function yw(e){const t=new Map;for(const a of e){const s=t.get(a.trainingType)??[];s.push(a),t.set(a.trainingType,s)}const r=[...t.entries()].map(([a,s])=>({trainingType:a,items:s,pending:s.filter(l=>!l.latestCorrect).length}));return r.sort((a,s)=>s.pending-a.pending||a.trainingType.localeCompare(s.trainingType)),r}const Gs=["LISTEN_IN_NOISE","SHORT_STORY","LONG_STORY","ORDERING_SENTENCE"];function vw(e){const t=new Map;let r=0;for(const l of e){if(l.latestCorrect)continue;const i=l.setIds[0];if(!i){r++;continue}const u=`${l.trainingType}|${i}`,c=t.get(u)??{setId:i,trainingType:l.trainingType,pending:0};c.pending++,t.set(u,c)}const a=(l,i)=>i.pending-l.pending||l.trainingType.localeCompare(i.trainingType)||l.setId.localeCompare(i.setId),s=[...t.values()];return{sentence:s.filter(l=>Gs.includes(l.trainingType)).sort(a),word:s.filter(l=>!Gs.includes(l.trainingType)).sort(a),noSet:r}}function xw(e,t,r=5){const a=new Set(t);if(a.size===0)return[];const s=[];for(const l of e){const i=new Set,u=[];for(const c of l.cellLabels)a.has(c)&&!i.has(c)&&(i.add(c),u.push(c));u.length!==0&&s.push({id:l.id,name:l.name,kind:l.kind,covered:u,totalCells:l.cellLabels.length})}return s.sort((l,i)=>i.covered.length-l.covered.length||l.totalCells-i.totalCells||xn(l.name,i.name)),s.slice(0,Math.max(0,r))}function _w(e,t){const r=new Set(e.flatMap(a=>a.covered));return t.filter(a=>!r.has(a))}function ww(e,t){const r=new Map;for(const s of e)for(const l of s.cells){const i=s.labelOf(l);r.has(i)||r.set(i,l)}const a=[];for(const s of t){const l=r.get(s);l!==void 0&&a.push(l)}return a}function Ks(e,t,r){return typeof e=="string"&&e?e:t.replace(/\{\{(\w+)\}\}/g,(a,s)=>String(r[s]))}function Bw(e,t){const r=Number.isFinite(e)?Math.round(e):0;if(!r||r<=0)return"-";const a=Math.floor(r/60),s=r%60;return t?t(a,s):a>0&&s>0?Ks(Pt.t("customers.duration.minSec",{m:a,s,defaultValue:"{{m}}\uBD84 {{s}}\uCD08"}),"{{m}}\uBD84 {{s}}\uCD08",{m:a,s}):a>0?Ks(Pt.t("customers.duration.min",{m:a,defaultValue:"{{m}}\uBD84"}),"{{m}}\uBD84",{m:a}):Ks(Pt.t("customers.duration.sec",{s,defaultValue:"{{s}}\uCD08"}),"{{s}}\uCD08",{s})}function kw(e,t){const r=[],a=new Set;for(const s of e){const l=t(s);a.has(l)||(a.add(l),r.push({key:l,value:s,pinned:!1}))}return r}function Aw(e,t){return e.map(r=>r.key===t?{...r,pinned:!r.pinned}:r)}function Nw(e,t){return e.filter(r=>r.key!==t)}function Ew(e,t,r){const a=e.filter(p=>p.pinned),s=new Set(a.map(p=>p.key)),l=e.length-a.length,i=[],u=new Set(s);for(const p of t){if(i.length>=l)break;const h=r(p);u.has(h)||(u.add(h),i.push({key:h,value:p,pinned:!1}))}const c=[...i];return e.map(p=>p.pinned?p:c.shift()).filter(p=>p!==void 0)}function jw(e){return e.map(t=>t.value)}function Dw(e){const{category:t={},isSelected:r=!1,onClick:a}=e||{},s=t?.key?` icon-grid-menu__button--${t.key}`:"",l=o.useId();return n.jsxs("div",{className:`icon-grid-menu__button-wrapper${s}`,children:[n.jsx("button",{className:`icon-grid-menu__button${r?" icon-grid-menu__button--selected":""}`,"data-key":t?.key,type:"button",onClick:r?void 0:a,"aria-pressed":r,"aria-labelledby":l,children:n.jsx(lt,{icon:t.icon,label:t.label,className:"icon-grid-menu__button-icon",imgClassName:"icon-grid-menu__button-icon-image",maskClassName:"icon-grid-menu__button-icon-mask",svgClassName:"icon-grid-menu__button-icon-svg"})}),n.jsx("span",{id:l,className:"icon-grid-menu__button-label button-1",children:t.label})]})}function Sw(e){const{categories:t=[],selected:r,onSelect:a,size:s="medium"}=e||{},l=r!==void 0,[i,u]=o.useState(()=>l?null:(t&&t[0]?.key)??null),c=l?r:i,p=o.useRef(a);o.useEffect(()=>{p.current=a});const h=o.useRef(!1),d=(t&&t[0]?.key)??null;o.useEffect(()=>{if(l||h.current||!d)return;h.current=!0;const C=i??d;i==null&&u(C),p.current?.(C)},[l,d]);const m=o.useCallback(C=>{const x=c===C?null:C;h.current=!0,l||u(x),a?.(x)},[c,l,a]);return n.jsx("div",{className:`icon-grid-menu icon-grid-menu--${s}`,children:(t||[]).map(C=>n.jsx(Dw,{category:C,isSelected:c===C.key,onClick:()=>m(C.key)},C.key))})}function Tw({subs:e=[],selected:t,onSelect:r,size:a="medium"}){const s=a==="small"?32:40;return n.jsx("div",{className:`choice-chips choice-chips--${a}`,children:n.jsx("div",{className:"choice-chips__list",children:e.map(l=>n.jsx(me,{htmlType:"button",size:s,type:"bar",label:l.label,selected:t===l.key,className:"choice-chips__button",onClick:()=>r?.(l.key)},l.key))})})}function Mw({onTermsClick:e,onPrivacyClick:t,contact:r}={}){const a=r?.email??"support@ihab.co.kr",s=r?.tel??"031-380-3724",{t:l}=Ne.useTranslation();return n.jsx("footer",{className:"site-footer",children:n.jsxs("div",{className:"safearea",children:[n.jsxs("div",{className:"site-footer__top",children:[n.jsx("div",{className:"site-footer__brand",children:n.jsx("div",{className:"site-footer__lead h3",children:l("footer.lead",`\uC544\uC774\uD574\uBE0C\uB294 \uC18C\uB9AC\uB97C \uD1B5\uD574
1060
1060
  \uC2E0\uB8B0\uB97C \uC313\uACE0
1061
1061
  \uD68C\uBCF5\uC744 \uB3D5\uC2B5\uB2C8\uB2E4.`).split(`
1062
- `).map((i,u,c)=>n.jsxs(o.Fragment,{children:[i,u<c.length-1&&n.jsx("br",{})]},u))})}),n.jsxs("div",{className:"site-footer__links",children:[n.jsxs("div",{className:"site-footer__column",children:[n.jsx("div",{className:"site-footer__column-title footer-title",children:l("footer.site.title","\uC0AC\uC774\uD2B8")}),n.jsxs("ul",{children:[n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://www.ihab.co.kr/",target:"_blank",rel:"noopener noreferrer",children:"IHAB"})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://speechear.ihab.co.kr/",target:"_blank",rel:"noopener noreferrer",children:l("footer.site.malgwi","\uB9D0\uADC0")})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://ihab-offcial-web.vercel.app/product/sound-localization",target:"_blank",rel:"noopener noreferrer",children:l("footer.site.soundDirection","\uC18C\uB9AC\uBC29\uD5A5\uC131\uC2DC\uC2A4\uD15C")})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://ihab-offcial-web.vercel.app/product/vr-sound-localization",target:"_blank",rel:"noopener noreferrer",children:l("footer.site.vrSoundDirection","VR\uC18C\uB9AC\uBC29\uD5A5\uC131\uC2DC\uC2A4\uD15C")})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://ihab-offcial-web.vercel.app/product/hearing-test-pro",target:"_blank",rel:"noopener noreferrer",children:l("footer.site.hearingTest","\uCCAD\uB825\uD14C\uC2A4\uD2B8 \uD504\uB85C")})})]})]}),n.jsxs("div",{className:"site-footer__column",children:[n.jsx("div",{className:"site-footer__column-title footer-title",children:l("footer.sns.title","SNS")}),n.jsxs("ul",{children:[n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://blog.naver.com/ihab_official",target:"_blank",rel:"noopener noreferrer",children:l("footer.sns.naverBlog","\uB124\uC774\uBC84 \uBE14\uB85C\uADF8")})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://www.instagram.com/ihab.official.yt/",target:"_blank",rel:"noopener noreferrer",children:"Instagram"})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://www.youtube.com/@%EC%95%84%EC%9D%B4%ED%95%B4%EB%B8%8C-%EA%B3%B5%EC%8B%9D%EC%B1%84%EB%84%90",target:"_blank",rel:"noopener noreferrer",children:"Youtube"})})]})]}),n.jsxs("div",{className:"site-footer__column",children:[n.jsx("div",{className:"site-footer__column-title footer-title",children:l("footer.policy.title","\uC815\uCC45")}),n.jsxs("ul",{children:[n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"#",onClick:i=>{e&&(i.preventDefault(),e())},children:l("footer.policy.terms","\uC774\uC6A9\uC57D\uAD00")})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"#",onClick:i=>{t&&(i.preventDefault(),t())},children:l("footer.policy.privacy","\uAC1C\uC778\uC815\uBCF4 \uCC98\uB9AC\uBC29\uCE68")})})]})]})]})]}),n.jsx("hr",{className:"site-footer__rule"}),n.jsxs("div",{className:"site-footer__bottom",children:[n.jsx("div",{className:"site-footer__brand",children:n.jsx("img",{src:ps,alt:"IHAB",className:"site-footer__logo"})}),n.jsxs("div",{className:"site-footer__meta",children:[n.jsxs("div",{children:[n.jsx("span",{className:"footer-title",children:l("footer.ceo","\uB300\uD45C")})," ",n.jsx("span",{className:"footer-meta caption-1",children:l("footer.ceoName","\uD55C\uC9C0\uD61C")})]}),n.jsxs("div",{children:[n.jsx("span",{className:"footer-title",children:l("footer.address","\uC8FC\uC18C")})," ",n.jsx("span",{className:"footer-meta caption-1",children:l("footer.addressValue","\uAC15\uC6D0\uB3C4 \uCD98\uCC9C\uC2DC \uC2DC\uCCAD\uAE38 32 \uD574\uCC2C\uBE4C\uB529 3\uCE35 302\uD638")})]}),n.jsxs("div",{children:[n.jsx("span",{className:"footer-title",children:l("footer.bizNo","\uC0AC\uC5C5\uC790\uB4F1\uB85D\uBC88\uD638")})," ",n.jsx("span",{className:"footer-meta caption-1",children:l("footer.bizNoValue","526-81-02926")})]}),n.jsxs("div",{children:[n.jsx("span",{className:"footer-title",children:l("footer.support","\uACE0\uAC1D\uC13C\uD130")})," ",n.jsxs("span",{className:"footer-meta caption-1",children:[a," \xA0 ",s]})]})]})]}),n.jsx("div",{className:"site-footer__copyright footer-copyright caption-1",children:"\xA9 IHAB, Inc. All rights reserved."})]})})}function $w({logo:e,logoAlt:t="",logoHref:r,links:a=[],actions:s,className:l,containerClassName:i,renderLink:u,menuLabel:c}){const{t:p}=Ne.useTranslation(),h=c??{open:p("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),close:p("header.menuClose","\uBA54\uB274 \uB2EB\uAE30")},[d,m]=o.useState(!1),C=o.useId(),x=o.useRef(null);o.useEffect(()=>{if(!d)return;const v=ir(()=>{const B=document.getElementById(C);B&&B.contains(document.activeElement)&&x.current?.focus(),m(!1)}),_=typeof window<"u"&&window.matchMedia?window.matchMedia("(min-width: 961px)"):null,b=B=>{B.matches&&m(!1)};return _&&(_.matches&&m(!1),_.addEventListener?.("change",b)),()=>{v(),_?.removeEventListener?.("change",b)}},[d,C]);const g=i?`${i} landing-header__inner`:"landing-header__inner",y=(v,_)=>u?u(v,{onClick:_}):n.jsx("a",{href:v.href,onClick:_,"aria-current":v.current?"page":void 0,children:v.label});return n.jsxs("header",{className:l?`landing-header ${l}`:"landing-header",children:[n.jsxs("div",{className:g,children:[e!=null&&(()=>{const v=typeof e=="string"?n.jsx("img",{src:e,alt:t,className:"landing-header__logo"}):e;return r?n.jsx("a",{href:r,className:"landing-header__brand",children:v}):n.jsx("div",{className:"landing-header__brand",children:v})})(),a.length>0&&n.jsx("nav",{className:"landing-header__links",children:a.map((v,_)=>n.jsx("span",{children:y(v)},`${_}:${v.href}`))}),n.jsxs("div",{className:"landing-header__actions",children:[s,a.length>0&&n.jsx("button",{ref:x,type:"button",onClick:()=>m(v=>!v),"aria-expanded":d,"aria-controls":C,"aria-label":d?h.close:h.open,className:d?"landing-header__toggle landing-header__toggle--open":"landing-header__toggle",children:n.jsxs("span",{className:"landing-header__burger",children:[n.jsx("span",{}),n.jsx("span",{}),n.jsx("span",{})]})})]})]}),a.length>0&&n.jsx("nav",{id:C,hidden:!d,className:"landing-header__drawer",children:n.jsx("div",{className:i??void 0,children:a.map((v,_)=>n.jsx("span",{className:"landing-header__drawer-item",children:y(v,()=>m(!1))},`${_}:${v.href}`))})})]})}function Lw({children:e,action:t,onClick:r,className:a}){const s=r?"bottom-sticky__inner bottom-sticky__inner--clickable":"bottom-sticky__inner";return n.jsx("div",{className:a?`bottom-sticky ${a}`:"bottom-sticky",children:n.jsxs("div",{className:s,onClick:r,...id(r),children:[n.jsx("div",{className:"bottom-sticky__content",children:e}),t]})})}function Rw({mountedRef:e}){const t=o.useRef({phase:"sound",at:0}),r=o.useRef(0),a=o.useRef(null),s=o.useRef(null),l=o.useCallback(()=>{const g=t.current,y=g.phase!=="sound"&&g.at>0;s.current=y?{phase:g.phase,elapsed:Math.max(0,Date.now()-g.at)}:null},[]),i=o.useCallback(()=>{const g=s.current;return s.current=null,g},[]),u=o.useCallback(()=>{r.current+=1,t.current={phase:"sound",at:0}},[]),c=o.useCallback((g,y,v=0)=>{if(!(g>0))return Promise.resolve(!0);const _=r.current;return t.current={phase:y,at:Date.now()-Math.max(0,v)},new Promise(b=>{const B=setTimeout(()=>{a.current===B&&(a.current=null),b(!!e.current&&_===r.current)},g);a.current=B})},[e]),p=o.useCallback(()=>{t.current={phase:"sound",at:Date.now()}},[]),h=o.useCallback(()=>{t.current={phase:"sound",at:0}},[]),d=o.useCallback(()=>{const g=t.current;return g.phase!=="sound"&&g.at>0},[]),m=o.useCallback(()=>r.current,[]),C=o.useCallback(g=>g===r.current,[]),x=o.useCallback(()=>{r.current+=1},[]);return o.useEffect(()=>()=>{a.current&&(clearTimeout(a.current),a.current=null)},[]),o.useMemo(()=>({positionRef:t,isRunning:d,generation:m,isCurrent:C,abort:u,waitPad:c,enterSound:p,leave:h,pause:l,resume:i,__bumpGenerationForTest:x}),[d,m,C,u,c,p,h,l,i,x])}const Pr=9,Pw=e=>Math.round(Math.min(Pr,Math.max(0,e))/Pr*100),Fw=e=>e/100*Pr,ga=2,Fd=.1,Iw=e=>Math.min(ga,Math.max(0,e)),Ow=.1,zw=e=>Math.round(e*1e6)/1e6;function ba(e){const{noiseRatio:t}=e;if(typeof t=="number"&&Number.isFinite(t))return Iw(t);const r=Math.min(Pr,Math.max(0,Number(e.level)||0))/Pr,a=Number(e.mainVolume);return a>0?r>0?zw(Math.min(ga,Math.max(Ow,r/a))):0:1}const Id=e=>Math.min(1,Math.max(0,Number(e.mainVolume)||0));function Od(e){return Id(e)}function Ys(e){return Id(e)*ba(e)}function Zs(e,t=rb()){const r=Number.isFinite(t)&&t>0?t:1;return Math.min(1,Ys(e)/r)}function Cr(e,t){const r={...e,...t??{}};return t&&"level"in t&&typeof t.noiseRatio!="number"&&(r.noiseRatio=ba({level:r.level,mainVolume:r.mainVolume})),r}const gr={enabled:!0,type:"defaultNoise",level:4.5,noiseRatio:1,speed:1,mainVolume:1,mainSpeed:1},Xs=o.createContext(null);function Xa(){return o.useContext(Xs)}const Js=e=>`${nb()}/${e}`,zd=e=>Array.from({length:10},(t,r)=>Js(`${e}-${String(r+1).padStart(2,"0")}.mp3`)),Ja={get defaultNoise(){return Js("noise1.mp3")},get street(){return zd("noise2")},get restaurant(){return zd("noise3")},get buzz(){return Js("noise4.mp3")}};function Ww(e){const t=Math.floor(Math.random()*10);switch(e){case"defaultNoise":return Ja.defaultNoise;case"street":return Ja.street[t];case"restaurant":return Ja.restaurant[t];case"buzz":return Ja.buzz;default:return null}}function Hw({noisePlayer:e,audioRef:t,playbackStateRef:r,sequencer:a}){const s=o.useRef(e?.registerAnalyser);s.current=e?.registerAnalyser;const l=o.useRef(null),[i,u]=o.useState(null),c=o.useRef(null),p=o.useRef(null),h=o.useRef(null),d=o.useRef(null),m=o.useRef(0),C=o.useRef(null),x=o.useCallback(()=>!!a?.isRunning(),[a]),g=o.useCallback(()=>{d.current!==null&&(cancelAnimationFrame(d.current),d.current=null),C.current!==null&&(clearTimeout(C.current),C.current=null)},[]),y=o.useCallback((N,f=250)=>{const w=l.current;if(!w)return;const k=p.current;if(k){p.current=null;try{w.pause()}catch{}w.src=k,w.load()}if(!w.src)return;m.current+=1,g();try{jo(),_a(w).then(j=>{if(l.current===w)try{s.current?.("noise",j)}catch{}})}catch{}const E=w.paused?0:wa(w);w.paused&&Qn(w,0),w.play().catch(()=>{});const A=performance.now(),D=()=>{const j=Math.min(1,(performance.now()-A)/f);try{Qn(w,E+(N-E)*j)}catch{}j<1?d.current=requestAnimationFrame(D):d.current=null};d.current=requestAnimationFrame(D)},[g]),v=o.useCallback((N=250,f)=>{const w=l.current;if(!w||w.paused){f?.();return}const k=++m.current;g();const E=performance.now(),A=wa(w),D=()=>{const j=Math.min(1,(performance.now()-E)/N);try{Qn(w,A*(1-j))}catch{}if(j<1)d.current=requestAnimationFrame(D);else{d.current=null,C.current!==null&&(clearTimeout(C.current),C.current=null);try{w.pause()}catch{}f?.()}};d.current=requestAnimationFrame(D),C.current=setTimeout(()=>{if(C.current=null,m.current===k){d.current!==null&&(cancelAnimationFrame(d.current),d.current=null);try{w.paused||(Qn(w,0),w.pause(),f?.())}catch{}}},N+150)},[g]);o.useEffect(()=>{const N=document.createElement("audio");return N.loop=!0,N.crossOrigin="anonymous",l.current=N,()=>{g();try{N.pause(),N.removeAttribute("src"),N.load()}catch{}l.current=null,c.current=null,p.current=null}},[g]);const _=e?Zs(e.settings):0,b=!!e?.settings.enabled&&_>0;o.useEffect(()=>{if(!b)return;let N=0;const f=setInterval(()=>{const w=l.current;if(!w||w.paused){N=0;return}const k=t.current;if(k&&!k.paused&&!k.ended||x()||r.current==="playing"){N=0;return}N+=1,N>=2&&(N=0,v())},400);return()=>clearInterval(f)},[v,b,t,r,x]),o.useEffect(()=>{const N=()=>{const f=l.current;if(document.hidden){if(f&&!f.paused){g();try{f.pause()}catch{}}return}if(!f||!f.paused)return;const w=t.current,k=!!w&&!w.paused&&!w.ended||x()||r.current==="playing",E=h.current;k&&E?.enabled&&E.volume>0&&y(E.volume)};return document.addEventListener("visibilitychange",N),()=>document.removeEventListener("visibilitychange",N)},[g,y,t,r,x]),o.useEffect(()=>{h.current=e?{enabled:e.settings.enabled,volume:_,type:e.settings.type}:null},[e,e?.settings.enabled,_,e?.settings.type]);const B=o.useRef(null);return o.useEffect(()=>()=>{B.current?.(),B.current=null},[]),o.useEffect(()=>{const N=e?.settings,f=l.current;if(!f)return;const w=N?Zs(N):0;if(!N||!N.enabled||w===0){v();return}if(c.current!==N.type){const k=Ww(N.type);k&&(c.current=N.type,u(k),p.current=k,v(150,()=>{if(p.current!==k)return;p.current=null,f.src=k,f.load();const E=t.current;if(E&&!E.paused||x()){B.current?.();const A=()=>{f.removeEventListener("canplay",A),B.current===D&&(B.current=null);const j=t.current,$=h.current;(j&&!j.paused&&!j.ended||x())&&$?.enabled&&$.volume>0&&y($.volume)},D=()=>f.removeEventListener("canplay",A);B.current=D,f.addEventListener("canplay",A)}}))}else{const k=t.current,E=!!k&&!k.paused&&!k.ended||x()||r.current==="playing";if(E&&p.current)y(w);else if(E&&f.paused&&f.src)y(w);else if(!f.paused)if(!E)v();else{g();const A=wa(f),D=performance.now(),j=()=>{const $=Math.min(1,(performance.now()-D)/150);try{Qn(f,A+(w-A)*$)}catch{}$<1?d.current=requestAnimationFrame(j):d.current=null};d.current=requestAnimationFrame(j)}}},[e?.settings,e?.settings.enabled,_,e?.settings.type,g,y,v,t,r,h,x]),o.useEffect(()=>{const N=l.current;if(N)try{N.playbackRate=Math.min(1.25,Math.max(.75,e?.settings.speed??1))}catch{}},[e?.settings.speed]),{noiseAudioRef:l,activeNoiseUrl:i,noiseSettingsRef:h,cancelNoiseFade:g,fadeInNoise:y,fadeOutNoise:v}}function Vw({ttsText:e,playbackRate:t,mainVolume:r,fillRef:a,waveProgressRef:s,setProgress:l,setPlaybackState:i,setStateLocal:u,fadeInNoise:c,fadeOutNoise:p,noiseSettingsRef:h,onDoneRef:d,handleEndRef:m}){const C=o.useRef(null),x=o.useRef(0),g=o.useRef(null),y=o.useRef(0),v=o.useRef(!1);o.useEffect(()=>()=>{y.current++;try{if(g.current&&(cancelAnimationFrame(g.current),g.current=null),v.current&&window.speechSynthesis){try{window.speechSynthesis.cancel()}catch{}v.current=!1}}catch{}},[]);const _=(N,f=1)=>{try{const w=(N||"").trim().split(/\s+/).filter(Boolean).length||Math.max(1,(N||"").length);return Math.max(700,Math.round(w*300/Math.max(.25,f)))}catch{return 1200}},b=o.useCallback(N=>{if(typeof window>"u"||!window.speechSynthesis){try{typeof d.current=="function"&&d.current(!1)}catch{}return}const f=window.speechSynthesis,w=++y.current;try{try{f.cancel()}catch{}const k=N??e,E=Array.isArray(k)?k.filter(F=>!!F):[k||""];E.length===0&&E.push("");const A=Math.max(.3,Math.min(3,t));x.current=E.reduce((F,U)=>F+_(U,A||1),0),C.current=performance.now(),l(0),i("playing"),u("playMode");const D=h.current;D?.enabled&&(D?.volume??0)>0&&c(D.volume);const j=()=>{try{const F=C.current||performance.now(),U=performance.now()-F,T=x.current||1200,I=Math.min(1,U/T);try{a.current&&(a.current.style.left=`${I*100}%`),s.current&&s.current.style.setProperty("--progress",String(I))}catch{}I<1&&(g.current=requestAnimationFrame(j))}catch{}},$=()=>{if(w===y.current)try{g.current&&(cancelAnimationFrame(g.current),g.current=null),l(1),i("stopped");try{m.current?.()}catch{try{typeof d.current=="function"&&d.current(!0)}catch{}}}catch{}},H=F=>{const U=new SpeechSynthesisUtterance(E[F]);try{U.rate=A}catch{}try{U.volume=Math.max(0,Math.min(1,r))}catch{}U.onend=()=>{if(w===y.current){if(F<E.length-1){try{H(F+1)}catch{$()}return}$()}},U.onerror=()=>{$()},U.onstart=()=>{if(!(F>0))try{g.current&&(cancelAnimationFrame(g.current),g.current=null),g.current=requestAnimationFrame(j)}catch{}},v.current=!0,f.speak(U)};try{H(0)}catch{try{typeof d.current=="function"&&d.current(!0)}catch{}}}catch{try{typeof d.current=="function"&&d.current(!0)}catch{}}},[e,t,r,c,a,s,l,i,u,h,d,m]),B=o.useCallback(()=>{y.current++;try{if(window.speechSynthesis)try{window.speechSynthesis.cancel()}catch{}g.current&&(cancelAnimationFrame(g.current),g.current=null),p(),C.current=null}catch{}i("stopped"),u("active"),l(0)},[p,i,u,l]);return{startTTS:b,stopTTS:B}}const qw=.01,Uw=.3;async function Gw(e,t,r,a=!1){let s=null;try{const l=window.AudioContext||window.webkitAudioContext;s=new l;const i=await s.decodeAudioData(e.slice(0)),u=i.numberOfChannels>0?i.getChannelData(0):null;if(!u)return null;let c=0;if(a){const C=Math.floor(Uw*i.sampleRate),x=Math.min(u.length,C);for(;c<x&&Math.abs(u[c])<=qw;)c++;c>=x&&(c=0)}const p=u.length-c,h=r&&r>0?Math.min(p,Math.floor(r*i.sampleRate)):p,d=Math.max(t,h),m=Math.floor(d/t)||1;return new Array(t).fill(0).map((C,x)=>{const g=c+x*m,y=Math.min(g+m,c+d,u.length);let v=0;for(let _=g;_<y;_++){const b=Math.abs(u[_]);b>v&&(v=b)}return v})}catch{return null}finally{try{s?.close?.()}catch{}}}async function Wd(e,t,r,a=!1){try{const s=await fetch(e);if(s.ok===!1)return null;const l=await s.arrayBuffer();return await Gw(l,t,r,a)}catch(s){try{const l=$o(s)}catch{}return null}}const Qs=45,Kw=74,Yw=2;function Qa(e){const t=Math.min(2,Math.max(0,Number(e)||0));return t<=1?t*45:45+(t-1)*29}function eo(e){return Qa(e)/45}const Zw=e=>Math.max(0,(typeof e=="number"&&Number.isFinite(e)?e:0)*1e3),Hd=e=>Math.max(0,typeof e=="number"&&Number.isFinite(e)?e:0);function Vd({durationsSec:e,leadInMs:t=0,tailMs:r=0}){const a=Hd(t),s=Hd(r),l=[];let i=0;return e.forEach((u,c)=>{for(const[p,h]of[["lead",a],["sound",Zw(u)],["tail",s]])l.push({kind:p,track:c,startMs:i,durMs:h}),i+=h}),{segments:l,totalMs:i,trackCount:e.length}}function qd(e,t){const r=(t|0)*3;if(t<0||r+2>=e.segments.length)return null;const[a,s,l]=[e.segments[r],e.segments[r+1],e.segments[r+2]];return{lead:a,sound:s,tail:l,totalMs:a.durMs+s.durMs+l.durMs}}function Xw(e,t){const r=qd(e,t.track);if(!r||!(r.totalMs>0))return 0;const a=r[t.kind],s=Math.min(Math.max(0,Number.isFinite(t.elapsedMs)?t.elapsedMs:0),a.durMs);return Math.max(0,Math.min(1,(a.startMs-r.lead.startMs+s)/r.totalMs))}function Jw(e,t,r){const a=Math.max(0,Math.floor(r)),s=qd(e,t);if(!s||a===0||!(s.totalMs>0)||s.lead.durMs===0&&s.tail.durMs===0||!(s.sound.durMs>0))return{lead:0,sound:a,tail:0};const l=Math.round(s.lead.durMs/s.totalMs*a),i=Math.round(s.tail.durMs/s.totalMs*a),u=Math.max(1,a-l-i),c=l+u+i-a;return{lead:Math.max(0,l-Math.ceil(c/2)),sound:u,tail:Math.max(0,i-Math.floor(c/2))}}function Qw({currentTime:e,sources:t,index:r,audioDuration:a}){const s=r||0,l=Array.isArray(t)&&t.length>0?t[s]:void 0,i=l?l.duration||a||0:a||0;if(!(i>0))return 0;const u=Number.isFinite(e)?e:0;return Math.max(0,Math.min(1,u/i))}function e8({phase:e,phaseElapsedMs:t,currentTime:r,trackDurationSec:a,leadInMs:s,tailMs:l}){const i=Vd({durationsSec:[a],leadInMs:s,tailMs:l});return Xw(i,{track:0,kind:e,elapsedMs:e==="sound"?(Number.isFinite(r)?r:0)*1e3:t})}function t8({bars:e,trackDurationSec:t,leadInMs:r,tailMs:a}){return Jw(Vd({durationsSec:[t],leadInMs:r,tailMs:a}),0,e)}function n8(e,t){if(!Array.isArray(e))return null;const r=t||0;return r<e.length-1?r+1:null}function r8({ended:e,completedByEnd:t}){return!!e||!!t}function a8(e){return e.map((t,r)=>({src:t.src,label:String(r+1),color:void 0,duration:t.duration||0}))}function o8(e){return e.reduce((t,r)=>t+(r.duration||0),0)}function s8(e,t,r){const a=Array.isArray(e)?e:e?[e]:[],s=[];for(const l of a)if(l){if(typeof l=="object"&&l!==null&&"src"in l&&l.src){const i=l;s.push({code:i.code??null,src:i.src});continue}if(typeof l=="string"&&(l.startsWith("http")||l.includes("/"))){s.push({code:null,src:l});continue}if(typeof l=="string"||typeof l=="number"){const i=String(l),u=r(i,t);u&&s.push({code:i,resolvedPath:u})}}return s}function l8(e,t){if(!t||e.readyState<1)return!0;const r=e.currentSrc||e.src;return r?Ud(r)!==Ud(t):!0}function Ud(e){try{return new URL(e,typeof location>"u"?"http://localhost/":location.href).href}catch{return e}}const Gd=4,i8=eo(Gd/Qs);function u8(e){const{src:t,segments:r,progress:a=0,waveProgressRef:s,noiseSrc:l,noiseRatio:i=0,noiseSpeed:u=1,totalDuration:c=0,mainVolume:p=1,onReadyChange:h,showSoundWaveForm:d=!0,leadInMs:m=0,tailMs:C=0,trackDurationSec:x=0}=e,g=o.useRef(null),y=o.useRef(null),[v,_]=o.useState(null),[b,B]=o.useState(!1),[N,f]=o.useState(null),[w,k]=o.useState(2),[E,A]=o.useState(0),[D,j]=o.useState(null),[$,H]=o.useState(!1),[F,U]=o.useState(!1),T=3,I=3,z=1,ie=300,te=o.useRef(0),P=o.useCallback(()=>{const oe=g.current,ee=y&&y.current?y.current:oe?oe.closest(".audio-player__wave"):null,be=ee?ee.getBoundingClientRect():oe?oe.getBoundingClientRect():null,je=be?be.width:0,De=be?Math.max(100,be.width):320,we=be?be.height:0,ze=Math.max(z,Math.min(ie,Math.floor((De+I)/(T+I)))),ye=ze*T,_e=Math.max(0,ze-1),ve=Math.max(0,_e>0?(De-ye)/_e:I);return{bars:ze,gap:ve,height:we,width:je}},[]),G=o.useRef(void 0),X=o.useRef(null),K=o.useCallback(async(oe,ee,{quiet:be=!1}={})=>{const je=++te.current,De=()=>te.current===je;try{if(be||B(!1),G.current=oe,!oe){De()&&_(null);return}let we=ee;if(!we)try{for(let _e=0;_e<4&&!(g.current||y.current);_e++)await new Promise(ve=>requestAnimationFrame(ve));await new Promise(_e=>requestAnimationFrame(_e));const ye=P();ye.height>0&&A(ye.height),we=ye.bars,k(ye.gap)}catch{we=120}X.current=we;const ze=await Wd(oe,we);if(!De())return;if(!ze){_(null),B(!1);return}_(ze),f(we),B(!0)}catch{if(!De())return;_(null),B(!1)}},[B,_,A,k,f,P]);o.useEffect(()=>{const oe=y.current;if(!oe||typeof ResizeObserver>"u")return;let ee=null;const be=new ResizeObserver(()=>{ee!==null&&cancelAnimationFrame(ee),ee=requestAnimationFrame(()=>{ee=null;try{const je=P();if(je.width<=0||(je.height>0&&A(je.height),X.current===null||je.bars===X.current))return;const De=G.current;k(je.gap),De?K(De,je.bars,{quiet:!0}).catch(()=>{}):X.current=je.bars}catch{}})});return be.observe(oe),()=>{be.disconnect(),ee!==null&&cancelAnimationFrame(ee)}},[P,K]),o.useEffect(()=>{const oe=r&&r[0]&&r[0].src||t||r&&r.length===1&&r[0]&&r[0].src;K(typeof oe=="string"?oe:void 0).catch(()=>{}),U(!1)},[t,r,K]),o.useEffect(()=>{let oe=!1;if(H(!1),j(null),!l||!N)return;const ee=c>0?c*(u||1):void 0;return Wd(l,N,ee,!0).then(be=>{oe||(j(be),be||H(!0))}).catch(()=>{oe||(j(null),H(!0))}),()=>{oe=!0}},[l,N,c,u]);const L=Math.max(0,Math.min(1,p)),R=o.useMemo(()=>v&&v.length&&Math.max(...v)||1,[v]),S=N||40,V=o.useMemo(()=>t8({bars:S,trackDurationSec:x,leadInMs:m,tailMs:C}),[S,x,m,C]),ae=o.useMemo(()=>Array.from({length:S}).map((oe,ee)=>{const be=ee>=V.lead&&ee<V.lead+V.sound,je=V.sound>0&&be?Math.min(S-1,Math.round((ee-V.lead)/V.sound*S)):-1,De=be?v&&v[je]!=null?v[je]:null:v?0:null,we=De==null?null:Math.min(1,De/R*L),ze=we!=null&&E>0&&Qa(we)<=Gd,ye=we==null?.15:ze?0:eo(we),_e=ze,ve=S>1?ee/(S-1):0;return n.jsx("div",{className:_e?"audio-player__bar audio-player__bar--hidden":"audio-player__bar",style:{"--val":ye,"--i":ee,"--mix":ve}},ee)}),[S,v,R,L,E,V]),ne={"--progress":String(Math.max(0,Math.min(1,a)))},re=o.useMemo(()=>D&&D.length&&Math.max(...D.map(oe=>Number.isFinite(oe)?Math.abs(oe):0))||1,[D]),ue=L*Math.max(0,i),Be=!l||!D||!D.length?1:Math.max(1,ue),le={"--bar-gap":`${w}px`,"--wave-h":`${Qa(Be)}px`,"--wave-h1":`${Qs}px`},J=b&&(l?!!D||$:!0);o.useEffect(()=>{J&&U(!0)},[J]);const O=F?b:J;o.useEffect(()=>{h?.(O)},[O,h]);const W=N||40,q=o.useMemo(()=>Array.from({length:W}).map((oe,ee)=>{const be=D&&D[ee]!=null?D[ee]:null,je=be==null?0:Math.abs(be)/re*ue,De=Math.max(i8,eo(je)),we=W>1?ee/(W-1):0;return n.jsx("div",{className:"audio-player__bar",style:{"--val":De,"--i":ee,"--mix":we}},ee)}),[W,D,re,ue,E]);return n.jsxs("div",{className:"audio-player__wave",ref:y,style:le,children:[l&&n.jsx("div",{className:`audio-player__wave-noise ${J?"is-ready":""}`,"aria-hidden":"true",children:q}),d&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:`audio-player__wave-inner audio-player__wave-unplayed ${O?"is-ready":""}`,ref:g,children:ae}),n.jsx("div",{className:`audio-player__wave-inner audio-player__wave-played ${O?"is-ready":""}`,ref:s,style:ne,children:ae})]})]})}const Kd={idle:!1,synthesizing:!0,resolving:!0,checking_exists:!0,getting_signed_url:!0,downloading:!0,measuring_duration:!0,ready:!1,error:!0};function el(e,t){return new Promise((r,a)=>{const s=document.createElement("audio");let l=!1;const i=()=>{try{s.removeAttribute("src"),s.load()}catch{}},u=()=>{if(l)return;l=!0;const p=isFinite(s.duration)&&s.duration||0;i(),r(p)},c=p=>{l||(l=!0,i(),t.rejectOnError?a(new Error(p)):r(0))};s.addEventListener("loadedmetadata",u),s.addEventListener("error",()=>c("audio load failed")),setTimeout(()=>c("audio load timeout"),t.timeoutMs),s.src=e})}const c8=2e3;function Yd(e,t=c8){return new Promise(r=>{let a=!1;const s=()=>{a||(a=!0,r())};e.addEventListener("canplay",s,{once:!0}),e.addEventListener("error",s,{once:!0}),setTimeout(s,t)})}function d8({showSoundWaveForm:e,showNoiseWaveForm:t,timeoutMs:r=2500}){const a=o.useRef(!1),s=o.useRef([]),l=o.useCallback(c=>{if(a.current=c,!c||!s.current.length)return;const p=s.current;s.current=[];for(const h of p)h(!0)},[]),i=o.useCallback(()=>{a.current=!1},[]),u=o.useCallback(()=>!e&&!t||a.current?Promise.resolve(!0):new Promise(c=>{const p=d=>{clearTimeout(h),s.current=s.current.filter(m=>m!==p),c(d)},h=setTimeout(()=>p(!0),r);s.current.push(p)}),[e,t,r]);return o.useEffect(()=>()=>{const c=s.current;s.current=[];for(const p of c)p(!1)},[]),{onReadyChange:l,waitForReady:u,markNotReady:i}}function p8(){const e=o.useRef([]),t=o.useCallback(s=>(e.current.push(s),s),[]),r=o.useCallback(s=>{const l=new Set([...s].filter(Boolean));e.current=e.current.filter(i=>{if(l.has(i))return!0;try{URL.revokeObjectURL(i)}catch{}return!1})},[]),a=o.useCallback(()=>{r([])},[r]);return o.useEffect(()=>()=>{for(const s of e.current)try{URL.revokeObjectURL(s)}catch{}e.current=[]},[]),{track:t,keepOnly:r,revokeAll:a}}function h8({offsetY:e=8}={}){const t=o.useRef(null),[r,a]=o.useState(null),s=o.useCallback(()=>a(null),[]),l=o.useCallback(()=>{try{const i=t.current?.getBoundingClientRect();if(!i)return;a({left:i.left,right:i.right,width:i.width,height:i.height,x:i.x,top:i.top+e,bottom:i.bottom+e,y:i.y+e,toJSON:i.toJSON.bind(i)})}catch{}},[e]);return o.useEffect(()=>{if(r)return document.addEventListener("mousedown",s),()=>document.removeEventListener("mousedown",s)},[r,s]),{ref:t,rect:r,show:l,hide:s}}function m8(e){if(!e)return 0;const t=e.duration;if(Number.isFinite(t)&&t>0)return t;if(t===0)return 0;try{const r=e.seekable;if(r&&r.length>0){const a=r.end(r.length-1);if(Number.isFinite(a)&&a>0)return a}}catch{}return null}const f8=400,C8=2e3,Zd=5;function g8({audioRef:e,fillRef:t,waveProgressRef:r,sourcesRef:a,currentIndexRef:s,sequencer:l,leadInMs:i=0,tailMs:u=0}){const c=o.useRef(null),p=o.useRef(0),h=o.useRef(null),d=o.useCallback(()=>{c.current!==null&&(cancelAnimationFrame(c.current),c.current=null)},[]),m=o.useCallback(()=>{if(c.current!==null)return;let x=0;const g=()=>{if(Zn){const y=typeof performance<"u"&&performance.now?performance.now():Date.now();if(x>0&&y-x>f8){const v=h.current===null||y-h.current>C8;if(h.current=y,v&&p.current<Zd){p.current+=1;const _=p.current;let b=null;try{b=typeof document<"u"?document.visibilityState:null}catch{}Tt(`progress-ticker-slow-frames#${_}`,`[ihab-core] \uC9C4\uD589 \uC0AC\uC2AC\uC758 \uD2C0 \uC0AC\uC774\uAC00 ${Math.round(y-x)}ms \uC785\uB2C8\uB2E4(\uBCF4\uD1B5 16ms).`,b==="hidden"?"\uC774 \uCE78\uC774 **\uC228\uC5B4 \uC788\uC5B4** \uBE0C\uB77C\uC6B0\uC800\uAC00 \uD2C0\uC744 \uC904\uC600\uC2B5\uB2C8\uB2E4 \u2014 \uC7AC\uC0DD\uBC14\xB7\uD30C\uD615\uC740 \uD2C0\uB9C8\uB2E4 \uADF8\uB824\uC9C0\uBBC0\uB85C, \uC9C0\uAE08 \uC7AC\uB294 \uAC12\uC740 **\uC0AC\uB78C\uC774 \uBCF4\uB294 \uD654\uBA74\uACFC \uB2E4\uB985\uB2C8\uB2E4.** \uCE78\uC744 \uC55E\uC73C\uB85C \uAEBC\uB0B4\uACE0 \uB2E4\uC2DC \uC7AC\uC2ED\uC2DC\uC624.":"\uCE78\uC740 \uBCF4\uC774\uB294\uB370 \uD2C0\uC774 \uB290\uB9BD\uB2C8\uB2E4 \u2014 \uAC19\uC740 \uD654\uBA74\uC5D0\uC11C \uBB34\uAC70\uC6B4 \uC77C\uC774 \uB3C4\uB294\uC9C0 \uBCF4\uC2ED\uC2DC\uC624. \uC7AC\uC0DD\uBC14\xB7\uD30C\uD615\uC774 \uB04A\uACA8 \uBCF4\uC774\uB294 \uAC83\uC740 \uC774 \uD0D3\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4.",_>=Zd?`(${_}\uBC88\uC9F8 \u2014 \uB354\uB294 \uC548 \uC54C\uB9BD\uB2C8\uB2E4)`:`(${_}\uBC88\uC9F8)`)}}x=y}try{const y=e.current,v=Array.isArray(a.current)?a.current[s.current||0]:void 0,_=!!v&&Number.isFinite(v.duration)&&(v.duration??0)>0,b=_?0:m8(y),B=t.current,N=(i||0)>0||(u||0)>0,f=N&&(l?.positionRef.current?.phase??"sound")!=="sound";if(b===null&&!f)try{B&&B.style.visibility!=="hidden"&&(B.style.visibility="hidden")}catch{}else{const w=_?v.duration:b||0;Zn&&f&&!(w>0)&&Tt("progress-ticker-pad-without-duration","[ihab-core] \uB738\uC774 \uB3C4\uB294\uB370 **\uC18C\uB9AC \uAE38\uC774\uB97C \uBAA8\uB985\uB2C8\uB2E4** \u2014 \uC7AC\uC0DD\uBC14\uAC00 \uB738\uB9CC\uC73C\uB85C \uC5B4\uB9BC\uC7A1\uC544 \uC6C0\uC9C1\uC785\uB2C8\uB2E4.","\uC18C\uB9AC \uAE38\uC774 \uC7AC\uAE30(measureAudioDuration)\uAC00 0 \uC744 \uC92C\uAC70\uB098 `<audio>` \uAC00 \uC544\uC9C1 \uC548 \uC2E4\uB838\uC2B5\uB2C8\uB2E4. \uAE38\uC774\uB97C \uC54C\uAC8C \uB418\uBA74 \uB9C8\uCEE4\uAC00 \uADF8 \uC21C\uAC04 **\uB4A4\uB85C \uBB3C\uB7EC\uB0A9\uB2C8\uB2E4**(\uC5B4\uB9BC\uC740 \uB298 \uCC38\uBCF4\uB2E4 \uD07D\uB2C8\uB2E4). \uC774 \uC904\uC774 \uBCF4\uC774\uBA74 \uADF8 \uC790\uB9AC\uB97C \uC54C\uB824 \uC8FC\uC2ED\uC2DC\uC624 \u2014 \uD3C9\uC18C \uAE38\uC5D0\uC11C\uB294 \uC548 \uB098\uC640\uC57C \uD569\uB2C8\uB2E4.");const k=N?e8({phase:l?.positionRef.current?.phase??"sound",phaseElapsedMs:l?.positionRef.current?Math.max(0,Date.now()-l.positionRef.current.at):0,currentTime:y&&typeof y.currentTime=="number"?y.currentTime:0,trackDurationSec:w,leadInMs:i||0,tailMs:u||0}):Qw({currentTime:y&&typeof y.currentTime=="number"?y.currentTime:0,sources:a.current,index:s.current,audioDuration:b??0});try{B&&(B.style.visibility&&(B.style.visibility=""),B.style.left=`${k*100}%`)}catch{}try{r.current?.style.setProperty("--progress",String(k))}catch{}}}catch{}c.current=requestAnimationFrame(g)};c.current=requestAnimationFrame(g)},[e,t,r,a,s,l,i,u]),C=o.useCallback(x=>{d();try{t.current&&(t.current.style.visibility="",t.current.style.left=`${x*100}%`)}catch{}try{r.current?.style.setProperty("--progress",String(x))}catch{}},[d,t,r]);return o.useEffect(()=>d,[d]),{start:m,stop:d,settleTo:C}}function tl({btnLabel:e,soundSrc:t,bucketPath:r,onDone:a,disabled:s=!1,ttsText:l=null,className:i,showSoundWaveForm:u=!0,showNoiseWaveForm:c=!0,leadInMs:p=0,tailMs:h=0}){const{t:d}=Ne.useTranslation(),m=e,C=Xa(),x=o.useRef(C?.registerAnalyser);o.useEffect(()=>{x.current=C?.registerAnalyser});const g=o.useRef(null),y=o.useRef(null),v=o.useRef(null),_=p8(),b=o.useRef(null),B=o.useRef(!1),N=o.useRef(null),{ref:f,rect:w,show:k,hide:E}=h8();o.useEffect(()=>()=>{x.current?.("main",null),x.current?.("noise",null)},[]);const[A,D]=o.useState(!1),[j,$]=o.useState("idle"),[H,F]=o.useState("stopped"),U=o.useRef("stopped");o.useEffect(()=>{U.current=H},[H]);const[T,I]=o.useState(0),[z,ie]=o.useState("active"),te=o.useRef(!1);o.useEffect(()=>{if(z!=="playMode"||!te.current)return;te.current=!1;const Y=typeof document<"u"?document.activeElement:null;if(Y&&Y!==document.body)return;const de=v.current?.querySelectorAll("button")[1];try{de?.focus()}catch{}},[z]);const[P,G]=o.useState(null),[X,K]=o.useState(null),[L,R]=o.useState(0),[S,V]=o.useState(!1),[ae,ne]=o.useState(0),re=C?.playbackRate??1,ue=C?.mainVolume??1,Be=C?Ys(C.settings):0,le=C?Od(C.settings):ue,[J,O]=o.useState("idle"),[W,q]=o.useState(""),[oe]=o.useState("top"),ee=o.useRef(null),be=o.useRef(0),je=o.useRef(null),De=o.useRef(!0),we=Rw({mountedRef:De}),ze=o.useRef(null),ye=o.useRef(p),_e=o.useRef(h);o.useEffect(()=>{ye.current=Math.max(0,p||0)},[p]),o.useEffect(()=>{_e.current=Math.max(0,h||0)},[h]);const{start:ve,stop:Ee,settleTo:Oe}=g8({audioRef:g,fillRef:y,waveProgressRef:je,sourcesRef:ee,currentIndexRef:be,sequencer:we,leadInMs:p,tailMs:h}),{onReadyChange:ot,waitForReady:it,markNotReady:Fe}=d8({showSoundWaveForm:u,showNoiseWaveForm:c}),Ue=o.useRef(null),nt=o.useRef(s),Te=o.useRef(a),Xe=o.useRef(null),rt=o.useRef(!1),[ut,gt]=o.useState(!1),_t=o.useCallback(Y=>{rt.current=Y,gt(Y)},[]),pt=o.useRef(null),{activeNoiseUrl:Yt,noiseSettingsRef:kt,fadeInNoise:ct,fadeOutNoise:Ae}=Hw({noisePlayer:C,audioRef:g,playbackStateRef:U,sequencer:we}),{startTTS:st,stopTTS:ft}=Vw({ttsText:l,playbackRate:re,mainVolume:le,fillRef:y,waveProgressRef:je,setProgress:I,setPlaybackState:F,setStateLocal:ie,fadeInNoise:ct,fadeOutNoise:Ae,noiseSettingsRef:kt,onDoneRef:Te,handleEndRef:pt});o.useEffect(()=>{It.current=ft});const Ct=Y=>{if(typeof window>"u"||!window.speechSynthesis){try{q(d("training.ttsUnavailable","\uC774 \uAE30\uAE30\uC5D0\uC11C\uB294 \uC74C\uC131\uC744 \uB4E4\uB824\uC904 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."))}catch{}st(Y);return}he("tts"),st(Y)},Nt=Array.isArray(t)?t.filter(Boolean):t?[t]:[],Ft=(!Nt||Nt.length===0)&&!!l,yt=Array.isArray(P)&&P.length>0?P:Array.isArray(X)&&X.length>0?X:null,vt=Math.max(Array.isArray(yt)?yt.length:0,Nt.length);o.useEffect(()=>(De.current=!0,()=>{De.current=!1}),[]);const Et=()=>{we.abort()},It=o.useRef(null),Je=o.useRef(null),At=o.useRef(null),Qe=o.useRef(null);Qe.current||(Qe.current=()=>{At.current=null;const Y=g.current;if(Je.current==="audio"&&Y&&(!Y.paused||we.isRunning())){Et();try{Y.pause()}catch{}De.current&&(F("paused"),Ee(),Ae())}else if(Je.current==="tts")try{It.current?.()}catch{}});const he=Y=>{Je.current=Y,At.current=pa(Qe.current)},Le=()=>{At.current?.(),At.current=null};o.useEffect(()=>()=>{Qe.current&&Va(Qe.current)},[]);const Pe=o.useRef(re);o.useEffect(()=>{Pe.current=re||1},[re]);const We=o.useCallback(Y=>{const de=Pe.current||1;try{Y.defaultPlaybackRate=de}catch{}try{Y.playbackRate=de}catch{}},[]),dt=o.useCallback((Y,de)=>{if(!l8(Y,de)){try{Y.currentTime=0}catch{}We(Y);return}Y.src=de,We(Y),Y.load(),We(Y)},[We]),on=o.useCallback(()=>{Xe.current&&(clearTimeout(Xe.current),Xe.current=null),O("idle")},[]),ht=o.useCallback(async(Y,de=3,ke=50,$e=0)=>{on();const Ve=we.generation(),Ze=!!Y&&Y.currentTime>0&&!Y.ended,wt=Math.max(0,ye.current-Math.max(0,$e));if(wt>0&&!Ze){he("audio"),ve(),F("playing");const bt=kt.current;if(bt?.enabled&&(bt.volume??0)>0)try{ct(bt.volume)}catch{}if(!await we.waitPad(wt,"lead",$e)||!De.current||!we.isCurrent(Ve))return!1}we.enterSound();for(let bt=0;bt<de;bt++){if(!De.current||!we.isCurrent(Ve))return!1;try{return he("audio"),await Y.play(),!0}catch(ge){if((ge instanceof Error||typeof ge=="object"&&ge&&"name"in ge?ge.name:void 0)==="AbortError"){if(!we.isCurrent(Ve))return!1;await new Promise(M=>setTimeout(M,ke));continue}try{q(d("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}return!1}}try{q(d("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}return!1},[d,ve,we,ct,kt,on]),Ke=o.useCallback(Y=>{const de=we.generation(),ke=Math.max(0,_e.current-Math.max(0,Y));ve();const $e=kt.current;if($e?.enabled&&($e.volume??0)>0)try{ct($e.volume)}catch{}const Ve=()=>{try{ze.current?.()}catch{}};if(ke<=0){we.leave(),Ve();return}we.waitPad(ke,"tail",Y).then(Ze=>{we.leave(),Ze&&we.isCurrent(de)&&Ve()}).catch(()=>{})},[we,ve,ct,kt]),xt=o.useCallback(()=>{const Y=g.current;if(!Y)return;const de=()=>{F("playing"),ie("playMode"),V(!0),ve();try{jo(),_a(Y).then(Ze=>{if(De.current)try{x.current?.("main",Ze)}catch{}})}catch{}const Ve=kt.current;Ve?.enabled&&(Ve?.volume??0)>0&&ct(Ve.volume)},ke=()=>{r8({ended:!!Y?.ended,completedByEnd:rt.current})||(F("paused"),Ee(),Ae())},$e=()=>{const Ve=()=>{try{const Ze=ee.current,wt=n8(Ze,be.current);if(wt!==null){be.current=wt,R(wt),V(!0);const bt=Ze?.[wt]&&Ze[wt].src;if(bt&&Y){dt(Y,bt),ht(Y).catch(()=>{});return}}}catch{}F("stopped"),I(1);try{if(Y)try{Y.currentTime=0}catch{}}catch{}Ee(),V(!1),Ae();try{!nt.current&&pt.current&&pt.current()}catch{}};if(ze.current=Ve,_e.current>0){ve(),we.waitPad(_e.current,"tail").then(Ze=>{we.leave(),Ze&&Ve()}).catch(()=>{});return}Ve()};return Y.addEventListener("play",de),Y.addEventListener("pause",ke),Y.addEventListener("ended",$e),()=>{try{Y.removeEventListener("play",de),Y.removeEventListener("pause",ke),Y.removeEventListener("ended",$e),Ee()}catch{}}},[ct,Ae,ht,kt,ve,Ee,we]);o.useEffect(()=>xt(),[xt]),o.useEffect(()=>{nt.current=s},[s]),o.useEffect(()=>{Te.current=a},[a]),o.useEffect(()=>{if(s||z!=="active")return;const Y=N.current;if(!Y)return;let de=null;const ke=requestAnimationFrame(()=>{try{const $e=Y.getTotalLength();if(!$e)return;const Ve=$e*.2;Y.style.strokeDasharray=`${$e-Ve} ${Ve}`;const Ze="triFlow_"+Math.random().toString(36).slice(2);de=document.createElement("style"),de.textContent=`@keyframes ${Ze}{from{stroke-dashoffset:0}to{stroke-dashoffset:-${$e}}}`,document.head.appendChild(de),Y.style.animation=`${Ze} 2.4s linear infinite`}catch{}});return()=>{cancelAnimationFrame(ke),de?.remove()}},[z,s]),o.useEffect(()=>{ee.current=P},[P]),o.useEffect(()=>{be.current=L},[L]),o.useEffect(()=>{const Y=v.current,de=b.current;if(!Y||!de)return;let ke=null;const $e=32,Ve=60,Ze=()=>{try{const bt=Array.from(Y.querySelectorAll(":scope > .button"));let ge=0;bt.forEach(qe=>{if(qe===de)return;const tt=qe.getBoundingClientRect();ge+=tt.width});const M=Y.getBoundingClientRect().width,Z=Math.max(0,Math.floor(M-ge-8)),Ce=vt;if(!Ce||Z<=0){Array.from(de.children).forEach(qe=>{try{qe.style.width=""}catch{}});return}let Re=Math.floor(Z/Ce);Re>Ve&&(Re=Ve),Re<$e&&(Re=Math.max($e,Math.floor(Z/Ce))),Array.from(de.querySelectorAll(".button")).forEach(qe=>{try{qe.style.width=`${Re}px`}catch{}})}catch{}},wt=requestAnimationFrame(Ze);try{ke=new ResizeObserver(()=>{requestAnimationFrame(Ze)}),ke.observe(Y),ke.observe(de),window.addEventListener("resize",Ze)}catch{}return()=>{try{cancelAnimationFrame(wt)}catch{}try{ke&&(ke.disconnect(),ke=null)}catch{}try{window.removeEventListener("resize",Ze)}catch{}}},[P,X,vt]),o.useEffect(()=>()=>{try{Ue.current&&(clearTimeout(Ue.current),Ue.current=null),Xe.current&&(clearTimeout(Xe.current),Xe.current=null)}catch{}},[]);const jt=(Y,de)=>{G(Y),ne(de),Fe(),K(a8(Y)),ee.current=Y},Q=()=>{ie("playMode"),R(0),V(!0)},fe=async(Y,de)=>{_t(!1),B.current=!1,dt(Y,de),await Yd(Y),await it()!==!1&&(D(!1),Q(),await ht(Y))},Ge=async(Y,de=!1)=>{const ke=g.current;D(!0),$("measuring_duration");try{const $e=await el(Y,{timeoutMs:1e4,rejectOnError:!0});jt([{src:Y,objectUrl:null,duration:$e}],$e),$("ready"),de&&ke&&await fe(ke,Y)}finally{B.current=!1,D(!1)}},Ye=async(Y,de=!1)=>{const ke=g.current;D(!0),$("measuring_duration");try{const $e=await Promise.all(Y.map(Ze=>el(Ze,{timeoutMs:1e4})));if(!De.current)return;const Ve=Y.map((Ze,wt)=>({src:Ze,objectUrl:null,duration:$e[wt]||0}));jt(Ve,o8(Ve)),$("ready"),de&&ke&&Ve.length>0&&await fe(ke,Ve[0].src)}finally{B.current=!1,D(!1)}},at=async(Y=!1,de=!0)=>{const ke=g.current,$e=t?Array.isArray(t)?t:[t]:[];if(!$e||$e.length===0||!$e.some(Boolean))return!1;if(B.current)return null;B.current=!0,de&&D(!0),$("resolving");try{const Ve=s8(t,r,si),Ze=[];let wt=0;for(const bt of Ve){let ge=bt.src??null,M=null;if(!ge&&bt.resolvedPath){try{$("getting_signed_url"),ge=await li(bt.resolvedPath)}catch{ge=null}if(!De.current)return!1;if(!ge)try{$("downloading");const Ce=await ii(bt.resolvedPath);if(!De.current)return!1;if(Ce){const Re=Ce instanceof Blob?Ce:new Blob([Ce]);M=_.track(URL.createObjectURL(Re)),ge=M}}catch{$("error");try{q(d("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.")),ie("active")}catch{}}}if(!ge)continue;let Z=0;try{$("measuring_duration"),Z=await el(ge,{timeoutMs:3e3})}catch{Z=0}if(!De.current){if(M)try{URL.revokeObjectURL(M)}catch{}for(const Ce of Ze)if(Ce.objectUrl)try{URL.revokeObjectURL(Ce.objectUrl)}catch{}return!1}wt+=Z||0,Ze.push({...bt,src:ge,objectUrl:M,duration:Z})}if(jt(Ze,wt),Ze.length>0&&Y&&ke){const bt=Ze[0];_t(!1);try{_.keepOnly(Ze.map(ge=>ge.objectUrl))}catch{}if($("ready"),B.current=!1,bt.src&&ke)try{if(dt(ke,bt.src),await Yd(ke),await it()===!1)return!1;de&&D(!1),Q(),ke&&await ht(ke)}catch{de&&D(!1)}else de&&D(!1);ie("playMode"),R(0),V(!0)}return Ze.length>0}finally{B.current=!1,de&&D(!1),$(Ve=>Ve==="ready"?"ready":"idle")}},mt=async Y=>{const de=we.isRunning();if(Y.paused&&!de){if(rt.current){await Ot();return}const ke=we.resume();if(ke){if(F("playing"),ke.phase==="tail"){Ke(ke.elapsed);return}await ht(Y,3,50,ke.elapsed);return}await ht(Y),F("playing")}else we.pause(),Et(),Y.pause(),F("paused"),de&&(Ee(),Ae())},Mt=async()=>{const Y=g.current;if(!(!Y&&!Ft)){if(Ft){const de=window.speechSynthesis;if(z==="active"){const ke=qr(),$e=Array.isArray(l)?l.filter(Boolean):l?[l]:[];if(ke&&$e.length>0){if(B.current)return;ie("load"),D(!0),$("synthesizing"),B.current=!0;try{const Ve=await Promise.all($e.map(Ze=>Promise.resolve(ke(Ze))));Ve.length>1?await Ye(Ve,!0):await Ge(Ve[0],!0)}catch{B.current=!1,D(!1),ie("active"),Ct($e.length>0?$e:void 0)}return}Ct($e.length>0?$e:void 0);return}if(z==="playMode"){const ke=!!de&&(de.speaking||de.paused)&&!(Y&&(Y.currentSrc||Y.getAttribute("src")));if(Y&&!ke){await mt(Y);return}try{if(de&&de.paused)try{he("tts"),de.resume(),F("playing")}catch{}else try{de.pause(),F("paused")}catch{}}catch{}}return}if(z==="active"){if(s&&Array.isArray(ee.current)&&ee.current.length>0){const ke=ee.current[0];try{if(ke.src&&Y)try{dt(Y,ke.src),Q(),Y&&await ht(Y)}catch{}Q();return}catch{}}ie("load");let de;try{de=await at(!0)}catch{de=!1}if(de===!1&&De.current){try{q(d("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}ie("active")}return}if(z!=="load"&&(z==="playMode"||z==="active"))try{Y&&await mt(Y)}catch(de){(de instanceof Error||typeof de=="object"&&de&&"name"in de)&&de.name}}},Ot=async()=>{const Y=g.current;if(Y)try{const de=ee.current;if(Array.isArray(de)&&de.length>1){await gn(0);return}_t(!1);try{Y.currentTime=0}catch{}Y&&await ht(Y),F("playing"),ie("playMode")}catch{}},Tn=()=>{Et(),Le(),It.current?.();const Y=g.current;try{if(Y){try{Y.pause()}catch{}try{Y.currentTime=0}catch{}}}catch{}Ae(),F("stopped"),ie("active"),I(0),V(!1)},Xt=async(Y,{sameSegment:de=!1}={})=>{Et();const ke=we.generation(),$e=g.current,Ve=ee.current?.[Y]?.src;try{if(_t(!1),R(Y),V(!0),be.current=Y,!Ve||!$e||(de||Fe(),dt($e,Ve),!de&&await it()===!1)||!we.isCurrent(ke)||(await ht($e),!we.isCurrent(ke)))return;F("playing"),ie("playMode")}catch{}},Mn=async()=>{const Y=ee.current,de=be.current||0;if(!Y||de<=0){await Ot();return}await Xt(de-1)},dn=async()=>{const Y=ee.current,de=be.current||0;if(!Y||de>=Y.length-1){Tn();return}await Xt(de+1)},Jt=()=>{if(rt.current)return;const Y=200,de=340;_t(!0),Et(),Le();try{I(1)}catch{}Oe(1);try{O("hold")}catch{}try{const ke=g.current,$e=Ft&&!!ke?.src;if(!Ft||$e){if(ke){ke.pause();try{ke.currentTime=0}catch{}}}else ft();Ae()}catch{}try{F("stopped")}catch{}if(V(!1),!nt.current)try{Xe.current&&(clearTimeout(Xe.current),Xe.current=null),Xe.current=setTimeout(()=>{try{O("out")}catch{}Xe.current=setTimeout(()=>{try{typeof Te.current=="function"&&Te.current(!0)}catch{}try{O("idle")}catch{}Xe.current=null},de)},Y)}catch{}};o.useEffect(()=>{pt.current=Jt});const en=o.useCallback(()=>q(""),[]),gn=async Y=>{(ee.current||[])[Y]&&await Xt(Y,{sameSegment:Y===be.current})},tn=H==="playing",Rt=o.useMemo(()=>{if(!X||X.length<=1)return X;const Y=X[L];return Y?[Y]:X},[X,L]),Dt=s===!0;o.useEffect(()=>{try{const Y=g.current;Y&&typeof Y.playbackRate=="number"&&We(Y)}catch{}},[re,We]);const Ut=o.useRef({raf:null,timer:null});o.useEffect(()=>{const Y=g.current;if(!Y)return;const de=Math.max(0,Math.min(1,le)),ke=Ut.current,$e=()=>{ke.raf!==null&&(cancelAnimationFrame(ke.raf),ke.raf=null),ke.timer!==null&&(clearTimeout(ke.timer),ke.timer=null)};$e();const Ve=wa(Y);if(Y.paused||Math.abs(Ve-de)<.001||typeof requestAnimationFrame!="function"){try{Qn(Y,de)}catch{}return}const Ze=performance.now(),wt=()=>{const bt=Math.min(1,(performance.now()-Ze)/150);try{Qn(Y,Ve+(de-Ve)*bt)}catch{}ke.raf=bt<1?requestAnimationFrame(wt):null};return ke.raf=requestAnimationFrame(wt),ke.timer=setTimeout(()=>{$e();try{Qn(Y,de)}catch{}},200),$e},[le]);const zt=J==="hold",$n=J==="out",Ln=z==="playMode"&&!A&&!ut||zt||$n,Fn=H!=="stopped"||zt||$n,pe=H==="paused",Se=Math.max(0,Math.min(100,(T||0)*100)),He=xe("audio-player__fill",Ln?"is-visible":"",Fn?"is-expanded":"",pe?"is-paused":"",$n?"is-out":"");return n.jsxs("div",{className:`audio-player ${Dt?"is-disabled":""}${i?` ${i}`:""}`,role:"group","aria-label":typeof m=="string"?m:void 0,children:[n.jsxs("div",{className:`audio-player__panel ${tn?"is-playing":""} ${A?"is-loading":""} ${z!=="default"?"is-revealed":""}`,children:[A?n.jsxs("div",{className:"audio-player__loading",role:Kd[j]?"status":void 0,"aria-live":Kd[j]?"polite":"off",children:[n.jsx("span",{className:"audio-player__loading-spinner","aria-hidden":"true"}),n.jsx("span",{className:"audio-player__loading-text",children:d("training.audioStatus.preparing",{defaultValue:"\uC18C\uB9AC\uB97C \uC900\uBE44\uD558\uACE0 \uC788\uC2B5\uB2C8\uB2E4\u2026"})})]}):null,z==="active"?n.jsx("button",{className:"audio-player__button",type:"button",disabled:Dt,onClick:()=>{te.current=Ka(),E(),Mt()},"aria-label":typeof m=="string"?m:d("training.listen","\uB4E3\uAE30"),onMouseEnter:k,onMouseLeave:E,onFocus:k,onBlur:E,children:n.jsx("span",{ref:f,className:"audio-player__button-triangle-wrap",children:n.jsx("svg",{className:"audio-player__button-triangle",viewBox:"0 0 24 24","aria-hidden":"true",children:n.jsx("path",{ref:N,d:"M13.2 7.7 L16.5 9.85 Q20.2 12 16.5 14.15 L10 18.3 Q7 19.7 7 16.3 L7 7.7 Q7 4.3 10 5.7 L13.2 7.7"})})})}):null,w&&n.jsx(zn,{anchorRect:w,text:typeof m=="string"&&m?m:d("training.listenLabel","\uBB38\uC7A5 \uB4E3\uAE30"),offset:8}),n.jsxs("div",{className:`audio-player__play ${z==="playMode"||tn?"is-visible":""}`,inert:!(z==="playMode"||tn)||void 0,children:[n.jsxs("div",{ref:v,className:"audio-player__buttons",children:[n.jsx(me,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"skip-back",onClick:Mn,ariaLabel:d("training.prev","\uC774\uC804"),width:"60px",variant:"transparent-white","aria-hidden":"true",tabIndex:-1,disabled:z!=="playMode"}),n.jsx(me,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:tn?"pause":"play",onClick:Mt,ariaLabel:d("common.playPause","\uC7AC\uC0DD / \uBA48\uCDA4"),"aria-pressed":tn,width:"60px",variant:"transparent-white",disabled:z!=="playMode"}),n.jsx(me,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"square",onClick:Tn,ariaLabel:d("training.stop","\uC815\uC9C0"),width:"60px",variant:"transparent-white","aria-hidden":"true",tabIndex:-1,disabled:z!=="playMode"}),vt>1?n.jsx("div",{ref:b,className:"audio-player__source-buttons",children:Array.from({length:vt}).map((Y,de)=>n.jsx(me,{htmlType:"button",size:32,type:"dot",shape:"pill",useBorder:!1,label:String(de+1),onClick:()=>{try{gn(de)}catch{}},ariaLabel:d("training.sourcePlay",{n:de+1}),variant:"transparent-white",selected:S&&L===de,disabled:z!=="playMode"||!(Array.isArray(P)&&P[de]),showTooltipInfo:!0},de))}):null,!Array.isArray(P)||P.length<=1?n.jsx(me,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"repeat",onClick:Ot,ariaLabel:d("common.replay","\uB2E4\uC2DC\uB4E3\uAE30"),width:"60px",variant:"transparent-white",disabled:z!=="playMode"}):null,n.jsx(me,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"skip-forward",onClick:dn,ariaLabel:d("training.next","\uB2E4\uC74C"),width:"60px",variant:"transparent-white","aria-hidden":!0,tabIndex:-1,disabled:z!=="playMode"}),n.jsx(me,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"check",onClick:Jt,ariaLabel:d("common.done","\uC644\uB8CC"),width:"60px",variant:"transparent-white",disabled:z!=="playMode"})]}),n.jsxs("div",{className:"audio-player__slider",children:[n.jsx("div",{className:He,ref:y,style:{left:`${Se}%`},"aria-hidden":"true"}),(u||c)&&n.jsx(u8,{segments:Rt,progress:T,totalDuration:ae,waveProgressRef:je,showSoundWaveForm:u,leadInMs:p,tailMs:h,trackDurationSec:P?.[L]?.duration??0,noiseSrc:c&&C?.settings.enabled&&Be>0?Yt:null,noiseRatio:C?ba(C.settings):0,noiseSpeed:C?.settings.speed??1,mainVolume:ue,onReadyChange:ot})]})]}),n.jsx("audio",{ref:g,crossOrigin:"anonymous",preload:"auto"})]}),!u&&n.jsxs("p",{className:"audio-player__no-waveform caption-1",children:[n.jsx(lt,{icon:"triangle-alert",size:14}),d("training.noSoundWaveform","\uC18C\uB9AC \uBE44\uAD50 \uBB38\uC81C\uB294 \uC6E8\uC774\uBE0C\uD3FC\uC744 \uD45C\uD604\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.")]}),n.jsx(Mr,{message:W,position:oe,onClose:en})]})}function to(e){const{t}=Ne.useTranslation(),{text:r,label:a,anchorRect:s=null,onClose:l,closeOnOutsideClick:i=!0,isMobilePopup:u=!1}=e||{},[c,p]=o.useState(()=>{try{return localStorage.getItem("tooltip-theme")||"light"}catch{return"light"}});o.useEffect(()=>{try{localStorage.setItem("tooltip-theme",c)}catch{}},[c]);const{increase:h,decrease:d,canIncrease:m,canDecrease:C,fontSize:x,lineHeight:g}=ku({storageKey:"tooltip-fontScale"}),y=o.useCallback(()=>p(N=>N==="dark"?"light":"dark"),[]),v=o.useCallback(N=>{try{N.stopPropagation()}catch{}try{typeof l=="function"&&l()}catch{}},[l]),_=Array.isArray(r)?r:typeof r>"u"||r===null?[]:[r],b={fontSize:`${x}px`,lineHeight:`${g}px`,"--tt-line-height":`${g}px`,"--tt-marker-size":"28px"},B=n.jsxs("div",{className:ce(`text-box-tooltip__root ${c==="dark"?"is-dark":""}`),children:[n.jsxs("div",{className:ce("text-box-tooltip__box"),children:[a&&n.jsx("div",{className:ce("text-box-tooltip__label body-2b"),children:a}),n.jsx("div",{className:ce("text-box-tooltip__text body-1"),style:b,children:_.map((N,f)=>n.jsxs("div",{className:ce("text-box-tooltip__line"),children:[_.length>1?n.jsx("div",{className:ce("text-box-tooltip__marker"),children:n.jsx("span",{className:ce("text-box-tooltip__line-number button-1"),children:f+1})}):null,n.jsx("span",{className:ce("text-box-tooltip__line-text"),children:N})]},f))})]}),n.jsxs("div",{className:ce("text-box-tooltip__buttons"),children:[n.jsx(me,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:"minus",onClick:d,ariaLabel:t("training.fontSizeDecrease","\uAE00\uC790 \uD06C\uAE30 \uAC10\uC18C"),variant:c==="dark"?"transparent-white":"transparent-gray",disabled:!C}),n.jsx(me,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:"plus",onClick:h,ariaLabel:t("training.fontSizeIncrease","\uAE00\uC790 \uD06C\uAE30 \uC99D\uAC00"),variant:c==="dark"?"transparent-white":"transparent-gray",disabled:!m}),n.jsx(me,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:c==="dark"?"moon":"sun-medium",onClick:y,ariaLabel:t("training.toggleBackground","\uBC30\uACBD \uC804\uD658"),variant:c==="dark"?"transparent-white":"transparent-gray"}),n.jsx(me,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:"x",onClick:v,ariaLabel:t("common.close","\uB2EB\uAE30"),variant:c==="dark"?"transparent-white":"transparent-gray"})]})]});return s?n.jsx(sn,{anchorRect:s,className:ce(`text-box-tooltip ${c==="dark"?"is-dark":""}`),onClose:l,closeOnOutsideClick:i,isMobilePopup:u,ariaLabel:a||t("tooltip.textbox","\uBCF8\uBB38"),children:B}):n.jsx("div",{className:ce(`text-box-tooltip ${c==="dark"?"is-dark":""}`),children:B})}function Xd({state:e="disabled"}){const{t}=Ne.useTranslation();return n.jsxs("div",{className:`ts-bullet ts-bullet--${e}`,"aria-hidden":!0,children:[n.jsx("div",{className:"bullet__dot",children:n.jsx(lt,{icon:"chevron-right",label:t("training.next","\uB2E4\uC74C"),className:"bullet__icon",imgClassName:"bullet__icon-img",maskClassName:"bullet__icon-mask",svgClassName:"bullet__icon-svg",wrapperStyle:{},size:20})}),n.jsx("div",{className:"ts-bullet__line"})]})}function Jd(e,t,r){const a=o.useRef(t),s=o.useRef(r);o.useEffect(()=>{a.current=t,s.current=r}),o.useEffect(()=>{if(!e||typeof document>"u")return;let l=null,i=10;const u=()=>{l=null;const c=a.current(),p=c?Array.from(c.querySelectorAll(jn)).find(h=>!h.closest('[aria-hidden="true"]')):void 0;if(p){try{p.focus()}catch{}if(document.activeElement===p)return}--i>0&&(l=requestAnimationFrame(u))};return l=requestAnimationFrame(u),()=>{l!==null&&cancelAnimationFrame(l);const c=document.activeElement;if(!c||c===document.body||!document.contains(c)||c.closest(".tooltip__content")){const p=s.current();if(p)try{p.focus()}catch{}}}},[e])}function Qd({title:e,children:t,className:r="",state:a="disabled",usePreviewTextBtn:s=!1,onPreviewTextBtn:l,previewText:i=null,useFaded:u,usePlayAllBtn:c=!1,onPlayAll:p,playAllActive:h=!1}){const{t:d}=Ne.useTranslation(),m=Bn("(max-width: 767px)"),C=`training-step__title h4 ${u&&a==="disabled"?"training-step__title--faded":""} ${r}`.trim(),x=`training-step__title-row training-step__title-row--${a}`.trim(),g=o.useRef(null),[y,v]=o.useState(!1),[_,b]=o.useState(null),[B,N]=o.useState(null);Jd(y&&!!_,()=>{if(typeof document>"u")return null;const A=Array.from(document.querySelectorAll(".tooltip__content"));for(let D=A.length-1;D>=0;D--)if(A[D].querySelector(".text-box-tooltip__root"))return A[D];return null},()=>g.current?.querySelector("button")??null);const f=o.useRef(l);o.useEffect(()=>{f.current=l});const w=o.useMemo(()=>i==null?"":typeof i=="string"||typeof i=="number"?String(i):Array.isArray(i)&&i.every(A=>typeof A=="string"||typeof A=="number")?i.join(""):"",[i]),k=o.useCallback(()=>{v(!1),b(null),N(null)},[]);o.useEffect(()=>{if(!y)return;let A;try{typeof f.current=="function"&&(A=f.current())}catch{}if(A===!1){k();return}N(typeof A<"u"&&A!==null?A:null)},[w]);const E=o.useCallback(()=>{let A;try{typeof l=="function"&&(A=l())}catch{}if(A!==!1){if(N(typeof A<"u"&&A!==null?A:i),!g.current){v(D=>!D);return}if(y)v(!1),b(null),N(null);else{const D=g.current.getBoundingClientRect();b(D),v(!0)}}},[l,i,y]);return n.jsxs("div",{className:x,children:[n.jsx("p",{className:C,children:n.jsx("span",{className:"training-step__title-text",children:e??t})}),s||c?n.jsxs("div",{className:"title-controls",children:[n.jsxs("div",{className:"title-buttons",children:[c&&n.jsx(me,{htmlType:"button",size:32,type:m?"dot":"bar",icon:"play-circle",label:m?void 0:d("training.playAll","\uBAA8\uB450 \uB4E3\uAE30"),ariaLabel:d("training.playAll","\uBAA8\uB450 \uB4E3\uAE30"),selected:h,onClick:p,variant:a==="disabled"?"disabled":"default",disabled:a==="disabled"||h,onDisabledClick:h&&a!=="disabled"?()=>{}:void 0}),s&&n.jsx("div",{ref:g,children:n.jsx(me,{htmlType:"button",size:32,type:m?"dot":"bar",icon:"eye",label:m?void 0:d("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),ariaLabel:d("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),onClick:E,className:y?"is-selected":void 0,"aria-expanded":y,"aria-haspopup":"dialog",variant:a==="disabled"?"disabled":"default",disabled:!i&&typeof l!="function"})})]}),y&&n.jsx(to,{text:B??i,label:d("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),anchorRect:_,onClose:k,closeOnOutsideClick:!1,isMobilePopup:!0})]}):null]})}function nl(e,t){return typeof t!="number"||typeof e!="number"?"disabled":e<t?"done":e===t?"active":"disabled"}function br({index:e,stepIndex:t,isLast:r=!1,title:a="",titleProps:s={},children:l,className:i="",onDone:u=void 0,useTitleFaded:c=void 0,lockedHint:p}){const{t:h}=Ne.useTranslation(),[d,m]=o.useState(()=>nl(e,t));o.useEffect(()=>{const f=nl(e,t);if(f!==d){const w=setTimeout(()=>m(f),0);return()=>clearTimeout(w)}},[e,t,d]);const C=o.useCallback((...f)=>{nl(e,t)==="done"||d==="done"||typeof u=="function"&&u(...f)},[e,t,d,u]),[x,g]=o.useState(!1),[y,v]=o.useState({text:"",label:"\uBB38\uC7A5 \uB4E3\uAE30",anchorRect:null,backdrop:!1,alignX:null,alignY:null}),_=o.useCallback(f=>{if(!f)return null;try{const w=f;if(typeof f=="object"&&(w.currentTarget||w.target)&&(w.nativeEvent||w.type)){const A=w.currentTarget??w.target;if(A&&typeof A.getBoundingClientRect=="function")return A.getBoundingClientRect()}if(f instanceof DOMRect)return f;const k=f;if(k&&typeof k.getBoundingClientRect=="function")return k.getBoundingClientRect();const E=f?.current;return E&&typeof E.getBoundingClientRect=="function"?E.getBoundingClientRect():null}catch{return null}},[]),b=o.useCallback((f,{text:w="",label:k="\uBB38\uC7A5 \uB4E3\uAE30",backdrop:E=!1,alignX:A="center",alignY:D="top"}={})=>{const j=_(f);v({text:w,label:k,anchorRect:j,backdrop:E,alignX:A,alignY:D}),g(!0)},[_]),B=o.useCallback(()=>{g(!1),v(f=>({...f,anchorRect:null}))},[]),N=o.Children.map(l,f=>{if(o.isValidElement(f)){const w=f;if(typeof w.type=="string")return w;const k=w.props??{},E=typeof k.onDone=="function"?k.onDone:C,A=typeof k.disabled=="boolean";let D=d==="disabled";return A&&(D=!!k.disabled),o.cloneElement(w,{onDone:E,disabled:D,showTooltip:b,hideTooltip:B})}return f});return n.jsxs("div",{className:`training-step training-step--${d} ${r?"training-step--last":""} ${i}`,"aria-current":d==="active",children:[n.jsx(Xd,{state:d}),n.jsxs("div",{className:"training-step__content",children:[n.jsx(Qd,{state:d,title:a,...s,useFaded:c}),d==="disabled"&&p&&typeof e=="number"&&typeof t=="number"&&e===t+1&&n.jsx("p",{className:"training-step__locked-hint caption-1",role:"status",children:p}),N]}),x?n.jsx(sn,{anchorRect:y.anchorRect,backdrop:y.backdrop,onClose:B,ariaLabel:h("tooltip.textbox","\uBCF8\uBB38"),children:n.jsx(to,{text:y.text,onClose:B})}):null]})}function ep({context:e,state:t="disabled",theme:r="light"}){const{t:a}=Ne.useTranslation(),[s,l]=o.useState("disabled"),[i,u]=o.useState(()=>{try{return localStorage.getItem("tooltip-theme")||r}catch{return r}});o.useEffect(()=>{try{localStorage.setItem("tooltip-theme",i)}catch{}},[i]);const c=()=>u($=>$==="dark"?"light":"dark"),{increase:p,decrease:h,canIncrease:d,canDecrease:m,fontSize:C,lineHeight:x}=ku({storageKey:"textbox_fontScale"}),[g,y]=o.useState(""),v=o.useRef(null),_=o.useRef(!1),b=o.useCallback(()=>{_.current=Ka()&&!!v.current&&v.current.contains(document.activeElement),l("active")},[]),B=o.useCallback(()=>y(""),[]),N=$=>{try{y($)}catch{}},f=typeof navigator<"u"&&/Mobi|Android/i.test(navigator.userAgent||"");o.useEffect(()=>{if(t!=="disabled"){const $=setTimeout(()=>l(t),0);return()=>clearTimeout($)}},[t]);const w=o.useMemo(()=>e&&typeof e=="object"?String(e.sentence??e.text??""):typeof e=="string"?e:"",[e]),[k,E]=o.useState(w);k!==w&&(E(w),l("disabled"));const A=t==="disabled"?s:t,D=A==="disabled"?"training-text-box--disabled":A==="active"?"training-text-box--active":A==="done"?"training-text-box--done":"",j=o.useMemo(()=>({fontSize:`${C}px`,lineHeight:`${x}px`}),[C,x]);return o.useEffect(()=>{if(A==="disabled"||!_.current)return;_.current=!1;const $=document.activeElement;$&&$!==document.body||v.current?.querySelector(".training-text-box__buttons button")?.focus()},[A]),n.jsxs("div",{ref:v,className:`training-text-box ${D} ${A!=="disabled"&&i==="dark"?"is-dark":""}`,children:[A==="disabled"&&n.jsx("div",{className:"training-text-box__preview",children:n.jsx(me,{htmlType:"button",size:48,type:"bar",onClick:b,icon:"eye",ariaLabel:a("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),label:a("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),useBorder:!1})}),n.jsx("div",{className:"training-text-box__area","aria-hidden":A==="disabled",children:n.jsx("span",{className:"training-text-box__inner h3",style:j,children:w})}),A!=="disabled"&&n.jsxs("div",{className:"training-text-box__buttons","aria-hidden":A==="disabled",children:[n.jsx(me,{htmlType:"button",size:32,type:"dot",onClick:h,onDisabledClick:()=>N(a("training.fontSizeMin","\uAE00\uC528 \uD06C\uAE30\uAC00 \uCD5C\uC18C\uC785\uB2C8\uB2E4.")),ariaLabel:a("training.fontSizeDecrease","\uAE00\uC790 \uD06C\uAE30 \uAC10\uC18C"),icon:"minus",variant:i==="dark"?"transparent-white":"transparent-gray",disabled:!m,useBorder:!1,showTooltipInfo:!0,...!f&&{width:"60px"}}),n.jsx(me,{htmlType:"button",size:32,type:"dot",onClick:p,onDisabledClick:()=>N(a("training.fontSizeMax","\uAE00\uC528 \uD06C\uAE30\uAC00 \uCD5C\uB300\uC785\uB2C8\uB2E4.")),ariaLabel:a("training.fontSizeIncrease","\uAE00\uC790 \uD06C\uAE30 \uC99D\uAC00"),icon:"plus",variant:i==="dark"?"transparent-white":"transparent-gray",disabled:!d,useBorder:!1,showTooltipInfo:!0,...!f&&{width:"60px"}}),n.jsx(me,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:i==="dark"?"moon":"sun-medium",onClick:c,ariaLabel:a("training.toggleBackground","\uBC30\uACBD \uC804\uD658"),variant:i==="dark"?"transparent-white":"transparent-gray"})]}),n.jsx(Mr,{message:g,position:"top",onClose:B})]})}function yr(e){return e==="active"||e==="done"}function rl({index:e,stepIndex:t,isLast:r=!1,lockedHint:a,title:s,useTitleFaded:l,onDone:i,onChange:u,answer:c,wrongAnswers:p,choices:h,multiSelect:d=!1,correctCount:m=0,useDisabledCovered:C=!1,choiceIcons:x,shuffleChoices:g=!0}){const{t:y}=Ne.useTranslation(),v=s??y("training.selectConfirm","\uBB38\uC81C\uB97C \uBCF4\uACE0 \uD574\uB2F9\uD558\uB294 \uB0B4\uC6A9\uC744 \uC120\uD0DD\uD558\uC138\uC694."),_=typeof e=="number"?e:-1,b=typeof t!="number"?"disabled":_<t?"done":_===t?"active":"disabled",B=Array.isArray(h)&&h.length?h:typeof c<"u"?[c].concat(Array.isArray(p)?p:[]):void 0,N=p?p.join("||"):"",f=h?h.join("||"):"",[w,k]=o.useState(()=>Array.isArray(B)?g?Zr(B):B.slice():void 0);o.useEffect(()=>{Array.isArray(B)&&B.length?k(g?Zr(B):B.slice()):k(void 0)},[c,N,f,g]);const[E,A]=o.useState(null),[D,j]=o.useState(()=>new Set);o.useEffect(()=>{A(null),j(new Set)},[f,c,N]);const $=o.useRef(void 0);o.useEffect(()=>{const U=$.current;typeof U=="number"&&typeof t=="number"&&typeof e=="number"&&U>=e&&t<e&&(A(null),j(new Set)),$.current=t},[t,e]);const H=o.useCallback(U=>{if(!yr(b))return;const T=w?.[U];if(T==null)return;const I=T;if(d){const z=new Set(D);z.has(I)?z.delete(I):z.add(I),j(z),typeof u=="function"&&u({selectedValues:[...z],__ts:Date.now()}),typeof i=="function"&&i({selectedValues:[...z],__ts:Date.now()})}else A(I),typeof u=="function"&&u({selectedIndex:U,selectedValue:I,__ts:Date.now()}),typeof i=="function"&&i({selectedIndex:U,selectedValue:I,__ts:Date.now()})},[w,b,d,u,D]),F=`training-step__buttons${Array.isArray(w)&&w.length>3?" training-step__buttons--wrap-3":""}`;return n.jsx(br,{index:e,stepIndex:t,isLast:r,lockedHint:a,title:v,useTitleFaded:l,children:n.jsx("div",{className:F,children:Array.isArray(w)&&w.length>0?w.map((U,T)=>n.jsx(me,{htmlType:"button",size:56,type:"bar",onClick:()=>H(T),ariaLabel:String(U),label:U,useLabel:!0,icon:x?x[String(U)]:void 0,variant:"default",disabled:b==="disabled",selected:d?D.has(U):E===U,useDisabledCovered:C,minWidth:0},String(U))):null})})}function al({index:e,stepIndex:t,isLast:r=!1,lockedHint:a,title:s,onDone:l,onChange:i,context:u,demoSelected:c}){const{t:p}=Ne.useTranslation(),h=s??p("training.confirmTitle","\uBB38\uC7A5\uC744 \uD655\uC778\uD558\uACE0 \uC798 \uB4E4\uB838\uB294\uC9C0 \uC120\uD0DD\uD558\uC138\uC694."),d=typeof e=="number"?e:-1,m=typeof t!="number"?"disabled":d<t?"done":d===t?"active":"disabled",C=u&&typeof u=="object"?u.sentence||"":typeof u=="string"?u:"",x=u&&typeof u=="object"?u.choices:void 0,[g,y]=o.useState(c??null),v=`${String(C)}\0${JSON.stringify(x??null)}`,[_,b]=o.useState(v);_!==v&&(b(v),c==null&&y(null));const[B,N]=o.useState(c);Object.is(B,c)||(N(c),y(c??null));const f=o.useRef(void 0);o.useEffect(()=>{const A=f.current;typeof A=="number"&&typeof t=="number"&&typeof e=="number"&&A>=e&&t<e&&c==null&&y(null),f.current=t},[t,e,c]);const w=o.useCallback(A=>{const D=typeof A=="object"&&A!==null?Object.assign({},A,{__ts:Date.now()}):{value:A,__ts:Date.now()};typeof i=="function"&&i(D),yr(m)&&typeof l=="function"&&l(D)},[i,m,l]),k=o.useCallback(()=>{yr(m)&&(y(!1),w(!1))},[w,m]),E=o.useCallback(()=>{yr(m)&&(y(!0),w(!0))},[w,m]);return n.jsxs(br,{index:e,stepIndex:t,isLast:r,lockedHint:a,title:h,onDone:l,useTitleFaded:!1,children:[n.jsx(ep,{context:u,state:m}),n.jsx("div",{className:"training-step__buttons",children:Array.isArray(x)&&x.length>0?x.slice(0,6).map((A,D)=>n.jsx(me,{htmlType:"button",size:56,type:"bar",onClick:()=>{yr(m)&&(y(D),w&&w(D))},disabled:m==="disabled",ariaLabel:String(A),label:A,variant:m,selected:g===D},D)):n.jsxs(n.Fragment,{children:[n.jsx(me,{htmlType:"button",size:56,type:"bar",onClick:k,disabled:m==="disabled",icon:"x",ariaLabel:p("training.notHeard","\uC548 \uB4E4\uB838\uC5B4\uC694."),label:p("training.notHeard","\uC548 \uB4E4\uB838\uC5B4\uC694."),variant:"default",selected:g===!1}),n.jsx(me,{htmlType:"button",size:56,type:"bar",onClick:E,disabled:m==="disabled",icon:"circle",ariaLabel:p("training.heardWell","\uC798 \uB4E4\uB838\uC5B4\uC694."),label:p("training.heardWell","\uC798 \uB4E4\uB838\uC5B4\uC694."),variant:"default",selected:g===!0})]})})]})}function ol({index:e,stepIndex:t,isLast:r=!1,title:a,onDone:s,btnLabel:l,soundSrc:i,bucketPath:u,usePreviewTextBtn:c,previewText:p=null,onPreviewTextBtn:h,disabled:d,_pageIndex:m,showSoundWaveForm:C,showNoiseWaveForm:x,leadInMs:g,tailMs:y}){const{t:v}=Ne.useTranslation(),_=a??v("training.listenTitle","\uC81C\uC2DC\uD558\uB294 \uBB38\uC7A5\uC744 \uB4E4\uC5B4\uC8FC\uC138\uC694."),b=d??(typeof t=="number"&&typeof e=="number"?e>t:!1);return n.jsx(br,{index:e,stepIndex:t,isLast:r,title:_,onDone:s,titleProps:{usePreviewTextBtn:c,previewText:p,onPreviewTextBtn:h},children:n.jsx(tl,{soundSrc:i,ttsText:i?null:p??_,bucketPath:u,btnLabel:l||v("training.listenButton","\uBB38\uC7A5 \uB4E3\uAE30"),disabled:b,className:"training-step__listen-sticky",showSoundWaveForm:C,showNoiseWaveForm:x,leadInMs:g,tailMs:y},`audio-p${m??0}-s${e}`)})}const b8=[];function sl({index:e,stepIndex:t,isLast:r=!1,lockedHint:a,title:s,onDone:l,onChange:i,context:u=b8}){const{t:c}=Ne.useTranslation(),p=s??c("training.orderListDefault","\uBB38\uC7A5\uC744 \uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uBC30\uCE58\uD558\uC138\uC694."),h=K=>typeof K=="string"?K:K&&(K.context||K.sentence||K.question||"")||"",[d,m]=o.useState(Array.isArray(u)?u:[]),[C,x]=o.useState(()=>(d||[]).map((K,L)=>({id:L,text:h(K)}))),g=o.useMemo(()=>typeof t!="number"||typeof e!="number"?"disabled":e<t?"done":e===t?"active":"disabled",[t,e]),y=g!=="disabled",v=o.useRef(void 0),_=o.useRef(void 0);o.useEffect(()=>{if(v.current===u)return;v.current=u;const K=Array.isArray(u)?u:[];m(K);const L=(R=>{const S=(R||[]).map((re,ue)=>({id:ue,text:h(re)}));if(S.length<=1)return S;const V=(re,ue)=>{if(re.length!==ue.length)return!1;for(let Be=0;Be<re.length;Be++)if(re[Be].text!==ue[Be].text)return!1;return!0};let ae=Zr(S),ne=0;for(;V(ae,S)&&ne<20;)ae=Zr(S),ne+=1;return ae})(K);x(L);try{if(typeof i=="function"){const R=L.filter((S,V)=>S.text===h(K[V])).length;i({shuffled:L,score:R,total:(K||[]).length,initial:!0,__ts:Date.now()})}if(typeof l=="function"&&g==="active"){const R=L.filter((S,V)=>S.text===h(K[V])).length;_.current=u,l({shuffled:L,score:R,total:(K||[]).length,initial:!0,__ts:Date.now()})}}catch{}},[u]),o.useEffect(()=>{if(g!=="active"||_.current===u||(_.current=u,typeof l!="function"))return;const K=Array.isArray(u)?u:[],L=C.filter((R,S)=>R.text===h(K[S])).length;l({shuffled:C,score:L,total:K.length,initial:!0,__ts:Date.now()})},[g,u]);const b=(K,L)=>{const R=[...C],S=K+L;if(S<0||S>=R.length)return;const V=R[S];R[S]=R[K],R[K]=V,I(R);try{if(typeof l=="function"&&g==="active"){const ae=R.filter((ne,re)=>ne.text===h(d[re])).length;l({shuffled:R,score:ae,total:(d||[]).length,__ts:Date.now()})}}catch{}},[B,N]=o.useState(null),f=o.useRef(null),w=o.useRef(null),k=o.useRef(null),E=o.useRef(null),A=o.useRef(null),D=o.useRef({x:0,y:0}),j=o.useRef(null),$=o.useRef({dx:0,dy:0}),H=()=>{if(j.current!==null)return;const K=()=>{if(!f.current){j.current=null;return}j.current=requestAnimationFrame(K);const L=D.current,R=$.current||{dx:0,dy:0};f.current&&(f.current.style.transform=`translate3d(${L.x-R.dx}px, ${L.y-R.dy}px, 0)`)};j.current=requestAnimationFrame(K)},F=o.useRef(new Map),U=o.useRef(new Map),T=()=>{const K=new Map;return F.current.forEach((L,R)=>{L&&L.getBoundingClientRect&&K.set(R,L.getBoundingClientRect())}),K},I=K=>{const L=T();x(K);try{if(typeof i=="function"){const R=K.filter((S,V)=>S.text===h(d[V])).length;i({shuffled:K,score:R,total:(d||[]).length,__ts:Date.now()})}}catch{}requestAnimationFrame(()=>{const R=T();K.forEach(S=>{const V=L.get(S.id),ae=R.get(S.id),ne=F.current.get(S.id);if(!ne||!V||!ae)return;const re=V.top-ae.top;re&&(ne.style.transition="none",ne.style.transform=`translateY(${re}px)`,requestAnimationFrame(()=>{ne.style.transition="transform 420ms cubic-bezier(.22,.9,.39,1)",ne.style.transform="";const ue=()=>{ne.style.transition="",ne.removeEventListener("transitionend",ue)};ne.addEventListener("transitionend",ue)}))})})},z=(K,L)=>{try{try{L.dataTransfer?.setData("text/plain",String(K))}catch{}try{L.dataTransfer&&(L.dataTransfer.effectAllowed="move")}catch{}try{const R=document.createElement("div");R.style.cssText="position:absolute;top:-9999px;left:-9999px;width:1px;height:1px;opacity:0;pointer-events:none;",document.body.appendChild(R),L.dataTransfer?.setDragImage(R,0,0),requestAnimationFrame(()=>{try{document.body.removeChild(R)}catch{}})}catch{}}catch{}N(K);try{const R=C[K],S=document.createElement("div");S.className="order-list__dragging-object order-list__dragging-object--visible",S.textContent=R&&R.text?R.text:"",document.body.appendChild(S),f.current=S;const V=F.current.get(R.id);let ae=L.clientX||0,ne=L.clientY||0;try{if(V&&V.getBoundingClientRect){const O=V.getBoundingClientRect();ae=O.left+O.width/2,ne=O.top+O.height/2}}catch{}const re=S.getBoundingClientRect(),ue=re.width/2,Be=re.height/2;$.current={dx:ue,dy:Be},S.style.transition="none",D.current={x:ae,y:ne},S.style.transform=`translate3d(${ae-ue}px, ${ne-Be}px, 0)`,requestAnimationFrame(()=>{try{S.style.transition=""}catch{}H()});const le=O=>{const W=O;D.current={x:W.clientX,y:W.clientY},H()};k.current=le,document.addEventListener("mousemove",le);const J=O=>{const W=O;D.current={x:W.clientX,y:W.clientY},H()};w.current=J,document.addEventListener("dragover",J);try{L.dataTransfer?.setData("text/plain",String(K));try{L.dataTransfer?.setData("application/json",JSON.stringify({idx:K}))}catch{}}catch{}}catch{}},ie=(K,L)=>{L.preventDefault();try{L.dataTransfer&&(L.dataTransfer.dropEffect="move")}catch{}try{A.current!==null&&(clearTimeout(A.current),A.current=null);const R=L.currentTarget&&L.currentTarget.closest?L.currentTarget.closest(".order-list__item"):null;if(R&&E.current!==R){if(E.current)try{E.current.classList.remove("drag-over")}catch{}try{R.classList.add("drag-over")}catch{}E.current=R}}catch{}},te=(K,L)=>{L.preventDefault();const R=L.dataTransfer?.getData("text/plain")||"",S=R?parseInt(R,10):B,V=K;if(typeof S!="number"||isNaN(S)||S===V){N(null),X(),P();return}const ae=Wb(C,S,V);I(ae),N(null),P();try{if(typeof l=="function"&&g==="active"){const ne=ae.filter((re,ue)=>re.text===h(d[ue])).length;l({shuffled:ae,score:ne,total:(d||[]).length,__ts:Date.now()})}}catch{}try{requestAnimationFrame(()=>{const ne=document.querySelectorAll(".order-list .order-list__item")[V];if(!ne)return;const re=ne.querySelector(".order-list__slot")||ne;try{re.classList.add("pulse"),re.offsetHeight,re.classList.add("to-dark");const ue=()=>{re.classList.remove("pulse","to-dark"),re.removeEventListener("transitionend",ue)};re.addEventListener("transitionend",ue)}catch{}})}catch{}X()},P=()=>{if(f.current){try{document.body.removeChild(f.current)}catch{}f.current=null}w.current&&(document.removeEventListener("dragover",w.current),w.current=null),k.current&&(document.removeEventListener("mousemove",k.current),k.current=null),j.current!==null&&(cancelAnimationFrame(j.current),j.current=null)},G=()=>{N(null),X(),P()};o.useEffect(()=>()=>P(),[]);const X=()=>{try{if(A.current!==null&&(clearTimeout(A.current),A.current=null),E.current){try{E.current.classList.remove("drag-over")}catch{}E.current=null}document.querySelectorAll(".order-list .order-list__item").forEach(K=>K.classList.remove("drag-over"))}catch{}};return o.useEffect(()=>{try{const K=Math.max(1,(C||[]).length);C.forEach((L,R)=>{const S=U.current.get(L.id);if(!S)return;let V=50;K>1&&(V=Math.round(R/(K-1)*100));try{S.style.setProperty("--marker-pos",V+"%")}catch{}})}catch{}},[C]),o.useEffect(()=>()=>{P(),A.current!==null&&(clearTimeout(A.current),A.current=null)},[]),n.jsx(br,{index:e,stepIndex:t,isLast:r,lockedHint:a,title:p,children:n.jsx("div",{className:"order-list",children:C.map((K,L)=>{const R=Math.max(1,(C||[]).length),S=R>1?Math.round(L/(R-1)*100):50;return n.jsx("div",{className:"order-list__item",children:n.jsxs("div",{className:"order-list__slot","data-disabled":g==="disabled","aria-disabled":g==="disabled",children:[g!=="disabled"?n.jsx("div",{className:"order-list__marker caption-1",style:{"--marker-pos":S+"%"},ref:V=>{const ae=U.current;V?ae.set(K.id,V):ae.delete(K.id)},children:n.jsx("span",{className:"order-list__slot-number button-1",children:L+1})}):null,n.jsxs("div",{ref:V=>{const ae=F.current;V?ae.set(K.id,V):ae.delete(K.id)},className:`order-list__draggable ${B===L?"dragging":""}`,"data-disabled":g==="disabled","aria-disabled":g==="disabled",tabIndex:g==="disabled"?-1:0,draggable:y,onDragStart:y?V=>z(L,V):void 0,onDragEnter:y?V=>ie(L,V):void 0,onDragOver:y?V=>ie(L,V):void 0,onDragLeave:y?()=>{try{A.current!==null&&clearTimeout(A.current),A.current=setTimeout(()=>{try{const V=document.querySelectorAll(".order-list .order-list__item");V&&V[L]&&(V[L].classList.remove("drag-over"),E.current===V[L]&&(E.current=null))}catch{}},80)}catch{}}:void 0,onDrop:y?V=>te(L,V):void 0,onDragEnd:y?G:void 0,children:[n.jsx("span",{className:"order-list__item-text body-2",children:K.text}),y?n.jsxs("span",{className:"order-list__item-buttons",children:[n.jsx(me,{htmlType:"button",size:32,type:"dot",onClick:()=>b(L,-1),ariaLabel:c("training.up"),icon:"chevron-up",variant:"transparent-gray",width:48,useFaded:"true",disabled:L===0,useBorder:!1,useDisabledInvisible:!0}),n.jsx(me,{htmlType:"button",size:32,type:"dot",onClick:()=>b(L,1),ariaLabel:c("training.down"),icon:"chevron-down",variant:"transparent-gray",width:48,useFaded:"true",disabled:L===C.length-1,useBorder:!1,useDisabledInvisible:!0})]}):null]})]})},K.id)})})})}const y8=8e3;function v8(e,t){return new Promise(r=>{let a=!1;const s=()=>{a||(a=!0,r())};e.then(s,s),setTimeout(s,t)})}function tp({index:e,stepIndex:t,isLast:r=!1,lockedHint:a,title:s,onDone:l,onChange:i,context:u=[],selectable:c=!1,hideLabel:p=!1,hideAudio:h=!1,maxCards:d,playAllGapMs:m=0}){const{t:C}=Ne.useTranslation(),x=s??C("training.cardInstructions","\uB0B1\uB9D0 \uCE74\uB4DC\uB97C \uBCF4\uACE0 \uC18C\uB9AC\uB97C \uB4E3\uACE0 \uD655\uC778\uD558\uC138\uC694."),g=o.useMemo(()=>Array.isArray(u)?u:u&&u.items||[],[u]),y=d??3,v=(g||[]).slice(0,y);(g||[]).length>y&&console.warn(`TrainingStepCard: ${g.length} items passed but only ${y} shown`);const _=typeof e=="number"?e:-1,b=typeof t!="number"?"disabled":_<t?"done":_===t?"active":"disabled",[B,N]=o.useState(null),f=o.useRef([]),[w,k]=o.useState(!1),E=o.useRef(null),A=o.useRef(!0);o.useEffect(()=>(A.current=!0,()=>{A.current=!1}),[]);const D=o.useMemo(()=>g.map(T=>T?.id??T?.word??"").join("|"),[g]);o.useEffect(()=>{N(null)},[D]);const j=o.useRef(void 0);o.useEffect(()=>{const T=j.current;typeof T=="number"&&typeof t=="number"&&typeof e=="number"&&T>=e&&t<e&&N(null),j.current=t},[t,e]);const $=o.useCallback((T,I)=>{if(c)return;const z={item:T,index:I,__ts:Date.now()};try{typeof i=="function"&&i(z)}catch{}if(b==="active"&&typeof l=="function")try{l(z)}catch{}},[c,i,b,l]),H=o.useRef(m);o.useEffect(()=>{H.current=Math.max(0,m||0)},[m]);const F=o.useCallback(async()=>{if(w||b==="disabled")return;k(!0);let T=!1;const I=new Promise(z=>{E.current=()=>{T=!0,z()}});try{for(let z=0;z<v.length&&!(!A.current||T);z++){const ie=f.current[z];if(!ie)continue;await Promise.race([v8(ie.play(),y8),I]);const te=Math.max(0,H.current||0);te>0&&z<v.length-1&&!T&&A.current&&await Promise.race([new Promise(P=>{setTimeout(P,te)}),I])}}finally{E.current=null,k(!1)}},[w,b,v.length]),U=o.useCallback((T,I)=>{if(!yr(b))return;N(I);const z={selectedValue:T.word||T.title||"",selectedIndex:I,item:T,__ts:Date.now()};try{typeof i=="function"&&i(z)}catch{}if(typeof l=="function")try{l(z)}catch{}},[i,b,l]);return n.jsx(br,{index:e,stepIndex:t,isLast:r,lockedHint:a,title:x,onDone:l,titleProps:{usePlayAllBtn:!h&&v.length>0,onPlayAll:F,playAllActive:w},children:n.jsx("div",{className:"training-step__cards",onClickCapture:T=>{const I=E.current;if(!I)return;const z=T.target;z&&typeof z.closest=="function"&&z.closest(".training-word-card__bottom")&&I()},children:v.length===0?n.jsx("div",{className:"training-step__empty",children:C("training.noCards","\uCE74\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}):v.map((T,I)=>n.jsx(Rs,{ref:z=>{f.current[I]=z},item:T,disabled:b==="disabled",onPlayDone:()=>$(T,I),selectable:c,selected:c&&B===I,onSelect:c?()=>U(T,I):void 0,flipDelay:I*120,hideLabel:p,hideAudio:h},T&&T.id||I))})})}function x8(e){return[{label:e("training.noise.level.none","\uC5C6\uC74C"),value:0},{label:e("training.noise.level.weak","\uC57D\uD568"),value:1},{label:e("training.noise.level.medium","\uBCF4\uD1B5"),value:2},{label:e("training.noise.level.strong","\uAC15\uD568"),value:3},{label:e("training.noise.level.veryStrong","\uB9E4\uC6B0 \uAC15\uD568"),value:4}]}function np(e){return[{label:e("training.noise.type.default","\uAE30\uBCF8"),value:"defaultNoise",icon:"party-popper"},{label:e("training.noise.type.street","\uAE38\uAC70\uB9AC"),value:"street",icon:"car"},{label:e("training.noise.type.buzz","\uC640\uAE00\uC640\uAE00"),value:"buzz",icon:"message-square-more"},{label:e("training.noise.type.restaurant","\uC2DD\uB2F9"),value:"restaurant",icon:"coffee"}]}x8(Pt.t.bind(Pt)),np(Pt.t.bind(Pt));const no="none",_8=.5,w8=1.5,B8=.25;function ll({title:e,valueLabel:t,value:r,min:a,max:s,step:l,tickStep:i,size:u,disabled:c,onChange:p}){return n.jsxs(Cn,{variant:"custom",label:e,useFullWidth:!0,children:[n.jsx(Qc,{value:r,onChange:p,min:a,max:s,step:l,size:u,showBgTick:!0,tickStep:i,ariaLabel:e,disabled:c,className:ce("noise-settings-tooltip__slider-input")}),n.jsx("div",{className:ce(xe("noise-settings-tooltip__value","button-1",c?"noise-settings-tooltip__value--disabled":"")),children:t})]})}function rp({anchorRect:e,onClose:t,hideNoiseRows:r=!1}){const{t:a}=Ne.useTranslation(),s=Bn("(max-width: 767px)")?40:24,l=Xa(),i=ba(l?.settings??gr),u=l?.settings.type??"defaultNoise",c=l?.settings.enabled??!0,p=l?.playbackRate??1,h=l?.mainVolume??1,d=Math.round(h*100),m=o.useCallback(v=>{try{l?.setMainVolume(Math.max(0,Math.min(1,v/100)))}catch{}},[l]),C=o.useCallback(v=>{try{l?.setPlaybackRate(v)}catch{}},[l]),x=o.useCallback(v=>{const _=Math.min(ga,Math.max(0,Math.round(v*10)/10));try{l?.setSettings({noiseRatio:_})}catch{}},[l]),g=o.useCallback(v=>{try{v===no?l?.setSettings({enabled:!1}):l?.setSettings({type:v,enabled:!0})}catch{}},[l]),y=[{key:no,label:a("training.noise.type.none","\uC5C6\uC74C")},...np(a).map(v=>({key:v.value,label:v.label}))];return n.jsx(sn,{anchorRect:e,offset:12,onClose:t,ariaLabel:a("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815"),isMobilePopup:!1,closeOnOutsideClick:!1,header:n.jsxs("div",{className:ce("noise-settings-tooltip__header"),children:[n.jsx("span",{children:a("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815")}),n.jsx(me,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,ariaLabel:a("common.close","\uB2EB\uAE30"),onClick:t})]}),children:n.jsxs(da,{className:ce("noise-settings-tooltip"),useBorder:!1,labelWidth:72,children:[n.jsx(ll,{title:a("training.playVolumeTitle","\uC804\uCCB4 \uC18C\uB9AC"),valueLabel:`${d}%`,value:d,min:0,max:100,step:10,size:s,onChange:m}),n.jsx(ll,{title:a("training.playSpeedTitle","\uC7AC\uC0DD \uC18D\uB3C4"),valueLabel:`${p.toFixed(2)}x`,value:p,min:_8,max:w8,step:B8,size:s,onChange:C}),!r&&n.jsxs(n.Fragment,{children:[n.jsx(Cn,{variant:"custom",label:a("training.noiseTypeTitle","\uC18C\uC74C \uC885\uB958"),useFullWidth:!0,children:n.jsx(kn,{ariaLabel:a("training.noiseTypeTitle","\uC18C\uC74C \uC885\uB958"),size:40,shape:"rounded",options:y,value:c?u:no,onChange:g})}),n.jsx(ll,{title:a("training.noiseRatioTitle","\uC18C\uC74C \uBE44\uC728"),valueLabel:a("training.noiseRatioValue","{{ratio}}\uBC30",{ratio:i.toFixed(1)}),value:i,min:0,max:ga,step:Fd,size:s,disabled:!c,onChange:x})]}),r&&n.jsx("div",{className:ce("noise-settings-tooltip__width-ghost"),"aria-hidden":"true",inert:!0,children:n.jsx(Cn,{variant:"custom",label:"\xA0",useFullWidth:!0,children:n.jsx(kn,{ariaLabel:"width-ghost",size:40,shape:"rounded",options:y,value:no,onChange:()=>{}})})})]})})}function ap({useNoiseSettingBtn:e=!1,onSettings:t,onNext:r,onResult:a,stepIndex:s=0,stepCount:l=0,pageIndex:i=0,pageCount:u=1,resultOpen:c=!1,hideNoiseRows:p=!1}){const{t:h}=Ne.useTranslation(),[d,m]=o.useState(!1),[C,x]=o.useState(null),[g,y]=o.useState(!1),v=o.useRef(null),_=o.useRef(null),b=Xa(),B=u>0,N=B&&i<u-1,f=!B||i>=u-1,w=s===Math.max(0,l);o.useEffect(()=>{e||(m(!1),x(null))},[e]);const k=o.useCallback(()=>{m(!1),x(null)},[]),E=o.useCallback(()=>{if(d){m(!1),x(null);return}const I=v?.current?.getBoundingClientRect();I&&x(I),t?.(),m(!0)},[d,t]),A=o.useCallback(()=>{if(d){m(!1),x(null);return}const I=_?.current?.getBoundingClientRect();I&&x(I),t?.(),m(!0)},[d,t]),D=Bn("(max-width: 767px)"),j=o.useRef(null),[$,H]=o.useState(null),F=o.useCallback(()=>{y(I=>{const z=!I;return H(z?j.current?.getBoundingClientRect()??null:null),z})},[]),U=o.useCallback(()=>{y(!1),H(null)},[]);o.useEffect(()=>{c&&(y(!1),H(null))},[c]);const T=n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"pp-bottom__meter",children:[n.jsx("span",{className:"pp-bottom__meter-label caption-1",children:h("training.meter.sentence","\uC7AC\uC0DD")}),n.jsx(Ss,{analyser:b?.mainAnalyser??null,orientation:"horizontal",length:112,label:"db",labelPos:"left",ariaLabel:h("training.meter.sentence","\uC7AC\uC0DD")})]}),n.jsxs("div",{className:"pp-bottom__meter",children:[n.jsx("span",{className:"pp-bottom__meter-label caption-1",children:h("training.meter.noise","\uC18C\uC74C")}),n.jsx(Ss,{analyser:b?.noiseAnalyser??null,orientation:"horizontal",length:112,label:"db",labelPos:"left",ariaLabel:h("training.meter.noise","\uC18C\uC74C")})]})]});return Jd(e&&d,()=>typeof document<"u"?document.querySelector(".noise-settings-tooltip__header")?.closest(".tooltip__content")??null:null,()=>[v.current,_.current].map(I=>I?.querySelector("button")??null).find(I=>!!I&&I.getClientRects().length>0)??v.current?.querySelector("button")??null),n.jsxs("div",{className:"pp-bottom",children:[n.jsxs("div",{className:"pp-bottom__left",children:[e?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"pp-bottom__settings--desktop",children:n.jsx("div",{ref:v,className:"pp-bottom__tooltip-trigger","data-tooltip-ignore":!0,children:n.jsx(me,{htmlType:"button",size:56,type:"bar",icon:"settings",onClick:E,className:d?"is-selected":void 0,"aria-expanded":d,"aria-haspopup":"dialog",ariaLabel:h("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815"),label:h("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815"),minWidth:140})})}),n.jsx("div",{className:"pp-bottom__settings--mobile",children:n.jsx("div",{ref:_,className:"pp-bottom__tooltip-trigger","data-tooltip-ignore":!0,children:n.jsx(me,{htmlType:"button",size:56,type:"dot",shape:"pill",icon:"settings",onClick:A,className:d?"is-selected":void 0,"aria-expanded":d,"aria-haspopup":"dialog",ariaLabel:h("training.settings","\uC124\uC815")})})})]}):null,e&&n.jsx("div",{ref:j,className:"pp-bottom__meter-trigger","data-tooltip-ignore":!0,children:n.jsx(me,{htmlType:"button",size:40,type:"dot",shape:"pill",icon:"audio-lines",onClick:F,selected:g,"aria-expanded":D?g:void 0,ariaLabel:h("training.meter.toggle","\uC624\uB514\uC624 \uBBF8\uD130 \uD45C\uC2DC")})}),e&&g&&!D&&n.jsx("div",{className:"pp-bottom__meters",children:T})]}),e&&g&&D&&$&&n.jsx(sn,{anchorRect:$,onClose:U,ariaLabel:h("training.meter.toggle","\uC624\uB514\uC624 \uBBF8\uD130 \uD45C\uC2DC"),children:n.jsx("div",{className:"pp-bottom__meters pp-bottom__meters--floating",children:T})}),n.jsxs("div",{className:"pp-bottom__right",children:[f&&n.jsx(me,{htmlType:"button",size:56,type:"bar",icon:"check",onClick:typeof a=="function"?a:r,ariaLabel:h("training.viewResult","\uACB0\uACFC\uBCF4\uAE30"),label:h("training.viewResult","\uACB0\uACFC\uBCF4\uAE30"),variant:"main",disabled:!w}),N&&n.jsx(me,{htmlType:"button",size:56,type:"bar",rightIcon:"chevron-right",align:"right",onClick:r,ariaLabel:h("training.nextQuestion","\uB2E4\uC74C \uBB38\uC81C"),label:h("training.nextQuestion","\uB2E4\uC74C \uBB38\uC81C"),variant:"main",disabled:!w})]}),e&&d&&n.jsx(rp,{anchorRect:C,onClose:k,hideNoiseRows:p})]})}function op({title:e,subtitle:t,desc:r,depth:a,icon:s,wrapperStyle:l,iconTooltip:i,pageIndex:u,pageCount:c,progressMax:p,progressIndex:h,onBack:d,onClose:m}){const{t:C}=Ne.useTranslation(),x=Bn("(max-width: 767px)"),g=Number.isInteger(h)?h:u||0,y=Number.isInteger(p)?p:c||0,v=d||m,_=Array.isArray(a)?x?a[a.length-1]:a.join(" / "):a,b=typeof e=="string"?e.trim():e,B=typeof t=="string"?t.trim():t,N=!!(b||B),f=N?b||B:C("common.emptyTrainingName","\uD6C8\uB828 \uC774\uB984\uC774 \uBE44\uC5B4 \uC788\uC2B5\uB2C8\uB2E4."),w=_||(b?t:void 0),k=x&&typeof w=="string"&&(w.includes(" \xB7 ")||w.includes(" / "))?w.split(/\s[·/]\s/).pop():w,E=o.useMemo(()=>{const A=l&&typeof l=="object"?{...l}:{};return!("width"in A)&&!("height"in A)&&(A.width="40px",A.height="40px"),A},[l]);return n.jsxs("header",{className:"pp-title training-popup-title",children:[n.jsxs("div",{className:"pp-title__left",children:[v?n.jsx(me,{htmlType:"button",size:48,type:"dot",icon:"chevron-left",ariaLabel:C("common.back","\uB4A4\uB85C"),onClick:v,useBorder:!1,iconSize:"large",iconColor:"--color-black",variant:"transparent-gray"}):null,n.jsx("div",{children:s?n.jsx(Tc,{icon:s,label:e,tooltip:i,wrapperStyle:E}):null}),n.jsxs("div",{className:"pp-title__text",children:[k?n.jsx("span",{className:"pp-title__depth caption-1",children:k}):null,n.jsx("span",{className:`pp-title__title h2${N?"":" pp-title__title--empty"}`,children:f}),r?n.jsx("span",{className:"pp-title__description caption-1",children:r}):null]})]}),n.jsx(rd,{max:Math.max(0,y??0),index:Math.max(0,g??0)})]})}function k8(){typeof window<"u"&&window.dispatchEvent(new CustomEvent("speechear.popup.close"))}function A8(e){return!e&&e!==0?[]:Array.isArray(e)?e.flatMap(t=>typeof t=="string"?t.split("|").map(r=>r.trim()).filter(Boolean):t||t===0?[String(t)]:[]):typeof e=="string"?e.split("|").map(t=>t.trim()).filter(Boolean):[String(e)]}const sp=(e,t)=>{if(!t)return t;const r=typeof Pt?.t=="function"?Pt.t(e,{defaultValue:t}):void 0;return typeof r=="string"&&r?r:t};function lp(e,t,r){const a=e,s=a?.title||a?.name||(Array.isArray(t)?t[t.length-1]:void 0)||r||"\uD6C8\uB828",l=Ti().find(u=>u.key===(a?.category_0||a?.category_main_code)),i=l?.subs?.find(u=>u.key===(a?.category_1||a?.category_sub_code));return{title:s,label:a?.title||s,depth:t,icon:l?.icon,wrapperStyle:l?.color?{"--t-item-fg":l.color}:void 0,iconTooltip:[l?sp(`topic.${l.key}`,l.label):void 0,i?sp(`topic.sub.${i.key}`,i.label):void 0].filter(Boolean).join(" / ")||void 0}}function il(e){return e&&typeof e=="object"&&typeof e.__ts=="number"?e.__ts:0}function ip(e,t,r){if(!e||typeof e!="object"||Array.isArray(e))return e;const a=e,s=typeof r=="number"&&r>0?r:Date.now();return{...a,...a.shownAt===void 0&&t?{shownAt:t}:{},...a.answeredAt===void 0?{answeredAt:new Date(s).toISOString()}:{}}}function N8(e){const t=e;return Array.isArray(t?.items)?t.items:Array.isArray(e)?e:e?[e]:[]}function E8({idPrefix:e,trainingData:t,depth:r,fallbackTitle:a="\uD6C8\uB828",pages:s=[],emptyMessage:l,buildResults:i,metaPatch:u}){const c=lp(t,r,a),p=typeof u=="function"?u(c)||{}:u||{},h=t?.id||t?.title||s.length;return{id:`${e}:${h}`,meta:{...c,...p},pages:s,emptyMessage:l,buildResults:i}}function j8(e){if(typeof e=="string")return e;if(e&&typeof e=="object"){const t=e;return t.context||t.sentence||t.question||""||""}return""}function D8(e){if(e&&typeof e=="object"){const t=e;if(Array.isArray(t.selectedValues))return t.selectedValues;if(t.selectedValue!==void 0)return t.selectedValue;if(t.selectedIndex!==void 0)return t.selectedIndex;if(t.value!==void 0)return t.value}return e}function S8(e,t=[]){if(Array.isArray(e))return e.join(", ");if(typeof e=="number"&&Array.isArray(t))return String(t[e]??"");if(typeof e=="string")return e}function up(e,t){if(!(!e||typeof e!="object"))return e[`step-${t}`]}function T8(e,t,r,a){return up(e,t*r+a)}function M8({payload:e,selected:t,choices:r=[],correctAnswers:a=[]}){if(e&&typeof e=="object"){const s=e;if(Array.isArray(s.selectedValues))return a.every(l=>s.selectedValues.includes(l))&&s.selectedValues.every(l=>a.includes(l));if(typeof s.correct=="boolean")return s.correct}if(a.length){if(typeof t=="number"&&Array.isArray(r)&&r.length)return a.some(s=>String(s)===String(r[t]));if(typeof t<"u")return a.some(s=>String(s)===String(t))}}function $8(e){return e?Array.isArray(e.items)?e.items.map(t=>{const r=t;return typeof t=="string"?{sentence:t}:{sentence:r.context||r.sentence||"",contextCode:r.contextCode||r.context_code}}):Array.isArray(e.sentences)?e.sentences.map(t=>{const r=t;return typeof t=="string"?{sentence:t}:{sentence:r.sentence||r.context||"",contextCode:r.contextCode}}):Array.isArray(e.contexts)?e.contexts:e.contextCode?[{contextCode:e.contextCode}]:[]:[]}const cp=o.createContext(null);function L8(){const e=o.useContext(cp);if(!e)throw new Error("useTrainingPagePopupContext must be used inside TrainingPagePopup");return e}function R8({index:e,stepIndex:t,isLast:r=!1,lockedHint:a,title:s,choices:l=[],onDone:i,onChange:u}){const{t:c}=Ne.useTranslation(),p=typeof e=="number"?e:-1,h=typeof t!="number"?"disabled":p<t?"done":p===t?"active":"disabled",[d,m]=o.useState(()=>l.map(()=>null)),C=JSON.stringify(l),x=l.length;o.useEffect(()=>{m(Array.from({length:x},()=>null))},[C]);const g=o.useRef(void 0);o.useEffect(()=>{const b=g.current;typeof b=="number"&&typeof t=="number"&&typeof e=="number"&&b>=e&&t<e&&m(Array.from({length:x},()=>null)),g.current=t},[t,e,x]);const y=o.useMemo(()=>d.filter(b=>b!==null).length+1,[d]),v=o.useCallback(b=>{if(!yr(h))return;const B=d;let N;if(B[b]!=null){const w=B[b];N=B.map(k=>k!==null&&k>=w?null:k)}else N=[...B],N[b]=y;m(N);const f={selectedOrder:N,words:l,__ts:Date.now()};try{typeof u=="function"&&u(f)}catch{}if(B[b]==null&&N.length>0&&N.every(w=>w!==null))try{typeof i=="function"&&i(f)}catch{}},[h,d,y,u,i,l]),_=s??c("training.selectInOrder","\uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uCE74\uB4DC\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return n.jsx(br,{index:e,stepIndex:t,isLast:r,lockedHint:a,title:_,onDone:i,children:n.jsx("div",{className:"training-step__cards",children:l.map((b,B)=>n.jsx(Rs,{item:{word:b},disabled:h==="disabled",selectable:!0,selected:d[B]!==null,orderRank:d[B],onSelect:()=>v(B),flipDelay:B*120,hideLabel:!1,hideAudio:!0},`${b}-${B}`))})})}function ro(e){return null}ro.__isTrainingPage=!0;function Fr(e,t){const r=L8();return{ctx:r,index:e,stepIndex:r.currentStepIndex,isLast:typeof e=="number"&&typeof t=="number"?e===t-1:!1,onDone:a=>r.handleStepDone(a,e),onChange:a=>r.handleStepChange(a,e)}}function dp({_stepIndex:e,_totalSteps:t,...r}){const{index:a,stepIndex:s,isLast:l,onDone:i}=Fr(e,t);return n.jsx(ol,{...r,index:a,stepIndex:s,isLast:l,onDone:i})}function pp({_stepIndex:e,_totalSteps:t,...r}){const{index:a,stepIndex:s,isLast:l,onDone:i,onChange:u}=Fr(e,t);return n.jsx(rl,{...r,index:a,stepIndex:s,isLast:l,onDone:i,onChange:u})}function hp({_stepIndex:e,_totalSteps:t,...r}){const{index:a,stepIndex:s,isLast:l,onDone:i,onChange:u}=Fr(e,t);return n.jsx(al,{...r,index:a,stepIndex:s,isLast:l,onDone:i,onChange:u})}function mp({_stepIndex:e,_totalSteps:t,...r}){const{index:a,stepIndex:s,isLast:l,onDone:i,onChange:u}=Fr(e,t);return n.jsx(sl,{...r,index:a,stepIndex:s,isLast:l,onDone:i,onChange:u})}function fp({_stepIndex:e,_totalSteps:t,...r}){const{index:a,stepIndex:s,isLast:l,onDone:i,onChange:u}=Fr(e,t);return n.jsx(tp,{...r,index:a,stepIndex:s,isLast:l,onDone:i,onChange:u})}function P8({_stepIndex:e,_totalSteps:t,...r}){const{index:a,stepIndex:s,isLast:l,onDone:i,onChange:u}=Fr(e,t);return n.jsx(R8,{...r,index:a,stepIndex:s,isLast:l,onDone:i,onChange:u})}const Cp=3e4,F8=/^(https?:|blob:|data:audio|\/|\.\/)/;function gp(e){return typeof e=="string"&&F8.test(e)?e:null}const I8=e=>typeof e=="string"&&e.trim()!==""?e:null,ul=Symbol("timed-out");function O8(e,t){if(t<=0)return Promise.resolve(ul);let r;return Promise.race([Promise.resolve(e),new Promise(a=>{r=setTimeout(()=>a(ul),t)})]).finally(()=>clearTimeout(r))}function z8(e){return e?qr()||xa()?!0:typeof window<"u"&&!!window.speechSynthesis:!1}function W8(e,t){const r=[],a=gp(t);a&&r.push({kind:"raw",resolve:async()=>a});const s=(e??"").trim();if(!s)return r;for(const[l,i]of[["urlResolver",qr()],["fallbackUrlResolver",xa()]])i&&r.push({kind:l,resolve:async u=>{let c;try{c=await O8(i(s),u)}catch(h){return Tt(`question-sound-threw-${l}`,`[core] configureTTS \uC758 ${l} \uAC00 \uB358\uC84C\uB2E4 \u2014 \uADF8 \uCC28\uB840\uB294 \uAC74\uB108\uB6F4\uB2E4.`,h),null}return c===ul?(Tt(`question-sound-slow-${l}`,`[core] configureTTS \uC758 ${l} \uAC00 ${Cp}ms \uBC14\uD034 \uC548\uC5D0 \uC548 \uD480\uB838\uB2E4 \u2014 \uADF8 \uCC28\uB840\uB97C \uBC84\uB9AC\uACE0 \uB2E4\uC74C\uC73C\uB85C \uAC04\uB2E4. \uC11C\uBC84 \uD569\uC131\uC744 \uAE30\uB2E4\uB9AC\uB294 \uB9AC\uC878\uBC84\uB77C\uBA74 \uC774 \uC790\uB9AC\uAC00 \uAE38\uC5B4\uC9C4\uB2E4. \uC18C\uB9AC\uAC00 \uC544\uC608 \uC548 \uB098\uBA74 \uC5EC\uAE30\uBD80\uD130 \uBCF4\uB77C.`),null):I8(c)||(Tt(`question-sound-empty-${l}`,`[core] configureTTS \uC758 ${l} \uAC00 \uC8FC\uC18C\uB97C \uC548 \uC92C\uB2E4(\uBC1B\uC740 \uAC83: ${JSON.stringify(c)}) \u2014 \uADF8 \uCC28\uB840\uB294 \uAC74\uB108\uB6F4\uB2E4.`),null)}});return r}function H8(){return Date.now()+Cp}const V8=(e,t)=>Math.max(0,e-Date.now())/Math.max(1,t);function q8(e){Tt("question-sound-none",`[core] "${e}" \uC758 \uC18C\uB9AC \uC8FC\uC18C\uB97C \uD55C \uC790\uB9AC\uC5D0\uC11C\uB3C4 \uBABB \uC5BB\uC5C8\uB2E4 \u2014 \uBE0C\uB77C\uC6B0\uC800 \uB0AD\uB3C5\uC73C\uB85C \uAC04\uB2E4. configureTTS \uAC00 \uAC78\uB824 \uC788\uB294\uC9C0, \uB9AC\uC878\uBC84\uAC00 \uC8FC\uC18C\uB97C \uC8FC\uB294\uC9C0 \uC704 \uC904\uB4E4\uC744 \uBCF4\uB77C.`)}function ao(...e){for(const t of e)if(typeof t=="string"){const r=t.trim();if(r.length)return r}else{if(typeof t=="number"||typeof t=="boolean")return String(t);if(Array.isArray(t)&&t.length)return t.join(", ");if(t&&typeof t=="object"){const r=t,a=[r.text,r.label,r.value];for(const s of a){if(typeof s=="string"&&s.trim().length)return s.trim();if(typeof s=="number"||typeof s=="boolean")return String(s)}}}return null}function U8(e){return ao(e?.question,e?.q,e?.sentence,e?.text,e?.prompt,e?.wording)}function G8(e){return gp(ao(e?.questionSound,e?.soundSrc,e?.audioSrc,e?.sound,e?.audio,e?.src))}function bp(e){if(!e)return;if(typeof e.decision=="boolean")return e.decision;if(typeof e.correct=="boolean")return e.correct;if(typeof e.heard=="boolean")return e.heard;if(typeof e.judgement=="boolean")return e.judgement;const t=ao(e?.status,e?.result,e?.judge,e?.note);if(t){const r=t.toLowerCase();if(["ok","true","\uB9DE\uC74C","\uC815\uB2F5"].some(a=>r.includes(a)))return!0;if(["ng","false","\uD2C0\uB9BC","\uC624\uB2F5"].some(a=>r.includes(a)))return!1}}function yp(e){const{score:t,contextsLength:r,results:a=[],subtitle:s,onReplay:l,onClose:i,inline:u=!1,pending:c=!1}=e||{},{t:p}=Ne.useTranslation(),h=o.useId(),d=o.useCallback(()=>!c,[c]);o.useEffect(()=>{const A=r??0;if(t!=null&&A>0&&t/A>.5){const D=window.setTimeout(()=>{window.dispatchEvent(new CustomEvent("party:trigger",{detail:{count:140,strength:1.6,duration:2200}}))},0);return()=>window.clearTimeout(D)}},[t,r]);const m=o.useCallback(A=>{const D=bp(A),j=ao(A?.wording,A?.label);return D===!0?{variant:"main",label:j??p("training.result.heardWell","\uC798 \uB4E4\uC5C8\uC5B4\uC694")}:D===!1?{variant:"danger",label:j??p("training.result.notHeard","\uBABB \uB4E4\uC5C8\uC5B4\uC694")}:{variant:"disabled",label:j??p("training.result.notJudged","\uBBF8\uD310\uC815")}},[p]),C=r??0,x=t??0,g=o.useMemo(()=>Array.isArray(a)?a:[],[a]),y=o.useRef(null),[v,_]=o.useState(null),b=o.useCallback(()=>{y.current?.(),y.current=null,_(null)},[]);o.useEffect(()=>b,[b]);const B=o.useRef(0),N=(A,D)=>{if(!Zn)return;const j=Math.round(performance.now()-B.current);console.debug(`[core][\uB2E4\uC2DC\uB4E3\uAE30] +${j}ms ${A}`,D??"")},f=o.useRef(0),w=o.useCallback((A,D,j)=>{b();const $=++f.current,H=()=>f.current===$;B.current=Zn?performance.now():0,N(`\uB20C\uB800\uB2E4 \u2014 \uC904 ${A}`,{text:D,rawUrl:j}),_(A),y.current=()=>{N("\uBA48\uCD94\uAC1C\uAC00 \uBD88\uB838\uB2E4(\uC8FC\uC18C \uC5BB\uAE30 \uC804)"),f.current++,ko()};const F=z=>{N("\uD2BC\uB2E4",z);const ie=ha(z,te=>{N(`\uB05D\uB0AC\uB2E4 \u2014 ${te?"\uB05D\uAE4C\uC9C0 \uB4E4\uC5C8\uB2E4":"\uBABB \uD2C0\uC5C8\uAC70\uB098 \uBA48\uCDC4\uB2E4"}`,{mine:H()}),te&&H()&&(y.current=null,_(null))});return y.current=()=>{N("\uBA48\uCD94\uAC1C\uAC00 \uBD88\uB838\uB2E4(\uD2B8\uB294 \uC911)"),f.current++,ie.stop(),ko()},ie.done},U=W8(D,j);N("\uCC28\uB840",U.map(z=>z.kind));const T=U[0]?.kind==="raw",I=T?F(j):Promise.resolve(!1);(async()=>{if(await I||!H())return;const z=H8(),ie=T?U.slice(1):U;for(let te=0;te<ie.length;te++){if(!H())return;N(`${ie[te].kind} \uC5D0\uAC8C \uBB3B\uB294\uB2E4`);const P=await ie[te].resolve(V8(z,ie.length-te));if(N(`${ie[te].kind} \uAC00 \uB2F5\uD588\uB2E4`,P),!H()||P&&(await F(P)||!H()))return}H()&&(N("\uC8FC\uC18C\uB97C \uD558\uB098\uB3C4 \uBABB \uC5BB\uC5C8\uB2E4 \u2014 \uB0AD\uB3C5\uC73C\uB85C \uAC04\uB2E4"),q8(D),y.current=()=>{f.current++,ko()},N("\uB0AD\uB3C5\uD55C\uB2E4"),Zg(D,{onEnd:()=>{H()&&(y.current=null,_(null))}}))})()},[b]),k=o.useMemo(()=>g.map(A=>{const D=A??{},j=U8(D)||p("training.result.noContent","(\uB0B4\uC6A9\uC5C6\uC74C)"),{variant:$,label:H}=m(D),F=Array.isArray(D.corrects)?D.corrects:[],U=F.length?F.join(", "):D.answer!=null&&D.answer!==""?String(D.answer):null,T=typeof D.selectedText=="string"?D.selectedText:null,I=bp(D)===!0,z=G8(D),ie=!!z||z8(j);return{problem:j,variant:$,label:H,answer:U,selectedText:T,isCorrect:I,sound:z,canHear:ie}}),[g,m,p]),E=o.useMemo(()=>k.some(A=>A.answer!==null||A.selectedText!==null),[k]);return n.jsx(qn,{onClose:i,closeOnBackdrop:!1,inline:u,ariaLabel:p("training.result.title","\uD6C8\uB828\uC744 \uBAA8\uB450 \uB9C8\uCCE4\uC2B5\uB2C8\uB2E4."),className:"popup--training-result",beforeClose:d,footerClassName:"trp-result__foot",footer:({animateThen:A,closeWithAnimation:D})=>n.jsxs(n.Fragment,{children:[c&&n.jsx("p",{id:h,className:"trp-actions__reason caption-1",role:"status",children:p("training.result.pendingDone","\uACB0\uACFC\uB97C \uACC4\uC0B0\uD558\uB294 \uC911\uC774\uB77C \uC544\uC9C1 \uC644\uB8CC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.")}),n.jsxs("div",{className:"trp-actions",children:[n.jsx(me,{htmlType:"button",size:56,type:"bar",label:p("training.result.replay","\uB2E4\uC2DC\uD558\uAE30"),onClick:()=>A(l)}),n.jsx(me,{htmlType:"button",size:56,type:"bar",label:p("training.result.done","\uC644\uB8CC"),variant:"main",onClick:D,disabled:c,onDisabledClick:c?()=>{}:void 0,"aria-describedby":c?h:void 0})]})]}),children:()=>n.jsxs("div",{className:"trp-result is-on",children:[n.jsxs("header",{className:"trp-result__head",children:[n.jsx("p",{className:"trp-result__eyebrow caption-1",children:p("training.result.eyebrow","\uD6C8\uB828 \uC644\uB8CC")}),n.jsx("h1",{className:"trp-result__title h2",children:p("training.result.title","\uD6C8\uB828\uC744 \uBAA8\uB450 \uB9C8\uCCE4\uC2B5\uB2C8\uB2E4.")}),s&&n.jsx("p",{className:"trp-result__subtitle body-3",children:s}),n.jsx("div",{className:"trp-score",children:n.jsxs("div",{className:"trp-score__figure","aria-label":p("training.result.scoreAria",{correct:x,total:C}),children:[n.jsx("span",{className:"trp-score__big",children:x}),n.jsx("span",{className:"trp-score__sep",children:"/"}),n.jsx("span",{className:"trp-score__total",children:C})]})})]}),k.length>0&&n.jsx("section",{className:"trp-result__body",children:n.jsxs("div",{className:`result-table${E?" result-table--answer":""}`,role:"table","aria-label":p("training.result.tableAriaLabel","\uBB38\uD56D\uBCC4 \uD310\uC815"),children:[n.jsxs("div",{className:"result-table__head caption-1",role:"row",children:[n.jsx("span",{role:"columnheader",children:p("common.col.problem","\uBB38\uC81C")}),E&&n.jsx("span",{role:"columnheader",children:p("training.result.colAnswerSelected","\uC815\uB2F5 \xB7 \uC120\uD0DD")}),n.jsx("span",{className:"col-right",role:"columnheader",children:p("training.result.colJudge","\uD310\uC815")})]}),k.map((A,D)=>n.jsxs("div",{className:"result-table__row",role:"row",children:[n.jsxs("div",{className:"trp-row__problem",children:[n.jsx("span",{className:"trp-row__no caption-1",children:String(D+1).padStart(2,"0")}),n.jsx("div",{className:"trp-row__q body-2",children:A.problem}),A.canHear&&n.jsx(me,{htmlType:"button",size:32,type:"dot",useBorder:!1,icon:v===D?"square":"volume-2",className:"trp-row__replay",ariaLabel:v===D?p("training.result.replaySoundStop",{no:D+1,defaultValue:"{{no}}\uBC88 \uB4E3\uAE30 \uBA48\uCDA4"}):p("training.result.replaySound",{no:D+1,defaultValue:"{{no}}\uBC88 \uB2E4\uC2DC \uB4E3\uAE30"}),onClick:()=>v===D?b():w(D,A.problem,A.sound)})]}),E&&n.jsxs("div",{className:"trp-row__answers",children:[A.answer!==null&&n.jsxs("div",{className:"trp-row__answer-line",children:[n.jsx("span",{className:"trp-row__answer-label answer-correct caption-1",children:p("training.result.colAnswer","\uC815\uB2F5")}),n.jsx("span",{className:"trp-row__answer-value body-2",children:A.answer})]}),n.jsxs("div",{className:"trp-row__answer-line",children:[n.jsx("span",{className:`trp-row__answer-label answer-selected caption-1 ${A.isCorrect?"is-correct":"is-wrong"}`,children:p("training.result.colSelected","\uC120\uD0DD")}),n.jsx("span",{className:`trp-row__answer-value body-2 ${A.isCorrect?"is-correct":"is-wrong"}`,children:A.selectedText??"\u2014"})]})]}),n.jsx("div",{className:"trp-row__judge",children:n.jsx(cn,{variant:A.variant,label:A.label,fill:"soft",minWidth:80})})]},D))]})})]})})}const cl=new Set;function K8(e){o.useEffect(()=>{if(!e||cl.has(e))return;cl.add(e);const t=()=>typeof document>"u"||document.visibilityState!=="hidden";let r=null,a=null,s=0,l=0;const i=()=>{const h=Date.now();r==null&&(r=h),a==null&&(a=h)},u=()=>{a!=null&&(s+=Date.now()-a,a=null)};t()&&i();const c=()=>{if(u(),r==null)return;const h=s-l;if(h<1e3||l===0&&s<5e3)return;const d=Date.now(),m=d-h;l=s,Yb({trainingType:e,startedAt:new Date(m).toISOString(),endedAt:new Date(d).toISOString()})},p=()=>{t()?i():c()};return typeof document<"u"&&document.addEventListener("visibilitychange",p),typeof window<"u"&&window.addEventListener("pagehide",c),()=>{typeof document<"u"&&document.removeEventListener("visibilitychange",p),typeof window<"u"&&window.removeEventListener("pagehide",c),c(),cl.delete(e)}},[e])}function oo(e,t){return e&&e.id||`page-${t??0}`}function so(e,t){return e&&e.key||`step-${t??0}`}function lo(){return{pageIndex:0,stepIndex:0,answersByPage:{}}}function Y8(e,t){return typeof e?.props=="function"?e.props(t)||{}:e?.props||{}}const Z8=300,X8=()=>{try{return typeof window<"u"&&!!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches}catch{return!1}},Yn=Object.freeze({}),vp=new Set(["LISTEN_IN_NOISE","SHORT_STORY","LONG_STORY","ORDERING_SENTENCE"]);function dl(e){const t=e,r=t?.results||t?.answers||[],a=Array.isArray(r)&&r.length>0?r.length:null,s=Array.isArray(r)?r.filter(l=>l?.correct===!0||l?.isCorrect===!0||l?.score===1||l?.heard===!0||l?.judgement===!0).length:null;return{results:r,correct:a!=null?s:null,total:a}}const J8=e=>n.jsx(yp,{score:e.score,contextsLength:e.contextsLength,results:e.results,onReplay:e.onReplay,onClose:e.onClose,pending:e.pending});function Q8(e){const{scenario:t,title:r,subTitle:a,depth:s,icon:l,wrapperStyle:i,iconTooltip:u,pageIndex:c,pageCount:p,stepIndex:h,stepCount:d,onBack:m,onComplete:C,onRoundFinished:x,onNext:g,onSettings:y,useNoiseSetting:v=!0,children:_,ariaLabel:b,label:B,buildResults:N,onResult:f,typeKey:w,entryPoint:k,dailyTotal:E,itemRef:A,renderResultPopup:D,noiseOverride:j,hideNoiseRows:$=!1,inline:H=!1,height:F}=e;K8(w&&!vp.has(w)?w:"");const U=o.useRef(0);o.useEffect(()=>{U.current=Date.now()},[]);const{t:T}=Ne.useTranslation(),I=f,z=!!t,ie=t?.id||null,te=t?.meta||{},P=Array.isArray(t?.pages)?t.pages:[],G=Array.isArray(_)||o.isValidElement(_)&&typeof _!="function"?o.Children.toArray(_).filter(o.isValidElement):[],X=G.length>0,K=pe=>pe===ro||pe?.__isTrainingPage===!0,L=X&&G.some(pe=>K(pe.type)),R=L?G.filter(pe=>K(pe.type)).map((pe,Se)=>{const He=pe.props||{};return{id:`children-page-${Se}`,steps:o.Children.toArray(He.children).filter(o.isValidElement),pageTop:He.pageTop||He.top||null,pageBottom:He.pageBottom||He.bottom||null}}):[{id:"children-page-0",steps:G}],S=X&&!z&&typeof _!="function",V=S?Math.max(1,R.length):0;o.useEffect(()=>{if(!H&&!(typeof document>"u"||!document.body)&&!document.body.classList.contains("ihabdevteam-core-scope"))return document.body.classList.add("ihabdevteam-core-scope"),()=>{document.body.classList.remove("ihabdevteam-core-scope")}},[]),o.useEffect(()=>{if(H||typeof document>"u"||!document.body)return;const pe=document.body;return pe.dataset.ihabTrainingPopupCount=String(Number(pe.dataset.ihabTrainingPopupCount||"0")+1),pe.classList.add("ihab-training-popup-open"),()=>{const Se=Number(pe.dataset.ihabTrainingPopupCount||"1")-1;Se>0?pe.dataset.ihabTrainingPopupCount=String(Se):(delete pe.dataset.ihabTrainingPopupCount,pe.classList.remove("ihab-training-popup-open"))}},[]),o.useEffect(()=>{if(!H&&!(typeof document>"u"||!document.body))return Cc()},[]);const[ae,ne]=o.useState({...gr,enabled:!1}),re=o.useRef(ae);o.useEffect(()=>{re.current=ae},[ae]);const ue=o.useRef(j),Be=o.useRef(!1),le=o.useRef(null);o.useEffect(()=>{let pe=!1;const Se=He=>{if(pe)return;Be.current=!0;const Y=He?Cr({...gr,enabled:!1},He):{...gr},de=le.current;le.current=null;const ke=de?Cr(Y,de):Y;re.current=ke,ne(ke),de&&!ue.current&&zo(ke),Ea(ke);const $e=ue.current;if($e){const Ve=typeof $e=="function"?$e(ke):$e,Ze=Cr(ke,Ve);re.current=Ze,ne(Ze),Ea(Ze)}};return ly().then(He=>{if(pe){const Y=le.current;if(le.current=null,Y&&!ue.current){const de=He?Cr({...gr,enabled:!1},He):{...gr};zo(Cr(de,Y))}return}Se(He)}),()=>{pe=!0}},[]);const[J,O]=o.useState(null),[W,q]=o.useState(null),oe=o.useCallback((pe,Se)=>{pe==="main"?O(Se):q(Se)},[]),ee=o.useRef(null),be=o.useRef(null),je=o.useCallback(()=>{be.current!==null&&(clearTimeout(be.current),be.current=null);const pe=ee.current;ee.current=null,pe&&zo(pe)},[]);o.useEffect(()=>{if(typeof window>"u")return;const pe=()=>{document.visibilityState==="hidden"&&je()};return window.addEventListener("pagehide",je),document.addEventListener("visibilitychange",pe),()=>{window.removeEventListener("pagehide",je),document.removeEventListener("visibilitychange",pe),je()}},[je]);const De=o.useCallback(pe=>{const Se=Cr(re.current,pe);if(re.current=Se,ne(Se),!Be.current){le.current={...le.current??{},...pe},Ea(Se);return}ue.current||(ee.current=Se,be.current!==null&&clearTimeout(be.current),be.current=setTimeout(je,Z8)),Ea(Se)},[je]),we=ae.mainSpeed,ze=ae.mainVolume,ye=o.useCallback(pe=>De({mainSpeed:pe}),[De]),_e=o.useCallback(pe=>De({mainVolume:pe}),[De]),ve=o.useMemo(()=>({settings:ae,setSettings:De,registerAnalyser:oe,mainAnalyser:J,noiseAnalyser:W,playbackRate:we,setPlaybackRate:ye,mainVolume:ze,setMainVolume:_e}),[ae,De,oe,J,W,we,ye,ze,_e]),Ee=o.useRef(null),[Oe,ot]=o.useState(0),it=o.useRef([]),[Fe,Ue]=o.useState("center"),[nt,Te]=o.useState(!1),Xe=o.useRef(!1),rt=o.useRef(null),ut=o.useCallback(pe=>{Xe.current||(Xe.current=!0,Te(!0),rt.current=setTimeout(()=>{try{pe()}catch{Xe.current=!1,Te(!1)}},X8()?0:Nc))},[]);o.useEffect(()=>()=>{rt.current&&clearTimeout(rt.current)},[]);const gt=o.useRef(m);o.useEffect(()=>{gt.current=m});const _t=o.useRef(typeof document>"u"?null:document.activeElement);o.useEffect(()=>{if(H)return;const pe=Ee.current,Se=_t.current;if(Yo(pe,Se),pe){const He=Array.from(pe.querySelectorAll(jn)).filter(Y=>!Y.closest('[aria-hidden="true"]'))[0];if(He)try{He.focus()}catch{}}return()=>{const He=document.activeElement;if(!He||He===document.body||pe&&pe.contains(He))try{Zo(Se)?.focus?.()}catch{}}},[]),o.useEffect(()=>{if(!H)return ir(()=>ut(()=>{const pe=gt.current;typeof pe=="function"&&pe()}))},[ut,H]),Sa(Ee,!H);const[pt,Yt]=o.useState(!1),kt=o.useRef(!1),[ct,Ae]=o.useState(null),st=o.useRef(0),ft=o.useRef(0),Ct=()=>{st.current+=1,ft.current+=1,Ae(null)},[Nt,Ft]=o.useState(""),[yt,vt]=o.useState(()=>lo()),Et=o.useRef(typeof c=="number"?c:null);o.useEffect(()=>{!z&&!S||(vt(lo()),Ct())},[z,ie,S]),o.useEffect(()=>{S&&vt(pe=>{const Se=Math.max(0,Math.min(pe.pageIndex,Math.max(0,V-1)));return Se!==pe.pageIndex?{...pe,pageIndex:Se,stepIndex:0}:pe})},[S,V]);const It=S?Math.max(0,Math.min(yt.pageIndex,V-1)):0,Je=S?R[It]:null,At=S&&Je&&Array.isArray(Je.steps)?Je.steps:[],Qe=z?yt.pageIndex:S?It:typeof c=="number"?c:0,he=z?P[Math.max(0,Math.min(yt.pageIndex,Math.max(0,P.length-1)))]:null,Le=z&&he&&Array.isArray(he.steps)?he.steps:[],Pe=z?Le.length:S?At.length:typeof d=="number"?d:0,We=z||S?Math.max(0,Math.min(yt.stepIndex,Math.max(0,Pe))):typeof h=="number"?h:0,dt=z?P.length:S?V:typeof p=="number"?p:0;o.useEffect(()=>{if(!z&&!S)return;const pe=z?oo(he,Qe):Je?.id||`children-page-${Qe??0}`,Se=new Date().toISOString();for(let He=0;He<=We;He+=1){const Y=z?so(Le[He],He):`step-${He}`,de=xt(pe,Y);Ke.current.has(de)||Ke.current.set(de,Se)}},[z,S,Qe,We,Je?.id]),o.useLayoutEffect(()=>{const pe=Et.current;if(typeof Qe=="number"&&pe!==null&&Qe!==pe&&Qe>pe)try{Ft(T("training.problemNotice",{n:Qe+1}))}catch{}Et.current=typeof Qe=="number"?Qe:Et.current},[Qe,c,T]),o.useLayoutEffect(()=>{const pe=Ee.current;if(!pe)return;const Se=()=>pe.querySelector(".page-popup__scroll");let He=null,Y=null,de=null;const ke=bt=>{const ge=Se();if(!ge)return;const M=ge.scrollHeight<=ge.clientHeight;if(Ue(M?"center":"top"),bt&&!kt.current){kt.current=!0;try{Yt(!0)}catch{}try{Ze.disconnect()}catch{}}},$e=()=>{He!==null&&cancelAnimationFrame(He),He=requestAnimationFrame(()=>{Y!==null&&clearTimeout(Y),Y=setTimeout(()=>ke(!0),60)})},Ve=()=>{de!==null&&cancelAnimationFrame(de),de=requestAnimationFrame(()=>ke(!1))};$e(),window.addEventListener("resize",Ve);const Ze=new MutationObserver($e);Ze.observe(pe,{childList:!0,subtree:!0,attributes:!0});const wt=setTimeout(()=>{kt.current||ke(!0)},400);return()=>{window.removeEventListener("resize",Ve),He!==null&&cancelAnimationFrame(He),Y!==null&&clearTimeout(Y),de!==null&&cancelAnimationFrame(de),clearTimeout(wt);try{Ze.disconnect()}catch{}}},[Ee]);const on=o.useCallback(pe=>{Ee.current&&(Ee.current._childOnNext=pe)},[]),ht=o.useCallback(pe=>{Ee.current&&(Ee.current._childOnResult=pe)},[]),Ke=o.useRef(new Map),xt=(pe,Se)=>`${pe}\0${Se}`,jt=o.useCallback((pe,Se,He)=>{vt(Y=>{const de=Y.answersByPage[pe]||{},ke=de[Se],$e=il(He),Ve=il(ke);if(ke&&Ve>$e)return Y;const Ze=ip(He,Ke.current.get(xt(pe,Se)),$e);return{...Y,answersByPage:{...Y.answersByPage,[pe]:{...de,[Se]:Ze}}}})},[vt]),Q=o.useCallback((pe,Se,He)=>{const Y=oo(he,Qe),de=so(pe,Se);jt(Y,de,He)},[he,Qe,jt]),fe=o.useCallback((pe,Se,He)=>{const Y=oo(he,Qe),de=so(pe,Se);jt(Y,de,He),!He?.allowChange&&pe?.autoAdvance!==!1&&vt(ke=>({...ke,stepIndex:Math.max(ke.stepIndex,Se+1)}))},[he,Qe,jt,vt]),Ge=o.useCallback((pe,Se)=>{const He=Je?.id||`children-page-${Qe??0}`,Y=typeof Se=="number"?Se:We??0,de=`step-${Y}`;jt(He,de,pe),pe?.allowChange||vt(ke=>({...ke,stepIndex:Math.max(ke.stepIndex,Y+1)}))},[Je,Qe,We,jt,vt]),Ye=o.useCallback((pe,Se)=>{const He=Je?.id||`children-page-${Qe??0}`,Y=`step-${typeof Se=="number"?Se:We??0}`;jt(He,Y,pe)},[Je,Qe,We,jt]),at=S?{currentPageIndex:Qe??0,currentStepIndex:We??0,totalStepsInPage:At.length,handleStepDone:Ge,handleStepChange:Ye}:null,mt=async()=>{const pe=typeof t?.buildResults=="function"?await Promise.resolve(t.buildResults({scenario:t,pages:P,flowState:yt,answersByPage:yt.answersByPage})):null;return typeof I=="function"&&await Promise.resolve(I(pe))||pe},Mt=async()=>{const pe=Je?.id||`children-page-${yt.pageIndex}`,Se=yt.answersByPage[pe]||{},He=L?(()=>{const ke={};let $e=0;return R.forEach(Ve=>{const Ze=yt.answersByPage[Ve.id]||{},wt=Array.isArray(Ve.steps)?Ve.steps.length:0;for(let bt=0;bt<wt;bt+=1){const ge=Ze[`step-${bt}`];typeof ge<"u"&&(ke[`step-${$e+bt}`]=ge)}$e+=wt}),ke})():Se;if(typeof N=="function"){const ke=await Promise.resolve(N(He,{pageAnswers:Se,answersByPage:yt.answersByPage,pages:R,currentPageId:pe}));return typeof I=="function"&&await Promise.resolve(I(ke))||ke}const Y=Object.entries(Se).map(([ke,$e],Ve)=>({index:Ve,key:ke,payload:$e})),de={results:Y,answers:Y,score:0};return typeof I=="function"&&await Promise.resolve(I(de))||de},Ot=()=>{const pe=++st.current,Se=()=>pe!==st.current;try{if(typeof document<"u"&&document.body){try{document.dispatchEvent(new CustomEvent("speechear-close-tooltips"))}catch{}document.dispatchEvent(new PointerEvent("pointerdown",{bubbles:!0,cancelable:!0})),document.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0}))}}catch{}if(z){const de=mt();Ae(Yn);const ke=de;Promise.resolve(ke).then($e=>{Se()||Ae($e||{isEmpty:!0})}).catch($e=>{!Se()&&Ae({isEmpty:!0})});return}if(S){const de=Mt();Ae(Yn);const ke=de;Promise.resolve(ke).then($e=>{Se()||Ae($e||{isEmpty:!0})}).catch($e=>{!Se()&&Ae({isEmpty:!0})});return}const He=Ee.current&&Ee.current._childOnResult,Y=de=>{try{return de?de():void 0}catch{return}};if(typeof He=="function"){const de=Y(He);try{typeof document>"u"?require("url").pathToFileURL(__filename).href:On&&On.tagName.toUpperCase()==="SCRIPT"&&On.src||new URL("components.cjs.js",document.baseURI).href}catch{}de&&typeof de.then!="function"?Ae(de):Ae(de&&typeof de.then=="function"?Yn:{});const ke=()=>{Se()||Ae($e=>$e===Yn?{}:$e)};Promise.resolve(de).then($e=>{$e&&!Se()?Ae($e):ke()}).catch($e=>{ke()});return}if(typeof I=="function"){const de=Y(I);try{typeof document>"u"?require("url").pathToFileURL(__filename).href:On&&On.tagName.toUpperCase()==="SCRIPT"&&On.src||new URL("components.cjs.js",document.baseURI).href}catch{}de&&typeof de.then!="function"?Ae(de):Ae(de&&typeof de.then=="function"?Yn:{});const ke=()=>{Se()||Ae($e=>$e===Yn?{}:$e)};Promise.resolve(de).then($e=>{try{typeof document>"u"?require("url").pathToFileURL(__filename).href:On&&On.tagName.toUpperCase()==="SCRIPT"&&On.src||new URL("components.cjs.js",document.baseURI).href}catch{}$e&&!Se()?Ae($e):ke()}).catch($e=>{console.error("viewResults external handler failed",$e),ke()});return}},Tn=()=>{if(z){if(typeof Qe=="number"&&typeof dt=="number"&&Qe<dt-1){vt(Se=>({...Se,pageIndex:Se.pageIndex+1,stepIndex:0}));return}return Ot()}if(S){const Se=At.length;if(typeof We=="number"&&We<Se-1){vt(He=>({...He,stepIndex:He.stepIndex+1}));return}if(typeof Qe=="number"&&typeof dt=="number"&&Qe<dt-1){vt(He=>({...He,pageIndex:He.pageIndex+1,stepIndex:0}));return}return Ot()}if(typeof g=="function"){try{g()}catch{}return}const pe=Ee.current&&Ee.current._childOnNext;if(typeof pe=="function"){try{pe()}catch{}return}},Xt=z?te.title||te.label||b||T("common.popup","\uD31D\uC5C5"):r||B||(Array.isArray(s)?s[s.length-1]:void 0)||b||T("common.popup","\uD31D\uC5C5"),Mn=b||Xt,dn=z?te.title??te.label??Xt:r??B??Xt,Jt=(pe,Se)=>{const He=oo(he,Qe),Y=so(pe,Se),de=yt.answersByPage[He]?.[Y],ke=Y8(pe,{page:he,pageIndex:Qe,step:pe,stepIndex:Se,storedPayload:de,answersByPage:yt.answersByPage,flowState:yt}),$e={key:Y,index:Se,stepIndex:We,isLast:Se===Le.length-1};switch(pe?.type){case"listen":return n.jsx(ol,{...$e,...ke,onDone:Ve=>fe(pe,Se,Ve)});case"confirm":return n.jsx(rl,{...$e,...ke,onDone:Ve=>fe(pe,Se,Ve),onChange:Ve=>Q(pe,Se,Ve)});case"confirmWithText":return n.jsx(al,{...$e,...ke,onDone:Ve=>fe(pe,Se,Ve),onChange:Ve=>Q(pe,Se,Ve)});case"orderList":return n.jsx(sl,{...$e,...ke,onDone:Ve=>fe(pe,Se,Ve),onChange:Ve=>Q(pe,Se,Ve)});default:return null}},en=o.useRef(void 0);o.useEffect(()=>{const pe=en.current;if(en.current=Qe,pe===void 0||pe===Qe||!Ka())return;const Se=Ee.current;if(!Se)return;const He=document.activeElement;if(!(!He||He===document.body||!Se.contains(He)||He.disabled===!0))return;const Y=Se.querySelector(`.training-steps ${jn.split(", ").join(", .training-steps ")}`)??Array.from(Se.querySelectorAll(jn)).find(de=>!de.closest('[aria-hidden="true"]'));try{Y?.focus()}catch{}},[Qe]);const gn=z?P.length>0?n.jsx("div",{className:"training-steps",children:Le.map((pe,Se)=>Jt(pe,Se))},`replay-${Oe}`):n.jsx("div",{className:`page-popup__content page-popup__content--center${e.contentFull?" page-popup__content--full":""}`,children:n.jsx("div",{className:"pp-empty",children:t?.emptyMessage||T("training.noQuestions","\uBB38\uC81C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")})}):null,tn=S?n.jsxs(cp.Provider,{value:at,children:[Je?.pageTop?n.jsx("div",{className:"training-page-top",children:Je.pageTop}):null,n.jsx("div",{className:"training-steps",children:At.map((pe,Se)=>{const He=pe;return o.cloneElement(He,{...He.props,_stepIndex:Se,_totalSteps:At.length,_stepKey:`step-${Se}`,_pageIndex:Qe})})},`replay-${Oe}`),Je?.pageBottom?n.jsx("div",{className:"training-page-bottom",children:Je.pageBottom}):null]}):null,Rt=o.useRef(-1),Dt=o.useCallback(()=>{if(!w)return;const pe=ct,{results:Se,correct:He,total:Y}=dl(ct),de={correct:He,total:Y,attempt:it.current.length+1,previousAttempts:[...it.current]};if(Rt.current===ft.current)return de;Rt.current=ft.current,Zb({items:sy(Se),category:vp.has(w)?"sentence":"word",trainingType:w,entryPoint:k??"sentence",itemRef:A??null,correct:He,total:Y,score:typeof pe?.score=="number"?pe.score:null,durationSeconds:Math.max(0,Math.round((Date.now()-U.current)/1e3)),dailyTotal:E??null});try{x?.(de)}catch{}return de},[w,k,E,A,ct,x]);o.useEffect(()=>{!ct||ct===Yn||ct?.isEmpty||(dl(ct).total??0)>0&&Dt()},[ct,Dt]);const Ut=o.useCallback(()=>{const pe=Dt();Ct(),ut(()=>{typeof C=="function"&&C(pe),typeof m=="function"&&m()})},[C,m,Dt,Ae,ut]),zt=o.useCallback(()=>Ft(""),[Ft]),$n=o.useCallback(()=>{ut(()=>{typeof m=="function"&&m()})},[m,ut]),Ln=n.jsxs("div",{className:`page-popup${nt?" page-popup--closing":""}${H?" page-popup--inline":""}${H&&F!=null?" page-popup--has-height":""}`,role:H?"region":"dialog","aria-modal":H?void 0:"true","aria-label":Mn,style:H&&F!=null?{"--page-popup-inline-height":typeof F=="number"?`${F}px`:F}:void 0,children:[n.jsxs("div",{ref:Ee,className:`page-popup__panel ${pt?"":"page-popup__panel--measuring"} ${Fe==="center"?"page-popup__panel--center":Fe==="top"?"page-popup__panel--top":""}`,children:[n.jsx(op,{title:dn,subtitle:z?te.subtitle||te.label:Array.isArray(s)?s.join(" / "):void 0,desc:z?void 0:a,depth:z?te.depth:s,icon:z?te.icon:l,wrapperStyle:z?te.wrapperStyle:i,iconTooltip:z?te.iconTooltip:u,progressMax:dt,progressIndex:Qe,pageIndex:Qe,pageCount:dt,onBack:H?void 0:$n,onClose:H?void 0:$n}),n.jsx("div",{className:"page-popup__scroll",children:n.jsx("div",{className:`page-popup__content ${Fe==="center"?"page-popup__content--center":"page-popup__content--top"}${e.contentFull?" page-popup__content--full":""}`,children:S?tn:z?gn:typeof _=="function"?_({registerOnNext:on,registerOnResult:ht,panelRef:Ee,setResultOverlay:Ae}):_})}),n.jsx(ap,{onSettings:y,onNext:Tn,onResult:Ot,useNoiseSettingBtn:!!(z?te.useNoiseSetting??!0:v),stepIndex:We,stepCount:Pe,pageIndex:Qe,pageCount:dt,resultOpen:!!(ct&&!ct.isEmpty),hideNoiseRows:$})]}),ct&&!ct.isEmpty&&(D??J8)({score:ct.score,results:ct.results||ct.answers||[],contextsLength:ct.results?ct.results.length:ct.answers?ct.answers.length:0,onReplay:()=>{if(U.current=Date.now(),ct!==Yn){const{correct:pe,total:Se}=dl(ct);it.current.push({correct:pe,total:Se})}if(Ct(),ot(pe=>pe+1),z){if(vt(lo()),typeof t?.onReplay=="function")try{t.onReplay()}catch{}return}if(S){vt(lo());return}try{const pe=Ee.current&&Ee.current._childOnResult;typeof pe=="function"&&pe({replay:!0})}catch{}},onClose:Ut,pending:ct===Yn}),ct?.isEmpty&&n.jsx("div",{className:"page-popup page-popup--result-empty",role:"dialog","aria-modal":"true","aria-label":T("training.result.eyebrow","\uD6C8\uB828 \uC644\uB8CC"),children:n.jsxs("div",{className:"page-popup__panel page-popup__panel--center",children:[n.jsx("div",{className:"page-popup__scroll",children:n.jsx("div",{className:`page-popup__content page-popup__content--center${e.contentFull?" page-popup__content--full":""}`,children:n.jsx("div",{className:"page-popup__empty",children:T("training.result.eyebrow","\uD6C8\uB828 \uC644\uB8CC")})})}),n.jsx("div",{className:"page-popup__bottom",children:n.jsx(me,{htmlType:"button",variant:"main",size:48,onClick:Ut,label:T("training.result.done","\uC644\uB8CC")})})]})}),n.jsx(Mr,{message:Nt,position:"top",onClose:zt})]}),Fn=n.jsx(Xs.Provider,{value:ve,children:Ln});return H?Fn:typeof document<"u"&&document.body?bn.createPortal(Fn,document.body):Fn}const ar=Q8;ar.Page=ro,ar.ListenStep=dp,ar.ConfirmStep=pp,ar.ConfirmWithTextStep=hp,ar.OrderListStep=mp,ar.CardStep=fp,ar.CardOrderStep=P8;function eB(e=[]){const t=o.useRef(null),r=o.useCallback(s=>{const l=getComputedStyle(s),i=l.gridTemplateColumns.split(" ").filter(Boolean),u=parseFloat(i[0]??"0"),c=parseFloat(l.columnGap||"0")||0;if(!u||i.length<2){for(const p of s.children)p.style.gridColumn="";return}for(const p of s.children){const h=p;h.style.gridColumn="",h.removeAttribute("data-wide");const d=h.querySelector("button"),m=d?d.getBoundingClientRect().width:0;if(m<=u+.5)continue;const C=Math.min(i.length,Math.ceil((m+c)/(u+c)));C<=1||(h.style.gridColumn=`span ${C}`,h.setAttribute("data-wide",""))}},[]),a=o.useCallback(()=>{const s=t.current;if(s)for(const l of s.querySelectorAll(".word-search-result-block__items"))r(l)},[r]);return o.useLayoutEffect(()=>{a();const s=t.current;if(!s||typeof ResizeObserver>"u")return;const l=new ResizeObserver(()=>a());return l.observe(s),()=>l.disconnect()},[a,...e]),t}function tB({label:e,homonum:t}){const r=Br()?.(e,t)??"",{imgRef:a,loading:s,hasImage:l,onLoad:i,onError:u}=Ls(r);return l?n.jsxs("div",{className:ce("word-image-tooltip__cell"),children:[s&&n.jsx("div",{className:ce("word-image-tooltip__spinner")}),n.jsx("img",{ref:a,src:r,alt:e,draggable:!1,style:{opacity:s?0:1},onLoad:i,onError:u})]}):n.jsx("div",{className:ce("word-image-tooltip__cell word-image-tooltip__cell--text h3"),children:n.jsx("span",{children:e})})}function xp({words:e,anchorRect:t}){const r=o.useRef(null),[a,s]=o.useState(null);return o.useLayoutEffect(()=>{if(!t||!r.current)return;const{offsetWidth:l,offsetHeight:i}=r.current,u=window.innerWidth,c=window.innerHeight,p=8,h=t.top,d=c-t.bottom,m=h>=i+p*2||h>d,C=(y,v)=>Math.min(Math.max(p,y),Math.max(p,v)),x=C(t.left+t.width/2-l/2,u-l-p),g=C(m?t.top-i-p:t.bottom+p,c-i-p);s({left:x,top:g})},[t]),!t||e.length===0?null:bn.createPortal(n.jsx("div",{ref:r,className:ce("word-image-tooltip"),style:{visibility:a?"visible":"hidden",left:a?.left??0,top:a?.top??-9999},children:n.jsx("div",{className:ce("word-image-tooltip__cells"),children:e.map(l=>n.jsx(tB,{label:l.label,homonum:l.homonum},`${l.label}_${l.homonum??1}`))})}),document.body)}function nB({titleIcon:e,resultCount:t,resultUnit:r,searchQuery:a,items:s,groups:l,selected:i=[],onSelect:u,maxSelect:c,onClearSelection:p,onPrint:h,onPrintEmpty:d,className:m,emptyHint:C,showEmptyText:x=!0,sectionType:g="page",disc:y}){const v=wn()??fn,{t:_,i18n:b}=Ne.useTranslation(),B=b.language?.startsWith("ko")??!1,{anchorRect:N,openAt:f,close:w}=Fa(),[k,E]=o.useState(null),A=o.useCallback(()=>{w(),E(null)},[w]);hv(A,!!k);const D=(a??"").trim(),j=/^[^,[\]\s]+$/.test(D)?D:"",$=j.length>0,H=a===void 0&&t===void 0,F=$?"match":H?"original":"ganada",[U,T]=o.useState(()=>F),[I,z]=o.useState("50"),[ie,te]=o.useState(1),[P,G]=o.useState($);P!==$&&(G($),T(F));const X=U==="match"&&!$||U==="original"&&!H?F:U,K=o.useMemo(()=>[...$?[{value:"match",label:_("wordSearch.sort.match",{defaultValue:"\uC2DC\uC791 \uC6B0\uC120"})}]:[],...H?[{value:"original",label:_("wordSearch.sort.original",{defaultValue:"\uBC1B\uC740 \uC21C\uC11C"})}]:[],{value:"ganada",label:_("wordSearch.sort.ganada",{defaultValue:"\uAC00\uB098\uB2E4\uC21C \u2191"})},{value:"ganada_desc",label:_("wordSearch.sort.ganadaDesc",{defaultValue:"\uAC00\uB098\uB2E4\uC21C \u2193"})},{value:"syllable",label:_("wordSearch.sort.syllable",{defaultValue:"\uC74C\uC808 \uC218 \u2191"})},{value:"syllable_desc",label:_("wordSearch.sort.syllableDesc",{defaultValue:"\uC74C\uC808 \uC218 \u2193"})},{value:"grade",label:_("wordSearch.sort.grade",{defaultValue:"\uB4F1\uAE09\uC21C \u2191"})},{value:"grade_desc",label:_("wordSearch.sort.gradeDesc",{defaultValue:"\uB4F1\uAE09\uC21C \u2193"})}],[_,$,H]),L=o.useMemo(()=>["10","25","50","100"].map(ye=>({value:ye,label:_("wordSearch.pageSize",{count:Number(ye),defaultValue:`${ye}\uAC1C\uC529 \uBCF4\uAE30`})})),[_]),R=ye=>ye.words?.[0],S=o.useMemo(()=>{const ye=[...j].length,_e=Eb(j),ve=new Map;return Ee=>{let Oe=ve.get(Ee);return Oe===void 0&&(Oe=_e((Ee.words?.[0]?.label??"").slice(0,ye))?0:1,ve.set(Ee,Oe)),Oe}},[j]),V=o.useCallback((ye,_e)=>{const ve=ot=>R(ot)?.label??"",Ee=ot=>R(ot)?.syllables??[...ve(ot)].length,Oe=ot=>(ot.words??[]).reduce((it,Fe)=>{const Ue=parseInt(Fe.grade??"",10);return Number.isFinite(Ue)&&Ue<it?Ue:it},999);switch(X){case"match":return S(ye)-S(_e)||xn(ve(ye),ve(_e));case"ganada":return xn(ve(ye),ve(_e));case"ganada_desc":return xn(ve(_e),ve(ye));case"syllable":return Ee(ye)-Ee(_e)||xn(ve(ye),ve(_e));case"syllable_desc":return Ee(_e)-Ee(ye)||xn(ve(ye),ve(_e));case"grade":return Oe(ye)-Oe(_e)||xn(ve(ye),ve(_e));case"grade_desc":return Oe(_e)-Oe(ye)||xn(ve(ye),ve(_e));default:return 0}},[X,S]),ae=o.useMemo(()=>s.slice().sort(V),[s,V]),ne=Number(I)||10,re=o.useMemo(()=>(l??[]).flatMap(ye=>ye.items.slice().sort(V).map(_e=>({item:_e,label:ye.label}))),[l,V]),ue=l?re.length:ae.length,Be=Math.max(1,Math.ceil(ue/ne)),le=Math.min(ie,Be),J=o.useMemo(()=>ae.slice((le-1)*ne,le*ne),[ae,le,ne]),O=o.useId(),W=o.useMemo(()=>{if(!l)return null;const ye=re.slice((le-1)*ne,le*ne),_e=new Map;for(const{item:ve,label:Ee}of ye)_e.has(Ee)||_e.set(Ee,[]),_e.get(Ee).push(ve);return[..._e.entries()].map(([ve,Ee])=>({label:ve,items:Ee}))},[l,re,le,ne]);o.useEffect(()=>{te(1)},[U,I,ue,a]);const q=ue>0?n.jsxs("div",{className:"word-search-result-block__toolbar",children:[n.jsx(An,{size:v,options:K,value:X,onChange:T,ariaLabel:_("wordSearch.sort.aria",{defaultValue:"\uC815\uB82C"})}),n.jsx(An,{size:v,options:L,value:I,onChange:z,ariaLabel:_("wordSearch.pageSizeAria",{defaultValue:"\uD398\uC774\uC9C0 \uD06C\uAE30"})}),n.jsx(_s,{page:le,totalPages:Be,onChange:te})]}):void 0,oe=ye=>{u&&u(ye)},ee=t!==void 0&&r?n.jsxs(n.Fragment,{children:[_("wordSearch.resultTitlePrefix","\uCD1D "),n.jsx("span",{style:{color:"var(--color-main)"},children:t}),_("wordSearch.resultTitleSuffix",{unit:B?Ib(r):r})]}):void 0,be=t!==void 0&&t>0&&c!==void 0&&r?_("wordSearch.resultDisc",{unit:B?zb(r):r,max:c,selected:i.length}):void 0,je=y??be,De=l?l.length===0:s.length===0,we=eB([l,J,U,ne,ie]),ze=De&&!x&&!C;return n.jsxs($r,{type:g,className:xe("word-search-result-block",m),children:[n.jsxs("div",{ref:we,className:xe("word-search-result-block__inner",ze&&"word-search-result-block__inner--head-only"),children:[(ee||q||je)&&n.jsxs("div",{className:"word-search-result-block__head",children:[n.jsxs("div",{className:"word-search-result-block__head-main",children:[e&&n.jsx(lt,{icon:e,className:"word-search-result-block__head-icon"}),ee&&n.jsx("span",{className:"word-search-result-block__title h3",children:ee})]}),q&&n.jsx("div",{className:"word-search-result-block__head-actions",children:q}),je&&n.jsx("div",{className:"word-search-result-block__head-disc body-3",children:je})]}),De&&(x||C)&&n.jsxs("div",{className:"word-search-result-block__empty-wrap",children:[x&&n.jsx("p",{className:"word-search-result-block__empty body-3",children:_("wordSearch.emptyResult","\uAC80\uC0C9 \uACB0\uACFC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}),C&&n.jsx("p",{className:"word-search-result-block__empty-hint body-3",children:C})]}),l?(W??[]).map(ye=>n.jsxs("div",{className:"word-search-result-block__group",role:"group","aria-labelledby":`${O}-${ye.label}`,children:[n.jsx("div",{className:"word-search-result-block__group-label caption-1b",id:`${O}-${ye.label}`,children:ye.label}),n.jsx("div",{className:"word-search-result-block__items",children:ye.items.map(_e=>{const ve=i.includes(_e.id);return n.jsx("div",{onMouseEnter:Ee=>{f(Ee.currentTarget),E(_e.words??[])},onMouseLeave:A,children:n.jsx(me,{htmlType:"button",size:"word",align:"grid",label:(_e.words??[]).map(Ee=>Ee.label),subLabel:(_e.words??[]).some(Ee=>Ee.subLabel)?(_e.words??[]).map(Ee=>Ee.subLabel):void 0,selected:ve,onClick:()=>oe(_e.id),minWidth:200})},_e.id)})})]},ye.label)):n.jsx("div",{className:"word-search-result-block__items",children:J.map(ye=>{const _e=i.includes(ye.id);return n.jsx("div",{onMouseEnter:ve=>{f(ve.currentTarget),E(ye.words??[])},onMouseLeave:A,children:n.jsx(me,{htmlType:"button",size:"word",align:"grid",label:(ye.words??[]).map(ve=>ve.label),subLabel:(ye.words??[]).some(ve=>ve.subLabel)?(ye.words??[]).map(ve=>ve.subLabel):void 0,selected:_e,onClick:()=>oe(ye.id),minWidth:200})},ye.id)})}),k&&N&&n.jsx(xp,{words:k,anchorRect:N})]}),(p||h)&&n.jsxs("div",{className:"word-search-result-block__actions",children:[p&&n.jsx(me,{htmlType:"button",size:"56",type:"bar",label:_("common.resetSelection","\uC120\uD0DD \uCD08\uAE30\uD654"),selected:!1,disabled:i.length===0,onClick:i.length===0?void 0:p}),h&&n.jsx("div",{onClick:i.length===0?d:void 0,children:n.jsx(me,{htmlType:"button",size:"56",type:"bar",variant:"main",label:_("wordTable.title","\uB2E8\uC5B4 \uD45C \uB9CC\uB4E4\uAE30"),disabled:i.length===0,onClick:i.length===0?void 0:h})})]})]})}function rB(e,t){return t.map(r=>{const a=typeof r=="string"?r:r.label,s=typeof r=="string"?void 0:r.displayLabel;return{label:a,value:e[a]??"",displayLabel:s}})}function aB({sections:e,selectedList:t,count:r,onCountChange:a,maxCount:s=4,minCount:l=1,combinationSections:i,combinationSectionsForSlot:u,onSelect:c,placeholder:p="-",className:h,title:d,titleIcon:m,disc:C,showInfoButton:x=!0,onClearPhoneme:g,onSearch:y,onSearchEmpty:v,searchDisabled:_=!1,searchLabel:b,searchChecking:B=!1,pairMode:N=!1,sectionType:f="page",beforeSearchContent:w,beforeContent:k,afterContent:E,hideCountControl:A=!1,ordinal:D=!1}){const{t:j}=Ne.useTranslation(),$=o.useMemo(()=>j("wordPairs.infoNotes",{returnObjects:!0}),[j]),H=o.useMemo(()=>Array.from({length:s-l+1},(L,R)=>{const S=l+R;return{key:String(S),label:j("wordPairs.count",{n:S})}}),[j,s,l]),F=o.useMemo(()=>j("wordPairs.ordinals",{returnObjects:!0}),[j]),U=o.useCallback(L=>D?j("wordPairs.phonemeOrdinalLabel",{ordinal:F[L-1]??L}):r===1?j("wordPairs.phonemeSingleLabel","\uC74C\uC808"):j("wordPairs.phonemeN",{n:L}),[D,F,r,j]),T=o.useCallback(L=>D?j("wordPairs.phonemeContrastOrdinalLabel",{ordinal:F[L-1]??L}):r===1?j("wordPairs.phonemeContrastSingleLabel","\uB300\uB9BD \uC74C\uC808"):j("wordPairs.phonemeContrast",{n:L}),[D,F,r,j]),I=o.useCallback((L,R)=>R?n.jsxs(n.Fragment,{children:[L,n.jsx("span",{className:"phoneme-select-block__required",children:"*"})]}):L,[]),{anchorRect:z,toggleAt:ie,close:te}=Fa(),P=o.useCallback(L=>a(Number(L)),[a]),G=Bn("(max-width: 767px)"),X=o.useCallback(L=>rB(L,e).map(({label:R,value:S,displayLabel:V})=>{const ae=!!S&&S!=="\uC5C6\uC74C";return n.jsxs("span",{className:xe("phoneme-select-block__cell-jamo-part",S?"":"phoneme-select-block__cell-jamo-part--empty",ae?"":"phoneme-select-block__cell-jamo-part--no-label"),children:[n.jsx("span",{className:`phoneme-select-block__cell-jamo-char h1${S==="\uC5C6\uC74C"?" phoneme-select-block__cell-jamo-char--excluded":""}`,children:S==="\uC5C6\uC74C"?"x":S||p}),ae&&n.jsx("span",{className:"phoneme-select-block__cell-jamo-label caption-2",children:V??R})]},R)}),[e,p]),K=n.jsxs(n.Fragment,{children:[n.jsx("div",{"data-tooltip-ignore":!0,children:n.jsx(me,{htmlType:"button",size:40,type:G?"dot":void 0,icon:"info",label:G?void 0:j("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),ariaLabel:j("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),className:z?"is-selected":void 0,"aria-expanded":!!z,"aria-haspopup":"dialog",onClick:L=>ie(L.currentTarget)})}),z&&n.jsx(er,{title:j("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),items:$,anchorRect:z,onClose:te})]});return n.jsxs($r,{type:f,title:d,icon:m,disc:C,action:x?K:void 0,className:xe("phoneme-select-block",h),children:[k,!A&&n.jsx("div",{className:"phoneme-select-block__controls",children:n.jsx(kn,{options:H,value:String(r),onChange:P,size:40,ariaLabel:j("wordPairs.countLabel","\uC74C\uC18C \uAC1C\uC218"),className:"phoneme-select-block__count-control"})}),n.jsx("div",{className:"phoneme-select-block__cells",children:N?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"phoneme-select-block__cell-group",children:Array.from({length:r}).map((L,R)=>{const S=t[R*2]??{};return n.jsxs("div",{className:"phoneme-select-block__cell",children:[n.jsx("div",{className:"phoneme-select-block__cell-circle",children:n.jsx("div",{className:"phoneme-select-block__cell-jamo",children:X(S)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:U(R+1)})]},R)})}),n.jsx("span",{className:"phoneme-select-block__cell-vs h3",children:j("wordPairs.phonemeSelect.vs","\uB300")}),n.jsx("div",{className:"phoneme-select-block__cell-group",children:Array.from({length:r}).map((L,R)=>{const S=t[R*2+1]??{};return n.jsxs("div",{className:"phoneme-select-block__cell",children:[n.jsx("div",{className:"phoneme-select-block__cell-circle",children:n.jsx("div",{className:"phoneme-select-block__cell-jamo",children:X(S)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:T(R+1)})]},R)})})]}):t.map((L,R)=>n.jsxs("div",{className:"phoneme-select-block__cell",children:[n.jsx("div",{className:"phoneme-select-block__cell-circle",children:n.jsx("div",{className:"phoneme-select-block__cell-jamo",children:X(L)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:U(R+1)})]},R))}),(i||u)&&n.jsx("div",{className:"phoneme-select-block__panels",children:n.jsx("div",{className:"phoneme-select-block__detail",children:N?n.jsxs("div",{className:"phoneme-select-block__pair-panels",children:[n.jsx("div",{className:"phoneme-select-block__panel-group",children:Array.from({length:r}).map((L,R)=>{const S=t[R*2]??{};return n.jsx(Kn,{title:I(U(R+1),R===0),sections:u?u(S,R*2):i,selected:S,onSelect:c?.(R*2),align:"newline"},R)})}),n.jsx("div",{className:"phoneme-select-block__panel-group",children:Array.from({length:r}).map((L,R)=>{const S=t[R*2+1]??{};return n.jsx(Kn,{title:T(R+1),sections:u?u(S,R*2+1):i,selected:S,onSelect:c?.(R*2+1),align:"newline"},R)})})]}):t.map((L,R)=>n.jsx(Kn,{title:I(U(R+1),R===0),sections:u?u(L,R):i,selected:L,onSelect:c?.(R),align:"newline"},R))})}),w&&n.jsx("div",{className:"phoneme-select-block__before-search",children:w}),(g||y||B)&&(()=>{const L=t.every(R=>{const S=Bb(R);return Object.entries(S).every(([V,ae])=>!ae||V==="coda"&&ae===bi)});return n.jsxs("div",{className:"phoneme-select-block__search-row",onClick:L?v:void 0,children:[g&&n.jsx(me,{htmlType:"button",size:"56",type:"bar",label:j("wordPairs.resetOptions","\uAC80\uC0C9 \uC635\uC158 \uCD08\uAE30\uD654"),selected:!1,disabled:L,onClick:L?void 0:g}),y?n.jsx(me,{htmlType:"button",size:"56",type:"bar",variant:"main",icon:B?n.jsx("span",{className:"phoneme-select-block__spinner","aria-hidden":"true"}):void 0,label:b??j("wordSearch.searchButton","\uAC80\uC0C9\uD558\uAE30"),disabled:L||_||B,onDisabledClick:B?()=>{}:void 0,"aria-busy":B||void 0,onClick:y}):B?n.jsxs("div",{className:"phoneme-select-block__checking","aria-busy":"true",children:[n.jsx("div",{className:"phoneme-select-block__spinner"}),n.jsx("span",{className:"button-1 phoneme-select-block__checking-label",children:b??j("wordSearch.searchButton","\uAC80\uC0C9\uD558\uAE30")})]}):null]})})(),E]})}function oB({title:e,sections:t,selected:r,onSelect:a,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c,headerAction:p,className:h}){const{t:d}=Ne.useTranslation();return n.jsx(Kn,{className:h,title:e??d("wordSearch.filterTitle","\uB2E8\uC5B4 \uAC80\uC0C9 \uC124\uC815"),sections:t,selected:r,onSelect:a,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c,headerAction:p,align:"inline"})}function sB({title:e,headerAction:t,sections:r,selected:a,onSelect:s,className:l}){const{t:i}=Ne.useTranslation();return r.length===0?null:n.jsx(Kn,{className:l,title:e??i("training.filter.phonemeGroup",{defaultValue:"\uD6C8\uB828 \uC74C\uC808"}),headerAction:t,sections:r,selected:a,onSelect:s,align:"newline"})}function lB({title:e,mode:t,onModeChange:r,matchMode:a,onMatchModeChange:s,positionCount:l,onPositionCountChange:i,inputMode:u,onInputModeChange:c,className:p}){const{t:h}=Ne.useTranslation(),d={searchMode:h("wordPairs.filter.searchModeLabel","\uB300\uB9BD \uBC29\uC2DD"),phonemeOrder:h("wordPairs.filter.phonemeOrder","\uC785\uB825 \uC74C\uC808 \uC704\uCE58"),count:h("wordPairs.filter.countLabel","\uC785\uB825 \uC74C\uC808 \uAC2F\uC218"),inputMode:h("wordPairs.filter.inputModeLabel","\uC785\uB825 \uBC29\uC2DD"),orderAny:h("wordPairs.filter.orderAny","\uBB34\uAD00"),orderMatch:h("wordPairs.filter.orderMatch","\uC77C\uCE58"),include:h("wordPairs.mode.include","\uC74C\uC18C \uD3EC\uD568"),pick:h("wordPairs.mode.pick","\uC74C\uC18C \uB300\uB9BD"),explicit:h("wordPairs.mode.contrast","\uC74C\uC18C \uB300\uB9BD \uC9C0\uC815"),charInput:h("wordPairs.input.char","\uAE00\uC790 \uC120\uD0DD"),pronInput:h("wordPairs.input.pron","\uBC1C\uC74C \uC120\uD0DD")},m=y=>h("wordPairs.count",{n:y}),C=[{label:d.searchMode,items:[d.include,d.pick,d.explicit],display:"segmented",labelAction:n.jsx(sa,{title:h("wordPairs.mode.infoTitle","\uB300\uB9BD \uBC29\uC2DD"),items:[h("wordPairs.mode.infoInclude","\uC74C\uC18C \uD3EC\uD568 \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uAC00 \uBAA8\uB450 \uB4E4\uC5B4\uAC04 \uB2E8\uC5B4\uC640 \uADF8 \uB300\uB9BD\uC30D\uC744 \uCC3E\uC544\uC694."),h("wordPairs.mode.infoPick","\uC74C\uC18C \uB300\uB9BD \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uAC00 \uB300\uB9BD\uC30D \uB450 \uB2E8\uC5B4\uC758 \uC2E4\uC81C \uCC28\uC774\uC810\uC77C \uB54C\uB9CC \uB9E4\uCE6D\uB3FC\uC694."),h("wordPairs.mode.infoContrast","\uC74C\uC18C \uB300\uB9BD \uC9C0\uC815 \u2014 \uAE30\uC900 \uB2E8\uC5B4\uC640 \uB300\uB9BD \uB2E8\uC5B4\uC758 \uC74C\uC18C\uB97C \uAC01\uAC01 \uC9C1\uC811 \uC120\uD0DD\uD574 \uB300\uB9BD\uC30D\uC744 \uCC3E\uC544\uC694.")]})},{label:d.phonemeOrder,items:[d.orderAny,d.orderMatch],display:"segmented",labelAction:n.jsx(sa,{items:h("wordPairs.filter.phonemeOrderInfo",{returnObjects:!0})})},{label:d.count,items:[m(1),m(2)],display:"segmented"},{label:d.inputMode,items:[d.charInput,d.pronInput],display:"segmented",labelAction:n.jsx(sa,{title:h("wordPairs.input.infoTitle","\uC785\uB825 \uBC29\uC2DD"),items:[h("wordPairs.input.infoChar","\uAE00\uC790 \uC120\uD0DD \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uB85C \uB2E8\uC5B4(\uAE00\uC790 \uAE30\uC900)\uB97C \uCC3E\uC740 \uD6C4, \uB2E8\uC5B4\uC758 \uD45C\uC900 \uBC1C\uC74C \uB300\uB9BD\uC30D\uC744 \uCC3E\uC2B5\uB2C8\uB2E4."),h("wordPairs.input.infoPron","\uBC1C\uC74C \uC120\uD0DD \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uB85C \uD45C\uC900 \uBC1C\uC74C \uB300\uB9BD\uC30D\uC744 \uCC3E\uC2B5\uB2C8\uB2E4.")]})}],x={[d.searchMode]:t==="explicit"?d.explicit:t==="pick"?d.pick:d.include,[d.phonemeOrder]:a==="ordered"?d.orderMatch:d.orderAny,[d.count]:m(l),[d.inputMode]:u==="phoneme"?d.pronInput:d.charInput},g=(y,v)=>{v===d.searchMode?r(y===d.explicit?"explicit":y===d.pick?"pick":"include"):v===d.phonemeOrder?s(y===d.orderMatch?"ordered":"unordered"):v===d.count?i(y===m(2)?2:1):v===d.inputMode&&c(y===d.pronInput?"phoneme":"word")};return n.jsx(Kn,{className:p,title:e??h("wordPairs.filter.searchOptionsTitle","\uB300\uB9BD \uC124\uC815"),sections:C,selected:x,onSelect:g,align:"inline"})}function iB(e){const{title:t,items:r,columns:a,resizeStorageKey:s,gridTemplateColumns:l,mobileGridTemplateColumns:i,searchPlaceholder:u,searchFn:c,defaultSortKey:p,defaultSortAsc:h=!0,selectedId:d,selectedIds:m,onSelect:C,onClose:x,pageSizeOptions:g=[10,25,50,100],initialPageSize:y,emptyText:v,noMatchText:_,countLabel:b,topContent:B,className:N=""}=e,{t:f}=Ne.useTranslation(),w=u??f("common.search","\uAC80\uC0C9"),k=v??f("common.emptyList","\uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."),E=_??f("common.noMatches","\uB9DE\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"),[A,D]=o.useState(""),[j,$]=o.useState(p??a[0]?.key??""),[H,F]=o.useState(h),[U,T]=o.useState(String(y??g[0]??10)),[I,z]=o.useState(1);o.useEffect(()=>{z(1)},[A,U]);const ie=c!==null,te=o.useCallback((ne,re)=>{if(!re)return!0;const ue=re.toLowerCase();return a.some(Be=>{const le=ne[Be.key];return le==null?!1:String(le).toLowerCase().includes(ue)})},[a]),P=c??te,G=o.useMemo(()=>{const ne=ie?r.filter(re=>P(re,A)):r;return j?[...ne].sort((re,ue)=>{const Be=re[j],le=ue[j];return Be===le?0:Pa(Be,le,H)}):ne},[r,A,j,H,ie,P]),X=Math.max(1,Math.ceil(G.length/Number(U)));I>X&&z(X);const K=Math.min(I,X),L=G.slice((K-1)*Number(U),K*Number(U)),R=o.useCallback(ne=>{j===ne?F(re=>!re):($(ne),F(!0)),z(1)},[j]),S=o.useMemo(()=>{if(typeof b=="function"){const ne=G.length,re=b(ne);if(typeof re=="string"){const ue=re.lastIndexOf(String(ne));if(ue>=0)return{prefix:re.slice(0,ue),suffix:re.slice(ue+String(ne).length)}}return{label:re}}if(typeof b=="string"&&b.includes("{n}")){const[ne,re]=b.split("{n}");return{prefix:ne,suffix:re}}return{prefix:f("common.totalCountPrefix","\uCD1D "),suffix:f("common.totalCountSuffix","\uAC1C")}},[b,G.length,f]),V=o.useMemo(()=>a.map(ne=>({label:ne.label,onClick:ne.sortable!==!1?()=>R(ne.key):void 0,className:ne.className,sortDir:ne.sortable!==!1&&j===ne.key?H?"asc":"desc":null})),[a,j,H,R]),ae=Av(g);return n.jsxs(qn,{className:`popup-list ${N}`,title:t,onClose:x,children:[B,"label"in S&&n.jsx("p",{className:"toolbar__count body-1",children:S.label}),n.jsx(ws,{count:"label"in S?void 0:{value:G.length,prefix:S.prefix,suffix:S.suffix},search:ie?{value:A,onChange:D,placeholder:w}:void 0,pageSize:{options:ae,value:U,onChange:T},pagination:{page:K,total:X,onChange:z}}),n.jsx(Ms,{gridTemplateColumns:l,mobileGridTemplateColumns:i,resizable:!0,resizeStorageKey:s,fields:V,items:L,onRowClick:C,renderRow:ne=>{const re=m!=null?ne.id!=null&&m.has(ne.id):d!=null&&ne.id===d;return a.map(ue=>({content:ue.render?ue.render(ne):ne[ue.key]??"",className:xe(ue.className,re&&"popup-list__row--selected")}))},empty:ie&&A!==""&&r.length>0?E:k})]})}function _p(e,t,r={}){const{t:a}=Ne.useTranslation(),[s,l]=o.useState(!1),i=o.useRef(!1),u=o.useCallback(()=>{i.current=!0},[]),c=o.useCallback(()=>i.current?(i.current=!1,!0):e?(l(!0),!1):!0,[e]),p=s?n.jsx(fs,{title:r.title??a("common.discardConfirm.title","\uC785\uB825\uC744 \uCDE8\uC18C\uD560\uAE4C\uC694?"),message:r.message??a("common.discardConfirm.body","\uC800\uC7A5\uD558\uC9C0 \uC54A\uC73C\uBA74 \uC9C0\uAE08\uAE4C\uC9C0 \uC785\uB825\uD55C \uB0B4\uC6A9\uC774 \uC0AC\uB77C\uC9D1\uB2C8\uB2E4."),confirmLabel:r.confirmLabel??a("common.discardConfirm.confirm","\uC785\uB825 \uCDE8\uC18C"),confirmVariant:"danger",onConfirm:()=>{l(!1),t()},onClose:()=>l(!1)}):null;return{beforeClose:c,discardPopup:p,allowClose:u}}function uB(e,t,r={}){const a=JSON.stringify(e),[s,l]=o.useState(a),i=a!==s,u=_p(i,t,r),c=o.useRef(a);c.current=a;const p=o.useCallback(()=>l(c.current),[]);return{...u,isDirty:i,rebase:p}}function cB({onApply:e,onCancel:t}){const{t:r}=Ne.useTranslation(),[a,s]=o.useState(""),[l,i]=o.useState(!1),[u,c]=o.useState(null),p=o.useRef(null),h=o.useId();o.useEffect(()=>{p.current?.focus()},[]);const d=o.useCallback(async x=>{const g=a.trim();if(g){i(!0),c(null);try{await e(g),x()}catch(y){c($o(y)),i(!1),requestAnimationFrame(()=>p.current?.focus())}}},[a,e]),m=o.useCallback((x,g)=>{x.key==="Enter"&&!x.nativeEvent.isComposing&&d(g)},[d]),C=x=>{s(x.target.value),c(null)};return n.jsx(qn,{className:"coupon-input-popup",title:r("usage.couponButton","\uCFE0\uD3F0 \uC785\uB825"),size:"small",onClose:t,closeDisabled:l,buttons:[{label:r("common.cancel","\uCDE8\uC18C"),variant:"default",disabled:l,onClick:({closeWithAnimation:x})=>x()},{label:r("coupons.applyButton","\uC801\uC6A9"),variant:"main",disabled:!a.trim()||l,onClick:({closeWithAnimation:x})=>{d(x)}}],children:({closeWithAnimation:x})=>n.jsxs(n.Fragment,{children:[n.jsx("input",{ref:p,className:"coupon-input-popup__input body-2","aria-label":r("coupons.input.label","\uCFE0\uD3F0 \uCF54\uB4DC"),"aria-invalid":u?!0:void 0,"aria-errormessage":u?h:void 0,"aria-describedby":u?h:void 0,placeholder:r("coupons.input.placeholder","\uCFE0\uD3F0 \uCF54\uB4DC \uC785\uB825"),value:a,onChange:C,onKeyDown:g=>m(g,x),disabled:l,autoComplete:"off",spellCheck:!1}),u&&n.jsx("p",{id:h,className:"coupon-input-popup__error caption-1",role:"alert",children:u})]})})}const wp=["var(--color-main)","var(--color-sub)"],dB=2e3;function pB(e,t){if(!t.startsWith("var("))return t;try{const r=t.slice(4,-1).trim();return getComputedStyle(e).getPropertyValue(r).trim()||null}catch{return null}}function pl({active:e=!1,count:t=40,duration:r=2e3,strength:a=1,onComplete:s,trigger:l=0}){const i=o.useMemo(()=>{const g=Math.floor(t/2),y=t-g,v=(_,b)=>Array.from({length:_}).map((B,N)=>{const f=6+Math.random()*12,w=Math.round(Math.min(18,f*Math.min(1.5,1+a*.4))),k=wp[Math.floor(Math.random()*wp.length)],E=Math.random()*300,A=(360+Math.random()*260)*a*1.2,D=(b==="left"?-95+Math.random()*40:-85-Math.random()*40)*Math.PI/180,j=Math.cos(D)*A,$=Math.sin(D)*A*1.35,H=Math.random()*720-360,F=(1200+Math.random()*3e3)*Math.min(1.6,1+a*.3),U=Math.random()>.7?"50%":"3px";return{id:`${b}-${N}`,side:b,size:w,color:k,delay:E,vx:j,vy:$,angularVel:H,life:F,borderRadius:U}});return[...v(g,"left"),...v(y,"right")]},[t,a]),u=o.useRef(null),c=o.useRef({}),p=o.useRef(null),h=o.useRef(s);o.useEffect(()=>{h.current=s},[s]);const d=o.useRef(null),m=o.useRef(null),C=()=>{if(typeof document>"u")return null;let g=document.querySelector("[data-ihab-effect-root]");return g||(g=document.createElement("div"),g.className="app-effect",g.dataset.ihabEffectRoot="",g.style.position="fixed",g.style.inset="0",g.style.pointerEvents="none",g.style.zIndex="99998",document.body.appendChild(g)),g};if(typeof document<"u"&&m.current==null&&(m.current=C()),o.useEffect(()=>{if(!e)return;if(typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches){const te=setTimeout(()=>h.current?.(),0);return()=>clearTimeout(te)}const g=1200,y=performance.now(),v=m.current&&m.current!==document.body?m.current.getBoundingClientRect():null,_=Math.max(60,(window.innerHeight||800)*.05),b=te=>Math.max(40,(te||window.innerWidth)*.02),B=v?.width||window.innerWidth||375,N=v?.height||window.innerHeight||812,f=te=>{const P=[...te].sort((G,X)=>G-X);return P[Math.floor(P.length/2)]||1},w=f(i.map(te=>Math.abs(te.vy))),k=f(i.map(te=>Math.abs(te.vx))),E=Math.sqrt(2*g*(N*.72+_))/w,A=w*E/g,D=B*.5/(k*A),j=(te,P,G)=>Math.min(G,Math.max(P,te)),$=j(E,.8,2.4),H=j(D,.7,2.2),F=r>0?r/dB:1,U=i.map(te=>({...te,life:te.life*F,vx:te.vx*H,vy:te.vy*$,startTime:y+te.delay,ended:!1})),T=v?{x:v.left-b(v.width),y:v.top+v.height+_}:{x:-b(window.innerWidth),y:window.innerHeight+_},I=v?{x:v.left+v.width+b(v.width),y:v.top+v.height+_}:{x:window.innerWidth+b(window.innerWidth),y:window.innerHeight+_},z=te=>{let P=!1;for(const G of U){const X=c.current[G.id];if(!X||!X)continue;if(te<G.startTime){X.style.display="none",P=!0;continue}if(!G._inited){const Be=G.side==="left"?T.x:I.x,le=G.side==="left"?T.y:I.y;X.style.left=`${Be}px`,X.style.top=`${le}px`,X.style.transform="translate3d(0px, 0px, 0)",X.style.display="block",X.style.zIndex="100000",typeof G.color=="string"&&G.color.startsWith("var(")&&(X.style.background=pB(X,G.color)??"#FF0060"),G._inited=!0}const K=(te-G.startTime)/1e3;if(K<0)continue;const L=G.life/1e3;if(K>=L){X.style.opacity="0",X.style.display="none",G.ended=!0;continue}P=!0;const R=G.side==="left"?T.x:I.x,S=G.side==="left"?T.y:I.y,V=R+G.vx*K,ae=S+G.vy*K+.5*g*K*K,ne=(G.angularVel||0)*K,re=V-R,ue=ae-S;X.style.transform=`translate3d(${re}px, ${ue}px, 0) rotate(${ne}deg)`,X.style.opacity=`${Math.max(0,1-K/L)}`}P?p.current=requestAnimationFrame(z):h.current?.()};p.current=requestAnimationFrame(z);const ie=setTimeout(()=>{try{if((m.current?m.current.querySelectorAll(".confetti"):document.querySelectorAll(".confetti")).length===0&&!document.querySelector(".party-container")){const te=document.createElement("div");te.className="party-container",te.style.position="fixed",te.style.inset="0",te.style.pointerEvents="none",te.style.overflow="visible",te.style.zIndex="2147483647";for(const P of i){const G=document.createElement("span");G.className=`confetti confetti--${P.side}`,G.setAttribute("aria-hidden","true"),G.style.display="none",G.style.position="fixed",G.style.left="0px",G.style.top="0px",G.style.width=`${P.size}px`,G.style.height=`${Math.max(4,P.size*.6)}px`,G.style.background=P.color,G.style.borderRadius=P.borderRadius,G.style.transform="translate3d(0,0,0)",G.style.opacity="0",te.appendChild(G),c.current[P.id]=G}(document.body||m.current).appendChild(te),d.current=te}}catch{}},300);return()=>{if(p.current&&cancelAnimationFrame(p.current),clearTimeout(ie),d.current){try{d.current.remove()}catch{}d.current=null}}},[e,r,l,i]),!e)return null;const x=n.jsx("div",{className:"party-container",ref:u,children:i.map(g=>n.jsx("span",{"aria-hidden":!0,ref:y=>{c.current[g.id]=y},className:`confetti confetti--${g.side}`,style:{width:`${g.size}px`,height:`${Math.max(4,g.size*.6)}px`,background:g.color,borderRadius:g.borderRadius}},`${g.id}-${l}`))});return typeof document<"u"?bn.createPortal(x,m.current||document.body):x}const hl=e=>typeof e=="number"&&Number.isFinite(e)&&e>0?e:void 0;function hB({trigger:e=0,active:t=!1}){const[r,a]=o.useState(null);o.useEffect(()=>{if(typeof window>"u")return;const l=i=>{const u=i.detail??{};a(c=>({n:(c?.n??0)+1,count:hl(u.count),strength:hl(u.strength),duration:hl(u.duration)}))};return window.addEventListener("party:trigger",l),()=>window.removeEventListener("party:trigger",l)},[]);const s=o.useCallback(()=>a(null),[]);return n.jsxs(n.Fragment,{children:[n.jsx(pl,{active:t,trigger:e}),r&&n.jsx(pl,{active:!0,trigger:r.n,count:r.count,strength:r.strength,duration:r.duration,onComplete:s})]})}function mB({title:e,sub:t,rightAction:r,titleAction:a,badge:s,badgeVariant:l="default",documentTitle:i,onBack:u,backLabel:c,wrap:p=!1}){const{t:h}=Ne.useTranslation();Q2(typeof e=="string"?e:i??null);const d=c??h("common.back","\uB4A4\uB85C");return n.jsxs("div",{className:p?"page-title page-title--wrap":"page-title",children:[n.jsxs("div",{className:"page-title__main",children:[n.jsxs("div",{className:"page-title__title-row",children:[u&&n.jsx(me,{htmlType:"button",className:"page-title__back",size:48,type:"dot",icon:"chevron-left",iconSize:"large",useBorder:!1,iconColor:"var(--color-text-primary)",ariaLabel:d,showTooltipInfo:d,onClick:u}),n.jsx("h1",{className:"page-title__title h1",children:e}),s&&n.jsx("div",{className:"page-title__badge",children:n.jsx(cn,{label:s,size:"small",variant:l,fill:"outline"})}),a?n.jsx("div",{className:"page-title__title-action",children:a}):null]}),t&&n.jsx("p",{className:"page-title__sub body-2",children:t})]}),r?n.jsx("div",{className:"page-title__action",children:r}):null]})}function fB(e){return e??""}const Bp=o.createContext({words:[],loading:!1});function CB(){return o.useContext(Bp)}function gB({words:e,loading:t,error:r,statusMessage:a,localVersion:s,remoteVersion:l,progress:i,clearAndRefetch:u,checkRemoteVersion:c,children:p}){const h=o.useMemo(()=>({words:e,loading:t,error:r,statusMessage:a,localVersion:s,remoteVersion:l,progress:i,clearAndRefetch:u,checkRemoteVersion:c}),[e,t,r,a,s,l,i,u,c]);return n.jsx(Bp.Provider,{value:h,children:p})}function bB({items:e,actions:t,columns:r,flat:a=!1,className:s,style:l}){const i=r??e.length;return n.jsx("section",{className:xe("summary-strip",a&&"summary-strip--flat",s),style:{"--summary-strip-cols":String(i),...l},children:n.jsxs("div",{className:"summary-strip__row",children:[n.jsx("div",{className:"summary-strip__items",children:e.map((u,c)=>n.jsxs("div",{className:"summary-strip__item",children:[n.jsx("p",{className:"summary-strip__label caption-1",children:u.label}),n.jsx("p",{className:"summary-strip__value body-3b",title:typeof u.value=="string"||typeof u.value=="number"?String(u.value):void 0,children:u.value})]},c))}),t&&n.jsx("div",{className:"summary-strip__actions",children:t})]})})}const yB=(e,t)=>`${e} / ${t}`;function vB({blocks:e,sectionTitles:t,logo:r,footer:a,pageLabel:s=yB,pageWidth:l,pageHeight:i,margin:u,className:c,style:p}){const{t:h}=Ne.useTranslation(),d=o.useRef(null),m=o.useRef(null),C=o.useRef(null),x=o.useRef(null),[g,y]=o.useState(null),[v,_]=o.useState(!1);o.useEffect(()=>{const F=d.current;if(!F)return;const U=()=>_(F.scrollWidth>F.clientWidth+1);if(U(),typeof ResizeObserver>"u")return;const T=new ResizeObserver(U);return T.observe(F),()=>T.disconnect()},[g]);const b=e.map(F=>`${F.id}\0${F.section??""}\0${F.group??""}`).join(""),B=g&&g.shape===b?g.pages:null,[N,f]=o.useState(0);o.useEffect(()=>{const F=x.current;if(!F||typeof ResizeObserver>"u")return;const U=new ResizeObserver(()=>f(F.offsetHeight));return U.observe(F),()=>U.disconnect()},[]);const[w,k]=o.useState(0);o.useEffect(()=>{const F=m.current;if(!F||typeof ResizeObserver>"u")return;let U=null;const T=typeof requestAnimationFrame=="function"?ie=>requestAnimationFrame(ie):ie=>setTimeout(ie,16),I=typeof cancelAnimationFrame=="function"?cancelAnimationFrame:ie=>clearTimeout(ie),z=new ResizeObserver(()=>{U==null&&(U=T(()=>{U=null,k(ie=>ie+1)}))});return Array.from(F.children).forEach(ie=>z.observe(ie)),()=>{z.disconnect(),U!=null&&I(U)}},[b]),o.useLayoutEffect(()=>{const F=m.current,U=x.current;if(!F||!U)return;const T=L=>L.getBoundingClientRect().height||L.offsetHeight,I=new Map;C.current?.querySelectorAll("[data-chrome-section]").forEach(L=>{I.set(L.dataset.chromeSection??"",T(L))});const z=L=>T(U)-(I.get(L??"")??0),ie=Array.from(F.children).map(L=>T(L)),te=[];e.forEach((L,R)=>{const S=te[te.length-1],V=S?e[S[0]]:void 0;V&&L.group!=null&&V.group===L.group&&V.section===L.section?S.push(R):te.push([R])});const P=[];let G=[],X=0;const K=()=>{G.length&&P.push(G),G=[],X=0};te.forEach(L=>{const R=L.reduce((V,ae)=>V+ie[ae],0),S=z(e[L[0]].section);G.length&&e[G[0]].section!==e[L[0]].section&&K(),R>S?L.forEach(V=>{G.length&&X+ie[V]>S+.01&&K(),G.push(V),X+=ie[V]}):(G.length&&X+R>S+.01&&K(),L.forEach(V=>G.push(V)),X+=R)}),K(),y(L=>L&&L.shape===b&&JSON.stringify(L.pages)===JSON.stringify(P)?L:{shape:b,pages:P})},[b,N,l,i,u,w]);const E=ps,A=E,D=a??n.jsxs(n.Fragment,{children:[n.jsx("img",{src:A,alt:"IHAB",className:"report-doc__logo"}),"\xA9 IHAB, Inc. All rights reserved."]}),j=(F,U,T)=>({header:n.jsxs("div",{className:"report-doc__header",children:[n.jsx("h2",{className:"report-doc__title h3b",children:T!=null&&t?.[T]||null}),r]}),footer:n.jsxs("div",{className:"report-doc__footer caption-1",children:[n.jsx("span",{className:"report-doc__footer-left",children:D}),n.jsx("span",{className:"report-doc__page-no",children:s(F,U)})]})}),$=Array.from(new Set(e.map(F=>F.section??""))),H={...l?{"--report-page-w":l}:null,...i?{"--report-page-h":i}:null,...u?{"--report-margin":u}:null,...p};return n.jsxs("div",{ref:d,className:xe("report-doc",c),style:H,tabIndex:v?0:void 0,role:v?"group":void 0,"aria-label":v?h("report.previewRegion","\uBCF4\uACE0\uC11C \uBBF8\uB9AC\uBCF4\uAE30"):void 0,children:[n.jsxs("div",{className:"report-doc__measure","aria-hidden":!0,children:[n.jsx("div",{ref:x,className:"report-doc__ruler"}),n.jsx("div",{ref:C,children:$.map(F=>{const U=j(1,1,F||void 0);return n.jsxs("div",{"data-chrome-section":F,children:[U.header,U.footer]},F)})}),n.jsx("div",{ref:m,className:"report-doc__measure-blocks",children:e.map(F=>n.jsx("div",{children:F.content},F.id))})]}),B&&n.jsx("div",{className:"report-doc__pages",children:B.map((F,U)=>{const{header:T,footer:I}=j(U+1,B.length,e[F[0]].section);return n.jsxs("section",{className:"report-doc__page",children:[T,F.map(z=>n.jsx("div",{children:e[z].content},e[z].id)),I]},U)})})]})}function xB({title:e,fields:t,columns:r=4,className:a,style:s}){return n.jsxs("div",{className:xe("report-info",a),style:{"--report-info-cols":String(r),...s},children:[e&&n.jsx("p",{className:"report-info__title h5b",children:e}),n.jsx("div",{className:"report-info__grid",children:t.map((l,i)=>n.jsxs("div",{className:"report-info__field body-2",children:[n.jsx("span",{className:"report-info__label body-3",children:l.label}),n.jsx("span",{className:"report-info__value",children:l.value})]},i))})]})}const vr=new Map;let io=null;const _B=12;function wB(e){for(let t=e.parentElement;t&&t!==document.body;t=t.parentElement){const r=window.getComputedStyle(t);if(r.transform&&r.transform!=="none"||r.filter&&r.filter!=="none"||r.perspective&&r.perspective!=="none"||/paint|layout|strict|content/.test(r.contain||""))return t}return document}function uo(){const e=new Map;for(const t of vr.keys()){if(!t.isConnected)continue;const r=wB(t),a=e.get(r)??[];a.push(t),e.set(r,a)}for(const t of e.values()){t.sort((a,s)=>a.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1);let r=0;for(const a of t){r>0?a.style.setProperty("--update-alert-stack-offset",`${r}px`):a.style.removeProperty("--update-alert-stack-offset");const s=a.getBoundingClientRect().height;s>0&&(r+=s+_B)}}}function BB(e){return typeof window>"u"?()=>{}:(vr.set(e,(vr.get(e)??0)+1),vr.get(e)===1&&typeof ResizeObserver<"u"&&(io??(io=new ResizeObserver(()=>uo())),io.observe(e)),uo(),()=>{const t=(vr.get(e)??1)-1;if(t>0){vr.set(e,t),uo();return}vr.delete(e),io?.unobserve(e),e.style.removeProperty("--update-alert-stack-offset"),uo()})}function kB({title:e,message:t,actionLabel:r,onAction:a,icon:s,onClose:l,className:i=""}){const{t:u}=Ne.useTranslation(),c=r??u("common.update","\uC5C5\uB370\uC774\uD2B8"),p=o.useRef(null),h=o.useRef(!1);return o.useLayoutEffect(()=>{const d=p.current,m=d?.parentElement?.closest(".update-alert-stack")??d,C=m?BB(m):null;return()=>{C?.(),h.current&&d&&d.contains(document.activeElement)&&Ta(d)}},[]),n.jsxs("div",{ref:p,className:xe("update-alert",i),role:"alert",children:[l&&n.jsx("button",{type:"button",className:"update-alert__close",onClick:()=>{h.current=!0,l()},"aria-label":u("common.close","\uB2EB\uAE30"),children:"\xD7"}),n.jsxs("div",{className:"update-alert__top",children:[n.jsx("div",{className:"update-alert__icon",children:s??n.jsx(Nl,{size:20,strokeWidth:2})}),n.jsxs("div",{className:"update-alert__body",children:[n.jsx("div",{className:"update-alert__title h4",children:e}),n.jsx("div",{className:"update-alert__message body-3",children:t})]})]}),a&&n.jsx(me,{htmlType:"button",size:32,variant:"main",shape:"pill",className:"update-alert__action",onClick:a,children:c})]})}function AB({title:e,titleLevel:t=3,category:r,categoryVariant:a="main",description:s,topActions:l,actions:i,children:u,footerLeft:c,footerRight:p,ariaLabel:h,onClick:d,draggable:m,onDragStart:C,onDragEnd:x,className:g}){const y=t?`h${t}`:"div",{t:v}=Ne.useTranslation(),[_,b]=o.useState(null),B=o.useCallback(()=>b(null),[]),N=o.useCallback(D=>{const j=D.currentTarget.getBoundingClientRect();b($=>$?null:{left:j.left,right:j.right,top:j.top,bottom:j.bottom,width:j.width,height:j.height,x:j.x,y:j.y})},[]),f=(i??[]).filter(Boolean),w=(f.length===1?n.jsx(me,{htmlType:"button",type:"dot",size:40,icon:f[0].icon,ariaLabel:f[0].label,showTooltipInfo:f[0].label,selected:f[0].selected,disabled:f[0].disabled,variant:f[0].variant??"transparent-lightGray",useBorder:!1,onClick:f[0].onClick}):f.length>1?n.jsx(me,{htmlType:"button",type:"dot",size:40,icon:"ellipsis",ariaLabel:v("common.more","\uB354\uBCF4\uAE30"),showTooltipInfo:v("common.more","\uB354\uBCF4\uAE30"),variant:"transparent-lightGray",useBorder:!1,"aria-haspopup":"menu","aria-expanded":!!_,onClick:N}):null)??l,k=c!=null||p!=null,E=u!=null&&u!==!1,A=o.useCallback(D=>{d&&D.target===D.currentTarget&&(D.key==="Enter"||D.key===" ")&&(D.preventDefault(),d())},[d]);return n.jsxs("div",{className:xe("training-card",d?"training-card--clickable":"",g),onClick:d,onKeyDown:d?A:void 0,role:d?"button":void 0,"aria-label":d?h??(typeof e=="string"?e:void 0):void 0,tabIndex:d?0:void 0,draggable:m,onDragStart:C,onDragEnd:x,children:[n.jsxs("div",{className:"training-card__header",children:[r!=null?n.jsx("p",{className:xe("training-card__category","caption-1",a==="sub"&&"training-card__category--sub"),children:r}):n.jsx("p",{className:"training-card__category caption-1","aria-hidden":"true",children:" "}),n.jsxs("div",{className:"training-card__title-row",children:[typeof e=="string"?n.jsx(y,{className:"training-card__title h4",children:e}):e,w!=null&&n.jsx("div",{className:"training-card__top-actions",onClick:D=>D.stopPropagation(),children:w})]}),s!=null?typeof s=="string"?n.jsx("p",{className:"training-card__description body-3",children:s}):s:n.jsx("p",{className:"training-card__description body-3","aria-hidden":"true",children:" "})]}),E?n.jsx("div",{className:"training-card__body",children:u}):n.jsx("div",{className:"training-card__body training-card__body--empty","aria-hidden":"true"}),k?n.jsxs("div",{className:"training-card__footer",children:[c!=null&&n.jsx("div",{className:"training-card__footer-left",children:c}),p!=null&&n.jsx("div",{className:"training-card__meta",children:p})]}):n.jsx("div",{className:"training-card__footer training-card__footer--empty","aria-hidden":"true"}),_&&f.length>1&&n.jsx("div",{className:"training-card__menu-host",onClick:D=>D.stopPropagation(),children:n.jsx(sn,{anchorRect:_,onClose:B,ariaLabel:v("tooltip.menu","\uBA54\uB274"),children:n.jsx(nr,{columns:[{items:f.map(D=>({label:D.label,icon:D.icon,selected:D.selected,disabled:D.disabled,onClick:D.onClick}))}],onClose:B,size:"small"})})})]})}function NB({title:e,titleLevel:t=3,count:r,collapsed:a=!1,onToggle:s,beforeSort:l,sort:i,actions:u,empty:c=!1,emptyContent:p,dragOver:h=!1,onDragOver:d,onDragLeave:m,onDrop:C,children:x,className:g}){const{t:y}=Ne.useTranslation(),v=o.useId(),_=t?`h${t}`:"span",b=s!=null,B=xe("training-card-group",h&&"training-card-group--dragover",a&&"training-card-group--collapsed",b&&"training-card-group--collapsible",g);return n.jsxs("div",{className:B,onDragOver:d,onDragLeave:m,onDrop:C,role:typeof e=="string"&&e?"group":void 0,"aria-labelledby":typeof e=="string"&&e?v:void 0,children:[n.jsxs("header",{className:"training-card-group__header",children:[b&&n.jsx(me,{htmlType:"button",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:a?"chevron-right":"chevron-down",ariaLabel:typeof e=="string"&&e?a?y("common.expandFor",{name:e}):y("common.collapseFor",{name:e}):a?y("common.expand","\uD3BC\uCE58\uAE30"):y("common.collapse","\uC811\uAE30"),className:"training-card-group__chevron","aria-expanded":!a,onClick:s}),typeof e=="string"?n.jsx(_,{id:v,className:"training-card-group__title h5b",children:e}):e,r!==void 0&&n.jsx("span",{className:"training-card-group__count body-3b",children:r}),(l!=null||i||u!=null)&&n.jsxs("span",{className:"training-card-group__actions",onClick:N=>N.stopPropagation(),children:[l,i&&n.jsx(An,{size:40,options:i.options,value:i.value,placeholder:i.placeholder,onChange:i.onChange,ariaLabel:typeof e=="string"&&e?y("common.sortFor",{name:e}):void 0}),u]})]}),!a&&(c?n.jsx("div",{className:"training-card-group__empty body-3",children:p}):n.jsx("div",{className:"training-card-group__grid",children:x}))]})}const EB="speechear:saved_word_tables";function jB(e){if(typeof e!="object"||e===null)return!1;const t=e;return typeof t.id=="string"&&typeof t.name=="string"&&Array.isArray(t.items)}function DB(){try{const e=localStorage.getItem(EB);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(jB):[]}catch{return[]}}function kp(e){return{label:e.word,subLabel:e.pronunciation,colloquialLabel:e.colloquialPronunciation,homonum:e.homonum,grade:e.grade,syllables:[...e.word].length,pos:e.pos,wordType:e.wordType}}function ml(e){return e.map(t=>t.homonum!=null?`${t.word}#${t.homonum}`:t.word).join("|")}function SB(e){const t=new Set;return e.map(r=>{let a=r.id;for(let s=2;t.has(a);s++)a=`${r.id}~${s}`;return t.add(a),a===r.id?r:{...r,id:a}})}function TB({title:e,titleIcon:t,disc:r,filterTitle:a,filterCollapsible:s,filterDefaultCollapsed:l,filterCollapsed:i,onFilterCollapsedChange:u,filterHeaderSummary:c,brand:p,code:h,baseItem:d,baseContentTypes:m,cellCapacity:C,maxItemsPerPage:x,items:g,onSaveComplete:y,onLoad:v,onRemoveItem:_,onCopyItem:b,onReplaceItem:B,onPickForm:N,onReset:f,resetLabel:w,saveButtonLabel:k,secondarySaveButtonLabel:E,onReorder:A,showCellCount:D,onAddItem:j,fillerAdd:$,className:H,renderSavePopup:F,renderWordSearch:U,hideControls:T,saveOnly:I,tableName:z,nameValue:ie,onNameChange:te,descriptionValue:P,onDescriptionChange:G,namePlaceholder:X,descriptionPlaceholder:K,existingNames:L,editingName:R,onCancel:S,initialItemsPerPage:V,onItemsPerPageChange:ae,renderCellAction:ne,actionsLeftExtra:re}){const{t:ue}=Ne.useTranslation(),Be=w??ue("wordPrint.clearAllSelection","\uBAA8\uB450 \uC120\uD0DD \uD574\uC81C"),le=g===void 0,J=!!te,[O,W]=o.useState([]),q=(ie??"").trim(),oe=q||(X??"").trim(),ee=(P??"").trim()||(K??"").trim(),be=(L??[]).map(Me=>Me.trim().toLowerCase()),je=[R?.trim().toLowerCase(),...O].filter(Me=>!!Me),De=[...be];for(const Me of je){const et=De.indexOf(Me);et!==-1&&De.splice(et,1)}const we=q!==""&&De.includes(q.toLowerCase()),[ze,ye]=o.useState(Array(4).fill(null)),[_e,ve]=o.useState(4),[Ee,Oe]=o.useState(null),ot=ze.slice(0,_e),it=!!p?.show,[Fe,Ue]=o.useState(!0),[nt,Te]=o.useState(!0),Xe=p&&{...p,top:Fe,bottom:nt},[rt,ut]=o.useState("landscape"),[gt,_t]=o.useState([...vd]),[pt,Yt]=o.useState("show"),[kt,ct]=o.useState(!0),[Ae,st]=o.useState(!0),ft=o.useRef(null),Ct=o.useRef([]),[Nt,Ft]=o.useState(V==="all"?Number.POSITIVE_INFINITY:V??8),[yt,vt]=o.useState("right"),[Et,It]=o.useState(!1),[Je,At]=o.useState(!1),{toastMessage:Qe,toastType:he,showWarning:Le,clearToast:Pe}=Tu("warning"),We=o.useCallback(()=>Oe(null),[Oe]);d&&le&&Tt("word-table-block-base-item-in-edit","[WordTableBlock] baseItem \uC740 \uD45C\uC2DC \uBAA8\uB4DC(items \uB97C \uC8FC\uB294 \uAF34)\uC5D0\uC11C\uB9CC \uAC78\uB9B0\uB2E4 \u2014 \uD3B8\uC9D1 \uACA9\uC790\uC5D0\uB294 \uC11C\uC9C0 \uC54A\uB294\uB2E4.");const[dt,on]=o.useState(()=>Math.max(g?.length??1,1)),ht=Math.max(C??0,g?.length??0,1),Ke=C!=null||!!D,xt=le?_e:D?Math.max(dt,g?.length??1,1):ht,{width:jt,height:Q}=fr[rt],fe=!le&&!D,Ge=Math.max(1,Math.min(ht,x??ht)),Ye=Math.min(Nt,Ge),at=fe?Ye:xt,mt=x!=null&&C!=null,Mt=mt?Math.max(1,Math.min(Nt,x)):Ye,Ot=o.useRef(ae);o.useEffect(()=>{Ot.current=ae}),o.useEffect(()=>{fe&&Ot.current?.(Mt)},[fe,Mt]);const Tn=Math.ceil((g?.length??0)/Math.max(1,at)),Xt=(g?.length??0)<ht?Math.floor((g?.length??0)/Math.max(1,at))+1:0,Mn=fe?Math.max(1,Tn,Xt):0,dn=fe?Array.from({length:Mn},(Me,et)=>(g??[]).slice(et*at,(et+1)*at)):null,Jt=!!dn&&dn.length>1,en=le?ot.some(Me=>Me!==null&&Me.length>1):(g??[]).some(Me=>(Me.words??[]).length>1),gn=z?.trim()||`${Di(Jr())} ${en?ue("wordTable.printFileNamePair","\uB300\uB9BD\uC30D\uD45C"):ue("wordTable.printFileNameSingle","\uB2E8\uC5B4\uD45C")}`,tn=o.useCallback(()=>Jt?Ct.current.filter(Me=>Me!==null):ft.current?[ft.current]:[],[Jt]),{print:Rt,openNewWindow:Dt,downloadHtml:Ut}=Us({getElements:tn,paperW:jt,paperH:Q,fileName:gn,onPopupBlocked:()=>{Le(ue("wordTable.popupBlocked","\uD31D\uC5C5\uC774 \uCC28\uB2E8\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uBE0C\uB77C\uC6B0\uC800 \uC124\uC815\uC5D0\uC11C \uD31D\uC5C5\uC744 \uD5C8\uC6A9\uD574 \uC8FC\uC138\uC694."))}}),zt=Me=>{ve(Me),ye(et=>et.length>=Me?et:[...et,...Array(Me-et.length).fill(null)]),Oe(null)},$n=Me=>{ye(et=>{const Lt=[...et];return Lt[Me]=null,Lt}),Ee===Me&&Oe(null)},Ln=Me=>{if(Ee===null)return;const et=Ee;ye(Nn=>{const In=[...Nn];return In[et]=Me.length>0?Me:null,In});const Lt=ot.findIndex((Nn,In)=>In>et&&Nn===null);Oe(Lt!==-1?Lt:null)},Fn=le?ot.some(Me=>Me?.some(et=>!!et.colloquialPronunciation)):(g??[]).some(Me=>(Me.words??[]).some(et=>!!et.colloquialLabel)),pe=!le&&xd([...d?[d]:[],...g??[]]),Se=o.useMemo(()=>Br()?le?ze.slice(0,_e).flatMap(Me=>(Me??[]).map(et=>[et.word,et.homonum])):(Me=>Me.flatMap(et=>(et.words??[]).map(Lt=>[Lt.label,Lt.homonum])))([...d?[d]:[],...g??[]]):[],[le,ze,_e,g,d]),[He,Y]=o.useState(!1);o.useEffect(()=>{if(Se.length===0)return;let Me=!1;return Promise.all(Se.map(([et,Lt])=>mi(et,Lt))).then(et=>{Me||Y(et.some(Boolean))},()=>{}),()=>{Me=!0}},[Se]);const de=Se.length>0&&He,ke=o.useMemo(()=>[...le||D?[{label:ue("wordTable.filter.columns","\uCE78 \uC218"),items:Z_.map(Me=>({value:`${Me}\uCE78`,displayLabel:ue("wordTable.filter.column",{count:Me})})),display:"segmented"}]:[],...fe&&(g?.length??0)>0?[jd(ue,{hasPairs:en,itemCount:mt?x:ht,max:x})]:[],...Jt?[J_(ue)]:[]],[ue,le,D,fe,g?.length,en,ht,x,Jt]),$e={...le||D?{[ue("wordTable.filter.columns","\uCE78 \uC218")]:`${xt}\uCE78`}:{},...fe&&(g?.length??0)>0?{[ue(en?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")]:`${Mt}\uAC1C`}:{},...Jt?{[ue("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")]:yt}:{}},Ve=(Me,et)=>{if(et===ue("wordTable.filter.columns","\uCE78 \uC218"))le?zt(parseInt(Me)):on(parseInt(Me));else if(et===ue(en?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")){const Lt=parseInt(Me);Ft(mt?Lt:Dd(Lt,ht))}else et===ue("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")&&vt(Sd(Me))},Ze=le?SB(ot.filter(Me=>Me!==null&&Me.length>0).map(Me=>({id:ml(Me),words:Me.map(kp)}))):g??[],wt=()=>{le&&ye(Me=>Me.length>_e?Me.slice(0,_e):Me)},bt=(Me=!1)=>{if(At(Me),J&&y){const et=oe.trim().toLowerCase();et&&W(Lt=>Lt.includes(et)?Lt:[...Lt,et]),y(oe,Ze,ee||void 0,Me),wt();return}if(I&&y){y("",Ze,void 0,Me),wt();return}if(y){It(!0);return}Ut()},[ge,M]=o.useState(!1),[Z,Ce]=o.useState(""),Re=Z.trim(),qe=Re!==""&&be.includes(Re.toLowerCase()),tt=()=>{Ce(oe?ue("wordTable.save.copyName",{name:oe,defaultValue:"{{name}} (\uBCF5\uC0AC)"}):""),M(!0)},St=()=>{!Re||qe||!y||(y(Re,Ze,ee||void 0,!0),wt(),M(!1))},$t=Ze.length===0,nn=$t||J&&(oe===""||we),rn=()=>{if($t){Le(ue("wordTable.emptyItems","\uB2E8\uC5B4\uB97C 1\uAC1C \uC774\uC0C1 \uCD94\uAC00\uD574\uC8FC\uC138\uC694."));return}if(J&&oe===""){Le(ue("wordTable.save.nameRequired","\uD45C \uC774\uB984\uC744 \uC785\uB825\uD574 \uC8FC\uC138\uC694."));return}J&&we&&Le(ue("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."))},Ir=n.jsx(Lr,{items:Ze,orientation:rt,contentTypes:gt,baseItem:d,baseContentTypes:m,cutLine:pt,showOutline:kt,showDivLine:Ae,count:xt});return n.jsxs(n.Fragment,{children:[n.jsxs($r,{type:"page",icon:t,title:e,disc:r,className:xe("word-table-block",H),children:[ge&&n.jsx(qn,{size:"small",title:E??ue("wordTable.saveAsNewButton","\uB2E4\uB978 \uC774\uB984\uC73C\uB85C \uC800\uC7A5"),onClose:()=>M(!1),footer:({closeWithAnimation:Me})=>n.jsxs(n.Fragment,{children:[n.jsx(me,{htmlType:"button",size:48,type:"bar",label:ue("common.cancel","\uCDE8\uC18C"),onClick:Me}),n.jsx(me,{htmlType:"button",size:48,type:"bar",variant:"main",label:ue("common.save","\uC800\uC7A5"),disabled:!Re||qe,onClick:St})]}),children:n.jsx(Un,{label:ue("wordTable.save.nameLabel","\uC774\uB984"),value:Z,onChange:Ce,placeholder:ue("wordTable.save.placeholder","\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694."),maxLength:40,size:48,fullWidth:!0,autoFocus:!0,onEnter:St,error:qe?ue("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."):void 0})}),Et&&y&&F?.({defaultName:typeof e=="string"?e:ue("wordTable.defaultName","\uB2E8\uC5B4 \uD45C"),preview:Ir,previewW:jt,previewH:Q,items:Ze,existingNames:DB().map(Me=>Me.name),saveAsNew:Je,onSave:(Me,et)=>{y(Me,Ze,et,Je),wt(),It(!1)},onCancel:()=>It(!1)}),(le||j)&&Ee!==null&&U?.({cellIndex:Ee,onConfirm:le?Ln:Me=>{if(j){const et=Me[0];if(et){const Lt=new Set((g??[]).map(In=>In.id));let Nn=ml([et]);for(let In=2;Lt.has(Nn);In++)Nn=`${ml([et])}~${In}`;j({id:Nn,words:[kp(et)]})}}Oe(null)},onClose:We}),!T&&n.jsx(Ws,{title:a,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c,hasImage:de,hasColloquial:Fn,hasCaption:pe,contentTypes:gt,orientation:rt,showOutline:kt,cutLine:pt,showDivLine:Ae,setters:{setContentTypes:_t,setOrientation:ut,setShowOutline:ct,setCutLine:Yt,setShowDivLine:st,setShowTopInfo:Ue,setShowBottomInfo:Te},showCutLine:(fe?at:xt)>1,showDivLine2:en,middleSections:ke,extraSelected:$e,onExtraSelect:Ve,showPaperBands:it,showTopInfo:Fe,showBottomInfo:nt}),Jt&&dn?n.jsx("div",{className:"word-table-block__pages",children:dn.map((Me,et)=>n.jsx(Lr,{orientation:rt,contentTypes:gt,cutLine:pt,showOutline:kt,showDivLine:Ae,count:at,items:Me,baseItem:d,baseContentTypes:m,onRemoveItem:_,onCopyItem:b,onReplaceItem:B,onPickForm:N,onReorder:A&&((Lt,Nn)=>A(Lt+et*at,Nn+et*at)),indexOffset:et*at,totalCount:g?.length??0,renderCellAction:ne&&((Lt,Nn)=>ne(Lt+et*at,Nn)),showFillerAdd:!!j,fillerAdd:$,onActivateCell:j?(Lt=>Oe(Lt+et*at)):void 0,addableCount:Ke?Math.max(0,Math.min(at,ht-et*at)):void 0,brand:Xe,code:h,contentRef:Lt=>{Ct.current[et]=Lt},pageNumber:{current:et+1,total:dn.length},pageNumberPosition:yt},et))}):n.jsx(Lr,{orientation:rt,contentTypes:gt,cutLine:pt,showOutline:kt,showDivLine:Ae,count:at,items:le?void 0:g??[],baseItem:le?void 0:d,baseContentTypes:m,editCells:le?ot:void 0,activeCell:Ee,onActivateCell:le||j?Oe:void 0,onRemoveCell:le?$n:void 0,onRemoveItem:le?void 0:_,onCopyItem:le?void 0:b,onReplaceItem:le?void 0:B,onPickForm:le?void 0:N,onReorder:le?void 0:A,addableCount:Ke?fe?Math.min(at,ht):xt:void 0,renderCellAction:le?void 0:ne,brand:Xe,code:h,showFillerAdd:!!j,fillerAdd:$,contentRef:ft}),!T&&!I&&re!=null&&n.jsx("div",{className:"word-table-block__table-actions",children:re}),J&&!T&&n.jsxs(da,{labelWidth:64,useBorder:!1,className:"word-table-block__meta",children:[n.jsx(Cn,{variant:"custom",label:ue("wordTable.save.nameLabel","\uC774\uB984"),required:!0,align:"vertical",useFullWidth:!0,children:n.jsx(Un,{required:!0,value:ie??"",onChange:te,placeholder:X?X+ue("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)"):ue("wordTable.save.placeholder","\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694."),ariaLabel:ue("wordTable.save.nameLabel","\uC774\uB984"),maxLength:40,size:48,fullWidth:!0,error:we?ue("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."):void 0,onKeyDown:Me=>{(Me.key==="Tab"&&!Me.shiftKey||Me.key===" ")&&!(ie??"").trim()&&(X??"").trim()&&(Me.preventDefault(),te?.(X??""))}})}),n.jsx(Cn,{variant:"custom",label:ue("wordTable.save.descriptionLabel","\uC124\uBA85"),align:"vertical",useFullWidth:!0,children:n.jsx(Un,{value:P??"",onChange:G,placeholder:K?K+ue("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)"):ue("wordTable.save.descriptionPlaceholder","\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC124\uBA85\uC744 \uC785\uB825\uD558\uC138\uC694."),ariaLabel:ue("wordTable.save.descriptionLabel","\uC124\uBA85"),maxLength:200,multiline:!0,rows:2,fullWidth:!0,onKeyDown:Me=>{(Me.key==="Tab"&&!Me.shiftKey||Me.key===" ")&&!(P??"").trim()&&(K??"").trim()&&(Me.preventDefault(),G?.(K??""))}})})]})]}),!T&&n.jsxs("div",{className:"word-table-block__actions",children:[n.jsxs("div",{className:"word-table-block__actions-left",children:[!I&&v&&n.jsx(me,{htmlType:"button",size:40,type:"bar",label:ue("wordTable.load","\uBD88\uB7EC\uC624\uAE30"),onClick:v}),!I&&f&&n.jsx(me,{htmlType:"button",size:40,type:"bar",label:Be,onClick:f}),!I&&n.jsx(me,{htmlType:"button",size:40,type:"bar",label:ue("wordTable.openNewWindow","\uC0C8 \uCC3D\uC73C\uB85C \uBCF4\uAE30"),onClick:Dt})]}),n.jsxs("div",{className:"word-table-block__actions-right",children:[S&&n.jsx(me,{htmlType:"button",size:"56",type:"bar",label:ue("common.cancel","\uCDE8\uC18C"),onClick:S}),!I&&n.jsx(me,{htmlType:"button",size:"56",type:"bar",label:ue("wordTable.print","\uC778\uC1C4\uD558\uAE30"),onClick:Rt}),E&&n.jsx(me,{htmlType:"button",size:"56",type:"bar",label:E,onClick:()=>J?tt():bt(!0),disabled:$t,onDisabledClick:()=>{Le(ue("wordTable.emptyItems","\uB2E8\uC5B4\uB97C 1\uAC1C \uC774\uC0C1 \uCD94\uAC00\uD574\uC8FC\uC138\uC694."))}}),n.jsx(me,{htmlType:"button",size:"56",type:"bar",variant:"main",label:k??ue("wordTable.saveButton","\uC800\uC7A5\uD558\uAE30"),onClick:()=>bt(!1),disabled:nn,onDisabledClick:rn})]})]}),n.jsx(Mr,{message:Qe,type:he,onClose:Pe})]})}const MB=8;function Ap({items:e,className:t}){const{t:r}=Ne.useTranslation(),a=o.useRef(null),[s,l]=o.useState(null),i=o.useCallback(()=>l(a.current?.getBoundingClientRect()??null),[]),u=o.useCallback(()=>l(null),[]),c=La(!!s,b=>{b?i():u()},a),p=e.length,h=p<=3?1:2,d=MB,m=p>d,C=e.slice(0,m?d-1:d),x=p-C.length,g=e.slice(C.length).map(b=>b.words?.length?b.words.map(B=>B.label).join(" / "):b.id),y=Math.min(5,Math.ceil(g.length/25)),v=Math.ceil(Math.min(p,d)/h)||1,_=h*v;return n.jsx("div",{className:xe("word-table-thumb",t),style:{gridTemplateColumns:`repeat(${h}, 1fr)`},children:Array.from({length:_},(b,B)=>{if(m&&B===d-1)return n.jsxs("div",{ref:a,className:"word-table-thumb__cell word-table-thumb__cell--more",tabIndex:0,"aria-label":r("wordTable.thumbMoreAria",{count:x,words:g.join(", "),defaultValue:"\uADF8 \uBC16 {{count}}\uCE78: {{words}}"}),onPointerEnter:f=>{tr(f)||i()},onPointerLeave:f=>{tr(f)||u()},onFocus:()=>{ur()||i()},onBlur:u,onClick:f=>{f.stopPropagation(),c.touchPress()},children:[n.jsx("span",{className:"word-table-thumb__more body-3",children:r("wordTable.thumbMore",{count:x,defaultValue:"+{{count}}"})}),s&&g.length>0&&n.jsx(er,{anchorRect:s,items:g,showIndex:!1,closeOnOutsideClick:!1,columns:y})]},B);const N=C[B];return N?n.jsx("div",{className:"word-table-thumb__cell",children:(N.words?.length?N.words:[{label:N.id}]).map((f,w)=>n.jsxs(o.Fragment,{children:[w>0&&n.jsx("span",{className:"word-table-thumb__divider"}),n.jsx("span",{className:"word-table-thumb__word body-3",children:f.label})]},w))},B):n.jsx("div",{className:"word-table-thumb__cell word-table-thumb__cell--empty"},B)})})}function $B({items:e,name:t,description:r,createdAt:a,code:s,published:l,publishedLabel:i,shared:u,sharedLabel:c,isNew:p,publisherName:h,publishedAt:d,likeCount:m,downloadCount:C,onPublisherClick:x,selected:g,onClick:y,onMore:v,titleNode:_,className:b}){const{t:B}=Ne.useTranslation(),N=_!=null,f=h!=null||d!=null||m!=null||C!=null,w=k=>{k.target===k.currentTarget&&!N&&(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),y?.())};return n.jsxs("div",{className:xe("word-table-button",g?"word-table-button--selected":"",f?"":"word-table-button--no-footer",b),role:"button",tabIndex:0,"aria-label":s?`${t} (${s})`:t,onClick:N?void 0:y,onKeyDown:w,children:[p&&n.jsx("span",{className:"word-table-button__new-dot","aria-label":B("myWordTable.newBadge","\uC0C8\uB85C \uB9CC\uB4E0 \uD45C")}),n.jsx(Ap,{items:e,className:"word-table-button__thumb"}),n.jsxs("div",{className:"word-table-button__info",children:[n.jsxs("div",{className:"word-table-button__info-text",children:[_??n.jsx("div",{className:"word-table-button__title h4",children:t}),r&&n.jsx("div",{className:"word-table-button__desc body-3",children:r})]}),v&&!N&&n.jsx(me,{htmlType:"button",className:"word-table-button__more",size:32,type:"dot",variant:"transparent-gray",useBorder:!1,icon:"ellipsis",ariaLabel:B("common.moreFor",{name:t}),onClick:k=>{k.stopPropagation(),v(k)}})]}),(s||a||l||u)&&n.jsxs("div",{className:"word-table-button__meta-row",children:[n.jsx("span",{className:"word-table-button__meta-left",children:n.jsx("span",{className:"word-table-button__meta caption-1",children:a?ji(a,B):""})}),n.jsxs("span",{className:"word-table-button__meta-right",children:[(l||u)&&n.jsxs("span",{className:"word-table-button__badges",children:[l&&n.jsx(cn,{className:"word-table-button__badge",size:"small",variant:"main",fill:"soft",iconLeft:"book-marked",label:i??B("myWordTable.publishedBadge","\uBC1C\uD589\uB428")}),u&&n.jsx(cn,{className:"word-table-button__badge",size:"small",fill:"soft",iconLeft:"link",label:c??B("myWordTable.sharedBadge","\uACF5\uC720 \uC911")})]}),s&&n.jsx("span",{className:"word-table-button__code caption-1",children:s})]})]}),f&&n.jsxs("div",{className:"word-table-button__footer",children:[n.jsxs("span",{className:"word-table-button__store-by",children:[h&&(x?n.jsx("button",{className:"training-card__publisher body-4",type:"button","aria-label":B("wordTable.publisherFilter",{name:h,defaultValue:"{{name}} \uAC8C\uC2DC\uD55C \uAC83\uB9CC \uBCF4\uAE30"}),onClick:k=>{k.stopPropagation(),x()},children:h}):n.jsx("span",{className:"training-card__publisher training-card__publisher--static body-4",children:h})),d&&n.jsx("span",{className:"training-card__date body-4",children:ji(d,B)})]}),n.jsxs("span",{className:"word-table-button__store-stats",children:[m!=null&&n.jsx(cn,{size:"small",fill:"soft",variant:"like",iconLeft:"heart",label:String(m),"aria-label":B("common.likeCount",{count:m,defaultValue:`\uC88B\uC544\uC694 ${m}`})}),C!=null&&n.jsx(cn,{size:"small",fill:"soft",variant:"main",iconLeft:"download",label:String(C),"aria-label":B("common.downloadCount",{count:C,defaultValue:`\uAC00\uC838\uAC04 \uC218 ${C}`})})]})]})]})}/**
1062
+ `).map((i,u,c)=>n.jsxs(o.Fragment,{children:[i,u<c.length-1&&n.jsx("br",{})]},u))})}),n.jsxs("div",{className:"site-footer__links",children:[n.jsxs("div",{className:"site-footer__column",children:[n.jsx("div",{className:"site-footer__column-title footer-title",children:l("footer.site.title","\uC0AC\uC774\uD2B8")}),n.jsxs("ul",{children:[n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://www.ihab.co.kr/",target:"_blank",rel:"noopener noreferrer",children:"IHAB"})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://speechear.ihab.co.kr/",target:"_blank",rel:"noopener noreferrer",children:l("footer.site.malgwi","\uB9D0\uADC0")})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://ihab-offcial-web.vercel.app/product/sound-localization",target:"_blank",rel:"noopener noreferrer",children:l("footer.site.soundDirection","\uC18C\uB9AC\uBC29\uD5A5\uC131\uC2DC\uC2A4\uD15C")})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://ihab-offcial-web.vercel.app/product/vr-sound-localization",target:"_blank",rel:"noopener noreferrer",children:l("footer.site.vrSoundDirection","VR\uC18C\uB9AC\uBC29\uD5A5\uC131\uC2DC\uC2A4\uD15C")})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://ihab-offcial-web.vercel.app/product/hearing-test-pro",target:"_blank",rel:"noopener noreferrer",children:l("footer.site.hearingTest","\uCCAD\uB825\uD14C\uC2A4\uD2B8 \uD504\uB85C")})})]})]}),n.jsxs("div",{className:"site-footer__column",children:[n.jsx("div",{className:"site-footer__column-title footer-title",children:l("footer.sns.title","SNS")}),n.jsxs("ul",{children:[n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://blog.naver.com/ihab_official",target:"_blank",rel:"noopener noreferrer",children:l("footer.sns.naverBlog","\uB124\uC774\uBC84 \uBE14\uB85C\uADF8")})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://www.instagram.com/ihab.official.yt/",target:"_blank",rel:"noopener noreferrer",children:"Instagram"})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://www.youtube.com/@%EC%95%84%EC%9D%B4%ED%95%B4%EB%B8%8C-%EA%B3%B5%EC%8B%9D%EC%B1%84%EB%84%90",target:"_blank",rel:"noopener noreferrer",children:"Youtube"})})]})]}),n.jsxs("div",{className:"site-footer__column",children:[n.jsx("div",{className:"site-footer__column-title footer-title",children:l("footer.policy.title","\uC815\uCC45")}),n.jsxs("ul",{children:[n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"#",onClick:i=>{e&&(i.preventDefault(),e())},children:l("footer.policy.terms","\uC774\uC6A9\uC57D\uAD00")})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"#",onClick:i=>{t&&(i.preventDefault(),t())},children:l("footer.policy.privacy","\uAC1C\uC778\uC815\uBCF4 \uCC98\uB9AC\uBC29\uCE68")})})]})]})]})]}),n.jsx("hr",{className:"site-footer__rule"}),n.jsxs("div",{className:"site-footer__bottom",children:[n.jsx("div",{className:"site-footer__brand",children:n.jsx("img",{src:ps,alt:"IHAB",className:"site-footer__logo"})}),n.jsxs("div",{className:"site-footer__meta",children:[n.jsxs("div",{children:[n.jsx("span",{className:"footer-title",children:l("footer.ceo","\uB300\uD45C")})," ",n.jsx("span",{className:"footer-meta caption-1",children:l("footer.ceoName","\uD55C\uC9C0\uD61C")})]}),n.jsxs("div",{children:[n.jsx("span",{className:"footer-title",children:l("footer.address","\uC8FC\uC18C")})," ",n.jsx("span",{className:"footer-meta caption-1",children:l("footer.addressValue","\uAC15\uC6D0\uB3C4 \uCD98\uCC9C\uC2DC \uC2DC\uCCAD\uAE38 32 \uD574\uCC2C\uBE4C\uB529 3\uCE35 302\uD638")})]}),n.jsxs("div",{children:[n.jsx("span",{className:"footer-title",children:l("footer.bizNo","\uC0AC\uC5C5\uC790\uB4F1\uB85D\uBC88\uD638")})," ",n.jsx("span",{className:"footer-meta caption-1",children:l("footer.bizNoValue","526-81-02926")})]}),n.jsxs("div",{children:[n.jsx("span",{className:"footer-title",children:l("footer.support","\uACE0\uAC1D\uC13C\uD130")})," ",n.jsxs("span",{className:"footer-meta caption-1",children:[a," \xA0 ",s]})]})]})]}),n.jsx("div",{className:"site-footer__copyright footer-copyright caption-1",children:"\xA9 IHAB, Inc. All rights reserved."})]})})}function $w({logo:e,logoAlt:t="",logoHref:r,links:a=[],actions:s,className:l,containerClassName:i,renderLink:u,menuLabel:c}){const{t:p}=Ne.useTranslation(),h=c??{open:p("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),close:p("header.menuClose","\uBA54\uB274 \uB2EB\uAE30")},[d,m]=o.useState(!1),C=o.useId(),x=o.useRef(null);o.useEffect(()=>{if(!d)return;const v=ir(()=>{const B=document.getElementById(C);B&&B.contains(document.activeElement)&&x.current?.focus(),m(!1)}),_=typeof window<"u"&&window.matchMedia?window.matchMedia("(min-width: 961px)"):null,b=B=>{B.matches&&m(!1)};return _&&(_.matches&&m(!1),_.addEventListener?.("change",b)),()=>{v(),_?.removeEventListener?.("change",b)}},[d,C]);const g=i?`${i} landing-header__inner`:"landing-header__inner",y=(v,_)=>u?u(v,{onClick:_}):n.jsx("a",{href:v.href,onClick:_,"aria-current":v.current?"page":void 0,children:v.label});return n.jsxs("header",{className:l?`landing-header ${l}`:"landing-header",children:[n.jsxs("div",{className:g,children:[e!=null&&(()=>{const v=typeof e=="string"?n.jsx("img",{src:e,alt:t,className:"landing-header__logo"}):e;return r?n.jsx("a",{href:r,className:"landing-header__brand",children:v}):n.jsx("div",{className:"landing-header__brand",children:v})})(),a.length>0&&n.jsx("nav",{className:"landing-header__links",children:a.map((v,_)=>n.jsx("span",{children:y(v)},`${_}:${v.href}`))}),n.jsxs("div",{className:"landing-header__actions",children:[s,a.length>0&&n.jsx("button",{ref:x,type:"button",onClick:()=>m(v=>!v),"aria-expanded":d,"aria-controls":C,"aria-label":d?h.close:h.open,className:d?"landing-header__toggle landing-header__toggle--open":"landing-header__toggle",children:n.jsxs("span",{className:"landing-header__burger",children:[n.jsx("span",{}),n.jsx("span",{}),n.jsx("span",{})]})})]})]}),a.length>0&&n.jsx("nav",{id:C,hidden:!d,className:"landing-header__drawer",children:n.jsx("div",{className:i??void 0,children:a.map((v,_)=>n.jsx("span",{className:"landing-header__drawer-item",children:y(v,()=>m(!1))},`${_}:${v.href}`))})})]})}function Lw({children:e,action:t,onClick:r,className:a}){const s=r?"bottom-sticky__inner bottom-sticky__inner--clickable":"bottom-sticky__inner";return n.jsx("div",{className:a?`bottom-sticky ${a}`:"bottom-sticky",children:n.jsxs("div",{className:s,onClick:r,...id(r),children:[n.jsx("div",{className:"bottom-sticky__content",children:e}),t]})})}function Rw({mountedRef:e}){const t=o.useRef({phase:"sound",at:0}),r=o.useRef(0),a=o.useRef(null),s=o.useRef(null),l=o.useCallback(()=>{const g=t.current,y=g.phase!=="sound"&&g.at>0;s.current=y?{phase:g.phase,elapsed:Math.max(0,Date.now()-g.at)}:null},[]),i=o.useCallback(()=>{const g=s.current;return s.current=null,g},[]),u=o.useCallback(()=>{r.current+=1,t.current={phase:"sound",at:0}},[]),c=o.useCallback((g,y,v=0)=>{if(!(g>0))return Promise.resolve(!0);const _=r.current;return t.current={phase:y,at:Date.now()-Math.max(0,v)},new Promise(b=>{const B=setTimeout(()=>{a.current===B&&(a.current=null),b(!!e.current&&_===r.current)},g);a.current=B})},[e]),p=o.useCallback(()=>{t.current={phase:"sound",at:Date.now()}},[]),h=o.useCallback(()=>{t.current={phase:"sound",at:0}},[]),d=o.useCallback(()=>{const g=t.current;return g.phase!=="sound"&&g.at>0},[]),m=o.useCallback(()=>r.current,[]),C=o.useCallback(g=>g===r.current,[]),x=o.useCallback(()=>{r.current+=1},[]);return o.useEffect(()=>()=>{a.current&&(clearTimeout(a.current),a.current=null)},[]),o.useMemo(()=>({positionRef:t,isRunning:d,generation:m,isCurrent:C,abort:u,waitPad:c,enterSound:p,leave:h,pause:l,resume:i,__bumpGenerationForTest:x}),[d,m,C,u,c,p,h,l,i,x])}const Fr=9,Pw=e=>Math.round(Math.min(Fr,Math.max(0,e))/Fr*100),Fw=e=>e/100*Fr,ga=2,Fd=.1,Iw=e=>Math.min(ga,Math.max(0,e)),Ow=.1,zw=e=>Math.round(e*1e6)/1e6;function ba(e){const{noiseRatio:t}=e;if(typeof t=="number"&&Number.isFinite(t))return Iw(t);const r=Math.min(Fr,Math.max(0,Number(e.level)||0))/Fr,a=Number(e.mainVolume);return a>0?r>0?zw(Math.min(ga,Math.max(Ow,r/a))):0:1}const Id=e=>Math.min(1,Math.max(0,Number(e.mainVolume)||0));function Od(e){return Id(e)}function Ys(e){return Id(e)*ba(e)}function Zs(e,t=rb()){const r=Number.isFinite(t)&&t>0?t:1;return Math.min(1,Ys(e)/r)}function Cr(e,t){const r={...e,...t??{}};return t&&"level"in t&&typeof t.noiseRatio!="number"&&(r.noiseRatio=ba({level:r.level,mainVolume:r.mainVolume})),r}const gr={enabled:!0,type:"defaultNoise",level:4.5,noiseRatio:1,speed:1,mainVolume:1,mainSpeed:1},Xs=o.createContext(null);function Xa(){return o.useContext(Xs)}const Js=e=>`${nb()}/${e}`,zd=e=>Array.from({length:10},(t,r)=>Js(`${e}-${String(r+1).padStart(2,"0")}.mp3`)),Ja={get defaultNoise(){return Js("noise1.mp3")},get street(){return zd("noise2")},get restaurant(){return zd("noise3")},get buzz(){return Js("noise4.mp3")}};function Ww(e){const t=Math.floor(Math.random()*10);switch(e){case"defaultNoise":return Ja.defaultNoise;case"street":return Ja.street[t];case"restaurant":return Ja.restaurant[t];case"buzz":return Ja.buzz;default:return null}}function Hw({noisePlayer:e,audioRef:t,playbackStateRef:r,sequencer:a}){const s=o.useRef(e?.registerAnalyser);s.current=e?.registerAnalyser;const l=o.useRef(null),[i,u]=o.useState(null),c=o.useRef(null),p=o.useRef(null),h=o.useRef(null),d=o.useRef(null),m=o.useRef(0),C=o.useRef(null),x=o.useCallback(()=>!!a?.isRunning(),[a]),g=o.useCallback(()=>{d.current!==null&&(cancelAnimationFrame(d.current),d.current=null),C.current!==null&&(clearTimeout(C.current),C.current=null)},[]),y=o.useCallback((N,f=250)=>{const w=l.current;if(!w)return;const k=p.current;if(k){p.current=null;try{w.pause()}catch{}w.src=k,w.load()}if(!w.src)return;m.current+=1,g();try{jo(),_a(w).then(j=>{if(l.current===w)try{s.current?.("noise",j)}catch{}})}catch{}const E=w.paused?0:wa(w);w.paused&&Qn(w,0),w.play().catch(()=>{});const A=performance.now(),D=()=>{const j=Math.min(1,(performance.now()-A)/f);try{Qn(w,E+(N-E)*j)}catch{}j<1?d.current=requestAnimationFrame(D):d.current=null};d.current=requestAnimationFrame(D)},[g]),v=o.useCallback((N=250,f)=>{const w=l.current;if(!w||w.paused){f?.();return}const k=++m.current;g();const E=performance.now(),A=wa(w),D=()=>{const j=Math.min(1,(performance.now()-E)/N);try{Qn(w,A*(1-j))}catch{}if(j<1)d.current=requestAnimationFrame(D);else{d.current=null,C.current!==null&&(clearTimeout(C.current),C.current=null);try{w.pause()}catch{}f?.()}};d.current=requestAnimationFrame(D),C.current=setTimeout(()=>{if(C.current=null,m.current===k){d.current!==null&&(cancelAnimationFrame(d.current),d.current=null);try{w.paused||(Qn(w,0),w.pause(),f?.())}catch{}}},N+150)},[g]);o.useEffect(()=>{const N=document.createElement("audio");return N.loop=!0,N.crossOrigin="anonymous",l.current=N,()=>{g();try{N.pause(),N.removeAttribute("src"),N.load()}catch{}l.current=null,c.current=null,p.current=null}},[g]);const _=e?Zs(e.settings):0,b=!!e?.settings.enabled&&_>0;o.useEffect(()=>{if(!b)return;let N=0;const f=setInterval(()=>{const w=l.current;if(!w||w.paused){N=0;return}const k=t.current;if(k&&!k.paused&&!k.ended||x()||r.current==="playing"){N=0;return}N+=1,N>=2&&(N=0,v())},400);return()=>clearInterval(f)},[v,b,t,r,x]),o.useEffect(()=>{const N=()=>{const f=l.current;if(document.hidden){if(f&&!f.paused){g();try{f.pause()}catch{}}return}if(!f||!f.paused)return;const w=t.current,k=!!w&&!w.paused&&!w.ended||x()||r.current==="playing",E=h.current;k&&E?.enabled&&E.volume>0&&y(E.volume)};return document.addEventListener("visibilitychange",N),()=>document.removeEventListener("visibilitychange",N)},[g,y,t,r,x]),o.useEffect(()=>{h.current=e?{enabled:e.settings.enabled,volume:_,type:e.settings.type}:null},[e,e?.settings.enabled,_,e?.settings.type]);const B=o.useRef(null);return o.useEffect(()=>()=>{B.current?.(),B.current=null},[]),o.useEffect(()=>{const N=e?.settings,f=l.current;if(!f)return;const w=N?Zs(N):0;if(!N||!N.enabled||w===0){v();return}if(c.current!==N.type){const k=Ww(N.type);k&&(c.current=N.type,u(k),p.current=k,v(150,()=>{if(p.current!==k)return;p.current=null,f.src=k,f.load();const E=t.current;if(E&&!E.paused||x()){B.current?.();const A=()=>{f.removeEventListener("canplay",A),B.current===D&&(B.current=null);const j=t.current,$=h.current;(j&&!j.paused&&!j.ended||x())&&$?.enabled&&$.volume>0&&y($.volume)},D=()=>f.removeEventListener("canplay",A);B.current=D,f.addEventListener("canplay",A)}}))}else{const k=t.current,E=!!k&&!k.paused&&!k.ended||x()||r.current==="playing";if(E&&p.current)y(w);else if(E&&f.paused&&f.src)y(w);else if(!f.paused)if(!E)v();else{g();const A=wa(f),D=performance.now(),j=()=>{const $=Math.min(1,(performance.now()-D)/150);try{Qn(f,A+(w-A)*$)}catch{}$<1?d.current=requestAnimationFrame(j):d.current=null};d.current=requestAnimationFrame(j)}}},[e?.settings,e?.settings.enabled,_,e?.settings.type,g,y,v,t,r,h,x]),o.useEffect(()=>{const N=l.current;if(N)try{N.playbackRate=Math.min(1.25,Math.max(.75,e?.settings.speed??1))}catch{}},[e?.settings.speed]),{noiseAudioRef:l,activeNoiseUrl:i,noiseSettingsRef:h,cancelNoiseFade:g,fadeInNoise:y,fadeOutNoise:v}}function Vw({ttsText:e,playbackRate:t,mainVolume:r,fillRef:a,waveProgressRef:s,setProgress:l,setPlaybackState:i,setStateLocal:u,fadeInNoise:c,fadeOutNoise:p,noiseSettingsRef:h,onDoneRef:d,handleEndRef:m}){const C=o.useRef(null),x=o.useRef(0),g=o.useRef(null),y=o.useRef(0),v=o.useRef(!1);o.useEffect(()=>()=>{y.current++;try{if(g.current&&(cancelAnimationFrame(g.current),g.current=null),v.current&&window.speechSynthesis){try{window.speechSynthesis.cancel()}catch{}v.current=!1}}catch{}},[]);const _=(N,f=1)=>{try{const w=(N||"").trim().split(/\s+/).filter(Boolean).length||Math.max(1,(N||"").length);return Math.max(700,Math.round(w*300/Math.max(.25,f)))}catch{return 1200}},b=o.useCallback(N=>{if(typeof window>"u"||!window.speechSynthesis){try{typeof d.current=="function"&&d.current(!1)}catch{}return}const f=window.speechSynthesis,w=++y.current;try{try{f.cancel()}catch{}const k=N??e,E=Array.isArray(k)?k.filter(F=>!!F):[k||""];E.length===0&&E.push("");const A=Math.max(.3,Math.min(3,t));x.current=E.reduce((F,U)=>F+_(U,A||1),0),C.current=performance.now(),l(0),i("playing"),u("playMode");const D=h.current;D?.enabled&&(D?.volume??0)>0&&c(D.volume);const j=()=>{try{const F=C.current||performance.now(),U=performance.now()-F,T=x.current||1200,I=Math.min(1,U/T);try{a.current&&(a.current.style.left=`${I*100}%`),s.current&&s.current.style.setProperty("--progress",String(I))}catch{}I<1&&(g.current=requestAnimationFrame(j))}catch{}},$=()=>{if(w===y.current)try{g.current&&(cancelAnimationFrame(g.current),g.current=null),l(1),i("stopped");try{m.current?.()}catch{try{typeof d.current=="function"&&d.current(!0)}catch{}}}catch{}},H=F=>{const U=new SpeechSynthesisUtterance(E[F]);try{U.rate=A}catch{}try{U.volume=Math.max(0,Math.min(1,r))}catch{}U.onend=()=>{if(w===y.current){if(F<E.length-1){try{H(F+1)}catch{$()}return}$()}},U.onerror=()=>{$()},U.onstart=()=>{if(!(F>0))try{g.current&&(cancelAnimationFrame(g.current),g.current=null),g.current=requestAnimationFrame(j)}catch{}},v.current=!0,f.speak(U)};try{H(0)}catch{try{typeof d.current=="function"&&d.current(!0)}catch{}}}catch{try{typeof d.current=="function"&&d.current(!0)}catch{}}},[e,t,r,c,a,s,l,i,u,h,d,m]),B=o.useCallback(()=>{y.current++;try{if(window.speechSynthesis)try{window.speechSynthesis.cancel()}catch{}g.current&&(cancelAnimationFrame(g.current),g.current=null),p(),C.current=null}catch{}i("stopped"),u("active"),l(0)},[p,i,u,l]);return{startTTS:b,stopTTS:B}}const qw=.01,Uw=.3;async function Gw(e,t,r,a=!1){let s=null;try{const l=window.AudioContext||window.webkitAudioContext;s=new l;const i=await s.decodeAudioData(e.slice(0)),u=i.numberOfChannels>0?i.getChannelData(0):null;if(!u)return null;let c=0;if(a){const C=Math.floor(Uw*i.sampleRate),x=Math.min(u.length,C);for(;c<x&&Math.abs(u[c])<=qw;)c++;c>=x&&(c=0)}const p=u.length-c,h=r&&r>0?Math.min(p,Math.floor(r*i.sampleRate)):p,d=Math.max(t,h),m=Math.floor(d/t)||1;return new Array(t).fill(0).map((C,x)=>{const g=c+x*m,y=Math.min(g+m,c+d,u.length);let v=0;for(let _=g;_<y;_++){const b=Math.abs(u[_]);b>v&&(v=b)}return v})}catch{return null}finally{try{s?.close?.()}catch{}}}async function Wd(e,t,r,a=!1){try{const s=await fetch(e);if(s.ok===!1)return null;const l=await s.arrayBuffer();return await Gw(l,t,r,a)}catch(s){try{const l=$o(s)}catch{}return null}}const Qs=45,Kw=74,Yw=2;function Qa(e){const t=Math.min(2,Math.max(0,Number(e)||0));return t<=1?t*45:45+(t-1)*29}function eo(e){return Qa(e)/45}const Zw=e=>Math.max(0,(typeof e=="number"&&Number.isFinite(e)?e:0)*1e3),Hd=e=>Math.max(0,typeof e=="number"&&Number.isFinite(e)?e:0);function Vd({durationsSec:e,leadInMs:t=0,tailMs:r=0}){const a=Hd(t),s=Hd(r),l=[];let i=0;return e.forEach((u,c)=>{for(const[p,h]of[["lead",a],["sound",Zw(u)],["tail",s]])l.push({kind:p,track:c,startMs:i,durMs:h}),i+=h}),{segments:l,totalMs:i,trackCount:e.length}}function qd(e,t){const r=(t|0)*3;if(t<0||r+2>=e.segments.length)return null;const[a,s,l]=[e.segments[r],e.segments[r+1],e.segments[r+2]];return{lead:a,sound:s,tail:l,totalMs:a.durMs+s.durMs+l.durMs}}function Xw(e,t){const r=qd(e,t.track);if(!r||!(r.totalMs>0))return 0;const a=r[t.kind],s=Math.min(Math.max(0,Number.isFinite(t.elapsedMs)?t.elapsedMs:0),a.durMs);return Math.max(0,Math.min(1,(a.startMs-r.lead.startMs+s)/r.totalMs))}function Jw(e,t,r){const a=Math.max(0,Math.floor(r)),s=qd(e,t);if(!s||a===0||!(s.totalMs>0)||s.lead.durMs===0&&s.tail.durMs===0||!(s.sound.durMs>0))return{lead:0,sound:a,tail:0};const l=Math.round(s.lead.durMs/s.totalMs*a),i=Math.round(s.tail.durMs/s.totalMs*a),u=Math.max(1,a-l-i),c=l+u+i-a;return{lead:Math.max(0,l-Math.ceil(c/2)),sound:u,tail:Math.max(0,i-Math.floor(c/2))}}function Qw({currentTime:e,sources:t,index:r,audioDuration:a}){const s=r||0,l=Array.isArray(t)&&t.length>0?t[s]:void 0,i=l?l.duration||a||0:a||0;if(!(i>0))return 0;const u=Number.isFinite(e)?e:0;return Math.max(0,Math.min(1,u/i))}function e8({phase:e,phaseElapsedMs:t,currentTime:r,trackDurationSec:a,leadInMs:s,tailMs:l}){const i=Vd({durationsSec:[a],leadInMs:s,tailMs:l});return Xw(i,{track:0,kind:e,elapsedMs:e==="sound"?(Number.isFinite(r)?r:0)*1e3:t})}function t8({bars:e,trackDurationSec:t,leadInMs:r,tailMs:a}){return Jw(Vd({durationsSec:[t],leadInMs:r,tailMs:a}),0,e)}function n8(e,t){if(!Array.isArray(e))return null;const r=t||0;return r<e.length-1?r+1:null}function r8({ended:e,completedByEnd:t}){return!!e||!!t}function a8(e){return e.map((t,r)=>({src:t.src,label:String(r+1),color:void 0,duration:t.duration||0}))}function o8(e){return e.reduce((t,r)=>t+(r.duration||0),0)}function s8(e,t,r){const a=Array.isArray(e)?e:e?[e]:[],s=[];for(const l of a)if(l){if(typeof l=="object"&&l!==null&&"src"in l&&l.src){const i=l;s.push({code:i.code??null,src:i.src});continue}if(typeof l=="string"&&(l.startsWith("http")||l.includes("/"))){s.push({code:null,src:l});continue}if(typeof l=="string"||typeof l=="number"){const i=String(l),u=r(i,t);u&&s.push({code:i,resolvedPath:u})}}return s}function l8(e,t){if(!t||e.readyState<1)return!0;const r=e.currentSrc||e.src;return r?Ud(r)!==Ud(t):!0}function Ud(e){try{return new URL(e,typeof location>"u"?"http://localhost/":location.href).href}catch{return e}}const Gd=4,i8=eo(Gd/Qs);function u8(e){const{src:t,segments:r,progress:a=0,waveProgressRef:s,noiseSrc:l,noiseRatio:i=0,noiseSpeed:u=1,totalDuration:c=0,mainVolume:p=1,onReadyChange:h,showSoundWaveForm:d=!0,leadInMs:m=0,tailMs:C=0,trackDurationSec:x=0}=e,g=o.useRef(null),y=o.useRef(null),[v,_]=o.useState(null),[b,B]=o.useState(!1),[N,f]=o.useState(null),[w,k]=o.useState(2),[E,A]=o.useState(0),[D,j]=o.useState(null),[$,H]=o.useState(!1),[F,U]=o.useState(!1),T=3,I=3,z=1,ie=300,te=o.useRef(0),P=o.useCallback(()=>{const oe=g.current,ee=y&&y.current?y.current:oe?oe.closest(".audio-player__wave"):null,be=ee?ee.getBoundingClientRect():oe?oe.getBoundingClientRect():null,je=be?be.width:0,De=be?Math.max(100,be.width):320,we=be?be.height:0,ze=Math.max(z,Math.min(ie,Math.floor((De+I)/(T+I)))),ye=ze*T,_e=Math.max(0,ze-1),ve=Math.max(0,_e>0?(De-ye)/_e:I);return{bars:ze,gap:ve,height:we,width:je}},[]),G=o.useRef(void 0),X=o.useRef(null),K=o.useCallback(async(oe,ee,{quiet:be=!1}={})=>{const je=++te.current,De=()=>te.current===je;try{if(be||B(!1),G.current=oe,!oe){De()&&_(null);return}let we=ee;if(!we)try{for(let _e=0;_e<4&&!(g.current||y.current);_e++)await new Promise(ve=>requestAnimationFrame(ve));await new Promise(_e=>requestAnimationFrame(_e));const ye=P();ye.height>0&&A(ye.height),we=ye.bars,k(ye.gap)}catch{we=120}X.current=we;const ze=await Wd(oe,we);if(!De())return;if(!ze){_(null),B(!1);return}_(ze),f(we),B(!0)}catch{if(!De())return;_(null),B(!1)}},[B,_,A,k,f,P]);o.useEffect(()=>{const oe=y.current;if(!oe||typeof ResizeObserver>"u")return;let ee=null;const be=new ResizeObserver(()=>{ee!==null&&cancelAnimationFrame(ee),ee=requestAnimationFrame(()=>{ee=null;try{const je=P();if(je.width<=0||(je.height>0&&A(je.height),X.current===null||je.bars===X.current))return;const De=G.current;k(je.gap),De?K(De,je.bars,{quiet:!0}).catch(()=>{}):X.current=je.bars}catch{}})});return be.observe(oe),()=>{be.disconnect(),ee!==null&&cancelAnimationFrame(ee)}},[P,K]),o.useEffect(()=>{const oe=r&&r[0]&&r[0].src||t||r&&r.length===1&&r[0]&&r[0].src;K(typeof oe=="string"?oe:void 0).catch(()=>{}),U(!1)},[t,r,K]),o.useEffect(()=>{let oe=!1;if(H(!1),j(null),!l||!N)return;const ee=c>0?c*(u||1):void 0;return Wd(l,N,ee,!0).then(be=>{oe||(j(be),be||H(!0))}).catch(()=>{oe||(j(null),H(!0))}),()=>{oe=!0}},[l,N,c,u]);const L=Math.max(0,Math.min(1,p)),R=o.useMemo(()=>v&&v.length&&Math.max(...v)||1,[v]),S=N||40,V=o.useMemo(()=>t8({bars:S,trackDurationSec:x,leadInMs:m,tailMs:C}),[S,x,m,C]),ae=o.useMemo(()=>Array.from({length:S}).map((oe,ee)=>{const be=ee>=V.lead&&ee<V.lead+V.sound,je=V.sound>0&&be?Math.min(S-1,Math.round((ee-V.lead)/V.sound*S)):-1,De=be?v&&v[je]!=null?v[je]:null:v?0:null,we=De==null?null:Math.min(1,De/R*L),ze=we!=null&&E>0&&Qa(we)<=Gd,ye=we==null?.15:ze?0:eo(we),_e=ze,ve=S>1?ee/(S-1):0;return n.jsx("div",{className:_e?"audio-player__bar audio-player__bar--hidden":"audio-player__bar",style:{"--val":ye,"--i":ee,"--mix":ve}},ee)}),[S,v,R,L,E,V]),ne={"--progress":String(Math.max(0,Math.min(1,a)))},re=o.useMemo(()=>D&&D.length&&Math.max(...D.map(oe=>Number.isFinite(oe)?Math.abs(oe):0))||1,[D]),ue=L*Math.max(0,i),Be=!l||!D||!D.length?1:Math.max(1,ue),le={"--bar-gap":`${w}px`,"--wave-h":`${Qa(Be)}px`,"--wave-h1":`${Qs}px`},J=b&&(l?!!D||$:!0);o.useEffect(()=>{J&&U(!0)},[J]);const O=F?b:J;o.useEffect(()=>{h?.(O)},[O,h]);const W=N||40,q=o.useMemo(()=>Array.from({length:W}).map((oe,ee)=>{const be=D&&D[ee]!=null?D[ee]:null,je=be==null?0:Math.abs(be)/re*ue,De=Math.max(i8,eo(je)),we=W>1?ee/(W-1):0;return n.jsx("div",{className:"audio-player__bar",style:{"--val":De,"--i":ee,"--mix":we}},ee)}),[W,D,re,ue,E]);return n.jsxs("div",{className:"audio-player__wave",ref:y,style:le,children:[l&&n.jsx("div",{className:`audio-player__wave-noise ${J?"is-ready":""}`,"aria-hidden":"true",children:q}),d&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:`audio-player__wave-inner audio-player__wave-unplayed ${O?"is-ready":""}`,ref:g,children:ae}),n.jsx("div",{className:`audio-player__wave-inner audio-player__wave-played ${O?"is-ready":""}`,ref:s,style:ne,children:ae})]})]})}const Kd={idle:!1,synthesizing:!0,resolving:!0,checking_exists:!0,getting_signed_url:!0,downloading:!0,measuring_duration:!0,ready:!1,error:!0};function el(e,t){return new Promise((r,a)=>{const s=document.createElement("audio");let l=!1;const i=()=>{try{s.removeAttribute("src"),s.load()}catch{}},u=()=>{if(l)return;l=!0;const p=isFinite(s.duration)&&s.duration||0;i(),r(p)},c=p=>{l||(l=!0,i(),t.rejectOnError?a(new Error(p)):r(0))};s.addEventListener("loadedmetadata",u),s.addEventListener("error",()=>c("audio load failed")),setTimeout(()=>c("audio load timeout"),t.timeoutMs),s.src=e})}const c8=2e3;function Yd(e,t=c8){return new Promise(r=>{let a=!1;const s=()=>{a||(a=!0,r())};e.addEventListener("canplay",s,{once:!0}),e.addEventListener("error",s,{once:!0}),setTimeout(s,t)})}function d8({showSoundWaveForm:e,showNoiseWaveForm:t,timeoutMs:r=2500}){const a=o.useRef(!1),s=o.useRef([]),l=o.useCallback(c=>{if(a.current=c,!c||!s.current.length)return;const p=s.current;s.current=[];for(const h of p)h(!0)},[]),i=o.useCallback(()=>{a.current=!1},[]),u=o.useCallback(()=>!e&&!t||a.current?Promise.resolve(!0):new Promise(c=>{const p=d=>{clearTimeout(h),s.current=s.current.filter(m=>m!==p),c(d)},h=setTimeout(()=>p(!0),r);s.current.push(p)}),[e,t,r]);return o.useEffect(()=>()=>{const c=s.current;s.current=[];for(const p of c)p(!1)},[]),{onReadyChange:l,waitForReady:u,markNotReady:i}}function p8(){const e=o.useRef([]),t=o.useCallback(s=>(e.current.push(s),s),[]),r=o.useCallback(s=>{const l=new Set([...s].filter(Boolean));e.current=e.current.filter(i=>{if(l.has(i))return!0;try{URL.revokeObjectURL(i)}catch{}return!1})},[]),a=o.useCallback(()=>{r([])},[r]);return o.useEffect(()=>()=>{for(const s of e.current)try{URL.revokeObjectURL(s)}catch{}e.current=[]},[]),{track:t,keepOnly:r,revokeAll:a}}function h8({offsetY:e=8}={}){const t=o.useRef(null),[r,a]=o.useState(null),s=o.useCallback(()=>a(null),[]),l=o.useCallback(()=>{try{const i=t.current?.getBoundingClientRect();if(!i)return;a({left:i.left,right:i.right,width:i.width,height:i.height,x:i.x,top:i.top+e,bottom:i.bottom+e,y:i.y+e,toJSON:i.toJSON.bind(i)})}catch{}},[e]);return o.useEffect(()=>{if(r)return document.addEventListener("mousedown",s),()=>document.removeEventListener("mousedown",s)},[r,s]),{ref:t,rect:r,show:l,hide:s}}function m8(e){if(!e)return 0;const t=e.duration;if(Number.isFinite(t)&&t>0)return t;if(t===0)return 0;try{const r=e.seekable;if(r&&r.length>0){const a=r.end(r.length-1);if(Number.isFinite(a)&&a>0)return a}}catch{}return null}const f8=400,C8=2e3,Zd=5;function g8({audioRef:e,fillRef:t,waveProgressRef:r,sourcesRef:a,currentIndexRef:s,sequencer:l,leadInMs:i=0,tailMs:u=0}){const c=o.useRef(null),p=o.useRef(0),h=o.useRef(null),d=o.useCallback(()=>{c.current!==null&&(cancelAnimationFrame(c.current),c.current=null)},[]),m=o.useCallback(()=>{if(c.current!==null)return;let x=0;const g=()=>{if(Zn){const y=typeof performance<"u"&&performance.now?performance.now():Date.now();if(x>0&&y-x>f8){const v=h.current===null||y-h.current>C8;if(h.current=y,v&&p.current<Zd){p.current+=1;const _=p.current;let b=null;try{b=typeof document<"u"?document.visibilityState:null}catch{}Tt(`progress-ticker-slow-frames#${_}`,`[ihab-core] \uC9C4\uD589 \uC0AC\uC2AC\uC758 \uD2C0 \uC0AC\uC774\uAC00 ${Math.round(y-x)}ms \uC785\uB2C8\uB2E4(\uBCF4\uD1B5 16ms).`,b==="hidden"?"\uC774 \uCE78\uC774 **\uC228\uC5B4 \uC788\uC5B4** \uBE0C\uB77C\uC6B0\uC800\uAC00 \uD2C0\uC744 \uC904\uC600\uC2B5\uB2C8\uB2E4 \u2014 \uC7AC\uC0DD\uBC14\xB7\uD30C\uD615\uC740 \uD2C0\uB9C8\uB2E4 \uADF8\uB824\uC9C0\uBBC0\uB85C, \uC9C0\uAE08 \uC7AC\uB294 \uAC12\uC740 **\uC0AC\uB78C\uC774 \uBCF4\uB294 \uD654\uBA74\uACFC \uB2E4\uB985\uB2C8\uB2E4.** \uCE78\uC744 \uC55E\uC73C\uB85C \uAEBC\uB0B4\uACE0 \uB2E4\uC2DC \uC7AC\uC2ED\uC2DC\uC624.":"\uCE78\uC740 \uBCF4\uC774\uB294\uB370 \uD2C0\uC774 \uB290\uB9BD\uB2C8\uB2E4 \u2014 \uAC19\uC740 \uD654\uBA74\uC5D0\uC11C \uBB34\uAC70\uC6B4 \uC77C\uC774 \uB3C4\uB294\uC9C0 \uBCF4\uC2ED\uC2DC\uC624. \uC7AC\uC0DD\uBC14\xB7\uD30C\uD615\uC774 \uB04A\uACA8 \uBCF4\uC774\uB294 \uAC83\uC740 \uC774 \uD0D3\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4.",_>=Zd?`(${_}\uBC88\uC9F8 \u2014 \uB354\uB294 \uC548 \uC54C\uB9BD\uB2C8\uB2E4)`:`(${_}\uBC88\uC9F8)`)}}x=y}try{const y=e.current,v=Array.isArray(a.current)?a.current[s.current||0]:void 0,_=!!v&&Number.isFinite(v.duration)&&(v.duration??0)>0,b=_?0:m8(y),B=t.current,N=(i||0)>0||(u||0)>0,f=N&&(l?.positionRef.current?.phase??"sound")!=="sound";if(b===null&&!f)try{B&&B.style.visibility!=="hidden"&&(B.style.visibility="hidden")}catch{}else{const w=_?v.duration:b||0;Zn&&f&&!(w>0)&&Tt("progress-ticker-pad-without-duration","[ihab-core] \uB738\uC774 \uB3C4\uB294\uB370 **\uC18C\uB9AC \uAE38\uC774\uB97C \uBAA8\uB985\uB2C8\uB2E4** \u2014 \uC7AC\uC0DD\uBC14\uAC00 \uB738\uB9CC\uC73C\uB85C \uC5B4\uB9BC\uC7A1\uC544 \uC6C0\uC9C1\uC785\uB2C8\uB2E4.","\uC18C\uB9AC \uAE38\uC774 \uC7AC\uAE30(measureAudioDuration)\uAC00 0 \uC744 \uC92C\uAC70\uB098 `<audio>` \uAC00 \uC544\uC9C1 \uC548 \uC2E4\uB838\uC2B5\uB2C8\uB2E4. \uAE38\uC774\uB97C \uC54C\uAC8C \uB418\uBA74 \uB9C8\uCEE4\uAC00 \uADF8 \uC21C\uAC04 **\uB4A4\uB85C \uBB3C\uB7EC\uB0A9\uB2C8\uB2E4**(\uC5B4\uB9BC\uC740 \uB298 \uCC38\uBCF4\uB2E4 \uD07D\uB2C8\uB2E4). \uC774 \uC904\uC774 \uBCF4\uC774\uBA74 \uADF8 \uC790\uB9AC\uB97C \uC54C\uB824 \uC8FC\uC2ED\uC2DC\uC624 \u2014 \uD3C9\uC18C \uAE38\uC5D0\uC11C\uB294 \uC548 \uB098\uC640\uC57C \uD569\uB2C8\uB2E4.");const k=N?e8({phase:l?.positionRef.current?.phase??"sound",phaseElapsedMs:l?.positionRef.current?Math.max(0,Date.now()-l.positionRef.current.at):0,currentTime:y&&typeof y.currentTime=="number"?y.currentTime:0,trackDurationSec:w,leadInMs:i||0,tailMs:u||0}):Qw({currentTime:y&&typeof y.currentTime=="number"?y.currentTime:0,sources:a.current,index:s.current,audioDuration:b??0});try{B&&(B.style.visibility&&(B.style.visibility=""),B.style.left=`${k*100}%`)}catch{}try{r.current?.style.setProperty("--progress",String(k))}catch{}}}catch{}c.current=requestAnimationFrame(g)};c.current=requestAnimationFrame(g)},[e,t,r,a,s,l,i,u]),C=o.useCallback(x=>{d();try{t.current&&(t.current.style.visibility="",t.current.style.left=`${x*100}%`)}catch{}try{r.current?.style.setProperty("--progress",String(x))}catch{}},[d,t,r]);return o.useEffect(()=>d,[d]),{start:m,stop:d,settleTo:C}}function tl({btnLabel:e,soundSrc:t,bucketPath:r,onDone:a,disabled:s=!1,ttsText:l=null,className:i,showSoundWaveForm:u=!0,showNoiseWaveForm:c=!0,leadInMs:p=0,tailMs:h=0}){const{t:d}=Ne.useTranslation(),m=e,C=Xa(),x=o.useRef(C?.registerAnalyser);o.useEffect(()=>{x.current=C?.registerAnalyser});const g=o.useRef(null),y=o.useRef(null),v=o.useRef(null),_=p8(),b=o.useRef(null),B=o.useRef(!1),N=o.useRef(null),{ref:f,rect:w,show:k,hide:E}=h8();o.useEffect(()=>()=>{x.current?.("main",null),x.current?.("noise",null)},[]);const[A,D]=o.useState(!1),[j,$]=o.useState("idle"),[H,F]=o.useState("stopped"),U=o.useRef("stopped");o.useEffect(()=>{U.current=H},[H]);const[T,I]=o.useState(0),[z,ie]=o.useState("active"),te=o.useRef(!1);o.useEffect(()=>{if(z!=="playMode"||!te.current)return;te.current=!1;const Y=typeof document<"u"?document.activeElement:null;if(Y&&Y!==document.body)return;const de=v.current?.querySelectorAll("button")[1];try{de?.focus()}catch{}},[z]);const[P,G]=o.useState(null),[X,K]=o.useState(null),[L,R]=o.useState(0),[S,V]=o.useState(!1),[ae,ne]=o.useState(0),re=C?.playbackRate??1,ue=C?.mainVolume??1,Be=C?Ys(C.settings):0,le=C?Od(C.settings):ue,[J,O]=o.useState("idle"),[W,q]=o.useState(""),[oe]=o.useState("top"),ee=o.useRef(null),be=o.useRef(0),je=o.useRef(null),De=o.useRef(!0),we=Rw({mountedRef:De}),ze=o.useRef(null),ye=o.useRef(p),_e=o.useRef(h);o.useEffect(()=>{ye.current=Math.max(0,p||0)},[p]),o.useEffect(()=>{_e.current=Math.max(0,h||0)},[h]);const{start:ve,stop:Ee,settleTo:Oe}=g8({audioRef:g,fillRef:y,waveProgressRef:je,sourcesRef:ee,currentIndexRef:be,sequencer:we,leadInMs:p,tailMs:h}),{onReadyChange:ot,waitForReady:it,markNotReady:Fe}=d8({showSoundWaveForm:u,showNoiseWaveForm:c}),Ue=o.useRef(null),nt=o.useRef(s),Te=o.useRef(a),Xe=o.useRef(null),rt=o.useRef(!1),[ut,gt]=o.useState(!1),_t=o.useCallback(Y=>{rt.current=Y,gt(Y)},[]),pt=o.useRef(null),{activeNoiseUrl:Yt,noiseSettingsRef:kt,fadeInNoise:ct,fadeOutNoise:Ae}=Hw({noisePlayer:C,audioRef:g,playbackStateRef:U,sequencer:we}),{startTTS:st,stopTTS:ft}=Vw({ttsText:l,playbackRate:re,mainVolume:le,fillRef:y,waveProgressRef:je,setProgress:I,setPlaybackState:F,setStateLocal:ie,fadeInNoise:ct,fadeOutNoise:Ae,noiseSettingsRef:kt,onDoneRef:Te,handleEndRef:pt});o.useEffect(()=>{It.current=ft});const Ct=Y=>{if(typeof window>"u"||!window.speechSynthesis){try{q(d("training.ttsUnavailable","\uC774 \uAE30\uAE30\uC5D0\uC11C\uB294 \uC74C\uC131\uC744 \uB4E4\uB824\uC904 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."))}catch{}st(Y);return}he("tts"),st(Y)},Nt=Array.isArray(t)?t.filter(Boolean):t?[t]:[],Ft=(!Nt||Nt.length===0)&&!!l,yt=Array.isArray(P)&&P.length>0?P:Array.isArray(X)&&X.length>0?X:null,vt=Math.max(Array.isArray(yt)?yt.length:0,Nt.length);o.useEffect(()=>(De.current=!0,()=>{De.current=!1}),[]);const Et=()=>{we.abort()},It=o.useRef(null),Je=o.useRef(null),At=o.useRef(null),Qe=o.useRef(null);Qe.current||(Qe.current=()=>{At.current=null;const Y=g.current;if(Je.current==="audio"&&Y&&(!Y.paused||we.isRunning())){Et();try{Y.pause()}catch{}De.current&&(F("paused"),Ee(),Ae())}else if(Je.current==="tts")try{It.current?.()}catch{}});const he=Y=>{Je.current=Y,At.current=pa(Qe.current)},Le=()=>{At.current?.(),At.current=null};o.useEffect(()=>()=>{Qe.current&&Va(Qe.current)},[]);const Pe=o.useRef(re);o.useEffect(()=>{Pe.current=re||1},[re]);const We=o.useCallback(Y=>{const de=Pe.current||1;try{Y.defaultPlaybackRate=de}catch{}try{Y.playbackRate=de}catch{}},[]),dt=o.useCallback((Y,de)=>{if(!l8(Y,de)){try{Y.currentTime=0}catch{}We(Y);return}Y.src=de,We(Y),Y.load(),We(Y)},[We]),on=o.useCallback(()=>{Xe.current&&(clearTimeout(Xe.current),Xe.current=null),O("idle")},[]),ht=o.useCallback(async(Y,de=3,ke=50,$e=0)=>{on();const Ve=we.generation(),Ze=!!Y&&Y.currentTime>0&&!Y.ended,wt=Math.max(0,ye.current-Math.max(0,$e));if(wt>0&&!Ze){he("audio"),ve(),F("playing");const bt=kt.current;if(bt?.enabled&&(bt.volume??0)>0)try{ct(bt.volume)}catch{}if(!await we.waitPad(wt,"lead",$e)||!De.current||!we.isCurrent(Ve))return!1}we.enterSound();for(let bt=0;bt<de;bt++){if(!De.current||!we.isCurrent(Ve))return!1;try{return he("audio"),await Y.play(),!0}catch(ge){if((ge instanceof Error||typeof ge=="object"&&ge&&"name"in ge?ge.name:void 0)==="AbortError"){if(!we.isCurrent(Ve))return!1;await new Promise(M=>setTimeout(M,ke));continue}try{q(d("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}return!1}}try{q(d("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}return!1},[d,ve,we,ct,kt,on]),Ke=o.useCallback(Y=>{const de=we.generation(),ke=Math.max(0,_e.current-Math.max(0,Y));ve();const $e=kt.current;if($e?.enabled&&($e.volume??0)>0)try{ct($e.volume)}catch{}const Ve=()=>{try{ze.current?.()}catch{}};if(ke<=0){we.leave(),Ve();return}we.waitPad(ke,"tail",Y).then(Ze=>{we.leave(),Ze&&we.isCurrent(de)&&Ve()}).catch(()=>{})},[we,ve,ct,kt]),xt=o.useCallback(()=>{const Y=g.current;if(!Y)return;const de=()=>{F("playing"),ie("playMode"),V(!0),ve();try{jo(),_a(Y).then(Ze=>{if(De.current)try{x.current?.("main",Ze)}catch{}})}catch{}const Ve=kt.current;Ve?.enabled&&(Ve?.volume??0)>0&&ct(Ve.volume)},ke=()=>{r8({ended:!!Y?.ended,completedByEnd:rt.current})||(F("paused"),Ee(),Ae())},$e=()=>{const Ve=()=>{try{const Ze=ee.current,wt=n8(Ze,be.current);if(wt!==null){be.current=wt,R(wt),V(!0);const bt=Ze?.[wt]&&Ze[wt].src;if(bt&&Y){dt(Y,bt),ht(Y).catch(()=>{});return}}}catch{}F("stopped"),I(1);try{if(Y)try{Y.currentTime=0}catch{}}catch{}Ee(),V(!1),Ae();try{!nt.current&&pt.current&&pt.current()}catch{}};if(ze.current=Ve,_e.current>0){ve(),we.waitPad(_e.current,"tail").then(Ze=>{we.leave(),Ze&&Ve()}).catch(()=>{});return}Ve()};return Y.addEventListener("play",de),Y.addEventListener("pause",ke),Y.addEventListener("ended",$e),()=>{try{Y.removeEventListener("play",de),Y.removeEventListener("pause",ke),Y.removeEventListener("ended",$e),Ee()}catch{}}},[ct,Ae,ht,kt,ve,Ee,we]);o.useEffect(()=>xt(),[xt]),o.useEffect(()=>{nt.current=s},[s]),o.useEffect(()=>{Te.current=a},[a]),o.useEffect(()=>{if(s||z!=="active")return;const Y=N.current;if(!Y)return;let de=null;const ke=requestAnimationFrame(()=>{try{const $e=Y.getTotalLength();if(!$e)return;const Ve=$e*.2;Y.style.strokeDasharray=`${$e-Ve} ${Ve}`;const Ze="triFlow_"+Math.random().toString(36).slice(2);de=document.createElement("style"),de.textContent=`@keyframes ${Ze}{from{stroke-dashoffset:0}to{stroke-dashoffset:-${$e}}}`,document.head.appendChild(de),Y.style.animation=`${Ze} 2.4s linear infinite`}catch{}});return()=>{cancelAnimationFrame(ke),de?.remove()}},[z,s]),o.useEffect(()=>{ee.current=P},[P]),o.useEffect(()=>{be.current=L},[L]),o.useEffect(()=>{const Y=v.current,de=b.current;if(!Y||!de)return;let ke=null;const $e=32,Ve=60,Ze=()=>{try{const bt=Array.from(Y.querySelectorAll(":scope > .button"));let ge=0;bt.forEach(qe=>{if(qe===de)return;const tt=qe.getBoundingClientRect();ge+=tt.width});const M=Y.getBoundingClientRect().width,Z=Math.max(0,Math.floor(M-ge-8)),Ce=vt;if(!Ce||Z<=0){Array.from(de.children).forEach(qe=>{try{qe.style.width=""}catch{}});return}let Re=Math.floor(Z/Ce);Re>Ve&&(Re=Ve),Re<$e&&(Re=Math.max($e,Math.floor(Z/Ce))),Array.from(de.querySelectorAll(".button")).forEach(qe=>{try{qe.style.width=`${Re}px`}catch{}})}catch{}},wt=requestAnimationFrame(Ze);try{ke=new ResizeObserver(()=>{requestAnimationFrame(Ze)}),ke.observe(Y),ke.observe(de),window.addEventListener("resize",Ze)}catch{}return()=>{try{cancelAnimationFrame(wt)}catch{}try{ke&&(ke.disconnect(),ke=null)}catch{}try{window.removeEventListener("resize",Ze)}catch{}}},[P,X,vt]),o.useEffect(()=>()=>{try{Ue.current&&(clearTimeout(Ue.current),Ue.current=null),Xe.current&&(clearTimeout(Xe.current),Xe.current=null)}catch{}},[]);const jt=(Y,de)=>{G(Y),ne(de),Fe(),K(a8(Y)),ee.current=Y},Q=()=>{ie("playMode"),R(0),V(!0)},fe=async(Y,de)=>{_t(!1),B.current=!1,dt(Y,de),await Yd(Y),await it()!==!1&&(D(!1),Q(),await ht(Y))},Ge=async(Y,de=!1)=>{const ke=g.current;D(!0),$("measuring_duration");try{const $e=await el(Y,{timeoutMs:1e4,rejectOnError:!0});jt([{src:Y,objectUrl:null,duration:$e}],$e),$("ready"),de&&ke&&await fe(ke,Y)}finally{B.current=!1,D(!1)}},Ye=async(Y,de=!1)=>{const ke=g.current;D(!0),$("measuring_duration");try{const $e=await Promise.all(Y.map(Ze=>el(Ze,{timeoutMs:1e4})));if(!De.current)return;const Ve=Y.map((Ze,wt)=>({src:Ze,objectUrl:null,duration:$e[wt]||0}));jt(Ve,o8(Ve)),$("ready"),de&&ke&&Ve.length>0&&await fe(ke,Ve[0].src)}finally{B.current=!1,D(!1)}},at=async(Y=!1,de=!0)=>{const ke=g.current,$e=t?Array.isArray(t)?t:[t]:[];if(!$e||$e.length===0||!$e.some(Boolean))return!1;if(B.current)return null;B.current=!0,de&&D(!0),$("resolving");try{const Ve=s8(t,r,si),Ze=[];let wt=0;for(const bt of Ve){let ge=bt.src??null,M=null;if(!ge&&bt.resolvedPath){try{$("getting_signed_url"),ge=await li(bt.resolvedPath)}catch{ge=null}if(!De.current)return!1;if(!ge)try{$("downloading");const Ce=await ii(bt.resolvedPath);if(!De.current)return!1;if(Ce){const Re=Ce instanceof Blob?Ce:new Blob([Ce]);M=_.track(URL.createObjectURL(Re)),ge=M}}catch{$("error");try{q(d("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.")),ie("active")}catch{}}}if(!ge)continue;let Z=0;try{$("measuring_duration"),Z=await el(ge,{timeoutMs:3e3})}catch{Z=0}if(!De.current){if(M)try{URL.revokeObjectURL(M)}catch{}for(const Ce of Ze)if(Ce.objectUrl)try{URL.revokeObjectURL(Ce.objectUrl)}catch{}return!1}wt+=Z||0,Ze.push({...bt,src:ge,objectUrl:M,duration:Z})}if(jt(Ze,wt),Ze.length>0&&Y&&ke){const bt=Ze[0];_t(!1);try{_.keepOnly(Ze.map(ge=>ge.objectUrl))}catch{}if($("ready"),B.current=!1,bt.src&&ke)try{if(dt(ke,bt.src),await Yd(ke),await it()===!1)return!1;de&&D(!1),Q(),ke&&await ht(ke)}catch{de&&D(!1)}else de&&D(!1);ie("playMode"),R(0),V(!0)}return Ze.length>0}finally{B.current=!1,de&&D(!1),$(Ve=>Ve==="ready"?"ready":"idle")}},mt=async Y=>{const de=we.isRunning();if(Y.paused&&!de){if(rt.current){await Ot();return}const ke=we.resume();if(ke){if(F("playing"),ke.phase==="tail"){Ke(ke.elapsed);return}await ht(Y,3,50,ke.elapsed);return}await ht(Y),F("playing")}else we.pause(),Et(),Y.pause(),F("paused"),de&&(Ee(),Ae())},Mt=async()=>{const Y=g.current;if(!(!Y&&!Ft)){if(Ft){const de=window.speechSynthesis;if(z==="active"){const ke=Ur(),$e=Array.isArray(l)?l.filter(Boolean):l?[l]:[];if(ke&&$e.length>0){if(B.current)return;ie("load"),D(!0),$("synthesizing"),B.current=!0;try{const Ve=await Promise.all($e.map(Ze=>Promise.resolve(ke(Ze))));Ve.length>1?await Ye(Ve,!0):await Ge(Ve[0],!0)}catch{B.current=!1,D(!1),ie("active"),Ct($e.length>0?$e:void 0)}return}Ct($e.length>0?$e:void 0);return}if(z==="playMode"){const ke=!!de&&(de.speaking||de.paused)&&!(Y&&(Y.currentSrc||Y.getAttribute("src")));if(Y&&!ke){await mt(Y);return}try{if(de&&de.paused)try{he("tts"),de.resume(),F("playing")}catch{}else try{de.pause(),F("paused")}catch{}}catch{}}return}if(z==="active"){if(s&&Array.isArray(ee.current)&&ee.current.length>0){const ke=ee.current[0];try{if(ke.src&&Y)try{dt(Y,ke.src),Q(),Y&&await ht(Y)}catch{}Q();return}catch{}}ie("load");let de;try{de=await at(!0)}catch{de=!1}if(de===!1&&De.current){try{q(d("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}ie("active")}return}if(z!=="load"&&(z==="playMode"||z==="active"))try{Y&&await mt(Y)}catch(de){(de instanceof Error||typeof de=="object"&&de&&"name"in de)&&de.name}}},Ot=async()=>{const Y=g.current;if(Y)try{const de=ee.current;if(Array.isArray(de)&&de.length>1){await gn(0);return}_t(!1);try{Y.currentTime=0}catch{}Y&&await ht(Y),F("playing"),ie("playMode")}catch{}},Tn=()=>{Et(),Le(),It.current?.();const Y=g.current;try{if(Y){try{Y.pause()}catch{}try{Y.currentTime=0}catch{}}}catch{}Ae(),F("stopped"),ie("active"),I(0),V(!1)},Xt=async(Y,{sameSegment:de=!1}={})=>{Et();const ke=we.generation(),$e=g.current,Ve=ee.current?.[Y]?.src;try{if(_t(!1),R(Y),V(!0),be.current=Y,!Ve||!$e||(de||Fe(),dt($e,Ve),!de&&await it()===!1)||!we.isCurrent(ke)||(await ht($e),!we.isCurrent(ke)))return;F("playing"),ie("playMode")}catch{}},Mn=async()=>{const Y=ee.current,de=be.current||0;if(!Y||de<=0){await Ot();return}await Xt(de-1)},pn=async()=>{const Y=ee.current,de=be.current||0;if(!Y||de>=Y.length-1){Tn();return}await Xt(de+1)},Jt=()=>{if(rt.current)return;const Y=200,de=340;_t(!0),Et(),Le();try{I(1)}catch{}Oe(1);try{O("hold")}catch{}try{const ke=g.current,$e=Ft&&!!ke?.src;if(!Ft||$e){if(ke){ke.pause();try{ke.currentTime=0}catch{}}}else ft();Ae()}catch{}try{F("stopped")}catch{}if(V(!1),!nt.current)try{Xe.current&&(clearTimeout(Xe.current),Xe.current=null),Xe.current=setTimeout(()=>{try{O("out")}catch{}Xe.current=setTimeout(()=>{try{typeof Te.current=="function"&&Te.current(!0)}catch{}try{O("idle")}catch{}Xe.current=null},de)},Y)}catch{}};o.useEffect(()=>{pt.current=Jt});const en=o.useCallback(()=>q(""),[]),gn=async Y=>{(ee.current||[])[Y]&&await Xt(Y,{sameSegment:Y===be.current})},tn=H==="playing",Rt=o.useMemo(()=>{if(!X||X.length<=1)return X;const Y=X[L];return Y?[Y]:X},[X,L]),Dt=s===!0;o.useEffect(()=>{try{const Y=g.current;Y&&typeof Y.playbackRate=="number"&&We(Y)}catch{}},[re,We]);const Ut=o.useRef({raf:null,timer:null});o.useEffect(()=>{const Y=g.current;if(!Y)return;const de=Math.max(0,Math.min(1,le)),ke=Ut.current,$e=()=>{ke.raf!==null&&(cancelAnimationFrame(ke.raf),ke.raf=null),ke.timer!==null&&(clearTimeout(ke.timer),ke.timer=null)};$e();const Ve=wa(Y);if(Y.paused||Math.abs(Ve-de)<.001||typeof requestAnimationFrame!="function"){try{Qn(Y,de)}catch{}return}const Ze=performance.now(),wt=()=>{const bt=Math.min(1,(performance.now()-Ze)/150);try{Qn(Y,Ve+(de-Ve)*bt)}catch{}ke.raf=bt<1?requestAnimationFrame(wt):null};return ke.raf=requestAnimationFrame(wt),ke.timer=setTimeout(()=>{$e();try{Qn(Y,de)}catch{}},200),$e},[le]);const zt=J==="hold",$n=J==="out",Ln=z==="playMode"&&!A&&!ut||zt||$n,Fn=H!=="stopped"||zt||$n,pe=H==="paused",Se=Math.max(0,Math.min(100,(T||0)*100)),He=xe("audio-player__fill",Ln?"is-visible":"",Fn?"is-expanded":"",pe?"is-paused":"",$n?"is-out":"");return n.jsxs("div",{className:`audio-player ${Dt?"is-disabled":""}${i?` ${i}`:""}`,role:"group","aria-label":typeof m=="string"?m:void 0,children:[n.jsxs("div",{className:`audio-player__panel ${tn?"is-playing":""} ${A?"is-loading":""} ${z!=="default"?"is-revealed":""}`,children:[A?n.jsxs("div",{className:"audio-player__loading",role:Kd[j]?"status":void 0,"aria-live":Kd[j]?"polite":"off",children:[n.jsx("span",{className:"audio-player__loading-spinner","aria-hidden":"true"}),n.jsx("span",{className:"audio-player__loading-text",children:d("training.audioStatus.preparing",{defaultValue:"\uC18C\uB9AC\uB97C \uC900\uBE44\uD558\uACE0 \uC788\uC2B5\uB2C8\uB2E4\u2026"})})]}):null,z==="active"?n.jsx("button",{className:"audio-player__button",type:"button",disabled:Dt,onClick:()=>{te.current=Ka(),E(),Mt()},"aria-label":typeof m=="string"?m:d("training.listen","\uB4E3\uAE30"),onMouseEnter:k,onMouseLeave:E,onFocus:k,onBlur:E,children:n.jsx("span",{ref:f,className:"audio-player__button-triangle-wrap",children:n.jsx("svg",{className:"audio-player__button-triangle",viewBox:"0 0 24 24","aria-hidden":"true",children:n.jsx("path",{ref:N,d:"M13.2 7.7 L16.5 9.85 Q20.2 12 16.5 14.15 L10 18.3 Q7 19.7 7 16.3 L7 7.7 Q7 4.3 10 5.7 L13.2 7.7"})})})}):null,w&&n.jsx(zn,{anchorRect:w,text:typeof m=="string"&&m?m:d("training.listenLabel","\uBB38\uC7A5 \uB4E3\uAE30"),offset:8}),n.jsxs("div",{className:`audio-player__play ${z==="playMode"||tn?"is-visible":""}`,inert:!(z==="playMode"||tn)||void 0,children:[n.jsxs("div",{ref:v,className:"audio-player__buttons",children:[n.jsx(me,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"skip-back",onClick:Mn,ariaLabel:d("training.prev","\uC774\uC804"),width:"60px",variant:"transparent-white","aria-hidden":"true",tabIndex:-1,disabled:z!=="playMode"}),n.jsx(me,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:tn?"pause":"play",onClick:Mt,ariaLabel:d("common.playPause","\uC7AC\uC0DD / \uBA48\uCDA4"),"aria-pressed":tn,width:"60px",variant:"transparent-white",disabled:z!=="playMode"}),n.jsx(me,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"square",onClick:Tn,ariaLabel:d("training.stop","\uC815\uC9C0"),width:"60px",variant:"transparent-white","aria-hidden":"true",tabIndex:-1,disabled:z!=="playMode"}),vt>1?n.jsx("div",{ref:b,className:"audio-player__source-buttons",children:Array.from({length:vt}).map((Y,de)=>n.jsx(me,{htmlType:"button",size:32,type:"dot",shape:"pill",useBorder:!1,label:String(de+1),onClick:()=>{try{gn(de)}catch{}},ariaLabel:d("training.sourcePlay",{n:de+1}),variant:"transparent-white",selected:S&&L===de,disabled:z!=="playMode"||!(Array.isArray(P)&&P[de]),showTooltipInfo:!0},de))}):null,!Array.isArray(P)||P.length<=1?n.jsx(me,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"repeat",onClick:Ot,ariaLabel:d("common.replay","\uB2E4\uC2DC\uB4E3\uAE30"),width:"60px",variant:"transparent-white",disabled:z!=="playMode"}):null,n.jsx(me,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"skip-forward",onClick:pn,ariaLabel:d("training.next","\uB2E4\uC74C"),width:"60px",variant:"transparent-white","aria-hidden":!0,tabIndex:-1,disabled:z!=="playMode"}),n.jsx(me,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"check",onClick:Jt,ariaLabel:d("common.done","\uC644\uB8CC"),width:"60px",variant:"transparent-white",disabled:z!=="playMode"})]}),n.jsxs("div",{className:"audio-player__slider",children:[n.jsx("div",{className:He,ref:y,style:{left:`${Se}%`},"aria-hidden":"true"}),(u||c)&&n.jsx(u8,{segments:Rt,progress:T,totalDuration:ae,waveProgressRef:je,showSoundWaveForm:u,leadInMs:p,tailMs:h,trackDurationSec:P?.[L]?.duration??0,noiseSrc:c&&C?.settings.enabled&&Be>0?Yt:null,noiseRatio:C?ba(C.settings):0,noiseSpeed:C?.settings.speed??1,mainVolume:ue,onReadyChange:ot})]})]}),n.jsx("audio",{ref:g,crossOrigin:"anonymous",preload:"auto"})]}),!u&&n.jsxs("p",{className:"audio-player__no-waveform caption-1",children:[n.jsx(lt,{icon:"triangle-alert",size:14}),d("training.noSoundWaveform","\uC18C\uB9AC \uBE44\uAD50 \uBB38\uC81C\uB294 \uC6E8\uC774\uBE0C\uD3FC\uC744 \uD45C\uD604\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.")]}),n.jsx($r,{message:W,position:oe,onClose:en})]})}function to(e){const{t}=Ne.useTranslation(),{text:r,label:a,anchorRect:s=null,onClose:l,closeOnOutsideClick:i=!0,isMobilePopup:u=!1}=e||{},[c,p]=o.useState(()=>{try{return localStorage.getItem("tooltip-theme")||"light"}catch{return"light"}});o.useEffect(()=>{try{localStorage.setItem("tooltip-theme",c)}catch{}},[c]);const{increase:h,decrease:d,canIncrease:m,canDecrease:C,fontSize:x,lineHeight:g}=ku({storageKey:"tooltip-fontScale"}),y=o.useCallback(()=>p(N=>N==="dark"?"light":"dark"),[]),v=o.useCallback(N=>{try{N.stopPropagation()}catch{}try{typeof l=="function"&&l()}catch{}},[l]),_=Array.isArray(r)?r:typeof r>"u"||r===null?[]:[r],b={fontSize:`${x}px`,lineHeight:`${g}px`,"--tt-line-height":`${g}px`,"--tt-marker-size":"28px"},B=n.jsxs("div",{className:ce(`text-box-tooltip__root ${c==="dark"?"is-dark":""}`),children:[n.jsxs("div",{className:ce("text-box-tooltip__box"),children:[a&&n.jsx("div",{className:ce("text-box-tooltip__label body-2b"),children:a}),n.jsx("div",{className:ce("text-box-tooltip__text body-1"),style:b,children:_.map((N,f)=>n.jsxs("div",{className:ce("text-box-tooltip__line"),children:[_.length>1?n.jsx("div",{className:ce("text-box-tooltip__marker"),children:n.jsx("span",{className:ce("text-box-tooltip__line-number button-1"),children:f+1})}):null,n.jsx("span",{className:ce("text-box-tooltip__line-text"),children:N})]},f))})]}),n.jsxs("div",{className:ce("text-box-tooltip__buttons"),children:[n.jsx(me,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:"minus",onClick:d,ariaLabel:t("training.fontSizeDecrease","\uAE00\uC790 \uD06C\uAE30 \uAC10\uC18C"),variant:c==="dark"?"transparent-white":"transparent-gray",disabled:!C}),n.jsx(me,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:"plus",onClick:h,ariaLabel:t("training.fontSizeIncrease","\uAE00\uC790 \uD06C\uAE30 \uC99D\uAC00"),variant:c==="dark"?"transparent-white":"transparent-gray",disabled:!m}),n.jsx(me,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:c==="dark"?"moon":"sun-medium",onClick:y,ariaLabel:t("training.toggleBackground","\uBC30\uACBD \uC804\uD658"),variant:c==="dark"?"transparent-white":"transparent-gray"}),n.jsx(me,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:"x",onClick:v,ariaLabel:t("common.close","\uB2EB\uAE30"),variant:c==="dark"?"transparent-white":"transparent-gray"})]})]});return s?n.jsx(sn,{anchorRect:s,className:ce(`text-box-tooltip ${c==="dark"?"is-dark":""}`),onClose:l,closeOnOutsideClick:i,isMobilePopup:u,ariaLabel:a||t("tooltip.textbox","\uBCF8\uBB38"),children:B}):n.jsx("div",{className:ce(`text-box-tooltip ${c==="dark"?"is-dark":""}`),children:B})}function Xd({state:e="disabled"}){const{t}=Ne.useTranslation();return n.jsxs("div",{className:`ts-bullet ts-bullet--${e}`,"aria-hidden":!0,children:[n.jsx("div",{className:"bullet__dot",children:n.jsx(lt,{icon:"chevron-right",label:t("training.next","\uB2E4\uC74C"),className:"bullet__icon",imgClassName:"bullet__icon-img",maskClassName:"bullet__icon-mask",svgClassName:"bullet__icon-svg",wrapperStyle:{},size:20})}),n.jsx("div",{className:"ts-bullet__line"})]})}function Jd(e,t,r){const a=o.useRef(t),s=o.useRef(r);o.useEffect(()=>{a.current=t,s.current=r}),o.useEffect(()=>{if(!e||typeof document>"u")return;let l=null,i=10;const u=()=>{l=null;const c=a.current(),p=c?Array.from(c.querySelectorAll(jn)).find(h=>!h.closest('[aria-hidden="true"]')):void 0;if(p){try{p.focus()}catch{}if(document.activeElement===p)return}--i>0&&(l=requestAnimationFrame(u))};return l=requestAnimationFrame(u),()=>{l!==null&&cancelAnimationFrame(l);const c=document.activeElement;if(!c||c===document.body||!document.contains(c)||c.closest(".tooltip__content")){const p=s.current();if(p)try{p.focus()}catch{}}}},[e])}function Qd({title:e,children:t,className:r="",state:a="disabled",usePreviewTextBtn:s=!1,onPreviewTextBtn:l,previewText:i=null,useFaded:u,usePlayAllBtn:c=!1,onPlayAll:p,playAllActive:h=!1}){const{t:d}=Ne.useTranslation(),m=Bn("(max-width: 767px)"),C=`training-step__title h4 ${u&&a==="disabled"?"training-step__title--faded":""} ${r}`.trim(),x=`training-step__title-row training-step__title-row--${a}`.trim(),g=o.useRef(null),[y,v]=o.useState(!1),[_,b]=o.useState(null),[B,N]=o.useState(null);Jd(y&&!!_,()=>{if(typeof document>"u")return null;const A=Array.from(document.querySelectorAll(".tooltip__content"));for(let D=A.length-1;D>=0;D--)if(A[D].querySelector(".text-box-tooltip__root"))return A[D];return null},()=>g.current?.querySelector("button")??null);const f=o.useRef(l);o.useEffect(()=>{f.current=l});const w=o.useMemo(()=>i==null?"":typeof i=="string"||typeof i=="number"?String(i):Array.isArray(i)&&i.every(A=>typeof A=="string"||typeof A=="number")?i.join(""):"",[i]),k=o.useCallback(()=>{v(!1),b(null),N(null)},[]);o.useEffect(()=>{if(!y)return;let A;try{typeof f.current=="function"&&(A=f.current())}catch{}if(A===!1){k();return}N(typeof A<"u"&&A!==null?A:null)},[w]);const E=o.useCallback(()=>{let A;try{typeof l=="function"&&(A=l())}catch{}if(A!==!1){if(N(typeof A<"u"&&A!==null?A:i),!g.current){v(D=>!D);return}if(y)v(!1),b(null),N(null);else{const D=g.current.getBoundingClientRect();b(D),v(!0)}}},[l,i,y]);return n.jsxs("div",{className:x,children:[n.jsx("p",{className:C,children:n.jsx("span",{className:"training-step__title-text",children:e??t})}),s||c?n.jsxs("div",{className:"title-controls",children:[n.jsxs("div",{className:"title-buttons",children:[c&&n.jsx(me,{htmlType:"button",size:32,type:m?"dot":"bar",icon:"play-circle",label:m?void 0:d("training.playAll","\uBAA8\uB450 \uB4E3\uAE30"),ariaLabel:d("training.playAll","\uBAA8\uB450 \uB4E3\uAE30"),selected:h,onClick:p,variant:a==="disabled"?"disabled":"default",disabled:a==="disabled"||h,onDisabledClick:h&&a!=="disabled"?()=>{}:void 0}),s&&n.jsx("div",{ref:g,children:n.jsx(me,{htmlType:"button",size:32,type:m?"dot":"bar",icon:"eye",label:m?void 0:d("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),ariaLabel:d("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),onClick:E,className:y?"is-selected":void 0,"aria-expanded":y,"aria-haspopup":"dialog",variant:a==="disabled"?"disabled":"default",disabled:!i&&typeof l!="function"})})]}),y&&n.jsx(to,{text:B??i,label:d("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),anchorRect:_,onClose:k,closeOnOutsideClick:!1,isMobilePopup:!0})]}):null]})}function nl(e,t){return typeof t!="number"||typeof e!="number"?"disabled":e<t?"done":e===t?"active":"disabled"}function br({index:e,stepIndex:t,isLast:r=!1,title:a="",titleProps:s={},children:l,className:i="",onDone:u=void 0,useTitleFaded:c=void 0,lockedHint:p}){const{t:h}=Ne.useTranslation(),[d,m]=o.useState(()=>nl(e,t));o.useEffect(()=>{const f=nl(e,t);if(f!==d){const w=setTimeout(()=>m(f),0);return()=>clearTimeout(w)}},[e,t,d]);const C=o.useCallback((...f)=>{nl(e,t)==="done"||d==="done"||typeof u=="function"&&u(...f)},[e,t,d,u]),[x,g]=o.useState(!1),[y,v]=o.useState({text:"",label:"\uBB38\uC7A5 \uB4E3\uAE30",anchorRect:null,backdrop:!1,alignX:null,alignY:null}),_=o.useCallback(f=>{if(!f)return null;try{const w=f;if(typeof f=="object"&&(w.currentTarget||w.target)&&(w.nativeEvent||w.type)){const A=w.currentTarget??w.target;if(A&&typeof A.getBoundingClientRect=="function")return A.getBoundingClientRect()}if(f instanceof DOMRect)return f;const k=f;if(k&&typeof k.getBoundingClientRect=="function")return k.getBoundingClientRect();const E=f?.current;return E&&typeof E.getBoundingClientRect=="function"?E.getBoundingClientRect():null}catch{return null}},[]),b=o.useCallback((f,{text:w="",label:k="\uBB38\uC7A5 \uB4E3\uAE30",backdrop:E=!1,alignX:A="center",alignY:D="top"}={})=>{const j=_(f);v({text:w,label:k,anchorRect:j,backdrop:E,alignX:A,alignY:D}),g(!0)},[_]),B=o.useCallback(()=>{g(!1),v(f=>({...f,anchorRect:null}))},[]),N=o.Children.map(l,f=>{if(o.isValidElement(f)){const w=f;if(typeof w.type=="string")return w;const k=w.props??{},E=typeof k.onDone=="function"?k.onDone:C,A=typeof k.disabled=="boolean";let D=d==="disabled";return A&&(D=!!k.disabled),o.cloneElement(w,{onDone:E,disabled:D,showTooltip:b,hideTooltip:B})}return f});return n.jsxs("div",{className:`training-step training-step--${d} ${r?"training-step--last":""} ${i}`,"aria-current":d==="active",children:[n.jsx(Xd,{state:d}),n.jsxs("div",{className:"training-step__content",children:[n.jsx(Qd,{state:d,title:a,...s,useFaded:c}),d==="disabled"&&p&&typeof e=="number"&&typeof t=="number"&&e===t+1&&n.jsx("p",{className:"training-step__locked-hint caption-1",role:"status",children:p}),N]}),x?n.jsx(sn,{anchorRect:y.anchorRect,backdrop:y.backdrop,onClose:B,ariaLabel:h("tooltip.textbox","\uBCF8\uBB38"),children:n.jsx(to,{text:y.text,onClose:B})}):null]})}function ep({context:e,state:t="disabled",theme:r="light"}){const{t:a}=Ne.useTranslation(),[s,l]=o.useState("disabled"),[i,u]=o.useState(()=>{try{return localStorage.getItem("tooltip-theme")||r}catch{return r}});o.useEffect(()=>{try{localStorage.setItem("tooltip-theme",i)}catch{}},[i]);const c=()=>u($=>$==="dark"?"light":"dark"),{increase:p,decrease:h,canIncrease:d,canDecrease:m,fontSize:C,lineHeight:x}=ku({storageKey:"textbox_fontScale"}),[g,y]=o.useState(""),v=o.useRef(null),_=o.useRef(!1),b=o.useCallback(()=>{_.current=Ka()&&!!v.current&&v.current.contains(document.activeElement),l("active")},[]),B=o.useCallback(()=>y(""),[]),N=$=>{try{y($)}catch{}},f=typeof navigator<"u"&&/Mobi|Android/i.test(navigator.userAgent||"");o.useEffect(()=>{if(t!=="disabled"){const $=setTimeout(()=>l(t),0);return()=>clearTimeout($)}},[t]);const w=o.useMemo(()=>e&&typeof e=="object"?String(e.sentence??e.text??""):typeof e=="string"?e:"",[e]),[k,E]=o.useState(w);k!==w&&(E(w),l("disabled"));const A=t==="disabled"?s:t,D=A==="disabled"?"training-text-box--disabled":A==="active"?"training-text-box--active":A==="done"?"training-text-box--done":"",j=o.useMemo(()=>({fontSize:`${C}px`,lineHeight:`${x}px`}),[C,x]);return o.useEffect(()=>{if(A==="disabled"||!_.current)return;_.current=!1;const $=document.activeElement;$&&$!==document.body||v.current?.querySelector(".training-text-box__buttons button")?.focus()},[A]),n.jsxs("div",{ref:v,className:`training-text-box ${D} ${A!=="disabled"&&i==="dark"?"is-dark":""}`,children:[A==="disabled"&&n.jsx("div",{className:"training-text-box__preview",children:n.jsx(me,{htmlType:"button",size:48,type:"bar",onClick:b,icon:"eye",ariaLabel:a("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),label:a("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),useBorder:!1})}),n.jsx("div",{className:"training-text-box__area","aria-hidden":A==="disabled",children:n.jsx("span",{className:"training-text-box__inner h3",style:j,children:w})}),A!=="disabled"&&n.jsxs("div",{className:"training-text-box__buttons","aria-hidden":A==="disabled",children:[n.jsx(me,{htmlType:"button",size:32,type:"dot",onClick:h,onDisabledClick:()=>N(a("training.fontSizeMin","\uAE00\uC528 \uD06C\uAE30\uAC00 \uCD5C\uC18C\uC785\uB2C8\uB2E4.")),ariaLabel:a("training.fontSizeDecrease","\uAE00\uC790 \uD06C\uAE30 \uAC10\uC18C"),icon:"minus",variant:i==="dark"?"transparent-white":"transparent-gray",disabled:!m,useBorder:!1,showTooltipInfo:!0,...!f&&{width:"60px"}}),n.jsx(me,{htmlType:"button",size:32,type:"dot",onClick:p,onDisabledClick:()=>N(a("training.fontSizeMax","\uAE00\uC528 \uD06C\uAE30\uAC00 \uCD5C\uB300\uC785\uB2C8\uB2E4.")),ariaLabel:a("training.fontSizeIncrease","\uAE00\uC790 \uD06C\uAE30 \uC99D\uAC00"),icon:"plus",variant:i==="dark"?"transparent-white":"transparent-gray",disabled:!d,useBorder:!1,showTooltipInfo:!0,...!f&&{width:"60px"}}),n.jsx(me,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:i==="dark"?"moon":"sun-medium",onClick:c,ariaLabel:a("training.toggleBackground","\uBC30\uACBD \uC804\uD658"),variant:i==="dark"?"transparent-white":"transparent-gray"})]}),n.jsx($r,{message:g,position:"top",onClose:B})]})}function yr(e){return e==="active"||e==="done"}function rl({index:e,stepIndex:t,isLast:r=!1,lockedHint:a,title:s,useTitleFaded:l,onDone:i,onChange:u,answer:c,wrongAnswers:p,choices:h,multiSelect:d=!1,correctCount:m=0,useDisabledCovered:C=!1,choiceIcons:x,shuffleChoices:g=!0}){const{t:y}=Ne.useTranslation(),v=s??y("training.selectConfirm","\uBB38\uC81C\uB97C \uBCF4\uACE0 \uD574\uB2F9\uD558\uB294 \uB0B4\uC6A9\uC744 \uC120\uD0DD\uD558\uC138\uC694."),_=typeof e=="number"?e:-1,b=typeof t!="number"?"disabled":_<t?"done":_===t?"active":"disabled",B=Array.isArray(h)&&h.length?h:typeof c<"u"?[c].concat(Array.isArray(p)?p:[]):void 0,N=p?p.join("||"):"",f=h?h.join("||"):"",[w,k]=o.useState(()=>Array.isArray(B)?g?Xr(B):B.slice():void 0);o.useEffect(()=>{Array.isArray(B)&&B.length?k(g?Xr(B):B.slice()):k(void 0)},[c,N,f,g]);const[E,A]=o.useState(null),[D,j]=o.useState(()=>new Set);o.useEffect(()=>{A(null),j(new Set)},[f,c,N]);const $=o.useRef(void 0);o.useEffect(()=>{const U=$.current;typeof U=="number"&&typeof t=="number"&&typeof e=="number"&&U>=e&&t<e&&(A(null),j(new Set)),$.current=t},[t,e]);const H=o.useCallback(U=>{if(!yr(b))return;const T=w?.[U];if(T==null)return;const I=T;if(d){const z=new Set(D);z.has(I)?z.delete(I):z.add(I),j(z),typeof u=="function"&&u({selectedValues:[...z],__ts:Date.now()}),typeof i=="function"&&i({selectedValues:[...z],__ts:Date.now()})}else A(I),typeof u=="function"&&u({selectedIndex:U,selectedValue:I,__ts:Date.now()}),typeof i=="function"&&i({selectedIndex:U,selectedValue:I,__ts:Date.now()})},[w,b,d,u,D]),F=`training-step__buttons${Array.isArray(w)&&w.length>3?" training-step__buttons--wrap-3":""}`;return n.jsx(br,{index:e,stepIndex:t,isLast:r,lockedHint:a,title:v,useTitleFaded:l,children:n.jsx("div",{className:F,children:Array.isArray(w)&&w.length>0?w.map((U,T)=>n.jsx(me,{htmlType:"button",size:56,type:"bar",onClick:()=>H(T),ariaLabel:String(U),label:U,useLabel:!0,icon:x?x[String(U)]:void 0,variant:"default",disabled:b==="disabled",selected:d?D.has(U):E===U,useDisabledCovered:C,minWidth:0},String(U))):null})})}function al({index:e,stepIndex:t,isLast:r=!1,lockedHint:a,title:s,onDone:l,onChange:i,context:u,demoSelected:c}){const{t:p}=Ne.useTranslation(),h=s??p("training.confirmTitle","\uBB38\uC7A5\uC744 \uD655\uC778\uD558\uACE0 \uC798 \uB4E4\uB838\uB294\uC9C0 \uC120\uD0DD\uD558\uC138\uC694."),d=typeof e=="number"?e:-1,m=typeof t!="number"?"disabled":d<t?"done":d===t?"active":"disabled",C=u&&typeof u=="object"?u.sentence||"":typeof u=="string"?u:"",x=u&&typeof u=="object"?u.choices:void 0,[g,y]=o.useState(c??null),v=`${String(C)}\0${JSON.stringify(x??null)}`,[_,b]=o.useState(v);_!==v&&(b(v),c==null&&y(null));const[B,N]=o.useState(c);Object.is(B,c)||(N(c),y(c??null));const f=o.useRef(void 0);o.useEffect(()=>{const A=f.current;typeof A=="number"&&typeof t=="number"&&typeof e=="number"&&A>=e&&t<e&&c==null&&y(null),f.current=t},[t,e,c]);const w=o.useCallback(A=>{const D=typeof A=="object"&&A!==null?Object.assign({},A,{__ts:Date.now()}):{value:A,__ts:Date.now()};typeof i=="function"&&i(D),yr(m)&&typeof l=="function"&&l(D)},[i,m,l]),k=o.useCallback(()=>{yr(m)&&(y(!1),w(!1))},[w,m]),E=o.useCallback(()=>{yr(m)&&(y(!0),w(!0))},[w,m]);return n.jsxs(br,{index:e,stepIndex:t,isLast:r,lockedHint:a,title:h,onDone:l,useTitleFaded:!1,children:[n.jsx(ep,{context:u,state:m}),n.jsx("div",{className:"training-step__buttons",children:Array.isArray(x)&&x.length>0?x.slice(0,6).map((A,D)=>n.jsx(me,{htmlType:"button",size:56,type:"bar",onClick:()=>{yr(m)&&(y(D),w&&w(D))},disabled:m==="disabled",ariaLabel:String(A),label:A,variant:m,selected:g===D},D)):n.jsxs(n.Fragment,{children:[n.jsx(me,{htmlType:"button",size:56,type:"bar",onClick:k,disabled:m==="disabled",icon:"x",ariaLabel:p("training.notHeard","\uC548 \uB4E4\uB838\uC5B4\uC694."),label:p("training.notHeard","\uC548 \uB4E4\uB838\uC5B4\uC694."),variant:"default",selected:g===!1}),n.jsx(me,{htmlType:"button",size:56,type:"bar",onClick:E,disabled:m==="disabled",icon:"circle",ariaLabel:p("training.heardWell","\uC798 \uB4E4\uB838\uC5B4\uC694."),label:p("training.heardWell","\uC798 \uB4E4\uB838\uC5B4\uC694."),variant:"default",selected:g===!0})]})})]})}function ol({index:e,stepIndex:t,isLast:r=!1,title:a,onDone:s,btnLabel:l,soundSrc:i,bucketPath:u,usePreviewTextBtn:c,previewText:p=null,onPreviewTextBtn:h,disabled:d,_pageIndex:m,showSoundWaveForm:C,showNoiseWaveForm:x,leadInMs:g,tailMs:y}){const{t:v}=Ne.useTranslation(),_=a??v("training.listenTitle","\uC81C\uC2DC\uD558\uB294 \uBB38\uC7A5\uC744 \uB4E4\uC5B4\uC8FC\uC138\uC694."),b=d??(typeof t=="number"&&typeof e=="number"?e>t:!1);return n.jsx(br,{index:e,stepIndex:t,isLast:r,title:_,onDone:s,titleProps:{usePreviewTextBtn:c,previewText:p,onPreviewTextBtn:h},children:n.jsx(tl,{soundSrc:i,ttsText:i?null:p??_,bucketPath:u,btnLabel:l||v("training.listenButton","\uBB38\uC7A5 \uB4E3\uAE30"),disabled:b,className:"training-step__listen-sticky",showSoundWaveForm:C,showNoiseWaveForm:x,leadInMs:g,tailMs:y},`audio-p${m??0}-s${e}`)})}const b8=[];function sl({index:e,stepIndex:t,isLast:r=!1,lockedHint:a,title:s,onDone:l,onChange:i,context:u=b8}){const{t:c}=Ne.useTranslation(),p=s??c("training.orderListDefault","\uBB38\uC7A5\uC744 \uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uBC30\uCE58\uD558\uC138\uC694."),h=K=>typeof K=="string"?K:K&&(K.context||K.sentence||K.question||"")||"",[d,m]=o.useState(Array.isArray(u)?u:[]),[C,x]=o.useState(()=>(d||[]).map((K,L)=>({id:L,text:h(K)}))),g=o.useMemo(()=>typeof t!="number"||typeof e!="number"?"disabled":e<t?"done":e===t?"active":"disabled",[t,e]),y=g!=="disabled",v=o.useRef(void 0),_=o.useRef(void 0);o.useEffect(()=>{if(v.current===u)return;v.current=u;const K=Array.isArray(u)?u:[];m(K);const L=(R=>{const S=(R||[]).map((re,ue)=>({id:ue,text:h(re)}));if(S.length<=1)return S;const V=(re,ue)=>{if(re.length!==ue.length)return!1;for(let Be=0;Be<re.length;Be++)if(re[Be].text!==ue[Be].text)return!1;return!0};let ae=Xr(S),ne=0;for(;V(ae,S)&&ne<20;)ae=Xr(S),ne+=1;return ae})(K);x(L);try{if(typeof i=="function"){const R=L.filter((S,V)=>S.text===h(K[V])).length;i({shuffled:L,score:R,total:(K||[]).length,initial:!0,__ts:Date.now()})}if(typeof l=="function"&&g==="active"){const R=L.filter((S,V)=>S.text===h(K[V])).length;_.current=u,l({shuffled:L,score:R,total:(K||[]).length,initial:!0,__ts:Date.now()})}}catch{}},[u]),o.useEffect(()=>{if(g!=="active"||_.current===u||(_.current=u,typeof l!="function"))return;const K=Array.isArray(u)?u:[],L=C.filter((R,S)=>R.text===h(K[S])).length;l({shuffled:C,score:L,total:K.length,initial:!0,__ts:Date.now()})},[g,u]);const b=(K,L)=>{const R=[...C],S=K+L;if(S<0||S>=R.length)return;const V=R[S];R[S]=R[K],R[K]=V,I(R);try{if(typeof l=="function"&&g==="active"){const ae=R.filter((ne,re)=>ne.text===h(d[re])).length;l({shuffled:R,score:ae,total:(d||[]).length,__ts:Date.now()})}}catch{}},[B,N]=o.useState(null),f=o.useRef(null),w=o.useRef(null),k=o.useRef(null),E=o.useRef(null),A=o.useRef(null),D=o.useRef({x:0,y:0}),j=o.useRef(null),$=o.useRef({dx:0,dy:0}),H=()=>{if(j.current!==null)return;const K=()=>{if(!f.current){j.current=null;return}j.current=requestAnimationFrame(K);const L=D.current,R=$.current||{dx:0,dy:0};f.current&&(f.current.style.transform=`translate3d(${L.x-R.dx}px, ${L.y-R.dy}px, 0)`)};j.current=requestAnimationFrame(K)},F=o.useRef(new Map),U=o.useRef(new Map),T=()=>{const K=new Map;return F.current.forEach((L,R)=>{L&&L.getBoundingClientRect&&K.set(R,L.getBoundingClientRect())}),K},I=K=>{const L=T();x(K);try{if(typeof i=="function"){const R=K.filter((S,V)=>S.text===h(d[V])).length;i({shuffled:K,score:R,total:(d||[]).length,__ts:Date.now()})}}catch{}requestAnimationFrame(()=>{const R=T();K.forEach(S=>{const V=L.get(S.id),ae=R.get(S.id),ne=F.current.get(S.id);if(!ne||!V||!ae)return;const re=V.top-ae.top;re&&(ne.style.transition="none",ne.style.transform=`translateY(${re}px)`,requestAnimationFrame(()=>{ne.style.transition="transform 420ms cubic-bezier(.22,.9,.39,1)",ne.style.transform="";const ue=()=>{ne.style.transition="",ne.removeEventListener("transitionend",ue)};ne.addEventListener("transitionend",ue)}))})})},z=(K,L)=>{try{try{L.dataTransfer?.setData("text/plain",String(K))}catch{}try{L.dataTransfer&&(L.dataTransfer.effectAllowed="move")}catch{}try{const R=document.createElement("div");R.style.cssText="position:absolute;top:-9999px;left:-9999px;width:1px;height:1px;opacity:0;pointer-events:none;",document.body.appendChild(R),L.dataTransfer?.setDragImage(R,0,0),requestAnimationFrame(()=>{try{document.body.removeChild(R)}catch{}})}catch{}}catch{}N(K);try{const R=C[K],S=document.createElement("div");S.className="order-list__dragging-object order-list__dragging-object--visible",S.textContent=R&&R.text?R.text:"",document.body.appendChild(S),f.current=S;const V=F.current.get(R.id);let ae=L.clientX||0,ne=L.clientY||0;try{if(V&&V.getBoundingClientRect){const O=V.getBoundingClientRect();ae=O.left+O.width/2,ne=O.top+O.height/2}}catch{}const re=S.getBoundingClientRect(),ue=re.width/2,Be=re.height/2;$.current={dx:ue,dy:Be},S.style.transition="none",D.current={x:ae,y:ne},S.style.transform=`translate3d(${ae-ue}px, ${ne-Be}px, 0)`,requestAnimationFrame(()=>{try{S.style.transition=""}catch{}H()});const le=O=>{const W=O;D.current={x:W.clientX,y:W.clientY},H()};k.current=le,document.addEventListener("mousemove",le);const J=O=>{const W=O;D.current={x:W.clientX,y:W.clientY},H()};w.current=J,document.addEventListener("dragover",J);try{L.dataTransfer?.setData("text/plain",String(K));try{L.dataTransfer?.setData("application/json",JSON.stringify({idx:K}))}catch{}}catch{}}catch{}},ie=(K,L)=>{L.preventDefault();try{L.dataTransfer&&(L.dataTransfer.dropEffect="move")}catch{}try{A.current!==null&&(clearTimeout(A.current),A.current=null);const R=L.currentTarget&&L.currentTarget.closest?L.currentTarget.closest(".order-list__item"):null;if(R&&E.current!==R){if(E.current)try{E.current.classList.remove("drag-over")}catch{}try{R.classList.add("drag-over")}catch{}E.current=R}}catch{}},te=(K,L)=>{L.preventDefault();const R=L.dataTransfer?.getData("text/plain")||"",S=R?parseInt(R,10):B,V=K;if(typeof S!="number"||isNaN(S)||S===V){N(null),X(),P();return}const ae=Wb(C,S,V);I(ae),N(null),P();try{if(typeof l=="function"&&g==="active"){const ne=ae.filter((re,ue)=>re.text===h(d[ue])).length;l({shuffled:ae,score:ne,total:(d||[]).length,__ts:Date.now()})}}catch{}try{requestAnimationFrame(()=>{const ne=document.querySelectorAll(".order-list .order-list__item")[V];if(!ne)return;const re=ne.querySelector(".order-list__slot")||ne;try{re.classList.add("pulse"),re.offsetHeight,re.classList.add("to-dark");const ue=()=>{re.classList.remove("pulse","to-dark"),re.removeEventListener("transitionend",ue)};re.addEventListener("transitionend",ue)}catch{}})}catch{}X()},P=()=>{if(f.current){try{document.body.removeChild(f.current)}catch{}f.current=null}w.current&&(document.removeEventListener("dragover",w.current),w.current=null),k.current&&(document.removeEventListener("mousemove",k.current),k.current=null),j.current!==null&&(cancelAnimationFrame(j.current),j.current=null)},G=()=>{N(null),X(),P()};o.useEffect(()=>()=>P(),[]);const X=()=>{try{if(A.current!==null&&(clearTimeout(A.current),A.current=null),E.current){try{E.current.classList.remove("drag-over")}catch{}E.current=null}document.querySelectorAll(".order-list .order-list__item").forEach(K=>K.classList.remove("drag-over"))}catch{}};return o.useEffect(()=>{try{const K=Math.max(1,(C||[]).length);C.forEach((L,R)=>{const S=U.current.get(L.id);if(!S)return;let V=50;K>1&&(V=Math.round(R/(K-1)*100));try{S.style.setProperty("--marker-pos",V+"%")}catch{}})}catch{}},[C]),o.useEffect(()=>()=>{P(),A.current!==null&&(clearTimeout(A.current),A.current=null)},[]),n.jsx(br,{index:e,stepIndex:t,isLast:r,lockedHint:a,title:p,children:n.jsx("div",{className:"order-list",children:C.map((K,L)=>{const R=Math.max(1,(C||[]).length),S=R>1?Math.round(L/(R-1)*100):50;return n.jsx("div",{className:"order-list__item",children:n.jsxs("div",{className:"order-list__slot","data-disabled":g==="disabled","aria-disabled":g==="disabled",children:[g!=="disabled"?n.jsx("div",{className:"order-list__marker caption-1",style:{"--marker-pos":S+"%"},ref:V=>{const ae=U.current;V?ae.set(K.id,V):ae.delete(K.id)},children:n.jsx("span",{className:"order-list__slot-number button-1",children:L+1})}):null,n.jsxs("div",{ref:V=>{const ae=F.current;V?ae.set(K.id,V):ae.delete(K.id)},className:`order-list__draggable ${B===L?"dragging":""}`,"data-disabled":g==="disabled","aria-disabled":g==="disabled",tabIndex:g==="disabled"?-1:0,draggable:y,onDragStart:y?V=>z(L,V):void 0,onDragEnter:y?V=>ie(L,V):void 0,onDragOver:y?V=>ie(L,V):void 0,onDragLeave:y?()=>{try{A.current!==null&&clearTimeout(A.current),A.current=setTimeout(()=>{try{const V=document.querySelectorAll(".order-list .order-list__item");V&&V[L]&&(V[L].classList.remove("drag-over"),E.current===V[L]&&(E.current=null))}catch{}},80)}catch{}}:void 0,onDrop:y?V=>te(L,V):void 0,onDragEnd:y?G:void 0,children:[n.jsx("span",{className:"order-list__item-text body-2",children:K.text}),y?n.jsxs("span",{className:"order-list__item-buttons",children:[n.jsx(me,{htmlType:"button",size:32,type:"dot",onClick:()=>b(L,-1),ariaLabel:c("training.up"),icon:"chevron-up",variant:"transparent-gray",width:48,useFaded:"true",disabled:L===0,useBorder:!1,useDisabledInvisible:!0}),n.jsx(me,{htmlType:"button",size:32,type:"dot",onClick:()=>b(L,1),ariaLabel:c("training.down"),icon:"chevron-down",variant:"transparent-gray",width:48,useFaded:"true",disabled:L===C.length-1,useBorder:!1,useDisabledInvisible:!0})]}):null]})]})},K.id)})})})}const y8=8e3;function v8(e,t){return new Promise(r=>{let a=!1;const s=()=>{a||(a=!0,r())};e.then(s,s),setTimeout(s,t)})}function tp({index:e,stepIndex:t,isLast:r=!1,lockedHint:a,title:s,onDone:l,onChange:i,context:u=[],selectable:c=!1,hideLabel:p=!1,hideAudio:h=!1,maxCards:d,playAllGapMs:m=0}){const{t:C}=Ne.useTranslation(),x=s??C("training.cardInstructions","\uB0B1\uB9D0 \uCE74\uB4DC\uB97C \uBCF4\uACE0 \uC18C\uB9AC\uB97C \uB4E3\uACE0 \uD655\uC778\uD558\uC138\uC694."),g=o.useMemo(()=>Array.isArray(u)?u:u&&u.items||[],[u]),y=d??3,v=(g||[]).slice(0,y);(g||[]).length>y&&console.warn(`TrainingStepCard: ${g.length} items passed but only ${y} shown`);const _=typeof e=="number"?e:-1,b=typeof t!="number"?"disabled":_<t?"done":_===t?"active":"disabled",[B,N]=o.useState(null),f=o.useRef([]),[w,k]=o.useState(!1),E=o.useRef(null),A=o.useRef(!0);o.useEffect(()=>(A.current=!0,()=>{A.current=!1}),[]);const D=o.useMemo(()=>g.map(T=>T?.id??T?.word??"").join("|"),[g]);o.useEffect(()=>{N(null)},[D]);const j=o.useRef(void 0);o.useEffect(()=>{const T=j.current;typeof T=="number"&&typeof t=="number"&&typeof e=="number"&&T>=e&&t<e&&N(null),j.current=t},[t,e]);const $=o.useCallback((T,I)=>{if(c)return;const z={item:T,index:I,__ts:Date.now()};try{typeof i=="function"&&i(z)}catch{}if(b==="active"&&typeof l=="function")try{l(z)}catch{}},[c,i,b,l]),H=o.useRef(m);o.useEffect(()=>{H.current=Math.max(0,m||0)},[m]);const F=o.useCallback(async()=>{if(w||b==="disabled")return;k(!0);let T=!1;const I=new Promise(z=>{E.current=()=>{T=!0,z()}});try{for(let z=0;z<v.length&&!(!A.current||T);z++){const ie=f.current[z];if(!ie)continue;await Promise.race([v8(ie.play(),y8),I]);const te=Math.max(0,H.current||0);te>0&&z<v.length-1&&!T&&A.current&&await Promise.race([new Promise(P=>{setTimeout(P,te)}),I])}}finally{E.current=null,k(!1)}},[w,b,v.length]),U=o.useCallback((T,I)=>{if(!yr(b))return;N(I);const z={selectedValue:T.word||T.title||"",selectedIndex:I,item:T,__ts:Date.now()};try{typeof i=="function"&&i(z)}catch{}if(typeof l=="function")try{l(z)}catch{}},[i,b,l]);return n.jsx(br,{index:e,stepIndex:t,isLast:r,lockedHint:a,title:x,onDone:l,titleProps:{usePlayAllBtn:!h&&v.length>0,onPlayAll:F,playAllActive:w},children:n.jsx("div",{className:"training-step__cards",onClickCapture:T=>{const I=E.current;if(!I)return;const z=T.target;z&&typeof z.closest=="function"&&z.closest(".training-word-card__bottom")&&I()},children:v.length===0?n.jsx("div",{className:"training-step__empty",children:C("training.noCards","\uCE74\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}):v.map((T,I)=>n.jsx(Rs,{ref:z=>{f.current[I]=z},item:T,disabled:b==="disabled",onPlayDone:()=>$(T,I),selectable:c,selected:c&&B===I,onSelect:c?()=>U(T,I):void 0,flipDelay:I*120,hideLabel:p,hideAudio:h},T&&T.id||I))})})}function x8(e){return[{label:e("training.noise.level.none","\uC5C6\uC74C"),value:0},{label:e("training.noise.level.weak","\uC57D\uD568"),value:1},{label:e("training.noise.level.medium","\uBCF4\uD1B5"),value:2},{label:e("training.noise.level.strong","\uAC15\uD568"),value:3},{label:e("training.noise.level.veryStrong","\uB9E4\uC6B0 \uAC15\uD568"),value:4}]}function np(e){return[{label:e("training.noise.type.default","\uAE30\uBCF8"),value:"defaultNoise",icon:"party-popper"},{label:e("training.noise.type.street","\uAE38\uAC70\uB9AC"),value:"street",icon:"car"},{label:e("training.noise.type.buzz","\uC640\uAE00\uC640\uAE00"),value:"buzz",icon:"message-square-more"},{label:e("training.noise.type.restaurant","\uC2DD\uB2F9"),value:"restaurant",icon:"coffee"}]}x8(Pt.t.bind(Pt)),np(Pt.t.bind(Pt));const no="none",_8=.5,w8=1.5,B8=.25;function ll({title:e,valueLabel:t,value:r,min:a,max:s,step:l,tickStep:i,size:u,disabled:c,onChange:p}){return n.jsxs(dn,{variant:"custom",label:e,useFullWidth:!0,children:[n.jsx(Qc,{value:r,onChange:p,min:a,max:s,step:l,size:u,showBgTick:!0,tickStep:i,ariaLabel:e,disabled:c,className:ce("noise-settings-tooltip__slider-input")}),n.jsx("div",{className:ce(xe("noise-settings-tooltip__value","button-1",c?"noise-settings-tooltip__value--disabled":"")),children:t})]})}function rp({anchorRect:e,onClose:t,hideNoiseRows:r=!1}){const{t:a}=Ne.useTranslation(),s=Bn("(max-width: 767px)")?40:24,l=Xa(),i=ba(l?.settings??gr),u=l?.settings.type??"defaultNoise",c=l?.settings.enabled??!0,p=l?.playbackRate??1,h=l?.mainVolume??1,d=Math.round(h*100),m=o.useCallback(v=>{try{l?.setMainVolume(Math.max(0,Math.min(1,v/100)))}catch{}},[l]),C=o.useCallback(v=>{try{l?.setPlaybackRate(v)}catch{}},[l]),x=o.useCallback(v=>{const _=Math.min(ga,Math.max(0,Math.round(v*10)/10));try{l?.setSettings({noiseRatio:_})}catch{}},[l]),g=o.useCallback(v=>{try{v===no?l?.setSettings({enabled:!1}):l?.setSettings({type:v,enabled:!0})}catch{}},[l]),y=[{key:no,label:a("training.noise.type.none","\uC5C6\uC74C")},...np(a).map(v=>({key:v.value,label:v.label}))];return n.jsx(sn,{anchorRect:e,offset:12,onClose:t,ariaLabel:a("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815"),isMobilePopup:!1,closeOnOutsideClick:!1,header:n.jsxs("div",{className:ce("noise-settings-tooltip__header"),children:[n.jsx("span",{children:a("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815")}),n.jsx(me,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,ariaLabel:a("common.close","\uB2EB\uAE30"),onClick:t})]}),children:n.jsxs(Sr,{className:ce("noise-settings-tooltip"),useBorder:!1,labelWidth:72,children:[n.jsx(ll,{title:a("training.playVolumeTitle","\uC804\uCCB4 \uC18C\uB9AC"),valueLabel:`${d}%`,value:d,min:0,max:100,step:10,size:s,onChange:m}),n.jsx(ll,{title:a("training.playSpeedTitle","\uC7AC\uC0DD \uC18D\uB3C4"),valueLabel:`${p.toFixed(2)}x`,value:p,min:_8,max:w8,step:B8,size:s,onChange:C}),!r&&n.jsxs(n.Fragment,{children:[n.jsx(dn,{variant:"custom",label:a("training.noiseTypeTitle","\uC18C\uC74C \uC885\uB958"),useFullWidth:!0,children:n.jsx(kn,{ariaLabel:a("training.noiseTypeTitle","\uC18C\uC74C \uC885\uB958"),size:40,shape:"rounded",options:y,value:c?u:no,onChange:g})}),n.jsx(ll,{title:a("training.noiseRatioTitle","\uC18C\uC74C \uBE44\uC728"),valueLabel:a("training.noiseRatioValue","{{ratio}}\uBC30",{ratio:i.toFixed(1)}),value:i,min:0,max:ga,step:Fd,size:s,disabled:!c,onChange:x})]}),r&&n.jsx("div",{className:ce("noise-settings-tooltip__width-ghost"),"aria-hidden":"true",inert:!0,children:n.jsx(dn,{variant:"custom",label:"\xA0",useFullWidth:!0,children:n.jsx(kn,{ariaLabel:"width-ghost",size:40,shape:"rounded",options:y,value:no,onChange:()=>{}})})})]})})}function ap({useNoiseSettingBtn:e=!1,onSettings:t,onNext:r,onResult:a,stepIndex:s=0,stepCount:l=0,pageIndex:i=0,pageCount:u=1,resultOpen:c=!1,hideNoiseRows:p=!1}){const{t:h}=Ne.useTranslation(),[d,m]=o.useState(!1),[C,x]=o.useState(null),[g,y]=o.useState(!1),v=o.useRef(null),_=o.useRef(null),b=Xa(),B=u>0,N=B&&i<u-1,f=!B||i>=u-1,w=s===Math.max(0,l);o.useEffect(()=>{e||(m(!1),x(null))},[e]);const k=o.useCallback(()=>{m(!1),x(null)},[]),E=o.useCallback(()=>{if(d){m(!1),x(null);return}const I=v?.current?.getBoundingClientRect();I&&x(I),t?.(),m(!0)},[d,t]),A=o.useCallback(()=>{if(d){m(!1),x(null);return}const I=_?.current?.getBoundingClientRect();I&&x(I),t?.(),m(!0)},[d,t]),D=Bn("(max-width: 767px)"),j=o.useRef(null),[$,H]=o.useState(null),F=o.useCallback(()=>{y(I=>{const z=!I;return H(z?j.current?.getBoundingClientRect()??null:null),z})},[]),U=o.useCallback(()=>{y(!1),H(null)},[]);o.useEffect(()=>{c&&(y(!1),H(null))},[c]);const T=n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"pp-bottom__meter",children:[n.jsx("span",{className:"pp-bottom__meter-label caption-1",children:h("training.meter.sentence","\uC7AC\uC0DD")}),n.jsx(Ss,{analyser:b?.mainAnalyser??null,orientation:"horizontal",length:112,label:"db",labelPos:"left",ariaLabel:h("training.meter.sentence","\uC7AC\uC0DD")})]}),n.jsxs("div",{className:"pp-bottom__meter",children:[n.jsx("span",{className:"pp-bottom__meter-label caption-1",children:h("training.meter.noise","\uC18C\uC74C")}),n.jsx(Ss,{analyser:b?.noiseAnalyser??null,orientation:"horizontal",length:112,label:"db",labelPos:"left",ariaLabel:h("training.meter.noise","\uC18C\uC74C")})]})]});return Jd(e&&d,()=>typeof document<"u"?document.querySelector(".noise-settings-tooltip__header")?.closest(".tooltip__content")??null:null,()=>[v.current,_.current].map(I=>I?.querySelector("button")??null).find(I=>!!I&&I.getClientRects().length>0)??v.current?.querySelector("button")??null),n.jsxs("div",{className:"pp-bottom",children:[n.jsxs("div",{className:"pp-bottom__left",children:[e?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"pp-bottom__settings--desktop",children:n.jsx("div",{ref:v,className:"pp-bottom__tooltip-trigger","data-tooltip-ignore":!0,children:n.jsx(me,{htmlType:"button",size:56,type:"bar",icon:"settings",onClick:E,className:d?"is-selected":void 0,"aria-expanded":d,"aria-haspopup":"dialog",ariaLabel:h("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815"),label:h("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815"),minWidth:140})})}),n.jsx("div",{className:"pp-bottom__settings--mobile",children:n.jsx("div",{ref:_,className:"pp-bottom__tooltip-trigger","data-tooltip-ignore":!0,children:n.jsx(me,{htmlType:"button",size:56,type:"dot",shape:"pill",icon:"settings",onClick:A,className:d?"is-selected":void 0,"aria-expanded":d,"aria-haspopup":"dialog",ariaLabel:h("training.settings","\uC124\uC815")})})})]}):null,e&&n.jsx("div",{ref:j,className:"pp-bottom__meter-trigger","data-tooltip-ignore":!0,children:n.jsx(me,{htmlType:"button",size:40,type:"dot",shape:"pill",icon:"audio-lines",onClick:F,selected:g,"aria-expanded":D?g:void 0,ariaLabel:h("training.meter.toggle","\uC624\uB514\uC624 \uBBF8\uD130 \uD45C\uC2DC")})}),e&&g&&!D&&n.jsx("div",{className:"pp-bottom__meters",children:T})]}),e&&g&&D&&$&&n.jsx(sn,{anchorRect:$,onClose:U,ariaLabel:h("training.meter.toggle","\uC624\uB514\uC624 \uBBF8\uD130 \uD45C\uC2DC"),children:n.jsx("div",{className:"pp-bottom__meters pp-bottom__meters--floating",children:T})}),n.jsxs("div",{className:"pp-bottom__right",children:[f&&n.jsx(me,{htmlType:"button",size:56,type:"bar",icon:"check",onClick:typeof a=="function"?a:r,ariaLabel:h("training.viewResult","\uACB0\uACFC\uBCF4\uAE30"),label:h("training.viewResult","\uACB0\uACFC\uBCF4\uAE30"),variant:"main",disabled:!w}),N&&n.jsx(me,{htmlType:"button",size:56,type:"bar",rightIcon:"chevron-right",align:"right",onClick:r,ariaLabel:h("training.nextQuestion","\uB2E4\uC74C \uBB38\uC81C"),label:h("training.nextQuestion","\uB2E4\uC74C \uBB38\uC81C"),variant:"main",disabled:!w})]}),e&&d&&n.jsx(rp,{anchorRect:C,onClose:k,hideNoiseRows:p})]})}function op({title:e,subtitle:t,desc:r,depth:a,icon:s,wrapperStyle:l,iconTooltip:i,pageIndex:u,pageCount:c,progressMax:p,progressIndex:h,onBack:d,onClose:m}){const{t:C}=Ne.useTranslation(),x=Bn("(max-width: 767px)"),g=Number.isInteger(h)?h:u||0,y=Number.isInteger(p)?p:c||0,v=d||m,_=Array.isArray(a)?x?a[a.length-1]:a.join(" / "):a,b=typeof e=="string"?e.trim():e,B=typeof t=="string"?t.trim():t,N=!!(b||B),f=N?b||B:C("common.emptyTrainingName","\uD6C8\uB828 \uC774\uB984\uC774 \uBE44\uC5B4 \uC788\uC2B5\uB2C8\uB2E4."),w=_||(b?t:void 0),k=x&&typeof w=="string"&&(w.includes(" \xB7 ")||w.includes(" / "))?w.split(/\s[·/]\s/).pop():w,E=o.useMemo(()=>{const A=l&&typeof l=="object"?{...l}:{};return!("width"in A)&&!("height"in A)&&(A.width="40px",A.height="40px"),A},[l]);return n.jsxs("header",{className:"pp-title training-popup-title",children:[n.jsxs("div",{className:"pp-title__left",children:[v?n.jsx(me,{htmlType:"button",size:48,type:"dot",icon:"chevron-left",ariaLabel:C("common.back","\uB4A4\uB85C"),onClick:v,useBorder:!1,iconSize:"large",iconColor:"--color-black",variant:"transparent-gray"}):null,n.jsx("div",{children:s?n.jsx(Tc,{icon:s,label:e,tooltip:i,wrapperStyle:E}):null}),n.jsxs("div",{className:"pp-title__text",children:[k?n.jsx("span",{className:"pp-title__depth caption-1",children:k}):null,n.jsx("span",{className:`pp-title__title h2${N?"":" pp-title__title--empty"}`,children:f}),r?n.jsx("span",{className:"pp-title__description caption-1",children:r}):null]})]}),n.jsx(rd,{max:Math.max(0,y??0),index:Math.max(0,g??0)})]})}function k8(){typeof window<"u"&&window.dispatchEvent(new CustomEvent("speechear.popup.close"))}function A8(e){return!e&&e!==0?[]:Array.isArray(e)?e.flatMap(t=>typeof t=="string"?t.split("|").map(r=>r.trim()).filter(Boolean):t||t===0?[String(t)]:[]):typeof e=="string"?e.split("|").map(t=>t.trim()).filter(Boolean):[String(e)]}const sp=(e,t)=>{if(!t)return t;const r=typeof Pt?.t=="function"?Pt.t(e,{defaultValue:t}):void 0;return typeof r=="string"&&r?r:t};function lp(e,t,r){const a=e,s=a?.title||a?.name||(Array.isArray(t)?t[t.length-1]:void 0)||r||"\uD6C8\uB828",l=Ti().find(u=>u.key===(a?.category_0||a?.category_main_code)),i=l?.subs?.find(u=>u.key===(a?.category_1||a?.category_sub_code));return{title:s,label:a?.title||s,depth:t,icon:l?.icon,wrapperStyle:l?.color?{"--t-item-fg":l.color}:void 0,iconTooltip:[l?sp(`topic.${l.key}`,l.label):void 0,i?sp(`topic.sub.${i.key}`,i.label):void 0].filter(Boolean).join(" / ")||void 0}}function il(e){return e&&typeof e=="object"&&typeof e.__ts=="number"?e.__ts:0}function ip(e,t,r){if(!e||typeof e!="object"||Array.isArray(e))return e;const a=e,s=typeof r=="number"&&r>0?r:Date.now();return{...a,...a.shownAt===void 0&&t?{shownAt:t}:{},...a.answeredAt===void 0?{answeredAt:new Date(s).toISOString()}:{}}}function N8(e){const t=e;return Array.isArray(t?.items)?t.items:Array.isArray(e)?e:e?[e]:[]}function E8({idPrefix:e,trainingData:t,depth:r,fallbackTitle:a="\uD6C8\uB828",pages:s=[],emptyMessage:l,buildResults:i,metaPatch:u}){const c=lp(t,r,a),p=typeof u=="function"?u(c)||{}:u||{},h=t?.id||t?.title||s.length;return{id:`${e}:${h}`,meta:{...c,...p},pages:s,emptyMessage:l,buildResults:i}}function j8(e){if(typeof e=="string")return e;if(e&&typeof e=="object"){const t=e;return t.context||t.sentence||t.question||""||""}return""}function D8(e){if(e&&typeof e=="object"){const t=e;if(Array.isArray(t.selectedValues))return t.selectedValues;if(t.selectedValue!==void 0)return t.selectedValue;if(t.selectedIndex!==void 0)return t.selectedIndex;if(t.value!==void 0)return t.value}return e}function S8(e,t=[]){if(Array.isArray(e))return e.join(", ");if(typeof e=="number"&&Array.isArray(t))return String(t[e]??"");if(typeof e=="string")return e}function up(e,t){if(!(!e||typeof e!="object"))return e[`step-${t}`]}function T8(e,t,r,a){return up(e,t*r+a)}function M8({payload:e,selected:t,choices:r=[],correctAnswers:a=[]}){if(e&&typeof e=="object"){const s=e;if(Array.isArray(s.selectedValues))return a.every(l=>s.selectedValues.includes(l))&&s.selectedValues.every(l=>a.includes(l));if(typeof s.correct=="boolean")return s.correct}if(a.length){if(typeof t=="number"&&Array.isArray(r)&&r.length)return a.some(s=>String(s)===String(r[t]));if(typeof t<"u")return a.some(s=>String(s)===String(t))}}function $8(e){return e?Array.isArray(e.items)?e.items.map(t=>{const r=t;return typeof t=="string"?{sentence:t}:{sentence:r.context||r.sentence||"",contextCode:r.contextCode||r.context_code}}):Array.isArray(e.sentences)?e.sentences.map(t=>{const r=t;return typeof t=="string"?{sentence:t}:{sentence:r.sentence||r.context||"",contextCode:r.contextCode}}):Array.isArray(e.contexts)?e.contexts:e.contextCode?[{contextCode:e.contextCode}]:[]:[]}const cp=o.createContext(null);function L8(){const e=o.useContext(cp);if(!e)throw new Error("useTrainingPagePopupContext must be used inside TrainingPagePopup");return e}function R8({index:e,stepIndex:t,isLast:r=!1,lockedHint:a,title:s,choices:l=[],onDone:i,onChange:u}){const{t:c}=Ne.useTranslation(),p=typeof e=="number"?e:-1,h=typeof t!="number"?"disabled":p<t?"done":p===t?"active":"disabled",[d,m]=o.useState(()=>l.map(()=>null)),C=JSON.stringify(l),x=l.length;o.useEffect(()=>{m(Array.from({length:x},()=>null))},[C]);const g=o.useRef(void 0);o.useEffect(()=>{const b=g.current;typeof b=="number"&&typeof t=="number"&&typeof e=="number"&&b>=e&&t<e&&m(Array.from({length:x},()=>null)),g.current=t},[t,e,x]);const y=o.useMemo(()=>d.filter(b=>b!==null).length+1,[d]),v=o.useCallback(b=>{if(!yr(h))return;const B=d;let N;if(B[b]!=null){const w=B[b];N=B.map(k=>k!==null&&k>=w?null:k)}else N=[...B],N[b]=y;m(N);const f={selectedOrder:N,words:l,__ts:Date.now()};try{typeof u=="function"&&u(f)}catch{}if(B[b]==null&&N.length>0&&N.every(w=>w!==null))try{typeof i=="function"&&i(f)}catch{}},[h,d,y,u,i,l]),_=s??c("training.selectInOrder","\uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uCE74\uB4DC\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return n.jsx(br,{index:e,stepIndex:t,isLast:r,lockedHint:a,title:_,onDone:i,children:n.jsx("div",{className:"training-step__cards",children:l.map((b,B)=>n.jsx(Rs,{item:{word:b},disabled:h==="disabled",selectable:!0,selected:d[B]!==null,orderRank:d[B],onSelect:()=>v(B),flipDelay:B*120,hideLabel:!1,hideAudio:!0},`${b}-${B}`))})})}function ro(e){return null}ro.__isTrainingPage=!0;function Ir(e,t){const r=L8();return{ctx:r,index:e,stepIndex:r.currentStepIndex,isLast:typeof e=="number"&&typeof t=="number"?e===t-1:!1,onDone:a=>r.handleStepDone(a,e),onChange:a=>r.handleStepChange(a,e)}}function dp({_stepIndex:e,_totalSteps:t,...r}){const{index:a,stepIndex:s,isLast:l,onDone:i}=Ir(e,t);return n.jsx(ol,{...r,index:a,stepIndex:s,isLast:l,onDone:i})}function pp({_stepIndex:e,_totalSteps:t,...r}){const{index:a,stepIndex:s,isLast:l,onDone:i,onChange:u}=Ir(e,t);return n.jsx(rl,{...r,index:a,stepIndex:s,isLast:l,onDone:i,onChange:u})}function hp({_stepIndex:e,_totalSteps:t,...r}){const{index:a,stepIndex:s,isLast:l,onDone:i,onChange:u}=Ir(e,t);return n.jsx(al,{...r,index:a,stepIndex:s,isLast:l,onDone:i,onChange:u})}function mp({_stepIndex:e,_totalSteps:t,...r}){const{index:a,stepIndex:s,isLast:l,onDone:i,onChange:u}=Ir(e,t);return n.jsx(sl,{...r,index:a,stepIndex:s,isLast:l,onDone:i,onChange:u})}function fp({_stepIndex:e,_totalSteps:t,...r}){const{index:a,stepIndex:s,isLast:l,onDone:i,onChange:u}=Ir(e,t);return n.jsx(tp,{...r,index:a,stepIndex:s,isLast:l,onDone:i,onChange:u})}function P8({_stepIndex:e,_totalSteps:t,...r}){const{index:a,stepIndex:s,isLast:l,onDone:i,onChange:u}=Ir(e,t);return n.jsx(R8,{...r,index:a,stepIndex:s,isLast:l,onDone:i,onChange:u})}const Cp=3e4,F8=/^(https?:|blob:|data:audio|\/|\.\/)/;function gp(e){return typeof e=="string"&&F8.test(e)?e:null}const I8=e=>typeof e=="string"&&e.trim()!==""?e:null,ul=Symbol("timed-out");function O8(e,t){if(t<=0)return Promise.resolve(ul);let r;return Promise.race([Promise.resolve(e),new Promise(a=>{r=setTimeout(()=>a(ul),t)})]).finally(()=>clearTimeout(r))}function z8(e){return e?Ur()||xa()?!0:typeof window<"u"&&!!window.speechSynthesis:!1}function W8(e,t){const r=[],a=gp(t);a&&r.push({kind:"raw",resolve:async()=>a});const s=(e??"").trim();if(!s)return r;for(const[l,i]of[["urlResolver",Ur()],["fallbackUrlResolver",xa()]])i&&r.push({kind:l,resolve:async u=>{let c;try{c=await O8(i(s),u)}catch(h){return Tt(`question-sound-threw-${l}`,`[core] configureTTS \uC758 ${l} \uAC00 \uB358\uC84C\uB2E4 \u2014 \uADF8 \uCC28\uB840\uB294 \uAC74\uB108\uB6F4\uB2E4.`,h),null}return c===ul?(Tt(`question-sound-slow-${l}`,`[core] configureTTS \uC758 ${l} \uAC00 ${Cp}ms \uBC14\uD034 \uC548\uC5D0 \uC548 \uD480\uB838\uB2E4 \u2014 \uADF8 \uCC28\uB840\uB97C \uBC84\uB9AC\uACE0 \uB2E4\uC74C\uC73C\uB85C \uAC04\uB2E4. \uC11C\uBC84 \uD569\uC131\uC744 \uAE30\uB2E4\uB9AC\uB294 \uB9AC\uC878\uBC84\uB77C\uBA74 \uC774 \uC790\uB9AC\uAC00 \uAE38\uC5B4\uC9C4\uB2E4. \uC18C\uB9AC\uAC00 \uC544\uC608 \uC548 \uB098\uBA74 \uC5EC\uAE30\uBD80\uD130 \uBCF4\uB77C.`),null):I8(c)||(Tt(`question-sound-empty-${l}`,`[core] configureTTS \uC758 ${l} \uAC00 \uC8FC\uC18C\uB97C \uC548 \uC92C\uB2E4(\uBC1B\uC740 \uAC83: ${JSON.stringify(c)}) \u2014 \uADF8 \uCC28\uB840\uB294 \uAC74\uB108\uB6F4\uB2E4.`),null)}});return r}function H8(){return Date.now()+Cp}const V8=(e,t)=>Math.max(0,e-Date.now())/Math.max(1,t);function q8(e){Tt("question-sound-none",`[core] "${e}" \uC758 \uC18C\uB9AC \uC8FC\uC18C\uB97C \uD55C \uC790\uB9AC\uC5D0\uC11C\uB3C4 \uBABB \uC5BB\uC5C8\uB2E4 \u2014 \uBE0C\uB77C\uC6B0\uC800 \uB0AD\uB3C5\uC73C\uB85C \uAC04\uB2E4. configureTTS \uAC00 \uAC78\uB824 \uC788\uB294\uC9C0, \uB9AC\uC878\uBC84\uAC00 \uC8FC\uC18C\uB97C \uC8FC\uB294\uC9C0 \uC704 \uC904\uB4E4\uC744 \uBCF4\uB77C.`)}function ao(...e){for(const t of e)if(typeof t=="string"){const r=t.trim();if(r.length)return r}else{if(typeof t=="number"||typeof t=="boolean")return String(t);if(Array.isArray(t)&&t.length)return t.join(", ");if(t&&typeof t=="object"){const r=t,a=[r.text,r.label,r.value];for(const s of a){if(typeof s=="string"&&s.trim().length)return s.trim();if(typeof s=="number"||typeof s=="boolean")return String(s)}}}return null}function U8(e){return ao(e?.question,e?.q,e?.sentence,e?.text,e?.prompt,e?.wording)}function G8(e){return gp(ao(e?.questionSound,e?.soundSrc,e?.audioSrc,e?.sound,e?.audio,e?.src))}function bp(e){if(!e)return;if(typeof e.decision=="boolean")return e.decision;if(typeof e.correct=="boolean")return e.correct;if(typeof e.heard=="boolean")return e.heard;if(typeof e.judgement=="boolean")return e.judgement;const t=ao(e?.status,e?.result,e?.judge,e?.note);if(t){const r=t.toLowerCase();if(["ok","true","\uB9DE\uC74C","\uC815\uB2F5"].some(a=>r.includes(a)))return!0;if(["ng","false","\uD2C0\uB9BC","\uC624\uB2F5"].some(a=>r.includes(a)))return!1}}function yp(e){const{score:t,contextsLength:r,results:a=[],subtitle:s,onReplay:l,onClose:i,inline:u=!1,pending:c=!1}=e||{},{t:p}=Ne.useTranslation(),h=o.useId(),d=o.useCallback(()=>!c,[c]);o.useEffect(()=>{const A=r??0;if(t!=null&&A>0&&t/A>.5){const D=window.setTimeout(()=>{window.dispatchEvent(new CustomEvent("party:trigger",{detail:{count:140,strength:1.6,duration:2200}}))},0);return()=>window.clearTimeout(D)}},[t,r]);const m=o.useCallback(A=>{const D=bp(A),j=ao(A?.wording,A?.label);return D===!0?{variant:"main",label:j??p("training.result.heardWell","\uC798 \uB4E4\uC5C8\uC5B4\uC694")}:D===!1?{variant:"danger",label:j??p("training.result.notHeard","\uBABB \uB4E4\uC5C8\uC5B4\uC694")}:{variant:"disabled",label:j??p("training.result.notJudged","\uBBF8\uD310\uC815")}},[p]),C=r??0,x=t??0,g=o.useMemo(()=>Array.isArray(a)?a:[],[a]),y=o.useRef(null),[v,_]=o.useState(null),b=o.useCallback(()=>{y.current?.(),y.current=null,_(null)},[]);o.useEffect(()=>b,[b]);const B=o.useRef(0),N=(A,D)=>{if(!Zn)return;const j=Math.round(performance.now()-B.current);console.debug(`[core][\uB2E4\uC2DC\uB4E3\uAE30] +${j}ms ${A}`,D??"")},f=o.useRef(0),w=o.useCallback((A,D,j)=>{b();const $=++f.current,H=()=>f.current===$;B.current=Zn?performance.now():0,N(`\uB20C\uB800\uB2E4 \u2014 \uC904 ${A}`,{text:D,rawUrl:j}),_(A),y.current=()=>{N("\uBA48\uCD94\uAC1C\uAC00 \uBD88\uB838\uB2E4(\uC8FC\uC18C \uC5BB\uAE30 \uC804)"),f.current++,ko()};const F=z=>{N("\uD2BC\uB2E4",z);const ie=ha(z,te=>{N(`\uB05D\uB0AC\uB2E4 \u2014 ${te?"\uB05D\uAE4C\uC9C0 \uB4E4\uC5C8\uB2E4":"\uBABB \uD2C0\uC5C8\uAC70\uB098 \uBA48\uCDC4\uB2E4"}`,{mine:H()}),te&&H()&&(y.current=null,_(null))});return y.current=()=>{N("\uBA48\uCD94\uAC1C\uAC00 \uBD88\uB838\uB2E4(\uD2B8\uB294 \uC911)"),f.current++,ie.stop(),ko()},ie.done},U=W8(D,j);N("\uCC28\uB840",U.map(z=>z.kind));const T=U[0]?.kind==="raw",I=T?F(j):Promise.resolve(!1);(async()=>{if(await I||!H())return;const z=H8(),ie=T?U.slice(1):U;for(let te=0;te<ie.length;te++){if(!H())return;N(`${ie[te].kind} \uC5D0\uAC8C \uBB3B\uB294\uB2E4`);const P=await ie[te].resolve(V8(z,ie.length-te));if(N(`${ie[te].kind} \uAC00 \uB2F5\uD588\uB2E4`,P),!H()||P&&(await F(P)||!H()))return}H()&&(N("\uC8FC\uC18C\uB97C \uD558\uB098\uB3C4 \uBABB \uC5BB\uC5C8\uB2E4 \u2014 \uB0AD\uB3C5\uC73C\uB85C \uAC04\uB2E4"),q8(D),y.current=()=>{f.current++,ko()},N("\uB0AD\uB3C5\uD55C\uB2E4"),Zg(D,{onEnd:()=>{H()&&(y.current=null,_(null))}}))})()},[b]),k=o.useMemo(()=>g.map(A=>{const D=A??{},j=U8(D)||p("training.result.noContent","(\uB0B4\uC6A9\uC5C6\uC74C)"),{variant:$,label:H}=m(D),F=Array.isArray(D.corrects)?D.corrects:[],U=F.length?F.join(", "):D.answer!=null&&D.answer!==""?String(D.answer):null,T=typeof D.selectedText=="string"?D.selectedText:null,I=bp(D)===!0,z=G8(D),ie=!!z||z8(j);return{problem:j,variant:$,label:H,answer:U,selectedText:T,isCorrect:I,sound:z,canHear:ie}}),[g,m,p]),E=o.useMemo(()=>k.some(A=>A.answer!==null||A.selectedText!==null),[k]);return n.jsx(qn,{onClose:i,closeOnBackdrop:!1,inline:u,ariaLabel:p("training.result.title","\uD6C8\uB828\uC744 \uBAA8\uB450 \uB9C8\uCCE4\uC2B5\uB2C8\uB2E4."),className:"popup--training-result",beforeClose:d,footerClassName:"trp-result__foot",footer:({animateThen:A,closeWithAnimation:D})=>n.jsxs(n.Fragment,{children:[c&&n.jsx("p",{id:h,className:"trp-actions__reason caption-1",role:"status",children:p("training.result.pendingDone","\uACB0\uACFC\uB97C \uACC4\uC0B0\uD558\uB294 \uC911\uC774\uB77C \uC544\uC9C1 \uC644\uB8CC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.")}),n.jsxs("div",{className:"trp-actions",children:[n.jsx(me,{htmlType:"button",size:56,type:"bar",label:p("training.result.replay","\uB2E4\uC2DC\uD558\uAE30"),onClick:()=>A(l)}),n.jsx(me,{htmlType:"button",size:56,type:"bar",label:p("training.result.done","\uC644\uB8CC"),variant:"main",onClick:D,disabled:c,onDisabledClick:c?()=>{}:void 0,"aria-describedby":c?h:void 0})]})]}),children:()=>n.jsxs("div",{className:"trp-result is-on",children:[n.jsxs("header",{className:"trp-result__head",children:[n.jsx("p",{className:"trp-result__eyebrow caption-1",children:p("training.result.eyebrow","\uD6C8\uB828 \uC644\uB8CC")}),n.jsx("h1",{className:"trp-result__title h2",children:p("training.result.title","\uD6C8\uB828\uC744 \uBAA8\uB450 \uB9C8\uCCE4\uC2B5\uB2C8\uB2E4.")}),s&&n.jsx("p",{className:"trp-result__subtitle body-3",children:s}),n.jsx("div",{className:"trp-score",children:n.jsxs("div",{className:"trp-score__figure","aria-label":p("training.result.scoreAria",{correct:x,total:C}),children:[n.jsx("span",{className:"trp-score__big",children:x}),n.jsx("span",{className:"trp-score__sep",children:"/"}),n.jsx("span",{className:"trp-score__total",children:C})]})})]}),k.length>0&&n.jsx("section",{className:"trp-result__body",children:n.jsxs("div",{className:`result-table${E?" result-table--answer":""}`,role:"table","aria-label":p("training.result.tableAriaLabel","\uBB38\uD56D\uBCC4 \uD310\uC815"),children:[n.jsxs("div",{className:"result-table__head caption-1",role:"row",children:[n.jsx("span",{role:"columnheader",children:p("common.col.problem","\uBB38\uC81C")}),E&&n.jsx("span",{role:"columnheader",children:p("training.result.colAnswerSelected","\uC815\uB2F5 \xB7 \uC120\uD0DD")}),n.jsx("span",{className:"col-right",role:"columnheader",children:p("training.result.colJudge","\uD310\uC815")})]}),k.map((A,D)=>n.jsxs("div",{className:"result-table__row",role:"row",children:[n.jsxs("div",{className:"trp-row__problem",children:[n.jsx("span",{className:"trp-row__no caption-1",children:String(D+1).padStart(2,"0")}),n.jsx("div",{className:"trp-row__q body-2",children:A.problem}),A.canHear&&n.jsx(me,{htmlType:"button",size:32,type:"dot",useBorder:!1,icon:v===D?"square":"volume-2",className:"trp-row__replay",ariaLabel:v===D?p("training.result.replaySoundStop",{no:D+1,defaultValue:"{{no}}\uBC88 \uB4E3\uAE30 \uBA48\uCDA4"}):p("training.result.replaySound",{no:D+1,defaultValue:"{{no}}\uBC88 \uB2E4\uC2DC \uB4E3\uAE30"}),onClick:()=>v===D?b():w(D,A.problem,A.sound)})]}),E&&n.jsxs("div",{className:"trp-row__answers",children:[A.answer!==null&&n.jsxs("div",{className:"trp-row__answer-line",children:[n.jsx("span",{className:"trp-row__answer-label answer-correct caption-1",children:p("training.result.colAnswer","\uC815\uB2F5")}),n.jsx("span",{className:"trp-row__answer-value body-2",children:A.answer})]}),n.jsxs("div",{className:"trp-row__answer-line",children:[n.jsx("span",{className:`trp-row__answer-label answer-selected caption-1 ${A.isCorrect?"is-correct":"is-wrong"}`,children:p("training.result.colSelected","\uC120\uD0DD")}),n.jsx("span",{className:`trp-row__answer-value body-2 ${A.isCorrect?"is-correct":"is-wrong"}`,children:A.selectedText??"\u2014"})]})]}),n.jsx("div",{className:"trp-row__judge",children:n.jsx(cn,{variant:A.variant,label:A.label,fill:"soft",minWidth:80})})]},D))]})})]})})}const cl=new Set;function K8(e){o.useEffect(()=>{if(!e||cl.has(e))return;cl.add(e);const t=()=>typeof document>"u"||document.visibilityState!=="hidden";let r=null,a=null,s=0,l=0;const i=()=>{const h=Date.now();r==null&&(r=h),a==null&&(a=h)},u=()=>{a!=null&&(s+=Date.now()-a,a=null)};t()&&i();const c=()=>{if(u(),r==null)return;const h=s-l;if(h<1e3||l===0&&s<5e3)return;const d=Date.now(),m=d-h;l=s,Yb({trainingType:e,startedAt:new Date(m).toISOString(),endedAt:new Date(d).toISOString()})},p=()=>{t()?i():c()};return typeof document<"u"&&document.addEventListener("visibilitychange",p),typeof window<"u"&&window.addEventListener("pagehide",c),()=>{typeof document<"u"&&document.removeEventListener("visibilitychange",p),typeof window<"u"&&window.removeEventListener("pagehide",c),c(),cl.delete(e)}},[e])}function oo(e,t){return e&&e.id||`page-${t??0}`}function so(e,t){return e&&e.key||`step-${t??0}`}function lo(){return{pageIndex:0,stepIndex:0,answersByPage:{}}}function Y8(e,t){return typeof e?.props=="function"?e.props(t)||{}:e?.props||{}}const Z8=300,X8=()=>{try{return typeof window<"u"&&!!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches}catch{return!1}},Yn=Object.freeze({}),vp=new Set(["LISTEN_IN_NOISE","SHORT_STORY","LONG_STORY","ORDERING_SENTENCE"]);function dl(e){const t=e,r=t?.results||t?.answers||[],a=Array.isArray(r)&&r.length>0?r.length:null,s=Array.isArray(r)?r.filter(l=>l?.correct===!0||l?.isCorrect===!0||l?.score===1||l?.heard===!0||l?.judgement===!0).length:null;return{results:r,correct:a!=null?s:null,total:a}}const J8=e=>n.jsx(yp,{score:e.score,contextsLength:e.contextsLength,results:e.results,onReplay:e.onReplay,onClose:e.onClose,pending:e.pending});function Q8(e){const{scenario:t,title:r,subTitle:a,depth:s,icon:l,wrapperStyle:i,iconTooltip:u,pageIndex:c,pageCount:p,stepIndex:h,stepCount:d,onBack:m,onComplete:C,onRoundFinished:x,onNext:g,onSettings:y,useNoiseSetting:v=!0,children:_,ariaLabel:b,label:B,buildResults:N,onResult:f,typeKey:w,entryPoint:k,dailyTotal:E,itemRef:A,renderResultPopup:D,noiseOverride:j,hideNoiseRows:$=!1,inline:H=!1,height:F}=e;K8(w&&!vp.has(w)?w:"");const U=o.useRef(0);o.useEffect(()=>{U.current=Date.now()},[]);const{t:T}=Ne.useTranslation(),I=f,z=!!t,ie=t?.id||null,te=t?.meta||{},P=Array.isArray(t?.pages)?t.pages:[],G=Array.isArray(_)||o.isValidElement(_)&&typeof _!="function"?o.Children.toArray(_).filter(o.isValidElement):[],X=G.length>0,K=pe=>pe===ro||pe?.__isTrainingPage===!0,L=X&&G.some(pe=>K(pe.type)),R=L?G.filter(pe=>K(pe.type)).map((pe,Se)=>{const He=pe.props||{};return{id:`children-page-${Se}`,steps:o.Children.toArray(He.children).filter(o.isValidElement),pageTop:He.pageTop||He.top||null,pageBottom:He.pageBottom||He.bottom||null}}):[{id:"children-page-0",steps:G}],S=X&&!z&&typeof _!="function",V=S?Math.max(1,R.length):0;o.useEffect(()=>{if(!H&&!(typeof document>"u"||!document.body)&&!document.body.classList.contains("ihabdevteam-core-scope"))return document.body.classList.add("ihabdevteam-core-scope"),()=>{document.body.classList.remove("ihabdevteam-core-scope")}},[]),o.useEffect(()=>{if(H||typeof document>"u"||!document.body)return;const pe=document.body;return pe.dataset.ihabTrainingPopupCount=String(Number(pe.dataset.ihabTrainingPopupCount||"0")+1),pe.classList.add("ihab-training-popup-open"),()=>{const Se=Number(pe.dataset.ihabTrainingPopupCount||"1")-1;Se>0?pe.dataset.ihabTrainingPopupCount=String(Se):(delete pe.dataset.ihabTrainingPopupCount,pe.classList.remove("ihab-training-popup-open"))}},[]),o.useEffect(()=>{if(!H&&!(typeof document>"u"||!document.body))return Cc()},[]);const[ae,ne]=o.useState({...gr,enabled:!1}),re=o.useRef(ae);o.useEffect(()=>{re.current=ae},[ae]);const ue=o.useRef(j),Be=o.useRef(!1),le=o.useRef(null);o.useEffect(()=>{let pe=!1;const Se=He=>{if(pe)return;Be.current=!0;const Y=He?Cr({...gr,enabled:!1},He):{...gr},de=le.current;le.current=null;const ke=de?Cr(Y,de):Y;re.current=ke,ne(ke),de&&!ue.current&&zo(ke),Ea(ke);const $e=ue.current;if($e){const Ve=typeof $e=="function"?$e(ke):$e,Ze=Cr(ke,Ve);re.current=Ze,ne(Ze),Ea(Ze)}};return ly().then(He=>{if(pe){const Y=le.current;if(le.current=null,Y&&!ue.current){const de=He?Cr({...gr,enabled:!1},He):{...gr};zo(Cr(de,Y))}return}Se(He)}),()=>{pe=!0}},[]);const[J,O]=o.useState(null),[W,q]=o.useState(null),oe=o.useCallback((pe,Se)=>{pe==="main"?O(Se):q(Se)},[]),ee=o.useRef(null),be=o.useRef(null),je=o.useCallback(()=>{be.current!==null&&(clearTimeout(be.current),be.current=null);const pe=ee.current;ee.current=null,pe&&zo(pe)},[]);o.useEffect(()=>{if(typeof window>"u")return;const pe=()=>{document.visibilityState==="hidden"&&je()};return window.addEventListener("pagehide",je),document.addEventListener("visibilitychange",pe),()=>{window.removeEventListener("pagehide",je),document.removeEventListener("visibilitychange",pe),je()}},[je]);const De=o.useCallback(pe=>{const Se=Cr(re.current,pe);if(re.current=Se,ne(Se),!Be.current){le.current={...le.current??{},...pe},Ea(Se);return}ue.current||(ee.current=Se,be.current!==null&&clearTimeout(be.current),be.current=setTimeout(je,Z8)),Ea(Se)},[je]),we=ae.mainSpeed,ze=ae.mainVolume,ye=o.useCallback(pe=>De({mainSpeed:pe}),[De]),_e=o.useCallback(pe=>De({mainVolume:pe}),[De]),ve=o.useMemo(()=>({settings:ae,setSettings:De,registerAnalyser:oe,mainAnalyser:J,noiseAnalyser:W,playbackRate:we,setPlaybackRate:ye,mainVolume:ze,setMainVolume:_e}),[ae,De,oe,J,W,we,ye,ze,_e]),Ee=o.useRef(null),[Oe,ot]=o.useState(0),it=o.useRef([]),[Fe,Ue]=o.useState("center"),[nt,Te]=o.useState(!1),Xe=o.useRef(!1),rt=o.useRef(null),ut=o.useCallback(pe=>{Xe.current||(Xe.current=!0,Te(!0),rt.current=setTimeout(()=>{try{pe()}catch{Xe.current=!1,Te(!1)}},X8()?0:Nc))},[]);o.useEffect(()=>()=>{rt.current&&clearTimeout(rt.current)},[]);const gt=o.useRef(m);o.useEffect(()=>{gt.current=m});const _t=o.useRef(typeof document>"u"?null:document.activeElement);o.useEffect(()=>{if(H)return;const pe=Ee.current,Se=_t.current;if(Yo(pe,Se),pe){const He=Array.from(pe.querySelectorAll(jn)).filter(Y=>!Y.closest('[aria-hidden="true"]'))[0];if(He)try{He.focus()}catch{}}return()=>{const He=document.activeElement;if(!He||He===document.body||pe&&pe.contains(He))try{Zo(Se)?.focus?.()}catch{}}},[]),o.useEffect(()=>{if(!H)return ir(()=>ut(()=>{const pe=gt.current;typeof pe=="function"&&pe()}))},[ut,H]),Sa(Ee,!H);const[pt,Yt]=o.useState(!1),kt=o.useRef(!1),[ct,Ae]=o.useState(null),st=o.useRef(0),ft=o.useRef(0),Ct=()=>{st.current+=1,ft.current+=1,Ae(null)},[Nt,Ft]=o.useState(""),[yt,vt]=o.useState(()=>lo()),Et=o.useRef(typeof c=="number"?c:null);o.useEffect(()=>{!z&&!S||(vt(lo()),Ct())},[z,ie,S]),o.useEffect(()=>{S&&vt(pe=>{const Se=Math.max(0,Math.min(pe.pageIndex,Math.max(0,V-1)));return Se!==pe.pageIndex?{...pe,pageIndex:Se,stepIndex:0}:pe})},[S,V]);const It=S?Math.max(0,Math.min(yt.pageIndex,V-1)):0,Je=S?R[It]:null,At=S&&Je&&Array.isArray(Je.steps)?Je.steps:[],Qe=z?yt.pageIndex:S?It:typeof c=="number"?c:0,he=z?P[Math.max(0,Math.min(yt.pageIndex,Math.max(0,P.length-1)))]:null,Le=z&&he&&Array.isArray(he.steps)?he.steps:[],Pe=z?Le.length:S?At.length:typeof d=="number"?d:0,We=z||S?Math.max(0,Math.min(yt.stepIndex,Math.max(0,Pe))):typeof h=="number"?h:0,dt=z?P.length:S?V:typeof p=="number"?p:0;o.useEffect(()=>{if(!z&&!S)return;const pe=z?oo(he,Qe):Je?.id||`children-page-${Qe??0}`,Se=new Date().toISOString();for(let He=0;He<=We;He+=1){const Y=z?so(Le[He],He):`step-${He}`,de=xt(pe,Y);Ke.current.has(de)||Ke.current.set(de,Se)}},[z,S,Qe,We,Je?.id]),o.useLayoutEffect(()=>{const pe=Et.current;if(typeof Qe=="number"&&pe!==null&&Qe!==pe&&Qe>pe)try{Ft(T("training.problemNotice",{n:Qe+1}))}catch{}Et.current=typeof Qe=="number"?Qe:Et.current},[Qe,c,T]),o.useLayoutEffect(()=>{const pe=Ee.current;if(!pe)return;const Se=()=>pe.querySelector(".page-popup__scroll");let He=null,Y=null,de=null;const ke=bt=>{const ge=Se();if(!ge)return;const M=ge.scrollHeight<=ge.clientHeight;if(Ue(M?"center":"top"),bt&&!kt.current){kt.current=!0;try{Yt(!0)}catch{}try{Ze.disconnect()}catch{}}},$e=()=>{He!==null&&cancelAnimationFrame(He),He=requestAnimationFrame(()=>{Y!==null&&clearTimeout(Y),Y=setTimeout(()=>ke(!0),60)})},Ve=()=>{de!==null&&cancelAnimationFrame(de),de=requestAnimationFrame(()=>ke(!1))};$e(),window.addEventListener("resize",Ve);const Ze=new MutationObserver($e);Ze.observe(pe,{childList:!0,subtree:!0,attributes:!0});const wt=setTimeout(()=>{kt.current||ke(!0)},400);return()=>{window.removeEventListener("resize",Ve),He!==null&&cancelAnimationFrame(He),Y!==null&&clearTimeout(Y),de!==null&&cancelAnimationFrame(de),clearTimeout(wt);try{Ze.disconnect()}catch{}}},[Ee]);const on=o.useCallback(pe=>{Ee.current&&(Ee.current._childOnNext=pe)},[]),ht=o.useCallback(pe=>{Ee.current&&(Ee.current._childOnResult=pe)},[]),Ke=o.useRef(new Map),xt=(pe,Se)=>`${pe}\0${Se}`,jt=o.useCallback((pe,Se,He)=>{vt(Y=>{const de=Y.answersByPage[pe]||{},ke=de[Se],$e=il(He),Ve=il(ke);if(ke&&Ve>$e)return Y;const Ze=ip(He,Ke.current.get(xt(pe,Se)),$e);return{...Y,answersByPage:{...Y.answersByPage,[pe]:{...de,[Se]:Ze}}}})},[vt]),Q=o.useCallback((pe,Se,He)=>{const Y=oo(he,Qe),de=so(pe,Se);jt(Y,de,He)},[he,Qe,jt]),fe=o.useCallback((pe,Se,He)=>{const Y=oo(he,Qe),de=so(pe,Se);jt(Y,de,He),!He?.allowChange&&pe?.autoAdvance!==!1&&vt(ke=>({...ke,stepIndex:Math.max(ke.stepIndex,Se+1)}))},[he,Qe,jt,vt]),Ge=o.useCallback((pe,Se)=>{const He=Je?.id||`children-page-${Qe??0}`,Y=typeof Se=="number"?Se:We??0,de=`step-${Y}`;jt(He,de,pe),pe?.allowChange||vt(ke=>({...ke,stepIndex:Math.max(ke.stepIndex,Y+1)}))},[Je,Qe,We,jt,vt]),Ye=o.useCallback((pe,Se)=>{const He=Je?.id||`children-page-${Qe??0}`,Y=`step-${typeof Se=="number"?Se:We??0}`;jt(He,Y,pe)},[Je,Qe,We,jt]),at=S?{currentPageIndex:Qe??0,currentStepIndex:We??0,totalStepsInPage:At.length,handleStepDone:Ge,handleStepChange:Ye}:null,mt=async()=>{const pe=typeof t?.buildResults=="function"?await Promise.resolve(t.buildResults({scenario:t,pages:P,flowState:yt,answersByPage:yt.answersByPage})):null;return typeof I=="function"&&await Promise.resolve(I(pe))||pe},Mt=async()=>{const pe=Je?.id||`children-page-${yt.pageIndex}`,Se=yt.answersByPage[pe]||{},He=L?(()=>{const ke={};let $e=0;return R.forEach(Ve=>{const Ze=yt.answersByPage[Ve.id]||{},wt=Array.isArray(Ve.steps)?Ve.steps.length:0;for(let bt=0;bt<wt;bt+=1){const ge=Ze[`step-${bt}`];typeof ge<"u"&&(ke[`step-${$e+bt}`]=ge)}$e+=wt}),ke})():Se;if(typeof N=="function"){const ke=await Promise.resolve(N(He,{pageAnswers:Se,answersByPage:yt.answersByPage,pages:R,currentPageId:pe}));return typeof I=="function"&&await Promise.resolve(I(ke))||ke}const Y=Object.entries(Se).map(([ke,$e],Ve)=>({index:Ve,key:ke,payload:$e})),de={results:Y,answers:Y,score:0};return typeof I=="function"&&await Promise.resolve(I(de))||de},Ot=()=>{const pe=++st.current,Se=()=>pe!==st.current;try{if(typeof document<"u"&&document.body){try{document.dispatchEvent(new CustomEvent("speechear-close-tooltips"))}catch{}document.dispatchEvent(new PointerEvent("pointerdown",{bubbles:!0,cancelable:!0})),document.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0}))}}catch{}if(z){const de=mt();Ae(Yn);const ke=de;Promise.resolve(ke).then($e=>{Se()||Ae($e||{isEmpty:!0})}).catch($e=>{!Se()&&Ae({isEmpty:!0})});return}if(S){const de=Mt();Ae(Yn);const ke=de;Promise.resolve(ke).then($e=>{Se()||Ae($e||{isEmpty:!0})}).catch($e=>{!Se()&&Ae({isEmpty:!0})});return}const He=Ee.current&&Ee.current._childOnResult,Y=de=>{try{return de?de():void 0}catch{return}};if(typeof He=="function"){const de=Y(He);try{typeof document>"u"?require("url").pathToFileURL(__filename).href:On&&On.tagName.toUpperCase()==="SCRIPT"&&On.src||new URL("components.cjs.js",document.baseURI).href}catch{}de&&typeof de.then!="function"?Ae(de):Ae(de&&typeof de.then=="function"?Yn:{});const ke=()=>{Se()||Ae($e=>$e===Yn?{}:$e)};Promise.resolve(de).then($e=>{$e&&!Se()?Ae($e):ke()}).catch($e=>{ke()});return}if(typeof I=="function"){const de=Y(I);try{typeof document>"u"?require("url").pathToFileURL(__filename).href:On&&On.tagName.toUpperCase()==="SCRIPT"&&On.src||new URL("components.cjs.js",document.baseURI).href}catch{}de&&typeof de.then!="function"?Ae(de):Ae(de&&typeof de.then=="function"?Yn:{});const ke=()=>{Se()||Ae($e=>$e===Yn?{}:$e)};Promise.resolve(de).then($e=>{try{typeof document>"u"?require("url").pathToFileURL(__filename).href:On&&On.tagName.toUpperCase()==="SCRIPT"&&On.src||new URL("components.cjs.js",document.baseURI).href}catch{}$e&&!Se()?Ae($e):ke()}).catch($e=>{console.error("viewResults external handler failed",$e),ke()});return}},Tn=()=>{if(z){if(typeof Qe=="number"&&typeof dt=="number"&&Qe<dt-1){vt(Se=>({...Se,pageIndex:Se.pageIndex+1,stepIndex:0}));return}return Ot()}if(S){const Se=At.length;if(typeof We=="number"&&We<Se-1){vt(He=>({...He,stepIndex:He.stepIndex+1}));return}if(typeof Qe=="number"&&typeof dt=="number"&&Qe<dt-1){vt(He=>({...He,pageIndex:He.pageIndex+1,stepIndex:0}));return}return Ot()}if(typeof g=="function"){try{g()}catch{}return}const pe=Ee.current&&Ee.current._childOnNext;if(typeof pe=="function"){try{pe()}catch{}return}},Xt=z?te.title||te.label||b||T("common.popup","\uD31D\uC5C5"):r||B||(Array.isArray(s)?s[s.length-1]:void 0)||b||T("common.popup","\uD31D\uC5C5"),Mn=b||Xt,pn=z?te.title??te.label??Xt:r??B??Xt,Jt=(pe,Se)=>{const He=oo(he,Qe),Y=so(pe,Se),de=yt.answersByPage[He]?.[Y],ke=Y8(pe,{page:he,pageIndex:Qe,step:pe,stepIndex:Se,storedPayload:de,answersByPage:yt.answersByPage,flowState:yt}),$e={key:Y,index:Se,stepIndex:We,isLast:Se===Le.length-1};switch(pe?.type){case"listen":return n.jsx(ol,{...$e,...ke,onDone:Ve=>fe(pe,Se,Ve)});case"confirm":return n.jsx(rl,{...$e,...ke,onDone:Ve=>fe(pe,Se,Ve),onChange:Ve=>Q(pe,Se,Ve)});case"confirmWithText":return n.jsx(al,{...$e,...ke,onDone:Ve=>fe(pe,Se,Ve),onChange:Ve=>Q(pe,Se,Ve)});case"orderList":return n.jsx(sl,{...$e,...ke,onDone:Ve=>fe(pe,Se,Ve),onChange:Ve=>Q(pe,Se,Ve)});default:return null}},en=o.useRef(void 0);o.useEffect(()=>{const pe=en.current;if(en.current=Qe,pe===void 0||pe===Qe||!Ka())return;const Se=Ee.current;if(!Se)return;const He=document.activeElement;if(!(!He||He===document.body||!Se.contains(He)||He.disabled===!0))return;const Y=Se.querySelector(`.training-steps ${jn.split(", ").join(", .training-steps ")}`)??Array.from(Se.querySelectorAll(jn)).find(de=>!de.closest('[aria-hidden="true"]'));try{Y?.focus()}catch{}},[Qe]);const gn=z?P.length>0?n.jsx("div",{className:"training-steps",children:Le.map((pe,Se)=>Jt(pe,Se))},`replay-${Oe}`):n.jsx("div",{className:`page-popup__content page-popup__content--center${e.contentFull?" page-popup__content--full":""}`,children:n.jsx("div",{className:"pp-empty",children:t?.emptyMessage||T("training.noQuestions","\uBB38\uC81C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")})}):null,tn=S?n.jsxs(cp.Provider,{value:at,children:[Je?.pageTop?n.jsx("div",{className:"training-page-top",children:Je.pageTop}):null,n.jsx("div",{className:"training-steps",children:At.map((pe,Se)=>{const He=pe;return o.cloneElement(He,{...He.props,_stepIndex:Se,_totalSteps:At.length,_stepKey:`step-${Se}`,_pageIndex:Qe})})},`replay-${Oe}`),Je?.pageBottom?n.jsx("div",{className:"training-page-bottom",children:Je.pageBottom}):null]}):null,Rt=o.useRef(-1),Dt=o.useCallback(()=>{if(!w)return;const pe=ct,{results:Se,correct:He,total:Y}=dl(ct),de={correct:He,total:Y,attempt:it.current.length+1,previousAttempts:[...it.current]};if(Rt.current===ft.current)return de;Rt.current=ft.current,Zb({items:sy(Se),category:vp.has(w)?"sentence":"word",trainingType:w,entryPoint:k??"sentence",itemRef:A??null,correct:He,total:Y,score:typeof pe?.score=="number"?pe.score:null,durationSeconds:Math.max(0,Math.round((Date.now()-U.current)/1e3)),dailyTotal:E??null});try{x?.(de)}catch{}return de},[w,k,E,A,ct,x]);o.useEffect(()=>{!ct||ct===Yn||ct?.isEmpty||(dl(ct).total??0)>0&&Dt()},[ct,Dt]);const Ut=o.useCallback(()=>{const pe=Dt();Ct(),ut(()=>{typeof C=="function"&&C(pe),typeof m=="function"&&m()})},[C,m,Dt,Ae,ut]),zt=o.useCallback(()=>Ft(""),[Ft]),$n=o.useCallback(()=>{ut(()=>{typeof m=="function"&&m()})},[m,ut]),Ln=n.jsxs("div",{className:`page-popup${nt?" page-popup--closing":""}${H?" page-popup--inline":""}${H&&F!=null?" page-popup--has-height":""}`,role:H?"region":"dialog","aria-modal":H?void 0:"true","aria-label":Mn,style:H&&F!=null?{"--page-popup-inline-height":typeof F=="number"?`${F}px`:F}:void 0,children:[n.jsxs("div",{ref:Ee,className:`page-popup__panel ${pt?"":"page-popup__panel--measuring"} ${Fe==="center"?"page-popup__panel--center":Fe==="top"?"page-popup__panel--top":""}`,children:[n.jsx(op,{title:pn,subtitle:z?te.subtitle||te.label:Array.isArray(s)?s.join(" / "):void 0,desc:z?void 0:a,depth:z?te.depth:s,icon:z?te.icon:l,wrapperStyle:z?te.wrapperStyle:i,iconTooltip:z?te.iconTooltip:u,progressMax:dt,progressIndex:Qe,pageIndex:Qe,pageCount:dt,onBack:H?void 0:$n,onClose:H?void 0:$n}),n.jsx("div",{className:"page-popup__scroll",children:n.jsx("div",{className:`page-popup__content ${Fe==="center"?"page-popup__content--center":"page-popup__content--top"}${e.contentFull?" page-popup__content--full":""}`,children:S?tn:z?gn:typeof _=="function"?_({registerOnNext:on,registerOnResult:ht,panelRef:Ee,setResultOverlay:Ae}):_})}),n.jsx(ap,{onSettings:y,onNext:Tn,onResult:Ot,useNoiseSettingBtn:!!(z?te.useNoiseSetting??!0:v),stepIndex:We,stepCount:Pe,pageIndex:Qe,pageCount:dt,resultOpen:!!(ct&&!ct.isEmpty),hideNoiseRows:$})]}),ct&&!ct.isEmpty&&(D??J8)({score:ct.score,results:ct.results||ct.answers||[],contextsLength:ct.results?ct.results.length:ct.answers?ct.answers.length:0,onReplay:()=>{if(U.current=Date.now(),ct!==Yn){const{correct:pe,total:Se}=dl(ct);it.current.push({correct:pe,total:Se})}if(Ct(),ot(pe=>pe+1),z){if(vt(lo()),typeof t?.onReplay=="function")try{t.onReplay()}catch{}return}if(S){vt(lo());return}try{const pe=Ee.current&&Ee.current._childOnResult;typeof pe=="function"&&pe({replay:!0})}catch{}},onClose:Ut,pending:ct===Yn}),ct?.isEmpty&&n.jsx("div",{className:"page-popup page-popup--result-empty",role:"dialog","aria-modal":"true","aria-label":T("training.result.eyebrow","\uD6C8\uB828 \uC644\uB8CC"),children:n.jsxs("div",{className:"page-popup__panel page-popup__panel--center",children:[n.jsx("div",{className:"page-popup__scroll",children:n.jsx("div",{className:`page-popup__content page-popup__content--center${e.contentFull?" page-popup__content--full":""}`,children:n.jsx("div",{className:"page-popup__empty",children:T("training.result.eyebrow","\uD6C8\uB828 \uC644\uB8CC")})})}),n.jsx("div",{className:"page-popup__bottom",children:n.jsx(me,{htmlType:"button",variant:"main",size:48,onClick:Ut,label:T("training.result.done","\uC644\uB8CC")})})]})}),n.jsx($r,{message:Nt,position:"top",onClose:zt})]}),Fn=n.jsx(Xs.Provider,{value:ve,children:Ln});return H?Fn:typeof document<"u"&&document.body?bn.createPortal(Fn,document.body):Fn}const ar=Q8;ar.Page=ro,ar.ListenStep=dp,ar.ConfirmStep=pp,ar.ConfirmWithTextStep=hp,ar.OrderListStep=mp,ar.CardStep=fp,ar.CardOrderStep=P8;function eB(e=[]){const t=o.useRef(null),r=o.useCallback(s=>{const l=getComputedStyle(s),i=l.gridTemplateColumns.split(" ").filter(Boolean),u=parseFloat(i[0]??"0"),c=parseFloat(l.columnGap||"0")||0;if(!u||i.length<2){for(const p of s.children)p.style.gridColumn="";return}for(const p of s.children){const h=p;h.style.gridColumn="",h.removeAttribute("data-wide");const d=h.querySelector("button"),m=d?d.getBoundingClientRect().width:0;if(m<=u+.5)continue;const C=Math.min(i.length,Math.ceil((m+c)/(u+c)));C<=1||(h.style.gridColumn=`span ${C}`,h.setAttribute("data-wide",""))}},[]),a=o.useCallback(()=>{const s=t.current;if(s)for(const l of s.querySelectorAll(".word-search-result-block__items"))r(l)},[r]);return o.useLayoutEffect(()=>{a();const s=t.current;if(!s||typeof ResizeObserver>"u")return;const l=new ResizeObserver(()=>a());return l.observe(s),()=>l.disconnect()},[a,...e]),t}function tB({label:e,homonum:t}){const r=Br()?.(e,t)??"",{imgRef:a,loading:s,hasImage:l,onLoad:i,onError:u}=Ls(r);return l?n.jsxs("div",{className:ce("word-image-tooltip__cell"),children:[s&&n.jsx("div",{className:ce("word-image-tooltip__spinner")}),n.jsx("img",{ref:a,src:r,alt:e,draggable:!1,style:{opacity:s?0:1},onLoad:i,onError:u})]}):n.jsx("div",{className:ce("word-image-tooltip__cell word-image-tooltip__cell--text h3"),children:n.jsx("span",{children:e})})}function xp({words:e,anchorRect:t}){const r=o.useRef(null),[a,s]=o.useState(null);return o.useLayoutEffect(()=>{if(!t||!r.current)return;const{offsetWidth:l,offsetHeight:i}=r.current,u=window.innerWidth,c=window.innerHeight,p=8,h=t.top,d=c-t.bottom,m=h>=i+p*2||h>d,C=(y,v)=>Math.min(Math.max(p,y),Math.max(p,v)),x=C(t.left+t.width/2-l/2,u-l-p),g=C(m?t.top-i-p:t.bottom+p,c-i-p);s({left:x,top:g})},[t]),!t||e.length===0?null:bn.createPortal(n.jsx("div",{ref:r,className:ce("word-image-tooltip"),style:{visibility:a?"visible":"hidden",left:a?.left??0,top:a?.top??-9999},children:n.jsx("div",{className:ce("word-image-tooltip__cells"),children:e.map(l=>n.jsx(tB,{label:l.label,homonum:l.homonum},`${l.label}_${l.homonum??1}`))})}),document.body)}function nB({titleIcon:e,resultCount:t,resultUnit:r,searchQuery:a,items:s,groups:l,selected:i=[],onSelect:u,maxSelect:c,onClearSelection:p,onPrint:h,onPrintEmpty:d,className:m,emptyHint:C,showEmptyText:x=!0,sectionType:g="page",disc:y}){const v=wn()??Cn,{t:_,i18n:b}=Ne.useTranslation(),B=b.language?.startsWith("ko")??!1,{anchorRect:N,openAt:f,close:w}=Fa(),[k,E]=o.useState(null),A=o.useCallback(()=>{w(),E(null)},[w]);hv(A,!!k);const D=(a??"").trim(),j=/^[^,[\]\s]+$/.test(D)?D:"",$=j.length>0,H=a===void 0&&t===void 0,F=$?"match":H?"original":"ganada",[U,T]=o.useState(()=>F),[I,z]=o.useState("50"),[ie,te]=o.useState(1),[P,G]=o.useState($);P!==$&&(G($),T(F));const X=U==="match"&&!$||U==="original"&&!H?F:U,K=o.useMemo(()=>[...$?[{value:"match",label:_("wordSearch.sort.match",{defaultValue:"\uC2DC\uC791 \uC6B0\uC120"})}]:[],...H?[{value:"original",label:_("wordSearch.sort.original",{defaultValue:"\uBC1B\uC740 \uC21C\uC11C"})}]:[],{value:"ganada",label:_("wordSearch.sort.ganada",{defaultValue:"\uAC00\uB098\uB2E4\uC21C \u2191"})},{value:"ganada_desc",label:_("wordSearch.sort.ganadaDesc",{defaultValue:"\uAC00\uB098\uB2E4\uC21C \u2193"})},{value:"syllable",label:_("wordSearch.sort.syllable",{defaultValue:"\uC74C\uC808 \uC218 \u2191"})},{value:"syllable_desc",label:_("wordSearch.sort.syllableDesc",{defaultValue:"\uC74C\uC808 \uC218 \u2193"})},{value:"grade",label:_("wordSearch.sort.grade",{defaultValue:"\uB4F1\uAE09\uC21C \u2191"})},{value:"grade_desc",label:_("wordSearch.sort.gradeDesc",{defaultValue:"\uB4F1\uAE09\uC21C \u2193"})}],[_,$,H]),L=o.useMemo(()=>["10","25","50","100"].map(ye=>({value:ye,label:_("wordSearch.pageSize",{count:Number(ye),defaultValue:`${ye}\uAC1C\uC529 \uBCF4\uAE30`})})),[_]),R=ye=>ye.words?.[0],S=o.useMemo(()=>{const ye=[...j].length,_e=Eb(j),ve=new Map;return Ee=>{let Oe=ve.get(Ee);return Oe===void 0&&(Oe=_e((Ee.words?.[0]?.label??"").slice(0,ye))?0:1,ve.set(Ee,Oe)),Oe}},[j]),V=o.useCallback((ye,_e)=>{const ve=ot=>R(ot)?.label??"",Ee=ot=>R(ot)?.syllables??[...ve(ot)].length,Oe=ot=>(ot.words??[]).reduce((it,Fe)=>{const Ue=parseInt(Fe.grade??"",10);return Number.isFinite(Ue)&&Ue<it?Ue:it},999);switch(X){case"match":return S(ye)-S(_e)||xn(ve(ye),ve(_e));case"ganada":return xn(ve(ye),ve(_e));case"ganada_desc":return xn(ve(_e),ve(ye));case"syllable":return Ee(ye)-Ee(_e)||xn(ve(ye),ve(_e));case"syllable_desc":return Ee(_e)-Ee(ye)||xn(ve(ye),ve(_e));case"grade":return Oe(ye)-Oe(_e)||xn(ve(ye),ve(_e));case"grade_desc":return Oe(_e)-Oe(ye)||xn(ve(ye),ve(_e));default:return 0}},[X,S]),ae=o.useMemo(()=>s.slice().sort(V),[s,V]),ne=Number(I)||10,re=o.useMemo(()=>(l??[]).flatMap(ye=>ye.items.slice().sort(V).map(_e=>({item:_e,label:ye.label}))),[l,V]),ue=l?re.length:ae.length,Be=Math.max(1,Math.ceil(ue/ne)),le=Math.min(ie,Be),J=o.useMemo(()=>ae.slice((le-1)*ne,le*ne),[ae,le,ne]),O=o.useId(),W=o.useMemo(()=>{if(!l)return null;const ye=re.slice((le-1)*ne,le*ne),_e=new Map;for(const{item:ve,label:Ee}of ye)_e.has(Ee)||_e.set(Ee,[]),_e.get(Ee).push(ve);return[..._e.entries()].map(([ve,Ee])=>({label:ve,items:Ee}))},[l,re,le,ne]);o.useEffect(()=>{te(1)},[U,I,ue,a]);const q=ue>0?n.jsxs("div",{className:"word-search-result-block__toolbar",children:[n.jsx(An,{size:v,options:K,value:X,onChange:T,ariaLabel:_("wordSearch.sort.aria",{defaultValue:"\uC815\uB82C"})}),n.jsx(An,{size:v,options:L,value:I,onChange:z,ariaLabel:_("wordSearch.pageSizeAria",{defaultValue:"\uD398\uC774\uC9C0 \uD06C\uAE30"})}),n.jsx(_s,{page:le,totalPages:Be,onChange:te})]}):void 0,oe=ye=>{u&&u(ye)},ee=t!==void 0&&r?n.jsxs(n.Fragment,{children:[_("wordSearch.resultTitlePrefix","\uCD1D "),n.jsx("span",{style:{color:"var(--color-main)"},children:t}),_("wordSearch.resultTitleSuffix",{unit:B?Ib(r):r})]}):void 0,be=t!==void 0&&t>0&&c!==void 0&&r?_("wordSearch.resultDisc",{unit:B?zb(r):r,max:c,selected:i.length}):void 0,je=y??be,De=l?l.length===0:s.length===0,we=eB([l,J,U,ne,ie]),ze=De&&!x&&!C;return n.jsxs(Lr,{type:g,className:xe("word-search-result-block",m),children:[n.jsxs("div",{ref:we,className:xe("word-search-result-block__inner",ze&&"word-search-result-block__inner--head-only"),children:[(ee||q||je)&&n.jsxs("div",{className:"word-search-result-block__head",children:[n.jsxs("div",{className:"word-search-result-block__head-main",children:[e&&n.jsx(lt,{icon:e,className:"word-search-result-block__head-icon"}),ee&&n.jsx("span",{className:"word-search-result-block__title h3",children:ee})]}),q&&n.jsx("div",{className:"word-search-result-block__head-actions",children:q}),je&&n.jsx("div",{className:"word-search-result-block__head-disc body-3",children:je})]}),De&&(x||C)&&n.jsxs("div",{className:"word-search-result-block__empty-wrap",children:[x&&n.jsx("p",{className:"word-search-result-block__empty body-3",children:_("wordSearch.emptyResult","\uAC80\uC0C9 \uACB0\uACFC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}),C&&n.jsx("p",{className:"word-search-result-block__empty-hint body-3",children:C})]}),l?(W??[]).map(ye=>n.jsxs("div",{className:"word-search-result-block__group",role:"group","aria-labelledby":`${O}-${ye.label}`,children:[n.jsx("div",{className:"word-search-result-block__group-label caption-1b",id:`${O}-${ye.label}`,children:ye.label}),n.jsx("div",{className:"word-search-result-block__items",children:ye.items.map(_e=>{const ve=i.includes(_e.id);return n.jsx("div",{onMouseEnter:Ee=>{f(Ee.currentTarget),E(_e.words??[])},onMouseLeave:A,children:n.jsx(me,{htmlType:"button",size:"word",align:"grid",label:(_e.words??[]).map(Ee=>Ee.label),subLabel:(_e.words??[]).some(Ee=>Ee.subLabel)?(_e.words??[]).map(Ee=>Ee.subLabel):void 0,selected:ve,onClick:()=>oe(_e.id),minWidth:200})},_e.id)})})]},ye.label)):n.jsx("div",{className:"word-search-result-block__items",children:J.map(ye=>{const _e=i.includes(ye.id);return n.jsx("div",{onMouseEnter:ve=>{f(ve.currentTarget),E(ye.words??[])},onMouseLeave:A,children:n.jsx(me,{htmlType:"button",size:"word",align:"grid",label:(ye.words??[]).map(ve=>ve.label),subLabel:(ye.words??[]).some(ve=>ve.subLabel)?(ye.words??[]).map(ve=>ve.subLabel):void 0,selected:_e,onClick:()=>oe(ye.id),minWidth:200})},ye.id)})}),k&&N&&n.jsx(xp,{words:k,anchorRect:N})]}),(p||h)&&n.jsxs("div",{className:"word-search-result-block__actions",children:[p&&n.jsx(me,{htmlType:"button",size:"56",type:"bar",label:_("common.resetSelection","\uC120\uD0DD \uCD08\uAE30\uD654"),selected:!1,disabled:i.length===0,onClick:i.length===0?void 0:p}),h&&n.jsx("div",{onClick:i.length===0?d:void 0,children:n.jsx(me,{htmlType:"button",size:"56",type:"bar",variant:"main",label:_("wordTable.title","\uB2E8\uC5B4 \uD45C \uB9CC\uB4E4\uAE30"),disabled:i.length===0,onClick:i.length===0?void 0:h})})]})]})}function rB(e,t){return t.map(r=>{const a=typeof r=="string"?r:r.label,s=typeof r=="string"?void 0:r.displayLabel;return{label:a,value:e[a]??"",displayLabel:s}})}function aB({sections:e,selectedList:t,count:r,onCountChange:a,maxCount:s=4,minCount:l=1,combinationSections:i,combinationSectionsForSlot:u,onSelect:c,placeholder:p="-",className:h,title:d,titleIcon:m,disc:C,showInfoButton:x=!0,onClearPhoneme:g,onSearch:y,onSearchEmpty:v,searchDisabled:_=!1,searchLabel:b,searchChecking:B=!1,pairMode:N=!1,sectionType:f="page",beforeSearchContent:w,beforeContent:k,afterContent:E,hideCountControl:A=!1,ordinal:D=!1}){const{t:j}=Ne.useTranslation(),$=o.useMemo(()=>j("wordPairs.infoNotes",{returnObjects:!0}),[j]),H=o.useMemo(()=>Array.from({length:s-l+1},(L,R)=>{const S=l+R;return{key:String(S),label:j("wordPairs.count",{n:S})}}),[j,s,l]),F=o.useMemo(()=>j("wordPairs.ordinals",{returnObjects:!0}),[j]),U=o.useCallback(L=>D?j("wordPairs.phonemeOrdinalLabel",{ordinal:F[L-1]??L}):r===1?j("wordPairs.phonemeSingleLabel","\uC74C\uC808"):j("wordPairs.phonemeN",{n:L}),[D,F,r,j]),T=o.useCallback(L=>D?j("wordPairs.phonemeContrastOrdinalLabel",{ordinal:F[L-1]??L}):r===1?j("wordPairs.phonemeContrastSingleLabel","\uB300\uB9BD \uC74C\uC808"):j("wordPairs.phonemeContrast",{n:L}),[D,F,r,j]),I=o.useCallback((L,R)=>R?n.jsxs(n.Fragment,{children:[L,n.jsx("span",{className:"phoneme-select-block__required",children:"*"})]}):L,[]),{anchorRect:z,toggleAt:ie,close:te}=Fa(),P=o.useCallback(L=>a(Number(L)),[a]),G=Bn("(max-width: 767px)"),X=o.useCallback(L=>rB(L,e).map(({label:R,value:S,displayLabel:V})=>{const ae=!!S&&S!=="\uC5C6\uC74C";return n.jsxs("span",{className:xe("phoneme-select-block__cell-jamo-part",S?"":"phoneme-select-block__cell-jamo-part--empty",ae?"":"phoneme-select-block__cell-jamo-part--no-label"),children:[n.jsx("span",{className:`phoneme-select-block__cell-jamo-char h1${S==="\uC5C6\uC74C"?" phoneme-select-block__cell-jamo-char--excluded":""}`,children:S==="\uC5C6\uC74C"?"x":S||p}),ae&&n.jsx("span",{className:"phoneme-select-block__cell-jamo-label caption-2",children:V??R})]},R)}),[e,p]),K=n.jsxs(n.Fragment,{children:[n.jsx("div",{"data-tooltip-ignore":!0,children:n.jsx(me,{htmlType:"button",size:40,type:G?"dot":void 0,icon:"info",label:G?void 0:j("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),ariaLabel:j("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),className:z?"is-selected":void 0,"aria-expanded":!!z,"aria-haspopup":"dialog",onClick:L=>ie(L.currentTarget)})}),z&&n.jsx(er,{title:j("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),items:$,anchorRect:z,onClose:te})]});return n.jsxs(Lr,{type:f,title:d,icon:m,disc:C,action:x?K:void 0,className:xe("phoneme-select-block",h),children:[k,!A&&n.jsx("div",{className:"phoneme-select-block__controls",children:n.jsx(kn,{options:H,value:String(r),onChange:P,size:40,ariaLabel:j("wordPairs.countLabel","\uC74C\uC18C \uAC1C\uC218"),className:"phoneme-select-block__count-control"})}),n.jsx("div",{className:"phoneme-select-block__cells",children:N?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"phoneme-select-block__cell-group",children:Array.from({length:r}).map((L,R)=>{const S=t[R*2]??{};return n.jsxs("div",{className:"phoneme-select-block__cell",children:[n.jsx("div",{className:"phoneme-select-block__cell-circle",children:n.jsx("div",{className:"phoneme-select-block__cell-jamo",children:X(S)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:U(R+1)})]},R)})}),n.jsx("span",{className:"phoneme-select-block__cell-vs h3",children:j("wordPairs.phonemeSelect.vs","\uB300")}),n.jsx("div",{className:"phoneme-select-block__cell-group",children:Array.from({length:r}).map((L,R)=>{const S=t[R*2+1]??{};return n.jsxs("div",{className:"phoneme-select-block__cell",children:[n.jsx("div",{className:"phoneme-select-block__cell-circle",children:n.jsx("div",{className:"phoneme-select-block__cell-jamo",children:X(S)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:T(R+1)})]},R)})})]}):t.map((L,R)=>n.jsxs("div",{className:"phoneme-select-block__cell",children:[n.jsx("div",{className:"phoneme-select-block__cell-circle",children:n.jsx("div",{className:"phoneme-select-block__cell-jamo",children:X(L)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:U(R+1)})]},R))}),(i||u)&&n.jsx("div",{className:"phoneme-select-block__panels",children:n.jsx("div",{className:"phoneme-select-block__detail",children:N?n.jsxs("div",{className:"phoneme-select-block__pair-panels",children:[n.jsx("div",{className:"phoneme-select-block__panel-group",children:Array.from({length:r}).map((L,R)=>{const S=t[R*2]??{};return n.jsx(Kn,{title:I(U(R+1),R===0),sections:u?u(S,R*2):i,selected:S,onSelect:c?.(R*2),align:"newline"},R)})}),n.jsx("div",{className:"phoneme-select-block__panel-group",children:Array.from({length:r}).map((L,R)=>{const S=t[R*2+1]??{};return n.jsx(Kn,{title:T(R+1),sections:u?u(S,R*2+1):i,selected:S,onSelect:c?.(R*2+1),align:"newline"},R)})})]}):t.map((L,R)=>n.jsx(Kn,{title:I(U(R+1),R===0),sections:u?u(L,R):i,selected:L,onSelect:c?.(R),align:"newline"},R))})}),w&&n.jsx("div",{className:"phoneme-select-block__before-search",children:w}),(g||y||B)&&(()=>{const L=t.every(R=>{const S=Bb(R);return Object.entries(S).every(([V,ae])=>!ae||V==="coda"&&ae===bi)});return n.jsxs("div",{className:"phoneme-select-block__search-row",onClick:L?v:void 0,children:[g&&n.jsx(me,{htmlType:"button",size:"56",type:"bar",label:j("wordPairs.resetOptions","\uAC80\uC0C9 \uC635\uC158 \uCD08\uAE30\uD654"),selected:!1,disabled:L,onClick:L?void 0:g}),y?n.jsx(me,{htmlType:"button",size:"56",type:"bar",variant:"main",icon:B?n.jsx("span",{className:"phoneme-select-block__spinner","aria-hidden":"true"}):void 0,label:b??j("wordSearch.searchButton","\uAC80\uC0C9\uD558\uAE30"),disabled:L||_||B,onDisabledClick:B?()=>{}:void 0,"aria-busy":B||void 0,onClick:y}):B?n.jsxs("div",{className:"phoneme-select-block__checking","aria-busy":"true",children:[n.jsx("div",{className:"phoneme-select-block__spinner"}),n.jsx("span",{className:"button-1 phoneme-select-block__checking-label",children:b??j("wordSearch.searchButton","\uAC80\uC0C9\uD558\uAE30")})]}):null]})})(),E]})}function oB({title:e,sections:t,selected:r,onSelect:a,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c,headerAction:p,className:h}){const{t:d}=Ne.useTranslation();return n.jsx(Kn,{className:h,title:e??d("wordSearch.filterTitle","\uB2E8\uC5B4 \uAC80\uC0C9 \uC124\uC815"),sections:t,selected:r,onSelect:a,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c,headerAction:p,align:"inline"})}function sB({title:e,headerAction:t,sections:r,selected:a,onSelect:s,className:l}){const{t:i}=Ne.useTranslation();return r.length===0?null:n.jsx(Kn,{className:l,title:e??i("training.filter.phonemeGroup",{defaultValue:"\uD6C8\uB828 \uC74C\uC808"}),headerAction:t,sections:r,selected:a,onSelect:s,align:"newline"})}function lB({title:e,mode:t,onModeChange:r,matchMode:a,onMatchModeChange:s,positionCount:l,onPositionCountChange:i,inputMode:u,onInputModeChange:c,className:p}){const{t:h}=Ne.useTranslation(),d={searchMode:h("wordPairs.filter.searchModeLabel","\uB300\uB9BD \uBC29\uC2DD"),phonemeOrder:h("wordPairs.filter.phonemeOrder","\uC785\uB825 \uC74C\uC808 \uC704\uCE58"),count:h("wordPairs.filter.countLabel","\uC785\uB825 \uC74C\uC808 \uAC2F\uC218"),inputMode:h("wordPairs.filter.inputModeLabel","\uC785\uB825 \uBC29\uC2DD"),orderAny:h("wordPairs.filter.orderAny","\uBB34\uAD00"),orderMatch:h("wordPairs.filter.orderMatch","\uC77C\uCE58"),include:h("wordPairs.mode.include","\uC74C\uC18C \uD3EC\uD568"),pick:h("wordPairs.mode.pick","\uC74C\uC18C \uB300\uB9BD"),explicit:h("wordPairs.mode.contrast","\uC74C\uC18C \uB300\uB9BD \uC9C0\uC815"),charInput:h("wordPairs.input.char","\uAE00\uC790 \uC120\uD0DD"),pronInput:h("wordPairs.input.pron","\uBC1C\uC74C \uC120\uD0DD")},m=y=>h("wordPairs.count",{n:y}),C=[{label:d.searchMode,items:[d.include,d.pick,d.explicit],display:"segmented",labelAction:n.jsx(la,{title:h("wordPairs.mode.infoTitle","\uB300\uB9BD \uBC29\uC2DD"),items:[h("wordPairs.mode.infoInclude","\uC74C\uC18C \uD3EC\uD568 \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uAC00 \uBAA8\uB450 \uB4E4\uC5B4\uAC04 \uB2E8\uC5B4\uC640 \uADF8 \uB300\uB9BD\uC30D\uC744 \uCC3E\uC544\uC694."),h("wordPairs.mode.infoPick","\uC74C\uC18C \uB300\uB9BD \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uAC00 \uB300\uB9BD\uC30D \uB450 \uB2E8\uC5B4\uC758 \uC2E4\uC81C \uCC28\uC774\uC810\uC77C \uB54C\uB9CC \uB9E4\uCE6D\uB3FC\uC694."),h("wordPairs.mode.infoContrast","\uC74C\uC18C \uB300\uB9BD \uC9C0\uC815 \u2014 \uAE30\uC900 \uB2E8\uC5B4\uC640 \uB300\uB9BD \uB2E8\uC5B4\uC758 \uC74C\uC18C\uB97C \uAC01\uAC01 \uC9C1\uC811 \uC120\uD0DD\uD574 \uB300\uB9BD\uC30D\uC744 \uCC3E\uC544\uC694.")]})},{label:d.phonemeOrder,items:[d.orderAny,d.orderMatch],display:"segmented",labelAction:n.jsx(la,{items:h("wordPairs.filter.phonemeOrderInfo",{returnObjects:!0})})},{label:d.count,items:[m(1),m(2)],display:"segmented"},{label:d.inputMode,items:[d.charInput,d.pronInput],display:"segmented",labelAction:n.jsx(la,{title:h("wordPairs.input.infoTitle","\uC785\uB825 \uBC29\uC2DD"),items:[h("wordPairs.input.infoChar","\uAE00\uC790 \uC120\uD0DD \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uB85C \uB2E8\uC5B4(\uAE00\uC790 \uAE30\uC900)\uB97C \uCC3E\uC740 \uD6C4, \uB2E8\uC5B4\uC758 \uD45C\uC900 \uBC1C\uC74C \uB300\uB9BD\uC30D\uC744 \uCC3E\uC2B5\uB2C8\uB2E4."),h("wordPairs.input.infoPron","\uBC1C\uC74C \uC120\uD0DD \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uB85C \uD45C\uC900 \uBC1C\uC74C \uB300\uB9BD\uC30D\uC744 \uCC3E\uC2B5\uB2C8\uB2E4.")]})}],x={[d.searchMode]:t==="explicit"?d.explicit:t==="pick"?d.pick:d.include,[d.phonemeOrder]:a==="ordered"?d.orderMatch:d.orderAny,[d.count]:m(l),[d.inputMode]:u==="phoneme"?d.pronInput:d.charInput},g=(y,v)=>{v===d.searchMode?r(y===d.explicit?"explicit":y===d.pick?"pick":"include"):v===d.phonemeOrder?s(y===d.orderMatch?"ordered":"unordered"):v===d.count?i(y===m(2)?2:1):v===d.inputMode&&c(y===d.pronInput?"phoneme":"word")};return n.jsx(Kn,{className:p,title:e??h("wordPairs.filter.searchOptionsTitle","\uB300\uB9BD \uC124\uC815"),sections:C,selected:x,onSelect:g,align:"inline"})}function iB(e){const{title:t,items:r,columns:a,resizeStorageKey:s,gridTemplateColumns:l,mobileGridTemplateColumns:i,searchPlaceholder:u,searchFn:c,defaultSortKey:p,defaultSortAsc:h=!0,selectedId:d,selectedIds:m,onSelect:C,onClose:x,pageSizeOptions:g=[10,25,50,100],initialPageSize:y,emptyText:v,noMatchText:_,countLabel:b,topContent:B,className:N=""}=e,{t:f}=Ne.useTranslation(),w=u??f("common.search","\uAC80\uC0C9"),k=v??f("common.emptyList","\uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."),E=_??f("common.noMatches","\uB9DE\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"),[A,D]=o.useState(""),[j,$]=o.useState(p??a[0]?.key??""),[H,F]=o.useState(h),[U,T]=o.useState(String(y??g[0]??10)),[I,z]=o.useState(1);o.useEffect(()=>{z(1)},[A,U]);const ie=c!==null,te=o.useCallback((ne,re)=>{if(!re)return!0;const ue=re.toLowerCase();return a.some(Be=>{const le=ne[Be.key];return le==null?!1:String(le).toLowerCase().includes(ue)})},[a]),P=c??te,G=o.useMemo(()=>{const ne=ie?r.filter(re=>P(re,A)):r;return j?[...ne].sort((re,ue)=>{const Be=re[j],le=ue[j];return Be===le?0:Pa(Be,le,H)}):ne},[r,A,j,H,ie,P]),X=Math.max(1,Math.ceil(G.length/Number(U)));I>X&&z(X);const K=Math.min(I,X),L=G.slice((K-1)*Number(U),K*Number(U)),R=o.useCallback(ne=>{j===ne?F(re=>!re):($(ne),F(!0)),z(1)},[j]),S=o.useMemo(()=>{if(typeof b=="function"){const ne=G.length,re=b(ne);if(typeof re=="string"){const ue=re.lastIndexOf(String(ne));if(ue>=0)return{prefix:re.slice(0,ue),suffix:re.slice(ue+String(ne).length)}}return{label:re}}if(typeof b=="string"&&b.includes("{n}")){const[ne,re]=b.split("{n}");return{prefix:ne,suffix:re}}return{prefix:f("common.totalCountPrefix","\uCD1D "),suffix:f("common.totalCountSuffix","\uAC1C")}},[b,G.length,f]),V=o.useMemo(()=>a.map(ne=>({label:ne.label,onClick:ne.sortable!==!1?()=>R(ne.key):void 0,className:ne.className,sortDir:ne.sortable!==!1&&j===ne.key?H?"asc":"desc":null})),[a,j,H,R]),ae=Av(g);return n.jsxs(qn,{className:`popup-list ${N}`,title:t,onClose:x,children:[B,"label"in S&&n.jsx("p",{className:"toolbar__count body-1",children:S.label}),n.jsx(ws,{count:"label"in S?void 0:{value:G.length,prefix:S.prefix,suffix:S.suffix},search:ie?{value:A,onChange:D,placeholder:w}:void 0,pageSize:{options:ae,value:U,onChange:T},pagination:{page:K,total:X,onChange:z}}),n.jsx(Ms,{gridTemplateColumns:l,mobileGridTemplateColumns:i,resizable:!0,resizeStorageKey:s,fields:V,items:L,onRowClick:C,renderRow:ne=>{const re=m!=null?ne.id!=null&&m.has(ne.id):d!=null&&ne.id===d;return a.map(ue=>({content:ue.render?ue.render(ne):ne[ue.key]??"",className:xe(ue.className,re&&"popup-list__row--selected")}))},empty:ie&&A!==""&&r.length>0?E:k})]})}function _p(e,t,r={}){const{t:a}=Ne.useTranslation(),[s,l]=o.useState(!1),i=o.useRef(!1),u=o.useCallback(()=>{i.current=!0},[]),c=o.useCallback(()=>i.current?(i.current=!1,!0):e?(l(!0),!1):!0,[e]),p=s?n.jsx(fs,{title:r.title??a("common.discardConfirm.title","\uC785\uB825\uC744 \uCDE8\uC18C\uD560\uAE4C\uC694?"),message:r.message??a("common.discardConfirm.body","\uC800\uC7A5\uD558\uC9C0 \uC54A\uC73C\uBA74 \uC9C0\uAE08\uAE4C\uC9C0 \uC785\uB825\uD55C \uB0B4\uC6A9\uC774 \uC0AC\uB77C\uC9D1\uB2C8\uB2E4."),confirmLabel:r.confirmLabel??a("common.discardConfirm.confirm","\uC785\uB825 \uCDE8\uC18C"),confirmVariant:"danger",onConfirm:()=>{l(!1),t()},onClose:()=>l(!1)}):null;return{beforeClose:c,discardPopup:p,allowClose:u}}function uB(e,t,r={}){const a=JSON.stringify(e),[s,l]=o.useState(a),i=a!==s,u=_p(i,t,r),c=o.useRef(a);c.current=a;const p=o.useCallback(()=>l(c.current),[]);return{...u,isDirty:i,rebase:p}}function cB({onApply:e,onCancel:t}){const{t:r}=Ne.useTranslation(),[a,s]=o.useState(""),[l,i]=o.useState(!1),[u,c]=o.useState(null),p=o.useRef(null),h=o.useId();o.useEffect(()=>{p.current?.focus()},[]);const d=o.useCallback(async x=>{const g=a.trim();if(g){i(!0),c(null);try{await e(g),x()}catch(y){c($o(y)),i(!1),requestAnimationFrame(()=>p.current?.focus())}}},[a,e]),m=o.useCallback((x,g)=>{x.key==="Enter"&&!x.nativeEvent.isComposing&&d(g)},[d]),C=x=>{s(x.target.value),c(null)};return n.jsx(qn,{className:"coupon-input-popup",title:r("usage.couponButton","\uCFE0\uD3F0 \uC785\uB825"),size:"small",onClose:t,closeDisabled:l,buttons:[{label:r("common.cancel","\uCDE8\uC18C"),variant:"default",disabled:l,onClick:({closeWithAnimation:x})=>x()},{label:r("coupons.applyButton","\uC801\uC6A9"),variant:"main",disabled:!a.trim()||l,onClick:({closeWithAnimation:x})=>{d(x)}}],children:({closeWithAnimation:x})=>n.jsxs(n.Fragment,{children:[n.jsx("input",{ref:p,className:"coupon-input-popup__input body-2","aria-label":r("coupons.input.label","\uCFE0\uD3F0 \uCF54\uB4DC"),"aria-invalid":u?!0:void 0,"aria-errormessage":u?h:void 0,"aria-describedby":u?h:void 0,placeholder:r("coupons.input.placeholder","\uCFE0\uD3F0 \uCF54\uB4DC \uC785\uB825"),value:a,onChange:C,onKeyDown:g=>m(g,x),disabled:l,autoComplete:"off",spellCheck:!1}),u&&n.jsx("p",{id:h,className:"coupon-input-popup__error caption-1",role:"alert",children:u})]})})}const wp=["var(--color-main)","var(--color-sub)"],dB=2e3;function pB(e,t){if(!t.startsWith("var("))return t;try{const r=t.slice(4,-1).trim();return getComputedStyle(e).getPropertyValue(r).trim()||null}catch{return null}}function pl({active:e=!1,count:t=40,duration:r=2e3,strength:a=1,onComplete:s,trigger:l=0}){const i=o.useMemo(()=>{const g=Math.floor(t/2),y=t-g,v=(_,b)=>Array.from({length:_}).map((B,N)=>{const f=6+Math.random()*12,w=Math.round(Math.min(18,f*Math.min(1.5,1+a*.4))),k=wp[Math.floor(Math.random()*wp.length)],E=Math.random()*300,A=(360+Math.random()*260)*a*1.2,D=(b==="left"?-95+Math.random()*40:-85-Math.random()*40)*Math.PI/180,j=Math.cos(D)*A,$=Math.sin(D)*A*1.35,H=Math.random()*720-360,F=(1200+Math.random()*3e3)*Math.min(1.6,1+a*.3),U=Math.random()>.7?"50%":"3px";return{id:`${b}-${N}`,side:b,size:w,color:k,delay:E,vx:j,vy:$,angularVel:H,life:F,borderRadius:U}});return[...v(g,"left"),...v(y,"right")]},[t,a]),u=o.useRef(null),c=o.useRef({}),p=o.useRef(null),h=o.useRef(s);o.useEffect(()=>{h.current=s},[s]);const d=o.useRef(null),m=o.useRef(null),C=()=>{if(typeof document>"u")return null;let g=document.querySelector("[data-ihab-effect-root]");return g||(g=document.createElement("div"),g.className="app-effect",g.dataset.ihabEffectRoot="",g.style.position="fixed",g.style.inset="0",g.style.pointerEvents="none",g.style.zIndex="99998",document.body.appendChild(g)),g};if(typeof document<"u"&&m.current==null&&(m.current=C()),o.useEffect(()=>{if(!e)return;if(typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches){const te=setTimeout(()=>h.current?.(),0);return()=>clearTimeout(te)}const g=1200,y=performance.now(),v=m.current&&m.current!==document.body?m.current.getBoundingClientRect():null,_=Math.max(60,(window.innerHeight||800)*.05),b=te=>Math.max(40,(te||window.innerWidth)*.02),B=v?.width||window.innerWidth||375,N=v?.height||window.innerHeight||812,f=te=>{const P=[...te].sort((G,X)=>G-X);return P[Math.floor(P.length/2)]||1},w=f(i.map(te=>Math.abs(te.vy))),k=f(i.map(te=>Math.abs(te.vx))),E=Math.sqrt(2*g*(N*.72+_))/w,A=w*E/g,D=B*.5/(k*A),j=(te,P,G)=>Math.min(G,Math.max(P,te)),$=j(E,.8,2.4),H=j(D,.7,2.2),F=r>0?r/dB:1,U=i.map(te=>({...te,life:te.life*F,vx:te.vx*H,vy:te.vy*$,startTime:y+te.delay,ended:!1})),T=v?{x:v.left-b(v.width),y:v.top+v.height+_}:{x:-b(window.innerWidth),y:window.innerHeight+_},I=v?{x:v.left+v.width+b(v.width),y:v.top+v.height+_}:{x:window.innerWidth+b(window.innerWidth),y:window.innerHeight+_},z=te=>{let P=!1;for(const G of U){const X=c.current[G.id];if(!X||!X)continue;if(te<G.startTime){X.style.display="none",P=!0;continue}if(!G._inited){const Be=G.side==="left"?T.x:I.x,le=G.side==="left"?T.y:I.y;X.style.left=`${Be}px`,X.style.top=`${le}px`,X.style.transform="translate3d(0px, 0px, 0)",X.style.display="block",X.style.zIndex="100000",typeof G.color=="string"&&G.color.startsWith("var(")&&(X.style.background=pB(X,G.color)??"#FF0060"),G._inited=!0}const K=(te-G.startTime)/1e3;if(K<0)continue;const L=G.life/1e3;if(K>=L){X.style.opacity="0",X.style.display="none",G.ended=!0;continue}P=!0;const R=G.side==="left"?T.x:I.x,S=G.side==="left"?T.y:I.y,V=R+G.vx*K,ae=S+G.vy*K+.5*g*K*K,ne=(G.angularVel||0)*K,re=V-R,ue=ae-S;X.style.transform=`translate3d(${re}px, ${ue}px, 0) rotate(${ne}deg)`,X.style.opacity=`${Math.max(0,1-K/L)}`}P?p.current=requestAnimationFrame(z):h.current?.()};p.current=requestAnimationFrame(z);const ie=setTimeout(()=>{try{if((m.current?m.current.querySelectorAll(".confetti"):document.querySelectorAll(".confetti")).length===0&&!document.querySelector(".party-container")){const te=document.createElement("div");te.className="party-container",te.style.position="fixed",te.style.inset="0",te.style.pointerEvents="none",te.style.overflow="visible",te.style.zIndex="2147483647";for(const P of i){const G=document.createElement("span");G.className=`confetti confetti--${P.side}`,G.setAttribute("aria-hidden","true"),G.style.display="none",G.style.position="fixed",G.style.left="0px",G.style.top="0px",G.style.width=`${P.size}px`,G.style.height=`${Math.max(4,P.size*.6)}px`,G.style.background=P.color,G.style.borderRadius=P.borderRadius,G.style.transform="translate3d(0,0,0)",G.style.opacity="0",te.appendChild(G),c.current[P.id]=G}(document.body||m.current).appendChild(te),d.current=te}}catch{}},300);return()=>{if(p.current&&cancelAnimationFrame(p.current),clearTimeout(ie),d.current){try{d.current.remove()}catch{}d.current=null}}},[e,r,l,i]),!e)return null;const x=n.jsx("div",{className:"party-container",ref:u,children:i.map(g=>n.jsx("span",{"aria-hidden":!0,ref:y=>{c.current[g.id]=y},className:`confetti confetti--${g.side}`,style:{width:`${g.size}px`,height:`${Math.max(4,g.size*.6)}px`,background:g.color,borderRadius:g.borderRadius}},`${g.id}-${l}`))});return typeof document<"u"?bn.createPortal(x,m.current||document.body):x}const hl=e=>typeof e=="number"&&Number.isFinite(e)&&e>0?e:void 0;function hB({trigger:e=0,active:t=!1}){const[r,a]=o.useState(null);o.useEffect(()=>{if(typeof window>"u")return;const l=i=>{const u=i.detail??{};a(c=>({n:(c?.n??0)+1,count:hl(u.count),strength:hl(u.strength),duration:hl(u.duration)}))};return window.addEventListener("party:trigger",l),()=>window.removeEventListener("party:trigger",l)},[]);const s=o.useCallback(()=>a(null),[]);return n.jsxs(n.Fragment,{children:[n.jsx(pl,{active:t,trigger:e}),r&&n.jsx(pl,{active:!0,trigger:r.n,count:r.count,strength:r.strength,duration:r.duration,onComplete:s})]})}function mB({title:e,sub:t,rightAction:r,titleAction:a,badge:s,badgeVariant:l="default",documentTitle:i,onBack:u,backLabel:c,wrap:p=!1}){const{t:h}=Ne.useTranslation();Q2(typeof e=="string"?e:i??null);const d=c??h("common.back","\uB4A4\uB85C");return n.jsxs("div",{className:p?"page-title page-title--wrap":"page-title",children:[n.jsxs("div",{className:"page-title__main",children:[n.jsxs("div",{className:"page-title__title-row",children:[u&&n.jsx(me,{htmlType:"button",className:"page-title__back",size:48,type:"dot",icon:"chevron-left",iconSize:"large",useBorder:!1,iconColor:"var(--color-text-primary)",ariaLabel:d,showTooltipInfo:d,onClick:u}),n.jsx("h1",{className:"page-title__title h1",children:e}),s&&n.jsx("div",{className:"page-title__badge",children:n.jsx(cn,{label:s,size:"small",variant:l,fill:"outline"})}),a?n.jsx("div",{className:"page-title__title-action",children:a}):null]}),t&&n.jsx("p",{className:"page-title__sub body-2",children:t})]}),r?n.jsx("div",{className:"page-title__action",children:r}):null]})}function fB(e){return e??""}const Bp=o.createContext({words:[],loading:!1});function CB(){return o.useContext(Bp)}function gB({words:e,loading:t,error:r,statusMessage:a,localVersion:s,remoteVersion:l,progress:i,clearAndRefetch:u,checkRemoteVersion:c,children:p}){const h=o.useMemo(()=>({words:e,loading:t,error:r,statusMessage:a,localVersion:s,remoteVersion:l,progress:i,clearAndRefetch:u,checkRemoteVersion:c}),[e,t,r,a,s,l,i,u,c]);return n.jsx(Bp.Provider,{value:h,children:p})}function bB({items:e,actions:t,columns:r,flat:a=!1,className:s,style:l}){const i=r??e.length;return n.jsx("section",{className:xe("summary-strip",a&&"summary-strip--flat",s),style:{"--summary-strip-cols":String(i),...l},children:n.jsxs("div",{className:"summary-strip__row",children:[n.jsx("div",{className:"summary-strip__items",children:e.map((u,c)=>n.jsxs("div",{className:"summary-strip__item",children:[n.jsx("p",{className:"summary-strip__label caption-1",children:u.label}),n.jsx("p",{className:"summary-strip__value body-3b",title:typeof u.value=="string"||typeof u.value=="number"?String(u.value):void 0,children:u.value})]},c))}),t&&n.jsx("div",{className:"summary-strip__actions",children:t})]})})}const yB=(e,t)=>`${e} / ${t}`;function vB({blocks:e,sectionTitles:t,logo:r,footer:a,pageLabel:s=yB,pageWidth:l,pageHeight:i,margin:u,className:c,style:p}){const{t:h}=Ne.useTranslation(),d=o.useRef(null),m=o.useRef(null),C=o.useRef(null),x=o.useRef(null),[g,y]=o.useState(null),[v,_]=o.useState(!1);o.useEffect(()=>{const F=d.current;if(!F)return;const U=()=>_(F.scrollWidth>F.clientWidth+1);if(U(),typeof ResizeObserver>"u")return;const T=new ResizeObserver(U);return T.observe(F),()=>T.disconnect()},[g]);const b=e.map(F=>`${F.id}\0${F.section??""}\0${F.group??""}`).join(""),B=g&&g.shape===b?g.pages:null,[N,f]=o.useState(0);o.useEffect(()=>{const F=x.current;if(!F||typeof ResizeObserver>"u")return;const U=new ResizeObserver(()=>f(F.offsetHeight));return U.observe(F),()=>U.disconnect()},[]);const[w,k]=o.useState(0);o.useEffect(()=>{const F=m.current;if(!F||typeof ResizeObserver>"u")return;let U=null;const T=typeof requestAnimationFrame=="function"?ie=>requestAnimationFrame(ie):ie=>setTimeout(ie,16),I=typeof cancelAnimationFrame=="function"?cancelAnimationFrame:ie=>clearTimeout(ie),z=new ResizeObserver(()=>{U==null&&(U=T(()=>{U=null,k(ie=>ie+1)}))});return Array.from(F.children).forEach(ie=>z.observe(ie)),()=>{z.disconnect(),U!=null&&I(U)}},[b]),o.useLayoutEffect(()=>{const F=m.current,U=x.current;if(!F||!U)return;const T=L=>L.getBoundingClientRect().height||L.offsetHeight,I=new Map;C.current?.querySelectorAll("[data-chrome-section]").forEach(L=>{I.set(L.dataset.chromeSection??"",T(L))});const z=L=>T(U)-(I.get(L??"")??0),ie=Array.from(F.children).map(L=>T(L)),te=[];e.forEach((L,R)=>{const S=te[te.length-1],V=S?e[S[0]]:void 0;V&&L.group!=null&&V.group===L.group&&V.section===L.section?S.push(R):te.push([R])});const P=[];let G=[],X=0;const K=()=>{G.length&&P.push(G),G=[],X=0};te.forEach(L=>{const R=L.reduce((V,ae)=>V+ie[ae],0),S=z(e[L[0]].section);G.length&&e[G[0]].section!==e[L[0]].section&&K(),R>S?L.forEach(V=>{G.length&&X+ie[V]>S+.01&&K(),G.push(V),X+=ie[V]}):(G.length&&X+R>S+.01&&K(),L.forEach(V=>G.push(V)),X+=R)}),K(),y(L=>L&&L.shape===b&&JSON.stringify(L.pages)===JSON.stringify(P)?L:{shape:b,pages:P})},[b,N,l,i,u,w]);const E=ps,A=E,D=a??n.jsxs(n.Fragment,{children:[n.jsx("img",{src:A,alt:"IHAB",className:"report-doc__logo"}),"\xA9 IHAB, Inc. All rights reserved."]}),j=(F,U,T)=>({header:n.jsxs("div",{className:"report-doc__header",children:[n.jsx("h2",{className:"report-doc__title h3b",children:T!=null&&t?.[T]||null}),r]}),footer:n.jsxs("div",{className:"report-doc__footer caption-1",children:[n.jsx("span",{className:"report-doc__footer-left",children:D}),n.jsx("span",{className:"report-doc__page-no",children:s(F,U)})]})}),$=Array.from(new Set(e.map(F=>F.section??""))),H={...l?{"--report-page-w":l}:null,...i?{"--report-page-h":i}:null,...u?{"--report-margin":u}:null,...p};return n.jsxs("div",{ref:d,className:xe("report-doc",c),style:H,tabIndex:v?0:void 0,role:v?"group":void 0,"aria-label":v?h("report.previewRegion","\uBCF4\uACE0\uC11C \uBBF8\uB9AC\uBCF4\uAE30"):void 0,children:[n.jsxs("div",{className:"report-doc__measure","aria-hidden":!0,children:[n.jsx("div",{ref:x,className:"report-doc__ruler"}),n.jsx("div",{ref:C,children:$.map(F=>{const U=j(1,1,F||void 0);return n.jsxs("div",{"data-chrome-section":F,children:[U.header,U.footer]},F)})}),n.jsx("div",{ref:m,className:"report-doc__measure-blocks",children:e.map(F=>n.jsx("div",{children:F.content},F.id))})]}),B&&n.jsx("div",{className:"report-doc__pages",children:B.map((F,U)=>{const{header:T,footer:I}=j(U+1,B.length,e[F[0]].section);return n.jsxs("section",{className:"report-doc__page",children:[T,F.map(z=>n.jsx("div",{children:e[z].content},e[z].id)),I]},U)})})]})}function xB({title:e,fields:t,columns:r=4,className:a,style:s}){return n.jsxs("div",{className:xe("report-info",a),style:{"--report-info-cols":String(r),...s},children:[e&&n.jsx("p",{className:"report-info__title h5b",children:e}),n.jsx("div",{className:"report-info__grid",children:t.map((l,i)=>n.jsxs("div",{className:"report-info__field body-2",children:[n.jsx("span",{className:"report-info__label body-3",children:l.label}),n.jsx("span",{className:"report-info__value",children:l.value})]},i))})]})}const vr=new Map;let io=null;const _B=12;function wB(e){for(let t=e.parentElement;t&&t!==document.body;t=t.parentElement){const r=window.getComputedStyle(t);if(r.transform&&r.transform!=="none"||r.filter&&r.filter!=="none"||r.perspective&&r.perspective!=="none"||/paint|layout|strict|content/.test(r.contain||""))return t}return document}function uo(){const e=new Map;for(const t of vr.keys()){if(!t.isConnected)continue;const r=wB(t),a=e.get(r)??[];a.push(t),e.set(r,a)}for(const t of e.values()){t.sort((a,s)=>a.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1);let r=0;for(const a of t){r>0?a.style.setProperty("--update-alert-stack-offset",`${r}px`):a.style.removeProperty("--update-alert-stack-offset");const s=a.getBoundingClientRect().height;s>0&&(r+=s+_B)}}}function BB(e){return typeof window>"u"?()=>{}:(vr.set(e,(vr.get(e)??0)+1),vr.get(e)===1&&typeof ResizeObserver<"u"&&(io??(io=new ResizeObserver(()=>uo())),io.observe(e)),uo(),()=>{const t=(vr.get(e)??1)-1;if(t>0){vr.set(e,t),uo();return}vr.delete(e),io?.unobserve(e),e.style.removeProperty("--update-alert-stack-offset"),uo()})}function kB({title:e,message:t,actionLabel:r,onAction:a,icon:s,onClose:l,className:i=""}){const{t:u}=Ne.useTranslation(),c=r??u("common.update","\uC5C5\uB370\uC774\uD2B8"),p=o.useRef(null),h=o.useRef(!1);return o.useLayoutEffect(()=>{const d=p.current,m=d?.parentElement?.closest(".update-alert-stack")??d,C=m?BB(m):null;return()=>{C?.(),h.current&&d&&d.contains(document.activeElement)&&Ta(d)}},[]),n.jsxs("div",{ref:p,className:xe("update-alert",i),role:"alert",children:[l&&n.jsx("button",{type:"button",className:"update-alert__close",onClick:()=>{h.current=!0,l()},"aria-label":u("common.close","\uB2EB\uAE30"),children:"\xD7"}),n.jsxs("div",{className:"update-alert__top",children:[n.jsx("div",{className:"update-alert__icon",children:s??n.jsx(Nl,{size:20,strokeWidth:2})}),n.jsxs("div",{className:"update-alert__body",children:[n.jsx("div",{className:"update-alert__title h4",children:e}),n.jsx("div",{className:"update-alert__message body-3",children:t})]})]}),a&&n.jsx(me,{htmlType:"button",size:32,variant:"main",shape:"pill",className:"update-alert__action",onClick:a,children:c})]})}function AB({title:e,titleLevel:t=3,category:r,categoryVariant:a="main",description:s,topActions:l,actions:i,children:u,footerLeft:c,footerRight:p,ariaLabel:h,onClick:d,draggable:m,onDragStart:C,onDragEnd:x,className:g}){const y=t?`h${t}`:"div",{t:v}=Ne.useTranslation(),[_,b]=o.useState(null),B=o.useCallback(()=>b(null),[]),N=o.useCallback(D=>{const j=D.currentTarget.getBoundingClientRect();b($=>$?null:{left:j.left,right:j.right,top:j.top,bottom:j.bottom,width:j.width,height:j.height,x:j.x,y:j.y})},[]),f=(i??[]).filter(Boolean),w=(f.length===1?n.jsx(me,{htmlType:"button",type:"dot",size:40,icon:f[0].icon,ariaLabel:f[0].label,showTooltipInfo:f[0].label,selected:f[0].selected,disabled:f[0].disabled,variant:f[0].variant??"transparent-lightGray",useBorder:!1,onClick:f[0].onClick}):f.length>1?n.jsx(me,{htmlType:"button",type:"dot",size:40,icon:"ellipsis",ariaLabel:v("common.more","\uB354\uBCF4\uAE30"),showTooltipInfo:v("common.more","\uB354\uBCF4\uAE30"),variant:"transparent-lightGray",useBorder:!1,"aria-haspopup":"menu","aria-expanded":!!_,onClick:N}):null)??l,k=c!=null||p!=null,E=u!=null&&u!==!1,A=o.useCallback(D=>{d&&D.target===D.currentTarget&&(D.key==="Enter"||D.key===" ")&&(D.preventDefault(),d())},[d]);return n.jsxs("div",{className:xe("training-card",d?"training-card--clickable":"",g),onClick:d,onKeyDown:d?A:void 0,role:d?"button":void 0,"aria-label":d?h??(typeof e=="string"?e:void 0):void 0,tabIndex:d?0:void 0,draggable:m,onDragStart:C,onDragEnd:x,children:[n.jsxs("div",{className:"training-card__header",children:[r!=null?n.jsx("p",{className:xe("training-card__category","caption-1",a==="sub"&&"training-card__category--sub"),children:r}):n.jsx("p",{className:"training-card__category caption-1","aria-hidden":"true",children:" "}),n.jsxs("div",{className:"training-card__title-row",children:[typeof e=="string"?n.jsx(y,{className:"training-card__title h4",children:e}):e,w!=null&&n.jsx("div",{className:"training-card__top-actions",onClick:D=>D.stopPropagation(),children:w})]}),s!=null?typeof s=="string"?n.jsx("p",{className:"training-card__description body-3",children:s}):s:n.jsx("p",{className:"training-card__description body-3","aria-hidden":"true",children:" "})]}),E?n.jsx("div",{className:"training-card__body",children:u}):n.jsx("div",{className:"training-card__body training-card__body--empty","aria-hidden":"true"}),k?n.jsxs("div",{className:"training-card__footer",children:[c!=null&&n.jsx("div",{className:"training-card__footer-left",children:c}),p!=null&&n.jsx("div",{className:"training-card__meta",children:p})]}):n.jsx("div",{className:"training-card__footer training-card__footer--empty","aria-hidden":"true"}),_&&f.length>1&&n.jsx("div",{className:"training-card__menu-host",onClick:D=>D.stopPropagation(),children:n.jsx(sn,{anchorRect:_,onClose:B,ariaLabel:v("tooltip.menu","\uBA54\uB274"),children:n.jsx(nr,{columns:[{items:f.map(D=>({label:D.label,icon:D.icon,selected:D.selected,disabled:D.disabled,onClick:D.onClick}))}],onClose:B,size:"small"})})})]})}function NB({title:e,titleLevel:t=3,count:r,collapsed:a=!1,onToggle:s,beforeSort:l,sort:i,actions:u,empty:c=!1,emptyContent:p,dragOver:h=!1,onDragOver:d,onDragLeave:m,onDrop:C,children:x,className:g}){const{t:y}=Ne.useTranslation(),v=o.useId(),_=t?`h${t}`:"span",b=s!=null,B=xe("training-card-group",h&&"training-card-group--dragover",a&&"training-card-group--collapsed",b&&"training-card-group--collapsible",g);return n.jsxs("div",{className:B,onDragOver:d,onDragLeave:m,onDrop:C,role:typeof e=="string"&&e?"group":void 0,"aria-labelledby":typeof e=="string"&&e?v:void 0,children:[n.jsxs("header",{className:"training-card-group__header",children:[b&&n.jsx(me,{htmlType:"button",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:a?"chevron-right":"chevron-down",ariaLabel:typeof e=="string"&&e?a?y("common.expandFor",{name:e}):y("common.collapseFor",{name:e}):a?y("common.expand","\uD3BC\uCE58\uAE30"):y("common.collapse","\uC811\uAE30"),className:"training-card-group__chevron","aria-expanded":!a,onClick:s}),typeof e=="string"?n.jsx(_,{id:v,className:"training-card-group__title h5b",children:e}):e,r!==void 0&&n.jsx("span",{className:"training-card-group__count body-3b",children:r}),(l!=null||i||u!=null)&&n.jsxs("span",{className:"training-card-group__actions",onClick:N=>N.stopPropagation(),children:[l,i&&n.jsx(An,{size:40,options:i.options,value:i.value,placeholder:i.placeholder,onChange:i.onChange,ariaLabel:typeof e=="string"&&e?y("common.sortFor",{name:e}):void 0}),u]})]}),!a&&(c?n.jsx("div",{className:"training-card-group__empty body-3",children:p}):n.jsx("div",{className:"training-card-group__grid",children:x}))]})}const EB="speechear:saved_word_tables";function jB(e){if(typeof e!="object"||e===null)return!1;const t=e;return typeof t.id=="string"&&typeof t.name=="string"&&Array.isArray(t.items)}function DB(){try{const e=localStorage.getItem(EB);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(jB):[]}catch{return[]}}function kp(e){return{label:e.word,subLabel:e.pronunciation,colloquialLabel:e.colloquialPronunciation,homonum:e.homonum,grade:e.grade,syllables:[...e.word].length,pos:e.pos,wordType:e.wordType}}function ml(e){return e.map(t=>t.homonum!=null?`${t.word}#${t.homonum}`:t.word).join("|")}function SB(e){const t=new Set;return e.map(r=>{let a=r.id;for(let s=2;t.has(a);s++)a=`${r.id}~${s}`;return t.add(a),a===r.id?r:{...r,id:a}})}function TB({title:e,titleIcon:t,disc:r,filterTitle:a,filterCollapsible:s,filterDefaultCollapsed:l,filterCollapsed:i,onFilterCollapsedChange:u,filterHeaderSummary:c,brand:p,code:h,baseItem:d,baseContentTypes:m,cellCapacity:C,maxItemsPerPage:x,items:g,onSaveComplete:y,onLoad:v,onRemoveItem:_,onCopyItem:b,onReplaceItem:B,onPickForm:N,onReset:f,resetLabel:w,saveButtonLabel:k,secondarySaveButtonLabel:E,onReorder:A,showCellCount:D,onAddItem:j,fillerAdd:$,className:H,renderSavePopup:F,renderWordSearch:U,hideControls:T,saveOnly:I,tableName:z,nameValue:ie,onNameChange:te,descriptionValue:P,onDescriptionChange:G,namePlaceholder:X,descriptionPlaceholder:K,existingNames:L,editingName:R,onCancel:S,initialItemsPerPage:V,onItemsPerPageChange:ae,renderCellAction:ne,actionsLeftExtra:re}){const{t:ue}=Ne.useTranslation(),Be=w??ue("wordPrint.clearAllSelection","\uBAA8\uB450 \uC120\uD0DD \uD574\uC81C"),le=g===void 0,J=!!te,[O,W]=o.useState([]),q=(ie??"").trim(),oe=q||(X??"").trim(),ee=(P??"").trim()||(K??"").trim(),be=(L??[]).map(Me=>Me.trim().toLowerCase()),je=[R?.trim().toLowerCase(),...O].filter(Me=>!!Me),De=[...be];for(const Me of je){const et=De.indexOf(Me);et!==-1&&De.splice(et,1)}const we=q!==""&&De.includes(q.toLowerCase()),[ze,ye]=o.useState(Array(4).fill(null)),[_e,ve]=o.useState(4),[Ee,Oe]=o.useState(null),ot=ze.slice(0,_e),it=!!p?.show,[Fe,Ue]=o.useState(!0),[nt,Te]=o.useState(!0),Xe=p&&{...p,top:Fe,bottom:nt},[rt,ut]=o.useState("landscape"),[gt,_t]=o.useState([...vd]),[pt,Yt]=o.useState("show"),[kt,ct]=o.useState(!0),[Ae,st]=o.useState(!0),ft=o.useRef(null),Ct=o.useRef([]),[Nt,Ft]=o.useState(V==="all"?Number.POSITIVE_INFINITY:V??8),[yt,vt]=o.useState("right"),[Et,It]=o.useState(!1),[Je,At]=o.useState(!1),{toastMessage:Qe,toastType:he,showWarning:Le,clearToast:Pe}=Tu("warning"),We=o.useCallback(()=>Oe(null),[Oe]);d&&le&&Tt("word-table-block-base-item-in-edit","[WordTableBlock] baseItem \uC740 \uD45C\uC2DC \uBAA8\uB4DC(items \uB97C \uC8FC\uB294 \uAF34)\uC5D0\uC11C\uB9CC \uAC78\uB9B0\uB2E4 \u2014 \uD3B8\uC9D1 \uACA9\uC790\uC5D0\uB294 \uC11C\uC9C0 \uC54A\uB294\uB2E4.");const[dt,on]=o.useState(()=>Math.max(g?.length??1,1)),ht=Math.max(C??0,g?.length??0,1),Ke=C!=null||!!D,xt=le?_e:D?Math.max(dt,g?.length??1,1):ht,{width:jt,height:Q}=fr[rt],fe=!le&&!D,Ge=Math.max(1,Math.min(ht,x??ht)),Ye=Math.min(Nt,Ge),at=fe?Ye:xt,mt=x!=null&&C!=null,Mt=mt?Math.max(1,Math.min(Nt,x)):Ye,Ot=o.useRef(ae);o.useEffect(()=>{Ot.current=ae}),o.useEffect(()=>{fe&&Ot.current?.(Mt)},[fe,Mt]);const Tn=Math.ceil((g?.length??0)/Math.max(1,at)),Xt=(g?.length??0)<ht?Math.floor((g?.length??0)/Math.max(1,at))+1:0,Mn=fe?Math.max(1,Tn,Xt):0,pn=fe?Array.from({length:Mn},(Me,et)=>(g??[]).slice(et*at,(et+1)*at)):null,Jt=!!pn&&pn.length>1,en=le?ot.some(Me=>Me!==null&&Me.length>1):(g??[]).some(Me=>(Me.words??[]).length>1),gn=z?.trim()||`${Di(Qr())} ${en?ue("wordTable.printFileNamePair","\uB300\uB9BD\uC30D\uD45C"):ue("wordTable.printFileNameSingle","\uB2E8\uC5B4\uD45C")}`,tn=o.useCallback(()=>Jt?Ct.current.filter(Me=>Me!==null):ft.current?[ft.current]:[],[Jt]),{print:Rt,openNewWindow:Dt,downloadHtml:Ut}=Us({getElements:tn,paperW:jt,paperH:Q,fileName:gn,onPopupBlocked:()=>{Le(ue("wordTable.popupBlocked","\uD31D\uC5C5\uC774 \uCC28\uB2E8\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uBE0C\uB77C\uC6B0\uC800 \uC124\uC815\uC5D0\uC11C \uD31D\uC5C5\uC744 \uD5C8\uC6A9\uD574 \uC8FC\uC138\uC694."))}}),zt=Me=>{ve(Me),ye(et=>et.length>=Me?et:[...et,...Array(Me-et.length).fill(null)]),Oe(null)},$n=Me=>{ye(et=>{const Lt=[...et];return Lt[Me]=null,Lt}),Ee===Me&&Oe(null)},Ln=Me=>{if(Ee===null)return;const et=Ee;ye(Nn=>{const In=[...Nn];return In[et]=Me.length>0?Me:null,In});const Lt=ot.findIndex((Nn,In)=>In>et&&Nn===null);Oe(Lt!==-1?Lt:null)},Fn=le?ot.some(Me=>Me?.some(et=>!!et.colloquialPronunciation)):(g??[]).some(Me=>(Me.words??[]).some(et=>!!et.colloquialLabel)),pe=!le&&xd([...d?[d]:[],...g??[]]),Se=o.useMemo(()=>Br()?le?ze.slice(0,_e).flatMap(Me=>(Me??[]).map(et=>[et.word,et.homonum])):(Me=>Me.flatMap(et=>(et.words??[]).map(Lt=>[Lt.label,Lt.homonum])))([...d?[d]:[],...g??[]]):[],[le,ze,_e,g,d]),[He,Y]=o.useState(!1);o.useEffect(()=>{if(Se.length===0)return;let Me=!1;return Promise.all(Se.map(([et,Lt])=>mi(et,Lt))).then(et=>{Me||Y(et.some(Boolean))},()=>{}),()=>{Me=!0}},[Se]);const de=Se.length>0&&He,ke=o.useMemo(()=>[...le||D?[{label:ue("wordTable.filter.columns","\uCE78 \uC218"),items:Z_.map(Me=>({value:`${Me}\uCE78`,displayLabel:ue("wordTable.filter.column",{count:Me})})),display:"segmented"}]:[],...fe&&(g?.length??0)>0?[jd(ue,{hasPairs:en,itemCount:mt?x:ht,max:x})]:[],...Jt?[J_(ue)]:[]],[ue,le,D,fe,g?.length,en,ht,x,Jt]),$e={...le||D?{[ue("wordTable.filter.columns","\uCE78 \uC218")]:`${xt}\uCE78`}:{},...fe&&(g?.length??0)>0?{[ue(en?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")]:`${Mt}\uAC1C`}:{},...Jt?{[ue("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")]:yt}:{}},Ve=(Me,et)=>{if(et===ue("wordTable.filter.columns","\uCE78 \uC218"))le?zt(parseInt(Me)):on(parseInt(Me));else if(et===ue(en?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")){const Lt=parseInt(Me);Ft(mt?Lt:Dd(Lt,ht))}else et===ue("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")&&vt(Sd(Me))},Ze=le?SB(ot.filter(Me=>Me!==null&&Me.length>0).map(Me=>({id:ml(Me),words:Me.map(kp)}))):g??[],wt=()=>{le&&ye(Me=>Me.length>_e?Me.slice(0,_e):Me)},bt=(Me=!1)=>{if(At(Me),J&&y){const et=oe.trim().toLowerCase();et&&W(Lt=>Lt.includes(et)?Lt:[...Lt,et]),y(oe,Ze,ee||void 0,Me),wt();return}if(I&&y){y("",Ze,void 0,Me),wt();return}if(y){It(!0);return}Ut()},[ge,M]=o.useState(!1),[Z,Ce]=o.useState(""),Re=Z.trim(),qe=Re!==""&&be.includes(Re.toLowerCase()),tt=()=>{Ce(oe?ue("wordTable.save.copyName",{name:oe,defaultValue:"{{name}} (\uBCF5\uC0AC)"}):""),M(!0)},St=()=>{!Re||qe||!y||(y(Re,Ze,ee||void 0,!0),wt(),M(!1))},$t=Ze.length===0,nn=$t||J&&(oe===""||we),rn=()=>{if($t){Le(ue("wordTable.emptyItems","\uB2E8\uC5B4\uB97C 1\uAC1C \uC774\uC0C1 \uCD94\uAC00\uD574\uC8FC\uC138\uC694."));return}if(J&&oe===""){Le(ue("wordTable.save.nameRequired","\uD45C \uC774\uB984\uC744 \uC785\uB825\uD574 \uC8FC\uC138\uC694."));return}J&&we&&Le(ue("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."))},Or=n.jsx(Rr,{items:Ze,orientation:rt,contentTypes:gt,baseItem:d,baseContentTypes:m,cutLine:pt,showOutline:kt,showDivLine:Ae,count:xt});return n.jsxs(n.Fragment,{children:[n.jsxs(Lr,{type:"page",icon:t,title:e,disc:r,className:xe("word-table-block",H),children:[ge&&n.jsx(qn,{size:"small",title:E??ue("wordTable.saveAsNewButton","\uB2E4\uB978 \uC774\uB984\uC73C\uB85C \uC800\uC7A5"),onClose:()=>M(!1),footer:({closeWithAnimation:Me})=>n.jsxs(n.Fragment,{children:[n.jsx(me,{htmlType:"button",size:48,type:"bar",label:ue("common.cancel","\uCDE8\uC18C"),onClick:Me}),n.jsx(me,{htmlType:"button",size:48,type:"bar",variant:"main",label:ue("common.save","\uC800\uC7A5"),disabled:!Re||qe,onClick:St})]}),children:n.jsx(Un,{label:ue("wordTable.save.nameLabel","\uC774\uB984"),value:Z,onChange:Ce,placeholder:ue("wordTable.save.placeholder","\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694."),maxLength:40,size:48,fullWidth:!0,autoFocus:!0,onEnter:St,error:qe?ue("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."):void 0})}),Et&&y&&F?.({defaultName:typeof e=="string"?e:ue("wordTable.defaultName","\uB2E8\uC5B4 \uD45C"),preview:Or,previewW:jt,previewH:Q,items:Ze,existingNames:DB().map(Me=>Me.name),saveAsNew:Je,onSave:(Me,et)=>{y(Me,Ze,et,Je),wt(),It(!1)},onCancel:()=>It(!1)}),(le||j)&&Ee!==null&&U?.({cellIndex:Ee,onConfirm:le?Ln:Me=>{if(j){const et=Me[0];if(et){const Lt=new Set((g??[]).map(In=>In.id));let Nn=ml([et]);for(let In=2;Lt.has(Nn);In++)Nn=`${ml([et])}~${In}`;j({id:Nn,words:[kp(et)]})}}Oe(null)},onClose:We}),!T&&n.jsx(Ws,{title:a,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c,hasImage:de,hasColloquial:Fn,hasCaption:pe,contentTypes:gt,orientation:rt,showOutline:kt,cutLine:pt,showDivLine:Ae,setters:{setContentTypes:_t,setOrientation:ut,setShowOutline:ct,setCutLine:Yt,setShowDivLine:st,setShowTopInfo:Ue,setShowBottomInfo:Te},showCutLine:(fe?at:xt)>1,showDivLine2:en,middleSections:ke,extraSelected:$e,onExtraSelect:Ve,showPaperBands:it,showTopInfo:Fe,showBottomInfo:nt}),Jt&&pn?n.jsx("div",{className:"word-table-block__pages",children:pn.map((Me,et)=>n.jsx(Rr,{orientation:rt,contentTypes:gt,cutLine:pt,showOutline:kt,showDivLine:Ae,count:at,items:Me,baseItem:d,baseContentTypes:m,onRemoveItem:_,onCopyItem:b,onReplaceItem:B,onPickForm:N,onReorder:A&&((Lt,Nn)=>A(Lt+et*at,Nn+et*at)),indexOffset:et*at,totalCount:g?.length??0,renderCellAction:ne&&((Lt,Nn)=>ne(Lt+et*at,Nn)),showFillerAdd:!!j,fillerAdd:$,onActivateCell:j?(Lt=>Oe(Lt+et*at)):void 0,addableCount:Ke?Math.max(0,Math.min(at,ht-et*at)):void 0,brand:Xe,code:h,contentRef:Lt=>{Ct.current[et]=Lt},pageNumber:{current:et+1,total:pn.length},pageNumberPosition:yt},et))}):n.jsx(Rr,{orientation:rt,contentTypes:gt,cutLine:pt,showOutline:kt,showDivLine:Ae,count:at,items:le?void 0:g??[],baseItem:le?void 0:d,baseContentTypes:m,editCells:le?ot:void 0,activeCell:Ee,onActivateCell:le||j?Oe:void 0,onRemoveCell:le?$n:void 0,onRemoveItem:le?void 0:_,onCopyItem:le?void 0:b,onReplaceItem:le?void 0:B,onPickForm:le?void 0:N,onReorder:le?void 0:A,addableCount:Ke?fe?Math.min(at,ht):xt:void 0,renderCellAction:le?void 0:ne,brand:Xe,code:h,showFillerAdd:!!j,fillerAdd:$,contentRef:ft}),!T&&!I&&re!=null&&n.jsx("div",{className:"word-table-block__table-actions",children:re}),J&&!T&&n.jsxs(Sr,{labelWidth:64,useBorder:!1,className:"word-table-block__meta",children:[n.jsx(dn,{variant:"custom",label:ue("wordTable.save.nameLabel","\uC774\uB984"),required:!0,align:"vertical",useFullWidth:!0,children:n.jsx(Un,{required:!0,value:ie??"",onChange:te,placeholder:X?X+ue("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)"):ue("wordTable.save.placeholder","\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694."),ariaLabel:ue("wordTable.save.nameLabel","\uC774\uB984"),maxLength:40,size:48,fullWidth:!0,error:we?ue("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."):void 0,onKeyDown:Me=>{(Me.key==="Tab"&&!Me.shiftKey||Me.key===" ")&&!(ie??"").trim()&&(X??"").trim()&&(Me.preventDefault(),te?.(X??""))}})}),n.jsx(dn,{variant:"custom",label:ue("wordTable.save.descriptionLabel","\uC124\uBA85"),align:"vertical",useFullWidth:!0,children:n.jsx(Un,{value:P??"",onChange:G,placeholder:K?K+ue("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)"):ue("wordTable.save.descriptionPlaceholder","\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC124\uBA85\uC744 \uC785\uB825\uD558\uC138\uC694."),ariaLabel:ue("wordTable.save.descriptionLabel","\uC124\uBA85"),maxLength:200,multiline:!0,rows:2,fullWidth:!0,onKeyDown:Me=>{(Me.key==="Tab"&&!Me.shiftKey||Me.key===" ")&&!(P??"").trim()&&(K??"").trim()&&(Me.preventDefault(),G?.(K??""))}})})]})]}),!T&&n.jsxs("div",{className:"word-table-block__actions",children:[n.jsxs("div",{className:"word-table-block__actions-left",children:[!I&&v&&n.jsx(me,{htmlType:"button",size:40,type:"bar",label:ue("wordTable.load","\uBD88\uB7EC\uC624\uAE30"),onClick:v}),!I&&f&&n.jsx(me,{htmlType:"button",size:40,type:"bar",label:Be,onClick:f}),!I&&n.jsx(me,{htmlType:"button",size:40,type:"bar",label:ue("wordTable.openNewWindow","\uC0C8 \uCC3D\uC73C\uB85C \uBCF4\uAE30"),onClick:Dt})]}),n.jsxs("div",{className:"word-table-block__actions-right",children:[S&&n.jsx(me,{htmlType:"button",size:"56",type:"bar",label:ue("common.cancel","\uCDE8\uC18C"),onClick:S}),!I&&n.jsx(me,{htmlType:"button",size:"56",type:"bar",label:ue("wordTable.print","\uC778\uC1C4\uD558\uAE30"),onClick:Rt}),E&&n.jsx(me,{htmlType:"button",size:"56",type:"bar",label:E,onClick:()=>J?tt():bt(!0),disabled:$t,onDisabledClick:()=>{Le(ue("wordTable.emptyItems","\uB2E8\uC5B4\uB97C 1\uAC1C \uC774\uC0C1 \uCD94\uAC00\uD574\uC8FC\uC138\uC694."))}}),n.jsx(me,{htmlType:"button",size:"56",type:"bar",variant:"main",label:k??ue("wordTable.saveButton","\uC800\uC7A5\uD558\uAE30"),onClick:()=>bt(!1),disabled:nn,onDisabledClick:rn})]})]}),n.jsx($r,{message:Qe,type:he,onClose:Pe})]})}const MB=8;function Ap({items:e,className:t}){const{t:r}=Ne.useTranslation(),a=o.useRef(null),[s,l]=o.useState(null),i=o.useCallback(()=>l(a.current?.getBoundingClientRect()??null),[]),u=o.useCallback(()=>l(null),[]),c=La(!!s,b=>{b?i():u()},a),p=e.length,h=p<=3?1:2,d=MB,m=p>d,C=e.slice(0,m?d-1:d),x=p-C.length,g=e.slice(C.length).map(b=>b.words?.length?b.words.map(B=>B.label).join(" / "):b.id),y=Math.min(5,Math.ceil(g.length/25)),v=Math.ceil(Math.min(p,d)/h)||1,_=h*v;return n.jsx("div",{className:xe("word-table-thumb",t),style:{gridTemplateColumns:`repeat(${h}, 1fr)`},children:Array.from({length:_},(b,B)=>{if(m&&B===d-1)return n.jsxs("div",{ref:a,className:"word-table-thumb__cell word-table-thumb__cell--more",tabIndex:0,"aria-label":r("wordTable.thumbMoreAria",{count:x,words:g.join(", "),defaultValue:"\uADF8 \uBC16 {{count}}\uCE78: {{words}}"}),onPointerEnter:f=>{tr(f)||i()},onPointerLeave:f=>{tr(f)||u()},onFocus:()=>{ur()||i()},onBlur:u,onClick:f=>{f.stopPropagation(),c.touchPress()},children:[n.jsx("span",{className:"word-table-thumb__more body-3",children:r("wordTable.thumbMore",{count:x,defaultValue:"+{{count}}"})}),s&&g.length>0&&n.jsx(er,{anchorRect:s,items:g,showIndex:!1,closeOnOutsideClick:!1,columns:y})]},B);const N=C[B];return N?n.jsx("div",{className:"word-table-thumb__cell",children:(N.words?.length?N.words:[{label:N.id}]).map((f,w)=>n.jsxs(o.Fragment,{children:[w>0&&n.jsx("span",{className:"word-table-thumb__divider"}),n.jsx("span",{className:"word-table-thumb__word body-3",children:f.label})]},w))},B):n.jsx("div",{className:"word-table-thumb__cell word-table-thumb__cell--empty"},B)})})}function $B({items:e,name:t,description:r,createdAt:a,code:s,published:l,publishedLabel:i,shared:u,sharedLabel:c,isNew:p,publisherName:h,publishedAt:d,likeCount:m,downloadCount:C,onPublisherClick:x,selected:g,onClick:y,onMore:v,titleNode:_,className:b}){const{t:B}=Ne.useTranslation(),N=_!=null,f=h!=null||d!=null||m!=null||C!=null,w=k=>{k.target===k.currentTarget&&!N&&(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),y?.())};return n.jsxs("div",{className:xe("word-table-button",g?"word-table-button--selected":"",f?"":"word-table-button--no-footer",b),role:"button",tabIndex:0,"aria-label":s?`${t} (${s})`:t,onClick:N?void 0:y,onKeyDown:w,children:[p&&n.jsx("span",{className:"word-table-button__new-dot","aria-label":B("myWordTable.newBadge","\uC0C8\uB85C \uB9CC\uB4E0 \uD45C")}),n.jsx(Ap,{items:e,className:"word-table-button__thumb"}),n.jsxs("div",{className:"word-table-button__info",children:[n.jsxs("div",{className:"word-table-button__info-text",children:[_??n.jsx("div",{className:"word-table-button__title h4",children:t}),r&&n.jsx("div",{className:"word-table-button__desc body-3",children:r})]}),v&&!N&&n.jsx(me,{htmlType:"button",className:"word-table-button__more",size:32,type:"dot",variant:"transparent-gray",useBorder:!1,icon:"ellipsis",ariaLabel:B("common.moreFor",{name:t}),onClick:k=>{k.stopPropagation(),v(k)}})]}),(s||a||l||u)&&n.jsxs("div",{className:"word-table-button__meta-row",children:[n.jsx("span",{className:"word-table-button__meta-left",children:n.jsx("span",{className:"word-table-button__meta caption-1",children:a?ji(a,B):""})}),n.jsxs("span",{className:"word-table-button__meta-right",children:[(l||u)&&n.jsxs("span",{className:"word-table-button__badges",children:[l&&n.jsx(cn,{className:"word-table-button__badge",size:"small",variant:"main",fill:"soft",iconLeft:"book-marked",label:i??B("myWordTable.publishedBadge","\uBC1C\uD589\uB428")}),u&&n.jsx(cn,{className:"word-table-button__badge",size:"small",fill:"soft",iconLeft:"link",label:c??B("myWordTable.sharedBadge","\uACF5\uC720 \uC911")})]}),s&&n.jsx("span",{className:"word-table-button__code caption-1",children:s})]})]}),f&&n.jsxs("div",{className:"word-table-button__footer",children:[n.jsxs("span",{className:"word-table-button__store-by",children:[h&&(x?n.jsx("button",{className:"training-card__publisher body-4",type:"button","aria-label":B("wordTable.publisherFilter",{name:h,defaultValue:"{{name}} \uAC8C\uC2DC\uD55C \uAC83\uB9CC \uBCF4\uAE30"}),onClick:k=>{k.stopPropagation(),x()},children:h}):n.jsx("span",{className:"training-card__publisher training-card__publisher--static body-4",children:h})),d&&n.jsx("span",{className:"training-card__date body-4",children:ji(d,B)})]}),n.jsxs("span",{className:"word-table-button__store-stats",children:[m!=null&&n.jsx(cn,{size:"small",fill:"soft",variant:"like",iconLeft:"heart",label:String(m),"aria-label":B("common.likeCount",{count:m,defaultValue:`\uC88B\uC544\uC694 ${m}`})}),C!=null&&n.jsx(cn,{size:"small",fill:"soft",variant:"main",iconLeft:"download",label:String(C),"aria-label":B("common.downloadCount",{count:C,defaultValue:`\uAC00\uC838\uAC04 \uC218 ${C}`})})]})]})]})}/**
1063
1063
  * @license lucide-react v1.38.0 - ISC
1064
1064
  *
1065
1065
  * This source code is licensed under the ISC license.
@@ -1071,4 +1071,4 @@ ${f.badge}`:f.badge:void 0;if(k&&h(f.code))return null;if(!f.badge&&!m)return C(
1071
1071
  * See the LICENSE file in the root directory of this source tree.
1072
1072
  */const PB=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],FB=se("circle-x",PB);function IB(e){return{idle:0,"word-download":1,"image-list":2,"image-match":2,"pair-build":3,done:4}[e]??0}function fl({icon:e,label:t,state:r,pct:a,subText:s}){const{t:l}=Ne.useTranslation(),i=r==="done",u=r==="pending",c=r==="error",p=i?100:a??0;return n.jsxs("div",{className:"wdup-phase-card",children:[n.jsx("div",{className:`wdup-phase-card__icon${i?" wdup-phase-card__icon--done":c?" wdup-phase-card__icon--error":""}`,children:i?n.jsx(Sl,{size:22,color:"white",strokeWidth:2.5}):c?n.jsx(FB,{size:22,color:"white",strokeWidth:2.5}):n.jsx("span",{className:`wdup-phase-card__icon-inner${u?" wdup-phase-card__icon-inner--pending":""}`,children:e})}),n.jsxs("div",{className:"wdup-phase-card__body",children:[n.jsxs("div",{className:"wdup-phase-card__top",children:[n.jsx("span",{className:`wdup-phase-card__label body-2${u?" wdup-phase-card__label--pending":""}`,children:t}),i?n.jsx(cn,{variant:"sub",fill:"soft",size:"small",label:l("common.done","\uC644\uB8CC")}):c?n.jsx(cn,{variant:"danger",fill:"soft",size:"small",label:l("common.failed","\uC2E4\uD328")}):(s||a!==void 0)&&n.jsxs("span",{className:"wdup-phase-card__sub body-3",children:[s,s&&a!==void 0?` \xB7 ${a}%`:a!==void 0?`${a}%`:""]})]}),!u&&n.jsx("div",{className:"wdup-bar",children:n.jsx("div",{className:`wdup-bar__fill${i?" wdup-bar__fill--done":c?" wdup-bar__fill--error":""}${r==="active"&&a===void 0?" wdup-bar__fill--indeterminate":""}`,style:{width:a!==void 0||i||c?`${c?100:p}%`:void 0}})})]})]})}function OB({title:e,progress:t,onDone:r,onRetry:a,onClose:s,inline:l}){const{t:i}=Ne.useTranslation(),{phase:u,error:c,wordCount:p,imagePage:h,imageDone:d,imageTotal:m,pairPercent:C}=t,x=IB(u),g=u==="done",y=!!c;function v(w){return y&&x===w?"error":x>w?"done":x===w?"active":"pending"}const _=v(1),b=v(2),B=v(3),N=u==="image-match"&&m?Math.round((d??0)/m*100):void 0,f=o.useMemo(()=>{if(b!=="done"){if(u==="image-list")return i("wordData.checkingPage",{page:h??1});if(u==="image-match"&&m)return i("wordData.imageCount",{done:Wo(d),total:Wo(m)})}},[b,u,h,m,d,i]);return n.jsx(qn,{inline:l,className:"popup--word-data-update",title:e,footer:y&&a?n.jsx(me,{htmlType:"button",size:56,variant:"main",onClick:a,children:i("common.retry","\uB2E4\uC2DC \uC2DC\uB3C4")}):y?n.jsx(me,{htmlType:"button",size:56,variant:"main",onClick:s??r,children:i("common.close","\uB2EB\uAE30")}):n.jsx(me,{htmlType:"button",size:56,variant:"main",disabled:!g,onClick:r,children:i("common.done","\uC644\uB8CC")}),children:n.jsxs("div",{className:"wdup-cards",children:[n.jsx(fl,{icon:n.jsx(Al,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:i("wordData.phaseWordDownload","\uB2E8\uC5B4 \uB370\uC774\uD130 \uB2E4\uC6B4\uB85C\uB4DC"),state:_,subText:_==="active"?i("wordData.downloadingCount",{n:Wo(p),count:p}):void 0}),n.jsx(fl,{icon:n.jsx(RB,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:i("wordData.phaseImageCheck","\uC774\uBBF8\uC9C0 \uD655\uC778"),state:b,pct:N,subText:f}),n.jsx(fl,{icon:n.jsx(jl,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:i("wordData.phasePairAnalysis","\uB2E8\uC5B4\uC30D \uBD84\uC11D"),state:B,pct:B==="active"?C??0:void 0,subText:void 0})]})})}const zB=.15;function Vt(e,t,r=0){return{animation:`hero-visual-${e} ${t}s ease-in-out ${r}s infinite backwards`}}function qt(e,t={}){return{className:`hero-visual__in hero-visual__in--${e}`,style:{transformOrigin:t.origin,"--hero-visual-turn":t.turn??0,...t.vars}}}const ya={pathLength:1,strokeDasharray:"1 1"},Cl={transformBox:"fill-box",transformOrigin:"center"},Ie={c1:"var(--hero-visual-1)",c2:"var(--hero-visual-2)",c3:"var(--hero-visual-3)",c4:"var(--hero-visual-4)",c5:"var(--hero-visual-5)",c6:"var(--hero-visual-6)"},gl=[Ie.c1,Ie.c2,Ie.c3,Ie.c4,Ie.c5,Ie.c6];function Np(e,t,r,a){return Array.from({length:a},(s,l)=>{const i=l/a*Math.PI*2;return{x:e+r*Math.cos(i),y:t+r*Math.sin(i)}})}const co={blobs:{viewBox:"0 20 660 660",width:660,height:660,render:e=>n.jsxs(n.Fragment,{children:[n.jsxs("defs",{children:[n.jsxs("linearGradient",{id:`${e}-big`,x1:"0",y1:"0",x2:"1",y2:"1",children:[n.jsx("stop",{offset:".5",stopColor:"var(--color-main)"}),n.jsx("stop",{offset:".8",stopColor:"var(--color-sub)"})]}),n.jsxs("linearGradient",{id:`${e}-small`,x1:"0",y1:"0",x2:"1",y2:"1",children:[n.jsx("stop",{offset:".5",stopColor:"var(--color-sub)"}),n.jsx("stop",{offset:".8",stopColor:"color-mix(in srgb, #ffffbb 30%, var(--color-sub))"})]})]}),n.jsx("g",{...qt("bloom",{turn:0,origin:"330px 350px"}),children:n.jsxs("g",{style:Vt("blob-1",22),children:[n.jsx("circle",{cx:330,cy:350,r:240,fill:`url(#${e}-big)`}),[{stroke:"rgba(77, 205, 192, 0.45)",delay:0},{stroke:"rgba(73, 156, 223, 0.35)",delay:1.35},{stroke:"rgba(77, 205, 192, 0.25)",delay:2.7}].map(t=>n.jsx("circle",{className:"hero-visual__ring",cx:330,cy:350,r:241,fill:"none",stroke:t.stroke,strokeWidth:2,style:{...Cl,animation:`hero-visual-wave 4s ease-out ${t.delay}s infinite backwards`}},t.delay))]})}),n.jsx("g",{...qt("bloom",{turn:.06,origin:"490px 490px"}),children:n.jsx("circle",{cx:490,cy:490,r:100,fill:`url(#${e}-small)`,style:Vt("blob-2",17,-5)})})]})},ribbon:{viewBox:"-40 140 880 294",width:880,height:294,render:e=>{const t="M-40,420 C140,470 240,330 360,340 S520,500 600,400 S560,200 440,250 S480,420 580,360 S740,200 840,140",r="M440,250 C320,300 480,420 580,360 S740,200 840,140";return n.jsxs(n.Fragment,{children:[n.jsxs("defs",{children:[n.jsxs("linearGradient",{id:`${e}-rib`,gradientUnits:"userSpaceOnUse",x1:"0",y1:"420",x2:"760",y2:"120",children:[n.jsx("stop",{offset:"0",stopColor:Ie.c1}),n.jsx("stop",{offset:".4",stopColor:Ie.c3}),n.jsx("stop",{offset:".7",stopColor:Ie.c4}),n.jsx("stop",{offset:"1",stopColor:Ie.c6})]}),n.jsxs("mask",{id:`${e}-mask`,maskUnits:"userSpaceOnUse",x:"-100",y:"-100",width:"1000",height:"800",children:[n.jsx("rect",{x:"-100",y:"-100",width:"1000",height:"800",fill:"#000"}),n.jsx("path",{d:t,fill:"none",stroke:"#fff",strokeWidth:62,strokeLinecap:"round"})]}),n.jsx("filter",{id:`${e}-blur`,x:"-20%",y:"-20%",width:"140%",height:"140%",children:n.jsx("feGaussianBlur",{stdDeviation:"9"})})]}),n.jsxs("g",{style:Vt("floaty",7),children:[n.jsx("path",{d:t,fill:"none",stroke:`url(#${e}-rib)`,strokeWidth:64,strokeLinecap:"round",strokeLinejoin:"round",...ya,...qt("draw")}),n.jsx("g",{mask:`url(#${e}-mask)`,...qt("fade",{turn:.04}),children:n.jsx("path",{d:r,fill:"none",stroke:Ie.c1,strokeWidth:64,strokeLinecap:"butt",strokeDasharray:"0 130 3000",opacity:".34",filter:`url(#${e}-blur)`,transform:"translate(0,10)"})}),n.jsx("path",{d:r,fill:"none",stroke:`url(#${e}-rib)`,strokeWidth:64,strokeLinecap:"round",strokeLinejoin:"round",...ya,...qt("draw",{turn:.06})})]})]})}},spheres:{viewBox:"0 -10 640 580",width:640,height:580,render:e=>{const t=[{cx:450,cy:240,r:190,fill:`url(#${e}-halo)`,opacity:.8,blur:!0,idle:Vt("breathe",9),self:!0,turn:0},{cx:275,cy:45,r:55,fill:`url(#${e}-drop)`,idle:Vt("drift",8),turn:.09},{cx:310,cy:310,r:160,fill:`url(#${e}-lime)`,idle:Vt("floaty",7),turn:.03},{cx:150,cy:430,r:150,fill:`url(#${e}-fade)`,opacity:.75,blend:!0,idle:Vt("floaty",7,2.5),turn:.06},{cx:361,cy:521,r:21,fill:`url(#${e}-bead)`,idle:Vt("drift",6,1),turn:.12}];return n.jsxs(n.Fragment,{children:[n.jsxs("defs",{children:[n.jsxs("radialGradient",{id:`${e}-halo`,cx:".4",cy:".4",r:".85",children:[n.jsx("stop",{offset:"0",stopColor:Ie.c5}),n.jsx("stop",{offset:".55",stopColor:Ie.c2}),n.jsx("stop",{offset:".72",stopColor:"#ffffff"}),n.jsx("stop",{offset:"1",stopColor:"#ffffff"})]}),n.jsxs("linearGradient",{id:`${e}-drop`,x1:"0",y1:"0",x2:"0",y2:"1",children:[n.jsx("stop",{offset:"0",stopColor:Ie.c1}),n.jsx("stop",{offset:".7",stopColor:Ie.c5}),n.jsx("stop",{offset:"1",stopColor:Ie.c5,stopOpacity:"0"})]}),n.jsxs("linearGradient",{id:`${e}-lime`,x1:".67",y1:".03",x2:".33",y2:".97",children:[n.jsx("stop",{offset:"0",stopColor:Ie.c6}),n.jsx("stop",{offset:".45",stopColor:Ie.c4}),n.jsx("stop",{offset:"1",stopColor:Ie.c1})]}),n.jsxs("linearGradient",{id:`${e}-fade`,x1:"0",y1:"0",x2:"0",y2:"1",children:[n.jsx("stop",{offset:"0",stopColor:Ie.c1}),n.jsx("stop",{offset:".45",stopColor:Ie.c3}),n.jsx("stop",{offset:".95",stopColor:Ie.c3,stopOpacity:"0"})]}),n.jsxs("linearGradient",{id:`${e}-bead`,x1:"0",y1:"0",x2:"0",y2:"1",children:[n.jsx("stop",{offset:"0",stopColor:Ie.c4}),n.jsx("stop",{offset:"1",stopColor:Ie.c1})]}),n.jsx("filter",{id:`${e}-soft`,x:"-30%",y:"-30%",width:"160%",height:"160%",children:n.jsx("feGaussianBlur",{stdDeviation:"34"})})]}),t.map(r=>n.jsx("g",{...qt("settle",{turn:r.turn,origin:`${r.cx}px ${r.cy}px`}),children:n.jsx("circle",{className:r.blend?"hero-visual__blades":void 0,cx:r.cx,cy:r.cy,r:r.r,fill:r.fill,opacity:r.opacity,filter:r.blur?`url(#${e}-soft)`:void 0,style:r.self?{...Cl,...r.idle}:r.idle})},`${r.cx},${r.cy}`))]})}},clover:{viewBox:"203.5 123.5 273 273",width:273,height:273,render:e=>{const t=[{d:"M360,140 A140,140 0 0 1 220,280 L220,232 A92,92 0 0 0 312,140 Z",fill:`url(#${e}-p1)`,origin:"220px 140px",turn:0},{d:"M460,280 A140,140 0 0 1 320,140 L368,140 A92,92 0 0 0 460,232 Z",fill:`url(#${e}-p3)`,origin:"460px 140px",turn:.03},{d:"M320,380 A140,140 0 0 1 460,240 L460,288 A92,92 0 0 0 368,380 Z",fill:`url(#${e}-p4)`,origin:"460px 380px",turn:.06},{d:"M220,240 A140,140 0 0 1 360,380 L312,380 A92,92 0 0 0 220,288 Z",fill:`url(#${e}-p2)`,origin:"220px 380px",turn:.09}];return n.jsxs(n.Fragment,{children:[n.jsxs("defs",{children:[n.jsxs("linearGradient",{id:`${e}-p1`,x1:"0",y1:"0",x2:"1",y2:"1",children:[n.jsx("stop",{offset:"0",stopColor:Ie.c3}),n.jsx("stop",{offset:"1",stopColor:Ie.c6})]}),n.jsxs("linearGradient",{id:`${e}-p2`,x1:"0",y1:"1",x2:"1",y2:"0",children:[n.jsx("stop",{offset:"0",stopColor:Ie.c1}),n.jsx("stop",{offset:"1",stopColor:Ie.c4})]}),n.jsxs("linearGradient",{id:`${e}-p3`,x1:"0",y1:"0",x2:"1",y2:"0",children:[n.jsx("stop",{offset:"0",stopColor:Ie.c4}),n.jsx("stop",{offset:"1",stopColor:Ie.c3})]}),n.jsxs("linearGradient",{id:`${e}-p4`,x1:"1",y1:"0",x2:"0",y2:"1",children:[n.jsx("stop",{offset:"0",stopColor:Ie.c6}),n.jsx("stop",{offset:"1",stopColor:Ie.c3})]})]}),n.jsx("g",{className:"hero-visual__petals",children:t.map(r=>n.jsx("path",{d:r.d,fill:r.fill,...qt("pop",{turn:r.turn,origin:r.origin})},r.origin))})]})}},stackedPills:{viewBox:"-46.5 -88.9 493 493",width:493,height:493,render:e=>n.jsxs(n.Fragment,{children:[n.jsxs("defs",{children:[n.jsxs("linearGradient",{id:`${e}-p1`,x1:"0",y1:"0",x2:"1",y2:"1",children:[n.jsx("stop",{offset:"0",stopColor:Ie.c5}),n.jsx("stop",{offset:"1",stopColor:Ie.c6})]}),n.jsxs("linearGradient",{id:`${e}-p2`,x1:"0",y1:"0",x2:"1",y2:"1",children:[n.jsx("stop",{offset:"0",stopColor:Ie.c3}),n.jsx("stop",{offset:"1",stopColor:Ie.c4})]}),n.jsxs("linearGradient",{id:`${e}-p3`,x1:"0",y1:"0",x2:"1",y2:"1",children:[n.jsx("stop",{offset:"0",stopColor:Ie.c1}),n.jsx("stop",{offset:"1",stopColor:Ie.c2})]})]}),[{cy:60,angle:-16,color:`url(#${e}-p1)`,opacity:.75},{cy:160,angle:14,color:`url(#${e}-p2)`,opacity:.85},{cy:260,angle:-14,color:`url(#${e}-p3)`,opacity:.95}].map((t,r)=>n.jsx("g",{...qt("fan",{origin:`200px ${t.cy}px`,vars:{"--dy":`${160-t.cy}px`,"--a":`${t.angle}deg`}}),children:n.jsx("rect",{x:30,y:t.cy-60,width:340,height:120,rx:60,fill:t.color,opacity:t.opacity,style:{...Cl,...Vt("sway",7,r)}})},t.cy))]})},doubleRing:{viewBox:"-3.5 -78.5 777 777",width:777,height:777,render:e=>{const t=n.jsx("g",{style:{animation:"hero-visual-rove-a 19s ease-in-out infinite"},children:n.jsx("g",{style:{transformOrigin:"290px 300px",animation:"hero-visual-revolve 26s linear infinite"},children:n.jsx("circle",{cx:290,cy:300,r:210,fill:"none",stroke:`url(#${e}-r1)`,strokeWidth:74,strokeLinecap:"round",...ya,...qt("draw")})})});return n.jsxs(n.Fragment,{children:[n.jsxs("defs",{children:[n.jsxs("linearGradient",{id:`${e}-r1`,gradientUnits:"userSpaceOnUse",x1:"60",y1:"80",x2:"520",y2:"520",children:[n.jsx("stop",{offset:"0",stopColor:Ie.c6}),n.jsx("stop",{offset:".5",stopColor:Ie.c4}),n.jsx("stop",{offset:"1",stopColor:Ie.c2})]}),n.jsxs("linearGradient",{id:`${e}-r2`,gradientUnits:"userSpaceOnUse",x1:"300",y1:"120",x2:"700",y2:"560",children:[n.jsx("stop",{offset:"0",stopColor:Ie.c3}),n.jsx("stop",{offset:".55",stopColor:Ie.c1}),n.jsx("stop",{offset:"1",stopColor:Ie.c1})]}),n.jsxs("mask",{id:`${e}-over`,maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"800",height:"640",children:[n.jsx("rect",{x:"0",y:"0",width:"800",height:"640",fill:"#000"}),n.jsx("circle",{cx:500,cy:340,r:190,fill:"none",stroke:"#fff",strokeWidth:82,style:{animation:"hero-visual-rove-b 23s ease-in-out infinite"}}),n.jsx("rect",{x:"0",y:"323",width:"800",height:"320",fill:"#000"})]})]}),n.jsxs("g",{style:{transformOrigin:"380px 300px",...Vt("breathe",9)},children:[t,n.jsx("g",{style:{animation:"hero-visual-rove-b 23s ease-in-out infinite"},children:n.jsx("g",{style:{transformOrigin:"500px 340px",animation:"hero-visual-revolve-r 22s linear infinite"},children:n.jsx("circle",{cx:500,cy:340,r:190,fill:"none",stroke:`url(#${e}-r2)`,strokeWidth:74,strokeLinecap:"round",...ya,...qt("draw",{turn:.08})})})}),n.jsx("g",{mask:`url(#${e}-over)`,children:t})]})]})}},concentric:{viewBox:"-23.5 -83.5 727 727",width:727,height:727,render:e=>n.jsxs(n.Fragment,{children:[n.jsxs("defs",{children:[n.jsxs("linearGradient",{id:`${e}-outer`,gradientUnits:"userSpaceOnUse",x1:"20",y1:"-40",x2:"660",y2:"600",children:[n.jsx("stop",{offset:"0",stopColor:Ie.c3}),n.jsx("stop",{offset:"1",stopColor:Ie.c6})]}),n.jsxs("linearGradient",{id:`${e}-mid`,gradientUnits:"userSpaceOnUse",x1:"120",y1:"280",x2:"560",y2:"280",children:[n.jsx("stop",{offset:"0",stopColor:Ie.c2}),n.jsx("stop",{offset:"1",stopColor:Ie.c4})]}),n.jsxs("linearGradient",{id:`${e}-inner`,gradientUnits:"userSpaceOnUse",x1:"200",y1:"420",x2:"480",y2:"140",children:[n.jsx("stop",{offset:"0",stopColor:Ie.c1}),n.jsx("stop",{offset:".5",stopColor:Ie.c1}),n.jsx("stop",{offset:"1",stopColor:Ie.c3})]})]}),[{r:54,stroke:Ie.c2,opacity:1,idle:0,turn:0},{r:134,stroke:`url(#${e}-inner)`,opacity:.9,idle:.4,turn:.04},{r:214,stroke:`url(#${e}-mid)`,opacity:.8,idle:.8,turn:.08},{r:294,stroke:`url(#${e}-outer)`,opacity:.55,idle:1.2,turn:.12}].map(t=>n.jsx("g",{...qt("pop",{turn:t.turn,origin:"340px 280px"}),children:n.jsx("circle",{cx:340,cy:280,r:t.r,fill:"none",stroke:t.stroke,strokeWidth:52,opacity:t.opacity,style:{transformOrigin:"340px 280px",...Vt("pulse",4,t.idle)}})},t.r))]})},metaball:{viewBox:"-16 82 530 536",width:530,height:536,render:e=>n.jsxs(n.Fragment,{children:[n.jsxs("defs",{children:[n.jsxs("filter",{id:`${e}-goo`,x:"-20%",y:"-20%",width:"140%",height:"140%",children:[n.jsx("feGaussianBlur",{stdDeviation:"18"}),n.jsx("feColorMatrix",{values:"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 26 -12"})]}),n.jsxs("linearGradient",{id:`${e}-big`,x1:"0",y1:"0",x2:"1",y2:"1",children:[n.jsx("stop",{offset:".5",stopColor:"var(--color-main)"}),n.jsx("stop",{offset:".8",stopColor:"var(--color-sub)"})]}),n.jsxs("linearGradient",{id:`${e}-small`,x1:"0",y1:"0",x2:"1",y2:"1",children:[n.jsx("stop",{offset:".5",stopColor:"var(--color-sub)"}),n.jsx("stop",{offset:".8",stopColor:"color-mix(in srgb, #ffffbb 30%, var(--color-sub))"})]})]}),n.jsxs("g",{filter:`url(#${e}-goo)`,children:[n.jsx("g",{...qt("meet",{vars:{"--from":"20px"}}),children:n.jsx("circle",{cx:240,cy:350,r:240,fill:`url(#${e}-big)`,style:Vt("blob-1",22)})}),n.jsx("g",{...qt("meet",{turn:.03,vars:{"--from":"-120px"}}),children:n.jsx("circle",{cx:400,cy:490,r:100,fill:`url(#${e}-small)`,style:Vt("blob-2",17,-5)})})]})]})},dottedRipple:{viewBox:"87.5 27.5 505 505",width:505,height:505,render:()=>n.jsxs("g",{style:{transformOrigin:"340px 280px",...Vt("breathe",6)},children:[n.jsx("g",{...qt("pop",{turn:0,origin:"340px 280px"}),children:n.jsx("circle",{cx:340,cy:280,r:22,fill:Ie.c1})}),Array.from({length:5},(e,t)=>n.jsx("g",{...qt("pop",{turn:.03*(t+1),origin:"340px 280px"}),children:Np(340,280,50+42*t,8+8*t).map(r=>n.jsx("circle",{cx:r.x,cy:r.y,r:9-1.2*t,fill:gl[t]},`${r.x},${r.y}`))},t))]})},vesica:{viewBox:"67.5 7.5 545 545",width:545,height:545,render:e=>n.jsxs(n.Fragment,{children:[n.jsxs("defs",{children:[n.jsxs("linearGradient",{id:`${e}-cool`,x1:"0",y1:"0",x2:"1",y2:"1",children:[n.jsx("stop",{offset:"0",stopColor:Ie.c1}),n.jsx("stop",{offset:"1",stopColor:Ie.c3})]}),n.jsxs("linearGradient",{id:`${e}-warm`,x1:"0",y1:"0",x2:"1",y2:"1",children:[n.jsx("stop",{offset:"0",stopColor:Ie.c4}),n.jsx("stop",{offset:"1",stopColor:Ie.c6})]})]}),n.jsxs("g",{className:"hero-visual__lens",children:[n.jsx("g",{...qt("meet",{vars:{"--from":"70px"}}),children:n.jsx("circle",{cx:270,cy:280,r:170,fill:`url(#${e}-cool)`,opacity:".8",style:Vt("approach-r",6)})}),n.jsx("g",{...qt("meet",{vars:{"--from":"-70px"}}),children:n.jsx("circle",{cx:410,cy:280,r:170,fill:`url(#${e}-warm)`,opacity:".8",style:Vt("approach",6)})})]})]})},stackedDiscs:{viewBox:"112.5 67.5 455 455",width:455,height:455,render:()=>n.jsx("g",{className:"hero-visual__discs",children:gl.map((e,t)=>n.jsx("g",{...qt("pop",{turn:t*.025,origin:`340px ${150+58*t}px`}),children:n.jsx("ellipse",{cx:340,cy:150+58*t,rx:200-12*t,ry:46,fill:e,opacity:".8",style:Vt("floaty",7,.4*t)})},e))})},flower:{viewBox:"124 64 432 432",width:432,height:432,render:()=>n.jsx("g",{className:"hero-visual__blades",style:{transformOrigin:"340px 280px",...Vt("breathe",9)},children:Np(340,280,95,6).map((e,t)=>n.jsx("g",{...qt("unfold",{turn:t*.025,origin:"340px 280px",vars:{"--gx":`${340-e.x}px`,"--gy":`${280-e.y}px`}}),children:n.jsx("circle",{cx:e.x,cy:e.y,r:95,fill:gl[t],opacity:".6",style:Vt("gather",36)})},`${e.x},${e.y}`))})},squircles:{viewBox:"7 7 186 186",width:186,height:186,render:e=>n.jsxs(n.Fragment,{children:[n.jsxs("defs",{children:[n.jsxs("linearGradient",{id:`${e}-q1`,x1:"0",y1:"0",x2:"1",y2:"1",children:[n.jsx("stop",{offset:"0",stopColor:Ie.c6}),n.jsx("stop",{offset:"1",stopColor:Ie.c4})]}),n.jsxs("linearGradient",{id:`${e}-q2`,x1:"0",y1:"0",x2:"1",y2:"1",children:[n.jsx("stop",{offset:"0",stopColor:Ie.c3}),n.jsx("stop",{offset:"1",stopColor:Ie.c4})]}),n.jsxs("linearGradient",{id:`${e}-q3`,x1:"0",y1:"0",x2:"1",y2:"1",children:[n.jsx("stop",{offset:"0",stopColor:Ie.c1}),n.jsx("stop",{offset:"1",stopColor:Ie.c2})]})]}),[{d:"M100 18 C150 18 182 50 182 100 C182 150 150 182 100 182 C50 182 18 150 18 100 C18 50 50 18 100 18 Z",fill:`url(#${e}-q1)`,opacity:.55,idle:0,turn:0},{d:"M100 42 C136 42 158 64 158 100 C158 136 136 158 100 158 C64 158 42 136 42 100 C42 64 64 42 100 42 Z",fill:`url(#${e}-q2)`,opacity:.75,idle:.5,turn:.03},{d:"M100 66 C122 66 134 78 134 100 C134 122 122 134 100 134 C78 134 66 122 66 100 C66 78 78 66 100 66 Z",fill:`url(#${e}-q3)`,opacity:1,idle:1,turn:.06}].map(t=>n.jsx("g",{...qt("bloom",{turn:t.turn,origin:"100px 100px"}),children:n.jsx("g",{style:{transformOrigin:"100px 100px",...Vt("breathe",5,t.idle)},children:n.jsx("path",{d:t.d,fill:t.fill,opacity:t.opacity})})},t.turn))]})},dotGrid:{viewBox:"14 14 172 172",width:172,height:172,render:e=>{const t=[50,100,150].flatMap((r,a)=>[50,100,150].map((s,l)=>({cx:s,cy:r,fill:`url(#${e}-${s===100&&r===100?"n3":a===2?"n2":"n1"})`,middle:s===100&&r===100,idle:(a*3+l)*.3,turn:(a*3+l)*.015})));return n.jsxs(n.Fragment,{children:[n.jsx("defs",{children:[["n1",Ie.c3,Ie.c4],["n2",Ie.c6,Ie.c5],["n3",Ie.c1,Ie.c2]].map(([r,a,s])=>n.jsxs("linearGradient",{id:`${e}-${r}`,x1:"0",y1:"0",x2:"1",y2:"1",children:[n.jsx("stop",{offset:"0",stopColor:a}),n.jsx("stop",{offset:"1",stopColor:s})]},r))}),t.map(r=>n.jsx("g",{...qt("pop",{turn:r.turn,origin:`${r.cx}px ${r.cy}px`}),children:n.jsx("circle",{cx:r.cx,cy:r.cy,r:18,fill:r.fill,style:r.middle?void 0:Vt("blink",2.7,r.idle)})},`${r.cx},${r.cy}`))]})}},stairs:{viewBox:"13.5 18.5 175 175",width:175,height:175,render:e=>n.jsxs(n.Fragment,{children:[n.jsx("defs",{children:[["t1",Ie.c6,Ie.c5,110],["t2",Ie.c4,Ie.c3,86],["t3",Ie.c3,Ie.c2,62],["t4",Ie.c1,Ie.c2,38]].map(([t,r,a,s])=>n.jsxs("linearGradient",{id:`${e}-${t}`,gradientUnits:"userSpaceOnUse",x1:"0",y1:s,x2:"0",y2:174,children:[n.jsx("stop",{offset:"0",stopColor:a}),n.jsx("stop",{offset:"1",stopColor:r})]},t))}),[{x:24,y:110,stroke:`url(#${e}-t1)`},{x:66,y:86,stroke:`url(#${e}-t2)`},{x:108,y:62,stroke:`url(#${e}-t3)`},{x:150,y:38,stroke:`url(#${e}-t4)`}].map((t,r)=>n.jsx("g",{style:Vt("floaty",3.6,r*.3),children:n.jsx("line",{x1:t.x+14,y1:160,x2:t.x+14,y2:t.y+14,stroke:t.stroke,strokeWidth:28,strokeLinecap:"round",...ya,...qt("draw",{turn:r*.03})})},t.x))]})}},WB=Object.keys(co);function HB({variant:e,motion:t="loop",cycleMs:r=9e3,label:a,className:s,style:l,onCycleEnd:i}){const u=o.useRef(null),c=o.useRef(i);c.current=i,o.useEffect(()=>{if(t!=="once"||!c.current)return;const d=u.current;if(!d)return;let m=!1;const C=()=>{m||(m=!0,c.current?.())};let x=d.querySelectorAll(".hero-visual__in").length;const g=b=>{b.target?.classList?.contains("hero-visual__in")&&--x<=0&&C()};d.addEventListener("animationend",g);const y=typeof d.getAnimations=="function"?d.getAnimations({subtree:!0}).map(b=>Number(b.effect?.getComputedTiming().endTime??0)).filter(b=>Number.isFinite(b)&&b>0):[],v=y.length>0?Math.max(...y):r*(1+zB),_=setTimeout(C,v+120);return()=>{d.removeEventListener("animationend",g),clearTimeout(_)}},[t,e,r]);const p=`hero-visual-${o.useId().replace(/:/g,"")}`,h=co[e]??co.blobs;return co[e]||Tt(`HeroVisual: \uBAA8\uB974\uB294 variant '${e}' \u2014 blobs \uB85C \uC138\uC6B4\uB2E4`),n.jsx("div",{ref:u,className:xe("hero-visual",`hero-visual--${e}`,t==="still"&&"hero-visual--still",t==="once"&&"hero-visual--once",s),style:{aspectRatio:`${h.width} / ${h.height}`,"--hero-visual-cycle":`${r}ms`,...l},role:a?"img":void 0,"aria-label":a,"aria-hidden":a?void 0:!0,children:n.jsx("svg",{className:"hero-visual__svg",viewBox:h.viewBox,preserveAspectRatio:"xMidYMid meet",focusable:"false",children:h.render(p)})})}function VB({enabled:e=!1,renderResultPopup:t}={}){const{t:r}=Ne.useTranslation(),[a,s]=o.useState(null),[l,i]=o.useState(null),u=C=>{let x=null;C==="noise"?x={score:3,contextsLength:5,results:[{sentence:"\uBB38\uC7A5 A",judgement:!0,wording:"\uC798 \uB4E4\uB9BC",useAnswer:!1},{sentence:"\uBB38\uC7A5 B",judgement:!1,wording:"\uC548 \uB4E4\uB9BC",useAnswer:!1},{sentence:"\uBB38\uC7A5 C",judgement:!0,wording:"\uC798 \uB4E4\uB9BC",useAnswer:!1},{sentence:"\uBB38\uC7A5 D",judgement:null,wording:"\uC548 \uD568",useAnswer:!1},{sentence:"\uBB38\uC7A5 E",judgement:!1,wording:"\uC548 \uB4E4\uB9BC",useAnswer:!1}]}:C==="short"?x={score:2,contextsLength:3,results:[{sentence:"\uBE44\uBE54\uBC25 \uC124\uBA85",answer:"\uBE44\uBE54\uBC25",selected:"\uBE44\uBE54\uBC25",selectedText:"\uBE44\uBE54\uBC25",correct:!0},{sentence:"\uBCF4\uC308 \uC124\uBA85",answer:"\uBCF4\uC308",selected:"\uC871\uBC1C",selectedText:"\uC871\uBC1C",correct:!1},{sentence:"\uCE7C\uAD6D\uC218 \uC124\uBA85",answer:"\uCE7C\uAD6D\uC218",selected:void 0,selectedText:void 0,correct:void 0}]}:C==="long"?x={score:4,contextsLength:4,results:[{sentence:"\uAE34 \uC774\uC57C\uAE30 1",answer:"\uC815\uB2F5 \uD14D\uC2A4\uD2B8 1",selectedText:"\uC815\uB2F5 \uD14D\uC2A4\uD2B8 1",correct:!0},{sentence:"\uAE34 \uC774\uC57C\uAE30 2",answer:"\uC815\uB2F5 \uD14D\uC2A4\uD2B8 2",selectedText:"\uC120\uD0DD \uD14D\uC2A4\uD2B8 2",correct:!1},{sentence:"\uAE34 \uC774\uC57C\uAE30 3",answer:"\uC815\uB2F5 \uD14D\uC2A4\uD2B8 3",selectedText:void 0,correct:void 0},{sentence:"\uAE34 \uC774\uC57C\uAE30 4",answer:"\uC815\uB2F5 \uD14D\uC2A4\uD2B8 4",selectedText:"\uC815\uB2F5 \uD14D\uC2A4\uD2B8 4",correct:!0}]}:C==="order"&&(x={score:1,contextsLength:2,results:[{sentence:"\uC21C\uC11C \uBB38\uC81C 1",answer:"1,2,3",selectedText:"1,2,3",correct:!0},{sentence:"\uC21C\uC11C \uBB38\uC81C 2",answer:"A,B,C",selectedText:"B,A,C",correct:!1}]}),i(x),s(C)},c=o.useCallback(()=>{s(null),i(null)},[]),p=o.useCallback(()=>u("noise"),[]),h=o.useCallback(()=>u("short"),[]),d=o.useCallback(()=>u("long"),[]),m=o.useCallback(()=>u("order"),[]);return e?n.jsxs("div",{className:"debug-result-launcher",children:[n.jsxs("div",{className:"debug-buttons",children:[n.jsx("button",{type:"button",className:"debug-button",onClick:p,children:r("debug.showResult",{type:"Noise",defaultValue:"{{type}} \uACB0\uACFC\uBCF4\uAE30"})}),n.jsx("button",{type:"button",className:"debug-button",onClick:h,children:r("debug.showResult",{type:"ShortStory",defaultValue:"{{type}} \uACB0\uACFC\uBCF4\uAE30"})}),n.jsx("button",{type:"button",className:"debug-button",onClick:d,children:r("debug.showResult",{type:"LongStory",defaultValue:"{{type}} \uACB0\uACFC\uBCF4\uAE30"})}),n.jsx("button",{type:"button",className:"debug-button",onClick:m,children:r("debug.showResult",{type:"Order",defaultValue:"{{type}} \uACB0\uACFC\uBCF4\uAE30"})})]}),a&&l?t?.({score:l.score,contextsLength:l.contextsLength,results:l.results,onReplay:c,onClose:c}):null]}):null}var Ep={statusFilter:"Filter by status",pageSizeSelect:"Items per page",selectedCount_one:"{{count}} selected",selectedCount_other:"{{count}} selected",moreFor:"More options for {{name}}",collapseFor:"Collapse {{name}}",expandFor:"Expand {{name}}",sortFor:"Sort {{name}}",cancel:"Cancel",info:"Info",errorState:{message:"Couldn't load this.",retry:"Try again"},save:"Save",confirm:"Confirm",discardConfirm:{title:"Discard your changes?",body:"If you do not save, everything you have entered will be lost.",confirm:"Discard"},close:"Close",back:"Back",emptyTrainingName:"Training name is empty.",remove:"Remove",image:"Image",delete:"Delete",reset:"Reset",update:"Update",download:"Download",likeCount_one:"{{count}} like",likeCount_other:"{{count}} likes",selectedOfMax:"{{count}} of {{max}}",downloadCount_one:"{{count}} download",downloadCount_other:"{{count}} downloads",descriptionFor:"About {{name}}",search:"Search",empty:"No data.",yes:"Yes",no:"No",all:"All",none:"None",days_one:"{{count}} day",days_other:"{{count}} days",loadMore:"Load More",retry:"Try Again",prevPage:"Previous page",nextPage:"Next page",play:"Play",loading:"Loading",playFor:"Play {{name}}",pauseFor:"Pause {{name}}",pause:"Pause",playPause:"Play / Pause",replay:"Replay",subscription:"Subscription",done:"Done",failed:"Failed",continue:"Continue",notification:"Notice",emptyList:"No items",noMatches:"No matching items",menu:"Menu",resetSelection:"Reset Selection",pageSizeLabel:"Show {{n}}",totalCountPrefix:"Total: ",totalCountSuffix:"",expand:"Expand",collapse:"Collapse",popup:"Popup",more:"More",codeBlock:"Code block",totalPrefix:"",copyCode:"Copy code",copied:"Copied",col:{problem:"Question"},phonetics:{place:{labial:"Bilabial",alveolar:"Alveolar",palatal:"Palatal",velar:"Velar",glottal:"Glottal"},vowel:{frontHigh:"Front high vowel",backHighUnrounded:"Back high unrounded vowel",backHighRounded:"Back high rounded vowel",frontMid:"Front mid vowel",backMidUnrounded:"Back mid unrounded vowel",backMidRounded:"Back mid rounded vowel",low:"Low vowel"},glide:{j:"j-glide",w:"w-glide",velar:"\u0270-glide"}},unknownError:"Unknown error",networkError:"The network connection is unstable. Check your connection and try again.",add:"Add"},jp={rangeSelect:"Select period",dow:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],yearMonthCompact:"{{short}}",weekLabel:"Week {{ord}}",weekLabelCompact:"W{{ord}}",prevMonth:"Previous month",addOnDate:"Add a visit on {{date}}",nextMonth:"Next month",prevWeek:"Previous week",nextWeek:"Next week",legend:{visited:"Visited",scheduled:"Scheduled",noVisit:"No Show"},periodSelect:"Period unit",visitCount_one:"{{count}} visit",visitCount_other:"{{count}} visits",statusCount:"{{count}} {{label}}",weekOrdinal:["1","2","3","4","5","6","7"]},Dp={planSuffix:"Plan",labeledPlan:"{{label}} Plan",couponCode:"Pass Code",specialLabel:"Open Special",unitDay:"d",unitYear:"yr",remainingDay:"{{n}}d left",remainingHour:"{{n}}h left",remainingMinute:"{{n}}m left",remainingSecond:"{{n}}s left",expired:"Expired",menu:{use:"Activate",refund:"Refund",delete:"Delete"}},Sp={starLabel:"Select star {{n}}",valueLabel:"{{value}} out of {{max}}",groupLabel:"Rating"},Tp={selected:"selected"},Mp={placeholder:"Select"},$p={collapse:"Collapse",expand:"Expand"},Lp={biArea:"BI area",biSymbol:"BI symbol",logoMalgwi:"Malgwi logo",logoManager:"Malgwi Manager logo",menuOpen:"Open menu",utilMenu:"Utility menu",menuClose:"Close menu"},Rp={mainMenu:"Main menu",bottomNav:"Bottom navigation",goToManager:"Malgwi Manager",goToMalgwi:"Go to Malgwi",modeLabelManager:"Malgwi Manager",modeLabelMalgwi:"Malgwi",training:"Training",settings:"Settings",notifications:"Notifications",account:"Account",help:"Help",feedback:"Report a bug",debug:"Debug",coupons:"Coupons",topic:"By Topic",trainingType:"By Training Type",wordPairs:"Word Pairs",wordSearch:"Word Search",wordTable:"Word Table Creator",company:"Company Info",more:"More",moreMenu:"More menu",badgeLabel:"{{label}}, {{count}}",badgeInsideLabel_one:"{{label}}, {{count}} notification inside",badgeInsideLabel_other:"{{label}}, {{count}} notifications inside"},Pp={cache:{cleared:"Cache cleared successfully.",group:{wordData:{label:"Word Data",sub:"Word list and version info"},pairIndex:{label:"Pair Index",sub:"Onset\xB7vowel\xB7coda minimal pair analysis cache"},imageCache:{label:"Image Cache",sub:"Word image existence check results"}}}},Fp={couponButton:"Enter Coupon"},Ip={security:{password:{currentRequired:"Enter your current password.",newRequired:"Enter a new password.",mismatch:"The new passwords do not match.",changed:"Your password has been changed."}}},Op={settings:"Settings",filter:{random:"Random",trainOnset:"Onset",trainVowel:"Vowel",trainCoda:"Coda",phonemeGroup:"Training phonemes",noLimit:"Any",codaExclude:"Exclude",gradeLabel:"Difficulty",excludeImageInfo:"Only words with images: keeps only results with a registered word image.",sameStructureInfo:"Only same phoneme structure: keeps only pairs where the correct and wrong answers share the same syllable structure (length, batchim, etc.).",selectSection:"Select",excludeImage:"Only words with images",sameStructure:"Only same phoneme structure"},noQuestions:"No questions available.",countQuestions_one:"{{n}} question",countQuestions_other:"{{n}} questions",countSentences_one:"{{n}} sentence",countSentences_other:"{{n}} sentences",nextQuestion:"Next",noiseRatioTitle:"Noise Ratio",noiseRatioValue:"{{ratio}}\xD7",noiseTypeTitle:"Noise Type",playVolumeTitle:"Volume",playSpeedTitle:"Speed",meter:{sentence:"Playback",noise:"Noise",toggle:"Show Audio Meter"},viewResult:"View Results",problemNotice:"Problem {{n}}.",trainingSettingsTitle:"Training Settings",sentencePreview:"Sentence Preview",notHeard:"Didn't hear it.",heardWell:"Heard it well.",confirmTitle:"Check the sentence and select whether you heard it.",noSoundWaveform:"Waveform is not shown for sound-comparison questions.",noise:{level:{none:"None",weak:"Weak",medium:"Medium",strong:"Strong",veryStrong:"Very Strong"},type:{none:"None",default:"Default",street:"Street",buzz:"Buzzing",restaurant:"Restaurant"}},listenTitle:"Please listen to the sentence.",listenButton:"Listen",playSound:"Play Sound",playSoundFor:"Play {{name}}",playAll:"Play All",selectInOrder:"Select the cards in the order you heard.",stop:"Stop",preview:"Preview",previewFor:"Preview {{name}}",stopFor:"Stop {{name}}",next:"Next",completed:"Completed",selected:"Selected",nthSelected:"Selection {{n}}",fontSizeMin:"Font size is at the minimum.",fontSizeMax:"Font size is at the maximum.",fontSizeDecrease:"Decrease font size",fontSizeIncrease:"Increase font size",toggleBackground:"Toggle background",cardInstructions:"Look at the word card, listen to the sound, and check it.",noCards:"No cards.",audioFetchError:"Failed to load the sound source.",ttsUnavailable:"Speech playback isn't available on this device.",selectConfirm:"Look at the question and select the answer.",orderListDefault:"Arrange the sentences in the order you heard.",result:{pendingDone:"Results are still being calculated, so you can't finish yet.",eyebrow:"Training Complete",title:"You've finished all the training!",scoreAria:"{{correct}} / {{total}} questions",elapsed:"Time Elapsed",tableAriaLabel:"Per-question judgement",colJudge:"Judgement",colAnswerSelected:"Answer \xB7 Selected",colAnswer:"Answer",colSelected:"Selected",heardWell:"Heard well",notHeard:"Didn't hear",notJudged:"Not judged",replay:"Replay",replaySound:"Replay item {{no}}",replaySoundStop:"Stop item {{no}}",done:"Done",noContent:"(No content)"},up:"Move up",down:"Move down",prev:"Previous",listenLabel:"Listen",sourcePlay:"Play source {{n}}",listen:"Listen",audioStatus:{synthesizing:"Preparing the sound\u2026",preparing:"Preparing sound\u2026"}},zp={totalCount:" customers",loadError:"Failed to load list",device:{title:"Hearing Devices",addButton:"Add device",historyEmpty:"No device history registered",wearing:" in use",notRegistered:"Not registered",unit:"",wearingNow:"In use",wear:"Wear",unwear:"Remove",wornSince:"Since {{date}}",historyTitle:"Hearing device history"},schedule:{registerTitle:" Register Schedule"},visitHistory:{empty:"No visit history yet",popupTitle:" Visit History",registerTitle:" Register Visit"},moreItems:"more",viewAll:"View All",duration:{minSec:"{{m}}m {{s}}s",min:"{{m}}m",sec:"{{s}}s"},consent:{record:"Record consent",kinds:"Kinds given",methodTitle:"How it was given",sourceTitle:"Who gave it",day:"Date given",note:"Note",notePlaceholder:"Referring clinic and the like \u2014 do not write anything sensitive",submit:"Save",allTaken:"All three kinds are already on record. Revoke one first to record it again.",kind:{personal:"General personal data",sensitive:"Sensitive data (hearing, diagnosis)",marketing:"Marketing messages"},method:{paper:"On paper",verbal:"Spoken",electronic:"Electronic"},source:{self:"The customer",guardian:"A guardian",referral:"A referring body"}}},Wp={plan:{recommendedFor:"Recommended for",features:"Key Features",freePrice:"Free",contact:"Contact Us",tierFallback:"Plan",openPromo:"Launch offer"},products:{mgrEnterprise:{tier:{price:"Contact us"}}}},Hp={input:{label:"Coupon code",placeholder:"Enter coupon code"},applyButton:"Apply"},Vp={showN:"Show {{n}}"},qp={title:"Training by Type",subtitle:"Select the training type you want",listenInNoise:{title:"Sentence Listening in Noise",desc:"Train sentence comprehension in various noise environments."},shortStory:{title:"Short Story Listening",desc:"Listen to short stories and understand the content."},longStory:{title:"Long Story Listening",desc:"Focus on listening to long stories and grasp the content."},orderingSentence:{title:"Sentence Ordering",desc:"Arrange heard sentences in the correct order."},SAME_SOUND_PICK:{label:"Listen & Pick Same Sound",sub:"Pick the word card that matches what you heard."},SAME_OR_DIFF:{label:"Same or Different?",sub:"Decide whether the two sounds are the same or different."},HEAR_AND_PICK_SAME:{label:"Hear & Match Word",sub:"Pick the word card that matches the sound you heard."},HEAR_AND_PICK_INCLUDED:{label:"Find Word Containing Sound",sub:"Pick the word card that contains the syllable you heard."},STARTS_WITH_SAME_SOUND:{label:"Find Word Starting with Same Sound",sub:"Pick a word that starts with the same sound as what you heard."},LISTEN_AND_REMEMBER_ORDER:{label:"Listen & Recall Order",sub:"Select the cards in the order you heard the three words."},MERGE_2_SYLLABLES:{label:"Combine 2 Syllables",sub:"What word do two syllables make?"},MERGE_3_SYLLABLES:{label:"Combine 3 Syllables",sub:"What word do three syllables make?"},MERGE_2_PHONEMES:{label:"Combine 2 Phonemes",sub:"What sound do two phonemes make?"},MERGE_3_PHONEMES:{label:"Combine 3 Phonemes",sub:"What sound do three phonemes make?"},DROP_1_FROM_2SYLL:{label:"Drop 1 Syllable from 2-Syllable",sub:"What sound remains when you remove a syllable from a 2-syllable word?"},DROP_1_FROM_3SYLL:{label:"Drop 1 Syllable from 3-Syllable",sub:"What sound remains when you remove a syllable from a 3-syllable word?"},DROP_PART_FROM_COMPOUND:{label:"Drop Part of Compound Word",sub:"What word remains when you remove part of a compound word?"},DROP_FINAL_CONSONANT_FROM_1SYLL:{label:"Drop Final Consonant",sub:"What sound remains when you remove the final consonant?"},REMOVE_CONSONANT_AND_IDENTIFY_PHONEME:{label:"Drop Consonant",sub:"What sound remains when you remove the consonant?"},CHANGE_1_SYLL_IN_2SYLL:{label:"Change 1 Syllable (2-Syllable)",sub:"Change one syllable in a 2-syllable word to make a new word."},CHANGE_1_SYLL_IN_3SYLL:{label:"Change 1 Syllable (3-Syllable)",sub:"Change one syllable in a 3-syllable word to make a new word."},CHANGE_1_PHONEME_IN_1SYLL:{label:"Change 1 Phoneme (1-Syllable)",sub:"Change one phoneme in a 1-syllable word to make a new sound."},CHANGE_1_PHONEME_IN_2SYLL:{label:"Change 1 Phoneme (2-Syllable)",sub:"Change one phoneme in a 2-syllable word to make a new word."}},Up={newBadge:"Newly created",publishedBadge:"Published",sharedBadge:"Shared"},Gp={title:"Key Words",empty:"No key words available."},Kp={defaultName:"Word Table",title:"Word Table Builder",subtitle:"Set columns and add words to build a table.",filterTitle:"Table Settings",filter:{composition:"Composition",image:"Image",word:"Word",caption:"Form",standardPron:"Standard Pronunciation",colloquialPron:"Colloquial Pronunciation",paperOrientation:"Paper Orientation",landscape:"Landscape",portrait:"Portrait",columns:"Columns",column:"{{count}} col",itemsPerPageWord:"Words per page",itemsPerPagePair:"Pairs per page",itemsPerPageOption:"{{count}}",pageIndicator:"{{current}} / {{total}}",pageNumber:"Page Number",pageNumberLeft:"Left",pageNumberCenter:"Center",pageNumberRight:"Right",border:"Border",topInfo:"Header",bottomInfo:"Footer",cutLine:"Cut Line",show:"Show",hide:"Hide",dotted:"Dotted",corner:"Corner"},addWord:"Add",copyItem:"Duplicate",copyItemAria:"Duplicate the word in cell {{n}}",wordInfo:"Info for {{word}}",emptyItems:"Please add at least one word.",load:"Load",openNewWindow:"Open in New Window",saveButton:"Save",saveAsNewButton:"Save as New",print:"Print",popupBlocked:"Popup was blocked. Please allow popups in your browser settings.",printFileNameSingle:"Word Table",printFileNamePair:"Contrast Pair Table",save:{title:"Save Word Table",nameLabel:"Name",desc:"Enter a name for the word table.",placeholder:"Enter a title for this word table.",descriptionLabel:"Description",descriptionPlaceholder:"Enter a description for this word table.",duplicateName:"This name is already in use.",nameRequired:"Please enter a table name.",autoFillHint:" (Press Tab or Space to autofill)",copyName:"{{name}} (copy)"},loadTable:{title:"Load Saved Word Table",empty:"No saved word tables.",loadButton:"Load",itemCount_one:"{{count}} word",itemCount_other:"{{count}} words",deleteAriaLabel:"Delete {{name}}",viewLabel:"View as",sortLabel:"Sort by",sort:{newest:"Newest",oldest:"Oldest",name:"Name",count:"Word Count"},view:{grid:"Grid View",list:"List View"}},publisherFilter:"Show only tables by {{name}}",groupDeleteMessage:"Word tables in this group will be moved to 'No Group'.",groupNamePlaceholder:"Group name",scoring:{o:"{{word}} correct",triangle:"{{word}} partial",x:"{{word}} incorrect",markName:{o:"Correct",triangle:"Partial",x:"Incorrect"},button:"Score",pickTitle:"Who are you scoring?",pickSubtitle:"Choose the customer who trained with \u201C{{name}}\u201D.",pickSearch:"Search by name or phone",pickEmpty:"No customers registered.",pickNoMatch:"No matching customer.",pickAgain:"Choose another",scoringFor:"Scoring {{name}}",none:"Tap \u25CB \xB7 \u25B3 \xB7 \u2715 under a cell to mark it. With a mouse they appear when you hover the cell; with a keyboard, when focus reaches it.",tally:"{{marked}} scored \xB7 \u25CB {{o}} \xB7 \u25B3 {{triangle}} \xB7 \u2715 {{x}} \xB7 {{rate}}%",save:"Save score",saved_one:"Saved {{count}} mark for {{name}}.",saved_other:"Saved {{count}} marks for {{name}}.",reviewTitle:"Create a review table?",reviewMessage_one:"Builds a new table from the {{count}} cell {{name}} got wrong or partial. Correct ones are left out.",reviewMessage_other:"Builds a new table from the {{count}} cells {{name}} got wrong or partial. Correct ones are left out.",reviewConfirm:"Create review table",reviewDescription:"Cells marked wrong or partial in \u201C{{name}}\u201D \u2014 {{count}} of them.",reviewCreated_one:"Created \u201C{{name}}\u201D \u2014 {{count}} cell.",reviewCreated_other:"Created \u201C{{name}}\u201D \u2014 {{count}} cells.",discardTitle:"Discard this scoring?",discardMessage_one:"You marked {{count}} cell but have not saved. Leaving discards it.",discardMessage_other:"You marked {{count}} cells but have not saved. Leaving discards them.",discardConfirm:"Discard and leave"},info:{grade:"Grade: {{n}}",syllables:"Syllables: {{n}}",pos:"Part of speech: {{v}}",wordType:"Type: {{v}}"},pos:{noun:"Noun",verb:"Verb",adjective:"Adjective",adverb:"Adverb",numeral:"Numeral",determiner:"Determiner",interjection:"Interjection",particle:"Particle",affix:"Affix",dependentNoun:"Dependent noun",pronoun:"Pronoun",auxVerb:"Auxiliary verb",auxAdjective:"Auxiliary adjective"},reorder:{moved:"Moved to position {{n}} of {{total}}",handle:"Reorder {{word}} (Alt + arrow keys)",hint:"Alt + \u2190 \u2192 to reorder"},thumbMore:"+{{count}}",replaceItem:"Other words",replacePair:"Other pairs",replaceItemAria:"Swap cell {{n}} only",replacePairAria:"Swap pair {{n}} only",thumbMoreAria_one:"1 more cell: {{words}}",thumbMoreAria_other:"{{count}} more cells: {{words}}",pickForm:"Other forms",pickFormAria:"Change the form in cell {{n}}",pickFormBaseAria:"Change the form of the base word"},Yp={filterTitle:"Word Search Settings",filter:{positionAny:"Any",positionHead:"Start",positionMid:"Middle",positionTail:"End",difficulty:"Difficulty",grade:"Grade {{n}}",age:"Age {{n}}",agePlus:"Age {{n}}+",ageRange:"Age {{from}}\u2013{{to}}",difficultyInfoAge:"Age 3\u20137: the easiest words (grade 1), split by age.",difficultyInfoGrade:"Grades 2\u20134: harder words, not split by age.",difficultyInfoNone:"None: words with no difficulty assigned.",difficultyInfoBandAge:"{{ages}}: {{grade}} words, split by age.",difficultyInfoBandAgeOne:"{{ages}}: {{grade}} words.",difficultyInfoBandGrade:"{{grade}}: words for {{ages}}.",difficultyInfoBandAgeNamed:"{{ages}}: words split by age.",gradeNone:"None",syllables:"Syllables",syllable:"{{n}} Syll.",syllable5plus:"5+ Syllables",partOfSpeech:"Part of Speech",pos:{noun:"Noun/Numeral",verb:"Verb/Adjective",modifier:"Adverb/Determiner"},wordType:"Word Type",field:"Semantic Category",type:{native:"Native Korean",sino:"Sino-Korean",foreign:"Loanword",mixed:"Hybrid"},exclude:"Exclude",excludeNoImage:"No Image"},searchButton:"Search",resultUnit:"words",remaining:"{{count}} remaining",resultDisc:"Select {{unit}}. Up to {{max}} items. ({{selected}}/{{max}})",resultTitlePrefix:"",resultTitleSuffix:" {{unit}} found.",emptyResult:"No results found.",groupCount:"{{count}}",sort:{aria:"Sort",match:"Best Match",ganada:"A\u2013Z \u2191",ganadaDesc:"A\u2013Z \u2193",syllable:"Syllables \u2191",syllableDesc:"Syllables \u2193",grade:"Grade \u2191",gradeDesc:"Grade \u2193",original:"Original order"},pageSize:"Show {{count}}",pageSizeAria:"Page size"},Zp={clearAllSelection:"Clear All Selections",divLine:"Contrast Line",removePair:"Remove pair",removePairFor:"Remove the pair {{name}}",removeWord:"Remove word",removeWordFor:"Remove {{name}}"},Xp={title:"By Topic",subtitle:"Select a topic to start listening training",noiseTitle:"Sentence Listening in Noise",shortStoryTitle:"Short Story Listening",FOOD:"Food",HLTH:"Health",WETH:"Weather",PRSN:"People",KRCT:"Korean Culture",STRY:"Stories",LOCA:"Locations",SOAR:"Society & Arts",NTSC:"Nature & Science",SPRT:"Sports",sub:{TRKRFD:"Traditional Korean Food",MDKRFD:"Modern Korean Food",WRLDFD:"World Cuisine",MTRFRT:"Ingredients & Fruits",GEFDKL:"Food Facts",HTETHB:"Healthy Eating",DISILL:"Diseases",EXCISE:"Exercise",GEHTKL:"Health Facts",GESSKL:"Seasons",SNWRAN:"Snow & Rain",WTHFCT:"Weather Forecast",GEWTKL:"Weather Facts",JODYPS:"Joseon Dynasty",MDKRPS:"Modern Korea",THKDPS:"Three Kingdoms",WRLART:"World Artists",WRLPSN:"World Figures",KRLANG:"Korean Language",TRPLCT:"Traditional Games",HERITG:"Heritage",EVTFES:"Events & Festivals",GECTKL:"General Knowledge",FRYTAL:"Fairy Tales",AMZING:"Amazing Stories",DAYSTR:"Everyday Stories",KRLDMK:"Korean Landmarks",SELNMK:"Seoul Landmarks",WRDTRB:"World Travel",NAVIGT:"Navigation",KRSOCI:"Korea",ECONEW:"Economy & News",GENART:"Arts",GELFKL:"Life Tips",ANIMAL:"Animals",PLANTS:"Plants",ETHPLT:"Earth",TOLELC:"Tools & Electronics",GESCKL:"Science Facts",INVDSP:"Individual Sports",MARART:"Martial Arts",TEAMSP:"Team Sports",FOOTBL:"Soccer",GESPKL:"Sports Facts"}},Jp={direction:{left:"L",right:"R",label:"Side"},wornDate:"Date Worn",deviceType:"Device Type",brand:"Brand",fitType:"Fit Type",productName:"Product Name",addNew:"Add New Device",selectFromList:"Select from List",removeDevice:"Remove",type:{hearingAid:"Hearing Aid",cochlearImplant:"Cochlear Implant",other:"Other"}},Qp={stat:{totalCustomers:"Total Customers",monthlyVisits:"This Month's Visits"},chart:{visitDetail:"Visit Details",trainingDetail:"Training Details",weekly:"Weekly",periodMonth:"Month",periodWeek:"Week",weeklyPrefix:"Weekly",monthlyPrefix:"Monthly",visit:"Visits",reservation:"Reservations",trainingDone:"Completed",trainingInProgress:"In Progress",weekRange:"{{start}}\u2013{{end}}",week:"W{{n}}"}},eh={phonemeSelect:{vs:"vs"},caution:"Caution",mode:{include:"Phoneme Include",pick:"Phoneme Contrast",contrast:"Specify Contrast",infoTitle:"Contrast Mode",infoInclude:"Include \u2014 finds words containing all selected phonemes, plus their minimal pair.",infoPick:"Contrast \u2014 matches only if the selected phoneme is the actual point of difference in the pair.",infoContrast:"Specify Contrast \u2014 directly choose phonemes for the base word and the contrasting word to find pairs."},count:"{{n}}",countLabel:"Number of phonemes",input:{char:"Choose Letters",pron:"Choose Sound",infoTitle:"Input mode",infoChar:"Choose Letters \u2014 finds words by the selected phonemes (spelling), then finds their standard-pronunciation contrast pairs.",infoPron:"Choose Sound \u2014 finds standard-pronunciation contrast pairs directly from the selected phonemes."},phonemeN:"Syllable {{n}}",phonemeSingleLabel:"Syllable",phonemeContrastSingleLabel:"Contrast Syllable",ordinals:["First","Second","Third","Fourth"],phonemeOrdinalLabel:"{{ordinal}} Syllable",phonemeContrastOrdinalLabel:"Contrast {{ordinal}} Syllable",composition:"Answer Word Composition",syllableCount:"Syllables",syllableN:"{{n}} syll.",syllableNPlus:"{{n}}+ syll.",onset:"Onset",vowel:"Vowel",coda:"Coda",filter:{searchOptionsTitle:"Contrast Settings",searchModeLabel:"Contrast Mode",countLabel:"Input Syllable Count",inputModeLabel:"Input mode",phonemeOrder:"Input Syllable Position",phonemeOrderInfo:["Match: the pair must differ at exactly the same position (syllable).","Any: the differing position doesn't matter."],orderAny:"Any",orderMatch:"Match",difficultyInfo:["Level 1 \u2014 everyday vocabulary acquired before school age and used for life","Level 2 \u2014 difficulty of grades 1\u20132","Level 3 \u2014 difficulty of grades 3\u20134","Level 4 \u2014 difficulty of grades 5\u20136","No level \u2014 frequent everyday words outside the national standard list, plus coinages and loanwords"],selectLabel:"Select",onlyHasImage:"Only words with images",onlyHighUsage:"High-use words only",onlySameStructure:"Only same phoneme structure"},confirmMessage:"The word table with {{count}} selected {{unit}} will be lost.",resetOptions:"Reset Options",phonemeContrast:"Contrast Syllable {{n}}",infoNotes:["The preview character is an example of the selected phoneme combination. The actual search covers all words containing the phoneme.","Initial consonant '\u3147' cannot be selected. \u3147 at the start of a word is effectively silent.","If only onset and coda are selected, the vowel is automatically displayed as '\u314F'.","Increasing the phoneme count searches for minimal pairs between each phoneme."]},th={lead:`IHAB builds trust
1073
1073
  through sound
1074
- and aids recovery.`,site:{title:"Site",malgwi:"Malgwi",soundDirection:"Sound Direction System",vrSoundDirection:"VR Sound Direction System",hearingTest:"Hearing Test Pro"},sns:{title:"SNS",naverBlog:"Naver Blog"},policy:{title:"Policy",terms:"Terms of Service",privacy:"Privacy Policy"},ceo:"CEO",address:"Address",bizNo:"Business no.",support:"Support",ceoName:"Ji-hye Han",addressValue:"302, 3F, Haechan Bldg, 32 Sicheong-gil, Chuncheon, Gangwon, Korea",bizNoValue:"526-81-02926"},nh={timeHM:"{{hh}}:{{mm}}",timeH:"{{hh}}:{{mm}}"},rh={phaseWordDownload:"Download Word Data",phaseImageCheck:"Check Images",phasePairAnalysis:"Analyze Word Pairs",downloadingCount_one:"Downloading {{n}} word",downloadingCount_other:"Downloading {{n}} words",checkingPage:"Checking page {{page}} list",imageCount:"{{done}} / {{total}} items"},ah={clearAriaLabel:"Clear input",showPassword:"Show password"},oh={ariaLabel:"Select tab"},sh={ariaLabel:"Tabs"},lh={dragPrompt:"Drag and drop files here",browseButton:"Choose Files",removeAriaLabel:"Remove {{name}}"},ih={ariaLabel:"User avatar"},uh={relativeDay:{today:"Today",yesterday:"Yesterday",daysAgo:"{{n}}d ago"}},ch={weekly:{title:"Weekly Training",daily:"Daily Listening"},homework:{title:"Homework Progress",totalRate:"Overall rate",done:"Done"},today:{tooltipTotal:"Total",tooltipDone:"Done"},visit:{title:"Linked Visit Records"},detail:"Details",detailFor:"{{name}} details"},dh={time:{justNow:"just now",minutesAgo:"{{n}}m ago",hoursAgo:"{{n}}h ago",daysAgo:"{{n}}d ago",weeksAgo:"{{n}}w ago",monthsAgo:"{{n}}mo ago",yearsAgo:"{{n}}y ago"}},ph={steps:"Step {{current}} of {{total}}"},hh={skippedOnly_one:"{{n}} older record was excluded \u2014 it does not say what was answered.",skippedOnly_other:"{{n}} older records were excluded \u2014 they do not say what was answered.",runs_one:"{{count}} run",runs_other:"{{count}} runs"},mh={resetColumns:"Reset column widths",scrollRegion:"Horizontally scrollable table",rowActionHint:"Press a row to open its details"},fh={viewWords:"Words"},Ch={ariaLabel:"Banner",dotAriaLabel:"Banner {{index}} of {{count}}"},gh={chooseDate:"Choose a date",selectYear:"Select year",selectMonth:"Select month"},bh={previewRegion:"Report preview \u2014 scrollable sideways"},yh={description:"Description",textbox:"Text",training:"Training guide",menu:"Menu"},vh={place:{labial:"Bilabial",alveolar:"Alveolar",palatal:"Palatal",velar:"Velar",glottal:"Glottal"}},xh={clearSelection:"Clear selection"},_h={showResult:"Show {{type}} result"},wh={selected:"Selected",remove:"Remove",exclude:"Excluded",nthSelected:"Selection {{n}}"},Bh={loading:"Loading"},kh={state:{active:"playing",played:"heard",correct:"correct",wrong:"wrong"}},Ah={ariaLabel:"Breadcrumb"},Nh={list:"Folders",open_one:"Open folder {{name}}, {{count}} item",open_other:"Open folder {{name}}, {{count}} items",menu:"{{name}} folder menu",placeMenu:"{{name}} menu",tree:"Show folder structure",fold:"Collapse {{name}}",unfold:"Expand {{name}}",add:{title:"Add Folder",sub:"Enter a name for the new folder.",placeholder:"Folder name"}},Eh={empty:"No items yet."},jh={main:"Main gradient",soft:"Soft",sub:"Sub color",deep:"Deep gradient",softSub:"Soft sub",warm:"Warm (accent)",dark:"Dark",radial:"Radial gradient",diagonal:"Diagonal pattern",dots:"Dot pattern",outline:"Outline",success:"Success / done",naver:"Naver blog notice",instagram:"Instagram notice"},qB={common:Ep,calendar:jp,passCard:Dp,rating:Sp,colorPicker:Tp,dropdown:Mp,accordion:$p,header:Lp,nav:Rp,settings:Pp,usage:Fp,account:Ip,training:Op,customers:zp,payment:Wp,coupons:Hp,visits:Vp,trainingType:qp,myWordTable:Up,keyWords:Gp,wordTable:Kp,wordSearch:Yp,wordPrint:Zp,topic:Xp,device:Jp,manager:Qp,wordPairs:eh,footer:th,date:nh,wordData:rh,textField:ah,segmentedControl:oh,tabs:sh,fileUpload:lh,avatar:ih,myHomework:uh,trainingStatus:ch,store:dh,progress:ph,trainingMiss:hh,table:mh,wordScore:fh,topBanner:Ch,datePicker:gh,report:bh,tooltip:yh,phonemeProfile:vh,bulkBar:xh,debug:_h,badge:wh,loader:Bh,soundCompass:kh,breadcrumb:Ah,folder:Nh,board:Eh,promoBannerBg:jh},UB=Object.freeze({__proto__:null,accordion:$p,account:Ip,avatar:ih,badge:wh,board:Eh,breadcrumb:Ah,bulkBar:xh,calendar:jp,colorPicker:Tp,common:Ep,coupons:Hp,customers:zp,date:nh,datePicker:gh,debug:_h,default:qB,device:Jp,dropdown:Mp,fileUpload:lh,folder:Nh,footer:th,header:Lp,keyWords:Gp,loader:Bh,manager:Qp,myHomework:uh,myWordTable:Up,nav:Rp,passCard:Dp,payment:Wp,phonemeProfile:vh,progress:ph,promoBannerBg:jh,rating:Sp,report:bh,segmentedControl:oh,settings:Pp,soundCompass:kh,store:dh,table:mh,tabs:sh,textField:ah,tooltip:yh,topBanner:Ch,topic:Xp,training:Op,trainingMiss:hh,trainingStatus:ch,trainingType:qp,usage:Fp,visits:Vp,wordData:rh,wordPairs:eh,wordPrint:Zp,wordScore:fh,wordSearch:Yp,wordTable:Kp});exports.Accordion=$v,exports.ActionCard=F2,exports.Alert=Mx,exports.AppHeader=Ov,exports.AudioMeter=Ss,exports.AudioPlayer=tl,exports.Avatar=Ox,exports.Badge=cn,exports.BarChart=t_,exports.BarChartControls=Gc,exports.Board=B4,exports.BottomNav=zu,exports.BrandIdentity=Gu,exports.BrandLogo=Uu,exports.Breadcrumb=uc,exports.BulkBar=z4,exports.Button=me,exports.CONSENT_KINDS=Ic,exports.CORE_VERSION=k2,exports.Calendar=A_,exports.CardSection=Ac,exports.CardStep=fp,exports.ChartLegend=Bs,exports.ChartSection=Ga,exports.ChartTotal=Sr,exports.Checkbox=xs,exports.ChoiceChips=Tw,exports.CircleBadge=Sn,exports.CodeBox=O4,exports.ColorPicker=f4,exports.CompanyMeta=D4,exports.ConfirmPopup=fs,exports.ConfirmStep=pp,exports.ConfirmWithTextStep=hp,exports.ConsentRecordPopup=L4,exports.ContrastFilterPanel=lB,exports.CoreScope=I2,exports.CountTile=x4,exports.CouponInputPopup=cB,exports.DEFAULT_NOISE_SETTINGS=gr,exports.DatePicker=Fc,exports.DebugResultLauncher=VB,exports.DescriptionTooltip=er,exports.DeviceSideTable=w_,exports.Dialog=w4,exports.Divider=Dx,exports.Dropdown=An,exports.EffectPartyPopper=pl,exports.EffectPartyPopperHost=hB,exports.EmptyState=R2,exports.ErrorBoundary=c4,exports.ErrorState=P2,exports.FILTER_ALL_VALUE=Dn,exports.FileUpload=Wx,exports.FilterPanel=Kn,exports.FilterSectionInfo=sa,exports.FolderAddPopup=Zx,exports.FolderGrid=cc,exports.FolderHead=Hx,exports.FolderList=Vx,exports.FolderSearchSections=Xx,exports.FolderTreeButton=hc,exports.FolderTreeTooltip=pc,exports.Footer=Mw,exports.GameIntro=a_,exports.HERO_VISUAL_VARIANTS=WB,exports.Header=Ku,exports.HeroVisual=HB,exports.Icon=lt,exports.IconGridMenu=Sw,exports.IconRenderer=lt,exports.InfoTooltip=zn,exports.ItemActions=H4,exports.KeepScreenAwake=l4,exports.LEVEL_MAX=Pr,exports.LINE_CHART_HOVER_DELAY_MS=Kc,exports.LandingBottomSticky=Lw,exports.LandingButton=wx,exports.LandingCard=_x,exports.LandingHeader=$w,exports.LandingSection=vx,exports.LandingStatBand=jx,exports.LandingTitle=xx,exports.LineChart=r_,exports.ListPopup=iB,exports.ListenStep=dp,exports.Loader=Nr,exports.MARKS=Ha,exports.MARK_ICON=Cs,exports.MARK_VARIANT=gs,exports.MarkIcon=Dc,exports.MediaQueryOverrideContext=Vi,exports.MenuTooltip=nr,exports.NOISE_RATIO_MAX=ga,exports.NOISE_RATIO_STEP=Fd,exports.NoisePlayerContext=Xs,exports.NoiseSettingsTooltip=rp,exports.NoticeBox=z2,exports.NotifyTextPreview=V4,exports.OrderListStep=mp,exports.PASS_CARD_BG_VARS=pr,exports.POPUP_CLOSE_MS=Fu,exports.POS_LABEL=pd,exports.PROMO_BANNER_BG_COMPONENTS=Bu,exports.PROMO_BANNER_BG_OPTIONS=X2,exports.PROMO_BANNER_BG_VARS=ta,exports.Page=ro,exports.PagePopup=Jx,exports.PageTitle=mB,exports.Pagination=_s,exports.Panel=da,exports.PanelGrid=Yx,exports.PanelRow=Cn,exports.PanelRowDevice=Kx,exports.PassCard=ac,exports.PassCardBg=Cx,exports.PassCardBgIHAB=gx,exports.PassCardBgLeftColorGrid=bx,exports.PassCardBgTwoCircle=Qu,exports.PaymentPlan=fx,exports.PersonCard=k4,exports.PhonemeFilterPanel=sB,exports.PhonemeSelectBlock=aB,exports.Popup=qn,exports.ProgressBar=d_,exports.ProgressIndicator=rd,exports.PromoBanner=Sv,exports.PromoBannerBgDark=uu,exports.PromoBannerBgDeep=ru,exports.PromoBannerBgDiagonal=hu,exports.PromoBannerBgDots=fu,exports.PromoBannerBgInstagram=wu,exports.PromoBannerBgMain=Xi,exports.PromoBannerBgNaver=xu,exports.PromoBannerBgOutline=gu,exports.PromoBannerBgRadial=du,exports.PromoBannerBgSoft=Qi,exports.PromoBannerBgSoftSub=ou,exports.PromoBannerBgSub=tu,exports.PromoBannerBgSuccess=yu,exports.PromoBannerBgWarm=lu,exports.PublicationCard=N4,exports.Radio=ic,exports.RadioGroup=Sx,exports.Rating=p4,exports.ReportDocument=vB,exports.ReportInfoPanel=xB,exports.RingChart=s_,exports.SENTENCE_TRAINING_TYPES=Gs,exports.ScoreMarkCounts=s4,exports.SearchSummary=Rx,exports.Section=$r,exports.SectionHeadFloat=zc,exports.SectionHeader=j4,exports.SegmentedControl=kn,exports.ShortcutBadge=lc,exports.SideNav=qu,exports.Slider=Qc,exports.SoundCompass=yx,exports.SplashLogo=E4,exports.StatChart=l_,exports.SummaryStrip=bB,exports.TRAINING_TOOLTIP_HOVER_DELAY_MS=Mc,exports.Table=Ms,exports.TableFilterPanel=Ws,exports.Tabs=Px,exports.TextBoxTooltip=to,exports.TextField=Un,exports.Timeline=A4,exports.Toast=Mr,exports.Toggle=bc,exports.Toolbar=ws,exports.Tooltip=sn,exports.TooltipInfo=zn,exports.TooltipTextBox=to,exports.TopBanner=Tv,exports.TrainingBlock=E_,exports.TrainingBlockButton=vs,exports.TrainingBlockGrid=D_,exports.TrainingCard=AB,exports.TrainingCardGroup=NB,exports.TrainingPagePopup=ar,exports.TrainingPagePopupBottom=ap,exports.TrainingPagePopupTitle=op,exports.TrainingResultPopup=yp,exports.TrainingStep=br,exports.TrainingStepAudioPlayer=tl,exports.TrainingStepBullet=Xd,exports.TrainingStepCard=tp,exports.TrainingStepConfirm=rl,exports.TrainingStepConfirmWithText=al,exports.TrainingStepListen=ol,exports.TrainingStepOrderList=sl,exports.TrainingStepTextBox=ep,exports.TrainingStepTitle=Qd,exports.TrainingTooltip=$c,exports.TrainingWordCard=Rs,exports.UpdateAlert=kB,exports.WAVE_A_MAX=Yw,exports.WAVE_H1_PX=Qs,exports.WAVE_HMAX_PX=Kw,exports.WORD_LABEL_I18N_KEYS=F_,exports.WORD_TABLE_PAPER=fr,exports.WORD_TYPE_LABEL=hd,exports.WordDataProvider=gB,exports.WordDataUpdatePopup=OB,exports.WordImageTooltip=xp,exports.WordSearchFilterPanel=oB,exports.WordSearchResultBlock=nB,exports.WordTable=Lr,exports.WordTableBlock=TB,exports.WordTableButton=$B,exports.WordTablePopup=rw,exports.WordTableThumbnail=Ap,exports.buildMonthChartData=Y4,exports.cellKey=dw,exports.cellLabel=cw,exports.cellsForLabels=ww,exports.chartTotalNumClass=mr,exports.clearPassCardBgTheme=Vn,exports.clearPromoBannerBgTheme=un,exports.closeTrainingPopup=k8,exports.companyTypeLabel=fB,exports.createTrainingScenario=E8,exports.cx=xe,exports.deriveNoiseContexts=$8,exports.derivePassCard=Zu,exports.draftValues=jw,exports.effectiveNoiseVolume=Ys,exports.effectiveSpeechVolume=Od,exports.expandSlashLabel=Is,exports.formatDuration=Bw,exports.getControlDateRange=o_,exports.getPayloadTimestamp=il,exports.getPromoBannerBgTheme=es,exports.getSelectedFromPayload=D8,exports.getSelectedText=S8,exports.getStepPayload=up,exports.getSteppedPayload=T8,exports.injectPassCardBgTheme=Hn,exports.injectPromoBannerBgTheme=ln,exports.isSelectionCorrect=M8,exports.labelOfCellKey=Rd,exports.labelsForSave=uw,exports.levelToPct=Pw,exports.markAfterClick=Ec,exports.marksForSave=ys,exports.mergeNoiseSettings=Cr,exports.missesByType=yw,exports.monthKeyOf=Ca,exports.monthKeyOfDate=ks,exports.nextFocus=fw,exports.nextMisses=bw,exports.noiseElementVolume=Zs,exports.noiseRatioOf=ba,exports.pageStartIndexes=jc,exports.parseMonthKey=Tr,exports.passCardBgIhabTheme=oc,exports.passCardBgLeftColorGridTheme=sc,exports.passCardBgTwoCircleTheme=Ju,exports.pctToLevel=Fw,exports.posLabels=md,exports.printWordTable=M_,exports.promoBannerBgDarkTheme=iu,exports.promoBannerBgDeepTheme=nu,exports.promoBannerBgDiagonalTheme=pu,exports.promoBannerBgDotsTheme=mu,exports.promoBannerBgInstagramTheme=_u,exports.promoBannerBgMainTheme=Zi,exports.promoBannerBgNaverTheme=vu,exports.promoBannerBgOutlineTheme=Cu,exports.promoBannerBgRadialTheme=cu,exports.promoBannerBgSoftSubTheme=au,exports.promoBannerBgSoftTheme=Ji,exports.promoBannerBgSubTheme=eu,exports.promoBannerBgSuccessTheme=bu,exports.promoBannerBgWarmTheme=su,exports.recommendTables=xw,exports.regenerateUnpinned=Ew,exports.removeItem=Nw,exports.resolveTrainingItems=N8,exports.resolveTrainingPopupMeta=lp,exports.reviewCells=ow,exports.reviewMeta=iw,exports.reviewSetPlan=vw,exports.reviewTableName=lw,exports.scoreKey=Wa,exports.scoreSheetHeader=pw,exports.shouldConfirmDiscard=o4,exports.splitTrainingVariants=A8,exports.summarize=a4,exports.summarizeMisses=gw,exports.tableTrends=mw,exports.toDraft=kw,exports.toTrainingText=j8,exports.togglePin=Aw,exports.uncoveredLabels=_w,exports.useAnchoredMenu=ra,exports.useBarChartControl=Uc,exports.useCalendarMonth=Lc,exports.useComboboxSuggestions=wc,exports.useDiscardGuard=_p,exports.useFitScale=bd,exports.useNoisePlayer=Xa,exports.usePagePopupClose=Qx,exports.useSoundCompassExam=fv,exports.useToastLifecycle=td,exports.useValueDiscardGuard=uB,exports.useWordData=CB,exports.useWordTableDisplaySettings=$d,exports.useWordTablePrint=Us,exports.waveBarPx=Qa,exports.waveBarVal=eo,exports.weakItems=hw,exports.weekValueOf=As,exports.withStepTimes=ip,exports.wordTypeLabels=fd;
1074
+ and aids recovery.`,site:{title:"Site",malgwi:"Malgwi",soundDirection:"Sound Direction System",vrSoundDirection:"VR Sound Direction System",hearingTest:"Hearing Test Pro"},sns:{title:"SNS",naverBlog:"Naver Blog"},policy:{title:"Policy",terms:"Terms of Service",privacy:"Privacy Policy"},ceo:"CEO",address:"Address",bizNo:"Business no.",support:"Support",ceoName:"Ji-hye Han",addressValue:"302, 3F, Haechan Bldg, 32 Sicheong-gil, Chuncheon, Gangwon, Korea",bizNoValue:"526-81-02926"},nh={timeHM:"{{hh}}:{{mm}}",timeH:"{{hh}}:{{mm}}"},rh={phaseWordDownload:"Download Word Data",phaseImageCheck:"Check Images",phasePairAnalysis:"Analyze Word Pairs",downloadingCount_one:"Downloading {{n}} word",downloadingCount_other:"Downloading {{n}} words",checkingPage:"Checking page {{page}} list",imageCount:"{{done}} / {{total}} items"},ah={clearAriaLabel:"Clear input",showPassword:"Show password"},oh={ariaLabel:"Select tab"},sh={ariaLabel:"Tabs"},lh={dragPrompt:"Drag and drop files here",browseButton:"Choose Files",removeAriaLabel:"Remove {{name}}"},ih={ariaLabel:"User avatar"},uh={relativeDay:{today:"Today",yesterday:"Yesterday",daysAgo:"{{n}}d ago"}},ch={weekly:{title:"Weekly Training",daily:"Daily Listening"},homework:{title:"Homework Progress",totalRate:"Overall rate",done:"Done"},today:{tooltipTotal:"Total",tooltipDone:"Done"},visit:{title:"Linked Visit Records"},detail:"Details",detailFor:"{{name}} details"},dh={time:{justNow:"just now",minutesAgo:"{{n}}m ago",hoursAgo:"{{n}}h ago",daysAgo:"{{n}}d ago",weeksAgo:"{{n}}w ago",monthsAgo:"{{n}}mo ago",yearsAgo:"{{n}}y ago"}},ph={steps:"Step {{current}} of {{total}}"},hh={skippedOnly_one:"{{n}} older record was excluded \u2014 it does not say what was answered.",skippedOnly_other:"{{n}} older records were excluded \u2014 they do not say what was answered.",runs_one:"{{count}} run",runs_other:"{{count}} runs"},mh={resetColumns:"Reset column widths",scrollRegion:"Horizontally scrollable table",rowActionHint:"Press a row to open its details"},fh={viewWords:"Words"},Ch={ariaLabel:"Banner",dotAriaLabel:"Banner {{index}} of {{count}}"},gh={chooseDate:"Choose a date",selectYear:"Select year",selectMonth:"Select month"},bh={previewRegion:"Report preview \u2014 scrollable sideways"},yh={description:"Description",textbox:"Text",training:"Training guide",menu:"Menu"},vh={place:{labial:"Bilabial",alveolar:"Alveolar",palatal:"Palatal",velar:"Velar",glottal:"Glottal"}},xh={clearSelection:"Clear selection"},_h={showResult:"Show {{type}} result"},wh={selected:"Selected",remove:"Remove",exclude:"Excluded",nthSelected:"Selection {{n}}"},Bh={loading:"Loading"},kh={state:{active:"playing",played:"heard",correct:"correct",wrong:"wrong"}},Ah={ariaLabel:"Breadcrumb"},Nh={list:"Folders",open_one:"Open folder {{name}}, {{count}} item",open_other:"Open folder {{name}}, {{count}} items",menu:"{{name}} folder menu",placeMenu:"{{name}} menu",tree:"Show folder structure",fold:"Collapse {{name}}",unfold:"Expand {{name}}",add:{title:"Add Folder",sub:"Enter a name for the new folder.",placeholder:"Folder name"}},Eh={empty:"No items yet."},jh={main:"Main gradient",soft:"Soft",sub:"Sub color",deep:"Deep gradient",softSub:"Soft sub",warm:"Warm (accent)",dark:"Dark",radial:"Radial gradient",diagonal:"Diagonal pattern",dots:"Dot pattern",outline:"Outline",success:"Success / done",naver:"Naver blog notice",instagram:"Instagram notice"},qB={common:Ep,calendar:jp,passCard:Dp,rating:Sp,colorPicker:Tp,dropdown:Mp,accordion:$p,header:Lp,nav:Rp,settings:Pp,usage:Fp,account:Ip,training:Op,customers:zp,payment:Wp,coupons:Hp,visits:Vp,trainingType:qp,myWordTable:Up,keyWords:Gp,wordTable:Kp,wordSearch:Yp,wordPrint:Zp,topic:Xp,device:Jp,manager:Qp,wordPairs:eh,footer:th,date:nh,wordData:rh,textField:ah,segmentedControl:oh,tabs:sh,fileUpload:lh,avatar:ih,myHomework:uh,trainingStatus:ch,store:dh,progress:ph,trainingMiss:hh,table:mh,wordScore:fh,topBanner:Ch,datePicker:gh,report:bh,tooltip:yh,phonemeProfile:vh,bulkBar:xh,debug:_h,badge:wh,loader:Bh,soundCompass:kh,breadcrumb:Ah,folder:Nh,board:Eh,promoBannerBg:jh},UB=Object.freeze({__proto__:null,accordion:$p,account:Ip,avatar:ih,badge:wh,board:Eh,breadcrumb:Ah,bulkBar:xh,calendar:jp,colorPicker:Tp,common:Ep,coupons:Hp,customers:zp,date:nh,datePicker:gh,debug:_h,default:qB,device:Jp,dropdown:Mp,fileUpload:lh,folder:Nh,footer:th,header:Lp,keyWords:Gp,loader:Bh,manager:Qp,myHomework:uh,myWordTable:Up,nav:Rp,passCard:Dp,payment:Wp,phonemeProfile:vh,progress:ph,promoBannerBg:jh,rating:Sp,report:bh,segmentedControl:oh,settings:Pp,soundCompass:kh,store:dh,table:mh,tabs:sh,textField:ah,tooltip:yh,topBanner:Ch,topic:Xp,training:Op,trainingMiss:hh,trainingStatus:ch,trainingType:qp,usage:Fp,visits:Vp,wordData:rh,wordPairs:eh,wordPrint:Zp,wordScore:fh,wordSearch:Yp,wordTable:Kp});exports.Accordion=$v,exports.ActionCard=F2,exports.Alert=Mx,exports.AppHeader=Ov,exports.AudioMeter=Ss,exports.AudioPlayer=tl,exports.Avatar=Ox,exports.Badge=cn,exports.BarChart=t_,exports.BarChartControls=Gc,exports.Board=B4,exports.BottomNav=zu,exports.BrandIdentity=Gu,exports.BrandLogo=Uu,exports.Breadcrumb=uc,exports.BulkBar=z4,exports.Button=me,exports.CONSENT_KINDS=Ic,exports.CORE_VERSION=k2,exports.Calendar=A_,exports.CardSection=Ac,exports.CardStep=fp,exports.ChartLegend=Bs,exports.ChartSection=Ga,exports.ChartTotal=Tr,exports.Checkbox=xs,exports.ChoiceChips=Tw,exports.CircleBadge=Sn,exports.CodeBox=O4,exports.ColorPicker=f4,exports.CompanyMeta=D4,exports.ConfirmPopup=fs,exports.ConfirmStep=pp,exports.ConfirmWithTextStep=hp,exports.ConsentRecordPopup=L4,exports.ContrastFilterPanel=lB,exports.CoreScope=I2,exports.CountTile=x4,exports.CouponInputPopup=cB,exports.DEFAULT_NOISE_SETTINGS=gr,exports.DatePicker=Fc,exports.DebugResultLauncher=VB,exports.DescriptionTooltip=er,exports.DeviceSideTable=w_,exports.Dialog=w4,exports.Divider=Dx,exports.Dropdown=An,exports.EffectPartyPopper=pl,exports.EffectPartyPopperHost=hB,exports.EmptyState=R2,exports.ErrorBoundary=c4,exports.ErrorState=P2,exports.FILTER_ALL_VALUE=Dn,exports.FileUpload=Wx,exports.FilterPanel=Kn,exports.FilterSectionInfo=la,exports.FolderAddPopup=Zx,exports.FolderGrid=cc,exports.FolderHead=Hx,exports.FolderList=Vx,exports.FolderSearchSections=Xx,exports.FolderTreeButton=hc,exports.FolderTreeTooltip=pc,exports.Footer=Mw,exports.GameIntro=a_,exports.HERO_VISUAL_VARIANTS=WB,exports.Header=Ku,exports.HeroVisual=HB,exports.Icon=lt,exports.IconGridMenu=Sw,exports.IconRenderer=lt,exports.InfoTooltip=zn,exports.ItemActions=H4,exports.KeepScreenAwake=l4,exports.LEVEL_MAX=Fr,exports.LINE_CHART_HOVER_DELAY_MS=Kc,exports.LandingBottomSticky=Lw,exports.LandingButton=wx,exports.LandingCard=_x,exports.LandingHeader=$w,exports.LandingSection=vx,exports.LandingStatBand=jx,exports.LandingTitle=xx,exports.LineChart=r_,exports.ListPopup=iB,exports.ListenStep=dp,exports.Loader=Nr,exports.MARKS=Ha,exports.MARK_ICON=Cs,exports.MARK_VARIANT=gs,exports.MarkIcon=Dc,exports.MediaQueryOverrideContext=Vi,exports.MenuTooltip=nr,exports.NOISE_RATIO_MAX=ga,exports.NOISE_RATIO_STEP=Fd,exports.NoisePlayerContext=Xs,exports.NoiseSettingsTooltip=rp,exports.NoticeBox=z2,exports.NotifyTextPreview=V4,exports.OrderListStep=mp,exports.PASS_CARD_BG_VARS=pr,exports.POPUP_CLOSE_MS=Fu,exports.POS_LABEL=pd,exports.PROMO_BANNER_BG_COMPONENTS=Bu,exports.PROMO_BANNER_BG_OPTIONS=X2,exports.PROMO_BANNER_BG_VARS=na,exports.Page=ro,exports.PagePopup=Jx,exports.PageTitle=mB,exports.Pagination=_s,exports.Panel=Sr,exports.PanelGrid=Yx,exports.PanelRow=dn,exports.PanelRowDevice=Kx,exports.PassCard=ac,exports.PassCardBg=Cx,exports.PassCardBgIHAB=gx,exports.PassCardBgLeftColorGrid=bx,exports.PassCardBgTwoCircle=Qu,exports.PaymentPlan=fx,exports.PersonCard=k4,exports.PhonemeFilterPanel=sB,exports.PhonemeSelectBlock=aB,exports.Popup=qn,exports.ProgressBar=d_,exports.ProgressIndicator=rd,exports.PromoBanner=Sv,exports.PromoBannerBgDark=uu,exports.PromoBannerBgDeep=ru,exports.PromoBannerBgDiagonal=hu,exports.PromoBannerBgDots=fu,exports.PromoBannerBgInstagram=wu,exports.PromoBannerBgMain=Xi,exports.PromoBannerBgNaver=xu,exports.PromoBannerBgOutline=gu,exports.PromoBannerBgRadial=du,exports.PromoBannerBgSoft=Qi,exports.PromoBannerBgSoftSub=ou,exports.PromoBannerBgSub=tu,exports.PromoBannerBgSuccess=yu,exports.PromoBannerBgWarm=lu,exports.PublicationCard=N4,exports.Radio=ic,exports.RadioGroup=Sx,exports.Rating=p4,exports.ReportDocument=vB,exports.ReportInfoPanel=xB,exports.RingChart=s_,exports.SENTENCE_TRAINING_TYPES=Gs,exports.ScoreMarkCounts=s4,exports.SearchSummary=Rx,exports.Section=Lr,exports.SectionHeadFloat=zc,exports.SectionHeader=j4,exports.SegmentedControl=kn,exports.ShortcutBadge=lc,exports.SideNav=qu,exports.Slider=Qc,exports.SoundCompass=yx,exports.SplashLogo=E4,exports.StatChart=l_,exports.SummaryStrip=bB,exports.TRAINING_TOOLTIP_HOVER_DELAY_MS=Mc,exports.Table=Ms,exports.TableFilterPanel=Ws,exports.Tabs=Px,exports.TextBoxTooltip=to,exports.TextField=Un,exports.Timeline=A4,exports.Toast=$r,exports.Toggle=bc,exports.Toolbar=ws,exports.Tooltip=sn,exports.TooltipInfo=zn,exports.TooltipTextBox=to,exports.TopBanner=Tv,exports.TrainingBlock=E_,exports.TrainingBlockButton=vs,exports.TrainingBlockGrid=D_,exports.TrainingCard=AB,exports.TrainingCardGroup=NB,exports.TrainingPagePopup=ar,exports.TrainingPagePopupBottom=ap,exports.TrainingPagePopupTitle=op,exports.TrainingResultPopup=yp,exports.TrainingStep=br,exports.TrainingStepAudioPlayer=tl,exports.TrainingStepBullet=Xd,exports.TrainingStepCard=tp,exports.TrainingStepConfirm=rl,exports.TrainingStepConfirmWithText=al,exports.TrainingStepListen=ol,exports.TrainingStepOrderList=sl,exports.TrainingStepTextBox=ep,exports.TrainingStepTitle=Qd,exports.TrainingTooltip=$c,exports.TrainingWordCard=Rs,exports.UpdateAlert=kB,exports.WAVE_A_MAX=Yw,exports.WAVE_H1_PX=Qs,exports.WAVE_HMAX_PX=Kw,exports.WORD_LABEL_I18N_KEYS=F_,exports.WORD_TABLE_PAPER=fr,exports.WORD_TYPE_LABEL=hd,exports.WordDataProvider=gB,exports.WordDataUpdatePopup=OB,exports.WordImageTooltip=xp,exports.WordSearchFilterPanel=oB,exports.WordSearchResultBlock=nB,exports.WordTable=Rr,exports.WordTableBlock=TB,exports.WordTableButton=$B,exports.WordTablePopup=rw,exports.WordTableThumbnail=Ap,exports.buildMonthChartData=Y4,exports.cellKey=dw,exports.cellLabel=cw,exports.cellsForLabels=ww,exports.chartTotalNumClass=mr,exports.clearPassCardBgTheme=Vn,exports.clearPromoBannerBgTheme=un,exports.closeTrainingPopup=k8,exports.companyTypeLabel=fB,exports.createTrainingScenario=E8,exports.cx=xe,exports.deriveNoiseContexts=$8,exports.derivePassCard=Zu,exports.draftValues=jw,exports.effectiveNoiseVolume=Ys,exports.effectiveSpeechVolume=Od,exports.expandSlashLabel=Is,exports.formatDuration=Bw,exports.getControlDateRange=o_,exports.getPayloadTimestamp=il,exports.getPromoBannerBgTheme=es,exports.getSelectedFromPayload=D8,exports.getSelectedText=S8,exports.getStepPayload=up,exports.getSteppedPayload=T8,exports.injectPassCardBgTheme=Hn,exports.injectPromoBannerBgTheme=ln,exports.isSelectionCorrect=M8,exports.labelOfCellKey=Rd,exports.labelsForSave=uw,exports.levelToPct=Pw,exports.markAfterClick=Ec,exports.marksForSave=ys,exports.mergeNoiseSettings=Cr,exports.missesByType=yw,exports.monthKeyOf=Ca,exports.monthKeyOfDate=ks,exports.nextFocus=fw,exports.nextMisses=bw,exports.noiseElementVolume=Zs,exports.noiseRatioOf=ba,exports.pageStartIndexes=jc,exports.parseMonthKey=Mr,exports.passCardBgIhabTheme=oc,exports.passCardBgLeftColorGridTheme=sc,exports.passCardBgTwoCircleTheme=Ju,exports.pctToLevel=Fw,exports.posLabels=md,exports.printWordTable=M_,exports.promoBannerBgDarkTheme=iu,exports.promoBannerBgDeepTheme=nu,exports.promoBannerBgDiagonalTheme=pu,exports.promoBannerBgDotsTheme=mu,exports.promoBannerBgInstagramTheme=_u,exports.promoBannerBgMainTheme=Zi,exports.promoBannerBgNaverTheme=vu,exports.promoBannerBgOutlineTheme=Cu,exports.promoBannerBgRadialTheme=cu,exports.promoBannerBgSoftSubTheme=au,exports.promoBannerBgSoftTheme=Ji,exports.promoBannerBgSubTheme=eu,exports.promoBannerBgSuccessTheme=bu,exports.promoBannerBgWarmTheme=su,exports.recommendTables=xw,exports.regenerateUnpinned=Ew,exports.removeItem=Nw,exports.resolveTrainingItems=N8,exports.resolveTrainingPopupMeta=lp,exports.reviewCells=ow,exports.reviewMeta=iw,exports.reviewSetPlan=vw,exports.reviewTableName=lw,exports.scoreKey=Wa,exports.scoreSheetHeader=pw,exports.shouldConfirmDiscard=o4,exports.splitTrainingVariants=A8,exports.summarize=a4,exports.summarizeMisses=gw,exports.tableTrends=mw,exports.toDraft=kw,exports.toTrainingText=j8,exports.togglePin=Aw,exports.uncoveredLabels=_w,exports.useAnchoredMenu=aa,exports.useBarChartControl=Uc,exports.useCalendarMonth=Lc,exports.useComboboxSuggestions=wc,exports.useDiscardGuard=_p,exports.useFitScale=bd,exports.useNoisePlayer=Xa,exports.usePagePopupClose=Qx,exports.useSoundCompassExam=fv,exports.useToastLifecycle=td,exports.useValueDiscardGuard=uB,exports.useWordData=CB,exports.useWordTableDisplaySettings=$d,exports.useWordTablePrint=Us,exports.waveBarPx=Qa,exports.waveBarVal=eo,exports.weakItems=hw,exports.weekValueOf=As,exports.withStepTimes=ip,exports.wordTypeLabels=fd;