@ihabdevteam/core 0.403.0 → 0.405.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.
@@ -28,7 +28,7 @@
28
28
  *
29
29
  * This source code is licensed under the ISC license.
30
30
  * See the LICENSE file in the root directory of this source tree.
31
- */const Nd=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},Ed=o.createContext({}),Dd=()=>o.useContext(Ed),Sd=o.forwardRef(({color:e,size:t,strokeWidth:a,absoluteStrokeWidth:r,className:s="",children:l,iconNode:i,...u},c)=>{const{size:d=24,strokeWidth:h=2,absoluteStrokeWidth:p=!1,color:m="currentColor",className:g=""}=Dd()??{},y=r??p?Number(a??h)*24/Number(t??d):a??h;return o.createElement("svg",{ref:c,...Wr,width:t??d??Wr.width,height:t??d??Wr.height,stroke:e??m,strokeWidth:y,className:Is("lucide",g,s),...!l&&!Nd(u)&&{"aria-hidden":"true"},...u},[...i.map(([C,f])=>o.createElement(C,f)),...Array.isArray(l)?l:[l]])});/**
31
+ */const Nd=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},Ed=o.createContext({}),Dd=()=>o.useContext(Ed),Sd=o.forwardRef(({color:e,size:t,strokeWidth:a,absoluteStrokeWidth:r,className:s="",children:l,iconNode:i,...u},c)=>{const{size:d=24,strokeWidth:h=2,absoluteStrokeWidth:p=!1,color:m="currentColor",className:b=""}=Dd()??{},v=r??p?Number(a??h)*24/Number(t??d):a??h;return o.createElement("svg",{ref:c,...Wr,width:t??d??Wr.width,height:t??d??Wr.height,stroke:e??m,strokeWidth:v,className:Is("lucide",b,s),...!l&&!Nd(u)&&{"aria-hidden":"true"},...u},[...i.map(([C,f])=>o.createElement(C,f)),...Array.isArray(l)?l:[l]])});/**
32
32
  * @license lucide-react v1.38.0 - ISC
33
33
  *
34
34
  * This source code is licensed under the ISC license.
@@ -794,7 +794,7 @@
794
794
  * This source code is licensed under the ISC license.
795
795
  * See the LICENSE file in the root directory of this source tree.
796
796
  */const G0=[["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"}]],K0=re("thumbs-up",G0),Vr={"alert-triangle":zs,"align-start-vertical":Md,anchor:u0,armchair:d0,"arrow-down":$d,"arrow-left":Pd,"arrow-right":Id,"arrow-right-left":zd,"audio-lines":Hd,ban:qd,bell:Gd,"book-marked":Yd,"book-open":Xd,"bow-arrow":Qd,braces:tp,bug:ap,calendar:Qs,"calendar-check":op,"calendar-days":lp,camera:up,car:m0,"chart-column":dp,"chart-line":hp,"chart-pie":Cp,check:Ws,"chevron-down":el,"chevron-left":Hs,"chevron-right":Vs,"chevron-up":tl,circle:O0,"clipboard-list":vp,coffee:f0,combine:xp,copy:Bp,"chevrons-left-right-ellipsis":Ap,"credit-card":Ep,database:qs,diff:jp,download:Us,ear:Lp,edit:Rp,"edit-2":Fp,"edit-3":Op,ellipsis:Gs,eraser:Hp,"external-link":qp,eye:Gp,"file-text":Yp,"flip-horizontal":Xp,"folder-open":Qp,"folder-plus":th,gamepad:ah,"gamepad-2":g0,clock:v0,lock:Uh,"search-x":Zm,"share-2":nC,tag:AC,target:x0,percent:B0,gavel:oh,"git-merge":Ks,globe:ih,"grip-vertical":ch,headphones:ph,heart:mh,home:fh,inbox:A0,info:gh,"key-round":vh,landmark:xh,layers:Bh,"layout-dashboard":Ah,leaf:Eh,lightbulb:Sh,link:Th,"link-2":Lh,"link-2-off":Rh,list:Fh,"list-checks":Oh,"list-ordered":Wh,loader:Vh,"log-out":Kh,mail:Zh,"map-pin":Jh,menu:V0,"message-circle":em,"message-circle-question-mark":nm,"message-square":rm,"message-square-more":E0,"message-square-text":sm,minus:S0,"minus-circle":im,moon:U0,"more-horizontal":Gs,package:cm,"party-popper":pm,pause:mm,pencil:fm,phone:gm,play:vm,"play-circle":xm,plus:Bm,printer:Am,"refresh-cw":Em,repeat:Sm,replace:Tm,rocket:Lm,"rotate-ccw":Rm,"rotate-cw":Fm,salad:Om,"scan-search":Wm,search:Um,"circle-alert":Ys,"alert-circle":Ys,"check-circle":Zs,scissors:Km,send:Jm,settings:eC,"shield-check":rC,"shopping-cart":sC,shuffle:iC,"skip-back":cC,"skip-forward":pC,sparkles:T0,square:mC,star:fC,store:gC,"sun-medium":vC,table:xC,"table-2":BC,terminal:EC,"text-cursor-input":SC,"text-initial":TC,"thumbs-up":K0,ticket:LC,trash:FC,triangle:W0,"trash-2":RC,"trending-up":OC,"triangle-alert":zs,trophy:WC,type:L0,unlink:VC,upload:UC,user:Hr,"user-plus":YC,"user-round":XC,"user-round-check":QC,users:t0,"users-round":a0,volume:R0,"volume-2":Xs,wrench:s0,x:Js};Object.freeze(Object.keys(Vr));function Y0(e){return Vr[e]??null}const nl=new Set;function Z0(e){return zn&&!(e in Vr)&&!nl.has(e)&&(nl.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 X0=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 J0(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 a=(e.split("/").pop()||"").replace(/\.svg$/,"");return a?X0(a):null}const al=new Map;function Q0(e){const t=typeof e=="string"?J0(e):null,a=t?Y0(t)??al.get(t)??null:null,[r,s]=o.useState(null);return o.useEffect(()=>{if(!t||a)return;let l=!1;return Z0(t).then(i=>{al.set(t,i),l||s(i)}),()=>{l=!0}},[t,a]),a??r}/*! @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 rl(e,t){(t==null||t>e.length)&&(t=e.length);for(var a=0,r=Array(t);a<t;a++)r[a]=e[a];return r}function e1(e){if(Array.isArray(e))return e}function t1(e,t){var a=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(a!=null){var r,s,l,i,u=[],c=!0,d=!1;try{if(l=(a=a.call(e)).next,t!==0)for(;!(c=(r=l.call(a)).done)&&(u.push(r.value),u.length!==t);c=!0);}catch(h){d=!0,s=h}finally{try{if(!c&&a.return!=null&&(i=a.return(),Object(i)!==i))return}finally{if(d)throw s}}return u}}function n1(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
797
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function a1(e,t){return e1(e)||t1(e,t)||r1(e,t)||n1()}function r1(e,t){if(e){if(typeof e=="string")return rl(e,t);var a={}.toString.call(e).slice(8,-1);return a==="Object"&&e.constructor&&(a=e.constructor.name),a==="Map"||a==="Set"?Array.from(e):a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?rl(e,t):void 0}}const ol=Object.entries,sl=Object.setPrototypeOf,o1=Object.isFrozen,s1=Object.getPrototypeOf,l1=Object.getOwnPropertyDescriptor;let Wt=Object.freeze,Vt=Object.seal,ua=Object.create,ll=typeof Reflect<"u"&&Reflect,qr=ll.apply,Ur=ll.construct;Wt||(Wt=function(t){return t}),Vt||(Vt=function(t){return t}),qr||(qr=function(t,a){for(var r=arguments.length,s=new Array(r>2?r-2:0),l=2;l<r;l++)s[l-2]=arguments[l];return t.apply(a,s)}),Ur||(Ur=function(t){for(var a=arguments.length,r=new Array(a>1?a-1:0),s=1;s<a;s++)r[s-1]=arguments[s];return new t(...r)});const Zn=Ot(Array.prototype.forEach),i1=Ot(Array.prototype.lastIndexOf),il=Ot(Array.prototype.pop),Aa=Ot(Array.prototype.push),u1=Ot(Array.prototype.splice),ca=Array.isArray,Na=Ot(String.prototype.toLowerCase),Gr=Ot(String.prototype.toString),ul=Ot(String.prototype.match),Ea=Ot(String.prototype.replace),cl=Ot(String.prototype.indexOf),c1=Ot(String.prototype.trim),d1=Ot(Number.prototype.toString),p1=Ot(Boolean.prototype.toString),dl=typeof BigInt>"u"?null:Ot(BigInt.prototype.toString),pl=typeof Symbol>"u"?null:Ot(Symbol.prototype.toString),rn=Ot(Object.prototype.hasOwnProperty),Da=Ot(Object.prototype.toString),Xt=Ot(RegExp.prototype.test),Xn=h1(TypeError);function Ot(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var a=arguments.length,r=new Array(a>1?a-1:0),s=1;s<a;s++)r[s-1]=arguments[s];return qr(e,t,r)}}function h1(e){return function(){for(var t=arguments.length,a=new Array(t),r=0;r<t;r++)a[r]=arguments[r];return Ur(e,a)}}function bt(e,t){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Na;if(sl&&sl(e,null),!ca(t))return e;let r=t.length;for(;r--;){let s=t[r];if(typeof s=="string"){const l=a(s);l!==s&&(o1(t)||(t[r]=l),s=l)}e[s]=!0}return e}function m1(e){for(let t=0;t<e.length;t++)rn(e,t)||(e[t]=null);return e}function mn(e){const t=ua(null);for(const r of ol(e)){var a=a1(r,2);const s=a[0],l=a[1];rn(e,s)&&(ca(l)?t[s]=m1(l):l&&typeof l=="object"&&l.constructor===Object?t[s]=mn(l):t[s]=l)}return t}function C1(e){switch(typeof e){case"string":return e;case"number":return d1(e);case"boolean":return p1(e);case"bigint":return dl?dl(e):"0";case"symbol":return pl?pl(e):"Symbol()";case"undefined":return Da(e);case"function":case"object":{if(e===null)return Da(e);const t=e,a=wn(t,"toString");if(typeof a=="function"){const r=a(t);return typeof r=="string"?r:Da(r)}return Da(e)}default:return Da(e)}}function wn(e,t){for(;e!==null;){const r=l1(e,t);if(r){if(r.get)return Ot(r.get);if(typeof r.value=="function")return Ot(r.value)}e=s1(e)}function a(){return null}return a}function f1(e){try{return Xt(e,""),!0}catch{return!1}}const hl=Wt(["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"]),Kr=Wt(["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"]),Yr=Wt(["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"]),b1=Wt(["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"]),Zr=Wt(["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"]),g1=Wt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ml=Wt(["#text"]),Cl=Wt(["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"]),Xr=Wt(["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"]),fl=Wt(["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"]),or=Wt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),y1=Vt(/{{[\w\W]*|^[\w\W]*}}/g),v1=Vt(/<%[\w\W]*|^[\w\W]*%>/g),_1=Vt(/\${[\w\W]*/g),x1=Vt(/^data-[\-\w.\u00B7-\uFFFF]+$/),w1=Vt(/^aria-[\-\w]+$/),bl=Vt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),B1=Vt(/^(?:\w+script|data):/i),k1=Vt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),A1=Vt(/^html$/i),N1=Vt(/^[a-z][.\w]*(-[.\w]+)+$/i),gl=Vt(/<[/\w!]/g),yl=Vt(/<[/\w]/g),E1=Vt(/<\/no(script|embed|frames)/i),D1=Vt(/\/>/i),Cn={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},vl=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],S1=Wt(bt({},vl)),j1=(function(){const e={};return Zn(vl,t=>{e[t]=Vt(new RegExp("</"+t+"(?=[\\t\\n\\f\\r />])","i"))}),Wt(e)})(),T1=function(){return typeof window>"u"?null:window},M1=function(t,a){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const s="data-tt-policy-suffix";a&&a.hasAttribute(s)&&(r=a.getAttribute(s));const l="dompurify"+(r?"#"+r:"");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}},_l=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Wn=function(t,a,r,s){return rn(t,a)&&ca(t[a])?bt(s.base?mn(s.base):{},t[a],s.transform):r},Jr=function(t,a,r){const s=rn(t,a)?t[a]:void 0;return s&&typeof s=="object"?mn(s):r()};function xl(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:T1();const t=ge=>xl(ge);if(t.version="3.4.14",t.removed=[],!e||!e.document||e.document.nodeType!==Cn.document||!e.Element)return t.isSupported=!1,t;let a=e.document;const r=a,s=r.currentScript;e.DocumentFragment;const l=e.HTMLTemplateElement,i=e.Node,u=e.Element,c=e.NodeFilter,d=e.NamedNodeMap;d===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const h=e.DOMParser,p=e.trustedTypes,m=u.prototype,g=wn(m,"cloneNode"),y=wn(m,"remove"),C=wn(m,"nextSibling"),f=wn(m,"childNodes"),_=wn(m,"parentNode"),b=wn(m,"shadowRoot"),w=wn(m,"attributes"),v=i&&i.prototype?wn(i.prototype,"nodeType"):null,k=i&&i.prototype?wn(i.prototype,"nodeName"):null,x=i&&i.prototype?wn(i.prototype,"ownerDocument"):null,A=function(S){return v?v(S):S.nodeType},B=function(S){return k?k(S):S.nodeName};if(typeof l=="function"){const ge=a.createElement("template");ge.content&&ge.content.ownerDocument&&(a=ge.content.ownerDocument)}let E,D="",N,$=!1,L=0;const U=function(){if(L>0)throw Xn('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.')},M=function(S){U(),L++;try{return E.createHTML(S)}finally{L--}},P=function(S){U(),L++;try{return E.createScriptURL(S)}finally{L--}},T=function(){return $||(N=M1(p,s),$=!0),N},ee=a,te=ee.implementation,I=ee.createNodeIterator,Y=ee.createDocumentFragment,R=ee.getElementsByTagName,q=r.importNode;let Z=_l();t.isSupported=typeof ol=="function"&&typeof _=="function"&&te&&te.createHTMLDocument!==void 0;const z=y1,j=v1,F=_1,O=x1,G=w1,ie=B1,K=k1,pe=N1;let X=bl,H=null;const ne=bt({},[...hl,...Kr,...Yr,...Zr,...ml]);let V=null;const W=bt({},[...Cl,...Xr,...fl,...or]);let oe=Object.seal(ua(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}})),xe=null,be=null;const me=Object.seal(ua(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ke=!0,Le=!0,Me=!1,le=!0,ve=!1,$e=!0,Ae=!1,Ie=!1,ze=null,dt=null,st=!1,et=!1,gt=!1,Se=!1,Ge=!0,we=!1;const qe="user-content-";let Ye=!0,mt=!1,wt={},yt=null;const Et=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 at=null;const rt=bt({},["audio","video","img","source","image","track"]);let Dt=null;const Bt=bt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Lt="http://www.w3.org/1998/Math/MathML",It="http://www.w3.org/2000/svg",xt="http://www.w3.org/1999/xhtml";let lt=xt,Ct=!1,it=null;const _t=bt({},[Lt,It,xt],Gr),ut=Wt(["mi","mo","mn","ms","mtext"]);let St=bt({},ut);const ue=Wt(["annotation-xml"]);let Te=bt({},ue);const De=bt({},["title","style","font","a","script"]);let tt=null;const pt=["application/xhtml+xml","text/html"],jt="text/html";let je=null,nt=null;const ae=a.createElement("form"),ye=function(S){return S instanceof RegExp||S instanceof Function},He=function(){let S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(nt&&nt===S)return;(!S||typeof S!="object")&&(S={}),S=mn(S),tt=pt.indexOf(S.PARSER_MEDIA_TYPE)===-1?jt:S.PARSER_MEDIA_TYPE,je=tt==="application/xhtml+xml"?Gr:Na,H=Wn(S,"ALLOWED_TAGS",ne,{transform:je}),V=Wn(S,"ALLOWED_ATTR",W,{transform:je}),it=Wn(S,"ALLOWED_NAMESPACES",_t,{transform:Gr}),Dt=Wn(S,"ADD_URI_SAFE_ATTR",Bt,{transform:je,base:Bt}),at=Wn(S,"ADD_DATA_URI_TAGS",rt,{transform:je,base:rt}),yt=Wn(S,"FORBID_CONTENTS",Et,{transform:je}),xe=Wn(S,"FORBID_TAGS",mn({}),{transform:je}),be=Wn(S,"FORBID_ATTR",mn({}),{transform:je}),wt=rn(S,"USE_PROFILES")?S.USE_PROFILES&&typeof S.USE_PROFILES=="object"?mn(S.USE_PROFILES):S.USE_PROFILES:!1,ke=S.ALLOW_ARIA_ATTR!==!1,Le=S.ALLOW_DATA_ATTR!==!1,Me=S.ALLOW_UNKNOWN_PROTOCOLS||!1,le=S.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ve=S.SAFE_FOR_TEMPLATES||!1,$e=S.SAFE_FOR_XML!==!1,Ae=S.WHOLE_DOCUMENT||!1,et=S.RETURN_DOM||!1,gt=S.RETURN_DOM_FRAGMENT||!1,Se=S.RETURN_TRUSTED_TYPE||!1,st=S.FORCE_BODY||!1,Ge=S.SANITIZE_DOM!==!1,we=S.SANITIZE_NAMED_PROPS||!1,Ye=S.KEEP_CONTENT!==!1,mt=S.IN_PLACE||!1,X=f1(S.ALLOWED_URI_REGEXP)?S.ALLOWED_URI_REGEXP:bl,lt=typeof S.NAMESPACE=="string"?S.NAMESPACE:xt,St=Jr(S,"MATHML_TEXT_INTEGRATION_POINTS",()=>bt({},ut)),Te=Jr(S,"HTML_INTEGRATION_POINTS",()=>bt({},ue));const Q=Jr(S,"CUSTOM_ELEMENT_HANDLING",()=>ua(null));if(oe=ua(null),rn(Q,"tagNameCheck")&&ye(Q.tagNameCheck)&&(oe.tagNameCheck=Q.tagNameCheck),rn(Q,"attributeNameCheck")&&ye(Q.attributeNameCheck)&&(oe.attributeNameCheck=Q.attributeNameCheck),rn(Q,"allowCustomizedBuiltInElements")&&typeof Q.allowCustomizedBuiltInElements=="boolean"&&(oe.allowCustomizedBuiltInElements=Q.allowCustomizedBuiltInElements),Vt(oe),ve&&(Le=!1),gt&&(et=!0),wt&&(H=bt({},ml),V=ua(null),wt.html===!0&&(bt(H,hl),bt(V,Cl)),wt.svg===!0&&(bt(H,Kr),bt(V,Xr),bt(V,or)),wt.svgFilters===!0&&(bt(H,Yr),bt(V,Xr),bt(V,or)),wt.mathMl===!0&&(bt(H,Zr),bt(V,fl),bt(V,or))),me.tagCheck=null,me.attributeCheck=null,rn(S,"ADD_TAGS")&&(typeof S.ADD_TAGS=="function"?me.tagCheck=S.ADD_TAGS:ca(S.ADD_TAGS)&&(H===ne&&(H=mn(H)),bt(H,S.ADD_TAGS,je))),rn(S,"ADD_ATTR")&&(typeof S.ADD_ATTR=="function"?me.attributeCheck=S.ADD_ATTR:ca(S.ADD_ATTR)&&(V===W&&(V=mn(V)),bt(V,S.ADD_ATTR,je))),rn(S,"ADD_FORBID_CONTENTS")&&ca(S.ADD_FORBID_CONTENTS)&&(yt===Et&&(yt=mn(yt)),bt(yt,S.ADD_FORBID_CONTENTS,je)),Ye&&(H["#text"]=!0),Ae&&bt(H,["html","head","body"]),H.table&&(bt(H,["tbody"]),delete xe.tbody),S.TRUSTED_TYPES_POLICY){if(typeof S.TRUSTED_TYPES_POLICY.createHTML!="function")throw Xn('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof S.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Xn('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const Ce=E;E=S.TRUSTED_TYPES_POLICY;try{D=M("")}catch(Re){throw E=Ce,Re}}else S.TRUSTED_TYPES_POLICY===null?(E=void 0,D=""):(E===void 0&&(E=T()),E&&typeof D=="string"&&(D=M("")));Wt&&Wt(S),nt=S},Ke=bt({},[...Kr,...Yr,...b1]),vt=bt({},[...Zr,...g1]),Ue=function(S,Q,Ce){return Q.namespaceURI===xt?S==="svg":Q.namespaceURI===Lt?S==="svg"&&(Ce==="annotation-xml"||St[Ce]):!!Ke[S]},ht=function(S,Q,Ce){return Q.namespaceURI===xt?S==="math":Q.namespaceURI===It?S==="math"&&Te[Ce]:!!vt[S]},cn=function(S,Q,Ce){return Q.namespaceURI===It&&!Te[Ce]||Q.namespaceURI===Lt&&!St[Ce]?!1:!vt[S]&&(De[S]||!Ke[S])},dn=function(S){let Q=_(S);(!Q||!Q.tagName)&&(Q={namespaceURI:lt,tagName:"template"});const Ce=Na(S.tagName),Re=Na(Q.tagName);return it[S.namespaceURI]?S.namespaceURI===It?Ue(Ce,Q,Re):S.namespaceURI===Lt?ht(Ce,Q,Re):S.namespaceURI===xt?cn(Ce,Q,Re):!!(tt==="application/xhtml+xml"&&it[S.namespaceURI]):!1},zt=function(S){Aa(t.removed,{element:S});try{_(S).removeChild(S)}catch{if(y(S),!_(S))throw Xn("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},qt=function(S,Q,Ce){try{S.removeAttributeNode(Q)}catch{try{S.removeAttribute(Ce)}catch{}}},Ht=function(S){an(S);const Q=f(S);if(Q){const Re=[];Zn(Q,We=>{Aa(Re,We)}),Zn(Re,We=>{try{y(We)}catch{}})}const Ce=w(S);if(Ce)for(let Re=Ce.length-1;Re>=0;--Re){const We=Ce[Re],he=We&&We.name;typeof he=="string"&&qt(S,We,he)}},Nt=function(S,Q,Ce){if(!Ce)try{Ce=Q.getAttributeNode(S)}catch{Ce=null}Aa(t.removed,{attribute:Ce||null,from:Q});try{Ce?Q.removeAttributeNode(Ce):Q.removeAttribute(S)}catch{try{Q.removeAttribute(S)}catch{}}if(S==="is")if(et||gt)try{zt(Q)}catch{}else try{Q.setAttribute(S,"")}catch{}},An=function(S){const Q=w(S);if(Q)for(let Ce=Q.length-1;Ce>=0;--Ce){const Re=Q[Ce],We=Re&&Re.name;typeof We!="string"||V[je(We)]||qt(S,Re,We)}},an=function(S){const Q=[S];for(;Q.length>0;){const Ce=Q.pop();A(Ce)===Cn.element&&An(Ce);const We=f(Ce);if(We)for(let he=We.length-1;he>=0;--he)Q.push(We[he])}},$t=function(S,Q){return $e?S==="patchsrc"?!0:S==="for"&&Q!=="label"&&Q!=="output":!1},Pt=function(S){if(!$e)return;const Q=[S];for(;Q.length>0;){const Ce=Q.pop(),Re=A(Ce);if(Re===Cn.processingInstruction||Re===Cn.comment&&Xt(yl,Ce.data)){try{y(Ce)}catch{}continue}if(Re===Cn.element){const he=Ce,Pe=je(B(Ce));try{he.hasAttribute&&he.hasAttribute("patchsrc")&&he.removeAttribute("patchsrc"),he.hasAttribute&&he.hasAttribute("for")&&$t("for",Pe)&&he.removeAttribute("for")}catch{}}const We=f(Ce);if(We)for(let he=We.length-1;he>=0;--he)Q.push(We[he])}},Ut=function(S){let Q=null,Ce=null;if(st)S="<remove></remove>"+S;else{const he=ul(S,/^[\r\n\t ]+/);Ce=he&&he[0]}tt==="application/xhtml+xml"&&lt===xt&&(S='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+S+"</body></html>");const Re=E?M(S):S;if(lt===xt)try{Q=new h().parseFromString(Re,tt)}catch{}if(!Q||!Q.documentElement){Q=te.createDocument(lt,"template",null);try{Q.documentElement.innerHTML=Ct?D:Re}catch{}}const We=Q.body||Q.documentElement;return S&&Ce&&We.insertBefore(a.createTextNode(Ce),We.childNodes[0]||null),lt===xt?R.call(Q,Ae?"html":"body")[0]:Ae?Q.documentElement:We},Jt=function(S){const Q=x?x(S):S.ownerDocument;return I.call(Q||S,S,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},gn=function(S){return S=Ea(S,z," "),S=Ea(S,j," "),S=Ea(S,F," "),S},Zt=function(S){var Q;S.normalize();const Ce=x?x(S):S.ownerDocument,Re=I.call(Ce||S,S,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null);let We=Re.nextNode();for(;We;)We.data=gn(We.data),We=Re.nextNode();const he=(Q=S.querySelectorAll)===null||Q===void 0?void 0:Q.call(S,"template");he&&Zn(he,Pe=>{pn(Pe.content)&&Zt(Pe.content)})},xn=function(S){const Q=k?k(S):null;return typeof Q!="string"||je(Q)!=="form"?!1:typeof S.nodeName!="string"||typeof S.textContent!="string"||typeof S.removeChild!="function"||S.attributes!==w(S)||typeof S.removeAttribute!="function"||typeof S.setAttribute!="function"||typeof S.namespaceURI!="string"||typeof S.insertBefore!="function"||typeof S.hasChildNodes!="function"||S.nodeType!==v(S)||S.childNodes!==f(S)},pn=function(S){if(!v||typeof S!="object"||S===null)return!1;try{return v(S)===Cn.documentFragment}catch{return!1}},Qt=function(S){if(!v||typeof S!="object"||S===null)return!1;try{return typeof v(S)=="number"}catch{return!1}};function Gt(ge,S,Q){ge.length!==0&&Zn(ge,Ce=>{Ce.call(t,S,Q,nt)})}const Nn=function(S,Q){return!!($e&&S.hasChildNodes()&&!Qt(S.firstElementChild)&&Xt(gl,S.textContent)&&Xt(gl,S.innerHTML)||$e&&S.namespaceURI===xt&&S1[Q]&&(Qt(S.firstElementChild)||typeof S.textContent=="string"&&Xt(j1[Q],S.textContent))||S.nodeType===Cn.processingInstruction||$e&&S.nodeType===Cn.comment&&Xt(yl,S.data))},de=function(S,Q){if(S instanceof RegExp)return Xt(S,Q);if(S instanceof Function){for(var Ce=arguments.length,Re=new Array(Ce>2?Ce-2:0),We=2;We<Ce;We++)Re[We-2]=arguments[We];return!!S(Q,...Re)}return!1},Ne=function(S,Q,Ce){if(!xe[Q]&&Ee(Q)&&de(oe.tagNameCheck,Q))return!1;if(Ye&&!yt[Q]){const Re=_(S),We=f(S);if(We&&Re){const he=We.length;for(let Pe=he-1;Pe>=0;--Pe){const Qe=S===Ce?g(We[Pe],!0):We[Pe];Re.insertBefore(Qe,C(S))}}}return zt(S),!0},Fe=function(S,Q,Ce,Re){return S.length===0?Q:Q===Ce||Q===Re?mn(Q):Q},Ze=function(S,Q){return S===Q||_(S)!==null?!1:(mt&&an(S),!0)},Oe=function(S,Q){if(Gt(Z.beforeSanitizeElements,S,null),Ze(S,Q))return!0;if(xn(S))return zt(S),!0;const Ce=je(B(S));if(H=Fe(Z.uponSanitizeElement,H,ne,ze),Gt(Z.uponSanitizeElement,S,{tagName:Ce,allowedTags:H}),Ze(S,Q))return!0;if(Nn(S,Ce))return zt(S),!0;if(xe[Ce]||!(me.tagCheck instanceof Function&&me.tagCheck(Ce))&&!H[Ce]){const We=Ne(S,Ce,Q);return We===!1&&Gt(Z.afterSanitizeElements,S,null),We}if(A(S)===Cn.element&&!dn(S)||(Ce==="noscript"||Ce==="noembed"||Ce==="noframes")&&Xt(E1,S.innerHTML))return zt(S),!0;if(ve&&S.nodeType===Cn.text){const We=gn(S.textContent);S.textContent!==We&&(Aa(t.removed,{element:S.cloneNode()}),S.textContent=We)}return Gt(Z.afterSanitizeElements,S,null),!1},J=function(S,Q,Ce){if(be[Q]||$t(Q,S)||Ge&&(Q==="id"||Q==="name")&&(Ce in a||Ce in ae))return!1;const Re=V[Q]||me.attributeCheck instanceof Function&&me.attributeCheck(Q,S);return Le&&Xt(O,Q)||ke&&Xt(G,Q)?!0:Re?Dt[Q]||Xt(X,Ea(Ce,K,""))||(Q==="src"||Q==="xlink:href"||Q==="href")&&S!=="script"&&cl(Ce,"data:")===0&&at[S]||Me&&!Xt(ie,Ea(Ce,K,""))?!0:!Ce:Ee(S)&&de(oe.tagNameCheck,S)&&de(oe.attributeNameCheck,Q,S)||Q==="is"&&oe.allowCustomizedBuiltInElements&&de(oe.tagNameCheck,Ce)},ce=bt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Ee=function(S){return!ce[Na(S)]&&Xt(pe,S)},Ve=function(S,Q,Ce,Re){if(E&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!Ce)switch(p.getAttributeType(S,Q)){case"TrustedHTML":return M(Re);case"TrustedScriptURL":return P(Re)}return Re},Xe=function(S,Q,Ce,Re){try{Ce?S.setAttributeNS(Ce,Q,Re):S.setAttribute(Q,Re),xn(S)?zt(S):il(t.removed)}catch{Nt(Q,S)}},Je=function(S){Gt(Z.beforeSanitizeAttributes,S,null);const Q=S.attributes;if(!Q||xn(S))return;V=Fe(Z.uponSanitizeAttribute,V,W,dt);const Ce={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:V,forceKeepAttr:void 0};let Re=Q.length;const We=je(S.nodeName);for(;Re--;){const he=Q[Re],Pe=he.name,Qe=he.namespaceURI,kt=he.value,Tt=je(Pe),zr=kt;let en=Pe==="value"?zr:c1(zr);if(Ce.attrName=Tt,Ce.attrValue=en,Ce.keepAttr=!0,Ce.forceKeepAttr=void 0,Gt(Z.uponSanitizeAttribute,S,Ce),en=Ce.attrValue,we&&(Tt==="id"||Tt==="name")&&cl(en,qe)!==0&&(Nt(Pe,S,he),en=qe+en),$e&&Xt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,en)){Nt(Pe,S,he);continue}if(Tt==="attributename"&&ul(en,"href")){Nt(Pe,S,he);continue}if(!Ce.forceKeepAttr){if(!Ce.keepAttr){Nt(Pe,S,he);continue}if(!le&&Xt(D1,en)){Nt(Pe,S,he);continue}if(ve&&(en=gn(en)),!J(We,Tt,en)){Nt(Pe,S,he);continue}en=Ve(We,Tt,Qe,en),en!==zr&&Xe(S,Pe,Qe,en)}}Gt(Z.afterSanitizeAttributes,S,null)},ct=function(S){let Q=null;const Ce=Jt(S);for(Gt(Z.beforeSanitizeShadowDOM,S,null);Q=Ce.nextNode();)if(Gt(Z.uponSanitizeShadowNode,Q,null),Oe(Q,S),Je(Q),pn(Q.content)&&ct(Q.content),A(Q)===Cn.element){const Re=b(Q);pn(Re)&&(ft(Re),ct(Re))}Gt(Z.afterSanitizeShadowDOM,S,null)},ft=function(S){const Q=[{node:S,shadow:null}];for(;Q.length>0;){const Ce=Q.pop();if(Ce.shadow){ct(Ce.shadow);continue}const Re=Ce.node,he=A(Re)===Cn.element,Pe=f(Re);if(Pe)for(let Qe=Pe.length-1;Qe>=0;--Qe)Q.push({node:Pe[Qe],shadow:null});if(he){const Qe=k?k(Re):null;if(typeof Qe=="string"&&je(Qe)==="template"){const kt=Re.content;pn(kt)&&Q.push({node:kt,shadow:null})}}if(he){const Qe=b(Re);pn(Qe)&&Q.push({node:null,shadow:Qe},{node:Qe,shadow:null})}}};return t.sanitize=function(ge){let S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Q=null,Ce=null,Re=null,We=null;if(Ct=!ge,Ct&&(ge="<!-->"),typeof ge!="string"&&!Qt(ge)&&(ge=C1(ge),typeof ge!="string"))throw Xn("dirty is not a string, aborting");if(!t.isSupported)return ge;Ie?(H=ze,V=dt):He(S),(Z.uponSanitizeElement.length>0||Z.uponSanitizeAttribute.length>0)&&(H=mn(H)),Z.uponSanitizeAttribute.length>0&&(V=mn(V)),t.removed=[];const he=mt&&typeof ge!="string"&&Qt(ge);if(he){Pt(ge);const kt=B(ge);if(typeof kt=="string"){const Tt=je(kt);if(!H[Tt]||xe[Tt])throw Ht(ge),Xn("root node is forbidden and cannot be sanitized in-place")}if(xn(ge))throw Ht(ge),Xn("root node is clobbered and cannot be sanitized in-place");try{ft(ge)}catch(Tt){throw Ht(ge),Tt}}else if(Qt(ge))Q=Ut("<!---->"),Ce=Q.ownerDocument.importNode(ge,!0),Ce.nodeType===Cn.element&&Ce.nodeName==="BODY"||Ce.nodeName==="HTML"?Q=Ce:Q.appendChild(Ce),ft(Ce);else{if(!et&&!ve&&!Ae&&ge.indexOf("<")===-1)return E&&Se?M(ge):ge;if(Q=Ut(ge),!Q)return et?null:Se?D:""}Q&&st&&zt(Q.firstChild);const Pe=he?ge:Q;try{const kt=Jt(Pe);for(;Re=kt.nextNode();)Oe(Re,Pe),Je(Re),pn(Re.content)&&ct(Re.content)}catch(kt){throw he&&(Ht(ge),Zn(t.removed,Tt=>{Tt.element&&an(Tt.element)})),kt}if(he)return Zn(t.removed,kt=>{kt.element&&an(kt.element)}),ve&&Zt(ge),ge;if(et){if(ve&&Zt(Q),gt)for(We=Y.call(Q.ownerDocument);Q.firstChild;)We.appendChild(Q.firstChild);else We=Q;return(V.shadowroot||V.shadowrootmode)&&(We=q.call(r,We,!0)),We}let Qe=Ae?Q.outerHTML:Q.innerHTML;return Ae&&H["!doctype"]&&Q.ownerDocument&&Q.ownerDocument.doctype&&Q.ownerDocument.doctype.name&&Xt(A1,Q.ownerDocument.doctype.name)&&(Qe="<!DOCTYPE "+Q.ownerDocument.doctype.name+`>
797
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function a1(e,t){return e1(e)||t1(e,t)||r1(e,t)||n1()}function r1(e,t){if(e){if(typeof e=="string")return rl(e,t);var a={}.toString.call(e).slice(8,-1);return a==="Object"&&e.constructor&&(a=e.constructor.name),a==="Map"||a==="Set"?Array.from(e):a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?rl(e,t):void 0}}const ol=Object.entries,sl=Object.setPrototypeOf,o1=Object.isFrozen,s1=Object.getPrototypeOf,l1=Object.getOwnPropertyDescriptor;let Wt=Object.freeze,Vt=Object.seal,ua=Object.create,ll=typeof Reflect<"u"&&Reflect,qr=ll.apply,Ur=ll.construct;Wt||(Wt=function(t){return t}),Vt||(Vt=function(t){return t}),qr||(qr=function(t,a){for(var r=arguments.length,s=new Array(r>2?r-2:0),l=2;l<r;l++)s[l-2]=arguments[l];return t.apply(a,s)}),Ur||(Ur=function(t){for(var a=arguments.length,r=new Array(a>1?a-1:0),s=1;s<a;s++)r[s-1]=arguments[s];return new t(...r)});const Zn=Ot(Array.prototype.forEach),i1=Ot(Array.prototype.lastIndexOf),il=Ot(Array.prototype.pop),Aa=Ot(Array.prototype.push),u1=Ot(Array.prototype.splice),ca=Array.isArray,Na=Ot(String.prototype.toLowerCase),Gr=Ot(String.prototype.toString),ul=Ot(String.prototype.match),Ea=Ot(String.prototype.replace),cl=Ot(String.prototype.indexOf),c1=Ot(String.prototype.trim),d1=Ot(Number.prototype.toString),p1=Ot(Boolean.prototype.toString),dl=typeof BigInt>"u"?null:Ot(BigInt.prototype.toString),pl=typeof Symbol>"u"?null:Ot(Symbol.prototype.toString),rn=Ot(Object.prototype.hasOwnProperty),Da=Ot(Object.prototype.toString),Xt=Ot(RegExp.prototype.test),Xn=h1(TypeError);function Ot(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var a=arguments.length,r=new Array(a>1?a-1:0),s=1;s<a;s++)r[s-1]=arguments[s];return qr(e,t,r)}}function h1(e){return function(){for(var t=arguments.length,a=new Array(t),r=0;r<t;r++)a[r]=arguments[r];return Ur(e,a)}}function bt(e,t){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Na;if(sl&&sl(e,null),!ca(t))return e;let r=t.length;for(;r--;){let s=t[r];if(typeof s=="string"){const l=a(s);l!==s&&(o1(t)||(t[r]=l),s=l)}e[s]=!0}return e}function m1(e){for(let t=0;t<e.length;t++)rn(e,t)||(e[t]=null);return e}function mn(e){const t=ua(null);for(const r of ol(e)){var a=a1(r,2);const s=a[0],l=a[1];rn(e,s)&&(ca(l)?t[s]=m1(l):l&&typeof l=="object"&&l.constructor===Object?t[s]=mn(l):t[s]=l)}return t}function C1(e){switch(typeof e){case"string":return e;case"number":return d1(e);case"boolean":return p1(e);case"bigint":return dl?dl(e):"0";case"symbol":return pl?pl(e):"Symbol()";case"undefined":return Da(e);case"function":case"object":{if(e===null)return Da(e);const t=e,a=wn(t,"toString");if(typeof a=="function"){const r=a(t);return typeof r=="string"?r:Da(r)}return Da(e)}default:return Da(e)}}function wn(e,t){for(;e!==null;){const r=l1(e,t);if(r){if(r.get)return Ot(r.get);if(typeof r.value=="function")return Ot(r.value)}e=s1(e)}function a(){return null}return a}function f1(e){try{return Xt(e,""),!0}catch{return!1}}const hl=Wt(["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"]),Kr=Wt(["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"]),Yr=Wt(["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"]),b1=Wt(["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"]),Zr=Wt(["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"]),g1=Wt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ml=Wt(["#text"]),Cl=Wt(["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"]),Xr=Wt(["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"]),fl=Wt(["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"]),or=Wt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),y1=Vt(/{{[\w\W]*|^[\w\W]*}}/g),v1=Vt(/<%[\w\W]*|^[\w\W]*%>/g),_1=Vt(/\${[\w\W]*/g),x1=Vt(/^data-[\-\w.\u00B7-\uFFFF]+$/),w1=Vt(/^aria-[\-\w]+$/),bl=Vt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),B1=Vt(/^(?:\w+script|data):/i),k1=Vt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),A1=Vt(/^html$/i),N1=Vt(/^[a-z][.\w]*(-[.\w]+)+$/i),gl=Vt(/<[/\w!]/g),yl=Vt(/<[/\w]/g),E1=Vt(/<\/no(script|embed|frames)/i),D1=Vt(/\/>/i),Cn={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},vl=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],S1=Wt(bt({},vl)),j1=(function(){const e={};return Zn(vl,t=>{e[t]=Vt(new RegExp("</"+t+"(?=[\\t\\n\\f\\r />])","i"))}),Wt(e)})(),T1=function(){return typeof window>"u"?null:window},M1=function(t,a){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const s="data-tt-policy-suffix";a&&a.hasAttribute(s)&&(r=a.getAttribute(s));const l="dompurify"+(r?"#"+r:"");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}},_l=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Wn=function(t,a,r,s){return rn(t,a)&&ca(t[a])?bt(s.base?mn(s.base):{},t[a],s.transform):r},Jr=function(t,a,r){const s=rn(t,a)?t[a]:void 0;return s&&typeof s=="object"?mn(s):r()};function xl(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:T1();const t=ge=>xl(ge);if(t.version="3.4.14",t.removed=[],!e||!e.document||e.document.nodeType!==Cn.document||!e.Element)return t.isSupported=!1,t;let a=e.document;const r=a,s=r.currentScript;e.DocumentFragment;const l=e.HTMLTemplateElement,i=e.Node,u=e.Element,c=e.NodeFilter,d=e.NamedNodeMap;d===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const h=e.DOMParser,p=e.trustedTypes,m=u.prototype,b=wn(m,"cloneNode"),v=wn(m,"remove"),C=wn(m,"nextSibling"),f=wn(m,"childNodes"),x=wn(m,"parentNode"),g=wn(m,"shadowRoot"),w=wn(m,"attributes"),y=i&&i.prototype?wn(i.prototype,"nodeType"):null,k=i&&i.prototype?wn(i.prototype,"nodeName"):null,_=i&&i.prototype?wn(i.prototype,"ownerDocument"):null,A=function(S){return y?y(S):S.nodeType},B=function(S){return k?k(S):S.nodeName};if(typeof l=="function"){const ge=a.createElement("template");ge.content&&ge.content.ownerDocument&&(a=ge.content.ownerDocument)}let E,D="",N,$=!1,L=0;const U=function(){if(L>0)throw Xn('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.')},M=function(S){U(),L++;try{return E.createHTML(S)}finally{L--}},P=function(S){U(),L++;try{return E.createScriptURL(S)}finally{L--}},T=function(){return $||(N=M1(p,s),$=!0),N},ee=a,te=ee.implementation,I=ee.createNodeIterator,Y=ee.createDocumentFragment,R=ee.getElementsByTagName,q=r.importNode;let Z=_l();t.isSupported=typeof ol=="function"&&typeof x=="function"&&te&&te.createHTMLDocument!==void 0;const z=y1,j=v1,F=_1,O=x1,G=w1,ie=B1,K=k1,pe=N1;let X=bl,H=null;const ne=bt({},[...hl,...Kr,...Yr,...Zr,...ml]);let V=null;const W=bt({},[...Cl,...Xr,...fl,...or]);let oe=Object.seal(ua(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}})),xe=null,be=null;const me=Object.seal(ua(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ke=!0,Le=!0,Me=!1,le=!0,ve=!1,$e=!0,Ae=!1,Ie=!1,ze=null,dt=null,st=!1,et=!1,gt=!1,Se=!1,Ge=!0,we=!1;const qe="user-content-";let Ye=!0,mt=!1,wt={},yt=null;const Et=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 at=null;const rt=bt({},["audio","video","img","source","image","track"]);let Dt=null;const Bt=bt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Lt="http://www.w3.org/1998/Math/MathML",It="http://www.w3.org/2000/svg",xt="http://www.w3.org/1999/xhtml";let lt=xt,Ct=!1,it=null;const _t=bt({},[Lt,It,xt],Gr),ut=Wt(["mi","mo","mn","ms","mtext"]);let St=bt({},ut);const ue=Wt(["annotation-xml"]);let Te=bt({},ue);const Ne=bt({},["title","style","font","a","script"]);let tt=null;const pt=["application/xhtml+xml","text/html"],jt="text/html";let je=null,nt=null;const ae=a.createElement("form"),ye=function(S){return S instanceof RegExp||S instanceof Function},He=function(){let S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(nt&&nt===S)return;(!S||typeof S!="object")&&(S={}),S=mn(S),tt=pt.indexOf(S.PARSER_MEDIA_TYPE)===-1?jt:S.PARSER_MEDIA_TYPE,je=tt==="application/xhtml+xml"?Gr:Na,H=Wn(S,"ALLOWED_TAGS",ne,{transform:je}),V=Wn(S,"ALLOWED_ATTR",W,{transform:je}),it=Wn(S,"ALLOWED_NAMESPACES",_t,{transform:Gr}),Dt=Wn(S,"ADD_URI_SAFE_ATTR",Bt,{transform:je,base:Bt}),at=Wn(S,"ADD_DATA_URI_TAGS",rt,{transform:je,base:rt}),yt=Wn(S,"FORBID_CONTENTS",Et,{transform:je}),xe=Wn(S,"FORBID_TAGS",mn({}),{transform:je}),be=Wn(S,"FORBID_ATTR",mn({}),{transform:je}),wt=rn(S,"USE_PROFILES")?S.USE_PROFILES&&typeof S.USE_PROFILES=="object"?mn(S.USE_PROFILES):S.USE_PROFILES:!1,ke=S.ALLOW_ARIA_ATTR!==!1,Le=S.ALLOW_DATA_ATTR!==!1,Me=S.ALLOW_UNKNOWN_PROTOCOLS||!1,le=S.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ve=S.SAFE_FOR_TEMPLATES||!1,$e=S.SAFE_FOR_XML!==!1,Ae=S.WHOLE_DOCUMENT||!1,et=S.RETURN_DOM||!1,gt=S.RETURN_DOM_FRAGMENT||!1,Se=S.RETURN_TRUSTED_TYPE||!1,st=S.FORCE_BODY||!1,Ge=S.SANITIZE_DOM!==!1,we=S.SANITIZE_NAMED_PROPS||!1,Ye=S.KEEP_CONTENT!==!1,mt=S.IN_PLACE||!1,X=f1(S.ALLOWED_URI_REGEXP)?S.ALLOWED_URI_REGEXP:bl,lt=typeof S.NAMESPACE=="string"?S.NAMESPACE:xt,St=Jr(S,"MATHML_TEXT_INTEGRATION_POINTS",()=>bt({},ut)),Te=Jr(S,"HTML_INTEGRATION_POINTS",()=>bt({},ue));const Q=Jr(S,"CUSTOM_ELEMENT_HANDLING",()=>ua(null));if(oe=ua(null),rn(Q,"tagNameCheck")&&ye(Q.tagNameCheck)&&(oe.tagNameCheck=Q.tagNameCheck),rn(Q,"attributeNameCheck")&&ye(Q.attributeNameCheck)&&(oe.attributeNameCheck=Q.attributeNameCheck),rn(Q,"allowCustomizedBuiltInElements")&&typeof Q.allowCustomizedBuiltInElements=="boolean"&&(oe.allowCustomizedBuiltInElements=Q.allowCustomizedBuiltInElements),Vt(oe),ve&&(Le=!1),gt&&(et=!0),wt&&(H=bt({},ml),V=ua(null),wt.html===!0&&(bt(H,hl),bt(V,Cl)),wt.svg===!0&&(bt(H,Kr),bt(V,Xr),bt(V,or)),wt.svgFilters===!0&&(bt(H,Yr),bt(V,Xr),bt(V,or)),wt.mathMl===!0&&(bt(H,Zr),bt(V,fl),bt(V,or))),me.tagCheck=null,me.attributeCheck=null,rn(S,"ADD_TAGS")&&(typeof S.ADD_TAGS=="function"?me.tagCheck=S.ADD_TAGS:ca(S.ADD_TAGS)&&(H===ne&&(H=mn(H)),bt(H,S.ADD_TAGS,je))),rn(S,"ADD_ATTR")&&(typeof S.ADD_ATTR=="function"?me.attributeCheck=S.ADD_ATTR:ca(S.ADD_ATTR)&&(V===W&&(V=mn(V)),bt(V,S.ADD_ATTR,je))),rn(S,"ADD_FORBID_CONTENTS")&&ca(S.ADD_FORBID_CONTENTS)&&(yt===Et&&(yt=mn(yt)),bt(yt,S.ADD_FORBID_CONTENTS,je)),Ye&&(H["#text"]=!0),Ae&&bt(H,["html","head","body"]),H.table&&(bt(H,["tbody"]),delete xe.tbody),S.TRUSTED_TYPES_POLICY){if(typeof S.TRUSTED_TYPES_POLICY.createHTML!="function")throw Xn('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof S.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Xn('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const Ce=E;E=S.TRUSTED_TYPES_POLICY;try{D=M("")}catch(Re){throw E=Ce,Re}}else S.TRUSTED_TYPES_POLICY===null?(E=void 0,D=""):(E===void 0&&(E=T()),E&&typeof D=="string"&&(D=M("")));Wt&&Wt(S),nt=S},Ke=bt({},[...Kr,...Yr,...b1]),vt=bt({},[...Zr,...g1]),Ue=function(S,Q,Ce){return Q.namespaceURI===xt?S==="svg":Q.namespaceURI===Lt?S==="svg"&&(Ce==="annotation-xml"||St[Ce]):!!Ke[S]},ht=function(S,Q,Ce){return Q.namespaceURI===xt?S==="math":Q.namespaceURI===It?S==="math"&&Te[Ce]:!!vt[S]},cn=function(S,Q,Ce){return Q.namespaceURI===It&&!Te[Ce]||Q.namespaceURI===Lt&&!St[Ce]?!1:!vt[S]&&(Ne[S]||!Ke[S])},dn=function(S){let Q=x(S);(!Q||!Q.tagName)&&(Q={namespaceURI:lt,tagName:"template"});const Ce=Na(S.tagName),Re=Na(Q.tagName);return it[S.namespaceURI]?S.namespaceURI===It?Ue(Ce,Q,Re):S.namespaceURI===Lt?ht(Ce,Q,Re):S.namespaceURI===xt?cn(Ce,Q,Re):!!(tt==="application/xhtml+xml"&&it[S.namespaceURI]):!1},zt=function(S){Aa(t.removed,{element:S});try{x(S).removeChild(S)}catch{if(v(S),!x(S))throw Xn("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},qt=function(S,Q,Ce){try{S.removeAttributeNode(Q)}catch{try{S.removeAttribute(Ce)}catch{}}},Ht=function(S){an(S);const Q=f(S);if(Q){const Re=[];Zn(Q,We=>{Aa(Re,We)}),Zn(Re,We=>{try{v(We)}catch{}})}const Ce=w(S);if(Ce)for(let Re=Ce.length-1;Re>=0;--Re){const We=Ce[Re],he=We&&We.name;typeof he=="string"&&qt(S,We,he)}},Nt=function(S,Q,Ce){if(!Ce)try{Ce=Q.getAttributeNode(S)}catch{Ce=null}Aa(t.removed,{attribute:Ce||null,from:Q});try{Ce?Q.removeAttributeNode(Ce):Q.removeAttribute(S)}catch{try{Q.removeAttribute(S)}catch{}}if(S==="is")if(et||gt)try{zt(Q)}catch{}else try{Q.setAttribute(S,"")}catch{}},An=function(S){const Q=w(S);if(Q)for(let Ce=Q.length-1;Ce>=0;--Ce){const Re=Q[Ce],We=Re&&Re.name;typeof We!="string"||V[je(We)]||qt(S,Re,We)}},an=function(S){const Q=[S];for(;Q.length>0;){const Ce=Q.pop();A(Ce)===Cn.element&&An(Ce);const We=f(Ce);if(We)for(let he=We.length-1;he>=0;--he)Q.push(We[he])}},$t=function(S,Q){return $e?S==="patchsrc"?!0:S==="for"&&Q!=="label"&&Q!=="output":!1},Pt=function(S){if(!$e)return;const Q=[S];for(;Q.length>0;){const Ce=Q.pop(),Re=A(Ce);if(Re===Cn.processingInstruction||Re===Cn.comment&&Xt(yl,Ce.data)){try{v(Ce)}catch{}continue}if(Re===Cn.element){const he=Ce,Pe=je(B(Ce));try{he.hasAttribute&&he.hasAttribute("patchsrc")&&he.removeAttribute("patchsrc"),he.hasAttribute&&he.hasAttribute("for")&&$t("for",Pe)&&he.removeAttribute("for")}catch{}}const We=f(Ce);if(We)for(let he=We.length-1;he>=0;--he)Q.push(We[he])}},Ut=function(S){let Q=null,Ce=null;if(st)S="<remove></remove>"+S;else{const he=ul(S,/^[\r\n\t ]+/);Ce=he&&he[0]}tt==="application/xhtml+xml"&&lt===xt&&(S='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+S+"</body></html>");const Re=E?M(S):S;if(lt===xt)try{Q=new h().parseFromString(Re,tt)}catch{}if(!Q||!Q.documentElement){Q=te.createDocument(lt,"template",null);try{Q.documentElement.innerHTML=Ct?D:Re}catch{}}const We=Q.body||Q.documentElement;return S&&Ce&&We.insertBefore(a.createTextNode(Ce),We.childNodes[0]||null),lt===xt?R.call(Q,Ae?"html":"body")[0]:Ae?Q.documentElement:We},Jt=function(S){const Q=_?_(S):S.ownerDocument;return I.call(Q||S,S,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},gn=function(S){return S=Ea(S,z," "),S=Ea(S,j," "),S=Ea(S,F," "),S},Zt=function(S){var Q;S.normalize();const Ce=_?_(S):S.ownerDocument,Re=I.call(Ce||S,S,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null);let We=Re.nextNode();for(;We;)We.data=gn(We.data),We=Re.nextNode();const he=(Q=S.querySelectorAll)===null||Q===void 0?void 0:Q.call(S,"template");he&&Zn(he,Pe=>{pn(Pe.content)&&Zt(Pe.content)})},xn=function(S){const Q=k?k(S):null;return typeof Q!="string"||je(Q)!=="form"?!1:typeof S.nodeName!="string"||typeof S.textContent!="string"||typeof S.removeChild!="function"||S.attributes!==w(S)||typeof S.removeAttribute!="function"||typeof S.setAttribute!="function"||typeof S.namespaceURI!="string"||typeof S.insertBefore!="function"||typeof S.hasChildNodes!="function"||S.nodeType!==y(S)||S.childNodes!==f(S)},pn=function(S){if(!y||typeof S!="object"||S===null)return!1;try{return y(S)===Cn.documentFragment}catch{return!1}},Qt=function(S){if(!y||typeof S!="object"||S===null)return!1;try{return typeof y(S)=="number"}catch{return!1}};function Gt(ge,S,Q){ge.length!==0&&Zn(ge,Ce=>{Ce.call(t,S,Q,nt)})}const Nn=function(S,Q){return!!($e&&S.hasChildNodes()&&!Qt(S.firstElementChild)&&Xt(gl,S.textContent)&&Xt(gl,S.innerHTML)||$e&&S.namespaceURI===xt&&S1[Q]&&(Qt(S.firstElementChild)||typeof S.textContent=="string"&&Xt(j1[Q],S.textContent))||S.nodeType===Cn.processingInstruction||$e&&S.nodeType===Cn.comment&&Xt(yl,S.data))},de=function(S,Q){if(S instanceof RegExp)return Xt(S,Q);if(S instanceof Function){for(var Ce=arguments.length,Re=new Array(Ce>2?Ce-2:0),We=2;We<Ce;We++)Re[We-2]=arguments[We];return!!S(Q,...Re)}return!1},Ee=function(S,Q,Ce){if(!xe[Q]&&De(Q)&&de(oe.tagNameCheck,Q))return!1;if(Ye&&!yt[Q]){const Re=x(S),We=f(S);if(We&&Re){const he=We.length;for(let Pe=he-1;Pe>=0;--Pe){const Qe=S===Ce?b(We[Pe],!0):We[Pe];Re.insertBefore(Qe,C(S))}}}return zt(S),!0},Fe=function(S,Q,Ce,Re){return S.length===0?Q:Q===Ce||Q===Re?mn(Q):Q},Ze=function(S,Q){return S===Q||x(S)!==null?!1:(mt&&an(S),!0)},Oe=function(S,Q){if(Gt(Z.beforeSanitizeElements,S,null),Ze(S,Q))return!0;if(xn(S))return zt(S),!0;const Ce=je(B(S));if(H=Fe(Z.uponSanitizeElement,H,ne,ze),Gt(Z.uponSanitizeElement,S,{tagName:Ce,allowedTags:H}),Ze(S,Q))return!0;if(Nn(S,Ce))return zt(S),!0;if(xe[Ce]||!(me.tagCheck instanceof Function&&me.tagCheck(Ce))&&!H[Ce]){const We=Ee(S,Ce,Q);return We===!1&&Gt(Z.afterSanitizeElements,S,null),We}if(A(S)===Cn.element&&!dn(S)||(Ce==="noscript"||Ce==="noembed"||Ce==="noframes")&&Xt(E1,S.innerHTML))return zt(S),!0;if(ve&&S.nodeType===Cn.text){const We=gn(S.textContent);S.textContent!==We&&(Aa(t.removed,{element:S.cloneNode()}),S.textContent=We)}return Gt(Z.afterSanitizeElements,S,null),!1},J=function(S,Q,Ce){if(be[Q]||$t(Q,S)||Ge&&(Q==="id"||Q==="name")&&(Ce in a||Ce in ae))return!1;const Re=V[Q]||me.attributeCheck instanceof Function&&me.attributeCheck(Q,S);return Le&&Xt(O,Q)||ke&&Xt(G,Q)?!0:Re?Dt[Q]||Xt(X,Ea(Ce,K,""))||(Q==="src"||Q==="xlink:href"||Q==="href")&&S!=="script"&&cl(Ce,"data:")===0&&at[S]||Me&&!Xt(ie,Ea(Ce,K,""))?!0:!Ce:De(S)&&de(oe.tagNameCheck,S)&&de(oe.attributeNameCheck,Q,S)||Q==="is"&&oe.allowCustomizedBuiltInElements&&de(oe.tagNameCheck,Ce)},ce=bt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),De=function(S){return!ce[Na(S)]&&Xt(pe,S)},Ve=function(S,Q,Ce,Re){if(E&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!Ce)switch(p.getAttributeType(S,Q)){case"TrustedHTML":return M(Re);case"TrustedScriptURL":return P(Re)}return Re},Xe=function(S,Q,Ce,Re){try{Ce?S.setAttributeNS(Ce,Q,Re):S.setAttribute(Q,Re),xn(S)?zt(S):il(t.removed)}catch{Nt(Q,S)}},Je=function(S){Gt(Z.beforeSanitizeAttributes,S,null);const Q=S.attributes;if(!Q||xn(S))return;V=Fe(Z.uponSanitizeAttribute,V,W,dt);const Ce={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:V,forceKeepAttr:void 0};let Re=Q.length;const We=je(S.nodeName);for(;Re--;){const he=Q[Re],Pe=he.name,Qe=he.namespaceURI,kt=he.value,Tt=je(Pe),zr=kt;let en=Pe==="value"?zr:c1(zr);if(Ce.attrName=Tt,Ce.attrValue=en,Ce.keepAttr=!0,Ce.forceKeepAttr=void 0,Gt(Z.uponSanitizeAttribute,S,Ce),en=Ce.attrValue,we&&(Tt==="id"||Tt==="name")&&cl(en,qe)!==0&&(Nt(Pe,S,he),en=qe+en),$e&&Xt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,en)){Nt(Pe,S,he);continue}if(Tt==="attributename"&&ul(en,"href")){Nt(Pe,S,he);continue}if(!Ce.forceKeepAttr){if(!Ce.keepAttr){Nt(Pe,S,he);continue}if(!le&&Xt(D1,en)){Nt(Pe,S,he);continue}if(ve&&(en=gn(en)),!J(We,Tt,en)){Nt(Pe,S,he);continue}en=Ve(We,Tt,Qe,en),en!==zr&&Xe(S,Pe,Qe,en)}}Gt(Z.afterSanitizeAttributes,S,null)},ct=function(S){let Q=null;const Ce=Jt(S);for(Gt(Z.beforeSanitizeShadowDOM,S,null);Q=Ce.nextNode();)if(Gt(Z.uponSanitizeShadowNode,Q,null),Oe(Q,S),Je(Q),pn(Q.content)&&ct(Q.content),A(Q)===Cn.element){const Re=g(Q);pn(Re)&&(ft(Re),ct(Re))}Gt(Z.afterSanitizeShadowDOM,S,null)},ft=function(S){const Q=[{node:S,shadow:null}];for(;Q.length>0;){const Ce=Q.pop();if(Ce.shadow){ct(Ce.shadow);continue}const Re=Ce.node,he=A(Re)===Cn.element,Pe=f(Re);if(Pe)for(let Qe=Pe.length-1;Qe>=0;--Qe)Q.push({node:Pe[Qe],shadow:null});if(he){const Qe=k?k(Re):null;if(typeof Qe=="string"&&je(Qe)==="template"){const kt=Re.content;pn(kt)&&Q.push({node:kt,shadow:null})}}if(he){const Qe=g(Re);pn(Qe)&&Q.push({node:null,shadow:Qe},{node:Qe,shadow:null})}}};return t.sanitize=function(ge){let S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Q=null,Ce=null,Re=null,We=null;if(Ct=!ge,Ct&&(ge="<!-->"),typeof ge!="string"&&!Qt(ge)&&(ge=C1(ge),typeof ge!="string"))throw Xn("dirty is not a string, aborting");if(!t.isSupported)return ge;Ie?(H=ze,V=dt):He(S),(Z.uponSanitizeElement.length>0||Z.uponSanitizeAttribute.length>0)&&(H=mn(H)),Z.uponSanitizeAttribute.length>0&&(V=mn(V)),t.removed=[];const he=mt&&typeof ge!="string"&&Qt(ge);if(he){Pt(ge);const kt=B(ge);if(typeof kt=="string"){const Tt=je(kt);if(!H[Tt]||xe[Tt])throw Ht(ge),Xn("root node is forbidden and cannot be sanitized in-place")}if(xn(ge))throw Ht(ge),Xn("root node is clobbered and cannot be sanitized in-place");try{ft(ge)}catch(Tt){throw Ht(ge),Tt}}else if(Qt(ge))Q=Ut("<!---->"),Ce=Q.ownerDocument.importNode(ge,!0),Ce.nodeType===Cn.element&&Ce.nodeName==="BODY"||Ce.nodeName==="HTML"?Q=Ce:Q.appendChild(Ce),ft(Ce);else{if(!et&&!ve&&!Ae&&ge.indexOf("<")===-1)return E&&Se?M(ge):ge;if(Q=Ut(ge),!Q)return et?null:Se?D:""}Q&&st&&zt(Q.firstChild);const Pe=he?ge:Q;try{const kt=Jt(Pe);for(;Re=kt.nextNode();)Oe(Re,Pe),Je(Re),pn(Re.content)&&ct(Re.content)}catch(kt){throw he&&(Ht(ge),Zn(t.removed,Tt=>{Tt.element&&an(Tt.element)})),kt}if(he)return Zn(t.removed,kt=>{kt.element&&an(kt.element)}),ve&&Zt(ge),ge;if(et){if(ve&&Zt(Q),gt)for(We=Y.call(Q.ownerDocument);Q.firstChild;)We.appendChild(Q.firstChild);else We=Q;return(V.shadowroot||V.shadowrootmode)&&(We=q.call(r,We,!0)),We}let Qe=Ae?Q.outerHTML:Q.innerHTML;return Ae&&H["!doctype"]&&Q.ownerDocument&&Q.ownerDocument.doctype&&Q.ownerDocument.doctype.name&&Xt(A1,Q.ownerDocument.doctype.name)&&(Qe="<!DOCTYPE "+Q.ownerDocument.doctype.name+`>
798
798
  `+Qe),ve&&(Qe=gn(Qe)),E&&Se?M(Qe):Qe},t.setConfig=function(){let ge=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};He(ge),Ie=!0,ze=H,dt=V},t.clearConfig=function(){nt=null,Ie=!1,ze=null,dt=null,E=N,D=""},t.isValidAttribute=function(ge,S,Q){nt||He({});const Ce=je(ge),Re=je(S);return J(Ce,Re,Q)},t.addHook=function(ge,S){typeof S=="function"&&rn(Z,ge)&&Aa(Z[ge],S)},t.removeHook=function(ge,S){if(rn(Z,ge)){if(S!==void 0){const Q=i1(Z[ge],S);return Q===-1?void 0:u1(Z[ge],Q,1)[0]}return il(Z[ge])}},t.removeHooks=function(ge){rn(Z,ge)&&(Z[ge]=[])},t.removeAllHooks=function(){Z=_l()},t}var da=xl();let Qr=null;const L1=1500;function eo(){Qr?.clear(),Qr=null}function $1(e,{onEnd:t,rate:a=.9}={}){if(typeof window>"u"||typeof SpeechSynthesisUtterance>"u"||!("speechSynthesis"in window)){t?.();return}const r=window.speechSynthesis;eo();let s=!1;const l=()=>{if(!s){s=!0;try{t?.()}catch{}}};try{r.cancel()}catch{l();return}const i=()=>{eo();try{r.cancel();const d=new SpeechSynthesisUtterance(e),h=r.getVoices().find(p=>p.lang.startsWith("ko"));h&&(d.voice=h),d.rate=a,d.onend=t?l:null,d.onerror=t?l:null,r.speak(d)}catch{l()}};let u;try{u=r.getVoices()}catch{l();return}if(u.length>0){i();return}const c=setTimeout(i,L1);try{r.addEventListener("voiceschanged",i,{once:!0})}catch{clearTimeout(c),l();return}Qr={clear:()=>{clearTimeout(c),r.removeEventListener("voiceschanged",i)}}}function to(){eo(),typeof window<"u"&&"speechSynthesis"in window&&window.speechSynthesis.cancel()}const R1=/^(?:[a-z]+:)?\/\//i,P1="__ihab_core_asset_base_url__";function F1(){return globalThis[P1]??""}function no(e){const t=String(e||"").trim();if(!t)return"";if(R1.test(t)||t.startsWith("data:")||t.startsWith("blob:"))return t;const a=t.startsWith("/")?t:`/${t}`,r=F1();return r?`${r}${a}`:a}const wl="__ihab_core_storage_resolvers__";function Sa(){return globalThis[wl]??null}function I1(e){globalThis[wl]=e}let Bl=class extends Error{constructor(t){super(`
799
799
  [ihabdevteam-core] ${t}() \uD638\uCD9C \uC2E4\uD328 \u2014 configureStorage()\uAC00 \uC124\uC815\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
800
800
 
@@ -815,20 +815,20 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
815
815
  npm install @supabase/supabase-js
816
816
  pnpm add @supabase/supabase-js
817
817
  `),this.name="StorageNotConfiguredError"}};function O1(e){I1(e)}function kl(e,t){if(!e)return null;const a=Sa();return a?.resolvePath?a.resolvePath(e,t):t?`${t}/${e}.mp3`:null}async function Al(e){if(!e)return null;const t=Sa();if(!t)throw new Bl("getSignedOrPublicUrl");try{return await t.resolveUrl(e)}catch{return null}}async function Nl(e){const t=Sa();if(!t)throw new Bl("downloadSound");return t.download(e)}function z1(){return Sa()?.noiseBaseUrl??"/sounds/noise"}function W1(){const e=Number(Sa()?.noiseFileGain);return Number.isFinite(e)&&e>0?e:1}function H1(e){const t=AbortSignal.timeout;if(typeof t=="function")return t.call(AbortSignal,e);const a=new AbortController;return setTimeout(()=>a.abort(),e),a.signal}function V1(e){return e===400||e===404||e===410}const El="__ihab_core_tts_config__";function ja(){return globalThis[El]?.urlResolver??null}function sr(){return globalThis[El]?.fallbackUrlResolver??null}const q1="__ihab_core_pronunciation_resolver__";function U1(){return globalThis[q1]??null}let Hn=null;const Ta=new WeakMap,ao=new WeakMap,ro=new WeakMap;let Dl=!1;const Sl=e=>Math.max(0,Math.min(1,Number.isFinite(e)?e:0));function G1(){if(Dl||typeof document>"u")return;Dl=!0;const e=()=>{try{Hn&&Hn.state!=="running"&&Hn.resume()}catch{}};for(const t of["pointerdown","touchend","keydown"])document.addEventListener(t,e,{capture:!0,passive:!0})}function jl(){if(Hn)return Hn;try{const e=window.AudioContext||window.webkitAudioContext;return e?(Hn=new e,G1(),Hn):null}catch{return null}}function oo(){try{Hn?.resume()}catch{}}function so(e,t){const a=Ta.get(t);if(a)return a;try{const r=e.createMediaElementSource(t),s=e.createGain(),l=e.createAnalyser();l.fftSize=1024,l.smoothingTimeConstant=.6,s.gain.value=Sl(ao.get(t)??t.volume),r.connect(s),s.connect(l),s.connect(e.destination);try{t.volume=1}catch{}const i={gain:s,analyser:l};return Ta.set(t,i),i}catch{return null}}function lr(e){if(!e)return Promise.resolve(null);const t=Ta.get(e);if(t)return Promise.resolve(t.analyser);const a=jl();if(!a)return Promise.resolve(null);if(a.state==="running")return Promise.resolve(so(a,e)?.analyser??null);const r=ro.get(e);if(r)return r;const s=Promise.resolve().then(()=>a.resume()).then(()=>a.state==="running"?so(a,e)?.analyser??null:null).catch(()=>null).finally(()=>{ro.delete(e)});return ro.set(e,s),s}function K1(e){if(!e)return null;const t=Ta.get(e);if(t)return t.analyser;const a=jl();return a?a.state==="running"?so(a,e)?.analyser??null:(lr(e),null):null}function Vn(e,t){const a=Sl(t);ao.set(e,a);const r=Ta.get(e);if(r){try{e.volume!==1&&(e.volume=1)}catch{}const s=r.gain.gain;try{const l=r.gain.context.currentTime;s.cancelScheduledValues(l),s.setTargetAtTime(a,l,.01)}catch{try{s.value=a}catch{}}return"gain"}try{e.volume=a}catch{}return"element"}function ir(e){return ao.get(e)??e.volume}function Y1(e,t){e.getFloatTimeDomainData(t);let a=0;for(let r=0;r<t.length;r++){const s=t[r];a+=s*s}return Math.sqrt(a/t.length)}const Z1="__ihab_core_image_config__";function pa(){return globalThis[Z1]??null}const Tl="word_image_existence_map_v1",X1="ihab:image-existence-updated";let Ma=null;function J1(){Ma!==null&&(clearTimeout(Ma),Ma=null),typeof window<"u"&&window.dispatchEvent(new Event(X1))}function Q1(){Ma===null&&(Ma=setTimeout(J1,200))}let Jn=null,lo=0;const La=new Map;function ef(){if(Jn)return Jn;try{const e=typeof localStorage<"u"?localStorage.getItem(Tl):null,t=e?JSON.parse(e):null,a={};if(t&&typeof t=="object"&&!Array.isArray(t))for(const[r,s]of Object.entries(t))typeof s=="boolean"&&(a[r]=s);Jn=a}catch{Jn={}}return Jn}let io=null;function tf(){io===null&&(io=setTimeout(()=>{io=null;try{typeof localStorage<"u"&&Jn&&localStorage.setItem(Tl,JSON.stringify(Jn))}catch{}},200))}function nf(e,t){return`${e}_${t??1}`}async function af(e,t,a=!1){const r=ef(),s=nf(e,t);if(!a&&s in r)return r[s];if(!a&&La.has(s))return La.get(s);const l=pa();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:H1(8e3)})}catch{return!1}const c=u.then(d=>d.ok?!0:V1(d.status)?!1:null,()=>null).then(d=>La.get(s)!==c?d??!1:(La.delete(s),d===null?!1:(r[s]=d,lo++,tf(),d)));return La.set(s,c),c}async function Ml(e,t){const a=lo,r=await af(e,t);return lo!==a&&Q1(),r}const Ll=90;function $l(e){let t=0;for(const a of e){const r=a.codePointAt(0)??0;a===`
818
- `||a==="\r"?t+=2:t+=r<128?1:2}return t}function rf(e){return $l(e)>90?"LMS":"SMS"}function Rl(e,t=85){const a=$l(e),r=rf(e),s=r==="SMS"?90:2e3,l=typeof t=="number"?t:null;return{bytes:a,type:r,limit:s,over:a>s,target:l,overTarget:l!==null&&a>l}}const of=["onset","vowel","coda","glide"],Pl="none",sf={\uCD08\uC131:"onset",\uBAA8\uC74C:"vowel",\uC885\uC131:"coda",\uD65C\uC74C:"glide"},lf="\uC5C6\uC74C";function uf(e){return of.includes(e)}function cf(e){const t={};for(const[a,r]of Object.entries(e)){const s=uf(a)?a:sf[a];s&&(t[s]=r===lf?Pl:r)}return t}const df={\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"}},Fl=["\u3131","\u3132","\u3134","\u3137","\u3138","\u3139","\u3141","\u3142","\u3143","\u3145","\u3146","\u3147","\u3148","\u3149","\u314A","\u314B","\u314C","\u314D","\u314E"],Il=["\u314F","\u3150","\u3151","\u3152","\u3153","\u3154","\u3155","\u3156","\u3157","\u3158","\u3159","\u315A","\u315B","\u315C","\u315D","\u315E","\u315F","\u3160","\u3161","\u3162","\u3163"],pf=["","\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 $a(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 hf(e){const t=$a(e[0]||"");return t?Fl[t.cho]:""}function mf(e){if(!e)return()=>!0;e=e.normalize("NFC");const t=[...e],a=i=>Fl.includes(i),r=i=>Il.includes(i),s=t.map(i=>a(i)?"cho":r(i)?"jung":$a(i)?"syl":"other"),l=t.map(i=>$a(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 d=!0;for(let h=0;h<t.length;h++){const p=u[c+h],m=s[h];if(m==="cho"){if(hf(p)!==t[h]){d=!1;break}}else if(m==="jung"){const g=$a(p);if(!g||Il[g.jung]!==t[h]){d=!1;break}}else{const g=l[h];if(g&&g.jong===0){const y=$a(p);if(!y||y.cho!==g.cho||y.jung!==g.jung){d=!1;break}}else if(p!==t[h]){d=!1;break}}}if(d)return!0}return!1}}const Cf={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(Cf).map(([e,t])=>[t.join(""),pf[Number(e)]]));const ff="word_pair_index_v2",bf="word_pair_index_sig_v2";let ur=null;function gf(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 a=t;for(const r of["cho","jung","jong"])if(!Array.isArray(a[r])||!a[r].every(s=>typeof s=="string"))return!1}return!0}function yf(){try{if(typeof localStorage>"u")return null;const e=localStorage.getItem(ff),t=localStorage.getItem(bf);if(!e||!t)return null;const a=JSON.parse(e);return gf(a)?{index:a,sig:t}:null}catch{return null}}function vf(){if(ur)return ur;const e=yf();return e?(ur=e.index,e.sig,ur):null}function _f(e,t,a){return!(e>0)||!(t>0)?1:Math.max(1,Math.floor((e+a)/(t+a)))}function xf(e,t){if(!(e>0))return 1;const a=Math.max(1,Math.floor(t));if(e<=a)return e;const r=Math.ceil(e/a);return Math.max(1,Math.ceil(e/r))}const uo=/[ㄱ-ㅎ]/,wf=/[ㅏ-ㅣ]/;function Ol(e){e=e.normalize("NFC");for(let t=e.length-1;t>=0;t--){const a=e[t],r=a.charCodeAt(0);if(r>=44032&&r<=55203||uo.test(a)||wf.test(a))return a}return null}function Bf(e){const t=Ol(e);if(!t)return"\uAC00";const a=t.charCodeAt(0);return a>=44032&&a<=55203?(a-44032)%28!==0?"\uC774":"\uAC00":uo.test(t)?"\uC774":"\uAC00"}function kf(e){return`${e}${Bf(e)}`}function Af(e){const t=Ol(e);if(!t)return"\uB97C";const a=t.charCodeAt(0);return a>=44032&&a<=55203?(a-44032)%28!==0?"\uC744":"\uB97C":uo.test(t)?"\uC744":"\uB97C"}function Nf(e){return`${e}${Af(e)}`}function Ef(e,t,a){const r=e.slice(),[s]=r.splice(t,1);return r.splice(a,0,s),r}function Ra(e,t=Math.random){const a=e.slice();for(let r=a.length-1;r>0;r--){const s=Math.floor(t()*(r+1));[a[r],a[s]]=[a[s],a[r]]}return a}const Df=()=>{const e="\uC54C \uC218 \uC5C6\uB294 \uC624\uB958",t=typeof Kt?.t=="function"?Kt.t("common.unknownError",{defaultValue:e}):void 0;return typeof t=="string"&&t?t:e};function zl(e,t){if(t===void 0&&(t=Df()),e instanceof Error)return e.message||t;if(typeof e=="string")return e||t;if(e&&typeof e=="object"){const a=e;for(const r of[a.message,a.error_description,a.error])if(typeof r=="string"&&r)return r}return t}const Sf="__ihab_core_word_pool__";function Wl(){return globalThis[Sf]??null}const Hl=globalThis;function Vl(e,t){const a=r=>{};try{const r=t();r&&typeof r.catch=="function"&&r.catch(a)}catch(r){a(r)}}function jf(e){Vl("time",()=>Hl.__ihabTrainingTimeLogger?.(e))}function Tf(e){Vl("completion",()=>Hl.__ihabTrainingCompletionLogger?.(e))}const Mf="Asia/Seoul",Lf=/^(\d{4}-\d{2}-\d{2})[T ](\d{2}:\d{2})(?::(\d{2})(?:\.(\d+))?)?$/;function Pa(e){let t;if(e instanceof Date)t=e;else if(typeof e=="string"){const a=e.trim(),r=/^(\d{4}-\d{2}-\d{2})(?:$|[T ])/.exec(a)?.[1];if(r){const l=new Date(`${r}T00:00:00Z`);if(Number.isNaN(l.getTime())||l.toISOString().slice(0,10)!==r)return null}const s=Lf.exec(a);t=new Date(s?`${s[1]}T${s[2]}:${s[3]??"00"}${s[4]?`.${s[4].slice(0,3).padEnd(3,"0")}`:""}+09:00`:a)}else t=new Date(e);return Number.isNaN(t.getTime())?null:t}function $f(e){return Pa(e)!==null}const Rf=e=>Pa(e);function ql(e,t){const a=t.startsWith("ko")?"ko-KR":"en-US",r=Rf(e);return r?r.toLocaleDateString(a,{timeZone:Mf,year:"numeric",month:"short",day:"numeric"}):""}function Ul(e){return e&&e.startsWith("ko")?"ko-KR":e||"en-US"}function Pf(e,t,a){return!Number.isFinite(e)||!Number.isFinite(t)||t<1||t>12?`${e}-${t}`:new Intl.DateTimeFormat(Ul(a),{year:"numeric",month:"long"}).format(new Date(e,t-1,1))}function co(e,t,a,r){return e("calendar.yearMonth",{year:a,month:r,defaultValue:""})||Pf(a,r,t)}function Fa(){return po(new Date)}function cr(e){return e&&/^\d{4}-\d{2}-\d{2}$/.test(e)&&Pa(e)?.toISOString().slice(0,10)===e?e:Fa()}function ha(){return If(Fa())}const Ff=540*60*1e3;function Gl(e,t,a){return new Date(Date.UTC(e,t,a)-Ff)}function If(e){const[t,a,r]=e.split("-").map(Number);return new Date(t,(a||1)-1,r||1)}function po(e){if(e==null||e==="")return"";const t=Pa(e);return t?new Intl.DateTimeFormat("fr-CA",{timeZone:"Asia/Seoul"}).format(t):""}function Kl(e,t){if(!e)return"";const a=Pa(e);if(!a)return"";const r=a.getTime(),s=Math.max(0,Math.floor((Date.now()-r)/1e3)),l=Math.floor(s/60),i=Math.floor(l/60),u=Math.floor(i/24),c=Math.floor(u/7),d=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(d,11)}):t("store.time.yearsAgo",{n:h})}function Yl(e,t={}){const{sep:a=".",pad:r=!0,trailingDot:s=!1,fallback:l="\u2014"}=t;if(!e)return l;const i=po(e instanceof Date?e:String(e));if(!i)return l;const[u,c,d]=i.split("-"),h=r?c:String(Number(c)),p=r?d:String(Number(d));return`${u}${a}${h}${a}${p}${s?".":""}`}function dr(e){if(typeof e=="string"){const t=e.trim();return t&&$f(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 on(e){return typeof e=="string"?e.trim()||null:typeof e=="number"?String(e):null}function Of(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 zf(e){return Array.isArray(e)?e.map((t,a)=>{const r=t??{};return{index:a,itemId:on(r.contextCode)??on(r.itemId)??on(r.itemCode)??on(r.id),question:on(r.question)??on(r.q)??on(r.sentence)??on(r.text)??on(r.prompt)??on(r.word)??on(r.targetSyllable),answer:on(r.answer),selected:on(r.selectedText)??on(r.selected),correct:Of(r),shownAt:dr(r.shownAt)??dr(r.shown_at),answeredAt:dr(r.answeredAt)??dr(r.answered_at)}}):[]}const ho=globalThis;async function Wf(){try{return await ho.__ihabNoiseSettingsStore?.load()??null}catch{return null}}function mo(e){const t=a=>{};try{const a=ho.__ihabNoiseSettingsStore?.save(e);a&&typeof a.catch=="function"&&a.catch(t)}catch(a){t(a)}}function pr(e){try{ho.__ihabNoiseSettingsStore?.applied?.(e)}catch{}}async function Hf(e){if(typeof document<"u"){const t=document.activeElement;let a=null;try{if(a=document.createElement("textarea"),a.value=e,a.setAttribute("readonly",""),a.style.position="fixed",a.style.top="0",a.style.left="0",a.style.opacity="0",a.style.pointerEvents="none",document.body.appendChild(a),a.focus(),a.select(),a.setSelectionRange(0,e.length),document.execCommand("copy"))return!0}catch{}finally{if(a?.parentNode&&a.parentNode.removeChild(a),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 ma(e){if(!e)return e;const t=e.trim();return/^[₩$]/.test(t)?t:/원\s*$/.test(t)?"\u20A9"+t.replace(/\s*원\s*$/,"").trim():t}function Zl(e,t){if(!e)return"-";const a=/^(\d{1,2}):(\d{2})$/.exec(e.trim());if(!a)return e;const r=Number(a[1]),s=Number(a[2]),l=a[1].padStart(2,"0");return s===0?t("date.timeH",{h:r,hh:l,mm:a[2]}):t("date.timeHM",{h:r,hh:l,m:s,mm:a[2]})}function Co(e){return(e??0).toLocaleString("ko-KR")}const Vf=[{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"}]}],qf=[{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 Xl(){return Vf}function Uf(){return qf}const Gf=[],Kf=[],Yf=[],Zf=[];function Xf(){return{LISTEN_IN_NOISE:Gf,SHORT_STORY:Kf,LONG_STORY:Yf,ORDERING_SENTENCE:Zf}}const Jf=[{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."}],Jl={LISTEN_IN_NOISE:"listenInNoise",SHORT_STORY:"shortStory",LONG_STORY:"longStory",ORDERING_SENTENCE:"orderingSentence"};function Qf(e){return Jf.map(t=>{const a=Jl[t.key];return a?{...t,label:e(`trainingType.${a}.title`),desc:e(`trainingType.${a}.desc`)}:t})}var eb={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."},tb={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"],weekLabel:"{{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"},nb={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"}},ab={starLabel:"{{n}}\uBC88\uC9F8 \uBCC4 \uC120\uD0DD",valueLabel:"{{max}}\uC810 \uB9CC\uC810\uC5D0 {{value}}\uC810",groupLabel:"\uBCC4\uC810"},rb={selected:"\uC120\uD0DD\uB428"},ob={placeholder:"\uC120\uD0DD"},sb={collapse:"\uC811\uAE30",expand:"\uD3BC\uCE58\uAE30"},lb={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"},ib={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"},ub={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"}}}},cb={couponButton:"\uCFE0\uD3F0 \uC785\uB825"},db={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."}}},pb={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:"\uB4F1\uAE09",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",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"}},hb={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"}}},mb={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"}}}},Cb={input:{label:"\uCFE0\uD3F0 \uCF54\uB4DC",placeholder:"\uCFE0\uD3F0 \uCF54\uB4DC \uC785\uB825"},applyButton:"\uC801\uC6A9"},fb={showN:"{{n}}\uAC1C\uC529"},bb={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."}},gb={newBadge:"\uC0C8\uB85C \uB9CC\uB4E0 \uD45C",publishedBadge:"\uBC1C\uD589\uB428",sharedBadge:"\uACF5\uC720 \uC911"},yb={title:"\uC8FC\uC694 \uB2E8\uC5B4",empty:"\uCD94\uCD9C\uB41C \uC8FC\uC694 \uB2E8\uC5B4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."},vb={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"},_b={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",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.",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"},xb={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"},wb={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"}},Bb={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"}},kb={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"}},Ab={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."]},Nb={lead:`\uC544\uC774\uD574\uBE0C\uB294 \uC18C\uB9AC\uB97C \uD1B5\uD574
818
+ `||a==="\r"?t+=2:t+=r<128?1:2}return t}function rf(e){return $l(e)>90?"LMS":"SMS"}function Rl(e,t=85){const a=$l(e),r=rf(e),s=r==="SMS"?90:2e3,l=typeof t=="number"?t:null;return{bytes:a,type:r,limit:s,over:a>s,target:l,overTarget:l!==null&&a>l}}const of=["onset","vowel","coda","glide"],Pl="none",sf={\uCD08\uC131:"onset",\uBAA8\uC74C:"vowel",\uC885\uC131:"coda",\uD65C\uC74C:"glide"},lf="\uC5C6\uC74C";function uf(e){return of.includes(e)}function cf(e){const t={};for(const[a,r]of Object.entries(e)){const s=uf(a)?a:sf[a];s&&(t[s]=r===lf?Pl:r)}return t}const df={\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"}},Fl=["\u3131","\u3132","\u3134","\u3137","\u3138","\u3139","\u3141","\u3142","\u3143","\u3145","\u3146","\u3147","\u3148","\u3149","\u314A","\u314B","\u314C","\u314D","\u314E"],Il=["\u314F","\u3150","\u3151","\u3152","\u3153","\u3154","\u3155","\u3156","\u3157","\u3158","\u3159","\u315A","\u315B","\u315C","\u315D","\u315E","\u315F","\u3160","\u3161","\u3162","\u3163"],pf=["","\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 $a(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 hf(e){const t=$a(e[0]||"");return t?Fl[t.cho]:""}function mf(e){if(!e)return()=>!0;e=e.normalize("NFC");const t=[...e],a=i=>Fl.includes(i),r=i=>Il.includes(i),s=t.map(i=>a(i)?"cho":r(i)?"jung":$a(i)?"syl":"other"),l=t.map(i=>$a(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 d=!0;for(let h=0;h<t.length;h++){const p=u[c+h],m=s[h];if(m==="cho"){if(hf(p)!==t[h]){d=!1;break}}else if(m==="jung"){const b=$a(p);if(!b||Il[b.jung]!==t[h]){d=!1;break}}else{const b=l[h];if(b&&b.jong===0){const v=$a(p);if(!v||v.cho!==b.cho||v.jung!==b.jung){d=!1;break}}else if(p!==t[h]){d=!1;break}}}if(d)return!0}return!1}}const Cf={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(Cf).map(([e,t])=>[t.join(""),pf[Number(e)]]));const ff="word_pair_index_v2",bf="word_pair_index_sig_v2";let ur=null;function gf(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 a=t;for(const r of["cho","jung","jong"])if(!Array.isArray(a[r])||!a[r].every(s=>typeof s=="string"))return!1}return!0}function yf(){try{if(typeof localStorage>"u")return null;const e=localStorage.getItem(ff),t=localStorage.getItem(bf);if(!e||!t)return null;const a=JSON.parse(e);return gf(a)?{index:a,sig:t}:null}catch{return null}}function vf(){if(ur)return ur;const e=yf();return e?(ur=e.index,e.sig,ur):null}function _f(e,t,a){return!(e>0)||!(t>0)?1:Math.max(1,Math.floor((e+a)/(t+a)))}function xf(e,t){if(!(e>0))return 1;const a=Math.max(1,Math.floor(t));if(e<=a)return e;const r=Math.ceil(e/a);return Math.max(1,Math.ceil(e/r))}const uo=/[ㄱ-ㅎ]/,wf=/[ㅏ-ㅣ]/;function Ol(e){e=e.normalize("NFC");for(let t=e.length-1;t>=0;t--){const a=e[t],r=a.charCodeAt(0);if(r>=44032&&r<=55203||uo.test(a)||wf.test(a))return a}return null}function Bf(e){const t=Ol(e);if(!t)return"\uAC00";const a=t.charCodeAt(0);return a>=44032&&a<=55203?(a-44032)%28!==0?"\uC774":"\uAC00":uo.test(t)?"\uC774":"\uAC00"}function kf(e){return`${e}${Bf(e)}`}function Af(e){const t=Ol(e);if(!t)return"\uB97C";const a=t.charCodeAt(0);return a>=44032&&a<=55203?(a-44032)%28!==0?"\uC744":"\uB97C":uo.test(t)?"\uC744":"\uB97C"}function Nf(e){return`${e}${Af(e)}`}function Ef(e,t,a){const r=e.slice(),[s]=r.splice(t,1);return r.splice(a,0,s),r}function Ra(e,t=Math.random){const a=e.slice();for(let r=a.length-1;r>0;r--){const s=Math.floor(t()*(r+1));[a[r],a[s]]=[a[s],a[r]]}return a}const Df=()=>{const e="\uC54C \uC218 \uC5C6\uB294 \uC624\uB958",t=typeof Kt?.t=="function"?Kt.t("common.unknownError",{defaultValue:e}):void 0;return typeof t=="string"&&t?t:e};function zl(e,t){if(t===void 0&&(t=Df()),e instanceof Error)return e.message||t;if(typeof e=="string")return e||t;if(e&&typeof e=="object"){const a=e;for(const r of[a.message,a.error_description,a.error])if(typeof r=="string"&&r)return r}return t}const Sf="__ihab_core_word_pool__";function Wl(){return globalThis[Sf]??null}const Hl=globalThis;function Vl(e,t){const a=r=>{};try{const r=t();r&&typeof r.catch=="function"&&r.catch(a)}catch(r){a(r)}}function jf(e){Vl("time",()=>Hl.__ihabTrainingTimeLogger?.(e))}function Tf(e){Vl("completion",()=>Hl.__ihabTrainingCompletionLogger?.(e))}const Mf="Asia/Seoul",Lf=/^(\d{4}-\d{2}-\d{2})[T ](\d{2}:\d{2})(?::(\d{2})(?:\.(\d+))?)?$/;function Pa(e){let t;if(e instanceof Date)t=e;else if(typeof e=="string"){const a=e.trim(),r=/^(\d{4}-\d{2}-\d{2})(?:$|[T ])/.exec(a)?.[1];if(r){const l=new Date(`${r}T00:00:00Z`);if(Number.isNaN(l.getTime())||l.toISOString().slice(0,10)!==r)return null}const s=Lf.exec(a);t=new Date(s?`${s[1]}T${s[2]}:${s[3]??"00"}${s[4]?`.${s[4].slice(0,3).padEnd(3,"0")}`:""}+09:00`:a)}else t=new Date(e);return Number.isNaN(t.getTime())?null:t}function $f(e){return Pa(e)!==null}const Rf=e=>Pa(e);function ql(e,t){const a=t.startsWith("ko")?"ko-KR":"en-US",r=Rf(e);return r?r.toLocaleDateString(a,{timeZone:Mf,year:"numeric",month:"short",day:"numeric"}):""}function Ul(e){return e&&e.startsWith("ko")?"ko-KR":e||"en-US"}function Pf(e,t,a){return!Number.isFinite(e)||!Number.isFinite(t)||t<1||t>12?`${e}-${t}`:new Intl.DateTimeFormat(Ul(a),{year:"numeric",month:"long"}).format(new Date(e,t-1,1))}function co(e,t,a,r){return e("calendar.yearMonth",{year:a,month:r,defaultValue:""})||Pf(a,r,t)}function Fa(){return po(new Date)}function cr(e){return e&&/^\d{4}-\d{2}-\d{2}$/.test(e)&&Pa(e)?.toISOString().slice(0,10)===e?e:Fa()}function ha(){return If(Fa())}const Ff=540*60*1e3;function Gl(e,t,a){return new Date(Date.UTC(e,t,a)-Ff)}function If(e){const[t,a,r]=e.split("-").map(Number);return new Date(t,(a||1)-1,r||1)}function po(e){if(e==null||e==="")return"";const t=Pa(e);return t?new Intl.DateTimeFormat("fr-CA",{timeZone:"Asia/Seoul"}).format(t):""}function Kl(e,t){if(!e)return"";const a=Pa(e);if(!a)return"";const r=a.getTime(),s=Math.max(0,Math.floor((Date.now()-r)/1e3)),l=Math.floor(s/60),i=Math.floor(l/60),u=Math.floor(i/24),c=Math.floor(u/7),d=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(d,11)}):t("store.time.yearsAgo",{n:h})}function Yl(e,t={}){const{sep:a=".",pad:r=!0,trailingDot:s=!1,fallback:l="\u2014"}=t;if(!e)return l;const i=po(e instanceof Date?e:String(e));if(!i)return l;const[u,c,d]=i.split("-"),h=r?c:String(Number(c)),p=r?d:String(Number(d));return`${u}${a}${h}${a}${p}${s?".":""}`}function dr(e){if(typeof e=="string"){const t=e.trim();return t&&$f(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 on(e){return typeof e=="string"?e.trim()||null:typeof e=="number"?String(e):null}function Of(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 zf(e){return Array.isArray(e)?e.map((t,a)=>{const r=t??{};return{index:a,itemId:on(r.contextCode)??on(r.itemId)??on(r.itemCode)??on(r.id),question:on(r.question)??on(r.q)??on(r.sentence)??on(r.text)??on(r.prompt)??on(r.word)??on(r.targetSyllable),answer:on(r.answer),selected:on(r.selectedText)??on(r.selected),correct:Of(r),shownAt:dr(r.shownAt)??dr(r.shown_at),answeredAt:dr(r.answeredAt)??dr(r.answered_at)}}):[]}const ho=globalThis;async function Wf(){try{return await ho.__ihabNoiseSettingsStore?.load()??null}catch{return null}}function mo(e){const t=a=>{};try{const a=ho.__ihabNoiseSettingsStore?.save(e);a&&typeof a.catch=="function"&&a.catch(t)}catch(a){t(a)}}function pr(e){try{ho.__ihabNoiseSettingsStore?.applied?.(e)}catch{}}async function Hf(e){if(typeof document<"u"){const t=document.activeElement;let a=null;try{if(a=document.createElement("textarea"),a.value=e,a.setAttribute("readonly",""),a.style.position="fixed",a.style.top="0",a.style.left="0",a.style.opacity="0",a.style.pointerEvents="none",document.body.appendChild(a),a.focus(),a.select(),a.setSelectionRange(0,e.length),document.execCommand("copy"))return!0}catch{}finally{if(a?.parentNode&&a.parentNode.removeChild(a),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 ma(e){if(!e)return e;const t=e.trim();return/^[₩$]/.test(t)?t:/원\s*$/.test(t)?"\u20A9"+t.replace(/\s*원\s*$/,"").trim():t}function Zl(e,t){if(!e)return"-";const a=/^(\d{1,2}):(\d{2})$/.exec(e.trim());if(!a)return e;const r=Number(a[1]),s=Number(a[2]),l=a[1].padStart(2,"0");return s===0?t("date.timeH",{h:r,hh:l,mm:a[2]}):t("date.timeHM",{h:r,hh:l,m:s,mm:a[2]})}function Co(e){return(e??0).toLocaleString("ko-KR")}const Vf=[{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"}]}],qf=[{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 Xl(){return Vf}function Uf(){return qf}const Gf=[],Kf=[],Yf=[],Zf=[];function Xf(){return{LISTEN_IN_NOISE:Gf,SHORT_STORY:Kf,LONG_STORY:Yf,ORDERING_SENTENCE:Zf}}const Jf=[{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."}],Jl={LISTEN_IN_NOISE:"listenInNoise",SHORT_STORY:"shortStory",LONG_STORY:"longStory",ORDERING_SENTENCE:"orderingSentence"};function Qf(e){return Jf.map(t=>{const a=Jl[t.key];return a?{...t,label:e(`trainingType.${a}.title`),desc:e(`trainingType.${a}.desc`)}:t})}var eb={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."},tb={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"],weekLabel:"{{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"},nb={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"}},ab={starLabel:"{{n}}\uBC88\uC9F8 \uBCC4 \uC120\uD0DD",valueLabel:"{{max}}\uC810 \uB9CC\uC810\uC5D0 {{value}}\uC810",groupLabel:"\uBCC4\uC810"},rb={selected:"\uC120\uD0DD\uB428"},ob={placeholder:"\uC120\uD0DD"},sb={collapse:"\uC811\uAE30",expand:"\uD3BC\uCE58\uAE30"},lb={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"},ib={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"},ub={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"}}}},cb={couponButton:"\uCFE0\uD3F0 \uC785\uB825"},db={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."}}},pb={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:"\uB4F1\uAE09",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",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"}},hb={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"}}},mb={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"}}}},Cb={input:{label:"\uCFE0\uD3F0 \uCF54\uB4DC",placeholder:"\uCFE0\uD3F0 \uCF54\uB4DC \uC785\uB825"},applyButton:"\uC801\uC6A9"},fb={showN:"{{n}}\uAC1C\uC529"},bb={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."}},gb={newBadge:"\uC0C8\uB85C \uB9CC\uB4E0 \uD45C",publishedBadge:"\uBC1C\uD589\uB428",sharedBadge:"\uACF5\uC720 \uC911"},yb={title:"\uC8FC\uC694 \uB2E8\uC5B4",empty:"\uCD94\uCD9C\uB41C \uC8FC\uC694 \uB2E8\uC5B4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."},vb={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"},_b={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",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.",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"},xb={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"},wb={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"}},Bb={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"}},kb={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"}},Ab={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."]},Nb={lead:`\uC544\uC774\uD574\uBE0C\uB294 \uC18C\uB9AC\uB97C \uD1B5\uD574
819
819
  \uC2E0\uB8B0\uB97C \uC313\uACE0
820
- \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"},Eb={timeHM:"{{h}}\uC2DC {{m}}\uBD84",timeH:"{{h}}\uC2DC"},Db={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"},Sb={clearAriaLabel:"\uC785\uB825\uAC12 \uC9C0\uC6B0\uAE30"},jb={ariaLabel:"\uC120\uD0DD \uD0ED"},Tb={ariaLabel:"\uD0ED"},Mb={dragPrompt:"\uD30C\uC77C\uC744 \uC774\uACF3\uC5D0 \uB4DC\uB798\uADF8\uD558\uC5EC \uC5C5\uB85C\uB4DC",browseButton:"\uD30C\uC77C \uC120\uD0DD",removeAriaLabel:"{{name}} \uC81C\uAC70"},Lb={ariaLabel:"\uC0AC\uC6A9\uC790 \uC544\uBC14\uD0C0"},$b={relativeDay:{today:"\uC624\uB298",yesterday:"\uC5B4\uC81C",daysAgo:"{{n}}\uC77C \uC804"}},Rb={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"},Pb={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"}},Fb={steps:"\uC9C4\uD589 \uB2E8\uACC4 {{current}} / {{total}}"},Ib={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"},Ob={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"},zb={viewWords:"\uB0B1\uB9D0"},Wb={ariaLabel:"\uBC30\uB108",dotAriaLabel:"{{count}}\uAC1C \uC911 {{index}}\uBC88\uC9F8 \uBC30\uB108"},Hb={chooseDate:"\uB0A0\uC9DC \uC120\uD0DD",selectYear:"\uC5F0 \uC120\uD0DD",selectMonth:"\uC6D4 \uC120\uD0DD"},Vb={previewRegion:"\uBCF4\uACE0\uC11C \uBBF8\uB9AC\uBCF4\uAE30 \u2014 \uC88C\uC6B0\uB85C \uAD74\uB824 \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4"},qb={description:"\uC124\uBA85",textbox:"\uBCF8\uBB38",training:"\uD6C8\uB828 \uC548\uB0B4",menu:"\uBA54\uB274"},Ub={place:{labial:"\uC591\uC21C\uC74C",alveolar:"\uCE58\uC870\uC74C",palatal:"\uACBD\uAD6C\uAC1C\uC74C",velar:"\uC5F0\uAD6C\uAC1C\uC74C",glottal:"\uC131\uBB38\uC74C"}},Gb={clearSelection:"\uC120\uD0DD \uD574\uC81C"},Kb={showResult:"{{type}} \uACB0\uACFC\uBCF4\uAE30"},Yb={selected:"\uC120\uD0DD\uB428",remove:"\uC81C\uAC70",exclude:"\uC81C\uC678",nthSelected:"{{n}}\uBC88\uC9F8 \uC120\uD0DD"},Zb={loading:"\uBD88\uB7EC\uC624\uB294 \uC911\u2026"},Xb={state:{active:"\uC18C\uB9AC \uB098\uB294 \uC911",played:"\uB4E4\uC74C",correct:"\uC815\uB2F5",wrong:"\uC624\uB2F5"}},Jb={ariaLabel:"\uC774\uB3D9 \uACBD\uB85C"},Qb={empty:"\uB4F1\uB85D\uB41C \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."},eg={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"},tg={common:eb,calendar:tb,passCard:nb,rating:ab,colorPicker:rb,dropdown:ob,accordion:sb,header:lb,nav:ib,settings:ub,usage:cb,account:db,training:pb,customers:hb,payment:mb,coupons:Cb,visits:fb,trainingType:bb,myWordTable:gb,keyWords:yb,wordTable:vb,wordSearch:_b,wordPrint:xb,topic:wb,device:Bb,manager:kb,wordPairs:Ab,footer:Nb,date:Eb,wordData:Db,textField:Sb,segmentedControl:jb,tabs:Tb,fileUpload:Mb,avatar:Lb,myHomework:$b,trainingStatus:Rb,store:Pb,progress:Fb,trainingMiss:Ib,table:Ob,wordScore:zb,topBanner:Wb,datePicker:Hb,report:Vb,tooltip:qb,phonemeProfile:Ub,bulkBar:Gb,debug:Kb,badge:Yb,loader:Zb,soundCompass:Xb,breadcrumb:Jb,board:Qb,promoBannerBg:eg},ng={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."},ag={rangeSelect:"Select period",dow:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],weekLabel:"Week {{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"]},rg={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"}},og={starLabel:"Select star {{n}}",valueLabel:"{{value}} out of {{max}}",groupLabel:"Rating"},sg={selected:"selected"},lg={placeholder:"Select"},ig={collapse:"Collapse",expand:"Expand"},ug={biArea:"BI area",biSymbol:"BI symbol",logoMalgwi:"Malgwi logo",logoManager:"Malgwi Manager logo",menuOpen:"Open menu",utilMenu:"Utility menu",menuClose:"Close menu"},cg={mainMenu:"Main menu",bottomNav:"Bottom navigation",goToManager:"Go to 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"},dg={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"}}}},pg={couponButton:"Enter Coupon"},hg={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."}}},mg={settings:"Settings",filter:{random:"Random",trainOnset:"Onset",trainVowel:"Vowel",trainCoda:"Coda",phonemeGroup:"Training phonemes",noLimit:"Any",codaExclude:"Exclude",gradeLabel:"Grade",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",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"}},Cg={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"}}},fg={plan:{recommendedFor:"Recommended for",features:"Key Features",freePrice:"Free",contact:"Contact Us",tierFallback:"Plan",openPromo:"Launch offer"},products:{mgrEnterprise:{tier:{price:"Contact us"}}}},bg={input:{label:"Coupon code",placeholder:"Enter coupon code"},applyButton:"Apply"},gg={showN:"Show {{n}}"},yg={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."}},vg={newBadge:"Newly created",publishedBadge:"Published",sharedBadge:"Shared"},_g={title:"Key Words",empty:"No key words available."},xg={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}}"},wg={filterTitle:"Word Search Settings",filter:{positionAny:"Any",positionHead:"Start",positionMid:"Middle",positionTail:"End",difficulty:"Difficulty",grade:"Grade {{n}}",age:"Age {{n}}",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.",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"},Bg={clearAllSelection:"Clear All Selections",divLine:"Contrast Line",removePair:"Remove pair",removePairFor:"Remove the pair {{name}}",removeWord:"Remove word",removeWordFor:"Remove {{name}}"},kg={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"}},Ag={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"}},Ng={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}}"}},Eg={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."]},Dg={lead:`IHAB builds trust
820
+ \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"},Eb={timeHM:"{{h}}\uC2DC {{m}}\uBD84",timeH:"{{h}}\uC2DC"},Db={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"},Sb={clearAriaLabel:"\uC785\uB825\uAC12 \uC9C0\uC6B0\uAE30"},jb={ariaLabel:"\uC120\uD0DD \uD0ED"},Tb={ariaLabel:"\uD0ED"},Mb={dragPrompt:"\uD30C\uC77C\uC744 \uC774\uACF3\uC5D0 \uB4DC\uB798\uADF8\uD558\uC5EC \uC5C5\uB85C\uB4DC",browseButton:"\uD30C\uC77C \uC120\uD0DD",removeAriaLabel:"{{name}} \uC81C\uAC70"},Lb={ariaLabel:"\uC0AC\uC6A9\uC790 \uC544\uBC14\uD0C0"},$b={relativeDay:{today:"\uC624\uB298",yesterday:"\uC5B4\uC81C",daysAgo:"{{n}}\uC77C \uC804"}},Rb={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"},Pb={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"}},Fb={steps:"\uC9C4\uD589 \uB2E8\uACC4 {{current}} / {{total}}"},Ib={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"},Ob={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"},zb={viewWords:"\uB0B1\uB9D0"},Wb={ariaLabel:"\uBC30\uB108",dotAriaLabel:"{{count}}\uAC1C \uC911 {{index}}\uBC88\uC9F8 \uBC30\uB108"},Hb={chooseDate:"\uB0A0\uC9DC \uC120\uD0DD",selectYear:"\uC5F0 \uC120\uD0DD",selectMonth:"\uC6D4 \uC120\uD0DD"},Vb={previewRegion:"\uBCF4\uACE0\uC11C \uBBF8\uB9AC\uBCF4\uAE30 \u2014 \uC88C\uC6B0\uB85C \uAD74\uB824 \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4"},qb={description:"\uC124\uBA85",textbox:"\uBCF8\uBB38",training:"\uD6C8\uB828 \uC548\uB0B4",menu:"\uBA54\uB274"},Ub={place:{labial:"\uC591\uC21C\uC74C",alveolar:"\uCE58\uC870\uC74C",palatal:"\uACBD\uAD6C\uAC1C\uC74C",velar:"\uC5F0\uAD6C\uAC1C\uC74C",glottal:"\uC131\uBB38\uC74C"}},Gb={clearSelection:"\uC120\uD0DD \uD574\uC81C"},Kb={showResult:"{{type}} \uACB0\uACFC\uBCF4\uAE30"},Yb={selected:"\uC120\uD0DD\uB428",remove:"\uC81C\uAC70",exclude:"\uC81C\uC678",nthSelected:"{{n}}\uBC88\uC9F8 \uC120\uD0DD"},Zb={loading:"\uBD88\uB7EC\uC624\uB294 \uC911\u2026"},Xb={state:{active:"\uC18C\uB9AC \uB098\uB294 \uC911",played:"\uB4E4\uC74C",correct:"\uC815\uB2F5",wrong:"\uC624\uB2F5"}},Jb={ariaLabel:"\uC774\uB3D9 \uACBD\uB85C"},Qb={empty:"\uB4F1\uB85D\uB41C \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."},eg={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"},tg={common:eb,calendar:tb,passCard:nb,rating:ab,colorPicker:rb,dropdown:ob,accordion:sb,header:lb,nav:ib,settings:ub,usage:cb,account:db,training:pb,customers:hb,payment:mb,coupons:Cb,visits:fb,trainingType:bb,myWordTable:gb,keyWords:yb,wordTable:vb,wordSearch:_b,wordPrint:xb,topic:wb,device:Bb,manager:kb,wordPairs:Ab,footer:Nb,date:Eb,wordData:Db,textField:Sb,segmentedControl:jb,tabs:Tb,fileUpload:Mb,avatar:Lb,myHomework:$b,trainingStatus:Rb,store:Pb,progress:Fb,trainingMiss:Ib,table:Ob,wordScore:zb,topBanner:Wb,datePicker:Hb,report:Vb,tooltip:qb,phonemeProfile:Ub,bulkBar:Gb,debug:Kb,badge:Yb,loader:Zb,soundCompass:Xb,breadcrumb:Jb,board:Qb,promoBannerBg:eg},ng={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."},ag={rangeSelect:"Select period",dow:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],weekLabel:"Week {{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"]},rg={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"}},og={starLabel:"Select star {{n}}",valueLabel:"{{value}} out of {{max}}",groupLabel:"Rating"},sg={selected:"selected"},lg={placeholder:"Select"},ig={collapse:"Collapse",expand:"Expand"},ug={biArea:"BI area",biSymbol:"BI symbol",logoMalgwi:"Malgwi logo",logoManager:"Malgwi Manager logo",menuOpen:"Open menu",utilMenu:"Utility menu",menuClose:"Close menu"},cg={mainMenu:"Main menu",bottomNav:"Bottom navigation",goToManager:"Go to 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"},dg={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"}}}},pg={couponButton:"Enter Coupon"},hg={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."}}},mg={settings:"Settings",filter:{random:"Random",trainOnset:"Onset",trainVowel:"Vowel",trainCoda:"Coda",phonemeGroup:"Training phonemes",noLimit:"Any",codaExclude:"Exclude",gradeLabel:"Grade",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",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"}},Cg={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"}}},fg={plan:{recommendedFor:"Recommended for",features:"Key Features",freePrice:"Free",contact:"Contact Us",tierFallback:"Plan",openPromo:"Launch offer"},products:{mgrEnterprise:{tier:{price:"Contact us"}}}},bg={input:{label:"Coupon code",placeholder:"Enter coupon code"},applyButton:"Apply"},gg={showN:"Show {{n}}"},yg={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."}},vg={newBadge:"Newly created",publishedBadge:"Published",sharedBadge:"Shared"},_g={title:"Key Words",empty:"No key words available."},xg={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"},wg={filterTitle:"Word Search Settings",filter:{positionAny:"Any",positionHead:"Start",positionMid:"Middle",positionTail:"End",difficulty:"Difficulty",grade:"Grade {{n}}",age:"Age {{n}}",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.",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"},Bg={clearAllSelection:"Clear All Selections",divLine:"Contrast Line",removePair:"Remove pair",removePairFor:"Remove the pair {{name}}",removeWord:"Remove word",removeWordFor:"Remove {{name}}"},kg={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"}},Ag={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"}},Ng={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}}"}},Eg={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."]},Dg={lead:`IHAB builds trust
821
821
  through sound
822
- 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"},Sg={timeHM:"{{hh}}:{{mm}}",timeH:"{{hh}}:{{mm}}"},jg={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"},Tg={clearAriaLabel:"Clear input"},Mg={ariaLabel:"Select tab"},Lg={ariaLabel:"Tabs"},$g={dragPrompt:"Drag and drop files here",browseButton:"Choose Files",removeAriaLabel:"Remove {{name}}"},Rg={ariaLabel:"User avatar"},Pg={relativeDay:{today:"Today",yesterday:"Yesterday",daysAgo:"{{n}}d ago"}},Fg={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"},Ig={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"}},Og={steps:"Step {{current}} of {{total}}"},zg={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"},Wg={resetColumns:"Reset column widths",scrollRegion:"Horizontally scrollable table",rowActionHint:"Press a row to open its details"},Hg={viewWords:"Words"},Vg={ariaLabel:"Banner",dotAriaLabel:"Banner {{index}} of {{count}}"},qg={chooseDate:"Choose a date",selectYear:"Select year",selectMonth:"Select month"},Ug={previewRegion:"Report preview \u2014 scrollable sideways"},Gg={description:"Description",textbox:"Text",training:"Training guide",menu:"Menu"},Kg={place:{labial:"Bilabial",alveolar:"Alveolar",palatal:"Palatal",velar:"Velar",glottal:"Glottal"}},Yg={clearSelection:"Clear selection"},Zg={showResult:"Show {{type}} result"},Xg={selected:"Selected",remove:"Remove",exclude:"Excluded",nthSelected:"Selection {{n}}"},Jg={loading:"Loading"},Qg={state:{active:"playing",played:"heard",correct:"correct",wrong:"wrong"}},ey={ariaLabel:"Breadcrumb"},ty={empty:"No items yet."},ny={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"},ay={common:ng,calendar:ag,passCard:rg,rating:og,colorPicker:sg,dropdown:lg,accordion:ig,header:ug,nav:cg,settings:dg,usage:pg,account:hg,training:mg,customers:Cg,payment:fg,coupons:bg,visits:gg,trainingType:yg,myWordTable:vg,keyWords:_g,wordTable:xg,wordSearch:wg,wordPrint:Bg,topic:kg,device:Ag,manager:Ng,wordPairs:Eg,footer:Dg,date:Sg,wordData:jg,textField:Tg,segmentedControl:Mg,tabs:Lg,fileUpload:$g,avatar:Rg,myHomework:Pg,trainingStatus:Fg,store:Ig,progress:Og,trainingMiss:zg,table:Wg,wordScore:Hg,topBanner:Vg,datePicker:qg,report:Ug,tooltip:Gg,phonemeProfile:Kg,bulkBar:Yg,debug:Zg,badge:Xg,loader:Jg,soundCompass:Qg,breadcrumb:ey,board:ty,promoBannerBg:ny};const ry="0.403.0",oy=[{code:"ko",label:"\uD55C\uAD6D\uC5B4"},{code:"en",label:"English"}],fo="ko",sy="ihab_display_language";function Ql(){if(typeof window>"u")return fo;try{const e=localStorage.getItem(sy);if(e&&oy.some(t=>t.code===e))return e}catch{}return fo}function ei(e){try{document.documentElement.lang=e}catch{}}Kt.on("languageChanged",ei),ei(Ql()),Kt.use(_e.initReactI18next).init({resources:{ko:{translation:tg},en:{translation:ay}},lng:Ql(),fallbackLng:fo,interpolation:{escapeValue:!1},react:{useSuspense:!1}});const ly=new Map;try{Kt.store?.on?.("added",()=>ly.clear())}catch{}let hr=null,ti=null,ni=null;function iy(){const e=Wl();if(e&&e.entries.length>0){const t=vf();if(hr&&ti===e&&ni===t)return hr;const a=new Set,r=[];for(const s of e.entries)!s.word||a.has(s.word)||(a.add(s.word),r.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 hr=r,ti=e,ni=t,hr}return[]}new Proxy([],{get(e,t){const a=iy(),r=a[t];return typeof r=="function"?r.bind(a):r}});function uy(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 cy(e){if(typeof window>"u")return"";const t=(a,r)=>{typeof r.attrValue=="string"&&uy(r.attrValue)&&(r.keepAttr=!1)};da.addHook("uponSanitizeAttribute",t);try{return da.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:["script","use","style"],FORBID_ATTR:["xlink:href","href"]})}finally{da.removeHook("uponSanitizeAttribute",t)}}function dy(e){const[t,a]=o.useState(null),[r,s]=o.useState(null),[l,i]=o.useState(null),[u,c]=o.useState(null),[d,h]=o.useState(null);return o.useEffect(()=>{if(!e||typeof e!="string"||!e.endsWith(".svg")){a(null),s(null),i(null),c(null);return}const p=e.split("/").pop();let m=e;p&&(e.startsWith("/")?m=no(e):/^(Logo|Symbol)/i.test(p)?m=no(`logo/${p}`):(/^https?:\/\//i.test(e)||e.startsWith("data:"),m=e)),i(null),c(null),a(e),s(m)},[e]),o.useEffect(()=>{if(!r)return;let p=!1;async function m(){try{let g=await fetch(r);g.ok||(g=await fetch(r));const y=g.headers.get("content-type")||"";if(p)return;if(y.includes("svg")){i("mask");return}if(y.startsWith("image/")){i("img");return}const C=await fetch(r);if(!C.ok)throw new Error("not ok");const f=await C.text();if(p)return;if(/^\s*<svg[\s>]/i.test(f)){const _=cy(f);if(!_){i("none");return}c(_),i("inline");return}i("none")}catch{p||i("none")}}return m(),()=>{p=!0}},[r]),o.useEffect(()=>{let p=!1,m=null;return l==="mask"&&r&&fetch(r).then(g=>{if(!g.ok)throw new Error("fetch failed");return g.blob()}).then(g=>{p||(m=URL.createObjectURL(g),h(m))}).catch(()=>{p||i("img")}),()=>{p=!0,m&&URL.revokeObjectURL(m),h(null)}},[l,r]),t===e?{iconToUse:r,mode:l,svgText:u,blobUrl:d}:{iconToUse:null,mode:null,svgText:null,blobUrl:null}}function ot(e){const{icon:t,label:a,className:r,imgClassName:s,maskClassName:l,svgClassName:i,wrapperStyle:u,size:c}=e||{},d=r??"iconRenderer-icon",h=s??"iconRenderer-icon-image",p=l??"iconRenderer-icon-mask",m=i??"iconRenderer-icon-svg",g=typeof t=="string"?t:null,y=Q0(g),{iconToUse:C,mode:f,svgText:_,blobUrl:b}=dy(g),w=(B,E={})=>n.jsx("span",{className:d,style:u,...E,children:B}),v=typeof c=="number"?{width:c,height:c,objectFit:"contain"}:null,k=(B,E={})=>n.jsx("img",{src:B,alt:typeof a=="string"?a:typeof a=="number"?String(a):"",className:h,...E,style:v?{...E.style,...v}:E.style});if(!t)return null;if(typeof t!="string")return w(t);if(t==="none")return w(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(y)try{return w(o.createElement(y,{className:m,size:typeof c=="number"?c:20}),{"aria-hidden":"true"})}catch{}if(C&&C.endsWith(".svg")){if(f==="mask"){const B={"--icon-url":b?`url(${b})`:`url(${C})`,...typeof c=="number"?{"--icon-size":`${c}px`}:null};return w(n.jsx("span",{className:p,style:B}),{"aria-hidden":"true"})}return f==="img"?w(k(C,{onError:B=>{B.currentTarget.onerror=null,B.currentTarget.style.display="none"}}),{"aria-hidden":"true"}):f==="inline"?w(n.jsx("span",{className:m,dangerouslySetInnerHTML:_?{__html:_}:void 0}),{"aria-hidden":"true"}):w(null,{"aria-hidden":"true"})}if(t.startsWith("/")||t.includes("/assets/")||t.match(/\.(png|jpg|jpeg|webp|gif)$/i))return k(no(t),{style:u,onError:B=>{B.currentTarget.onerror=null,B.currentTarget.style.display="none"}});const x=typeof c=="number"?c:20,A=`<svg width="${x}" height="${x}" 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 w(n.jsx("span",{className:m,dangerouslySetInnerHTML:{__html:A}}),{"aria-hidden":"true"})}function ai(e){const[t,a]=o.useState(!1),r=o.useRef(!1),s=o.useRef(!0);o.useEffect(()=>(s.current=!0,()=>{s.current=!1}),[]);const l=o.useCallback(()=>{if(!e||r.current)return;const i=e();if(i&&typeof i.then=="function"){r.current=!0,a(!0);const u=()=>{r.current=!1,s.current&&a(!1)};i.then(u,u)}},[e]);return{pending:t,press:l}}function py({icon:e,title:t,message:a,action:r,className:s}){const{pending:l,press:i}=ai(r?.onClick);return n.jsxs("div",{className:Be("empty-state",s),children:[e&&n.jsx(ot,{icon:e,size:48,className:"empty-state__icon"}),t&&n.jsx("p",{className:"empty-state__title h4",children:t}),a&&n.jsx("p",{className:"empty-state__message body-3",children:a}),r&&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:[r.icon&&n.jsx(ot,{icon:r.icon,className:"button__icon"}),n.jsx("span",{className:"button__label button-1",children:r.label})]})]})}function hy({message:e,hint:t,icon:a="triangle-alert",onRetry:r,retryLabel:s,className:l}){const{t:i}=_e.useTranslation(),{pending:u,press:c}=ai(r);return n.jsxs("div",{className:Be("empty-state","error-state",l),role:"alert",children:[n.jsx(ot,{icon:a,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}),r&&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(ot,{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 my({icon:e,title:t,description:a,cta:r,tone:s="main",disabled:l=!1,onClick:i,className:u=""}){const c=o.useId(),d=`${c}-title`,h=`${c}-desc`,p=`${c}-cta`,m=()=>{l||i?.()};return n.jsx("section",{role:"button",tabIndex:l?-1:0,"aria-disabled":l||void 0,"aria-labelledby":d,"aria-describedby":`${h} ${p}`,onClick:m,onKeyDown:g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),m())},className:Be("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(ot,{icon:e,size:34})}),n.jsxs("div",{className:"action-card__text",children:[n.jsx("h2",{id:d,className:"action-card__title",children:t}),n.jsx("p",{id:h,className:"action-card__desc",children:a})]}),n.jsxs("div",{className:"action-card__cta",children:[n.jsx("span",{id:p,children:r}),n.jsx("span",{"aria-hidden":!0,className:"action-card__arrow",children:n.jsx(ot,{icon:"arrow-right",size:18})})]})]})})}function Cy({as:e="div",className:t="",children:a,storage:r,...s}){r&&O1({resolveUrl:r.resolveUrl,download:r.download??(()=>Promise.reject(new Error("[ihabdevteam-core] CoreScope: download resolver\uAC00 \uC124\uC815\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4."))),exists:r.exists,resolvePath:r.resolvePath,noiseBaseUrl:r.noiseBaseUrl,noiseFileGain:r.noiseFileGain});const l=Be("ihabdevteam-core-scope",t);return n.jsx(e,{className:l,...s,children:a})}function fy(e){if(e.closest('[aria-hidden="true"], [hidden], [inert]'))return!1;for(let t=e;t;t=t.parentElement){const a=window.getComputedStyle(t);if(a.display==="none"||a.visibility==="hidden"||a.visibility==="collapse")return!1}return!0}function bo(e,t=!0){o.useEffect(()=>{if(!t)return;const a=e.current;if(!a)return;const r=s=>{if(s.key!=="Tab")return;const l=Array.from(a.querySelectorAll(En)).filter(fy);if(!l.length){s.preventDefault();return}const i=l[0],u=l[l.length-1],c=document.activeElement,d=c===a;s.shiftKey&&(c===i||d)?(s.preventDefault(),u.focus()):!s.shiftKey&&c===u&&(s.preventDefault(),i.focus())};return a.addEventListener("keydown",r),()=>a.removeEventListener("keydown",r)},[e,t])}const En='a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])',go=new WeakMap;function yo(e,t){e&&go.set(e,t)}function vo(e){let t=e;for(let a=0;t&&!t.isConnected&&a<10;a++){let r=t;for(;r&&!go.has(r);)r=r.parentElement;if(!r)return t;t=go.get(r)??null}return t}function ri(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 mr(e,t,a){const r=e?.isConnected?e:a?.isConnected?a:null;if(ri(t)&&!(e&&e.contains(t)))return t.focus(),t;if(!r)return null;const s=Array.from(document.querySelectorAll(En)).filter(c=>!(e&&e.contains(c))&&ri(c));let l=null,i=null;for(const c of s)r.compareDocumentPosition(c)&Node.DOCUMENT_POSITION_PRECEDING?l=c:i||(i=c);const u=l??i;return u?.focus(),u}function by({title:e="",lines:t=[],notices:a=null,children:r,variant:s="default",dismissible:l=!1,className:i=""}){const{t:u}=_e.useTranslation(),[c,d]=o.useState(!1),h=o.useRef(null),p=o.useCallback(()=>{const C=h.current;C&&C.contains(document.activeElement)&&mr(C),d(!0)},[]);if(c)return null;const m=`notice-box notice-box--${s} body-2 ${i}`.trim(),g=l&&n.jsx("button",{type:"button",className:"notice-box__dismiss",onClick:p,"aria-label":u("common.close","\uB2EB\uAE30"),children:"\xD7"});if(a&&Array.isArray(a)&&a.length)return n.jsxs("div",{className:m,role:"note",children:[a.map((C,f)=>n.jsxs("div",{className:"notice-box__inner",children:[C.title?n.jsx("span",{className:"notice-box__title body-3",children:C.title}):null,n.jsx("div",{className:"notice-box__body",children:C.lines&&C.lines.length?n.jsx("div",{children:C.lines.map((_,b)=>n.jsx("span",{className:"notice-box__line body-3",children:_},b))}):C.children??null})]},f)),g]});const y=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((C,f)=>n.jsx("li",{className:"notice-box__line",children:C},f))}):r})]}):n.jsx("div",{className:"notice-box__inner",children:r});return n.jsxs("div",{ref:h,className:m,role:"note",children:[y,g]})}const gy={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0};function Ca(e){const{t}=_e.useTranslation(),{variant:a="spinner",size:r=24,progress:s=null,label:l}=e||{},i=l||t("loader.loading","Loading");if(a==="bar"){const c=s==null||!Number.isFinite(Number(s)),d=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:d,"aria-label":i,children:n.jsx("div",{className:"loader-bar__inner",style:c?void 0:{width:`${d}%`}})})}const u=typeof r=="number"?`${r}px`:r;return n.jsxs("div",{className:"loader-spinner",style:{width:u,height:u},role:"status","aria-label":i,children:[n.jsx("span",{style:gy,children:i}),n.jsxs("svg",{className:"loader-spinner__svg",viewBox:"0 0 50 50",width:r,height:r,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 fa=[];let Cr=!1;function oi(e){if(e.key!=="Escape"||e.defaultPrevented||e.isComposing||e.keyCode===229)return;const t=fa[fa.length-1];t&&(e.stopPropagation(),t())}function Qn(e){return fa.push(e),!Cr&&typeof document<"u"&&(document.addEventListener("keydown",oi),Cr=!0),()=>{const t=fa.lastIndexOf(e);t>=0&&fa.splice(t,1),fa.length===0&&Cr&&typeof document<"u"&&(document.removeEventListener("keydown",oi),Cr=!1)}}const si=o.createContext(null);function yy(e){return/max-width:\s*7[0-9][0-9]px/.test(e)}const li=e=>typeof window>"u"||!window.matchMedia?!1:window.matchMedia(e).matches;function vy(e){const t=o.useCallback(a=>{if(typeof window>"u"||!window.matchMedia)return()=>{};const r=window.matchMedia(e);return r.addEventListener?r.addEventListener("change",a):r.addListener&&r.addListener(a),()=>{r.removeEventListener?r.removeEventListener("change",a):r.removeListener&&r.removeListener(a)}},[e]);return Ps.useSyncExternalStore(t,()=>li(e),()=>!1)}function _y(e){const[t,a]=o.useState(li(e));return o.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const r=window.matchMedia(e),s=i=>a(i.matches),l=r;return l.addEventListener?l.addEventListener("change",s):l.addListener&&l.addListener(s),a(r.matches),()=>{l.removeEventListener?l.removeEventListener("change",s):l.removeListener&&l.removeListener(s)}},[e]),t}const xy=typeof Ps.useSyncExternalStore=="function"?vy:_y;function yn(e){const t=o.useContext(si),a=xy(e);return t&&typeof t.mobile=="boolean"&&yy(e)?t.mobile:a}const wy="(prefers-reduced-motion: reduce)";function _o(){return yn(wy)}const ii={"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","stat-chart__card":"manager-stat-card"};function By(e,t){const a=Object.keys(e).sort((r,s)=>s.length-r.length);for(const r of a){if(!t.startsWith(r))continue;const s=t.slice(r.length);if(!(s!==""&&!s.startsWith("__")&&!s.startsWith("--")))return e[r]+s}return null}function ky(e){return By(ii,e)}function se(e){if(!e||Object.keys(ii).length===0)return e;const t=[];for(const a of e.split(/\s+/)){if(!a)continue;const r=ky(a);r&&t.push(r)}return t.length?`${e} ${t.join(" ")}`:e}function Bn(e){const{anchorRect:t,anchorEl:a,offset:r=20,edgeMargin:s=20,onClose:l,closeOnOutsideClick:i=!0,className:u="",role:c="dialog",ariaLabel:d="",children:h,backdrop:p=!1,isMobilePopup:m=!1,useBorder:g=!0,header:y,focusOnOpen:C}=e||{},f=o.useRef(null),[_,b]=o.useState({position:"fixed",left:0,top:-9999}),[w,v]=o.useState(!1),[k,x]=o.useState("bottom"),[A,B]=o.useState(!1),[E,D]=o.useState(!1),N=!t&&!a,$=o.useRef(null),L=o.useCallback((R=!1,q=!1)=>{if(E&&m)return;const Z=a?a.getBoundingClientRect():t,z=q&&$.current?$.current:Z;if(!z||!f.current)return;const j=f.current,{offsetWidth:F,offsetHeight:O}=j,G=window.innerWidth,ie=window.innerHeight,K=G-z.right,pe=z.left,X=z.top,H=ie-z.bottom;let ne=0,V=0,W="top";if(X>=O+r)W="top",V=z.top-r-O,ne=z.left+z.width/2-F/2;else if(H>=O+r)W="bottom",V=z.bottom+r,ne=z.left+z.width/2-F/2;else if(K>=F+r)W="right",ne=z.right+r,V=z.top+z.height/2-O/2;else if(pe>=F+r)W="left",ne=z.left-r-F,V=z.top+z.height/2-O/2;else{const me=Math.max(X,H,K,pe);me===X?(W="top",V=z.top-r-O,ne=z.left+z.width/2-F/2):me===H?(W="bottom",V=z.bottom+r,ne=z.left+z.width/2-F/2):me===K?(W="right",ne=z.right+r,V=z.top+z.height/2-O/2):(W="left",ne=z.left-r-F,V=z.top+z.height/2-O/2)}const oe=Number.isFinite(Number(s))?Number(s):8;ne=Math.min(Math.max(ne,oe),G-F-oe),V=Math.min(Math.max(V,oe),ie-O-oe);const xe=Math.round(ne),be=Math.round(V);R&&f.current?(f.current.style.left=`${xe}px`,f.current.style.top=`${be}px`,f.current.dataset.placement=W):(x(W||k),b({position:"fixed",left:xe,top:be}),B(!0))},[E,m,a,t,r,s,k]);o.useEffect(()=>()=>{$.current=null},[a,t]),o.useLayoutEffect(()=>{if(N)return;if(E&&m){b({position:"fixed",left:"50%",top:"50%",transform:"translate(-50%, -50%)",width:"calc(100% - 40px)",maxWidth:"calc(100% - 40px)"}),B(!0);return}$.current===null&&($.current=a?a.getBoundingClientRect():t??null),L(!1,!0);const R=requestAnimationFrame(()=>L(!1,!0));return()=>cancelAnimationFrame(R)},[t,a,r,h,s,N,E,m,L]),o.useEffect(()=>{if(N||E&&m||!f.current||typeof ResizeObserver>"u")return;const R=new ResizeObserver(()=>{t&&L()});return R.observe(f.current),()=>R.disconnect()},[t,h,s,N,E,m,L]),o.useEffect(()=>{if(N||E&&m)return;let R=null;const q=()=>{if(a&&($.current=a.getBoundingClientRect()),typeof requestAnimationFrame>"u"){L(!0);return}R===null&&(R=requestAnimationFrame(()=>{R=null,L(!0)}))},Z=z=>{if(!a&&l){const j=z.target;if(j&&f.current&&f.current.contains(j))return;try{if(j&&j.closest&&j.closest("[data-tooltip-ignore]"))return}catch{}ee.current(!0);return}q()};return window.addEventListener("resize",q),document.addEventListener("scroll",Z,{passive:!0,capture:!0}),()=>{R!==null&&cancelAnimationFrame(R),window.removeEventListener("resize",q),document.removeEventListener("scroll",Z,{capture:!0})}},[t,a,l,r,h,s,N,E,m,L]),o.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const R=window.matchMedia("(max-width: 768px)"),q=()=>D(!!R.matches);q();try{R.addEventListener?R.addEventListener("change",q):R.addListener(q)}catch{try{R.addListener(q)}catch{}}return()=>{try{R.removeEventListener?R.removeEventListener("change",q):R.removeListener(q)}catch{}}},[]);const U=o.useRef(!1),M=o.useRef(null),P=_o(),T=o.useCallback((R=!1)=>{if(l&&!(w||U.current)){if(U.current=!0,R){v(!0);try{l&&l()}catch{U.current=!1,v(!1)}return}v(!0),M.current=setTimeout(()=>{M.current=null;try{l&&l()}catch{U.current=!1,v(!1)}},P?0:200)}},[w,l,v,P]);o.useEffect(()=>()=>{M.current&&clearTimeout(M.current)},[]),o.useEffect(()=>{if(N)return;const R=z=>{const j=f.current;if(!j)return;const F=z.target;if(F&&!j.contains(F)){try{if(F.closest&&F.closest("[data-tooltip-ignore]"))return}catch{}i&&T(!0)}},q=z=>{const j=f.current;if(!j)return;const F=z.target;if(F&&!j.contains(F)){try{if(F.closest&&F.closest("[data-tooltip-ignore]"))return}catch{}i&&T(!0)}},Z=z=>{if(z.key==="Tab"){const j=f.current;if(!j)return;const F=j.querySelectorAll(En);if(!F||F.length===0)return;const O=F[0],G=F[F.length-1],ie=document.activeElement;z.shiftKey?ie===O&&(z.preventDefault(),G.focus()):ie===G&&(z.preventDefault(),O.focus())}};return document.addEventListener("pointerdown",R,!0),document.addEventListener("click",q,!0),document.addEventListener("keydown",Z),()=>{document.removeEventListener("pointerdown",R,!0),document.removeEventListener("click",q,!0),document.removeEventListener("keydown",Z)}},[l,i,T,N]);const ee=o.useRef(T);o.useEffect(()=>{ee.current=T});const te=!!l;o.useEffect(()=>{if(!(N||!te))return Qn(()=>ee.current())},[N,te]),o.useEffect(()=>{const R=()=>{T(!0)};return typeof document<"u"&&document.addEventListener("speechear-close-tooltips",R),()=>{typeof document<"u"&&document.removeEventListener("speechear-close-tooltips",R)}},[T]);const I=o.useRef(null);o.useEffect(()=>{if(N||C===!1||!A)return;const R=f.current;if(!R)return;const q=R.querySelector(En);if(q)return I.current=document.activeElement,q.focus({preventScroll:!0}),()=>{const Z=I.current;I.current=null,Z&&document.contains(Z)&&Z.focus({preventScroll:!0})}},[N,C,A]),o.useEffect(()=>{c==="dialog"&&!d&&At("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.')},[c,d]);const Y=n.jsxs("div",{ref:f,className:se(`tooltip__content ${N?"tooltip__content--inline":""} ${g?"tooltip__content--bordered":""} ${w?"is-closing":""} ${u} ${E&&m?"is-mobile":""}`),role:c,"aria-label":d||void 0,style:N?{}:{..._,visibility:A?"visible":"hidden"},tabIndex:-1,"data-placement":k,"data-left":N?"":_.left,"data-top":N?"":_.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:[y!=null&&n.jsx("div",{className:se("tooltip__header h5"),children:y}),h]});if(N||typeof document>"u")return Y;if(p||E&&m){const R=n.jsxs("div",{className:se("tooltip__portal"),children:[n.jsx("div",{className:se("tooltip__backdrop"),onClick:()=>{i&&T(!0)}}),Y]});return hn.createPortal(R,document.body)}return hn.createPortal(Y,document.body)}function Mn(e){const{anchorRect:t,text:a,offset:r=8,onClose:s,className:l="",ariaLabel:i}=e||{};return a?n.jsx(Bn,{anchorRect:t,offset:r,onClose:s,closeOnOutsideClick:!1,className:se(`info-tooltip ${l}`),ariaLabel:i||a,children:n.jsx("div",{className:se("info-tooltip__content body-3"),children:a})}):null}function qn(e){const{t}=_e.useTranslation(),{anchorRect:a,title:r,items:s,activeIndex:l=-1,showIndex:i=!0,onClose:u,offset:c=12,closeOnOutsideClick:d=!0}=e||{},h=(Array.isArray(s)?s:s?[s]:[]).map(p=>typeof p=="string"?{text:p}:p);return!h.length&&!r?null:n.jsx(Bn,{anchorRect:a,offset:c,onClose:u,closeOnOutsideClick:d,useBorder:!1,className:se("description-tooltip"),ariaLabel:r||t("tooltip.description","\uC124\uBA85"),children:n.jsxs("div",{className:se("description-tooltip__box"),children:[r&&n.jsx("span",{className:se("description-tooltip__title body-2"),children:r}),n.jsx("ol",{className:se("description-tooltip__items"),children:h.map((p,m)=>n.jsxs("li",{className:se(`description-tooltip__item body-3${m===l?" description-tooltip__item--active":""}`),children:[i&&h.length>1&&n.jsxs("span",{className:se("description-tooltip__index button-1"),children:[m+1,"."]}),p.color&&n.jsx("span",{className:se("description-tooltip__dot"),style:{background:p.color},"aria-hidden":"true"}),n.jsx("span",{children:p.text})]},m))})]})})}function Ia(e){const t=o.useRef(e);return o.useEffect(()=>{t.current=e}),t}let xo=0,ui=!1;function ci(){ui||typeof document>"u"||(ui=!0,document.addEventListener("pointerdown",e=>{e.pointerType==="touch"&&(xo=Date.now())},!0),document.addEventListener("touchstart",()=>{xo=Date.now()},{capture:!0,passive:!0}))}ci();function Un(e){return!!e&&e.pointerType==="touch"}function ea(e=1e3){return ci(),Date.now()-xo<e}function fr(e,t,a,{enabled:r=!0,fallbackOnParent:s=!1}={}){const l=Ia(e),i=Ia(t),u=o.useRef(null),c=o.useRef(0);o.useEffect(()=>{if(!r||typeof document>"u")return;const h=p=>{const m=p,g=p.target,y=a.current,C=!!(g&&y&&y.contains(g));if(m.pointerType!=="touch"){C&&(u.current=null);return}if(C){u.current=l.current;return}u.current=null,l.current&&!(g&&g.closest?.(".tooltip__content"))&&i.current(!1,y)};return document.addEventListener("pointerdown",h,!0),()=>document.removeEventListener("pointerdown",h,!0)},[r,a,l,i]);const d=o.useCallback(h=>{const p=u.current;return p===null?!1:(u.current=null,c.current=Date.now(),i.current(!p,h??a.current),!0)},[a,i]);return o.useEffect(()=>{if(!r||!s)return;const h=a.current,p=h?.parentElement;if(!h||!p)return;let m=null;const g=f=>{const _=f.changedTouches?.[0];if(!_)return!1;const b=h.getBoundingClientRect();return _.clientX>=b.left&&_.clientX<=b.right&&_.clientY>=b.top&&_.clientY<=b.bottom},y=f=>{m=g(f)?l.current:null},C=f=>{const _=m;m=null,!(_===null||Date.now()-c.current<700||!g(f))&&(u.current=null,c.current=Date.now(),i.current(!_,h))};return p.addEventListener("touchstart",y,{passive:!0}),p.addEventListener("touchend",C),()=>{p.removeEventListener("touchstart",y),p.removeEventListener("touchend",C)}},[r,s,a,l,i]),{touchPress:d}}function Ay(e,t){const{size:a=48,type:r,htmlType:s,href:l,target:i,rel:u,icon:c,rightIcon:d,label:h,count:p,subLabel:m,children:g,ariaLabel:y,variant:C="default",align:f="center",nowrap:_=!1,selected:b,toggleable:w=!1,ariaExpanded:v,ariaControls:k,disabled:x=!1,loading:A=!1,useLabel:B=!0,useBorder:E=!0,useBG:D=!0,useDisabledCovered:N=!1,useDisabledInvisible:$=!1,useDisabledFilled:L=!1,width:U,minWidth:M,onClick:P,onDisabledClick:T,showTooltipInfo:ee=!1,tooltipInfoText:te=null,tooltipDescription:I=null,tooltipOnly:Y=!1,iconSize:R="medium",iconColor:q,shape:Z="rounded",color:z,className:j,...F}=e,O=typeof a=="string"&&isNaN(Number(a))?a.toLowerCase():String(Number(a)||48),G=O.match(/^\d+$/)?`button${O}`:`button-${O}`,ie=Number(a),K=!isNaN(ie)&&ie<40?"button-2":"button-1",pe=h??g,X=x||!!F.disabled,H=X?N?"disabled-covered":$?"disabled-invisibled":L?"disabled-filled":"disabled":C,ne=H?`button--variant-${H}`:"",V=f?`button--align-${f}`:"",W=_?"button--nowrap":"",oe=Z?`button--shape-${Z}`:"",xe=typeof q=="string"&&q.startsWith("--")?`var(${q})`:q,be={...U?{width:typeof U=="number"?`${U}px`:U}:{},...M?{minWidth:typeof M=="number"?`${M}px`:M}:{},...E?{}:{"--button-border":X?"0":"1px solid transparent"},...xe?{"--button-icon-color":xe}:{},...z?{"--color-main":z}:{}},me=B===!1?"":pe,ke=Array.isArray(me)?me.length>0:!!me,Le=!!d,Me=r??(ke||c||Le?"bar":"dot"),le=`${G}--${Me}`,ve=o.useRef(null);o.useEffect(()=>{!zn||s!==void 0||ve.current?.closest("form")&&At(`button-in-form:${typeof pe=="string"?pe:""}`,'[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 pe=="string"&&pe?` \uB2E8\uCD94: ${pe}`:""))},[s,pe]);const $e=o.useRef(t);$e.current=t;const Ae=o.useCallback(je=>{ve.current=je;const nt=$e.current;typeof nt=="function"?nt(je):nt&&(nt.current=je)},[]),Ie=o.useRef(X),[ze,dt]=o.useState(!!b),[st,et]=o.useState(!1),[gt,Se]=o.useState(null),Ge=o.useCallback(()=>et(!1),[]),[we,qe]=o.useState(!1),Ye=o.useId();o.useEffect(()=>{typeof b=="boolean"&&dt(b)},[b]),o.useEffect(()=>{if(Ie.current&&!X&&ve.current){const je=ve.current;let nt=!1;try{nt=je.matches(":focus:not(:focus-visible)")}catch{nt=!1}nt&&je.blur(),je.style.pointerEvents="none";const ae=requestAnimationFrame(()=>{requestAnimationFrame(()=>{ve.current&&(ve.current.style.pointerEvents="")})});return()=>cancelAnimationFrame(ae)}Ie.current=X},[X]);const mt=typeof b=="boolean"?!!b:ze,wt=typeof v=="boolean"?void 0:w||typeof b=="boolean"?mt?"true":"false":F["aria-pressed"],yt=Be("button",G,le,ne,V,W,oe,mt?"is-selected":null,D?null:"button--no-bg",Y?"button--tooltip-only":null,j),Et=`button__icon button__icon--${R}`,at=Array.isArray(m)?m:m!==void 0?[m]:[],rt=()=>{if(Array.isArray(me))return me.map((nt,ae)=>{const ye=at[ae];return n.jsxs("span",{className:`button__label-text${ye!==void 0?" button__label-text--has-sub":""}`,children:[nt,ye!==void 0&&n.jsx("span",{className:"button__sub-label-text caption-1",children:ye})]},ae)});const je=m!==void 0;return n.jsxs("span",{className:`button__label-text${je?" button__label-text--has-sub":""}`,children:[me,p!=null&&n.jsx("span",{className:"button__count",children:p}),je&&n.jsx("span",{className:"button__sub-label-text caption-1",children:m})]})},Dt=je=>{typeof b!="boolean"&&!w&&dt(!1),je.currentTarget.blur()},Bt=je=>{X||(typeof F.onMouseLeave=="function"&&F.onMouseLeave(je),Dt(je))},Lt=je=>{if(Y&&lt&&Ct.touchPress(je.currentTarget),X){lt&&Ct.touchPress(je.currentTarget),je.preventDefault(),T?.(je);return}typeof b!="boolean"&&w&&dt(nt=>!nt),P?.(je)},It=o.useCallback(()=>{(ee||I)&&(et(!0),Se(ve.current?.getBoundingClientRect()??null))},[ee,I]),xt=o.useCallback(()=>{(ee||I)&&(et(!1),Se(null))},[ee,I]),lt=!!(ee||I),Ct=fr(st,je=>{je?It():xt()},ve,{enabled:lt&&(X||Y),fallbackOnParent:lt&&X}),it={...F};delete it.disabled,delete it.className,delete it.faded,delete it.useFaded,delete it.loading,delete it.onMouseLeave,delete it.onPointerEnter,delete it.onPointerLeave,delete it.onPointerUp,delete it.onFocus,delete it.onBlur,X&&(Object.keys(it).forEach(je=>{/^on[A-Z]/.test(je)&&typeof it[je]=="function"&&delete it[je]}),it["aria-disabled"]="true"),A&&(it["aria-busy"]="true");const _t=(typeof ee=="string"?ee:null)??(typeof te=="string"?te:null)??(typeof y=="string"?y:null)??(typeof pe=="string"?pe:null)??void 0,ut=typeof y=="string"?y:typeof pe=="string"?pe:_t,St=I?[I.title,...I.items??[]].filter(Boolean).join(". "):ee&&_t&&_t!==ut?_t:"",ue=[typeof F["aria-describedby"]=="string"?F["aria-describedby"]:void 0,St?Ye:null].filter(Boolean).join(" ")||void 0,Te=()=>n.jsx("span",{className:`${Et} button__spinner`,"aria-hidden":"true",children:n.jsx(Ca,{variant:"spinner",size:"100%"})}),De=(je,nt)=>n.jsx(ot,{icon:je,label:nt??ut,className:Et,imgClassName:"button__icon-img",maskClassName:"button__icon-mask",svgClassName:"button__icon-svg"}),tt=je=>A?Te():De(c,je),pt=()=>Me==="dot"?n.jsxs(n.Fragment,{children:[tt(),ke&&n.jsx("span",{className:`button__label ${K}`,children:rt()})]}):f==="center"&&(c||A)?n.jsxs(n.Fragment,{children:[n.jsxs("span",{className:"button__center-group",children:[n.jsx("span",{className:"button__left",children:tt()}),ke&&n.jsx("span",{className:`button__label ${K}`,children:rt()})]}),Le&&n.jsx("span",{className:"button__right",children:De(d)})]}):n.jsxs(n.Fragment,{children:[(c||A)&&n.jsx("span",{className:"button__left",children:tt(y??pe)}),ke&&n.jsx("span",{className:`button__label ${K}`,children:rt()}),Le&&n.jsx("span",{className:"button__right",children:De(d)})]}),jt=!!l&&!X;return n.jsxs(n.Fragment,{children:[n.jsxs(jt?"a":"button",{...it,ref:Ae,...jt?{href:l,target:i,rel:u??(i==="_blank"?"noreferrer":void 0)}:{type:s??"button",disabled:X&&!T&&!we},className:yt,"aria-pressed":wt,"aria-expanded":typeof v=="boolean"?v:F["aria-expanded"],"aria-controls":k??F["aria-controls"],"aria-label":ut,"aria-disabled":X&&(jt||T||we)?!0:void 0,"aria-describedby":ue,style:be,onClick:Lt,onMouseLeave:Bt,onPointerEnter:je=>{Un(je)||It(),!X&&typeof F.onPointerEnter=="function"&&F.onPointerEnter(je)},onPointerLeave:je=>{Un(je)||xt(),!X&&typeof F.onPointerLeave=="function"&&F.onPointerLeave(je)},onPointerUp:je=>{X&&lt&&Ct.touchPress(je.currentTarget),!X&&typeof F.onPointerUp=="function"&&F.onPointerUp(je)},onFocus:je=>{qe(!0),ea()||It(),!X&&typeof F.onFocus=="function"&&F.onFocus(je)},onBlur:je=>{qe(!1),X||Dt(je),xt(),!X&&typeof F.onBlur=="function"&&F.onBlur(je)},children:[pt(),St?n.jsx("span",{id:Ye,hidden:!0,"aria-label":St}):null]}),st&&I?n.jsx(qn,{anchorRect:gt,title:I.title,items:I.items,onClose:Ge}):st&&_t?n.jsx(Mn,{anchorRect:gt,text:_t,onClose:Ge}):null]})}const fe=o.forwardRef(Ay);fe.displayName="Button";function Rt(e,t,a){const r=o.useRef(null);return o.useLayoutEffect(()=>{const s=r.current?.parentElement??null;return t(s,e),()=>a(s)},[e,t,a]),r}const Oa={title:"--promo-banner-bg-title",description:"--promo-banner-bg-description"},wo=new WeakMap;function Bo(e){if(e)return wo.get(e)}function tn(e,t){e&&(e.style.setProperty(Oa.title,t.title),e.style.setProperty(Oa.description,t.description),wo.set(e,t))}function nn(e){e&&(e.style.removeProperty(Oa.title),e.style.removeProperty(Oa.description),wo.delete(e))}const di={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"default"};function pi(){const e=Rt(di,tn,nn);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-main","aria-hidden":"true"})}const hi={title:"var(--color-main)",description:"var(--color-gray)",actionVariant:"main"};function mi(){const e=Rt(hi,tn,nn);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-soft","aria-hidden":"true"})}const Ci={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function fi(){const e=Rt(Ci,tn,nn);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-sub","aria-hidden":"true"})}const bi={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function gi(){const e=Rt(bi,tn,nn);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-deep","aria-hidden":"true"})}const yi={title:"var(--color-darkSub)",description:"var(--color-gray)",actionVariant:"main"};function vi(){const e=Rt(yi,tn,nn);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-soft-sub","aria-hidden":"true"})}const _i={title:"var(--color-black)",description:"var(--color-darkGray)",actionVariant:"main"};function xi(){const e=Rt(_i,tn,nn);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-warm","aria-hidden":"true"})}const wi={title:"var(--color-white)",description:"var(--color-lightGray)",actionVariant:"main"};function Bi(){const e=Rt(wi,tn,nn);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-dark","aria-hidden":"true"})}const ki={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function Ai(){const e=Rt(ki,tn,nn);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-radial","aria-hidden":"true"})}const Ni={title:"var(--color-darkMain)",description:"var(--color-gray)",actionVariant:"main"};function Ei(){const e=Rt(Ni,tn,nn);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-diagonal","aria-hidden":"true"})}const Di={title:"var(--color-darkSub)",description:"var(--color-gray)",actionVariant:"main"};function Si(){const e=Rt(Di,tn,nn);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-dots","aria-hidden":"true"})}const ji={title:"var(--color-black)",description:"var(--color-gray)",actionVariant:"main"};function Ti(){const e=Rt(ji,tn,nn);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 Mi={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function Li(){const e=Rt(Mi,tn,nn);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-success","aria-hidden":"true"})}const $i={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"sub"};function Ri(){const e=Rt($i,tn,nn);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-naver","aria-hidden":"true"})}const Pi={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"transparent-white"};function Fi(){const e=Rt(Pi,tn,nn);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-instagram","aria-hidden":"true"})}const sn=(e,t,a)=>({key:e,get label(){return Kt.t(`promoBannerBg.${e}`,t)},textTone:a}),Ny=[sn("main","\uBA54\uC778 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),sn("soft","\uC18C\uD504\uD2B8","dark"),sn("sub","\uC11C\uBE0C \uCEEC\uB7EC","light"),sn("deep","\uB525 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),sn("softSub","\uC18C\uD504\uD2B8 \uC11C\uBE0C","dark"),sn("warm","\uC6DC(\uAC15\uC870)","dark"),sn("dark","\uB2E4\uD06C","light"),sn("radial","\uBC29\uC0AC\uD615 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),sn("diagonal","\uB300\uAC01\uC120 \uD328\uD134","dark"),sn("dots","\uB3C4\uD2B8 \uD328\uD134","dark"),sn("outline","\uC544\uC6C3\uB77C\uC778","dark"),sn("success","\uC131\uACF5/\uC644\uB8CC","light"),sn("naver","\uB124\uC774\uBC84 \uBE14\uB85C\uADF8 \uC548\uB0B4","light"),sn("instagram","\uC778\uC2A4\uD0C0\uADF8\uB7A8 \uC548\uB0B4","light")],Ii={main:pi,soft:mi,sub:fi,deep:gi,softSub:vi,warm:xi,dark:Bi,radial:Ai,diagonal:Ei,dots:Si,outline:Ti,success:Li,naver:Ri,instagram:Fi};function Oi({storageKey:e="fontScale",baseFont:t=20,minScale:a=.8,maxScale:r=1.4,step:s=.1,lineHeightRatio:l=1.4}={}){const i=w=>Math.max(a,Math.min(r,Number(w))),u=w=>{try{const v=localStorage.getItem(w),k=v?Number(v):1;return Number.isFinite(k)?i(k):i(1)}catch{return i(1)}},[c,d]=o.useState(()=>u(e)),[h,p]=o.useState(e);h!==e&&(p(e),d(u(e))),o.useEffect(()=>{try{localStorage.setItem(e,String(c))}catch{}},[e,c]);const m=w=>{d(typeof w=="function"?v=>i(w(v)):i(w))},g=()=>m(w=>+(w+s).toFixed(6)),y=()=>m(w=>+(w-s).toFixed(6)),C=c<r-Number.EPSILON,f=c>a+Number.EPSILON,_=Math.round(t*c),b=Math.round(_*l);return{scale:c,setScale:m,increase:g,decrease:y,canIncrease:C,canDecrease:f,fontSize:_,lineHeight:b}}function zi(e,t){const a=Ia(t);o.useEffect(()=>{const r=()=>a.current();try{window.addEventListener(e,r)}catch{}return()=>{try{window.removeEventListener(e,r)}catch{}}},[e,a])}const ko=" \xB7 ",Wi=(()=>{if(typeof document>"u")return"";const e=document.title;return e.includes(ko)?e.split(ko).pop()??e:e})(),Ey=o.createContext(!1),ta=[];let Hi=null;function Dy(e){const t=o.useContext(Ey);o.useEffect(()=>{if(t||typeof e!="string"||!e)return;ta.length===0&&(Hi=document.title);const a={text:Wi?`${e}${ko}${Wi}`:e};return ta.push(a),document.title=a.text,()=>{const r=ta.lastIndexOf(a);r>=0&&ta.splice(r,1),document.title=ta.length?ta[ta.length-1].text:Hi??document.title}},[e,t])}const Ao=[{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"}],Sy=(()=>{let e=null;return()=>(e||(e=new Intl.Collator("ko")),e)})();function fn(e,t){return Sy().compare(e,t)}const br=new Map;function jy(e){const t=br.get(e);if(t)return t;const a=[],r=/-?\d+(?:\.\d+)?/g;let s=0;for(let l=r.exec(e);l;l=r.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&&a.push(e.slice(s,i)),a.push(Number(u)),s=l.index+l[0].length}return s<e.length&&a.push(e.slice(s)),br.size>5e3&&br.clear(),br.set(e,a),a}function Ty(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 My(e,t){const a=d=>d==null||typeof d=="number"&&Number.isNaN(d)?"":String(d).trim(),r=a(e),s=a(t);if(r===s)return 0;const l=(d,h)=>{if(typeof d=="number"&&!Number.isNaN(d))return[d];const p=Ty(h);return p!==null?[p]:jy(h)},i=l(e,r),u=l(t,s),c=Math.min(i.length,u.length);for(let d=0;d<c;d++){const h=i[d],p=u[d];if(typeof h=="number"&&typeof p=="number"){if(h!==p)return h-p;continue}if(typeof h=="number")return-1;if(typeof p=="number")return 1;const m=fn(h,p);if(m!==0)return m}return i.length!==u.length?i.length-u.length:fn(r,s)}const Vi=e=>e==null||typeof e=="number"&&Number.isNaN(e)||typeof e=="string"&&e.trim()==="";function gr(e,t,a){const r=Vi(e),s=Vi(t);if(r||s)return r===s?0:r?1:-1;const l=My(e,t);return a?l:-l}function Ly(e,t,a){const{t:r}=_e.useTranslation(),[s,l]=o.useState(()=>{const y=a?.initialPageSize;return y&&Ao.some(C=>C.value===y)?y:"25"}),[i,u]=o.useState(1),[c,d]=o.useState(t);Object.is(c,t)||(d(t),i!==1&&u(1));const h=o.useMemo(()=>Ao.map(y=>({...y,label:r("visits.showN",{n:y.value})})),[r]),p=o.useCallback(y=>{Ao.some(C=>C.value===y)&&(l(y),u(1))},[]),m=Math.max(1,Math.ceil(e.length/Number(s))),g=Math.min(Math.max(1,Number.isFinite(i)?Math.floor(i):1),m);return i!==g&&u(g),{pageRows:o.useMemo(()=>e.slice((g-1)*Number(s),g*Number(s)),[e,g,s]),pageSizeProps:{options:h,value:s,onChange:p},paginationProps:{page:g,total:m,onChange:u},setPage:u}}function $y(e){const[t,a]=o.useState(()=>e?.defaultKey!=null?{key:e.defaultKey,asc:e.defaultAsc??!0}:null),r=o.useRef(t),s=o.useRef(e?.onSortChange);s.current=e?.onSortChange;const l=o.useCallback(c=>{const d=r.current,h=d?.key===c?{key:c,asc:!d.asc}:{key:c,asc:!0};r.current=h,a(h),s.current?.(h)},[]),i=o.useCallback((c,d)=>({label:c,sortDir:t?.key===d?t.asc?"asc":"desc":null,onClick:()=>l(d)}),[t,l]),u=o.useCallback((c,d)=>{if(!t)return c;const{key:h,asc:p}=t;return[...c].sort((m,g)=>gr(d(m,h),d(g,h),p))},[t]);return{sort:t,field:i,sortRows:u}}const kn="\uC804\uCCB4";Object.fromEntries(Object.entries(df).map(([e,{nucleus:t}])=>[e,t]));const Ry={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"})},Py={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"})},Fy={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 Iy(e,t){if("place"in t)return Ry[t.place](e);const a=Py[t.vowel](e);return t.glide?`${a} \xB7 ${Fy[t.glide](e)}`:a}const Oy=(e,{defaultValue:t})=>t,qi=(e,t)=>({jamos:e,phonetic:t,tooltip:Iy(Oy,t)}),Ln=(e,t)=>t.map(a=>qi([a],{place:e})),Yt=(e,t,a)=>qi([...e],a?{vowel:t,glide:a}:{vowel:t}),No={cho:[Ln("labial",["\u3142","\u3143","\u314D","\u3141"]),Ln("alveolar",["\u3137","\u3138","\u314C","\u3134","\u3139"]),Ln("alveolar",["\u3145","\u3146"]),Ln("palatal",["\u3148","\u3149","\u314A"]),Ln("velar",["\u3131","\u3132","\u314B"]),Ln("glottal",["\u314E"])],jung:[[Yt("\u3163","frontHigh"),Yt("\u315F","frontHigh","w"),Yt("\u3162","frontHigh","velar")],[Yt("\u3161","backHighUnrounded")],[Yt("\u315C","backHighRounded"),Yt("\u3160","backHighRounded","j")],[Yt("\u3154\u3150","frontMid"),Yt("\u3156\u3152","frontMid","j"),Yt("\u3159\u315A\u315E","frontMid","w")],[Yt("\u3153","backMidUnrounded"),Yt("\u3155","backMidUnrounded","j"),Yt("\u315D","backMidUnrounded","w")],[Yt("\u3157","backMidRounded"),Yt("\u315B","backMidRounded","j")],[Yt("\u314F","low"),Yt("\u3151","low","j"),Yt("\u3158","low","w")]],jong:[Ln("labial",["\u3142","\u3141"]),Ln("alveolar",["\u3137","\u3134","\u3139"]),Ln("velar",["\u3131","\u3147"])]},zy=e=>e===Wy?[]:Array.from(e),Wy="__NO_CODA__",Eo=e=>e.map(t=>t.map(({jamos:a,phonetic:r,tooltip:s})=>({v:a.join(""),phonetic:r,tooltip:s}))),Ui={cho:Eo(No.cho),jung:Eo(No.jung),jong:Eo(No.jong)};Ui.jung.flat().forEach(({v:e})=>{for(const t of zy(e));}),new Set(Ui.cho.flat().map(e=>e.v));function Hy(e,t=!0){const a=Ia(e);o.useEffect(()=>{if(t)return Qn(()=>{a.current?.()})},[t,a])}function za(){const[e,t]=o.useState(null),a=o.useCallback(l=>t(l.getBoundingClientRect()),[]),r=o.useCallback(()=>t(null),[]),s=o.useCallback(l=>{const i=l.getBoundingClientRect();t(u=>u?null:i)},[]);return{anchorRect:e,isOpen:e!=null,openAt:a,close:r,toggleAt:s}}function Vy(e){const[t,a]=o.useState(null),[r,s]=o.useState(null),l=o.useRef(null);o.useEffect(()=>()=>{l.current&&clearTimeout(l.current)},[]);const i=o.useCallback((c,d)=>{l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{a(c),s(d)},e)},[e]),u=o.useCallback(()=>{l.current&&clearTimeout(l.current),a(null),s(null)},[]);return{payload:t,anchorRect:r,openAfterDelay:i,close:u}}function Gi(e="warning"){const[t,a]=o.useState(""),[r,s]=o.useState(e),[l,i]=o.useState(0),u=o.useCallback((p,m)=>{s(m),a(p),i(g=>g+1)},[]),c=o.useCallback(p=>u(p,"warning"),[u]),d=o.useCallback(p=>u(p,"normal"),[u]),h=o.useCallback(()=>a(""),[]);return{toastMessage:t,toastType:r,toastKey:l,showToast:u,showWarning:c,showNormal:d,clearToast:h}}function Wa(e){let t=0;if(e&&typeof window<"u"&&typeof window.getComputedStyle=="function")for(let a=e;a&&a!==document.body&&a!==document.documentElement;a=a.parentElement){const r=parseInt(window.getComputedStyle(a).zIndex,10);!Number.isNaN(r)&&r>t&&(t=r)}return t>0?`max(var(--z-menu, 1500), ${t+1})`:"var(--z-menu, 1500)"}function Ha({computeStyle:e,onScroll:t="close",onResize:a="close",ignoreOutsideClickSelector:r}){const[s,l]=o.useState(!1),[i,u]=o.useState({position:"fixed"}),c=o.useRef(null),d=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 g=d.current?.offsetHeight??0;g>0&&h();let y=0,C=null;typeof ResizeObserver<"u"&&d.current&&(C=new ResizeObserver(()=>{const A=d.current?.offsetHeight??0;if(A!==g){if(g=A,++y>4){C?.disconnect(),C=null;return}h()}}),C.observe(d.current));const f=A=>{const B=A.target;r&&B.closest?.(r)||c.current?.contains(B)||d.current?.contains(B)||l(!1)};document.addEventListener("mousedown",f),document.addEventListener("pointerdown",f);let _=null;const b=()=>{if(typeof requestAnimationFrame>"u"){h();return}_===null&&(_=requestAnimationFrame(()=>{_=null,h()}))},w=A=>{d.current?.contains(A.target)||(t==="reposition"?b():t==="close"&&l(!1))};t!=="ignore"&&window.addEventListener("scroll",w,!0);const v=()=>{a==="reposition"?b():a==="close"&&l(!1)};let k=null;const x=()=>{v(),k&&clearTimeout(k),k=setTimeout(()=>{k=null,a==="reposition"&&h()},250)};return a!=="ignore"&&(window.addEventListener("resize",v),window.addEventListener("orientationchange",x)),()=>{_!==null&&cancelAnimationFrame(_),C?.disconnect(),document.removeEventListener("mousedown",f),document.removeEventListener("pointerdown",f),t!=="ignore"&&window.removeEventListener("scroll",w,!0),a!=="ignore"&&(window.removeEventListener("resize",v),window.removeEventListener("orientationchange",x)),k&&clearTimeout(k)}},[s,h,t,a,r]),o.useEffect(()=>{if(s)return Qn(()=>l(!1))},[s]);const p=o.useCallback(()=>l(g=>!g),[]),m=o.useCallback(()=>l(!1),[]);return{open:s,setOpen:l,toggle:p,close:m,style:i,triggerRef:c,menuRef:d}}function qy(e,{mode:t="playback",autoStart:a=!1,onPlaySpeaker:r,onComplete:s,playMs:l=1100,feedbackMs:i=1500}={}){const[u,c]=o.useState([]),[d,h]=o.useState(0),[p,m]=o.useState("idle"),[g,y]=o.useState(null),[C,f]=o.useState([]),[_,b]=o.useState(null),[w,v]=o.useState(0),k=o.useRef(0),x=o.useCallback(R=>{k.current=typeof R=="function"?R(k.current):R,v(k.current)},[]),A=o.useRef(r),B=o.useRef(s);o.useEffect(()=>{A.current=r,B.current=s},[r,s]);const E=o.useRef([]),D=()=>{E.current.forEach(clearTimeout),E.current=[]},N=(R,q)=>{E.current.push(setTimeout(q,R))};o.useEffect(()=>()=>D(),[]);const $=u[d]?.id??null,L=o.useRef(null),U=o.useCallback(()=>{D(),m("playing"),f([]),b(null),x(0);let R=0;e.forEach((q,Z)=>{N(R,()=>{h(Z),y(q.id),A.current?.(q)}),N(R+1e3,()=>{y(null),f(z=>[...z,q.id])}),R+=1300}),N(R,()=>{m("done"),B.current?.({score:0,total:e.length})})},[e,x]),M=o.useCallback((R,q)=>{if(q>=R.length){m("done"),B.current?.({score:k.current,total:R.length});return}L.current=null,h(q),b(null),m("playing"),y(R[q].id),A.current?.(R[q]),N(l,()=>{y(null),m("waiting")})},[l]),P=o.useCallback(()=>{D();const R=Ra(e);c(R),x(0),f([]),M(R,0)},[e,M,x]),T=o.useCallback(()=>{t==="playback"?(c(e),U()):P()},[t,e,U,P]),ee=o.useCallback(()=>{D(),m("idle"),y(null),f([]),b(null),h(0),x(0),c([])},[x]),te=JSON.stringify(e.map(R=>[R.id,R.label,R.angleDeg,R.deg,R.row,R.shortcut]));o.useEffect(()=>(a?T():ee(),()=>D()),[t,te,a]);const I=o.useCallback(R=>{p!=="waiting"||t==="playback"||L.current===d||(L.current=d,b(R),R===u[d]?.id&&x(q=>q+1),t==="exam"?(m("playing"),N(400,()=>M(u,d+1))):(m("feedback"),N(i,()=>M(u,d+1))))},[p,t,u,d,M,i,x]),Y=t==="playback"?e.length:u.length;return{bind:{activeSpeakerId:g,playedIds:C,selectedId:_,answerId:$,showFeedback:p==="feedback",clickable:p==="waiting",onSelectSpeaker:I},index:d,total:Y,score:w,phase:p,done:p==="done",start:T,reset:ee}}const Do=new Map,So=new Map,Uy=()=>()=>{},Gy=()=>!0,Ky=()=>!1;function Ki(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 a=Uint8Array.from(atob(t[2]),r=>r.charCodeAt(0));return new TextDecoder("utf-8").decode(a)}catch{return null}}function Yy(e){if(typeof window>"u")return"";const t=(a,r)=>{const s=r.attrName.toLowerCase(),l=r.attrValue.trim();(s==="href"||s==="xlink:href")&&!l.startsWith("#")&&(r.keepAttr=!1),(s==="style"||l.includes("\\")&&l.includes("("))&&(r.keepAttr=!1);const i=l.replace(/url\s*\(\s*(['"]?)#[^)\s'"]+\1\s*\)/gi,"");/url\s*\(/i.test(i)&&(r.keepAttr=!1)};da.addHook("uponSanitizeAttribute",t);try{return da.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:["script","style","foreignObject"]})}finally{da.removeHook("uponSanitizeAttribute",t)}}function Zy(e,t){const a=new Set;for(const i of e.matchAll(/url\(\s*(['"]?)#([^)\s"']+)\1\s*\)/g))a.add(i[2]);for(const i of e.matchAll(/(?:xlink:)?href="#([^"]+)"/g))a.add(i[1]);const r=new Set([...e.matchAll(/id="([^"]*)"/g)].map(i=>i[1])),s=[...a].filter(i=>r.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"),(d,h)=>`url(${h}#${c}${h})`).replace(new RegExp(`((?:xlink:)?href)="#${u}"`,"g"),`$1="#${c}"`)}return l}function Xy(e){const t=So.get(e);if(t)return t;const a=fetch(e).then(r=>r.ok?r.text():null).then(r=>(r!=null&&Do.set(e,r),r)).catch(()=>null).finally(()=>{So.delete(e)});return So.set(e,a),a}function Jy(e,t=!0){const a=o.useSyncExternalStore(Uy,Gy,Ky)&&t&&e?Ki(e)??Do.get(e)??null:null,[r,s]=o.useState({src:e,enabled:t,svg:a});return o.useEffect(()=>{if(!t||!e){s({src:e,enabled:t,svg:null});return}const l=Ki(e)??Do.get(e)??null;if(l!==null){s({src:e,enabled:t,svg:l});return}let i=!0;return Xy(e).then(u=>{i&&s({src:e,enabled:t,svg:u})}),()=>{i=!1}},[e,t]),r.src===e&&r.enabled===t?r.svg:a}function Qy({title:e,description:t,actionLabel:a,onAction:r,bg:s,color:l,size:i="medium",actionVariant:u,titleColor:c,descriptionColor:d,className:h=""}){const p=s??l??"main",m=o.useRef(null),[g,y]=o.useState("main"),C=yn("(max-width: 767px)"),f=o.useRef({title:!1,description:!1});o.useLayoutEffect(()=>{const w=m.current;if(!w)return;const v=Bo(w),k=(x,A,B)=>{if(B!==void 0)w.style.setProperty(A,B),f.current[x]=!0;else if(f.current[x]){const E=v?.[x];E?w.style.setProperty(A,E):w.style.removeProperty(A),f.current[x]=!1}};k("title","--promo-banner-bg-title",c),k("description","--promo-banner-bg-description",d)},[c,d,p]),o.useLayoutEffect(()=>{const w=m.current;if(!w)return;const v=Bo(w);y(v?.actionVariant??"main")},[p]);const _=Be("promo-banner",`promo-banner--${i}`,h),b=Ii[p];return n.jsxs("div",{ref:m,className:_,role:"note",children:[n.jsx(b,{}),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})]}),a&&r&&n.jsx(fe,{htmlType:"button",size:40,variant:u??g,shape:"pill",useBorder:!0,onClick:r,ariaLabel:a,...C?{type:"dot",icon:"arrow-right"}:{rightIcon:"arrow-right",label:a,minWidth:140}})]})}function e2({children:e,interval:t=5e3,dotTone:a,className:r="","aria-label":s}){const{t:l}=_e.useTranslation(),i=s??l("topBanner.ariaLabel","\uBC30\uB108"),u=o.Children.toArray(e),c=u.length,[d,h]=o.useState(0),[p,m]=o.useState(!1),[g,y]=o.useState(!1),[C,f]=o.useState(!1),_=o.useRef(null),b=o.useRef(null),w=o.useRef(null),v=_o(),k=p||g||C,x=c>0?Math.min(d,c-1):0;o.useEffect(()=>{if(c<2||t<=0||k||v)return;const B=window.setInterval(()=>h(E=>(Math.min(E,c-1)+1)%c),t);return()=>window.clearInterval(B)},[c,t,k,v]);const A=B=>{b.current!=null&&window.clearTimeout(b.current),b.current=window.setTimeout(()=>{b.current=null,f(!1)},B)};return o.useEffect(()=>()=>{b.current!=null&&window.clearTimeout(b.current)},[]),o.useEffect(()=>{if(!C)return;const B=E=>{E.pointerType==="touch"&&(w.current&&w.current.contains(E.target)||(b.current!=null&&(window.clearTimeout(b.current),b.current=null),f(!1)))};return document.addEventListener("pointerdown",B,!0),()=>document.removeEventListener("pointerdown",B,!0)},[C]),c===0?null:n.jsxs("section",{ref:w,className:Be("top-banner",r),"aria-label":i,"aria-roledescription":"carousel",onPointerEnter:B=>{_.current=B.pointerType},onPointerDown:B=>{_.current=B.pointerType,B.pointerType==="touch"&&(b.current!=null&&(window.clearTimeout(b.current),b.current=null),f(!0))},onPointerUp:B=>{B.pointerType==="touch"&&A(5e3)},onPointerCancel:B=>{B.pointerType==="touch"&&A(5e3)},onMouseEnter:()=>{_.current!=="touch"&&m(!0)},onMouseLeave:()=>m(!1),onFocus:B=>{let E=!0;try{E=B.target.matches(":focus-visible")}catch{E=!0}y(E)},onBlur:B=>{B.currentTarget.contains(B.relatedTarget)||y(!1)},children:[n.jsx("div",{className:"top-banner__viewport",children:n.jsx("div",{className:"top-banner__track",style:{transform:`translateX(-${x*100}%)`},children:u.map((B,E)=>n.jsx("div",{className:"top-banner__slide","aria-hidden":E!==x,...E!==x?{inert:!0}:{},children:B},E))})}),c>1&&n.jsx("div",{className:`top-banner__dots${(a?.[x]??"light")==="dark"?" top-banner__dots--dark":""}`,children:u.map((B,E)=>n.jsx("button",{type:"button",className:`top-banner__dot${E===x?" 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===x,onClick:()=>h(E)},E))})]})}function t2({title:e,body:t,open:a=!1,onToggle:r,avatar:s,titleClassName:l="body-2",bodyClassName:i="body-2",className:u=""}){const{t:c}=_e.useTranslation();return n.jsxs("div",{className:`accordion-item ${a?"accordion-item--open":""} ${u}`.trim(),role:"listitem",children:[n.jsxs("div",{className:"accordion-item__header",role:"button",tabIndex:0,"aria-expanded":a,"data-accordion-header":!0,onClick:r,onKeyDown:d=>{if(d.key==="Enter"||d.key===" ")d.preventDefault(),r?.();else if(d.key==="ArrowDown"||d.key==="ArrowUp"){d.preventDefault();const h=d.currentTarget.closest('[role="list"]');if(!h)return;const p=Array.from(h.querySelectorAll("[data-accordion-header]")),m=p.indexOf(d.currentTarget);(d.key==="ArrowDown"?p[m+1]:p[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(ot,{icon:a?"chevron-up":"chevron-down",label:a?c("accordion.collapse","\uC811\uAE30"):c("accordion.expand","\uD3BC\uCE58\uAE30"),className:"accordion-item__chevron-icon",imgClassName:"accordion-item__chevron-image"})})]}),a&&n.jsx("div",{className:`accordion-item__body ${i}`,children:typeof t=="string"?n.jsx("p",{children:t}):t})]})}function n2({items:e=[],defaultOpenIndex:t=0,size:a=72,className:r="",bodyClassName:s}){const[l,i]=o.useState({index:t}),u=(c,d)=>l.id!=null&&c.id!=null?c.id===l.id:l.id==null&&d===l.index;return n.jsx("div",{className:`accordion-group accordion-group--s${a} ${r}`.trim(),role:"list",children:e.map((c,d)=>n.jsx(t2,{title:c.title,body:c.body,avatar:c.avatar,open:u(c,d),onToggle:()=>i(u(c,d)?{index:-1}:{index:d,id:c.id}),bodyClassName:s},c.id??d))})}function a2(){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 r2(){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 o2(){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 Dn({children:e,icon:t,number:a,position:r="top-left",size:s=24,animate:l=!1,onClick:i,"aria-label":u,"aria-hidden":c,className:d=""}){const{t:h}=_e.useTranslation(),p=t??"check",m=a!==void 0,g=e!==void 0||m?"number":p,y=e!==void 0?void 0:m?h("badge.nthSelected",{n:a,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")}[p],C=c?void 0:u??y;return n.jsxs("span",{className:Be("circle-badge",`circle-badge--${g}`,`circle-badge--${s}`,`circle-badge--${r}`,l?"circle-badge--animate":"",i?"circle-badge--clickable":"",d),onClick:i,onKeyDown:i?f=>{f.key!=="Enter"&&f.key!==" "||(f.preventDefault(),f.currentTarget.click())}:void 0,"aria-label":C,"aria-hidden":c||void 0,role:i?"button":C?"img":void 0,tabIndex:i?0:void 0,children:[e??(m?a:null),e===void 0&&!m&&p==="check"&&n.jsx(a2,{}),e===void 0&&!m&&p==="remove"&&n.jsx(r2,{}),e===void 0&&!m&&p==="minus"&&n.jsx(o2,{})]})}function Va({columns:e=[],onClose:t,className:a="",size:r="medium"}){const{t:s}=_e.useTranslation(),l=r==="small"?40:48,[i,u]=o.useState([]),c=o.useMemo(()=>{const f=[{title:null,columns:e}];let _=e;for(const b of i){const w=_?.[b.ci]?.items?.[b.ii];if(!w||!Array.isArray(w.children)||!w.children.length)break;_=[{title:null,items:w.children}],f.push({title:w.label||null,columns:_})}return f},[e,i]),d=c[c.length-1],h=c.length-1,p=o.useCallback(()=>u(f=>f.slice(0,Math.max(0,Math.min(f.length,h)-1))),[h]),m=o.useRef(null),g=o.useRef(null),y=c.length;o.useEffect(()=>{g.current||(g.current=document.activeElement);let f=0,_=0;const b=()=>{const w=m.current?.querySelector("button:not([disabled])");if(w&&w.offsetParent){w.focus({preventScroll:!0});return}_++<20&&(f=requestAnimationFrame(b))};return f=requestAnimationFrame(b),()=>cancelAnimationFrame(f)},[y]),o.useEffect(()=>()=>{g.current?.focus?.({preventScroll:!0})},[]);const C=o.useCallback((f,_,b)=>{if(f){if(Array.isArray(f.children)&&f.children.length){u(w=>[...w.slice(0,h),{ci:_,ii:b}]);return}try{typeof f.onClick=="function"&&f.onClick()}catch{}try{f&&f.closeOnSelect&&typeof t=="function"&&t()}catch{}}},[t,h]);return n.jsxs("div",{className:se(`menu-tooltip menu-tooltip--${r} ${a}`),children:[(c.length>1||d.title)&&n.jsxs("div",{className:se("menu-tooltip__header"),children:[c.length>1?n.jsx(fe,{htmlType:"button",size:l,type:"dot",icon:"chevron-left",ariaLabel:s("common.back","\uB4A4\uB85C"),onClick:p,variant:"transparent-gray",useBorder:!1}):null,n.jsx("div",{className:se("menu-tooltip__title button-1"),children:d.title})]}),n.jsx("div",{className:se("menu-tooltip__columns"),ref:m,children:d.columns&&d.columns.map((f,_)=>{const b=(f.items||[]).some(w=>!!w.icon||w.selected!==void 0);return n.jsxs("div",{className:se("menu-tooltip__column"),children:[f.title?n.jsx("div",{className:se("menu-tooltip__column-title body-3"),children:f.title}):null,n.jsx("div",{className:se("menu-tooltip__items"),children:(f.items||[]).map((w,v)=>n.jsxs(o.Fragment,{children:[w.separatorBefore&&v>0&&n.jsx("div",{className:se("menu-tooltip__separator"),role:"separator"}),n.jsx(fe,{htmlType:"button",className:se("menu-tooltip__item"),size:l,type:w.label?"bar":"dot",icon:w.selected?"check":w.icon||(b||!w.label?"none":void 0),rightIcon:Array.isArray(w.children)&&w.children.length?"chevron-right":w.badgeCount?n.jsx(Dn,{position:"inline",number:Math.min(w.badgeCount,99),size:24,"aria-hidden":!0}):void 0,label:w.label,ariaLabel:w.label&&w.badgeCount&&w.badgeCount>0?s("nav.badgeLabel",{label:w.label,count:w.badgeCount,defaultValue:"{{label}}, {{count}}\uAC1C"}):w.label,onClick:()=>C(w,_,v),selected:w.selected,disabled:w.disabled,showTooltipInfo:w.tooltip||!1,useBorder:!1,align:"left"})]},v))})]},_)})})]})}const Yi=".content-area";function jo(e,t="Nav"){try{const a=typeof e=="string"?document.querySelector(e):e?.current??document.querySelector(Yi);if(a){a.scrollTop=0;return}const r=document.scrollingElement??document.documentElement;r&&r.scrollHeight<=r.clientHeight&&At("nav-scroll-container",`[${t}] \uBCF8\uBB38\uC744 \uB9E8 \uC704\uB85C \uB418\uB3CC\uB9B4 \uD1B5\uC744 \uBABB \uCC3E\uC558\uB2E4(\uAE30\uBCF8 ${Yi}) \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 To=52,yr=10,Zi=e=>e&&e>0?e:0;function Xi({items:e=[],activeKey:t,onChange:a,appMode:r,onAppModeChange:s,moreItems:l=[],scrollContainer:i}){const{t:u}=_e.useTranslation(),c=r==="manager"?"malgwi":"manager",d=r==="manager"?"arrow-left":"arrow-right",h=r==="manager"?u("nav.modeLabelMalgwi","\uB9D0\uADC0"):u("nav.modeLabelManager","\uB9D0\uADC0 \uB9E4\uB2C8\uC800"),p=o.useRef(null),[m,g]=o.useState(0),y=e.length;o.useEffect(()=>{const R=p.current;if(!R)return;const q=()=>{const j=typeof getComputedStyle=="function"?getComputedStyle(R):null,F=R.clientWidth-(parseFloat(j?.paddingLeft??"")||0)-(parseFloat(j?.paddingRight??"")||0),O=R.querySelector(".bottom-nav__left"),G=O?.nextElementSibling,ie=(O?.offsetWidth??0)+(O&&G?.classList.contains("bottom-nav__divider")?G.offsetWidth:0);g(Math.max(0,F-ie))};if(q(),typeof ResizeObserver>"u")return;const Z=new ResizeObserver(q);Z.observe(R);const z=R.querySelector(".bottom-nav__left");return z&&Z.observe(z),()=>Z.disconnect()},[s]);const C=To+1,f=R=>Math.max(0,Math.floor((R+yr)/(To+yr))),_=y*(To+yr)-yr<=m,b=m<=0||l.length===0&&_?y:Math.min(y,f(m-C)),w=m>0&&b<y,v=w?b:y,k=e.slice(0,v),x=e.slice(v),A=w||l.length>0,B=o.useCallback((R,q)=>({position:"fixed",bottom:window.innerHeight-R.top+8,right:window.innerWidth-R.right,zIndex:Wa(q)}),[]),E=o.useId(),{open:D,toggle:N,close:$,style:L,triggerRef:U,menuRef:M}=Ha({computeStyle:B,onScroll:"ignore",onResize:"reposition"}),P=o.useCallback((R,q)=>q>0?u("nav.badgeLabel",{label:R,count:q,defaultValue:"{{label}}, {{count}}\uAC1C"}):R,[u]),T=o.useCallback((R,q)=>q>0?u("nav.badgeInsideLabel",{label:R,count:q,defaultValue:"{{label}}, \uC548\uC5D0 \uC54C\uB9BC {{count}}\uAC1C"}):R,[u]),ee=o.useCallback(()=>s?.(c),[s,c]),te=o.useMemo(()=>x.find(R=>!!R.key&&R.key===t)??l.find(R=>R.selected||R.key&&R.key===t),[x,t,l]),I=o.useMemo(()=>[{items:[...x.map(R=>({label:R.label,icon:R.icon,badgeCount:R.badgeCount,selected:!!R.key&&R.key===t,closeOnSelect:!0,disabled:R.state==="disabled",onClick:()=>{R.state!=="disabled"&&(R.key&&a&&(a(R.key),jo(i,"BottomNav")),$())}})),...l.map(R=>({label:R.label,icon:R.icon,badgeCount:R.badgeCount,selected:R.selected??(!!R.key&&R.key===t),closeOnSelect:!0,onClick:()=>{R.onClick?.(),$()}}))]}],[x,l,t,a,$]),Y=[...x,...l].reduce((R,q)=>R+Zi(q.badgeCount),0);return n.jsxs("nav",{className:"bottom-nav",ref:p,"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(fe,{htmlType:"button",size:52,type:"dot",icon:d,ariaLabel:h,className:"bottom-nav-item",onClick:ee})}),n.jsx("div",{className:"bottom-nav__divider","aria-hidden":"true"})]}),n.jsx("div",{className:"bottom-nav__items",children:k.map((R,q)=>{const Z=Zi(R.badgeCount);return n.jsxs("span",{className:"bottom-nav__slot",children:[n.jsx(fe,{htmlType:"button",size:52,type:"dot",icon:R.icon,ariaLabel:P(R.label,Z),selected:!!R.key&&R.key===t,disabled:R.state==="disabled",className:"bottom-nav-item",onClick:()=>{R.key&&(a?.(R.key),jo(i,"BottomNav"))}}),Z>0&&n.jsx("span",{"aria-hidden":"true",children:n.jsx(Dn,{position:"top-right",number:Math.min(Z,99),size:24})})]},R.key??`__slot-${q}`)})}),A&&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:U,className:"bottom-nav__slot",children:[n.jsx(fe,{htmlType:"button",size:52,type:"dot",icon:te?.icon??"ellipsis",ariaLabel:T(te?.label??u("nav.more","\uB354\uBCF4\uAE30"),Y),selected:!!te,className:"bottom-nav-item",onClick:N,"aria-expanded":D,"aria-controls":D?E:void 0}),Y>0&&n.jsx("span",{"aria-hidden":"true",children:n.jsx(Dn,{position:"top-right",number:Math.min(Y,99),size:24})}),D&&hn.createPortal(n.jsx("div",{id:E,role:"group","aria-label":u("nav.moreMenu","\uB354\uBCF4\uAE30 \uBA54\uB274"),className:se("tooltip__content"),style:L,ref:M,children:n.jsx(Va,{columns:I,onClose:$})}),document.body)]})})]})]})}function Ji(e){if(typeof e!="string")return!1;let t="";for(const r of e){const s=r.charCodeAt(0);s<=32||s>=127&&s<=159||(t+=r)}if(!t)return!1;const a=/^([a-zA-Z][a-zA-Z0-9+.-]*):/.exec(t);return a?["http","https","mailto","tel"].includes(a[1].toLowerCase()):!0}function Qi(e,t,a){return a&&a>0?e("nav.badgeLabel",{label:t,count:a,defaultValue:"{{label}}, {{count}}\uAC1C"}):t}function s2(e){const{t}=_e.useTranslation(),{activeKey:a,unreadCount:r,onDebug:s,onNotification:l,onSetting:i,onHelp:u,onFeedback:c,onAccount:d}=e||{},h="default";return s||l||i||u||c||d?n.jsxs("div",{className:"side-nav__footer",children:[s&&n.jsx(fe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"terminal",ariaLabel:t("nav.debug","\uB514\uBC84\uADF8"),onClick:s,selected:a==="debug"}),l&&n.jsxs("span",{className:"side-nav__notification-wrap",children:[n.jsx(fe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"bell",ariaLabel:Qi(t,t("nav.notifications","\uC54C\uB9BC"),r),onClick:l,selected:a==="notifications"}),!!r&&r>0&&n.jsx(Dn,{number:Math.min(r,99),size:24,"aria-hidden":!0})]}),i&&n.jsx(fe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"settings",ariaLabel:t("nav.settings","\uC124\uC815"),onClick:i,selected:a==="settings"}),u&&n.jsx(fe,{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:a==="help"}),c&&n.jsx(fe,{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:a==="feedback"}),d&&n.jsx(fe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"user-round",ariaLabel:t("nav.account","\uACC4\uC815"),onClick:d,selected:a==="account"})]}):null}function eu(e){const{t}=_e.useTranslation(),{item:a,itemKey:r,label:s,icon:l,active:i,onClick:u,style:c,state:d,labelStyle:h}=e||{},p=a?.key??r??"",m=a?.label??s??"",g=a?.icon??l??"",y=a?.badge??0,C=n.jsx("span",{className:"side-nav__icon-wrap",children:n.jsx(ot,{icon:g,label:typeof m=="string"?m:void 0,className:"side-nav__icon",maskClassName:"side-nav__icon-image",imgClassName:void 0,svgClassName:void 0})}),f=d==="disabled",_=`side-nav__item ${i?"active":""} ${d||""} ${f?"disabled":""} ${a?.child?"side-nav__item--child":""}`,b=o.useCallback(w=>{if(f)return;const v=w.detail>0;if(v)try{w.currentTarget.blur()}catch{}u?.(p,w.currentTarget,v)},[f,p,u]);return n.jsxs("button",{type:"button",className:_,onClick:b,"aria-label":typeof m=="string"?Qi(t,m,y):void 0,"aria-current":i?"page":void 0,style:c,"aria-disabled":f,children:[C,n.jsx("span",{className:"side-nav__label button-1 f",style:h,children:m}),y>0&&n.jsx(Dn,{position:"inline",number:Math.min(y,99),size:24,"aria-hidden":!0}),d==="loading"&&n.jsx("span",{className:"side-nav__spinner",role:"img","aria-label":t("loader.loading","\uBD88\uB7EC\uC624\uB294 \uC911\u2026")})]})}function tu(e){const{t}=_e.useTranslation(),{items:a=[],activeKey:r,onChange:s,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:d,onHelp:h,onFeedback:p,appMode:m,onAppModeChange:g,scrollContainer:y}=e||{},C=m==="manager",f=o.useCallback(()=>g?.(C?"malgwi":"manager"),[g,C]),_=o.useRef(null),[b,w]=o.useState(null);o.useEffect(()=>{const B=_.current;if(!B)return;let E=null;const D=()=>{const{scrollHeight:L,clientHeight:U,scrollTop:M}=B;if(L<=U+1){w(I=>I===null?I:null);return}const P=Math.max(24,U/L*U),T=U-P,ee=L-U,te={top:Math.round(M/ee*T),height:Math.round(P)};w(I=>I&&I.top===te.top&&I.height===te.height?I:te)},N=()=>{if(typeof requestAnimationFrame>"u"){D();return}E===null&&(E=requestAnimationFrame(()=>{E=null,D()}))};D(),B.addEventListener("scroll",N,{passive:!0});const $=typeof ResizeObserver<"u"?new ResizeObserver(N):null;$?.observe(B);for(const L of Array.from(B.children))$?.observe(L);return()=>{E!==null&&cancelAnimationFrame(E),B.removeEventListener("scroll",N),$?.disconnect()}},[a]);const v=o.useRef(null),k=o.useCallback(B=>{const E=_.current;E&&(B.preventDefault(),v.current={y:B.clientY,top:E.scrollTop},B.currentTarget.setPointerCapture(B.pointerId))},[]),x=o.useCallback(B=>{const E=_.current,D=v.current;!E||!D||(E.scrollTop=D.top+(B.clientY-D.y)*(E.scrollHeight/E.clientHeight))},[]),A=o.useCallback(B=>{v.current=null,B.currentTarget.hasPointerCapture(B.pointerId)&&B.currentTarget.releasePointerCapture(B.pointerId)},[]);return n.jsxs("nav",{ref:_,"aria-label":t("nav.mainMenu","\uBA54\uC778 \uBA54\uB274"),className:"side-nav__menu",children:[b&&n.jsx("div",{className:"side-nav__scroll","aria-hidden":"true",children:n.jsx("div",{className:"side-nav__scroll-thumb",style:{top:b.top,height:b.height},onPointerDown:k,onPointerMove:x,onPointerUp:A,onPointerCancel:A})}),n.jsxs("div",{className:"side-nav__menu-list",children:[(a||[]).filter(B=>!B.section&&(B.key||B.label)).map((B,E)=>n.jsxs(o.Fragment,{children:[B.divider&&n.jsx("div",{className:"side-nav__separator"}),n.jsx(eu,{item:B,active:!!B.key&&B.key===r,state:B.disabled?"disabled":void 0,onClick:(D,N,$)=>{if(B.disabled)return;if(B.href){if(Ji(B.href)&&window.open(B.href,"_blank","noopener,noreferrer"),$)try{N?.blur()}catch{}return}if(s?.(B.key),jo(y,"SideNav"),!$)return;try{N?.blur()}catch{}if(typeof window<"u"&&window.matchMedia){if(!window.matchMedia("(min-width: 768px) and (max-width: 1023px)").matches)return}else return;const L=document.querySelector(".header");if(L){const U=typeof L.matches=="function";if(!(window.matchMedia("(hover: hover)").matches&&U&&L.matches(":hover"))){L.classList.add("header--force-collapsed");const M=()=>{L.classList.remove("header--force-collapsed"),L.removeEventListener("mouseenter",M)};L.addEventListener("mouseenter",M)}}}})]},B.key??`side-nav__item-${E}`)),g&&n.jsx("div",{className:"side-nav__separator side-nav__separator--short"}),g&&n.jsx(eu,{item:{key:"__mode-switch__",label:C?t("nav.goToMalgwi","\uB9D0\uADC0\uB85C \uC774\uB3D9"):t("nav.goToManager","\uB9D0\uADC0\uB9E4\uB2C8\uC800\uB85C \uC774\uB3D9"),icon:C?"arrow-left":"arrow-right"},onClick:f})]}),n.jsx(s2,{activeKey:r,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:d,onHelp:h,onFeedback:p})]})}var vr='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>',Mo='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>',l2='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 nu({appMode:e}){const{t}=_e.useTranslation(),a=e==="manager",r=a?Mo:vr,s=l2;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"}),n.jsx("img",{src:r,alt:a?t("header.logoManager","\uB9D0\uADC0\uB9E4\uB2C8\uC800 \uB85C\uACE0"):t("header.logoMalgwi","\uB9D0\uADC0 \uB85C\uACE0"),className:"brand-identity__image brand-identity__image--logo"})]})}function au({activeKey:e,onChange:t,items:a,malgwiItems:r,managerItems:s,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:d,onHelp:h,onFeedback:p,appMode:m,onAppModeChange:g,scrollContainer:y}){const{t:C}=_e.useTranslation(),f=yn("(max-width: 767px)"),_=o.useMemo(()=>(a??[]).filter(L=>!L.section&&(L.key||L.label)).map(L=>({key:L.key,label:typeof L.label=="string"?L.label:void 0,icon:L.icon,state:L.disabled?"disabled":void 0,badgeCount:L.badge})),[a]),b=o.useCallback(L=>{const U=a?.find(M=>M.key===L);if(!U?.disabled){if(U?.href){Ji(U.href)&&window.open(U.href,"_blank","noopener,noreferrer");return}t?.(L)}},[a,t]),w=o.useMemo(()=>{const L=[];return i&&L.push({key:"debug",icon:"terminal",label:C("nav.debug","\uB514\uBC84\uADF8"),onClick:i}),u&&L.push({key:"notifications",icon:"bell",label:C("nav.notifications","\uC54C\uB9BC"),badgeCount:l,onClick:u}),d&&L.push({key:"settings",icon:"settings",label:C("nav.settings","\uC124\uC815"),onClick:d}),h&&L.push({key:"help",icon:"message-circle-question-mark",label:C("nav.help","\uB3C4\uC6C0\uB9D0"),onClick:h}),p&&L.push({key:"feedback",icon:"bug",label:C("nav.feedback","\uBC84\uADF8\uC2E0\uACE0"),onClick:p}),c&&L.push({key:"account",icon:"user-round",label:C("nav.account","\uACC4\uC815"),onClick:c}),L},[C,i,u,d,h,p,c,l]),v=o.useCallback((L,U)=>({position:"fixed",top:L.bottom+8,right:Math.max(8,window.innerWidth-L.right),zIndex:Wa(U)}),[]),k=o.useId(),{open:x,toggle:A,close:B,style:E,triggerRef:D,menuRef:N}=Ha({computeStyle:v,onScroll:"ignore",onResize:"reposition"}),$=o.useMemo(()=>[{items:w.map(L=>({label:L.label,icon:L.icon,badgeCount:L.badgeCount,selected:L.selected??(!!L.key&&L.key===e),closeOnSelect:!0,onClick:()=>{L.onClick?.(),B()}}))}],[w,e,B]);return n.jsxs("aside",{className:`header${m==="manager"?" header--manager":""}`,children:[n.jsxs("div",{className:"header__bi",children:[n.jsx(nu,{appMode:m}),n.jsxs("div",{className:"header__menu-button",ref:D,children:[n.jsx(fe,{htmlType:"button",size:48,type:"dot",shape:"pill",variant:"default",useBorder:!1,icon:"menu",ariaLabel:u&&l&&l>0?C("nav.badgeInsideLabel",{label:C("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),count:l,defaultValue:"{{label}}, \uC548\uC5D0 \uC54C\uB9BC {{count}}\uAC1C"}):C("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),onClick:A,"aria-expanded":x,"aria-controls":x?k:void 0}),!!u&&!!l&&l>0&&n.jsx(Dn,{number:Math.min(l,99),size:24,"aria-hidden":!0}),x&&hn.createPortal(n.jsx("div",{id:k,role:"group","aria-label":C("header.utilMenu","\uC720\uD2F8\uB9AC\uD2F0 \uBA54\uB274"),className:se("tooltip__content"),style:E,ref:N,children:n.jsx(Va,{columns:$,onClose:B})}),document.body)]})]}),n.jsx(tu,{scrollContainer:y,items:a,activeKey:e??void 0,onChange:t,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:d,onHelp:h,onFeedback:p,appMode:m,onAppModeChange:g}),f&&n.jsx(Xi,{items:_,activeKey:e??void 0,onChange:b,scrollContainer:y,appMode:m,onAppModeChange:g})]})}const i2=au;function ln(e){const{type:t="dot",size:a,className:r="","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)&&At("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&&At("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:d="default",fill:h="filled",minWidth:p,iconLeft:m,iconRight:g,color:y}=e,C=t==="bar",f=typeof a=="number"?"medium":a??"medium",_=(C?{small:"caption-2",medium:"body-3",large:"body-2"}:{small:"caption-2b",medium:"body-3b",large:"body-2b"})[f]??(C?"body-2":"body-2b"),b={small:12,medium:14,large:16}[f]??14,w=Be("badge",C?"badge--bar":"",`badge--${d}`,`badge--${f}`,h!=="filled"?`badge--${h}`:"",_,r),v=y?.startsWith("--")?`var(${y})`:y,k=p!==void 0||v?{...p!==void 0?{minWidth:typeof p=="number"?`${p}px`:p}:{},...v?{"--badge-color":v}:{}}:void 0;return n.jsxs("span",{className:w,style:k,"aria-label":l?void 0:s,role:i??(s&&!l?"img":void 0),"aria-hidden":l||void 0,children:[m&&n.jsx(ot,{icon:m,size:b,className:"badge__icon"}),u??c,g&&n.jsx(ot,{icon:g,size:b,className:"badge__icon"})]})}const u2=()=>Kt.t("passCard.planSuffix","\uC774\uC6A9\uAD8C");function ru(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 ma(`${t.toLocaleString("ko-KR")}\uC6D0`)}return ma(typeof e=="number"?`${e.toLocaleString("ko-KR")}\uC6D0`:e)}}function c2(e){const t=`${e.code??""} ${e.name??""}`.toLowerCase();return/manager|매니저/.test(t)?"manager":"speechear"}function d2(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 a=e.name??"",r=a.match(/(\d+\s*(?:년|개월|주|일))\s*(?:이용권)?\s*$/);if(r)return r[1].replace(/\s+/g,"");const s=a.match(/(\d+)\s*-?\s*(day|year)s?\b/i);return s?s[2].toLowerCase()==="year"?`${s[1]}\uB144`:`${s[1]}\uC77C`:a||u2()}function p2(e){const t=(e??"").match(/(\d+)(d|y)\b/i);if(!t)return null;const a=Number(t[1]);return t[2].toLowerCase()==="y"?a*365:a}function ou(e){return{type:e.type??c2(e),plan:d2(e),label:e.label,price:ru(e.price),originalPrice:ru(e.originalPrice),discountLabel:e.discountLabel}}var h2='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>',m2='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>',su='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 na={text:"--pass-card-text",sub:"--pass-card-sub",copyright:"--pass-card-copyright"},Lo=new WeakMap;function C2(e){if(e)return Lo.get(e)}function $n(e,t){e&&(e.style.setProperty(na.text,t.text),e.style.setProperty(na.sub,t.sub),t.copyrightColor&&e.style.setProperty(na.copyright,t.copyrightColor),Lo.set(e,t))}function Rn(e){e&&(e.style.removeProperty(na.text),e.style.removeProperty(na.sub),e.style.removeProperty(na.copyright),Lo.delete(e))}const lu={text:"var(--color-pureBlack)",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"#1a1a1a"};function iu(e={}){const t=Rt(lu,$n,Rn);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("${su}")`}})]})}const uu="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",ba=240;var qa='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 f2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"},b2=100,g2=[{scale:1,opacity:.55},{scale:2,opacity:.4},{scale:3.1,opacity:.28},{scale:4.5,opacity:.18},{scale:6,opacity:.1}];function cu(e={}){const t=Rt(f2,$n,Rn),a="var(--color-main)",r=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:g2.map(({scale:l,opacity:i},u)=>n.jsx("g",{transform:`translate(${r} ${s}) scale(${l*b2/ba}) translate(${-ba/2} ${-ba/2})`,opacity:i,children:n.jsx("path",{d:uu,fill:"none",stroke:a,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("${qa}")`}})]})}const y2={text:"#ffffff",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",logoColor:"_mono",copyrightColor:"#ffffff"},v2=100,_2=[{scale:1,opacity:.55},{scale:2,opacity:.4},{scale:3.1,opacity:.28},{scale:4.5,opacity:.18},{scale:6,opacity:.1}];function x2(e={}){const t=Rt(y2,$n,Rn),a="#ffffff",r=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:_2.map(({scale:l,opacity:i},u)=>n.jsx("g",{transform:`translate(${r} ${s}) scale(${l*v2/ba}) translate(${-ba/2} ${-ba/2})`,opacity:i,children:n.jsx("path",{d:uu,fill:"none",stroke:a,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("${su}")`}})]})}const w2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"};function B2(e={}){const t=Rt(w2,$n,Rn);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("${qa}")`}})]})}const k2={Logo_SpeechEar_ko:{"":vr,_mono:h2},Logo_SpeechEarManager_ko:{"":Mo,_mono:m2}};function A2(e,t){if(e)return k2[e]?.[t??""]??void 0}const N2={speechear:vr,manager:Mo},E2={speechear:"Logo_SpeechEar_ko",manager:"Logo_SpeechEarManager_ko"},du=10;function D2(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 pu(e,t){if(e<=0)return t("passCard.remainingSecond",{n:0});const a=Math.floor(e/86400);if(a>0)return t("passCard.remainingDay",{n:a});const r=Math.floor(e/3600);if(r>0)return t("passCard.remainingHour",{n:r});const s=Math.floor(e/60);return s>0?t("passCard.remainingMinute",{n:s}):t("passCard.remainingSecond",{n:Math.floor(e)})}function S2(e,t,a){if(e==="manager"){const r=/년/.test(t)||/yr|year/i.test(t)||/1년|365/.test(t),s=a==="\uC624\uD508\uD2B9\uAC00"||a===Kt.t("passCard.specialLabel");return r?n.jsx(B2,{}):s?n.jsx(x2,{}):n.jsx(cu,{})}return n.jsx(iu,{})}function hu({ariaLabel:e,product:t,showPrice:a=!1,plan:r,type:s,endDate:l,remainingSeconds:i,endInclusive:u=!1,state:c="active",bg:d,bgOnly:h=!1,textColor:p,subColor:m,copyrightColor:g,logoSrc:y,label:C,price:f,originalPrice:_,discountLabel:b,onUse:w,onRefund:v,onDelete:k}){const{t:x}=_e.useTranslation(),A=t?ou(t):void 0,B=s??A?.type??"speechear",E=r??A?.plan??x("passCard.planSuffix","\uC774\uC6A9\uAD8C"),D=C??A?.label,N=f??(a?A?.price:void 0),$=_??(a?A?.originalPrice:void 0),L=b??A?.discountLabel,U=o.useMemo(()=>{if(N)return null;const V=t?.durationDays??p2(t?.code);if(!V||V<=0)return i!=null?{percent:null,remainingLabel:pu(i,x)}:null;const W=V*86400;let oe;if(i!=null)oe=i;else if((c==="active"||c==="expired")&&l){const me=new Date(l).getTime();if(Number.isNaN(me))return null;const ke=/^(\d{4})-(\d{2})-(\d{2})/.exec(String(l)),Le=/^(\d{4})-(\d{2})-(\d{2})/.exec(Fa()),Me=Math.round(ke&&Le?(Date.UTC(+ke[1],+ke[2]-1,+ke[3])-Date.UTC(+Le[1],+Le[2]-1,+Le[3]))/864e5:(me-Date.now())/864e5);oe=Math.max(0,u?Me+1:Me)*86400}else c==="expired"?oe=0:oe=W;const xe=D2(oe),be=Math.max(0,Math.min(100,Math.floor(Math.min(xe,W)/W*100)));return c==="pending"&&be>=100?null:{percent:be,remainingLabel:c==="expired"?x("passCard.expired","\uB9CC\uB8CC\uB428"):pu(oe,x)}},[N,c,l,i,u,t?.durationDays,t?.code,x]),M=o.useRef(null),[P,T]=o.useState({}),[ee,te]=o.useState(null),I=!!(w||v||k),Y=o.useRef(!1),R=o.useRef(void 0),[q,Z]=o.useState(y);o.useLayoutEffect(()=>{Z(y)},[y]),o.useLayoutEffect(()=>{const V=M.current;V&&(p!==void 0&&V.style.setProperty("--pass-card-text",p),m!==void 0&&V.style.setProperty("--pass-card-sub",m),g!==void 0&&V.style.setProperty("--pass-card-copyright",g))},[p,m,g]),o.useLayoutEffect(()=>{const V=M.current;if(!V)return;const W=C2(V);if(!y){const oe=E2[B],xe=c==="expired"?"_mono":W?.logoColor??"",be=A2(oe,xe);Z(be)}},[d,y,B,c]);const z=V=>{const W=M.current;if(!W)return null;const{left:oe,top:xe,width:be,height:me}=W.getBoundingClientRect(),ke=(V.clientX-oe)/be-.5;return{rotateX:-((V.clientY-xe)/me-.5)*du,rotateY:ke*du}},j=(V,W)=>{const oe=W*-.7,xe=V*.7+10,be=20+(Math.abs(V)+Math.abs(W))*.4;return`${oe}px ${xe}px ${be}px rgba(0, 0, 0, 0.18)`},F=o.useCallback(V=>{if(ea())return;Y.current=!0,clearTimeout(R.current),R.current=setTimeout(()=>{Y.current=!1},200);const W=z(V);W&&T({transform:`perspective(800px) rotateX(${W.rotateX}deg) rotateY(${W.rotateY}deg) scale3d(1.03, 1.03, 1.03)`,boxShadow:j(W.rotateX,W.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)"})},[]),O=o.useCallback(V=>{if(ea())return;const W=z(V);if(!W)return;const oe=Y.current?"transform 0.2s ease, box-shadow 0.2s ease":"none";T({transform:`perspective(800px) rotateX(${W.rotateX}deg) rotateY(${W.rotateY}deg) scale3d(1.03, 1.03, 1.03)`,boxShadow:j(W.rotateX,W.rotateY),transition:oe})},[]),G=o.useCallback(()=>{clearTimeout(R.current),Y.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)"})},[]),ie=o.useCallback(()=>te(null),[]),K=o.useMemo(()=>{const V=x("passCard.planSuffix","\uC774\uC6A9\uAD8C"),W=E.replace("\uC774\uC6A9\uAD8C","").replace(V==="\uC774\uC6A9\uAD8C"?"":V,"").trim(),oe=W.match(/^(.*?)(일|년)$/);return oe?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"h0 pass-card__plan-number",children:oe[1]}),n.jsx("span",{className:"h5b pass-card__plan-unit",children:oe[2]==="\uB144"?x("passCard.unitYear","\uB144"):x("passCard.unitDay","\uC77C")})]}):n.jsx("span",{className:"h0",children:W})},[E,x]),pe=o.useMemo(()=>{const V=ma(N);if(!V)return null;const W=V.match(/^([^\d]*)([\d.,]+)(.*)$/);if(!W)return n.jsx("span",{className:"h1",children:V});const[,oe,xe,be]=W;return n.jsxs(n.Fragment,{children:[oe&&n.jsx("span",{className:"h5 pass-card__price-symbol",children:oe}),n.jsx("span",{className:"h1 pass-card__price-amount",children:xe}),be.trim()&&n.jsx("span",{className:"h5 pass-card__price-symbol",children:be.trim()})]})},[N]),X=o.useCallback(()=>{I&&te(V=>{if(V)return null;const W=M.current?.getBoundingClientRect();if(!W)return null;const oe=50;return{left:W.left,right:W.right,width:W.width,height:W.height,x:W.x,y:W.y+oe,top:W.top+oe,bottom:W.bottom+oe}})},[I]),H=o.useCallback(V=>{I&&(V.key==="Enter"||V.key===" ")&&(V.preventDefault(),X())},[I,X]),ne=[{items:[...w?[{label:x("passCard.menu.use","\uC0AC\uC6A9\uD558\uAE30"),icon:"play",onClick:()=>{w(),te(null)},closeOnSelect:!0}]:[],...v?[{label:x("passCard.menu.refund","\uD658\uBD88\uD558\uAE30"),icon:"rotate-ccw",onClick:()=>{v(),te(null)},closeOnSelect:!0}]:[],...k?[{label:x("passCard.menu.delete","\uC0AD\uC81C\uD558\uAE30"),icon:"trash-2",onClick:()=>{k(),te(null)},closeOnSelect:!0}]:[]]}];return n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"pass-card-frame",children:n.jsxs("div",{ref:M,className:`pass-card pass-card--${c}${I?" pass-card--clickable":""}`,style:P,onMouseEnter:F,onMouseMove:O,onMouseLeave:G,onPointerUp:V=>{V.pointerType==="touch"&&G()},onPointerCancel:V=>{V.pointerType==="touch"&&G()},onClick:X,onKeyDown:I?H:void 0,role:I?"button":void 0,tabIndex:I?0:void 0,"aria-label":e,"aria-haspopup":I?"menu":void 0,"aria-expanded":I?!!ee:void 0,children:[d??S2(B,E,D),!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:q??N2[B],className:"pass-card__logo",alt:B==="manager"?x("header.logoManager","\uB9D0\uADC0\uB9E4\uB2C8\uC800 \uB85C\uACE0"):x("header.logoMalgwi","\uB9D0\uADC0 \uB85C\uACE0")}),n.jsxs("div",{className:"pass-card__plan",children:[n.jsx("div",{children:K}),n.jsx("span",{className:"h5b pass-card__plan-suffix",children:D?x("passCard.labeledPlan",{label:D}):x("passCard.planSuffix","\uC774\uC6A9\uAD8C")})]})]})}),N?n.jsxs("div",{className:"pass-card__price-area",children:[L&&n.jsx("span",{className:"pass-card__discount body-3",children:L}),n.jsxs("div",{className:"pass-card__price",children:[$&&n.jsx("span",{className:"pass-card__price-original body-3",children:ma($)}),pe]})]}):U?n.jsxs("div",{className:"pass-card__usage",children:[n.jsx("span",{className:"h5b pass-card__usage-remaining",children:U.remainingLabel}),U.percent!=null&&n.jsxs("span",{className:"pass-card__usage-percent",children:[n.jsx("span",{className:"h1 pass-card__usage-value",children:U.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."})]})]})}),ee&&n.jsx(Bn,{anchorRect:ee,onClose:ie,ariaLabel:x("tooltip.menu","\uBA54\uB274"),children:n.jsx(Va,{columns:ne,onClose:ie,size:"small"})})]})}const j2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"#1a1a1a"};function T2(e={}){const t=`passcard-sound-line-grad-${o.useId()}`,a=Rt(j2,$n,Rn);return n.jsxs("div",{ref:a,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("${qa}")`}})]})}const M2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"};function L2(e={}){const t=Rt(M2,$n,Rn);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("${qa}")`}})]})}function $2(e,t){if(e){if(t==="manager_pro")return n.jsx(L2,{});if(t==="manager_standard")return n.jsx(T2,{});if(t==="manager_lite")return n.jsx(cu,{})}}function R2(e){const t=ma(e);if(!t)return null;const a=t.match(/^([^\d]*)([\d.,]+)(.*)$/);if(!a)return t;const[,r,s,l]=a;return n.jsxs(n.Fragment,{children:[r&&n.jsx("span",{className:"payment-plan__pricing-symbol h4",children:r}),s,l.trim()&&n.jsx("span",{className:"payment-plan__pricing-symbol h4",children:l.trim()})]})}function P2(e){const{t}=_e.useTranslation(),a=t("payment.plan.tierFallback",{defaultValue:"\uC774\uC6A9\uAD8C"}),r=t("payment.plan.openPromo",{defaultValue:"\uC624\uD508 \uD2B9\uAC00"}),{plan:s,onSelect:l,period:i="monthly",ownedCodes:u}=e||{},c=v=>!!v&&!!u?.includes(v),d=v=>v.onceOnly??/오픈\s*특가/.test(v.label??""),h=(s.tiers||[]).some(v=>d(v)&&c(v.code)),p=v=>{const k=v.prices?v.prices[i]:v.price;return k?(s.tiers||[]).some(x=>!!x.badge&&x.originals?.[i]===k):!1},m=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"),C=v=>v.prices?v.prices[i]:v.price,f=(s.tiers||[]).length>0&&(s.tiers||[]).every(v=>{const k=C(v);return k==="\uBB34\uB8CC"||k===g||k==="0\uC6D0"||typeof k=="string"&&/\d/.test(k)&&!/[1-9]/.test(k)}),_=(s.tiers||[]).length>0&&(s.tiers||[]).every(v=>{const k=C(v);return k==="\uBB38\uC758"||k===y}),b=s.group==="org",w=b?"manager":"speechear";return n.jsxs("div",{className:"payment-plan__card",style:{borderColor:m,"--plan-color":m},children:[s.cardBadge&&n.jsx("div",{className:"payment-plan__card-badge",children:n.jsx(ln,{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:m},children:s.quote||"\xA0"}),n.jsx("h3",{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((v,k)=>n.jsxs("li",{className:"payment-plan__feature-item body-3",children:[n.jsx(ot,{icon:"check",size:18,className:"payment-plan__feature-check",wrapperStyle:{color:m}}),v]},k))})]}),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((v,k)=>n.jsxs("li",{className:"payment-plan__feature-item body-3",children:[n.jsx(ot,{icon:"check",size:18,className:"payment-plan__feature-check",wrapperStyle:{color:m}}),v]},k))})]}),n.jsx("div",{className:"payment-plan__card-pricing",children:f?null:_?n.jsx(fe,{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(v=>{const k=v.label||a,x=d(v),A=x||v.openPromo===!0,B=k.replace(/^오픈\s*특가\s*/,"")||a,E=v.prices?v.prices[i]:v.price,D=v.badge?A?`${r}
823
- ${v.badge}`:v.badge:void 0;if(x&&c(v.code))return null;if(!v.badge&&!h)return p(v)?null:n.jsxs("div",{className:`payment-plan__pricing-row payment-plan__pricing-row--static${v.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:v.label})}),n.jsx("div",{className:"payment-plan__pricing-row-price",children:n.jsx("span",{className:"payment-plan__pricing-current h1",children:R2(E)})})]},v.id);const N=s.tier??(b?s.title:void 0),$=n.jsx(hu,{showPrice:!0,product:{type:w,code:v.code,name:B,label:N,price:E,originalPrice:v.originals?.[i]??void 0,discountLabel:D},bg:$2(b,s.id)}),L=()=>l?.({...v,productId:s.id,productTitle:s.title,preview:$});return n.jsx("div",{className:"payment-plan__pricing-card",onClick:L,onKeyDown:l?U=>{U.target===U.currentTarget&&(U.key==="Enter"||U.key===" ")&&(U.preventDefault(),L())}:void 0,role:l?"button":void 0,tabIndex:l?0:void 0,children:$},v.id)})})})})]})}function F2({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 $o='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 mu={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"#c9c9c9"};function I2(){const e=Rt(mu,$n,Rn);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("${$o}")`}})})}const Cu={text:"#ffffff",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEarManager_ko",logoColor:"_mono",copyrightColor:"#ffffff"};function O2(e={}){const t=Rt(Cu,$n,Rn);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("${qa}")`}})]})}function fu({keys:e,anchor:t="top-right",scale:a,className:r=""}){const s=Array.isArray(e)?e:[e];return n.jsx("span",{className:Be("shortcut-badge",`shortcut-badge--${t}`,r),style:a===void 0?void 0:{"--shortcut-badge-scale":String(a)},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 Ua=(e,t,a)=>e+(t-e)*a;function z2({speakers:e,size:t=300,viewT:a=0,activeSpeakerId:r=null,playedIds:s,selectedId:l=null,answerId:i=null,showFeedback:u=!1,pulseSelected:c=!1,pulseSelectedDuration:d,pulseScale:h,clickable:p=!1,onSelectSpeaker:m,buttonSize:g=40,showIcon:y=!0,onCenterClick:C,centerLabel:f,centerDisabled:_=!1,centerAttention:b=!1,shortcutAnchor:w="top-right",shortcutScale:v,scaleShortcut:k=!1}){const{t:x}=_e.useTranslation(),A=Math.max(0,Math.min(1,a)),B=t/2,E=110/300,D=.18,N=V=>t*(E+(V-1)*D),$=V=>{const W=N(V.row??1),oe=V.angleDeg*Math.PI/180;return{x:B+W*Math.cos(oe),y:B+W*Math.sin(oe)}},L=Math.max(...e.map(V=>V.row??1),1),U=t*.08,M=t*.1,P=t*.24,T=t-2*U,ee=t-M-P,te=t-P/2,I=o.useMemo(()=>[...new Set(e.map(V=>V.deg))].sort((V,W)=>V-W),[e]),Y=I.length,R=Math.max(68,Y>1?T/(Y-1):0),q=o.useMemo(()=>new Map(I.map((V,W)=>[V,W])),[I]),Z=V=>{const W=q.get(V.deg)??0,oe=B+(W-(Y-1)/2)*R,xe=L>1?Math.min(68,ee/(L-1)):0,be=xe*(L-1),me=M+(ee-be)/2,ke=L===1?M+ee*.4:me+(L-(V.row??1))*xe;return{x:oe,y:ke}},z=V=>{const W=$(V),oe=Z(V);return{x:Ua(W.x,oe.x,A),y:Ua(W.y,oe.y,A)}},j={x:B,y:Ua(B,te,A)},F=Math.round(g*1.2),O=Math.round(Math.max(16,Math.min(80,g*.7))),G=[],ie=new Map;for(const V of e){const W=V.row??1;ie.has(W)||ie.set(W,[]),ie.get(W).push(V)}for(const[V,W]of ie.entries()){if(W.length<2)continue;const oe=[...W].sort((ze,dt)=>ze.deg-dt.deg),xe=oe.map(ze=>z(ze)),be=oe.map(ze=>ze.deg),me=be[be.length-1]-be[0],ke=me/(be.length-1),Le=360-me,Me=oe.length>=3&&ke>0&&Le<=ke*1.5,le=Math.round(N(V)*1e3)/1e3,ve=(ze,dt,st,et)=>{const gt=(dt.angleDeg-ze.angleDeg+540)%360-180;if(gt===0)return`L ${et.x} ${et.y}`;if(A===0)return`A ${le} ${le} 0 0 ${gt>0?1:0} ${et.x} ${et.y}`;const Se=(ze.angleDeg+gt/2)*Math.PI/180,Ge={x:B+le*Math.cos(Se),y:B+le*Math.sin(Se)},we={x:(st.x+et.x)/2,y:(st.y+et.y)/2},qe={x:Ua(Ge.x,we.x,A),y:Ua(Ge.y,we.y,A)},Ye={x:2*qe.x-we.x,y:2*qe.y-we.y};return`Q ${Ye.x} ${Ye.y} ${et.x} ${et.y}`},$e=Me?[...oe,oe[0]]:oe,Ae=Me?[...xe,xe[0]]:xe;let Ie=`M ${Ae[0].x} ${Ae[0].y}`;for(let ze=1;ze<Ae.length;ze++)Ie+=" "+ve($e[ze-1],$e[ze],Ae[ze-1],Ae[ze]);G.push({key:`arc-${V}`,d:Ie})}const K=o.useMemo(()=>new Set(s??[]),[s]),pe=V=>({idle:"",active:x("soundCompass.state.active","\uC18C\uB9AC \uB098\uB294 \uC911"),played:x("soundCompass.state.played","\uB4E4\uC74C"),correct:x("soundCompass.state.correct","\uC815\uB2F5"),wrong:x("soundCompass.state.wrong","\uC624\uB2F5")})[V],X=V=>{if(r===V.id)return"active";if(u){if(V.id===i)return"correct";if(V.id===l&&l!==i)return"wrong"}return K.has(V.id)?"played":"idle"},H=V=>r===V.id?"loop":u?V.id===i?"loop":null:c&&V.id===l?"once":null,ne=(V,W)=>{switch(V){case"played":case"correct":return n.jsx(Ws,{size:W});case"wrong":return n.jsx(Js,{size:W});default:return n.jsx(Xs,{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:[A===0&&e.map(V=>{const{x:W,y:oe}=z(V);return n.jsx("line",{x1:j.x,y1:j.y,x2:W,y2:oe,stroke:"#dde3ec",strokeWidth:"1"},V.id)}),G.map(V=>n.jsx("path",{d:V.d,fill:"none",stroke:"#dde3ec",strokeWidth:"1"},V.key))]}),b&&!_&&n.jsx("div",{className:"sound-compass__pulse sound-compass__pulse--active sound-compass__pulse--center",style:{width:F,height:F,left:j.x-F/2,top:j.y-F/2}}),C?n.jsx("button",{type:"button",className:`sound-compass__center sound-compass__center--button${_?" sound-compass__center--disabled":""}`,style:{width:F,height:F,left:j.x,top:j.y},"aria-label":f,"aria-disabled":_||void 0,tabIndex:_?-1:0,onClick:_?void 0:C,children:n.jsx(Hr,{size:O,color:"currentColor",strokeWidth:1.5})}):n.jsx("div",{className:"sound-compass__center",style:{width:F,height:F,left:j.x,top:j.y},children:n.jsx(Hr,{size:O,color:"currentColor",strokeWidth:1.5})}),e.map((V,W)=>{const{x:oe,y:xe}=z(V),be=X(V),me=H(V),ke={...v!==void 0||k?{"--shortcut-badge-scale":String(v??Math.max(.75,Math.min(3,g/56)))}:null,pointerEvents:p?"auto":"none",cursor:p?"pointer":"default",zIndex:be!=="idle"?10:1},Le=g,Me=Math.round(Math.max(10,Math.min(56,Le*.38))),le=Math.round(Math.max(7,Math.min(18,Le*.2))),ve=Math.round(Math.max(10,Math.min(56,Le*.4))),$e=y==="answered"&&(be==="played"||be==="correct"||be==="wrong"),Ae=y===!0||$e,Ie=!$e;return n.jsxs("div",{className:"sound-compass__speaker-pos",style:{...ke,left:oe-Le/2,top:xe-Le/2},children:[me&&n.jsx("div",{className:`sound-compass__pulse sound-compass__pulse--${be}`+(me==="once"?" sound-compass__pulse--once":""),style:{width:Le,height:Le,...me==="once"&&d!==void 0?{"--sc-pulse-duration-once":`${d}ms`}:null,...h!==void 0?{"--sc-pulse-scale":String(h)}:null}}),n.jsxs("button",{type:"button",tabIndex:p?0:-1,"aria-disabled":p?void 0:!0,onClick:p?()=>m?.(V.id):void 0,className:`sound-compass__speaker-btn sound-compass__speaker-btn--${be}`,style:{width:Le,height:Le},"aria-label":pe(be)?`${V.label}, ${pe(be)}`:V.label,"aria-pressed":l!=null?V.id===l:void 0,children:[Ae&&ne(be,Me),Ie&&n.jsx("span",{className:"sound-compass__speaker-number",style:{fontSize:y===!0?le:ve},children:W+1})]}),V.shortcut&&n.jsx(fu,{keys:V.shortcut,anchor:w,className:"sound-compass__speaker-shortcut"})]},V.id)})]})})}function W2({orientation:e="horizontal",label:t,className:a=""}){const r=Be("divider",`divider--${e}`,t&&e==="horizontal"?"divider--labeled":"",a);return e==="vertical"?n.jsx("div",{className:r,role:"separator","aria-orientation":"vertical"}):t?n.jsxs("div",{className:r,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:r,role:"separator","aria-orientation":"horizontal"})}function bu({checked:e,onChange:t,name:a,value:r,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:a,value:r,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 H2({options:e,value:t,onChange:a,name:r,disabled:s=!1,direction:l="vertical",className:i="",ariaLabel:u}){const c=o.useId(),d=r??`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(bu,{name:d,value:h.value,checked:t===h.value,disabled:s||h.disabled,label:h.label,onChange:p=>{p&&a?.(h.value)}},h.value))})}const V2={info:"info",success:"check-circle",warning:"alert-triangle",danger:"alert-circle"};function q2({tone:e="info",title:t,message:a,children:r,dismissible:s=!1,onDismiss:l,live:i,className:u=""}){const{t:c}=_e.useTranslation(),[d,h]=o.useState(!1),p=o.useRef(null),m=o.useCallback(()=>{const b=p.current;b&&b.contains(document.activeElement)&&mr(b),h(!0),l?.()},[l]);if(d)return null;const g=Be("alert",`alert--${e}`,u),y=i??(e==="danger"||e==="warning"?"assertive":"polite"),C=y==="assertive"?"alert":y==="polite"?"status":void 0,f=!!t,_=!!(a||r);return n.jsxs("div",{ref:p,className:g,role:C,children:[n.jsxs("div",{className:"alert__body",children:[n.jsxs("div",{className:"alert__header",children:[n.jsx(ot,{icon:V2[e],size:20,className:"alert__icon"}),f&&n.jsx("span",{className:"alert__title body-2",children:t}),!f&&_&&n.jsx("div",{className:"alert__message body-3",children:a||r})]}),f&&_&&n.jsx("div",{className:"alert__message alert__message--indented body-3",children:a||r})]}),s&&n.jsx("button",{type:"button",className:"alert__dismiss",onClick:m,"aria-label":c("common.close","\uB2EB\uAE30"),children:"\xD7"})]})}const U2={ready:"search",guide:"info",error:"circle-alert"};function G2(e,t){const a=t.filter(Boolean);if(a.length===0)return e;const r=[];let s=0,l=0;for(const i of a){const u=e.indexOf(i,s);u<0||(u>s&&r.push(e.slice(s,u)),r.push(n.jsx("strong",{className:"search-summary__em body-2",children:i},l++)),s=u+i.length)}return s<e.length&&r.push(e.slice(s)),r}function K2({status:e="guide",label:t,children:a,emphasis:r,icon:s,className:l=""}){const i=s===!1?null:s??U2[e],u=Be("search-summary",`search-summary--${e}`,l),c=t??a,d=typeof c=="string"&&r&&r.length>0?G2(c,r):c;return n.jsxs("div",{className:u,role:"status","aria-live":"polite",children:[i!=null&&n.jsx(ot,{icon:i,size:18,className:"search-summary__icon"}),n.jsx("span",{className:"search-summary__text body-2",children:d})]})}function Ga({title:e,items:t}){const{t:a}=_e.useTranslation(),{anchorRect:r,openAt:s,close:l}=za(),i=o.useRef(null),u=fr(!!r,(c,d)=>{c&&d?s(i.current?.querySelector("button")??d):l()},i);return n.jsxs("span",{ref:i,style:{display:"contents"},children:[n.jsx(fe,{htmlType:"button",size:24,type:"dot",icon:"info",variant:"transparent-gray",useBorder:!1,selected:!!r,ariaLabel:a("common.info","\uC124\uBA85"),onPointerEnter:c=>{Un(c)||s(c.currentTarget)},onPointerLeave:c=>{Un(c)||l()},onClick:c=>{u.touchPress(c.currentTarget)},onFocus:c=>{ea()||s(c.currentTarget)},onBlur:l}),r&&n.jsx(qn,{title:e,items:t,showIndex:t.length>1,anchorRect:r,onClose:l})]})}function Y2({items:e=[],value:t,onChange:a,className:r="",size:s=40}){const l=o.useId(),{t:i}=_e.useTranslation(),u=o.useRef(null),c=e.find(C=>!C.disabled)?.key,d=e.some(C=>C.key===t)?t:c??e[0]?.key,h=e.find(C=>C.key===d&&!C.disabled)?.key??c,p=()=>Array.from(u.current?.querySelectorAll('[role="tab"]:not(:disabled)')??[]),m=(C,f=p())=>{if(f.length===0)return;const _=(C%f.length+f.length)%f.length;f[_]?.focus(),f[_]?.click()},g=C=>{if(!["ArrowRight","ArrowDown","ArrowLeft","ArrowUp","Home","End"].includes(C.key))return;C.preventDefault();const f=p(),_=f.indexOf(C.currentTarget);C.key==="ArrowRight"||C.key==="ArrowDown"?m(_+1,f):C.key==="ArrowLeft"||C.key==="ArrowUp"?m(_-1,f):C.key==="Home"?m(0,f):m(f.length-1,f)},y=e.find(C=>C.key===d);return n.jsxs("div",{className:`tabs ${r}`.trim(),children:[n.jsx("div",{ref:u,className:`tabs__list tabs__list--${s}`,role:"tablist","aria-label":i("tabs.ariaLabel","\uD0ED"),children:e.map(C=>n.jsx("button",{id:`tabs__tab-${l}-${C.key}`,type:"button",role:"tab","aria-selected":C.key===d,"aria-controls":`tabs__panel-${l}-${C.key}`,disabled:C.disabled,tabIndex:C.key===h?0:-1,className:`tabs__tab body-2${C.key===d?" tabs__tab--active":""}`,onClick:()=>{C.key!==t&&a?.(C.key)},onKeyDown:g,children:C.label},C.key))}),y&&n.jsx("div",{id:`tabs__panel-${l}-${y.key}`,role:"tabpanel","aria-labelledby":`tabs__tab-${l}-${y.key}`,tabIndex:0,className:"tabs__panel",children:y.panel},y.key)]})}const Z2={xs:12,sm:16,md:20,lg:28,xl:36};function X2(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 J2({src:e,name:t,size:a="md",shape:r="circle",className:s=""}){const{t:l}=_e.useTranslation(),[i,u]=o.useState(null),c=!!e&&i===e,d=t?X2(t):"",h=!!e&&!c,p=!h&&!!d,m=t||l("avatar.ariaLabel","\uC0AC\uC6A9\uC790 \uC544\uBC14\uD0C0");return n.jsxs("span",{className:`avatar avatar--${a} avatar--${r} ${s}`.trim(),role:"img","aria-label":m,children:[h&&n.jsx("img",{className:"avatar__image",src:e,alt:m,onError:()=>u(e??null)}),!h&&p&&n.jsx("span",{className:"avatar__initials","aria-hidden":"true",children:d}),!h&&!p&&n.jsx(ot,{icon:"user-round",size:Z2[a],className:"avatar__icon"})]})}function Q2(e,t){if(!t)return!0;const a=t.split(",").map(l=>l.trim()).filter(Boolean);if(a.length===0)return!0;const r=e.name.toLowerCase(),s=e.type.toLowerCase();return a.some(l=>{const i=l.toLowerCase();return i.startsWith(".")?r.endsWith(i):i.endsWith("/*")?s.startsWith(i.slice(0,-1)):s===i})}function ev({onFilesSelected:e,accept:t,multiple:a=!1,disabled:r=!1,showFileList:s=!0,files:l,onRemove:i,className:u=""}){const{t:c}=_e.useTranslation(),d=o.useRef(null),[h,p]=o.useState(!1),[m,g]=o.useState([]),y=l??m,C=x=>{if(!x||x.length===0)return;const A=Array.from(x).filter(E=>Q2(E,t));if(A.length===0)return;const B=a?A:A.slice(0,1);if(l===void 0){const E=a?[...y,...B]:B;g(E),e?.(E)}else e?.(B)},f=x=>{x.preventDefault(),!r&&p(!0)},_=x=>{x.preventDefault(),p(!1)},b=x=>{x.preventDefault(),p(!1),!r&&C(x.dataTransfer.files)},w=x=>{const A=x.target;try{C(A.files)}finally{A.value=""}},v=()=>{r||d.current?.click()},k=x=>{if(!r&&(i?.(x),l===void 0)){const A=y.filter((B,E)=>E!==x);g(A),i||e?.(A)}};return n.jsxs("div",{className:`file-upload ${u}`.trim(),children:[n.jsxs("div",{className:Be("file-upload__dropzone",h&&"file-upload__dropzone--dragging",r&&"file-upload__dropzone--disabled"),role:"button",tabIndex:r?-1:0,"aria-disabled":r,onClick:v,onKeyDown:x=>{(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),v())},onDragOver:f,onDragLeave:_,onDrop:b,children:[n.jsx(ot,{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:r,onClick:x=>{x.stopPropagation(),v()},children:c("fileUpload.browseButton","\uD30C\uC77C \uC120\uD0DD")}),n.jsx("input",{ref:d,type:"file",className:"file-upload__input",accept:t,multiple:a,disabled:r,onChange:w,tabIndex:-1})]}),s&&y.length>0&&n.jsx("ul",{className:"file-upload__list",children:y.map((x,A)=>n.jsxs("li",{className:"file-upload__list-item body-3",children:[n.jsx("span",{className:"file-upload__file-name body-3",children:x.name}),n.jsx("button",{type:"button",className:"file-upload__remove-button","aria-label":c("fileUpload.removeAriaLabel",{name:x.name}),disabled:r,onClick:()=>k(A),children:n.jsx(ot,{icon:"x",size:14})})]},`${x.name}-${A}`))})]})}function tv({items:e,className:t=""}){const{t:a}=_e.useTranslation();return n.jsx("nav",{className:`breadcrumb ${t}`.trim(),"aria-label":a("breadcrumb.ariaLabel","\uC774\uB3D9 \uACBD\uB85C"),children:n.jsx("ol",{className:"breadcrumb__list",children:e.map((r,s)=>{const l=s===e.length-1;return n.jsxs("li",{className:"breadcrumb__item",children:[l?n.jsx("span",{className:"breadcrumb__current body-3","aria-current":"page",children:r.label}):r.href?n.jsx("a",{className:"breadcrumb__link body-3",href:r.href,target:r.target,rel:r.rel??(r.target==="_blank"?"noopener noreferrer":void 0),onClick:r.onClick,children:r.label}):r.onClick?n.jsx("button",{type:"button",className:"breadcrumb__link body-3",onClick:r.onClick,children:r.label}):n.jsx("span",{className:"breadcrumb__text body-3",children:r.label}),!l&&n.jsx(ot,{icon:"chevron-right",size:14,className:"breadcrumb__separator"})]},s)})})})}const nv={small:14,medium:20,large:28};function av({value:e,onChange:t,max:a=5,readOnly:r=!1,size:s="medium",ariaLabel:l,className:i=""}){const{t:u}=_e.useTranslation(),c=r||!t,[d,h]=o.useState(null),p=c?e:Number.isFinite(e)?Math.round(e):0,m=d??p,g=nv[s],y=x=>{x!==e&&t?.(x)},C=x=>{c||y(x)},f=x=>{c||ea()||h(x)},_=o.useRef(null),b=x=>{const A=Math.min(a,Math.max(1,x));y(A),Array.from(_.current?.querySelectorAll("[data-star]")??[]).find(B=>B.dataset.star===String(A))?.focus()},w=x=>{if(!c){switch(x.key){case"ArrowRight":case"ArrowUp":b((p||0)+1);break;case"ArrowLeft":case"ArrowDown":b((p||1)-1);break;case"Home":b(1);break;case"End":b(a);break;default:return}x.preventDefault()}},v=p>=1&&p<=a?Math.round(p):1,k=()=>{c||h(null)};return n.jsx("div",{className:`rating rating--${s}${c?" rating--readOnly":""} ${i}`.trim(),ref:_,onKeyDown:w,role:c?"img":"radiogroup","aria-label":c?u("rating.valueLabel",{value:e,max:a}):l??u("rating.groupLabel","\uBCC4\uC810"),onMouseLeave:k,onPointerUp:x=>{x.pointerType==="touch"&&k()},onPointerCancel:x=>{x.pointerType==="touch"&&k()},children:Array.from({length:a},(x,A)=>{const B=A+1,E=Math.max(0,Math.min(1,m-A)),D=E>0&&E<1,N=n.jsxs("span",{className:"rating__star-wrap",children:[n.jsx(ot,{icon:"star",size:g,className:"rating__star rating__star--empty"}),E>0&&n.jsx("span",{className:`rating__star-fill${D?" rating__star-fill--half":""}`,style:D?{width:`${E*100}%`}:void 0,children:n.jsx(ot,{icon:"star",size:g,className:"rating__star rating__star--filled"})})]});return c?n.jsx("span",{className:"rating__item","aria-hidden":"true",children:N},B):n.jsx("button",{type:"button",className:"rating__item rating__item--interactive",role:"radio","aria-checked":p===B,"aria-label":u("rating.starLabel",{n:B}),"data-star":B,tabIndex:B===v?0:-1,onClick:()=>C(B),onMouseEnter:()=>f(B),children:N},B)})})}const rv=20,ov=["#499cdf","#4dcdc0","#2fae9e","#e6b94e","#d9534f","#e06b68","#bfc7d1"];function sv({value:e,onChange:t,palette:a=ov,size:r=40,className:s="",ariaLabel:l}){const{t:i}=_e.useTranslation();return n.jsx("div",{className:`color-picker ${s}`.trim(),role:"group","aria-label":l,children:a.map(u=>{const c=e?.toLowerCase()===u.toLowerCase();return n.jsx("button",{type:"button",className:`color-picker__swatch color-picker__swatch--${r}`,style:{backgroundColor:u},onClick:()=>t(u),"aria-pressed":c,"aria-label":c?`${u} ${i("colorPicker.selected","\uC120\uD0DD\uB428")}`:u,children:c&&n.jsx(ot,{icon:"check",size:rv,className:"color-picker__check"})},u)})})}function gu({icon:e,label:t,tooltip:a,wrapperStyle:r,color:s,bgColor:l,useHover:i=!0,iconSize:u="medium"}){const{t:c}=_e.useTranslation(),d=u==="small",h=Be("category-icon",d?"category-icon--small":""),p=d?16:20,m=o.useRef(null),[g,y]=o.useState(!1),C=o.useMemo(()=>{const B=r&&typeof r=="object"?{...r}:{};return!s&&!l?B:{...B,...s?{color:s,"--t-item-fg":s}:{},...l?{"--t-item-bg":l}:{}}},[r,s,l]),f=a||t,_=i&&!!f,[b,w]=o.useState(null);o.useLayoutEffect(()=>{g&&w(m.current?.getBoundingClientRect()??null)},[g]),o.useEffect(()=>{if(!i&&g)try{y(!1)}catch{}},[i,g]),o.useEffect(()=>{if(!g)return;const B=E=>{const D=m.current;if(!D)return;const N=E.target;N&&!D.contains(N)&&y(!1)};return document.addEventListener("pointerdown",B,!0),()=>document.removeEventListener("pointerdown",B,!0)},[g]);const v=o.useCallback(()=>{i&&y(!0)},[i]),k=o.useCallback(()=>{i&&y(!1)},[i]),x=o.useCallback(()=>y(!1),[]),A=o.useCallback(B=>{if(B.key==="Escape"){y(!1);return}(B.key==="Enter"||B.key===" ")&&(B.preventDefault(),y(E=>!E))},[]);return n.jsxs("span",{ref:m,className:Be("category-icon__wrap",_&&"category-icon__wrap--interactive"),onPointerEnter:v,onPointerLeave:k,onFocus:v,onBlur:k,onKeyDown:A,role:"button",tabIndex:0,"aria-label":typeof f=="string"?c("common.descriptionFor",{name:f,defaultValue:`${f} \uC124\uBA85`}):void 0,"aria-haspopup":!!f,"aria-expanded":g,"data-tooltip-ignore":!0,children:[n.jsx(ot,{icon:e,label:t,className:h,imgClassName:"category-icon__image",maskClassName:"category-icon__mask",svgClassName:"category-icon__svg",wrapperStyle:C,size:p}),g&&f&&n.jsx(Mn,{anchorRect:b,text:typeof f=="string"?f:void 0,offset:8,onClose:x,className:"category-icon__tooltip",ariaLabel:typeof f=="string"?f:void 0})]})}let Gn=null;function Ka(e){if(Gn&&Gn!==e)try{Gn()}catch{}return Gn=e,()=>{Gn===e&&(Gn=null)}}function _r(e){if(Gn===e){Gn=null;try{e()}catch{}}}function Ya(e,t){let a=()=>{};const r=new Promise(u=>{a=u});if(typeof e!="string"||e.trim()===""){At("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),a(!1);try{t?.(!1)}catch{}return{el:{},stop:()=>{},done:r}}let s=!1;const l=u=>{if(!s){s=!0;try{t?.(u)}catch{}a(u)}};let i;try{i=new Audio(e)}catch{return l(!1),{el:{},stop:()=>{},done:r}}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:r}}function lv(e,t){if(!e)return{previewCodes:[],previewBucket:null};const a=e,r=i=>i.map(u=>u?.contextCode||u?.context_code).filter(Boolean).map(String);if(t==="LISTEN_IN_NOISE"){const i=a.sentences||a.items||[],u=Array.isArray(i)&&i.length>0?r(i):[];return u.length===0&&(a.contextCode||a.context_code)&&u.push(String(a.contextCode||a.context_code)),{previewCodes:u,previewBucket:"LIN_D"}}if(t==="SHORT_STORY"){const i=a.items||a.sentences||[],u=Array.isArray(i)&&i.length>0?r(i):[];return u.length===0&&(a.contextCode||a.context_code)&&u.push(String(a.contextCode||a.context_code)),{previewCodes:u,previewBucket:"SHORT_S"}}if(t==="LONG_STORY"){const i=a.items||a.sentences||[],u=Array.isArray(i)&&i.length>0?r(i):[];return u.length===0&&(a.contextCode||a.context_code)&&u.push(String(a.contextCode||a.context_code)),{previewCodes:u,previewBucket:"LONG"}}if(t==="ORDERING_SENTENCE"){const i=a.sentences||a.items||[],u=Array.isArray(i)&&i.length>0?r(i):[];return u.length===0&&(a.contextCode||a.context_code)&&u.push(String(a.contextCode||a.context_code)),{previewCodes:u,previewBucket:"LIN_D"}}const s=a.sentences||a.items||[],l=r(Array.isArray(s)?s:[]);return l.length===0&&(a.contextCode||a.context_code)&&l.push(String(a.contextCode||a.context_code)),{previewCodes:l,previewBucket:null}}function iv(e,t){const[a,r]=o.useState(!1),[s,l]=o.useState(-1),[i,u]=o.useState({key:"",urls:[]}),c=o.useRef(null),d=o.useRef(!1),h=o.useRef(null),p=o.useRef(null),[m,g]=o.useState(!1),y=o.useRef([]),{previewCodes:C,previewBucket:f}=lv(e,t),_=`${C.join(",")}|${f??""}`,b=o.useMemo(()=>i.key===_?i.urls:[],[i,_]);o.useEffect(()=>{if(!C.length)return;let v=!1;return(async()=>{const k=[],x=[];for(const A of C)try{const B=kl(A,f);if(!B){k.push("");continue}let E=null;try{E=await Al(B)}catch{}if(!E)try{const D=await Nl(B);D&&(E=URL.createObjectURL(D),x.push(E))}catch{}k.push(E??"")}catch{k.push("")}v?x.forEach(A=>{try{URL.revokeObjectURL(A)}catch{}}):(y.current.forEach(A=>{try{URL.revokeObjectURL(A)}catch{}}),y.current=x,u({key:_,urls:k}))})(),()=>{v=!0}},[C.join(","),f]),o.useEffect(()=>()=>{y.current.forEach(v=>{try{URL.revokeObjectURL(v)}catch{}}),y.current=[]},[]);const w=o.useCallback(async v=>{if(v.stopPropagation(),v.preventDefault(),d.current){h.current&&_r(h.current),d.current=!1;try{c.current?.pause()}catch{}r(!1),l(-1);return}if(!b.filter(Boolean).length)return;let k=null;const x=()=>{d.current=!1,k?.stop()};h.current=x;const A=Ka(x);d.current=!0,r(!0);for(let B=0;B<b.length&&d.current;B++){const E=b[B];if(E&&(l(B),k=Ya(E),c.current=k.el,!await k.done))break}A(),h.current===x&&(h.current=null,d.current=!1,r(!1),l(-1))},[b]);return o.useEffect(()=>()=>{h.current&&_r(h.current),d.current=!1;try{c.current?.pause()}catch{}c.current=null},[]),{playing:a,playingIndex:s,previewUrls:b,previewHover:m,setPreviewHover:g,previewBtnRef:p,handlePreview:w}}const uv=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 a=e.sentences||e.items||e.questions||[];return Array.isArray(a)&&a.length>0?a.map(r=>{if(typeof r=="string")return r;if(r&&typeof r=="object"){const s=r;return s.sentence||s.text||s.context||s.question||s.title||""}return""}).filter(r=>typeof r=="string"&&r.trim().length>0).map(r=>r.trim()):[]};function Ro(e){const{index:t,type:a,trainingData:r,ariaLabel:s,depth:l,renderPopup:i,completed:u,completedIds:c,selectedIds:d,tooltipText:h,useDescriptionTooltip:p=!1,onRemove:m,hideCheckBadge:g=!1,showTypeLabel:y=!1,onComplete:C,onSelect:f,onMore:_,countLabelOverride:b,size:w="square"}=e||{},{t:v}=_e.useTranslation(),[k,x]=o.useState(!1),A=o.useRef(null),[B,E]=o.useState(!1);o.useEffect(()=>{A.current?.matches(":hover")&&E(!0)},[]);const{playing:D,playingIndex:N,previewUrls:$,previewHover:L,setPreviewHover:U,previewBtnRef:M,handlePreview:P}=iv(r,a?.key),T=o.useCallback(()=>{f?f():x(!0)},[f]),ee=o.useCallback(()=>x(!1),[]),te=o.useCallback(()=>E(!0),[]),I=o.useCallback(()=>E(!1),[]),Y=o.useCallback(()=>U(!0),[U]),R=o.useCallback(()=>U(!1),[U]),[q,Z]=o.useState(null);o.useLayoutEffect(()=>{L&&Z(M.current?.getBoundingClientRect()??null)},[L,M]);const[z,j]=o.useState(null);o.useLayoutEffect(()=>{B&&!k&&p&&j(A.current?.getBoundingClientRect()??null)},[B,k,p]);const F=o.useCallback(we=>{we.target===we.currentTarget&&(we.key==="Enter"||we.key===" ")&&(we.preventDefault(),T())},[T]),O=r||null,G=o.useMemo(()=>{if(!p)return null;const we=h?(Array.isArray(h)?h:[h]).filter(Boolean):null,qe=we&&we.length>0?we:uv(O);return qe&&qe.length>0?qe:null},[p,h,O]),ie=o.useCallback(we=>{we.stopPropagation(),m?.()},[m]),K=o.useCallback(we=>we.stopPropagation(),[]),pe=o.useCallback(we=>{typeof C=="function"&&C(we)},[C]),X=u||(c&&r?.id!=null?c.has(String(r.id)):!1),H=!X&&(d!=null&&r?.id!=null?d.has(String(r.id)):!1);zi("speechear.popup.close",ee);const ne=Xl(),V=`${a?.label||""} ${t+1}`,W=O?.title||O?.name||V;let oe=a?.icon,xe,be="",me="";try{const we=O?.category_0||O?.category_main_code||O?.category_main,qe=O?.category_1||O?.category_sub_code||O?.category_sub,Ye=ne.find(mt=>mt.key===we);Ye?.icon&&(oe=Ye.icon),!xe&&Ye?.color&&(xe={"--t-item-fg":Ye.color}),!xe&&O?.iconColor&&(xe={"--t-item-fg":O.iconColor}),be=Ye?v(`topic.${Ye.key}`,{defaultValue:Ye.label||""}):"";try{const mt=Ye?.subs?.find(wt=>wt.key===qe);me=mt?v(`topic.sub.${mt.key}`,{defaultValue:mt.label||""}):""}catch{}}catch{}const ke=me?`${be} / ${me}`:be||a?.label||W,Le=we=>v("training.countQuestions",{n:we,count:we}),Me=we=>v("training.countSentences",{n:we,count:we});let le="";try{if(O)if(a?.key==="LISTEN_IN_NOISE"){let we=0;Array.isArray(O.items)&&O.items.length>0?we=O.items.length:Array.isArray(O.sentences)&&O.sentences.length>0?we=O.sentences.length:O.sentences&&(we=1),le=Me(we)}else if(a?.key==="SHORT_STORY"){let we=1;Array.isArray(r?.items)?we=r.items.length:Array.isArray(r?.raw&&r.raw?.items)?we=r.raw.items.length:Array.isArray(O?.questions)?we=O.questions.length:Array.isArray(O?.sentences)&&(we=O.sentences.length),le=Le(we)}else if(a?.key==="LONG_STORY"){let we=1;if(Array.isArray(O.items)&&O.items.length>0){const qe=O.items.reduce((Ye,mt)=>{const wt=mt.questionItems;return Array.isArray(wt)?Ye+wt.length:Array.isArray(mt.questions)?Ye+mt.questions.length:Ye},0);we=qe>0?qe:O.items.length}else Array.isArray(O.questions)&&O.questions.length>0?we=O.questions.length:Array.isArray(O.sentences)&&O.sentences.length>0&&(we=O.sentences.length);le=Le(we)}else if(a?.key==="ORDERING_SENTENCE"){let we=1;Array.isArray(O.items)&&O.items.length>0?we=O.items.length:Array.isArray(O.sentences)&&O.sentences.length>0&&(we=O.sentences.length),le=Me(we)}else Array.isArray(O.items)&&(le=O.items.length>0?Le(O.items.length):"")}catch{}const ve=w==="row",$e=w==="list"||ve,Ae=w==="compact",Ie=w==="small",ze=Ie&&a?.key?Uf().find(we=>we.key===a.key):void 0,dt=ze?Jl[ze.key]:void 0,st=ze?dt?v(`trainingType.${dt}.title`,{defaultValue:ze.label}):ze.label??"":"",et=y&&a?.label&&a.label!==String(W)?String(a.label):Ie&&st&&st!==String(W)?st:"",gt=!!et,Se=b!==void 0?b:le,Ge=[et,typeof W=="string"?W:"",Se].map(we=>String(we??"").trim()).filter(Boolean).join(" ");return n.jsxs(n.Fragment,{children:[n.jsxs("div",{ref:A,className:`training-block-button${$e?" training-block-button--list":""}${ve?" training-block-button--row":""}${Ae?" training-block-button--compact":""}${Ie?" training-block-button--small":""}${X?" training-block-button--completed":""}${H?" training-block-button--selected":""}${gt&&!Ie?" training-block-button--withType":""}${Ie&&!gt?" training-block-button--no-type-label":""}`,onClick:T,onPointerEnter:te,onPointerLeave:I,role:"button",tabIndex:0,onKeyDown:F,"aria-label":typeof s=="string"?s:Ge||void 0,title:!p&&h&&(Array.isArray(h)?h.filter(Boolean).join(`
824
- `):h)||void 0,children:[n.jsxs("div",{className:"training-block-button__left",children:[y&&a?.label&&a.label!==String(W)&&n.jsx("span",{className:"training-block-button__type-label caption-1",children:a.label}),Ie&&st&&st!==String(W)&&n.jsx("span",{className:"training-block-button__type-label caption-2",children:st}),n.jsx(gu,{icon:oe,label:W,tooltip:ke,wrapperStyle:xe,iconSize:Ie||Ae?"small":"medium"}),!g&&(X||H)&&!(m&&B)&&n.jsx(Dn,{className:m?"training-block-button__check--removable":void 0,icon:"check",position:"top-left",size:32,"aria-label":X?v("training.completed","\uD6C8\uB828 \uC644\uB8CC"):v("training.selected","\uC120\uD0DD\uB428")}),m&&n.jsx(Dn,{className:`training-block-button__remove${B?" is-hover":""}`,icon:"remove",position:"top-left",size:32,"aria-label":v("common.remove","\uC81C\uAC70"),onClick:ie}),n.jsx("div",{className:`training-block-button__title ${Ae?"body-3":Ie?"body-3b":"h3"}`,children:String(W)}),n.jsxs("div",{className:"training-block-button__description",children:[Se?n.jsx("div",{className:`training-block-button__count ${Ie?"caption-2":"caption-1"}`,children:Se}):null,n.jsx("div",{className:"training-block-button__chevron",children:n.jsx(ot,{icon:"chevron-right",label:v("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:Ie?12:20})})]}),($e&&!ve||Ie)&&$.length>0&&n.jsx("div",{ref:M,className:"training-block-button__preview","data-tooltip-ignore":!0,onClick:K,onPointerEnter:Y,onPointerLeave:R,children:n.jsx(fe,{htmlType:"button",size:Ie?28:32,type:"dot",icon:D?"pause":"play",variant:Ie?"transparent-lightGray":"default",useBorder:!1,selected:D,ariaLabel:String(W).trim()?D?v("training.stopFor",{name:W,defaultValue:`${W} \uC815\uC9C0`}):v("training.previewFor",{name:W,defaultValue:`${W} \uBBF8\uB9AC \uB4E3\uAE30`}):D?v("training.stop","\uC815\uC9C0"):v("training.preview","\uBBF8\uB9AC \uB4E3\uAE30"),onClick:P})})]}),_&&n.jsx("div",{className:"training-block-button__more","data-tooltip-ignore":!0,onClick:we=>{we.stopPropagation(),_(we)},children:n.jsx(fe,{htmlType:"button",size:40,type:"dot",icon:"more-horizontal",variant:"transparent-lightGray",useBorder:!1,ariaLabel:String(W).trim()?v("common.moreFor",{name:W}):v("common.more","\uB354\uBCF4\uAE30")})})]}),L&&n.jsx(Mn,{anchorRect:q,text:D?v("training.stop","\uC815\uC9C0"):v("training.preview","\uBBF8\uB9AC \uB4E3\uAE30"),offset:8,onClose:R}),B&&!k&&p&&(G?n.jsx(qn,{anchorRect:z,items:G,activeIndex:N,onClose:I}):O?.subTitle?n.jsx(Mn,{anchorRect:z,text:O.subTitle,offset:8,onClose:I}):null),k&&i&&i({trainingData:O,typeKey:a?.key??"",onClose:ee,onComplete:pe,popupTitle:String(W),popupSubTitle:a?.subTitle,depth:l!=null?String(l):void 0,popupIcon:oe,popupIconTooltip:String(ke),popupWrapperStyle:xe})]})}const yu=200;function cv(e){return e.itemId?(Xf()[e.trainingType]??[]).find(t=>t?.id!=null&&String(t.id)===String(e.itemId))??null:null}function vu({plan:e,groups:t,anchorRect:a,offset:r=12,onClose:s}){const{t:l}=_e.useTranslation(),i=o.useMemo(()=>t?t.map((c,d)=>({key:c.key??c.type?.key??String(d),label:c.label,type:c.type,data:c.items??[]})).filter(c=>c.data.length>0):Qf(l).map(c=>{const d=(e?.items??[]).filter(h=>h.trainingType===c.key);return{key:c.key,label:c.label,type:c,pickedCount:d.length,data:d.map(cv).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:se("training-tooltip__box"),children:n.jsx("div",{className:se("training-tooltip__groups"),children:i.flatMap(({key:c,label:d,type:h,data:p},m)=>[m>0?n.jsx("div",{className:se("training-tooltip__divider")},`div-${c}`):null,n.jsxs("div",{className:se("training-tooltip__section"),children:[n.jsx("div",{className:se("training-tooltip__section-header"),children:n.jsx("span",{className:se("training-tooltip__type-label body-3b"),children:d})}),n.jsx("div",{className:se("training-tooltip__items"),children:p.map((g,y)=>n.jsx(Ro,{index:y,type:h,trainingData:g,size:"compact",hideCheckBadge:!0},String(g.id??y)))})]},c)])})});return a?n.jsx(Bn,{anchorRect:a,offset:r,onClose:s,closeOnOutsideClick:!1,className:se("training-tooltip"),ariaLabel:l("tooltip.training","\uD6C8\uB828 \uC548\uB0B4"),children:u}):u}const dv=200;function pv({icon:e,count:t,title:a,plan:r,tooltip:s=!0,hoverAccent:l=!1,className:i="",onClick:u,onMouseEnter:c,onMouseLeave:d}){const h=!!u||!!c||s&&!!r,p=Be("count-tile",h&&"count-tile--interactive",h&&l&&"count-tile--accent",u&&"count-tile--clickable",i),m=o.useRef(null),[g,y]=o.useState(null),C=o.useRef(null),f=o.useRef(null),_=!!(g&&r&&s),b=o.useCallback(()=>{C.current&&(clearTimeout(C.current),C.current=null),f.current&&(clearTimeout(f.current),f.current=null)},[]),w=o.useCallback(()=>{b(),y(null)},[b]),v=o.useCallback(()=>{!s||!r||(b(),C.current=setTimeout(()=>{C.current=null,y(m.current?.getBoundingClientRect()??null)},yu))},[s,r,b]),k=o.useCallback(()=>{C.current&&(clearTimeout(C.current),C.current=null),!f.current&&(f.current=setTimeout(()=>{f.current=null,y(null)},dv))},[]);return o.useEffect(()=>()=>{b()},[b]),o.useEffect(()=>{(!s||!r)&&w()},[s,r,w]),o.useEffect(()=>{if(!_)return;const x=B=>B instanceof Element&&(m.current?.contains(B)||!!B.closest(".training-tooltip")),A=B=>{x(B.target)?b():k()};return document.addEventListener("pointerover",A,!0),()=>document.removeEventListener("pointerover",A,!0)},[_,b,k]),n.jsxs(n.Fragment,{children:[n.jsxs("div",{ref:m,className:p,onClick:u?x=>{w(),u(x)}:void 0,onKeyDown:u?x=>{x.key!=="Enter"&&x.key!==" "||(x.preventDefault(),x.currentTarget.click())}:void 0,onPointerEnter:x=>{x.pointerType==="touch"||x.pointerType==="pen"?w():v()},onMouseEnter:c,onMouseLeave:x=>{k(),d?.(x)},role:u?"button":"img",tabIndex:u?0:void 0,"aria-label":`${a} ${t}`,children:[n.jsx(ot,{icon:e,size:20,className:"count-tile__icon"}),n.jsx("span",{className:"count-tile__count h5","aria-hidden":"true",children:t})]}),g&&r&&n.jsx(vu,{plan:r,anchorRect:g,onClose:w})]})}let Za=0,_u="",Po="",Xa=0;function xu(){return wu(!1)}function hv(){return wu(!0)}function wu(e){const t=typeof document<"u";Za===0&&t&&(_u=document.body.style.overflow,document.body.style.overflow="hidden"),e&&t&&(Xa===0&&(Po=document.body.style.paddingRight),Xa++,document.body.style.paddingRight="0px"),Za++;let a=!1;return()=>{a||(a=!0,Za=Math.max(0,Za-1),e&&t&&(Xa=Math.max(0,Xa-1),Xa===0&&(Po?document.body.style.paddingRight=Po:document.body.style.removeProperty("padding-right"))),Za===0&&t&&(document.body.style.overflow=_u))}}function mv(){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 Cv({open:e,onClose:t,ariaLabel:a,title:r,children:s,size:l="md",closeOnBackdrop:i=!0,closeOnEscape:u=!0,showClose:c=!0,className:d,contentClassName:h}){const{t:p}=_e.useTranslation(),m=o.useId(),g=o.useRef(null),y=o.useCallback(()=>t(),[t]);o.useEffect(()=>{if(!e)return;const b=document.activeElement,w=xu(),v=g.current;return yo(v,b),v?.focus(),()=>{w();const k=document.activeElement;(!k||k===document.body||v&&v.contains(k))&&vo(b)?.focus?.()}},[e]);const C=o.useRef(y),f=o.useRef(u);o.useEffect(()=>{C.current=y,f.current=u}),o.useEffect(()=>{if(e)return Qn(()=>{f.current&&C.current()})},[e]);const _=o.useRef(!1);return bo(g,e),!e||typeof document>"u"?null:hn.createPortal(n.jsx("div",{className:Be("dialog",d),onPointerDown:i?b=>{_.current=b.target===b.currentTarget}:void 0,onMouseDown:b=>{b.target===b.currentTarget&&b.preventDefault()},onClick:i?b=>{const w=_.current;_.current=!1,w&&b.target===b.currentTarget&&y()}:void 0,children:n.jsxs("div",{ref:g,role:"dialog","aria-modal":"true","aria-label":r?void 0:a,"aria-labelledby":r?m:void 0,tabIndex:-1,className:Be("dialog__surface",`dialog__surface--${l}`,h),onClick:b=>b.stopPropagation(),children:[r?n.jsx("div",{className:"dialog__header",children:n.jsx("h2",{id:m,className:"dialog__title h4b",children:r})}):null,c?n.jsx("button",{type:"button",className:"dialog__close","aria-label":p("common.close","\uB2EB\uAE30"),onClick:y,children:n.jsx(mv,{})}):null,n.jsx("div",{className:"dialog__body",children:s})]})}),document.body)}function fv({columns:e,rows:t,rowKey:a,title:r,toolbar:s,empty:l,loading:i,caption:u,className:c=""}){const{t:d}=_e.useTranslation(),h=!i&&t.length===0;return n.jsxs("div",{className:Be("board",c),children:[r||s?n.jsxs("div",{className:"board__head",children:[r?n.jsx("h2",{className:"board__title",children:r}):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(p=>n.jsx("th",{scope:"col",className:Be("board__th",`board__cell--${p.headerAlign??p.align??"left"}`),style:p.width?{width:p.width}:void 0,children:p.header},p.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??d("board.empty","\uB4F1\uB85D\uB41C \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.")})}):t.map((p,m)=>n.jsx("tr",{className:"board__row",children:e.map(g=>n.jsx("td",{className:Be("board__td",`board__cell--${g.align??"left"}`),children:g.render(p,m)},g.key))},a(p,m)))})]})]})}function bv({name:e,role:t,photo:a,media:r,credentials:s,size:l=190,className:i=""}){return n.jsxs("div",{className:Be("person-card",i),children:[n.jsx("div",{className:"person-card__photo",style:{width:l,height:l},children:r??(a?n.jsx("img",{src:a,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 gv({groups:e,className:t=""}){return n.jsx("div",{className:Be("timeline",t),children:e.map(a=>n.jsxs("section",{className:"timeline__group",children:[n.jsx("h3",{className:"timeline__title",children:a.title}),n.jsx("ul",{className:"timeline__rows",children:a.entries.map((r,s)=>n.jsxs("li",{className:"timeline__row",children:[r.label?n.jsx("span",{className:"timeline__label",children:r.label}):null,n.jsx("div",{className:"timeline__items",children:r.items.map((l,i)=>n.jsx("p",{children:l},i))})]},`${r.label??""}-${s}`))})]},a.title))})}function yv({title:e,kind:t,body:a,badge:r,badgeSrc:s,footer:l,width:i,className:u=""}){const c=r??(s?n.jsx("img",{src:s,alt:""}):null);return n.jsxs("div",{className:Be("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:a}),l?n.jsx("div",{className:"publication-card__footer",children:l}):null]})}function vv({logo:e,alt:t,onDone:a,durationMs:r=3e3}){const s=Ia(a);return o.useEffect(()=>{const l=setTimeout(()=>s.current?.(),r);return()=>clearTimeout(l)},[r,s]),n.jsx("div",{className:"splash-logo",style:{"--splash-logo-duration":`${r}ms`},"aria-hidden":"true",children:n.jsx("img",{src:e,alt:t,className:"splash-logo__image"})})}function _v({eyebrow:e,eyebrowIndex:t,title:a,description:r,level:s=2,tone:l="dark",className:i=""}){const u=s===1?"h1":"h2";return n.jsxs("div",{className:Be("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,a?n.jsx(u,{className:"section-header__title",children:a}):null,r?n.jsx("div",{className:"section-header__description",children:r}):null]})}function xv({items:e,className:t=""}){return n.jsx("ul",{className:Be("company-meta",t),children:e.map((a,r)=>n.jsxs("li",{className:"company-meta__item",children:[r>0?n.jsx("span",{"aria-hidden":!0,className:"company-meta__divider",children:"|"}):null,a]},a))})}const Ja=new Map;function vn(e){const{t}=_e.useTranslation(),{options:a=[],value:r=a.find(v=>!v.disabled)?.key??a[0]?.key,onChange:s=v=>{},className:l="",size:i=40,shape:u="pill",useBG:c=!0,fullWidth:d=!1,minButtonWidth:h,ariaLabel:p}=e||{},m=o.useRef(null),g=a.filter(v=>!v.disabled),y=o.useId(),C=a.map(v=>v.key).join("\xB7");o.useEffect(()=>{if(!(!zn||p!=null&&p!=="")){if(Ja.set(y,C||"(\uBCF4\uAE30 \uC5C6\uC74C)"),Ja.size>1){const v=[...Ja.values()].sort();At(`segmented-control-unnamed:${v.join("|")}`,`[ihab/SegmentedControl] \uC774\uB984 \uC5C6\uB294 \uB77C\uB514\uC624\uADF8\uB8F9\uC774 \uD55C \uD654\uBA74\uC5D0 ${Ja.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): ${v.join(" / ")}`)}return()=>{Ja.delete(y)}}},[p,C,y]);const f=v=>{if(!g.length)return;const k=Math.max(0,g.findIndex(A=>A.key===r)),x=v==="first"?g[0]:v==="last"?g[g.length-1]:g[(k+v+g.length)%g.length];x&&(s(x.key),Array.from(m.current?.querySelectorAll("[data-segkey]")??[]).find(A=>A.dataset.segkey===x.key)?.focus())},_=v=>{switch(v.key){case"ArrowRight":case"ArrowDown":f(1);break;case"ArrowLeft":case"ArrowUp":f(-1);break;case"Home":f("first");break;case"End":f("last");break;default:return}v.preventDefault()},b=v=>{const k=x=>typeof x=="string"||typeof x=="number";if(!(!k(v.label)||v.count==null||v.count===!1||!k(v.count)))return`${v.label}, ${v.count}`},w=g.some(v=>v.key===r)?r:g[0]?.key;return n.jsx("div",{ref:m,onKeyDown:_,className:Be("segmented-control",`segmented-control--${u}`,`segmented-control--${i}`,d&&"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":p??t("segmentedControl.ariaLabel","\uC120\uD0DD \uD0ED"),children:a.map(v=>n.jsx(fe,{htmlType:"button",role:"radio","aria-checked":v.key===r,"data-segkey":v.key,tabIndex:v.key===w?0:-1,label:v.label,count:v.count,ariaLabel:b(v),disabled:v.disabled,className:v.key===r?"is-selected":"",onClick:()=>{v.disabled||s(v.key)},size:i,shape:u,useBorder:!1,useBG:!1},v.key))})}const wv=260;function Pn(e){const{t}=_e.useTranslation(),{title:a,subtitle:r,headerActions:s,headerSegment:l,children:i,buttons:u,footer:c,footerStart:d,footerEnd:h,footerNote:p,footerNoteDivider:m=!1,footerClassName:g="",footerLayout:y="center",onClose:C,closeDisabled:f=!1,beforeClose:_,closeOnBackdrop:b=!0,className:w="",ariaLabel:v,useTitle:k=!0,inline:x=!1,size:A,layer:B="modal",height:E,fillBody:D=!1,resetScrollKey:N}=e||{},[$,L]=o.useState(!1),U=o.useRef(!1),M=o.useRef(null),P=o.useId(),T=o.useRef(null);o.useEffect(()=>{},[x,a,v,w]),o.useEffect(()=>{N!==void 0&&T.current&&(T.current.scrollTop=0)},[N]);const[ee,te]=o.useState(!1);o.useEffect(()=>{const H=T.current;if(!H)return;const ne=()=>te(H.scrollHeight>H.clientHeight+1);if(ne(),typeof ResizeObserver>"u")return;const V=new ResizeObserver(ne);V.observe(H);const W=H.firstElementChild;return W&&V.observe(W),()=>V.disconnect()},[i,N]),o.useEffect(()=>{if(!x)return xu()},[x]);const I=o.useRef(typeof document>"u"?null:document.activeElement);o.useEffect(()=>{if(x)return;const H=I.current,ne=M.current;return yo(ne,H),ne&&!ne.contains(document.activeElement)&&(ne.querySelector(En)??ne).focus(),()=>{const V=document.activeElement;(!V||V===document.body||ne&&ne.contains(V))&&vo(H)?.focus?.()}},[x]),bo(M,!x);const Y=o.useRef(!0),R=_o(),q=o.useRef(null);o.useEffect(()=>(Y.current=!0,()=>{Y.current=!1,q.current&&(clearTimeout(q.current),q.current=null)}),[]);const Z=o.useCallback(()=>{!Y.current||!U.current||(U.current=!1,L(!1))},[]),z=o.useCallback((H,ne=!1)=>{if(ne&&!Y.current||U.current)return;U.current=!0,L(!0);const V=setTimeout(()=>{q.current===V&&(q.current=null);let W;try{W=H?H():void 0}catch{Z();return}W&&typeof W.then=="function"&&W.then(()=>{setTimeout(Z,120)},Z)},R?0:wv);ne&&(q.current=V)},[Z,R]),j=o.useCallback(()=>{f||_&&_()===!1||z(C,!0)},[z,C,f,_]),F=o.useRef(j);o.useEffect(()=>{F.current=j});const O=!x&&!!C;o.useEffect(()=>{if(O)return Qn(()=>F.current())},[O]);const G=O&&b,ie=o.useRef(!1),K=H=>{ie.current=H.target===H.currentTarget},pe=H=>{const ne=ie.current;ie.current=!1,ne&&H.target===H.currentTarget&&j()},X=n.jsx("div",{className:`popup ${x?"popup--inline":""} ${B==="belowPagePopup"?"popup--below-page-popup":""} ${$?"popup--closing":""} ${w}`,onPointerDown:G?K:void 0,onClick:G?pe:void 0,onMouseDown:x?void 0:H=>{H.target===H.currentTarget&&H.preventDefault()},children:n.jsxs("div",{ref:M,className:`popup-panel${A?` popup-panel--${A}`:""}${E!=null?" popup-panel--has-height":""}${D?" popup-panel--fill-body":""}`,style:E!=null?{"--popup-height":typeof E=="number"?`${E}px`:E}:void 0,tabIndex:-1,role:x?void 0:"dialog","aria-modal":x?void 0:!0,"aria-labelledby":!x&&k&&a?P:void 0,"aria-label":!x&&!(k&&a)?v??(typeof a=="string"?a:void 0):void 0,children:[!k&&(s||C)?n.jsxs("div",{className:"popup-close-float",children:[s,C&&n.jsx(fe,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,onClick:j,disabled:f,ariaLabel:t("common.close","\uB2EB\uAE30")})]}):a||s||C?n.jsxs("div",{className:`popup-header${r?" popup-header--with-subtitle":""}`,children:[n.jsxs("div",{className:"popup-header-main",children:[a?n.jsx("h2",{id:P,className:"popup-title popup-title--left h2",children:a}):n.jsx("span",{id:P,className:"popup-title popup-title--left h2"}),r&&n.jsx("span",{className:"popup-subtitle body-3",children:r})]}),n.jsxs("div",{className:"popup-header-aside",children:[l&&n.jsx("div",{className:"popup-header-segment",children:n.jsx(vn,{size:40,ariaLabel:l.ariaLabel,options:l.options.map(H=>({key:H.key,label:H.label,disabled:H.disabled})),value:l.value,onChange:l.onChange})}),n.jsxs("div",{className:"popup-header-actions",children:[s,C&&n.jsx(fe,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,onClick:j,disabled:f,ariaLabel:t("common.close","\uB2EB\uAE30")})]})]})]}):null,n.jsx("div",{className:"popup-content",ref:T,tabIndex:ee?0:void 0,children:n.jsx("div",{className:"popup-content__inner",children:typeof i=="function"?i({animateThen:z,closeWithAnimation:j}):i})}),p!=null&&p!==!1&&n.jsx("div",{className:`popup-footer-note caption-1${m?" popup-footer-note--divider":""}`,role:"note",children:p}),d||h?n.jsxs("div",{className:`popup-footer popup-footer--bar${g?` ${g}`:""}`,children:[n.jsx("div",{className:"popup-footer__start",children:typeof d=="function"?d({animateThen:z,closeWithAnimation:j}):d}),n.jsx("div",{className:"popup-footer__end",children:typeof h=="function"?h({animateThen:z,closeWithAnimation:j}):h})]}):u?.length?n.jsx("div",{className:`popup-footer popup-footer--buttons${y!=="center"?` popup-footer--${y}`:""}`,children:u.map((H,ne)=>n.jsx(fe,{htmlType:"button",size:48,variant:H.variant??"default",label:H.label,disabled:H.disabled,onClick:()=>H.onClick?.({animateThen:z,closeWithAnimation:j})},ne))}):c?n.jsx("div",{className:`popup-footer${y!=="center"?` popup-footer--${y}`:""}${g?` ${g}`:""}`,children:typeof c=="function"?c({animateThen:z,closeWithAnimation:j}):c}):null]})});return x||typeof document>"u"?X:hn.createPortal(X,document.body)}function Bu({checked:e,onChange:t,disabled:a=!1,label:r,ariaLabel:s,labelPosition:l="right",className:i="",id:u}){const c=r&&n.jsx("span",{className:"toggle__label body-3",children:r});return n.jsxs("label",{className:`toggle${a?" toggle--disabled":""} ${i}`.trim(),children:[l==="left"&&c,n.jsx("input",{id:u,type:"checkbox",role:"switch",checked:e,disabled:a,onChange:d=>t?.(d.target.checked),"aria-label":!r&&s?s:void 0}),n.jsx("span",{className:"toggle__slider"}),l==="right"&&c]})}const Ft=40;function _n({options:e,value:t,onChange:a,placeholder:r,disabled:s=!1,block:l=!1,size:i=Ft,error:u=!1,className:c="",ariaLabel:d,ariaDescribedBy:h}){const{t:p}=_e.useTranslation(),m=r??p("dropdown.placeholder","\uC120\uD0DD"),g=o.useId(),y=o.useId(),C=o.useRef(null),f=o.useCallback((M,P)=>{const T=window.innerHeight-M.bottom<260&&M.top>260;return{position:"fixed",left:M.left,minWidth:M.width,...T?{bottom:window.innerHeight-M.top+6}:{top:M.bottom+6},zIndex:Wa(P)}},[]),{open:_,setOpen:b,toggle:w,style:v,triggerRef:k,menuRef:x}=Ha({computeStyle:f}),[A,B]=o.useState(-1),E=o.useCallback(()=>B(-1),[]),D=e.find(M=>M.value===t);o.useEffect(()=>{if(_){const M=e.findIndex(P=>P.value===t);B(M>=0?M:e.length?0:-1),requestAnimationFrame(()=>{const P=x.current;if(!P)return;const T=P.querySelectorAll(".dropdown__option")[M];T&&(P.scrollTop=Math.max(0,T.offsetTop-P.clientHeight/2+T.clientHeight/2))})}},[_]),o.useEffect(()=>{_&&B(M=>{if(M>=0&&M<e.length)return M;const P=e.findIndex(T=>T.value===t);return P>=0?P:e.length?0:-1})},[_,e.length]);const N=o.useCallback(()=>{s||w()},[s,w]),$=o.useCallback(M=>{M.disabled||s||(M.value!==t&&a?.(M.value),b(!1))},[a,b,s,t]);o.useEffect(()=>{s&&b(!1)},[s,b]);const L=o.useCallback(M=>{if(!s){if(!_){(M.key==="Enter"||M.key===" "||M.key==="ArrowDown")&&(M.preventDefault(),b(!0));return}if(M.key==="Escape"){M.preventDefault(),b(!1);return}M.key==="ArrowDown"?(M.preventDefault(),B(P=>{let T=P+1;for(;T<e.length&&e[T].disabled;)T++;return T<e.length?T:P})):M.key==="ArrowUp"?(M.preventDefault(),B(P=>{let T=P-1;for(;T>=0&&e[T].disabled;)T--;return T>=0?T:P})):(M.key==="Enter"||M.key===" ")&&(M.preventDefault(),e[A]?$(e[A]):b(!1))}},[s,_,e,A,$,b]),U=_?n.jsx("div",{ref:x,id:g,className:"dropdown__menu","data-tooltip-ignore":!0,role:"listbox",style:v,onMouseLeave:E,onMouseDown:M=>M.preventDefault(),children:e.map((M,P)=>n.jsxs("button",{id:`${g}-option-${P}`,type:"button",role:"option","aria-selected":M.value===t,className:Be("dropdown__option body-2",M.value===t?"dropdown__option--active":"",P===A?"dropdown__option--active":"",M.disabled?"dropdown__option--disabled":""),onMouseDown:T=>T.preventDefault(),onClick:()=>$(M),onMouseEnter:()=>B(P),disabled:M.disabled,children:[n.jsx("span",{className:"dropdown__option-check",children:M.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"})})}),M.label]},M.value))}):null;return n.jsxs("div",{ref:C,className:Be("dropdown",`dropdown--s${i}`,_?"dropdown--open":"",l?"dropdown--block":"",u?"dropdown--error":"",c),onKeyDown:L,children:[n.jsxs("button",{ref:k,type:"button",className:"dropdown__trigger",role:"combobox","aria-haspopup":"listbox","aria-expanded":_,"aria-controls":_?g:void 0,"aria-activedescendant":_&&A>=0?`${g}-option-${A}`:void 0,"aria-label":d,"aria-describedby":[d&&D?y:"",h??""].filter(Boolean).join(" ")||void 0,"aria-invalid":u||void 0,disabled:s,onClick:N,onBlur:M=>{_&&!x.current?.contains(M.relatedTarget)&&b(!1)},children:[n.jsx("span",{id:y,className:`dropdown__trigger-label body-2${D?"":" dropdown__trigger-label--placeholder"}`,children:D?D.label:m}),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"&&hn.createPortal(U,C.current?.closest(".ihabdevteam-core-scope")??document.body)]})}const Bv={hearingAid:"hearingAid",cochlearImplant:"cochlearImplant",other:"other",\uBCF4\uCCAD\uAE30:"hearingAid",\uC778\uACF5\uC640\uC6B0:"cochlearImplant",\uAE30\uD0C0:"other"};function ku(e){return e?Bv[e]??null:null}function Au(e){switch(ku(e)){case"hearingAid":return"main";case"cochlearImplant":return"sub";default:return"default"}}function Nu(e,t){const a=ku(e);return a?t(`device.type.${a}`,{defaultValue:e??""}):e??""}const ga=e=>e==null?"":String(e).trim();function Fo(e,t,a,r){const s=ga(e),l=ga(t),i=ga(a);if(r&&s&&l&&i){const c=`${s.padStart(4,"0")}-${l.padStart(2,"0")}-${i.padStart(2,"0")}`,d=new Date(c);if(!Number.isNaN(d.getTime())&&d.toISOString().slice(0,10)===c){const h=ql(c,r);if(h)return h}}const u=[s,l,i];for(;u.length>0&&u[u.length-1]==="";)u.pop();return u.join(".")}function kv(e,t,a){const r=ga(e);return r?`${r}-${ga(t).padStart(2,"0")}-${ga(a).padStart(2,"0")}`:""}function Eu(e){return typeof e=="string"?e:e.label}function Du({value:e,onChange:t,suggestions:a,openOnFocus:r=!1,filterSuggestions:s,onSelectSuggestion:l,autoActiveFirst:i=!1}){const u=o.useId(),[c,d]=o.useState(!1),[h,p]=o.useState(-1),m=o.useRef(null),g=o.useMemo(()=>{if(!a.length)return[];const N=e??"";return s===!1?a:N?typeof s=="function"?s(a,N):a.filter($=>Eu($).toLowerCase().includes(N.toLowerCase())):r?a:[]},[a,e,r,s]),[y,C]=o.useState(!1),f=o.useRef([]),_=y&&g.length===0?f.current:g;o.useEffect(()=>{_.length&&(f.current=_)},[_]);const b=o.useCallback(()=>C(!0),[]),w=o.useCallback(()=>C(!1),[]),v=i?0:-1;o.useEffect(()=>{c||p(v)},[c,v]),o.useEffect(()=>()=>{m.current&&clearTimeout(m.current)},[]);const k=h<_.length?h:v<_.length?v:-1,x=o.useCallback(N=>{l?l(N):t?.(Eu(N)),d(!1)},[t,l]),A=o.useCallback(()=>d(!0),[]),B=o.useCallback(()=>{d(!0),p(v)},[v]),E=o.useCallback(()=>{m.current=setTimeout(()=>d(!1),120)},[]),D=o.useCallback(N=>{N.nativeEvent.isComposing||N.keyCode===229||(N.key==="ArrowDown"?(N.preventDefault(),d(!0),p($=>Math.min(_.length-1,($<_.length?$:v)+1))):N.key==="ArrowUp"?(N.preventDefault(),p($=>Math.max(v,($<_.length?$:_.length)-1))):N.key==="Enter"?k>=0&&x(_[k]):N.key==="Escape"&&c&&(N.preventDefault(),d(!1)))},[_,k,c,x,v]);return{listId:u,open:c,activeIdx:k,filtered:_,handleFocus:A,handleBlur:E,handleInput:B,handleKeyDown:D,handleSelect:x,handleCompositionStart:b,handleCompositionEnd:w}}const Io=typeof window<"u"?o.useLayoutEffect:o.useEffect;function Kn(e){const{value:t,defaultValue:a,name:r,inputRef:s,onChange:l,label:i,ariaLabel:u,ariaDescribedBy:c,required:d,placeholder:h,ghostText:p,ghostHint:m,type:g="text",disabled:y=!1,readOnly:C=!1,error:f,helperText:_,maxLength:b,size:w=40,variant:v="input",fullWidth:k=!1,newline:x=!1,multiline:A=!1,rows:B=3,leftIcon:E,rightIcon:D,clearable:N=!1,list:$,showCount:L=!0,className:U="",onFocus:M,onBlur:P,onKeyDown:T,onEnter:ee,inputMode:te,autoComplete:I,autoFocus:Y,suggestions:R,filterSuggestions:q,onSelectSuggestion:Z,autoActiveFirst:z,openOnFocus:j=!1}=e,F=C||y?void 0:R,{t:O}=_e.useTranslation(),G=o.useId();!i&&!u&&At(`TextField:unnamed:${G}`,"[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 ie=`tf-${G}`,K=`tf-helper-${G}`,pe=o.useRef(null),X=Du({value:t??"",onChange:l,suggestions:F??[],openOnFocus:j,filterSuggestions:q,onSelectSuggestion:Z,autoActiveFirst:z}),H=!!F&&X.open&&X.filtered.length>0,ne=o.useRef(null),[V,W]=o.useState(null),oe=o.useCallback(()=>{const Se=ne.current;if(!Se||typeof window>"u")return;const Ge=Se.getBoundingClientRect(),we=230,qe=window.innerHeight-Ge.bottom<we+8&&Ge.top>we+8;W({position:"fixed",left:Ge.left,width:Ge.width,...qe?{bottom:window.innerHeight-Ge.top+8}:{top:Ge.bottom+8},zIndex:Wa(Se)})},[]);Io(()=>{if(!H)return;oe();let Se=null;const Ge=()=>{if(typeof requestAnimationFrame>"u"){oe();return}Se===null&&(Se=requestAnimationFrame(()=>{Se=null,oe()}))},we=qe=>{const Ye=qe.target;Ye&&Ye.nodeType===1&&Ye.closest?.(".text-field__suggestions")||Ge()};return window.addEventListener("scroll",we,!0),window.addEventListener("resize",Ge),()=>{Se!==null&&cancelAnimationFrame(Se),window.removeEventListener("scroll",we,!0),window.removeEventListener("resize",Ge)}},[H,oe]);const xe=o.useCallback(Se=>{pe.current=Se,typeof s=="function"?s(Se):s&&(s.current=Se)},[s]),be=p?`${p}${m??O("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)")}`:h,me=t!==void 0,ke=me&&g==="password",[Le,Me]=o.useState((a??"").length),le=me?(t??"").length:Le,ve=o.useRef(t);Io(()=>{ve.current=t}),o.useEffect(()=>{const Se=pe.current;if(!ke||!Se)return;const Ge=t??"";Se.value!==Ge&&(Se.value=Ge)},[ke,t]),o.useEffect(()=>{if(!x||!pe.current)return;const Se=pe.current;Se.style.height="",Se.scrollHeight>Se.clientHeight&&(Se.style.height=`${Se.scrollHeight}px`)},[t,Le,x]);const $e=b!=null&&le>b,Ae=w===32?16:20,Ie=Be("text-field",`text-field--s${w}`,v==="display"?"text-field--display":"",k?"text-field--full-width":"",y?"text-field--disabled":"",C?"text-field--readonly":"",f?"text-field--error":"",E?"text-field--has-left-icon":"",D||N?"text-field--has-right-icon":"",U),ze={id:ie,...ke?{}:me?{value:t}:{defaultValue:a},ref:xe,placeholder:be,name:r,disabled:y,readOnly:C,autoFocus:Y,maxLength:b,list:$,inputMode:te,autoComplete:I,"aria-label":!i&&u?u:void 0,"aria-required":d,"aria-invalid":!!f,"aria-describedby":[_||f?K:null,c].filter(Boolean).join(" ")||void 0,role:F?"combobox":void 0,"aria-autocomplete":F?"list":void 0,"aria-haspopup":F?"listbox":void 0,"aria-expanded":F?H:void 0,"aria-controls":H?X.listId:void 0,"aria-activedescendant":H&&X.activeIdx>=0?`${X.listId}-option-${X.activeIdx}`:void 0,onChange:Se=>{const Ge=Se.target;me||Me(Ge.value.length),l?.(Ge.value),F&&X.handleInput(),ke&&queueMicrotask(()=>{const we=ve.current??"";Ge.value!==we&&(Ge.value=we)})},onCompositionStart:F?X.handleCompositionStart:void 0,onCompositionEnd:F?X.handleCompositionEnd:void 0,onFocus:(Se=>{M?.(Se),F&&X.handleFocus()}),onBlur:(Se=>{P?.(Se),F&&X.handleBlur()}),onKeyDown:(Se=>{const Ge=(Se.key==="Tab"&&!Se.shiftKey||Se.key===" ")&&!Se.nativeEvent.isComposing;if(p&&Ge&&!C&&!y&&!(Se.currentTarget.value??"").trim()){Se.preventDefault();const we=Se.currentTarget;me||(we.value=p,Me(p.length)),l?.(p);return}F&&Se.key==="Enter"&&!Se.nativeEvent.isComposing&&X.activeIdx>=0?Se.preventDefault():ee&&Se.key==="Enter"&&!Se.nativeEvent.isComposing&&(Se.preventDefault(),ee()),T?.(Se),F&&X.handleKeyDown(Se)})},dt=N&&!y&&!C&&le>0,st=()=>x?n.jsx("textarea",{...ze,className:"text-field__input text-field__input--auto body-2",rows:1}):A?n.jsx("textarea",{...ze,className:"text-field__input text-field__input--textarea body-2",rows:B}):n.jsx("input",{...ze,type:g,className:"text-field__input body-2"}),et=v==="display"&&!x&&!A&&!!be,gt=()=>n.jsxs(n.Fragment,{children:[st(),et&&n.jsx("span",{className:"text-field__placeholder","aria-hidden":"true",children:be})]});return n.jsxs("div",{ref:ne,className:Ie,children:[i&&n.jsxs("label",{htmlFor:ie,className:"text-field__label caption-1",children:[i,d&&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(ot,{icon:E,label:"",className:"",svgClassName:"text-field__icon-svg",size:Ae})}),gt(),b!=null&&L&&n.jsxs("span",{className:`text-field__count caption-2${$e?" text-field__count--over":""}`,children:[le,"/",b]}),dt&&n.jsx(fe,{size:24,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,className:"text-field__clear",ariaLabel:O("textField.clearAriaLabel","\uC785\uB825\uAC12 \uC9C0\uC6B0\uAE30"),htmlType:"button",onMouseDown:Se=>{Se.preventDefault()},onClick:()=>{!me&&pe.current&&(pe.current.value="",Me(0)),l?.("")},tabIndex:-1}),D&&!dt&&n.jsx("span",{className:"text-field__icon text-field__icon--right",children:n.jsx(ot,{icon:D,label:"",className:"",svgClassName:"text-field__icon-svg",size:Ae})})]}),!!F&&n.jsx("span",{className:"text-field__status",role:"status","aria-live":"polite",children:X.open&&(t??"").length>0&&X.filtered.length===0?O("common.noMatches","\uB9DE\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"):""}),H&&(typeof document>"u"?null:hn.createPortal(n.jsx("ul",{id:X.listId,className:"text-field__suggestions",role:"listbox",style:V??{position:"fixed",visibility:"hidden"},"data-tooltip-ignore":!0,children:X.filtered.map((Se,Ge)=>n.jsx("li",{id:`${X.listId}-option-${Ge}`,role:"option","aria-selected":Ge===X.activeIdx,className:`text-field__suggestion body-2${Ge===X.activeIdx?" is-active":""}`,onMouseDown:we=>we.preventDefault(),onClick:()=>{X.handleSelect(Se),pe.current?.focus()},children:typeof Se=="string"?Se:n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-field__suggestion-label",children:Se.label}),Se.hint&&n.jsx("span",{className:"text-field__suggestion-hint caption-1",children:Se.hint})]})},typeof Se=="string"?`${Se}-${Ge}`:Se.id))}),document.body)),(_||f)&&n.jsx("div",{className:"text-field__footer",children:n.jsx("span",{id:K,className:"text-field__helper caption-1",role:f?"alert":void 0,children:f||_})})]})}const Su=()=>{};function un(e){const t=o.useId();if(!("variant"in e)){const{label:b,sub:w,onClick:v,children:k,align:x="horizontal",icon:A,useFullWidth:B=!1}=e,E=D=>{v&&D.target===D.currentTarget&&(D.key==="Enter"||D.key===" ")&&(D.preventDefault(),v())};return n.jsxs("div",{className:Be("panel-row",x==="vertical"?"panel-row--vertical":"",B?"panel-row--label-fixed panel-row--fill":"",v?"panel-row--clickable":""),onClick:v,onKeyDown:v?E:void 0,role:v?"button":void 0,tabIndex:v?0:void 0,children:[A!=null&&n.jsx("div",{className:"panel-row__icon",children:A}),b!=null&&n.jsxs("div",{className:"panel-row__left",children:[n.jsx("div",{className:"panel-row__label body-3",children:b}),w&&n.jsx("div",{className:"panel-row__sub caption-1",children:w})]}),n.jsx("div",{className:"panel-row__right",children:k})]})}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(Ca,{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:r,sub:s,onClick:l,required:i,error:u,align:c="horizontal",useFullWidth:d=!1,icon:h}=e,p=a==="button"?void 0:l;let m=null;const g=a==="toggle"?`panel-toggle-${t}`:void 0,y=u?`panel-error-${t}`:void 0,C=`panel-helper-${t}`;if(a==="toggle"){const b=e;m=n.jsx(Bu,{checked:b.checked,onChange:b.onChange,id:g})}else if(a==="segmented"){const b=e;m=n.jsx(vn,{options:b.options,value:b.value,onChange:b.onChange,size:b.size??Ft,ariaLabel:r})}else if(a==="dropdown"){const b=e,w=b.dropdowns?.length?n.jsx("div",{className:`panel-row__dropdown-group${d?" panel-row__dropdown-group--full":""}`,children:b.dropdowns.map((v,k)=>n.jsx("div",{className:d?"panel-row__dropdown-item--full":void 0,children:n.jsx(_n,{options:v.options,value:v.value,onChange:v.onChange,size:Ft,placeholder:v.placeholder,block:d,error:!!u,ariaDescribedBy:y,ariaLabel:v.ariaLabel??([r,v.placeholder].filter(Boolean).join(" ")||void 0)})},k))}):n.jsx(_n,{options:b.options??[],value:b.value??"",onChange:b.onChange??Su,size:Ft,block:d,error:!!u,ariaLabel:r,ariaDescribedBy:y});m=u?n.jsxs("div",{className:`panel-row__dropdown-error-wrap${d?" panel-row__dropdown-error-wrap--full":""}`,children:[w,n.jsx("span",{id:y,className:"caption-1 panel-row__error",role:"alert",children:u})]}):w}else if(a==="button"){const b=e;b.buttons?.length?m=n.jsx("div",{className:"panel-row__button-group",children:b.buttons.map((w,v)=>n.jsx(fe,{htmlType:"button",size:w.btnSize??Ft,variant:w.btnVariant??"default",disabled:w.disabled,onClick:w.onClick,children:w.label},v))}):m=n.jsx(fe,{htmlType:"button",size:b.btnSize??Ft,variant:b.btnVariant??"default",disabled:b.disabled,onClick:b.onClick,children:b.buttonLabel})}else if(a==="text"){const b=e;m=n.jsx("span",{className:`panel-row__text body-2${d?" panel-row__text--full":""}`,style:b.valueColor?{color:b.valueColor}:void 0,children:b.value})}else if(a==="input"){const b=e;m=n.jsxs("div",{className:`panel-row__input-wrap${d?" panel-row__input-wrap--full":""}`,children:[n.jsx(Kn,{size:Ft,value:b.value,onChange:b.onChange??Su,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:d,error:u,ariaLabel:r,required:i,ariaDescribedBy:b.helperText?C:void 0}),b.helperText&&n.jsx("div",{id:C,className:"panel-row__helper caption-1",children:b.helperText})]})}else a==="custom"&&(m=e.children);u&&a!=="input"&&a!=="dropdown"&&(m=n.jsxs("div",{className:`panel-row__dropdown-error-wrap${d?" panel-row__dropdown-error-wrap--full":""}`,children:[m,n.jsx("span",{id:y,className:"caption-1 panel-row__error",role:"alert",children:u})]}));const f=a==="input"||a==="dropdown"||(a==="text"||a==="custom")&&d,_=b=>{p&&b.target===b.currentTarget&&(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),p())};return n.jsxs("div",{className:Be("panel-row",c==="vertical"?"panel-row--vertical":"",f?"panel-row--label-fixed":"",a==="text"?"panel-row--text":"",p?"panel-row--clickable":""),onClick:p,onKeyDown:p?_:void 0,role:p?"button":void 0,tabIndex:p?0:void 0,children:[h!=null&&n.jsx("div",{className:"panel-row__icon",children:h}),n.jsxs("div",{className:"panel-row__left",children:[g?n.jsxs("label",{htmlFor:g,className:"panel-row__label body-3",children:[r,i&&n.jsx("span",{className:"required-mark",children:"*"})]}):n.jsxs("div",{className:"panel-row__label body-3",children:[r,i&&n.jsx("span",{className:"required-mark",children:"*"})]}),s&&n.jsx("div",{className:"panel-row__sub caption-1",children:s})]}),n.jsx("div",{className:"panel-row__right",children:m})]})}function ju(e){const t=e.productName||e.brand,a=[e.brand,e.fitType].filter(r=>!!r&&r!==t);return[...new Set(a)].join(" \xB7 ")}function Av({devices:e,onRelease:t,emptyLabel:a}){const{t:r,i18n:s}=_e.useTranslation();return n.jsx("div",{className:"panel-row panel-row--device",children:["left","right"].map(l=>{const i=e[l],u=l==="left"?r("device.direction.left","\uC88C"):r("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(fe,{htmlType:"button",size:32,type:"dot",icon:"x",ariaLabel:`${u} ${r("customers.device.unwear","\uCC29\uC6A9 \uD574\uC81C")}`,showTooltipInfo:r("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(ln,{size:"small",variant:Au(i.device),fill:"soft",label:Nu(i.device,r)}),ju(i)&&n.jsx("span",{className:"panel-row__device-detail body-3",children:ju(i)})]}),n.jsx("span",{className:"panel-row__device-name body-2b",children:i.productName||i.brand}),Fo(i.wornYear,i.wornMonth,i.wornDay,s.language)&&n.jsx("span",{className:"panel-row__device-date caption-1",children:r("customers.device.wornSince",{date:Fo(i.wornYear,i.wornMonth,i.wornDay,s.language)})})]}):n.jsx("span",{className:"panel-row__device-empty body-3",children:a??r("customers.device.notRegistered","\uBBF8\uB4F1\uB85D")})]},l)})})}function Qa({title:e,titleLevel:t=2,icon:a,disc:r,actions:s,size:l="medium",minHeight:i,maxWidth:u,className:c,scrollable:d,scrollbarGutter:h="auto",compactRows:p=!1,useBorder:m=!0,useBg:g=!0,useRowBorder:y=!0,labelWidth:C,form:f=!1,loading:_,empty:b,children:w}){const v=Be("panel",`panel--${l}`,f?"panel--form":"",i!==void 0?"panel--fill":"",m?"":"panel--no-border",g?"":"panel--no-bg",y?"":"panel--no-row-border",p?"panel--compact-rows":"",c),k={};i!==void 0&&(k.minHeight=i),u!==void 0&&(k.maxWidth=typeof u=="number"?`${u}px`:u),C!==void 0&&(k["--panel-label-width"]=typeof C=="number"?`${C}px`:C);const x=t?`h${t}`:"div";return n.jsxs("div",{className:v,style:Object.keys(k).length?k:void 0,children:[(!!e||r!=null)&&n.jsxs("div",{className:Be("panel__header",r!=null?"panel__header--with-disc":""),children:[a&&n.jsx(ot,{icon:a,label:typeof e=="string"?e:void 0,className:"panel__icon"}),n.jsxs("div",{className:"panel__title-group",children:[!!e&&n.jsx(x,{className:`panel__title ${r!=null?"body-3b":"h5b"}`,children:e}),r!=null&&n.jsx("p",{className:"panel__disc caption-1",children:r})]}),s&&n.jsx("div",{className:"panel__actions",children:s})]}),_?n.jsx(un,{variant:"loading"}):b!=null&&o.Children.toArray(w).length===0?n.jsx(un,{variant:"empty",children:b}):d?n.jsx("div",{className:Be("panel__body--scroll",h==="stable"&&"panel__body--gutter-stable"),children:w}):w]})}function Nv({cols:e=2,layout:t="grid",gap:a=1,collapseAt:r,className:s,style:l,children:i}){const u=o.useRef(null),[c,d]=o.useState();o.useEffect(()=>{const p=u.current;if(r===void 0||!p||(d(p.clientWidth),typeof ResizeObserver>"u"))return;const m=new ResizeObserver(([g])=>d(g.contentRect.width));return m.observe(p),()=>m.disconnect()},[r]);const h=r!==void 0&&c!==void 0&&c<=r;return n.jsx("div",{ref:u,className:Be("panel-grid",t==="columns"&&"panel-grid--columns",s),style:{"--panel-grid-cols":h?1:e,"--panel-grid-gap":typeof a=="number"?`${a}px`:a,...l},children:i})}function Oo({checked:e=!1,onChange:t,disabled:a,indeterminate:r,label:s,size:l="medium",className:i,title:u,ariaLabel:c}){const d=o.useRef(null),h=o.useId(),p=o.useRef(!!r);return p.current=!!r,o.useEffect(()=>{d.current&&(d.current.indeterminate=!!r)}),n.jsxs("label",{className:Be("checkbox",l==="small"&&"checkbox--small",l==="large"&&"checkbox--large",a&&"checkbox--disabled",i),htmlFor:h,title:u,children:[n.jsx("input",{ref:d,id:h,type:"checkbox",className:"checkbox__input",checked:e,onChange:m=>{t?.(m.target.checked),d.current&&(d.current.indeterminate=p.current)},disabled:a,"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 Tu(e,t){const a=()=>{if(e){const[C,f]=e.split("-");return{y:+C,m:+f-1}}const[g,y]=cr(t).split("-");return{y:+g,m:+y-1}},[r,s]=o.useState(()=>a().y),[l,i]=o.useState(()=>a().m),u=o.useRef(e);o.useEffect(()=>{if(e===u.current)return;u.current=e;const g=a();s(g.y),i(g.m)},[e]);const c=o.useRef({y:r,m:l});o.useEffect(()=>{c.current={y:r,m:l}},[r,l]);const d=o.useCallback(g=>{const y=c.current.y*12+c.current.m+g,C=Math.floor(y/12),f=y-C*12;c.current={y:C,m:f},s(C),i(f)},[]),h=o.useCallback(()=>d(-1),[d]),p=o.useCallback(()=>d(1),[d]),m=o.useCallback((g,y)=>{c.current={y:g,m:y},s(g),i(y)},[]);return{viewY:r,viewM:l,prevMonth:h,nextMonth:p,setViewYM:m}}function xr(e,t){return new Date(e,t+1,0).getDate()}function Ev(e,t){return new Date(e,t,1).getDay()}function er(e,t,a){return`${e}-${String(t+1).padStart(2,"0")}-${String(a).padStart(2,"0")}`}function Dv(e){if(!e)return"";const[t,a,r]=e.split("-");return`${t}. ${a}. ${r}.`}function Sv(e){const t=e.replace(/\D/g,"");if(t.length!==8)return null;const a=+t.slice(0,4),r=+t.slice(4,6),s=+t.slice(6,8);if(r<1||r>12||s<1||s>31)return null;const l=new Date(a,r-1,s);return l.getFullYear()!==a||l.getMonth()!==r-1||l.getDate()!==s?null:er(a,r-1,s)}const jv=1900;function Tv(e,t,a,r,s){const l=r?+r.split("-")[0]:Math.min(jv,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:a(c)});return u}function Mu(e,t,a,r){const s=[];for(let l=1;l<=12;l++){const i=`${e}-${String(l).padStart(2,"0")}`;a&&i<a.slice(0,7)||r&&i>r.slice(0,7)||s.push({value:String(l),label:t(e,l)})}return s}function Lu({value:e,onChange:t,size:a=Ft,min:r,max:s,disabled:l,placeholder:i,className:u,today:c}){const{t:d,i18n:h}=_e.useTranslation(),p=i??d("datePicker.chooseDate","\uB0A0\uC9DC \uC120\uD0DD"),m=o.useMemo(()=>d("calendar.dow",{returnObjects:!0}),[d]),g=cr(c),{viewY:y,viewM:C,prevMonth:f,nextMonth:_,setViewYM:b}=Tu(e,c),w=o.useId(),v=o.useCallback((H,ne)=>{const V=window.innerHeight,W=window.innerWidth,oe=typeof document<"u"?document.getElementById(w):null,xe=Math.max(oe?.offsetHeight||0,oe?.scrollHeight||0)||300,be=Math.max(H.width,oe?.offsetWidth||0,260),me=V-H.bottom,ke=H.top,Le=me<xe&&ke>me,Me=8,le=(ve,$e)=>Math.min(Math.max(Me,ve),Math.max(Me,$e));return{position:"fixed",left:le(H.left,W-be-Me),width:H.width,minWidth:260,...Le?{top:"auto",bottom:le(V-H.top+6,V-xe-Me)}:{bottom:"auto",top:le(H.bottom+6,V-xe-Me)},zIndex:Wa(ne)}},[w]),{open:k,setOpen:x,toggle:A,style:B,triggerRef:E,menuRef:D}=Ha({computeStyle:v,onScroll:"reposition",onResize:"reposition",ignoreOutsideClickSelector:".dropdown__menu"});o.useEffect(()=>{if(!k)return;const H=D.current;return(H?.querySelector(".date-picker__day--selected:not(:disabled)")??H?.querySelector(".date-picker__day--today:not(:disabled)")??H?.querySelector(".date-picker__day:not(:disabled)")??H?.querySelector(En)??H)?.focus?.(),()=>{const ne=document.activeElement;(!ne||ne===document.body)&&E.current?.focus?.()}},[k,D,E]);const[N,$]=o.useState(1),L=o.useRef(null),U=o.useRef(null);o.useEffect(()=>{if(!k)return;const H=e&&e.slice(0,7)===`${y}-${String(C+1).padStart(2,"0")}`?+e.slice(8):g.slice(0,7)===`${y}-${String(C+1).padStart(2,"0")}`?+g.slice(8):1;$(H)},[k]),o.useEffect(()=>{if(U.current==null)return;const H=U.current;U.current=null,L.current?.querySelector(`[data-day="${H}"]`)?.focus()}),o.useEffect(()=>{$(H=>Math.min(H,xr(y,C)))},[y,C]);const M=o.useCallback(H=>{let ne=er(H.getFullYear(),H.getMonth(),H.getDate());r&&ne<r&&(ne=r),s&&ne>s&&(ne=s);const[V,W,oe]=ne.split("-").map(Number);(V!==y||W-1!==C)&&b(V,W-1),$(oe),U.current=oe},[r,s,y,C,b]),P=o.useCallback(H=>{const ne=new Date(y,C,N),V=oe=>{ne.setDate(ne.getDate()+oe),M(ne)},W=oe=>{const xe=ne.getFullYear()*12+ne.getMonth()+oe,be=Math.floor(xe/12),me=xe-be*12;M(new Date(be,me,Math.min(ne.getDate(),xr(be,me))))};switch(H.key){case"ArrowLeft":V(-1);break;case"ArrowRight":V(1);break;case"ArrowUp":V(-7);break;case"ArrowDown":V(7);break;case"Home":V(-ne.getDay());break;case"End":V(6-ne.getDay());break;case"PageUp":H.shiftKey?W(-12):W(-1);break;case"PageDown":H.shiftKey?W(12):W(1);break;default:return}H.preventDefault()},[y,C,N,M]),T=o.useCallback(H=>{l||(t(er(y,C,H)),x(!1))},[y,C,t,x,l]);o.useEffect(()=>{l&&x(!1)},[l,x]);const ee=H=>{const ne=er(y,C,H);return!!(r&&ne<r||s&&ne>s)},te=(()=>{const H=xr(y,C);if(N>=1&&N<=H&&!ee(N))return N;for(let ne=1;ne<=H;ne++)if(!ee(ne))return ne;return-1})(),I=[];for(let H=0;H<Ev(y,C);H++)I.push(null);for(let H=1;H<=xr(y,C);H++)I.push(H);const Y=a===64?20:a===40?16:18,R=Ul(h.language),q=H=>new Intl.DateTimeFormat(R,{year:"numeric"}).format(new Date(H,0,1)),Z=(H,ne)=>new Intl.DateTimeFormat(R,{month:"long"}).format(new Date(H,ne-1,1)),z=Tv(y,+g.slice(0,4),q,r,s),j=Mu(y,Z,r,s),F=H=>{const ne=Mu(H,Z,r,s);if(ne.length===0)return;const V=ne.some(W=>+W.value===C+1);b(H,V?C:+ne[0].value-1)},[O,G]=o.useState(null);o.useEffect(()=>{G(null)},[e]);const ie=o.useCallback(H=>{G(H);const ne=Sv(H);if(!ne||r&&ne<r||s&&ne>s)return;t(ne);const[V,W]=ne.split("-");b(+V,+W-1)},[r,s,t,b]),K=o.useCallback(()=>{G(null)},[]),pe=o.useCallback(H=>{H.key==="Enter"?(H.preventDefault(),K(),x(!1)):H.key==="Escape"?(K(),x(!1)):H.key==="ArrowDown"&&!k&&(H.preventDefault(),x(!0))},[K,x,k]),X=k?hn.createPortal(n.jsxs("div",{ref:D,id:w,className:"date-picker__dropdown",style:B,"data-tooltip-ignore":!0,role:"dialog","aria-label":d("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:f,"aria-label":d("calendar.prevMonth","\uC774\uC804 \uB2EC"),children:n.jsx(Hs,{size:16,strokeWidth:2})}),n.jsxs("div",{className:"date-picker__nav-ym",children:[n.jsx(_n,{className:"date-picker__nav-dropdown",ariaLabel:d("datePicker.selectYear","\uC5F0 \uC120\uD0DD"),options:z,value:String(y),onChange:H=>F(+H),size:40}),n.jsx(_n,{className:"date-picker__nav-dropdown",ariaLabel:d("datePicker.selectMonth","\uC6D4 \uC120\uD0DD"),options:j,value:String(C+1),onChange:H=>b(y,+H-1),size:40})]}),n.jsx("button",{type:"button",className:"date-picker__nav-btn",onClick:_,"aria-label":d("calendar.nextMonth","\uB2E4\uC74C \uB2EC"),children:n.jsx(Vs,{size:16,strokeWidth:2})})]}),n.jsxs("div",{className:"date-picker__grid",ref:L,onKeyDown:P,children:[m.map(H=>n.jsx("div",{className:"date-picker__dow caption-1",children:H},H)),I.map((H,ne)=>{if(H===null)return n.jsx("div",{},`e${ne}`);const V=er(y,C,H),W=V===e,oe=V===g,xe=ee(H),be=ne%7;return n.jsx("button",{type:"button",disabled:xe,"data-day":H,tabIndex:H===te?0:-1,"aria-current":oe?"date":void 0,onClick:()=>!xe&&T(H),className:Be("date-picker__day caption-1",W&&"date-picker__day--selected",oe&&!W&&"date-picker__day--today",xe&&"date-picker__day--disabled",be===0&&"date-picker__day--sun",be===6&&"date-picker__day--sat"),children:H},H)})]})]}),document.body):null;return n.jsxs("div",{className:Be("date-picker",`date-picker--s${a}`,k&&"date-picker--open",u),children:[n.jsxs("div",{className:"date-picker__field",children:[n.jsx("input",{ref:E,type:"text",className:"date-picker__trigger body-2",value:O??Dv(e),placeholder:p,onChange:H=>ie(H.target.value),onClick:()=>!l&&!k&&A(),onKeyDown:pe,onBlur:K,disabled:l,"aria-haspopup":"dialog","aria-expanded":k,inputMode:"numeric",autoComplete:"off"}),n.jsx("button",{type:"button",className:"date-picker__icon-btn",onClick:()=>!l&&A(),disabled:l,tabIndex:-1,"aria-label":p,"aria-haspopup":"dialog","aria-expanded":k,children:n.jsx(Qs,{size:Y,className:"date-picker__icon",strokeWidth:1.5})})]}),X]})}const $u=["personal","sensitive","marketing"];function Mv({takenKinds:e,busy:t,today:a,onClose:r,onSubmit:s,className:l}){const{t:i}=_e.useTranslation(),[u]=o.useState(()=>cr(a)),[c,d]=o.useState([]),[h,p]=o.useState("paper"),[m,g]=o.useState("self"),[y,C]=o.useState(u),[f,_]=o.useState(""),b=$u.filter(v=>!e.includes(v)),w={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(Pn,{title:i("customers.consent.record","\uB3D9\uC758 \uBC1B\uAE30"),closeDisabled:t,onClose:r,className:l,footer:()=>n.jsx(fe,{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:y||null,note:f.trim()||null})}),children:n.jsxs(Qa,{useBorder:!1,useRowBorder:!1,labelWidth:96,children:[n.jsx(un,{variant:"custom",useFullWidth:!0,label:i("customers.consent.kinds","\uBC1B\uC740 \uAC08\uB798"),children:n.jsxs("div",{className:"consent-record-popup__kinds",children:[b.map(v=>n.jsx(Oo,{checked:c.includes(v),disabled:t,label:w[v],onChange:k=>d(x=>k?[...x,v]:x.filter(A=>A!==v))},v)),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(un,{variant:"custom",useFullWidth:!0,label:i("customers.consent.methodTitle","\uBC1B\uC740 \uBC29\uBC95"),children:n.jsx(vn,{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:v=>p(String(v))})}),n.jsx(un,{variant:"custom",useFullWidth:!0,label:i("customers.consent.sourceTitle","\uC218\uC9D1 \uCD9C\uCC98"),children:n.jsx(vn,{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:v=>g(String(v))})}),n.jsx(un,{variant:"custom",useFullWidth:!0,label:i("customers.consent.day","\uBC1B\uC740 \uB0A0"),children:n.jsx(Lu,{size:48,value:y,max:u,today:a,onChange:v=>C(v??"")})}),n.jsx(un,{variant:"custom",useFullWidth:!0,label:i("customers.consent.note","\uBA54\uBAA8"),children:n.jsx(Kn,{size:48,fullWidth:!0,value:f,onChange:_,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 zo({page:e,totalPages:t,onChange:a,prevLabel:r,nextLabel:s,className:l=""}){const{t:i}=_e.useTranslation(),u=r??i("common.prevPage","\uC774\uC804 \uD398\uC774\uC9C0"),c=s??i("common.nextPage","\uB2E4\uC74C \uD398\uC774\uC9C0"),d=Math.max(1,t),h=()=>a(Math.max(1,Math.min(d,e-1))),p=()=>a(Math.min(d,e+1));return n.jsxs("div",{className:Be("pagination",l),children:[n.jsx(fe,{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),d)," / ",d]}),n.jsx(fe,{htmlType:"button",size:32,type:"dot",shape:"rounded",icon:"chevron-right",ariaLabel:c,disabled:e>=t,onClick:p})]})}function Wo({count:e,search:t,segment:a,filters:r,pageSize:s,pagination:l,actions:i,className:u}){const{t:c}=_e.useTranslation(),d=e!=null&&n.jsxs("p",{className:"toolbar__count body-1",role:"status","aria-atomic":"true",children:[e.prefix??c("common.totalPrefix","\uCD1D "),n.jsx("span",{className:"toolbar__count-highlight",children:e.value}),e.unit,e.suffix]}),h=!!(t||r?.length||s||l||i);return n.jsxs("div",{className:Be("toolbar",u),children:[n.jsxs("div",{className:"toolbar__row",children:[d,a&&(Array.isArray(a)?a:[a]).map((p,m)=>n.jsx(vn,{size:Ft,...p},p.ariaLabel??m))]}),h&&n.jsx("div",{className:"toolbar__row",children:n.jsxs("div",{className:"toolbar__row-end",children:[t&&n.jsx(Kn,{className:"toolbar__search",size:Ft,value:t.value,onChange:t.onChange,placeholder:t.placeholder??c("common.search","\uAC80\uC0C9"),ariaLabel:t.placeholder??c("common.search","\uAC80\uC0C9"),autoFocus:t.autoFocus,clearable:!0}),r?.map((p,m)=>n.jsx(_n,{size:Ft,options:p.options,value:p.value,onChange:p.onChange,ariaLabel:p.ariaLabel},m)),(s||l)&&n.jsxs("div",{className:"toolbar__pager",children:[s&&n.jsx(_n,{size:Ft,options:s.options,value:s.value,onChange:s.onChange,ariaLabel:s.ariaLabel??c("common.pageSizeSelect","\uD398\uC774\uC9C0\uB2F9 \uD45C\uC2DC \uAC1C\uC218")}),l&&n.jsx(zo,{page:l.page,totalPages:l.total,onChange:l.onChange,prevLabel:l.prevLabel,nextLabel:l.nextLabel})]}),i]})})]})}function Ru(e){return typeof e=="string"?e:typeof e=="number"?String(e):Array.isArray(e)?e.map(Ru).join(""):""}function Lv(e){let t=e.replace(/\r\n/g,`
822
+ 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"},Sg={timeHM:"{{hh}}:{{mm}}",timeH:"{{hh}}:{{mm}}"},jg={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"},Tg={clearAriaLabel:"Clear input"},Mg={ariaLabel:"Select tab"},Lg={ariaLabel:"Tabs"},$g={dragPrompt:"Drag and drop files here",browseButton:"Choose Files",removeAriaLabel:"Remove {{name}}"},Rg={ariaLabel:"User avatar"},Pg={relativeDay:{today:"Today",yesterday:"Yesterday",daysAgo:"{{n}}d ago"}},Fg={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"},Ig={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"}},Og={steps:"Step {{current}} of {{total}}"},zg={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"},Wg={resetColumns:"Reset column widths",scrollRegion:"Horizontally scrollable table",rowActionHint:"Press a row to open its details"},Hg={viewWords:"Words"},Vg={ariaLabel:"Banner",dotAriaLabel:"Banner {{index}} of {{count}}"},qg={chooseDate:"Choose a date",selectYear:"Select year",selectMonth:"Select month"},Ug={previewRegion:"Report preview \u2014 scrollable sideways"},Gg={description:"Description",textbox:"Text",training:"Training guide",menu:"Menu"},Kg={place:{labial:"Bilabial",alveolar:"Alveolar",palatal:"Palatal",velar:"Velar",glottal:"Glottal"}},Yg={clearSelection:"Clear selection"},Zg={showResult:"Show {{type}} result"},Xg={selected:"Selected",remove:"Remove",exclude:"Excluded",nthSelected:"Selection {{n}}"},Jg={loading:"Loading"},Qg={state:{active:"playing",played:"heard",correct:"correct",wrong:"wrong"}},ey={ariaLabel:"Breadcrumb"},ty={empty:"No items yet."},ny={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"},ay={common:ng,calendar:ag,passCard:rg,rating:og,colorPicker:sg,dropdown:lg,accordion:ig,header:ug,nav:cg,settings:dg,usage:pg,account:hg,training:mg,customers:Cg,payment:fg,coupons:bg,visits:gg,trainingType:yg,myWordTable:vg,keyWords:_g,wordTable:xg,wordSearch:wg,wordPrint:Bg,topic:kg,device:Ag,manager:Ng,wordPairs:Eg,footer:Dg,date:Sg,wordData:jg,textField:Tg,segmentedControl:Mg,tabs:Lg,fileUpload:$g,avatar:Rg,myHomework:Pg,trainingStatus:Fg,store:Ig,progress:Og,trainingMiss:zg,table:Wg,wordScore:Hg,topBanner:Vg,datePicker:qg,report:Ug,tooltip:Gg,phonemeProfile:Kg,bulkBar:Yg,debug:Zg,badge:Xg,loader:Jg,soundCompass:Qg,breadcrumb:ey,board:ty,promoBannerBg:ny};const ry="0.405.0",oy=[{code:"ko",label:"\uD55C\uAD6D\uC5B4"},{code:"en",label:"English"}],fo="ko",sy="ihab_display_language";function Ql(){if(typeof window>"u")return fo;try{const e=localStorage.getItem(sy);if(e&&oy.some(t=>t.code===e))return e}catch{}return fo}function ei(e){try{document.documentElement.lang=e}catch{}}Kt.on("languageChanged",ei),ei(Ql()),Kt.use(_e.initReactI18next).init({resources:{ko:{translation:tg},en:{translation:ay}},lng:Ql(),fallbackLng:fo,interpolation:{escapeValue:!1},react:{useSuspense:!1}});const ly=new Map;try{Kt.store?.on?.("added",()=>ly.clear())}catch{}let hr=null,ti=null,ni=null;function iy(){const e=Wl();if(e&&e.entries.length>0){const t=vf();if(hr&&ti===e&&ni===t)return hr;const a=new Set,r=[];for(const s of e.entries)!s.word||a.has(s.word)||(a.add(s.word),r.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 hr=r,ti=e,ni=t,hr}return[]}new Proxy([],{get(e,t){const a=iy(),r=a[t];return typeof r=="function"?r.bind(a):r}});function uy(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 cy(e){if(typeof window>"u")return"";const t=(a,r)=>{typeof r.attrValue=="string"&&uy(r.attrValue)&&(r.keepAttr=!1)};da.addHook("uponSanitizeAttribute",t);try{return da.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:["script","use","style"],FORBID_ATTR:["xlink:href","href"]})}finally{da.removeHook("uponSanitizeAttribute",t)}}function dy(e){const[t,a]=o.useState(null),[r,s]=o.useState(null),[l,i]=o.useState(null),[u,c]=o.useState(null),[d,h]=o.useState(null);return o.useEffect(()=>{if(!e||typeof e!="string"||!e.endsWith(".svg")){a(null),s(null),i(null),c(null);return}const p=e.split("/").pop();let m=e;p&&(e.startsWith("/")?m=no(e):/^(Logo|Symbol)/i.test(p)?m=no(`logo/${p}`):(/^https?:\/\//i.test(e)||e.startsWith("data:"),m=e)),i(null),c(null),a(e),s(m)},[e]),o.useEffect(()=>{if(!r)return;let p=!1;async function m(){try{let b=await fetch(r);b.ok||(b=await fetch(r));const v=b.headers.get("content-type")||"";if(p)return;if(v.includes("svg")){i("mask");return}if(v.startsWith("image/")){i("img");return}const C=await fetch(r);if(!C.ok)throw new Error("not ok");const f=await C.text();if(p)return;if(/^\s*<svg[\s>]/i.test(f)){const x=cy(f);if(!x){i("none");return}c(x),i("inline");return}i("none")}catch{p||i("none")}}return m(),()=>{p=!0}},[r]),o.useEffect(()=>{let p=!1,m=null;return l==="mask"&&r&&fetch(r).then(b=>{if(!b.ok)throw new Error("fetch failed");return b.blob()}).then(b=>{p||(m=URL.createObjectURL(b),h(m))}).catch(()=>{p||i("img")}),()=>{p=!0,m&&URL.revokeObjectURL(m),h(null)}},[l,r]),t===e?{iconToUse:r,mode:l,svgText:u,blobUrl:d}:{iconToUse:null,mode:null,svgText:null,blobUrl:null}}function ot(e){const{icon:t,label:a,className:r,imgClassName:s,maskClassName:l,svgClassName:i,wrapperStyle:u,size:c}=e||{},d=r??"iconRenderer-icon",h=s??"iconRenderer-icon-image",p=l??"iconRenderer-icon-mask",m=i??"iconRenderer-icon-svg",b=typeof t=="string"?t:null,v=Q0(b),{iconToUse:C,mode:f,svgText:x,blobUrl:g}=dy(b),w=(B,E={})=>n.jsx("span",{className:d,style:u,...E,children:B}),y=typeof c=="number"?{width:c,height:c,objectFit:"contain"}:null,k=(B,E={})=>n.jsx("img",{src:B,alt:typeof a=="string"?a:typeof a=="number"?String(a):"",className:h,...E,style:y?{...E.style,...y}:E.style});if(!t)return null;if(typeof t!="string")return w(t);if(t==="none")return w(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(v)try{return w(o.createElement(v,{className:m,size:typeof c=="number"?c:20}),{"aria-hidden":"true"})}catch{}if(C&&C.endsWith(".svg")){if(f==="mask"){const B={"--icon-url":g?`url(${g})`:`url(${C})`,...typeof c=="number"?{"--icon-size":`${c}px`}:null};return w(n.jsx("span",{className:p,style:B}),{"aria-hidden":"true"})}return f==="img"?w(k(C,{onError:B=>{B.currentTarget.onerror=null,B.currentTarget.style.display="none"}}),{"aria-hidden":"true"}):f==="inline"?w(n.jsx("span",{className:m,dangerouslySetInnerHTML:x?{__html:x}:void 0}),{"aria-hidden":"true"}):w(null,{"aria-hidden":"true"})}if(t.startsWith("/")||t.includes("/assets/")||t.match(/\.(png|jpg|jpeg|webp|gif)$/i))return k(no(t),{style:u,onError:B=>{B.currentTarget.onerror=null,B.currentTarget.style.display="none"}});const _=typeof c=="number"?c:20,A=`<svg width="${_}" height="${_}" 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 w(n.jsx("span",{className:m,dangerouslySetInnerHTML:{__html:A}}),{"aria-hidden":"true"})}function ai(e){const[t,a]=o.useState(!1),r=o.useRef(!1),s=o.useRef(!0);o.useEffect(()=>(s.current=!0,()=>{s.current=!1}),[]);const l=o.useCallback(()=>{if(!e||r.current)return;const i=e();if(i&&typeof i.then=="function"){r.current=!0,a(!0);const u=()=>{r.current=!1,s.current&&a(!1)};i.then(u,u)}},[e]);return{pending:t,press:l}}function py({icon:e,title:t,message:a,action:r,className:s}){const{pending:l,press:i}=ai(r?.onClick);return n.jsxs("div",{className:Be("empty-state",s),children:[e&&n.jsx(ot,{icon:e,size:48,className:"empty-state__icon"}),t&&n.jsx("p",{className:"empty-state__title h4",children:t}),a&&n.jsx("p",{className:"empty-state__message body-3",children:a}),r&&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:[r.icon&&n.jsx(ot,{icon:r.icon,className:"button__icon"}),n.jsx("span",{className:"button__label button-1",children:r.label})]})]})}function hy({message:e,hint:t,icon:a="triangle-alert",onRetry:r,retryLabel:s,className:l}){const{t:i}=_e.useTranslation(),{pending:u,press:c}=ai(r);return n.jsxs("div",{className:Be("empty-state","error-state",l),role:"alert",children:[n.jsx(ot,{icon:a,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}),r&&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(ot,{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 my({icon:e,title:t,description:a,cta:r,tone:s="main",disabled:l=!1,onClick:i,className:u=""}){const c=o.useId(),d=`${c}-title`,h=`${c}-desc`,p=`${c}-cta`,m=()=>{l||i?.()};return n.jsx("section",{role:"button",tabIndex:l?-1:0,"aria-disabled":l||void 0,"aria-labelledby":d,"aria-describedby":`${h} ${p}`,onClick:m,onKeyDown:b=>{(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),m())},className:Be("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(ot,{icon:e,size:34})}),n.jsxs("div",{className:"action-card__text",children:[n.jsx("h2",{id:d,className:"action-card__title",children:t}),n.jsx("p",{id:h,className:"action-card__desc",children:a})]}),n.jsxs("div",{className:"action-card__cta",children:[n.jsx("span",{id:p,children:r}),n.jsx("span",{"aria-hidden":!0,className:"action-card__arrow",children:n.jsx(ot,{icon:"arrow-right",size:18})})]})]})})}function Cy({as:e="div",className:t="",children:a,storage:r,...s}){r&&O1({resolveUrl:r.resolveUrl,download:r.download??(()=>Promise.reject(new Error("[ihabdevteam-core] CoreScope: download resolver\uAC00 \uC124\uC815\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4."))),exists:r.exists,resolvePath:r.resolvePath,noiseBaseUrl:r.noiseBaseUrl,noiseFileGain:r.noiseFileGain});const l=Be("ihabdevteam-core-scope",t);return n.jsx(e,{className:l,...s,children:a})}function fy(e){if(e.closest('[aria-hidden="true"], [hidden], [inert]'))return!1;for(let t=e;t;t=t.parentElement){const a=window.getComputedStyle(t);if(a.display==="none"||a.visibility==="hidden"||a.visibility==="collapse")return!1}return!0}function bo(e,t=!0){o.useEffect(()=>{if(!t)return;const a=e.current;if(!a)return;const r=s=>{if(s.key!=="Tab")return;const l=Array.from(a.querySelectorAll(En)).filter(fy);if(!l.length){s.preventDefault();return}const i=l[0],u=l[l.length-1],c=document.activeElement,d=c===a;s.shiftKey&&(c===i||d)?(s.preventDefault(),u.focus()):!s.shiftKey&&c===u&&(s.preventDefault(),i.focus())};return a.addEventListener("keydown",r),()=>a.removeEventListener("keydown",r)},[e,t])}const En='a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])',go=new WeakMap;function yo(e,t){e&&go.set(e,t)}function vo(e){let t=e;for(let a=0;t&&!t.isConnected&&a<10;a++){let r=t;for(;r&&!go.has(r);)r=r.parentElement;if(!r)return t;t=go.get(r)??null}return t}function ri(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 mr(e,t,a){const r=e?.isConnected?e:a?.isConnected?a:null;if(ri(t)&&!(e&&e.contains(t)))return t.focus(),t;if(!r)return null;const s=Array.from(document.querySelectorAll(En)).filter(c=>!(e&&e.contains(c))&&ri(c));let l=null,i=null;for(const c of s)r.compareDocumentPosition(c)&Node.DOCUMENT_POSITION_PRECEDING?l=c:i||(i=c);const u=l??i;return u?.focus(),u}function by({title:e="",lines:t=[],notices:a=null,children:r,variant:s="default",dismissible:l=!1,className:i=""}){const{t:u}=_e.useTranslation(),[c,d]=o.useState(!1),h=o.useRef(null),p=o.useCallback(()=>{const C=h.current;C&&C.contains(document.activeElement)&&mr(C),d(!0)},[]);if(c)return null;const m=`notice-box notice-box--${s} body-2 ${i}`.trim(),b=l&&n.jsx("button",{type:"button",className:"notice-box__dismiss",onClick:p,"aria-label":u("common.close","\uB2EB\uAE30"),children:"\xD7"});if(a&&Array.isArray(a)&&a.length)return n.jsxs("div",{className:m,role:"note",children:[a.map((C,f)=>n.jsxs("div",{className:"notice-box__inner",children:[C.title?n.jsx("span",{className:"notice-box__title body-3",children:C.title}):null,n.jsx("div",{className:"notice-box__body",children:C.lines&&C.lines.length?n.jsx("div",{children:C.lines.map((x,g)=>n.jsx("span",{className:"notice-box__line body-3",children:x},g))}):C.children??null})]},f)),b]});const v=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((C,f)=>n.jsx("li",{className:"notice-box__line",children:C},f))}):r})]}):n.jsx("div",{className:"notice-box__inner",children:r});return n.jsxs("div",{ref:h,className:m,role:"note",children:[v,b]})}const gy={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0};function Ca(e){const{t}=_e.useTranslation(),{variant:a="spinner",size:r=24,progress:s=null,label:l}=e||{},i=l||t("loader.loading","Loading");if(a==="bar"){const c=s==null||!Number.isFinite(Number(s)),d=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:d,"aria-label":i,children:n.jsx("div",{className:"loader-bar__inner",style:c?void 0:{width:`${d}%`}})})}const u=typeof r=="number"?`${r}px`:r;return n.jsxs("div",{className:"loader-spinner",style:{width:u,height:u},role:"status","aria-label":i,children:[n.jsx("span",{style:gy,children:i}),n.jsxs("svg",{className:"loader-spinner__svg",viewBox:"0 0 50 50",width:r,height:r,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 fa=[];let Cr=!1;function oi(e){if(e.key!=="Escape"||e.defaultPrevented||e.isComposing||e.keyCode===229)return;const t=fa[fa.length-1];t&&(e.stopPropagation(),t())}function Qn(e){return fa.push(e),!Cr&&typeof document<"u"&&(document.addEventListener("keydown",oi),Cr=!0),()=>{const t=fa.lastIndexOf(e);t>=0&&fa.splice(t,1),fa.length===0&&Cr&&typeof document<"u"&&(document.removeEventListener("keydown",oi),Cr=!1)}}const si=o.createContext(null);function yy(e){return/max-width:\s*7[0-9][0-9]px/.test(e)}const li=e=>typeof window>"u"||!window.matchMedia?!1:window.matchMedia(e).matches;function vy(e){const t=o.useCallback(a=>{if(typeof window>"u"||!window.matchMedia)return()=>{};const r=window.matchMedia(e);return r.addEventListener?r.addEventListener("change",a):r.addListener&&r.addListener(a),()=>{r.removeEventListener?r.removeEventListener("change",a):r.removeListener&&r.removeListener(a)}},[e]);return Ps.useSyncExternalStore(t,()=>li(e),()=>!1)}function _y(e){const[t,a]=o.useState(li(e));return o.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const r=window.matchMedia(e),s=i=>a(i.matches),l=r;return l.addEventListener?l.addEventListener("change",s):l.addListener&&l.addListener(s),a(r.matches),()=>{l.removeEventListener?l.removeEventListener("change",s):l.removeListener&&l.removeListener(s)}},[e]),t}const xy=typeof Ps.useSyncExternalStore=="function"?vy:_y;function yn(e){const t=o.useContext(si),a=xy(e);return t&&typeof t.mobile=="boolean"&&yy(e)?t.mobile:a}const wy="(prefers-reduced-motion: reduce)";function _o(){return yn(wy)}const ii={"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","stat-chart__card":"manager-stat-card"};function By(e,t){const a=Object.keys(e).sort((r,s)=>s.length-r.length);for(const r of a){if(!t.startsWith(r))continue;const s=t.slice(r.length);if(!(s!==""&&!s.startsWith("__")&&!s.startsWith("--")))return e[r]+s}return null}function ky(e){return By(ii,e)}function se(e){if(!e||Object.keys(ii).length===0)return e;const t=[];for(const a of e.split(/\s+/)){if(!a)continue;const r=ky(a);r&&t.push(r)}return t.length?`${e} ${t.join(" ")}`:e}function Bn(e){const{anchorRect:t,anchorEl:a,offset:r=20,edgeMargin:s=20,onClose:l,closeOnOutsideClick:i=!0,className:u="",role:c="dialog",ariaLabel:d="",children:h,backdrop:p=!1,isMobilePopup:m=!1,useBorder:b=!0,header:v,focusOnOpen:C}=e||{},f=o.useRef(null),[x,g]=o.useState({position:"fixed",left:0,top:-9999}),[w,y]=o.useState(!1),[k,_]=o.useState("bottom"),[A,B]=o.useState(!1),[E,D]=o.useState(!1),N=!t&&!a,$=o.useRef(null),L=o.useCallback((R=!1,q=!1)=>{if(E&&m)return;const Z=a?a.getBoundingClientRect():t,z=q&&$.current?$.current:Z;if(!z||!f.current)return;const j=f.current,{offsetWidth:F,offsetHeight:O}=j,G=window.innerWidth,ie=window.innerHeight,K=G-z.right,pe=z.left,X=z.top,H=ie-z.bottom;let ne=0,V=0,W="top";if(X>=O+r)W="top",V=z.top-r-O,ne=z.left+z.width/2-F/2;else if(H>=O+r)W="bottom",V=z.bottom+r,ne=z.left+z.width/2-F/2;else if(K>=F+r)W="right",ne=z.right+r,V=z.top+z.height/2-O/2;else if(pe>=F+r)W="left",ne=z.left-r-F,V=z.top+z.height/2-O/2;else{const me=Math.max(X,H,K,pe);me===X?(W="top",V=z.top-r-O,ne=z.left+z.width/2-F/2):me===H?(W="bottom",V=z.bottom+r,ne=z.left+z.width/2-F/2):me===K?(W="right",ne=z.right+r,V=z.top+z.height/2-O/2):(W="left",ne=z.left-r-F,V=z.top+z.height/2-O/2)}const oe=Number.isFinite(Number(s))?Number(s):8;ne=Math.min(Math.max(ne,oe),G-F-oe),V=Math.min(Math.max(V,oe),ie-O-oe);const xe=Math.round(ne),be=Math.round(V);R&&f.current?(f.current.style.left=`${xe}px`,f.current.style.top=`${be}px`,f.current.dataset.placement=W):(_(W||k),g({position:"fixed",left:xe,top:be}),B(!0))},[E,m,a,t,r,s,k]);o.useEffect(()=>()=>{$.current=null},[a,t]),o.useLayoutEffect(()=>{if(N)return;if(E&&m){g({position:"fixed",left:"50%",top:"50%",transform:"translate(-50%, -50%)",width:"calc(100% - 40px)",maxWidth:"calc(100% - 40px)"}),B(!0);return}$.current===null&&($.current=a?a.getBoundingClientRect():t??null),L(!1,!0);const R=requestAnimationFrame(()=>L(!1,!0));return()=>cancelAnimationFrame(R)},[t,a,r,h,s,N,E,m,L]),o.useEffect(()=>{if(N||E&&m||!f.current||typeof ResizeObserver>"u")return;const R=new ResizeObserver(()=>{t&&L()});return R.observe(f.current),()=>R.disconnect()},[t,h,s,N,E,m,L]),o.useEffect(()=>{if(N||E&&m)return;let R=null;const q=()=>{if(a&&($.current=a.getBoundingClientRect()),typeof requestAnimationFrame>"u"){L(!0);return}R===null&&(R=requestAnimationFrame(()=>{R=null,L(!0)}))},Z=z=>{if(!a&&l){const j=z.target;if(j&&f.current&&f.current.contains(j))return;try{if(j&&j.closest&&j.closest("[data-tooltip-ignore]"))return}catch{}ee.current(!0);return}q()};return window.addEventListener("resize",q),document.addEventListener("scroll",Z,{passive:!0,capture:!0}),()=>{R!==null&&cancelAnimationFrame(R),window.removeEventListener("resize",q),document.removeEventListener("scroll",Z,{capture:!0})}},[t,a,l,r,h,s,N,E,m,L]),o.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const R=window.matchMedia("(max-width: 768px)"),q=()=>D(!!R.matches);q();try{R.addEventListener?R.addEventListener("change",q):R.addListener(q)}catch{try{R.addListener(q)}catch{}}return()=>{try{R.removeEventListener?R.removeEventListener("change",q):R.removeListener(q)}catch{}}},[]);const U=o.useRef(!1),M=o.useRef(null),P=_o(),T=o.useCallback((R=!1)=>{if(l&&!(w||U.current)){if(U.current=!0,R){y(!0);try{l&&l()}catch{U.current=!1,y(!1)}return}y(!0),M.current=setTimeout(()=>{M.current=null;try{l&&l()}catch{U.current=!1,y(!1)}},P?0:200)}},[w,l,y,P]);o.useEffect(()=>()=>{M.current&&clearTimeout(M.current)},[]),o.useEffect(()=>{if(N)return;const R=z=>{const j=f.current;if(!j)return;const F=z.target;if(F&&!j.contains(F)){try{if(F.closest&&F.closest("[data-tooltip-ignore]"))return}catch{}i&&T(!0)}},q=z=>{const j=f.current;if(!j)return;const F=z.target;if(F&&!j.contains(F)){try{if(F.closest&&F.closest("[data-tooltip-ignore]"))return}catch{}i&&T(!0)}},Z=z=>{if(z.key==="Tab"){const j=f.current;if(!j)return;const F=j.querySelectorAll(En);if(!F||F.length===0)return;const O=F[0],G=F[F.length-1],ie=document.activeElement;z.shiftKey?ie===O&&(z.preventDefault(),G.focus()):ie===G&&(z.preventDefault(),O.focus())}};return document.addEventListener("pointerdown",R,!0),document.addEventListener("click",q,!0),document.addEventListener("keydown",Z),()=>{document.removeEventListener("pointerdown",R,!0),document.removeEventListener("click",q,!0),document.removeEventListener("keydown",Z)}},[l,i,T,N]);const ee=o.useRef(T);o.useEffect(()=>{ee.current=T});const te=!!l;o.useEffect(()=>{if(!(N||!te))return Qn(()=>ee.current())},[N,te]),o.useEffect(()=>{const R=()=>{T(!0)};return typeof document<"u"&&document.addEventListener("speechear-close-tooltips",R),()=>{typeof document<"u"&&document.removeEventListener("speechear-close-tooltips",R)}},[T]);const I=o.useRef(null);o.useEffect(()=>{if(N||C===!1||!A)return;const R=f.current;if(!R)return;const q=R.querySelector(En);if(q)return I.current=document.activeElement,q.focus({preventScroll:!0}),()=>{const Z=I.current;I.current=null,Z&&document.contains(Z)&&Z.focus({preventScroll:!0})}},[N,C,A]),o.useEffect(()=>{c==="dialog"&&!d&&At("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.')},[c,d]);const Y=n.jsxs("div",{ref:f,className:se(`tooltip__content ${N?"tooltip__content--inline":""} ${b?"tooltip__content--bordered":""} ${w?"is-closing":""} ${u} ${E&&m?"is-mobile":""}`),role:c,"aria-label":d||void 0,style:N?{}:{...x,visibility:A?"visible":"hidden"},tabIndex:-1,"data-placement":k,"data-left":N?"":x.left,"data-top":N?"":x.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:[v!=null&&n.jsx("div",{className:se("tooltip__header h5"),children:v}),h]});if(N||typeof document>"u")return Y;if(p||E&&m){const R=n.jsxs("div",{className:se("tooltip__portal"),children:[n.jsx("div",{className:se("tooltip__backdrop"),onClick:()=>{i&&T(!0)}}),Y]});return hn.createPortal(R,document.body)}return hn.createPortal(Y,document.body)}function Mn(e){const{anchorRect:t,text:a,offset:r=8,onClose:s,className:l="",ariaLabel:i}=e||{};return a?n.jsx(Bn,{anchorRect:t,offset:r,onClose:s,closeOnOutsideClick:!1,className:se(`info-tooltip ${l}`),ariaLabel:i||a,children:n.jsx("div",{className:se("info-tooltip__content body-3"),children:a})}):null}function qn(e){const{t}=_e.useTranslation(),{anchorRect:a,title:r,items:s,activeIndex:l=-1,showIndex:i=!0,onClose:u,offset:c=12,closeOnOutsideClick:d=!0,columns:h}=e||{},p=(Array.isArray(s)?s:s?[s]:[]).map(m=>typeof m=="string"?{text:m}:m);return!p.length&&!r?null:n.jsx(Bn,{anchorRect:a,offset:c,onClose:u,closeOnOutsideClick:d,useBorder:!1,className:se("description-tooltip"),ariaLabel:r||t("tooltip.description","\uC124\uBA85"),children:n.jsxs("div",{className:se("description-tooltip__box"),children:[r&&n.jsx("span",{className:se("description-tooltip__title body-2"),children:r}),n.jsx("ol",{className:se(`description-tooltip__items${h&&h>1?" description-tooltip__items--columns":""}`),style:h&&h>1?{columnCount:h}:void 0,children:p.map((m,b)=>n.jsxs("li",{className:se(`description-tooltip__item body-3${b===l?" description-tooltip__item--active":""}`),children:[i&&p.length>1&&n.jsxs("span",{className:se("description-tooltip__index button-1"),children:[b+1,"."]}),m.color&&n.jsx("span",{className:se("description-tooltip__dot"),style:{background:m.color},"aria-hidden":"true"}),n.jsx("span",{children:m.text})]},b))})]})})}function Ia(e){const t=o.useRef(e);return o.useEffect(()=>{t.current=e}),t}let xo=0,ui=!1;function ci(){ui||typeof document>"u"||(ui=!0,document.addEventListener("pointerdown",e=>{e.pointerType==="touch"&&(xo=Date.now())},!0),document.addEventListener("touchstart",()=>{xo=Date.now()},{capture:!0,passive:!0}))}ci();function Un(e){return!!e&&e.pointerType==="touch"}function ea(e=1e3){return ci(),Date.now()-xo<e}function fr(e,t,a,{enabled:r=!0,fallbackOnParent:s=!1}={}){const l=Ia(e),i=Ia(t),u=o.useRef(null),c=o.useRef(0);o.useEffect(()=>{if(!r||typeof document>"u")return;const h=p=>{const m=p,b=p.target,v=a.current,C=!!(b&&v&&v.contains(b));if(m.pointerType!=="touch"){C&&(u.current=null);return}if(C){u.current=l.current;return}u.current=null,l.current&&!(b&&b.closest?.(".tooltip__content"))&&i.current(!1,v)};return document.addEventListener("pointerdown",h,!0),()=>document.removeEventListener("pointerdown",h,!0)},[r,a,l,i]);const d=o.useCallback(h=>{const p=u.current;return p===null?!1:(u.current=null,c.current=Date.now(),i.current(!p,h??a.current),!0)},[a,i]);return o.useEffect(()=>{if(!r||!s)return;const h=a.current,p=h?.parentElement;if(!h||!p)return;let m=null;const b=f=>{const x=f.changedTouches?.[0];if(!x)return!1;const g=h.getBoundingClientRect();return x.clientX>=g.left&&x.clientX<=g.right&&x.clientY>=g.top&&x.clientY<=g.bottom},v=f=>{m=b(f)?l.current:null},C=f=>{const x=m;m=null,!(x===null||Date.now()-c.current<700||!b(f))&&(u.current=null,c.current=Date.now(),i.current(!x,h))};return p.addEventListener("touchstart",v,{passive:!0}),p.addEventListener("touchend",C),()=>{p.removeEventListener("touchstart",v),p.removeEventListener("touchend",C)}},[r,s,a,l,i]),{touchPress:d}}function Ay(e,t){const{size:a=48,type:r,htmlType:s,href:l,target:i,rel:u,icon:c,rightIcon:d,label:h,count:p,subLabel:m,children:b,ariaLabel:v,variant:C="default",align:f="center",nowrap:x=!1,selected:g,toggleable:w=!1,ariaExpanded:y,ariaControls:k,disabled:_=!1,loading:A=!1,useLabel:B=!0,useBorder:E=!0,useBG:D=!0,useDisabledCovered:N=!1,useDisabledInvisible:$=!1,useDisabledFilled:L=!1,width:U,minWidth:M,onClick:P,onDisabledClick:T,showTooltipInfo:ee=!1,tooltipInfoText:te=null,tooltipDescription:I=null,tooltipOnly:Y=!1,iconSize:R="medium",iconColor:q,shape:Z="rounded",color:z,className:j,...F}=e,O=typeof a=="string"&&isNaN(Number(a))?a.toLowerCase():String(Number(a)||48),G=O.match(/^\d+$/)?`button${O}`:`button-${O}`,ie=Number(a),K=!isNaN(ie)&&ie<40?"button-2":"button-1",pe=h??b,X=_||!!F.disabled,H=X?N?"disabled-covered":$?"disabled-invisibled":L?"disabled-filled":"disabled":C,ne=H?`button--variant-${H}`:"",V=f?`button--align-${f}`:"",W=x?"button--nowrap":"",oe=Z?`button--shape-${Z}`:"",xe=typeof q=="string"&&q.startsWith("--")?`var(${q})`:q,be={...U?{width:typeof U=="number"?`${U}px`:U}:{},...M?{minWidth:typeof M=="number"?`${M}px`:M}:{},...E?{}:{"--button-border":X?"0":"1px solid transparent"},...xe?{"--button-icon-color":xe}:{},...z?{"--color-main":z}:{}},me=B===!1?"":pe,ke=Array.isArray(me)?me.length>0:!!me,Le=!!d,Me=r??(ke||c||Le?"bar":"dot"),le=`${G}--${Me}`,ve=o.useRef(null);o.useEffect(()=>{!zn||s!==void 0||ve.current?.closest("form")&&At(`button-in-form:${typeof pe=="string"?pe:""}`,'[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 pe=="string"&&pe?` \uB2E8\uCD94: ${pe}`:""))},[s,pe]);const $e=o.useRef(t);$e.current=t;const Ae=o.useCallback(je=>{ve.current=je;const nt=$e.current;typeof nt=="function"?nt(je):nt&&(nt.current=je)},[]),Ie=o.useRef(X),[ze,dt]=o.useState(!!g),[st,et]=o.useState(!1),[gt,Se]=o.useState(null),Ge=o.useCallback(()=>et(!1),[]),[we,qe]=o.useState(!1),Ye=o.useId();o.useEffect(()=>{typeof g=="boolean"&&dt(g)},[g]),o.useEffect(()=>{if(Ie.current&&!X&&ve.current){const je=ve.current;let nt=!1;try{nt=je.matches(":focus:not(:focus-visible)")}catch{nt=!1}nt&&je.blur(),je.style.pointerEvents="none";const ae=requestAnimationFrame(()=>{requestAnimationFrame(()=>{ve.current&&(ve.current.style.pointerEvents="")})});return()=>cancelAnimationFrame(ae)}Ie.current=X},[X]);const mt=typeof g=="boolean"?!!g:ze,wt=typeof y=="boolean"?void 0:w||typeof g=="boolean"?mt?"true":"false":F["aria-pressed"],yt=Be("button",G,le,ne,V,W,oe,mt?"is-selected":null,D?null:"button--no-bg",Y?"button--tooltip-only":null,j),Et=`button__icon button__icon--${R}`,at=Array.isArray(m)?m:m!==void 0?[m]:[],rt=()=>{if(Array.isArray(me))return me.map((nt,ae)=>{const ye=at[ae];return n.jsxs("span",{className:`button__label-text${ye!==void 0?" button__label-text--has-sub":""}`,children:[nt,ye!==void 0&&n.jsx("span",{className:"button__sub-label-text caption-1",children:ye})]},ae)});const je=m!==void 0;return n.jsxs("span",{className:`button__label-text${je?" button__label-text--has-sub":""}`,children:[me,p!=null&&n.jsx("span",{className:"button__count",children:p}),je&&n.jsx("span",{className:"button__sub-label-text caption-1",children:m})]})},Dt=je=>{typeof g!="boolean"&&!w&&dt(!1),je.currentTarget.blur()},Bt=je=>{X||(typeof F.onMouseLeave=="function"&&F.onMouseLeave(je),Dt(je))},Lt=je=>{if(Y&&lt&&Ct.touchPress(je.currentTarget),X){lt&&Ct.touchPress(je.currentTarget),je.preventDefault(),T?.(je);return}typeof g!="boolean"&&w&&dt(nt=>!nt),P?.(je)},It=o.useCallback(()=>{(ee||I)&&(et(!0),Se(ve.current?.getBoundingClientRect()??null))},[ee,I]),xt=o.useCallback(()=>{(ee||I)&&(et(!1),Se(null))},[ee,I]),lt=!!(ee||I),Ct=fr(st,je=>{je?It():xt()},ve,{enabled:lt&&(X||Y),fallbackOnParent:lt&&X}),it={...F};delete it.disabled,delete it.className,delete it.faded,delete it.useFaded,delete it.loading,delete it.onMouseLeave,delete it.onPointerEnter,delete it.onPointerLeave,delete it.onPointerUp,delete it.onFocus,delete it.onBlur,X&&(Object.keys(it).forEach(je=>{/^on[A-Z]/.test(je)&&typeof it[je]=="function"&&delete it[je]}),it["aria-disabled"]="true"),A&&(it["aria-busy"]="true");const _t=(typeof ee=="string"?ee:null)??(typeof te=="string"?te:null)??(typeof v=="string"?v:null)??(typeof pe=="string"?pe:null)??void 0,ut=typeof v=="string"?v:typeof pe=="string"?pe:_t,St=I?[I.title,...I.items??[]].filter(Boolean).join(". "):ee&&_t&&_t!==ut?_t:"",ue=[typeof F["aria-describedby"]=="string"?F["aria-describedby"]:void 0,St?Ye:null].filter(Boolean).join(" ")||void 0,Te=()=>n.jsx("span",{className:`${Et} button__spinner`,"aria-hidden":"true",children:n.jsx(Ca,{variant:"spinner",size:"100%"})}),Ne=(je,nt)=>n.jsx(ot,{icon:je,label:nt??ut,className:Et,imgClassName:"button__icon-img",maskClassName:"button__icon-mask",svgClassName:"button__icon-svg"}),tt=je=>A?Te():Ne(c,je),pt=()=>Me==="dot"?n.jsxs(n.Fragment,{children:[tt(),ke&&n.jsx("span",{className:`button__label ${K}`,children:rt()})]}):f==="center"&&(c||A)?n.jsxs(n.Fragment,{children:[n.jsxs("span",{className:"button__center-group",children:[n.jsx("span",{className:"button__left",children:tt()}),ke&&n.jsx("span",{className:`button__label ${K}`,children:rt()})]}),Le&&n.jsx("span",{className:"button__right",children:Ne(d)})]}):n.jsxs(n.Fragment,{children:[(c||A)&&n.jsx("span",{className:"button__left",children:tt(v??pe)}),ke&&n.jsx("span",{className:`button__label ${K}`,children:rt()}),Le&&n.jsx("span",{className:"button__right",children:Ne(d)})]}),jt=!!l&&!X;return n.jsxs(n.Fragment,{children:[n.jsxs(jt?"a":"button",{...it,ref:Ae,...jt?{href:l,target:i,rel:u??(i==="_blank"?"noreferrer":void 0)}:{type:s??"button",disabled:X&&!T&&!we},className:yt,"aria-pressed":wt,"aria-expanded":typeof y=="boolean"?y:F["aria-expanded"],"aria-controls":k??F["aria-controls"],"aria-label":ut,"aria-disabled":X&&(jt||T||we)?!0:void 0,"aria-describedby":ue,style:be,onClick:Lt,onMouseLeave:Bt,onPointerEnter:je=>{Un(je)||It(),!X&&typeof F.onPointerEnter=="function"&&F.onPointerEnter(je)},onPointerLeave:je=>{Un(je)||xt(),!X&&typeof F.onPointerLeave=="function"&&F.onPointerLeave(je)},onPointerUp:je=>{X&&lt&&Ct.touchPress(je.currentTarget),!X&&typeof F.onPointerUp=="function"&&F.onPointerUp(je)},onFocus:je=>{qe(!0),ea()||It(),!X&&typeof F.onFocus=="function"&&F.onFocus(je)},onBlur:je=>{qe(!1),X||Dt(je),xt(),!X&&typeof F.onBlur=="function"&&F.onBlur(je)},children:[pt(),St?n.jsx("span",{id:Ye,hidden:!0,"aria-label":St}):null]}),st&&I?n.jsx(qn,{anchorRect:gt,title:I.title,items:I.items,onClose:Ge}):st&&_t?n.jsx(Mn,{anchorRect:gt,text:_t,onClose:Ge}):null]})}const fe=o.forwardRef(Ay);fe.displayName="Button";function Rt(e,t,a){const r=o.useRef(null);return o.useLayoutEffect(()=>{const s=r.current?.parentElement??null;return t(s,e),()=>a(s)},[e,t,a]),r}const Oa={title:"--promo-banner-bg-title",description:"--promo-banner-bg-description"},wo=new WeakMap;function Bo(e){if(e)return wo.get(e)}function tn(e,t){e&&(e.style.setProperty(Oa.title,t.title),e.style.setProperty(Oa.description,t.description),wo.set(e,t))}function nn(e){e&&(e.style.removeProperty(Oa.title),e.style.removeProperty(Oa.description),wo.delete(e))}const di={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"default"};function pi(){const e=Rt(di,tn,nn);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-main","aria-hidden":"true"})}const hi={title:"var(--color-main)",description:"var(--color-gray)",actionVariant:"main"};function mi(){const e=Rt(hi,tn,nn);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-soft","aria-hidden":"true"})}const Ci={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function fi(){const e=Rt(Ci,tn,nn);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-sub","aria-hidden":"true"})}const bi={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function gi(){const e=Rt(bi,tn,nn);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-deep","aria-hidden":"true"})}const yi={title:"var(--color-darkSub)",description:"var(--color-gray)",actionVariant:"main"};function vi(){const e=Rt(yi,tn,nn);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-soft-sub","aria-hidden":"true"})}const _i={title:"var(--color-black)",description:"var(--color-darkGray)",actionVariant:"main"};function xi(){const e=Rt(_i,tn,nn);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-warm","aria-hidden":"true"})}const wi={title:"var(--color-white)",description:"var(--color-lightGray)",actionVariant:"main"};function Bi(){const e=Rt(wi,tn,nn);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-dark","aria-hidden":"true"})}const ki={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function Ai(){const e=Rt(ki,tn,nn);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-radial","aria-hidden":"true"})}const Ni={title:"var(--color-darkMain)",description:"var(--color-gray)",actionVariant:"main"};function Ei(){const e=Rt(Ni,tn,nn);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-diagonal","aria-hidden":"true"})}const Di={title:"var(--color-darkSub)",description:"var(--color-gray)",actionVariant:"main"};function Si(){const e=Rt(Di,tn,nn);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-dots","aria-hidden":"true"})}const ji={title:"var(--color-black)",description:"var(--color-gray)",actionVariant:"main"};function Ti(){const e=Rt(ji,tn,nn);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 Mi={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function Li(){const e=Rt(Mi,tn,nn);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-success","aria-hidden":"true"})}const $i={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"sub"};function Ri(){const e=Rt($i,tn,nn);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-naver","aria-hidden":"true"})}const Pi={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"transparent-white"};function Fi(){const e=Rt(Pi,tn,nn);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-instagram","aria-hidden":"true"})}const sn=(e,t,a)=>({key:e,get label(){return Kt.t(`promoBannerBg.${e}`,t)},textTone:a}),Ny=[sn("main","\uBA54\uC778 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),sn("soft","\uC18C\uD504\uD2B8","dark"),sn("sub","\uC11C\uBE0C \uCEEC\uB7EC","light"),sn("deep","\uB525 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),sn("softSub","\uC18C\uD504\uD2B8 \uC11C\uBE0C","dark"),sn("warm","\uC6DC(\uAC15\uC870)","dark"),sn("dark","\uB2E4\uD06C","light"),sn("radial","\uBC29\uC0AC\uD615 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),sn("diagonal","\uB300\uAC01\uC120 \uD328\uD134","dark"),sn("dots","\uB3C4\uD2B8 \uD328\uD134","dark"),sn("outline","\uC544\uC6C3\uB77C\uC778","dark"),sn("success","\uC131\uACF5/\uC644\uB8CC","light"),sn("naver","\uB124\uC774\uBC84 \uBE14\uB85C\uADF8 \uC548\uB0B4","light"),sn("instagram","\uC778\uC2A4\uD0C0\uADF8\uB7A8 \uC548\uB0B4","light")],Ii={main:pi,soft:mi,sub:fi,deep:gi,softSub:vi,warm:xi,dark:Bi,radial:Ai,diagonal:Ei,dots:Si,outline:Ti,success:Li,naver:Ri,instagram:Fi};function Oi({storageKey:e="fontScale",baseFont:t=20,minScale:a=.8,maxScale:r=1.4,step:s=.1,lineHeightRatio:l=1.4}={}){const i=w=>Math.max(a,Math.min(r,Number(w))),u=w=>{try{const y=localStorage.getItem(w),k=y?Number(y):1;return Number.isFinite(k)?i(k):i(1)}catch{return i(1)}},[c,d]=o.useState(()=>u(e)),[h,p]=o.useState(e);h!==e&&(p(e),d(u(e))),o.useEffect(()=>{try{localStorage.setItem(e,String(c))}catch{}},[e,c]);const m=w=>{d(typeof w=="function"?y=>i(w(y)):i(w))},b=()=>m(w=>+(w+s).toFixed(6)),v=()=>m(w=>+(w-s).toFixed(6)),C=c<r-Number.EPSILON,f=c>a+Number.EPSILON,x=Math.round(t*c),g=Math.round(x*l);return{scale:c,setScale:m,increase:b,decrease:v,canIncrease:C,canDecrease:f,fontSize:x,lineHeight:g}}function zi(e,t){const a=Ia(t);o.useEffect(()=>{const r=()=>a.current();try{window.addEventListener(e,r)}catch{}return()=>{try{window.removeEventListener(e,r)}catch{}}},[e,a])}const ko=" \xB7 ",Wi=(()=>{if(typeof document>"u")return"";const e=document.title;return e.includes(ko)?e.split(ko).pop()??e:e})(),Ey=o.createContext(!1),ta=[];let Hi=null;function Dy(e){const t=o.useContext(Ey);o.useEffect(()=>{if(t||typeof e!="string"||!e)return;ta.length===0&&(Hi=document.title);const a={text:Wi?`${e}${ko}${Wi}`:e};return ta.push(a),document.title=a.text,()=>{const r=ta.lastIndexOf(a);r>=0&&ta.splice(r,1),document.title=ta.length?ta[ta.length-1].text:Hi??document.title}},[e,t])}const Ao=[{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"}],Sy=(()=>{let e=null;return()=>(e||(e=new Intl.Collator("ko")),e)})();function fn(e,t){return Sy().compare(e,t)}const br=new Map;function jy(e){const t=br.get(e);if(t)return t;const a=[],r=/-?\d+(?:\.\d+)?/g;let s=0;for(let l=r.exec(e);l;l=r.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&&a.push(e.slice(s,i)),a.push(Number(u)),s=l.index+l[0].length}return s<e.length&&a.push(e.slice(s)),br.size>5e3&&br.clear(),br.set(e,a),a}function Ty(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 My(e,t){const a=d=>d==null||typeof d=="number"&&Number.isNaN(d)?"":String(d).trim(),r=a(e),s=a(t);if(r===s)return 0;const l=(d,h)=>{if(typeof d=="number"&&!Number.isNaN(d))return[d];const p=Ty(h);return p!==null?[p]:jy(h)},i=l(e,r),u=l(t,s),c=Math.min(i.length,u.length);for(let d=0;d<c;d++){const h=i[d],p=u[d];if(typeof h=="number"&&typeof p=="number"){if(h!==p)return h-p;continue}if(typeof h=="number")return-1;if(typeof p=="number")return 1;const m=fn(h,p);if(m!==0)return m}return i.length!==u.length?i.length-u.length:fn(r,s)}const Vi=e=>e==null||typeof e=="number"&&Number.isNaN(e)||typeof e=="string"&&e.trim()==="";function gr(e,t,a){const r=Vi(e),s=Vi(t);if(r||s)return r===s?0:r?1:-1;const l=My(e,t);return a?l:-l}function Ly(e,t,a){const{t:r}=_e.useTranslation(),[s,l]=o.useState(()=>{const v=a?.initialPageSize;return v&&Ao.some(C=>C.value===v)?v:"25"}),[i,u]=o.useState(1),[c,d]=o.useState(t);Object.is(c,t)||(d(t),i!==1&&u(1));const h=o.useMemo(()=>Ao.map(v=>({...v,label:r("visits.showN",{n:v.value})})),[r]),p=o.useCallback(v=>{Ao.some(C=>C.value===v)&&(l(v),u(1))},[]),m=Math.max(1,Math.ceil(e.length/Number(s))),b=Math.min(Math.max(1,Number.isFinite(i)?Math.floor(i):1),m);return i!==b&&u(b),{pageRows:o.useMemo(()=>e.slice((b-1)*Number(s),b*Number(s)),[e,b,s]),pageSizeProps:{options:h,value:s,onChange:p},paginationProps:{page:b,total:m,onChange:u},setPage:u}}function $y(e){const[t,a]=o.useState(()=>e?.defaultKey!=null?{key:e.defaultKey,asc:e.defaultAsc??!0}:null),r=o.useRef(t),s=o.useRef(e?.onSortChange);s.current=e?.onSortChange;const l=o.useCallback(c=>{const d=r.current,h=d?.key===c?{key:c,asc:!d.asc}:{key:c,asc:!0};r.current=h,a(h),s.current?.(h)},[]),i=o.useCallback((c,d)=>({label:c,sortDir:t?.key===d?t.asc?"asc":"desc":null,onClick:()=>l(d)}),[t,l]),u=o.useCallback((c,d)=>{if(!t)return c;const{key:h,asc:p}=t;return[...c].sort((m,b)=>gr(d(m,h),d(b,h),p))},[t]);return{sort:t,field:i,sortRows:u}}const kn="\uC804\uCCB4";Object.fromEntries(Object.entries(df).map(([e,{nucleus:t}])=>[e,t]));const Ry={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"})},Py={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"})},Fy={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 Iy(e,t){if("place"in t)return Ry[t.place](e);const a=Py[t.vowel](e);return t.glide?`${a} \xB7 ${Fy[t.glide](e)}`:a}const Oy=(e,{defaultValue:t})=>t,qi=(e,t)=>({jamos:e,phonetic:t,tooltip:Iy(Oy,t)}),Ln=(e,t)=>t.map(a=>qi([a],{place:e})),Yt=(e,t,a)=>qi([...e],a?{vowel:t,glide:a}:{vowel:t}),No={cho:[Ln("labial",["\u3142","\u3143","\u314D","\u3141"]),Ln("alveolar",["\u3137","\u3138","\u314C","\u3134","\u3139"]),Ln("alveolar",["\u3145","\u3146"]),Ln("palatal",["\u3148","\u3149","\u314A"]),Ln("velar",["\u3131","\u3132","\u314B"]),Ln("glottal",["\u314E"])],jung:[[Yt("\u3163","frontHigh"),Yt("\u315F","frontHigh","w"),Yt("\u3162","frontHigh","velar")],[Yt("\u3161","backHighUnrounded")],[Yt("\u315C","backHighRounded"),Yt("\u3160","backHighRounded","j")],[Yt("\u3154\u3150","frontMid"),Yt("\u3156\u3152","frontMid","j"),Yt("\u3159\u315A\u315E","frontMid","w")],[Yt("\u3153","backMidUnrounded"),Yt("\u3155","backMidUnrounded","j"),Yt("\u315D","backMidUnrounded","w")],[Yt("\u3157","backMidRounded"),Yt("\u315B","backMidRounded","j")],[Yt("\u314F","low"),Yt("\u3151","low","j"),Yt("\u3158","low","w")]],jong:[Ln("labial",["\u3142","\u3141"]),Ln("alveolar",["\u3137","\u3134","\u3139"]),Ln("velar",["\u3131","\u3147"])]},zy=e=>e===Wy?[]:Array.from(e),Wy="__NO_CODA__",Eo=e=>e.map(t=>t.map(({jamos:a,phonetic:r,tooltip:s})=>({v:a.join(""),phonetic:r,tooltip:s}))),Ui={cho:Eo(No.cho),jung:Eo(No.jung),jong:Eo(No.jong)};Ui.jung.flat().forEach(({v:e})=>{for(const t of zy(e));}),new Set(Ui.cho.flat().map(e=>e.v));function Hy(e,t=!0){const a=Ia(e);o.useEffect(()=>{if(t)return Qn(()=>{a.current?.()})},[t,a])}function za(){const[e,t]=o.useState(null),a=o.useCallback(l=>t(l.getBoundingClientRect()),[]),r=o.useCallback(()=>t(null),[]),s=o.useCallback(l=>{const i=l.getBoundingClientRect();t(u=>u?null:i)},[]);return{anchorRect:e,isOpen:e!=null,openAt:a,close:r,toggleAt:s}}function Vy(e){const[t,a]=o.useState(null),[r,s]=o.useState(null),l=o.useRef(null);o.useEffect(()=>()=>{l.current&&clearTimeout(l.current)},[]);const i=o.useCallback((c,d)=>{l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{a(c),s(d)},e)},[e]),u=o.useCallback(()=>{l.current&&clearTimeout(l.current),a(null),s(null)},[]);return{payload:t,anchorRect:r,openAfterDelay:i,close:u}}function Gi(e="warning"){const[t,a]=o.useState(""),[r,s]=o.useState(e),[l,i]=o.useState(0),u=o.useCallback((p,m)=>{s(m),a(p),i(b=>b+1)},[]),c=o.useCallback(p=>u(p,"warning"),[u]),d=o.useCallback(p=>u(p,"normal"),[u]),h=o.useCallback(()=>a(""),[]);return{toastMessage:t,toastType:r,toastKey:l,showToast:u,showWarning:c,showNormal:d,clearToast:h}}function Wa(e){let t=0;if(e&&typeof window<"u"&&typeof window.getComputedStyle=="function")for(let a=e;a&&a!==document.body&&a!==document.documentElement;a=a.parentElement){const r=parseInt(window.getComputedStyle(a).zIndex,10);!Number.isNaN(r)&&r>t&&(t=r)}return t>0?`max(var(--z-menu, 1500), ${t+1})`:"var(--z-menu, 1500)"}function Ha({computeStyle:e,onScroll:t="close",onResize:a="close",ignoreOutsideClickSelector:r}){const[s,l]=o.useState(!1),[i,u]=o.useState({position:"fixed"}),c=o.useRef(null),d=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 b=d.current?.offsetHeight??0;b>0&&h();let v=0,C=null;typeof ResizeObserver<"u"&&d.current&&(C=new ResizeObserver(()=>{const A=d.current?.offsetHeight??0;if(A!==b){if(b=A,++v>4){C?.disconnect(),C=null;return}h()}}),C.observe(d.current));const f=A=>{const B=A.target;r&&B.closest?.(r)||c.current?.contains(B)||d.current?.contains(B)||l(!1)};document.addEventListener("mousedown",f),document.addEventListener("pointerdown",f);let x=null;const g=()=>{if(typeof requestAnimationFrame>"u"){h();return}x===null&&(x=requestAnimationFrame(()=>{x=null,h()}))},w=A=>{d.current?.contains(A.target)||(t==="reposition"?g():t==="close"&&l(!1))};t!=="ignore"&&window.addEventListener("scroll",w,!0);const y=()=>{a==="reposition"?g():a==="close"&&l(!1)};let k=null;const _=()=>{y(),k&&clearTimeout(k),k=setTimeout(()=>{k=null,a==="reposition"&&h()},250)};return a!=="ignore"&&(window.addEventListener("resize",y),window.addEventListener("orientationchange",_)),()=>{x!==null&&cancelAnimationFrame(x),C?.disconnect(),document.removeEventListener("mousedown",f),document.removeEventListener("pointerdown",f),t!=="ignore"&&window.removeEventListener("scroll",w,!0),a!=="ignore"&&(window.removeEventListener("resize",y),window.removeEventListener("orientationchange",_)),k&&clearTimeout(k)}},[s,h,t,a,r]),o.useEffect(()=>{if(s)return Qn(()=>l(!1))},[s]);const p=o.useCallback(()=>l(b=>!b),[]),m=o.useCallback(()=>l(!1),[]);return{open:s,setOpen:l,toggle:p,close:m,style:i,triggerRef:c,menuRef:d}}function qy(e,{mode:t="playback",autoStart:a=!1,onPlaySpeaker:r,onComplete:s,playMs:l=1100,feedbackMs:i=1500}={}){const[u,c]=o.useState([]),[d,h]=o.useState(0),[p,m]=o.useState("idle"),[b,v]=o.useState(null),[C,f]=o.useState([]),[x,g]=o.useState(null),[w,y]=o.useState(0),k=o.useRef(0),_=o.useCallback(R=>{k.current=typeof R=="function"?R(k.current):R,y(k.current)},[]),A=o.useRef(r),B=o.useRef(s);o.useEffect(()=>{A.current=r,B.current=s},[r,s]);const E=o.useRef([]),D=()=>{E.current.forEach(clearTimeout),E.current=[]},N=(R,q)=>{E.current.push(setTimeout(q,R))};o.useEffect(()=>()=>D(),[]);const $=u[d]?.id??null,L=o.useRef(null),U=o.useCallback(()=>{D(),m("playing"),f([]),g(null),_(0);let R=0;e.forEach((q,Z)=>{N(R,()=>{h(Z),v(q.id),A.current?.(q)}),N(R+1e3,()=>{v(null),f(z=>[...z,q.id])}),R+=1300}),N(R,()=>{m("done"),B.current?.({score:0,total:e.length})})},[e,_]),M=o.useCallback((R,q)=>{if(q>=R.length){m("done"),B.current?.({score:k.current,total:R.length});return}L.current=null,h(q),g(null),m("playing"),v(R[q].id),A.current?.(R[q]),N(l,()=>{v(null),m("waiting")})},[l]),P=o.useCallback(()=>{D();const R=Ra(e);c(R),_(0),f([]),M(R,0)},[e,M,_]),T=o.useCallback(()=>{t==="playback"?(c(e),U()):P()},[t,e,U,P]),ee=o.useCallback(()=>{D(),m("idle"),v(null),f([]),g(null),h(0),_(0),c([])},[_]),te=JSON.stringify(e.map(R=>[R.id,R.label,R.angleDeg,R.deg,R.row,R.shortcut]));o.useEffect(()=>(a?T():ee(),()=>D()),[t,te,a]);const I=o.useCallback(R=>{p!=="waiting"||t==="playback"||L.current===d||(L.current=d,g(R),R===u[d]?.id&&_(q=>q+1),t==="exam"?(m("playing"),N(400,()=>M(u,d+1))):(m("feedback"),N(i,()=>M(u,d+1))))},[p,t,u,d,M,i,_]),Y=t==="playback"?e.length:u.length;return{bind:{activeSpeakerId:b,playedIds:C,selectedId:x,answerId:$,showFeedback:p==="feedback",clickable:p==="waiting",onSelectSpeaker:I},index:d,total:Y,score:w,phase:p,done:p==="done",start:T,reset:ee}}const Do=new Map,So=new Map,Uy=()=>()=>{},Gy=()=>!0,Ky=()=>!1;function Ki(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 a=Uint8Array.from(atob(t[2]),r=>r.charCodeAt(0));return new TextDecoder("utf-8").decode(a)}catch{return null}}function Yy(e){if(typeof window>"u")return"";const t=(a,r)=>{const s=r.attrName.toLowerCase(),l=r.attrValue.trim();(s==="href"||s==="xlink:href")&&!l.startsWith("#")&&(r.keepAttr=!1),(s==="style"||l.includes("\\")&&l.includes("("))&&(r.keepAttr=!1);const i=l.replace(/url\s*\(\s*(['"]?)#[^)\s'"]+\1\s*\)/gi,"");/url\s*\(/i.test(i)&&(r.keepAttr=!1)};da.addHook("uponSanitizeAttribute",t);try{return da.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:["script","style","foreignObject"]})}finally{da.removeHook("uponSanitizeAttribute",t)}}function Zy(e,t){const a=new Set;for(const i of e.matchAll(/url\(\s*(['"]?)#([^)\s"']+)\1\s*\)/g))a.add(i[2]);for(const i of e.matchAll(/(?:xlink:)?href="#([^"]+)"/g))a.add(i[1]);const r=new Set([...e.matchAll(/id="([^"]*)"/g)].map(i=>i[1])),s=[...a].filter(i=>r.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"),(d,h)=>`url(${h}#${c}${h})`).replace(new RegExp(`((?:xlink:)?href)="#${u}"`,"g"),`$1="#${c}"`)}return l}function Xy(e){const t=So.get(e);if(t)return t;const a=fetch(e).then(r=>r.ok?r.text():null).then(r=>(r!=null&&Do.set(e,r),r)).catch(()=>null).finally(()=>{So.delete(e)});return So.set(e,a),a}function Jy(e,t=!0){const a=o.useSyncExternalStore(Uy,Gy,Ky)&&t&&e?Ki(e)??Do.get(e)??null:null,[r,s]=o.useState({src:e,enabled:t,svg:a});return o.useEffect(()=>{if(!t||!e){s({src:e,enabled:t,svg:null});return}const l=Ki(e)??Do.get(e)??null;if(l!==null){s({src:e,enabled:t,svg:l});return}let i=!0;return Xy(e).then(u=>{i&&s({src:e,enabled:t,svg:u})}),()=>{i=!1}},[e,t]),r.src===e&&r.enabled===t?r.svg:a}function Qy({title:e,description:t,actionLabel:a,onAction:r,bg:s,color:l,size:i="medium",actionVariant:u,titleColor:c,descriptionColor:d,className:h=""}){const p=s??l??"main",m=o.useRef(null),[b,v]=o.useState("main"),C=yn("(max-width: 767px)"),f=o.useRef({title:!1,description:!1});o.useLayoutEffect(()=>{const w=m.current;if(!w)return;const y=Bo(w),k=(_,A,B)=>{if(B!==void 0)w.style.setProperty(A,B),f.current[_]=!0;else if(f.current[_]){const E=y?.[_];E?w.style.setProperty(A,E):w.style.removeProperty(A),f.current[_]=!1}};k("title","--promo-banner-bg-title",c),k("description","--promo-banner-bg-description",d)},[c,d,p]),o.useLayoutEffect(()=>{const w=m.current;if(!w)return;const y=Bo(w);v(y?.actionVariant??"main")},[p]);const x=Be("promo-banner",`promo-banner--${i}`,h),g=Ii[p];return n.jsxs("div",{ref:m,className:x,role:"note",children:[n.jsx(g,{}),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})]}),a&&r&&n.jsx(fe,{htmlType:"button",size:40,variant:u??b,shape:"pill",useBorder:!0,onClick:r,ariaLabel:a,...C?{type:"dot",icon:"arrow-right"}:{rightIcon:"arrow-right",label:a,minWidth:140}})]})}function e2({children:e,interval:t=5e3,dotTone:a,className:r="","aria-label":s}){const{t:l}=_e.useTranslation(),i=s??l("topBanner.ariaLabel","\uBC30\uB108"),u=o.Children.toArray(e),c=u.length,[d,h]=o.useState(0),[p,m]=o.useState(!1),[b,v]=o.useState(!1),[C,f]=o.useState(!1),x=o.useRef(null),g=o.useRef(null),w=o.useRef(null),y=_o(),k=p||b||C,_=c>0?Math.min(d,c-1):0;o.useEffect(()=>{if(c<2||t<=0||k||y)return;const B=window.setInterval(()=>h(E=>(Math.min(E,c-1)+1)%c),t);return()=>window.clearInterval(B)},[c,t,k,y]);const A=B=>{g.current!=null&&window.clearTimeout(g.current),g.current=window.setTimeout(()=>{g.current=null,f(!1)},B)};return o.useEffect(()=>()=>{g.current!=null&&window.clearTimeout(g.current)},[]),o.useEffect(()=>{if(!C)return;const B=E=>{E.pointerType==="touch"&&(w.current&&w.current.contains(E.target)||(g.current!=null&&(window.clearTimeout(g.current),g.current=null),f(!1)))};return document.addEventListener("pointerdown",B,!0),()=>document.removeEventListener("pointerdown",B,!0)},[C]),c===0?null:n.jsxs("section",{ref:w,className:Be("top-banner",r),"aria-label":i,"aria-roledescription":"carousel",onPointerEnter:B=>{x.current=B.pointerType},onPointerDown:B=>{x.current=B.pointerType,B.pointerType==="touch"&&(g.current!=null&&(window.clearTimeout(g.current),g.current=null),f(!0))},onPointerUp:B=>{B.pointerType==="touch"&&A(5e3)},onPointerCancel:B=>{B.pointerType==="touch"&&A(5e3)},onMouseEnter:()=>{x.current!=="touch"&&m(!0)},onMouseLeave:()=>m(!1),onFocus:B=>{let E=!0;try{E=B.target.matches(":focus-visible")}catch{E=!0}v(E)},onBlur:B=>{B.currentTarget.contains(B.relatedTarget)||v(!1)},children:[n.jsx("div",{className:"top-banner__viewport",children:n.jsx("div",{className:"top-banner__track",style:{transform:`translateX(-${_*100}%)`},children:u.map((B,E)=>n.jsx("div",{className:"top-banner__slide","aria-hidden":E!==_,...E!==_?{inert:!0}:{},children:B},E))})}),c>1&&n.jsx("div",{className:`top-banner__dots${(a?.[_]??"light")==="dark"?" top-banner__dots--dark":""}`,children:u.map((B,E)=>n.jsx("button",{type:"button",className:`top-banner__dot${E===_?" 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===_,onClick:()=>h(E)},E))})]})}function t2({title:e,body:t,open:a=!1,onToggle:r,avatar:s,titleClassName:l="body-2",bodyClassName:i="body-2",className:u=""}){const{t:c}=_e.useTranslation();return n.jsxs("div",{className:`accordion-item ${a?"accordion-item--open":""} ${u}`.trim(),role:"listitem",children:[n.jsxs("div",{className:"accordion-item__header",role:"button",tabIndex:0,"aria-expanded":a,"data-accordion-header":!0,onClick:r,onKeyDown:d=>{if(d.key==="Enter"||d.key===" ")d.preventDefault(),r?.();else if(d.key==="ArrowDown"||d.key==="ArrowUp"){d.preventDefault();const h=d.currentTarget.closest('[role="list"]');if(!h)return;const p=Array.from(h.querySelectorAll("[data-accordion-header]")),m=p.indexOf(d.currentTarget);(d.key==="ArrowDown"?p[m+1]:p[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(ot,{icon:a?"chevron-up":"chevron-down",label:a?c("accordion.collapse","\uC811\uAE30"):c("accordion.expand","\uD3BC\uCE58\uAE30"),className:"accordion-item__chevron-icon",imgClassName:"accordion-item__chevron-image"})})]}),a&&n.jsx("div",{className:`accordion-item__body ${i}`,children:typeof t=="string"?n.jsx("p",{children:t}):t})]})}function n2({items:e=[],defaultOpenIndex:t=0,size:a=72,className:r="",bodyClassName:s}){const[l,i]=o.useState({index:t}),u=(c,d)=>l.id!=null&&c.id!=null?c.id===l.id:l.id==null&&d===l.index;return n.jsx("div",{className:`accordion-group accordion-group--s${a} ${r}`.trim(),role:"list",children:e.map((c,d)=>n.jsx(t2,{title:c.title,body:c.body,avatar:c.avatar,open:u(c,d),onToggle:()=>i(u(c,d)?{index:-1}:{index:d,id:c.id}),bodyClassName:s},c.id??d))})}function a2(){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 r2(){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 o2(){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 Dn({children:e,icon:t,number:a,position:r="top-left",size:s=24,animate:l=!1,onClick:i,"aria-label":u,"aria-hidden":c,className:d=""}){const{t:h}=_e.useTranslation(),p=t??"check",m=a!==void 0,b=e!==void 0||m?"number":p,v=e!==void 0?void 0:m?h("badge.nthSelected",{n:a,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")}[p],C=c?void 0:u??v;return n.jsxs("span",{className:Be("circle-badge",`circle-badge--${b}`,`circle-badge--${s}`,`circle-badge--${r}`,l?"circle-badge--animate":"",i?"circle-badge--clickable":"",d),onClick:i,onKeyDown:i?f=>{f.key!=="Enter"&&f.key!==" "||(f.preventDefault(),f.currentTarget.click())}:void 0,"aria-label":C,"aria-hidden":c||void 0,role:i?"button":C?"img":void 0,tabIndex:i?0:void 0,children:[e??(m?a:null),e===void 0&&!m&&p==="check"&&n.jsx(a2,{}),e===void 0&&!m&&p==="remove"&&n.jsx(r2,{}),e===void 0&&!m&&p==="minus"&&n.jsx(o2,{})]})}function Va({columns:e=[],onClose:t,className:a="",size:r="medium"}){const{t:s}=_e.useTranslation(),l=r==="small"?40:48,[i,u]=o.useState([]),c=o.useMemo(()=>{const f=[{title:null,columns:e}];let x=e;for(const g of i){const w=x?.[g.ci]?.items?.[g.ii];if(!w||!Array.isArray(w.children)||!w.children.length)break;x=[{title:null,items:w.children}],f.push({title:w.label||null,columns:x})}return f},[e,i]),d=c[c.length-1],h=c.length-1,p=o.useCallback(()=>u(f=>f.slice(0,Math.max(0,Math.min(f.length,h)-1))),[h]),m=o.useRef(null),b=o.useRef(null),v=c.length;o.useEffect(()=>{b.current||(b.current=document.activeElement);let f=0,x=0;const g=()=>{const w=m.current?.querySelector("button:not([disabled])");if(w&&w.offsetParent){w.focus({preventScroll:!0});return}x++<20&&(f=requestAnimationFrame(g))};return f=requestAnimationFrame(g),()=>cancelAnimationFrame(f)},[v]),o.useEffect(()=>()=>{b.current?.focus?.({preventScroll:!0})},[]);const C=o.useCallback((f,x,g)=>{if(f){if(Array.isArray(f.children)&&f.children.length){u(w=>[...w.slice(0,h),{ci:x,ii:g}]);return}try{typeof f.onClick=="function"&&f.onClick()}catch{}try{f&&f.closeOnSelect&&typeof t=="function"&&t()}catch{}}},[t,h]);return n.jsxs("div",{className:se(`menu-tooltip menu-tooltip--${r} ${a}`),children:[(c.length>1||d.title)&&n.jsxs("div",{className:se("menu-tooltip__header"),children:[c.length>1?n.jsx(fe,{htmlType:"button",size:l,type:"dot",icon:"chevron-left",ariaLabel:s("common.back","\uB4A4\uB85C"),onClick:p,variant:"transparent-gray",useBorder:!1}):null,n.jsx("div",{className:se("menu-tooltip__title button-1"),children:d.title})]}),n.jsx("div",{className:se("menu-tooltip__columns"),ref:m,children:d.columns&&d.columns.map((f,x)=>{const g=(f.items||[]).some(w=>!!w.icon||w.selected!==void 0);return n.jsxs("div",{className:se("menu-tooltip__column"),children:[f.title?n.jsx("div",{className:se("menu-tooltip__column-title body-3"),children:f.title}):null,n.jsx("div",{className:se("menu-tooltip__items"),children:(f.items||[]).map((w,y)=>n.jsxs(o.Fragment,{children:[w.separatorBefore&&y>0&&n.jsx("div",{className:se("menu-tooltip__separator"),role:"separator"}),n.jsx(fe,{htmlType:"button",className:se("menu-tooltip__item"),size:l,type:w.label?"bar":"dot",icon:w.selected?"check":w.icon||(g||!w.label?"none":void 0),rightIcon:Array.isArray(w.children)&&w.children.length?"chevron-right":w.badgeCount?n.jsx(Dn,{position:"inline",number:Math.min(w.badgeCount,99),size:24,"aria-hidden":!0}):void 0,label:w.label,ariaLabel:w.label&&w.badgeCount&&w.badgeCount>0?s("nav.badgeLabel",{label:w.label,count:w.badgeCount,defaultValue:"{{label}}, {{count}}\uAC1C"}):w.label,onClick:()=>C(w,x,y),selected:w.selected,disabled:w.disabled,showTooltipInfo:w.tooltip||!1,useBorder:!1,align:"left"})]},y))})]},x)})})]})}const Yi=".content-area";function jo(e,t="Nav"){try{const a=typeof e=="string"?document.querySelector(e):e?.current??document.querySelector(Yi);if(a){a.scrollTop=0;return}const r=document.scrollingElement??document.documentElement;r&&r.scrollHeight<=r.clientHeight&&At("nav-scroll-container",`[${t}] \uBCF8\uBB38\uC744 \uB9E8 \uC704\uB85C \uB418\uB3CC\uB9B4 \uD1B5\uC744 \uBABB \uCC3E\uC558\uB2E4(\uAE30\uBCF8 ${Yi}) \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 To=52,yr=10,Zi=e=>e&&e>0?e:0;function Xi({items:e=[],activeKey:t,onChange:a,appMode:r,onAppModeChange:s,moreItems:l=[],scrollContainer:i}){const{t:u}=_e.useTranslation(),c=r==="manager"?"malgwi":"manager",d=r==="manager"?"arrow-left":"arrow-right",h=r==="manager"?u("nav.modeLabelMalgwi","\uB9D0\uADC0"):u("nav.modeLabelManager","\uB9D0\uADC0 \uB9E4\uB2C8\uC800"),p=o.useRef(null),[m,b]=o.useState(0),v=e.length;o.useEffect(()=>{const R=p.current;if(!R)return;const q=()=>{const j=typeof getComputedStyle=="function"?getComputedStyle(R):null,F=R.clientWidth-(parseFloat(j?.paddingLeft??"")||0)-(parseFloat(j?.paddingRight??"")||0),O=R.querySelector(".bottom-nav__left"),G=O?.nextElementSibling,ie=(O?.offsetWidth??0)+(O&&G?.classList.contains("bottom-nav__divider")?G.offsetWidth:0);b(Math.max(0,F-ie))};if(q(),typeof ResizeObserver>"u")return;const Z=new ResizeObserver(q);Z.observe(R);const z=R.querySelector(".bottom-nav__left");return z&&Z.observe(z),()=>Z.disconnect()},[s]);const C=To+1,f=R=>Math.max(0,Math.floor((R+yr)/(To+yr))),x=v*(To+yr)-yr<=m,g=m<=0||l.length===0&&x?v:Math.min(v,f(m-C)),w=m>0&&g<v,y=w?g:v,k=e.slice(0,y),_=e.slice(y),A=w||l.length>0,B=o.useCallback((R,q)=>({position:"fixed",bottom:window.innerHeight-R.top+8,right:window.innerWidth-R.right,zIndex:Wa(q)}),[]),E=o.useId(),{open:D,toggle:N,close:$,style:L,triggerRef:U,menuRef:M}=Ha({computeStyle:B,onScroll:"ignore",onResize:"reposition"}),P=o.useCallback((R,q)=>q>0?u("nav.badgeLabel",{label:R,count:q,defaultValue:"{{label}}, {{count}}\uAC1C"}):R,[u]),T=o.useCallback((R,q)=>q>0?u("nav.badgeInsideLabel",{label:R,count:q,defaultValue:"{{label}}, \uC548\uC5D0 \uC54C\uB9BC {{count}}\uAC1C"}):R,[u]),ee=o.useCallback(()=>s?.(c),[s,c]),te=o.useMemo(()=>_.find(R=>!!R.key&&R.key===t)??l.find(R=>R.selected||R.key&&R.key===t),[_,t,l]),I=o.useMemo(()=>[{items:[..._.map(R=>({label:R.label,icon:R.icon,badgeCount:R.badgeCount,selected:!!R.key&&R.key===t,closeOnSelect:!0,disabled:R.state==="disabled",onClick:()=>{R.state!=="disabled"&&(R.key&&a&&(a(R.key),jo(i,"BottomNav")),$())}})),...l.map(R=>({label:R.label,icon:R.icon,badgeCount:R.badgeCount,selected:R.selected??(!!R.key&&R.key===t),closeOnSelect:!0,onClick:()=>{R.onClick?.(),$()}}))]}],[_,l,t,a,$]),Y=[..._,...l].reduce((R,q)=>R+Zi(q.badgeCount),0);return n.jsxs("nav",{className:"bottom-nav",ref:p,"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(fe,{htmlType:"button",size:52,type:"dot",icon:d,ariaLabel:h,className:"bottom-nav-item",onClick:ee})}),n.jsx("div",{className:"bottom-nav__divider","aria-hidden":"true"})]}),n.jsx("div",{className:"bottom-nav__items",children:k.map((R,q)=>{const Z=Zi(R.badgeCount);return n.jsxs("span",{className:"bottom-nav__slot",children:[n.jsx(fe,{htmlType:"button",size:52,type:"dot",icon:R.icon,ariaLabel:P(R.label,Z),selected:!!R.key&&R.key===t,disabled:R.state==="disabled",className:"bottom-nav-item",onClick:()=>{R.key&&(a?.(R.key),jo(i,"BottomNav"))}}),Z>0&&n.jsx("span",{"aria-hidden":"true",children:n.jsx(Dn,{position:"top-right",number:Math.min(Z,99),size:24})})]},R.key??`__slot-${q}`)})}),A&&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:U,className:"bottom-nav__slot",children:[n.jsx(fe,{htmlType:"button",size:52,type:"dot",icon:te?.icon??"ellipsis",ariaLabel:T(te?.label??u("nav.more","\uB354\uBCF4\uAE30"),Y),selected:!!te,className:"bottom-nav-item",onClick:N,"aria-expanded":D,"aria-controls":D?E:void 0}),Y>0&&n.jsx("span",{"aria-hidden":"true",children:n.jsx(Dn,{position:"top-right",number:Math.min(Y,99),size:24})}),D&&hn.createPortal(n.jsx("div",{id:E,role:"group","aria-label":u("nav.moreMenu","\uB354\uBCF4\uAE30 \uBA54\uB274"),className:se("tooltip__content"),style:L,ref:M,children:n.jsx(Va,{columns:I,onClose:$})}),document.body)]})})]})]})}function Ji(e){if(typeof e!="string")return!1;let t="";for(const r of e){const s=r.charCodeAt(0);s<=32||s>=127&&s<=159||(t+=r)}if(!t)return!1;const a=/^([a-zA-Z][a-zA-Z0-9+.-]*):/.exec(t);return a?["http","https","mailto","tel"].includes(a[1].toLowerCase()):!0}function Qi(e,t,a){return a&&a>0?e("nav.badgeLabel",{label:t,count:a,defaultValue:"{{label}}, {{count}}\uAC1C"}):t}function s2(e){const{t}=_e.useTranslation(),{activeKey:a,unreadCount:r,onDebug:s,onNotification:l,onSetting:i,onHelp:u,onFeedback:c,onAccount:d}=e||{},h="default";return s||l||i||u||c||d?n.jsxs("div",{className:"side-nav__footer",children:[s&&n.jsx(fe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"terminal",ariaLabel:t("nav.debug","\uB514\uBC84\uADF8"),onClick:s,selected:a==="debug"}),l&&n.jsxs("span",{className:"side-nav__notification-wrap",children:[n.jsx(fe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"bell",ariaLabel:Qi(t,t("nav.notifications","\uC54C\uB9BC"),r),onClick:l,selected:a==="notifications"}),!!r&&r>0&&n.jsx(Dn,{number:Math.min(r,99),size:24,"aria-hidden":!0})]}),i&&n.jsx(fe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"settings",ariaLabel:t("nav.settings","\uC124\uC815"),onClick:i,selected:a==="settings"}),u&&n.jsx(fe,{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:a==="help"}),c&&n.jsx(fe,{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:a==="feedback"}),d&&n.jsx(fe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"user-round",ariaLabel:t("nav.account","\uACC4\uC815"),onClick:d,selected:a==="account"})]}):null}function eu(e){const{t}=_e.useTranslation(),{item:a,itemKey:r,label:s,icon:l,active:i,onClick:u,style:c,state:d,labelStyle:h}=e||{},p=a?.key??r??"",m=a?.label??s??"",b=a?.icon??l??"",v=a?.badge??0,C=n.jsx("span",{className:"side-nav__icon-wrap",children:n.jsx(ot,{icon:b,label:typeof m=="string"?m:void 0,className:"side-nav__icon",maskClassName:"side-nav__icon-image",imgClassName:void 0,svgClassName:void 0})}),f=d==="disabled",x=`side-nav__item ${i?"active":""} ${d||""} ${f?"disabled":""} ${a?.child?"side-nav__item--child":""}`,g=o.useCallback(w=>{if(f)return;const y=w.detail>0;if(y)try{w.currentTarget.blur()}catch{}u?.(p,w.currentTarget,y)},[f,p,u]);return n.jsxs("button",{type:"button",className:x,onClick:g,"aria-label":typeof m=="string"?Qi(t,m,v):void 0,"aria-current":i?"page":void 0,style:c,"aria-disabled":f,children:[C,n.jsx("span",{className:"side-nav__label button-1 f",style:h,children:m}),v>0&&n.jsx(Dn,{position:"inline",number:Math.min(v,99),size:24,"aria-hidden":!0}),d==="loading"&&n.jsx("span",{className:"side-nav__spinner",role:"img","aria-label":t("loader.loading","\uBD88\uB7EC\uC624\uB294 \uC911\u2026")})]})}function tu(e){const{t}=_e.useTranslation(),{items:a=[],activeKey:r,onChange:s,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:d,onHelp:h,onFeedback:p,appMode:m,onAppModeChange:b,scrollContainer:v}=e||{},C=m==="manager",f=o.useCallback(()=>b?.(C?"malgwi":"manager"),[b,C]),x=o.useRef(null),[g,w]=o.useState(null);o.useEffect(()=>{const B=x.current;if(!B)return;let E=null;const D=()=>{const{scrollHeight:L,clientHeight:U,scrollTop:M}=B;if(L<=U+1){w(I=>I===null?I:null);return}const P=Math.max(24,U/L*U),T=U-P,ee=L-U,te={top:Math.round(M/ee*T),height:Math.round(P)};w(I=>I&&I.top===te.top&&I.height===te.height?I:te)},N=()=>{if(typeof requestAnimationFrame>"u"){D();return}E===null&&(E=requestAnimationFrame(()=>{E=null,D()}))};D(),B.addEventListener("scroll",N,{passive:!0});const $=typeof ResizeObserver<"u"?new ResizeObserver(N):null;$?.observe(B);for(const L of Array.from(B.children))$?.observe(L);return()=>{E!==null&&cancelAnimationFrame(E),B.removeEventListener("scroll",N),$?.disconnect()}},[a]);const y=o.useRef(null),k=o.useCallback(B=>{const E=x.current;E&&(B.preventDefault(),y.current={y:B.clientY,top:E.scrollTop},B.currentTarget.setPointerCapture(B.pointerId))},[]),_=o.useCallback(B=>{const E=x.current,D=y.current;!E||!D||(E.scrollTop=D.top+(B.clientY-D.y)*(E.scrollHeight/E.clientHeight))},[]),A=o.useCallback(B=>{y.current=null,B.currentTarget.hasPointerCapture(B.pointerId)&&B.currentTarget.releasePointerCapture(B.pointerId)},[]);return n.jsxs("nav",{ref:x,"aria-label":t("nav.mainMenu","\uBA54\uC778 \uBA54\uB274"),className:"side-nav__menu",children:[g&&n.jsx("div",{className:"side-nav__scroll","aria-hidden":"true",children:n.jsx("div",{className:"side-nav__scroll-thumb",style:{top:g.top,height:g.height},onPointerDown:k,onPointerMove:_,onPointerUp:A,onPointerCancel:A})}),n.jsxs("div",{className:"side-nav__menu-list",children:[(a||[]).filter(B=>!B.section&&(B.key||B.label)).map((B,E)=>n.jsxs(o.Fragment,{children:[B.divider&&n.jsx("div",{className:"side-nav__separator"}),n.jsx(eu,{item:B,active:!!B.key&&B.key===r,state:B.disabled?"disabled":void 0,onClick:(D,N,$)=>{if(B.disabled)return;if(B.href){if(Ji(B.href)&&window.open(B.href,"_blank","noopener,noreferrer"),$)try{N?.blur()}catch{}return}if(s?.(B.key),jo(v,"SideNav"),!$)return;try{N?.blur()}catch{}if(typeof window<"u"&&window.matchMedia){if(!window.matchMedia("(min-width: 768px) and (max-width: 1023px)").matches)return}else return;const L=document.querySelector(".header");if(L){const U=typeof L.matches=="function";if(!(window.matchMedia("(hover: hover)").matches&&U&&L.matches(":hover"))){L.classList.add("header--force-collapsed");const M=()=>{L.classList.remove("header--force-collapsed"),L.removeEventListener("mouseenter",M)};L.addEventListener("mouseenter",M)}}}})]},B.key??`side-nav__item-${E}`)),b&&n.jsx("div",{className:"side-nav__separator side-nav__separator--short"}),b&&n.jsx(eu,{item:{key:"__mode-switch__",label:C?t("nav.goToMalgwi","\uB9D0\uADC0\uB85C \uC774\uB3D9"):t("nav.goToManager","\uB9D0\uADC0\uB9E4\uB2C8\uC800\uB85C \uC774\uB3D9"),icon:C?"arrow-left":"arrow-right"},onClick:f})]}),n.jsx(s2,{activeKey:r,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:d,onHelp:h,onFeedback:p})]})}var vr='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>',Mo='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>',l2='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 nu({appMode:e}){const{t}=_e.useTranslation(),a=e==="manager",r=a?Mo:vr,s=l2;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"}),n.jsx("img",{src:r,alt:a?t("header.logoManager","\uB9D0\uADC0\uB9E4\uB2C8\uC800 \uB85C\uACE0"):t("header.logoMalgwi","\uB9D0\uADC0 \uB85C\uACE0"),className:"brand-identity__image brand-identity__image--logo"})]})}function au({activeKey:e,onChange:t,items:a,malgwiItems:r,managerItems:s,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:d,onHelp:h,onFeedback:p,appMode:m,onAppModeChange:b,scrollContainer:v}){const{t:C}=_e.useTranslation(),f=yn("(max-width: 767px)"),x=o.useMemo(()=>(a??[]).filter(L=>!L.section&&(L.key||L.label)).map(L=>({key:L.key,label:typeof L.label=="string"?L.label:void 0,icon:L.icon,state:L.disabled?"disabled":void 0,badgeCount:L.badge})),[a]),g=o.useCallback(L=>{const U=a?.find(M=>M.key===L);if(!U?.disabled){if(U?.href){Ji(U.href)&&window.open(U.href,"_blank","noopener,noreferrer");return}t?.(L)}},[a,t]),w=o.useMemo(()=>{const L=[];return i&&L.push({key:"debug",icon:"terminal",label:C("nav.debug","\uB514\uBC84\uADF8"),onClick:i}),u&&L.push({key:"notifications",icon:"bell",label:C("nav.notifications","\uC54C\uB9BC"),badgeCount:l,onClick:u}),d&&L.push({key:"settings",icon:"settings",label:C("nav.settings","\uC124\uC815"),onClick:d}),h&&L.push({key:"help",icon:"message-circle-question-mark",label:C("nav.help","\uB3C4\uC6C0\uB9D0"),onClick:h}),p&&L.push({key:"feedback",icon:"bug",label:C("nav.feedback","\uBC84\uADF8\uC2E0\uACE0"),onClick:p}),c&&L.push({key:"account",icon:"user-round",label:C("nav.account","\uACC4\uC815"),onClick:c}),L},[C,i,u,d,h,p,c,l]),y=o.useCallback((L,U)=>({position:"fixed",top:L.bottom+8,right:Math.max(8,window.innerWidth-L.right),zIndex:Wa(U)}),[]),k=o.useId(),{open:_,toggle:A,close:B,style:E,triggerRef:D,menuRef:N}=Ha({computeStyle:y,onScroll:"ignore",onResize:"reposition"}),$=o.useMemo(()=>[{items:w.map(L=>({label:L.label,icon:L.icon,badgeCount:L.badgeCount,selected:L.selected??(!!L.key&&L.key===e),closeOnSelect:!0,onClick:()=>{L.onClick?.(),B()}}))}],[w,e,B]);return n.jsxs("aside",{className:`header${m==="manager"?" header--manager":""}`,children:[n.jsxs("div",{className:"header__bi",children:[n.jsx(nu,{appMode:m}),n.jsxs("div",{className:"header__menu-button",ref:D,children:[n.jsx(fe,{htmlType:"button",size:48,type:"dot",shape:"pill",variant:"default",useBorder:!1,icon:"menu",ariaLabel:u&&l&&l>0?C("nav.badgeInsideLabel",{label:C("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),count:l,defaultValue:"{{label}}, \uC548\uC5D0 \uC54C\uB9BC {{count}}\uAC1C"}):C("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),onClick:A,"aria-expanded":_,"aria-controls":_?k:void 0}),!!u&&!!l&&l>0&&n.jsx(Dn,{number:Math.min(l,99),size:24,"aria-hidden":!0}),_&&hn.createPortal(n.jsx("div",{id:k,role:"group","aria-label":C("header.utilMenu","\uC720\uD2F8\uB9AC\uD2F0 \uBA54\uB274"),className:se("tooltip__content"),style:E,ref:N,children:n.jsx(Va,{columns:$,onClose:B})}),document.body)]})]}),n.jsx(tu,{scrollContainer:v,items:a,activeKey:e??void 0,onChange:t,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:d,onHelp:h,onFeedback:p,appMode:m,onAppModeChange:b}),f&&n.jsx(Xi,{items:x,activeKey:e??void 0,onChange:g,scrollContainer:v,appMode:m,onAppModeChange:b})]})}const i2=au;function ln(e){const{type:t="dot",size:a,className:r="","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)&&At("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&&At("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:d="default",fill:h="filled",minWidth:p,iconLeft:m,iconRight:b,color:v}=e,C=t==="bar",f=typeof a=="number"?"medium":a??"medium",x=(C?{small:"caption-2",medium:"body-3",large:"body-2"}:{small:"caption-2b",medium:"body-3b",large:"body-2b"})[f]??(C?"body-2":"body-2b"),g={small:12,medium:14,large:16}[f]??14,w=Be("badge",C?"badge--bar":"",`badge--${d}`,`badge--${f}`,h!=="filled"?`badge--${h}`:"",x,r),y=v?.startsWith("--")?`var(${v})`:v,k=p!==void 0||y?{...p!==void 0?{minWidth:typeof p=="number"?`${p}px`:p}:{},...y?{"--badge-color":y}:{}}:void 0;return n.jsxs("span",{className:w,style:k,"aria-label":l?void 0:s,role:i??(s&&!l?"img":void 0),"aria-hidden":l||void 0,children:[m&&n.jsx(ot,{icon:m,size:g,className:"badge__icon"}),u??c,b&&n.jsx(ot,{icon:b,size:g,className:"badge__icon"})]})}const u2=()=>Kt.t("passCard.planSuffix","\uC774\uC6A9\uAD8C");function ru(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 ma(`${t.toLocaleString("ko-KR")}\uC6D0`)}return ma(typeof e=="number"?`${e.toLocaleString("ko-KR")}\uC6D0`:e)}}function c2(e){const t=`${e.code??""} ${e.name??""}`.toLowerCase();return/manager|매니저/.test(t)?"manager":"speechear"}function d2(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 a=e.name??"",r=a.match(/(\d+\s*(?:년|개월|주|일))\s*(?:이용권)?\s*$/);if(r)return r[1].replace(/\s+/g,"");const s=a.match(/(\d+)\s*-?\s*(day|year)s?\b/i);return s?s[2].toLowerCase()==="year"?`${s[1]}\uB144`:`${s[1]}\uC77C`:a||u2()}function p2(e){const t=(e??"").match(/(\d+)(d|y)\b/i);if(!t)return null;const a=Number(t[1]);return t[2].toLowerCase()==="y"?a*365:a}function ou(e){return{type:e.type??c2(e),plan:d2(e),label:e.label,price:ru(e.price),originalPrice:ru(e.originalPrice),discountLabel:e.discountLabel}}var h2='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>',m2='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>',su='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 na={text:"--pass-card-text",sub:"--pass-card-sub",copyright:"--pass-card-copyright"},Lo=new WeakMap;function C2(e){if(e)return Lo.get(e)}function $n(e,t){e&&(e.style.setProperty(na.text,t.text),e.style.setProperty(na.sub,t.sub),t.copyrightColor&&e.style.setProperty(na.copyright,t.copyrightColor),Lo.set(e,t))}function Rn(e){e&&(e.style.removeProperty(na.text),e.style.removeProperty(na.sub),e.style.removeProperty(na.copyright),Lo.delete(e))}const lu={text:"var(--color-pureBlack)",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"#1a1a1a"};function iu(e={}){const t=Rt(lu,$n,Rn);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("${su}")`}})]})}const uu="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",ba=240;var qa='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 f2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"},b2=100,g2=[{scale:1,opacity:.55},{scale:2,opacity:.4},{scale:3.1,opacity:.28},{scale:4.5,opacity:.18},{scale:6,opacity:.1}];function cu(e={}){const t=Rt(f2,$n,Rn),a="var(--color-main)",r=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:g2.map(({scale:l,opacity:i},u)=>n.jsx("g",{transform:`translate(${r} ${s}) scale(${l*b2/ba}) translate(${-ba/2} ${-ba/2})`,opacity:i,children:n.jsx("path",{d:uu,fill:"none",stroke:a,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("${qa}")`}})]})}const y2={text:"#ffffff",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",logoColor:"_mono",copyrightColor:"#ffffff"},v2=100,_2=[{scale:1,opacity:.55},{scale:2,opacity:.4},{scale:3.1,opacity:.28},{scale:4.5,opacity:.18},{scale:6,opacity:.1}];function x2(e={}){const t=Rt(y2,$n,Rn),a="#ffffff",r=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:_2.map(({scale:l,opacity:i},u)=>n.jsx("g",{transform:`translate(${r} ${s}) scale(${l*v2/ba}) translate(${-ba/2} ${-ba/2})`,opacity:i,children:n.jsx("path",{d:uu,fill:"none",stroke:a,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("${su}")`}})]})}const w2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"};function B2(e={}){const t=Rt(w2,$n,Rn);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("${qa}")`}})]})}const k2={Logo_SpeechEar_ko:{"":vr,_mono:h2},Logo_SpeechEarManager_ko:{"":Mo,_mono:m2}};function A2(e,t){if(e)return k2[e]?.[t??""]??void 0}const N2={speechear:vr,manager:Mo},E2={speechear:"Logo_SpeechEar_ko",manager:"Logo_SpeechEarManager_ko"},du=10;function D2(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 pu(e,t){if(e<=0)return t("passCard.remainingSecond",{n:0});const a=Math.floor(e/86400);if(a>0)return t("passCard.remainingDay",{n:a});const r=Math.floor(e/3600);if(r>0)return t("passCard.remainingHour",{n:r});const s=Math.floor(e/60);return s>0?t("passCard.remainingMinute",{n:s}):t("passCard.remainingSecond",{n:Math.floor(e)})}function S2(e,t,a){if(e==="manager"){const r=/년/.test(t)||/yr|year/i.test(t)||/1년|365/.test(t),s=a==="\uC624\uD508\uD2B9\uAC00"||a===Kt.t("passCard.specialLabel");return r?n.jsx(B2,{}):s?n.jsx(x2,{}):n.jsx(cu,{})}return n.jsx(iu,{})}function hu({ariaLabel:e,product:t,showPrice:a=!1,plan:r,type:s,endDate:l,remainingSeconds:i,endInclusive:u=!1,state:c="active",bg:d,bgOnly:h=!1,textColor:p,subColor:m,copyrightColor:b,logoSrc:v,label:C,price:f,originalPrice:x,discountLabel:g,onUse:w,onRefund:y,onDelete:k}){const{t:_}=_e.useTranslation(),A=t?ou(t):void 0,B=s??A?.type??"speechear",E=r??A?.plan??_("passCard.planSuffix","\uC774\uC6A9\uAD8C"),D=C??A?.label,N=f??(a?A?.price:void 0),$=x??(a?A?.originalPrice:void 0),L=g??A?.discountLabel,U=o.useMemo(()=>{if(N)return null;const V=t?.durationDays??p2(t?.code);if(!V||V<=0)return i!=null?{percent:null,remainingLabel:pu(i,_)}:null;const W=V*86400;let oe;if(i!=null)oe=i;else if((c==="active"||c==="expired")&&l){const me=new Date(l).getTime();if(Number.isNaN(me))return null;const ke=/^(\d{4})-(\d{2})-(\d{2})/.exec(String(l)),Le=/^(\d{4})-(\d{2})-(\d{2})/.exec(Fa()),Me=Math.round(ke&&Le?(Date.UTC(+ke[1],+ke[2]-1,+ke[3])-Date.UTC(+Le[1],+Le[2]-1,+Le[3]))/864e5:(me-Date.now())/864e5);oe=Math.max(0,u?Me+1:Me)*86400}else c==="expired"?oe=0:oe=W;const xe=D2(oe),be=Math.max(0,Math.min(100,Math.floor(Math.min(xe,W)/W*100)));return c==="pending"&&be>=100?null:{percent:be,remainingLabel:c==="expired"?_("passCard.expired","\uB9CC\uB8CC\uB428"):pu(oe,_)}},[N,c,l,i,u,t?.durationDays,t?.code,_]),M=o.useRef(null),[P,T]=o.useState({}),[ee,te]=o.useState(null),I=!!(w||y||k),Y=o.useRef(!1),R=o.useRef(void 0),[q,Z]=o.useState(v);o.useLayoutEffect(()=>{Z(v)},[v]),o.useLayoutEffect(()=>{const V=M.current;V&&(p!==void 0&&V.style.setProperty("--pass-card-text",p),m!==void 0&&V.style.setProperty("--pass-card-sub",m),b!==void 0&&V.style.setProperty("--pass-card-copyright",b))},[p,m,b]),o.useLayoutEffect(()=>{const V=M.current;if(!V)return;const W=C2(V);if(!v){const oe=E2[B],xe=c==="expired"?"_mono":W?.logoColor??"",be=A2(oe,xe);Z(be)}},[d,v,B,c]);const z=V=>{const W=M.current;if(!W)return null;const{left:oe,top:xe,width:be,height:me}=W.getBoundingClientRect(),ke=(V.clientX-oe)/be-.5;return{rotateX:-((V.clientY-xe)/me-.5)*du,rotateY:ke*du}},j=(V,W)=>{const oe=W*-.7,xe=V*.7+10,be=20+(Math.abs(V)+Math.abs(W))*.4;return`${oe}px ${xe}px ${be}px rgba(0, 0, 0, 0.18)`},F=o.useCallback(V=>{if(ea())return;Y.current=!0,clearTimeout(R.current),R.current=setTimeout(()=>{Y.current=!1},200);const W=z(V);W&&T({transform:`perspective(800px) rotateX(${W.rotateX}deg) rotateY(${W.rotateY}deg) scale3d(1.03, 1.03, 1.03)`,boxShadow:j(W.rotateX,W.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)"})},[]),O=o.useCallback(V=>{if(ea())return;const W=z(V);if(!W)return;const oe=Y.current?"transform 0.2s ease, box-shadow 0.2s ease":"none";T({transform:`perspective(800px) rotateX(${W.rotateX}deg) rotateY(${W.rotateY}deg) scale3d(1.03, 1.03, 1.03)`,boxShadow:j(W.rotateX,W.rotateY),transition:oe})},[]),G=o.useCallback(()=>{clearTimeout(R.current),Y.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)"})},[]),ie=o.useCallback(()=>te(null),[]),K=o.useMemo(()=>{const V=_("passCard.planSuffix","\uC774\uC6A9\uAD8C"),W=E.replace("\uC774\uC6A9\uAD8C","").replace(V==="\uC774\uC6A9\uAD8C"?"":V,"").trim(),oe=W.match(/^(.*?)(일|년)$/);return oe?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"h0 pass-card__plan-number",children:oe[1]}),n.jsx("span",{className:"h5b pass-card__plan-unit",children:oe[2]==="\uB144"?_("passCard.unitYear","\uB144"):_("passCard.unitDay","\uC77C")})]}):n.jsx("span",{className:"h0",children:W})},[E,_]),pe=o.useMemo(()=>{const V=ma(N);if(!V)return null;const W=V.match(/^([^\d]*)([\d.,]+)(.*)$/);if(!W)return n.jsx("span",{className:"h1",children:V});const[,oe,xe,be]=W;return n.jsxs(n.Fragment,{children:[oe&&n.jsx("span",{className:"h5 pass-card__price-symbol",children:oe}),n.jsx("span",{className:"h1 pass-card__price-amount",children:xe}),be.trim()&&n.jsx("span",{className:"h5 pass-card__price-symbol",children:be.trim()})]})},[N]),X=o.useCallback(()=>{I&&te(V=>{if(V)return null;const W=M.current?.getBoundingClientRect();if(!W)return null;const oe=50;return{left:W.left,right:W.right,width:W.width,height:W.height,x:W.x,y:W.y+oe,top:W.top+oe,bottom:W.bottom+oe}})},[I]),H=o.useCallback(V=>{I&&(V.key==="Enter"||V.key===" ")&&(V.preventDefault(),X())},[I,X]),ne=[{items:[...w?[{label:_("passCard.menu.use","\uC0AC\uC6A9\uD558\uAE30"),icon:"play",onClick:()=>{w(),te(null)},closeOnSelect:!0}]:[],...y?[{label:_("passCard.menu.refund","\uD658\uBD88\uD558\uAE30"),icon:"rotate-ccw",onClick:()=>{y(),te(null)},closeOnSelect:!0}]:[],...k?[{label:_("passCard.menu.delete","\uC0AD\uC81C\uD558\uAE30"),icon:"trash-2",onClick:()=>{k(),te(null)},closeOnSelect:!0}]:[]]}];return n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"pass-card-frame",children:n.jsxs("div",{ref:M,className:`pass-card pass-card--${c}${I?" pass-card--clickable":""}`,style:P,onMouseEnter:F,onMouseMove:O,onMouseLeave:G,onPointerUp:V=>{V.pointerType==="touch"&&G()},onPointerCancel:V=>{V.pointerType==="touch"&&G()},onClick:X,onKeyDown:I?H:void 0,role:I?"button":void 0,tabIndex:I?0:void 0,"aria-label":e,"aria-haspopup":I?"menu":void 0,"aria-expanded":I?!!ee:void 0,children:[d??S2(B,E,D),!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:q??N2[B],className:"pass-card__logo",alt:B==="manager"?_("header.logoManager","\uB9D0\uADC0\uB9E4\uB2C8\uC800 \uB85C\uACE0"):_("header.logoMalgwi","\uB9D0\uADC0 \uB85C\uACE0")}),n.jsxs("div",{className:"pass-card__plan",children:[n.jsx("div",{children:K}),n.jsx("span",{className:"h5b pass-card__plan-suffix",children:D?_("passCard.labeledPlan",{label:D}):_("passCard.planSuffix","\uC774\uC6A9\uAD8C")})]})]})}),N?n.jsxs("div",{className:"pass-card__price-area",children:[L&&n.jsx("span",{className:"pass-card__discount body-3",children:L}),n.jsxs("div",{className:"pass-card__price",children:[$&&n.jsx("span",{className:"pass-card__price-original body-3",children:ma($)}),pe]})]}):U?n.jsxs("div",{className:"pass-card__usage",children:[n.jsx("span",{className:"h5b pass-card__usage-remaining",children:U.remainingLabel}),U.percent!=null&&n.jsxs("span",{className:"pass-card__usage-percent",children:[n.jsx("span",{className:"h1 pass-card__usage-value",children:U.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."})]})]})}),ee&&n.jsx(Bn,{anchorRect:ee,onClose:ie,ariaLabel:_("tooltip.menu","\uBA54\uB274"),children:n.jsx(Va,{columns:ne,onClose:ie,size:"small"})})]})}const j2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"#1a1a1a"};function T2(e={}){const t=`passcard-sound-line-grad-${o.useId()}`,a=Rt(j2,$n,Rn);return n.jsxs("div",{ref:a,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("${qa}")`}})]})}const M2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"};function L2(e={}){const t=Rt(M2,$n,Rn);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("${qa}")`}})]})}function $2(e,t){if(e){if(t==="manager_pro")return n.jsx(L2,{});if(t==="manager_standard")return n.jsx(T2,{});if(t==="manager_lite")return n.jsx(cu,{})}}function R2(e){const t=ma(e);if(!t)return null;const a=t.match(/^([^\d]*)([\d.,]+)(.*)$/);if(!a)return t;const[,r,s,l]=a;return n.jsxs(n.Fragment,{children:[r&&n.jsx("span",{className:"payment-plan__pricing-symbol h4",children:r}),s,l.trim()&&n.jsx("span",{className:"payment-plan__pricing-symbol h4",children:l.trim()})]})}function P2(e){const{t}=_e.useTranslation(),a=t("payment.plan.tierFallback",{defaultValue:"\uC774\uC6A9\uAD8C"}),r=t("payment.plan.openPromo",{defaultValue:"\uC624\uD508 \uD2B9\uAC00"}),{plan:s,onSelect:l,period:i="monthly",ownedCodes:u}=e||{},c=y=>!!y&&!!u?.includes(y),d=y=>y.onceOnly??/오픈\s*특가/.test(y.label??""),h=(s.tiers||[]).some(y=>d(y)&&c(y.code)),p=y=>{const k=y.prices?y.prices[i]:y.price;return k?(s.tiers||[]).some(_=>!!_.badge&&_.originals?.[i]===k):!1},m=s.colorToken?`var(--color-${s.colorToken})`:"var(--color-gray)",b=t("payment.plan.freePrice","\uBB34\uB8CC"),v=t("payment.products.mgrEnterprise.tier.price","\uBB38\uC758"),C=y=>y.prices?y.prices[i]:y.price,f=(s.tiers||[]).length>0&&(s.tiers||[]).every(y=>{const k=C(y);return k==="\uBB34\uB8CC"||k===b||k==="0\uC6D0"||typeof k=="string"&&/\d/.test(k)&&!/[1-9]/.test(k)}),x=(s.tiers||[]).length>0&&(s.tiers||[]).every(y=>{const k=C(y);return k==="\uBB38\uC758"||k===v}),g=s.group==="org",w=g?"manager":"speechear";return n.jsxs("div",{className:"payment-plan__card",style:{borderColor:m,"--plan-color":m},children:[s.cardBadge&&n.jsx("div",{className:"payment-plan__card-badge",children:n.jsx(ln,{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:m},children:s.quote||"\xA0"}),n.jsx("h3",{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((y,k)=>n.jsxs("li",{className:"payment-plan__feature-item body-3",children:[n.jsx(ot,{icon:"check",size:18,className:"payment-plan__feature-check",wrapperStyle:{color:m}}),y]},k))})]}),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((y,k)=>n.jsxs("li",{className:"payment-plan__feature-item body-3",children:[n.jsx(ot,{icon:"check",size:18,className:"payment-plan__feature-check",wrapperStyle:{color:m}}),y]},k))})]}),n.jsx("div",{className:"payment-plan__card-pricing",children:f?null:x?n.jsx(fe,{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(y=>{const k=y.label||a,_=d(y),A=_||y.openPromo===!0,B=k.replace(/^오픈\s*특가\s*/,"")||a,E=y.prices?y.prices[i]:y.price,D=y.badge?A?`${r}
823
+ ${y.badge}`:y.badge:void 0;if(_&&c(y.code))return null;if(!y.badge&&!h)return p(y)?null:n.jsxs("div",{className:`payment-plan__pricing-row payment-plan__pricing-row--static${y.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:y.label})}),n.jsx("div",{className:"payment-plan__pricing-row-price",children:n.jsx("span",{className:"payment-plan__pricing-current h1",children:R2(E)})})]},y.id);const N=s.tier??(g?s.title:void 0),$=n.jsx(hu,{showPrice:!0,product:{type:w,code:y.code,name:B,label:N,price:E,originalPrice:y.originals?.[i]??void 0,discountLabel:D},bg:$2(g,s.id)}),L=()=>l?.({...y,productId:s.id,productTitle:s.title,preview:$});return n.jsx("div",{className:"payment-plan__pricing-card",onClick:L,onKeyDown:l?U=>{U.target===U.currentTarget&&(U.key==="Enter"||U.key===" ")&&(U.preventDefault(),L())}:void 0,role:l?"button":void 0,tabIndex:l?0:void 0,children:$},y.id)})})})})]})}function F2({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 $o='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 mu={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"#c9c9c9"};function I2(){const e=Rt(mu,$n,Rn);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("${$o}")`}})})}const Cu={text:"#ffffff",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEarManager_ko",logoColor:"_mono",copyrightColor:"#ffffff"};function O2(e={}){const t=Rt(Cu,$n,Rn);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("${qa}")`}})]})}function fu({keys:e,anchor:t="top-right",scale:a,className:r=""}){const s=Array.isArray(e)?e:[e];return n.jsx("span",{className:Be("shortcut-badge",`shortcut-badge--${t}`,r),style:a===void 0?void 0:{"--shortcut-badge-scale":String(a)},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 Ua=(e,t,a)=>e+(t-e)*a;function z2({speakers:e,size:t=300,viewT:a=0,activeSpeakerId:r=null,playedIds:s,selectedId:l=null,answerId:i=null,showFeedback:u=!1,pulseSelected:c=!1,pulseSelectedDuration:d,pulseScale:h,clickable:p=!1,onSelectSpeaker:m,buttonSize:b=40,showIcon:v=!0,onCenterClick:C,centerLabel:f,centerDisabled:x=!1,centerAttention:g=!1,shortcutAnchor:w="top-right",shortcutScale:y,scaleShortcut:k=!1}){const{t:_}=_e.useTranslation(),A=Math.max(0,Math.min(1,a)),B=t/2,E=110/300,D=.18,N=V=>t*(E+(V-1)*D),$=V=>{const W=N(V.row??1),oe=V.angleDeg*Math.PI/180;return{x:B+W*Math.cos(oe),y:B+W*Math.sin(oe)}},L=Math.max(...e.map(V=>V.row??1),1),U=t*.08,M=t*.1,P=t*.24,T=t-2*U,ee=t-M-P,te=t-P/2,I=o.useMemo(()=>[...new Set(e.map(V=>V.deg))].sort((V,W)=>V-W),[e]),Y=I.length,R=Math.max(68,Y>1?T/(Y-1):0),q=o.useMemo(()=>new Map(I.map((V,W)=>[V,W])),[I]),Z=V=>{const W=q.get(V.deg)??0,oe=B+(W-(Y-1)/2)*R,xe=L>1?Math.min(68,ee/(L-1)):0,be=xe*(L-1),me=M+(ee-be)/2,ke=L===1?M+ee*.4:me+(L-(V.row??1))*xe;return{x:oe,y:ke}},z=V=>{const W=$(V),oe=Z(V);return{x:Ua(W.x,oe.x,A),y:Ua(W.y,oe.y,A)}},j={x:B,y:Ua(B,te,A)},F=Math.round(b*1.2),O=Math.round(Math.max(16,Math.min(80,b*.7))),G=[],ie=new Map;for(const V of e){const W=V.row??1;ie.has(W)||ie.set(W,[]),ie.get(W).push(V)}for(const[V,W]of ie.entries()){if(W.length<2)continue;const oe=[...W].sort((ze,dt)=>ze.deg-dt.deg),xe=oe.map(ze=>z(ze)),be=oe.map(ze=>ze.deg),me=be[be.length-1]-be[0],ke=me/(be.length-1),Le=360-me,Me=oe.length>=3&&ke>0&&Le<=ke*1.5,le=Math.round(N(V)*1e3)/1e3,ve=(ze,dt,st,et)=>{const gt=(dt.angleDeg-ze.angleDeg+540)%360-180;if(gt===0)return`L ${et.x} ${et.y}`;if(A===0)return`A ${le} ${le} 0 0 ${gt>0?1:0} ${et.x} ${et.y}`;const Se=(ze.angleDeg+gt/2)*Math.PI/180,Ge={x:B+le*Math.cos(Se),y:B+le*Math.sin(Se)},we={x:(st.x+et.x)/2,y:(st.y+et.y)/2},qe={x:Ua(Ge.x,we.x,A),y:Ua(Ge.y,we.y,A)},Ye={x:2*qe.x-we.x,y:2*qe.y-we.y};return`Q ${Ye.x} ${Ye.y} ${et.x} ${et.y}`},$e=Me?[...oe,oe[0]]:oe,Ae=Me?[...xe,xe[0]]:xe;let Ie=`M ${Ae[0].x} ${Ae[0].y}`;for(let ze=1;ze<Ae.length;ze++)Ie+=" "+ve($e[ze-1],$e[ze],Ae[ze-1],Ae[ze]);G.push({key:`arc-${V}`,d:Ie})}const K=o.useMemo(()=>new Set(s??[]),[s]),pe=V=>({idle:"",active:_("soundCompass.state.active","\uC18C\uB9AC \uB098\uB294 \uC911"),played:_("soundCompass.state.played","\uB4E4\uC74C"),correct:_("soundCompass.state.correct","\uC815\uB2F5"),wrong:_("soundCompass.state.wrong","\uC624\uB2F5")})[V],X=V=>{if(r===V.id)return"active";if(u){if(V.id===i)return"correct";if(V.id===l&&l!==i)return"wrong"}return K.has(V.id)?"played":"idle"},H=V=>r===V.id?"loop":u?V.id===i?"loop":null:c&&V.id===l?"once":null,ne=(V,W)=>{switch(V){case"played":case"correct":return n.jsx(Ws,{size:W});case"wrong":return n.jsx(Js,{size:W});default:return n.jsx(Xs,{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:[A===0&&e.map(V=>{const{x:W,y:oe}=z(V);return n.jsx("line",{x1:j.x,y1:j.y,x2:W,y2:oe,stroke:"#dde3ec",strokeWidth:"1"},V.id)}),G.map(V=>n.jsx("path",{d:V.d,fill:"none",stroke:"#dde3ec",strokeWidth:"1"},V.key))]}),g&&!x&&n.jsx("div",{className:"sound-compass__pulse sound-compass__pulse--active sound-compass__pulse--center",style:{width:F,height:F,left:j.x-F/2,top:j.y-F/2}}),C?n.jsx("button",{type:"button",className:`sound-compass__center sound-compass__center--button${x?" sound-compass__center--disabled":""}`,style:{width:F,height:F,left:j.x,top:j.y},"aria-label":f,"aria-disabled":x||void 0,tabIndex:x?-1:0,onClick:x?void 0:C,children:n.jsx(Hr,{size:O,color:"currentColor",strokeWidth:1.5})}):n.jsx("div",{className:"sound-compass__center",style:{width:F,height:F,left:j.x,top:j.y},children:n.jsx(Hr,{size:O,color:"currentColor",strokeWidth:1.5})}),e.map((V,W)=>{const{x:oe,y:xe}=z(V),be=X(V),me=H(V),ke={...y!==void 0||k?{"--shortcut-badge-scale":String(y??Math.max(.75,Math.min(3,b/56)))}:null,pointerEvents:p?"auto":"none",cursor:p?"pointer":"default",zIndex:be!=="idle"?10:1},Le=b,Me=Math.round(Math.max(10,Math.min(56,Le*.38))),le=Math.round(Math.max(7,Math.min(18,Le*.2))),ve=Math.round(Math.max(10,Math.min(56,Le*.4))),$e=v==="answered"&&(be==="played"||be==="correct"||be==="wrong"),Ae=v===!0||$e,Ie=!$e;return n.jsxs("div",{className:"sound-compass__speaker-pos",style:{...ke,left:oe-Le/2,top:xe-Le/2},children:[me&&n.jsx("div",{className:`sound-compass__pulse sound-compass__pulse--${be}`+(me==="once"?" sound-compass__pulse--once":""),style:{width:Le,height:Le,...me==="once"&&d!==void 0?{"--sc-pulse-duration-once":`${d}ms`}:null,...h!==void 0?{"--sc-pulse-scale":String(h)}:null}}),n.jsxs("button",{type:"button",tabIndex:p?0:-1,"aria-disabled":p?void 0:!0,onClick:p?()=>m?.(V.id):void 0,className:`sound-compass__speaker-btn sound-compass__speaker-btn--${be}`,style:{width:Le,height:Le},"aria-label":pe(be)?`${V.label}, ${pe(be)}`:V.label,"aria-pressed":l!=null?V.id===l:void 0,children:[Ae&&ne(be,Me),Ie&&n.jsx("span",{className:"sound-compass__speaker-number",style:{fontSize:v===!0?le:ve},children:W+1})]}),V.shortcut&&n.jsx(fu,{keys:V.shortcut,anchor:w,className:"sound-compass__speaker-shortcut"})]},V.id)})]})})}function W2({orientation:e="horizontal",label:t,className:a=""}){const r=Be("divider",`divider--${e}`,t&&e==="horizontal"?"divider--labeled":"",a);return e==="vertical"?n.jsx("div",{className:r,role:"separator","aria-orientation":"vertical"}):t?n.jsxs("div",{className:r,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:r,role:"separator","aria-orientation":"horizontal"})}function bu({checked:e,onChange:t,name:a,value:r,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:a,value:r,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 H2({options:e,value:t,onChange:a,name:r,disabled:s=!1,direction:l="vertical",className:i="",ariaLabel:u}){const c=o.useId(),d=r??`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(bu,{name:d,value:h.value,checked:t===h.value,disabled:s||h.disabled,label:h.label,onChange:p=>{p&&a?.(h.value)}},h.value))})}const V2={info:"info",success:"check-circle",warning:"alert-triangle",danger:"alert-circle"};function q2({tone:e="info",title:t,message:a,children:r,dismissible:s=!1,onDismiss:l,live:i,className:u=""}){const{t:c}=_e.useTranslation(),[d,h]=o.useState(!1),p=o.useRef(null),m=o.useCallback(()=>{const g=p.current;g&&g.contains(document.activeElement)&&mr(g),h(!0),l?.()},[l]);if(d)return null;const b=Be("alert",`alert--${e}`,u),v=i??(e==="danger"||e==="warning"?"assertive":"polite"),C=v==="assertive"?"alert":v==="polite"?"status":void 0,f=!!t,x=!!(a||r);return n.jsxs("div",{ref:p,className:b,role:C,children:[n.jsxs("div",{className:"alert__body",children:[n.jsxs("div",{className:"alert__header",children:[n.jsx(ot,{icon:V2[e],size:20,className:"alert__icon"}),f&&n.jsx("span",{className:"alert__title body-2",children:t}),!f&&x&&n.jsx("div",{className:"alert__message body-3",children:a||r})]}),f&&x&&n.jsx("div",{className:"alert__message alert__message--indented body-3",children:a||r})]}),s&&n.jsx("button",{type:"button",className:"alert__dismiss",onClick:m,"aria-label":c("common.close","\uB2EB\uAE30"),children:"\xD7"})]})}const U2={ready:"search",guide:"info",error:"circle-alert"};function G2(e,t){const a=t.filter(Boolean);if(a.length===0)return e;const r=[];let s=0,l=0;for(const i of a){const u=e.indexOf(i,s);u<0||(u>s&&r.push(e.slice(s,u)),r.push(n.jsx("strong",{className:"search-summary__em body-2",children:i},l++)),s=u+i.length)}return s<e.length&&r.push(e.slice(s)),r}function K2({status:e="guide",label:t,children:a,emphasis:r,icon:s,className:l=""}){const i=s===!1?null:s??U2[e],u=Be("search-summary",`search-summary--${e}`,l),c=t??a,d=typeof c=="string"&&r&&r.length>0?G2(c,r):c;return n.jsxs("div",{className:u,role:"status","aria-live":"polite",children:[i!=null&&n.jsx(ot,{icon:i,size:18,className:"search-summary__icon"}),n.jsx("span",{className:"search-summary__text body-2",children:d})]})}function Ga({title:e,items:t}){const{t:a}=_e.useTranslation(),{anchorRect:r,openAt:s,close:l}=za(),i=o.useRef(null),u=fr(!!r,(c,d)=>{c&&d?s(i.current?.querySelector("button")??d):l()},i);return n.jsxs("span",{ref:i,style:{display:"contents"},children:[n.jsx(fe,{htmlType:"button",size:24,type:"dot",icon:"info",variant:"transparent-gray",useBorder:!1,selected:!!r,ariaLabel:a("common.info","\uC124\uBA85"),onPointerEnter:c=>{Un(c)||s(c.currentTarget)},onPointerLeave:c=>{Un(c)||l()},onClick:c=>{u.touchPress(c.currentTarget)},onFocus:c=>{ea()||s(c.currentTarget)},onBlur:l}),r&&n.jsx(qn,{title:e,items:t,showIndex:t.length>1,anchorRect:r,onClose:l})]})}function Y2({items:e=[],value:t,onChange:a,className:r="",size:s=40}){const l=o.useId(),{t:i}=_e.useTranslation(),u=o.useRef(null),c=e.find(C=>!C.disabled)?.key,d=e.some(C=>C.key===t)?t:c??e[0]?.key,h=e.find(C=>C.key===d&&!C.disabled)?.key??c,p=()=>Array.from(u.current?.querySelectorAll('[role="tab"]:not(:disabled)')??[]),m=(C,f=p())=>{if(f.length===0)return;const x=(C%f.length+f.length)%f.length;f[x]?.focus(),f[x]?.click()},b=C=>{if(!["ArrowRight","ArrowDown","ArrowLeft","ArrowUp","Home","End"].includes(C.key))return;C.preventDefault();const f=p(),x=f.indexOf(C.currentTarget);C.key==="ArrowRight"||C.key==="ArrowDown"?m(x+1,f):C.key==="ArrowLeft"||C.key==="ArrowUp"?m(x-1,f):C.key==="Home"?m(0,f):m(f.length-1,f)},v=e.find(C=>C.key===d);return n.jsxs("div",{className:`tabs ${r}`.trim(),children:[n.jsx("div",{ref:u,className:`tabs__list tabs__list--${s}`,role:"tablist","aria-label":i("tabs.ariaLabel","\uD0ED"),children:e.map(C=>n.jsx("button",{id:`tabs__tab-${l}-${C.key}`,type:"button",role:"tab","aria-selected":C.key===d,"aria-controls":`tabs__panel-${l}-${C.key}`,disabled:C.disabled,tabIndex:C.key===h?0:-1,className:`tabs__tab body-2${C.key===d?" tabs__tab--active":""}`,onClick:()=>{C.key!==t&&a?.(C.key)},onKeyDown:b,children:C.label},C.key))}),v&&n.jsx("div",{id:`tabs__panel-${l}-${v.key}`,role:"tabpanel","aria-labelledby":`tabs__tab-${l}-${v.key}`,tabIndex:0,className:"tabs__panel",children:v.panel},v.key)]})}const Z2={xs:12,sm:16,md:20,lg:28,xl:36};function X2(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 J2({src:e,name:t,size:a="md",shape:r="circle",className:s=""}){const{t:l}=_e.useTranslation(),[i,u]=o.useState(null),c=!!e&&i===e,d=t?X2(t):"",h=!!e&&!c,p=!h&&!!d,m=t||l("avatar.ariaLabel","\uC0AC\uC6A9\uC790 \uC544\uBC14\uD0C0");return n.jsxs("span",{className:`avatar avatar--${a} avatar--${r} ${s}`.trim(),role:"img","aria-label":m,children:[h&&n.jsx("img",{className:"avatar__image",src:e,alt:m,onError:()=>u(e??null)}),!h&&p&&n.jsx("span",{className:"avatar__initials","aria-hidden":"true",children:d}),!h&&!p&&n.jsx(ot,{icon:"user-round",size:Z2[a],className:"avatar__icon"})]})}function Q2(e,t){if(!t)return!0;const a=t.split(",").map(l=>l.trim()).filter(Boolean);if(a.length===0)return!0;const r=e.name.toLowerCase(),s=e.type.toLowerCase();return a.some(l=>{const i=l.toLowerCase();return i.startsWith(".")?r.endsWith(i):i.endsWith("/*")?s.startsWith(i.slice(0,-1)):s===i})}function ev({onFilesSelected:e,accept:t,multiple:a=!1,disabled:r=!1,showFileList:s=!0,files:l,onRemove:i,className:u=""}){const{t:c}=_e.useTranslation(),d=o.useRef(null),[h,p]=o.useState(!1),[m,b]=o.useState([]),v=l??m,C=_=>{if(!_||_.length===0)return;const A=Array.from(_).filter(E=>Q2(E,t));if(A.length===0)return;const B=a?A:A.slice(0,1);if(l===void 0){const E=a?[...v,...B]:B;b(E),e?.(E)}else e?.(B)},f=_=>{_.preventDefault(),!r&&p(!0)},x=_=>{_.preventDefault(),p(!1)},g=_=>{_.preventDefault(),p(!1),!r&&C(_.dataTransfer.files)},w=_=>{const A=_.target;try{C(A.files)}finally{A.value=""}},y=()=>{r||d.current?.click()},k=_=>{if(!r&&(i?.(_),l===void 0)){const A=v.filter((B,E)=>E!==_);b(A),i||e?.(A)}};return n.jsxs("div",{className:`file-upload ${u}`.trim(),children:[n.jsxs("div",{className:Be("file-upload__dropzone",h&&"file-upload__dropzone--dragging",r&&"file-upload__dropzone--disabled"),role:"button",tabIndex:r?-1:0,"aria-disabled":r,onClick:y,onKeyDown:_=>{(_.key==="Enter"||_.key===" ")&&(_.preventDefault(),y())},onDragOver:f,onDragLeave:x,onDrop:g,children:[n.jsx(ot,{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:r,onClick:_=>{_.stopPropagation(),y()},children:c("fileUpload.browseButton","\uD30C\uC77C \uC120\uD0DD")}),n.jsx("input",{ref:d,type:"file",className:"file-upload__input",accept:t,multiple:a,disabled:r,onChange:w,tabIndex:-1})]}),s&&v.length>0&&n.jsx("ul",{className:"file-upload__list",children:v.map((_,A)=>n.jsxs("li",{className:"file-upload__list-item body-3",children:[n.jsx("span",{className:"file-upload__file-name body-3",children:_.name}),n.jsx("button",{type:"button",className:"file-upload__remove-button","aria-label":c("fileUpload.removeAriaLabel",{name:_.name}),disabled:r,onClick:()=>k(A),children:n.jsx(ot,{icon:"x",size:14})})]},`${_.name}-${A}`))})]})}function tv({items:e,className:t=""}){const{t:a}=_e.useTranslation();return n.jsx("nav",{className:`breadcrumb ${t}`.trim(),"aria-label":a("breadcrumb.ariaLabel","\uC774\uB3D9 \uACBD\uB85C"),children:n.jsx("ol",{className:"breadcrumb__list",children:e.map((r,s)=>{const l=s===e.length-1;return n.jsxs("li",{className:"breadcrumb__item",children:[l?n.jsx("span",{className:"breadcrumb__current body-3","aria-current":"page",children:r.label}):r.href?n.jsx("a",{className:"breadcrumb__link body-3",href:r.href,target:r.target,rel:r.rel??(r.target==="_blank"?"noopener noreferrer":void 0),onClick:r.onClick,children:r.label}):r.onClick?n.jsx("button",{type:"button",className:"breadcrumb__link body-3",onClick:r.onClick,children:r.label}):n.jsx("span",{className:"breadcrumb__text body-3",children:r.label}),!l&&n.jsx(ot,{icon:"chevron-right",size:14,className:"breadcrumb__separator"})]},s)})})})}const nv={small:14,medium:20,large:28};function av({value:e,onChange:t,max:a=5,readOnly:r=!1,size:s="medium",ariaLabel:l,className:i=""}){const{t:u}=_e.useTranslation(),c=r||!t,[d,h]=o.useState(null),p=c?e:Number.isFinite(e)?Math.round(e):0,m=d??p,b=nv[s],v=_=>{_!==e&&t?.(_)},C=_=>{c||v(_)},f=_=>{c||ea()||h(_)},x=o.useRef(null),g=_=>{const A=Math.min(a,Math.max(1,_));v(A),Array.from(x.current?.querySelectorAll("[data-star]")??[]).find(B=>B.dataset.star===String(A))?.focus()},w=_=>{if(!c){switch(_.key){case"ArrowRight":case"ArrowUp":g((p||0)+1);break;case"ArrowLeft":case"ArrowDown":g((p||1)-1);break;case"Home":g(1);break;case"End":g(a);break;default:return}_.preventDefault()}},y=p>=1&&p<=a?Math.round(p):1,k=()=>{c||h(null)};return n.jsx("div",{className:`rating rating--${s}${c?" rating--readOnly":""} ${i}`.trim(),ref:x,onKeyDown:w,role:c?"img":"radiogroup","aria-label":c?u("rating.valueLabel",{value:e,max:a}):l??u("rating.groupLabel","\uBCC4\uC810"),onMouseLeave:k,onPointerUp:_=>{_.pointerType==="touch"&&k()},onPointerCancel:_=>{_.pointerType==="touch"&&k()},children:Array.from({length:a},(_,A)=>{const B=A+1,E=Math.max(0,Math.min(1,m-A)),D=E>0&&E<1,N=n.jsxs("span",{className:"rating__star-wrap",children:[n.jsx(ot,{icon:"star",size:b,className:"rating__star rating__star--empty"}),E>0&&n.jsx("span",{className:`rating__star-fill${D?" rating__star-fill--half":""}`,style:D?{width:`${E*100}%`}:void 0,children:n.jsx(ot,{icon:"star",size:b,className:"rating__star rating__star--filled"})})]});return c?n.jsx("span",{className:"rating__item","aria-hidden":"true",children:N},B):n.jsx("button",{type:"button",className:"rating__item rating__item--interactive",role:"radio","aria-checked":p===B,"aria-label":u("rating.starLabel",{n:B}),"data-star":B,tabIndex:B===y?0:-1,onClick:()=>C(B),onMouseEnter:()=>f(B),children:N},B)})})}const rv=20,ov=["#499cdf","#4dcdc0","#2fae9e","#e6b94e","#d9534f","#e06b68","#bfc7d1"];function sv({value:e,onChange:t,palette:a=ov,size:r=40,className:s="",ariaLabel:l}){const{t:i}=_e.useTranslation();return n.jsx("div",{className:`color-picker ${s}`.trim(),role:"group","aria-label":l,children:a.map(u=>{const c=e?.toLowerCase()===u.toLowerCase();return n.jsx("button",{type:"button",className:`color-picker__swatch color-picker__swatch--${r}`,style:{backgroundColor:u},onClick:()=>t(u),"aria-pressed":c,"aria-label":c?`${u} ${i("colorPicker.selected","\uC120\uD0DD\uB428")}`:u,children:c&&n.jsx(ot,{icon:"check",size:rv,className:"color-picker__check"})},u)})})}function gu({icon:e,label:t,tooltip:a,wrapperStyle:r,color:s,bgColor:l,useHover:i=!0,iconSize:u="medium"}){const{t:c}=_e.useTranslation(),d=u==="small",h=Be("category-icon",d?"category-icon--small":""),p=d?16:20,m=o.useRef(null),[b,v]=o.useState(!1),C=o.useMemo(()=>{const B=r&&typeof r=="object"?{...r}:{};return!s&&!l?B:{...B,...s?{color:s,"--t-item-fg":s}:{},...l?{"--t-item-bg":l}:{}}},[r,s,l]),f=a||t,x=i&&!!f,[g,w]=o.useState(null);o.useLayoutEffect(()=>{b&&w(m.current?.getBoundingClientRect()??null)},[b]),o.useEffect(()=>{if(!i&&b)try{v(!1)}catch{}},[i,b]),o.useEffect(()=>{if(!b)return;const B=E=>{const D=m.current;if(!D)return;const N=E.target;N&&!D.contains(N)&&v(!1)};return document.addEventListener("pointerdown",B,!0),()=>document.removeEventListener("pointerdown",B,!0)},[b]);const y=o.useCallback(()=>{i&&v(!0)},[i]),k=o.useCallback(()=>{i&&v(!1)},[i]),_=o.useCallback(()=>v(!1),[]),A=o.useCallback(B=>{if(B.key==="Escape"){v(!1);return}(B.key==="Enter"||B.key===" ")&&(B.preventDefault(),v(E=>!E))},[]);return n.jsxs("span",{ref:m,className:Be("category-icon__wrap",x&&"category-icon__wrap--interactive"),onPointerEnter:y,onPointerLeave:k,onFocus:y,onBlur:k,onKeyDown:A,role:"button",tabIndex:0,"aria-label":typeof f=="string"?c("common.descriptionFor",{name:f,defaultValue:`${f} \uC124\uBA85`}):void 0,"aria-haspopup":!!f,"aria-expanded":b,"data-tooltip-ignore":!0,children:[n.jsx(ot,{icon:e,label:t,className:h,imgClassName:"category-icon__image",maskClassName:"category-icon__mask",svgClassName:"category-icon__svg",wrapperStyle:C,size:p}),b&&f&&n.jsx(Mn,{anchorRect:g,text:typeof f=="string"?f:void 0,offset:8,onClose:_,className:"category-icon__tooltip",ariaLabel:typeof f=="string"?f:void 0})]})}let Gn=null;function Ka(e){if(Gn&&Gn!==e)try{Gn()}catch{}return Gn=e,()=>{Gn===e&&(Gn=null)}}function _r(e){if(Gn===e){Gn=null;try{e()}catch{}}}function Ya(e,t){let a=()=>{};const r=new Promise(u=>{a=u});if(typeof e!="string"||e.trim()===""){At("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),a(!1);try{t?.(!1)}catch{}return{el:{},stop:()=>{},done:r}}let s=!1;const l=u=>{if(!s){s=!0;try{t?.(u)}catch{}a(u)}};let i;try{i=new Audio(e)}catch{return l(!1),{el:{},stop:()=>{},done:r}}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:r}}function lv(e,t){if(!e)return{previewCodes:[],previewBucket:null};const a=e,r=i=>i.map(u=>u?.contextCode||u?.context_code).filter(Boolean).map(String);if(t==="LISTEN_IN_NOISE"){const i=a.sentences||a.items||[],u=Array.isArray(i)&&i.length>0?r(i):[];return u.length===0&&(a.contextCode||a.context_code)&&u.push(String(a.contextCode||a.context_code)),{previewCodes:u,previewBucket:"LIN_D"}}if(t==="SHORT_STORY"){const i=a.items||a.sentences||[],u=Array.isArray(i)&&i.length>0?r(i):[];return u.length===0&&(a.contextCode||a.context_code)&&u.push(String(a.contextCode||a.context_code)),{previewCodes:u,previewBucket:"SHORT_S"}}if(t==="LONG_STORY"){const i=a.items||a.sentences||[],u=Array.isArray(i)&&i.length>0?r(i):[];return u.length===0&&(a.contextCode||a.context_code)&&u.push(String(a.contextCode||a.context_code)),{previewCodes:u,previewBucket:"LONG"}}if(t==="ORDERING_SENTENCE"){const i=a.sentences||a.items||[],u=Array.isArray(i)&&i.length>0?r(i):[];return u.length===0&&(a.contextCode||a.context_code)&&u.push(String(a.contextCode||a.context_code)),{previewCodes:u,previewBucket:"LIN_D"}}const s=a.sentences||a.items||[],l=r(Array.isArray(s)?s:[]);return l.length===0&&(a.contextCode||a.context_code)&&l.push(String(a.contextCode||a.context_code)),{previewCodes:l,previewBucket:null}}function iv(e,t){const[a,r]=o.useState(!1),[s,l]=o.useState(-1),[i,u]=o.useState({key:"",urls:[]}),c=o.useRef(null),d=o.useRef(!1),h=o.useRef(null),p=o.useRef(null),[m,b]=o.useState(!1),v=o.useRef([]),{previewCodes:C,previewBucket:f}=lv(e,t),x=`${C.join(",")}|${f??""}`,g=o.useMemo(()=>i.key===x?i.urls:[],[i,x]);o.useEffect(()=>{if(!C.length)return;let y=!1;return(async()=>{const k=[],_=[];for(const A of C)try{const B=kl(A,f);if(!B){k.push("");continue}let E=null;try{E=await Al(B)}catch{}if(!E)try{const D=await Nl(B);D&&(E=URL.createObjectURL(D),_.push(E))}catch{}k.push(E??"")}catch{k.push("")}y?_.forEach(A=>{try{URL.revokeObjectURL(A)}catch{}}):(v.current.forEach(A=>{try{URL.revokeObjectURL(A)}catch{}}),v.current=_,u({key:x,urls:k}))})(),()=>{y=!0}},[C.join(","),f]),o.useEffect(()=>()=>{v.current.forEach(y=>{try{URL.revokeObjectURL(y)}catch{}}),v.current=[]},[]);const w=o.useCallback(async y=>{if(y.stopPropagation(),y.preventDefault(),d.current){h.current&&_r(h.current),d.current=!1;try{c.current?.pause()}catch{}r(!1),l(-1);return}if(!g.filter(Boolean).length)return;let k=null;const _=()=>{d.current=!1,k?.stop()};h.current=_;const A=Ka(_);d.current=!0,r(!0);for(let B=0;B<g.length&&d.current;B++){const E=g[B];if(E&&(l(B),k=Ya(E),c.current=k.el,!await k.done))break}A(),h.current===_&&(h.current=null,d.current=!1,r(!1),l(-1))},[g]);return o.useEffect(()=>()=>{h.current&&_r(h.current),d.current=!1;try{c.current?.pause()}catch{}c.current=null},[]),{playing:a,playingIndex:s,previewUrls:g,previewHover:m,setPreviewHover:b,previewBtnRef:p,handlePreview:w}}const uv=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 a=e.sentences||e.items||e.questions||[];return Array.isArray(a)&&a.length>0?a.map(r=>{if(typeof r=="string")return r;if(r&&typeof r=="object"){const s=r;return s.sentence||s.text||s.context||s.question||s.title||""}return""}).filter(r=>typeof r=="string"&&r.trim().length>0).map(r=>r.trim()):[]};function Ro(e){const{index:t,type:a,trainingData:r,ariaLabel:s,depth:l,renderPopup:i,completed:u,completedIds:c,selectedIds:d,tooltipText:h,useDescriptionTooltip:p=!1,onRemove:m,hideCheckBadge:b=!1,showTypeLabel:v=!1,onComplete:C,onSelect:f,onMore:x,countLabelOverride:g,size:w="square"}=e||{},{t:y}=_e.useTranslation(),[k,_]=o.useState(!1),A=o.useRef(null),[B,E]=o.useState(!1);o.useEffect(()=>{A.current?.matches(":hover")&&E(!0)},[]);const{playing:D,playingIndex:N,previewUrls:$,previewHover:L,setPreviewHover:U,previewBtnRef:M,handlePreview:P}=iv(r,a?.key),T=o.useCallback(()=>{f?f():_(!0)},[f]),ee=o.useCallback(()=>_(!1),[]),te=o.useCallback(()=>E(!0),[]),I=o.useCallback(()=>E(!1),[]),Y=o.useCallback(()=>U(!0),[U]),R=o.useCallback(()=>U(!1),[U]),[q,Z]=o.useState(null);o.useLayoutEffect(()=>{L&&Z(M.current?.getBoundingClientRect()??null)},[L,M]);const[z,j]=o.useState(null);o.useLayoutEffect(()=>{B&&!k&&p&&j(A.current?.getBoundingClientRect()??null)},[B,k,p]);const F=o.useCallback(we=>{we.target===we.currentTarget&&(we.key==="Enter"||we.key===" ")&&(we.preventDefault(),T())},[T]),O=r||null,G=o.useMemo(()=>{if(!p)return null;const we=h?(Array.isArray(h)?h:[h]).filter(Boolean):null,qe=we&&we.length>0?we:uv(O);return qe&&qe.length>0?qe:null},[p,h,O]),ie=o.useCallback(we=>{we.stopPropagation(),m?.()},[m]),K=o.useCallback(we=>we.stopPropagation(),[]),pe=o.useCallback(we=>{typeof C=="function"&&C(we)},[C]),X=u||(c&&r?.id!=null?c.has(String(r.id)):!1),H=!X&&(d!=null&&r?.id!=null?d.has(String(r.id)):!1);zi("speechear.popup.close",ee);const ne=Xl(),V=`${a?.label||""} ${t+1}`,W=O?.title||O?.name||V;let oe=a?.icon,xe,be="",me="";try{const we=O?.category_0||O?.category_main_code||O?.category_main,qe=O?.category_1||O?.category_sub_code||O?.category_sub,Ye=ne.find(mt=>mt.key===we);Ye?.icon&&(oe=Ye.icon),!xe&&Ye?.color&&(xe={"--t-item-fg":Ye.color}),!xe&&O?.iconColor&&(xe={"--t-item-fg":O.iconColor}),be=Ye?y(`topic.${Ye.key}`,{defaultValue:Ye.label||""}):"";try{const mt=Ye?.subs?.find(wt=>wt.key===qe);me=mt?y(`topic.sub.${mt.key}`,{defaultValue:mt.label||""}):""}catch{}}catch{}const ke=me?`${be} / ${me}`:be||a?.label||W,Le=we=>y("training.countQuestions",{n:we,count:we}),Me=we=>y("training.countSentences",{n:we,count:we});let le="";try{if(O)if(a?.key==="LISTEN_IN_NOISE"){let we=0;Array.isArray(O.items)&&O.items.length>0?we=O.items.length:Array.isArray(O.sentences)&&O.sentences.length>0?we=O.sentences.length:O.sentences&&(we=1),le=Me(we)}else if(a?.key==="SHORT_STORY"){let we=1;Array.isArray(r?.items)?we=r.items.length:Array.isArray(r?.raw&&r.raw?.items)?we=r.raw.items.length:Array.isArray(O?.questions)?we=O.questions.length:Array.isArray(O?.sentences)&&(we=O.sentences.length),le=Le(we)}else if(a?.key==="LONG_STORY"){let we=1;if(Array.isArray(O.items)&&O.items.length>0){const qe=O.items.reduce((Ye,mt)=>{const wt=mt.questionItems;return Array.isArray(wt)?Ye+wt.length:Array.isArray(mt.questions)?Ye+mt.questions.length:Ye},0);we=qe>0?qe:O.items.length}else Array.isArray(O.questions)&&O.questions.length>0?we=O.questions.length:Array.isArray(O.sentences)&&O.sentences.length>0&&(we=O.sentences.length);le=Le(we)}else if(a?.key==="ORDERING_SENTENCE"){let we=1;Array.isArray(O.items)&&O.items.length>0?we=O.items.length:Array.isArray(O.sentences)&&O.sentences.length>0&&(we=O.sentences.length),le=Me(we)}else Array.isArray(O.items)&&(le=O.items.length>0?Le(O.items.length):"")}catch{}const ve=w==="row",$e=w==="list"||ve,Ae=w==="compact",Ie=w==="small",ze=Ie&&a?.key?Uf().find(we=>we.key===a.key):void 0,dt=ze?Jl[ze.key]:void 0,st=ze?dt?y(`trainingType.${dt}.title`,{defaultValue:ze.label}):ze.label??"":"",et=v&&a?.label&&a.label!==String(W)?String(a.label):Ie&&st&&st!==String(W)?st:"",gt=!!et,Se=g!==void 0?g:le,Ge=[et,typeof W=="string"?W:"",Se].map(we=>String(we??"").trim()).filter(Boolean).join(" ");return n.jsxs(n.Fragment,{children:[n.jsxs("div",{ref:A,className:`training-block-button${$e?" training-block-button--list":""}${ve?" training-block-button--row":""}${Ae?" training-block-button--compact":""}${Ie?" training-block-button--small":""}${X?" training-block-button--completed":""}${H?" training-block-button--selected":""}${gt&&!Ie?" training-block-button--withType":""}${Ie&&!gt?" training-block-button--no-type-label":""}`,onClick:T,onPointerEnter:te,onPointerLeave:I,role:"button",tabIndex:0,onKeyDown:F,"aria-label":typeof s=="string"?s:Ge||void 0,title:!p&&h&&(Array.isArray(h)?h.filter(Boolean).join(`
824
+ `):h)||void 0,children:[n.jsxs("div",{className:"training-block-button__left",children:[v&&a?.label&&a.label!==String(W)&&n.jsx("span",{className:"training-block-button__type-label caption-1",children:a.label}),Ie&&st&&st!==String(W)&&n.jsx("span",{className:"training-block-button__type-label caption-2",children:st}),n.jsx(gu,{icon:oe,label:W,tooltip:ke,wrapperStyle:xe,iconSize:Ie||Ae?"small":"medium"}),!b&&(X||H)&&!(m&&B)&&n.jsx(Dn,{className:m?"training-block-button__check--removable":void 0,icon:"check",position:"top-left",size:32,"aria-label":X?y("training.completed","\uD6C8\uB828 \uC644\uB8CC"):y("training.selected","\uC120\uD0DD\uB428")}),m&&n.jsx(Dn,{className:`training-block-button__remove${B?" is-hover":""}`,icon:"remove",position:"top-left",size:32,"aria-label":y("common.remove","\uC81C\uAC70"),onClick:ie}),n.jsx("div",{className:`training-block-button__title ${Ae?"body-3":Ie?"body-3b":"h3"}`,children:String(W)}),n.jsxs("div",{className:"training-block-button__description",children:[Se?n.jsx("div",{className:`training-block-button__count ${Ie?"caption-2":"caption-1"}`,children:Se}):null,n.jsx("div",{className:"training-block-button__chevron",children:n.jsx(ot,{icon:"chevron-right",label:y("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:Ie?12:20})})]}),($e&&!ve||Ie)&&$.length>0&&n.jsx("div",{ref:M,className:"training-block-button__preview","data-tooltip-ignore":!0,onClick:K,onPointerEnter:Y,onPointerLeave:R,children:n.jsx(fe,{htmlType:"button",size:Ie?28:32,type:"dot",icon:D?"pause":"play",variant:Ie?"transparent-lightGray":"default",useBorder:!1,selected:D,ariaLabel:String(W).trim()?D?y("training.stopFor",{name:W,defaultValue:`${W} \uC815\uC9C0`}):y("training.previewFor",{name:W,defaultValue:`${W} \uBBF8\uB9AC \uB4E3\uAE30`}):D?y("training.stop","\uC815\uC9C0"):y("training.preview","\uBBF8\uB9AC \uB4E3\uAE30"),onClick:P})})]}),x&&n.jsx("div",{className:"training-block-button__more","data-tooltip-ignore":!0,onClick:we=>{we.stopPropagation(),x(we)},children:n.jsx(fe,{htmlType:"button",size:40,type:"dot",icon:"more-horizontal",variant:"transparent-lightGray",useBorder:!1,ariaLabel:String(W).trim()?y("common.moreFor",{name:W}):y("common.more","\uB354\uBCF4\uAE30")})})]}),L&&n.jsx(Mn,{anchorRect:q,text:D?y("training.stop","\uC815\uC9C0"):y("training.preview","\uBBF8\uB9AC \uB4E3\uAE30"),offset:8,onClose:R}),B&&!k&&p&&(G?n.jsx(qn,{anchorRect:z,items:G,activeIndex:N,onClose:I}):O?.subTitle?n.jsx(Mn,{anchorRect:z,text:O.subTitle,offset:8,onClose:I}):null),k&&i&&i({trainingData:O,typeKey:a?.key??"",onClose:ee,onComplete:pe,popupTitle:String(W),popupSubTitle:a?.subTitle,depth:l!=null?String(l):void 0,popupIcon:oe,popupIconTooltip:String(ke),popupWrapperStyle:xe})]})}const yu=200;function cv(e){return e.itemId?(Xf()[e.trainingType]??[]).find(t=>t?.id!=null&&String(t.id)===String(e.itemId))??null:null}function vu({plan:e,groups:t,anchorRect:a,offset:r=12,onClose:s}){const{t:l}=_e.useTranslation(),i=o.useMemo(()=>t?t.map((c,d)=>({key:c.key??c.type?.key??String(d),label:c.label,type:c.type,data:c.items??[]})).filter(c=>c.data.length>0):Qf(l).map(c=>{const d=(e?.items??[]).filter(h=>h.trainingType===c.key);return{key:c.key,label:c.label,type:c,pickedCount:d.length,data:d.map(cv).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:se("training-tooltip__box"),children:n.jsx("div",{className:se("training-tooltip__groups"),children:i.flatMap(({key:c,label:d,type:h,data:p},m)=>[m>0?n.jsx("div",{className:se("training-tooltip__divider")},`div-${c}`):null,n.jsxs("div",{className:se("training-tooltip__section"),children:[n.jsx("div",{className:se("training-tooltip__section-header"),children:n.jsx("span",{className:se("training-tooltip__type-label body-3b"),children:d})}),n.jsx("div",{className:se("training-tooltip__items"),children:p.map((b,v)=>n.jsx(Ro,{index:v,type:h,trainingData:b,size:"compact",hideCheckBadge:!0},String(b.id??v)))})]},c)])})});return a?n.jsx(Bn,{anchorRect:a,offset:r,onClose:s,closeOnOutsideClick:!1,className:se("training-tooltip"),ariaLabel:l("tooltip.training","\uD6C8\uB828 \uC548\uB0B4"),children:u}):u}const dv=200;function pv({icon:e,count:t,title:a,plan:r,tooltip:s=!0,hoverAccent:l=!1,className:i="",onClick:u,onMouseEnter:c,onMouseLeave:d}){const h=!!u||!!c||s&&!!r,p=Be("count-tile",h&&"count-tile--interactive",h&&l&&"count-tile--accent",u&&"count-tile--clickable",i),m=o.useRef(null),[b,v]=o.useState(null),C=o.useRef(null),f=o.useRef(null),x=!!(b&&r&&s),g=o.useCallback(()=>{C.current&&(clearTimeout(C.current),C.current=null),f.current&&(clearTimeout(f.current),f.current=null)},[]),w=o.useCallback(()=>{g(),v(null)},[g]),y=o.useCallback(()=>{!s||!r||(g(),C.current=setTimeout(()=>{C.current=null,v(m.current?.getBoundingClientRect()??null)},yu))},[s,r,g]),k=o.useCallback(()=>{C.current&&(clearTimeout(C.current),C.current=null),!f.current&&(f.current=setTimeout(()=>{f.current=null,v(null)},dv))},[]);return o.useEffect(()=>()=>{g()},[g]),o.useEffect(()=>{(!s||!r)&&w()},[s,r,w]),o.useEffect(()=>{if(!x)return;const _=B=>B instanceof Element&&(m.current?.contains(B)||!!B.closest(".training-tooltip")),A=B=>{_(B.target)?g():k()};return document.addEventListener("pointerover",A,!0),()=>document.removeEventListener("pointerover",A,!0)},[x,g,k]),n.jsxs(n.Fragment,{children:[n.jsxs("div",{ref:m,className:p,onClick:u?_=>{w(),u(_)}:void 0,onKeyDown:u?_=>{_.key!=="Enter"&&_.key!==" "||(_.preventDefault(),_.currentTarget.click())}:void 0,onPointerEnter:_=>{_.pointerType==="touch"||_.pointerType==="pen"?w():y()},onMouseEnter:c,onMouseLeave:_=>{k(),d?.(_)},role:u?"button":"img",tabIndex:u?0:void 0,"aria-label":`${a} ${t}`,children:[n.jsx(ot,{icon:e,size:20,className:"count-tile__icon"}),n.jsx("span",{className:"count-tile__count h5","aria-hidden":"true",children:t})]}),b&&r&&n.jsx(vu,{plan:r,anchorRect:b,onClose:w})]})}let Za=0,_u="",Po="",Xa=0;function xu(){return wu(!1)}function hv(){return wu(!0)}function wu(e){const t=typeof document<"u";Za===0&&t&&(_u=document.body.style.overflow,document.body.style.overflow="hidden"),e&&t&&(Xa===0&&(Po=document.body.style.paddingRight),Xa++,document.body.style.paddingRight="0px"),Za++;let a=!1;return()=>{a||(a=!0,Za=Math.max(0,Za-1),e&&t&&(Xa=Math.max(0,Xa-1),Xa===0&&(Po?document.body.style.paddingRight=Po:document.body.style.removeProperty("padding-right"))),Za===0&&t&&(document.body.style.overflow=_u))}}function mv(){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 Cv({open:e,onClose:t,ariaLabel:a,title:r,children:s,size:l="md",closeOnBackdrop:i=!0,closeOnEscape:u=!0,showClose:c=!0,className:d,contentClassName:h}){const{t:p}=_e.useTranslation(),m=o.useId(),b=o.useRef(null),v=o.useCallback(()=>t(),[t]);o.useEffect(()=>{if(!e)return;const g=document.activeElement,w=xu(),y=b.current;return yo(y,g),y?.focus(),()=>{w();const k=document.activeElement;(!k||k===document.body||y&&y.contains(k))&&vo(g)?.focus?.()}},[e]);const C=o.useRef(v),f=o.useRef(u);o.useEffect(()=>{C.current=v,f.current=u}),o.useEffect(()=>{if(e)return Qn(()=>{f.current&&C.current()})},[e]);const x=o.useRef(!1);return bo(b,e),!e||typeof document>"u"?null:hn.createPortal(n.jsx("div",{className:Be("dialog",d),onPointerDown:i?g=>{x.current=g.target===g.currentTarget}:void 0,onMouseDown:g=>{g.target===g.currentTarget&&g.preventDefault()},onClick:i?g=>{const w=x.current;x.current=!1,w&&g.target===g.currentTarget&&v()}:void 0,children:n.jsxs("div",{ref:b,role:"dialog","aria-modal":"true","aria-label":r?void 0:a,"aria-labelledby":r?m:void 0,tabIndex:-1,className:Be("dialog__surface",`dialog__surface--${l}`,h),onClick:g=>g.stopPropagation(),children:[r?n.jsx("div",{className:"dialog__header",children:n.jsx("h2",{id:m,className:"dialog__title h4b",children:r})}):null,c?n.jsx("button",{type:"button",className:"dialog__close","aria-label":p("common.close","\uB2EB\uAE30"),onClick:v,children:n.jsx(mv,{})}):null,n.jsx("div",{className:"dialog__body",children:s})]})}),document.body)}function fv({columns:e,rows:t,rowKey:a,title:r,toolbar:s,empty:l,loading:i,caption:u,className:c=""}){const{t:d}=_e.useTranslation(),h=!i&&t.length===0;return n.jsxs("div",{className:Be("board",c),children:[r||s?n.jsxs("div",{className:"board__head",children:[r?n.jsx("h2",{className:"board__title",children:r}):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(p=>n.jsx("th",{scope:"col",className:Be("board__th",`board__cell--${p.headerAlign??p.align??"left"}`),style:p.width?{width:p.width}:void 0,children:p.header},p.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??d("board.empty","\uB4F1\uB85D\uB41C \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.")})}):t.map((p,m)=>n.jsx("tr",{className:"board__row",children:e.map(b=>n.jsx("td",{className:Be("board__td",`board__cell--${b.align??"left"}`),children:b.render(p,m)},b.key))},a(p,m)))})]})]})}function bv({name:e,role:t,photo:a,media:r,credentials:s,size:l=190,className:i=""}){return n.jsxs("div",{className:Be("person-card",i),children:[n.jsx("div",{className:"person-card__photo",style:{width:l,height:l},children:r??(a?n.jsx("img",{src:a,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 gv({groups:e,className:t=""}){return n.jsx("div",{className:Be("timeline",t),children:e.map(a=>n.jsxs("section",{className:"timeline__group",children:[n.jsx("h3",{className:"timeline__title",children:a.title}),n.jsx("ul",{className:"timeline__rows",children:a.entries.map((r,s)=>n.jsxs("li",{className:"timeline__row",children:[r.label?n.jsx("span",{className:"timeline__label",children:r.label}):null,n.jsx("div",{className:"timeline__items",children:r.items.map((l,i)=>n.jsx("p",{children:l},i))})]},`${r.label??""}-${s}`))})]},a.title))})}function yv({title:e,kind:t,body:a,badge:r,badgeSrc:s,footer:l,width:i,className:u=""}){const c=r??(s?n.jsx("img",{src:s,alt:""}):null);return n.jsxs("div",{className:Be("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:a}),l?n.jsx("div",{className:"publication-card__footer",children:l}):null]})}function vv({logo:e,alt:t,onDone:a,durationMs:r=3e3}){const s=Ia(a);return o.useEffect(()=>{const l=setTimeout(()=>s.current?.(),r);return()=>clearTimeout(l)},[r,s]),n.jsx("div",{className:"splash-logo",style:{"--splash-logo-duration":`${r}ms`},"aria-hidden":"true",children:n.jsx("img",{src:e,alt:t,className:"splash-logo__image"})})}function _v({eyebrow:e,eyebrowIndex:t,title:a,description:r,level:s=2,tone:l="dark",className:i=""}){const u=s===1?"h1":"h2";return n.jsxs("div",{className:Be("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,a?n.jsx(u,{className:"section-header__title",children:a}):null,r?n.jsx("div",{className:"section-header__description",children:r}):null]})}function xv({items:e,className:t=""}){return n.jsx("ul",{className:Be("company-meta",t),children:e.map((a,r)=>n.jsxs("li",{className:"company-meta__item",children:[r>0?n.jsx("span",{"aria-hidden":!0,className:"company-meta__divider",children:"|"}):null,a]},a))})}const Ja=new Map;function vn(e){const{t}=_e.useTranslation(),{options:a=[],value:r=a.find(y=>!y.disabled)?.key??a[0]?.key,onChange:s=y=>{},className:l="",size:i=40,shape:u="pill",useBG:c=!0,fullWidth:d=!1,minButtonWidth:h,ariaLabel:p}=e||{},m=o.useRef(null),b=a.filter(y=>!y.disabled),v=o.useId(),C=a.map(y=>y.key).join("\xB7");o.useEffect(()=>{if(!(!zn||p!=null&&p!=="")){if(Ja.set(v,C||"(\uBCF4\uAE30 \uC5C6\uC74C)"),Ja.size>1){const y=[...Ja.values()].sort();At(`segmented-control-unnamed:${y.join("|")}`,`[ihab/SegmentedControl] \uC774\uB984 \uC5C6\uB294 \uB77C\uB514\uC624\uADF8\uB8F9\uC774 \uD55C \uD654\uBA74\uC5D0 ${Ja.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): ${y.join(" / ")}`)}return()=>{Ja.delete(v)}}},[p,C,v]);const f=y=>{if(!b.length)return;const k=Math.max(0,b.findIndex(A=>A.key===r)),_=y==="first"?b[0]:y==="last"?b[b.length-1]:b[(k+y+b.length)%b.length];_&&(s(_.key),Array.from(m.current?.querySelectorAll("[data-segkey]")??[]).find(A=>A.dataset.segkey===_.key)?.focus())},x=y=>{switch(y.key){case"ArrowRight":case"ArrowDown":f(1);break;case"ArrowLeft":case"ArrowUp":f(-1);break;case"Home":f("first");break;case"End":f("last");break;default:return}y.preventDefault()},g=y=>{const k=_=>typeof _=="string"||typeof _=="number";if(!(!k(y.label)||y.count==null||y.count===!1||!k(y.count)))return`${y.label}, ${y.count}`},w=b.some(y=>y.key===r)?r:b[0]?.key;return n.jsx("div",{ref:m,onKeyDown:x,className:Be("segmented-control",`segmented-control--${u}`,`segmented-control--${i}`,d&&"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":p??t("segmentedControl.ariaLabel","\uC120\uD0DD \uD0ED"),children:a.map(y=>n.jsx(fe,{htmlType:"button",role:"radio","aria-checked":y.key===r,"data-segkey":y.key,tabIndex:y.key===w?0:-1,label:y.label,count:y.count,ariaLabel:g(y),disabled:y.disabled,className:y.key===r?"is-selected":"",onClick:()=>{y.disabled||s(y.key)},size:i,shape:u,useBorder:!1,useBG:!1},y.key))})}const wv=260;function Pn(e){const{t}=_e.useTranslation(),{title:a,subtitle:r,headerActions:s,headerSegment:l,children:i,buttons:u,footer:c,footerStart:d,footerEnd:h,footerNote:p,footerNoteDivider:m=!1,footerClassName:b="",footerLayout:v="center",onClose:C,closeDisabled:f=!1,beforeClose:x,closeOnBackdrop:g=!0,className:w="",ariaLabel:y,useTitle:k=!0,inline:_=!1,size:A,layer:B="modal",height:E,fillBody:D=!1,resetScrollKey:N}=e||{},[$,L]=o.useState(!1),U=o.useRef(!1),M=o.useRef(null),P=o.useId(),T=o.useRef(null);o.useEffect(()=>{},[_,a,y,w]),o.useEffect(()=>{N!==void 0&&T.current&&(T.current.scrollTop=0)},[N]);const[ee,te]=o.useState(!1);o.useEffect(()=>{const H=T.current;if(!H)return;const ne=()=>te(H.scrollHeight>H.clientHeight+1);if(ne(),typeof ResizeObserver>"u")return;const V=new ResizeObserver(ne);V.observe(H);const W=H.firstElementChild;return W&&V.observe(W),()=>V.disconnect()},[i,N]),o.useEffect(()=>{if(!_)return xu()},[_]);const I=o.useRef(typeof document>"u"?null:document.activeElement);o.useEffect(()=>{if(_)return;const H=I.current,ne=M.current;return yo(ne,H),ne&&!ne.contains(document.activeElement)&&(ne.querySelector(En)??ne).focus(),()=>{const V=document.activeElement;(!V||V===document.body||ne&&ne.contains(V))&&vo(H)?.focus?.()}},[_]),bo(M,!_);const Y=o.useRef(!0),R=_o(),q=o.useRef(null);o.useEffect(()=>(Y.current=!0,()=>{Y.current=!1,q.current&&(clearTimeout(q.current),q.current=null)}),[]);const Z=o.useCallback(()=>{!Y.current||!U.current||(U.current=!1,L(!1))},[]),z=o.useCallback((H,ne=!1)=>{if(ne&&!Y.current||U.current)return;U.current=!0,L(!0);const V=setTimeout(()=>{q.current===V&&(q.current=null);let W;try{W=H?H():void 0}catch{Z();return}W&&typeof W.then=="function"&&W.then(()=>{setTimeout(Z,120)},Z)},R?0:wv);ne&&(q.current=V)},[Z,R]),j=o.useCallback(()=>{f||x&&x()===!1||z(C,!0)},[z,C,f,x]),F=o.useRef(j);o.useEffect(()=>{F.current=j});const O=!_&&!!C;o.useEffect(()=>{if(O)return Qn(()=>F.current())},[O]);const G=O&&g,ie=o.useRef(!1),K=H=>{ie.current=H.target===H.currentTarget},pe=H=>{const ne=ie.current;ie.current=!1,ne&&H.target===H.currentTarget&&j()},X=n.jsx("div",{className:`popup ${_?"popup--inline":""} ${B==="belowPagePopup"?"popup--below-page-popup":""} ${$?"popup--closing":""} ${w}`,onPointerDown:G?K:void 0,onClick:G?pe:void 0,onMouseDown:_?void 0:H=>{H.target===H.currentTarget&&H.preventDefault()},children:n.jsxs("div",{ref:M,className:`popup-panel${A?` popup-panel--${A}`:""}${E!=null?" popup-panel--has-height":""}${D?" popup-panel--fill-body":""}`,style:E!=null?{"--popup-height":typeof E=="number"?`${E}px`:E}:void 0,tabIndex:-1,role:_?void 0:"dialog","aria-modal":_?void 0:!0,"aria-labelledby":!_&&k&&a?P:void 0,"aria-label":!_&&!(k&&a)?y??(typeof a=="string"?a:void 0):void 0,children:[!k&&(s||C)?n.jsxs("div",{className:"popup-close-float",children:[s,C&&n.jsx(fe,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,onClick:j,disabled:f,ariaLabel:t("common.close","\uB2EB\uAE30")})]}):a||s||C?n.jsxs("div",{className:`popup-header${r?" popup-header--with-subtitle":""}`,children:[n.jsxs("div",{className:"popup-header-main",children:[a?n.jsx("h2",{id:P,className:"popup-title popup-title--left h2",children:a}):n.jsx("span",{id:P,className:"popup-title popup-title--left h2"}),r&&n.jsx("span",{className:"popup-subtitle body-3",children:r})]}),n.jsxs("div",{className:"popup-header-aside",children:[l&&n.jsx("div",{className:"popup-header-segment",children:n.jsx(vn,{size:40,ariaLabel:l.ariaLabel,options:l.options.map(H=>({key:H.key,label:H.label,disabled:H.disabled})),value:l.value,onChange:l.onChange})}),n.jsxs("div",{className:"popup-header-actions",children:[s,C&&n.jsx(fe,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,onClick:j,disabled:f,ariaLabel:t("common.close","\uB2EB\uAE30")})]})]})]}):null,n.jsx("div",{className:"popup-content",ref:T,tabIndex:ee?0:void 0,children:n.jsx("div",{className:"popup-content__inner",children:typeof i=="function"?i({animateThen:z,closeWithAnimation:j}):i})}),p!=null&&p!==!1&&n.jsx("div",{className:`popup-footer-note caption-1${m?" popup-footer-note--divider":""}`,role:"note",children:p}),d||h?n.jsxs("div",{className:`popup-footer popup-footer--bar${b?` ${b}`:""}`,children:[n.jsx("div",{className:"popup-footer__start",children:typeof d=="function"?d({animateThen:z,closeWithAnimation:j}):d}),n.jsx("div",{className:"popup-footer__end",children:typeof h=="function"?h({animateThen:z,closeWithAnimation:j}):h})]}):u?.length?n.jsx("div",{className:`popup-footer popup-footer--buttons${v!=="center"?` popup-footer--${v}`:""}`,children:u.map((H,ne)=>n.jsx(fe,{htmlType:"button",size:48,variant:H.variant??"default",label:H.label,disabled:H.disabled,onClick:()=>H.onClick?.({animateThen:z,closeWithAnimation:j})},ne))}):c?n.jsx("div",{className:`popup-footer${v!=="center"?` popup-footer--${v}`:""}${b?` ${b}`:""}`,children:typeof c=="function"?c({animateThen:z,closeWithAnimation:j}):c}):null]})});return _||typeof document>"u"?X:hn.createPortal(X,document.body)}function Bu({checked:e,onChange:t,disabled:a=!1,label:r,ariaLabel:s,labelPosition:l="right",className:i="",id:u}){const c=r&&n.jsx("span",{className:"toggle__label body-3",children:r});return n.jsxs("label",{className:`toggle${a?" toggle--disabled":""} ${i}`.trim(),children:[l==="left"&&c,n.jsx("input",{id:u,type:"checkbox",role:"switch",checked:e,disabled:a,onChange:d=>t?.(d.target.checked),"aria-label":!r&&s?s:void 0}),n.jsx("span",{className:"toggle__slider"}),l==="right"&&c]})}const Ft=40;function _n({options:e,value:t,onChange:a,placeholder:r,disabled:s=!1,block:l=!1,size:i=Ft,error:u=!1,className:c="",ariaLabel:d,ariaDescribedBy:h}){const{t:p}=_e.useTranslation(),m=r??p("dropdown.placeholder","\uC120\uD0DD"),b=o.useId(),v=o.useId(),C=o.useRef(null),f=o.useCallback((M,P)=>{const T=window.innerHeight-M.bottom<260&&M.top>260;return{position:"fixed",left:M.left,minWidth:M.width,...T?{bottom:window.innerHeight-M.top+6}:{top:M.bottom+6},zIndex:Wa(P)}},[]),{open:x,setOpen:g,toggle:w,style:y,triggerRef:k,menuRef:_}=Ha({computeStyle:f}),[A,B]=o.useState(-1),E=o.useCallback(()=>B(-1),[]),D=e.find(M=>M.value===t);o.useEffect(()=>{if(x){const M=e.findIndex(P=>P.value===t);B(M>=0?M:e.length?0:-1),requestAnimationFrame(()=>{const P=_.current;if(!P)return;const T=P.querySelectorAll(".dropdown__option")[M];T&&(P.scrollTop=Math.max(0,T.offsetTop-P.clientHeight/2+T.clientHeight/2))})}},[x]),o.useEffect(()=>{x&&B(M=>{if(M>=0&&M<e.length)return M;const P=e.findIndex(T=>T.value===t);return P>=0?P:e.length?0:-1})},[x,e.length]);const N=o.useCallback(()=>{s||w()},[s,w]),$=o.useCallback(M=>{M.disabled||s||(M.value!==t&&a?.(M.value),g(!1))},[a,g,s,t]);o.useEffect(()=>{s&&g(!1)},[s,g]);const L=o.useCallback(M=>{if(!s){if(!x){(M.key==="Enter"||M.key===" "||M.key==="ArrowDown")&&(M.preventDefault(),g(!0));return}if(M.key==="Escape"){M.preventDefault(),g(!1);return}M.key==="ArrowDown"?(M.preventDefault(),B(P=>{let T=P+1;for(;T<e.length&&e[T].disabled;)T++;return T<e.length?T:P})):M.key==="ArrowUp"?(M.preventDefault(),B(P=>{let T=P-1;for(;T>=0&&e[T].disabled;)T--;return T>=0?T:P})):(M.key==="Enter"||M.key===" ")&&(M.preventDefault(),e[A]?$(e[A]):g(!1))}},[s,x,e,A,$,g]),U=x?n.jsx("div",{ref:_,id:b,className:"dropdown__menu","data-tooltip-ignore":!0,role:"listbox",style:y,onMouseLeave:E,onMouseDown:M=>M.preventDefault(),children:e.map((M,P)=>n.jsxs("button",{id:`${b}-option-${P}`,type:"button",role:"option","aria-selected":M.value===t,className:Be("dropdown__option body-2",M.value===t?"dropdown__option--active":"",P===A?"dropdown__option--active":"",M.disabled?"dropdown__option--disabled":""),onMouseDown:T=>T.preventDefault(),onClick:()=>$(M),onMouseEnter:()=>B(P),disabled:M.disabled,children:[n.jsx("span",{className:"dropdown__option-check",children:M.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"})})}),M.label]},M.value))}):null;return n.jsxs("div",{ref:C,className:Be("dropdown",`dropdown--s${i}`,x?"dropdown--open":"",l?"dropdown--block":"",u?"dropdown--error":"",c),onKeyDown:L,children:[n.jsxs("button",{ref:k,type:"button",className:"dropdown__trigger",role:"combobox","aria-haspopup":"listbox","aria-expanded":x,"aria-controls":x?b:void 0,"aria-activedescendant":x&&A>=0?`${b}-option-${A}`:void 0,"aria-label":d,"aria-describedby":[d&&D?v:"",h??""].filter(Boolean).join(" ")||void 0,"aria-invalid":u||void 0,disabled:s,onClick:N,onBlur:M=>{x&&!_.current?.contains(M.relatedTarget)&&g(!1)},children:[n.jsx("span",{id:v,className:`dropdown__trigger-label body-2${D?"":" dropdown__trigger-label--placeholder"}`,children:D?D.label:m}),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"&&hn.createPortal(U,C.current?.closest(".ihabdevteam-core-scope")??document.body)]})}const Bv={hearingAid:"hearingAid",cochlearImplant:"cochlearImplant",other:"other",\uBCF4\uCCAD\uAE30:"hearingAid",\uC778\uACF5\uC640\uC6B0:"cochlearImplant",\uAE30\uD0C0:"other"};function ku(e){return e?Bv[e]??null:null}function Au(e){switch(ku(e)){case"hearingAid":return"main";case"cochlearImplant":return"sub";default:return"default"}}function Nu(e,t){const a=ku(e);return a?t(`device.type.${a}`,{defaultValue:e??""}):e??""}const ga=e=>e==null?"":String(e).trim();function Fo(e,t,a,r){const s=ga(e),l=ga(t),i=ga(a);if(r&&s&&l&&i){const c=`${s.padStart(4,"0")}-${l.padStart(2,"0")}-${i.padStart(2,"0")}`,d=new Date(c);if(!Number.isNaN(d.getTime())&&d.toISOString().slice(0,10)===c){const h=ql(c,r);if(h)return h}}const u=[s,l,i];for(;u.length>0&&u[u.length-1]==="";)u.pop();return u.join(".")}function kv(e,t,a){const r=ga(e);return r?`${r}-${ga(t).padStart(2,"0")}-${ga(a).padStart(2,"0")}`:""}function Eu(e){return typeof e=="string"?e:e.label}function Du({value:e,onChange:t,suggestions:a,openOnFocus:r=!1,filterSuggestions:s,onSelectSuggestion:l,autoActiveFirst:i=!1}){const u=o.useId(),[c,d]=o.useState(!1),[h,p]=o.useState(-1),m=o.useRef(null),b=o.useMemo(()=>{if(!a.length)return[];const N=e??"";return s===!1?a:N?typeof s=="function"?s(a,N):a.filter($=>Eu($).toLowerCase().includes(N.toLowerCase())):r?a:[]},[a,e,r,s]),[v,C]=o.useState(!1),f=o.useRef([]),x=v&&b.length===0?f.current:b;o.useEffect(()=>{x.length&&(f.current=x)},[x]);const g=o.useCallback(()=>C(!0),[]),w=o.useCallback(()=>C(!1),[]),y=i?0:-1;o.useEffect(()=>{c||p(y)},[c,y]),o.useEffect(()=>()=>{m.current&&clearTimeout(m.current)},[]);const k=h<x.length?h:y<x.length?y:-1,_=o.useCallback(N=>{l?l(N):t?.(Eu(N)),d(!1)},[t,l]),A=o.useCallback(()=>d(!0),[]),B=o.useCallback(()=>{d(!0),p(y)},[y]),E=o.useCallback(()=>{m.current=setTimeout(()=>d(!1),120)},[]),D=o.useCallback(N=>{N.nativeEvent.isComposing||N.keyCode===229||(N.key==="ArrowDown"?(N.preventDefault(),d(!0),p($=>Math.min(x.length-1,($<x.length?$:y)+1))):N.key==="ArrowUp"?(N.preventDefault(),p($=>Math.max(y,($<x.length?$:x.length)-1))):N.key==="Enter"?k>=0&&_(x[k]):N.key==="Escape"&&c&&(N.preventDefault(),d(!1)))},[x,k,c,_,y]);return{listId:u,open:c,activeIdx:k,filtered:x,handleFocus:A,handleBlur:E,handleInput:B,handleKeyDown:D,handleSelect:_,handleCompositionStart:g,handleCompositionEnd:w}}const Io=typeof window<"u"?o.useLayoutEffect:o.useEffect;function Kn(e){const{value:t,defaultValue:a,name:r,inputRef:s,onChange:l,label:i,ariaLabel:u,ariaDescribedBy:c,required:d,placeholder:h,ghostText:p,ghostHint:m,type:b="text",disabled:v=!1,readOnly:C=!1,error:f,helperText:x,maxLength:g,size:w=40,variant:y="input",fullWidth:k=!1,newline:_=!1,multiline:A=!1,rows:B=3,leftIcon:E,rightIcon:D,clearable:N=!1,list:$,showCount:L=!0,className:U="",onFocus:M,onBlur:P,onKeyDown:T,onEnter:ee,inputMode:te,autoComplete:I,autoFocus:Y,suggestions:R,filterSuggestions:q,onSelectSuggestion:Z,autoActiveFirst:z,openOnFocus:j=!1}=e,F=C||v?void 0:R,{t:O}=_e.useTranslation(),G=o.useId();!i&&!u&&At(`TextField:unnamed:${G}`,"[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 ie=`tf-${G}`,K=`tf-helper-${G}`,pe=o.useRef(null),X=Du({value:t??"",onChange:l,suggestions:F??[],openOnFocus:j,filterSuggestions:q,onSelectSuggestion:Z,autoActiveFirst:z}),H=!!F&&X.open&&X.filtered.length>0,ne=o.useRef(null),[V,W]=o.useState(null),oe=o.useCallback(()=>{const Se=ne.current;if(!Se||typeof window>"u")return;const Ge=Se.getBoundingClientRect(),we=230,qe=window.innerHeight-Ge.bottom<we+8&&Ge.top>we+8;W({position:"fixed",left:Ge.left,width:Ge.width,...qe?{bottom:window.innerHeight-Ge.top+8}:{top:Ge.bottom+8},zIndex:Wa(Se)})},[]);Io(()=>{if(!H)return;oe();let Se=null;const Ge=()=>{if(typeof requestAnimationFrame>"u"){oe();return}Se===null&&(Se=requestAnimationFrame(()=>{Se=null,oe()}))},we=qe=>{const Ye=qe.target;Ye&&Ye.nodeType===1&&Ye.closest?.(".text-field__suggestions")||Ge()};return window.addEventListener("scroll",we,!0),window.addEventListener("resize",Ge),()=>{Se!==null&&cancelAnimationFrame(Se),window.removeEventListener("scroll",we,!0),window.removeEventListener("resize",Ge)}},[H,oe]);const xe=o.useCallback(Se=>{pe.current=Se,typeof s=="function"?s(Se):s&&(s.current=Se)},[s]),be=p?`${p}${m??O("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)")}`:h,me=t!==void 0,ke=me&&b==="password",[Le,Me]=o.useState((a??"").length),le=me?(t??"").length:Le,ve=o.useRef(t);Io(()=>{ve.current=t}),o.useEffect(()=>{const Se=pe.current;if(!ke||!Se)return;const Ge=t??"";Se.value!==Ge&&(Se.value=Ge)},[ke,t]),o.useEffect(()=>{if(!_||!pe.current)return;const Se=pe.current;Se.style.height="",Se.scrollHeight>Se.clientHeight&&(Se.style.height=`${Se.scrollHeight}px`)},[t,Le,_]);const $e=g!=null&&le>g,Ae=w===32?16:20,Ie=Be("text-field",`text-field--s${w}`,y==="display"?"text-field--display":"",k?"text-field--full-width":"",v?"text-field--disabled":"",C?"text-field--readonly":"",f?"text-field--error":"",E?"text-field--has-left-icon":"",D||N?"text-field--has-right-icon":"",U),ze={id:ie,...ke?{}:me?{value:t}:{defaultValue:a},ref:xe,placeholder:be,name:r,disabled:v,readOnly:C,autoFocus:Y,maxLength:g,list:$,inputMode:te,autoComplete:I,"aria-label":!i&&u?u:void 0,"aria-required":d,"aria-invalid":!!f,"aria-describedby":[x||f?K:null,c].filter(Boolean).join(" ")||void 0,role:F?"combobox":void 0,"aria-autocomplete":F?"list":void 0,"aria-haspopup":F?"listbox":void 0,"aria-expanded":F?H:void 0,"aria-controls":H?X.listId:void 0,"aria-activedescendant":H&&X.activeIdx>=0?`${X.listId}-option-${X.activeIdx}`:void 0,onChange:Se=>{const Ge=Se.target;me||Me(Ge.value.length),l?.(Ge.value),F&&X.handleInput(),ke&&queueMicrotask(()=>{const we=ve.current??"";Ge.value!==we&&(Ge.value=we)})},onCompositionStart:F?X.handleCompositionStart:void 0,onCompositionEnd:F?X.handleCompositionEnd:void 0,onFocus:(Se=>{M?.(Se),F&&X.handleFocus()}),onBlur:(Se=>{P?.(Se),F&&X.handleBlur()}),onKeyDown:(Se=>{const Ge=(Se.key==="Tab"&&!Se.shiftKey||Se.key===" ")&&!Se.nativeEvent.isComposing;if(p&&Ge&&!C&&!v&&!(Se.currentTarget.value??"").trim()){Se.preventDefault();const we=Se.currentTarget;me||(we.value=p,Me(p.length)),l?.(p);return}F&&Se.key==="Enter"&&!Se.nativeEvent.isComposing&&X.activeIdx>=0?Se.preventDefault():ee&&Se.key==="Enter"&&!Se.nativeEvent.isComposing&&(Se.preventDefault(),ee()),T?.(Se),F&&X.handleKeyDown(Se)})},dt=N&&!v&&!C&&le>0,st=()=>_?n.jsx("textarea",{...ze,className:"text-field__input text-field__input--auto body-2",rows:1}):A?n.jsx("textarea",{...ze,className:"text-field__input text-field__input--textarea body-2",rows:B}):n.jsx("input",{...ze,type:b,className:"text-field__input body-2"}),et=y==="display"&&!_&&!A&&!!be,gt=()=>n.jsxs(n.Fragment,{children:[st(),et&&n.jsx("span",{className:"text-field__placeholder","aria-hidden":"true",children:be})]});return n.jsxs("div",{ref:ne,className:Ie,children:[i&&n.jsxs("label",{htmlFor:ie,className:"text-field__label caption-1",children:[i,d&&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(ot,{icon:E,label:"",className:"",svgClassName:"text-field__icon-svg",size:Ae})}),gt(),g!=null&&L&&n.jsxs("span",{className:`text-field__count caption-2${$e?" text-field__count--over":""}`,children:[le,"/",g]}),dt&&n.jsx(fe,{size:24,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,className:"text-field__clear",ariaLabel:O("textField.clearAriaLabel","\uC785\uB825\uAC12 \uC9C0\uC6B0\uAE30"),htmlType:"button",onMouseDown:Se=>{Se.preventDefault()},onClick:()=>{!me&&pe.current&&(pe.current.value="",Me(0)),l?.("")},tabIndex:-1}),D&&!dt&&n.jsx("span",{className:"text-field__icon text-field__icon--right",children:n.jsx(ot,{icon:D,label:"",className:"",svgClassName:"text-field__icon-svg",size:Ae})})]}),!!F&&n.jsx("span",{className:"text-field__status",role:"status","aria-live":"polite",children:X.open&&(t??"").length>0&&X.filtered.length===0?O("common.noMatches","\uB9DE\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"):""}),H&&(typeof document>"u"?null:hn.createPortal(n.jsx("ul",{id:X.listId,className:"text-field__suggestions",role:"listbox",style:V??{position:"fixed",visibility:"hidden"},"data-tooltip-ignore":!0,children:X.filtered.map((Se,Ge)=>n.jsx("li",{id:`${X.listId}-option-${Ge}`,role:"option","aria-selected":Ge===X.activeIdx,className:`text-field__suggestion body-2${Ge===X.activeIdx?" is-active":""}`,onMouseDown:we=>we.preventDefault(),onClick:()=>{X.handleSelect(Se),pe.current?.focus()},children:typeof Se=="string"?Se:n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-field__suggestion-label",children:Se.label}),Se.hint&&n.jsx("span",{className:"text-field__suggestion-hint caption-1",children:Se.hint})]})},typeof Se=="string"?`${Se}-${Ge}`:Se.id))}),document.body)),(x||f)&&n.jsx("div",{className:"text-field__footer",children:n.jsx("span",{id:K,className:"text-field__helper caption-1",role:f?"alert":void 0,children:f||x})})]})}const Su=()=>{};function un(e){const t=o.useId();if(!("variant"in e)){const{label:g,sub:w,onClick:y,children:k,align:_="horizontal",icon:A,useFullWidth:B=!1}=e,E=D=>{y&&D.target===D.currentTarget&&(D.key==="Enter"||D.key===" ")&&(D.preventDefault(),y())};return n.jsxs("div",{className:Be("panel-row",_==="vertical"?"panel-row--vertical":"",B?"panel-row--label-fixed panel-row--fill":"",y?"panel-row--clickable":""),onClick:y,onKeyDown:y?E:void 0,role:y?"button":void 0,tabIndex:y?0:void 0,children:[A!=null&&n.jsx("div",{className:"panel-row__icon",children:A}),g!=null&&n.jsxs("div",{className:"panel-row__left",children:[n.jsx("div",{className:"panel-row__label body-3",children:g}),w&&n.jsx("div",{className:"panel-row__sub caption-1",children:w})]}),n.jsx("div",{className:"panel-row__right",children:k})]})}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(Ca,{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:r,sub:s,onClick:l,required:i,error:u,align:c="horizontal",useFullWidth:d=!1,icon:h}=e,p=a==="button"?void 0:l;let m=null;const b=a==="toggle"?`panel-toggle-${t}`:void 0,v=u?`panel-error-${t}`:void 0,C=`panel-helper-${t}`;if(a==="toggle"){const g=e;m=n.jsx(Bu,{checked:g.checked,onChange:g.onChange,id:b})}else if(a==="segmented"){const g=e;m=n.jsx(vn,{options:g.options,value:g.value,onChange:g.onChange,size:g.size??Ft,ariaLabel:r})}else if(a==="dropdown"){const g=e,w=g.dropdowns?.length?n.jsx("div",{className:`panel-row__dropdown-group${d?" panel-row__dropdown-group--full":""}`,children:g.dropdowns.map((y,k)=>n.jsx("div",{className:d?"panel-row__dropdown-item--full":void 0,children:n.jsx(_n,{options:y.options,value:y.value,onChange:y.onChange,size:Ft,placeholder:y.placeholder,block:d,error:!!u,ariaDescribedBy:v,ariaLabel:y.ariaLabel??([r,y.placeholder].filter(Boolean).join(" ")||void 0)})},k))}):n.jsx(_n,{options:g.options??[],value:g.value??"",onChange:g.onChange??Su,size:Ft,block:d,error:!!u,ariaLabel:r,ariaDescribedBy:v});m=u?n.jsxs("div",{className:`panel-row__dropdown-error-wrap${d?" panel-row__dropdown-error-wrap--full":""}`,children:[w,n.jsx("span",{id:v,className:"caption-1 panel-row__error",role:"alert",children:u})]}):w}else if(a==="button"){const g=e;g.buttons?.length?m=n.jsx("div",{className:"panel-row__button-group",children:g.buttons.map((w,y)=>n.jsx(fe,{htmlType:"button",size:w.btnSize??Ft,variant:w.btnVariant??"default",disabled:w.disabled,onClick:w.onClick,children:w.label},y))}):m=n.jsx(fe,{htmlType:"button",size:g.btnSize??Ft,variant:g.btnVariant??"default",disabled:g.disabled,onClick:g.onClick,children:g.buttonLabel})}else if(a==="text"){const g=e;m=n.jsx("span",{className:`panel-row__text body-2${d?" panel-row__text--full":""}`,style:g.valueColor?{color:g.valueColor}:void 0,children:g.value})}else if(a==="input"){const g=e;m=n.jsxs("div",{className:`panel-row__input-wrap${d?" panel-row__input-wrap--full":""}`,children:[n.jsx(Kn,{size:Ft,value:g.value,onChange:g.onChange??Su,onKeyDown:g.onKeyDown,onEnter:g.onEnter,placeholder:g.placeholder,ghostText:g.ghostText,inputMode:g.inputMode,readOnly:g.readOnly,disabled:g.disabled,type:g.type,autoComplete:g.autoComplete,maxLength:g.maxLength,showCount:g.showCount,multiline:g.multiline,rows:g.rows,fullWidth:d,error:u,ariaLabel:r,required:i,ariaDescribedBy:g.helperText?C:void 0}),g.helperText&&n.jsx("div",{id:C,className:"panel-row__helper caption-1",children:g.helperText})]})}else a==="custom"&&(m=e.children);u&&a!=="input"&&a!=="dropdown"&&(m=n.jsxs("div",{className:`panel-row__dropdown-error-wrap${d?" panel-row__dropdown-error-wrap--full":""}`,children:[m,n.jsx("span",{id:v,className:"caption-1 panel-row__error",role:"alert",children:u})]}));const f=a==="input"||a==="dropdown"||(a==="text"||a==="custom")&&d,x=g=>{p&&g.target===g.currentTarget&&(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),p())};return n.jsxs("div",{className:Be("panel-row",c==="vertical"?"panel-row--vertical":"",f?"panel-row--label-fixed":"",a==="text"?"panel-row--text":"",p?"panel-row--clickable":""),onClick:p,onKeyDown:p?x:void 0,role:p?"button":void 0,tabIndex:p?0:void 0,children:[h!=null&&n.jsx("div",{className:"panel-row__icon",children:h}),n.jsxs("div",{className:"panel-row__left",children:[b?n.jsxs("label",{htmlFor:b,className:"panel-row__label body-3",children:[r,i&&n.jsx("span",{className:"required-mark",children:"*"})]}):n.jsxs("div",{className:"panel-row__label body-3",children:[r,i&&n.jsx("span",{className:"required-mark",children:"*"})]}),s&&n.jsx("div",{className:"panel-row__sub caption-1",children:s})]}),n.jsx("div",{className:"panel-row__right",children:m})]})}function ju(e){const t=e.productName||e.brand,a=[e.brand,e.fitType].filter(r=>!!r&&r!==t);return[...new Set(a)].join(" \xB7 ")}function Av({devices:e,onRelease:t,emptyLabel:a}){const{t:r,i18n:s}=_e.useTranslation();return n.jsx("div",{className:"panel-row panel-row--device",children:["left","right"].map(l=>{const i=e[l],u=l==="left"?r("device.direction.left","\uC88C"):r("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(fe,{htmlType:"button",size:32,type:"dot",icon:"x",ariaLabel:`${u} ${r("customers.device.unwear","\uCC29\uC6A9 \uD574\uC81C")}`,showTooltipInfo:r("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(ln,{size:"small",variant:Au(i.device),fill:"soft",label:Nu(i.device,r)}),ju(i)&&n.jsx("span",{className:"panel-row__device-detail body-3",children:ju(i)})]}),n.jsx("span",{className:"panel-row__device-name body-2b",children:i.productName||i.brand}),Fo(i.wornYear,i.wornMonth,i.wornDay,s.language)&&n.jsx("span",{className:"panel-row__device-date caption-1",children:r("customers.device.wornSince",{date:Fo(i.wornYear,i.wornMonth,i.wornDay,s.language)})})]}):n.jsx("span",{className:"panel-row__device-empty body-3",children:a??r("customers.device.notRegistered","\uBBF8\uB4F1\uB85D")})]},l)})})}function Qa({title:e,titleLevel:t=2,icon:a,disc:r,actions:s,size:l="medium",minHeight:i,maxWidth:u,className:c,scrollable:d,scrollbarGutter:h="auto",compactRows:p=!1,useBorder:m=!0,useBg:b=!0,useRowBorder:v=!0,labelWidth:C,form:f=!1,loading:x,empty:g,children:w}){const y=Be("panel",`panel--${l}`,f?"panel--form":"",i!==void 0?"panel--fill":"",m?"":"panel--no-border",b?"":"panel--no-bg",v?"":"panel--no-row-border",p?"panel--compact-rows":"",c),k={};i!==void 0&&(k.minHeight=i),u!==void 0&&(k.maxWidth=typeof u=="number"?`${u}px`:u),C!==void 0&&(k["--panel-label-width"]=typeof C=="number"?`${C}px`:C);const _=t?`h${t}`:"div";return n.jsxs("div",{className:y,style:Object.keys(k).length?k:void 0,children:[(!!e||r!=null)&&n.jsxs("div",{className:Be("panel__header",r!=null?"panel__header--with-disc":""),children:[a&&n.jsx(ot,{icon:a,label:typeof e=="string"?e:void 0,className:"panel__icon"}),n.jsxs("div",{className:"panel__title-group",children:[!!e&&n.jsx(_,{className:`panel__title ${r!=null?"body-3b":"h5b"}`,children:e}),r!=null&&n.jsx("p",{className:"panel__disc caption-1",children:r})]}),s&&n.jsx("div",{className:"panel__actions",children:s})]}),x?n.jsx(un,{variant:"loading"}):g!=null&&o.Children.toArray(w).length===0?n.jsx(un,{variant:"empty",children:g}):d?n.jsx("div",{className:Be("panel__body--scroll",h==="stable"&&"panel__body--gutter-stable"),children:w}):w]})}function Nv({cols:e=2,layout:t="grid",gap:a=1,collapseAt:r,className:s,style:l,children:i}){const u=o.useRef(null),[c,d]=o.useState();o.useEffect(()=>{const p=u.current;if(r===void 0||!p||(d(p.clientWidth),typeof ResizeObserver>"u"))return;const m=new ResizeObserver(([b])=>d(b.contentRect.width));return m.observe(p),()=>m.disconnect()},[r]);const h=r!==void 0&&c!==void 0&&c<=r;return n.jsx("div",{ref:u,className:Be("panel-grid",t==="columns"&&"panel-grid--columns",s),style:{"--panel-grid-cols":h?1:e,"--panel-grid-gap":typeof a=="number"?`${a}px`:a,...l},children:i})}function Oo({checked:e=!1,onChange:t,disabled:a,indeterminate:r,label:s,size:l="medium",className:i,title:u,ariaLabel:c}){const d=o.useRef(null),h=o.useId(),p=o.useRef(!!r);return p.current=!!r,o.useEffect(()=>{d.current&&(d.current.indeterminate=!!r)}),n.jsxs("label",{className:Be("checkbox",l==="small"&&"checkbox--small",l==="large"&&"checkbox--large",a&&"checkbox--disabled",i),htmlFor:h,title:u,children:[n.jsx("input",{ref:d,id:h,type:"checkbox",className:"checkbox__input",checked:e,onChange:m=>{t?.(m.target.checked),d.current&&(d.current.indeterminate=p.current)},disabled:a,"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 Tu(e,t){const a=()=>{if(e){const[C,f]=e.split("-");return{y:+C,m:+f-1}}const[b,v]=cr(t).split("-");return{y:+b,m:+v-1}},[r,s]=o.useState(()=>a().y),[l,i]=o.useState(()=>a().m),u=o.useRef(e);o.useEffect(()=>{if(e===u.current)return;u.current=e;const b=a();s(b.y),i(b.m)},[e]);const c=o.useRef({y:r,m:l});o.useEffect(()=>{c.current={y:r,m:l}},[r,l]);const d=o.useCallback(b=>{const v=c.current.y*12+c.current.m+b,C=Math.floor(v/12),f=v-C*12;c.current={y:C,m:f},s(C),i(f)},[]),h=o.useCallback(()=>d(-1),[d]),p=o.useCallback(()=>d(1),[d]),m=o.useCallback((b,v)=>{c.current={y:b,m:v},s(b),i(v)},[]);return{viewY:r,viewM:l,prevMonth:h,nextMonth:p,setViewYM:m}}function xr(e,t){return new Date(e,t+1,0).getDate()}function Ev(e,t){return new Date(e,t,1).getDay()}function er(e,t,a){return`${e}-${String(t+1).padStart(2,"0")}-${String(a).padStart(2,"0")}`}function Dv(e){if(!e)return"";const[t,a,r]=e.split("-");return`${t}. ${a}. ${r}.`}function Sv(e){const t=e.replace(/\D/g,"");if(t.length!==8)return null;const a=+t.slice(0,4),r=+t.slice(4,6),s=+t.slice(6,8);if(r<1||r>12||s<1||s>31)return null;const l=new Date(a,r-1,s);return l.getFullYear()!==a||l.getMonth()!==r-1||l.getDate()!==s?null:er(a,r-1,s)}const jv=1900;function Tv(e,t,a,r,s){const l=r?+r.split("-")[0]:Math.min(jv,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:a(c)});return u}function Mu(e,t,a,r){const s=[];for(let l=1;l<=12;l++){const i=`${e}-${String(l).padStart(2,"0")}`;a&&i<a.slice(0,7)||r&&i>r.slice(0,7)||s.push({value:String(l),label:t(e,l)})}return s}function Lu({value:e,onChange:t,size:a=Ft,min:r,max:s,disabled:l,placeholder:i,className:u,today:c}){const{t:d,i18n:h}=_e.useTranslation(),p=i??d("datePicker.chooseDate","\uB0A0\uC9DC \uC120\uD0DD"),m=o.useMemo(()=>d("calendar.dow",{returnObjects:!0}),[d]),b=cr(c),{viewY:v,viewM:C,prevMonth:f,nextMonth:x,setViewYM:g}=Tu(e,c),w=o.useId(),y=o.useCallback((H,ne)=>{const V=window.innerHeight,W=window.innerWidth,oe=typeof document<"u"?document.getElementById(w):null,xe=Math.max(oe?.offsetHeight||0,oe?.scrollHeight||0)||300,be=Math.max(H.width,oe?.offsetWidth||0,260),me=V-H.bottom,ke=H.top,Le=me<xe&&ke>me,Me=8,le=(ve,$e)=>Math.min(Math.max(Me,ve),Math.max(Me,$e));return{position:"fixed",left:le(H.left,W-be-Me),width:H.width,minWidth:260,...Le?{top:"auto",bottom:le(V-H.top+6,V-xe-Me)}:{bottom:"auto",top:le(H.bottom+6,V-xe-Me)},zIndex:Wa(ne)}},[w]),{open:k,setOpen:_,toggle:A,style:B,triggerRef:E,menuRef:D}=Ha({computeStyle:y,onScroll:"reposition",onResize:"reposition",ignoreOutsideClickSelector:".dropdown__menu"});o.useEffect(()=>{if(!k)return;const H=D.current;return(H?.querySelector(".date-picker__day--selected:not(:disabled)")??H?.querySelector(".date-picker__day--today:not(:disabled)")??H?.querySelector(".date-picker__day:not(:disabled)")??H?.querySelector(En)??H)?.focus?.(),()=>{const ne=document.activeElement;(!ne||ne===document.body)&&E.current?.focus?.()}},[k,D,E]);const[N,$]=o.useState(1),L=o.useRef(null),U=o.useRef(null);o.useEffect(()=>{if(!k)return;const H=e&&e.slice(0,7)===`${v}-${String(C+1).padStart(2,"0")}`?+e.slice(8):b.slice(0,7)===`${v}-${String(C+1).padStart(2,"0")}`?+b.slice(8):1;$(H)},[k]),o.useEffect(()=>{if(U.current==null)return;const H=U.current;U.current=null,L.current?.querySelector(`[data-day="${H}"]`)?.focus()}),o.useEffect(()=>{$(H=>Math.min(H,xr(v,C)))},[v,C]);const M=o.useCallback(H=>{let ne=er(H.getFullYear(),H.getMonth(),H.getDate());r&&ne<r&&(ne=r),s&&ne>s&&(ne=s);const[V,W,oe]=ne.split("-").map(Number);(V!==v||W-1!==C)&&g(V,W-1),$(oe),U.current=oe},[r,s,v,C,g]),P=o.useCallback(H=>{const ne=new Date(v,C,N),V=oe=>{ne.setDate(ne.getDate()+oe),M(ne)},W=oe=>{const xe=ne.getFullYear()*12+ne.getMonth()+oe,be=Math.floor(xe/12),me=xe-be*12;M(new Date(be,me,Math.min(ne.getDate(),xr(be,me))))};switch(H.key){case"ArrowLeft":V(-1);break;case"ArrowRight":V(1);break;case"ArrowUp":V(-7);break;case"ArrowDown":V(7);break;case"Home":V(-ne.getDay());break;case"End":V(6-ne.getDay());break;case"PageUp":H.shiftKey?W(-12):W(-1);break;case"PageDown":H.shiftKey?W(12):W(1);break;default:return}H.preventDefault()},[v,C,N,M]),T=o.useCallback(H=>{l||(t(er(v,C,H)),_(!1))},[v,C,t,_,l]);o.useEffect(()=>{l&&_(!1)},[l,_]);const ee=H=>{const ne=er(v,C,H);return!!(r&&ne<r||s&&ne>s)},te=(()=>{const H=xr(v,C);if(N>=1&&N<=H&&!ee(N))return N;for(let ne=1;ne<=H;ne++)if(!ee(ne))return ne;return-1})(),I=[];for(let H=0;H<Ev(v,C);H++)I.push(null);for(let H=1;H<=xr(v,C);H++)I.push(H);const Y=a===64?20:a===40?16:18,R=Ul(h.language),q=H=>new Intl.DateTimeFormat(R,{year:"numeric"}).format(new Date(H,0,1)),Z=(H,ne)=>new Intl.DateTimeFormat(R,{month:"long"}).format(new Date(H,ne-1,1)),z=Tv(v,+b.slice(0,4),q,r,s),j=Mu(v,Z,r,s),F=H=>{const ne=Mu(H,Z,r,s);if(ne.length===0)return;const V=ne.some(W=>+W.value===C+1);g(H,V?C:+ne[0].value-1)},[O,G]=o.useState(null);o.useEffect(()=>{G(null)},[e]);const ie=o.useCallback(H=>{G(H);const ne=Sv(H);if(!ne||r&&ne<r||s&&ne>s)return;t(ne);const[V,W]=ne.split("-");g(+V,+W-1)},[r,s,t,g]),K=o.useCallback(()=>{G(null)},[]),pe=o.useCallback(H=>{H.key==="Enter"?(H.preventDefault(),K(),_(!1)):H.key==="Escape"?(K(),_(!1)):H.key==="ArrowDown"&&!k&&(H.preventDefault(),_(!0))},[K,_,k]),X=k?hn.createPortal(n.jsxs("div",{ref:D,id:w,className:"date-picker__dropdown",style:B,"data-tooltip-ignore":!0,role:"dialog","aria-label":d("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:f,"aria-label":d("calendar.prevMonth","\uC774\uC804 \uB2EC"),children:n.jsx(Hs,{size:16,strokeWidth:2})}),n.jsxs("div",{className:"date-picker__nav-ym",children:[n.jsx(_n,{className:"date-picker__nav-dropdown",ariaLabel:d("datePicker.selectYear","\uC5F0 \uC120\uD0DD"),options:z,value:String(v),onChange:H=>F(+H),size:40}),n.jsx(_n,{className:"date-picker__nav-dropdown",ariaLabel:d("datePicker.selectMonth","\uC6D4 \uC120\uD0DD"),options:j,value:String(C+1),onChange:H=>g(v,+H-1),size:40})]}),n.jsx("button",{type:"button",className:"date-picker__nav-btn",onClick:x,"aria-label":d("calendar.nextMonth","\uB2E4\uC74C \uB2EC"),children:n.jsx(Vs,{size:16,strokeWidth:2})})]}),n.jsxs("div",{className:"date-picker__grid",ref:L,onKeyDown:P,children:[m.map(H=>n.jsx("div",{className:"date-picker__dow caption-1",children:H},H)),I.map((H,ne)=>{if(H===null)return n.jsx("div",{},`e${ne}`);const V=er(v,C,H),W=V===e,oe=V===b,xe=ee(H),be=ne%7;return n.jsx("button",{type:"button",disabled:xe,"data-day":H,tabIndex:H===te?0:-1,"aria-current":oe?"date":void 0,onClick:()=>!xe&&T(H),className:Be("date-picker__day caption-1",W&&"date-picker__day--selected",oe&&!W&&"date-picker__day--today",xe&&"date-picker__day--disabled",be===0&&"date-picker__day--sun",be===6&&"date-picker__day--sat"),children:H},H)})]})]}),document.body):null;return n.jsxs("div",{className:Be("date-picker",`date-picker--s${a}`,k&&"date-picker--open",u),children:[n.jsxs("div",{className:"date-picker__field",children:[n.jsx("input",{ref:E,type:"text",className:"date-picker__trigger body-2",value:O??Dv(e),placeholder:p,onChange:H=>ie(H.target.value),onClick:()=>!l&&!k&&A(),onKeyDown:pe,onBlur:K,disabled:l,"aria-haspopup":"dialog","aria-expanded":k,inputMode:"numeric",autoComplete:"off"}),n.jsx("button",{type:"button",className:"date-picker__icon-btn",onClick:()=>!l&&A(),disabled:l,tabIndex:-1,"aria-label":p,"aria-haspopup":"dialog","aria-expanded":k,children:n.jsx(Qs,{size:Y,className:"date-picker__icon",strokeWidth:1.5})})]}),X]})}const $u=["personal","sensitive","marketing"];function Mv({takenKinds:e,busy:t,today:a,onClose:r,onSubmit:s,className:l}){const{t:i}=_e.useTranslation(),[u]=o.useState(()=>cr(a)),[c,d]=o.useState([]),[h,p]=o.useState("paper"),[m,b]=o.useState("self"),[v,C]=o.useState(u),[f,x]=o.useState(""),g=$u.filter(y=>!e.includes(y)),w={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(Pn,{title:i("customers.consent.record","\uB3D9\uC758 \uBC1B\uAE30"),closeDisabled:t,onClose:r,className:l,footer:()=>n.jsx(fe,{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:v||null,note:f.trim()||null})}),children:n.jsxs(Qa,{useBorder:!1,useRowBorder:!1,labelWidth:96,children:[n.jsx(un,{variant:"custom",useFullWidth:!0,label:i("customers.consent.kinds","\uBC1B\uC740 \uAC08\uB798"),children:n.jsxs("div",{className:"consent-record-popup__kinds",children:[g.map(y=>n.jsx(Oo,{checked:c.includes(y),disabled:t,label:w[y],onChange:k=>d(_=>k?[..._,y]:_.filter(A=>A!==y))},y)),g.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(un,{variant:"custom",useFullWidth:!0,label:i("customers.consent.methodTitle","\uBC1B\uC740 \uBC29\uBC95"),children:n.jsx(vn,{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:y=>p(String(y))})}),n.jsx(un,{variant:"custom",useFullWidth:!0,label:i("customers.consent.sourceTitle","\uC218\uC9D1 \uCD9C\uCC98"),children:n.jsx(vn,{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:y=>b(String(y))})}),n.jsx(un,{variant:"custom",useFullWidth:!0,label:i("customers.consent.day","\uBC1B\uC740 \uB0A0"),children:n.jsx(Lu,{size:48,value:v,max:u,today:a,onChange:y=>C(y??"")})}),n.jsx(un,{variant:"custom",useFullWidth:!0,label:i("customers.consent.note","\uBA54\uBAA8"),children:n.jsx(Kn,{size:48,fullWidth:!0,value:f,onChange:x,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 zo({page:e,totalPages:t,onChange:a,prevLabel:r,nextLabel:s,className:l=""}){const{t:i}=_e.useTranslation(),u=r??i("common.prevPage","\uC774\uC804 \uD398\uC774\uC9C0"),c=s??i("common.nextPage","\uB2E4\uC74C \uD398\uC774\uC9C0"),d=Math.max(1,t),h=()=>a(Math.max(1,Math.min(d,e-1))),p=()=>a(Math.min(d,e+1));return n.jsxs("div",{className:Be("pagination",l),children:[n.jsx(fe,{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),d)," / ",d]}),n.jsx(fe,{htmlType:"button",size:32,type:"dot",shape:"rounded",icon:"chevron-right",ariaLabel:c,disabled:e>=t,onClick:p})]})}function Wo({count:e,search:t,segment:a,filters:r,pageSize:s,pagination:l,actions:i,className:u}){const{t:c}=_e.useTranslation(),d=e!=null&&n.jsxs("p",{className:"toolbar__count body-1",role:"status","aria-atomic":"true",children:[e.prefix??c("common.totalPrefix","\uCD1D "),n.jsx("span",{className:"toolbar__count-highlight",children:e.value}),e.unit,e.suffix]}),h=!!(t||r?.length||s||l||i);return n.jsxs("div",{className:Be("toolbar",u),children:[n.jsxs("div",{className:"toolbar__row",children:[d,a&&(Array.isArray(a)?a:[a]).map((p,m)=>n.jsx(vn,{size:Ft,...p},p.ariaLabel??m))]}),h&&n.jsx("div",{className:"toolbar__row",children:n.jsxs("div",{className:"toolbar__row-end",children:[t&&n.jsx(Kn,{className:"toolbar__search",size:Ft,value:t.value,onChange:t.onChange,placeholder:t.placeholder??c("common.search","\uAC80\uC0C9"),ariaLabel:t.placeholder??c("common.search","\uAC80\uC0C9"),autoFocus:t.autoFocus,clearable:!0}),r?.map((p,m)=>n.jsx(_n,{size:Ft,options:p.options,value:p.value,onChange:p.onChange,ariaLabel:p.ariaLabel},m)),(s||l)&&n.jsxs("div",{className:"toolbar__pager",children:[s&&n.jsx(_n,{size:Ft,options:s.options,value:s.value,onChange:s.onChange,ariaLabel:s.ariaLabel??c("common.pageSizeSelect","\uD398\uC774\uC9C0\uB2F9 \uD45C\uC2DC \uAC1C\uC218")}),l&&n.jsx(zo,{page:l.page,totalPages:l.total,onChange:l.onChange,prevLabel:l.prevLabel,nextLabel:l.nextLabel})]}),i]})})]})}function Ru(e){return typeof e=="string"?e:typeof e=="number"?String(e):Array.isArray(e)?e.map(Ru).join(""):""}function Lv(e){let t=e.replace(/\r\n/g,`
825
825
  `).replace(/\r/g,`
826
826
  `);t=t.replace(/^\n+/,"").replace(/\n+$/,"");const a=t.split(`
827
827
  `).map(l=>l.replace(/\t/g," ")),r=a.filter(l=>l.trim().length>0),s=r.length>0?Math.min(...r.map(l=>l.match(/^ */)?.[0].length??0)):0;return a.map(l=>l.slice(s)).join(`
828
- `)}const $v=new Set(["pnpm","npm","yarn","node","git","curl","docker","cat","ls","cd","rm","mv","cp","echo","export"]),Rv=/^(?: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 Pv(e,t){let a=e;const r=[],s=/^(?:sh|bash|zsh|shell|console)$/.test(t.toLowerCase()),l=(i,u)=>r.push({type:i,content:u});for(;a.length>0;){const i=a.match(/^\s+/);if(i){l("whitespace",i[0]),a=a.slice(i[0].length);continue}if(!s&&a.startsWith("//")){const y=a.indexOf(`
829
- `),C=y===-1?a:a.slice(0,y);l("comment",C),a=a.slice(C.length);continue}if(s&&a.startsWith("#")){const y=a.indexOf(`
830
- `),C=y===-1?a:a.slice(0,y);l("comment",C),a=a.slice(C.length);continue}const u=a.match(/^\/\*[\s\S]*?\*\//);if(u){l("comment",u[0]),a=a.slice(u[0].length);continue}const c=a.match(/^(`(?:\\.|[^`])*`|"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*')/);if(c){l("string",c[0]),a=a.slice(c[0].length);continue}const d=a.match(/^\d+(?:\.\d+)?/);if(d){l("number",d[0]),a=a.slice(d[0].length);continue}const h=a.match(Rv);if(h){l("keyword",h[0]),a=a.slice(h[0].length);continue}const p=a.match(/^[A-Za-z_$][A-Za-z0-9_$-]*/);if(p){const y=p[0];l(s&&$v.has(y)?"command":"identifier",y),a=a.slice(y.length);continue}const m=a.match(/^[=+\-*/%<>!&|^~?:]+/);if(m){l("operator",m[0]),a=a.slice(m[0].length);continue}const g=a.match(/^[()[\]{};.,]/);if(g){l("punctuation",g[0]),a=a.slice(1);continue}l("other",a[0]),a=a.slice(1)}return r}function Fv({children:e,language:t="bash",title:a="",showCopy:r=!0,size:s="default",className:l=""}){const{t:i}=_e.useTranslation(),[u,c]=o.useState(!1),d=Lv(Ru(e)),h=o.useRef(null);o.useEffect(()=>()=>{h.current&&clearTimeout(h.current)},[]);const p=async()=>{try{if(!await Hf(d))return;c(!0),h.current&&clearTimeout(h.current),h.current=setTimeout(()=>c(!1),2e3)}catch{}},m=Pv(d,t),g=s==="small"?"caption-1":"body-3";return n.jsxs("div",{className:Be("code-box",s==="small"?"code-box--small":"",l),children:[(a||r)&&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:a}),r&&n.jsx(fe,{htmlType:"button",className:"code-box__copy",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:u?"check":"copy",onClick:p,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((y,C)=>n.jsx("span",{className:`code-token ${y.type} ${g}`,children:y.content},C))})})]})}function Iv({count:e,actions:t,onClear:a,clearLabel:r,visible:s,content:l,max:i}){const{t:u}=_e.useTranslation(),c=s!==void 0?s:e>0,d=r??u("bulkBar.clearSelection","\uC120\uD0DD \uD574\uC81C"),h=o.useRef(null),p=o.useRef(null),m=o.useRef(null),g=o.useRef(c);o.useLayoutEffect(()=>{const b=p.current,w=g.current;if(g.current=c,c&&!w){const v=typeof document<"u"?document.activeElement:null;m.current=v&&v!==document.body&&!b?.contains(v)?v:null}else!c&&w&&b&&b.contains(document.activeElement)&&mr(b,m.current)},[c]);const[y,C]=o.useState(!1),f=o.useRef(!1),_=o.useRef(null);return o.useEffect(()=>{const b=h.current;if(!b)return;const w=E=>{f.current=E,C(E)},v=()=>{const E=b.firstElementChild??b,D=Array.from(E.children);if(D.length<2){w(!1);return}const N=D[0].offsetTop,$=D.some(T=>T.offsetTop!==N);if(!f.current){_.current=b.clientWidth,$&&w(!0);return}if($)return;const L=D[0],U=D[D.length-1],M=U.offsetLeft+U.offsetWidth-L.offsetLeft,P=_.current;(P==null||M<=P)&&w(!1)};if(v(),typeof ResizeObserver>"u")return;const k=new ResizeObserver(v);k.observe(b);const x=b.parentElement;let A=x?.clientWidth??0;const B=new ResizeObserver(()=>{const E=x?.clientWidth??0;E!==A&&(A=E,_.current=null,v())});return x&&B.observe(x),()=>{k.disconnect(),B.disconnect()}},[l,e]),n.jsxs("div",{ref:p,className:`bulk-bar ${c?"bulk-bar--visible":""}`,inert:!c||void 0,"aria-hidden":c?void 0:!0,children:[n.jsx("span",{ref:h,className:"bulk-bar__count body-2",role:"status",children:l??n.jsx("b",{children:u("common.selectedCount",{count:e})})}),i!==void 0&&n.jsx(ln,{size:"small",fill:"soft",variant:"main",label:`${e} / ${i}`,"aria-label":u("common.selectedOfMax",{count:e,max:i,defaultValue:`\uCD5C\uB300 ${i}\uAC1C \uC911 ${e}\uAC1C`})}),n.jsxs("div",{className:`bulk-bar__actions${y?" bulk-bar__actions--stacked":""}`,children:[n.jsx(fe,{htmlType:"button",size:40,label:d,onClick:a}),t.map((b,w)=>n.jsx(fe,{htmlType:"button",size:40,variant:b.variant??"default",icon:b.icon,label:b.label,onClick:b.onClick},w))]})]})}const Ov=[{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 zv(e){const{onClose:t,className:a}=e;return n.jsx("div",{className:Be("item-actions",a),children:Ov.map(({key:r,icon:s,closeFirst:l})=>{const i=e[r];if(!i)return null;const u=r==="publish"?i.published?i.unpublish:i.publish:i;return n.jsx(fe,{htmlType:"button",size:40,type:"dot",icon:s,ariaLabel:u.label,showTooltipInfo:u.label,onClick:()=>{l&&t(),u.onClick()}},r)})})}function Wv({items:e,className:t,ariaLabel:a="\uC54C\uB9BC \uAE00",titleLevel:r=4,targetBytes:s}){const l=r?`h${r}`:"div";return n.jsx("div",{className:`notify-text-preview${t?` ${t}`:""}`,role:"group","aria-label":a,children:e.map(i=>{const u=s===void 0?Rl(i.sms):Rl(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(([d,h])=>n.jsxs("div",{className:"notify-text-preview__meta-row",children:[n.jsx("dt",{children:d}),n.jsx("dd",{children:h})]},d))}):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?`${Ll}\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 ${Ll}\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 Hv({src:e,alt:t,className:a,style:r,tone:s,textColor:l}){const i=!s&&!!l,u=Jy(e,i),c="bl"+o.useId().replace(/[^a-zA-Z0-9]/g,"");return s?n.jsx("span",{className:Be("brand-logo","brand-logo--tone",a),role:t?"img":void 0,"aria-label":t||void 0,"aria-hidden":t?void 0:!0,style:{...r,"--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:Be("brand-logo","brand-logo--inline",a),role:t?"img":void 0,"aria-label":t||void 0,"aria-hidden":t?void 0:!0,style:{...r,"--brand-logo-text-color":l},dangerouslySetInnerHTML:{__html:Zy(Yy(u),c)}}):n.jsx("img",{src:e,alt:t,className:Be("brand-logo",a),style:r,draggable:!1})}function Pu({children:e,className:t}){const a=o.useRef(null),[r,s]=o.useState(null);return o.useEffect(()=>{s(a.current?.parentElement??null)},[]),o.useEffect(()=>{const l=a.current;if(!l||!r)return;const i=()=>{const c=typeof window<"u"&&window.getComputedStyle(l).position==="absolute"?Math.ceil(l.getBoundingClientRect().width):0;c>0?r.style.setProperty("--section-head-float-w",`${c}px`):r.style.removeProperty("--section-head-float-w")};if(i(),typeof ResizeObserver>"u")return()=>{r.style.removeProperty("--section-head-float-w")};const u=new ResizeObserver(()=>i());return u.observe(l),u.observe(r),()=>{u.disconnect(),r.style.removeProperty("--section-head-float-w")}},[r,e]),n.jsx("div",{ref:a,className:Be("section-head-float",t),children:e})}function Ho({items:e,className:t}){return n.jsx("div",{className:se(t?`chart-section__legend ${t}`:"chart-section__legend"),children:e.map((a,r)=>n.jsxs("span",{className:se("chart-section__legend-item"),children:[n.jsx("span",{className:se("chart-section__legend-dot"),style:{background:a.color}}),a.label]},r))})}function tr({label:e,children:t}){return e?n.jsxs("div",{className:se("chart-section__total chart-section__total--stacked"),children:[n.jsx("span",{className:se("chart-section__total__label body-3"),children:e}),n.jsx("span",{className:se("chart-section__total__value"),children:t})]}):n.jsx("div",{className:se("chart-section__total"),children:t})}function Vo({title:e,titleClassName:t="h3",titleLevel:a=3,icon:r,disc:s,headRight:l,headFloat:i,headSegment:u,headMenuItems:c,collapseBelow:d=420,onClick:h,ariaLabel:p,tooltip:m,totalNum:g,totalUnit:y,totalLabel:C,subRow:f,subRowAlign:_="start",className:b,inGrid:w=!1,children:v}){const{t:k}=_e.useTranslation(),x=o.useRef(null),{anchorRect:A,openAt:B,close:E}=za(),D=o.useCallback(()=>{m&&x.current&&B(x.current)},[m,B]),[N,$]=o.useState(!1);Io(()=>{const j=x.current;if(!j||!u)return;const F=G=>$(G>0&&G<d);if(F(j.clientWidth),typeof ResizeObserver>"u")return;const O=new ResizeObserver(G=>F(G[0].contentRect.width));return O.observe(j),()=>O.disconnect()},[u,d]);const[L,U]=o.useState(null),M=o.useCallback(()=>U(null),[]),P=o.useCallback(j=>{const F=j.currentTarget.getBoundingClientRect();U(O=>O?null:{left:F.left,right:F.right,top:F.top,bottom:F.bottom,width:F.width,height:F.height,x:F.x,y:F.y})},[]),T=!!u&&N;o.useEffect(()=>{T||U(null)},[T]);const ee=u?[...u.options.map(j=>({label:j.label,icon:j.icon,selected:j.key===u.value,disabled:j.disabled,onClick:()=>u.onChange(j.key),closeOnSelect:!0})),...(c??[]).map((j,F)=>F===0?{...j,separatorBefore:!0}:j)]:[],te=o.useCallback(j=>{if(!h)return;const F=j.target;F&&typeof F.closest=="function"&&F.closest('button, a, input, select, textarea, [role="radiogroup"]')||h()},[h]),I=o.useCallback(j=>{h&&j.target===j.currentTarget&&(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),h())},[h]),Y=typeof l=="function"?l({collapsed:T}):l,R=g!=null||C?n.jsxs(tr,{label:C,children:[g!=null&&n.jsx("span",{className:se("chart-section__total__num h0"),children:g}),y&&n.jsx("span",{className:se("chart-section__total__unit h5"),children:y})]}):null,q=Y||u?n.jsxs("div",{className:se("chart-section__head-right"),children:[u&&(T?n.jsx(fe,{htmlType:"button",size:Ft,type:"dot",icon:"ellipsis",ariaLabel:u.ariaLabel??k("common.more","\uB354\uBCF4\uAE30"),showTooltipInfo:u.ariaLabel??k("common.more","\uB354\uBCF4\uAE30"),"aria-haspopup":"menu","aria-expanded":!!L,onClick:P}):n.jsx(vn,{size:Ft,ariaLabel:u.ariaLabel,options:u.options.map(j=>({key:j.key,label:j.label,disabled:j.disabled})),value:u.value,onChange:u.onChange})),Y]}):null,Z=o.useId(),z=a?`h${a}`:"div";return n.jsxs("section",{ref:x,className:se(["chart-section",w&&"chart-section--grid",h&&"chart-section--clickable",b].filter(Boolean).join(" ")),onClick:h?te:void 0,onKeyDown:h?I:void 0,onPointerEnter:m?D:void 0,onPointerLeave:m?E:void 0,onFocus:m?D:void 0,onBlur:m?E:void 0,role:h?"button":void 0,tabIndex:h?0:void 0,"aria-label":h?p??(typeof e=="string"?e:void 0):void 0,"aria-labelledby":!h&&e!=null?Z:void 0,children:[m&&A&&n.jsx(Mn,{anchorRect:{left:A.left,top:A.top+21,right:A.right,bottom:A.bottom,width:A.width,height:A.height},text:m}),i&&n.jsx(Pu,{children:i}),n.jsxs("div",{className:se("chart-section__head"),children:[n.jsxs("div",{className:se("chart-section__title-row"),children:[r&&n.jsx(ot,{icon:r,label:typeof e=="string"?e:void 0,className:se("chart-section__icon")}),n.jsx(z,{id:Z,className:se(["chart-section__title",t].filter(Boolean).join(" ")),children:e})]}),q,s&&n.jsx("div",{className:se("chart-section__disc body-3"),children:s})]}),(R||f)&&n.jsxs("div",{className:se(["chart-section__sub-row",_!=="start"&&`chart-section__sub-row--${_}`].filter(Boolean).join(" ")),children:[R,f]}),v,L&&n.jsx(Bn,{anchorRect:L,onClose:M,ariaLabel:u?.ariaLabel??k("tooltip.menu","\uBA54\uB274"),children:n.jsx(Va,{columns:[{items:ee}],onClose:M,size:"small"})})]})}const nr=(e,t)=>`${e}-${String(t).padStart(2,"0")}`,qo=e=>nr(e.getFullYear(),e.getMonth()+1);function ya(e){const t=/^(\d{4})-(\d{2})$/.exec(e);if(!t)return null;const a=Number(t[2]);return a>=1&&a<=12?{year:Number(t[1]),month1:a}:null}const Uo=(e,t)=>`${e}#${t}`;function Sn(e,t){const a=new Date(e,t,1).getDay();return 1+(8-(a===0?7:a))%7}function Vv(){const e=ha();let t=e.getFullYear(),a=e.getMonth(),r=e.getDate();if(r<Sn(t,a)){const i=new Date(t,a,0);t=i.getFullYear(),a=i.getMonth(),r=i.getDate()}const s=Math.floor((r-Sn(t,a))/7),l=nr(t,a+1);return{monthKey:l,value:Uo(l,s)}}function qv(e){const t=ha(),a=qo(t),r=(c,d)=>nr(c,d+1),s=new Map;s.set(a,[]);for(const c of e){if(isNaN(c.date.getTime()))continue;const d=r(c.date.getFullYear(),c.date.getMonth());s.has(d)||s.set(d,[]),s.get(d).push(c)}for(const[c,d]of[...s.entries()]){const h=ya(c);if(!h)continue;const p=h.year,m=h.month1-1,g=Sn(p,m);if(!(c===a&&t.getDate()<g)&&!d.some(f=>f.date.getDate()<g))continue;const y=new Date(p,m,0),C=r(y.getFullYear(),y.getMonth());s.has(C)||s.set(C,[])}const l=new Map;for(const[c,d]of s){const h=ya(c);if(!h)continue;const p=h.year,m=h.month1-1,g=new Date(p,m+1,0).getDate(),y=d.reduce((v,k)=>Math.max(v,k.parts?.length??0,k.partsB?.length??0),0),C=d.some(v=>v.partsB),f=new Array(g+1).fill(0),_=new Array(g+1).fill(0),b=Array.from({length:g+1},()=>new Array(y).fill(0)),w=Array.from({length:g+1},()=>new Array(y).fill(0));for(const v of d){const k=v.date.getDate();if(f[k]+=v.a,_[k]+=v.b,v.parts)for(let x=0;x<y;x++)b[k][x]+=v.parts[x]??0;if(v.partsB)for(let x=0;x<y;x++)w[k][x]+=v.partsB[x]??0}l.set(c,{year:p,month:m,daysInMonth:g,partsLen:y,hasPartsB:C,dayA:f,dayB:_,dayParts:b,dayPartsB:w})}const i=(c,d,h)=>new Date(c,d,h).getTime()>new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime(),u={};for(const[c,d]of l){const{year:h,month:p,daysInMonth:m,dayA:g,dayB:y,dayParts:C,dayPartsB:f}=d,_=h===t.getFullYear()&&p===t.getMonth(),b=t.getDate(),w=l.get(r(p===11?h+1:h,(p+1)%12)),v=d.partsLen,k=[];for(let A=1;A<=m;A++){const B=_&&A>b;k.push({label:String(A),...B&&g[A]===0&&y[A]===0?{future:!0}:{},a:B&&g[A]===0&&y[A]===0?-1:g[A],b:y[A],...v?{parts:C[A]}:{},...v&&d.hasPartsB?{partsB:f[A]}:{}})}const x=[];for(let A=Sn(h,p);A<=m;A+=7){const B=Math.max(0,A+6-m),E=B&&w?Math.max(v,w.partsLen):v,D=d.hasPartsB||!!(B&&w?.hasPartsB);let N=0,$=0;const L=new Array(E).fill(0),U=new Array(E).fill(0);for(let P=A;P<=Math.min(A+6,m);P++){N+=g[P],$+=y[P];for(let T=0;T<v;T++)L[T]+=C[P][T],U[T]+=f[P][T]}if(B&&w)for(let P=1;P<=B&&!i(w.year,w.month,P);P++){N+=w.dayA[P],$+=w.dayB[P];for(let T=0;T<w.partsLen;T++)L[T]+=w.dayParts[P][T],U[T]+=w.dayPartsB[P][T]}const M=B?`${(p+1)%12+1}/${B}`:`${A+6}`;x.push({label:`${x.length+1}\uC8FC`,sublabel:`[${A}\uC77C~${M}\uC77C]`,a:N,b:$,...E?{parts:L}:{},...E&&D?{partsB:U}:{}})}u[c]={weekly:x,daily:k}}return u}function Fu(){const e=ha(),t=e.getFullYear(),a=e.getMonth()+1,r=[];for(let s=2024;s<=t;s++){const l=s===t?a:12;for(let i=1;i<=l;i++)r.push({value:nr(s,i),year:s,month:i})}return r.reverse()}Fu();function Uv(){return Fu()}function Iu(e,t){const a=e("calendar.weekOrdinal",{returnObjects:!0,defaultValue:[]}),r=Array.isArray(a)&&typeof a[t]=="string"?a[t]:null;return e("calendar.weekLabel",{ord:r??String(t+1)})}function Ou(e){const{t,i18n:a}=_e.useTranslation(),[r,s]=o.useState("week"),l=o.useMemo(()=>Uv().filter(E=>E.value in e),[e]),i=o.useMemo(()=>{const E=[];for(const D of l){const N=new Date(D.year,D.month,0).getDate(),$=Sn(D.year,D.month-1),L=Math.ceil((N-$+1)/7);for(let U=L-1;U>=0;U--)E.push({value:Uo(D.value,U),monthKey:D.value,year:D.year,month:D.month,week:U})}return E},[l]),u=o.useCallback(E=>`${co(t,a.language,E.year,E.month)} ${Iu(t,E.week)}`,[t]),c=o.useMemo(()=>l.map(E=>({value:E.value,label:co(t,a.language,E.year,E.month)})),[t,a.language,l]),d=o.useMemo(()=>i.map(E=>({value:E.value,label:u(E)})),[i,u]),h=o.useMemo(()=>Vv(),[e]),p=o.useMemo(()=>l.find(E=>E.value===h.monthKey)?.value??l[0]?.value??"",[l,h]),m=o.useMemo(()=>i.find(E=>E.value===h.value)?.value??i[0]?.value??"",[i,h]),[g,y]=o.useState(""),[C,f]=o.useState("");o.useEffect(()=>{l.find(E=>E.value===g)||y(p)},[l,g,p]),o.useEffect(()=>{i.find(E=>E.value===C)||f(m)},[i,C,m]);const _=r==="month"?c:d,b=r==="month"?g:C,w=r==="month"?y:f,v=o.useMemo(()=>{const E=t("calendar.dow",{returnObjects:!0});return Array.isArray(E)?E:["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"]},[t]),k=_.findIndex(E=>E.value===b),x=o.useCallback(()=>{const E=_.findIndex(D=>D.value===b);E<_.length-1&&w(_[E+1].value)},[_,b,w]),A=o.useCallback(()=>{const E=_.findIndex(D=>D.value===b);E>0&&w(_[E-1].value)},[_,b,w]),B=o.useMemo(()=>[{key:"week",label:t("manager.chart.periodWeek","\uC8FC")},{key:"month",label:t("manager.chart.periodMonth","\uC6D4")}],[t]);return{period:r,setPeriod:s,range:b,setRange:w,activeOptions:_,activeIdx:k,handlePrev:x,handleNext:A,periodOptions:B,monthRange:g,weekRange:C,weekRanges:i,DOW:v}}const Mt=e=>typeof e=="number"&&Number.isFinite(e)?e:0;function Fn(e,t=!0){return e.future===!0||t&&e.a===-1}function Gv({data:e,colorA:t,colorB:a,labelA:r,labelB:s,barWidth:l=10,barGap:i=1,height:u=140,maxOverride:c,tightMax:d,seriesColors:h,seriesLabels:p,rateLabels:m,grouped:g=!1,baseline:y,focusableBars:C=!1}){const f=!a,_=!!(h&&h.length>0),b=y,w=o.useMemo(()=>_?Math.max(0,...e.filter(I=>!Fn(I,b==null)).map(I=>g?Math.max(0,...(I.parts??[]).map(Mt)):(I.parts??[]).reduce((Y,R)=>Y+Math.max(0,Mt(R)),0))):Math.max(0,...e.filter(I=>!Fn(I,b==null)).flatMap(I=>f?[Mt(I.a)]:[Mt(I.a),Mt(I.b)])),[e,f,_,g]),v=o.useMemo(()=>{if(b==null)return 0;const I=e.filter(Y=>!Fn(Y,b==null)).flatMap(Y=>_?(Y.parts??[]).map(Mt):f?[Mt(Y.a)]:[Mt(Y.a),Mt(Y.b)]);return Math.max(0,...I.map(Y=>Math.abs(Y-b)))},[e,b,_,f]),k=o.useMemo(()=>{const I=b!=null?v:w;return c??(d?I>0?I:10:Math.ceil(I/10)*10||10)},[w,v,b,c,d]),x=u,A=_?g?Math.max(1,h.length):1:f?1:2,B={"--bar-width":`${o.useMemo(()=>{const I=Math.max(1,e.length);return Math.max(2,Math.min(l,Math.round(120/(I*A)+6)))},[e.length,A,l])}px`},E={"--bar-group-gap":`${Math.max(0,i)}px`},D=o.useMemo(()=>{const I=Math.round(k/2);return b!=null?[b+k,...I!==k?[b+I]:[],b,...I!==k?[b-I]:[],b-k]:I!==k?[k,I,0]:[k,0]},[k,b]),N=I=>b!=null?1-(I-(b-k))/(2*k):1-I/k,[$,L]=o.useState(null),U=o.useCallback(()=>L(null),[]),M=o.useCallback((I,Y)=>{const R=[I.label,I.sublabel].filter(Boolean).join(" ");let q;if(_&&g&&I.rawPartsB)q=(p??[]).map((Z,z)=>{const j=I.rawPartsB[z]??0;return{text:j>0?`${Z}: ${Y[z]??0}% (${I.rawParts?.[z]??0}/${j})`:`${Z}: -`,color:(h??[])[z]}});else if(_&&g)q=(p??[]).map((Z,z)=>({text:`${Z}: ${ee(Y[z]??0)}`,color:(h??[])[z]}));else if(_){const Z=(p??[]).map((j,F)=>({text:`${j}: ${Y[F]??0}`,color:(h??[])[F]})),z=Z.filter((j,F)=>(Y[F]??0)>0);q=z.length?z:Z}else m&&!f?q=[{text:`${r} ${Mt(I.a)}%`,color:t},{text:`${s} ${Mt(I.b)}%`,color:a}]:m&&I.rawB!==void 0?q=[{text:`${m.total} ${I.rawB}`},{text:`${m.done} ${I.rawA??0}`,color:t}]:f?q=[{text:`${r}: ${Mt(I.a)}`,color:t}]:q=[{text:`${r}: ${Mt(I.a)}`,color:t},{text:`${s}: ${Mt(I.b)}`,color:a}];return{title:R,items:q}},[_,g,p,h,m,f,r,s,t,a,b]),P=o.useCallback((I,Y,R)=>{const q=I.getBoundingClientRect(),{title:Z,items:z}=M(Y,R);L({rect:{left:q.left,top:q.top,right:q.right,bottom:q.bottom,width:q.width,height:q.height},title:Z,items:z})},[M]),T=o.useCallback((I,Y)=>{const{title:R,items:q}=M(I,Y);return[R,...q.map(Z=>Z.text)].filter(Boolean).join(", ")},[M]),ee=I=>b!=null&&I>b?`+${I}`:`${I}`,te=$!=null;return o.useEffect(()=>{if(!te)return;const I=()=>L(null),Y=R=>{const q=R.target;q&&typeof q.closest=="function"&&q.closest(".bar-chart__col")||L(null)};return window.addEventListener("scroll",I,!0),document.addEventListener("pointerdown",Y,!0),()=>{window.removeEventListener("scroll",I,!0),document.removeEventListener("pointerdown",Y,!0)}},[te]),n.jsxs("div",{className:se("bar-chart__wrap"),style:E,children:[n.jsx("div",{className:se("bar-chart__inner"),children:n.jsx("div",{className:se("bar-chart__scroll"),children:n.jsxs("div",{className:se("bar-chart__area"),children:[n.jsxs("div",{className:se("bar-chart__plot"),style:{height:x},children:[D.slice(0,-1).map((I,Y)=>n.jsx("div",{className:se(`bar-chart__gridline${b!=null&&I===b?" bar-chart__gridline--baseline":""}`),style:{top:N(I)*x},children:n.jsx("span",{className:se("bar-chart__gridline__label caption-1"),children:I})},Y)),e.map((I,Y)=>{const R=Fn(I,b==null),q=x/2,Z=O=>b!=null?Math.min(q,Math.abs(Mt(O)-b)/k*q):Math.min(x,Math.max(0,Mt(O)/k*x)),z=R?0:Z(I.a),j=R?0:Z(I.b),F=(I.parts??[]).map(Mt);return n.jsx("div",{className:se(`bar-chart__col${g&&_?" bar-chart__col--group":""}`),style:{cursor:R?"default":"pointer"},tabIndex:C&&!R?0:void 0,role:C&&!R?"img":void 0,"aria-label":C&&!R?T(I,F):void 0,onMouseEnter:R?void 0:O=>P(O.currentTarget,I,F),onFocus:R||!C?void 0:O=>P(O.currentTarget,I,F),onBlur:C?U:void 0,onMouseLeave:U,children:!R&&(_&&g?(h??[]).map((O,G)=>{const ie=F[G]??0;if(b==null)return n.jsx("div",{className:se("bar-chart__bar"),style:{...B,height:Z(ie),background:O}},G);const K=Mt(ie)<b;return n.jsxs("div",{className:se("bar-chart__slot"),style:B,children:[n.jsx("div",{className:se("bar-chart__slot__half bar-chart__slot__half--up"),children:!K&&n.jsx("div",{className:se("bar-chart__bar bar-chart__bar--full"),style:{height:Z(ie),background:O}})}),n.jsx("div",{className:se("bar-chart__slot__half bar-chart__slot__half--down"),children:K&&n.jsx("div",{className:se("bar-chart__bar bar-chart__bar--full bar-chart__bar--down"),style:{height:Z(ie),background:O}})})]},G)}):_?n.jsx("div",{className:se("bar-chart__stack"),style:B,children:(()=>{const O=F.reduce((ie,K,pe)=>K>0?pe:ie,-1);let G=x;return F.map((ie,K)=>{if(ie<=0)return null;const pe=Math.min(G,ie/k*x);return G-=pe,n.jsx("div",{className:se("bar-chart__stack-segment"),style:{height:pe,background:(h??[])[K],borderRadius:K===O?"6px 6px 0 0":void 0}},K)})})()}):b!=null?n.jsx(n.Fragment,{children:[{v:Mt(I.a),c:t},...f?[]:[{v:Mt(I.b),c:a}]].map(({v:O,c:G},ie)=>n.jsxs("div",{className:se("bar-chart__slot"),style:B,children:[n.jsx("div",{className:se("bar-chart__slot__half bar-chart__slot__half--up"),children:O>=b&&n.jsx("div",{className:se("bar-chart__bar bar-chart__bar--full"),style:{height:Z(O),background:G}})}),n.jsx("div",{className:se("bar-chart__slot__half bar-chart__slot__half--down"),children:O<b&&n.jsx("div",{className:se("bar-chart__bar bar-chart__bar--full bar-chart__bar--down"),style:{height:Z(O),background:G}})})]},ie))}):n.jsxs(n.Fragment,{children:[n.jsx("div",{className:se("bar-chart__bar"),style:{...B,height:z,background:t}}),!f&&n.jsx("div",{className:se("bar-chart__bar"),style:{...B,height:j,background:a}})]}))},Y)})]}),n.jsx("div",{className:se("bar-chart__x-axis"),children:e.map((I,Y)=>{const R=Fn(I,b==null);return n.jsxs("span",{className:se(`bar-chart__x-axis__label${R?" bar-chart__x-axis__label--future":""}`),children:[n.jsxs("span",{className:se("caption-1 bar-chart__x-axis__main"),children:[I.isToday&&n.jsx("span",{className:se("bar-chart__x-axis__today-dot"),style:{background:t}}),I.label]}),I.sublabel&&n.jsx("span",{className:"caption-1",children:I.sublabel})]},Y)})})]})})}),$&&n.jsx(qn,{anchorRect:$.rect,title:$.title,items:$.items,showIndex:!1,closeOnOutsideClick:!1})]})}function zu({control:e}){const{t}=_e.useTranslation(),{activeOptions:a,activeIdx:r,range:s,setRange:l,handlePrev:i,handleNext:u,periodOptions:c,period:d,setPeriod:h}=e,p=d==="week"?t("calendar.prevWeek","\uC774\uC804 \uC8FC"):t("calendar.prevMonth","\uC774\uC804 \uB2EC"),m=d==="week"?t("calendar.nextWeek","\uB2E4\uC74C \uC8FC"):t("calendar.nextMonth","\uB2E4\uC74C \uB2EC");return n.jsxs("div",{className:se("chart-section__controls"),children:[n.jsx(fe,{htmlType:"button",size:Ft,type:"dot",icon:"chevron-left",ariaLabel:p,showTooltipInfo:p,disabled:r===a.length-1,onClick:i}),n.jsx(_n,{value:s,onChange:l,options:a,size:Ft,className:"month-dropdown",ariaLabel:t("calendar.rangeSelect","\uAE30\uAC04 \uC120\uD0DD")}),n.jsx(fe,{htmlType:"button",size:Ft,type:"dot",icon:"chevron-right",ariaLabel:m,showTooltipInfo:m,disabled:r<=0,onClick:u}),n.jsx(vn,{ariaLabel:t("calendar.periodSelect","\uAE30\uAC04 \uB2E8\uC704"),options:c,value:d,onChange:g=>h(g),size:Ft})]})}function Go(e,t,a,r=!0){const s=new Date(a.getFullYear(),a.getMonth(),a.getDate());return Array.from({length:7},(l,i)=>{const u=new Date(t);u.setDate(t.getDate()+i);const c=(e[qo(u)]?.daily??[])[u.getDate()-1],d=c!=null&&Fn(c,r)||u>s;return{dt:u,entry:c,isFuture:d}})}function Kv(e,t,a,r=!0){const{period:s,monthRange:l,weekRange:i,weekRanges:u,DOW:c}=t,d=ha(),h=d.getFullYear(),p=d.getMonth()+1,m=d.getDate();if(s==="month"){const C=e[l]??{weekly:[],daily:[]},f=ya(l),_=f?f.year:null,b=f?f.month1:null,w=_&&b?Sn(_,b-1):1;return C.weekly.map((v,k)=>{const x=k+1;let A=v.label,B=!1,E=!1;if(_&&b){const D=w+k*7,N=new Date(_,b-1,D+6),$=N.getMonth()+1,L=N.getDate(),U=$===b?`${L}`:`${$}/${L}`;A=a("manager.chart.weekRange",{start:D,end:U});const M=new Date(h,p-1,m).getTime();B=M>=new Date(_,b-1,D).getTime()&&M<=N.getTime(),E=_>h||_===h&&(b>p||b===p&&D>m)}return{...v,label:A,sublabel:Iu(a,x-1),isToday:B,future:v.future===!0||E||void 0,a:E?-1:v.a,b:E?0:v.b}})}const g=u.find(C=>C.value===i);if(!g)return[];const y=new Date(g.year,g.month-1,Sn(g.year,g.month-1)+g.week*7);return Go(e,y,d,r).map(({dt:C,entry:f,isFuture:_})=>{const b=C.getMonth()+1,w=C.getDate(),v=C.getFullYear();return{label:b===g.month&&v===g.year?`${w}`:`${b}/${w}`,sublabel:c[C.getDay()]??"",future:_||void 0,a:_?-1:f&&f.a>0?f.a:0,b:_?0:f&&f.b>0?f.b:0,isToday:v===h&&b===p&&w===m,...f?.parts?{parts:_?f.parts.map(()=>0):f.parts}:{},...f?.partsB?{partsB:_?f.partsB.map(()=>0):f.partsB}:{}}})}const Yv={small:{height:100,barWidth:16},medium:{height:140,barWidth:20},large:{height:180,barWidth:24}};function Zv({focusableBars:e,size:t="medium",barWidth:a,titleKey:r,titleLevel:s,data:l,colorA:i,colorB:u,labelAKey:c,labelBKey:d,showTotal:h=!1,totalUnitKey:p,totalLabelKey:m,control:g,hideControls:y=!1,rate:C=!1,rateAgg:f="dayMean",tightMax:_=!1,avgMode:b=!1,totalFormat:w,series:v,seriesMode:k="stack",loading:x=!1,onDetail:A,headExtra:B,headSegment:E,icon:D,disc:N,onClick:$,cardAriaLabel:L,cardTooltip:U,detailSize:M=Ft,barGap:P,baseline:T,className:ee,inGrid:te=!1}){const{t:I}=_e.useTranslation(),Y=Yv[t],R=Ou(l),q=g??R,Z=o.useMemo(()=>Kv(l,q,I,T==null),[l,q,I,T]),z=k==="group"&&!!v&&v.length>0;P!=null&&!z&&At("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 j=o.useMemo(()=>{if(!C)return Z;const X=q.period==="month"?ya(q.monthRange):null,H=ha(),ne=v?.length??0,V=W=>{const oe=[],xe=[],be=[];for(let me=0;me<ne;me++){let ke=0,Le=0,Me=0;for(const le of W){const ve=Mt(le.a[me]),$e=Mt(le.b[me]);$e<=0||(ke+=ve,Le+=$e,Me+=ve/$e*100)}oe.push(f==="weighted"?Le>0?Math.round(ke/Le*100):0:W.length?Math.round(Me/W.length):0),xe.push(ke),be.push(Le)}return{pct:oe,ra:xe,rb:be}};return Z.map((W,oe)=>{let xe=W.a===-1?-1:W.b>0?Math.round(W.a/W.b*100):0;if(X&&!Fn(W)){const me=X.year,ke=X.month1-1,Le=Go(l,new Date(me,ke,Sn(me,ke)+oe*7),H).filter(Me=>!Me.isFuture);if(f==="weighted"){let Me=0,le=0;for(const{entry:ve}of Le)ve&&ve.b>0&&(Me+=ve.a,le+=ve.b);xe=le>0?Math.round(Me/le*100):0}else xe=Le.length?Math.round(Le.reduce((Me,{entry:le})=>Me+(le&&le.b>0?le.a/le.b*100:0),0)/Le.length):0}let be=null;if(z&&!Fn(W)){let me;if(X){const Le=X.year,Me=X.month1-1;me=Go(l,new Date(Le,Me,Sn(Le,Me)+oe*7),H).filter(le=>!le.isFuture).map(({entry:le})=>({a:le?.parts??[],b:le?.partsB??[]}))}else me=[{a:W.parts??[],b:W.partsB??[]}];const ke=V(me);be={parts:ke.pct,rawParts:ke.ra,rawPartsB:ke.rb}}return{...W,a:xe,b:W.a===-1?0:d&&W.parts&&W.parts[1]>0?Math.round(W.parts[0]/W.parts[1]*100):0,rawA:W.a===-1?-1:W.a,rawB:W.b,...be??{}}})},[Z,C,f,d,q.period,q.monthRange,l,z,v?.length]),F=o.useMemo(()=>{if(C||b){const H=(q.period==="week"?Z:l[q.monthRange]?.daily??[]).filter(V=>V.a!==-1);if(H.length===0)return 0;if(C&&f==="weighted"){let V=0,W=0;for(const oe of H)oe.b>0&&(V+=oe.a,W+=oe.b);return W>0?Math.round(V/W*100):0}const ne=C?H.reduce((V,W)=>V+(W.b>0?W.a/W.b*100:0),0):H.reduce((V,W)=>V+(W.a>0?W.a:0),0);return Math.round(ne/H.length)}const X=q.period==="month"?l[q.monthRange]?.daily??[]:j;return T!=null?X.reduce((H,ne)=>H+(Fn(ne,!1)?0:Mt(ne.a)+(d?Mt(ne.b):0)),0):X.reduce((H,ne)=>H+(ne.a>0?ne.a:0)+(d&&ne.b>0?ne.b:0),0)},[j,Z,C,f,b,T,d,q.period,q.monthRange,l]),O=v&&v.length>0?v.map(X=>({color:X.color,label:X.label})):[{color:i,label:I(c)},...d?[{color:u,label:I(d)}]:[]],G=t==="small",ie=[G?"chart-section--compact":t==="large"?"chart-section--full":void 0,ee].filter(Boolean).join(" ")||void 0,K=r?I(r):"",pe=K?I("trainingStatus.detailFor",{name:K,defaultValue:"{{name}} \uC0C1\uC138\uBCF4\uAE30"}):I("trainingStatus.detail","\uC0C1\uC138\uBCF4\uAE30");return n.jsx(Vo,{className:ie,inGrid:te,icon:D,disc:N,onClick:$,ariaLabel:L,tooltip:U,headSegment:E,headMenuItems:A?[{label:pe,icon:"list",onClick:A,closeOnSelect:!0}]:void 0,title:I(r),titleLevel:s,titleClassName:G?"h5 chart-section-title--small":void 0,headRight:G?B??void 0:({collapsed:X})=>n.jsxs(n.Fragment,{children:[!y&&n.jsx(zu,{control:q}),B,A&&!X&&n.jsx("span",{className:se("bar-chart__detail-btn"),children:n.jsx(fe,{htmlType:"button",size:M,type:"dot",icon:"list",ariaLabel:pe,showTooltipInfo:pe,onClick:A})})]}),subRow:n.jsxs(n.Fragment,{children:[h?C||b||m&&w?n.jsx(tr,{label:G?void 0:`${I(q.period==="week"?"manager.chart.weeklyPrefix":"manager.chart.monthlyPrefix")} ${I(m??c)}`,children:w?(w(F).match(/([+-]?\d[\d.,]*|[^\d]+)/g)??[]).map((X,H)=>/\d/.test(X)?n.jsx("span",{className:se("chart-section__total__num h0"),children:X},H):n.jsx("span",{className:se("chart-section__total__unit h5"),children:X},H)):n.jsxs(n.Fragment,{children:[n.jsx("span",{className:se("chart-section__total__num h0"),children:F}),p&&n.jsx("span",{className:se("chart-section__total__unit h5"),children:I(p)})]})}):n.jsxs(tr,{children:[n.jsx("span",{className:se("chart-section__total__num h0"),children:F}),n.jsx("span",{className:se("chart-section__total__unit h5"),children:I(c)}),p&&n.jsx("span",{className:se("chart-section__total__unit h5"),children:I(p)})]}):n.jsx("span",{}),n.jsx(Ho,{items:O,className:"caption-1"})]}),children:x?n.jsx("div",{className:se("bar-chart__wrap bar-chart__loading"),"aria-busy":"true",children:n.jsx("div",{className:se("bar-chart__inner"),children:n.jsxs("div",{className:se("bar-chart__area bar-chart__area--loading"),children:[n.jsx("div",{className:se("bar-chart__plot bar-chart__plot--loading"),style:{height:Y.height},children:n.jsx(Ca,{size:32})}),n.jsx("div",{className:se("bar-chart__x-axis"),"aria-hidden":"true",children:n.jsxs("span",{className:se("bar-chart__x-axis__label"),children:[n.jsx("span",{className:se("caption-1 bar-chart__x-axis__main"),children:"\xA0"}),j.some(X=>!!X.sublabel)&&n.jsx("span",{className:"caption-1",children:"\xA0"})]})})]})})}):n.jsx(Gv,{focusableBars:e,data:j,colorA:i,colorB:d?u:void 0,labelA:I(c),labelB:d?I(d):void 0,barWidth:a??Y.barWidth,barGap:P,baseline:T,height:Y.height,maxOverride:C?100:void 0,tightMax:_,seriesColors:v?.map(X=>X.color),seriesLabels:v?.map(X=>X.label),rateLabels:C?{total:I("trainingStatus.today.tooltipTotal","\uC804\uCCB4"),done:I("trainingStatus.today.tooltipDone","\uC644\uB8CC")}:void 0,grouped:z})})}const Wu=120,Xv={left:38,right:16,top:26,bottom:24};function Jv({points:e=[],range:t,ticks:a=[],axisTitle:r,color:s,height:l=156,fallbackWidth:i=320,insets:u,overlay:c,ariaLabel:d,className:h}){const[p,m]=o.useState(null),[g,y]=o.useState(null);o.useEffect(()=>{if(!g)return;const T=te=>m(Math.round(te)||null);if(T(g.getBoundingClientRect().width),typeof ResizeObserver>"u")return;const ee=new ResizeObserver(([te])=>T(te.contentRect.width));return ee.observe(g),()=>{ee.disconnect()}},[g]);const{payload:C,anchorRect:f,openAfterDelay:_,close:b}=Vy(Wu),w=o.useCallback((T,ee)=>{T&&_(T,ee.getBoundingClientRect())},[_]),v=p??i,k=l,{left:x,right:A,top:B,bottom:E}={...Xv,...u},[D,N]=t,$=T=>N===D?x:x+(v-x-A)*(T-D)/(N-D),L=T=>B+(k-B-E)*(100-T)/100,U={x:$,y:L,plot:{left:x,right:v-A,top:B,bottom:k-E,width:Math.max(0,v-x-A),height:Math.max(0,k-B-E)}},M=e.filter(T=>!T.hollow),P=s??"var(--color-main)";return n.jsxs(n.Fragment,{children:[n.jsxs("svg",{ref:y,className:Be("line-chart",h),viewBox:`0 0 ${v} ${k}`,role:"img","aria-label":d??e.map(T=>T.description).filter(Boolean).join(", "),children:[r&&n.jsx("text",{className:"line-chart__axis-title",x:0,y:12,children:r}),[0,100].map(T=>n.jsxs("g",{children:[n.jsx("line",{className:"line-chart__grid",x1:x,x2:v-A,y1:L(T),y2:L(T)}),n.jsxs("text",{className:"line-chart__tick",x:x-6,y:L(T)+4,textAnchor:"end",children:[T,"%"]})]},T)),c?.(U),a.map(T=>n.jsx("text",{className:"line-chart__tick",x:$(T.x),y:k-5,textAnchor:"middle",children:T.label},T.x)),M.length>1&&n.jsx("polyline",{className:"line-chart__line",fill:"none",stroke:P,points:M.map(T=>`${$(T.x)},${L(T.pct)}`).join(" ")}),e.map(T=>n.jsxs("g",{className:"line-chart__dot",onPointerEnter:ee=>w(T.description,ee.currentTarget),onPointerLeave:b,children:[n.jsx("circle",{className:"line-chart__dot-hit",cx:$(T.x),cy:L(T.pct),r:12}),n.jsx("circle",{className:Be("line-chart__dot-main",T.hollow&&"is-hollow"),cx:$(T.x),cy:L(T.pct),r:4,stroke:P,fill:T.hollow?void 0:P})]},T.x))]}),C!=null&&n.jsx(Bn,{anchorRect:f,offset:10,closeOnOutsideClick:!1,className:"line-chart__tip",role:"tooltip",ariaLabel:C,children:C})]})}function Qv({icon:e,iconSize:t=56,title:a,titleClass:r="h2",description:s,tipGroups:l,start:i,className:u}){return n.jsxs("div",{className:Be("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:Be("game-intro__title",r),children:a}),s!=null&&n.jsx("p",{className:"game-intro__description body-3",children:s}),l?.map((c,d)=>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,p)=>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})]},p))]},d)),i&&n.jsx(fe,{htmlType:"button",className:i.className,variant:"main",color:i.color,size:48,width:"100%",disabled:i.disabled,onClick:i.onClick,children:i.label})]})}const Hu=(e,t,a)=>{const r=new Date(Date.UTC(e,t,a));return`${r.getUTCFullYear()}-${String(r.getUTCMonth()+1).padStart(2,"0")}-${String(r.getUTCDate()).padStart(2,"0")}`},Vu=(e,t,a,r)=>({from:Gl(e,t,a),to:new Date(Gl(e,t,a+r).getTime()-1),fromYmd:Hu(e,t,a),toYmd:Hu(e,t,a+r-1)});function e4(e,t=0){if(e.period==="month"){const s=ya(e.monthRange),l=ha(),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 Vu(i,u,1,c)}const a=e.weekRanges.find(s=>s.value===e.weekRange);if(!a){const s=new Date,l=Fa();return{from:s,to:s,fromYmd:l,toYmd:l}}const r=Sn(a.year,a.month-1);return Vu(a.year,a.month-1,r+(a.week+t)*7,7)}const Ko={small:{diameter:96,strokeWidth:16},medium:{diameter:120,strokeWidth:18},large:{diameter:160,strokeWidth:22}};function qu(e){return!Number.isFinite(e)||e<=0?0:e>=1?100:Math.min(99,Math.max(1,Math.round(e*100)))}function Uu({done:e,total:t,segments:a,color:r="var(--color-main)",size:s="medium",strokeWidth:l,label:i="%",hideCenter:u=!1,hideLabel:c=!1}){const d=typeof s=="number"?s:Ko[s].diameter,h=l??(typeof s=="number"?12:Ko[s].strokeWidth),p=d/2,m=(d-h)/2,g=2*Math.PI*m;if(a&&a.length>0){const _=a.reduce((b,w)=>{const v=b.length>0?b[b.length-1].acc:0,k=Number.isFinite(w.ratio)?w.ratio:0,x=Math.max(0,Math.min(k,1-v));return b.push({color:w.color,rotate:-90+v*360,dash:g*x,acc:v+x}),b},[]);return n.jsx("div",{className:"ring-chart",style:{width:d,height:d},children:n.jsxs("svg",{width:d,height:d,viewBox:`0 0 ${d} ${d}`,"aria-hidden":"true",children:[n.jsx("circle",{cx:p,cy:p,r:m,fill:"none",stroke:"var(--color-whiteLine)",strokeWidth:h}),_.map((b,w)=>b.dash>0&&n.jsx("circle",{cx:p,cy:p,r:m,fill:"none",stroke:b.color,strokeWidth:h,strokeDasharray:`${b.dash} ${g}`,strokeLinecap:"round",transform:`rotate(${b.rotate} ${p} ${p})`},w))]})})}const y=(t??0)>0?Math.min((e??0)/t,1):0,C=g*y,f=g-C;return n.jsxs("div",{className:"ring-chart",style:{width:d,height:d},children:[n.jsxs("svg",{width:d,height:d,viewBox:`0 0 ${d} ${d}`,"aria-hidden":"true",children:[n.jsx("circle",{cx:p,cy:p,r:m,fill:"none",stroke:"var(--color-whiteLine)",strokeWidth:h}),y>0&&n.jsx("circle",{cx:p,cy:p,r:m,fill:"none",stroke:r,strokeWidth:h,strokeDasharray:`${C} ${f}`,strokeLinecap:y<.02||y>.98?"butt":"round",transform:`rotate(-90 ${p} ${p})`})]}),!u&&n.jsxs("div",{className:`ring-chart__center${c?"":` ${d<=96?"ring-chart__center--small":s==="medium"?"ring-chart__center--medium":"ring-chart__center--large"}`}`,children:[n.jsx("span",{className:`ring-chart__pct ${d<=96?"h2":"h1"}`,children:qu(y)}),!c&&n.jsx("span",{className:`ring-chart__label ${d<=96?"caption-2":"caption-1"}${d<=96||s==="medium"?" ring-chart__label--tight":""}`,children:i})]})]})}function t4({titleKey:e,titleLevel:t,headRight:a,icon:r,showTotal:s,totalLabelKey:l,legend:i,loading:u,className:c,inGrid:d=!1,onClick:h,ariaLabel:p,tooltip:m,...g}){const{t:y}=_e.useTranslation();if(!e)return n.jsx(Uu,{...g});const C=(g.total??0)>0?qu(Math.min((g.done??0)/g.total,1)):0,f=g.size==="small",_=typeof g.size=="number"?g.size:Ko[g.size??"medium"].diameter,b=g.size==="large",w=[c,f?"chart-section--compact":b?"chart-section--full":""].filter(Boolean).join(" ")||void 0,v=r&&n.jsx("span",{className:se("chart-section-icon"),children:n.jsx(ot,{icon:r,className:se("chart-section-icon-inner")})});return n.jsx(Vo,{className:w,inGrid:d,onClick:h,ariaLabel:p,tooltip:m,title:y(e),titleLevel:t,titleClassName:f?"h5 chart-section-title--small":void 0,headRight:v||(f?void 0:a),subRow:(s||i)&&n.jsxs(n.Fragment,{children:[s?n.jsxs(tr,{label:!f&&l?y(l):void 0,children:[n.jsx("span",{className:se("chart-section__total__num h0"),children:C}),n.jsx("span",{className:se("chart-section__total__unit h5"),children:"%"})]}):n.jsx("span",{}),i&&n.jsx(Ho,{items:i})]}),children:u?n.jsx("div",{className:se("ring-chart-section-body ring-chart-section-body--offset"),children:n.jsx("div",{className:"ring-chart ring-chart--loading",style:{width:_,height:_},"aria-busy":"true",children:n.jsx(Ca,{size:32})})}):n.jsx("div",{className:se("ring-chart-section-body ring-chart-section-body--offset"),children:n.jsx(Uu,{...g,hideCenter:g.hideCenter??f})})})}function n4({label:e,value:t,change:a,changeType:r,icon:s,tooltip:l,onClick:i,children:u}){const c=o.useRef(null),{anchorRect:d,openAt:h,close:p}=za(),m=o.useCallback(()=>{l&&c.current&&h(c.current)},[l,h]),g=r??(a===void 0?void 0:a>0?"up":a<0?"down":"neutral"),y=a===void 0?void 0:a>0?`+${a}`:`${a}`,C=o.useCallback(f=>{i&&(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),i())},[i]);return n.jsxs("div",{ref:c,className:se(`stat-chart__card${i?" stat-chart__card--clickable":""}`),onClick:i,onKeyDown:i?C:void 0,onPointerEnter:m,onPointerLeave:p,onFocus:m,onBlur:p,role:i?"button":void 0,tabIndex:i?0:void 0,"aria-label":i?[e,t,y].filter(f=>f!==void 0&&f!=="").join(" "):void 0,children:[l&&d&&n.jsx(Mn,{anchorRect:{left:d.left,top:d.top+21,right:d.right,bottom:d.bottom,width:d.width,height:d.height},text:l}),n.jsxs("div",{className:se("stat-chart__card__label-row"),children:[n.jsx("span",{className:se("stat-chart__card__label h5"),children:e}),s&&n.jsx("span",{className:se("stat-chart__card__icon"),children:n.jsx(ot,{icon:s,className:se("stat-chart__card__icon-inner")})})]}),n.jsxs("div",{className:se("stat-chart__card__content"),children:[n.jsxs("div",{className:se("stat-chart__card__left"),children:[n.jsx("div",{className:se("stat-chart__card__value h2"),children:t}),y&&n.jsx("div",{className:se(`stat-chart__card__change stat-chart__card__change--${g??"neutral"} caption-1`),children:y})]}),u&&n.jsx("div",{className:se("stat-chart__card__body"),children:u})]})]})}function Gu({value:e,onChange:t,min:a=0,max:r=100,step:s=1,orientation:l="horizontal",size:i=24,disabled:u=!1,ariaLabel:c,length:d,className:h,label:p,formatValue:m,labelPos:g,labelAlign:y="right",showMinMax:C=!1,minLabel:f,maxLabel:_,showBgTick:b=!1,showFillTick:w=!1,tickStep:v,tickShape:k="dot"}){t&&!c&&At("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 x=Math.min(r,Math.max(a,e)),A=r>a?(x-a)/(r-a):0,B=l==="vertical",E=!t,D=Z=>t?.(Number(Z.target.value)),N=typeof d=="number"?`${d}px`:d,$={"--slider-ratio":String(A),"--slider-thumb":`${i}px`,...N?B?{height:N}:{width:N}:{}},L=v??s,U=(b||w)&&L>0&&r>a?Math.floor((r-a)/L+1e-6):0;if(U>0&&U<=100){const Z=k!=="dash",z=ie=>Z?`radial-gradient(circle, ${ie} 0.5px, transparent 1px)`:B?`linear-gradient(to bottom, transparent calc(50% - 2px), ${ie} calc(50% - 2px), ${ie} calc(50% + 2px), transparent calc(50% + 2px))`:`linear-gradient(to right, transparent calc(50% - 2px), ${ie} calc(50% - 2px), ${ie} calc(50% + 2px), transparent calc(50% + 2px))`,j=Z?"2px":"4px",F=[],O=[],G=[];for(let ie=0;ie<=U;ie++){const K=ie*L/(r-a);if(K>1+1e-6)break;const pe=`${((B?1-K:K)*100).toFixed(4)}%`,X=K<=A+1e-6;if(X?!w:!b)continue;const H=X?"var(--slider-tick-color-on-fill, var(--color-deepWhite))":"var(--slider-tick-color, var(--color-lightGray))";F.push(z(H)),O.push(B?`${j} var(--slider-thumb)`:`var(--slider-thumb) ${j}`),G.push(B?`center ${pe}`:`${pe} center`)}F.push(B?"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))"),O.push("100% 100%"),G.push("0 0"),$.backgroundImage=F.join(", "),$.backgroundSize=O.join(", "),$.backgroundPosition=G.join(", "),$.backgroundRepeat="no-repeat"}const M=m?m(x):p==="percent"?`${Math.round(r>a?(x-a)/(r-a)*100:0)}%`:p==="count"?`${x} / ${r}`:x===a&&f?f:x===r&&_?_:void 0,P=n.jsx("input",{type:"range",className:Be("slider",`slider--${l}`,E&&"slider--static",!p&&!C&&h),min:a,max:r,step:s,value:x,disabled:u,readOnly:E,tabIndex:E?-1:void 0,"aria-label":c,"aria-valuetext":M,"aria-orientation":l,onChange:D,style:$});if(!p&&!C)return P;const T=n.jsx("span",{className:"slider-wrap__minmax caption-1",children:f??a}),ee=n.jsx("span",{className:"slider-wrap__minmax caption-1",children:_??r}),te=C?n.jsxs("div",{className:Be("slider-track-group",`slider-track-group--${l}`,!p&&h),children:[B?ee:T,P,B?T:ee]}):P;if(!p)return te;const I=g??(B?"bottom":"right"),Y=`${Math.round(r>a?(x-a)/(r-a)*100:0)}%`,R=m?m(x):p==="percent"?Y:p==="count"?`${x} / ${r}`:String(x),q=n.jsx("span",{className:"slider-wrap__value body-3b",children:R});return n.jsxs("div",{className:Be("slider-wrap",`slider-wrap--${l}`,`slider-wrap--label-${I}`,`slider-wrap--align-${y}`,h),children:[te,q]})}const a4=.86,r4=250,Yo=(e,t,a,r)=>Math.round(Math.min(r,Math.max(a,e-t))),Zo=(e,t,a,r)=>{const s=Yo(e,t,a,r);return`${s<0?"-":"+"}${Math.abs(s)} dB`};function Xo({analyser:e,audioElement:t,orientation:a="horizontal",length:r,label:s,labelPos:l,labelAlign:i="right",floorDb:u=-60,refDb:c=-35,displayMin:d=-5,displayMax:h=25,className:p,ariaLabel:m}){const g=o.useRef(null),y=o.useRef(null),C=o.useRef(null),f=o.useRef(null),[_,b]=o.useState(null);o.useEffect(()=>{const x=P=>{const T=Zo(P,c,d,h);C.current&&(C.current.textContent=T);const ee=g.current;ee&&(ee.setAttribute("aria-valuenow",String(Yo(P,c,d,h))),ee.setAttribute("aria-valuetext",T))},A=e??K1(t)??(_&&_.el===t?_.node:null),B=y.current;if(!A||!B){B?.style.setProperty("--meter-level","0"),x(u);let P=!1;return!e&&t&&lr(t).then(T=>{!P&&T&&b({el:t,node:T})}),()=>{P=!0}}oo();const E=new Float32Array(A.fftSize);let D=0,N=0,$=0,L=0,U=null;const M=P=>{const T=Y1(A,E);D=T>D?T:D*a4;const ee=D>1e-5?20*Math.log10(D):-1/0,te=Math.max(u,ee),I=te-c,Y=Math.min(1,Math.max(0,(I-d)/(h-d)));if(B.style.setProperty("--meter-level",Y.toFixed(3)),N+=te,$+=1,P-L>=r4){const R=N/$;U=U==null?R:U*.6+R*.4,x(U),N=0,$=0,L=P}f.current=requestAnimationFrame(M)};return f.current=requestAnimationFrame(M),()=>{f.current!=null&&cancelAnimationFrame(f.current),f.current=null}},[e,t,_,u,c,d,h]);const w=typeof r=="number"?`${r}px`:r,v=n.jsx("div",{className:"audio-meter__track",style:w?a==="vertical"?{height:w}:{width:w}:{},children:n.jsx("div",{ref:y,className:"audio-meter__fill"})}),k=l??(a==="vertical"?"bottom":"right");return n.jsxs("div",{ref:g,className:Be("audio-meter",`audio-meter--${a}`,s&&`audio-meter--label-${k}`,s&&`audio-meter--align-${i}`,p),role:"meter","aria-label":m,"aria-valuemin":d,"aria-valuemax":h,"aria-valuenow":Yo(u,c,d,h),"aria-valuetext":Zo(u,c,d,h),children:[v,s&&n.jsx("span",{ref:C,className:"audio-meter__value caption-2",children:Zo(u,c,d,h)})]})}const Ku=260;function Yu({message:e,position:t,duration:a,onClose:r}){const[s,l]=o.useState(!1),[i,u]=o.useState(!1),c=o.useRef(i),d=o.useRef(s);o.useEffect(()=>{c.current=i},[i]),o.useEffect(()=>{d.current=s},[s]);const h=o.useRef(null),p=o.useRef(""),m=o.useRef(r);o.useEffect(()=>{m.current=r});const g=a,y=o.useRef(null),C=o.useRef(0),f=o.useRef(0),_=o.useRef(!1),b=o.useRef(null),w=o.useRef(null),v=o.useRef(null),k=o.useRef(null),x=o.useRef(()=>{});x.current=E=>{E<0||(C.current=Date.now(),f.current=E,y.current=setTimeout(()=>{y.current=null,l(!1),b.current=setTimeout(()=>{u(!1);try{m.current()}catch{}},Ku)},E))};const A=o.useCallback(()=>{_.current||!y.current||(_.current=!0,clearTimeout(y.current),y.current=null,f.current=Math.max(0,f.current-(Date.now()-C.current)))},[]),B=o.useCallback(()=>{_.current&&(_.current=!1,x.current(f.current))},[]);return o.useEffect(()=>{if(e!==p.current&&(y.current&&(clearTimeout(y.current),y.current=null),b.current&&(clearTimeout(b.current),b.current=null)),e){if(d.current)return g>0&&!y.current&&(_.current?f.current=g:x.current(g)),p.current=e,()=>{y.current&&(clearTimeout(y.current),y.current=null),b.current&&(clearTimeout(b.current),b.current=null)};const E=()=>{const D=h.current;if(D)try{D.classList.remove("is-visible"),D.style.transition="none",t==="top"?D.style.transform="translateX(-50%) translateY(-16px)":D.style.transform="translateX(-50%) translateY(16px)",D.style.opacity="0",D.offsetWidth,D.style.transition="",D.classList.add("is-visible"),k.current&&clearTimeout(k.current),k.current=setTimeout(()=>{k.current=null;try{D.style.opacity="",D.style.transform="",D.style.transition=""}catch{}},60)}catch{}};c.current?(E(),l(!0)):(u(!0),w.current=requestAnimationFrame(()=>{v.current=requestAnimationFrame(()=>{E(),l(!0)})})),g>0&&(_.current=!1,x.current(g))}else l(!1),b.current=setTimeout(()=>u(!1),Ku);return p.current=e,()=>{y.current&&clearTimeout(y.current),b.current&&clearTimeout(b.current),w.current&&cancelAnimationFrame(w.current),v.current&&cancelAnimationFrame(v.current),k.current&&clearTimeout(k.current),y.current=null,b.current=null,w.current=null,v.current=null,k.current=null}},[e,g,t]),{mounted:i,showing:s,popupRef:h,pause:A,resume:B}}function va({message:e="",position:t="top",type:a="normal",onClose:r=()=>{},duration:s=2e3}){const{mounted:l,showing:i,popupRef:u,pause:c,resume:d}=Yu({message:e,position:t,duration:s,onClose:r}),h=o.useRef(null),[p,m]=o.useState(!1);if(o.useEffect(()=>{i?m(!0):l||m(!1)},[i,l]),!l)return null;const g=a==="notice"||a==="warning"?a:"normal",y=n.jsx("div",{ref:u,className:`toast toast--${t} ${i?"is-visible":""}`,role:"status","aria-live":"polite",onPointerEnter:C=>{h.current=C.pointerType},onMouseEnter:()=>{h.current!=="touch"&&c()},onMouseLeave:d,onFocusCapture:c,onBlurCapture:d,children:n.jsx("div",{className:`toast__inner toast__inner--${g} body-2`,"aria-hidden":p||i?void 0:!0,children:n.jsx("span",{className:"toast__text",children:e})})});return typeof document<"u"?hn.createPortal(y,document.body):y}const o4=24;function s4({value:e,max:t=100,size:a=8,color:r,trackColor:s,label:l,formatValue:i,labelPos:u,labelAlign:c="right",ariaLabel:d,className:h}){const p=Number.isFinite(t)&&t>0?t:1,m=Math.max(0,Math.min(Number.isFinite(e)?e:0,p)),g=m/p*100,y=Number.isFinite(t)&&t>0?t:0,C=u??(a>=o4?"inside":"bottom"),f=C==="center"?"inside":C,_=f==="inside"&&(c==="left"?g>=15:c==="center"?g>=50:g>=85),b={};return r&&(b["--progress-bar-fill"]=r),s&&(b["--progress-bar-track"]=s),n.jsxs("div",{className:Be("progress-bar",`progress-bar--${a}`,`progress-bar--label-${f}`,l&&`progress-bar--align-${c}`,l&&_&&"progress-bar--label-on-fill",h),style:b,children:[n.jsx("div",{className:"progress-bar__track",role:"progressbar","aria-valuenow":m,"aria-valuemin":0,"aria-valuemax":y,"aria-valuetext":l?i?i(m):l==="percent"?void 0:l==="raw"?String(m):`${m} / ${y}`:void 0,"aria-label":d,children:n.jsx("div",{className:"progress-bar__fill",style:{width:`${g}%`}})}),l&&n.jsx("span",{className:"progress-bar__label caption-1b",children:i?i(m):l==="percent"?`${Math.round(g)}%`:l==="raw"?String(m):`${m} / ${y}`})]})}const Zu={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0},l4="rgba(255, 255, 255, 0.16)";function Xu({max:e,index:t,inactiveBg:a,inactiveColor:r,transparent:s,variant:l="numbered",announce:i=!1,ariaLabel:u}){const{t:c}=_e.useTranslation(),d=yn("(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,p=u??c("progress.steps",{current:h+1,total:e,defaultValue:"\uC9C4\uD589 \uB2E8\uACC4 {{current}} / {{total}}"}),m={};if(a&&(m["--pi-inactive-bg"]=a),r&&(m["--pi-inactive-color"]=r),s&&(a||(m["--pi-inactive-bg"]=l4),r||(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:p,children:[i&&n.jsx("span",{style:Zu,children:p}),Array.from({length:e}).map((y,C)=>n.jsx("span",{"aria-hidden":"true",className:`progress-indicator-dot--dot${C<h?" done":C===h?" active":""}`},C))]});const g=i?n.jsx("span",{role:"status",style:Zu,children:p}):null;return d?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"progress-indicator progress-indicator--mobile",style:m,role:"list","aria-label":p,children:n.jsxs("span",{role:"listitem",className:"progress-indicator-dot active body-3",children:[h+1," / ",e]})}),g]}):n.jsxs(n.Fragment,{children:[g,n.jsx("div",{className:"progress-indicator",style:m,role:"list","aria-label":p,children:Array.from({length:e}).map((y,C)=>n.jsx("span",{role:"listitem","aria-current":C===h?"step":void 0,className:`progress-indicator-dot ${C<h?" done":C===h?" active":""} body-3`,children:C+1},C))})]})}function i4(e){if(!e)return[];const t=[];let a=0,r="";for(const s of e.trim()){if(s==="("?a++:s===")"&&a--,/\s/.test(s)&&a===0){r&&(t.push(r),r="");continue}r+=s}return r&&t.push(r),t}function u4(e,t,a=0){const r=Array.from({length:Math.max(0,t)},()=>0);for(const s of e){let l=0;for(const i of s){if(l>=r.length)break;const u=Ju(i.span),c=Math.min(u,r.length-l);if(c===1)r[l]=Math.max(r[l],i.width);else{const d=Math.max(0,(i.width-a*(c-1))/c);for(let h=l;h<l+c;h++)r[h]=Math.max(r[h],d)}l+=c}}return r}function Ju(e){const t=typeof e=="number"?e:parseInt(String(e??""),10);return Number.isFinite(t)&&t>=1?Math.floor(t):1}function c4(e,t){const a=/span\s+(\d+)/.exec(`${e??""} ${t??""}`);return a?Ju(parseInt(a[1],10)):1}function d4(e,t){const{isFixed:a,floorOf:r,containerWidth:s}=t,l=e.reduce((p,m,g)=>p+(a(g)?m:0),0),i=e.reduce((p,m,g)=>p+(a(g)?0:m),0),u=s-l;if(!(s>0&&i>0&&u>0))return[...e];const c=u/i,d=e.map((p,m)=>a(m)?p:Math.max(r(m),Math.round(p*c))),h=Math.round(u-d.reduce((p,m,g)=>p+(a(g)?0:m),0));if(h!==0){let p=-1;d.forEach((m,g)=>{!a(g)&&(p<0||m>d[p])&&(p=g)}),p>=0&&(d[p]=Math.max(r(p),d[p]+h))}return d}const p4=16;function h4(e,t=p4){return e.map(a=>{const r=a.sortable&&!a.sorted;return Math.max(a.declaredMin,Math.ceil(a.headWidth+(r?t:0)))})}function m4({children:e,className:t,style:a,span:r,rowLabel:s,onRowClick:l}){const i=r&&r>1?{gridColumn:`span ${r}`,...a}:a;return n.jsx("div",{role:"cell",className:t?`table-cell ${t}`:"table-cell",style:i,"aria-colspan":r&&r>1?r:void 0,children:s&&l?n.jsx("button",{type:"button",className:"table-cell__row-button","aria-label":s,children:e}):e})}function Jo({variant:e="default",children:t,className:a,draggable:r,onClick:s,onMouseEnter:l,onMouseLeave:i,onDragStart:u,onDragEnd:c,expandedContent:d,colSpan:h,describedBy:p,rowHasButton:m}){const g=o.useCallback(y=>{s&&y.target===y.currentTarget&&(y.key==="Enter"||y.key===" ")&&(y.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(Ca,{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:a?`table-row ${a}`:"table-row",draggable:r,onClick:s,onKeyDown:s?g:void 0,onMouseEnter:l,onMouseLeave:i,onDragStart:u,onDragEnd:c,role:"row",tabIndex:s&&!m?0:void 0,"aria-describedby":s&&!m?p:void 0,children:t}),d&&n.jsx("div",{role:"row",className:"table-row-expand",children:n.jsx("div",{role:"cell","aria-colspan":h,className:"table-row-expand__cell",children:d})})]})}function C4({dir:e}){return n.jsx(e==="asc"?tl:el,{className:"table-field__sort-arrow",size:16,strokeWidth:2})}function f4({children:e,onClick:t,className:a,sortDir:r,ariaSort:s,onResizeStart:l}){const i=n.jsxs(n.Fragment,{children:[e,r&&n.jsx(C4,{dir:r})]});return n.jsxs("div",{onClick:t,role:"columnheader","aria-sort":s,className:Be("table-field body-3",a,r?"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 Qu(e){return e&&e!=="left"?`table-col--${e}`:void 0}function Qo({fields:e=[],sort:t,sortable:a=!0,headerGroups:r,items:s=[],renderRow:l,onRowClick:i,isRowClickable:u,onRowMouseEnter:c,onRowMouseLeave:d,onRowDragStart:h,onRowDragEnd:p,draggingId:m,gridTemplateColumns:g,mobileGridTemplateColumns:y,resizable:C=!0,resizeMode:f="grow",resizeStorageKey:_,size:b="small",title:w,icon:v,count:k,collapsed:x=!1,onToggleCollapse:A,headerActions:B,empty:E,loading:D,dragOver:N=!1,onDragOver:$,onDragLeave:L,onDrop:U,renderExpandedRow:M,expandedId:P}){const{t:T}=_e.useTranslation(),ee=o.useId(),te=`table-title-${ee}`,I=`table-row-hint-${ee}`,[Y,R]=o.useState(null),q=o.useCallback((ae,ye)=>{const He=e[ye];if(!He)return;if(He.sortValue)return He.sortValue(ae);if(He.sortKey)return ae[He.sortKey];const Ke=l(ae)[ye]?.content;return typeof Ke=="string"||typeof Ke=="number"?Ke:void 0},[e,l]),Z=!t&&a&&!e.some(ae=>ae.sortDir!==void 0||ae.onClick),z=o.useCallback(ae=>{const ye=e[ae];if(!ye||ye.sortable===!1)return!1;if(ye.sortValue||ye.sortKey)return!0;const He=s[0];return He!==void 0&&q(He,ae)!==void 0},[e,s,q]),j=o.useMemo(()=>t?e.map(ae=>{if(!ae.sortKey||ae.sortDir!==void 0)return ae;const ye=t.field(String(ae.label??""),ae.sortKey);return{...ae,sortDir:ye.sortDir,onClick:ae.onClick??ye.onClick}}):Z?e.map((ae,ye)=>z(ye)?{...ae,sortDir:Y?.index===ye?Y.asc?"asc":"desc":null,onClick:()=>R(He=>He?.index===ye?{index:ye,asc:!He.asc}:{index:ye,asc:!0})}:ae):e,[e,t,Z,Y,z]),F=o.useMemo(()=>{if(!Z||!Y)return s;const{index:ae,asc:ye}=Y;return[...s].sort((He,Ke)=>gr(q(He,ae),q(Ke,ae),ye))},[s,Z,Y,q]),O=yn("(max-width: 767px)"),G=y&&O?y:null,ie=C&&!O,K=o.useRef(ie);K.current=ie;const pe=48,X=40,H=o.useRef(()=>pe),ne=_?`table-cols:${_}`:null,V=o.useRef(null),W=o.useRef(null),oe=o.useRef(null),xe=o.useRef(null),[be,me]=o.useState(!1),[ke,Le]=o.useState(0),Me=o.useCallback(()=>{const ae=oe.current;if(!ae)return;const ye=xe.current,He=V.current;if(ye&&(ye.style.minWidth="",He)){const Ke=He.scrollWidth,vt=K.current?X:0;ye.style.minWidth=Ke>ae.clientWidth+1?`${Ke+vt}px`:""}me(ae.scrollWidth>ae.clientWidth+1),Le(ae.clientWidth)},[]),le=o.useCallback((ae,ye)=>{const He=ae.current;He&&W.current&&W.current.unobserve(He),ae.current=ye,ye?(!W.current&&typeof ResizeObserver<"u"&&(W.current=new ResizeObserver(()=>Me())),W.current?.observe(ye)):!oe.current&&!xe.current&&(W.current?.disconnect(),W.current=null),Me()},[Me]),ve=o.useCallback(ae=>le(oe,ae),[le]),$e=o.useCallback(ae=>le(xe,ae),[le]);o.useEffect(()=>{Me()}),o.useEffect(()=>{if(typeof window>"u")return;const ae=typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>Me()):null;return window.addEventListener("resize",Me),()=>{ae!=null&&cancelAnimationFrame(ae),window.removeEventListener("resize",Me)}},[Me]);const Ae=o.useRef(()=>!1),Ie=o.useRef([]),ze=o.useRef(null),dt=ae=>{if(!ae||typeof window>"u")return null;try{const ye=JSON.parse(window.localStorage.getItem(ae)??"null");return Array.isArray(ye)&&ye.length>0&&ye.every(He=>typeof He=="number"&&Number.isFinite(He)&&He>0)?ye:null}catch{return null}},[st,et]=o.useState(()=>dt(ne)),[gt,Se]=o.useState(ne),[Ge,we]=o.useState(()=>dt(ne)!==null);if(gt!==ne){Se(ne);const ae=dt(ne);et(ae),we(ae!==null)}const qe=o.useRef(st);o.useEffect(()=>{qe.current=st},[st]);const Ye=o.useCallback(ae=>{const ye=ze.current;if(!ye)return;const He=qe.current;if(He){const Ke=[...He],vt=()=>pe;if(ye.next!=null&&ye.startWNext!=null){const Ue=ae.clientX-ye.startX,ht=Math.max(vt()-ye.startW,Math.min(ye.startWNext-vt(),Ue));Ke[ye.index]=ye.startW+ht,Ke[ye.next]=ye.startWNext-ht}else Ke[ye.index]=Math.max(vt(),ye.startW+(ae.clientX-ye.startX));qe.current=Ke,et(Ke)}},[]),mt=o.useCallback(()=>{if(ze.current=null,window.removeEventListener("pointermove",Ye),window.removeEventListener("pointerup",mt),window.removeEventListener("pointercancel",mt),document.body.style.cursor="",document.body.style.userSelect="",ne&&qe.current)try{window.localStorage.setItem(ne,JSON.stringify(qe.current))}catch{}},[Ye,ne]),wt=o.useCallback((ae,ye)=>{ye.preventDefault(),ye.stopPropagation();const He=V.current;if(!He)return;const Ke=Array.from(He.children).map(Ue=>Ue.getBoundingClientRect().width),vt=f==="fit"?j.findIndex((Ue,ht)=>ht>ae&&Ue.resizable!==!1):-1;ze.current=vt>=0?{index:ae,startX:ye.clientX,startW:Ke[ae],next:vt,startWNext:Ke[vt]}:{index:ae,startX:ye.clientX,startW:Ke[ae]},qe.current=Ke,et(Ke),we(!0),window.addEventListener("pointermove",Ye),window.addEventListener("pointerup",mt),window.addEventListener("pointercancel",mt),document.body.style.cursor="col-resize",document.body.style.userSelect="none"},[Ye,mt,f,j]),yt=o.useCallback(()=>{const ae=V.current,ye=ae?.closest(".table-wrap");if(!ae||!ye)return null;const He=ye.style.getPropertyValue("--table-grid-cols");ye.style.setProperty("--table-grid-cols",j.map(()=>"max-content").join(" "));const Ke=Array.from(ye.querySelectorAll(".table-row")).filter($t=>!$t.classList.contains("table-row--loading")&&!$t.classList.contains("table-row--empty")),vt=$t=>Array.from($t.children).map(Pt=>{const Ut=window.getComputedStyle(Pt);return{width:Pt.getBoundingClientRect().width,span:c4(Ut.gridColumnStart,Ut.gridColumnEnd)}}),Ue=parseFloat(window.getComputedStyle(ae).columnGap)||0,ht=Ke.map(vt),cn=vt(ae),dn=u4([cn,...ht],j.length,Ue),zt=h4(j.map(($t,Pt)=>({declaredMin:H.current(Pt),headWidth:cn[Pt]?.width??0,sortable:$t.sortDir!==void 0||!!$t.onClick,sorted:!!$t.sortDir}))),qt=$t=>zt[$t]??H.current($t),Ht=j.map(($t,Pt)=>{const Ut=dn[Pt],Jt=Ae.current(Pt)?parseFloat(Ie.current[Pt]):NaN;return Number.isFinite(Jt)&&Math.ceil(Ut)>Jt&&At(`table-fixed-col-overflow:${Pt}:${Jt}`,`[ihabdevteam-core] Table \uC758 ${Pt+1}\uBC88\uC9F8 \uC5F4\uC744 ${Jt}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(Jt)?Jt:Math.max(H.current(Pt),Math.ceil(Ut))}),Nt=window.getComputedStyle(ae),An=(parseFloat(Nt.paddingLeft)||0)+(parseFloat(Nt.paddingRight)||0),an=ye.clientWidth-An;return He?ye.style.setProperty("--table-grid-cols",He):ye.style.removeProperty("--table-grid-cols"),d4(Ht,{isFixed:$t=>Ae.current($t),floorOf:qt,containerWidth:an})},[j,f]),Et=(ae,ye)=>ae!==null&&ae.length===ye.length&&ae.every((He,Ke)=>He===ye[Ke]),at=o.useRef(yt);o.useEffect(()=>{at.current=yt});const[rt,Dt]=o.useState(0),Bt=F.length>0,Lt=`${ne??""}|${rt}|${j.length}|${ke}`,It=!Ge&&ie&&ne!==null&&!D?`${Lt}|${Bt?1:0}`:null,xt=o.useRef(null);o.useEffect(()=>{if(It===null||!Bt||xt.current===Lt)return;const ae=at.current();ae&&(xt.current=Lt,et(ye=>Et(ye,ae)?ye:ae))},[It]);const lt=o.useCallback(()=>{if(ne)try{window.localStorage.removeItem(ne)}catch{}we(!1);const ae=at.current();et(ae),qe.current=ae,Dt(ye=>ye+1)},[ne]);o.useEffect(()=>()=>{ze.current&&(window.removeEventListener("pointermove",Ye),window.removeEventListener("pointerup",mt),window.removeEventListener("pointercancel",mt),document.body.style.cursor="",document.body.style.userSelect="")},[Ye,mt]);const Ct=j.length>0&&j.every(ae=>ae.width!=null)?j.map(ae=>typeof ae.width=="number"?`${ae.width}px`:String(ae.width)).join(" "):null;j.some(ae=>ae.width!=null)&&!Ct&&At(`table-field-width:${j.map(ae=>ae.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."),Ct&&g&&At("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=g??Ct??void 0,_t=i4(it),ut=_t.filter(ae=>/\b(auto|min-content|max-content)\b|fit-content\(/.test(ae));ut.length>0&&At(`table-content-track:${g}`,`[ihabdevteam-core] Table \uC758 gridTemplateColumns \uC5D0 \uB0B4\uC6A9\uC73C\uB85C \uD06C\uAE30\uAC00 \uC815\uD574\uC9C0\uB294 \uD2B8\uB799(${ut.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: ${g})`);const St=j.findIndex(ae=>!!ae.sortDir);j.filter(ae=>!!ae.sortDir).length>1&&At("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 ue=ae=>ae===St?j[ae].sortDir==="asc"?"ascending":"descending":j[ae].onClick?"none":void 0,Te=ae=>/^\d+(\.\d+)?px$/.test(_t[ae]??""),De=ae=>{const ye=_t[ae]??"",He=/^minmax\(\s*(\d+(?:\.\d+)?)px\s*,/.exec(ye)??/^(\d+(?:\.\d+)?)px$/.exec(ye);return He?parseFloat(He[1]):pe};Ae.current=Te,H.current=De,Ie.current=_t;const tt=ae=>f==="fit"&&!Te(ae)?"fr":"px",pt=st&&st.length===j.length&&!O,jt=G??(pt?j.map((ae,ye)=>ae.resizable===!1&&_t[ye]?_t[ye]:`${st[ye]}${tt(ye)}`).join(" "):it),je=jt?{"--table-grid-cols":jt}:void 0,nt=w!==void 0;return n.jsxs("div",{ref:ve,className:`table-wrap table-wrap--${b}${ie?" table-wrap--resizable":""}${N?" table-wrap--dragover":""}${x?" table-wrap--collapsed":""}`,style:je,onDragOver:$,onDragLeave:L,onDrop:U,tabIndex:be?0:void 0,role:be?"region":void 0,"aria-label":be?typeof w=="string"?w:T("table.scrollRegion","\uAC00\uB85C\uB85C \uAD74\uB9B4 \uC218 \uC788\uB294 \uD45C"):void 0,children:[!!i&&n.jsx("span",{id:I,className:"table-row-hint",children:T("table.rowActionHint","\uC904\uC744 \uB204\uB974\uBA74 \uC790\uC138\uD788 \uBD05\uB2C8\uB2E4")}),n.jsxs("div",{ref:$e,role:"table","aria-labelledby":nt&&typeof w=="string"?te:void 0,className:"table body-2",children:[nt&&n.jsxs("div",{className:Be("table-header",A&&"table-header--clickable"),onClick:A,role:"caption",children:[A&&n.jsx(fe,{htmlType:"button",size:Ft,type:"dot",variant:"transparent-gray",useBorder:!1,icon:x?"chevron-right":"chevron-down",ariaLabel:x?T("common.expand","\uD3BC\uCE58\uAE30"):T("common.collapse","\uC811\uAE30"),ariaExpanded:!x,className:"table-header__chevron"}),v&&n.jsx(ot,{icon:v,label:typeof w=="string"?w:void 0,className:"table-header__icon"}),n.jsx("span",{id:te,className:"table-header__title h5b",children:w}),k!==void 0&&n.jsx("span",{className:"table-header__count body-3b",children:k}),B&&n.jsx("span",{className:"table-header__actions",onClick:ae=>ae.stopPropagation(),children:B})]}),!x&&n.jsxs(n.Fragment,{children:[r&&r.length>0&&n.jsx("div",{role:"row",className:"table-fields table-fields--groups",children:r.map((ae,ye)=>n.jsx("div",{role:"columnheader","aria-colspan":ae.span,className:Be("table-field body-3",ae.className),style:{gridColumn:`span ${ae.span}`},children:ae.label},ye))}),n.jsxs("div",{role:"presentation",className:Be("table-fields-strip",ie&&"table-fields-strip--resizable"),children:[n.jsx("div",{role:"row",className:"table-fields",ref:V,children:j.map((ae,ye)=>n.jsx(f4,{onClick:ae.onClick,className:Be(ae.className,Qu(ae.align)),sortDir:ae.sortDir,ariaSort:ue(ye),onResizeStart:ie&&ye<j.length-1&&ae.resizable!==!1&&(f!=="fit"||j.some((He,Ke)=>Ke>ye&&He.resizable!==!1))?He=>wt(ye,He):void 0,children:ae.label},ye))}),ie&&n.jsx("div",{className:"table-fields__reset-dock",children:n.jsx(fe,{htmlType:"button",size:Ft,type:"dot",variant:"transparent-gray",useBorder:!1,icon:"chevrons-left-right-ellipsis",ariaLabel:T("table.resetColumns","\uCE78 \uB108\uBE44 \uCD08\uAE30\uD654"),showTooltipInfo:T("table.resetColumns","\uCE78 \uB108\uBE44 \uCD08\uAE30\uD654"),className:"table-fields__reset",onClick:lt})})]}),n.jsx("div",{role:"rowgroup",className:"table-body",children:D?n.jsx(Jo,{variant:"loading",colSpan:j.length||void 0}):F.length===0&&E?n.jsx(Jo,{variant:"empty",colSpan:j.length||void 0,children:E}):F.map((ae,ye)=>{const He=m!=null&&ae.id===m,Ke=!!i&&(u?u(ae):!0),vt=P!=null&&ae.id!=null&&(P instanceof Set?P.has(ae.id)||[...P].some(Ue=>String(Ue)===String(ae.id)):String(ae.id)===String(P));return n.jsx(Jo,{className:`${Ke?" table-row--clickable":""}${h?" table-row--draggable":""}${He?" table-row--dragging":""}`.trim(),draggable:!!h,onClick:Ke?()=>i(ae):void 0,colSpan:j.length||void 0,rowHasButton:l(ae).some(Ue=>!!Ue.rowLabel),describedBy:I,onMouseEnter:c?Ue=>c(ae,Ue):void 0,onMouseLeave:d?Ue=>d(ae,Ue):void 0,onDragStart:h?Ue=>h(ae,Ue):void 0,onDragEnd:p?Ue=>p(ae,Ue):void 0,expandedContent:vt&&M?M(ae):void 0,children:l(ae).map((Ue,ht)=>n.jsx(m4,{className:Be(Ue.className,Qu(j[ht]?.align)),style:Ue.style,span:Ue.span,rowLabel:Ke?Ue.rowLabel:void 0,onRowClick:Ke?()=>i(ae):void 0,children:Ue.content},ht))},ae.id!=null?`${typeof ae.id}:${ae.id}`:`__idx:${ye}`)})})]})]})]})}function ec(e,t){return t!=="wornAt"?String(e[t]??""):kv(e.wornYear,e.wornMonth,e.wornDay)}function b4({rows:e,loading:t,onSelect:a,onDelete:r,onWear:s,onRelease:l,onAdd:i}){const{t:u,i18n:c}=_e.useTranslation(),d=f=>f==="left"?u("device.direction.left","\uC88C"):u("device.direction.right","\uC6B0"),{sort:h,field:p}=$y(),m=o.useMemo(()=>{if(!h)return e;const{key:f,asc:_}=h;return[...e].sort((b,w)=>{if(f==="worn"){const v=Number(w.worn)-Number(b.worn);return _?v:-v}return gr(ec(b,f),ec(w,f),_)})},[e,h]),{pageRows:g,pageSizeProps:y,paginationProps:C}=Ly(m,h);return n.jsxs("div",{className:"dlp-side-table",children:[n.jsx(Wo,{count:{value:e.length,unit:u("customers.device.unit","\uAC1C")},pageSize:y,pagination:C,actions:i&&n.jsx(fe,{htmlType:"button",size:40,type:"bar",variant:"main",icon:"plus",label:u("customers.device.addButton","\uAE30\uAE30 \uCD94\uAC00"),onClick:i})}),n.jsx(Qo,{loading:t,resizable:!0,resizeMode:"fit",resizeStorageKey:"customer-device-history-v2",fields:[{...p(u("customers.device.wearingNow","\uCC29\uC6A9"),"worn"),resizable:!1},p(u("device.direction.label","\uBC29\uD5A5"),"side"),p(u("device.deviceType","\uC885\uB958"),"device"),p(u("device.brand","\uBE0C\uB79C\uB4DC"),"brand"),p(u("device.fitType","\uCC29\uC6A9\uD615\uD0DC"),"fitType"),p(u("device.productName","\uC81C\uD488\uBA85"),"productName"),p(u("device.wornDate","\uCC29\uC6A9\uC77C"),"wornAt"),...r?[{label:"",resizable:!1}]:[]],items:g.map((f,_)=>({id:f.id??`${f.side}-${_}`,row:f})),gridTemplateColumns:`56px 110px 110px minmax(120px, 1fr) 100px minmax(120px, 1fr) 110px${r?" 80px":""}`,renderRow:({row:f})=>[{content:n.jsx("span",{className:"dlp-worn-check",onClick:_=>_.stopPropagation(),children:n.jsx(Oo,{checked:f.worn,disabled:f.worn?!l:!s,ariaLabel:f.worn?u("customers.device.unwear","\uCC29\uC6A9 \uD574\uC81C"):u("customers.device.wear","\uCC29\uC6A9"),onChange:_=>{_?s?.(f):l?.(f)}})})},{content:n.jsx("span",{children:d(f.side)})},{content:f.device?n.jsx(ln,{size:"small",variant:Au(f.device),fill:"soft",label:Nu(f.device,u)}):n.jsx("span",{})},{content:n.jsx("span",{children:f.brand})},{content:n.jsx("span",{children:f.fitType||"-"})},{content:n.jsx("span",{children:f.productName||"-"})},{content:n.jsx("span",{className:"dlp-date",children:Fo(f.wornYear,f.wornMonth,f.wornDay,c.language)||"-"})},...r?[{content:n.jsx("span",{className:"dlp-row-actions",children:n.jsx(fe,{htmlType:"button",size:28,type:"bar",variant:"transparent-gray",label:u("common.delete","\uC0AD\uC81C"),onClick:_=>{_?.stopPropagation(),r(f)}})})}]:[]],onRowClick:({row:f})=>a(f),empty:u("customers.device.historyEmpty","\uB4F1\uB85D\uB41C \uAE30\uAE30 \uC774\uB825\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.")})]})}function tc(e,t){return e?{role:t?.role??"button",tabIndex:0,...t?.selected===void 0?{}:{"aria-selected":t.selected},onKeyDown:a=>{a.target===a.currentTarget&&(a.key!=="Enter"&&a.key!==" "||(a.preventDefault(),e(a)))}}:{}}function g4(e,t){return new Date(e,t+1,0).getDate()}function y4(e,t){return new Date(e,t,1).getDay()}function v4({visits:e=[],onVisitClick:t,onVisitMove:a,onDayClick:r,today:s}){const{t:l,i18n:i}=_e.useTranslation(),u=o.useMemo(()=>l("calendar.dow",{returnObjects:!0}),[l]),c=cr(s),[d,h]=o.useState(()=>Number(c.slice(0,4))),[p,m]=o.useState(()=>Number(c.slice(5,7))-1),[g,y]=o.useState(null),C=o.useRef(null),f=o.useMemo(()=>{const x={};return e.forEach(A=>{x[A.date]||(x[A.date]=[]),x[A.date].push(A)}),x},[e]),_=o.useMemo(()=>{const x=g4(d,p),A=y4(d,p),B=[];for(let E=0;E<A;E++)B.push(null);for(let E=1;E<=x;E++)B.push(E);for(;B.length<35;)B.push(null);return B},[d,p]),b=o.useCallback(()=>{p===0?(h(x=>x-1),m(11)):m(x=>x-1)},[p]),w=o.useCallback(()=>{p===11?(h(x=>x+1),m(0)):m(x=>x+1)},[p]),v=x=>`${d}-${String(p+1).padStart(2,"0")}-${String(x).padStart(2,"0")}`,k=x=>v(x)===c;return n.jsxs("div",{children:[n.jsxs("div",{className:"calendar-nav",children:[n.jsx("button",{type:"button",className:"calendar-nav__button",onClick:b,"aria-label":l("calendar.prevMonth","\uC774\uC804 \uB2EC"),children:n.jsx(ot,{icon:"chevron-left",label:"",className:"",svgClassName:"calendar-nav__button-icon",size:18})}),n.jsx("span",{className:"calendar-nav__title h5","aria-live":"polite",children:co(l,i.language,d,p+1)}),n.jsx("button",{type:"button",className:"calendar-nav__button",onClick:w,"aria-label":l("calendar.nextMonth","\uB2E4\uC74C \uB2EC"),children:n.jsx(ot,{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(x=>n.jsx("div",{className:"calendar-day-header body-3",children:x},x)),_.map((x,A)=>{if(x===null)return n.jsx("div",{className:"calendar-cell empty"},`empty-${A}`);const B=x,E=v(B),D=f[E]??[],N=ql(E,i.language),$=g===E;return n.jsxs("div",{className:`calendar-cell${k(B)?" today":""}${$?" drag-over":""}${r?" calendar-cell--clickable":""}`,role:r?"button":void 0,tabIndex:r?0:void 0,"aria-label":r?l("calendar.addOnDate",{date:E}):void 0,"aria-current":k(B)?"date":void 0,onClick:r?()=>r(E):void 0,onKeyDown:r?L=>{L.target===L.currentTarget&&(L.key!=="Enter"&&L.key!==" "||(L.preventDefault(),r(E)))}:void 0,onDragOver:a?L=>{L.preventDefault(),y(E)}:void 0,onDragLeave:a?L=>{L.currentTarget.contains(L.relatedTarget)||y(null)}:void 0,onDrop:a?L=>{L.preventDefault(),C.current!=null&&(a(C.current,E),C.current=null),y(null)}:void 0,children:[n.jsx("div",{className:"calendar-cell__number body-3",children:B}),D.length>0&&(()=>{const L=[{key:"visited",label:l("calendar.legend.visited","\uBC29\uBB38"),count:D.filter(M=>(M.status??"visited")==="visited").length},{key:"scheduled",label:l("calendar.legend.scheduled","\uC608\uC57D"),count:D.filter(M=>M.status==="scheduled").length},{key:"noVisit",label:l("calendar.legend.noVisit","\uBBF8\uBC29\uBB38"),count:D.filter(M=>M.status==="noVisit").length}].filter(M=>M.count>0),U=L.length===1&&L[0].key==="visited"?l("calendar.visitCount",{count:D.length,defaultValue:"\uBC29\uBB38 {{count}}\uAC74"}):L.map(M=>l("calendar.statusCount",{label:M.label,count:M.count,defaultValue:"{{label}} {{count}}\uAC74"})).join(" \xB7 ");return n.jsxs("span",{className:"calendar-cell__visit-count caption-1","aria-label":`${N} ${U}`,children:[L.map(M=>n.jsx("span",{className:`calendar-cell__visit-dot calendar-cell__visit-dot--${M.key}`,"aria-hidden":"true"},M.key)),D.length]})})(),n.jsx("div",{className:"calendar-cell__badges",children:D.map((L,U)=>n.jsxs("div",{draggable:!!a,className:`calendar-visit-badge${L.status==="noVisit"?" calendar-visit-badge--no-visit":L.status==="scheduled"?" calendar-visit-badge--scheduled":""}${t?" calendar-visit-badge--clickable":""}${a?" calendar-visit-badge--draggable":""}`,onDragStart:a?M=>{C.current=L.id,M.dataTransfer.effectAllowed="move"}:void 0,onDragEnd:a?()=>{C.current=null,y(null)}:void 0,onClick:t?M=>{M.stopPropagation(),t(L)}:void 0,...tc(t?()=>t(L):void 0),"aria-label":[N,L.time?Zl(L.time,l):null,L.customer,l(L.status==="noVisit"?"calendar.legend.noVisit":L.status==="scheduled"?"calendar.legend.scheduled":"calendar.legend.visited")].filter(Boolean).join(" "),children:[L.time&&n.jsx("span",{className:"calendar-visit-badge__time body-3",children:Zl(L.time,l)}),n.jsx("span",{className:"calendar-visit-badge__name body-3",children:L.customer}),L.status==="noVisit"&&n.jsx("span",{className:"calendar-visit-badge__no-visit caption-1",children:l("calendar.legend.noVisit","\uBBF8\uBC29\uBB38")})]},L.id??U))})]},B)})]})]})}const _4={page:"h3",pagePopup:"h4",popup:"h5"};function _a({type:e="page",title:t,headingLevel:a=2,icon:r,action:s,disc:l,children:i,inGrid:u=!1,className:c,style:d}){const h=_4[e],p=t||l||s||r,m=a?`h${a}`:"div";return n.jsxs("div",{className:Be("section",`section--${e}`,u&&"section--in-grid",c),style:d,children:[p&&n.jsxs("div",{className:"section__header",children:[n.jsxs("div",{className:"section__title-row",children:[r&&n.jsx(ot,{icon:r,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 es=null,nc=!1;function ac(){if(nc||typeof document>"u")return;nc=!0,document.addEventListener("keydown",t=>{t.metaKey||t.ctrlKey||t.altKey||(es="keyboard")},!0);const e=()=>{es="pointer"};document.addEventListener("pointerdown",e,!0),document.addEventListener("mousedown",e,!0),document.addEventListener("touchstart",e,{capture:!0,passive:!0})}ac();function wr(){return ac(),es==="keyboard"}const Br=20;function x4(e){const{t}=_e.useTranslation(),{type:a,trainingDatas:r,depth:s,renderPopup:l,completedIds:i,selectedIds:u,onItemComplete:c,size:d,useDescriptionTooltip:h,onRemove:p,onMore:m,sectionType:g="page"}=e||{},[,y]=o.useState(0),C=typeof r<"u"?Array.isArray(r)?r:[]:[],f=C.length,[_,b]=o.useState(Math.min(f,Br)),w=o.useMemo(()=>Array.isArray(s)?[...s,a?.label].filter(Boolean).join(" \xB7 "):[s||"",a?.label].filter(Boolean).join(" \xB7 "),[s,a?.label]);o.useEffect(()=>{b(Math.min(f,Br))},[f]),zi("speechear.data.updated",()=>y(A=>A+1));const v=o.useRef(null),k=o.useRef(null);function x(){const A=document.activeElement;k.current=wr()&&A&&A.closest?.(".training-block__more")?_:null,b(B=>Math.min(f,B+Br))}return o.useEffect(()=>{const A=k.current;if(A==null)return;k.current=null;const B=document.activeElement;B&&B!==document.body||v.current?.querySelectorAll(".training-block-button")[A]?.focus()},[_]),n.jsxs(_a,{type:g,title:a?.label,icon:a?.icon,disc:a?.desc,className:"training-block",children:[n.jsx("div",{className:"training-list",ref:v,children:(C||[]).slice(0,_).map((A,B)=>{const E=A;return n.jsx(Ro,{index:B,type:a,trainingData:E,depth:w,renderPopup:l,completedIds:i,selectedIds:u,size:d,useDescriptionTooltip:h,onRemove:typeof p=="function"&&u!=null&&E?.id!=null&&u.has(String(E.id))?()=>p(E):void 0,onComplete:typeof c=="function"&&E?.id!=null?()=>c(String(E.id)):void 0,onMore:typeof m=="function"?D=>m(E,D):void 0},E?.id!=null?`${a?.key||"t"}-${String(E.id)}`:`${a?.key||"t"}-${B}`)})}),f>Br&&_<f&&n.jsx("div",{className:"training-block__more",children:n.jsx(fe,{htmlType:"button",size:48,type:"bar",icon:"plus",onClick:x,ariaLabel:t("common.loadMore","\uB354\uBCF4\uAE30"),label:t("common.loadMore","\uB354\uBCF4\uAE30"),variant:"main"})})]})}function w4(e){let t=0;const a=r=>{Array.isArray(r)?r.forEach(a):r!=null&&r!==!1&&r!==!0&&r!==""&&t++};return a(e),t}function B4({gap:e=10,count:t,className:a,children:r}){const s=o.useRef(null),[l,i]=o.useState({width:0,card:0}),u=t??w4(r);o.useLayoutEffect(()=>{const m=s.current;if(!m)return;const g=()=>{const C=m.style.maxWidth;m.style.maxWidth="none";const f=m.clientWidth;m.style.maxWidth=C;const _=m.firstElementChild?.offsetWidth??0;i(b=>b.width===f&&b.card===_?b:{width:f,card:_})};if(g(),typeof ResizeObserver>"u")return;const y=new ResizeObserver(g);return y.observe(m),()=>y.disconnect()},[u,e]);const c=l.card>0?l.card:0,d=c>0?_f(l.width,c,e):0,h=d>0?xf(u,d):0,p={"--block-grid-gap":`${e}px`,...h>0?{"--block-grid-cols":h,"--block-grid-card":`${c}px`}:{}};return n.jsx("div",{ref:s,className:Be("training-block-grid",h>0&&"training-block-grid--measured",a),style:p,"data-cols":h>0?h:void 0,children:r})}function ts(e){const t=o.useRef(null),a=o.useRef(e);a.current=e;const[r,s]=o.useState({url:e,loading:!!e,failed:!1}),l=r.url===e?r:{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(()=>{a.current===e&&s({url:e,loading:!1,failed:!1})},[e]),u=o.useCallback(()=>{a.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 k4='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 A4=k4,ns=o.forwardRef(function({item:e,disabled:t=!1,onPlayDone:a,selectable:r=!1,selected:s=!1,onSelect:l,flipDelay:i=0,hideLabel:u=!1,hideAudio:c=!1,orderRank:d=null},h){const{t:p}=_e.useTranslation(),m=e.word||e.title||"",g=t||!m,y=e.audio??e.sound??e.audioKey,C=e.subLabel||e.pronunciation||"",f=e.colloquialLabel||"",[_,b]=o.useState({label:m,subLabel:C,colloquialLabel:f,homonum:e.homonum});m&&(_.label!==m||_.subLabel!==C||_.colloquialLabel!==f||!Object.is(_.homonum,e.homonum))&&b({label:m,subLabel:C,colloquialLabel:f,homonum:e.homonum});const w=o.useRef(null),v=yn("(max-width: 767px)"),[k,x]=o.useState(!1),[A,B]=o.useState(!1),E=`${typeof y=="string"?y:y?.src??""}\0${m}`,[D,N]=o.useState({for:"",url:""}),$=D.for===E?D.url:"",L=Wl(),U=e.textOnly??(!e.image&&!!_.label&&!!L&&L.entries.length>0&&!L.byWord.has(_.label)),M=U?"":pa()?.(_.label,_.homonum)??e.image??"",{imgRef:P,loading:T,hasImage:ee,onLoad:te,onError:I}=ts(M);o.useEffect(()=>{let G=!1;return(async()=>{if(y){if(typeof y=="string"){if(y.startsWith("http")||y.includes("/")){N({for:E,url:y});return}}else if(typeof y=="object"&&!Array.isArray(y)){const K=y.src;if(K){N({for:E,url:K});return}}}const ie=ja();if(ie&&m)try{const K=await Promise.resolve(ie(m));!G&&K&&N({for:E,url:K})}catch{}})(),()=>{G=!0}},[y,m,E]);const Y=o.useRef(!0),R=o.useRef(null);o.useEffect(()=>(Y.current=!0,()=>{Y.current=!1,R.current&&_r(R.current),R.current=null;try{w.current?.pause()}catch{}w.current=null}),[]);const q=o.useCallback(()=>new Promise(G=>{if(typeof window<"u"&&window.speechSynthesis&&m){x(!0),window.speechSynthesis.cancel();const ie=new SpeechSynthesisUtterance(m);ie.lang="ko-KR",ie.onend=()=>{x(!1);try{a?.()}catch{}G()},ie.onerror=()=>{x(!1),G()},window.speechSynthesis.speak(ie)}else G()}),[m,a]),Z=o.useCallback(G=>{const ie=Ya(G,K=>{if(x(!1),K)try{a?.()}catch{}});return w.current=ie.el,ie.done},[a]),z=o.useCallback(async()=>{if(t||!Y.current)return;const G=()=>{R.current===G&&(R.current=null);try{w.current?.pause()}catch{}try{window.speechSynthesis?.cancel()}catch{}x(!1)},ie=Ka(G);R.current=G;try{window.speechSynthesis?.cancel()}catch{}try{if($&&(x(!0),await Z($)))return;const K=sr();if(K&&m)try{B(!0);const pe=await Promise.resolve(K(m));if(!Y.current||R.current!==G||(B(!1),pe&&(x(!0),await Z(pe))))return}catch{}if(!Y.current||R.current!==G)return;await q()}finally{R.current===G&&B(!1),ie(),R.current===G&&(R.current=null)}},[t,$,m,Z,q]);o.useImperativeHandle(h,()=>({play:()=>z()}),[z]);const j=G=>G.stopPropagation(),F=o.useCallback(G=>{if(G.stopPropagation(),!t){if(k){try{w.current?.pause()}catch{}try{window.speechSynthesis?.cancel()}catch{}x(!1);return}z()}},[t,k,z]),O=Be("training-word-card",t?"training-word-card--disabled":"",g?"training-word-card--flipped":"",r?"training-word-card--selectable":"",s?"training-word-card--selected":"");return n.jsx("div",{className:O,onClick:r&&!t?l:void 0,role:r?"button":void 0,"aria-pressed":r?s:void 0,tabIndex:r&&!t?0:void 0,"aria-disabled":r&&t?!0:void 0,onKeyDown:r&&!t?G=>{G.target===G.currentTarget&&(G.key==="Enter"||G.key===" "||G.key==="Spacebar")&&(G.preventDefault(),l?.())}:void 0,children:n.jsxs("div",{className:"training-word-card__flipper",style:{transitionDelay:g?"0ms":`${i}ms`},children:[n.jsxs("div",{className:"training-word-card__front",children:[s&&n.jsx("div",{className:"training-word-card__selected-badge",onClick:j,children:n.jsx(Dn,{size:40,position:"inline",animate:!0,icon:d!=null?void 0:"check",number:d??void 0,"aria-label":d!=null?p("training.nthSelected",{n:d}):p("training.selected","\uC120\uD0DD\uB428")})}),n.jsx("div",{className:"training-word-card__image-wrap",children:U?n.jsx("div",{className:"training-word-card__text-face",children:_.label}):ee?n.jsxs(n.Fragment,{children:[T&&n.jsx("div",{className:"training-word-card__spinner"}),n.jsx("img",{ref:P,className:"training-word-card__image",src:M,alt:_.label||p("common.image","\uC774\uBBF8\uC9C0"),style:{opacity:T?0:1},onLoad:te,onError:I})]}):n.jsx("div",{className:"training-word-card__placeholder"})}),!u&&n.jsxs("div",{className:"training-word-card__body",children:[!U&&n.jsx("div",{className:"training-word-card__word",children:_.label}),_.subLabel&&n.jsxs("div",{className:"training-word-card__pronunciation",children:["[",_.subLabel,"]"]}),_.colloquialLabel&&n.jsxs("div",{className:"training-word-card__colloquial caption-1",children:["[",_.colloquialLabel,"]"]})]}),!c&&n.jsx("div",{className:"training-word-card__bottom",onClick:r?j:void 0,children:n.jsx(fe,{htmlType:"button",size:v?40:48,type:v?"dot":"bar",icon:k?"pause":"play",label:v?void 0:p("training.playSound","\uC18C\uB9AC \uB4E3\uAE30"),selected:k,loading:A,onClick:F,disabled:t,ariaLabel:p("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("${A4}")`}})})]})})});function kr(e){return String(e)}const Ar=["o","triangle","x"];function rc(e,t){return e===t?null:t}const oc={o:"circle",triangle:"triangle",x:"x"},sc={o:"main",triangle:"warn",x:"danger"};function N4(e){let t=0,a=0,r=0;for(const l of Object.values(e))l==="o"?t++:l==="triangle"?a++:l==="x"&&r++;const s=t+a+r;return{marked:s,o:t,triangle:a,x:r,rate:s===0?null:(t+a*.5)/s}}function as(e){const t={};for(const[a,r]of Object.entries(e))(r==="o"||r==="triangle"||r==="x")&&(t[a]=r);return t}function lc(e){const t=[];let a=0;for(const r of e)t.push(a),a+=r;return t}function E4(e,t){return!t&&e>0}const aa={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 D4(e="landscape"){At("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:a,printH:r}=aa[e],s=document.createElement("style");s.textContent=`@page { size: ${t}; margin: 0; } .word-table { width: ${a} !important; height: ${r} !important; }`,document.head.appendChild(s);const l=()=>{document.head.removeChild(s),window.removeEventListener("afterprint",l)};window.addEventListener("afterprint",l),window.print()}function S4(e,t){if(e.length===0)return[[]];const a=Math.max(1,Math.floor(t)),r=[];for(let s=0;s<e.length;s+=a)r.push(e.slice(s,s+a));return r}const j4={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 ic(e,t){const a=j4[e][t];if(a)return a;const r=Math.max(1,Math.ceil(t)),s=Math.max(1,Math.ceil(Math.sqrt(r*.707)));let l,i;return e==="landscape"?(i=s,l=Math.ceil(r/i)):(l=s,i=Math.ceil(r/l)),(e==="landscape"?l<i:i<l)&&([l,i]=[i,l]),{cols:l,rows:i}}function T4(e,t){const a=ic(e==="landscape"?"portrait":"landscape",t),r=Math.max(1,Math.ceil(t));if(r<=1)return a;const s=aa[e],l=e==="landscape"?s.width/2:s.width,i=e==="landscape"?s.height:s.height/2,u=(m,g)=>Math.min(l/m/hc,i/g/mc),c=Math.max(0,a.cols*a.rows-r),d=u(a.cols,a.rows);let h=a,p=d;for(let m=1;m<=r;m++){const g=Math.ceil(r/m);if(m*g-r>c)continue;const y=u(m,g);y>p&&(h={cols:m,rows:g},p=y)}return p>d*1.05?h:a}const M4={show:"word-table__content--cut-show",dashed:"",corner:"word-table__content--cut-corner",hide:""},uc={\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"},cc={\uACE0\uC720:"\uACE0\uC720\uC5B4",\uD55C\uC790:"\uD55C\uC790\uC5B4",\uC678\uB798:"\uC678\uB798\uC5B4",\uD63C\uC885:"\uD63C\uC885\uC5B4"},rs={\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"},os={\uACE0\uC720:"native",\uD55C\uC790:"sino",\uC678\uB798:"foreign",\uD63C\uC885:"mixed"};function dc(e){return Object.fromEntries(Object.entries(uc).map(([t,a])=>[t,rs[t]?e(`wordTable.pos.${rs[t]}`,{defaultValue:a}):a]))}function pc(e){return Object.fromEntries(Object.entries(cc).map(([t,a])=>[t,os[t]?e(`wordSearch.filter.type.${os[t]}`,{defaultValue:a}):a]))}const L4={pos:rs,wordType:os};function ss(e,t){return e?e.split("/").map(a=>t[a]??a).join("/"):""}function ls(e,t,a,r){if(r!=="dashed")return{};const s=e%t,l=Math.floor(e/t),i=s<t-1,u=l<a-1;if(!i&&!u)return{};const c="#ddd",d=g=>`repeating-linear-gradient(to ${g}, ${c} 0, ${c} 5px, transparent 5px, transparent 10px)`,h=[],p=[],m=[];return i&&(h.push(d("bottom")),p.push("1px 100%"),m.push("right center")),u&&(h.push(d("right")),p.push("100% 1px"),m.push("center bottom")),{backgroundImage:h.join(", "),backgroundSize:p.join(", "),backgroundPosition:m.join(", "),backgroundRepeat:"no-repeat",printColorAdjust:"exact",WebkitPrintColorAdjust:"exact"}}const hc=280,$4=240,R4=280,mc=400,P4=120,F4=280;function Cc(e,t){const a=o.useRef(null),[r,s]=o.useState(1),[l,i]=o.useState(0),u=o.useCallback((c,d)=>{if(!(c>0))return;const h=c/e,p=t&&d>0?d/t:1/0,m=Math.min(1,h,p);s(m),i(Math.max(0,(c-e*m)/2))},[e,t]);return o.useEffect(()=>{const c=a.current;if(!c)return;const d=t?c.parentElement??c:c;if(u(d.clientWidth,d.clientHeight),typeof ResizeObserver>"u")return;const h=new ResizeObserver(([p])=>u(p.contentRect.width,p.contentRect.height));return h.observe(d),()=>h.disconnect()},[u,t]),{scalerRef:a,scale:r,offset:l}}const I4=24,O4={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0},z4=400,fc=8;function W4(e){return e<=1?"100%":`repeat(${e}, calc((100% - ${e-1} * var(--wt-cell-gap, 0px)) / ${e}))`}function is({label:e,subLabel:t,colloquialLabel:a,captionLabel:r,captionBadge:s,imageLabel:l,pickForm:i,homonum:u,showWord:c=!0,showImage:d=!0,showPronunciation:h=!0,showColloquial:p=!0,showCaption:m=!0,buttonSize:g=40,wordInfo:y,outerScale:C=1}){const{t:f}=_e.useTranslation(),_=o.useRef(null),b=o.useRef(null),w=o.useRef(null),[v,k]=o.useState(1),[x,A]=o.useState(!1),[B,E]=o.useState(!1),[D,N]=o.useState({for:"",url:""}),[$,L]=o.useState(null),U=t&&t.length>0?t:U1()?.(e,u)??"",M=pa()?.(l||e,u)??"",{imgRef:P,loading:T,failed:ee,onLoad:te,onError:I}=ts(M),Y=o.useCallback(()=>L(b.current?.getBoundingClientRect()??null),[]),R=o.useCallback(()=>L(null),[]),q=fr(!!$,ne=>{ne?Y():R()},b),Z=o.useMemo(()=>{if(!y)return null;const ne=[];return y.grade&&ne.push(f("wordTable.info.grade",{n:y.grade,defaultValue:"\uB09C\uC774\uB3C4: {{n}}\uB4F1\uAE09"})),y.syllables&&ne.push(f("wordTable.info.syllables",{n:y.syllables,defaultValue:"\uC74C\uC808 \uC218: {{n}}\uC74C\uC808"})),y.pos&&ne.push(f("wordTable.info.pos",{v:ss(y.pos,dc(f)),defaultValue:"\uD488\uC0AC: {{v}}"})),y.wordType&&ne.push(f("wordTable.info.wordType",{v:ss(y.wordType,pc(f)),defaultValue:"\uC720\uD615: {{v}}"})),ne.length?ne:null},[y,f]),z=U||e,j=D.for===z?D.url:"";o.useEffect(()=>{const ne=ja(),V=U||e;if(!ne||!V)return;let W=!1;return Promise.resolve(ne(V)).then(oe=>{!W&&oe&&N({for:V,url:oe})}),()=>{W=!0}},[U,e]);const F=o.useRef(null),O=o.useRef(null);o.useEffect(()=>()=>{w.current?.pause(),O.current?.()},[]);const G=o.useRef(null);o.useEffect(()=>()=>{G.current&&(G.current.cancelled=!0)},[]);const ie=o.useCallback(ne=>{if(ne.stopPropagation(),x||B){F.current?.();return}if(!j){const W=sr(),oe=U||e;if(!W||!oe)return;const xe={cancelled:!1,stop:null};G.current=xe;const be=()=>{xe.cancelled=!0,xe.stop?.(),E(!1),A(!1),O.current?.()};F.current=be,O.current=Ka(be),E(!0),Promise.resolve().then(()=>W(oe)).then(me=>{if(xe.cancelled)return;if(!me){be();return}N({for:oe,url:me});const ke=Ya(me,()=>{A(!1),O.current?.()});w.current=ke.el,xe.stop=ke.stop,E(!1),A(!0)}).catch(()=>{be()});return}A(!0);const V=Ya(j,()=>{A(!1),O.current?.()});w.current=V.el,F.current=V.stop,O.current=Ka(V.stop)},[x,B,j,U,e]),K=d&&!!M&&!ee,pe=K&&c?hc:K?R4:$4,X=K&&c?mc:K?F4:P4;o.useEffect(()=>{const ne=_.current;if(!ne||typeof ResizeObserver>"u")return;const V=new ResizeObserver(([W])=>{const{width:oe,height:xe}=W.contentRect;k(Math.min(oe/pe,xe/X))});return V.observe(ne),()=>V.disconnect()},[pe,X]);const H=g*C<I4;return n.jsxs("div",{ref:_,className:Be("word-table-cell",H&&"word-table-cell--tap-too-small",K?"word-table-cell--with-image":""),"data-ref-w":pe,"data-ref-h":X,children:[n.jsxs("div",{className:"word-table-cell__inner",style:{transform:`scale(${v})`},children:[K&&n.jsxs("div",{className:"word-table-cell__image-wrap",children:[T&&n.jsx("div",{className:"word-table-cell__spinner"}),n.jsx("img",{ref:P,className:"word-table-cell__image",src:M,alt:e,draggable:!1,style:{opacity:T?0:1},onLoad:te,onError:I})]}),m&&(s||r)&&n.jsxs("span",{className:"word-table-cell__caption",children:[s&&n.jsx(ln,{fill:"soft",size:"small",label:s}),r&&n.jsx("span",{className:"word-table-cell__caption-tail h5",children:r})]}),c&&n.jsx("span",{className:"word-table-cell__word h0",children:e}),h&&U&&n.jsxs("span",{className:"word-table-cell__sub h3",children:["[",U,"]"]}),p&&a&&n.jsxs("span",{className:"word-table-cell__colloquial h5",children:["[",a,"]"]})]}),n.jsxs("div",{className:"word-table-cell__side",children:[n.jsxs("div",{className:"word-table-cell__play-button","data-audio-src":j,children:[n.jsx("span",{"data-play-state":"play",style:{display:x?"none":void 0},children:n.jsx(fe,{htmlType:"button",size:g,type:"dot",icon:"play",variant:"transparent-lightGray",useBorder:!1,loading:B,showTooltipInfo:B?f("common.loading","\uBD88\uB7EC\uC624\uB294 \uC911"):f("common.play","\uC7AC\uC0DD"),ariaLabel:e?f("common.playFor",{name:e,defaultValue:`${e} \uC7AC\uC0DD`}):f("common.play","\uC7AC\uC0DD"),onClick:ie})}),n.jsx("span",{"data-play-state":"pause",style:{display:x?void 0:"none"},children:n.jsx(fe,{htmlType:"button",size:g,type:"dot",icon:"pause",useBorder:!1,selected:!0,showTooltipInfo:f("common.pause","\uBA48\uCDA4"),ariaLabel:e?f("common.pauseFor",{name:e,defaultValue:`${e} \uBA48\uCDA4`}):f("common.pause","\uBA48\uCDA4"),onClick:ie})})]}),y&&n.jsxs("div",{ref:b,className:"word-table-cell__info-button",onPointerEnter:ne=>{Un(ne)||Y()},onPointerLeave:ne=>{Un(ne)||R()},onFocus:()=>{ea()||Y()},onBlur:R,children:[n.jsx(fe,{htmlType:"button",size:g,type:"dot",icon:"info",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:!1,ariaLabel:f("wordTable.wordInfo","{{word}} \uB0B1\uB9D0 \uC815\uBCF4",{word:e}),onClick:ne=>{ne.stopPropagation(),q.touchPress()}}),$&&Z&&n.jsx(qn,{anchorRect:$,items:Z,showIndex:!1})]}),i&&n.jsx("div",{className:"word-table-cell__form-button",children:n.jsx(fe,{htmlType:"button",size:g,type:"dot",icon:"replace",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:f("wordTable.pickForm","\uB2E4\uB978 \uAF34\uB85C"),ariaLabel:f("wordTable.pickFormAria",{n:i.n,defaultValue:"{{n}}\uBC88 \uCE78 \uB0B1\uB9D0\uC744 \uB2E4\uB978 \uAF34\uB85C"}),onClick:ne=>{ne.stopPropagation(),i.onPick(ne.currentTarget.getBoundingClientRect())}})})]})]})}function xa({title:e,titleIcon:t,disc:a,className:r,orientation:s="landscape",contentTypes:l=["image","word","standardPron"],baseItem:i,baseContentTypes:u,cutLine:c="show",showOutline:d=!0,showDivLine:h=!0,items:p,editCells:m,count:g,activeCell:y=null,onActivateCell:C,onRemoveCell:f,onRemoveItem:_,onReorder:b,onCopyItem:w,onReplaceItem:v,onPickForm:k,indexOffset:x=0,totalCount:A,renderCellAction:B,showFillerAdd:E=!1,addableCount:D,contentRef:N,buttonSize:$=40,brand:L,code:U,pageNumber:M,pageNumberPosition:P="right",fitHeight:T=!1,scoring:ee=!1,marks:te,onMarkClick:I,scoreIndexOffset:Y=0}){const R=o.useCallback((ue,Te)=>{I?.(Y+ue,Te)},[I,Y]),q=(ue,Te)=>{const De=ue.filter(Boolean).join(" / ");return De?Te?z("wordPrint.removePairFor",{name:De,defaultValue:`${De} \uB300\uB9BD\uC30D \uBE7C\uAE30`}):z("wordPrint.removeWordFor",{name:De,defaultValue:`${De} \uBE7C\uAE30`}):Te?z("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):z("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30")},Z=(ue,Te)=>{const De=te?.[kr(Y+ue)]??null;return n.jsx("div",{className:Be("word-table-cell__score",De?"word-table-cell__score--marked":""),style:_t>1?{transform:`translateX(-50%) scale(${_t})`,transformOrigin:"bottom center"}:void 0,children:Ar.map(tt=>n.jsx("span",{className:Be("word-table-cell__score-slot",De===tt?"word-table-cell__score-slot--on":""),children:n.jsx(fe,{htmlType:"button",size:$,type:"dot",shape:"pill",icon:oc[tt],variant:De===tt?sc[tt]:"default",selected:De===tt,useBorder:!1,...it?{}:{tabIndex:-1,role:"img"},showTooltipInfo:z(`wordTable.scoring.markName.${tt}`,{defaultValue:tt}),ariaLabel:z(`wordTable.scoring.${tt}`,{word:Te,defaultValue:`${Te} ${tt}`}),onClick:it?pt=>{pt.stopPropagation(),R(ue,tt)}:void 0})},tt))})},{t:z}=_e.useTranslation(),j=m!==void 0,F=e!=null||!!t||!!a,O=yn("(max-width: 767px)"),G=o.useRef(null),[ie,K]=o.useState(null),pe=p?.length??0,X=A??pe,[H,ne]=o.useState(null),[V,W]=o.useState(""),oe=o.useRef(null),xe=o.useRef(null),be=o.useRef(null),me=o.useRef(null),ke=o.useCallback(ue=>{xe.current=ue,typeof N=="function"?N(ue):N&&(N.current=ue)},[N]),Le=o.useCallback((ue,Te)=>{oe.current=x+Te,b?.(ue,Te),W(z("wordTable.reorder.moved",{n:x+Te+1,total:X,defaultValue:"{{total}}\uCE78 \uAC00\uC6B4\uB370 {{n}}\uBC88\uC9F8\uB85C \uC62E\uAE40"}))},[b,z,X,x]);o.useEffect(()=>{const ue=oe.current;ue!=null&&(oe.current=null,(xe.current?.closest(".word-table-block__pages")??xe.current)?.querySelector(`[data-wordtable-index="${ue}"] .word-table__card-handle button`)?.focus())}),o.useEffect(()=>()=>{me.current?.()},[]);const Me=o.useCallback((ue,Te)=>{if(!b||!ue.altKey||ue.ctrlKey||ue.metaKey)return;const De=ue.key==="ArrowRight";if(!De&&ue.key!=="ArrowLeft")return;ue.preventDefault();const tt=Te+(De?1:-1),pt=x+tt;pt<0||pt>=X||Le(Te,tt)},[b,X,x,Le]),le=o.useCallback((ue,Te)=>{if(!b||ue.pointerType==="mouse")return;const De=ue.target.closest?.("button");if(De&&!De.closest(".word-table__card-handle"))return;me.current?.();const tt={x:ue.clientX,y:ue.clientY};let pt=!1;const jt=Ue=>{pt&&Ue.cancelable&&Ue.preventDefault()};let je=null,nt=null;const ae=()=>{const Ue=nt;if(!Ue)return;const ht=document.elementFromPoint?.(Ue.x,Ue.y)?.closest?.("[data-wordtable-cell]"),cn=ht?Number(ht.dataset.wordtableCell):NaN,dn=Number.isInteger(cn)?cn:null;be.current=dn,K(zt=>zt===dn?zt:dn)},ye=Ue=>{if(!pt){(Math.abs(Ue.clientX-tt.x)>fc||Math.abs(Ue.clientY-tt.y)>fc)&&vt();return}if(nt={x:Ue.clientX,y:Ue.clientY},typeof requestAnimationFrame>"u"){ae();return}je===null&&(je=requestAnimationFrame(()=>{je=null,ae()}))},He=()=>{je!==null&&(cancelAnimationFrame(je),je=null,ae());const Ue=be.current,ht=pt;vt(),ht&&Ue!=null&&Ue!==Te&&Le(Te,Ue)},Ke=setTimeout(()=>{pt=!0,ne(Te),be.current=Te,K(Te),window.addEventListener("touchmove",jt,{passive:!1})},z4);function vt(){clearTimeout(Ke),window.removeEventListener("pointermove",ye),window.removeEventListener("pointerup",He),window.removeEventListener("pointercancel",He),window.removeEventListener("touchmove",jt),pt=!1,je!==null&&(cancelAnimationFrame(je),je=null),be.current=null,me.current=null,ne(null),K(null)}me.current=vt,window.addEventListener("pointermove",ye),window.addEventListener("pointerup",He),window.addEventListener("pointercancel",He)},[b,Le]),{width:ve,height:$e}=aa[s],Ae=typeof T=="number"?T:T&&typeof T=="object"?O?T.narrow:T.wide:null,{scalerRef:Ie,scale:ze,offset:dt}=Cc(ve,T?$e:void 0),st=j?m?.length??0:p?.length??0,et=Math.max(g??st,1),gt=!j&&!!i,Se=T4(s,et),Ge=ic(s,et),we=gt?Se.cols:Ge.cols,qe=gt?Se.rows:Ge.rows,Ye=gt&&s==="landscape"?Se.cols*2:we,mt=gt&&s==="portrait"?Se.rows*2:qe,wt=ue=>({word:ue.length===0||ue.includes("word"),image:ue.length===0||ue.includes("image"),pron:ue.length===0||ue.includes("standardPron"),colloq:ue.length===0||ue.includes("colloquialPron"),caption:ue.length===0||ue.includes("caption")}),yt=wt(l),Et=o.useMemo(()=>{const ue=(p??[]).map(De=>De.id),Te=ue.every(De=>typeof De=="string"&&De.length>0)&&new Set(ue).size===ue.length;return!Te&&ue.length>0&&At("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."),Te?ue:null},[p]),at=wt(u??l),rt=j?(m??[]).some(ue=>ue!==null&&ue.length>1):(p??[]).some(ue=>(ue.words??[]).length>1),Dt=!!L?.show,Bt=!!L?.show&&L?.top!==!1,Lt=!!L?.show&&L?.bottom!==!1,It=L?.copyright??"\xA9 IHAB, Inc. All rights reserved.",xt=se(Be("word-table__content",M4[c],d&&"word-table__content--outline",h&&rt&&"word-table__content--div-line",!Dt&&M&&P!=="none"&&"word-table__content--page-number",Bt&&"word-table__content--brand-top",Lt&&"word-table__content--brand-bottom")),lt={transform:`scale(${1/ze})`,transformOrigin:"center center"},Ct=$*Ar.length+4*(Ar.length-1),it=!!I,_t=it?Math.max(1,Math.min(1/ze,ve/Ye/Ct)):1,ut=n.jsxs("div",{ref:Ie,className:"word-table__scaler",style:{height:$e*ze},children:[n.jsx("div",{className:Be("word-table",ee&&!it&&"word-table--score-readonly",!F&&r),style:{width:ve,height:$e,transform:`scale(${ze})`,transformOrigin:"top left",marginLeft:dt},children:n.jsxs("div",{ref:ke,className:xt,style:{gridTemplateColumns:`repeat(${Ye}, 1fr)`,gridTemplateRows:W4(mt)},children:[j?n.jsx(n.Fragment,{children:(m??[]).map((ue,Te)=>n.jsx("div",{className:se(Be("word-table__edit-cell",ue?"word-table__edit-cell--filled":"word-table__edit-cell--empty",y===Te?"word-table__edit-cell--active":"")),style:ls(Te,Ye,mt,c),children:ue?n.jsxs(n.Fragment,{children:[ue.map((De,tt)=>n.jsxs(o.Fragment,{children:[tt>0&&n.jsx("div",{className:se("word-table__pair-divider")}),n.jsx(is,{outerScale:ze,label:De.word,subLabel:De.pronunciation,colloquialLabel:De.colloquialPronunciation,homonum:De.homonum,showWord:yt.word,showImage:yt.image,showPronunciation:yt.pron,showColloquial:yt.colloq,showCaption:yt.caption,buttonSize:$})]},tt)),ee&&Z(Te,ue.map(De=>De.word).join(" / ")),f&&n.jsx("div",{className:se("word-table__card-close"),children:n.jsx(fe,{htmlType:"button",size:$,type:"dot",icon:"x",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:ue.length>1?z("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):z("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),ariaLabel:q(ue.map(De=>De.word),ue.length>1),onClick:()=>f(Te)})})]}):C&&n.jsx("div",{className:se("word-table__card-add"),style:lt,children:n.jsx(fe,{htmlType:"button",size:$,type:"dot",icon:"plus",variant:"default",ariaLabel:z("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),showTooltipInfo:z("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),onClick:()=>C(Te)})})},Te))}):n.jsxs(n.Fragment,{children:[gt&&i&&n.jsx("div",{className:se("word-table__card word-table__card--base"),style:{gridColumn:`1 / span ${Se.cols}`,gridRow:`1 / span ${Se.rows}`,...ls(0,s==="landscape"?2:1,s==="landscape"?1:2,c)},children:(i.words??[]).map((ue,Te)=>n.jsxs(o.Fragment,{children:[Te>0&&n.jsx("div",{className:se("word-table__pair-divider")}),n.jsx(is,{outerScale:ze,label:ue.label,subLabel:ue.subLabel,colloquialLabel:ue.colloquialLabel,captionLabel:ue.captionLabel,captionBadge:ue.captionBadge,imageLabel:ue.imageLabel,homonum:ue.homonum,showWord:at.word,showImage:at.image,showPronunciation:at.pron,showColloquial:at.colloq,showCaption:at.caption,buttonSize:$,wordInfo:ue.grade||ue.syllables!=null||ue.pos||ue.wordType?{grade:ue.grade,syllables:ue.syllables,pos:ue.pos,wordType:ue.wordType}:void 0})]},Te))}),(p??[]).map((ue,Te)=>n.jsxs("div",{"data-wordtable-cell":b?Te:void 0,"data-wordtable-index":b?x+Te:void 0,className:se(`word-table__card${b?" word-table__card--draggable":""}${ie===Te?" word-table__card--drag-over":""}${H===Te?" word-table__card--dragging":""}`),style:ls(Te,we,qe,c),draggable:!!b,onPointerDown:b?De=>le(De,Te):void 0,onKeyDown:b?De=>Me(De,Te):void 0,onDragStart:b?()=>{G.current=Te}:void 0,onDragOver:b?De=>{De.preventDefault(),K(Te)}:void 0,onDragLeave:b?()=>K(null):void 0,onDrop:b?De=>{De.preventDefault(),G.current!==null&&G.current!==Te&&b(G.current,Te),G.current=null,K(null)}:void 0,onDragEnd:b?()=>{G.current=null,K(null)}:void 0,children:[(ue.words??[]).map((De,tt)=>n.jsxs(o.Fragment,{children:[tt>0&&n.jsx("div",{className:se("word-table__pair-divider")}),n.jsx(is,{outerScale:ze,label:De.label,subLabel:De.subLabel,colloquialLabel:De.colloquialLabel,captionLabel:De.captionLabel,captionBadge:De.captionBadge,imageLabel:De.imageLabel,pickForm:k&&De.canPickForm?{n:x+Te+1,onPick:pt=>k(ue.id,x+Te,pt)}:void 0,homonum:De.homonum,showWord:yt.word,showImage:yt.image,showPronunciation:yt.pron,showColloquial:yt.colloq,showCaption:yt.caption,buttonSize:$,wordInfo:De.grade||De.syllables!=null||De.pos||De.wordType?{grade:De.grade,syllables:De.syllables,pos:De.pos,wordType:De.wordType}:void 0})]},tt)),ee&&Z(Te,(ue.words??[]).map(De=>De.label).join(" / ")),(B||_||w||v||b)&&n.jsxs("div",{className:se("word-table__card-actions"),children:[_&&n.jsx("div",{className:se("word-table__card-close"),children:n.jsx(fe,{htmlType:"button",size:$,type:"dot",icon:"x",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:(ue.words??[]).length>1?z("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):z("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),ariaLabel:q((ue.words??[]).map(De=>De.label),(ue.words??[]).length>1),onClick:()=>_(ue.id)})}),w&&n.jsx("div",{className:se("word-table__card-copy"),children:n.jsx(fe,{htmlType:"button",size:$,type:"dot",icon:"copy",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:z("wordTable.copyItem","\uD55C \uCE78 \uB354"),ariaLabel:z("wordTable.copyItemAria",{n:x+Te+1,defaultValue:"{{n}}\uBC88 \uCE78 \uB0B1\uB9D0\uC744 \uD55C \uCE78 \uB354"}),onClick:()=>w(ue.id,x+Te)})}),v&&n.jsx("div",{className:se("word-table__card-replace"),children:n.jsx(fe,{htmlType:"button",size:$,type:"dot",icon:"refresh-cw",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:(ue.words??[]).length>1?z("wordTable.replacePair","\uB2E4\uB978 \uC30D\uC73C\uB85C"):z("wordTable.replaceItem","\uB2E4\uB978 \uB2E8\uC5B4\uB85C"),ariaLabel:(ue.words??[]).length>1?z("wordTable.replacePairAria",{n:x+Te+1,defaultValue:"{{n}}\uBC88 \uCE78\uB9CC \uB2E4\uB978 \uC30D\uC73C\uB85C"}):z("wordTable.replaceItemAria",{n:x+Te+1,defaultValue:"{{n}}\uBC88 \uCE78\uB9CC \uB2E4\uB978 \uB2E8\uC5B4\uB85C"}),onClick:()=>v(ue.id,x+Te)})}),B?.(Te,ue),b&&n.jsx("div",{className:se("word-table__card-handle"),children:n.jsx(fe,{htmlType:"button",size:$,type:"dot",icon:"grip-vertical",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:z("wordTable.reorder.hint","Alt + \u2190 \u2192 \uB85C \uC21C\uC11C \uBC14\uAFB8\uAE30"),ariaLabel:z("wordTable.reorder.handle",{word:(ue.words??[]).map(De=>De.label).join(" / "),defaultValue:"{{word}} \uC21C\uC11C \uBC14\uAFB8\uAE30 (Alt + \uD654\uC0B4\uD45C)"})})})]})]},Et?Et[Te]:Te)),Array.from({length:Math.max(0,we*qe-(p?.length??0))}).map((ue,Te)=>{const De=(p?.length??0)+Te<(D??et);return n.jsx("div",{className:se("word-table__card word-table__card--filler"),children:E&&C&&De&&n.jsx("div",{className:se("word-table__card-add"),style:lt,children:n.jsx(fe,{htmlType:"button",size:$,type:"dot",icon:"plus",variant:"default",ariaLabel:z("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),showTooltipInfo:z("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),onClick:()=>C((p?.length??0)+Te)})})},`filler-${Te}`)})]}),Bt&&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:L?.topLogo?.src??vr,alt:L?.topLogo?.alt??"\uB9D0\uADC0"}),(()=>{const ue=[L?.title&&n.jsx("span",{className:"word-table__paper-title",children:L.title},"t"),L?.owner&&n.jsx("span",{className:"word-table__owner",children:L.owner},"o"),U&&n.jsx("span",{className:"word-table__code",children:U},"c")].filter(Boolean);return ue.length===0?null:n.jsx("span",{className:"word-table__ident",children:ue.map((Te,De)=>n.jsxs(o.Fragment,{children:[De>0&&n.jsx("span",{className:"word-table__ident-dot","aria-hidden":"true",children:"\xB7"}),Te]},De))})})()]})}),Lt&&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:[L?.bottomLogo?n.jsx("img",{className:"word-table__brand-logo--ihab word-table__brand-logo--given",src:L.bottomLogo.src,alt:L.bottomLogo.alt}):n.jsx("span",{className:"word-table__brand-logo--ihab",role:"img","aria-label":"IHAB"}),n.jsx("span",{className:"word-table__copyright",children:It})]}),n.jsxs("span",{className:"word-table__band-end",children:[L?.link&&n.jsx("span",{className:"word-table__link",children:L.link}),M&&P!=="none"&&n.jsx("span",{className:"word-table__page-count",children:z("wordTable.filter.pageIndicator",{current:M.current,total:M.total})})]})]})}),!Dt&&M&&P!=="none"&&n.jsx("span",{className:`word-table__page-number body-3 word-table__page-number--${P}`,children:z("wordTable.filter.pageIndicator",{current:M.current,total:M.total})})]})}),b&&n.jsx("span",{role:"status",style:O4,children:V})]}),St=Ae==null?ut:n.jsx("div",{className:"word-table__frame",style:{height:Ae},children:ut});return F?n.jsx(_a,{type:"page",icon:t,title:e,disc:a,className:Be(se("word-table__section"),r),children:St}):St}function H4(e,t,a){const r=[];for(const s of e??[]){if(s.type==="note"||s.type==="input")continue;const l=s.displayLabel??s.label,i=V4(s,t?.[s.label],a);i!==null&&r.push(`${l} ${i}`)}return r.join(" \xB7 ")}function V4(e,t,a){const r=(Array.isArray(t)?t:t===void 0?[]:[t]).filter(s=>s!==kn);return r.length===0?e.allOption?e.allLabel??a:null:r.map(s=>q4(e,s)).join(", ")}function q4(e,t){const a=[...e.items??[],...(e.groups??[]).flat()];for(const r of a)if(r!=null){if(typeof r=="string"){if(r===t)return r;continue}if(r.value===t)return r.displayLabel??r.labels?.join(" ")??r.value}return t}function In({title:e,titleLevel:t=2,headerAction:a,headerSummary:r,collapsible:s=!1,defaultCollapsed:l=!1,collapsed:i,onCollapsedChange:u,footer:c,sections:d,selected:h={},onSelect:p,align:m,sectionAlign:g,className:y}){const C=(m??(g==="vertical"?"newline":"inline"))==="inline",{t:f}=_e.useTranslation(),[_,b]=o.useState(l),w=i??_,v=()=>{const N=!w;b(N),u?.(N)},k=N=>{if(!s)return;const $=N.target;!$||typeof $.closest!="function"||$.closest(".filter-panel__collapse-toggle")||$.closest('button, a, input, select, textarea, label, [role="radiogroup"], [role="button"], [role="menu"]')||v()},x=o.useMemo(()=>r!==void 0||!w?"":H4(d,h,f("common.all","\uC804\uCCB4")),[r,w,d,h,f]),A=r??(x?n.jsx("span",{className:"filter-panel__header-summary body-3",children:x}):null),B=e||a||r||s,E=o.useId(),D=t?`h${t}`:"span";return n.jsxs("div",{className:Be("filter-panel",s?"filter-panel--collapsible":"",w?"filter-panel--collapsed":"",y),role:typeof e=="string"&&e?"group":void 0,"aria-labelledby":typeof e=="string"&&e?E:void 0,children:[B&&n.jsxs("div",{className:"filter-panel__header",onClick:s?k:void 0,children:[n.jsx("div",{className:"filter-panel__title-row",children:e&&n.jsx(D,{id:E,className:"filter-panel__title h4",children:e})}),n.jsxs("div",{className:"filter-panel__header-actions",children:[w?A:a,s&&n.jsx(fe,{htmlType:"button",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:w?"chevron-down":"chevron-up",className:"filter-panel__collapse-toggle",ariaLabel:w?f("common.expand","\uD3BC\uCE58\uAE30"):f("common.collapse","\uC811\uAE30"),showTooltipInfo:w?f("common.expand","\uD3BC\uCE58\uAE30"):f("common.collapse","\uC811\uAE30"),"aria-expanded":!w,onClick:v})]})]}),!w&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:Be("filter-panel__sections",C?"filter-panel__sections--row":""),children:d.map(N=>{const $=h[N.label],L=$===void 0||(Array.isArray($)?$.length===0:!1),U=(N.items??[]).filter(P=>P!=null);N.allOption&&U.some(P=>(typeof P=="string"?P:P.value)===kn)&&At(`filter-panel-all-value:${N.label}`,`[FilterPanel] '${N.label}' \uC808\uC5D0 allOption \uACFC \uAC12 '${kn}' \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 M=P=>{const T=typeof P=="string"?P:P.value,ee=typeof P!="string"&&!!P.disabled,te=typeof P!="string"?P.labels:void 0,I=typeof P!="string"?P.displayLabel:void 0,Y=typeof P!="string"?P.tooltip:void 0,R=typeof P!="string"?P.descriptionTooltip:void 0,q=typeof P!="string"?P.shape:void 0,Z=Array.isArray($)?$.includes(T):$===T;return n.jsx(fe,{htmlType:"button",size:"keyboard",label:te??I??T,type:N.itemType??(te?"bar":T.length===1?"dot":void 0),selected:Z,disabled:ee,shape:q,showTooltipInfo:!!Y,tooltipInfoText:Y,tooltipDescription:R,onClick:()=>p?.(T,N.label)},T)};return n.jsxs(o.Fragment,{children:[N.groupLabel&&n.jsxs("div",{className:"filter-panel__group-label-row",children:[n.jsx("div",{className:"filter-panel__group-label body-2",children:N.groupLabel}),N.groupAction]}),n.jsxs("div",{className:Be("filter-panel__section",N.layout==="row"?"filter-panel__section--row":"",N.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:N.displayLabel??N.label}),N.labelAction??(N.labelInfo?n.jsx(Ga,{...N.labelInfo}):null)]}),N.type==="note"?n.jsx("div",{className:"filter-panel__note body-3",children:N.content}):N.type==="input"?n.jsx(Kn,{className:"filter-panel__textfield",placeholder:N.placeholder,ariaLabel:N.displayLabel??N.label,value:h[N.label]??"",onChange:P=>p?.(P,N.label),error:N.error}):!N.multiple&&N.display==="segmented"?n.jsx(vn,{ariaLabel:N.displayLabel??N.label,options:[...N.allOption?[{key:kn,label:N.allLabel??f("common.all","\uC804\uCCB4"),disabled:N.allOptionDisabled}]:[],...U.map(P=>{const T=typeof P=="string"?P:P.value,ee=typeof P!="string"?P.displayLabel:void 0,te=typeof P!="string"?P.disabled:void 0;return{key:T,label:ee??T,disabled:te}})],value:L&&N.allOption?kn:h[N.label]??"",onChange:P=>p?.(P,N.label),size:32}):!N.multiple&&N.display==="dropdown"?n.jsx(_n,{className:"filter-panel__dropdown",ariaLabel:typeof N.label=="string"?N.label:void 0,size:40,options:[...N.allOption?[{value:kn,label:N.allLabel??f("common.all","\uC804\uCCB4"),disabled:N.allOptionDisabled}]:[],...U.map(P=>{const T=typeof P=="string"?P:P.value,ee=typeof P!="string"?P.displayLabel:void 0,te=typeof P!="string"?P.disabled:void 0;return{value:T,label:ee??T,disabled:te}})],value:L&&N.allOption?kn:h[N.label],onChange:P=>p?.(P,N.label)}):n.jsxs("div",{className:N.groups?"filter-panel__item-groups":"filter-panel__items",children:[N.allOption&&!N.groups&&n.jsx(fe,{htmlType:"button",size:"keyboard",label:N.allLabel??f("common.all","\uC804\uCCB4"),selected:L,disabled:N.allOptionDisabled,onClick:()=>p?.(kn,N.label)}),N.groups?N.groups.map((P,T)=>n.jsxs("div",{className:"filter-panel__item-group",children:[T===0&&N.allOption&&n.jsx(fe,{htmlType:"button",size:"keyboard",label:N.allLabel??f("common.all","\uC804\uCCB4"),selected:L,disabled:N.allOptionDisabled,onClick:()=>p?.(kn,N.label)}),P.filter(ee=>ee!=null).map(M)]},T)):U.map(M)]})]})]},N.label)})}),c!=null&&c!==!1&&n.jsx("div",{className:"filter-panel__footer body-3",children:c})]})]})}const U4=[1,2,3,4,5,6,7,8,9,10,11,12],G4=[8,6,4,2,1],bn="show",jn="hide",bc=["image","word","caption","standardPron"];function gc(e){return e.some(t=>(t.words??[]).some(a=>!!a.captionBadge||!!a.captionLabel))}function yc(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 vc(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 _c(e){return{label:e("wordTable.filter.border","\uC678\uACFD\uC120"),items:[{value:bn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:jn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function xc(e){return{label:e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4"),items:[{value:bn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:jn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function wc(e){return{label:e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4"),items:[{value:bn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:jn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Bc(e){return{label:e("wordTable.filter.cutLine","\uC808\uCDE8\uC120"),items:[{value:bn,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:jn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function kc(e){return{label:e("wordPrint.divLine","\uB300\uB9BD\uC120"),items:[{value:bn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:jn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Ac(e,t){const a=Math.max(1,Math.min(t.itemCount,t.max??t.itemCount));return{label:e(t.hasPairs?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord"),items:[a,...G4.filter(r=>r<a)].map(r=>({value:`${r}\uAC1C`,displayLabel:e("wordTable.filter.itemsPerPageOption",{count:r})})),display:"segmented"}}function Nc(e,t){return e>=t?Number.POSITIVE_INFINITY:e}function K4(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:jn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Ec(e){return e==="left"||e==="center"||e==="right"?e:"none"}function Dc(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?bn:jn,[e("wordTable.filter.cutLine","\uC808\uCDE8\uC120")]:t.cutLine,[e("wordPrint.divLine","\uB300\uB9BD\uC120")]:t.showDivLine?bn:jn,...t.showTopInfo!=null?{[e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4")]:t.showTopInfo?bn:jn}:{},...t.showBottomInfo!=null?{[e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4")]:t.showBottomInfo?bn:jn}:{}}}function Sc(e,t,a,r){return a===e("wordTable.filter.composition","\uAD6C\uC131")?t===kn?(r.setContentTypes(()=>[]),!0):(r.setContentTypes(s=>s.includes(t)?s.filter(l=>l!==t):[...s,t]),!0):a===e("wordTable.filter.paperOrientation","\uC6A9\uC9C0 \uBC29\uD5A5")?(r.setOrientation(t==="landscape"?"landscape":"portrait"),!0):a===e("wordTable.filter.border","\uC678\uACFD\uC120")?(r.setShowOutline(t===bn),!0):a===e("wordTable.filter.cutLine","\uC808\uCDE8\uC120")?(r.setCutLine(t),!0):a===e("wordPrint.divLine","\uB300\uB9BD\uC120")?(r.setShowDivLine(t===bn),!0):a===e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4")?(r.setShowTopInfo?.(t===bn),!0):a===e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4")?(r.setShowBottomInfo?.(t===bn),!0):!1}function Y4(e){return"sections"in e}function us(e){const{t}=_e.useTranslation(),{title:a,className:r,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c}=e,d={collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c};if(Y4(e))return n.jsx(In,{className:r,title:a??t("wordTable.filterTitle","\uD45C \uC124\uC815"),sections:e.sections,selected:e.selected,onSelect:e.onSelect,...d,align:"inline"});const{hasImage:h,hasColloquial:p,hasCaption:m,contentTypes:g,orientation:y,showOutline:C,cutLine:f,showDivLine:_,setters:b,showCutLine:w=!1,showDivLine2:v=!1,middleSections:k=[],extraSelected:x={},onExtraSelect:A,showPaperBands:B=!1,showTopInfo:E=!0,showBottomInfo:D=!0}=e,N=[yc(t,{hasImage:h,hasColloquial:p,hasCaption:m??!1}),vc(t),...k,_c(t),...w?[Bc(t)]:[],...v?[kc(t)]:[],...B?[xc(t),wc(t)]:[]],$={...Dc(t,{contentTypes:g,orientation:y,showOutline:C,cutLine:f,showDivLine:_,showTopInfo:E,showBottomInfo:D}),...x},L=(U,M)=>{Sc(t,U,M,b)||A?.(U,M)};return n.jsx(In,{className:r,title:a??t("wordTable.filterTitle","\uD45C \uC124\uC815"),sections:N,selected:$,onSelect:L,...d,sectionAlign:"horizontal"})}function cs(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function Z4(e){return cs(e).replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function ds(e){return e.replace(/[\\/:*?"<>|]/g,"_").trim()}let Nr=null,wa=null;function X4(e,t,a,r="",s=""){if(e.length===0||wa&&wa.iframe.isConnected&&Date.now()-wa.at<1e4)return;const l=r?ds(r):"";Nr?.();let i=null;if(l){const d=document.title;document.title=l,i=()=>{document.title=d,window.removeEventListener("afterprint",i),Nr===i&&(Nr=null)},Nr=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}wa={iframe:u,at:Date.now()},c.open(),c.write(ps(e,t,a,!0,l,s)),c.close(),u.contentWindow?.addEventListener("afterprint",()=>{i?.(),setTimeout(()=>{u.remove(),wa?.iframe===u&&(wa=null)},0)})}function ps(e,t,a,r=!1,s="",l=""){s=s?ds(s):"";const i=Array.from(document.styleSheets).flatMap(p=>{try{return Array.from(p.cssRules).map(m=>m.cssText)}catch{return[]}}).join(`
831
- `),u="light",c=(()=>{try{return document.documentElement.lang||""}catch{return""}})(),d=l?`<div class="paper-head">${cs(l)}</div>`:"",h=e.map(p=>{const m=p.cloneNode(!0);return m.querySelectorAll('[data-play-state="play"]').forEach(g=>g.style.display=""),m.querySelectorAll('[data-play-state="pause"]').forEach(g=>g.style.display="none"),m.querySelectorAll(".word-table-cell__score-slot:not(.word-table-cell__score-slot--on)").forEach(g=>g.remove()),m.querySelectorAll(".word-table-cell__spinner").forEach(g=>g.remove()),m.querySelectorAll("img").forEach(g=>{g.style.opacity==="0"&&(g.setAttribute("onload","this.style.opacity=''"),g.setAttribute("onerror","this.style.visibility='hidden'"))}),`<div class="paper-wrap">${d}${m.outerHTML}</div>`}).join(`
828
+ `)}const $v=new Set(["pnpm","npm","yarn","node","git","curl","docker","cat","ls","cd","rm","mv","cp","echo","export"]),Rv=/^(?: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 Pv(e,t){let a=e;const r=[],s=/^(?:sh|bash|zsh|shell|console)$/.test(t.toLowerCase()),l=(i,u)=>r.push({type:i,content:u});for(;a.length>0;){const i=a.match(/^\s+/);if(i){l("whitespace",i[0]),a=a.slice(i[0].length);continue}if(!s&&a.startsWith("//")){const v=a.indexOf(`
829
+ `),C=v===-1?a:a.slice(0,v);l("comment",C),a=a.slice(C.length);continue}if(s&&a.startsWith("#")){const v=a.indexOf(`
830
+ `),C=v===-1?a:a.slice(0,v);l("comment",C),a=a.slice(C.length);continue}const u=a.match(/^\/\*[\s\S]*?\*\//);if(u){l("comment",u[0]),a=a.slice(u[0].length);continue}const c=a.match(/^(`(?:\\.|[^`])*`|"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*')/);if(c){l("string",c[0]),a=a.slice(c[0].length);continue}const d=a.match(/^\d+(?:\.\d+)?/);if(d){l("number",d[0]),a=a.slice(d[0].length);continue}const h=a.match(Rv);if(h){l("keyword",h[0]),a=a.slice(h[0].length);continue}const p=a.match(/^[A-Za-z_$][A-Za-z0-9_$-]*/);if(p){const v=p[0];l(s&&$v.has(v)?"command":"identifier",v),a=a.slice(v.length);continue}const m=a.match(/^[=+\-*/%<>!&|^~?:]+/);if(m){l("operator",m[0]),a=a.slice(m[0].length);continue}const b=a.match(/^[()[\]{};.,]/);if(b){l("punctuation",b[0]),a=a.slice(1);continue}l("other",a[0]),a=a.slice(1)}return r}function Fv({children:e,language:t="bash",title:a="",showCopy:r=!0,size:s="default",className:l=""}){const{t:i}=_e.useTranslation(),[u,c]=o.useState(!1),d=Lv(Ru(e)),h=o.useRef(null);o.useEffect(()=>()=>{h.current&&clearTimeout(h.current)},[]);const p=async()=>{try{if(!await Hf(d))return;c(!0),h.current&&clearTimeout(h.current),h.current=setTimeout(()=>c(!1),2e3)}catch{}},m=Pv(d,t),b=s==="small"?"caption-1":"body-3";return n.jsxs("div",{className:Be("code-box",s==="small"?"code-box--small":"",l),children:[(a||r)&&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:a}),r&&n.jsx(fe,{htmlType:"button",className:"code-box__copy",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:u?"check":"copy",onClick:p,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((v,C)=>n.jsx("span",{className:`code-token ${v.type} ${b}`,children:v.content},C))})})]})}function Iv({count:e,actions:t,onClear:a,clearLabel:r,visible:s,content:l,max:i}){const{t:u}=_e.useTranslation(),c=s!==void 0?s:e>0,d=r??u("bulkBar.clearSelection","\uC120\uD0DD \uD574\uC81C"),h=o.useRef(null),p=o.useRef(null),m=o.useRef(null),b=o.useRef(c);o.useLayoutEffect(()=>{const g=p.current,w=b.current;if(b.current=c,c&&!w){const y=typeof document<"u"?document.activeElement:null;m.current=y&&y!==document.body&&!g?.contains(y)?y:null}else!c&&w&&g&&g.contains(document.activeElement)&&mr(g,m.current)},[c]);const[v,C]=o.useState(!1),f=o.useRef(!1),x=o.useRef(null);return o.useEffect(()=>{const g=h.current;if(!g)return;const w=E=>{f.current=E,C(E)},y=()=>{const E=g.firstElementChild??g,D=Array.from(E.children);if(D.length<2){w(!1);return}const N=D[0].offsetTop,$=D.some(T=>T.offsetTop!==N);if(!f.current){x.current=g.clientWidth,$&&w(!0);return}if($)return;const L=D[0],U=D[D.length-1],M=U.offsetLeft+U.offsetWidth-L.offsetLeft,P=x.current;(P==null||M<=P)&&w(!1)};if(y(),typeof ResizeObserver>"u")return;const k=new ResizeObserver(y);k.observe(g);const _=g.parentElement;let A=_?.clientWidth??0;const B=new ResizeObserver(()=>{const E=_?.clientWidth??0;E!==A&&(A=E,x.current=null,y())});return _&&B.observe(_),()=>{k.disconnect(),B.disconnect()}},[l,e]),n.jsxs("div",{ref:p,className:`bulk-bar ${c?"bulk-bar--visible":""}`,inert:!c||void 0,"aria-hidden":c?void 0:!0,children:[n.jsx("span",{ref:h,className:"bulk-bar__count body-2",role:"status",children:l??n.jsx("b",{children:u("common.selectedCount",{count:e})})}),i!==void 0&&n.jsx(ln,{size:"small",fill:"soft",variant:"main",label:`${e} / ${i}`,"aria-label":u("common.selectedOfMax",{count:e,max:i,defaultValue:`\uCD5C\uB300 ${i}\uAC1C \uC911 ${e}\uAC1C`})}),n.jsxs("div",{className:`bulk-bar__actions${v?" bulk-bar__actions--stacked":""}`,children:[n.jsx(fe,{htmlType:"button",size:40,label:d,onClick:a}),t.map((g,w)=>n.jsx(fe,{htmlType:"button",size:40,variant:g.variant??"default",icon:g.icon,label:g.label,onClick:g.onClick},w))]})]})}const Ov=[{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 zv(e){const{onClose:t,className:a}=e;return n.jsx("div",{className:Be("item-actions",a),children:Ov.map(({key:r,icon:s,closeFirst:l})=>{const i=e[r];if(!i)return null;const u=r==="publish"?i.published?i.unpublish:i.publish:i;return n.jsx(fe,{htmlType:"button",size:40,type:"dot",icon:s,ariaLabel:u.label,showTooltipInfo:u.label,onClick:()=>{l&&t(),u.onClick()}},r)})})}function Wv({items:e,className:t,ariaLabel:a="\uC54C\uB9BC \uAE00",titleLevel:r=4,targetBytes:s}){const l=r?`h${r}`:"div";return n.jsx("div",{className:`notify-text-preview${t?` ${t}`:""}`,role:"group","aria-label":a,children:e.map(i=>{const u=s===void 0?Rl(i.sms):Rl(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(([d,h])=>n.jsxs("div",{className:"notify-text-preview__meta-row",children:[n.jsx("dt",{children:d}),n.jsx("dd",{children:h})]},d))}):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?`${Ll}\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 ${Ll}\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 Hv({src:e,alt:t,className:a,style:r,tone:s,textColor:l}){const i=!s&&!!l,u=Jy(e,i),c="bl"+o.useId().replace(/[^a-zA-Z0-9]/g,"");return s?n.jsx("span",{className:Be("brand-logo","brand-logo--tone",a),role:t?"img":void 0,"aria-label":t||void 0,"aria-hidden":t?void 0:!0,style:{...r,"--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:Be("brand-logo","brand-logo--inline",a),role:t?"img":void 0,"aria-label":t||void 0,"aria-hidden":t?void 0:!0,style:{...r,"--brand-logo-text-color":l},dangerouslySetInnerHTML:{__html:Zy(Yy(u),c)}}):n.jsx("img",{src:e,alt:t,className:Be("brand-logo",a),style:r,draggable:!1})}function Pu({children:e,className:t}){const a=o.useRef(null),[r,s]=o.useState(null);return o.useEffect(()=>{s(a.current?.parentElement??null)},[]),o.useEffect(()=>{const l=a.current;if(!l||!r)return;const i=()=>{const c=typeof window<"u"&&window.getComputedStyle(l).position==="absolute"?Math.ceil(l.getBoundingClientRect().width):0;c>0?r.style.setProperty("--section-head-float-w",`${c}px`):r.style.removeProperty("--section-head-float-w")};if(i(),typeof ResizeObserver>"u")return()=>{r.style.removeProperty("--section-head-float-w")};const u=new ResizeObserver(()=>i());return u.observe(l),u.observe(r),()=>{u.disconnect(),r.style.removeProperty("--section-head-float-w")}},[r,e]),n.jsx("div",{ref:a,className:Be("section-head-float",t),children:e})}function Ho({items:e,className:t}){return n.jsx("div",{className:se(t?`chart-section__legend ${t}`:"chart-section__legend"),children:e.map((a,r)=>n.jsxs("span",{className:se("chart-section__legend-item"),children:[n.jsx("span",{className:se("chart-section__legend-dot"),style:{background:a.color}}),a.label]},r))})}function tr({label:e,children:t}){return e?n.jsxs("div",{className:se("chart-section__total chart-section__total--stacked"),children:[n.jsx("span",{className:se("chart-section__total__label body-3"),children:e}),n.jsx("span",{className:se("chart-section__total__value"),children:t})]}):n.jsx("div",{className:se("chart-section__total"),children:t})}function Vo({title:e,titleClassName:t="h3",titleLevel:a=3,icon:r,disc:s,headRight:l,headFloat:i,headSegment:u,headMenuItems:c,collapseBelow:d=420,onClick:h,ariaLabel:p,tooltip:m,totalNum:b,totalUnit:v,totalLabel:C,subRow:f,subRowAlign:x="start",className:g,inGrid:w=!1,children:y}){const{t:k}=_e.useTranslation(),_=o.useRef(null),{anchorRect:A,openAt:B,close:E}=za(),D=o.useCallback(()=>{m&&_.current&&B(_.current)},[m,B]),[N,$]=o.useState(!1);Io(()=>{const j=_.current;if(!j||!u)return;const F=G=>$(G>0&&G<d);if(F(j.clientWidth),typeof ResizeObserver>"u")return;const O=new ResizeObserver(G=>F(G[0].contentRect.width));return O.observe(j),()=>O.disconnect()},[u,d]);const[L,U]=o.useState(null),M=o.useCallback(()=>U(null),[]),P=o.useCallback(j=>{const F=j.currentTarget.getBoundingClientRect();U(O=>O?null:{left:F.left,right:F.right,top:F.top,bottom:F.bottom,width:F.width,height:F.height,x:F.x,y:F.y})},[]),T=!!u&&N;o.useEffect(()=>{T||U(null)},[T]);const ee=u?[...u.options.map(j=>({label:j.label,icon:j.icon,selected:j.key===u.value,disabled:j.disabled,onClick:()=>u.onChange(j.key),closeOnSelect:!0})),...(c??[]).map((j,F)=>F===0?{...j,separatorBefore:!0}:j)]:[],te=o.useCallback(j=>{if(!h)return;const F=j.target;F&&typeof F.closest=="function"&&F.closest('button, a, input, select, textarea, [role="radiogroup"]')||h()},[h]),I=o.useCallback(j=>{h&&j.target===j.currentTarget&&(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),h())},[h]),Y=typeof l=="function"?l({collapsed:T}):l,R=b!=null||C?n.jsxs(tr,{label:C,children:[b!=null&&n.jsx("span",{className:se("chart-section__total__num h0"),children:b}),v&&n.jsx("span",{className:se("chart-section__total__unit h5"),children:v})]}):null,q=Y||u?n.jsxs("div",{className:se("chart-section__head-right"),children:[u&&(T?n.jsx(fe,{htmlType:"button",size:Ft,type:"dot",icon:"ellipsis",ariaLabel:u.ariaLabel??k("common.more","\uB354\uBCF4\uAE30"),showTooltipInfo:u.ariaLabel??k("common.more","\uB354\uBCF4\uAE30"),"aria-haspopup":"menu","aria-expanded":!!L,onClick:P}):n.jsx(vn,{size:Ft,ariaLabel:u.ariaLabel,options:u.options.map(j=>({key:j.key,label:j.label,disabled:j.disabled})),value:u.value,onChange:u.onChange})),Y]}):null,Z=o.useId(),z=a?`h${a}`:"div";return n.jsxs("section",{ref:_,className:se(["chart-section",w&&"chart-section--grid",h&&"chart-section--clickable",g].filter(Boolean).join(" ")),onClick:h?te:void 0,onKeyDown:h?I:void 0,onPointerEnter:m?D:void 0,onPointerLeave:m?E:void 0,onFocus:m?D:void 0,onBlur:m?E:void 0,role:h?"button":void 0,tabIndex:h?0:void 0,"aria-label":h?p??(typeof e=="string"?e:void 0):void 0,"aria-labelledby":!h&&e!=null?Z:void 0,children:[m&&A&&n.jsx(Mn,{anchorRect:{left:A.left,top:A.top+21,right:A.right,bottom:A.bottom,width:A.width,height:A.height},text:m}),i&&n.jsx(Pu,{children:i}),n.jsxs("div",{className:se("chart-section__head"),children:[n.jsxs("div",{className:se("chart-section__title-row"),children:[r&&n.jsx(ot,{icon:r,label:typeof e=="string"?e:void 0,className:se("chart-section__icon")}),n.jsx(z,{id:Z,className:se(["chart-section__title",t].filter(Boolean).join(" ")),children:e})]}),q,s&&n.jsx("div",{className:se("chart-section__disc body-3"),children:s})]}),(R||f)&&n.jsxs("div",{className:se(["chart-section__sub-row",x!=="start"&&`chart-section__sub-row--${x}`].filter(Boolean).join(" ")),children:[R,f]}),y,L&&n.jsx(Bn,{anchorRect:L,onClose:M,ariaLabel:u?.ariaLabel??k("tooltip.menu","\uBA54\uB274"),children:n.jsx(Va,{columns:[{items:ee}],onClose:M,size:"small"})})]})}const nr=(e,t)=>`${e}-${String(t).padStart(2,"0")}`,qo=e=>nr(e.getFullYear(),e.getMonth()+1);function ya(e){const t=/^(\d{4})-(\d{2})$/.exec(e);if(!t)return null;const a=Number(t[2]);return a>=1&&a<=12?{year:Number(t[1]),month1:a}:null}const Uo=(e,t)=>`${e}#${t}`;function Sn(e,t){const a=new Date(e,t,1).getDay();return 1+(8-(a===0?7:a))%7}function Vv(){const e=ha();let t=e.getFullYear(),a=e.getMonth(),r=e.getDate();if(r<Sn(t,a)){const i=new Date(t,a,0);t=i.getFullYear(),a=i.getMonth(),r=i.getDate()}const s=Math.floor((r-Sn(t,a))/7),l=nr(t,a+1);return{monthKey:l,value:Uo(l,s)}}function qv(e){const t=ha(),a=qo(t),r=(c,d)=>nr(c,d+1),s=new Map;s.set(a,[]);for(const c of e){if(isNaN(c.date.getTime()))continue;const d=r(c.date.getFullYear(),c.date.getMonth());s.has(d)||s.set(d,[]),s.get(d).push(c)}for(const[c,d]of[...s.entries()]){const h=ya(c);if(!h)continue;const p=h.year,m=h.month1-1,b=Sn(p,m);if(!(c===a&&t.getDate()<b)&&!d.some(f=>f.date.getDate()<b))continue;const v=new Date(p,m,0),C=r(v.getFullYear(),v.getMonth());s.has(C)||s.set(C,[])}const l=new Map;for(const[c,d]of s){const h=ya(c);if(!h)continue;const p=h.year,m=h.month1-1,b=new Date(p,m+1,0).getDate(),v=d.reduce((y,k)=>Math.max(y,k.parts?.length??0,k.partsB?.length??0),0),C=d.some(y=>y.partsB),f=new Array(b+1).fill(0),x=new Array(b+1).fill(0),g=Array.from({length:b+1},()=>new Array(v).fill(0)),w=Array.from({length:b+1},()=>new Array(v).fill(0));for(const y of d){const k=y.date.getDate();if(f[k]+=y.a,x[k]+=y.b,y.parts)for(let _=0;_<v;_++)g[k][_]+=y.parts[_]??0;if(y.partsB)for(let _=0;_<v;_++)w[k][_]+=y.partsB[_]??0}l.set(c,{year:p,month:m,daysInMonth:b,partsLen:v,hasPartsB:C,dayA:f,dayB:x,dayParts:g,dayPartsB:w})}const i=(c,d,h)=>new Date(c,d,h).getTime()>new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime(),u={};for(const[c,d]of l){const{year:h,month:p,daysInMonth:m,dayA:b,dayB:v,dayParts:C,dayPartsB:f}=d,x=h===t.getFullYear()&&p===t.getMonth(),g=t.getDate(),w=l.get(r(p===11?h+1:h,(p+1)%12)),y=d.partsLen,k=[];for(let A=1;A<=m;A++){const B=x&&A>g;k.push({label:String(A),...B&&b[A]===0&&v[A]===0?{future:!0}:{},a:B&&b[A]===0&&v[A]===0?-1:b[A],b:v[A],...y?{parts:C[A]}:{},...y&&d.hasPartsB?{partsB:f[A]}:{}})}const _=[];for(let A=Sn(h,p);A<=m;A+=7){const B=Math.max(0,A+6-m),E=B&&w?Math.max(y,w.partsLen):y,D=d.hasPartsB||!!(B&&w?.hasPartsB);let N=0,$=0;const L=new Array(E).fill(0),U=new Array(E).fill(0);for(let P=A;P<=Math.min(A+6,m);P++){N+=b[P],$+=v[P];for(let T=0;T<y;T++)L[T]+=C[P][T],U[T]+=f[P][T]}if(B&&w)for(let P=1;P<=B&&!i(w.year,w.month,P);P++){N+=w.dayA[P],$+=w.dayB[P];for(let T=0;T<w.partsLen;T++)L[T]+=w.dayParts[P][T],U[T]+=w.dayPartsB[P][T]}const M=B?`${(p+1)%12+1}/${B}`:`${A+6}`;_.push({label:`${_.length+1}\uC8FC`,sublabel:`[${A}\uC77C~${M}\uC77C]`,a:N,b:$,...E?{parts:L}:{},...E&&D?{partsB:U}:{}})}u[c]={weekly:_,daily:k}}return u}function Fu(){const e=ha(),t=e.getFullYear(),a=e.getMonth()+1,r=[];for(let s=2024;s<=t;s++){const l=s===t?a:12;for(let i=1;i<=l;i++)r.push({value:nr(s,i),year:s,month:i})}return r.reverse()}Fu();function Uv(){return Fu()}function Iu(e,t){const a=e("calendar.weekOrdinal",{returnObjects:!0,defaultValue:[]}),r=Array.isArray(a)&&typeof a[t]=="string"?a[t]:null;return e("calendar.weekLabel",{ord:r??String(t+1)})}function Ou(e){const{t,i18n:a}=_e.useTranslation(),[r,s]=o.useState("week"),l=o.useMemo(()=>Uv().filter(E=>E.value in e),[e]),i=o.useMemo(()=>{const E=[];for(const D of l){const N=new Date(D.year,D.month,0).getDate(),$=Sn(D.year,D.month-1),L=Math.ceil((N-$+1)/7);for(let U=L-1;U>=0;U--)E.push({value:Uo(D.value,U),monthKey:D.value,year:D.year,month:D.month,week:U})}return E},[l]),u=o.useCallback(E=>`${co(t,a.language,E.year,E.month)} ${Iu(t,E.week)}`,[t]),c=o.useMemo(()=>l.map(E=>({value:E.value,label:co(t,a.language,E.year,E.month)})),[t,a.language,l]),d=o.useMemo(()=>i.map(E=>({value:E.value,label:u(E)})),[i,u]),h=o.useMemo(()=>Vv(),[e]),p=o.useMemo(()=>l.find(E=>E.value===h.monthKey)?.value??l[0]?.value??"",[l,h]),m=o.useMemo(()=>i.find(E=>E.value===h.value)?.value??i[0]?.value??"",[i,h]),[b,v]=o.useState(""),[C,f]=o.useState("");o.useEffect(()=>{l.find(E=>E.value===b)||v(p)},[l,b,p]),o.useEffect(()=>{i.find(E=>E.value===C)||f(m)},[i,C,m]);const x=r==="month"?c:d,g=r==="month"?b:C,w=r==="month"?v:f,y=o.useMemo(()=>{const E=t("calendar.dow",{returnObjects:!0});return Array.isArray(E)?E:["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"]},[t]),k=x.findIndex(E=>E.value===g),_=o.useCallback(()=>{const E=x.findIndex(D=>D.value===g);E<x.length-1&&w(x[E+1].value)},[x,g,w]),A=o.useCallback(()=>{const E=x.findIndex(D=>D.value===g);E>0&&w(x[E-1].value)},[x,g,w]),B=o.useMemo(()=>[{key:"week",label:t("manager.chart.periodWeek","\uC8FC")},{key:"month",label:t("manager.chart.periodMonth","\uC6D4")}],[t]);return{period:r,setPeriod:s,range:g,setRange:w,activeOptions:x,activeIdx:k,handlePrev:_,handleNext:A,periodOptions:B,monthRange:b,weekRange:C,weekRanges:i,DOW:y}}const Mt=e=>typeof e=="number"&&Number.isFinite(e)?e:0;function Fn(e,t=!0){return e.future===!0||t&&e.a===-1}function Gv({data:e,colorA:t,colorB:a,labelA:r,labelB:s,barWidth:l=10,barGap:i=1,height:u=140,maxOverride:c,tightMax:d,seriesColors:h,seriesLabels:p,rateLabels:m,grouped:b=!1,baseline:v,focusableBars:C=!1}){const f=!a,x=!!(h&&h.length>0),g=v,w=o.useMemo(()=>x?Math.max(0,...e.filter(I=>!Fn(I,g==null)).map(I=>b?Math.max(0,...(I.parts??[]).map(Mt)):(I.parts??[]).reduce((Y,R)=>Y+Math.max(0,Mt(R)),0))):Math.max(0,...e.filter(I=>!Fn(I,g==null)).flatMap(I=>f?[Mt(I.a)]:[Mt(I.a),Mt(I.b)])),[e,f,x,b]),y=o.useMemo(()=>{if(g==null)return 0;const I=e.filter(Y=>!Fn(Y,g==null)).flatMap(Y=>x?(Y.parts??[]).map(Mt):f?[Mt(Y.a)]:[Mt(Y.a),Mt(Y.b)]);return Math.max(0,...I.map(Y=>Math.abs(Y-g)))},[e,g,x,f]),k=o.useMemo(()=>{const I=g!=null?y:w;return c??(d?I>0?I:10:Math.ceil(I/10)*10||10)},[w,y,g,c,d]),_=u,A=x?b?Math.max(1,h.length):1:f?1:2,B={"--bar-width":`${o.useMemo(()=>{const I=Math.max(1,e.length);return Math.max(2,Math.min(l,Math.round(120/(I*A)+6)))},[e.length,A,l])}px`},E={"--bar-group-gap":`${Math.max(0,i)}px`},D=o.useMemo(()=>{const I=Math.round(k/2);return g!=null?[g+k,...I!==k?[g+I]:[],g,...I!==k?[g-I]:[],g-k]:I!==k?[k,I,0]:[k,0]},[k,g]),N=I=>g!=null?1-(I-(g-k))/(2*k):1-I/k,[$,L]=o.useState(null),U=o.useCallback(()=>L(null),[]),M=o.useCallback((I,Y)=>{const R=[I.label,I.sublabel].filter(Boolean).join(" ");let q;if(x&&b&&I.rawPartsB)q=(p??[]).map((Z,z)=>{const j=I.rawPartsB[z]??0;return{text:j>0?`${Z}: ${Y[z]??0}% (${I.rawParts?.[z]??0}/${j})`:`${Z}: -`,color:(h??[])[z]}});else if(x&&b)q=(p??[]).map((Z,z)=>({text:`${Z}: ${ee(Y[z]??0)}`,color:(h??[])[z]}));else if(x){const Z=(p??[]).map((j,F)=>({text:`${j}: ${Y[F]??0}`,color:(h??[])[F]})),z=Z.filter((j,F)=>(Y[F]??0)>0);q=z.length?z:Z}else m&&!f?q=[{text:`${r} ${Mt(I.a)}%`,color:t},{text:`${s} ${Mt(I.b)}%`,color:a}]:m&&I.rawB!==void 0?q=[{text:`${m.total} ${I.rawB}`},{text:`${m.done} ${I.rawA??0}`,color:t}]:f?q=[{text:`${r}: ${Mt(I.a)}`,color:t}]:q=[{text:`${r}: ${Mt(I.a)}`,color:t},{text:`${s}: ${Mt(I.b)}`,color:a}];return{title:R,items:q}},[x,b,p,h,m,f,r,s,t,a,g]),P=o.useCallback((I,Y,R)=>{const q=I.getBoundingClientRect(),{title:Z,items:z}=M(Y,R);L({rect:{left:q.left,top:q.top,right:q.right,bottom:q.bottom,width:q.width,height:q.height},title:Z,items:z})},[M]),T=o.useCallback((I,Y)=>{const{title:R,items:q}=M(I,Y);return[R,...q.map(Z=>Z.text)].filter(Boolean).join(", ")},[M]),ee=I=>g!=null&&I>g?`+${I}`:`${I}`,te=$!=null;return o.useEffect(()=>{if(!te)return;const I=()=>L(null),Y=R=>{const q=R.target;q&&typeof q.closest=="function"&&q.closest(".bar-chart__col")||L(null)};return window.addEventListener("scroll",I,!0),document.addEventListener("pointerdown",Y,!0),()=>{window.removeEventListener("scroll",I,!0),document.removeEventListener("pointerdown",Y,!0)}},[te]),n.jsxs("div",{className:se("bar-chart__wrap"),style:E,children:[n.jsx("div",{className:se("bar-chart__inner"),children:n.jsx("div",{className:se("bar-chart__scroll"),children:n.jsxs("div",{className:se("bar-chart__area"),children:[n.jsxs("div",{className:se("bar-chart__plot"),style:{height:_},children:[D.slice(0,-1).map((I,Y)=>n.jsx("div",{className:se(`bar-chart__gridline${g!=null&&I===g?" bar-chart__gridline--baseline":""}`),style:{top:N(I)*_},children:n.jsx("span",{className:se("bar-chart__gridline__label caption-1"),children:I})},Y)),e.map((I,Y)=>{const R=Fn(I,g==null),q=_/2,Z=O=>g!=null?Math.min(q,Math.abs(Mt(O)-g)/k*q):Math.min(_,Math.max(0,Mt(O)/k*_)),z=R?0:Z(I.a),j=R?0:Z(I.b),F=(I.parts??[]).map(Mt);return n.jsx("div",{className:se(`bar-chart__col${b&&x?" bar-chart__col--group":""}`),style:{cursor:R?"default":"pointer"},tabIndex:C&&!R?0:void 0,role:C&&!R?"img":void 0,"aria-label":C&&!R?T(I,F):void 0,onMouseEnter:R?void 0:O=>P(O.currentTarget,I,F),onFocus:R||!C?void 0:O=>P(O.currentTarget,I,F),onBlur:C?U:void 0,onMouseLeave:U,children:!R&&(x&&b?(h??[]).map((O,G)=>{const ie=F[G]??0;if(g==null)return n.jsx("div",{className:se("bar-chart__bar"),style:{...B,height:Z(ie),background:O}},G);const K=Mt(ie)<g;return n.jsxs("div",{className:se("bar-chart__slot"),style:B,children:[n.jsx("div",{className:se("bar-chart__slot__half bar-chart__slot__half--up"),children:!K&&n.jsx("div",{className:se("bar-chart__bar bar-chart__bar--full"),style:{height:Z(ie),background:O}})}),n.jsx("div",{className:se("bar-chart__slot__half bar-chart__slot__half--down"),children:K&&n.jsx("div",{className:se("bar-chart__bar bar-chart__bar--full bar-chart__bar--down"),style:{height:Z(ie),background:O}})})]},G)}):x?n.jsx("div",{className:se("bar-chart__stack"),style:B,children:(()=>{const O=F.reduce((ie,K,pe)=>K>0?pe:ie,-1);let G=_;return F.map((ie,K)=>{if(ie<=0)return null;const pe=Math.min(G,ie/k*_);return G-=pe,n.jsx("div",{className:se("bar-chart__stack-segment"),style:{height:pe,background:(h??[])[K],borderRadius:K===O?"6px 6px 0 0":void 0}},K)})})()}):g!=null?n.jsx(n.Fragment,{children:[{v:Mt(I.a),c:t},...f?[]:[{v:Mt(I.b),c:a}]].map(({v:O,c:G},ie)=>n.jsxs("div",{className:se("bar-chart__slot"),style:B,children:[n.jsx("div",{className:se("bar-chart__slot__half bar-chart__slot__half--up"),children:O>=g&&n.jsx("div",{className:se("bar-chart__bar bar-chart__bar--full"),style:{height:Z(O),background:G}})}),n.jsx("div",{className:se("bar-chart__slot__half bar-chart__slot__half--down"),children:O<g&&n.jsx("div",{className:se("bar-chart__bar bar-chart__bar--full bar-chart__bar--down"),style:{height:Z(O),background:G}})})]},ie))}):n.jsxs(n.Fragment,{children:[n.jsx("div",{className:se("bar-chart__bar"),style:{...B,height:z,background:t}}),!f&&n.jsx("div",{className:se("bar-chart__bar"),style:{...B,height:j,background:a}})]}))},Y)})]}),n.jsx("div",{className:se("bar-chart__x-axis"),children:e.map((I,Y)=>{const R=Fn(I,g==null);return n.jsxs("span",{className:se(`bar-chart__x-axis__label${R?" bar-chart__x-axis__label--future":""}`),children:[n.jsxs("span",{className:se("caption-1 bar-chart__x-axis__main"),children:[I.isToday&&n.jsx("span",{className:se("bar-chart__x-axis__today-dot"),style:{background:t}}),I.label]}),I.sublabel&&n.jsx("span",{className:"caption-1",children:I.sublabel})]},Y)})})]})})}),$&&n.jsx(qn,{anchorRect:$.rect,title:$.title,items:$.items,showIndex:!1,closeOnOutsideClick:!1})]})}function zu({control:e}){const{t}=_e.useTranslation(),{activeOptions:a,activeIdx:r,range:s,setRange:l,handlePrev:i,handleNext:u,periodOptions:c,period:d,setPeriod:h}=e,p=d==="week"?t("calendar.prevWeek","\uC774\uC804 \uC8FC"):t("calendar.prevMonth","\uC774\uC804 \uB2EC"),m=d==="week"?t("calendar.nextWeek","\uB2E4\uC74C \uC8FC"):t("calendar.nextMonth","\uB2E4\uC74C \uB2EC");return n.jsxs("div",{className:se("chart-section__controls"),children:[n.jsx(fe,{htmlType:"button",size:Ft,type:"dot",icon:"chevron-left",ariaLabel:p,showTooltipInfo:p,disabled:r===a.length-1,onClick:i}),n.jsx(_n,{value:s,onChange:l,options:a,size:Ft,className:"month-dropdown",ariaLabel:t("calendar.rangeSelect","\uAE30\uAC04 \uC120\uD0DD")}),n.jsx(fe,{htmlType:"button",size:Ft,type:"dot",icon:"chevron-right",ariaLabel:m,showTooltipInfo:m,disabled:r<=0,onClick:u}),n.jsx(vn,{ariaLabel:t("calendar.periodSelect","\uAE30\uAC04 \uB2E8\uC704"),options:c,value:d,onChange:b=>h(b),size:Ft})]})}function Go(e,t,a,r=!0){const s=new Date(a.getFullYear(),a.getMonth(),a.getDate());return Array.from({length:7},(l,i)=>{const u=new Date(t);u.setDate(t.getDate()+i);const c=(e[qo(u)]?.daily??[])[u.getDate()-1],d=c!=null&&Fn(c,r)||u>s;return{dt:u,entry:c,isFuture:d}})}function Kv(e,t,a,r=!0){const{period:s,monthRange:l,weekRange:i,weekRanges:u,DOW:c}=t,d=ha(),h=d.getFullYear(),p=d.getMonth()+1,m=d.getDate();if(s==="month"){const C=e[l]??{weekly:[],daily:[]},f=ya(l),x=f?f.year:null,g=f?f.month1:null,w=x&&g?Sn(x,g-1):1;return C.weekly.map((y,k)=>{const _=k+1;let A=y.label,B=!1,E=!1;if(x&&g){const D=w+k*7,N=new Date(x,g-1,D+6),$=N.getMonth()+1,L=N.getDate(),U=$===g?`${L}`:`${$}/${L}`;A=a("manager.chart.weekRange",{start:D,end:U});const M=new Date(h,p-1,m).getTime();B=M>=new Date(x,g-1,D).getTime()&&M<=N.getTime(),E=x>h||x===h&&(g>p||g===p&&D>m)}return{...y,label:A,sublabel:Iu(a,_-1),isToday:B,future:y.future===!0||E||void 0,a:E?-1:y.a,b:E?0:y.b}})}const b=u.find(C=>C.value===i);if(!b)return[];const v=new Date(b.year,b.month-1,Sn(b.year,b.month-1)+b.week*7);return Go(e,v,d,r).map(({dt:C,entry:f,isFuture:x})=>{const g=C.getMonth()+1,w=C.getDate(),y=C.getFullYear();return{label:g===b.month&&y===b.year?`${w}`:`${g}/${w}`,sublabel:c[C.getDay()]??"",future:x||void 0,a:x?-1:f&&f.a>0?f.a:0,b:x?0:f&&f.b>0?f.b:0,isToday:y===h&&g===p&&w===m,...f?.parts?{parts:x?f.parts.map(()=>0):f.parts}:{},...f?.partsB?{partsB:x?f.partsB.map(()=>0):f.partsB}:{}}})}const Yv={small:{height:100,barWidth:16},medium:{height:140,barWidth:20},large:{height:180,barWidth:24}};function Zv({focusableBars:e,size:t="medium",barWidth:a,titleKey:r,titleLevel:s,data:l,colorA:i,colorB:u,labelAKey:c,labelBKey:d,showTotal:h=!1,totalUnitKey:p,totalLabelKey:m,control:b,hideControls:v=!1,rate:C=!1,rateAgg:f="dayMean",tightMax:x=!1,avgMode:g=!1,totalFormat:w,series:y,seriesMode:k="stack",loading:_=!1,onDetail:A,headExtra:B,headSegment:E,icon:D,disc:N,onClick:$,cardAriaLabel:L,cardTooltip:U,detailSize:M=Ft,barGap:P,baseline:T,className:ee,inGrid:te=!1}){const{t:I}=_e.useTranslation(),Y=Yv[t],R=Ou(l),q=b??R,Z=o.useMemo(()=>Kv(l,q,I,T==null),[l,q,I,T]),z=k==="group"&&!!y&&y.length>0;P!=null&&!z&&At("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 j=o.useMemo(()=>{if(!C)return Z;const X=q.period==="month"?ya(q.monthRange):null,H=ha(),ne=y?.length??0,V=W=>{const oe=[],xe=[],be=[];for(let me=0;me<ne;me++){let ke=0,Le=0,Me=0;for(const le of W){const ve=Mt(le.a[me]),$e=Mt(le.b[me]);$e<=0||(ke+=ve,Le+=$e,Me+=ve/$e*100)}oe.push(f==="weighted"?Le>0?Math.round(ke/Le*100):0:W.length?Math.round(Me/W.length):0),xe.push(ke),be.push(Le)}return{pct:oe,ra:xe,rb:be}};return Z.map((W,oe)=>{let xe=W.a===-1?-1:W.b>0?Math.round(W.a/W.b*100):0;if(X&&!Fn(W)){const me=X.year,ke=X.month1-1,Le=Go(l,new Date(me,ke,Sn(me,ke)+oe*7),H).filter(Me=>!Me.isFuture);if(f==="weighted"){let Me=0,le=0;for(const{entry:ve}of Le)ve&&ve.b>0&&(Me+=ve.a,le+=ve.b);xe=le>0?Math.round(Me/le*100):0}else xe=Le.length?Math.round(Le.reduce((Me,{entry:le})=>Me+(le&&le.b>0?le.a/le.b*100:0),0)/Le.length):0}let be=null;if(z&&!Fn(W)){let me;if(X){const Le=X.year,Me=X.month1-1;me=Go(l,new Date(Le,Me,Sn(Le,Me)+oe*7),H).filter(le=>!le.isFuture).map(({entry:le})=>({a:le?.parts??[],b:le?.partsB??[]}))}else me=[{a:W.parts??[],b:W.partsB??[]}];const ke=V(me);be={parts:ke.pct,rawParts:ke.ra,rawPartsB:ke.rb}}return{...W,a:xe,b:W.a===-1?0:d&&W.parts&&W.parts[1]>0?Math.round(W.parts[0]/W.parts[1]*100):0,rawA:W.a===-1?-1:W.a,rawB:W.b,...be??{}}})},[Z,C,f,d,q.period,q.monthRange,l,z,y?.length]),F=o.useMemo(()=>{if(C||g){const H=(q.period==="week"?Z:l[q.monthRange]?.daily??[]).filter(V=>V.a!==-1);if(H.length===0)return 0;if(C&&f==="weighted"){let V=0,W=0;for(const oe of H)oe.b>0&&(V+=oe.a,W+=oe.b);return W>0?Math.round(V/W*100):0}const ne=C?H.reduce((V,W)=>V+(W.b>0?W.a/W.b*100:0),0):H.reduce((V,W)=>V+(W.a>0?W.a:0),0);return Math.round(ne/H.length)}const X=q.period==="month"?l[q.monthRange]?.daily??[]:j;return T!=null?X.reduce((H,ne)=>H+(Fn(ne,!1)?0:Mt(ne.a)+(d?Mt(ne.b):0)),0):X.reduce((H,ne)=>H+(ne.a>0?ne.a:0)+(d&&ne.b>0?ne.b:0),0)},[j,Z,C,f,g,T,d,q.period,q.monthRange,l]),O=y&&y.length>0?y.map(X=>({color:X.color,label:X.label})):[{color:i,label:I(c)},...d?[{color:u,label:I(d)}]:[]],G=t==="small",ie=[G?"chart-section--compact":t==="large"?"chart-section--full":void 0,ee].filter(Boolean).join(" ")||void 0,K=r?I(r):"",pe=K?I("trainingStatus.detailFor",{name:K,defaultValue:"{{name}} \uC0C1\uC138\uBCF4\uAE30"}):I("trainingStatus.detail","\uC0C1\uC138\uBCF4\uAE30");return n.jsx(Vo,{className:ie,inGrid:te,icon:D,disc:N,onClick:$,ariaLabel:L,tooltip:U,headSegment:E,headMenuItems:A?[{label:pe,icon:"list",onClick:A,closeOnSelect:!0}]:void 0,title:I(r),titleLevel:s,titleClassName:G?"h5 chart-section-title--small":void 0,headRight:G?B??void 0:({collapsed:X})=>n.jsxs(n.Fragment,{children:[!v&&n.jsx(zu,{control:q}),B,A&&!X&&n.jsx("span",{className:se("bar-chart__detail-btn"),children:n.jsx(fe,{htmlType:"button",size:M,type:"dot",icon:"list",ariaLabel:pe,showTooltipInfo:pe,onClick:A})})]}),subRow:n.jsxs(n.Fragment,{children:[h?C||g||m&&w?n.jsx(tr,{label:G?void 0:`${I(q.period==="week"?"manager.chart.weeklyPrefix":"manager.chart.monthlyPrefix")} ${I(m??c)}`,children:w?(w(F).match(/([+-]?\d[\d.,]*|[^\d]+)/g)??[]).map((X,H)=>/\d/.test(X)?n.jsx("span",{className:se("chart-section__total__num h0"),children:X},H):n.jsx("span",{className:se("chart-section__total__unit h5"),children:X},H)):n.jsxs(n.Fragment,{children:[n.jsx("span",{className:se("chart-section__total__num h0"),children:F}),p&&n.jsx("span",{className:se("chart-section__total__unit h5"),children:I(p)})]})}):n.jsxs(tr,{children:[n.jsx("span",{className:se("chart-section__total__num h0"),children:F}),n.jsx("span",{className:se("chart-section__total__unit h5"),children:I(c)}),p&&n.jsx("span",{className:se("chart-section__total__unit h5"),children:I(p)})]}):n.jsx("span",{}),n.jsx(Ho,{items:O,className:"caption-1"})]}),children:_?n.jsx("div",{className:se("bar-chart__wrap bar-chart__loading"),"aria-busy":"true",children:n.jsx("div",{className:se("bar-chart__inner"),children:n.jsxs("div",{className:se("bar-chart__area bar-chart__area--loading"),children:[n.jsx("div",{className:se("bar-chart__plot bar-chart__plot--loading"),style:{height:Y.height},children:n.jsx(Ca,{size:32})}),n.jsx("div",{className:se("bar-chart__x-axis"),"aria-hidden":"true",children:n.jsxs("span",{className:se("bar-chart__x-axis__label"),children:[n.jsx("span",{className:se("caption-1 bar-chart__x-axis__main"),children:"\xA0"}),j.some(X=>!!X.sublabel)&&n.jsx("span",{className:"caption-1",children:"\xA0"})]})})]})})}):n.jsx(Gv,{focusableBars:e,data:j,colorA:i,colorB:d?u:void 0,labelA:I(c),labelB:d?I(d):void 0,barWidth:a??Y.barWidth,barGap:P,baseline:T,height:Y.height,maxOverride:C?100:void 0,tightMax:x,seriesColors:y?.map(X=>X.color),seriesLabels:y?.map(X=>X.label),rateLabels:C?{total:I("trainingStatus.today.tooltipTotal","\uC804\uCCB4"),done:I("trainingStatus.today.tooltipDone","\uC644\uB8CC")}:void 0,grouped:z})})}const Wu=120,Xv={left:38,right:16,top:26,bottom:24};function Jv({points:e=[],range:t,ticks:a=[],axisTitle:r,color:s,height:l=156,fallbackWidth:i=320,insets:u,overlay:c,ariaLabel:d,className:h}){const[p,m]=o.useState(null),[b,v]=o.useState(null);o.useEffect(()=>{if(!b)return;const T=te=>m(Math.round(te)||null);if(T(b.getBoundingClientRect().width),typeof ResizeObserver>"u")return;const ee=new ResizeObserver(([te])=>T(te.contentRect.width));return ee.observe(b),()=>{ee.disconnect()}},[b]);const{payload:C,anchorRect:f,openAfterDelay:x,close:g}=Vy(Wu),w=o.useCallback((T,ee)=>{T&&x(T,ee.getBoundingClientRect())},[x]),y=p??i,k=l,{left:_,right:A,top:B,bottom:E}={...Xv,...u},[D,N]=t,$=T=>N===D?_:_+(y-_-A)*(T-D)/(N-D),L=T=>B+(k-B-E)*(100-T)/100,U={x:$,y:L,plot:{left:_,right:y-A,top:B,bottom:k-E,width:Math.max(0,y-_-A),height:Math.max(0,k-B-E)}},M=e.filter(T=>!T.hollow),P=s??"var(--color-main)";return n.jsxs(n.Fragment,{children:[n.jsxs("svg",{ref:v,className:Be("line-chart",h),viewBox:`0 0 ${y} ${k}`,role:"img","aria-label":d??e.map(T=>T.description).filter(Boolean).join(", "),children:[r&&n.jsx("text",{className:"line-chart__axis-title",x:0,y:12,children:r}),[0,100].map(T=>n.jsxs("g",{children:[n.jsx("line",{className:"line-chart__grid",x1:_,x2:y-A,y1:L(T),y2:L(T)}),n.jsxs("text",{className:"line-chart__tick",x:_-6,y:L(T)+4,textAnchor:"end",children:[T,"%"]})]},T)),c?.(U),a.map(T=>n.jsx("text",{className:"line-chart__tick",x:$(T.x),y:k-5,textAnchor:"middle",children:T.label},T.x)),M.length>1&&n.jsx("polyline",{className:"line-chart__line",fill:"none",stroke:P,points:M.map(T=>`${$(T.x)},${L(T.pct)}`).join(" ")}),e.map(T=>n.jsxs("g",{className:"line-chart__dot",onPointerEnter:ee=>w(T.description,ee.currentTarget),onPointerLeave:g,children:[n.jsx("circle",{className:"line-chart__dot-hit",cx:$(T.x),cy:L(T.pct),r:12}),n.jsx("circle",{className:Be("line-chart__dot-main",T.hollow&&"is-hollow"),cx:$(T.x),cy:L(T.pct),r:4,stroke:P,fill:T.hollow?void 0:P})]},T.x))]}),C!=null&&n.jsx(Bn,{anchorRect:f,offset:10,closeOnOutsideClick:!1,className:"line-chart__tip",role:"tooltip",ariaLabel:C,children:C})]})}function Qv({icon:e,iconSize:t=56,title:a,titleClass:r="h2",description:s,tipGroups:l,start:i,className:u}){return n.jsxs("div",{className:Be("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:Be("game-intro__title",r),children:a}),s!=null&&n.jsx("p",{className:"game-intro__description body-3",children:s}),l?.map((c,d)=>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,p)=>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})]},p))]},d)),i&&n.jsx(fe,{htmlType:"button",className:i.className,variant:"main",color:i.color,size:48,width:"100%",disabled:i.disabled,onClick:i.onClick,children:i.label})]})}const Hu=(e,t,a)=>{const r=new Date(Date.UTC(e,t,a));return`${r.getUTCFullYear()}-${String(r.getUTCMonth()+1).padStart(2,"0")}-${String(r.getUTCDate()).padStart(2,"0")}`},Vu=(e,t,a,r)=>({from:Gl(e,t,a),to:new Date(Gl(e,t,a+r).getTime()-1),fromYmd:Hu(e,t,a),toYmd:Hu(e,t,a+r-1)});function e4(e,t=0){if(e.period==="month"){const s=ya(e.monthRange),l=ha(),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 Vu(i,u,1,c)}const a=e.weekRanges.find(s=>s.value===e.weekRange);if(!a){const s=new Date,l=Fa();return{from:s,to:s,fromYmd:l,toYmd:l}}const r=Sn(a.year,a.month-1);return Vu(a.year,a.month-1,r+(a.week+t)*7,7)}const Ko={small:{diameter:96,strokeWidth:16},medium:{diameter:120,strokeWidth:18},large:{diameter:160,strokeWidth:22}};function qu(e){return!Number.isFinite(e)||e<=0?0:e>=1?100:Math.min(99,Math.max(1,Math.round(e*100)))}function Uu({done:e,total:t,segments:a,color:r="var(--color-main)",size:s="medium",strokeWidth:l,label:i="%",hideCenter:u=!1,hideLabel:c=!1}){const d=typeof s=="number"?s:Ko[s].diameter,h=l??(typeof s=="number"?12:Ko[s].strokeWidth),p=d/2,m=(d-h)/2,b=2*Math.PI*m;if(a&&a.length>0){const x=a.reduce((g,w)=>{const y=g.length>0?g[g.length-1].acc:0,k=Number.isFinite(w.ratio)?w.ratio:0,_=Math.max(0,Math.min(k,1-y));return g.push({color:w.color,rotate:-90+y*360,dash:b*_,acc:y+_}),g},[]);return n.jsx("div",{className:"ring-chart",style:{width:d,height:d},children:n.jsxs("svg",{width:d,height:d,viewBox:`0 0 ${d} ${d}`,"aria-hidden":"true",children:[n.jsx("circle",{cx:p,cy:p,r:m,fill:"none",stroke:"var(--color-whiteLine)",strokeWidth:h}),x.map((g,w)=>g.dash>0&&n.jsx("circle",{cx:p,cy:p,r:m,fill:"none",stroke:g.color,strokeWidth:h,strokeDasharray:`${g.dash} ${b}`,strokeLinecap:"round",transform:`rotate(${g.rotate} ${p} ${p})`},w))]})})}const v=(t??0)>0?Math.min((e??0)/t,1):0,C=b*v,f=b-C;return n.jsxs("div",{className:"ring-chart",style:{width:d,height:d},children:[n.jsxs("svg",{width:d,height:d,viewBox:`0 0 ${d} ${d}`,"aria-hidden":"true",children:[n.jsx("circle",{cx:p,cy:p,r:m,fill:"none",stroke:"var(--color-whiteLine)",strokeWidth:h}),v>0&&n.jsx("circle",{cx:p,cy:p,r:m,fill:"none",stroke:r,strokeWidth:h,strokeDasharray:`${C} ${f}`,strokeLinecap:v<.02||v>.98?"butt":"round",transform:`rotate(-90 ${p} ${p})`})]}),!u&&n.jsxs("div",{className:`ring-chart__center${c?"":` ${d<=96?"ring-chart__center--small":s==="medium"?"ring-chart__center--medium":"ring-chart__center--large"}`}`,children:[n.jsx("span",{className:`ring-chart__pct ${d<=96?"h2":"h1"}`,children:qu(v)}),!c&&n.jsx("span",{className:`ring-chart__label ${d<=96?"caption-2":"caption-1"}${d<=96||s==="medium"?" ring-chart__label--tight":""}`,children:i})]})]})}function t4({titleKey:e,titleLevel:t,headRight:a,icon:r,showTotal:s,totalLabelKey:l,legend:i,loading:u,className:c,inGrid:d=!1,onClick:h,ariaLabel:p,tooltip:m,...b}){const{t:v}=_e.useTranslation();if(!e)return n.jsx(Uu,{...b});const C=(b.total??0)>0?qu(Math.min((b.done??0)/b.total,1)):0,f=b.size==="small",x=typeof b.size=="number"?b.size:Ko[b.size??"medium"].diameter,g=b.size==="large",w=[c,f?"chart-section--compact":g?"chart-section--full":""].filter(Boolean).join(" ")||void 0,y=r&&n.jsx("span",{className:se("chart-section-icon"),children:n.jsx(ot,{icon:r,className:se("chart-section-icon-inner")})});return n.jsx(Vo,{className:w,inGrid:d,onClick:h,ariaLabel:p,tooltip:m,title:v(e),titleLevel:t,titleClassName:f?"h5 chart-section-title--small":void 0,headRight:y||(f?void 0:a),subRow:(s||i)&&n.jsxs(n.Fragment,{children:[s?n.jsxs(tr,{label:!f&&l?v(l):void 0,children:[n.jsx("span",{className:se("chart-section__total__num h0"),children:C}),n.jsx("span",{className:se("chart-section__total__unit h5"),children:"%"})]}):n.jsx("span",{}),i&&n.jsx(Ho,{items:i})]}),children:u?n.jsx("div",{className:se("ring-chart-section-body ring-chart-section-body--offset"),children:n.jsx("div",{className:"ring-chart ring-chart--loading",style:{width:x,height:x},"aria-busy":"true",children:n.jsx(Ca,{size:32})})}):n.jsx("div",{className:se("ring-chart-section-body ring-chart-section-body--offset"),children:n.jsx(Uu,{...b,hideCenter:b.hideCenter??f})})})}function n4({label:e,value:t,change:a,changeType:r,icon:s,tooltip:l,onClick:i,children:u}){const c=o.useRef(null),{anchorRect:d,openAt:h,close:p}=za(),m=o.useCallback(()=>{l&&c.current&&h(c.current)},[l,h]),b=r??(a===void 0?void 0:a>0?"up":a<0?"down":"neutral"),v=a===void 0?void 0:a>0?`+${a}`:`${a}`,C=o.useCallback(f=>{i&&(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),i())},[i]);return n.jsxs("div",{ref:c,className:se(`stat-chart__card${i?" stat-chart__card--clickable":""}`),onClick:i,onKeyDown:i?C:void 0,onPointerEnter:m,onPointerLeave:p,onFocus:m,onBlur:p,role:i?"button":void 0,tabIndex:i?0:void 0,"aria-label":i?[e,t,v].filter(f=>f!==void 0&&f!=="").join(" "):void 0,children:[l&&d&&n.jsx(Mn,{anchorRect:{left:d.left,top:d.top+21,right:d.right,bottom:d.bottom,width:d.width,height:d.height},text:l}),n.jsxs("div",{className:se("stat-chart__card__label-row"),children:[n.jsx("span",{className:se("stat-chart__card__label h5"),children:e}),s&&n.jsx("span",{className:se("stat-chart__card__icon"),children:n.jsx(ot,{icon:s,className:se("stat-chart__card__icon-inner")})})]}),n.jsxs("div",{className:se("stat-chart__card__content"),children:[n.jsxs("div",{className:se("stat-chart__card__left"),children:[n.jsx("div",{className:se("stat-chart__card__value h2"),children:t}),v&&n.jsx("div",{className:se(`stat-chart__card__change stat-chart__card__change--${b??"neutral"} caption-1`),children:v})]}),u&&n.jsx("div",{className:se("stat-chart__card__body"),children:u})]})]})}function Gu({value:e,onChange:t,min:a=0,max:r=100,step:s=1,orientation:l="horizontal",size:i=24,disabled:u=!1,ariaLabel:c,length:d,className:h,label:p,formatValue:m,labelPos:b,labelAlign:v="right",showMinMax:C=!1,minLabel:f,maxLabel:x,showBgTick:g=!1,showFillTick:w=!1,tickStep:y,tickShape:k="dot"}){t&&!c&&At("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 _=Math.min(r,Math.max(a,e)),A=r>a?(_-a)/(r-a):0,B=l==="vertical",E=!t,D=Z=>t?.(Number(Z.target.value)),N=typeof d=="number"?`${d}px`:d,$={"--slider-ratio":String(A),"--slider-thumb":`${i}px`,...N?B?{height:N}:{width:N}:{}},L=y??s,U=(g||w)&&L>0&&r>a?Math.floor((r-a)/L+1e-6):0;if(U>0&&U<=100){const Z=k!=="dash",z=ie=>Z?`radial-gradient(circle, ${ie} 0.5px, transparent 1px)`:B?`linear-gradient(to bottom, transparent calc(50% - 2px), ${ie} calc(50% - 2px), ${ie} calc(50% + 2px), transparent calc(50% + 2px))`:`linear-gradient(to right, transparent calc(50% - 2px), ${ie} calc(50% - 2px), ${ie} calc(50% + 2px), transparent calc(50% + 2px))`,j=Z?"2px":"4px",F=[],O=[],G=[];for(let ie=0;ie<=U;ie++){const K=ie*L/(r-a);if(K>1+1e-6)break;const pe=`${((B?1-K:K)*100).toFixed(4)}%`,X=K<=A+1e-6;if(X?!w:!g)continue;const H=X?"var(--slider-tick-color-on-fill, var(--color-deepWhite))":"var(--slider-tick-color, var(--color-lightGray))";F.push(z(H)),O.push(B?`${j} var(--slider-thumb)`:`var(--slider-thumb) ${j}`),G.push(B?`center ${pe}`:`${pe} center`)}F.push(B?"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))"),O.push("100% 100%"),G.push("0 0"),$.backgroundImage=F.join(", "),$.backgroundSize=O.join(", "),$.backgroundPosition=G.join(", "),$.backgroundRepeat="no-repeat"}const M=m?m(_):p==="percent"?`${Math.round(r>a?(_-a)/(r-a)*100:0)}%`:p==="count"?`${_} / ${r}`:_===a&&f?f:_===r&&x?x:void 0,P=n.jsx("input",{type:"range",className:Be("slider",`slider--${l}`,E&&"slider--static",!p&&!C&&h),min:a,max:r,step:s,value:_,disabled:u,readOnly:E,tabIndex:E?-1:void 0,"aria-label":c,"aria-valuetext":M,"aria-orientation":l,onChange:D,style:$});if(!p&&!C)return P;const T=n.jsx("span",{className:"slider-wrap__minmax caption-1",children:f??a}),ee=n.jsx("span",{className:"slider-wrap__minmax caption-1",children:x??r}),te=C?n.jsxs("div",{className:Be("slider-track-group",`slider-track-group--${l}`,!p&&h),children:[B?ee:T,P,B?T:ee]}):P;if(!p)return te;const I=b??(B?"bottom":"right"),Y=`${Math.round(r>a?(_-a)/(r-a)*100:0)}%`,R=m?m(_):p==="percent"?Y:p==="count"?`${_} / ${r}`:String(_),q=n.jsx("span",{className:"slider-wrap__value body-3b",children:R});return n.jsxs("div",{className:Be("slider-wrap",`slider-wrap--${l}`,`slider-wrap--label-${I}`,`slider-wrap--align-${v}`,h),children:[te,q]})}const a4=.86,r4=250,Yo=(e,t,a,r)=>Math.round(Math.min(r,Math.max(a,e-t))),Zo=(e,t,a,r)=>{const s=Yo(e,t,a,r);return`${s<0?"-":"+"}${Math.abs(s)} dB`};function Xo({analyser:e,audioElement:t,orientation:a="horizontal",length:r,label:s,labelPos:l,labelAlign:i="right",floorDb:u=-60,refDb:c=-35,displayMin:d=-5,displayMax:h=25,className:p,ariaLabel:m}){const b=o.useRef(null),v=o.useRef(null),C=o.useRef(null),f=o.useRef(null),[x,g]=o.useState(null);o.useEffect(()=>{const _=P=>{const T=Zo(P,c,d,h);C.current&&(C.current.textContent=T);const ee=b.current;ee&&(ee.setAttribute("aria-valuenow",String(Yo(P,c,d,h))),ee.setAttribute("aria-valuetext",T))},A=e??K1(t)??(x&&x.el===t?x.node:null),B=v.current;if(!A||!B){B?.style.setProperty("--meter-level","0"),_(u);let P=!1;return!e&&t&&lr(t).then(T=>{!P&&T&&g({el:t,node:T})}),()=>{P=!0}}oo();const E=new Float32Array(A.fftSize);let D=0,N=0,$=0,L=0,U=null;const M=P=>{const T=Y1(A,E);D=T>D?T:D*a4;const ee=D>1e-5?20*Math.log10(D):-1/0,te=Math.max(u,ee),I=te-c,Y=Math.min(1,Math.max(0,(I-d)/(h-d)));if(B.style.setProperty("--meter-level",Y.toFixed(3)),N+=te,$+=1,P-L>=r4){const R=N/$;U=U==null?R:U*.6+R*.4,_(U),N=0,$=0,L=P}f.current=requestAnimationFrame(M)};return f.current=requestAnimationFrame(M),()=>{f.current!=null&&cancelAnimationFrame(f.current),f.current=null}},[e,t,x,u,c,d,h]);const w=typeof r=="number"?`${r}px`:r,y=n.jsx("div",{className:"audio-meter__track",style:w?a==="vertical"?{height:w}:{width:w}:{},children:n.jsx("div",{ref:v,className:"audio-meter__fill"})}),k=l??(a==="vertical"?"bottom":"right");return n.jsxs("div",{ref:b,className:Be("audio-meter",`audio-meter--${a}`,s&&`audio-meter--label-${k}`,s&&`audio-meter--align-${i}`,p),role:"meter","aria-label":m,"aria-valuemin":d,"aria-valuemax":h,"aria-valuenow":Yo(u,c,d,h),"aria-valuetext":Zo(u,c,d,h),children:[y,s&&n.jsx("span",{ref:C,className:"audio-meter__value caption-2",children:Zo(u,c,d,h)})]})}const Ku=260;function Yu({message:e,position:t,duration:a,onClose:r}){const[s,l]=o.useState(!1),[i,u]=o.useState(!1),c=o.useRef(i),d=o.useRef(s);o.useEffect(()=>{c.current=i},[i]),o.useEffect(()=>{d.current=s},[s]);const h=o.useRef(null),p=o.useRef(""),m=o.useRef(r);o.useEffect(()=>{m.current=r});const b=a,v=o.useRef(null),C=o.useRef(0),f=o.useRef(0),x=o.useRef(!1),g=o.useRef(null),w=o.useRef(null),y=o.useRef(null),k=o.useRef(null),_=o.useRef(()=>{});_.current=E=>{E<0||(C.current=Date.now(),f.current=E,v.current=setTimeout(()=>{v.current=null,l(!1),g.current=setTimeout(()=>{u(!1);try{m.current()}catch{}},Ku)},E))};const A=o.useCallback(()=>{x.current||!v.current||(x.current=!0,clearTimeout(v.current),v.current=null,f.current=Math.max(0,f.current-(Date.now()-C.current)))},[]),B=o.useCallback(()=>{x.current&&(x.current=!1,_.current(f.current))},[]);return o.useEffect(()=>{if(e!==p.current&&(v.current&&(clearTimeout(v.current),v.current=null),g.current&&(clearTimeout(g.current),g.current=null)),e){if(d.current)return b>0&&!v.current&&(x.current?f.current=b:_.current(b)),p.current=e,()=>{v.current&&(clearTimeout(v.current),v.current=null),g.current&&(clearTimeout(g.current),g.current=null)};const E=()=>{const D=h.current;if(D)try{D.classList.remove("is-visible"),D.style.transition="none",t==="top"?D.style.transform="translateX(-50%) translateY(-16px)":D.style.transform="translateX(-50%) translateY(16px)",D.style.opacity="0",D.offsetWidth,D.style.transition="",D.classList.add("is-visible"),k.current&&clearTimeout(k.current),k.current=setTimeout(()=>{k.current=null;try{D.style.opacity="",D.style.transform="",D.style.transition=""}catch{}},60)}catch{}};c.current?(E(),l(!0)):(u(!0),w.current=requestAnimationFrame(()=>{y.current=requestAnimationFrame(()=>{E(),l(!0)})})),b>0&&(x.current=!1,_.current(b))}else l(!1),g.current=setTimeout(()=>u(!1),Ku);return p.current=e,()=>{v.current&&clearTimeout(v.current),g.current&&clearTimeout(g.current),w.current&&cancelAnimationFrame(w.current),y.current&&cancelAnimationFrame(y.current),k.current&&clearTimeout(k.current),v.current=null,g.current=null,w.current=null,y.current=null,k.current=null}},[e,b,t]),{mounted:i,showing:s,popupRef:h,pause:A,resume:B}}function va({message:e="",position:t="top",type:a="normal",onClose:r=()=>{},duration:s=2e3}){const{mounted:l,showing:i,popupRef:u,pause:c,resume:d}=Yu({message:e,position:t,duration:s,onClose:r}),h=o.useRef(null),[p,m]=o.useState(!1);if(o.useEffect(()=>{i?m(!0):l||m(!1)},[i,l]),!l)return null;const b=a==="notice"||a==="warning"?a:"normal",v=n.jsx("div",{ref:u,className:`toast toast--${t} ${i?"is-visible":""}`,role:"status","aria-live":"polite",onPointerEnter:C=>{h.current=C.pointerType},onMouseEnter:()=>{h.current!=="touch"&&c()},onMouseLeave:d,onFocusCapture:c,onBlurCapture:d,children:n.jsx("div",{className:`toast__inner toast__inner--${b} body-2`,"aria-hidden":p||i?void 0:!0,children:n.jsx("span",{className:"toast__text",children:e})})});return typeof document<"u"?hn.createPortal(v,document.body):v}const o4=24;function s4({value:e,max:t=100,size:a=8,color:r,trackColor:s,label:l,formatValue:i,labelPos:u,labelAlign:c="right",ariaLabel:d,className:h}){const p=Number.isFinite(t)&&t>0?t:1,m=Math.max(0,Math.min(Number.isFinite(e)?e:0,p)),b=m/p*100,v=Number.isFinite(t)&&t>0?t:0,C=u??(a>=o4?"inside":"bottom"),f=C==="center"?"inside":C,x=f==="inside"&&(c==="left"?b>=15:c==="center"?b>=50:b>=85),g={};return r&&(g["--progress-bar-fill"]=r),s&&(g["--progress-bar-track"]=s),n.jsxs("div",{className:Be("progress-bar",`progress-bar--${a}`,`progress-bar--label-${f}`,l&&`progress-bar--align-${c}`,l&&x&&"progress-bar--label-on-fill",h),style:g,children:[n.jsx("div",{className:"progress-bar__track",role:"progressbar","aria-valuenow":m,"aria-valuemin":0,"aria-valuemax":v,"aria-valuetext":l?i?i(m):l==="percent"?void 0:l==="raw"?String(m):`${m} / ${v}`:void 0,"aria-label":d,children:n.jsx("div",{className:"progress-bar__fill",style:{width:`${b}%`}})}),l&&n.jsx("span",{className:"progress-bar__label caption-1b",children:i?i(m):l==="percent"?`${Math.round(b)}%`:l==="raw"?String(m):`${m} / ${v}`})]})}const Zu={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0},l4="rgba(255, 255, 255, 0.16)";function Xu({max:e,index:t,inactiveBg:a,inactiveColor:r,transparent:s,variant:l="numbered",announce:i=!1,ariaLabel:u}){const{t:c}=_e.useTranslation(),d=yn("(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,p=u??c("progress.steps",{current:h+1,total:e,defaultValue:"\uC9C4\uD589 \uB2E8\uACC4 {{current}} / {{total}}"}),m={};if(a&&(m["--pi-inactive-bg"]=a),r&&(m["--pi-inactive-color"]=r),s&&(a||(m["--pi-inactive-bg"]=l4),r||(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:p,children:[i&&n.jsx("span",{style:Zu,children:p}),Array.from({length:e}).map((v,C)=>n.jsx("span",{"aria-hidden":"true",className:`progress-indicator-dot--dot${C<h?" done":C===h?" active":""}`},C))]});const b=i?n.jsx("span",{role:"status",style:Zu,children:p}):null;return d?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"progress-indicator progress-indicator--mobile",style:m,role:"list","aria-label":p,children:n.jsxs("span",{role:"listitem",className:"progress-indicator-dot active body-3",children:[h+1," / ",e]})}),b]}):n.jsxs(n.Fragment,{children:[b,n.jsx("div",{className:"progress-indicator",style:m,role:"list","aria-label":p,children:Array.from({length:e}).map((v,C)=>n.jsx("span",{role:"listitem","aria-current":C===h?"step":void 0,className:`progress-indicator-dot ${C<h?" done":C===h?" active":""} body-3`,children:C+1},C))})]})}function i4(e){if(!e)return[];const t=[];let a=0,r="";for(const s of e.trim()){if(s==="("?a++:s===")"&&a--,/\s/.test(s)&&a===0){r&&(t.push(r),r="");continue}r+=s}return r&&t.push(r),t}function u4(e,t,a=0){const r=Array.from({length:Math.max(0,t)},()=>0);for(const s of e){let l=0;for(const i of s){if(l>=r.length)break;const u=Ju(i.span),c=Math.min(u,r.length-l);if(c===1)r[l]=Math.max(r[l],i.width);else{const d=Math.max(0,(i.width-a*(c-1))/c);for(let h=l;h<l+c;h++)r[h]=Math.max(r[h],d)}l+=c}}return r}function Ju(e){const t=typeof e=="number"?e:parseInt(String(e??""),10);return Number.isFinite(t)&&t>=1?Math.floor(t):1}function c4(e,t){const a=/span\s+(\d+)/.exec(`${e??""} ${t??""}`);return a?Ju(parseInt(a[1],10)):1}function d4(e,t){const{isFixed:a,floorOf:r,containerWidth:s}=t,l=e.reduce((p,m,b)=>p+(a(b)?m:0),0),i=e.reduce((p,m,b)=>p+(a(b)?0:m),0),u=s-l;if(!(s>0&&i>0&&u>0))return[...e];const c=u/i,d=e.map((p,m)=>a(m)?p:Math.max(r(m),Math.round(p*c))),h=Math.round(u-d.reduce((p,m,b)=>p+(a(b)?0:m),0));if(h!==0){let p=-1;d.forEach((m,b)=>{!a(b)&&(p<0||m>d[p])&&(p=b)}),p>=0&&(d[p]=Math.max(r(p),d[p]+h))}return d}const p4=16;function h4(e,t=p4){return e.map(a=>{const r=a.sortable&&!a.sorted;return Math.max(a.declaredMin,Math.ceil(a.headWidth+(r?t:0)))})}function m4({children:e,className:t,style:a,span:r,rowLabel:s,onRowClick:l}){const i=r&&r>1?{gridColumn:`span ${r}`,...a}:a;return n.jsx("div",{role:"cell",className:t?`table-cell ${t}`:"table-cell",style:i,"aria-colspan":r&&r>1?r:void 0,children:s&&l?n.jsx("button",{type:"button",className:"table-cell__row-button","aria-label":s,children:e}):e})}function Jo({variant:e="default",children:t,className:a,draggable:r,onClick:s,onMouseEnter:l,onMouseLeave:i,onDragStart:u,onDragEnd:c,expandedContent:d,colSpan:h,describedBy:p,rowHasButton:m}){const b=o.useCallback(v=>{s&&v.target===v.currentTarget&&(v.key==="Enter"||v.key===" ")&&(v.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(Ca,{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:a?`table-row ${a}`:"table-row",draggable:r,onClick:s,onKeyDown:s?b:void 0,onMouseEnter:l,onMouseLeave:i,onDragStart:u,onDragEnd:c,role:"row",tabIndex:s&&!m?0:void 0,"aria-describedby":s&&!m?p:void 0,children:t}),d&&n.jsx("div",{role:"row",className:"table-row-expand",children:n.jsx("div",{role:"cell","aria-colspan":h,className:"table-row-expand__cell",children:d})})]})}function C4({dir:e}){return n.jsx(e==="asc"?tl:el,{className:"table-field__sort-arrow",size:16,strokeWidth:2})}function f4({children:e,onClick:t,className:a,sortDir:r,ariaSort:s,onResizeStart:l}){const i=n.jsxs(n.Fragment,{children:[e,r&&n.jsx(C4,{dir:r})]});return n.jsxs("div",{onClick:t,role:"columnheader","aria-sort":s,className:Be("table-field body-3",a,r?"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 Qu(e){return e&&e!=="left"?`table-col--${e}`:void 0}function Qo({fields:e=[],sort:t,sortable:a=!0,headerGroups:r,items:s=[],renderRow:l,onRowClick:i,isRowClickable:u,onRowMouseEnter:c,onRowMouseLeave:d,onRowDragStart:h,onRowDragEnd:p,draggingId:m,gridTemplateColumns:b,mobileGridTemplateColumns:v,resizable:C=!0,resizeMode:f="grow",resizeStorageKey:x,size:g="small",title:w,icon:y,count:k,collapsed:_=!1,onToggleCollapse:A,headerActions:B,empty:E,loading:D,dragOver:N=!1,onDragOver:$,onDragLeave:L,onDrop:U,renderExpandedRow:M,expandedId:P}){const{t:T}=_e.useTranslation(),ee=o.useId(),te=`table-title-${ee}`,I=`table-row-hint-${ee}`,[Y,R]=o.useState(null),q=o.useCallback((ae,ye)=>{const He=e[ye];if(!He)return;if(He.sortValue)return He.sortValue(ae);if(He.sortKey)return ae[He.sortKey];const Ke=l(ae)[ye]?.content;return typeof Ke=="string"||typeof Ke=="number"?Ke:void 0},[e,l]),Z=!t&&a&&!e.some(ae=>ae.sortDir!==void 0||ae.onClick),z=o.useCallback(ae=>{const ye=e[ae];if(!ye||ye.sortable===!1)return!1;if(ye.sortValue||ye.sortKey)return!0;const He=s[0];return He!==void 0&&q(He,ae)!==void 0},[e,s,q]),j=o.useMemo(()=>t?e.map(ae=>{if(!ae.sortKey||ae.sortDir!==void 0)return ae;const ye=t.field(String(ae.label??""),ae.sortKey);return{...ae,sortDir:ye.sortDir,onClick:ae.onClick??ye.onClick}}):Z?e.map((ae,ye)=>z(ye)?{...ae,sortDir:Y?.index===ye?Y.asc?"asc":"desc":null,onClick:()=>R(He=>He?.index===ye?{index:ye,asc:!He.asc}:{index:ye,asc:!0})}:ae):e,[e,t,Z,Y,z]),F=o.useMemo(()=>{if(!Z||!Y)return s;const{index:ae,asc:ye}=Y;return[...s].sort((He,Ke)=>gr(q(He,ae),q(Ke,ae),ye))},[s,Z,Y,q]),O=yn("(max-width: 767px)"),G=v&&O?v:null,ie=C&&!O,K=o.useRef(ie);K.current=ie;const pe=48,X=40,H=o.useRef(()=>pe),ne=x?`table-cols:${x}`:null,V=o.useRef(null),W=o.useRef(null),oe=o.useRef(null),xe=o.useRef(null),[be,me]=o.useState(!1),[ke,Le]=o.useState(0),Me=o.useCallback(()=>{const ae=oe.current;if(!ae)return;const ye=xe.current,He=V.current;if(ye&&(ye.style.minWidth="",He)){const Ke=He.scrollWidth,vt=K.current?X:0;ye.style.minWidth=Ke>ae.clientWidth+1?`${Ke+vt}px`:""}me(ae.scrollWidth>ae.clientWidth+1),Le(ae.clientWidth)},[]),le=o.useCallback((ae,ye)=>{const He=ae.current;He&&W.current&&W.current.unobserve(He),ae.current=ye,ye?(!W.current&&typeof ResizeObserver<"u"&&(W.current=new ResizeObserver(()=>Me())),W.current?.observe(ye)):!oe.current&&!xe.current&&(W.current?.disconnect(),W.current=null),Me()},[Me]),ve=o.useCallback(ae=>le(oe,ae),[le]),$e=o.useCallback(ae=>le(xe,ae),[le]);o.useEffect(()=>{Me()}),o.useEffect(()=>{if(typeof window>"u")return;const ae=typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>Me()):null;return window.addEventListener("resize",Me),()=>{ae!=null&&cancelAnimationFrame(ae),window.removeEventListener("resize",Me)}},[Me]);const Ae=o.useRef(()=>!1),Ie=o.useRef([]),ze=o.useRef(null),dt=ae=>{if(!ae||typeof window>"u")return null;try{const ye=JSON.parse(window.localStorage.getItem(ae)??"null");return Array.isArray(ye)&&ye.length>0&&ye.every(He=>typeof He=="number"&&Number.isFinite(He)&&He>0)?ye:null}catch{return null}},[st,et]=o.useState(()=>dt(ne)),[gt,Se]=o.useState(ne),[Ge,we]=o.useState(()=>dt(ne)!==null);if(gt!==ne){Se(ne);const ae=dt(ne);et(ae),we(ae!==null)}const qe=o.useRef(st);o.useEffect(()=>{qe.current=st},[st]);const Ye=o.useCallback(ae=>{const ye=ze.current;if(!ye)return;const He=qe.current;if(He){const Ke=[...He],vt=()=>pe;if(ye.next!=null&&ye.startWNext!=null){const Ue=ae.clientX-ye.startX,ht=Math.max(vt()-ye.startW,Math.min(ye.startWNext-vt(),Ue));Ke[ye.index]=ye.startW+ht,Ke[ye.next]=ye.startWNext-ht}else Ke[ye.index]=Math.max(vt(),ye.startW+(ae.clientX-ye.startX));qe.current=Ke,et(Ke)}},[]),mt=o.useCallback(()=>{if(ze.current=null,window.removeEventListener("pointermove",Ye),window.removeEventListener("pointerup",mt),window.removeEventListener("pointercancel",mt),document.body.style.cursor="",document.body.style.userSelect="",ne&&qe.current)try{window.localStorage.setItem(ne,JSON.stringify(qe.current))}catch{}},[Ye,ne]),wt=o.useCallback((ae,ye)=>{ye.preventDefault(),ye.stopPropagation();const He=V.current;if(!He)return;const Ke=Array.from(He.children).map(Ue=>Ue.getBoundingClientRect().width),vt=f==="fit"?j.findIndex((Ue,ht)=>ht>ae&&Ue.resizable!==!1):-1;ze.current=vt>=0?{index:ae,startX:ye.clientX,startW:Ke[ae],next:vt,startWNext:Ke[vt]}:{index:ae,startX:ye.clientX,startW:Ke[ae]},qe.current=Ke,et(Ke),we(!0),window.addEventListener("pointermove",Ye),window.addEventListener("pointerup",mt),window.addEventListener("pointercancel",mt),document.body.style.cursor="col-resize",document.body.style.userSelect="none"},[Ye,mt,f,j]),yt=o.useCallback(()=>{const ae=V.current,ye=ae?.closest(".table-wrap");if(!ae||!ye)return null;const He=ye.style.getPropertyValue("--table-grid-cols");ye.style.setProperty("--table-grid-cols",j.map(()=>"max-content").join(" "));const Ke=Array.from(ye.querySelectorAll(".table-row")).filter($t=>!$t.classList.contains("table-row--loading")&&!$t.classList.contains("table-row--empty")),vt=$t=>Array.from($t.children).map(Pt=>{const Ut=window.getComputedStyle(Pt);return{width:Pt.getBoundingClientRect().width,span:c4(Ut.gridColumnStart,Ut.gridColumnEnd)}}),Ue=parseFloat(window.getComputedStyle(ae).columnGap)||0,ht=Ke.map(vt),cn=vt(ae),dn=u4([cn,...ht],j.length,Ue),zt=h4(j.map(($t,Pt)=>({declaredMin:H.current(Pt),headWidth:cn[Pt]?.width??0,sortable:$t.sortDir!==void 0||!!$t.onClick,sorted:!!$t.sortDir}))),qt=$t=>zt[$t]??H.current($t),Ht=j.map(($t,Pt)=>{const Ut=dn[Pt],Jt=Ae.current(Pt)?parseFloat(Ie.current[Pt]):NaN;return Number.isFinite(Jt)&&Math.ceil(Ut)>Jt&&At(`table-fixed-col-overflow:${Pt}:${Jt}`,`[ihabdevteam-core] Table \uC758 ${Pt+1}\uBC88\uC9F8 \uC5F4\uC744 ${Jt}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(Jt)?Jt:Math.max(H.current(Pt),Math.ceil(Ut))}),Nt=window.getComputedStyle(ae),An=(parseFloat(Nt.paddingLeft)||0)+(parseFloat(Nt.paddingRight)||0),an=ye.clientWidth-An;return He?ye.style.setProperty("--table-grid-cols",He):ye.style.removeProperty("--table-grid-cols"),d4(Ht,{isFixed:$t=>Ae.current($t),floorOf:qt,containerWidth:an})},[j,f]),Et=(ae,ye)=>ae!==null&&ae.length===ye.length&&ae.every((He,Ke)=>He===ye[Ke]),at=o.useRef(yt);o.useEffect(()=>{at.current=yt});const[rt,Dt]=o.useState(0),Bt=F.length>0,Lt=`${ne??""}|${rt}|${j.length}|${ke}`,It=!Ge&&ie&&ne!==null&&!D?`${Lt}|${Bt?1:0}`:null,xt=o.useRef(null);o.useEffect(()=>{if(It===null||!Bt||xt.current===Lt)return;const ae=at.current();ae&&(xt.current=Lt,et(ye=>Et(ye,ae)?ye:ae))},[It]);const lt=o.useCallback(()=>{if(ne)try{window.localStorage.removeItem(ne)}catch{}we(!1);const ae=at.current();et(ae),qe.current=ae,Dt(ye=>ye+1)},[ne]);o.useEffect(()=>()=>{ze.current&&(window.removeEventListener("pointermove",Ye),window.removeEventListener("pointerup",mt),window.removeEventListener("pointercancel",mt),document.body.style.cursor="",document.body.style.userSelect="")},[Ye,mt]);const Ct=j.length>0&&j.every(ae=>ae.width!=null)?j.map(ae=>typeof ae.width=="number"?`${ae.width}px`:String(ae.width)).join(" "):null;j.some(ae=>ae.width!=null)&&!Ct&&At(`table-field-width:${j.map(ae=>ae.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."),Ct&&b&&At("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=b??Ct??void 0,_t=i4(it),ut=_t.filter(ae=>/\b(auto|min-content|max-content)\b|fit-content\(/.test(ae));ut.length>0&&At(`table-content-track:${b}`,`[ihabdevteam-core] Table \uC758 gridTemplateColumns \uC5D0 \uB0B4\uC6A9\uC73C\uB85C \uD06C\uAE30\uAC00 \uC815\uD574\uC9C0\uB294 \uD2B8\uB799(${ut.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: ${b})`);const St=j.findIndex(ae=>!!ae.sortDir);j.filter(ae=>!!ae.sortDir).length>1&&At("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 ue=ae=>ae===St?j[ae].sortDir==="asc"?"ascending":"descending":j[ae].onClick?"none":void 0,Te=ae=>/^\d+(\.\d+)?px$/.test(_t[ae]??""),Ne=ae=>{const ye=_t[ae]??"",He=/^minmax\(\s*(\d+(?:\.\d+)?)px\s*,/.exec(ye)??/^(\d+(?:\.\d+)?)px$/.exec(ye);return He?parseFloat(He[1]):pe};Ae.current=Te,H.current=Ne,Ie.current=_t;const tt=ae=>f==="fit"&&!Te(ae)?"fr":"px",pt=st&&st.length===j.length&&!O,jt=G??(pt?j.map((ae,ye)=>ae.resizable===!1&&_t[ye]?_t[ye]:`${st[ye]}${tt(ye)}`).join(" "):it),je=jt?{"--table-grid-cols":jt}:void 0,nt=w!==void 0;return n.jsxs("div",{ref:ve,className:`table-wrap table-wrap--${g}${ie?" table-wrap--resizable":""}${N?" table-wrap--dragover":""}${_?" table-wrap--collapsed":""}`,style:je,onDragOver:$,onDragLeave:L,onDrop:U,tabIndex:be?0:void 0,role:be?"region":void 0,"aria-label":be?typeof w=="string"?w:T("table.scrollRegion","\uAC00\uB85C\uB85C \uAD74\uB9B4 \uC218 \uC788\uB294 \uD45C"):void 0,children:[!!i&&n.jsx("span",{id:I,className:"table-row-hint",children:T("table.rowActionHint","\uC904\uC744 \uB204\uB974\uBA74 \uC790\uC138\uD788 \uBD05\uB2C8\uB2E4")}),n.jsxs("div",{ref:$e,role:"table","aria-labelledby":nt&&typeof w=="string"?te:void 0,className:"table body-2",children:[nt&&n.jsxs("div",{className:Be("table-header",A&&"table-header--clickable"),onClick:A,role:"caption",children:[A&&n.jsx(fe,{htmlType:"button",size:Ft,type:"dot",variant:"transparent-gray",useBorder:!1,icon:_?"chevron-right":"chevron-down",ariaLabel:_?T("common.expand","\uD3BC\uCE58\uAE30"):T("common.collapse","\uC811\uAE30"),ariaExpanded:!_,className:"table-header__chevron"}),y&&n.jsx(ot,{icon:y,label:typeof w=="string"?w:void 0,className:"table-header__icon"}),n.jsx("span",{id:te,className:"table-header__title h5b",children:w}),k!==void 0&&n.jsx("span",{className:"table-header__count body-3b",children:k}),B&&n.jsx("span",{className:"table-header__actions",onClick:ae=>ae.stopPropagation(),children:B})]}),!_&&n.jsxs(n.Fragment,{children:[r&&r.length>0&&n.jsx("div",{role:"row",className:"table-fields table-fields--groups",children:r.map((ae,ye)=>n.jsx("div",{role:"columnheader","aria-colspan":ae.span,className:Be("table-field body-3",ae.className),style:{gridColumn:`span ${ae.span}`},children:ae.label},ye))}),n.jsxs("div",{role:"presentation",className:Be("table-fields-strip",ie&&"table-fields-strip--resizable"),children:[n.jsx("div",{role:"row",className:"table-fields",ref:V,children:j.map((ae,ye)=>n.jsx(f4,{onClick:ae.onClick,className:Be(ae.className,Qu(ae.align)),sortDir:ae.sortDir,ariaSort:ue(ye),onResizeStart:ie&&ye<j.length-1&&ae.resizable!==!1&&(f!=="fit"||j.some((He,Ke)=>Ke>ye&&He.resizable!==!1))?He=>wt(ye,He):void 0,children:ae.label},ye))}),ie&&n.jsx("div",{className:"table-fields__reset-dock",children:n.jsx(fe,{htmlType:"button",size:Ft,type:"dot",variant:"transparent-gray",useBorder:!1,icon:"chevrons-left-right-ellipsis",ariaLabel:T("table.resetColumns","\uCE78 \uB108\uBE44 \uCD08\uAE30\uD654"),showTooltipInfo:T("table.resetColumns","\uCE78 \uB108\uBE44 \uCD08\uAE30\uD654"),className:"table-fields__reset",onClick:lt})})]}),n.jsx("div",{role:"rowgroup",className:"table-body",children:D?n.jsx(Jo,{variant:"loading",colSpan:j.length||void 0}):F.length===0&&E?n.jsx(Jo,{variant:"empty",colSpan:j.length||void 0,children:E}):F.map((ae,ye)=>{const He=m!=null&&ae.id===m,Ke=!!i&&(u?u(ae):!0),vt=P!=null&&ae.id!=null&&(P instanceof Set?P.has(ae.id)||[...P].some(Ue=>String(Ue)===String(ae.id)):String(ae.id)===String(P));return n.jsx(Jo,{className:`${Ke?" table-row--clickable":""}${h?" table-row--draggable":""}${He?" table-row--dragging":""}`.trim(),draggable:!!h,onClick:Ke?()=>i(ae):void 0,colSpan:j.length||void 0,rowHasButton:l(ae).some(Ue=>!!Ue.rowLabel),describedBy:I,onMouseEnter:c?Ue=>c(ae,Ue):void 0,onMouseLeave:d?Ue=>d(ae,Ue):void 0,onDragStart:h?Ue=>h(ae,Ue):void 0,onDragEnd:p?Ue=>p(ae,Ue):void 0,expandedContent:vt&&M?M(ae):void 0,children:l(ae).map((Ue,ht)=>n.jsx(m4,{className:Be(Ue.className,Qu(j[ht]?.align)),style:Ue.style,span:Ue.span,rowLabel:Ke?Ue.rowLabel:void 0,onRowClick:Ke?()=>i(ae):void 0,children:Ue.content},ht))},ae.id!=null?`${typeof ae.id}:${ae.id}`:`__idx:${ye}`)})})]})]})]})}function ec(e,t){return t!=="wornAt"?String(e[t]??""):kv(e.wornYear,e.wornMonth,e.wornDay)}function b4({rows:e,loading:t,onSelect:a,onDelete:r,onWear:s,onRelease:l,onAdd:i}){const{t:u,i18n:c}=_e.useTranslation(),d=f=>f==="left"?u("device.direction.left","\uC88C"):u("device.direction.right","\uC6B0"),{sort:h,field:p}=$y(),m=o.useMemo(()=>{if(!h)return e;const{key:f,asc:x}=h;return[...e].sort((g,w)=>{if(f==="worn"){const y=Number(w.worn)-Number(g.worn);return x?y:-y}return gr(ec(g,f),ec(w,f),x)})},[e,h]),{pageRows:b,pageSizeProps:v,paginationProps:C}=Ly(m,h);return n.jsxs("div",{className:"dlp-side-table",children:[n.jsx(Wo,{count:{value:e.length,unit:u("customers.device.unit","\uAC1C")},pageSize:v,pagination:C,actions:i&&n.jsx(fe,{htmlType:"button",size:40,type:"bar",variant:"main",icon:"plus",label:u("customers.device.addButton","\uAE30\uAE30 \uCD94\uAC00"),onClick:i})}),n.jsx(Qo,{loading:t,resizable:!0,resizeMode:"fit",resizeStorageKey:"customer-device-history-v2",fields:[{...p(u("customers.device.wearingNow","\uCC29\uC6A9"),"worn"),resizable:!1},p(u("device.direction.label","\uBC29\uD5A5"),"side"),p(u("device.deviceType","\uC885\uB958"),"device"),p(u("device.brand","\uBE0C\uB79C\uB4DC"),"brand"),p(u("device.fitType","\uCC29\uC6A9\uD615\uD0DC"),"fitType"),p(u("device.productName","\uC81C\uD488\uBA85"),"productName"),p(u("device.wornDate","\uCC29\uC6A9\uC77C"),"wornAt"),...r?[{label:"",resizable:!1}]:[]],items:b.map((f,x)=>({id:f.id??`${f.side}-${x}`,row:f})),gridTemplateColumns:`56px 110px 110px minmax(120px, 1fr) 100px minmax(120px, 1fr) 110px${r?" 80px":""}`,renderRow:({row:f})=>[{content:n.jsx("span",{className:"dlp-worn-check",onClick:x=>x.stopPropagation(),children:n.jsx(Oo,{checked:f.worn,disabled:f.worn?!l:!s,ariaLabel:f.worn?u("customers.device.unwear","\uCC29\uC6A9 \uD574\uC81C"):u("customers.device.wear","\uCC29\uC6A9"),onChange:x=>{x?s?.(f):l?.(f)}})})},{content:n.jsx("span",{children:d(f.side)})},{content:f.device?n.jsx(ln,{size:"small",variant:Au(f.device),fill:"soft",label:Nu(f.device,u)}):n.jsx("span",{})},{content:n.jsx("span",{children:f.brand})},{content:n.jsx("span",{children:f.fitType||"-"})},{content:n.jsx("span",{children:f.productName||"-"})},{content:n.jsx("span",{className:"dlp-date",children:Fo(f.wornYear,f.wornMonth,f.wornDay,c.language)||"-"})},...r?[{content:n.jsx("span",{className:"dlp-row-actions",children:n.jsx(fe,{htmlType:"button",size:28,type:"bar",variant:"transparent-gray",label:u("common.delete","\uC0AD\uC81C"),onClick:x=>{x?.stopPropagation(),r(f)}})})}]:[]],onRowClick:({row:f})=>a(f),empty:u("customers.device.historyEmpty","\uB4F1\uB85D\uB41C \uAE30\uAE30 \uC774\uB825\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.")})]})}function tc(e,t){return e?{role:t?.role??"button",tabIndex:0,...t?.selected===void 0?{}:{"aria-selected":t.selected},onKeyDown:a=>{a.target===a.currentTarget&&(a.key!=="Enter"&&a.key!==" "||(a.preventDefault(),e(a)))}}:{}}function g4(e,t){return new Date(e,t+1,0).getDate()}function y4(e,t){return new Date(e,t,1).getDay()}function v4({visits:e=[],onVisitClick:t,onVisitMove:a,onDayClick:r,today:s}){const{t:l,i18n:i}=_e.useTranslation(),u=o.useMemo(()=>l("calendar.dow",{returnObjects:!0}),[l]),c=cr(s),[d,h]=o.useState(()=>Number(c.slice(0,4))),[p,m]=o.useState(()=>Number(c.slice(5,7))-1),[b,v]=o.useState(null),C=o.useRef(null),f=o.useMemo(()=>{const _={};return e.forEach(A=>{_[A.date]||(_[A.date]=[]),_[A.date].push(A)}),_},[e]),x=o.useMemo(()=>{const _=g4(d,p),A=y4(d,p),B=[];for(let E=0;E<A;E++)B.push(null);for(let E=1;E<=_;E++)B.push(E);for(;B.length<35;)B.push(null);return B},[d,p]),g=o.useCallback(()=>{p===0?(h(_=>_-1),m(11)):m(_=>_-1)},[p]),w=o.useCallback(()=>{p===11?(h(_=>_+1),m(0)):m(_=>_+1)},[p]),y=_=>`${d}-${String(p+1).padStart(2,"0")}-${String(_).padStart(2,"0")}`,k=_=>y(_)===c;return n.jsxs("div",{children:[n.jsxs("div",{className:"calendar-nav",children:[n.jsx("button",{type:"button",className:"calendar-nav__button",onClick:g,"aria-label":l("calendar.prevMonth","\uC774\uC804 \uB2EC"),children:n.jsx(ot,{icon:"chevron-left",label:"",className:"",svgClassName:"calendar-nav__button-icon",size:18})}),n.jsx("span",{className:"calendar-nav__title h5","aria-live":"polite",children:co(l,i.language,d,p+1)}),n.jsx("button",{type:"button",className:"calendar-nav__button",onClick:w,"aria-label":l("calendar.nextMonth","\uB2E4\uC74C \uB2EC"),children:n.jsx(ot,{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(_=>n.jsx("div",{className:"calendar-day-header body-3",children:_},_)),x.map((_,A)=>{if(_===null)return n.jsx("div",{className:"calendar-cell empty"},`empty-${A}`);const B=_,E=y(B),D=f[E]??[],N=ql(E,i.language),$=b===E;return n.jsxs("div",{className:`calendar-cell${k(B)?" today":""}${$?" drag-over":""}${r?" calendar-cell--clickable":""}`,role:r?"button":void 0,tabIndex:r?0:void 0,"aria-label":r?l("calendar.addOnDate",{date:E}):void 0,"aria-current":k(B)?"date":void 0,onClick:r?()=>r(E):void 0,onKeyDown:r?L=>{L.target===L.currentTarget&&(L.key!=="Enter"&&L.key!==" "||(L.preventDefault(),r(E)))}:void 0,onDragOver:a?L=>{L.preventDefault(),v(E)}:void 0,onDragLeave:a?L=>{L.currentTarget.contains(L.relatedTarget)||v(null)}:void 0,onDrop:a?L=>{L.preventDefault(),C.current!=null&&(a(C.current,E),C.current=null),v(null)}:void 0,children:[n.jsx("div",{className:"calendar-cell__number body-3",children:B}),D.length>0&&(()=>{const L=[{key:"visited",label:l("calendar.legend.visited","\uBC29\uBB38"),count:D.filter(M=>(M.status??"visited")==="visited").length},{key:"scheduled",label:l("calendar.legend.scheduled","\uC608\uC57D"),count:D.filter(M=>M.status==="scheduled").length},{key:"noVisit",label:l("calendar.legend.noVisit","\uBBF8\uBC29\uBB38"),count:D.filter(M=>M.status==="noVisit").length}].filter(M=>M.count>0),U=L.length===1&&L[0].key==="visited"?l("calendar.visitCount",{count:D.length,defaultValue:"\uBC29\uBB38 {{count}}\uAC74"}):L.map(M=>l("calendar.statusCount",{label:M.label,count:M.count,defaultValue:"{{label}} {{count}}\uAC74"})).join(" \xB7 ");return n.jsxs("span",{className:"calendar-cell__visit-count caption-1","aria-label":`${N} ${U}`,children:[L.map(M=>n.jsx("span",{className:`calendar-cell__visit-dot calendar-cell__visit-dot--${M.key}`,"aria-hidden":"true"},M.key)),D.length]})})(),n.jsx("div",{className:"calendar-cell__badges",children:D.map((L,U)=>n.jsxs("div",{draggable:!!a,className:`calendar-visit-badge${L.status==="noVisit"?" calendar-visit-badge--no-visit":L.status==="scheduled"?" calendar-visit-badge--scheduled":""}${t?" calendar-visit-badge--clickable":""}${a?" calendar-visit-badge--draggable":""}`,onDragStart:a?M=>{C.current=L.id,M.dataTransfer.effectAllowed="move"}:void 0,onDragEnd:a?()=>{C.current=null,v(null)}:void 0,onClick:t?M=>{M.stopPropagation(),t(L)}:void 0,...tc(t?()=>t(L):void 0),"aria-label":[N,L.time?Zl(L.time,l):null,L.customer,l(L.status==="noVisit"?"calendar.legend.noVisit":L.status==="scheduled"?"calendar.legend.scheduled":"calendar.legend.visited")].filter(Boolean).join(" "),children:[L.time&&n.jsx("span",{className:"calendar-visit-badge__time body-3",children:Zl(L.time,l)}),n.jsx("span",{className:"calendar-visit-badge__name body-3",children:L.customer}),L.status==="noVisit"&&n.jsx("span",{className:"calendar-visit-badge__no-visit caption-1",children:l("calendar.legend.noVisit","\uBBF8\uBC29\uBB38")})]},L.id??U))})]},B)})]})]})}const _4={page:"h3",pagePopup:"h4",popup:"h5"};function _a({type:e="page",title:t,headingLevel:a=2,icon:r,action:s,disc:l,children:i,inGrid:u=!1,className:c,style:d}){const h=_4[e],p=t||l||s||r,m=a?`h${a}`:"div";return n.jsxs("div",{className:Be("section",`section--${e}`,u&&"section--in-grid",c),style:d,children:[p&&n.jsxs("div",{className:"section__header",children:[n.jsxs("div",{className:"section__title-row",children:[r&&n.jsx(ot,{icon:r,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 es=null,nc=!1;function ac(){if(nc||typeof document>"u")return;nc=!0,document.addEventListener("keydown",t=>{t.metaKey||t.ctrlKey||t.altKey||(es="keyboard")},!0);const e=()=>{es="pointer"};document.addEventListener("pointerdown",e,!0),document.addEventListener("mousedown",e,!0),document.addEventListener("touchstart",e,{capture:!0,passive:!0})}ac();function wr(){return ac(),es==="keyboard"}const Br=20;function x4(e){const{t}=_e.useTranslation(),{type:a,trainingDatas:r,depth:s,renderPopup:l,completedIds:i,selectedIds:u,onItemComplete:c,size:d,useDescriptionTooltip:h,onRemove:p,onMore:m,sectionType:b="page"}=e||{},[,v]=o.useState(0),C=typeof r<"u"?Array.isArray(r)?r:[]:[],f=C.length,[x,g]=o.useState(Math.min(f,Br)),w=o.useMemo(()=>Array.isArray(s)?[...s,a?.label].filter(Boolean).join(" \xB7 "):[s||"",a?.label].filter(Boolean).join(" \xB7 "),[s,a?.label]);o.useEffect(()=>{g(Math.min(f,Br))},[f]),zi("speechear.data.updated",()=>v(A=>A+1));const y=o.useRef(null),k=o.useRef(null);function _(){const A=document.activeElement;k.current=wr()&&A&&A.closest?.(".training-block__more")?x:null,g(B=>Math.min(f,B+Br))}return o.useEffect(()=>{const A=k.current;if(A==null)return;k.current=null;const B=document.activeElement;B&&B!==document.body||y.current?.querySelectorAll(".training-block-button")[A]?.focus()},[x]),n.jsxs(_a,{type:b,title:a?.label,icon:a?.icon,disc:a?.desc,className:"training-block",children:[n.jsx("div",{className:"training-list",ref:y,children:(C||[]).slice(0,x).map((A,B)=>{const E=A;return n.jsx(Ro,{index:B,type:a,trainingData:E,depth:w,renderPopup:l,completedIds:i,selectedIds:u,size:d,useDescriptionTooltip:h,onRemove:typeof p=="function"&&u!=null&&E?.id!=null&&u.has(String(E.id))?()=>p(E):void 0,onComplete:typeof c=="function"&&E?.id!=null?()=>c(String(E.id)):void 0,onMore:typeof m=="function"?D=>m(E,D):void 0},E?.id!=null?`${a?.key||"t"}-${String(E.id)}`:`${a?.key||"t"}-${B}`)})}),f>Br&&x<f&&n.jsx("div",{className:"training-block__more",children:n.jsx(fe,{htmlType:"button",size:48,type:"bar",icon:"plus",onClick:_,ariaLabel:t("common.loadMore","\uB354\uBCF4\uAE30"),label:t("common.loadMore","\uB354\uBCF4\uAE30"),variant:"main"})})]})}function w4(e){let t=0;const a=r=>{Array.isArray(r)?r.forEach(a):r!=null&&r!==!1&&r!==!0&&r!==""&&t++};return a(e),t}function B4({gap:e=10,count:t,className:a,children:r}){const s=o.useRef(null),[l,i]=o.useState({width:0,card:0}),u=t??w4(r);o.useLayoutEffect(()=>{const m=s.current;if(!m)return;const b=()=>{const C=m.style.maxWidth;m.style.maxWidth="none";const f=m.clientWidth;m.style.maxWidth=C;const x=m.firstElementChild?.offsetWidth??0;i(g=>g.width===f&&g.card===x?g:{width:f,card:x})};if(b(),typeof ResizeObserver>"u")return;const v=new ResizeObserver(b);return v.observe(m),()=>v.disconnect()},[u,e]);const c=l.card>0?l.card:0,d=c>0?_f(l.width,c,e):0,h=d>0?xf(u,d):0,p={"--block-grid-gap":`${e}px`,...h>0?{"--block-grid-cols":h,"--block-grid-card":`${c}px`}:{}};return n.jsx("div",{ref:s,className:Be("training-block-grid",h>0&&"training-block-grid--measured",a),style:p,"data-cols":h>0?h:void 0,children:r})}function ts(e){const t=o.useRef(null),a=o.useRef(e);a.current=e;const[r,s]=o.useState({url:e,loading:!!e,failed:!1}),l=r.url===e?r:{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(()=>{a.current===e&&s({url:e,loading:!1,failed:!1})},[e]),u=o.useCallback(()=>{a.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 k4='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 A4=k4,ns=o.forwardRef(function({item:e,disabled:t=!1,onPlayDone:a,selectable:r=!1,selected:s=!1,onSelect:l,flipDelay:i=0,hideLabel:u=!1,hideAudio:c=!1,orderRank:d=null},h){const{t:p}=_e.useTranslation(),m=e.word||e.title||"",b=t||!m,v=e.audio??e.sound??e.audioKey,C=e.subLabel||e.pronunciation||"",f=e.colloquialLabel||"",[x,g]=o.useState({label:m,subLabel:C,colloquialLabel:f,homonum:e.homonum});m&&(x.label!==m||x.subLabel!==C||x.colloquialLabel!==f||!Object.is(x.homonum,e.homonum))&&g({label:m,subLabel:C,colloquialLabel:f,homonum:e.homonum});const w=o.useRef(null),y=yn("(max-width: 767px)"),[k,_]=o.useState(!1),[A,B]=o.useState(!1),E=`${typeof v=="string"?v:v?.src??""}\0${m}`,[D,N]=o.useState({for:"",url:""}),$=D.for===E?D.url:"",L=Wl(),U=e.textOnly??(!e.image&&!!x.label&&!!L&&L.entries.length>0&&!L.byWord.has(x.label)),M=U?"":pa()?.(x.label,x.homonum)??e.image??"",{imgRef:P,loading:T,hasImage:ee,onLoad:te,onError:I}=ts(M);o.useEffect(()=>{let G=!1;return(async()=>{if(v){if(typeof v=="string"){if(v.startsWith("http")||v.includes("/")){N({for:E,url:v});return}}else if(typeof v=="object"&&!Array.isArray(v)){const K=v.src;if(K){N({for:E,url:K});return}}}const ie=ja();if(ie&&m)try{const K=await Promise.resolve(ie(m));!G&&K&&N({for:E,url:K})}catch{}})(),()=>{G=!0}},[v,m,E]);const Y=o.useRef(!0),R=o.useRef(null);o.useEffect(()=>(Y.current=!0,()=>{Y.current=!1,R.current&&_r(R.current),R.current=null;try{w.current?.pause()}catch{}w.current=null}),[]);const q=o.useCallback(()=>new Promise(G=>{if(typeof window<"u"&&window.speechSynthesis&&m){_(!0),window.speechSynthesis.cancel();const ie=new SpeechSynthesisUtterance(m);ie.lang="ko-KR",ie.onend=()=>{_(!1);try{a?.()}catch{}G()},ie.onerror=()=>{_(!1),G()},window.speechSynthesis.speak(ie)}else G()}),[m,a]),Z=o.useCallback(G=>{const ie=Ya(G,K=>{if(_(!1),K)try{a?.()}catch{}});return w.current=ie.el,ie.done},[a]),z=o.useCallback(async()=>{if(t||!Y.current)return;const G=()=>{R.current===G&&(R.current=null);try{w.current?.pause()}catch{}try{window.speechSynthesis?.cancel()}catch{}_(!1)},ie=Ka(G);R.current=G;try{window.speechSynthesis?.cancel()}catch{}try{if($&&(_(!0),await Z($)))return;const K=sr();if(K&&m)try{B(!0);const pe=await Promise.resolve(K(m));if(!Y.current||R.current!==G||(B(!1),pe&&(_(!0),await Z(pe))))return}catch{}if(!Y.current||R.current!==G)return;await q()}finally{R.current===G&&B(!1),ie(),R.current===G&&(R.current=null)}},[t,$,m,Z,q]);o.useImperativeHandle(h,()=>({play:()=>z()}),[z]);const j=G=>G.stopPropagation(),F=o.useCallback(G=>{if(G.stopPropagation(),!t){if(k){try{w.current?.pause()}catch{}try{window.speechSynthesis?.cancel()}catch{}_(!1);return}z()}},[t,k,z]),O=Be("training-word-card",t?"training-word-card--disabled":"",b?"training-word-card--flipped":"",r?"training-word-card--selectable":"",s?"training-word-card--selected":"");return n.jsx("div",{className:O,onClick:r&&!t?l:void 0,role:r?"button":void 0,"aria-pressed":r?s:void 0,tabIndex:r&&!t?0:void 0,"aria-disabled":r&&t?!0:void 0,onKeyDown:r&&!t?G=>{G.target===G.currentTarget&&(G.key==="Enter"||G.key===" "||G.key==="Spacebar")&&(G.preventDefault(),l?.())}:void 0,children:n.jsxs("div",{className:"training-word-card__flipper",style:{transitionDelay:b?"0ms":`${i}ms`},children:[n.jsxs("div",{className:"training-word-card__front",children:[s&&n.jsx("div",{className:"training-word-card__selected-badge",onClick:j,children:n.jsx(Dn,{size:40,position:"inline",animate:!0,icon:d!=null?void 0:"check",number:d??void 0,"aria-label":d!=null?p("training.nthSelected",{n:d}):p("training.selected","\uC120\uD0DD\uB428")})}),n.jsx("div",{className:"training-word-card__image-wrap",children:U?n.jsx("div",{className:"training-word-card__text-face",children:x.label}):ee?n.jsxs(n.Fragment,{children:[T&&n.jsx("div",{className:"training-word-card__spinner"}),n.jsx("img",{ref:P,className:"training-word-card__image",src:M,alt:x.label||p("common.image","\uC774\uBBF8\uC9C0"),style:{opacity:T?0:1},onLoad:te,onError:I})]}):n.jsx("div",{className:"training-word-card__placeholder"})}),!u&&n.jsxs("div",{className:"training-word-card__body",children:[!U&&n.jsx("div",{className:"training-word-card__word",children:x.label}),x.subLabel&&n.jsxs("div",{className:"training-word-card__pronunciation",children:["[",x.subLabel,"]"]}),x.colloquialLabel&&n.jsxs("div",{className:"training-word-card__colloquial caption-1",children:["[",x.colloquialLabel,"]"]})]}),!c&&n.jsx("div",{className:"training-word-card__bottom",onClick:r?j:void 0,children:n.jsx(fe,{htmlType:"button",size:y?40:48,type:y?"dot":"bar",icon:k?"pause":"play",label:y?void 0:p("training.playSound","\uC18C\uB9AC \uB4E3\uAE30"),selected:k,loading:A,onClick:F,disabled:t,ariaLabel:p("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("${A4}")`}})})]})})});function kr(e){return String(e)}const Ar=["o","triangle","x"];function rc(e,t){return e===t?null:t}const oc={o:"circle",triangle:"triangle",x:"x"},sc={o:"main",triangle:"warn",x:"danger"};function N4(e){let t=0,a=0,r=0;for(const l of Object.values(e))l==="o"?t++:l==="triangle"?a++:l==="x"&&r++;const s=t+a+r;return{marked:s,o:t,triangle:a,x:r,rate:s===0?null:(t+a*.5)/s}}function as(e){const t={};for(const[a,r]of Object.entries(e))(r==="o"||r==="triangle"||r==="x")&&(t[a]=r);return t}function lc(e){const t=[];let a=0;for(const r of e)t.push(a),a+=r;return t}function E4(e,t){return!t&&e>0}const aa={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 D4(e="landscape"){At("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:a,printH:r}=aa[e],s=document.createElement("style");s.textContent=`@page { size: ${t}; margin: 0; } .word-table { width: ${a} !important; height: ${r} !important; }`,document.head.appendChild(s);const l=()=>{document.head.removeChild(s),window.removeEventListener("afterprint",l)};window.addEventListener("afterprint",l),window.print()}function S4(e,t){if(e.length===0)return[[]];const a=Math.max(1,Math.floor(t)),r=[];for(let s=0;s<e.length;s+=a)r.push(e.slice(s,s+a));return r}const j4={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 ic(e,t){const a=j4[e][t];if(a)return a;const r=Math.max(1,Math.ceil(t)),s=Math.max(1,Math.ceil(Math.sqrt(r*.707)));let l,i;return e==="landscape"?(i=s,l=Math.ceil(r/i)):(l=s,i=Math.ceil(r/l)),(e==="landscape"?l<i:i<l)&&([l,i]=[i,l]),{cols:l,rows:i}}function T4(e,t){const a=ic(e==="landscape"?"portrait":"landscape",t),r=Math.max(1,Math.ceil(t));if(r<=1)return a;const s=aa[e],l=e==="landscape"?s.width/2:s.width,i=e==="landscape"?s.height:s.height/2,u=(m,b)=>Math.min(l/m/hc,i/b/mc),c=Math.max(0,a.cols*a.rows-r),d=u(a.cols,a.rows);let h=a,p=d;for(let m=1;m<=r;m++){const b=Math.ceil(r/m);if(m*b-r>c)continue;const v=u(m,b);v>p&&(h={cols:m,rows:b},p=v)}return p>d*1.05?h:a}const M4={show:"word-table__content--cut-show",dashed:"",corner:"word-table__content--cut-corner",hide:""},uc={\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"},cc={\uACE0\uC720:"\uACE0\uC720\uC5B4",\uD55C\uC790:"\uD55C\uC790\uC5B4",\uC678\uB798:"\uC678\uB798\uC5B4",\uD63C\uC885:"\uD63C\uC885\uC5B4"},rs={\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"},os={\uACE0\uC720:"native",\uD55C\uC790:"sino",\uC678\uB798:"foreign",\uD63C\uC885:"mixed"};function dc(e){return Object.fromEntries(Object.entries(uc).map(([t,a])=>[t,rs[t]?e(`wordTable.pos.${rs[t]}`,{defaultValue:a}):a]))}function pc(e){return Object.fromEntries(Object.entries(cc).map(([t,a])=>[t,os[t]?e(`wordSearch.filter.type.${os[t]}`,{defaultValue:a}):a]))}const L4={pos:rs,wordType:os};function ss(e,t){return e?e.split("/").map(a=>t[a]??a).join("/"):""}function ls(e,t,a,r){if(r!=="dashed")return{};const s=e%t,l=Math.floor(e/t),i=s<t-1,u=l<a-1;if(!i&&!u)return{};const c="#ddd",d=b=>`repeating-linear-gradient(to ${b}, ${c} 0, ${c} 5px, transparent 5px, transparent 10px)`,h=[],p=[],m=[];return i&&(h.push(d("bottom")),p.push("1px 100%"),m.push("right center")),u&&(h.push(d("right")),p.push("100% 1px"),m.push("center bottom")),{backgroundImage:h.join(", "),backgroundSize:p.join(", "),backgroundPosition:m.join(", "),backgroundRepeat:"no-repeat",printColorAdjust:"exact",WebkitPrintColorAdjust:"exact"}}const hc=280,$4=240,R4=280,mc=400,P4=120,F4=280;function Cc(e,t){const a=o.useRef(null),[r,s]=o.useState(1),[l,i]=o.useState(0),u=o.useCallback((c,d)=>{if(!(c>0))return;const h=c/e,p=t&&d>0?d/t:1/0,m=Math.min(1,h,p);s(m),i(Math.max(0,(c-e*m)/2))},[e,t]);return o.useEffect(()=>{const c=a.current;if(!c)return;const d=t?c.parentElement??c:c;if(u(d.clientWidth,d.clientHeight),typeof ResizeObserver>"u")return;const h=new ResizeObserver(([p])=>u(p.contentRect.width,p.contentRect.height));return h.observe(d),()=>h.disconnect()},[u,t]),{scalerRef:a,scale:r,offset:l}}const I4=24,O4={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0},z4=400,fc=8;function W4(e){return e<=1?"100%":`repeat(${e}, calc((100% - ${e-1} * var(--wt-cell-gap, 0px)) / ${e}))`}function is({label:e,subLabel:t,colloquialLabel:a,captionLabel:r,captionBadge:s,imageLabel:l,pickForm:i,homonum:u,showWord:c=!0,showImage:d=!0,showPronunciation:h=!0,showColloquial:p=!0,showCaption:m=!0,buttonSize:b=40,wordInfo:v,outerScale:C=1}){const{t:f}=_e.useTranslation(),x=o.useRef(null),g=o.useRef(null),w=o.useRef(null),[y,k]=o.useState(1),[_,A]=o.useState(!1),[B,E]=o.useState(!1),[D,N]=o.useState({for:"",url:""}),[$,L]=o.useState(null),U=t&&t.length>0?t:U1()?.(e,u)??"",M=pa()?.(l||e,u)??"",{imgRef:P,loading:T,failed:ee,onLoad:te,onError:I}=ts(M),Y=o.useCallback(()=>L(g.current?.getBoundingClientRect()??null),[]),R=o.useCallback(()=>L(null),[]),q=fr(!!$,ne=>{ne?Y():R()},g),Z=o.useMemo(()=>{if(!v)return null;const ne=[];return v.grade&&ne.push(f("wordTable.info.grade",{n:v.grade,defaultValue:"\uB09C\uC774\uB3C4: {{n}}\uB4F1\uAE09"})),v.syllables&&ne.push(f("wordTable.info.syllables",{n:v.syllables,defaultValue:"\uC74C\uC808 \uC218: {{n}}\uC74C\uC808"})),v.pos&&ne.push(f("wordTable.info.pos",{v:ss(v.pos,dc(f)),defaultValue:"\uD488\uC0AC: {{v}}"})),v.wordType&&ne.push(f("wordTable.info.wordType",{v:ss(v.wordType,pc(f)),defaultValue:"\uC720\uD615: {{v}}"})),ne.length?ne:null},[v,f]),z=U||e,j=D.for===z?D.url:"";o.useEffect(()=>{const ne=ja(),V=U||e;if(!ne||!V)return;let W=!1;return Promise.resolve(ne(V)).then(oe=>{!W&&oe&&N({for:V,url:oe})}),()=>{W=!0}},[U,e]);const F=o.useRef(null),O=o.useRef(null);o.useEffect(()=>()=>{w.current?.pause(),O.current?.()},[]);const G=o.useRef(null);o.useEffect(()=>()=>{G.current&&(G.current.cancelled=!0)},[]);const ie=o.useCallback(ne=>{if(ne.stopPropagation(),_||B){F.current?.();return}if(!j){const W=sr(),oe=U||e;if(!W||!oe)return;const xe={cancelled:!1,stop:null};G.current=xe;const be=()=>{xe.cancelled=!0,xe.stop?.(),E(!1),A(!1),O.current?.()};F.current=be,O.current=Ka(be),E(!0),Promise.resolve().then(()=>W(oe)).then(me=>{if(xe.cancelled)return;if(!me){be();return}N({for:oe,url:me});const ke=Ya(me,()=>{A(!1),O.current?.()});w.current=ke.el,xe.stop=ke.stop,E(!1),A(!0)}).catch(()=>{be()});return}A(!0);const V=Ya(j,()=>{A(!1),O.current?.()});w.current=V.el,F.current=V.stop,O.current=Ka(V.stop)},[_,B,j,U,e]),K=d&&!!M&&!ee,pe=K&&c?hc:K?R4:$4,X=K&&c?mc:K?F4:P4;o.useEffect(()=>{const ne=x.current;if(!ne||typeof ResizeObserver>"u")return;const V=new ResizeObserver(([W])=>{const{width:oe,height:xe}=W.contentRect;k(Math.min(oe/pe,xe/X))});return V.observe(ne),()=>V.disconnect()},[pe,X]);const H=b*C<I4;return n.jsxs("div",{ref:x,className:Be("word-table-cell",H&&"word-table-cell--tap-too-small",K?"word-table-cell--with-image":""),"data-ref-w":pe,"data-ref-h":X,children:[n.jsxs("div",{className:"word-table-cell__inner",style:{transform:`scale(${y})`},children:[K&&n.jsxs("div",{className:"word-table-cell__image-wrap",children:[T&&n.jsx("div",{className:"word-table-cell__spinner"}),n.jsx("img",{ref:P,className:"word-table-cell__image",src:M,alt:e,draggable:!1,style:{opacity:T?0:1},onLoad:te,onError:I})]}),m&&(s||r)&&n.jsxs("span",{className:"word-table-cell__caption",children:[s&&n.jsx(ln,{fill:"soft",size:"small",label:s}),r&&n.jsx("span",{className:"word-table-cell__caption-tail h5",children:r})]}),c&&n.jsx("span",{className:"word-table-cell__word h0",children:e}),h&&U&&n.jsxs("span",{className:"word-table-cell__sub h3",children:["[",U,"]"]}),p&&a&&n.jsxs("span",{className:"word-table-cell__colloquial h5",children:["[",a,"]"]})]}),n.jsxs("div",{className:"word-table-cell__side",children:[n.jsxs("div",{className:"word-table-cell__play-button","data-audio-src":j,children:[n.jsx("span",{"data-play-state":"play",style:{display:_?"none":void 0},children:n.jsx(fe,{htmlType:"button",size:b,type:"dot",icon:"play",variant:"transparent-lightGray",useBorder:!1,loading:B,showTooltipInfo:B?f("common.loading","\uBD88\uB7EC\uC624\uB294 \uC911"):f("common.play","\uC7AC\uC0DD"),ariaLabel:e?f("common.playFor",{name:e,defaultValue:`${e} \uC7AC\uC0DD`}):f("common.play","\uC7AC\uC0DD"),onClick:ie})}),n.jsx("span",{"data-play-state":"pause",style:{display:_?void 0:"none"},children:n.jsx(fe,{htmlType:"button",size:b,type:"dot",icon:"pause",useBorder:!1,selected:!0,showTooltipInfo:f("common.pause","\uBA48\uCDA4"),ariaLabel:e?f("common.pauseFor",{name:e,defaultValue:`${e} \uBA48\uCDA4`}):f("common.pause","\uBA48\uCDA4"),onClick:ie})})]}),v&&n.jsxs("div",{ref:g,className:"word-table-cell__info-button",onPointerEnter:ne=>{Un(ne)||Y()},onPointerLeave:ne=>{Un(ne)||R()},onFocus:()=>{ea()||Y()},onBlur:R,children:[n.jsx(fe,{htmlType:"button",size:b,type:"dot",icon:"info",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:!1,ariaLabel:f("wordTable.wordInfo","{{word}} \uB0B1\uB9D0 \uC815\uBCF4",{word:e}),onClick:ne=>{ne.stopPropagation(),q.touchPress()}}),$&&Z&&n.jsx(qn,{anchorRect:$,items:Z,showIndex:!1})]}),i&&n.jsx("div",{className:"word-table-cell__form-button",children:n.jsx(fe,{htmlType:"button",size:b,type:"dot",icon:"replace",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:f("wordTable.pickForm","\uB2E4\uB978 \uAF34\uB85C"),ariaLabel:i.n===null?f("wordTable.pickFormBaseAria","\uAE30\uBCF8\uD615 \uB0B1\uB9D0\uC744 \uB2E4\uB978 \uAF34\uB85C"):f("wordTable.pickFormAria",{n:i.n,defaultValue:"{{n}}\uBC88 \uCE78 \uB0B1\uB9D0\uC744 \uB2E4\uB978 \uAF34\uB85C"}),onClick:ne=>{ne.stopPropagation(),i.onPick(ne.currentTarget.getBoundingClientRect())}})})]})]})}function xa({title:e,titleIcon:t,disc:a,className:r,orientation:s="landscape",contentTypes:l=["image","word","standardPron"],baseItem:i,baseContentTypes:u,cutLine:c="show",showOutline:d=!0,showDivLine:h=!0,items:p,editCells:m,count:b,activeCell:v=null,onActivateCell:C,onRemoveCell:f,onRemoveItem:x,onReorder:g,onCopyItem:w,onReplaceItem:y,onPickForm:k,indexOffset:_=0,totalCount:A,renderCellAction:B,showFillerAdd:E=!1,addableCount:D,contentRef:N,buttonSize:$=40,brand:L,code:U,pageNumber:M,pageNumberPosition:P="right",fitHeight:T=!1,scoring:ee=!1,marks:te,onMarkClick:I,scoreIndexOffset:Y=0}){const R=o.useCallback((ue,Te)=>{I?.(Y+ue,Te)},[I,Y]),q=(ue,Te)=>{const Ne=ue.filter(Boolean).join(" / ");return Ne?Te?z("wordPrint.removePairFor",{name:Ne,defaultValue:`${Ne} \uB300\uB9BD\uC30D \uBE7C\uAE30`}):z("wordPrint.removeWordFor",{name:Ne,defaultValue:`${Ne} \uBE7C\uAE30`}):Te?z("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):z("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30")},Z=(ue,Te)=>{const Ne=te?.[kr(Y+ue)]??null;return n.jsx("div",{className:Be("word-table-cell__score",Ne?"word-table-cell__score--marked":""),style:_t>1?{transform:`translateX(-50%) scale(${_t})`,transformOrigin:"bottom center"}:void 0,children:Ar.map(tt=>n.jsx("span",{className:Be("word-table-cell__score-slot",Ne===tt?"word-table-cell__score-slot--on":""),children:n.jsx(fe,{htmlType:"button",size:$,type:"dot",shape:"pill",icon:oc[tt],variant:Ne===tt?sc[tt]:"default",selected:Ne===tt,useBorder:!1,...it?{}:{tabIndex:-1,role:"img"},showTooltipInfo:z(`wordTable.scoring.markName.${tt}`,{defaultValue:tt}),ariaLabel:z(`wordTable.scoring.${tt}`,{word:Te,defaultValue:`${Te} ${tt}`}),onClick:it?pt=>{pt.stopPropagation(),R(ue,tt)}:void 0})},tt))})},{t:z}=_e.useTranslation(),j=m!==void 0,F=e!=null||!!t||!!a,O=yn("(max-width: 767px)"),G=o.useRef(null),[ie,K]=o.useState(null),pe=p?.length??0,X=A??pe,[H,ne]=o.useState(null),[V,W]=o.useState(""),oe=o.useRef(null),xe=o.useRef(null),be=o.useRef(null),me=o.useRef(null),ke=o.useCallback(ue=>{xe.current=ue,typeof N=="function"?N(ue):N&&(N.current=ue)},[N]),Le=o.useCallback((ue,Te)=>{oe.current=_+Te,g?.(ue,Te),W(z("wordTable.reorder.moved",{n:_+Te+1,total:X,defaultValue:"{{total}}\uCE78 \uAC00\uC6B4\uB370 {{n}}\uBC88\uC9F8\uB85C \uC62E\uAE40"}))},[g,z,X,_]);o.useEffect(()=>{const ue=oe.current;ue!=null&&(oe.current=null,(xe.current?.closest(".word-table-block__pages")??xe.current)?.querySelector(`[data-wordtable-index="${ue}"] .word-table__card-handle button`)?.focus())}),o.useEffect(()=>()=>{me.current?.()},[]);const Me=o.useCallback((ue,Te)=>{if(!g||!ue.altKey||ue.ctrlKey||ue.metaKey)return;const Ne=ue.key==="ArrowRight";if(!Ne&&ue.key!=="ArrowLeft")return;ue.preventDefault();const tt=Te+(Ne?1:-1),pt=_+tt;pt<0||pt>=X||Le(Te,tt)},[g,X,_,Le]),le=o.useCallback((ue,Te)=>{if(!g||ue.pointerType==="mouse")return;const Ne=ue.target.closest?.("button");if(Ne&&!Ne.closest(".word-table__card-handle"))return;me.current?.();const tt={x:ue.clientX,y:ue.clientY};let pt=!1;const jt=Ue=>{pt&&Ue.cancelable&&Ue.preventDefault()};let je=null,nt=null;const ae=()=>{const Ue=nt;if(!Ue)return;const ht=document.elementFromPoint?.(Ue.x,Ue.y)?.closest?.("[data-wordtable-cell]"),cn=ht?Number(ht.dataset.wordtableCell):NaN,dn=Number.isInteger(cn)?cn:null;be.current=dn,K(zt=>zt===dn?zt:dn)},ye=Ue=>{if(!pt){(Math.abs(Ue.clientX-tt.x)>fc||Math.abs(Ue.clientY-tt.y)>fc)&&vt();return}if(nt={x:Ue.clientX,y:Ue.clientY},typeof requestAnimationFrame>"u"){ae();return}je===null&&(je=requestAnimationFrame(()=>{je=null,ae()}))},He=()=>{je!==null&&(cancelAnimationFrame(je),je=null,ae());const Ue=be.current,ht=pt;vt(),ht&&Ue!=null&&Ue!==Te&&Le(Te,Ue)},Ke=setTimeout(()=>{pt=!0,ne(Te),be.current=Te,K(Te),window.addEventListener("touchmove",jt,{passive:!1})},z4);function vt(){clearTimeout(Ke),window.removeEventListener("pointermove",ye),window.removeEventListener("pointerup",He),window.removeEventListener("pointercancel",He),window.removeEventListener("touchmove",jt),pt=!1,je!==null&&(cancelAnimationFrame(je),je=null),be.current=null,me.current=null,ne(null),K(null)}me.current=vt,window.addEventListener("pointermove",ye),window.addEventListener("pointerup",He),window.addEventListener("pointercancel",He)},[g,Le]),{width:ve,height:$e}=aa[s],Ae=typeof T=="number"?T:T&&typeof T=="object"?O?T.narrow:T.wide:null,{scalerRef:Ie,scale:ze,offset:dt}=Cc(ve,T?$e:void 0),st=j?m?.length??0:p?.length??0,et=Math.max(b??st,1),gt=!j&&!!i,Se=T4(s,et),Ge=ic(s,et),we=gt?Se.cols:Ge.cols,qe=gt?Se.rows:Ge.rows,Ye=gt&&s==="landscape"?Se.cols*2:we,mt=gt&&s==="portrait"?Se.rows*2:qe,wt=ue=>({word:ue.length===0||ue.includes("word"),image:ue.length===0||ue.includes("image"),pron:ue.length===0||ue.includes("standardPron"),colloq:ue.length===0||ue.includes("colloquialPron"),caption:ue.length===0||ue.includes("caption")}),yt=wt(l),Et=o.useMemo(()=>{const ue=(p??[]).map(Ne=>Ne.id),Te=ue.every(Ne=>typeof Ne=="string"&&Ne.length>0)&&new Set(ue).size===ue.length;return!Te&&ue.length>0&&At("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."),Te?ue:null},[p]),at=wt(u??l),rt=j?(m??[]).some(ue=>ue!==null&&ue.length>1):(p??[]).some(ue=>(ue.words??[]).length>1),Dt=!!L?.show,Bt=!!L?.show&&L?.top!==!1,Lt=!!L?.show&&L?.bottom!==!1,It=L?.copyright??"\xA9 IHAB, Inc. All rights reserved.",xt=se(Be("word-table__content",M4[c],d&&"word-table__content--outline",h&&rt&&"word-table__content--div-line",!Dt&&M&&P!=="none"&&"word-table__content--page-number",Bt&&"word-table__content--brand-top",Lt&&"word-table__content--brand-bottom")),lt={transform:`scale(${1/ze})`,transformOrigin:"center center"},Ct=$*Ar.length+4*(Ar.length-1),it=!!I,_t=it?Math.max(1,Math.min(1/ze,ve/Ye/Ct)):1,ut=n.jsxs("div",{ref:Ie,className:"word-table__scaler",style:{height:$e*ze},children:[n.jsx("div",{className:Be("word-table",ee&&!it&&"word-table--score-readonly",!F&&r),style:{width:ve,height:$e,transform:`scale(${ze})`,transformOrigin:"top left",marginLeft:dt},children:n.jsxs("div",{ref:ke,className:xt,style:{gridTemplateColumns:`repeat(${Ye}, 1fr)`,gridTemplateRows:W4(mt)},children:[j?n.jsx(n.Fragment,{children:(m??[]).map((ue,Te)=>n.jsx("div",{className:se(Be("word-table__edit-cell",ue?"word-table__edit-cell--filled":"word-table__edit-cell--empty",v===Te?"word-table__edit-cell--active":"")),style:ls(Te,Ye,mt,c),children:ue?n.jsxs(n.Fragment,{children:[ue.map((Ne,tt)=>n.jsxs(o.Fragment,{children:[tt>0&&n.jsx("div",{className:se("word-table__pair-divider")}),n.jsx(is,{outerScale:ze,label:Ne.word,subLabel:Ne.pronunciation,colloquialLabel:Ne.colloquialPronunciation,homonum:Ne.homonum,showWord:yt.word,showImage:yt.image,showPronunciation:yt.pron,showColloquial:yt.colloq,showCaption:yt.caption,buttonSize:$})]},tt)),ee&&Z(Te,ue.map(Ne=>Ne.word).join(" / ")),f&&n.jsx("div",{className:se("word-table__card-close"),children:n.jsx(fe,{htmlType:"button",size:$,type:"dot",icon:"x",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:ue.length>1?z("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):z("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),ariaLabel:q(ue.map(Ne=>Ne.word),ue.length>1),onClick:()=>f(Te)})})]}):C&&n.jsx("div",{className:se("word-table__card-add"),style:lt,children:n.jsx(fe,{htmlType:"button",size:$,type:"dot",icon:"plus",variant:"default",ariaLabel:z("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),showTooltipInfo:z("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),onClick:()=>C(Te)})})},Te))}):n.jsxs(n.Fragment,{children:[gt&&i&&n.jsx("div",{className:se("word-table__card word-table__card--base"),style:{gridColumn:`1 / span ${Se.cols}`,gridRow:`1 / span ${Se.rows}`,...ls(0,s==="landscape"?2:1,s==="landscape"?1:2,c)},children:(i.words??[]).map((ue,Te)=>n.jsxs(o.Fragment,{children:[Te>0&&n.jsx("div",{className:se("word-table__pair-divider")}),n.jsx(is,{outerScale:ze,label:ue.label,subLabel:ue.subLabel,colloquialLabel:ue.colloquialLabel,captionLabel:ue.captionLabel,captionBadge:ue.captionBadge,imageLabel:ue.imageLabel,pickForm:k&&ue.canPickForm?{n:null,onPick:Ne=>k(i.id,-1,Ne)}:void 0,homonum:ue.homonum,showWord:at.word,showImage:at.image,showPronunciation:at.pron,showColloquial:at.colloq,showCaption:at.caption,buttonSize:$,wordInfo:ue.grade||ue.syllables!=null||ue.pos||ue.wordType?{grade:ue.grade,syllables:ue.syllables,pos:ue.pos,wordType:ue.wordType}:void 0})]},Te))}),(p??[]).map((ue,Te)=>n.jsxs("div",{"data-wordtable-cell":g?Te:void 0,"data-wordtable-index":g?_+Te:void 0,className:se(`word-table__card${g?" word-table__card--draggable":""}${ie===Te?" word-table__card--drag-over":""}${H===Te?" word-table__card--dragging":""}`),style:ls(Te,we,qe,c),draggable:!!g,onPointerDown:g?Ne=>le(Ne,Te):void 0,onKeyDown:g?Ne=>Me(Ne,Te):void 0,onDragStart:g?()=>{G.current=Te}:void 0,onDragOver:g?Ne=>{Ne.preventDefault(),K(Te)}:void 0,onDragLeave:g?()=>K(null):void 0,onDrop:g?Ne=>{Ne.preventDefault(),G.current!==null&&G.current!==Te&&g(G.current,Te),G.current=null,K(null)}:void 0,onDragEnd:g?()=>{G.current=null,K(null)}:void 0,children:[(ue.words??[]).map((Ne,tt)=>n.jsxs(o.Fragment,{children:[tt>0&&n.jsx("div",{className:se("word-table__pair-divider")}),n.jsx(is,{outerScale:ze,label:Ne.label,subLabel:Ne.subLabel,colloquialLabel:Ne.colloquialLabel,captionLabel:Ne.captionLabel,captionBadge:Ne.captionBadge,imageLabel:Ne.imageLabel,pickForm:k&&Ne.canPickForm?{n:_+Te+1,onPick:pt=>k(ue.id,_+Te,pt)}:void 0,homonum:Ne.homonum,showWord:yt.word,showImage:yt.image,showPronunciation:yt.pron,showColloquial:yt.colloq,showCaption:yt.caption,buttonSize:$,wordInfo:Ne.grade||Ne.syllables!=null||Ne.pos||Ne.wordType?{grade:Ne.grade,syllables:Ne.syllables,pos:Ne.pos,wordType:Ne.wordType}:void 0})]},tt)),ee&&Z(Te,(ue.words??[]).map(Ne=>Ne.label).join(" / ")),(B||x||w||y||g)&&n.jsxs("div",{className:se("word-table__card-actions"),children:[x&&n.jsx("div",{className:se("word-table__card-close"),children:n.jsx(fe,{htmlType:"button",size:$,type:"dot",icon:"x",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:(ue.words??[]).length>1?z("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):z("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),ariaLabel:q((ue.words??[]).map(Ne=>Ne.label),(ue.words??[]).length>1),onClick:()=>x(ue.id)})}),w&&n.jsx("div",{className:se("word-table__card-copy"),children:n.jsx(fe,{htmlType:"button",size:$,type:"dot",icon:"copy",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:z("wordTable.copyItem","\uD55C \uCE78 \uB354"),ariaLabel:z("wordTable.copyItemAria",{n:_+Te+1,defaultValue:"{{n}}\uBC88 \uCE78 \uB0B1\uB9D0\uC744 \uD55C \uCE78 \uB354"}),onClick:()=>w(ue.id,_+Te)})}),y&&n.jsx("div",{className:se("word-table__card-replace"),children:n.jsx(fe,{htmlType:"button",size:$,type:"dot",icon:"refresh-cw",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:(ue.words??[]).length>1?z("wordTable.replacePair","\uB2E4\uB978 \uC30D\uC73C\uB85C"):z("wordTable.replaceItem","\uB2E4\uB978 \uB2E8\uC5B4\uB85C"),ariaLabel:(ue.words??[]).length>1?z("wordTable.replacePairAria",{n:_+Te+1,defaultValue:"{{n}}\uBC88 \uCE78\uB9CC \uB2E4\uB978 \uC30D\uC73C\uB85C"}):z("wordTable.replaceItemAria",{n:_+Te+1,defaultValue:"{{n}}\uBC88 \uCE78\uB9CC \uB2E4\uB978 \uB2E8\uC5B4\uB85C"}),onClick:()=>y(ue.id,_+Te)})}),B?.(Te,ue),g&&n.jsx("div",{className:se("word-table__card-handle"),children:n.jsx(fe,{htmlType:"button",size:$,type:"dot",icon:"grip-vertical",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:z("wordTable.reorder.hint","Alt + \u2190 \u2192 \uB85C \uC21C\uC11C \uBC14\uAFB8\uAE30"),ariaLabel:z("wordTable.reorder.handle",{word:(ue.words??[]).map(Ne=>Ne.label).join(" / "),defaultValue:"{{word}} \uC21C\uC11C \uBC14\uAFB8\uAE30 (Alt + \uD654\uC0B4\uD45C)"})})})]})]},Et?Et[Te]:Te)),Array.from({length:Math.max(0,we*qe-(p?.length??0))}).map((ue,Te)=>{const Ne=(p?.length??0)+Te<(D??et);return n.jsx("div",{className:se("word-table__card word-table__card--filler"),children:E&&C&&Ne&&n.jsx("div",{className:se("word-table__card-add"),style:lt,children:n.jsx(fe,{htmlType:"button",size:$,type:"dot",icon:"plus",variant:"default",ariaLabel:z("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),showTooltipInfo:z("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),onClick:()=>C((p?.length??0)+Te)})})},`filler-${Te}`)})]}),Bt&&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:L?.topLogo?.src??vr,alt:L?.topLogo?.alt??"\uB9D0\uADC0"}),(()=>{const ue=[L?.title&&n.jsx("span",{className:"word-table__paper-title",children:L.title},"t"),L?.owner&&n.jsx("span",{className:"word-table__owner",children:L.owner},"o"),U&&n.jsx("span",{className:"word-table__code",children:U},"c")].filter(Boolean);return ue.length===0?null:n.jsx("span",{className:"word-table__ident",children:ue.map((Te,Ne)=>n.jsxs(o.Fragment,{children:[Ne>0&&n.jsx("span",{className:"word-table__ident-dot","aria-hidden":"true",children:"\xB7"}),Te]},Ne))})})()]})}),Lt&&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:[L?.bottomLogo?n.jsx("img",{className:"word-table__brand-logo--ihab word-table__brand-logo--given",src:L.bottomLogo.src,alt:L.bottomLogo.alt}):n.jsx("span",{className:"word-table__brand-logo--ihab",role:"img","aria-label":"IHAB"}),n.jsx("span",{className:"word-table__copyright",children:It})]}),n.jsxs("span",{className:"word-table__band-end",children:[L?.link&&n.jsx("span",{className:"word-table__link",children:L.link}),M&&P!=="none"&&n.jsx("span",{className:"word-table__page-count",children:z("wordTable.filter.pageIndicator",{current:M.current,total:M.total})})]})]})}),!Dt&&M&&P!=="none"&&n.jsx("span",{className:`word-table__page-number body-3 word-table__page-number--${P}`,children:z("wordTable.filter.pageIndicator",{current:M.current,total:M.total})})]})}),g&&n.jsx("span",{role:"status",style:O4,children:V})]}),St=Ae==null?ut:n.jsx("div",{className:"word-table__frame",style:{height:Ae},children:ut});return F?n.jsx(_a,{type:"page",icon:t,title:e,disc:a,className:Be(se("word-table__section"),r),children:St}):St}function H4(e,t,a){const r=[];for(const s of e??[]){if(s.type==="note"||s.type==="input")continue;const l=s.displayLabel??s.label,i=V4(s,t?.[s.label],a);i!==null&&r.push(`${l} ${i}`)}return r.join(" \xB7 ")}function V4(e,t,a){const r=(Array.isArray(t)?t:t===void 0?[]:[t]).filter(s=>s!==kn);return r.length===0?e.allOption?e.allLabel??a:null:r.map(s=>q4(e,s)).join(", ")}function q4(e,t){const a=[...e.items??[],...(e.groups??[]).flat()];for(const r of a)if(r!=null){if(typeof r=="string"){if(r===t)return r;continue}if(r.value===t)return r.displayLabel??r.labels?.join(" ")??r.value}return t}function In({title:e,titleLevel:t=2,headerAction:a,headerSummary:r,collapsible:s=!1,defaultCollapsed:l=!1,collapsed:i,onCollapsedChange:u,footer:c,sections:d,selected:h={},onSelect:p,align:m,sectionAlign:b,className:v}){const C=(m??(b==="vertical"?"newline":"inline"))==="inline",{t:f}=_e.useTranslation(),[x,g]=o.useState(l),w=i??x,y=()=>{const N=!w;g(N),u?.(N)},k=N=>{if(!s)return;const $=N.target;!$||typeof $.closest!="function"||$.closest(".filter-panel__collapse-toggle")||$.closest('button, a, input, select, textarea, label, [role="radiogroup"], [role="button"], [role="menu"]')||y()},_=o.useMemo(()=>r!==void 0||!w?"":H4(d,h,f("common.all","\uC804\uCCB4")),[r,w,d,h,f]),A=r??(_?n.jsx("span",{className:"filter-panel__header-summary body-3",children:_}):null),B=e||a||r||s,E=o.useId(),D=t?`h${t}`:"span";return n.jsxs("div",{className:Be("filter-panel",s?"filter-panel--collapsible":"",w?"filter-panel--collapsed":"",v),role:typeof e=="string"&&e?"group":void 0,"aria-labelledby":typeof e=="string"&&e?E:void 0,children:[B&&n.jsxs("div",{className:"filter-panel__header",onClick:s?k:void 0,children:[n.jsx("div",{className:"filter-panel__title-row",children:e&&n.jsx(D,{id:E,className:"filter-panel__title h4",children:e})}),n.jsxs("div",{className:"filter-panel__header-actions",children:[w?A:a,s&&n.jsx(fe,{htmlType:"button",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:w?"chevron-down":"chevron-up",className:"filter-panel__collapse-toggle",ariaLabel:w?f("common.expand","\uD3BC\uCE58\uAE30"):f("common.collapse","\uC811\uAE30"),showTooltipInfo:w?f("common.expand","\uD3BC\uCE58\uAE30"):f("common.collapse","\uC811\uAE30"),"aria-expanded":!w,onClick:y})]})]}),!w&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:Be("filter-panel__sections",C?"filter-panel__sections--row":""),children:d.map(N=>{const $=h[N.label],L=$===void 0||(Array.isArray($)?$.length===0:!1),U=(N.items??[]).filter(P=>P!=null);N.allOption&&U.some(P=>(typeof P=="string"?P:P.value)===kn)&&At(`filter-panel-all-value:${N.label}`,`[FilterPanel] '${N.label}' \uC808\uC5D0 allOption \uACFC \uAC12 '${kn}' \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 M=P=>{const T=typeof P=="string"?P:P.value,ee=typeof P!="string"&&!!P.disabled,te=typeof P!="string"?P.labels:void 0,I=typeof P!="string"?P.displayLabel:void 0,Y=typeof P!="string"?P.tooltip:void 0,R=typeof P!="string"?P.descriptionTooltip:void 0,q=typeof P!="string"?P.shape:void 0,Z=Array.isArray($)?$.includes(T):$===T;return n.jsx(fe,{htmlType:"button",size:"keyboard",label:te??I??T,type:N.itemType??(te?"bar":T.length===1?"dot":void 0),selected:Z,disabled:ee,shape:q,showTooltipInfo:!!Y,tooltipInfoText:Y,tooltipDescription:R,onClick:()=>p?.(T,N.label)},T)};return n.jsxs(o.Fragment,{children:[N.groupLabel&&n.jsxs("div",{className:"filter-panel__group-label-row",children:[n.jsx("div",{className:"filter-panel__group-label body-2",children:N.groupLabel}),N.groupAction]}),n.jsxs("div",{className:Be("filter-panel__section",N.layout==="row"?"filter-panel__section--row":"",N.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:N.displayLabel??N.label}),N.labelAction??(N.labelInfo?n.jsx(Ga,{...N.labelInfo}):null)]}),N.type==="note"?n.jsx("div",{className:"filter-panel__note body-3",children:N.content}):N.type==="input"?n.jsx(Kn,{className:"filter-panel__textfield",placeholder:N.placeholder,ariaLabel:N.displayLabel??N.label,value:h[N.label]??"",onChange:P=>p?.(P,N.label),error:N.error}):!N.multiple&&N.display==="segmented"?n.jsx(vn,{ariaLabel:N.displayLabel??N.label,options:[...N.allOption?[{key:kn,label:N.allLabel??f("common.all","\uC804\uCCB4"),disabled:N.allOptionDisabled}]:[],...U.map(P=>{const T=typeof P=="string"?P:P.value,ee=typeof P!="string"?P.displayLabel:void 0,te=typeof P!="string"?P.disabled:void 0;return{key:T,label:ee??T,disabled:te}})],value:L&&N.allOption?kn:h[N.label]??"",onChange:P=>p?.(P,N.label),size:32}):!N.multiple&&N.display==="dropdown"?n.jsx(_n,{className:"filter-panel__dropdown",ariaLabel:typeof N.label=="string"?N.label:void 0,size:40,options:[...N.allOption?[{value:kn,label:N.allLabel??f("common.all","\uC804\uCCB4"),disabled:N.allOptionDisabled}]:[],...U.map(P=>{const T=typeof P=="string"?P:P.value,ee=typeof P!="string"?P.displayLabel:void 0,te=typeof P!="string"?P.disabled:void 0;return{value:T,label:ee??T,disabled:te}})],value:L&&N.allOption?kn:h[N.label],onChange:P=>p?.(P,N.label)}):n.jsxs("div",{className:N.groups?"filter-panel__item-groups":"filter-panel__items",children:[N.allOption&&!N.groups&&n.jsx(fe,{htmlType:"button",size:"keyboard",label:N.allLabel??f("common.all","\uC804\uCCB4"),selected:L,disabled:N.allOptionDisabled,onClick:()=>p?.(kn,N.label)}),N.groups?N.groups.map((P,T)=>n.jsxs("div",{className:"filter-panel__item-group",children:[T===0&&N.allOption&&n.jsx(fe,{htmlType:"button",size:"keyboard",label:N.allLabel??f("common.all","\uC804\uCCB4"),selected:L,disabled:N.allOptionDisabled,onClick:()=>p?.(kn,N.label)}),P.filter(ee=>ee!=null).map(M)]},T)):U.map(M)]})]})]},N.label)})}),c!=null&&c!==!1&&n.jsx("div",{className:"filter-panel__footer body-3",children:c})]})]})}const U4=[1,2,3,4,5,6,7,8,9,10,11,12],G4=[8,6,4,2,1],bn="show",jn="hide",bc=["image","word","caption","standardPron"];function gc(e){return e.some(t=>(t.words??[]).some(a=>!!a.captionBadge||!!a.captionLabel))}function yc(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 vc(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 _c(e){return{label:e("wordTable.filter.border","\uC678\uACFD\uC120"),items:[{value:bn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:jn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function xc(e){return{label:e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4"),items:[{value:bn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:jn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function wc(e){return{label:e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4"),items:[{value:bn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:jn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Bc(e){return{label:e("wordTable.filter.cutLine","\uC808\uCDE8\uC120"),items:[{value:bn,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:jn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function kc(e){return{label:e("wordPrint.divLine","\uB300\uB9BD\uC120"),items:[{value:bn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:jn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Ac(e,t){const a=Math.max(1,Math.min(t.itemCount,t.max??t.itemCount));return{label:e(t.hasPairs?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord"),items:[a,...G4.filter(r=>r<a)].map(r=>({value:`${r}\uAC1C`,displayLabel:e("wordTable.filter.itemsPerPageOption",{count:r})})),display:"segmented"}}function Nc(e,t){return e>=t?Number.POSITIVE_INFINITY:e}function K4(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:jn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Ec(e){return e==="left"||e==="center"||e==="right"?e:"none"}function Dc(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?bn:jn,[e("wordTable.filter.cutLine","\uC808\uCDE8\uC120")]:t.cutLine,[e("wordPrint.divLine","\uB300\uB9BD\uC120")]:t.showDivLine?bn:jn,...t.showTopInfo!=null?{[e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4")]:t.showTopInfo?bn:jn}:{},...t.showBottomInfo!=null?{[e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4")]:t.showBottomInfo?bn:jn}:{}}}function Sc(e,t,a,r){return a===e("wordTable.filter.composition","\uAD6C\uC131")?t===kn?(r.setContentTypes(()=>[]),!0):(r.setContentTypes(s=>s.includes(t)?s.filter(l=>l!==t):[...s,t]),!0):a===e("wordTable.filter.paperOrientation","\uC6A9\uC9C0 \uBC29\uD5A5")?(r.setOrientation(t==="landscape"?"landscape":"portrait"),!0):a===e("wordTable.filter.border","\uC678\uACFD\uC120")?(r.setShowOutline(t===bn),!0):a===e("wordTable.filter.cutLine","\uC808\uCDE8\uC120")?(r.setCutLine(t),!0):a===e("wordPrint.divLine","\uB300\uB9BD\uC120")?(r.setShowDivLine(t===bn),!0):a===e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4")?(r.setShowTopInfo?.(t===bn),!0):a===e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4")?(r.setShowBottomInfo?.(t===bn),!0):!1}function Y4(e){return"sections"in e}function us(e){const{t}=_e.useTranslation(),{title:a,className:r,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c}=e,d={collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c};if(Y4(e))return n.jsx(In,{className:r,title:a??t("wordTable.filterTitle","\uD45C \uC124\uC815"),sections:e.sections,selected:e.selected,onSelect:e.onSelect,...d,align:"inline"});const{hasImage:h,hasColloquial:p,hasCaption:m,contentTypes:b,orientation:v,showOutline:C,cutLine:f,showDivLine:x,setters:g,showCutLine:w=!1,showDivLine2:y=!1,middleSections:k=[],extraSelected:_={},onExtraSelect:A,showPaperBands:B=!1,showTopInfo:E=!0,showBottomInfo:D=!0}=e,N=[yc(t,{hasImage:h,hasColloquial:p,hasCaption:m??!1}),vc(t),...k,_c(t),...w?[Bc(t)]:[],...y?[kc(t)]:[],...B?[xc(t),wc(t)]:[]],$={...Dc(t,{contentTypes:b,orientation:v,showOutline:C,cutLine:f,showDivLine:x,showTopInfo:E,showBottomInfo:D}),..._},L=(U,M)=>{Sc(t,U,M,g)||A?.(U,M)};return n.jsx(In,{className:r,title:a??t("wordTable.filterTitle","\uD45C \uC124\uC815"),sections:N,selected:$,onSelect:L,...d,sectionAlign:"horizontal"})}function cs(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function Z4(e){return cs(e).replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function ds(e){return e.replace(/[\\/:*?"<>|]/g,"_").trim()}let Nr=null,wa=null;function X4(e,t,a,r="",s=""){if(e.length===0||wa&&wa.iframe.isConnected&&Date.now()-wa.at<1e4)return;const l=r?ds(r):"";Nr?.();let i=null;if(l){const d=document.title;document.title=l,i=()=>{document.title=d,window.removeEventListener("afterprint",i),Nr===i&&(Nr=null)},Nr=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}wa={iframe:u,at:Date.now()},c.open(),c.write(ps(e,t,a,!0,l,s)),c.close(),u.contentWindow?.addEventListener("afterprint",()=>{i?.(),setTimeout(()=>{u.remove(),wa?.iframe===u&&(wa=null)},0)})}function ps(e,t,a,r=!1,s="",l=""){s=s?ds(s):"";const i=Array.from(document.styleSheets).flatMap(p=>{try{return Array.from(p.cssRules).map(m=>m.cssText)}catch{return[]}}).join(`
831
+ `),u="light",c=(()=>{try{return document.documentElement.lang||""}catch{return""}})(),d=l?`<div class="paper-head">${cs(l)}</div>`:"",h=e.map(p=>{const m=p.cloneNode(!0);return m.querySelectorAll('[data-play-state="play"]').forEach(b=>b.style.display=""),m.querySelectorAll('[data-play-state="pause"]').forEach(b=>b.style.display="none"),m.querySelectorAll(".word-table-cell__score-slot:not(.word-table-cell__score-slot--on)").forEach(b=>b.remove()),m.querySelectorAll(".word-table-cell__spinner").forEach(b=>b.remove()),m.querySelectorAll("img").forEach(b=>{b.style.opacity==="0"&&(b.setAttribute("onload","this.style.opacity=''"),b.setAttribute("onerror","this.style.visibility='hidden'"))}),`<div class="paper-wrap">${d}${m.outerHTML}</div>`}).join(`
832
832
  `);return`<!DOCTYPE html>
833
833
  <html${c?` lang="${Z4(c)}"`:""} data-theme="${u}">
834
834
  <head>
@@ -1037,10 +1037,10 @@ ${v.badge}`:v.badge:void 0;if(x&&c(v.code))return null;if(!v.badge&&!h)return p(
1037
1037
  `:""}
1038
1038
  <\/script>
1039
1039
  </body>
1040
- </html>`}const J4=1e3;function hs({getElements:e,paperW:t,paperH:a,fileName:r="",onPopupBlocked:s,header:l=""}){const{t:i}=_e.useTranslation(),u=o.useCallback(()=>{X4(e(),t,a,r,l)},[e,t,a,r,l]),c=o.useCallback(()=>{const h=e();if(h.length===0)return;const p=window.open("","_blank");if(!p){s?.();return}p.document.write(ps(h,t,a,!1,r,l)),p.document.close()},[e,t,a,r,s,l]),d=o.useCallback(()=>{const h=e();if(h.length===0)return;const p=ps(h,t,a,!1,r,l),m=new Blob([p],{type:"text/html;charset=utf-8"}),g=URL.createObjectURL(m),y=(r?ds(r):"")||i("wordTable.printFileNameSingle","\uB2E8\uC5B4\uD45C"),C=Object.assign(document.createElement("a"),{href:g,download:`${y}.html`});document.body.appendChild(C),C.click(),document.body.removeChild(C),setTimeout(()=>URL.revokeObjectURL(g),J4)},[e,t,a,r,l,i]);return{print:u,openNewWindow:c,downloadHtml:d}}function jc(e,t){const{t:a}=_e.useTranslation(),r=t?.paperBands===!0,s=t?.maxItemsPerPage,[l,i]=o.useState("landscape"),[u,c]=o.useState([...bc]),[d,h]=o.useState("show"),[p,m]=o.useState(!0),[g,y]=o.useState(!0),[C,f]=o.useState(!0),[_,b]=o.useState(!0),[w,v]=o.useState(8),[k,x]=o.useState("right"),A=e.length,B=e.some(Y=>(Y.words??[]).length>1),E=e.some(Y=>(Y.words??[]).some(R=>!!R.colloquialLabel)),D=gc(e),N=Math.max(1,Math.min(Math.max(A,1),s??Math.max(A,1))),$=Math.min(w,N),L=o.useMemo(()=>S4(e,$),[e,$]),U=L.length>1,M=$,[P,T]=o.useState(!1);o.useEffect(()=>{let Y=!1;if(!pa()){T(!1);return}return Promise.all(e.flatMap(R=>(R.words??[]).map(q=>Ml(q.label,q.homonum)))).then(R=>{Y||T(R.some(Boolean))},()=>{}),()=>{Y=!0}},[e]);const ee=o.useMemo(()=>[yc(a,{hasImage:P,hasColloquial:E,hasCaption:D}),vc(a),...A>0?[Ac(a,{hasPairs:B,itemCount:A,max:s})]:[],_c(a),...M>1?[Bc(a)]:[],...B?[kc(a)]:[],...r?[xc(a),wc(a)]:[]],[a,P,E,D,A,B,U,M,r,s]),te={...Dc(a,{contentTypes:u,orientation:l,showOutline:p,cutLine:d,showDivLine:_,showTopInfo:g,showBottomInfo:C}),...A>0?{[a(B?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")]:`${$}\uAC1C`}:{},...U?{[a("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")]:k}:{}},I=o.useCallback((Y,R)=>{Sc(a,Y,R,{setContentTypes:c,setOrientation:i,setShowOutline:m,setCutLine:h,setShowDivLine:b,setShowTopInfo:y,setShowBottomInfo:f})||(R===a("wordTable.filter.itemsPerPagePair","\uD398\uC774\uC9C0\uB2F9 \uB300\uB9BD\uC30D \uC218")||R===a("wordTable.filter.itemsPerPageWord","\uD398\uC774\uC9C0\uB2F9 \uB2E8\uC5B4 \uC218")?v(Nc(parseInt(Y),A)):R===a("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")&&x(Ec(Y)))},[a,A]);return{settings:{orientation:l,contentTypes:u,cutLine:d,showOutline:p,showDivLine:_,count:M,showTopInfo:g,showBottomInfo:C},filterSections:ee,filterSelected:te,handleSelect:I,pages:L,isPaginated:U,pageNumberPosition:k}}function Q4({items:e,words:t,baseItem:a,baseContentTypes:r,maxItemsPerPage:s,title:l,subtitle:i,emptyText:u,buttons:c,renderButtons:d,renderFooter:h,footerClassName:p,footerLayout:m,printFileName:g,showSettings:y,autoPrint:C,className:f,onClose:_,scoring:b=!1,onScoreChange:w,printHeader:v,brand:k,code:x,beforeClose:A}){const{t:B}=_e.useTranslation(),E=o.useMemo(()=>Array.isArray(e)?e:(Array.isArray(t)?t:[]).filter(W=>typeof W=="string"&&W.length>0).map((W,oe)=>({id:`${W}-${oe}`,words:[{label:W}]})),[e,t]),{settings:D,filterSections:N,filterSelected:$,handleSelect:L,pages:U,isPaginated:M,pageNumberPosition:P}=jc(E,{paperBands:!!k?.show,maxItemsPerPage:s}),T=o.useMemo(()=>lc(U.map(W=>W.length)),[U]),[ee,te]=o.useState({}),I=o.useCallback((W,oe)=>{te(xe=>({...xe,[kr(W)]:rc(xe[kr(W)]??null,oe)}))},[]),Y=o.useRef(w);o.useEffect(()=>{Y.current=w});const R=o.useRef(ee);o.useEffect(()=>{R.current!==ee&&(R.current=ee,Y.current?.(as(ee)))},[ee]);const q=o.useMemo(()=>as(ee),[ee]),Z=o.useRef(null),{toastMessage:z,toastKey:j,showWarning:F,clearToast:O}=Gi("warning"),G=o.useRef([]),ie=o.useCallback(()=>M?G.current.filter(W=>W!==null):Z.current?[Z.current]:[],[M]),{print:K,openNewWindow:pe}=hs({getElements:ie,paperW:aa[D.orientation].width,paperH:aa[D.orientation].height,fileName:g??"",header:v??"",onPopupBlocked:()=>F(B("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."))}),X=o.useMemo(()=>h?void 0:d?d({print:K,openNewWindow:pe}):g?[{label:B("wordTable.openNewWindow","\uC0C8 \uCC3D\uC73C\uB85C \uBCF4\uAE30"),variant:"default",onClick:()=>pe()},{label:B("wordTable.print","\uC778\uC1C4\uD558\uAE30"),variant:"default",onClick:()=>K()},...c??[]]:c,[h,d,g,c,B,K,pe]),H=o.useMemo(()=>h?h({print:K,openNewWindow:pe}):void 0,[h,K,pe]),ne=o.useRef(!1),V=o.useRef(K);return o.useEffect(()=>{V.current=K},[K]),o.useEffect(()=>{if(!C||ne.current)return;const W=window.setTimeout(()=>{ne.current=!0,V.current()},100);return()=>window.clearTimeout(W)},[C]),n.jsxs(Pn,{title:l??B("keyWords.title","\uC8FC\uC694 \uB2E8\uC5B4"),subtitle:i,size:"large",className:Be("word-table-popup",f),buttons:X,footer:H,footerClassName:p,footerLayout:m,beforeClose:A,onClose:_,children:[E.length>0?n.jsxs("div",{className:"word-table-popup__body",children:[y&&n.jsx(us,{sections:N,selected:$,onSelect:L}),M?n.jsx("div",{className:"word-table-popup__pages",children:U.map((W,oe)=>n.jsx(xa,{items:W,orientation:D.orientation,contentTypes:D.contentTypes,baseItem:a,baseContentTypes:r,cutLine:D.cutLine,showOutline:D.showOutline,showDivLine:D.showDivLine,count:D.count,contentRef:xe=>{G.current[oe]=xe},pageNumber:{current:oe+1,total:U.length},pageNumberPosition:P,brand:k&&{...k,top:D.showTopInfo,bottom:D.showBottomInfo},code:x,scoring:b,scoreIndexOffset:T[oe],marks:q,onMarkClick:I},oe))}):n.jsx("div",{className:"word-table-popup__table",children:n.jsx(xa,{items:E,orientation:D.orientation,contentTypes:D.contentTypes,baseItem:a,baseContentTypes:r,cutLine:D.cutLine,showOutline:D.showOutline,showDivLine:D.showDivLine,count:D.count,contentRef:Z,fitHeight:!0,scoring:b,marks:q,onMarkClick:I,brand:k&&{...k,top:D.showTopInfo,bottom:D.showBottomInfo},code:x})})]}):n.jsx("p",{className:"word-table-popup__empty body-3",children:u??B("keyWords.empty","\uCD94\uCD9C\uB41C \uC8FC\uC694 \uB2E8\uC5B4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}),n.jsx(va,{message:z,position:"top",onClose:O},j)]})}const e_=new Set(["x","triangle"]);function t_(e,t){const a=[];for(let r=0;r<e.length;r++){const s=t[String(r)];s&&e_.has(s)&&a.push(e[r])}return a}const n_=/\s*(?:(\d+)차\s*)?복습\s*\d{2}\.\d{2}$/;function Tc(e){const t=e.name.trim(),a=e.reviewRound;if(typeof a=="number"&&Number.isFinite(a)&&a>=0){const l=Math.floor(a);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 r=t,s=1;for(;;){const l=n_.exec(r);if(!l)break;s=Math.max(s,(l[1]?Number(l[1]):1)+1),r=r.slice(0,l.index).trim()}return{base:r,round:s}}function a_(e,t){const[,a,r]=po(t).split("-"),s=`${a}.${r}`,{base:l,round:i}=Tc(typeof e=="string"?{name:e}:e),u=i>=2?`${i}\uCC28 `:"";return`${l||"\uB2E8\uC5B4\uD45C"} ${u}\uBCF5\uC2B5 ${s}`}function r_(e){return{reviewOf:e.reviewOf??e.id??void 0,reviewRound:Tc(e).round}}function o_(e,t){const a={};for(const[r,s]of Object.entries(t)){if(s!=="o"&&s!=="triangle"&&s!=="x")continue;const l=Number(r),i=e[l];i&&(a[r]=i)}return a}function s_(e){return e.map(t=>t.label).join(" / ")}function l_(e){return e.map(t=>t.homonum!=null?`${t.label}#${t.homonum}`:t.label).join(" / ")}function Mc(e){return e.split(" / ").map(t=>t.replace(/#\d+$/,"")).join(" / ")}function i_(e,t,a){const r=Yl(a);return[e.trim(),r,t.trim()].filter(Boolean).join(" \xB7 ")}function Lc(e,t,a){return a===0?0:(e+t*.5)/a}function u_(e){const t=new Map,a=[...e].sort((s,l)=>s.scoredAt.localeCompare(l.scoredAt));for(const s of a)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 r=[];for(const[s,l]of t){const i=l.o+l.triangle+l.x;r.push({label:Mc(s),key:s,tried:i,o:l.o,triangle:l.triangle,x:l.x,rate:Lc(l.o,l.triangle,i),latest:l.latest,latestAt:l.latestAt})}return r.sort((s,l)=>s.rate-l.rate||l.tried-s.tried||fn(s.label,l.label)||fn(s.key??s.label,l.key??l.label)),r}function c_(e){const t=new Map;for(const r of e){const s=r.tableId??`name:${r.tableName}`,l=t.get(s)??{tableName:r.tableName,tableId:r.tableId,rows:[]};l.rows.push(r),t.set(s,l)}const a=[];for(const r of t.values()){const s=u=>Object.values(u.marks).filter(c=>c==="o"||c==="triangle"||c==="x").length,l=r.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),d=c.filter(p=>p==="o").length,h=c.filter(p=>p==="triangle").length;return Lc(d,h,s(u))});a.push({tableName:r.tableName,tableId:r.tableId,rates:i,times:l.map(u=>u.scoredAt),delta:i.length>=2?i[i.length-1]-i[0]:null})}return a.sort((r,s)=>(s.times[s.times.length-1]??"").localeCompare(r.times[r.times.length-1]??"")),a}function d_(e,t=8){return e.filter(a=>a.latest!=="o").slice(0,t)}function p_(e,t){if(e==null||t==null||e===""||t==="")return 0;if(typeof e=="number"&&typeof t=="number")return e-t;const a=String(e),r=String(t);return+(a>r)-+(a<r)}function h_(e){const t=new Map;let a=0,r=0;const s=e.map((i,u)=>({r:i,at:u})).sort((i,u)=>i.r.answeredAt.localeCompare(u.r.answeredAt)||p_(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){r++;continue}a++;const c=i.itemId?.trim()||u,d=`${i.trainingType}|${c}`,h=t.get(d)??{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 p=h.setIds.indexOf(i.setId);p>0&&h.setIds.splice(p,1),p!==0&&h.setIds.unshift(i.setId)}t.set(d,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||fn(i.title,u.title)),{items:l,counted:a,skippedNoTitle:r}}function m_(e,t=8){return e.filter(a=>!a.latestCorrect).slice(0,t)}function C_(e){const t=new Map;for(const r of e){const s=t.get(r.trainingType)??[];s.push(r),t.set(r.trainingType,s)}const a=[...t.entries()].map(([r,s])=>({trainingType:r,items:s,pending:s.filter(l=>!l.latestCorrect).length}));return a.sort((r,s)=>s.pending-r.pending||r.trainingType.localeCompare(s.trainingType)),a}const ms=["LISTEN_IN_NOISE","SHORT_STORY","LONG_STORY","ORDERING_SENTENCE"];function f_(e){const t=new Map;let a=0;for(const l of e){if(l.latestCorrect)continue;const i=l.setIds[0];if(!i){a++;continue}const u=`${l.trainingType}|${i}`,c=t.get(u)??{setId:i,trainingType:l.trainingType,pending:0};c.pending++,t.set(u,c)}const r=(l,i)=>i.pending-l.pending||l.trainingType.localeCompare(i.trainingType)||l.setId.localeCompare(i.setId),s=[...t.values()];return{sentence:s.filter(l=>ms.includes(l.trainingType)).sort(r),word:s.filter(l=>!ms.includes(l.trainingType)).sort(r),noSet:a}}function b_(e,t,a=5){const r=new Set(t);if(r.size===0)return[];const s=[];for(const l of e){const i=new Set,u=[];for(const c of l.cellLabels)r.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||fn(l.name,i.name)),s.slice(0,Math.max(0,a))}function g_(e,t){const a=new Set(e.flatMap(r=>r.covered));return t.filter(r=>!a.has(r))}function y_(e,t){const a=new Map;for(const s of e)for(const l of s.cells){const i=s.labelOf(l);a.has(i)||a.set(i,l)}const r=[];for(const s of t){const l=a.get(s);l!==void 0&&r.push(l)}return r}function Cs(e,t,a){return typeof e=="string"&&e?e:t.replace(/\{\{(\w+)\}\}/g,(r,s)=>String(a[s]))}function v_(e,t){const a=Number.isFinite(e)?Math.round(e):0;if(!a||a<=0)return"-";const r=Math.floor(a/60),s=a%60;return t?t(r,s):r>0&&s>0?Cs(Kt.t("customers.duration.minSec",{m:r,s,defaultValue:"{{m}}\uBD84 {{s}}\uCD08"}),"{{m}}\uBD84 {{s}}\uCD08",{m:r,s}):r>0?Cs(Kt.t("customers.duration.min",{m:r,defaultValue:"{{m}}\uBD84"}),"{{m}}\uBD84",{m:r}):Cs(Kt.t("customers.duration.sec",{s,defaultValue:"{{s}}\uCD08"}),"{{s}}\uCD08",{s})}function __(e,t){const a=[],r=new Set;for(const s of e){const l=t(s);r.has(l)||(r.add(l),a.push({key:l,value:s,pinned:!1}))}return a}function x_(e,t){return e.map(a=>a.key===t?{...a,pinned:!a.pinned}:a)}function w_(e,t){return e.filter(a=>a.key!==t)}function B_(e,t,a){const r=e.filter(d=>d.pinned),s=new Set(r.map(d=>d.key)),l=e.length-r.length,i=[],u=new Set(s);for(const d of t){if(i.length>=l)break;const h=a(d);u.has(h)||(u.add(h),i.push({key:h,value:d,pinned:!1}))}const c=[...i];return e.map(d=>d.pinned?d:c.shift()).filter(d=>d!==void 0)}function k_(e){return e.map(t=>t.value)}function A_(e){const{category:t={},isSelected:a=!1,onClick:r}=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${a?" icon-grid-menu__button--selected":""}`,"data-key":t?.key,type:"button",onClick:a?void 0:r,"aria-pressed":a,"aria-labelledby":l,children:n.jsx(ot,{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 N_(e){const{categories:t=[],selected:a,onSelect:r,size:s="medium"}=e||{},l=a!==void 0,[i,u]=o.useState(()=>l?null:(t&&t[0]?.key)??null),c=l?a:i,d=o.useRef(r);o.useEffect(()=>{d.current=r});const h=o.useRef(!1),p=(t&&t[0]?.key)??null;o.useEffect(()=>{if(l||h.current||!p)return;h.current=!0;const g=i??p;i==null&&u(g),d.current?.(g)},[l,p]);const m=o.useCallback(g=>{const y=c===g?null:g;h.current=!0,l||u(y),r?.(y)},[c,l,r]);return n.jsx("div",{className:`icon-grid-menu icon-grid-menu--${s}`,children:(t||[]).map(g=>n.jsx(A_,{category:g,isSelected:c===g.key,onClick:()=>m(g.key)},g.key))})}function E_({subs:e=[],selected:t,onSelect:a,size:r="medium"}){const s=r==="small"?32:40;return n.jsx("div",{className:`choice-chips choice-chips--${r}`,children:n.jsx("div",{className:"choice-chips__list",children:e.map(l=>n.jsx(fe,{htmlType:"button",size:s,type:"bar",label:l.label,selected:t===l.key,className:"choice-chips__button",onClick:()=>a?.(l.key)},l.key))})})}function D_({onTermsClick:e,onPrivacyClick:t,contact:a}={}){const r=a?.email??"support@ihab.co.kr",s=a?.tel??"031-380-3724",{t:l}=_e.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
1040
+ </html>`}const J4=1e3;function hs({getElements:e,paperW:t,paperH:a,fileName:r="",onPopupBlocked:s,header:l=""}){const{t:i}=_e.useTranslation(),u=o.useCallback(()=>{X4(e(),t,a,r,l)},[e,t,a,r,l]),c=o.useCallback(()=>{const h=e();if(h.length===0)return;const p=window.open("","_blank");if(!p){s?.();return}p.document.write(ps(h,t,a,!1,r,l)),p.document.close()},[e,t,a,r,s,l]),d=o.useCallback(()=>{const h=e();if(h.length===0)return;const p=ps(h,t,a,!1,r,l),m=new Blob([p],{type:"text/html;charset=utf-8"}),b=URL.createObjectURL(m),v=(r?ds(r):"")||i("wordTable.printFileNameSingle","\uB2E8\uC5B4\uD45C"),C=Object.assign(document.createElement("a"),{href:b,download:`${v}.html`});document.body.appendChild(C),C.click(),document.body.removeChild(C),setTimeout(()=>URL.revokeObjectURL(b),J4)},[e,t,a,r,l,i]);return{print:u,openNewWindow:c,downloadHtml:d}}function jc(e,t){const{t:a}=_e.useTranslation(),r=t?.paperBands===!0,s=t?.maxItemsPerPage,[l,i]=o.useState("landscape"),[u,c]=o.useState([...bc]),[d,h]=o.useState("show"),[p,m]=o.useState(!0),[b,v]=o.useState(!0),[C,f]=o.useState(!0),[x,g]=o.useState(!0),[w,y]=o.useState(8),[k,_]=o.useState("right"),A=e.length,B=e.some(Y=>(Y.words??[]).length>1),E=e.some(Y=>(Y.words??[]).some(R=>!!R.colloquialLabel)),D=gc(e),N=Math.max(1,Math.min(Math.max(A,1),s??Math.max(A,1))),$=Math.min(w,N),L=o.useMemo(()=>S4(e,$),[e,$]),U=L.length>1,M=$,[P,T]=o.useState(!1);o.useEffect(()=>{let Y=!1;if(!pa()){T(!1);return}return Promise.all(e.flatMap(R=>(R.words??[]).map(q=>Ml(q.label,q.homonum)))).then(R=>{Y||T(R.some(Boolean))},()=>{}),()=>{Y=!0}},[e]);const ee=o.useMemo(()=>[yc(a,{hasImage:P,hasColloquial:E,hasCaption:D}),vc(a),...A>0?[Ac(a,{hasPairs:B,itemCount:A,max:s})]:[],_c(a),...M>1?[Bc(a)]:[],...B?[kc(a)]:[],...r?[xc(a),wc(a)]:[]],[a,P,E,D,A,B,U,M,r,s]),te={...Dc(a,{contentTypes:u,orientation:l,showOutline:p,cutLine:d,showDivLine:x,showTopInfo:b,showBottomInfo:C}),...A>0?{[a(B?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")]:`${$}\uAC1C`}:{},...U?{[a("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")]:k}:{}},I=o.useCallback((Y,R)=>{Sc(a,Y,R,{setContentTypes:c,setOrientation:i,setShowOutline:m,setCutLine:h,setShowDivLine:g,setShowTopInfo:v,setShowBottomInfo:f})||(R===a("wordTable.filter.itemsPerPagePair","\uD398\uC774\uC9C0\uB2F9 \uB300\uB9BD\uC30D \uC218")||R===a("wordTable.filter.itemsPerPageWord","\uD398\uC774\uC9C0\uB2F9 \uB2E8\uC5B4 \uC218")?y(Nc(parseInt(Y),A)):R===a("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")&&_(Ec(Y)))},[a,A]);return{settings:{orientation:l,contentTypes:u,cutLine:d,showOutline:p,showDivLine:x,count:M,showTopInfo:b,showBottomInfo:C},filterSections:ee,filterSelected:te,handleSelect:I,pages:L,isPaginated:U,pageNumberPosition:k}}function Q4({items:e,words:t,baseItem:a,baseContentTypes:r,maxItemsPerPage:s,title:l,subtitle:i,emptyText:u,buttons:c,renderButtons:d,renderFooter:h,footerClassName:p,footerLayout:m,printFileName:b,showSettings:v,autoPrint:C,className:f,onClose:x,scoring:g=!1,onScoreChange:w,printHeader:y,brand:k,code:_,beforeClose:A}){const{t:B}=_e.useTranslation(),E=o.useMemo(()=>Array.isArray(e)?e:(Array.isArray(t)?t:[]).filter(W=>typeof W=="string"&&W.length>0).map((W,oe)=>({id:`${W}-${oe}`,words:[{label:W}]})),[e,t]),{settings:D,filterSections:N,filterSelected:$,handleSelect:L,pages:U,isPaginated:M,pageNumberPosition:P}=jc(E,{paperBands:!!k?.show,maxItemsPerPage:s}),T=o.useMemo(()=>lc(U.map(W=>W.length)),[U]),[ee,te]=o.useState({}),I=o.useCallback((W,oe)=>{te(xe=>({...xe,[kr(W)]:rc(xe[kr(W)]??null,oe)}))},[]),Y=o.useRef(w);o.useEffect(()=>{Y.current=w});const R=o.useRef(ee);o.useEffect(()=>{R.current!==ee&&(R.current=ee,Y.current?.(as(ee)))},[ee]);const q=o.useMemo(()=>as(ee),[ee]),Z=o.useRef(null),{toastMessage:z,toastKey:j,showWarning:F,clearToast:O}=Gi("warning"),G=o.useRef([]),ie=o.useCallback(()=>M?G.current.filter(W=>W!==null):Z.current?[Z.current]:[],[M]),{print:K,openNewWindow:pe}=hs({getElements:ie,paperW:aa[D.orientation].width,paperH:aa[D.orientation].height,fileName:b??"",header:y??"",onPopupBlocked:()=>F(B("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."))}),X=o.useMemo(()=>h?void 0:d?d({print:K,openNewWindow:pe}):b?[{label:B("wordTable.openNewWindow","\uC0C8 \uCC3D\uC73C\uB85C \uBCF4\uAE30"),variant:"default",onClick:()=>pe()},{label:B("wordTable.print","\uC778\uC1C4\uD558\uAE30"),variant:"default",onClick:()=>K()},...c??[]]:c,[h,d,b,c,B,K,pe]),H=o.useMemo(()=>h?h({print:K,openNewWindow:pe}):void 0,[h,K,pe]),ne=o.useRef(!1),V=o.useRef(K);return o.useEffect(()=>{V.current=K},[K]),o.useEffect(()=>{if(!C||ne.current)return;const W=window.setTimeout(()=>{ne.current=!0,V.current()},100);return()=>window.clearTimeout(W)},[C]),n.jsxs(Pn,{title:l??B("keyWords.title","\uC8FC\uC694 \uB2E8\uC5B4"),subtitle:i,size:"large",className:Be("word-table-popup",f),buttons:X,footer:H,footerClassName:p,footerLayout:m,beforeClose:A,onClose:x,children:[E.length>0?n.jsxs("div",{className:"word-table-popup__body",children:[v&&n.jsx(us,{sections:N,selected:$,onSelect:L}),M?n.jsx("div",{className:"word-table-popup__pages",children:U.map((W,oe)=>n.jsx(xa,{items:W,orientation:D.orientation,contentTypes:D.contentTypes,baseItem:a,baseContentTypes:r,cutLine:D.cutLine,showOutline:D.showOutline,showDivLine:D.showDivLine,count:D.count,contentRef:xe=>{G.current[oe]=xe},pageNumber:{current:oe+1,total:U.length},pageNumberPosition:P,brand:k&&{...k,top:D.showTopInfo,bottom:D.showBottomInfo},code:_,scoring:g,scoreIndexOffset:T[oe],marks:q,onMarkClick:I},oe))}):n.jsx("div",{className:"word-table-popup__table",children:n.jsx(xa,{items:E,orientation:D.orientation,contentTypes:D.contentTypes,baseItem:a,baseContentTypes:r,cutLine:D.cutLine,showOutline:D.showOutline,showDivLine:D.showDivLine,count:D.count,contentRef:Z,fitHeight:!0,scoring:g,marks:q,onMarkClick:I,brand:k&&{...k,top:D.showTopInfo,bottom:D.showBottomInfo},code:_})})]}):n.jsx("p",{className:"word-table-popup__empty body-3",children:u??B("keyWords.empty","\uCD94\uCD9C\uB41C \uC8FC\uC694 \uB2E8\uC5B4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}),n.jsx(va,{message:z,position:"top",onClose:O},j)]})}const e_=new Set(["x","triangle"]);function t_(e,t){const a=[];for(let r=0;r<e.length;r++){const s=t[String(r)];s&&e_.has(s)&&a.push(e[r])}return a}const n_=/\s*(?:(\d+)차\s*)?복습\s*\d{2}\.\d{2}$/;function Tc(e){const t=e.name.trim(),a=e.reviewRound;if(typeof a=="number"&&Number.isFinite(a)&&a>=0){const l=Math.floor(a);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 r=t,s=1;for(;;){const l=n_.exec(r);if(!l)break;s=Math.max(s,(l[1]?Number(l[1]):1)+1),r=r.slice(0,l.index).trim()}return{base:r,round:s}}function a_(e,t){const[,a,r]=po(t).split("-"),s=`${a}.${r}`,{base:l,round:i}=Tc(typeof e=="string"?{name:e}:e),u=i>=2?`${i}\uCC28 `:"";return`${l||"\uB2E8\uC5B4\uD45C"} ${u}\uBCF5\uC2B5 ${s}`}function r_(e){return{reviewOf:e.reviewOf??e.id??void 0,reviewRound:Tc(e).round}}function o_(e,t){const a={};for(const[r,s]of Object.entries(t)){if(s!=="o"&&s!=="triangle"&&s!=="x")continue;const l=Number(r),i=e[l];i&&(a[r]=i)}return a}function s_(e){return e.map(t=>t.label).join(" / ")}function l_(e){return e.map(t=>t.homonum!=null?`${t.label}#${t.homonum}`:t.label).join(" / ")}function Mc(e){return e.split(" / ").map(t=>t.replace(/#\d+$/,"")).join(" / ")}function i_(e,t,a){const r=Yl(a);return[e.trim(),r,t.trim()].filter(Boolean).join(" \xB7 ")}function Lc(e,t,a){return a===0?0:(e+t*.5)/a}function u_(e){const t=new Map,a=[...e].sort((s,l)=>s.scoredAt.localeCompare(l.scoredAt));for(const s of a)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 r=[];for(const[s,l]of t){const i=l.o+l.triangle+l.x;r.push({label:Mc(s),key:s,tried:i,o:l.o,triangle:l.triangle,x:l.x,rate:Lc(l.o,l.triangle,i),latest:l.latest,latestAt:l.latestAt})}return r.sort((s,l)=>s.rate-l.rate||l.tried-s.tried||fn(s.label,l.label)||fn(s.key??s.label,l.key??l.label)),r}function c_(e){const t=new Map;for(const r of e){const s=r.tableId??`name:${r.tableName}`,l=t.get(s)??{tableName:r.tableName,tableId:r.tableId,rows:[]};l.rows.push(r),t.set(s,l)}const a=[];for(const r of t.values()){const s=u=>Object.values(u.marks).filter(c=>c==="o"||c==="triangle"||c==="x").length,l=r.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),d=c.filter(p=>p==="o").length,h=c.filter(p=>p==="triangle").length;return Lc(d,h,s(u))});a.push({tableName:r.tableName,tableId:r.tableId,rates:i,times:l.map(u=>u.scoredAt),delta:i.length>=2?i[i.length-1]-i[0]:null})}return a.sort((r,s)=>(s.times[s.times.length-1]??"").localeCompare(r.times[r.times.length-1]??"")),a}function d_(e,t=8){return e.filter(a=>a.latest!=="o").slice(0,t)}function p_(e,t){if(e==null||t==null||e===""||t==="")return 0;if(typeof e=="number"&&typeof t=="number")return e-t;const a=String(e),r=String(t);return+(a>r)-+(a<r)}function h_(e){const t=new Map;let a=0,r=0;const s=e.map((i,u)=>({r:i,at:u})).sort((i,u)=>i.r.answeredAt.localeCompare(u.r.answeredAt)||p_(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){r++;continue}a++;const c=i.itemId?.trim()||u,d=`${i.trainingType}|${c}`,h=t.get(d)??{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 p=h.setIds.indexOf(i.setId);p>0&&h.setIds.splice(p,1),p!==0&&h.setIds.unshift(i.setId)}t.set(d,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||fn(i.title,u.title)),{items:l,counted:a,skippedNoTitle:r}}function m_(e,t=8){return e.filter(a=>!a.latestCorrect).slice(0,t)}function C_(e){const t=new Map;for(const r of e){const s=t.get(r.trainingType)??[];s.push(r),t.set(r.trainingType,s)}const a=[...t.entries()].map(([r,s])=>({trainingType:r,items:s,pending:s.filter(l=>!l.latestCorrect).length}));return a.sort((r,s)=>s.pending-r.pending||r.trainingType.localeCompare(s.trainingType)),a}const ms=["LISTEN_IN_NOISE","SHORT_STORY","LONG_STORY","ORDERING_SENTENCE"];function f_(e){const t=new Map;let a=0;for(const l of e){if(l.latestCorrect)continue;const i=l.setIds[0];if(!i){a++;continue}const u=`${l.trainingType}|${i}`,c=t.get(u)??{setId:i,trainingType:l.trainingType,pending:0};c.pending++,t.set(u,c)}const r=(l,i)=>i.pending-l.pending||l.trainingType.localeCompare(i.trainingType)||l.setId.localeCompare(i.setId),s=[...t.values()];return{sentence:s.filter(l=>ms.includes(l.trainingType)).sort(r),word:s.filter(l=>!ms.includes(l.trainingType)).sort(r),noSet:a}}function b_(e,t,a=5){const r=new Set(t);if(r.size===0)return[];const s=[];for(const l of e){const i=new Set,u=[];for(const c of l.cellLabels)r.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||fn(l.name,i.name)),s.slice(0,Math.max(0,a))}function g_(e,t){const a=new Set(e.flatMap(r=>r.covered));return t.filter(r=>!a.has(r))}function y_(e,t){const a=new Map;for(const s of e)for(const l of s.cells){const i=s.labelOf(l);a.has(i)||a.set(i,l)}const r=[];for(const s of t){const l=a.get(s);l!==void 0&&r.push(l)}return r}function Cs(e,t,a){return typeof e=="string"&&e?e:t.replace(/\{\{(\w+)\}\}/g,(r,s)=>String(a[s]))}function v_(e,t){const a=Number.isFinite(e)?Math.round(e):0;if(!a||a<=0)return"-";const r=Math.floor(a/60),s=a%60;return t?t(r,s):r>0&&s>0?Cs(Kt.t("customers.duration.minSec",{m:r,s,defaultValue:"{{m}}\uBD84 {{s}}\uCD08"}),"{{m}}\uBD84 {{s}}\uCD08",{m:r,s}):r>0?Cs(Kt.t("customers.duration.min",{m:r,defaultValue:"{{m}}\uBD84"}),"{{m}}\uBD84",{m:r}):Cs(Kt.t("customers.duration.sec",{s,defaultValue:"{{s}}\uCD08"}),"{{s}}\uCD08",{s})}function __(e,t){const a=[],r=new Set;for(const s of e){const l=t(s);r.has(l)||(r.add(l),a.push({key:l,value:s,pinned:!1}))}return a}function x_(e,t){return e.map(a=>a.key===t?{...a,pinned:!a.pinned}:a)}function w_(e,t){return e.filter(a=>a.key!==t)}function B_(e,t,a){const r=e.filter(d=>d.pinned),s=new Set(r.map(d=>d.key)),l=e.length-r.length,i=[],u=new Set(s);for(const d of t){if(i.length>=l)break;const h=a(d);u.has(h)||(u.add(h),i.push({key:h,value:d,pinned:!1}))}const c=[...i];return e.map(d=>d.pinned?d:c.shift()).filter(d=>d!==void 0)}function k_(e){return e.map(t=>t.value)}function A_(e){const{category:t={},isSelected:a=!1,onClick:r}=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${a?" icon-grid-menu__button--selected":""}`,"data-key":t?.key,type:"button",onClick:a?void 0:r,"aria-pressed":a,"aria-labelledby":l,children:n.jsx(ot,{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 N_(e){const{categories:t=[],selected:a,onSelect:r,size:s="medium"}=e||{},l=a!==void 0,[i,u]=o.useState(()=>l?null:(t&&t[0]?.key)??null),c=l?a:i,d=o.useRef(r);o.useEffect(()=>{d.current=r});const h=o.useRef(!1),p=(t&&t[0]?.key)??null;o.useEffect(()=>{if(l||h.current||!p)return;h.current=!0;const b=i??p;i==null&&u(b),d.current?.(b)},[l,p]);const m=o.useCallback(b=>{const v=c===b?null:b;h.current=!0,l||u(v),r?.(v)},[c,l,r]);return n.jsx("div",{className:`icon-grid-menu icon-grid-menu--${s}`,children:(t||[]).map(b=>n.jsx(A_,{category:b,isSelected:c===b.key,onClick:()=>m(b.key)},b.key))})}function E_({subs:e=[],selected:t,onSelect:a,size:r="medium"}){const s=r==="small"?32:40;return n.jsx("div",{className:`choice-chips choice-chips--${r}`,children:n.jsx("div",{className:"choice-chips__list",children:e.map(l=>n.jsx(fe,{htmlType:"button",size:s,type:"bar",label:l.label,selected:t===l.key,className:"choice-chips__button",onClick:()=>a?.(l.key)},l.key))})})}function D_({onTermsClick:e,onPrivacyClick:t,contact:a}={}){const r=a?.email??"support@ihab.co.kr",s=a?.tel??"031-380-3724",{t:l}=_e.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
1041
1041
  \uC2E0\uB8B0\uB97C \uC313\uACE0
1042
1042
  \uD68C\uBCF5\uC744 \uB3D5\uC2B5\uB2C8\uB2E4.`).split(`
1043
- `).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:$o,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:[r," \xA0 ",s]})]})]})]}),n.jsx("div",{className:"site-footer__copyright footer-copyright caption-1",children:"\xA9 IHAB, Inc. All rights reserved."})]})})}function S_({logo:e,logoAlt:t="",logoHref:a,links:r=[],actions:s,className:l,containerClassName:i,renderLink:u,menuLabel:c}){const{t:d}=_e.useTranslation(),h=c??{open:d("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),close:d("header.menuClose","\uBA54\uB274 \uB2EB\uAE30")},[p,m]=o.useState(!1),g=o.useId(),y=o.useRef(null);o.useEffect(()=>{if(!p)return;const _=Qn(()=>{const v=document.getElementById(g);v&&v.contains(document.activeElement)&&y.current?.focus(),m(!1)}),b=typeof window<"u"&&window.matchMedia?window.matchMedia("(min-width: 961px)"):null,w=v=>{v.matches&&m(!1)};return b&&(b.matches&&m(!1),b.addEventListener?.("change",w)),()=>{_(),b?.removeEventListener?.("change",w)}},[p,g]);const C=i?`${i} landing-header__inner`:"landing-header__inner",f=(_,b)=>u?u(_,{onClick:b}):n.jsx("a",{href:_.href,onClick:b,"aria-current":_.current?"page":void 0,children:_.label});return n.jsxs("header",{className:l?`landing-header ${l}`:"landing-header",children:[n.jsxs("div",{className:C,children:[e!=null&&(()=>{const _=typeof e=="string"?n.jsx("img",{src:e,alt:t,className:"landing-header__logo"}):e;return a?n.jsx("a",{href:a,className:"landing-header__brand",children:_}):n.jsx("div",{className:"landing-header__brand",children:_})})(),r.length>0&&n.jsx("nav",{className:"landing-header__links",children:r.map((_,b)=>n.jsx("span",{children:f(_)},`${b}:${_.href}`))}),n.jsxs("div",{className:"landing-header__actions",children:[s,r.length>0&&n.jsx("button",{ref:y,type:"button",onClick:()=>m(_=>!_),"aria-expanded":p,"aria-controls":g,"aria-label":p?h.close:h.open,className:p?"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",{})]})})]})]}),r.length>0&&n.jsx("nav",{id:g,hidden:!p,className:"landing-header__drawer",children:n.jsx("div",{className:i??void 0,children:r.map((_,b)=>n.jsx("span",{className:"landing-header__drawer-item",children:f(_,()=>m(!1))},`${b}:${_.href}`))})})]})}function j_({children:e,action:t,onClick:a,className:r}){const s=a?"bottom-sticky__inner bottom-sticky__inner--clickable":"bottom-sticky__inner";return n.jsx("div",{className:r?`bottom-sticky ${r}`:"bottom-sticky",children:n.jsxs("div",{className:s,onClick:a,...tc(a),children:[n.jsx("div",{className:"bottom-sticky__content",children:e}),t]})})}function T_({mountedRef:e}){const t=o.useRef({phase:"sound",at:0}),a=o.useRef(0),r=o.useRef(null),s=o.useRef(null),l=o.useCallback(()=>{const C=t.current,f=C.phase!=="sound"&&C.at>0;s.current=f?{phase:C.phase,elapsed:Math.max(0,Date.now()-C.at)}:null},[]),i=o.useCallback(()=>{const C=s.current;return s.current=null,C},[]),u=o.useCallback(()=>{a.current+=1,t.current={phase:"sound",at:0}},[]),c=o.useCallback((C,f,_=0)=>{if(!(C>0))return Promise.resolve(!0);const b=a.current;return t.current={phase:f,at:Date.now()-Math.max(0,_)},new Promise(w=>{const v=setTimeout(()=>{r.current===v&&(r.current=null),w(!!e.current&&b===a.current)},C);r.current=v})},[e]),d=o.useCallback(()=>{t.current={phase:"sound",at:Date.now()}},[]),h=o.useCallback(()=>{t.current={phase:"sound",at:0}},[]),p=o.useCallback(()=>{const C=t.current;return C.phase!=="sound"&&C.at>0},[]),m=o.useCallback(()=>a.current,[]),g=o.useCallback(C=>C===a.current,[]),y=o.useCallback(()=>{a.current+=1},[]);return o.useEffect(()=>()=>{r.current&&(clearTimeout(r.current),r.current=null)},[]),o.useMemo(()=>({positionRef:t,isRunning:p,generation:m,isCurrent:g,abort:u,waitPad:c,enterSound:d,leave:h,pause:l,resume:i,__bumpGenerationForTest:y}),[p,m,g,u,c,d,h,l,i,y])}const Ba=9,M_=e=>Math.round(Math.min(Ba,Math.max(0,e))/Ba*100),L_=e=>e/100*Ba,ar=2,$c=.1,$_=e=>Math.min(ar,Math.max(0,e)),R_=.1,P_=e=>Math.round(e*1e6)/1e6;function rr(e){const{noiseRatio:t}=e;if(typeof t=="number"&&Number.isFinite(t))return $_(t);const a=Math.min(Ba,Math.max(0,Number(e.level)||0))/Ba,r=Number(e.mainVolume);return r>0?a>0?P_(Math.min(ar,Math.max(R_,a/r))):0:1}const Rc=e=>Math.min(1,Math.max(0,Number(e.mainVolume)||0));function Pc(e){return Rc(e)}function fs(e){return Rc(e)*rr(e)}function bs(e,t=W1()){const a=Number.isFinite(t)&&t>0?t:1;return Math.min(1,fs(e)/a)}function ra(e,t){const a={...e,...t??{}};return t&&"level"in t&&typeof t.noiseRatio!="number"&&(a.noiseRatio=rr({level:a.level,mainVolume:a.mainVolume})),a}const oa={enabled:!0,type:"defaultNoise",level:4.5,noiseRatio:1,speed:1,mainVolume:1,mainSpeed:1},gs=o.createContext(null);function Er(){return o.useContext(gs)}const ys=e=>`${z1()}/${e}`,Fc=e=>Array.from({length:10},(t,a)=>ys(`${e}-${String(a+1).padStart(2,"0")}.mp3`)),Dr={get defaultNoise(){return ys("noise1.mp3")},get street(){return Fc("noise2")},get restaurant(){return Fc("noise3")},get buzz(){return ys("noise4.mp3")}};function F_(e){const t=Math.floor(Math.random()*10);switch(e){case"defaultNoise":return Dr.defaultNoise;case"street":return Dr.street[t];case"restaurant":return Dr.restaurant[t];case"buzz":return Dr.buzz;default:return null}}function I_({noisePlayer:e,audioRef:t,playbackStateRef:a,sequencer:r}){const s=o.useRef(e?.registerAnalyser);s.current=e?.registerAnalyser;const l=o.useRef(null),[i,u]=o.useState(null),c=o.useRef(null),d=o.useRef(null),h=o.useRef(null),p=o.useRef(null),m=o.useRef(0),g=o.useRef(null),y=o.useCallback(()=>!!r?.isRunning(),[r]),C=o.useCallback(()=>{p.current!==null&&(cancelAnimationFrame(p.current),p.current=null),g.current!==null&&(clearTimeout(g.current),g.current=null)},[]),f=o.useCallback((k,x=250)=>{const A=l.current;if(!A)return;const B=d.current;if(B){d.current=null;try{A.pause()}catch{}A.src=B,A.load()}if(!A.src)return;m.current+=1,C();try{oo(),lr(A).then($=>{if(l.current===A)try{s.current?.("noise",$)}catch{}})}catch{}const E=A.paused?0:ir(A);A.paused&&Vn(A,0),A.play().catch(()=>{});const D=performance.now(),N=()=>{const $=Math.min(1,(performance.now()-D)/x);try{Vn(A,E+(k-E)*$)}catch{}$<1?p.current=requestAnimationFrame(N):p.current=null};p.current=requestAnimationFrame(N)},[C]),_=o.useCallback((k=250,x)=>{const A=l.current;if(!A||A.paused){x?.();return}const B=++m.current;C();const E=performance.now(),D=ir(A),N=()=>{const $=Math.min(1,(performance.now()-E)/k);try{Vn(A,D*(1-$))}catch{}if($<1)p.current=requestAnimationFrame(N);else{p.current=null,g.current!==null&&(clearTimeout(g.current),g.current=null);try{A.pause()}catch{}x?.()}};p.current=requestAnimationFrame(N),g.current=setTimeout(()=>{if(g.current=null,m.current===B){p.current!==null&&(cancelAnimationFrame(p.current),p.current=null);try{A.paused||(Vn(A,0),A.pause(),x?.())}catch{}}},k+150)},[C]);o.useEffect(()=>{const k=document.createElement("audio");return k.loop=!0,k.crossOrigin="anonymous",l.current=k,()=>{C();try{k.pause(),k.removeAttribute("src"),k.load()}catch{}l.current=null,c.current=null,d.current=null}},[C]);const b=e?bs(e.settings):0,w=!!e?.settings.enabled&&b>0;o.useEffect(()=>{if(!w)return;let k=0;const x=setInterval(()=>{const A=l.current;if(!A||A.paused){k=0;return}const B=t.current;if(B&&!B.paused&&!B.ended||y()||a.current==="playing"){k=0;return}k+=1,k>=2&&(k=0,_())},400);return()=>clearInterval(x)},[_,w,t,a,y]),o.useEffect(()=>{const k=()=>{const x=l.current;if(document.hidden){if(x&&!x.paused){C();try{x.pause()}catch{}}return}if(!x||!x.paused)return;const A=t.current,B=!!A&&!A.paused&&!A.ended||y()||a.current==="playing",E=h.current;B&&E?.enabled&&E.volume>0&&f(E.volume)};return document.addEventListener("visibilitychange",k),()=>document.removeEventListener("visibilitychange",k)},[C,f,t,a,y]),o.useEffect(()=>{h.current=e?{enabled:e.settings.enabled,volume:b,type:e.settings.type}:null},[e,e?.settings.enabled,b,e?.settings.type]);const v=o.useRef(null);return o.useEffect(()=>()=>{v.current?.(),v.current=null},[]),o.useEffect(()=>{const k=e?.settings,x=l.current;if(!x)return;const A=k?bs(k):0;if(!k||!k.enabled||A===0){_();return}if(c.current!==k.type){const B=F_(k.type);B&&(c.current=k.type,u(B),d.current=B,_(150,()=>{if(d.current!==B)return;d.current=null,x.src=B,x.load();const E=t.current;if(E&&!E.paused||y()){v.current?.();const D=()=>{x.removeEventListener("canplay",D),v.current===N&&(v.current=null);const $=t.current,L=h.current;($&&!$.paused&&!$.ended||y())&&L?.enabled&&L.volume>0&&f(L.volume)},N=()=>x.removeEventListener("canplay",D);v.current=N,x.addEventListener("canplay",D)}}))}else{const B=t.current,E=!!B&&!B.paused&&!B.ended||y()||a.current==="playing";if(E&&d.current)f(A);else if(E&&x.paused&&x.src)f(A);else if(!x.paused)if(!E)_();else{C();const D=ir(x),N=performance.now(),$=()=>{const L=Math.min(1,(performance.now()-N)/150);try{Vn(x,D+(A-D)*L)}catch{}L<1?p.current=requestAnimationFrame($):p.current=null};p.current=requestAnimationFrame($)}}},[e?.settings,e?.settings.enabled,b,e?.settings.type,C,f,_,t,a,h,y]),o.useEffect(()=>{const k=l.current;if(k)try{k.playbackRate=Math.min(1.25,Math.max(.75,e?.settings.speed??1))}catch{}},[e?.settings.speed]),{noiseAudioRef:l,activeNoiseUrl:i,noiseSettingsRef:h,cancelNoiseFade:C,fadeInNoise:f,fadeOutNoise:_}}function O_({ttsText:e,playbackRate:t,mainVolume:a,fillRef:r,waveProgressRef:s,setProgress:l,setPlaybackState:i,setStateLocal:u,fadeInNoise:c,fadeOutNoise:d,noiseSettingsRef:h,onDoneRef:p,handleEndRef:m}){const g=o.useRef(null),y=o.useRef(0),C=o.useRef(null),f=o.useRef(0),_=o.useRef(!1);o.useEffect(()=>()=>{f.current++;try{if(C.current&&(cancelAnimationFrame(C.current),C.current=null),_.current&&window.speechSynthesis){try{window.speechSynthesis.cancel()}catch{}_.current=!1}}catch{}},[]);const b=(k,x=1)=>{try{const A=(k||"").trim().split(/\s+/).filter(Boolean).length||Math.max(1,(k||"").length);return Math.max(700,Math.round(A*300/Math.max(.25,x)))}catch{return 1200}},w=o.useCallback(k=>{if(typeof window>"u"||!window.speechSynthesis){try{typeof p.current=="function"&&p.current(!1)}catch{}return}const x=window.speechSynthesis,A=++f.current;try{try{x.cancel()}catch{}const B=k??e,E=Array.isArray(B)?B.filter(M=>!!M):[B||""];E.length===0&&E.push("");const D=Math.max(.3,Math.min(3,t));y.current=E.reduce((M,P)=>M+b(P,D||1),0),g.current=performance.now(),l(0),i("playing"),u("playMode");const N=h.current;N?.enabled&&(N?.volume??0)>0&&c(N.volume);const $=()=>{try{const M=g.current||performance.now(),P=performance.now()-M,T=y.current||1200,ee=Math.min(1,P/T);try{r.current&&(r.current.style.left=`${ee*100}%`),s.current&&s.current.style.setProperty("--progress",String(ee))}catch{}ee<1&&(C.current=requestAnimationFrame($))}catch{}},L=()=>{if(A===f.current)try{C.current&&(cancelAnimationFrame(C.current),C.current=null),l(1),i("stopped");try{m.current?.()}catch{try{typeof p.current=="function"&&p.current(!0)}catch{}}}catch{}},U=M=>{const P=new SpeechSynthesisUtterance(E[M]);try{P.rate=D}catch{}try{P.volume=Math.max(0,Math.min(1,a))}catch{}P.onend=()=>{if(A===f.current){if(M<E.length-1){try{U(M+1)}catch{L()}return}L()}},P.onerror=()=>{L()},P.onstart=()=>{if(!(M>0))try{C.current&&(cancelAnimationFrame(C.current),C.current=null),C.current=requestAnimationFrame($)}catch{}},_.current=!0,x.speak(P)};try{U(0)}catch{try{typeof p.current=="function"&&p.current(!0)}catch{}}}catch{try{typeof p.current=="function"&&p.current(!0)}catch{}}},[e,t,a,c,r,s,l,i,u,h,p,m]),v=o.useCallback(()=>{f.current++;try{if(window.speechSynthesis)try{window.speechSynthesis.cancel()}catch{}C.current&&(cancelAnimationFrame(C.current),C.current=null),d(),g.current=null}catch{}i("stopped"),u("active"),l(0)},[d,i,u,l]);return{startTTS:w,stopTTS:v}}const z_=.01,W_=.3;async function H_(e,t,a,r=!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(r){const g=Math.floor(W_*i.sampleRate),y=Math.min(u.length,g);for(;c<y&&Math.abs(u[c])<=z_;)c++;c>=y&&(c=0)}const d=u.length-c,h=a&&a>0?Math.min(d,Math.floor(a*i.sampleRate)):d,p=Math.max(t,h),m=Math.floor(p/t)||1;return new Array(t).fill(0).map((g,y)=>{const C=c+y*m,f=Math.min(C+m,c+p,u.length);let _=0;for(let b=C;b<f;b++){const w=Math.abs(u[b]);w>_&&(_=w)}return _})}catch{return null}finally{try{s?.close?.()}catch{}}}async function Ic(e,t,a,r=!1){try{const s=await fetch(e);if(s.ok===!1)return null;const l=await s.arrayBuffer();return await H_(l,t,a,r)}catch(s){try{const l=zl(s)}catch{}return null}}const vs=45,V_=74,q_=2;function Sr(e){const t=Math.min(2,Math.max(0,Number(e)||0));return t<=1?t*45:45+(t-1)*29}function jr(e){return Sr(e)/45}const U_=e=>Math.max(0,(typeof e=="number"&&Number.isFinite(e)?e:0)*1e3),Oc=e=>Math.max(0,typeof e=="number"&&Number.isFinite(e)?e:0);function zc({durationsSec:e,leadInMs:t=0,tailMs:a=0}){const r=Oc(t),s=Oc(a),l=[];let i=0;return e.forEach((u,c)=>{for(const[d,h]of[["lead",r],["sound",U_(u)],["tail",s]])l.push({kind:d,track:c,startMs:i,durMs:h}),i+=h}),{segments:l,totalMs:i,trackCount:e.length}}function Wc(e,t){const a=(t|0)*3;if(t<0||a+2>=e.segments.length)return null;const[r,s,l]=[e.segments[a],e.segments[a+1],e.segments[a+2]];return{lead:r,sound:s,tail:l,totalMs:r.durMs+s.durMs+l.durMs}}function G_(e,t){const a=Wc(e,t.track);if(!a||!(a.totalMs>0))return 0;const r=a[t.kind],s=Math.min(Math.max(0,Number.isFinite(t.elapsedMs)?t.elapsedMs:0),r.durMs);return Math.max(0,Math.min(1,(r.startMs-a.lead.startMs+s)/a.totalMs))}function K_(e,t,a){const r=Math.max(0,Math.floor(a)),s=Wc(e,t);if(!s||r===0||!(s.totalMs>0)||s.lead.durMs===0&&s.tail.durMs===0||!(s.sound.durMs>0))return{lead:0,sound:r,tail:0};const l=Math.round(s.lead.durMs/s.totalMs*r),i=Math.round(s.tail.durMs/s.totalMs*r),u=Math.max(1,r-l-i),c=l+u+i-r;return{lead:Math.max(0,l-Math.ceil(c/2)),sound:u,tail:Math.max(0,i-Math.floor(c/2))}}function Y_({currentTime:e,sources:t,index:a,audioDuration:r}){const s=a||0,l=Array.isArray(t)&&t.length>0?t[s]:void 0,i=l?l.duration||r||0:r||0;if(!(i>0))return 0;const u=Number.isFinite(e)?e:0;return Math.max(0,Math.min(1,u/i))}function Z_({phase:e,phaseElapsedMs:t,currentTime:a,trackDurationSec:r,leadInMs:s,tailMs:l}){const i=zc({durationsSec:[r],leadInMs:s,tailMs:l});return G_(i,{track:0,kind:e,elapsedMs:e==="sound"?(Number.isFinite(a)?a:0)*1e3:t})}function X_({bars:e,trackDurationSec:t,leadInMs:a,tailMs:r}){return K_(zc({durationsSec:[t],leadInMs:a,tailMs:r}),0,e)}function J_(e,t){if(!Array.isArray(e))return null;const a=t||0;return a<e.length-1?a+1:null}function Q_({ended:e,completedByEnd:t}){return!!e||!!t}function ex(e){return e.map((t,a)=>({src:t.src,label:String(a+1),color:void 0,duration:t.duration||0}))}function tx(e){return e.reduce((t,a)=>t+(a.duration||0),0)}function nx(e,t,a){const r=Array.isArray(e)?e:e?[e]:[],s=[];for(const l of r)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=a(i,t);u&&s.push({code:i,resolvedPath:u})}}return s}function ax(e,t){if(!t||e.readyState<1)return!0;const a=e.currentSrc||e.src;return a?Hc(a)!==Hc(t):!0}function Hc(e){try{return new URL(e,typeof location>"u"?"http://localhost/":location.href).href}catch{return e}}const Vc=4,rx=jr(Vc/vs);function ox(e){const{src:t,segments:a,progress:r=0,waveProgressRef:s,noiseSrc:l,noiseRatio:i=0,noiseSpeed:u=1,totalDuration:c=0,mainVolume:d=1,onReadyChange:h,showSoundWaveForm:p=!0,leadInMs:m=0,tailMs:g=0,trackDurationSec:y=0}=e,C=o.useRef(null),f=o.useRef(null),[_,b]=o.useState(null),[w,v]=o.useState(!1),[k,x]=o.useState(null),[A,B]=o.useState(2),[E,D]=o.useState(0),[N,$]=o.useState(null),[L,U]=o.useState(!1),[M,P]=o.useState(!1),T=3,ee=3,te=1,I=300,Y=o.useRef(0),R=o.useCallback(()=>{const be=C.current,me=f&&f.current?f.current:be?be.closest(".audio-player__wave"):null,ke=me?me.getBoundingClientRect():be?be.getBoundingClientRect():null,Le=ke?ke.width:0,Me=ke?Math.max(100,ke.width):320,le=ke?ke.height:0,ve=Math.max(te,Math.min(I,Math.floor((Me+ee)/(T+ee)))),$e=ve*T,Ae=Math.max(0,ve-1),Ie=Math.max(0,Ae>0?(Me-$e)/Ae:ee);return{bars:ve,gap:Ie,height:le,width:Le}},[]),q=o.useRef(void 0),Z=o.useRef(null),z=o.useCallback(async(be,me,{quiet:ke=!1}={})=>{const Le=++Y.current,Me=()=>Y.current===Le;try{if(ke||v(!1),q.current=be,!be){Me()&&b(null);return}let le=me;if(!le)try{for(let Ae=0;Ae<4&&!(C.current||f.current);Ae++)await new Promise(Ie=>requestAnimationFrame(Ie));await new Promise(Ae=>requestAnimationFrame(Ae));const $e=R();$e.height>0&&D($e.height),le=$e.bars,B($e.gap)}catch{le=120}Z.current=le;const ve=await Ic(be,le);if(!Me())return;if(!ve){b(null),v(!1);return}b(ve),x(le),v(!0)}catch{if(!Me())return;b(null),v(!1)}},[v,b,D,B,x,R]);o.useEffect(()=>{const be=f.current;if(!be||typeof ResizeObserver>"u")return;let me=null;const ke=new ResizeObserver(()=>{me!==null&&cancelAnimationFrame(me),me=requestAnimationFrame(()=>{me=null;try{const Le=R();if(Le.width<=0||(Le.height>0&&D(Le.height),Z.current===null||Le.bars===Z.current))return;const Me=q.current;B(Le.gap),Me?z(Me,Le.bars,{quiet:!0}).catch(()=>{}):Z.current=Le.bars}catch{}})});return ke.observe(be),()=>{ke.disconnect(),me!==null&&cancelAnimationFrame(me)}},[R,z]),o.useEffect(()=>{const be=a&&a[0]&&a[0].src||t||a&&a.length===1&&a[0]&&a[0].src;z(typeof be=="string"?be:void 0).catch(()=>{}),P(!1)},[t,a,z]),o.useEffect(()=>{let be=!1;if(U(!1),$(null),!l||!k)return;const me=c>0?c*(u||1):void 0;return Ic(l,k,me,!0).then(ke=>{be||($(ke),ke||U(!0))}).catch(()=>{be||($(null),U(!0))}),()=>{be=!0}},[l,k,c,u]);const j=Math.max(0,Math.min(1,d)),F=o.useMemo(()=>_&&_.length&&Math.max(..._)||1,[_]),O=k||40,G=o.useMemo(()=>X_({bars:O,trackDurationSec:y,leadInMs:m,tailMs:g}),[O,y,m,g]),ie=o.useMemo(()=>Array.from({length:O}).map((be,me)=>{const ke=me>=G.lead&&me<G.lead+G.sound,Le=G.sound>0&&ke?Math.min(O-1,Math.round((me-G.lead)/G.sound*O)):-1,Me=ke?_&&_[Le]!=null?_[Le]:null:_?0:null,le=Me==null?null:Math.min(1,Me/F*j),ve=le!=null&&E>0&&Sr(le)<=Vc,$e=le==null?.15:ve?0:jr(le),Ae=ve,Ie=O>1?me/(O-1):0;return n.jsx("div",{className:Ae?"audio-player__bar audio-player__bar--hidden":"audio-player__bar",style:{"--val":$e,"--i":me,"--mix":Ie}},me)}),[O,_,F,j,E,G]),K={"--progress":String(Math.max(0,Math.min(1,r)))},pe=o.useMemo(()=>N&&N.length&&Math.max(...N.map(be=>Number.isFinite(be)?Math.abs(be):0))||1,[N]),X=j*Math.max(0,i),H=!l||!N||!N.length?1:Math.max(1,X),ne={"--bar-gap":`${A}px`,"--wave-h":`${Sr(H)}px`,"--wave-h1":`${vs}px`},V=w&&(l?!!N||L:!0);o.useEffect(()=>{V&&P(!0)},[V]);const W=M?w:V;o.useEffect(()=>{h?.(W)},[W,h]);const oe=k||40,xe=o.useMemo(()=>Array.from({length:oe}).map((be,me)=>{const ke=N&&N[me]!=null?N[me]:null,Le=ke==null?0:Math.abs(ke)/pe*X,Me=Math.max(rx,jr(Le)),le=oe>1?me/(oe-1):0;return n.jsx("div",{className:"audio-player__bar",style:{"--val":Me,"--i":me,"--mix":le}},me)}),[oe,N,pe,X,E]);return n.jsxs("div",{className:"audio-player__wave",ref:f,style:ne,children:[l&&n.jsx("div",{className:`audio-player__wave-noise ${V?"is-ready":""}`,"aria-hidden":"true",children:xe}),p&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:`audio-player__wave-inner audio-player__wave-unplayed ${W?"is-ready":""}`,ref:C,children:ie}),n.jsx("div",{className:`audio-player__wave-inner audio-player__wave-played ${W?"is-ready":""}`,ref:s,style:K,children:ie})]})]})}const qc={idle:!1,synthesizing:!0,resolving:!0,checking_exists:!0,getting_signed_url:!0,downloading:!0,measuring_duration:!0,ready:!1,error:!0};function _s(e,t){return new Promise((a,r)=>{const s=document.createElement("audio");let l=!1;const i=()=>{try{s.removeAttribute("src"),s.load()}catch{}},u=()=>{if(l)return;l=!0;const d=isFinite(s.duration)&&s.duration||0;i(),a(d)},c=d=>{l||(l=!0,i(),t.rejectOnError?r(new Error(d)):a(0))};s.addEventListener("loadedmetadata",u),s.addEventListener("error",()=>c("audio load failed")),setTimeout(()=>c("audio load timeout"),t.timeoutMs),s.src=e})}const sx=2e3;function Uc(e,t=sx){return new Promise(a=>{let r=!1;const s=()=>{r||(r=!0,a())};e.addEventListener("canplay",s,{once:!0}),e.addEventListener("error",s,{once:!0}),setTimeout(s,t)})}function lx({showSoundWaveForm:e,showNoiseWaveForm:t,timeoutMs:a=2500}){const r=o.useRef(!1),s=o.useRef([]),l=o.useCallback(c=>{if(r.current=c,!c||!s.current.length)return;const d=s.current;s.current=[];for(const h of d)h(!0)},[]),i=o.useCallback(()=>{r.current=!1},[]),u=o.useCallback(()=>!e&&!t||r.current?Promise.resolve(!0):new Promise(c=>{const d=p=>{clearTimeout(h),s.current=s.current.filter(m=>m!==d),c(p)},h=setTimeout(()=>d(!0),a);s.current.push(d)}),[e,t,a]);return o.useEffect(()=>()=>{const c=s.current;s.current=[];for(const d of c)d(!1)},[]),{onReadyChange:l,waitForReady:u,markNotReady:i}}function ix(){const e=o.useRef([]),t=o.useCallback(s=>(e.current.push(s),s),[]),a=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})},[]),r=o.useCallback(()=>{a([])},[a]);return o.useEffect(()=>()=>{for(const s of e.current)try{URL.revokeObjectURL(s)}catch{}e.current=[]},[]),{track:t,keepOnly:a,revokeAll:r}}function ux({offsetY:e=8}={}){const t=o.useRef(null),[a,r]=o.useState(null),s=o.useCallback(()=>r(null),[]),l=o.useCallback(()=>{try{const i=t.current?.getBoundingClientRect();if(!i)return;r({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(a)return document.addEventListener("mousedown",s),()=>document.removeEventListener("mousedown",s)},[a,s]),{ref:t,rect:a,show:l,hide:s}}function cx(e){if(!e)return 0;const t=e.duration;if(Number.isFinite(t)&&t>0)return t;if(t===0)return 0;try{const a=e.seekable;if(a&&a.length>0){const r=a.end(a.length-1);if(Number.isFinite(r)&&r>0)return r}}catch{}return null}const dx=400,px=2e3,Gc=5;function hx({audioRef:e,fillRef:t,waveProgressRef:a,sourcesRef:r,currentIndexRef:s,sequencer:l,leadInMs:i=0,tailMs:u=0}){const c=o.useRef(null),d=o.useRef(0),h=o.useRef(null),p=o.useCallback(()=>{c.current!==null&&(cancelAnimationFrame(c.current),c.current=null)},[]),m=o.useCallback(()=>{if(c.current!==null)return;let y=0;const C=()=>{if(zn){const f=typeof performance<"u"&&performance.now?performance.now():Date.now();if(y>0&&f-y>dx){const _=h.current===null||f-h.current>px;if(h.current=f,_&&d.current<Gc){d.current+=1;const b=d.current;let w=null;try{w=typeof document<"u"?document.visibilityState:null}catch{}At(`progress-ticker-slow-frames#${b}`,`[ihab-core] \uC9C4\uD589 \uC0AC\uC2AC\uC758 \uD2C0 \uC0AC\uC774\uAC00 ${Math.round(f-y)}ms \uC785\uB2C8\uB2E4(\uBCF4\uD1B5 16ms).`,w==="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.",b>=Gc?`(${b}\uBC88\uC9F8 \u2014 \uB354\uB294 \uC548 \uC54C\uB9BD\uB2C8\uB2E4)`:`(${b}\uBC88\uC9F8)`)}}y=f}try{const f=e.current,_=Array.isArray(r.current)?r.current[s.current||0]:void 0,b=!!_&&Number.isFinite(_.duration)&&(_.duration??0)>0,w=b?0:cx(f),v=t.current,k=(i||0)>0||(u||0)>0,x=k&&(l?.positionRef.current?.phase??"sound")!=="sound";if(w===null&&!x)try{v&&v.style.visibility!=="hidden"&&(v.style.visibility="hidden")}catch{}else{const A=b?_.duration:w||0;zn&&x&&!(A>0)&&At("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 B=k?Z_({phase:l?.positionRef.current?.phase??"sound",phaseElapsedMs:l?.positionRef.current?Math.max(0,Date.now()-l.positionRef.current.at):0,currentTime:f&&typeof f.currentTime=="number"?f.currentTime:0,trackDurationSec:A,leadInMs:i||0,tailMs:u||0}):Y_({currentTime:f&&typeof f.currentTime=="number"?f.currentTime:0,sources:r.current,index:s.current,audioDuration:w??0});try{v&&(v.style.visibility&&(v.style.visibility=""),v.style.left=`${B*100}%`)}catch{}try{a.current?.style.setProperty("--progress",String(B))}catch{}}}catch{}c.current=requestAnimationFrame(C)};c.current=requestAnimationFrame(C)},[e,t,a,r,s,l,i,u]),g=o.useCallback(y=>{p();try{t.current&&(t.current.style.visibility="",t.current.style.left=`${y*100}%`)}catch{}try{a.current?.style.setProperty("--progress",String(y))}catch{}},[p,t,a]);return o.useEffect(()=>p,[p]),{start:m,stop:p,settleTo:g}}function xs({btnLabel:e,soundSrc:t,bucketPath:a,onDone:r,disabled:s=!1,ttsText:l=null,className:i,showSoundWaveForm:u=!0,showNoiseWaveForm:c=!0,leadInMs:d=0,tailMs:h=0}){const{t:p}=_e.useTranslation(),m=e,g=Er(),y=o.useRef(g?.registerAnalyser);o.useEffect(()=>{y.current=g?.registerAnalyser});const C=o.useRef(null),f=o.useRef(null),_=o.useRef(null),b=ix(),w=o.useRef(null),v=o.useRef(!1),k=o.useRef(null),{ref:x,rect:A,show:B,hide:E}=ux();o.useEffect(()=>()=>{y.current?.("main",null),y.current?.("noise",null)},[]);const[D,N]=o.useState(!1),[$,L]=o.useState("idle"),[U,M]=o.useState("stopped"),P=o.useRef("stopped");o.useEffect(()=>{P.current=U},[U]);const[T,ee]=o.useState(0),[te,I]=o.useState("active"),Y=o.useRef(!1);o.useEffect(()=>{if(te!=="playMode"||!Y.current)return;Y.current=!1;const J=typeof document<"u"?document.activeElement:null;if(J&&J!==document.body)return;const ce=_.current?.querySelectorAll("button")[1];try{ce?.focus()}catch{}},[te]);const[R,q]=o.useState(null),[Z,z]=o.useState(null),[j,F]=o.useState(0),[O,G]=o.useState(!1),[ie,K]=o.useState(0),pe=g?.playbackRate??1,X=g?.mainVolume??1,H=g?fs(g.settings):0,ne=g?Pc(g.settings):X,[V,W]=o.useState("idle"),[oe,xe]=o.useState(""),[be]=o.useState("top"),me=o.useRef(null),ke=o.useRef(0),Le=o.useRef(null),Me=o.useRef(!0),le=T_({mountedRef:Me}),ve=o.useRef(null),$e=o.useRef(d),Ae=o.useRef(h);o.useEffect(()=>{$e.current=Math.max(0,d||0)},[d]),o.useEffect(()=>{Ae.current=Math.max(0,h||0)},[h]);const{start:Ie,stop:ze,settleTo:dt}=hx({audioRef:C,fillRef:f,waveProgressRef:Le,sourcesRef:me,currentIndexRef:ke,sequencer:le,leadInMs:d,tailMs:h}),{onReadyChange:st,waitForReady:et,markNotReady:gt}=lx({showSoundWaveForm:u,showNoiseWaveForm:c}),Se=o.useRef(null),Ge=o.useRef(s),we=o.useRef(r),qe=o.useRef(null),Ye=o.useRef(!1),[mt,wt]=o.useState(!1),yt=o.useCallback(J=>{Ye.current=J,wt(J)},[]),Et=o.useRef(null),{activeNoiseUrl:at,noiseSettingsRef:rt,fadeInNoise:Dt,fadeOutNoise:Bt}=I_({noisePlayer:g,audioRef:C,playbackStateRef:P,sequencer:le}),{startTTS:Lt,stopTTS:It}=O_({ttsText:l,playbackRate:pe,mainVolume:ne,fillRef:f,waveProgressRef:Le,setProgress:ee,setPlaybackState:M,setStateLocal:I,fadeInNoise:Dt,fadeOutNoise:Bt,noiseSettingsRef:rt,onDoneRef:we,handleEndRef:Et});o.useEffect(()=>{St.current=It});const xt=J=>{if(typeof window>"u"||!window.speechSynthesis){try{xe(p("training.ttsUnavailable","\uC774 \uAE30\uAE30\uC5D0\uC11C\uB294 \uC74C\uC131\uC744 \uB4E4\uB824\uC904 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."))}catch{}Lt(J);return}tt("tts"),Lt(J)},lt=Array.isArray(t)?t.filter(Boolean):t?[t]:[],Ct=(!lt||lt.length===0)&&!!l,it=Array.isArray(R)&&R.length>0?R:Array.isArray(Z)&&Z.length>0?Z:null,_t=Math.max(Array.isArray(it)?it.length:0,lt.length);o.useEffect(()=>(Me.current=!0,()=>{Me.current=!1}),[]);const ut=()=>{le.abort()},St=o.useRef(null),ue=o.useRef(null),Te=o.useRef(null),De=o.useRef(null);De.current||(De.current=()=>{Te.current=null;const J=C.current;if(ue.current==="audio"&&J&&(!J.paused||le.isRunning())){ut();try{J.pause()}catch{}Me.current&&(M("paused"),ze(),Bt())}else if(ue.current==="tts")try{St.current?.()}catch{}});const tt=J=>{ue.current=J,Te.current=Ka(De.current)},pt=()=>{Te.current?.(),Te.current=null};o.useEffect(()=>()=>{De.current&&_r(De.current)},[]);const jt=o.useRef(pe);o.useEffect(()=>{jt.current=pe||1},[pe]);const je=o.useCallback(J=>{const ce=jt.current||1;try{J.defaultPlaybackRate=ce}catch{}try{J.playbackRate=ce}catch{}},[]),nt=o.useCallback((J,ce)=>{if(!ax(J,ce)){try{J.currentTime=0}catch{}je(J);return}J.src=ce,je(J),J.load(),je(J)},[je]),ae=o.useCallback(()=>{qe.current&&(clearTimeout(qe.current),qe.current=null),W("idle")},[]),ye=o.useCallback(async(J,ce=3,Ee=50,Ve=0)=>{ae();const Xe=le.generation(),Je=!!J&&J.currentTime>0&&!J.ended,ct=Math.max(0,$e.current-Math.max(0,Ve));if(ct>0&&!Je){tt("audio"),Ie(),M("playing");const ft=rt.current;if(ft?.enabled&&(ft.volume??0)>0)try{Dt(ft.volume)}catch{}if(!await le.waitPad(ct,"lead",Ve)||!Me.current||!le.isCurrent(Xe))return!1}le.enterSound();for(let ft=0;ft<ce;ft++){if(!Me.current||!le.isCurrent(Xe))return!1;try{return tt("audio"),await J.play(),!0}catch(ge){if((ge instanceof Error||typeof ge=="object"&&ge&&"name"in ge?ge.name:void 0)==="AbortError"){if(!le.isCurrent(Xe))return!1;await new Promise(S=>setTimeout(S,Ee));continue}try{xe(p("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}return!1}}try{xe(p("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}return!1},[p,Ie,le,Dt,rt,ae]),He=o.useCallback(J=>{const ce=le.generation(),Ee=Math.max(0,Ae.current-Math.max(0,J));Ie();const Ve=rt.current;if(Ve?.enabled&&(Ve.volume??0)>0)try{Dt(Ve.volume)}catch{}const Xe=()=>{try{ve.current?.()}catch{}};if(Ee<=0){le.leave(),Xe();return}le.waitPad(Ee,"tail",J).then(Je=>{le.leave(),Je&&le.isCurrent(ce)&&Xe()}).catch(()=>{})},[le,Ie,Dt,rt]),Ke=o.useCallback(()=>{const J=C.current;if(!J)return;const ce=()=>{M("playing"),I("playMode"),G(!0),Ie();try{oo(),lr(J).then(Je=>{if(Me.current)try{y.current?.("main",Je)}catch{}})}catch{}const Xe=rt.current;Xe?.enabled&&(Xe?.volume??0)>0&&Dt(Xe.volume)},Ee=()=>{Q_({ended:!!J?.ended,completedByEnd:Ye.current})||(M("paused"),ze(),Bt())},Ve=()=>{const Xe=()=>{try{const Je=me.current,ct=J_(Je,ke.current);if(ct!==null){ke.current=ct,F(ct),G(!0);const ft=Je?.[ct]&&Je[ct].src;if(ft&&J){nt(J,ft),ye(J).catch(()=>{});return}}}catch{}M("stopped"),ee(1);try{if(J)try{J.currentTime=0}catch{}}catch{}ze(),G(!1),Bt();try{!Ge.current&&Et.current&&Et.current()}catch{}};if(ve.current=Xe,Ae.current>0){Ie(),le.waitPad(Ae.current,"tail").then(Je=>{le.leave(),Je&&Xe()}).catch(()=>{});return}Xe()};return J.addEventListener("play",ce),J.addEventListener("pause",Ee),J.addEventListener("ended",Ve),()=>{try{J.removeEventListener("play",ce),J.removeEventListener("pause",Ee),J.removeEventListener("ended",Ve),ze()}catch{}}},[Dt,Bt,ye,rt,Ie,ze,le]);o.useEffect(()=>Ke(),[Ke]),o.useEffect(()=>{Ge.current=s},[s]),o.useEffect(()=>{we.current=r},[r]),o.useEffect(()=>{if(s||te!=="active")return;const J=k.current;if(!J)return;let ce=null;const Ee=requestAnimationFrame(()=>{try{const Ve=J.getTotalLength();if(!Ve)return;const Xe=Ve*.2;J.style.strokeDasharray=`${Ve-Xe} ${Xe}`;const Je="triFlow_"+Math.random().toString(36).slice(2);ce=document.createElement("style"),ce.textContent=`@keyframes ${Je}{from{stroke-dashoffset:0}to{stroke-dashoffset:-${Ve}}}`,document.head.appendChild(ce),J.style.animation=`${Je} 2.4s linear infinite`}catch{}});return()=>{cancelAnimationFrame(Ee),ce?.remove()}},[te,s]),o.useEffect(()=>{me.current=R},[R]),o.useEffect(()=>{ke.current=j},[j]),o.useEffect(()=>{const J=_.current,ce=w.current;if(!J||!ce)return;let Ee=null;const Ve=32,Xe=60,Je=()=>{try{const ft=Array.from(J.querySelectorAll(":scope > .button"));let ge=0;ft.forEach(We=>{if(We===ce)return;const he=We.getBoundingClientRect();ge+=he.width});const S=J.getBoundingClientRect().width,Q=Math.max(0,Math.floor(S-ge-8)),Ce=_t;if(!Ce||Q<=0){Array.from(ce.children).forEach(We=>{try{We.style.width=""}catch{}});return}let Re=Math.floor(Q/Ce);Re>Xe&&(Re=Xe),Re<Ve&&(Re=Math.max(Ve,Math.floor(Q/Ce))),Array.from(ce.querySelectorAll(".button")).forEach(We=>{try{We.style.width=`${Re}px`}catch{}})}catch{}},ct=requestAnimationFrame(Je);try{Ee=new ResizeObserver(()=>{requestAnimationFrame(Je)}),Ee.observe(J),Ee.observe(ce),window.addEventListener("resize",Je)}catch{}return()=>{try{cancelAnimationFrame(ct)}catch{}try{Ee&&(Ee.disconnect(),Ee=null)}catch{}try{window.removeEventListener("resize",Je)}catch{}}},[R,Z,_t]),o.useEffect(()=>()=>{try{Se.current&&(clearTimeout(Se.current),Se.current=null),qe.current&&(clearTimeout(qe.current),qe.current=null)}catch{}},[]);const vt=(J,ce)=>{q(J),K(ce),gt(),z(ex(J)),me.current=J},Ue=()=>{I("playMode"),F(0),G(!0)},ht=async(J,ce)=>{yt(!1),v.current=!1,nt(J,ce),await Uc(J),await et()!==!1&&(N(!1),Ue(),await ye(J))},cn=async(J,ce=!1)=>{const Ee=C.current;N(!0),L("measuring_duration");try{const Ve=await _s(J,{timeoutMs:1e4,rejectOnError:!0});vt([{src:J,objectUrl:null,duration:Ve}],Ve),L("ready"),ce&&Ee&&await ht(Ee,J)}finally{v.current=!1,N(!1)}},dn=async(J,ce=!1)=>{const Ee=C.current;N(!0),L("measuring_duration");try{const Ve=await Promise.all(J.map(Je=>_s(Je,{timeoutMs:1e4})));if(!Me.current)return;const Xe=J.map((Je,ct)=>({src:Je,objectUrl:null,duration:Ve[ct]||0}));vt(Xe,tx(Xe)),L("ready"),ce&&Ee&&Xe.length>0&&await ht(Ee,Xe[0].src)}finally{v.current=!1,N(!1)}},zt=async(J=!1,ce=!0)=>{const Ee=C.current,Ve=t?Array.isArray(t)?t:[t]:[];if(!Ve||Ve.length===0||!Ve.some(Boolean))return!1;if(v.current)return null;v.current=!0,ce&&N(!0),L("resolving");try{const Xe=nx(t,a,kl),Je=[];let ct=0;for(const ft of Xe){let ge=ft.src??null,S=null;if(!ge&&ft.resolvedPath){try{L("getting_signed_url"),ge=await Al(ft.resolvedPath)}catch{ge=null}if(!Me.current)return!1;if(!ge)try{L("downloading");const Ce=await Nl(ft.resolvedPath);if(!Me.current)return!1;if(Ce){const Re=Ce instanceof Blob?Ce:new Blob([Ce]);S=b.track(URL.createObjectURL(Re)),ge=S}}catch{L("error");try{xe(p("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.")),I("active")}catch{}}}if(!ge)continue;let Q=0;try{L("measuring_duration"),Q=await _s(ge,{timeoutMs:3e3})}catch{Q=0}if(!Me.current){if(S)try{URL.revokeObjectURL(S)}catch{}for(const Ce of Je)if(Ce.objectUrl)try{URL.revokeObjectURL(Ce.objectUrl)}catch{}return!1}ct+=Q||0,Je.push({...ft,src:ge,objectUrl:S,duration:Q})}if(vt(Je,ct),Je.length>0&&J&&Ee){const ft=Je[0];yt(!1);try{b.keepOnly(Je.map(ge=>ge.objectUrl))}catch{}if(L("ready"),v.current=!1,ft.src&&Ee)try{if(nt(Ee,ft.src),await Uc(Ee),await et()===!1)return!1;ce&&N(!1),Ue(),Ee&&await ye(Ee)}catch{ce&&N(!1)}else ce&&N(!1);I("playMode"),F(0),G(!0)}return Je.length>0}finally{v.current=!1,ce&&N(!1),L(Xe=>Xe==="ready"?"ready":"idle")}},qt=async J=>{const ce=le.isRunning();if(J.paused&&!ce){if(Ye.current){await Nt();return}const Ee=le.resume();if(Ee){if(M("playing"),Ee.phase==="tail"){He(Ee.elapsed);return}await ye(J,3,50,Ee.elapsed);return}await ye(J),M("playing")}else le.pause(),ut(),J.pause(),M("paused"),ce&&(ze(),Bt())},Ht=async()=>{const J=C.current;if(!(!J&&!Ct)){if(Ct){const ce=window.speechSynthesis;if(te==="active"){const Ee=ja(),Ve=Array.isArray(l)?l.filter(Boolean):l?[l]:[];if(Ee&&Ve.length>0){if(v.current)return;I("load"),N(!0),L("synthesizing"),v.current=!0;try{const Xe=await Promise.all(Ve.map(Je=>Promise.resolve(Ee(Je))));Xe.length>1?await dn(Xe,!0):await cn(Xe[0],!0)}catch{v.current=!1,N(!1),I("active"),xt(Ve.length>0?Ve:void 0)}return}xt(Ve.length>0?Ve:void 0);return}if(te==="playMode"){const Ee=!!ce&&(ce.speaking||ce.paused)&&!(J&&(J.currentSrc||J.getAttribute("src")));if(J&&!Ee){await qt(J);return}try{if(ce&&ce.paused)try{tt("tts"),ce.resume(),M("playing")}catch{}else try{ce.pause(),M("paused")}catch{}}catch{}}return}if(te==="active"){if(s&&Array.isArray(me.current)&&me.current.length>0){const Ee=me.current[0];try{if(Ee.src&&J)try{nt(J,Ee.src),Ue(),J&&await ye(J)}catch{}Ue();return}catch{}}I("load");let ce;try{ce=await zt(!0)}catch{ce=!1}if(ce===!1&&Me.current){try{xe(p("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}I("active")}return}if(te!=="load"&&(te==="playMode"||te==="active"))try{J&&await qt(J)}catch(ce){(ce instanceof Error||typeof ce=="object"&&ce&&"name"in ce)&&ce.name}}},Nt=async()=>{const J=C.current;if(J)try{const ce=me.current;if(Array.isArray(ce)&&ce.length>1){await gn(0);return}yt(!1);try{J.currentTime=0}catch{}J&&await ye(J),M("playing"),I("playMode")}catch{}},An=()=>{ut(),pt(),St.current?.();const J=C.current;try{if(J){try{J.pause()}catch{}try{J.currentTime=0}catch{}}}catch{}Bt(),M("stopped"),I("active"),ee(0),G(!1)},an=async(J,{sameSegment:ce=!1}={})=>{ut();const Ee=le.generation(),Ve=C.current,Xe=me.current?.[J]?.src;try{if(yt(!1),F(J),G(!0),ke.current=J,!Xe||!Ve||(ce||gt(),nt(Ve,Xe),!ce&&await et()===!1)||!le.isCurrent(Ee)||(await ye(Ve),!le.isCurrent(Ee)))return;M("playing"),I("playMode")}catch{}},$t=async()=>{const J=me.current,ce=ke.current||0;if(!J||ce<=0){await Nt();return}await an(ce-1)},Pt=async()=>{const J=me.current,ce=ke.current||0;if(!J||ce>=J.length-1){An();return}await an(ce+1)},Ut=()=>{if(Ye.current)return;const J=200,ce=340;yt(!0),ut(),pt();try{ee(1)}catch{}dt(1);try{W("hold")}catch{}try{const Ee=C.current,Ve=Ct&&!!Ee?.src;if(!Ct||Ve){if(Ee){Ee.pause();try{Ee.currentTime=0}catch{}}}else It();Bt()}catch{}try{M("stopped")}catch{}if(G(!1),!Ge.current)try{qe.current&&(clearTimeout(qe.current),qe.current=null),qe.current=setTimeout(()=>{try{W("out")}catch{}qe.current=setTimeout(()=>{try{typeof we.current=="function"&&we.current(!0)}catch{}try{W("idle")}catch{}qe.current=null},ce)},J)}catch{}};o.useEffect(()=>{Et.current=Ut});const Jt=o.useCallback(()=>xe(""),[]),gn=async J=>{(me.current||[])[J]&&await an(J,{sameSegment:J===ke.current})},Zt=U==="playing",xn=o.useMemo(()=>{if(!Z||Z.length<=1)return Z;const J=Z[j];return J?[J]:Z},[Z,j]),pn=s===!0;o.useEffect(()=>{try{const J=C.current;J&&typeof J.playbackRate=="number"&&je(J)}catch{}},[pe,je]);const Qt=o.useRef({raf:null,timer:null});o.useEffect(()=>{const J=C.current;if(!J)return;const ce=Math.max(0,Math.min(1,ne)),Ee=Qt.current,Ve=()=>{Ee.raf!==null&&(cancelAnimationFrame(Ee.raf),Ee.raf=null),Ee.timer!==null&&(clearTimeout(Ee.timer),Ee.timer=null)};Ve();const Xe=ir(J);if(J.paused||Math.abs(Xe-ce)<.001||typeof requestAnimationFrame!="function"){try{Vn(J,ce)}catch{}return}const Je=performance.now(),ct=()=>{const ft=Math.min(1,(performance.now()-Je)/150);try{Vn(J,Xe+(ce-Xe)*ft)}catch{}Ee.raf=ft<1?requestAnimationFrame(ct):null};return Ee.raf=requestAnimationFrame(ct),Ee.timer=setTimeout(()=>{Ve();try{Vn(J,ce)}catch{}},200),Ve},[ne]);const Gt=V==="hold",Nn=V==="out",de=te==="playMode"&&!D&&!mt||Gt||Nn,Ne=U!=="stopped"||Gt||Nn,Fe=U==="paused",Ze=Math.max(0,Math.min(100,(T||0)*100)),Oe=Be("audio-player__fill",de?"is-visible":"",Ne?"is-expanded":"",Fe?"is-paused":"",Nn?"is-out":"");return n.jsxs("div",{className:`audio-player ${pn?"is-disabled":""}${i?` ${i}`:""}`,role:"group","aria-label":typeof m=="string"?m:void 0,children:[n.jsxs("div",{className:`audio-player__panel ${Zt?"is-playing":""} ${D?"is-loading":""} ${te!=="default"?"is-revealed":""}`,children:[D?n.jsxs("div",{className:"audio-player__loading",role:qc[$]?"status":void 0,"aria-live":qc[$]?"polite":"off",children:[n.jsx("span",{className:"audio-player__loading-spinner","aria-hidden":"true"}),n.jsx("span",{className:"audio-player__loading-text",children:p("training.audioStatus.preparing",{defaultValue:"\uC18C\uB9AC\uB97C \uC900\uBE44\uD558\uACE0 \uC788\uC2B5\uB2C8\uB2E4\u2026"})})]}):null,te==="active"?n.jsx("button",{className:"audio-player__button",type:"button",disabled:pn,onClick:()=>{Y.current=wr(),E(),Ht()},"aria-label":typeof m=="string"?m:p("training.listen","\uB4E3\uAE30"),onMouseEnter:B,onMouseLeave:E,onFocus:B,onBlur:E,children:n.jsx("span",{ref:x,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:k,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,A&&n.jsx(Mn,{anchorRect:A,text:typeof m=="string"&&m?m:p("training.listenLabel","\uBB38\uC7A5 \uB4E3\uAE30"),offset:8}),n.jsxs("div",{className:`audio-player__play ${te==="playMode"||Zt?"is-visible":""}`,inert:!(te==="playMode"||Zt)||void 0,children:[n.jsxs("div",{ref:_,className:"audio-player__buttons",children:[n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"skip-back",onClick:$t,ariaLabel:p("training.prev","\uC774\uC804"),width:"60px",variant:"transparent-white","aria-hidden":"true",tabIndex:-1,disabled:te!=="playMode"}),n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:Zt?"pause":"play",onClick:Ht,ariaLabel:p("common.playPause","\uC7AC\uC0DD / \uBA48\uCDA4"),"aria-pressed":Zt,width:"60px",variant:"transparent-white",disabled:te!=="playMode"}),n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"square",onClick:An,ariaLabel:p("training.stop","\uC815\uC9C0"),width:"60px",variant:"transparent-white","aria-hidden":"true",tabIndex:-1,disabled:te!=="playMode"}),_t>1?n.jsx("div",{ref:w,className:"audio-player__source-buttons",children:Array.from({length:_t}).map((J,ce)=>n.jsx(fe,{htmlType:"button",size:32,type:"dot",shape:"pill",useBorder:!1,label:String(ce+1),onClick:()=>{try{gn(ce)}catch{}},ariaLabel:p("training.sourcePlay",{n:ce+1}),variant:"transparent-white",selected:O&&j===ce,disabled:te!=="playMode"||!(Array.isArray(R)&&R[ce]),showTooltipInfo:!0},ce))}):null,!Array.isArray(R)||R.length<=1?n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"repeat",onClick:Nt,ariaLabel:p("common.replay","\uB2E4\uC2DC\uB4E3\uAE30"),width:"60px",variant:"transparent-white",disabled:te!=="playMode"}):null,n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"skip-forward",onClick:Pt,ariaLabel:p("training.next","\uB2E4\uC74C"),width:"60px",variant:"transparent-white","aria-hidden":!0,tabIndex:-1,disabled:te!=="playMode"}),n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"check",onClick:Ut,ariaLabel:p("common.done","\uC644\uB8CC"),width:"60px",variant:"transparent-white",disabled:te!=="playMode"})]}),n.jsxs("div",{className:"audio-player__slider",children:[n.jsx("div",{className:Oe,ref:f,style:{left:`${Ze}%`},"aria-hidden":"true"}),(u||c)&&n.jsx(ox,{segments:xn,progress:T,totalDuration:ie,waveProgressRef:Le,showSoundWaveForm:u,leadInMs:d,tailMs:h,trackDurationSec:R?.[j]?.duration??0,noiseSrc:c&&g?.settings.enabled&&H>0?at:null,noiseRatio:g?rr(g.settings):0,noiseSpeed:g?.settings.speed??1,mainVolume:X,onReadyChange:st})]})]}),n.jsx("audio",{ref:C,crossOrigin:"anonymous",preload:"auto"})]}),!u&&n.jsxs("p",{className:"audio-player__no-waveform caption-1",children:[n.jsx(ot,{icon:"triangle-alert",size:14}),p("training.noSoundWaveform","\uC18C\uB9AC \uBE44\uAD50 \uBB38\uC81C\uB294 \uC6E8\uC774\uBE0C\uD3FC\uC744 \uD45C\uD604\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.")]}),n.jsx(va,{message:oe,position:be,onClose:Jt})]})}function Tr(e){const{t}=_e.useTranslation(),{text:a,label:r,anchorRect:s=null,onClose:l,closeOnOutsideClick:i=!0,isMobilePopup:u=!1}=e||{},[c,d]=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:p,canIncrease:m,canDecrease:g,fontSize:y,lineHeight:C}=Oi({storageKey:"tooltip-fontScale"}),f=o.useCallback(()=>d(k=>k==="dark"?"light":"dark"),[]),_=o.useCallback(k=>{try{k.stopPropagation()}catch{}try{typeof l=="function"&&l()}catch{}},[l]),b=Array.isArray(a)?a:typeof a>"u"||a===null?[]:[a],w={fontSize:`${y}px`,lineHeight:`${C}px`,"--tt-line-height":`${C}px`,"--tt-marker-size":"28px"},v=n.jsxs("div",{className:se(`text-box-tooltip__root ${c==="dark"?"is-dark":""}`),children:[n.jsxs("div",{className:se("text-box-tooltip__box"),children:[r&&n.jsx("div",{className:se("text-box-tooltip__label body-2b"),children:r}),n.jsx("div",{className:se("text-box-tooltip__text body-1"),style:w,children:b.map((k,x)=>n.jsxs("div",{className:se("text-box-tooltip__line"),children:[b.length>1?n.jsx("div",{className:se("text-box-tooltip__marker"),children:n.jsx("span",{className:se("text-box-tooltip__line-number button-1"),children:x+1})}):null,n.jsx("span",{className:se("text-box-tooltip__line-text"),children:k})]},x))})]}),n.jsxs("div",{className:se("text-box-tooltip__buttons"),children:[n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:"minus",onClick:p,ariaLabel:t("training.fontSizeDecrease","\uAE00\uC790 \uD06C\uAE30 \uAC10\uC18C"),variant:c==="dark"?"transparent-white":"transparent-gray",disabled:!g}),n.jsx(fe,{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(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:c==="dark"?"moon":"sun-medium",onClick:f,ariaLabel:t("training.toggleBackground","\uBC30\uACBD \uC804\uD658"),variant:c==="dark"?"transparent-white":"transparent-gray"}),n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:"x",onClick:_,ariaLabel:t("common.close","\uB2EB\uAE30"),variant:c==="dark"?"transparent-white":"transparent-gray"})]})]});return s?n.jsx(Bn,{anchorRect:s,className:se(`text-box-tooltip ${c==="dark"?"is-dark":""}`),onClose:l,closeOnOutsideClick:i,isMobilePopup:u,ariaLabel:r||t("tooltip.textbox","\uBCF8\uBB38"),children:v}):n.jsx("div",{className:se(`text-box-tooltip ${c==="dark"?"is-dark":""}`),children:v})}function Kc({state:e="disabled"}){const{t}=_e.useTranslation();return n.jsxs("div",{className:`ts-bullet ts-bullet--${e}`,"aria-hidden":!0,children:[n.jsx("div",{className:"bullet__dot",children:n.jsx(ot,{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 Yc(e,t,a){const r=o.useRef(t),s=o.useRef(a);o.useEffect(()=>{r.current=t,s.current=a}),o.useEffect(()=>{if(!e||typeof document>"u")return;let l=null,i=10;const u=()=>{l=null;const c=r.current(),d=c?Array.from(c.querySelectorAll(En)).find(h=>!h.closest('[aria-hidden="true"]')):void 0;if(d){try{d.focus()}catch{}if(document.activeElement===d)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 d=s.current();if(d)try{d.focus()}catch{}}}},[e])}function Zc({title:e,children:t,className:a="",state:r="disabled",usePreviewTextBtn:s=!1,onPreviewTextBtn:l,previewText:i=null,useFaded:u,usePlayAllBtn:c=!1,onPlayAll:d,playAllActive:h=!1}){const{t:p}=_e.useTranslation(),m=yn("(max-width: 767px)"),g=`training-step__title h4 ${u&&r==="disabled"?"training-step__title--faded":""} ${a}`.trim(),y=`training-step__title-row training-step__title-row--${r}`.trim(),C=o.useRef(null),[f,_]=o.useState(!1),[b,w]=o.useState(null),[v,k]=o.useState(null);Yc(f&&!!b,()=>{if(typeof document>"u")return null;const D=Array.from(document.querySelectorAll(".tooltip__content"));for(let N=D.length-1;N>=0;N--)if(D[N].querySelector(".text-box-tooltip__root"))return D[N];return null},()=>C.current?.querySelector("button")??null);const x=o.useRef(l);o.useEffect(()=>{x.current=l});const A=o.useMemo(()=>i==null?"":typeof i=="string"||typeof i=="number"?String(i):Array.isArray(i)&&i.every(D=>typeof D=="string"||typeof D=="number")?i.join(""):"",[i]),B=o.useCallback(()=>{_(!1),w(null),k(null)},[]);o.useEffect(()=>{if(!f)return;let D;try{typeof x.current=="function"&&(D=x.current())}catch{}if(D===!1){B();return}k(typeof D<"u"&&D!==null?D:null)},[A]);const E=o.useCallback(()=>{let D;try{typeof l=="function"&&(D=l())}catch{}if(D!==!1){if(k(typeof D<"u"&&D!==null?D:i),!C.current){_(N=>!N);return}if(f)_(!1),w(null),k(null);else{const N=C.current.getBoundingClientRect();w(N),_(!0)}}},[l,i,f]);return n.jsxs("div",{className:y,children:[n.jsx("p",{className:g,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(fe,{htmlType:"button",size:32,type:m?"dot":"bar",icon:"play-circle",label:m?void 0:p("training.playAll","\uBAA8\uB450 \uB4E3\uAE30"),ariaLabel:p("training.playAll","\uBAA8\uB450 \uB4E3\uAE30"),selected:h,onClick:d,variant:r==="disabled"?"disabled":"default",disabled:r==="disabled"||h,onDisabledClick:h&&r!=="disabled"?()=>{}:void 0}),s&&n.jsx("div",{ref:C,children:n.jsx(fe,{htmlType:"button",size:32,type:m?"dot":"bar",icon:"eye",label:m?void 0:p("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),ariaLabel:p("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),onClick:E,className:f?"is-selected":void 0,"aria-expanded":f,"aria-haspopup":"dialog",variant:r==="disabled"?"disabled":"default",disabled:!i&&typeof l!="function"})})]}),f&&n.jsx(Tr,{text:v??i,label:p("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),anchorRect:b,onClose:B,closeOnOutsideClick:!1,isMobilePopup:!0})]}):null]})}function ws(e,t){return typeof t!="number"||typeof e!="number"?"disabled":e<t?"done":e===t?"active":"disabled"}function sa({index:e,stepIndex:t,isLast:a=!1,title:r="",titleProps:s={},children:l,className:i="",onDone:u=void 0,useTitleFaded:c=void 0,lockedHint:d}){const{t:h}=_e.useTranslation(),[p,m]=o.useState(()=>ws(e,t));o.useEffect(()=>{const x=ws(e,t);if(x!==p){const A=setTimeout(()=>m(x),0);return()=>clearTimeout(A)}},[e,t,p]);const g=o.useCallback((...x)=>{ws(e,t)==="done"||p==="done"||typeof u=="function"&&u(...x)},[e,t,p,u]),[y,C]=o.useState(!1),[f,_]=o.useState({text:"",label:"\uBB38\uC7A5 \uB4E3\uAE30",anchorRect:null,backdrop:!1,alignX:null,alignY:null}),b=o.useCallback(x=>{if(!x)return null;try{const A=x;if(typeof x=="object"&&(A.currentTarget||A.target)&&(A.nativeEvent||A.type)){const D=A.currentTarget??A.target;if(D&&typeof D.getBoundingClientRect=="function")return D.getBoundingClientRect()}if(x instanceof DOMRect)return x;const B=x;if(B&&typeof B.getBoundingClientRect=="function")return B.getBoundingClientRect();const E=x?.current;return E&&typeof E.getBoundingClientRect=="function"?E.getBoundingClientRect():null}catch{return null}},[]),w=o.useCallback((x,{text:A="",label:B="\uBB38\uC7A5 \uB4E3\uAE30",backdrop:E=!1,alignX:D="center",alignY:N="top"}={})=>{const $=b(x);_({text:A,label:B,anchorRect:$,backdrop:E,alignX:D,alignY:N}),C(!0)},[b]),v=o.useCallback(()=>{C(!1),_(x=>({...x,anchorRect:null}))},[]),k=o.Children.map(l,x=>{if(o.isValidElement(x)){const A=x;if(typeof A.type=="string")return A;const B=A.props??{},E=typeof B.onDone=="function"?B.onDone:g,D=typeof B.disabled=="boolean";let N=p==="disabled";return D&&(N=!!B.disabled),o.cloneElement(A,{onDone:E,disabled:N,showTooltip:w,hideTooltip:v})}return x});return n.jsxs("div",{className:`training-step training-step--${p} ${a?"training-step--last":""} ${i}`,"aria-current":p==="active",children:[n.jsx(Kc,{state:p}),n.jsxs("div",{className:"training-step__content",children:[n.jsx(Zc,{state:p,title:r,...s,useFaded:c}),p==="disabled"&&d&&typeof e=="number"&&typeof t=="number"&&e===t+1&&n.jsx("p",{className:"training-step__locked-hint caption-1",role:"status",children:d}),k]}),y?n.jsx(Bn,{anchorRect:f.anchorRect,backdrop:f.backdrop,onClose:v,ariaLabel:h("tooltip.textbox","\uBCF8\uBB38"),children:n.jsx(Tr,{text:f.text,onClose:v})}):null]})}function Xc({context:e,state:t="disabled",theme:a="light"}){const{t:r}=_e.useTranslation(),[s,l]=o.useState("disabled"),[i,u]=o.useState(()=>{try{return localStorage.getItem("tooltip-theme")||a}catch{return a}});o.useEffect(()=>{try{localStorage.setItem("tooltip-theme",i)}catch{}},[i]);const c=()=>u(L=>L==="dark"?"light":"dark"),{increase:d,decrease:h,canIncrease:p,canDecrease:m,fontSize:g,lineHeight:y}=Oi({storageKey:"textbox_fontScale"}),[C,f]=o.useState(""),_=o.useRef(null),b=o.useRef(!1),w=o.useCallback(()=>{b.current=wr()&&!!_.current&&_.current.contains(document.activeElement),l("active")},[]),v=o.useCallback(()=>f(""),[]),k=L=>{try{f(L)}catch{}},x=typeof navigator<"u"&&/Mobi|Android/i.test(navigator.userAgent||"");o.useEffect(()=>{if(t!=="disabled"){const L=setTimeout(()=>l(t),0);return()=>clearTimeout(L)}},[t]);const A=o.useMemo(()=>e&&typeof e=="object"?String(e.sentence??e.text??""):typeof e=="string"?e:"",[e]),[B,E]=o.useState(A);B!==A&&(E(A),l("disabled"));const D=t==="disabled"?s:t,N=D==="disabled"?"training-text-box--disabled":D==="active"?"training-text-box--active":D==="done"?"training-text-box--done":"",$=o.useMemo(()=>({fontSize:`${g}px`,lineHeight:`${y}px`}),[g,y]);return o.useEffect(()=>{if(D==="disabled"||!b.current)return;b.current=!1;const L=document.activeElement;L&&L!==document.body||_.current?.querySelector(".training-text-box__buttons button")?.focus()},[D]),n.jsxs("div",{ref:_,className:`training-text-box ${N} ${D!=="disabled"&&i==="dark"?"is-dark":""}`,children:[D==="disabled"&&n.jsx("div",{className:"training-text-box__preview",children:n.jsx(fe,{htmlType:"button",size:48,type:"bar",onClick:w,icon:"eye",ariaLabel:r("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),label:r("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),useBorder:!1})}),n.jsx("div",{className:"training-text-box__area","aria-hidden":D==="disabled",children:n.jsx("span",{className:"training-text-box__inner h3",style:$,children:A})}),D!=="disabled"&&n.jsxs("div",{className:"training-text-box__buttons","aria-hidden":D==="disabled",children:[n.jsx(fe,{htmlType:"button",size:32,type:"dot",onClick:h,onDisabledClick:()=>k(r("training.fontSizeMin","\uAE00\uC528 \uD06C\uAE30\uAC00 \uCD5C\uC18C\uC785\uB2C8\uB2E4.")),ariaLabel:r("training.fontSizeDecrease","\uAE00\uC790 \uD06C\uAE30 \uAC10\uC18C"),icon:"minus",variant:i==="dark"?"transparent-white":"transparent-gray",disabled:!m,useBorder:!1,showTooltipInfo:!0,...!x&&{width:"60px"}}),n.jsx(fe,{htmlType:"button",size:32,type:"dot",onClick:d,onDisabledClick:()=>k(r("training.fontSizeMax","\uAE00\uC528 \uD06C\uAE30\uAC00 \uCD5C\uB300\uC785\uB2C8\uB2E4.")),ariaLabel:r("training.fontSizeIncrease","\uAE00\uC790 \uD06C\uAE30 \uC99D\uAC00"),icon:"plus",variant:i==="dark"?"transparent-white":"transparent-gray",disabled:!p,useBorder:!1,showTooltipInfo:!0,...!x&&{width:"60px"}}),n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:i==="dark"?"moon":"sun-medium",onClick:c,ariaLabel:r("training.toggleBackground","\uBC30\uACBD \uC804\uD658"),variant:i==="dark"?"transparent-white":"transparent-gray"})]}),n.jsx(va,{message:C,position:"top",onClose:v})]})}function la(e){return e==="active"||e==="done"}function Bs({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,useTitleFaded:l,onDone:i,onChange:u,answer:c,wrongAnswers:d,choices:h,multiSelect:p=!1,correctCount:m=0,useDisabledCovered:g=!1,choiceIcons:y,shuffleChoices:C=!0}){const{t:f}=_e.useTranslation(),_=s??f("training.selectConfirm","\uBB38\uC81C\uB97C \uBCF4\uACE0 \uD574\uB2F9\uD558\uB294 \uB0B4\uC6A9\uC744 \uC120\uD0DD\uD558\uC138\uC694."),b=typeof e=="number"?e:-1,w=typeof t!="number"?"disabled":b<t?"done":b===t?"active":"disabled",v=Array.isArray(h)&&h.length?h:typeof c<"u"?[c].concat(Array.isArray(d)?d:[]):void 0,k=d?d.join("||"):"",x=h?h.join("||"):"",[A,B]=o.useState(()=>Array.isArray(v)?C?Ra(v):v.slice():void 0);o.useEffect(()=>{Array.isArray(v)&&v.length?B(C?Ra(v):v.slice()):B(void 0)},[c,k,x,C]);const[E,D]=o.useState(null),[N,$]=o.useState(()=>new Set);o.useEffect(()=>{D(null),$(new Set)},[x,c,k]);const L=o.useRef(void 0);o.useEffect(()=>{const P=L.current;typeof P=="number"&&typeof t=="number"&&typeof e=="number"&&P>=e&&t<e&&(D(null),$(new Set)),L.current=t},[t,e]);const U=o.useCallback(P=>{if(!la(w))return;const T=A?.[P];if(T==null)return;const ee=T;if(p){const te=new Set(N);te.has(ee)?te.delete(ee):te.add(ee),$(te),typeof u=="function"&&u({selectedValues:[...te],__ts:Date.now()}),typeof i=="function"&&i({selectedValues:[...te],__ts:Date.now()})}else D(ee),typeof u=="function"&&u({selectedIndex:P,selectedValue:ee,__ts:Date.now()}),typeof i=="function"&&i({selectedIndex:P,selectedValue:ee,__ts:Date.now()})},[A,w,p,u,N]),M=`training-step__buttons${Array.isArray(A)&&A.length>3?" training-step__buttons--wrap-3":""}`;return n.jsx(sa,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:_,useTitleFaded:l,children:n.jsx("div",{className:M,children:Array.isArray(A)&&A.length>0?A.map((P,T)=>n.jsx(fe,{htmlType:"button",size:56,type:"bar",onClick:()=>U(T),ariaLabel:String(P),label:P,useLabel:!0,icon:y?y[String(P)]:void 0,variant:"default",disabled:w==="disabled",selected:p?N.has(P):E===P,useDisabledCovered:g,minWidth:0},String(P))):null})})}function ks({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,onDone:l,onChange:i,context:u,demoSelected:c}){const{t:d}=_e.useTranslation(),h=s??d("training.confirmTitle","\uBB38\uC7A5\uC744 \uD655\uC778\uD558\uACE0 \uC798 \uB4E4\uB838\uB294\uC9C0 \uC120\uD0DD\uD558\uC138\uC694."),p=typeof e=="number"?e:-1,m=typeof t!="number"?"disabled":p<t?"done":p===t?"active":"disabled",g=u&&typeof u=="object"?u.sentence||"":typeof u=="string"?u:"",y=u&&typeof u=="object"?u.choices:void 0,[C,f]=o.useState(c??null),_=`${String(g)}\0${JSON.stringify(y??null)}`,[b,w]=o.useState(_);b!==_&&(w(_),c==null&&f(null));const[v,k]=o.useState(c);Object.is(v,c)||(k(c),f(c??null));const x=o.useRef(void 0);o.useEffect(()=>{const D=x.current;typeof D=="number"&&typeof t=="number"&&typeof e=="number"&&D>=e&&t<e&&c==null&&f(null),x.current=t},[t,e,c]);const A=o.useCallback(D=>{const N=typeof D=="object"&&D!==null?Object.assign({},D,{__ts:Date.now()}):{value:D,__ts:Date.now()};typeof i=="function"&&i(N),la(m)&&typeof l=="function"&&l(N)},[i,m,l]),B=o.useCallback(()=>{la(m)&&(f(!1),A(!1))},[A,m]),E=o.useCallback(()=>{la(m)&&(f(!0),A(!0))},[A,m]);return n.jsxs(sa,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:h,onDone:l,useTitleFaded:!1,children:[n.jsx(Xc,{context:u,state:m}),n.jsx("div",{className:"training-step__buttons",children:Array.isArray(y)&&y.length>0?y.slice(0,6).map((D,N)=>n.jsx(fe,{htmlType:"button",size:56,type:"bar",onClick:()=>{la(m)&&(f(N),A&&A(N))},disabled:m==="disabled",ariaLabel:String(D),label:D,variant:m,selected:C===N},N)):n.jsxs(n.Fragment,{children:[n.jsx(fe,{htmlType:"button",size:56,type:"bar",onClick:B,disabled:m==="disabled",icon:"x",ariaLabel:d("training.notHeard","\uC548 \uB4E4\uB838\uC5B4\uC694."),label:d("training.notHeard","\uC548 \uB4E4\uB838\uC5B4\uC694."),variant:"default",selected:C===!1}),n.jsx(fe,{htmlType:"button",size:56,type:"bar",onClick:E,disabled:m==="disabled",icon:"circle",ariaLabel:d("training.heardWell","\uC798 \uB4E4\uB838\uC5B4\uC694."),label:d("training.heardWell","\uC798 \uB4E4\uB838\uC5B4\uC694."),variant:"default",selected:C===!0})]})})]})}function As({index:e,stepIndex:t,isLast:a=!1,title:r,onDone:s,btnLabel:l,soundSrc:i,bucketPath:u,usePreviewTextBtn:c,previewText:d=null,onPreviewTextBtn:h,disabled:p,_pageIndex:m,showSoundWaveForm:g,showNoiseWaveForm:y,leadInMs:C,tailMs:f}){const{t:_}=_e.useTranslation(),b=r??_("training.listenTitle","\uC81C\uC2DC\uD558\uB294 \uBB38\uC7A5\uC744 \uB4E4\uC5B4\uC8FC\uC138\uC694."),w=p??(typeof t=="number"&&typeof e=="number"?e>t:!1);return n.jsx(sa,{index:e,stepIndex:t,isLast:a,title:b,onDone:s,titleProps:{usePreviewTextBtn:c,previewText:d,onPreviewTextBtn:h},children:n.jsx(xs,{soundSrc:i,ttsText:i?null:d??b,bucketPath:u,btnLabel:l||_("training.listenButton","\uBB38\uC7A5 \uB4E3\uAE30"),disabled:w,className:"training-step__listen-sticky",showSoundWaveForm:g,showNoiseWaveForm:y,leadInMs:C,tailMs:f},`audio-p${m??0}-s${e}`)})}const mx=[];function Ns({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,onDone:l,onChange:i,context:u=mx}){const{t:c}=_e.useTranslation(),d=s??c("training.orderListDefault","\uBB38\uC7A5\uC744 \uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uBC30\uCE58\uD558\uC138\uC694."),h=z=>typeof z=="string"?z:z&&(z.context||z.sentence||z.question||"")||"",[p,m]=o.useState(Array.isArray(u)?u:[]),[g,y]=o.useState(()=>(p||[]).map((z,j)=>({id:j,text:h(z)}))),C=o.useMemo(()=>typeof t!="number"||typeof e!="number"?"disabled":e<t?"done":e===t?"active":"disabled",[t,e]),f=C!=="disabled",_=o.useRef(void 0),b=o.useRef(void 0);o.useEffect(()=>{if(_.current===u)return;_.current=u;const z=Array.isArray(u)?u:[];m(z);const j=(F=>{const O=(F||[]).map((pe,X)=>({id:X,text:h(pe)}));if(O.length<=1)return O;const G=(pe,X)=>{if(pe.length!==X.length)return!1;for(let H=0;H<pe.length;H++)if(pe[H].text!==X[H].text)return!1;return!0};let ie=Ra(O),K=0;for(;G(ie,O)&&K<20;)ie=Ra(O),K+=1;return ie})(z);y(j);try{if(typeof i=="function"){const F=j.filter((O,G)=>O.text===h(z[G])).length;i({shuffled:j,score:F,total:(z||[]).length,initial:!0,__ts:Date.now()})}if(typeof l=="function"&&C==="active"){const F=j.filter((O,G)=>O.text===h(z[G])).length;b.current=u,l({shuffled:j,score:F,total:(z||[]).length,initial:!0,__ts:Date.now()})}}catch{}},[u]),o.useEffect(()=>{if(C!=="active"||b.current===u||(b.current=u,typeof l!="function"))return;const z=Array.isArray(u)?u:[],j=g.filter((F,O)=>F.text===h(z[O])).length;l({shuffled:g,score:j,total:z.length,initial:!0,__ts:Date.now()})},[C,u]);const w=(z,j)=>{const F=[...g],O=z+j;if(O<0||O>=F.length)return;const G=F[O];F[O]=F[z],F[z]=G,ee(F);try{if(typeof l=="function"&&C==="active"){const ie=F.filter((K,pe)=>K.text===h(p[pe])).length;l({shuffled:F,score:ie,total:(p||[]).length,__ts:Date.now()})}}catch{}},[v,k]=o.useState(null),x=o.useRef(null),A=o.useRef(null),B=o.useRef(null),E=o.useRef(null),D=o.useRef(null),N=o.useRef({x:0,y:0}),$=o.useRef(null),L=o.useRef({dx:0,dy:0}),U=()=>{if($.current!==null)return;const z=()=>{if(!x.current){$.current=null;return}$.current=requestAnimationFrame(z);const j=N.current,F=L.current||{dx:0,dy:0};x.current&&(x.current.style.transform=`translate3d(${j.x-F.dx}px, ${j.y-F.dy}px, 0)`)};$.current=requestAnimationFrame(z)},M=o.useRef(new Map),P=o.useRef(new Map),T=()=>{const z=new Map;return M.current.forEach((j,F)=>{j&&j.getBoundingClientRect&&z.set(F,j.getBoundingClientRect())}),z},ee=z=>{const j=T();y(z);try{if(typeof i=="function"){const F=z.filter((O,G)=>O.text===h(p[G])).length;i({shuffled:z,score:F,total:(p||[]).length,__ts:Date.now()})}}catch{}requestAnimationFrame(()=>{const F=T();z.forEach(O=>{const G=j.get(O.id),ie=F.get(O.id),K=M.current.get(O.id);if(!K||!G||!ie)return;const pe=G.top-ie.top;pe&&(K.style.transition="none",K.style.transform=`translateY(${pe}px)`,requestAnimationFrame(()=>{K.style.transition="transform 420ms cubic-bezier(.22,.9,.39,1)",K.style.transform="";const X=()=>{K.style.transition="",K.removeEventListener("transitionend",X)};K.addEventListener("transitionend",X)}))})})},te=(z,j)=>{try{try{j.dataTransfer?.setData("text/plain",String(z))}catch{}try{j.dataTransfer&&(j.dataTransfer.effectAllowed="move")}catch{}try{const F=document.createElement("div");F.style.cssText="position:absolute;top:-9999px;left:-9999px;width:1px;height:1px;opacity:0;pointer-events:none;",document.body.appendChild(F),j.dataTransfer?.setDragImage(F,0,0),requestAnimationFrame(()=>{try{document.body.removeChild(F)}catch{}})}catch{}}catch{}k(z);try{const F=g[z],O=document.createElement("div");O.className="order-list__dragging-object order-list__dragging-object--visible",O.textContent=F&&F.text?F.text:"",document.body.appendChild(O),x.current=O;const G=M.current.get(F.id);let ie=j.clientX||0,K=j.clientY||0;try{if(G&&G.getBoundingClientRect){const W=G.getBoundingClientRect();ie=W.left+W.width/2,K=W.top+W.height/2}}catch{}const pe=O.getBoundingClientRect(),X=pe.width/2,H=pe.height/2;L.current={dx:X,dy:H},O.style.transition="none",N.current={x:ie,y:K},O.style.transform=`translate3d(${ie-X}px, ${K-H}px, 0)`,requestAnimationFrame(()=>{try{O.style.transition=""}catch{}U()});const ne=W=>{const oe=W;N.current={x:oe.clientX,y:oe.clientY},U()};B.current=ne,document.addEventListener("mousemove",ne);const V=W=>{const oe=W;N.current={x:oe.clientX,y:oe.clientY},U()};A.current=V,document.addEventListener("dragover",V);try{j.dataTransfer?.setData("text/plain",String(z));try{j.dataTransfer?.setData("application/json",JSON.stringify({idx:z}))}catch{}}catch{}}catch{}},I=(z,j)=>{j.preventDefault();try{j.dataTransfer&&(j.dataTransfer.dropEffect="move")}catch{}try{D.current!==null&&(clearTimeout(D.current),D.current=null);const F=j.currentTarget&&j.currentTarget.closest?j.currentTarget.closest(".order-list__item"):null;if(F&&E.current!==F){if(E.current)try{E.current.classList.remove("drag-over")}catch{}try{F.classList.add("drag-over")}catch{}E.current=F}}catch{}},Y=(z,j)=>{j.preventDefault();const F=j.dataTransfer?.getData("text/plain")||"",O=F?parseInt(F,10):v,G=z;if(typeof O!="number"||isNaN(O)||O===G){k(null),Z(),R();return}const ie=Ef(g,O,G);ee(ie),k(null),R();try{if(typeof l=="function"&&C==="active"){const K=ie.filter((pe,X)=>pe.text===h(p[X])).length;l({shuffled:ie,score:K,total:(p||[]).length,__ts:Date.now()})}}catch{}try{requestAnimationFrame(()=>{const K=document.querySelectorAll(".order-list .order-list__item")[G];if(!K)return;const pe=K.querySelector(".order-list__slot")||K;try{pe.classList.add("pulse"),pe.offsetHeight,pe.classList.add("to-dark");const X=()=>{pe.classList.remove("pulse","to-dark"),pe.removeEventListener("transitionend",X)};pe.addEventListener("transitionend",X)}catch{}})}catch{}Z()},R=()=>{if(x.current){try{document.body.removeChild(x.current)}catch{}x.current=null}A.current&&(document.removeEventListener("dragover",A.current),A.current=null),B.current&&(document.removeEventListener("mousemove",B.current),B.current=null),$.current!==null&&(cancelAnimationFrame($.current),$.current=null)},q=()=>{k(null),Z(),R()};o.useEffect(()=>()=>R(),[]);const Z=()=>{try{if(D.current!==null&&(clearTimeout(D.current),D.current=null),E.current){try{E.current.classList.remove("drag-over")}catch{}E.current=null}document.querySelectorAll(".order-list .order-list__item").forEach(z=>z.classList.remove("drag-over"))}catch{}};return o.useEffect(()=>{try{const z=Math.max(1,(g||[]).length);g.forEach((j,F)=>{const O=P.current.get(j.id);if(!O)return;let G=50;z>1&&(G=Math.round(F/(z-1)*100));try{O.style.setProperty("--marker-pos",G+"%")}catch{}})}catch{}},[g]),o.useEffect(()=>()=>{R(),D.current!==null&&(clearTimeout(D.current),D.current=null)},[]),n.jsx(sa,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:d,children:n.jsx("div",{className:"order-list",children:g.map((z,j)=>{const F=Math.max(1,(g||[]).length),O=F>1?Math.round(j/(F-1)*100):50;return n.jsx("div",{className:"order-list__item",children:n.jsxs("div",{className:"order-list__slot","data-disabled":C==="disabled","aria-disabled":C==="disabled",children:[C!=="disabled"?n.jsx("div",{className:"order-list__marker caption-1",style:{"--marker-pos":O+"%"},ref:G=>{const ie=P.current;G?ie.set(z.id,G):ie.delete(z.id)},children:n.jsx("span",{className:"order-list__slot-number button-1",children:j+1})}):null,n.jsxs("div",{ref:G=>{const ie=M.current;G?ie.set(z.id,G):ie.delete(z.id)},className:`order-list__draggable ${v===j?"dragging":""}`,"data-disabled":C==="disabled","aria-disabled":C==="disabled",tabIndex:C==="disabled"?-1:0,draggable:f,onDragStart:f?G=>te(j,G):void 0,onDragEnter:f?G=>I(j,G):void 0,onDragOver:f?G=>I(j,G):void 0,onDragLeave:f?()=>{try{D.current!==null&&clearTimeout(D.current),D.current=setTimeout(()=>{try{const G=document.querySelectorAll(".order-list .order-list__item");G&&G[j]&&(G[j].classList.remove("drag-over"),E.current===G[j]&&(E.current=null))}catch{}},80)}catch{}}:void 0,onDrop:f?G=>Y(j,G):void 0,onDragEnd:f?q:void 0,children:[n.jsx("span",{className:"order-list__item-text body-2",children:z.text}),f?n.jsxs("span",{className:"order-list__item-buttons",children:[n.jsx(fe,{htmlType:"button",size:32,type:"dot",onClick:()=>w(j,-1),ariaLabel:c("training.up"),icon:"chevron-up",variant:"transparent-gray",width:48,useFaded:"true",disabled:j===0,useBorder:!1,useDisabledInvisible:!0}),n.jsx(fe,{htmlType:"button",size:32,type:"dot",onClick:()=>w(j,1),ariaLabel:c("training.down"),icon:"chevron-down",variant:"transparent-gray",width:48,useFaded:"true",disabled:j===g.length-1,useBorder:!1,useDisabledInvisible:!0})]}):null]})]})},z.id)})})})}const Cx=8e3;function fx(e,t){return new Promise(a=>{let r=!1;const s=()=>{r||(r=!0,a())};e.then(s,s),setTimeout(s,t)})}function Jc({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,onDone:l,onChange:i,context:u=[],selectable:c=!1,hideLabel:d=!1,hideAudio:h=!1,maxCards:p,playAllGapMs:m=0}){const{t:g}=_e.useTranslation(),y=s??g("training.cardInstructions","\uB0B1\uB9D0 \uCE74\uB4DC\uB97C \uBCF4\uACE0 \uC18C\uB9AC\uB97C \uB4E3\uACE0 \uD655\uC778\uD558\uC138\uC694."),C=o.useMemo(()=>Array.isArray(u)?u:u&&u.items||[],[u]),f=p??3,_=(C||[]).slice(0,f);(C||[]).length>f&&console.warn(`TrainingStepCard: ${C.length} items passed but only ${f} shown`);const b=typeof e=="number"?e:-1,w=typeof t!="number"?"disabled":b<t?"done":b===t?"active":"disabled",[v,k]=o.useState(null),x=o.useRef([]),[A,B]=o.useState(!1),E=o.useRef(null),D=o.useRef(!0);o.useEffect(()=>(D.current=!0,()=>{D.current=!1}),[]);const N=o.useMemo(()=>C.map(T=>T?.id??T?.word??"").join("|"),[C]);o.useEffect(()=>{k(null)},[N]);const $=o.useRef(void 0);o.useEffect(()=>{const T=$.current;typeof T=="number"&&typeof t=="number"&&typeof e=="number"&&T>=e&&t<e&&k(null),$.current=t},[t,e]);const L=o.useCallback((T,ee)=>{if(c)return;const te={item:T,index:ee,__ts:Date.now()};try{typeof i=="function"&&i(te)}catch{}if(w==="active"&&typeof l=="function")try{l(te)}catch{}},[c,i,w,l]),U=o.useRef(m);o.useEffect(()=>{U.current=Math.max(0,m||0)},[m]);const M=o.useCallback(async()=>{if(A||w==="disabled")return;B(!0);let T=!1;const ee=new Promise(te=>{E.current=()=>{T=!0,te()}});try{for(let te=0;te<_.length&&!(!D.current||T);te++){const I=x.current[te];if(!I)continue;await Promise.race([fx(I.play(),Cx),ee]);const Y=Math.max(0,U.current||0);Y>0&&te<_.length-1&&!T&&D.current&&await Promise.race([new Promise(R=>{setTimeout(R,Y)}),ee])}}finally{E.current=null,B(!1)}},[A,w,_.length]),P=o.useCallback((T,ee)=>{if(!la(w))return;k(ee);const te={selectedValue:T.word||T.title||"",selectedIndex:ee,item:T,__ts:Date.now()};try{typeof i=="function"&&i(te)}catch{}if(typeof l=="function")try{l(te)}catch{}},[i,w,l]);return n.jsx(sa,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:y,onDone:l,titleProps:{usePlayAllBtn:!h&&_.length>0,onPlayAll:M,playAllActive:A},children:n.jsx("div",{className:"training-step__cards",onClickCapture:T=>{const ee=E.current;if(!ee)return;const te=T.target;te&&typeof te.closest=="function"&&te.closest(".training-word-card__bottom")&&ee()},children:_.length===0?n.jsx("div",{className:"training-step__empty",children:g("training.noCards","\uCE74\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}):_.map((T,ee)=>n.jsx(ns,{ref:te=>{x.current[ee]=te},item:T,disabled:w==="disabled",onPlayDone:()=>L(T,ee),selectable:c,selected:c&&v===ee,onSelect:c?()=>P(T,ee):void 0,flipDelay:ee*120,hideLabel:d,hideAudio:h},T&&T.id||ee))})})}const bx=160;function gx(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 Qc(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"}]}gx(Kt.t.bind(Kt)),Qc(Kt.t.bind(Kt));const Mr="none",yx=.5,vx=1.5,_x=.25;function Es({title:e,valueLabel:t,value:a,min:r,max:s,step:l,tickStep:i,size:u,disabled:c,onChange:d}){return n.jsxs(un,{variant:"custom",label:e,useFullWidth:!0,children:[n.jsx(Gu,{value:a,onChange:d,min:r,max:s,step:l,size:u,showBgTick:!0,tickStep:i,ariaLabel:e,disabled:c,className:se("noise-settings-tooltip__slider-input")}),n.jsx("div",{className:se(Be("noise-settings-tooltip__value","button-1",c?"noise-settings-tooltip__value--disabled":"")),children:t})]})}function ed({anchorRect:e,onClose:t,hideNoiseRows:a=!1}){const{t:r}=_e.useTranslation(),s=yn("(max-width: 767px)")?40:24,l=Er(),i=rr(l?.settings??oa),u=l?.settings.type??"defaultNoise",c=l?.settings.enabled??!0,d=l?.playbackRate??1,h=l?.mainVolume??1,p=Math.round(h*100),m=o.useCallback(_=>{try{l?.setMainVolume(Math.max(0,Math.min(1,_/100)))}catch{}},[l]),g=o.useCallback(_=>{try{l?.setPlaybackRate(_)}catch{}},[l]),y=o.useCallback(_=>{const b=Math.min(ar,Math.max(0,Math.round(_*10)/10));try{l?.setSettings({noiseRatio:b})}catch{}},[l]),C=o.useCallback(_=>{try{_===Mr?l?.setSettings({enabled:!1}):l?.setSettings({type:_,enabled:!0})}catch{}},[l]),f=[{key:Mr,label:r("training.noise.type.none","\uC5C6\uC74C")},...Qc(r).map(_=>({key:_.value,label:_.label}))];return n.jsx(Bn,{anchorRect:e,offset:12,onClose:t,ariaLabel:r("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815"),isMobilePopup:!1,closeOnOutsideClick:!1,header:n.jsxs("div",{className:se("noise-settings-tooltip__header"),children:[n.jsx("span",{children:r("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815")}),n.jsx(fe,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,ariaLabel:r("common.close","\uB2EB\uAE30"),onClick:t})]}),children:n.jsxs(Qa,{className:se("noise-settings-tooltip"),useBorder:!1,labelWidth:72,children:[n.jsx(Es,{title:r("training.playVolumeTitle","\uC804\uCCB4 \uC18C\uB9AC"),valueLabel:`${p}%`,value:p,min:0,max:100,step:10,size:s,onChange:m}),n.jsx(Es,{title:r("training.playSpeedTitle","\uC7AC\uC0DD \uC18D\uB3C4"),valueLabel:`${d.toFixed(2)}x`,value:d,min:yx,max:vx,step:_x,size:s,onChange:g}),!a&&n.jsxs(n.Fragment,{children:[n.jsx(un,{variant:"custom",label:r("training.noiseTypeTitle","\uC18C\uC74C \uC885\uB958"),useFullWidth:!0,children:n.jsx(vn,{ariaLabel:r("training.noiseTypeTitle","\uC18C\uC74C \uC885\uB958"),size:40,shape:"rounded",options:f,value:c?u:Mr,onChange:C})}),n.jsx(Es,{title:r("training.noiseRatioTitle","\uC18C\uC74C \uBE44\uC728"),valueLabel:r("training.noiseRatioValue","{{ratio}}\uBC30",{ratio:i.toFixed(1)}),value:i,min:0,max:ar,step:$c,size:s,disabled:!c,onChange:y})]}),a&&n.jsx("div",{className:se("noise-settings-tooltip__width-ghost"),"aria-hidden":"true",inert:!0,children:n.jsx(un,{variant:"custom",label:"\xA0",useFullWidth:!0,children:n.jsx(vn,{ariaLabel:"width-ghost",size:40,shape:"rounded",options:f,value:Mr,onChange:()=>{}})})})]})})}function td({useNoiseSettingBtn:e=!1,onSettings:t,onNext:a,onResult:r,stepIndex:s=0,stepCount:l=0,pageIndex:i=0,pageCount:u=1,resultOpen:c=!1,hideNoiseRows:d=!1}){const{t:h}=_e.useTranslation(),[p,m]=o.useState(!1),[g,y]=o.useState(null),[C,f]=o.useState(!1),_=o.useRef(null),b=o.useRef(null),w=Er(),v=u>0,k=v&&i<u-1,x=!v||i>=u-1,A=s===Math.max(0,l);o.useEffect(()=>{e||(m(!1),y(null))},[e]);const B=o.useCallback(()=>{m(!1),y(null)},[]),E=o.useCallback(()=>{if(p){m(!1),y(null);return}const ee=_?.current?.getBoundingClientRect();ee&&y(ee),t?.(),m(!0)},[p,t]),D=o.useCallback(()=>{if(p){m(!1),y(null);return}const ee=b?.current?.getBoundingClientRect();ee&&y(ee),t?.(),m(!0)},[p,t]),N=yn("(max-width: 767px)"),$=o.useRef(null),[L,U]=o.useState(null),M=o.useCallback(()=>{f(ee=>{const te=!ee;return U(te?$.current?.getBoundingClientRect()??null:null),te})},[]),P=o.useCallback(()=>{f(!1),U(null)},[]);o.useEffect(()=>{c&&(f(!1),U(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(Xo,{analyser:w?.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(Xo,{analyser:w?.noiseAnalyser??null,orientation:"horizontal",length:112,label:"db",labelPos:"left",ariaLabel:h("training.meter.noise","\uC18C\uC74C")})]})]});return Yc(e&&p,()=>typeof document<"u"?document.querySelector(".noise-settings-tooltip__header")?.closest(".tooltip__content")??null:null,()=>[_.current,b.current].map(ee=>ee?.querySelector("button")??null).find(ee=>!!ee&&ee.getClientRects().length>0)??_.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:_,className:"pp-bottom__tooltip-trigger","data-tooltip-ignore":!0,children:n.jsx(fe,{htmlType:"button",size:56,type:"bar",icon:"settings",onClick:E,className:p?"is-selected":void 0,"aria-expanded":p,"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:b,className:"pp-bottom__tooltip-trigger","data-tooltip-ignore":!0,children:n.jsx(fe,{htmlType:"button",size:56,type:"dot",shape:"pill",icon:"settings",onClick:D,className:p?"is-selected":void 0,"aria-expanded":p,"aria-haspopup":"dialog",ariaLabel:h("training.settings","\uC124\uC815")})})})]}):null,e&&n.jsx("div",{ref:$,className:"pp-bottom__meter-trigger","data-tooltip-ignore":!0,children:n.jsx(fe,{htmlType:"button",size:40,type:"dot",shape:"pill",icon:"audio-lines",onClick:M,selected:C,"aria-expanded":N?C:void 0,ariaLabel:h("training.meter.toggle","\uC624\uB514\uC624 \uBBF8\uD130 \uD45C\uC2DC")})}),e&&C&&!N&&n.jsx("div",{className:"pp-bottom__meters",children:T})]}),e&&C&&N&&L&&n.jsx(Bn,{anchorRect:L,onClose:P,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:[x&&n.jsx(fe,{htmlType:"button",size:56,type:"bar",icon:"check",onClick:typeof r=="function"?r:a,ariaLabel:h("training.viewResult","\uACB0\uACFC\uBCF4\uAE30"),label:h("training.viewResult","\uACB0\uACFC\uBCF4\uAE30"),variant:"main",disabled:!A}),k&&n.jsx(fe,{htmlType:"button",size:56,type:"bar",rightIcon:"chevron-right",align:"right",onClick:a,ariaLabel:h("training.nextQuestion","\uB2E4\uC74C \uBB38\uC81C"),label:h("training.nextQuestion","\uB2E4\uC74C \uBB38\uC81C"),variant:"main",disabled:!A})]}),e&&p&&n.jsx(ed,{anchorRect:g,onClose:B,hideNoiseRows:d})]})}function nd({title:e,subtitle:t,desc:a,depth:r,icon:s,wrapperStyle:l,iconTooltip:i,pageIndex:u,pageCount:c,progressMax:d,progressIndex:h,onBack:p,onClose:m}){const{t:g}=_e.useTranslation(),y=yn("(max-width: 767px)"),C=Number.isInteger(h)?h:u||0,f=Number.isInteger(d)?d:c||0,_=p||m,b=Array.isArray(r)?y?r[r.length-1]:r.join(" / "):r,w=typeof e=="string"?e.trim():e,v=typeof t=="string"?t.trim():t,k=!!(w||v),x=k?w||v:g("common.emptyTrainingName","\uD6C8\uB828 \uC774\uB984\uC774 \uBE44\uC5B4 \uC788\uC2B5\uB2C8\uB2E4."),A=b||(w?t:void 0),B=y&&typeof A=="string"&&(A.includes(" \xB7 ")||A.includes(" / "))?A.split(/\s[·/]\s/).pop():A,E=o.useMemo(()=>{const D=l&&typeof l=="object"?{...l}:{};return!("width"in D)&&!("height"in D)&&(D.width="40px",D.height="40px"),D},[l]);return n.jsxs("header",{className:"pp-title training-popup-title",children:[n.jsxs("div",{className:"pp-title__left",children:[_?n.jsx(fe,{htmlType:"button",size:48,type:"dot",icon:"chevron-left",ariaLabel:g("common.back","\uB4A4\uB85C"),onClick:_,useBorder:!1,iconSize:"large",iconColor:"--color-black",variant:"transparent-gray"}):null,n.jsx("div",{children:s?n.jsx(gu,{icon:s,label:e,tooltip:i,wrapperStyle:E}):null}),n.jsxs("div",{className:"pp-title__text",children:[B?n.jsx("span",{className:"pp-title__depth caption-1",children:B}):null,n.jsx("span",{className:`pp-title__title h2${k?"":" pp-title__title--empty"}`,children:x}),a?n.jsx("span",{className:"pp-title__description caption-1",children:a}):null]})]}),n.jsx(Xu,{max:Math.max(0,f??0),index:Math.max(0,C??0)})]})}function xx(){typeof window<"u"&&window.dispatchEvent(new CustomEvent("speechear.popup.close"))}function wx(e){return!e&&e!==0?[]:Array.isArray(e)?e.flatMap(t=>typeof t=="string"?t.split("|").map(a=>a.trim()).filter(Boolean):t||t===0?[String(t)]:[]):typeof e=="string"?e.split("|").map(t=>t.trim()).filter(Boolean):[String(e)]}const ad=(e,t)=>{if(!t)return t;const a=typeof Kt?.t=="function"?Kt.t(e,{defaultValue:t}):void 0;return typeof a=="string"&&a?a:t};function rd(e,t,a){const r=e,s=r?.title||r?.name||(Array.isArray(t)?t[t.length-1]:void 0)||a||"\uD6C8\uB828",l=Xl().find(u=>u.key===(r?.category_0||r?.category_main_code)),i=l?.subs?.find(u=>u.key===(r?.category_1||r?.category_sub_code));return{title:s,label:r?.title||s,depth:t,icon:l?.icon,wrapperStyle:l?.color?{"--t-item-fg":l.color}:void 0,iconTooltip:[l?ad(`topic.${l.key}`,l.label):void 0,i?ad(`topic.sub.${i.key}`,i.label):void 0].filter(Boolean).join(" / ")||void 0}}function Ds(e){return e&&typeof e=="object"&&typeof e.__ts=="number"?e.__ts:0}function od(e,t,a){if(!e||typeof e!="object"||Array.isArray(e))return e;const r=e,s=typeof a=="number"&&a>0?a:Date.now();return{...r,...r.shownAt===void 0&&t?{shownAt:t}:{},...r.answeredAt===void 0?{answeredAt:new Date(s).toISOString()}:{}}}function Bx(e){const t=e;return Array.isArray(t?.items)?t.items:Array.isArray(e)?e:e?[e]:[]}function kx({idPrefix:e,trainingData:t,depth:a,fallbackTitle:r="\uD6C8\uB828",pages:s=[],emptyMessage:l,buildResults:i,metaPatch:u}){const c=rd(t,a,r),d=typeof u=="function"?u(c)||{}:u||{},h=t?.id||t?.title||s.length;return{id:`${e}:${h}`,meta:{...c,...d},pages:s,emptyMessage:l,buildResults:i}}function Ax(e){if(typeof e=="string")return e;if(e&&typeof e=="object"){const t=e;return t.context||t.sentence||t.question||""||""}return""}function Nx(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 Ex(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 sd(e,t){if(!(!e||typeof e!="object"))return e[`step-${t}`]}function Dx(e,t,a,r){return sd(e,t*a+r)}function Sx({payload:e,selected:t,choices:a=[],correctAnswers:r=[]}){if(e&&typeof e=="object"){const s=e;if(Array.isArray(s.selectedValues))return r.every(l=>s.selectedValues.includes(l))&&s.selectedValues.every(l=>r.includes(l));if(typeof s.correct=="boolean")return s.correct}if(r.length){if(typeof t=="number"&&Array.isArray(a)&&a.length)return r.some(s=>String(s)===String(a[t]));if(typeof t<"u")return r.some(s=>String(s)===String(t))}}function jx(e){return e?Array.isArray(e.items)?e.items.map(t=>{const a=t;return typeof t=="string"?{sentence:t}:{sentence:a.context||a.sentence||"",contextCode:a.contextCode||a.context_code}}):Array.isArray(e.sentences)?e.sentences.map(t=>{const a=t;return typeof t=="string"?{sentence:t}:{sentence:a.sentence||a.context||"",contextCode:a.contextCode}}):Array.isArray(e.contexts)?e.contexts:e.contextCode?[{contextCode:e.contextCode}]:[]:[]}const ld=o.createContext(null);function Tx(){const e=o.useContext(ld);if(!e)throw new Error("useTrainingPagePopupContext must be used inside TrainingPagePopup");return e}function Mx({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,choices:l=[],onDone:i,onChange:u}){const{t:c}=_e.useTranslation(),d=typeof e=="number"?e:-1,h=typeof t!="number"?"disabled":d<t?"done":d===t?"active":"disabled",[p,m]=o.useState(()=>l.map(()=>null)),g=JSON.stringify(l),y=l.length;o.useEffect(()=>{m(Array.from({length:y},()=>null))},[g]);const C=o.useRef(void 0);o.useEffect(()=>{const w=C.current;typeof w=="number"&&typeof t=="number"&&typeof e=="number"&&w>=e&&t<e&&m(Array.from({length:y},()=>null)),C.current=t},[t,e,y]);const f=o.useMemo(()=>p.filter(w=>w!==null).length+1,[p]),_=o.useCallback(w=>{if(!la(h))return;const v=p;let k;if(v[w]!=null){const A=v[w];k=v.map(B=>B!==null&&B>=A?null:B)}else k=[...v],k[w]=f;m(k);const x={selectedOrder:k,words:l,__ts:Date.now()};try{typeof u=="function"&&u(x)}catch{}if(v[w]==null&&k.length>0&&k.every(A=>A!==null))try{typeof i=="function"&&i(x)}catch{}},[h,p,f,u,i,l]),b=s??c("training.selectInOrder","\uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uCE74\uB4DC\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return n.jsx(sa,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:b,onDone:i,children:n.jsx("div",{className:"training-step__cards",children:l.map((w,v)=>n.jsx(ns,{item:{word:w},disabled:h==="disabled",selectable:!0,selected:p[v]!==null,orderRank:p[v],onSelect:()=>_(v),flipDelay:v*120,hideLabel:!1,hideAudio:!0},`${w}-${v}`))})})}function Lr(e){return null}Lr.__isTrainingPage=!0;function ka(e,t){const a=Tx();return{ctx:a,index:e,stepIndex:a.currentStepIndex,isLast:typeof e=="number"&&typeof t=="number"?e===t-1:!1,onDone:r=>a.handleStepDone(r,e),onChange:r=>a.handleStepChange(r,e)}}function id({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i}=ka(e,t);return n.jsx(As,{...a,index:r,stepIndex:s,isLast:l,onDone:i})}function ud({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=ka(e,t);return n.jsx(Bs,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}function cd({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=ka(e,t);return n.jsx(ks,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}function dd({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=ka(e,t);return n.jsx(Ns,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}function pd({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=ka(e,t);return n.jsx(Jc,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}function Lx({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=ka(e,t);return n.jsx(Mx,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}const hd=3e4,$x=/^(https?:|blob:|data:audio|\/|\.\/)/;function md(e){return typeof e=="string"&&$x.test(e)?e:null}const Rx=e=>typeof e=="string"&&e.trim()!==""?e:null,Ss=Symbol("timed-out");function Px(e,t){if(t<=0)return Promise.resolve(Ss);let a;return Promise.race([Promise.resolve(e),new Promise(r=>{a=setTimeout(()=>r(Ss),t)})]).finally(()=>clearTimeout(a))}function Fx(e){return e?ja()||sr()?!0:typeof window<"u"&&!!window.speechSynthesis:!1}function Ix(e,t){const a=[],r=md(t);r&&a.push({kind:"raw",resolve:async()=>r});const s=(e??"").trim();if(!s)return a;for(const[l,i]of[["urlResolver",ja()],["fallbackUrlResolver",sr()]])i&&a.push({kind:l,resolve:async u=>{let c;try{c=await Px(i(s),u)}catch(h){return At(`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===Ss?(At(`question-sound-slow-${l}`,`[core] configureTTS \uC758 ${l} \uAC00 ${hd}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):Rx(c)||(At(`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 a}function Ox(){return Date.now()+hd}const zx=(e,t)=>Math.max(0,e-Date.now())/Math.max(1,t);function Wx(e){At("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 $r(...e){for(const t of e)if(typeof t=="string"){const a=t.trim();if(a.length)return a}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 a=t,r=[a.text,a.label,a.value];for(const s of r){if(typeof s=="string"&&s.trim().length)return s.trim();if(typeof s=="number"||typeof s=="boolean")return String(s)}}}return null}function Hx(e){return $r(e?.question,e?.q,e?.sentence,e?.text,e?.prompt,e?.wording)}function Vx(e){return md($r(e?.questionSound,e?.soundSrc,e?.audioSrc,e?.sound,e?.audio,e?.src))}function Cd(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=$r(e?.status,e?.result,e?.judge,e?.note);if(t){const a=t.toLowerCase();if(["ok","true","\uB9DE\uC74C","\uC815\uB2F5"].some(r=>a.includes(r)))return!0;if(["ng","false","\uD2C0\uB9BC","\uC624\uB2F5"].some(r=>a.includes(r)))return!1}}function fd(e){const{score:t,contextsLength:a,results:r=[],subtitle:s,onReplay:l,onClose:i,inline:u=!1,pending:c=!1}=e||{},{t:d}=_e.useTranslation(),h=o.useId(),p=o.useCallback(()=>!c,[c]);o.useEffect(()=>{const D=a??0;if(t!=null&&D>0&&t/D>.5){const N=window.setTimeout(()=>{window.dispatchEvent(new CustomEvent("party:trigger",{detail:{count:140,strength:1.6,duration:2200}}))},0);return()=>window.clearTimeout(N)}},[t,a]);const m=o.useCallback(D=>{const N=Cd(D),$=$r(D?.wording,D?.label);return N===!0?{variant:"main",label:$??d("training.result.heardWell","\uC798 \uB4E4\uC5C8\uC5B4\uC694")}:N===!1?{variant:"danger",label:$??d("training.result.notHeard","\uBABB \uB4E4\uC5C8\uC5B4\uC694")}:{variant:"disabled",label:$??d("training.result.notJudged","\uBBF8\uD310\uC815")}},[d]),g=a??0,y=t??0,C=o.useMemo(()=>Array.isArray(r)?r:[],[r]),f=o.useRef(null),[_,b]=o.useState(null),w=o.useCallback(()=>{f.current?.(),f.current=null,b(null)},[]);o.useEffect(()=>w,[w]);const v=o.useRef(0),k=(D,N)=>{if(!zn)return;const $=Math.round(performance.now()-v.current);console.debug(`[core][\uB2E4\uC2DC\uB4E3\uAE30] +${$}ms ${D}`,N??"")},x=o.useRef(0),A=o.useCallback((D,N,$)=>{w();const L=++x.current,U=()=>x.current===L;v.current=zn?performance.now():0,k(`\uB20C\uB800\uB2E4 \u2014 \uC904 ${D}`,{text:N,rawUrl:$}),b(D),f.current=()=>{k("\uBA48\uCD94\uAC1C\uAC00 \uBD88\uB838\uB2E4(\uC8FC\uC18C \uC5BB\uAE30 \uC804)"),x.current++,to()};const M=te=>{k("\uD2BC\uB2E4",te);const I=Ya(te,Y=>{k(`\uB05D\uB0AC\uB2E4 \u2014 ${Y?"\uB05D\uAE4C\uC9C0 \uB4E4\uC5C8\uB2E4":"\uBABB \uD2C0\uC5C8\uAC70\uB098 \uBA48\uCDC4\uB2E4"}`,{mine:U()}),Y&&U()&&(f.current=null,b(null))});return f.current=()=>{k("\uBA48\uCD94\uAC1C\uAC00 \uBD88\uB838\uB2E4(\uD2B8\uB294 \uC911)"),x.current++,I.stop(),to()},I.done},P=Ix(N,$);k("\uCC28\uB840",P.map(te=>te.kind));const T=P[0]?.kind==="raw",ee=T?M($):Promise.resolve(!1);(async()=>{if(await ee||!U())return;const te=Ox(),I=T?P.slice(1):P;for(let Y=0;Y<I.length;Y++){if(!U())return;k(`${I[Y].kind} \uC5D0\uAC8C \uBB3B\uB294\uB2E4`);const R=await I[Y].resolve(zx(te,I.length-Y));if(k(`${I[Y].kind} \uAC00 \uB2F5\uD588\uB2E4`,R),!U()||R&&(await M(R)||!U()))return}U()&&(k("\uC8FC\uC18C\uB97C \uD558\uB098\uB3C4 \uBABB \uC5BB\uC5C8\uB2E4 \u2014 \uB0AD\uB3C5\uC73C\uB85C \uAC04\uB2E4"),Wx(N),f.current=()=>{x.current++,to()},k("\uB0AD\uB3C5\uD55C\uB2E4"),$1(N,{onEnd:()=>{U()&&(f.current=null,b(null))}}))})()},[w]),B=o.useMemo(()=>C.map(D=>{const N=D??{},$=Hx(N)||d("training.result.noContent","(\uB0B4\uC6A9\uC5C6\uC74C)"),{variant:L,label:U}=m(N),M=Array.isArray(N.corrects)?N.corrects:[],P=M.length?M.join(", "):N.answer!=null&&N.answer!==""?String(N.answer):null,T=typeof N.selectedText=="string"?N.selectedText:null,ee=Cd(N)===!0,te=Vx(N),I=!!te||Fx($);return{problem:$,variant:L,label:U,answer:P,selectedText:T,isCorrect:ee,sound:te,canHear:I}}),[C,m,d]),E=o.useMemo(()=>B.some(D=>D.answer!==null||D.selectedText!==null),[B]);return n.jsx(Pn,{onClose:i,closeOnBackdrop:!1,inline:u,ariaLabel:d("training.result.title","\uD6C8\uB828\uC744 \uBAA8\uB450 \uB9C8\uCCE4\uC2B5\uB2C8\uB2E4."),className:"popup--training-result",beforeClose:p,footerClassName:"trp-result__foot",footer:({animateThen:D,closeWithAnimation:N})=>n.jsxs(n.Fragment,{children:[c&&n.jsx("p",{id:h,className:"trp-actions__reason caption-1",role:"status",children:d("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(fe,{htmlType:"button",size:56,type:"bar",label:d("training.result.replay","\uB2E4\uC2DC\uD558\uAE30"),onClick:()=>D(l)}),n.jsx(fe,{htmlType:"button",size:56,type:"bar",label:d("training.result.done","\uC644\uB8CC"),variant:"main",onClick:N,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:d("training.result.eyebrow","\uD6C8\uB828 \uC644\uB8CC")}),n.jsx("h1",{className:"trp-result__title h2",children:d("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":d("training.result.scoreAria",{correct:y,total:g}),children:[n.jsx("span",{className:"trp-score__big",children:y}),n.jsx("span",{className:"trp-score__sep",children:"/"}),n.jsx("span",{className:"trp-score__total",children:g})]})})]}),B.length>0&&n.jsx("section",{className:"trp-result__body",children:n.jsxs("div",{className:`result-table${E?" result-table--answer":""}`,role:"table","aria-label":d("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:d("common.col.problem","\uBB38\uC81C")}),E&&n.jsx("span",{role:"columnheader",children:d("training.result.colAnswerSelected","\uC815\uB2F5 \xB7 \uC120\uD0DD")}),n.jsx("span",{className:"col-right",role:"columnheader",children:d("training.result.colJudge","\uD310\uC815")})]}),B.map((D,N)=>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(N+1).padStart(2,"0")}),n.jsx("div",{className:"trp-row__q body-2",children:D.problem}),D.canHear&&n.jsx(fe,{htmlType:"button",size:32,type:"dot",useBorder:!1,icon:_===N?"square":"volume-2",className:"trp-row__replay",ariaLabel:_===N?d("training.result.replaySoundStop",{no:N+1,defaultValue:"{{no}}\uBC88 \uB4E3\uAE30 \uBA48\uCDA4"}):d("training.result.replaySound",{no:N+1,defaultValue:"{{no}}\uBC88 \uB2E4\uC2DC \uB4E3\uAE30"}),onClick:()=>_===N?w():A(N,D.problem,D.sound)})]}),E&&n.jsxs("div",{className:"trp-row__answers",children:[D.answer!==null&&n.jsxs("div",{className:"trp-row__answer-line",children:[n.jsx("span",{className:"trp-row__answer-label answer-correct caption-1",children:d("training.result.colAnswer","\uC815\uB2F5")}),n.jsx("span",{className:"trp-row__answer-value body-2",children:D.answer})]}),n.jsxs("div",{className:"trp-row__answer-line",children:[n.jsx("span",{className:`trp-row__answer-label answer-selected caption-1 ${D.isCorrect?"is-correct":"is-wrong"}`,children:d("training.result.colSelected","\uC120\uD0DD")}),n.jsx("span",{className:`trp-row__answer-value body-2 ${D.isCorrect?"is-correct":"is-wrong"}`,children:D.selectedText??"\u2014"})]})]}),n.jsx("div",{className:"trp-row__judge",children:n.jsx(ln,{variant:D.variant,label:D.label,fill:"soft",minWidth:80})})]},N))]})})]})})}const js=new Set;function qx(e){o.useEffect(()=>{if(!e||js.has(e))return;js.add(e);const t=()=>typeof document>"u"||document.visibilityState!=="hidden";let a=null,r=null,s=0,l=0;const i=()=>{const h=Date.now();a==null&&(a=h),r==null&&(r=h)},u=()=>{r!=null&&(s+=Date.now()-r,r=null)};t()&&i();const c=()=>{if(u(),a==null)return;const h=s-l;if(h<1e3||l===0&&s<5e3)return;const p=Date.now(),m=p-h;l=s,jf({trainingType:e,startedAt:new Date(m).toISOString(),endedAt:new Date(p).toISOString()})},d=()=>{t()?i():c()};return typeof document<"u"&&document.addEventListener("visibilitychange",d),typeof window<"u"&&window.addEventListener("pagehide",c),()=>{typeof document<"u"&&document.removeEventListener("visibilitychange",d),typeof window<"u"&&window.removeEventListener("pagehide",c),c(),js.delete(e)}},[e])}function Rr(e,t){return e&&e.id||`page-${t??0}`}function Pr(e,t){return e&&e.key||`step-${t??0}`}function Fr(){return{pageIndex:0,stepIndex:0,answersByPage:{}}}function Ux(e,t){return typeof e?.props=="function"?e.props(t)||{}:e?.props||{}}const Gx=300,Kx=()=>{try{return typeof window<"u"&&!!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches}catch{return!1}},On=Object.freeze({}),bd=new Set(["LISTEN_IN_NOISE","SHORT_STORY","LONG_STORY","ORDERING_SENTENCE"]);function Ts(e){const t=e,a=t?.results||t?.answers||[],r=Array.isArray(a)&&a.length>0?a.length:null,s=Array.isArray(a)?a.filter(l=>l?.correct===!0||l?.isCorrect===!0||l?.score===1||l?.heard===!0||l?.judgement===!0).length:null;return{results:a,correct:r!=null?s:null,total:r}}const Yx=e=>n.jsx(fd,{score:e.score,contextsLength:e.contextsLength,results:e.results,onReplay:e.onReplay,onClose:e.onClose,pending:e.pending});function Zx(e){const{scenario:t,title:a,subTitle:r,depth:s,icon:l,wrapperStyle:i,iconTooltip:u,pageIndex:c,pageCount:d,stepIndex:h,stepCount:p,onBack:m,onComplete:g,onRoundFinished:y,onNext:C,onSettings:f,useNoiseSetting:_=!0,children:b,ariaLabel:w,label:v,buildResults:k,onResult:x,typeKey:A,entryPoint:B,dailyTotal:E,itemRef:D,renderResultPopup:N,noiseOverride:$,hideNoiseRows:L=!1}=e;qx(A&&!bd.has(A)?A:"");const U=o.useRef(0);o.useEffect(()=>{U.current=Date.now()},[]);const{t:M}=_e.useTranslation(),P=x,T=!!t,ee=t?.id||null,te=t?.meta||{},I=Array.isArray(t?.pages)?t.pages:[],Y=Array.isArray(b)||o.isValidElement(b)&&typeof b!="function"?o.Children.toArray(b).filter(o.isValidElement):[],R=Y.length>0,q=de=>de===Lr||de?.__isTrainingPage===!0,Z=R&&Y.some(de=>q(de.type)),z=Z?Y.filter(de=>q(de.type)).map((de,Ne)=>{const Fe=de.props||{};return{id:`children-page-${Ne}`,steps:o.Children.toArray(Fe.children).filter(o.isValidElement),pageTop:Fe.pageTop||Fe.top||null,pageBottom:Fe.pageBottom||Fe.bottom||null}}):[{id:"children-page-0",steps:Y}],j=R&&!T&&typeof b!="function",F=j?Math.max(1,z.length):0;o.useEffect(()=>{if(!(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(typeof document>"u"||!document.body)return;const de=document.body;return de.dataset.ihabTrainingPopupCount=String(Number(de.dataset.ihabTrainingPopupCount||"0")+1),de.classList.add("ihab-training-popup-open"),()=>{const Ne=Number(de.dataset.ihabTrainingPopupCount||"1")-1;Ne>0?de.dataset.ihabTrainingPopupCount=String(Ne):(delete de.dataset.ihabTrainingPopupCount,de.classList.remove("ihab-training-popup-open"))}},[]),o.useEffect(()=>{if(!(typeof document>"u"||!document.body))return hv()},[]);const[O,G]=o.useState({...oa,enabled:!1}),ie=o.useRef(O);o.useEffect(()=>{ie.current=O},[O]);const K=o.useRef($),pe=o.useRef(!1),X=o.useRef(null);o.useEffect(()=>{let de=!1;const Ne=Fe=>{if(de)return;pe.current=!0;const Ze=Fe?ra({...oa,enabled:!1},Fe):{...oa},Oe=X.current;X.current=null;const J=Oe?ra(Ze,Oe):Ze;ie.current=J,G(J),Oe&&!K.current&&mo(J),pr(J);const ce=K.current;if(ce){const Ee=typeof ce=="function"?ce(J):ce,Ve=ra(J,Ee);ie.current=Ve,G(Ve),pr(Ve)}};return Wf().then(Fe=>{if(de){const Ze=X.current;if(X.current=null,Ze&&!K.current){const Oe=Fe?ra({...oa,enabled:!1},Fe):{...oa};mo(ra(Oe,Ze))}return}Ne(Fe)}),()=>{de=!0}},[]);const[H,ne]=o.useState(null),[V,W]=o.useState(null),oe=o.useCallback((de,Ne)=>{de==="main"?ne(Ne):W(Ne)},[]),xe=o.useRef(null),be=o.useRef(null),me=o.useCallback(()=>{be.current!==null&&(clearTimeout(be.current),be.current=null);const de=xe.current;xe.current=null,de&&mo(de)},[]);o.useEffect(()=>{if(typeof window>"u")return;const de=()=>{document.visibilityState==="hidden"&&me()};return window.addEventListener("pagehide",me),document.addEventListener("visibilitychange",de),()=>{window.removeEventListener("pagehide",me),document.removeEventListener("visibilitychange",de),me()}},[me]);const ke=o.useCallback(de=>{const Ne=ra(ie.current,de);if(ie.current=Ne,G(Ne),!pe.current){X.current={...X.current??{},...de},pr(Ne);return}K.current||(xe.current=Ne,be.current!==null&&clearTimeout(be.current),be.current=setTimeout(me,Gx)),pr(Ne)},[me]),Le=O.mainSpeed,Me=O.mainVolume,le=o.useCallback(de=>ke({mainSpeed:de}),[ke]),ve=o.useCallback(de=>ke({mainVolume:de}),[ke]),$e=o.useMemo(()=>({settings:O,setSettings:ke,registerAnalyser:oe,mainAnalyser:H,noiseAnalyser:V,playbackRate:Le,setPlaybackRate:le,mainVolume:Me,setMainVolume:ve}),[O,ke,oe,H,V,Le,le,Me,ve]),Ae=o.useRef(null),[Ie,ze]=o.useState(0),dt=o.useRef([]),[st,et]=o.useState("center"),[gt,Se]=o.useState(!1),Ge=o.useRef(!1),we=o.useRef(null),qe=o.useCallback(de=>{Ge.current||(Ge.current=!0,Se(!0),we.current=setTimeout(()=>{try{de()}catch{Ge.current=!1,Se(!1)}},Kx()?0:bx))},[]);o.useEffect(()=>()=>{we.current&&clearTimeout(we.current)},[]);const Ye=o.useRef(m);o.useEffect(()=>{Ye.current=m});const mt=o.useRef(typeof document>"u"?null:document.activeElement);o.useEffect(()=>{const de=Ae.current,Ne=mt.current;if(yo(de,Ne),de){const Fe=Array.from(de.querySelectorAll(En)).filter(Ze=>!Ze.closest('[aria-hidden="true"]'))[0];if(Fe)try{Fe.focus()}catch{}}return()=>{const Fe=document.activeElement;if(!Fe||Fe===document.body||de&&de.contains(Fe))try{vo(Ne)?.focus?.()}catch{}}},[]),o.useEffect(()=>Qn(()=>qe(()=>{const de=Ye.current;typeof de=="function"&&de()})),[qe]),bo(Ae,!0);const[wt,yt]=o.useState(!1),Et=o.useRef(!1),[at,rt]=o.useState(null),Dt=o.useRef(0),Bt=o.useRef(0),Lt=()=>{Dt.current+=1,Bt.current+=1,rt(null)},[It,xt]=o.useState(""),[lt,Ct]=o.useState(()=>Fr()),it=o.useRef(typeof c=="number"?c:null);o.useEffect(()=>{!T&&!j||(Ct(Fr()),Lt())},[T,ee,j]),o.useEffect(()=>{j&&Ct(de=>{const Ne=Math.max(0,Math.min(de.pageIndex,Math.max(0,F-1)));return Ne!==de.pageIndex?{...de,pageIndex:Ne,stepIndex:0}:de})},[j,F]);const _t=j?Math.max(0,Math.min(lt.pageIndex,F-1)):0,ut=j?z[_t]:null,St=j&&ut&&Array.isArray(ut.steps)?ut.steps:[],ue=T?lt.pageIndex:j?_t:typeof c=="number"?c:0,Te=T?I[Math.max(0,Math.min(lt.pageIndex,Math.max(0,I.length-1)))]:null,De=T&&Te&&Array.isArray(Te.steps)?Te.steps:[],tt=T?De.length:j?St.length:typeof p=="number"?p:0,pt=T||j?Math.max(0,Math.min(lt.stepIndex,Math.max(0,tt))):typeof h=="number"?h:0,jt=T?I.length:j?F:typeof d=="number"?d:0;o.useEffect(()=>{if(!T&&!j)return;const de=T?Rr(Te,ue):ut?.id||`children-page-${ue??0}`,Ne=new Date().toISOString();for(let Fe=0;Fe<=pt;Fe+=1){const Ze=T?Pr(De[Fe],Fe):`step-${Fe}`,Oe=ye(de,Ze);ae.current.has(Oe)||ae.current.set(Oe,Ne)}},[T,j,ue,pt,ut?.id]),o.useLayoutEffect(()=>{const de=it.current;if(typeof ue=="number"&&de!==null&&ue!==de&&ue>de)try{xt(M("training.problemNotice",{n:ue+1}))}catch{}it.current=typeof ue=="number"?ue:it.current},[ue,c,M]),o.useLayoutEffect(()=>{const de=Ae.current;if(!de)return;const Ne=()=>de.querySelector(".page-popup__scroll");let Fe=null,Ze=null,Oe=null;const J=Je=>{const ct=Ne();if(!ct)return;const ft=ct.scrollHeight<=ct.clientHeight;if(et(ft?"center":"top"),Je&&!Et.current){Et.current=!0;try{yt(!0)}catch{}try{Ve.disconnect()}catch{}}},ce=()=>{Fe!==null&&cancelAnimationFrame(Fe),Fe=requestAnimationFrame(()=>{Ze!==null&&clearTimeout(Ze),Ze=setTimeout(()=>J(!0),60)})},Ee=()=>{Oe!==null&&cancelAnimationFrame(Oe),Oe=requestAnimationFrame(()=>J(!1))};ce(),window.addEventListener("resize",Ee);const Ve=new MutationObserver(ce);Ve.observe(de,{childList:!0,subtree:!0,attributes:!0});const Xe=setTimeout(()=>{Et.current||J(!0)},400);return()=>{window.removeEventListener("resize",Ee),Fe!==null&&cancelAnimationFrame(Fe),Ze!==null&&clearTimeout(Ze),Oe!==null&&cancelAnimationFrame(Oe),clearTimeout(Xe);try{Ve.disconnect()}catch{}}},[Ae]);const je=o.useCallback(de=>{Ae.current&&(Ae.current._childOnNext=de)},[]),nt=o.useCallback(de=>{Ae.current&&(Ae.current._childOnResult=de)},[]),ae=o.useRef(new Map),ye=(de,Ne)=>`${de}\0${Ne}`,He=o.useCallback((de,Ne,Fe)=>{Ct(Ze=>{const Oe=Ze.answersByPage[de]||{},J=Oe[Ne],ce=Ds(Fe),Ee=Ds(J);if(J&&Ee>ce)return Ze;const Ve=od(Fe,ae.current.get(ye(de,Ne)),ce);return{...Ze,answersByPage:{...Ze.answersByPage,[de]:{...Oe,[Ne]:Ve}}}})},[Ct]),Ke=o.useCallback((de,Ne,Fe)=>{const Ze=Rr(Te,ue),Oe=Pr(de,Ne);He(Ze,Oe,Fe)},[Te,ue,He]),vt=o.useCallback((de,Ne,Fe)=>{const Ze=Rr(Te,ue),Oe=Pr(de,Ne);He(Ze,Oe,Fe),!Fe?.allowChange&&de?.autoAdvance!==!1&&Ct(J=>({...J,stepIndex:Math.max(J.stepIndex,Ne+1)}))},[Te,ue,He,Ct]),Ue=o.useCallback((de,Ne)=>{const Fe=ut?.id||`children-page-${ue??0}`,Ze=typeof Ne=="number"?Ne:pt??0,Oe=`step-${Ze}`;He(Fe,Oe,de),de?.allowChange||Ct(J=>({...J,stepIndex:Math.max(J.stepIndex,Ze+1)}))},[ut,ue,pt,He,Ct]),ht=o.useCallback((de,Ne)=>{const Fe=ut?.id||`children-page-${ue??0}`,Ze=`step-${typeof Ne=="number"?Ne:pt??0}`;He(Fe,Ze,de)},[ut,ue,pt,He]),cn=j?{currentPageIndex:ue??0,currentStepIndex:pt??0,totalStepsInPage:St.length,handleStepDone:Ue,handleStepChange:ht}:null,dn=async()=>{const de=typeof t?.buildResults=="function"?await Promise.resolve(t.buildResults({scenario:t,pages:I,flowState:lt,answersByPage:lt.answersByPage})):null;return typeof P=="function"&&await Promise.resolve(P(de))||de},zt=async()=>{const de=ut?.id||`children-page-${lt.pageIndex}`,Ne=lt.answersByPage[de]||{},Fe=Z?(()=>{const J={};let ce=0;return z.forEach(Ee=>{const Ve=lt.answersByPage[Ee.id]||{},Xe=Array.isArray(Ee.steps)?Ee.steps.length:0;for(let Je=0;Je<Xe;Je+=1){const ct=Ve[`step-${Je}`];typeof ct<"u"&&(J[`step-${ce+Je}`]=ct)}ce+=Xe}),J})():Ne;if(typeof k=="function"){const J=await Promise.resolve(k(Fe,{pageAnswers:Ne,answersByPage:lt.answersByPage,pages:z,currentPageId:de}));return typeof P=="function"&&await Promise.resolve(P(J))||J}const Ze=Object.entries(Ne).map(([J,ce],Ee)=>({index:Ee,key:J,payload:ce})),Oe={results:Ze,answers:Ze,score:0};return typeof P=="function"&&await Promise.resolve(P(Oe))||Oe},qt=()=>{const de=++Dt.current,Ne=()=>de!==Dt.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(T){const Oe=dn();rt(On);const J=Oe;Promise.resolve(J).then(ce=>{Ne()||rt(ce||{isEmpty:!0})}).catch(ce=>{!Ne()&&rt({isEmpty:!0})});return}if(j){const Oe=zt();rt(On);const J=Oe;Promise.resolve(J).then(ce=>{Ne()||rt(ce||{isEmpty:!0})}).catch(ce=>{!Ne()&&rt({isEmpty:!0})});return}const Fe=Ae.current&&Ae.current._childOnResult,Ze=Oe=>{try{return Oe?Oe():void 0}catch{return}};if(typeof Fe=="function"){const Oe=Ze(Fe);try{typeof document>"u"?require("url").pathToFileURL(__filename).href:Tn&&Tn.tagName.toUpperCase()==="SCRIPT"&&Tn.src||new URL("components.cjs.js",document.baseURI).href}catch{}Oe&&typeof Oe.then!="function"?rt(Oe):rt(Oe&&typeof Oe.then=="function"?On:{});const J=()=>{Ne()||rt(ce=>ce===On?{}:ce)};Promise.resolve(Oe).then(ce=>{ce&&!Ne()?rt(ce):J()}).catch(ce=>{J()});return}if(typeof P=="function"){const Oe=Ze(P);try{typeof document>"u"?require("url").pathToFileURL(__filename).href:Tn&&Tn.tagName.toUpperCase()==="SCRIPT"&&Tn.src||new URL("components.cjs.js",document.baseURI).href}catch{}Oe&&typeof Oe.then!="function"?rt(Oe):rt(Oe&&typeof Oe.then=="function"?On:{});const J=()=>{Ne()||rt(ce=>ce===On?{}:ce)};Promise.resolve(Oe).then(ce=>{try{typeof document>"u"?require("url").pathToFileURL(__filename).href:Tn&&Tn.tagName.toUpperCase()==="SCRIPT"&&Tn.src||new URL("components.cjs.js",document.baseURI).href}catch{}ce&&!Ne()?rt(ce):J()}).catch(ce=>{console.error("viewResults external handler failed",ce),J()});return}},Ht=()=>{if(T){if(typeof ue=="number"&&typeof jt=="number"&&ue<jt-1){Ct(Ne=>({...Ne,pageIndex:Ne.pageIndex+1,stepIndex:0}));return}return qt()}if(j){const Ne=St.length;if(typeof pt=="number"&&pt<Ne-1){Ct(Fe=>({...Fe,stepIndex:Fe.stepIndex+1}));return}if(typeof ue=="number"&&typeof jt=="number"&&ue<jt-1){Ct(Fe=>({...Fe,pageIndex:Fe.pageIndex+1,stepIndex:0}));return}return qt()}if(typeof C=="function"){try{C()}catch{}return}const de=Ae.current&&Ae.current._childOnNext;if(typeof de=="function"){try{de()}catch{}return}},Nt=T?te.title||te.label||w||M("common.popup","\uD31D\uC5C5"):a||v||(Array.isArray(s)?s[s.length-1]:void 0)||w||M("common.popup","\uD31D\uC5C5"),An=w||Nt,an=T?te.title??te.label??Nt:a??v??Nt,$t=(de,Ne)=>{const Fe=Rr(Te,ue),Ze=Pr(de,Ne),Oe=lt.answersByPage[Fe]?.[Ze],J=Ux(de,{page:Te,pageIndex:ue,step:de,stepIndex:Ne,storedPayload:Oe,answersByPage:lt.answersByPage,flowState:lt}),ce={key:Ze,index:Ne,stepIndex:pt,isLast:Ne===De.length-1};switch(de?.type){case"listen":return n.jsx(As,{...ce,...J,onDone:Ee=>vt(de,Ne,Ee)});case"confirm":return n.jsx(Bs,{...ce,...J,onDone:Ee=>vt(de,Ne,Ee),onChange:Ee=>Ke(de,Ne,Ee)});case"confirmWithText":return n.jsx(ks,{...ce,...J,onDone:Ee=>vt(de,Ne,Ee),onChange:Ee=>Ke(de,Ne,Ee)});case"orderList":return n.jsx(Ns,{...ce,...J,onDone:Ee=>vt(de,Ne,Ee),onChange:Ee=>Ke(de,Ne,Ee)});default:return null}},Pt=o.useRef(void 0);o.useEffect(()=>{const de=Pt.current;if(Pt.current=ue,de===void 0||de===ue||!wr())return;const Ne=Ae.current;if(!Ne)return;const Fe=document.activeElement;if(!(!Fe||Fe===document.body||!Ne.contains(Fe)||Fe.disabled===!0))return;const Ze=Ne.querySelector(`.training-steps ${En.split(", ").join(", .training-steps ")}`)??Array.from(Ne.querySelectorAll(En)).find(Oe=>!Oe.closest('[aria-hidden="true"]'));try{Ze?.focus()}catch{}},[ue]);const Ut=T?I.length>0?n.jsx("div",{className:"training-steps",children:De.map((de,Ne)=>$t(de,Ne))},`replay-${Ie}`):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||M("training.noQuestions","\uBB38\uC81C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")})}):null,Jt=j?n.jsxs(ld.Provider,{value:cn,children:[ut?.pageTop?n.jsx("div",{className:"training-page-top",children:ut.pageTop}):null,n.jsx("div",{className:"training-steps",children:St.map((de,Ne)=>{const Fe=de;return o.cloneElement(Fe,{...Fe.props,_stepIndex:Ne,_totalSteps:St.length,_stepKey:`step-${Ne}`,_pageIndex:ue})})},`replay-${Ie}`),ut?.pageBottom?n.jsx("div",{className:"training-page-bottom",children:ut.pageBottom}):null]}):null,gn=o.useRef(-1),Zt=o.useCallback(()=>{if(!A)return;const de=at,{results:Ne,correct:Fe,total:Ze}=Ts(at),Oe={correct:Fe,total:Ze,attempt:dt.current.length+1,previousAttempts:[...dt.current]};if(gn.current===Bt.current)return Oe;gn.current=Bt.current,Tf({items:zf(Ne),category:bd.has(A)?"sentence":"word",trainingType:A,entryPoint:B??"sentence",itemRef:D??null,correct:Fe,total:Ze,score:typeof de?.score=="number"?de.score:null,durationSeconds:Math.max(0,Math.round((Date.now()-U.current)/1e3)),dailyTotal:E??null});try{y?.(Oe)}catch{}return Oe},[A,B,E,D,at,y]);o.useEffect(()=>{!at||at===On||at?.isEmpty||(Ts(at).total??0)>0&&Zt()},[at,Zt]);const xn=o.useCallback(()=>{const de=Zt();Lt(),qe(()=>{typeof g=="function"&&g(de),typeof m=="function"&&m()})},[g,m,Zt,rt,qe]),pn=o.useCallback(()=>xt(""),[xt]),Qt=o.useCallback(()=>{qe(()=>{typeof m=="function"&&m()})},[m,qe]),Gt=n.jsxs("div",{className:`page-popup${gt?" page-popup--closing":""}`,role:"dialog","aria-modal":"true","aria-label":An,children:[n.jsxs("div",{ref:Ae,className:`page-popup__panel ${wt?"":"page-popup__panel--measuring"} ${st==="center"?"page-popup__panel--center":st==="top"?"page-popup__panel--top":""}`,children:[n.jsx(nd,{title:an,subtitle:T?te.subtitle||te.label:Array.isArray(s)?s.join(" / "):void 0,desc:T?void 0:r,depth:T?te.depth:s,icon:T?te.icon:l,wrapperStyle:T?te.wrapperStyle:i,iconTooltip:T?te.iconTooltip:u,progressMax:jt,progressIndex:ue,pageIndex:ue,pageCount:jt,onBack:Qt,onClose:Qt}),n.jsx("div",{className:"page-popup__scroll",children:n.jsx("div",{className:`page-popup__content ${st==="center"?"page-popup__content--center":"page-popup__content--top"}${e.contentFull?" page-popup__content--full":""}`,children:j?Jt:T?Ut:typeof b=="function"?b({registerOnNext:je,registerOnResult:nt,panelRef:Ae,setResultOverlay:rt}):b})}),n.jsx(td,{onSettings:f,onNext:Ht,onResult:qt,useNoiseSettingBtn:!!(T?te.useNoiseSetting??!0:_),stepIndex:pt,stepCount:tt,pageIndex:ue,pageCount:jt,resultOpen:!!(at&&!at.isEmpty),hideNoiseRows:L})]}),at&&!at.isEmpty&&(N??Yx)({score:at.score,results:at.results||at.answers||[],contextsLength:at.results?at.results.length:at.answers?at.answers.length:0,onReplay:()=>{if(U.current=Date.now(),at!==On){const{correct:de,total:Ne}=Ts(at);dt.current.push({correct:de,total:Ne})}if(Lt(),ze(de=>de+1),T){if(Ct(Fr()),typeof t?.onReplay=="function")try{t.onReplay()}catch{}return}if(j){Ct(Fr());return}try{const de=Ae.current&&Ae.current._childOnResult;typeof de=="function"&&de({replay:!0})}catch{}},onClose:xn,pending:at===On}),at?.isEmpty&&n.jsx("div",{className:"page-popup page-popup--result-empty",role:"dialog","aria-modal":"true","aria-label":M("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:M("training.result.eyebrow","\uD6C8\uB828 \uC644\uB8CC")})})}),n.jsx("div",{className:"page-popup__bottom",children:n.jsx(fe,{htmlType:"button",variant:"main",size:48,onClick:xn,label:M("training.result.done","\uC644\uB8CC")})})]})}),n.jsx(va,{message:It,position:"top",onClose:pn})]}),Nn=n.jsx(gs.Provider,{value:$e,children:Gt});return typeof document<"u"&&document.body?hn.createPortal(Nn,document.body):Nn}const Yn=Zx;Yn.Page=Lr,Yn.ListenStep=id,Yn.ConfirmStep=ud,Yn.ConfirmWithTextStep=cd,Yn.OrderListStep=dd,Yn.CardStep=pd,Yn.CardOrderStep=Lx;function Xx({label:e,homonum:t}){const a=pa()?.(e,t)??"",{imgRef:r,loading:s,hasImage:l,onLoad:i,onError:u}=ts(a);return l?n.jsxs("div",{className:se("word-image-tooltip__cell"),children:[s&&n.jsx("div",{className:se("word-image-tooltip__spinner")}),n.jsx("img",{ref:r,src:a,alt:e,draggable:!1,style:{opacity:s?0:1},onLoad:i,onError:u})]}):n.jsx("div",{className:se("word-image-tooltip__cell word-image-tooltip__cell--text h3"),children:n.jsx("span",{children:e})})}function gd({words:e,anchorRect:t}){const a=o.useRef(null),[r,s]=o.useState(null);return o.useLayoutEffect(()=>{if(!t||!a.current)return;const{offsetWidth:l,offsetHeight:i}=a.current,u=window.innerWidth;let c=t.left+t.width/2-l/2,d=t.top-i-8;d<8&&(d=t.bottom+8),c=Math.max(8,Math.min(c,u-l-8)),s({left:c,top:d})},[t]),!t||e.length===0?null:hn.createPortal(n.jsx("div",{ref:a,className:se("word-image-tooltip"),style:{visibility:r?"visible":"hidden",left:r?.left??0,top:r?.top??-9999},children:n.jsx("div",{className:se("word-image-tooltip__cells"),children:e.map(l=>n.jsx(Xx,{label:l.label,homonum:l.homonum},`${l.label}_${l.homonum??1}`))})}),document.body)}function Jx({titleIcon:e,resultCount:t,resultUnit:a,searchQuery:r,items:s,groups:l,selected:i=[],onSelect:u,maxSelect:c,onClearSelection:d,onPrint:h,onPrintEmpty:p,className:m,emptyHint:g,showEmptyText:y=!0,sectionType:C="page",disc:f}){const{t:_,i18n:b}=_e.useTranslation(),w=b.language?.startsWith("ko")??!1,{anchorRect:v,openAt:k,close:x}=za(),[A,B]=o.useState(null),E=o.useCallback(()=>{x(),B(null)},[x]);Hy(E,!!A);const D=(r??"").trim(),N=/^[^,[\]\s]+$/.test(D)?D:"",$=N.length>0,L=r===void 0&&t===void 0,U=$?"match":L?"original":"ganada",[M,P]=o.useState(()=>U),[T,ee]=o.useState("50"),[te,I]=o.useState(1),[Y,R]=o.useState($);Y!==$&&(R($),P(U));const q=M==="match"&&!$||M==="original"&&!L?U:M,Z=o.useMemo(()=>[...$?[{value:"match",label:_("wordSearch.sort.match",{defaultValue:"\uC2DC\uC791 \uC6B0\uC120"})}]:[],...L?[{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"})}],[_,$,L]),z=o.useMemo(()=>["10","25","50","100"].map(le=>({value:le,label:_("wordSearch.pageSize",{count:Number(le),defaultValue:`${le}\uAC1C\uC529 \uBCF4\uAE30`})})),[_]),j=le=>le.words?.[0],F=o.useMemo(()=>{const le=[...N].length,ve=mf(N),$e=new Map;return Ae=>{let Ie=$e.get(Ae);return Ie===void 0&&(Ie=ve((Ae.words?.[0]?.label??"").slice(0,le))?0:1,$e.set(Ae,Ie)),Ie}},[N]),O=o.useCallback((le,ve)=>{const $e=ze=>j(ze)?.label??"",Ae=ze=>j(ze)?.syllables??[...$e(ze)].length,Ie=ze=>(ze.words??[]).reduce((dt,st)=>{const et=parseInt(st.grade??"",10);return Number.isFinite(et)&&et<dt?et:dt},999);switch(q){case"match":return F(le)-F(ve)||fn($e(le),$e(ve));case"ganada":return fn($e(le),$e(ve));case"ganada_desc":return fn($e(ve),$e(le));case"syllable":return Ae(le)-Ae(ve)||fn($e(le),$e(ve));case"syllable_desc":return Ae(ve)-Ae(le)||fn($e(le),$e(ve));case"grade":return Ie(le)-Ie(ve)||fn($e(le),$e(ve));case"grade_desc":return Ie(ve)-Ie(le)||fn($e(le),$e(ve));default:return 0}},[q,F]),G=o.useMemo(()=>s.slice().sort(O),[s,O]),ie=Number(T)||10,K=o.useMemo(()=>(l??[]).flatMap(le=>le.items.slice().sort(O).map(ve=>({item:ve,label:le.label}))),[l,O]),pe=l?K.length:G.length,X=Math.max(1,Math.ceil(pe/ie)),H=Math.min(te,X),ne=o.useMemo(()=>G.slice((H-1)*ie,H*ie),[G,H,ie]),V=o.useId(),W=o.useMemo(()=>{if(!l)return null;const le=K.slice((H-1)*ie,H*ie),ve=new Map;for(const{item:$e,label:Ae}of le)ve.has(Ae)||ve.set(Ae,[]),ve.get(Ae).push($e);return[...ve.entries()].map(([$e,Ae])=>({label:$e,items:Ae}))},[l,K,H,ie]);o.useEffect(()=>{I(1)},[M,T,pe,r]);const oe=pe>0?n.jsxs("div",{className:"word-search-result-block__toolbar",children:[n.jsx(_n,{size:40,options:Z,value:q,onChange:P,ariaLabel:_("wordSearch.sort.aria",{defaultValue:"\uC815\uB82C"})}),n.jsx(_n,{size:40,options:z,value:T,onChange:ee,ariaLabel:_("wordSearch.pageSizeAria",{defaultValue:"\uD398\uC774\uC9C0 \uD06C\uAE30"})}),n.jsx(zo,{page:H,totalPages:X,onChange:I})]}):void 0,xe=le=>{u&&u(le)},be=t!==void 0&&a?n.jsxs(n.Fragment,{children:[_("wordSearch.resultTitlePrefix","\uCD1D "),n.jsx("span",{style:{color:"var(--color-main)"},children:t}),_("wordSearch.resultTitleSuffix",{unit:w?kf(a):a})]}):void 0,me=t!==void 0&&t>0&&c!==void 0&&a?_("wordSearch.resultDisc",{unit:w?Nf(a):a,max:c,selected:i.length}):void 0,ke=f??me,Le=l?l.length===0:s.length===0,Me=Le&&!y&&!g;return n.jsxs(_a,{type:C,className:Be("word-search-result-block",m),children:[n.jsxs("div",{className:Be("word-search-result-block__inner",Me&&"word-search-result-block__inner--head-only"),children:[(be||oe||ke)&&n.jsxs("div",{className:"word-search-result-block__head",children:[n.jsxs("div",{className:"word-search-result-block__head-main",children:[e&&n.jsx(ot,{icon:e,className:"word-search-result-block__head-icon"}),be&&n.jsx("span",{className:"word-search-result-block__title h3",children:be})]}),oe&&n.jsx("div",{className:"word-search-result-block__head-actions",children:oe}),ke&&n.jsx("div",{className:"word-search-result-block__head-disc body-3",children:ke})]}),Le&&(y||g)&&n.jsxs("div",{className:"word-search-result-block__empty-wrap",children:[y&&n.jsx("p",{className:"word-search-result-block__empty body-3",children:_("wordSearch.emptyResult","\uAC80\uC0C9 \uACB0\uACFC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}),g&&n.jsx("p",{className:"word-search-result-block__empty-hint body-3",children:g})]}),l?(W??[]).map(le=>n.jsxs("div",{className:"word-search-result-block__group",role:"group","aria-labelledby":`${V}-${le.label}`,children:[n.jsx("div",{className:"word-search-result-block__group-label caption-1b",id:`${V}-${le.label}`,children:le.label}),n.jsx("div",{className:"word-search-result-block__items",children:le.items.map(ve=>{const $e=i.includes(ve.id);return n.jsx("div",{onMouseEnter:Ae=>{k(Ae.currentTarget),B(ve.words??[])},onMouseLeave:E,children:n.jsx(fe,{htmlType:"button",size:"word",align:"grid",label:(ve.words??[]).map(Ae=>Ae.label),subLabel:(ve.words??[]).some(Ae=>Ae.subLabel)?(ve.words??[]).map(Ae=>Ae.subLabel):void 0,selected:$e,onClick:()=>xe(ve.id),minWidth:200})},ve.id)})})]},le.label)):n.jsx("div",{className:"word-search-result-block__items",children:ne.map(le=>{const ve=i.includes(le.id);return n.jsx("div",{onMouseEnter:$e=>{k($e.currentTarget),B(le.words??[])},onMouseLeave:E,children:n.jsx(fe,{htmlType:"button",size:"word",align:"grid",label:(le.words??[]).map($e=>$e.label),subLabel:(le.words??[]).some($e=>$e.subLabel)?(le.words??[]).map($e=>$e.subLabel):void 0,selected:ve,onClick:()=>xe(le.id),minWidth:200})},le.id)})}),A&&v&&n.jsx(gd,{words:A,anchorRect:v})]}),(d||h)&&n.jsxs("div",{className:"word-search-result-block__actions",children:[d&&n.jsx(fe,{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:d}),h&&n.jsx("div",{onClick:i.length===0?p:void 0,children:n.jsx(fe,{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 Qx(e,t){return t.map(a=>{const r=typeof a=="string"?a:a.label,s=typeof a=="string"?void 0:a.displayLabel;return{label:r,value:e[r]??"",displayLabel:s}})}function ew({sections:e,selectedList:t,count:a,onCountChange:r,maxCount:s=4,minCount:l=1,combinationSections:i,combinationSectionsForSlot:u,onSelect:c,placeholder:d="-",className:h,title:p,titleIcon:m,disc:g,showInfoButton:y=!0,onClearPhoneme:C,onSearch:f,onSearchEmpty:_,searchDisabled:b=!1,searchLabel:w,searchChecking:v=!1,pairMode:k=!1,sectionType:x="page",beforeSearchContent:A,beforeContent:B,afterContent:E,hideCountControl:D=!1,ordinal:N=!1}){const{t:$}=_e.useTranslation(),L=o.useMemo(()=>$("wordPairs.infoNotes",{returnObjects:!0}),[$]),U=o.useMemo(()=>Array.from({length:s-l+1},(j,F)=>{const O=l+F;return{key:String(O),label:$("wordPairs.count",{n:O})}}),[$,s,l]),M=o.useMemo(()=>$("wordPairs.ordinals",{returnObjects:!0}),[$]),P=o.useCallback(j=>N?$("wordPairs.phonemeOrdinalLabel",{ordinal:M[j-1]??j}):a===1?$("wordPairs.phonemeSingleLabel","\uC74C\uC808"):$("wordPairs.phonemeN",{n:j}),[N,M,a,$]),T=o.useCallback(j=>N?$("wordPairs.phonemeContrastOrdinalLabel",{ordinal:M[j-1]??j}):a===1?$("wordPairs.phonemeContrastSingleLabel","\uB300\uB9BD \uC74C\uC808"):$("wordPairs.phonemeContrast",{n:j}),[N,M,a,$]),ee=o.useCallback((j,F)=>F?n.jsxs(n.Fragment,{children:[j,n.jsx("span",{className:"phoneme-select-block__required",children:"*"})]}):j,[]),{anchorRect:te,toggleAt:I,close:Y}=za(),R=o.useCallback(j=>r(Number(j)),[r]),q=yn("(max-width: 767px)"),Z=o.useCallback(j=>Qx(j,e).map(({label:F,value:O,displayLabel:G})=>{const ie=!!O&&O!=="\uC5C6\uC74C";return n.jsxs("span",{className:Be("phoneme-select-block__cell-jamo-part",O?"":"phoneme-select-block__cell-jamo-part--empty",ie?"":"phoneme-select-block__cell-jamo-part--no-label"),children:[n.jsx("span",{className:`phoneme-select-block__cell-jamo-char h1${O==="\uC5C6\uC74C"?" phoneme-select-block__cell-jamo-char--excluded":""}`,children:O==="\uC5C6\uC74C"?"x":O||d}),ie&&n.jsx("span",{className:"phoneme-select-block__cell-jamo-label caption-2",children:G??F})]},F)}),[e,d]),z=n.jsxs(n.Fragment,{children:[n.jsx("div",{"data-tooltip-ignore":!0,children:n.jsx(fe,{htmlType:"button",size:40,type:q?"dot":void 0,icon:"info",label:q?void 0:$("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),ariaLabel:$("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),className:te?"is-selected":void 0,"aria-expanded":!!te,"aria-haspopup":"dialog",onClick:j=>I(j.currentTarget)})}),te&&n.jsx(qn,{title:$("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),items:L,anchorRect:te,onClose:Y})]});return n.jsxs(_a,{type:x,title:p,icon:m,disc:g,action:y?z:void 0,className:Be("phoneme-select-block",h),children:[B,!D&&n.jsx("div",{className:"phoneme-select-block__controls",children:n.jsx(vn,{options:U,value:String(a),onChange:R,size:40,ariaLabel:$("wordPairs.countLabel","\uC74C\uC18C \uAC1C\uC218"),className:"phoneme-select-block__count-control"})}),n.jsx("div",{className:"phoneme-select-block__cells",children:k?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"phoneme-select-block__cell-group",children:Array.from({length:a}).map((j,F)=>{const O=t[F*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:Z(O)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:P(F+1)})]},F)})}),n.jsx("span",{className:"phoneme-select-block__cell-vs h3",children:$("wordPairs.phonemeSelect.vs","\uB300")}),n.jsx("div",{className:"phoneme-select-block__cell-group",children:Array.from({length:a}).map((j,F)=>{const O=t[F*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:Z(O)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:T(F+1)})]},F)})})]}):t.map((j,F)=>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:Z(j)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:P(F+1)})]},F))}),(i||u)&&n.jsx("div",{className:"phoneme-select-block__panels",children:n.jsx("div",{className:"phoneme-select-block__detail",children:k?n.jsxs("div",{className:"phoneme-select-block__pair-panels",children:[n.jsx("div",{className:"phoneme-select-block__panel-group",children:Array.from({length:a}).map((j,F)=>{const O=t[F*2]??{};return n.jsx(In,{title:ee(P(F+1),F===0),sections:u?u(O,F*2):i,selected:O,onSelect:c?.(F*2),align:"newline"},F)})}),n.jsx("div",{className:"phoneme-select-block__panel-group",children:Array.from({length:a}).map((j,F)=>{const O=t[F*2+1]??{};return n.jsx(In,{title:T(F+1),sections:u?u(O,F*2+1):i,selected:O,onSelect:c?.(F*2+1),align:"newline"},F)})})]}):t.map((j,F)=>n.jsx(In,{title:ee(P(F+1),F===0),sections:u?u(j,F):i,selected:j,onSelect:c?.(F),align:"newline"},F))})}),A&&n.jsx("div",{className:"phoneme-select-block__before-search",children:A}),(C||f||v)&&(()=>{const j=t.every(F=>{const O=cf(F);return Object.entries(O).every(([G,ie])=>!ie||G==="coda"&&ie===Pl)});return n.jsxs("div",{className:"phoneme-select-block__search-row",onClick:j?_:void 0,children:[C&&n.jsx(fe,{htmlType:"button",size:"56",type:"bar",label:$("wordPairs.resetOptions","\uAC80\uC0C9 \uC635\uC158 \uCD08\uAE30\uD654"),selected:!1,disabled:j,onClick:j?void 0:C}),f?n.jsx(fe,{htmlType:"button",size:"56",type:"bar",variant:"main",icon:v?n.jsx("span",{className:"phoneme-select-block__spinner","aria-hidden":"true"}):void 0,label:w??$("wordSearch.searchButton","\uAC80\uC0C9\uD558\uAE30"),disabled:j||b||v,onDisabledClick:v?()=>{}:void 0,"aria-busy":v||void 0,onClick:f}):v?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:w??$("wordSearch.searchButton","\uAC80\uC0C9\uD558\uAE30")})]}):null]})})(),E]})}function tw({title:e,sections:t,selected:a,onSelect:r,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c,headerAction:d,className:h}){const{t:p}=_e.useTranslation();return n.jsx(In,{className:h,title:e??p("wordSearch.filterTitle","\uB2E8\uC5B4 \uAC80\uC0C9 \uC124\uC815"),sections:t,selected:a,onSelect:r,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c,headerAction:d,align:"inline"})}function nw({title:e,headerAction:t,sections:a,selected:r,onSelect:s,className:l}){const{t:i}=_e.useTranslation();return a.length===0?null:n.jsx(In,{className:l,title:e??i("training.filter.phonemeGroup",{defaultValue:"\uD6C8\uB828 \uC74C\uC808"}),headerAction:t,sections:a,selected:r,onSelect:s,align:"newline"})}function aw({title:e,mode:t,onModeChange:a,matchMode:r,onMatchModeChange:s,positionCount:l,onPositionCountChange:i,inputMode:u,onInputModeChange:c,className:d}){const{t:h}=_e.useTranslation(),p={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=f=>h("wordPairs.count",{n:f}),g=[{label:p.searchMode,items:[p.include,p.pick,p.explicit],display:"segmented",labelAction:n.jsx(Ga,{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:p.phonemeOrder,items:[p.orderAny,p.orderMatch],display:"segmented",labelAction:n.jsx(Ga,{items:h("wordPairs.filter.phonemeOrderInfo",{returnObjects:!0})})},{label:p.count,items:[m(1),m(2)],display:"segmented"},{label:p.inputMode,items:[p.charInput,p.pronInput],display:"segmented",labelAction:n.jsx(Ga,{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.")]})}],y={[p.searchMode]:t==="explicit"?p.explicit:t==="pick"?p.pick:p.include,[p.phonemeOrder]:r==="ordered"?p.orderMatch:p.orderAny,[p.count]:m(l),[p.inputMode]:u==="phoneme"?p.pronInput:p.charInput},C=(f,_)=>{_===p.searchMode?a(f===p.explicit?"explicit":f===p.pick?"pick":"include"):_===p.phonemeOrder?s(f===p.orderMatch?"ordered":"unordered"):_===p.count?i(f===m(2)?2:1):_===p.inputMode&&c(f===p.pronInput?"phoneme":"word")};return n.jsx(In,{className:d,title:e??h("wordPairs.filter.searchOptionsTitle","\uB300\uB9BD \uC124\uC815"),sections:g,selected:y,onSelect:C,align:"inline"})}function rw(e){const{title:t,items:a,columns:r,resizeStorageKey:s,gridTemplateColumns:l,mobileGridTemplateColumns:i,searchPlaceholder:u,searchFn:c,defaultSortKey:d,defaultSortAsc:h=!0,selectedId:p,selectedIds:m,onSelect:g,onClose:y,pageSizeOptions:C=[10,25,50,100],initialPageSize:f,emptyText:_,noMatchText:b,countLabel:w,topContent:v,className:k=""}=e,{t:x}=_e.useTranslation(),A=u??x("common.search","\uAC80\uC0C9"),B=_??x("common.emptyList","\uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."),E=b??x("common.noMatches","\uB9DE\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"),[D,N]=o.useState(""),[$,L]=o.useState(d??r[0]?.key??""),[U,M]=o.useState(h),[P,T]=o.useState(String(f??C[0]??10)),[ee,te]=o.useState(1);o.useEffect(()=>{te(1)},[D,P]);const I=c!==null,Y=o.useCallback((K,pe)=>{if(!pe)return!0;const X=pe.toLowerCase();return r.some(H=>{const ne=K[H.key];return ne==null?!1:String(ne).toLowerCase().includes(X)})},[r]),R=c??Y,q=o.useMemo(()=>{const K=I?a.filter(pe=>R(pe,D)):a;return $?[...K].sort((pe,X)=>{const H=pe[$],ne=X[$];return H===ne?0:gr(H,ne,U)}):K},[a,D,$,U,I,R]),Z=Math.max(1,Math.ceil(q.length/Number(P)));ee>Z&&te(Z);const z=Math.min(ee,Z),j=q.slice((z-1)*Number(P),z*Number(P)),F=o.useCallback(K=>{$===K?M(pe=>!pe):(L(K),M(!0)),te(1)},[$]),O=o.useMemo(()=>{if(typeof w=="function"){const K=q.length,pe=w(K);if(typeof pe=="string"){const X=pe.lastIndexOf(String(K));if(X>=0)return{prefix:pe.slice(0,X),suffix:pe.slice(X+String(K).length)}}return{label:pe}}if(typeof w=="string"&&w.includes("{n}")){const[K,pe]=w.split("{n}");return{prefix:K,suffix:pe}}return{prefix:x("common.totalCountPrefix","\uCD1D "),suffix:x("common.totalCountSuffix","\uAC1C")}},[w,q.length,x]),G=o.useMemo(()=>r.map(K=>({label:K.label,onClick:K.sortable!==!1?()=>F(K.key):void 0,className:K.className,sortDir:K.sortable!==!1&&$===K.key?U?"asc":"desc":null})),[r,$,U,F]),ie=o.useMemo(()=>C.map(K=>({value:String(K),label:x("common.pageSizeLabel",{n:K})})),[C,x]);return n.jsxs(Pn,{className:`popup-list ${k}`,title:t,onClose:y,children:[v,"label"in O&&n.jsx("p",{className:"toolbar__count body-1",children:O.label}),n.jsx(Wo,{count:"label"in O?void 0:{value:q.length,prefix:O.prefix,suffix:O.suffix},search:I?{value:D,onChange:N,placeholder:A}:void 0,pageSize:{options:ie,value:P,onChange:T},pagination:{page:z,total:Z,onChange:te}}),n.jsx(Qo,{size:"medium",gridTemplateColumns:l,mobileGridTemplateColumns:i,resizable:!0,resizeStorageKey:s,fields:G,items:j,onRowClick:g,renderRow:K=>{const pe=m!=null?K.id!=null&&m.has(K.id):p!=null&&K.id===p;return r.map(X=>({content:X.render?X.render(K):K[X.key]??"",className:Be(X.className,pe&&"popup-list__row--selected")}))},empty:I&&D!==""&&a.length>0?E:B})]})}function yd(e){const{title:t,message:a,topContent:r,details:s,children:l,confirmLabel:i,cancelLabel:u,hideCancel:c=!1,extraAction:d,confirmVariant:h="main",confirmDisabled:p=!1,onConfirm:m,closeOnConfirm:g=!0,onClose:y,inline:C,size:f="small",className:_,initialFocus:b="close"}=e,{t:w}=_e.useTranslation(),v=o.useRef(null);o.useEffect(()=>{if(C||b==="close")return;const D=v.current?.closest(".popup-panel"),N=Array.from(D?.querySelectorAll(".popup-footer--buttons button")??[]),$=b==="confirm"?N[N.length-1]:c?void 0:N[d?1:0];$&&!$.disabled&&$.focus()},[]);const k=o.useRef(!1),[x,A]=o.useState(!1),B=D=>{let N=!1;return{close:()=>{N=!0,D()},didClose:()=>N}},E=async D=>{if(k.current)return;k.current=!0;const N=typeof document<"u"?document.activeElement:null;A(!0);let $=!1;try{$=await D()}catch(L){typeof console<"u"&&console.error(L)}finally{$||(k.current=!1,A(!1),requestAnimationFrame(()=>{const L=document.activeElement;(!L||L===document.body)&&N?.isConnected&&N.focus()}))}};return n.jsxs(Pn,{title:t,onClose:y,closeDisabled:x,inline:C,size:f,className:Be("confirm-popup",r!=null&&"confirm-popup--has-top",_),buttons:[...d?[{label:d.label,variant:d.variant??"default",disabled:d.disabled||x,onClick:async({closeWithAnimation:D})=>{await E(async()=>{const N=B(D);await d.onClick(N.close);const $=d.closeOnClick??!0;return $&&D(),$||N.didClose()})}}]:[],...c?[]:[{label:u??w("common.cancel","\uCDE8\uC18C"),variant:"default",disabled:x,onClick:({closeWithAnimation:D})=>D()}],{label:i??w("common.confirm","\uD655\uC778"),variant:h,disabled:p||x,onClick:async({closeWithAnimation:D})=>{await E(async()=>{const N=B(D);return await m(N.close),g&&D(),g||N.didClose()})}}],children:[r!=null&&n.jsx("div",{className:"confirm-popup__top",children:r}),s&&s.length>0&&n.jsx(Qa,{children:s.map((D,N)=>n.jsx(un,{label:D.label,children:n.jsx("span",{className:"panel-row__text body-2",children:D.value})},N))}),n.jsx("p",{ref:v,className:"body-2 confirm-popup__message",children:a}),l]})}function ow(e,t,a={}){const{t:r}=_e.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]),d=s?n.jsx(yd,{title:a.title??r("common.discardConfirm.title","\uC785\uB825\uC744 \uCDE8\uC18C\uD560\uAE4C\uC694?"),message:a.message??r("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:a.confirmLabel??r("common.discardConfirm.confirm","\uC785\uB825 \uCDE8\uC18C"),confirmVariant:"danger",onConfirm:()=>{l(!1),t()},onClose:()=>l(!1)}):null;return{beforeClose:c,discardPopup:d,allowClose:u}}function sw({onApply:e,onCancel:t}){const{t:a}=_e.useTranslation(),[r,s]=o.useState(""),[l,i]=o.useState(!1),[u,c]=o.useState(null),d=o.useRef(null),h=o.useId();o.useEffect(()=>{d.current?.focus()},[]);const p=o.useCallback(async y=>{const C=r.trim();if(C){i(!0),c(null);try{await e(C),y()}catch(f){c(zl(f)),i(!1),requestAnimationFrame(()=>d.current?.focus())}}},[r,e]),m=o.useCallback((y,C)=>{y.key==="Enter"&&!y.nativeEvent.isComposing&&p(C)},[p]),g=y=>{s(y.target.value),c(null)};return n.jsx(Pn,{className:"coupon-input-popup",title:a("usage.couponButton","\uCFE0\uD3F0 \uC785\uB825"),size:"small",onClose:t,closeDisabled:l,buttons:[{label:a("common.cancel","\uCDE8\uC18C"),variant:"default",disabled:l,onClick:({closeWithAnimation:y})=>y()},{label:a("coupons.applyButton","\uC801\uC6A9"),variant:"main",disabled:!r.trim()||l,onClick:({closeWithAnimation:y})=>{p(y)}}],children:({closeWithAnimation:y})=>n.jsxs(n.Fragment,{children:[n.jsx("input",{ref:d,className:"coupon-input-popup__input body-2","aria-label":a("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:a("coupons.input.placeholder","\uCFE0\uD3F0 \uCF54\uB4DC \uC785\uB825"),value:r,onChange:g,onKeyDown:C=>m(C,y),disabled:l,autoComplete:"off",spellCheck:!1}),u&&n.jsx("p",{id:h,className:"coupon-input-popup__error caption-1",role:"alert",children:u})]})})}const vd=["var(--color-main)","var(--color-sub)"],lw=2e3;function iw(e,t){if(!t.startsWith("var("))return t;try{const a=t.slice(4,-1).trim();return getComputedStyle(e).getPropertyValue(a).trim()||null}catch{return null}}function Ms({active:e=!1,count:t=40,duration:a=2e3,strength:r=1,onComplete:s,trigger:l=0}){const i=o.useMemo(()=>{const C=Math.floor(t/2),f=t-C,_=(b,w)=>Array.from({length:b}).map((v,k)=>{const x=6+Math.random()*12,A=Math.round(Math.min(18,x*Math.min(1.5,1+r*.4))),B=vd[Math.floor(Math.random()*vd.length)],E=Math.random()*300,D=(360+Math.random()*260)*r*1.2,N=(w==="left"?-95+Math.random()*40:-85-Math.random()*40)*Math.PI/180,$=Math.cos(N)*D,L=Math.sin(N)*D*1.35,U=Math.random()*720-360,M=(1200+Math.random()*3e3)*Math.min(1.6,1+r*.3),P=Math.random()>.7?"50%":"3px";return{id:`${w}-${k}`,side:w,size:A,color:B,delay:E,vx:$,vy:L,angularVel:U,life:M,borderRadius:P}});return[..._(C,"left"),..._(f,"right")]},[t,r]),u=o.useRef(null),c=o.useRef({}),d=o.useRef(null),h=o.useRef(s);o.useEffect(()=>{h.current=s},[s]);const p=o.useRef(null),m=o.useRef(null),g=()=>{if(typeof document>"u")return null;let C=document.querySelector("[data-ihab-effect-root]");return C||(C=document.createElement("div"),C.className="app-effect",C.dataset.ihabEffectRoot="",C.style.position="fixed",C.style.inset="0",C.style.pointerEvents="none",C.style.zIndex="99998",document.body.appendChild(C)),C};if(typeof document<"u"&&m.current==null&&(m.current=g()),o.useEffect(()=>{if(!e)return;if(typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches){const Y=setTimeout(()=>h.current?.(),0);return()=>clearTimeout(Y)}const C=1200,f=performance.now(),_=m.current&&m.current!==document.body?m.current.getBoundingClientRect():null,b=Math.max(60,(window.innerHeight||800)*.05),w=Y=>Math.max(40,(Y||window.innerWidth)*.02),v=_?.width||window.innerWidth||375,k=_?.height||window.innerHeight||812,x=Y=>{const R=[...Y].sort((q,Z)=>q-Z);return R[Math.floor(R.length/2)]||1},A=x(i.map(Y=>Math.abs(Y.vy))),B=x(i.map(Y=>Math.abs(Y.vx))),E=Math.sqrt(2*C*(k*.72+b))/A,D=A*E/C,N=v*.5/(B*D),$=(Y,R,q)=>Math.min(q,Math.max(R,Y)),L=$(E,.8,2.4),U=$(N,.7,2.2),M=a>0?a/lw:1,P=i.map(Y=>({...Y,life:Y.life*M,vx:Y.vx*U,vy:Y.vy*L,startTime:f+Y.delay,ended:!1})),T=_?{x:_.left-w(_.width),y:_.top+_.height+b}:{x:-w(window.innerWidth),y:window.innerHeight+b},ee=_?{x:_.left+_.width+w(_.width),y:_.top+_.height+b}:{x:window.innerWidth+w(window.innerWidth),y:window.innerHeight+b},te=Y=>{let R=!1;for(const q of P){const Z=c.current[q.id];if(!Z||!Z)continue;if(Y<q.startTime){Z.style.display="none",R=!0;continue}if(!q._inited){const H=q.side==="left"?T.x:ee.x,ne=q.side==="left"?T.y:ee.y;Z.style.left=`${H}px`,Z.style.top=`${ne}px`,Z.style.transform="translate3d(0px, 0px, 0)",Z.style.display="block",Z.style.zIndex="100000",typeof q.color=="string"&&q.color.startsWith("var(")&&(Z.style.background=iw(Z,q.color)??"#FF0060"),q._inited=!0}const z=(Y-q.startTime)/1e3;if(z<0)continue;const j=q.life/1e3;if(z>=j){Z.style.opacity="0",Z.style.display="none",q.ended=!0;continue}R=!0;const F=q.side==="left"?T.x:ee.x,O=q.side==="left"?T.y:ee.y,G=F+q.vx*z,ie=O+q.vy*z+.5*C*z*z,K=(q.angularVel||0)*z,pe=G-F,X=ie-O;Z.style.transform=`translate3d(${pe}px, ${X}px, 0) rotate(${K}deg)`,Z.style.opacity=`${Math.max(0,1-z/j)}`}R?d.current=requestAnimationFrame(te):h.current?.()};d.current=requestAnimationFrame(te);const I=setTimeout(()=>{try{if((m.current?m.current.querySelectorAll(".confetti"):document.querySelectorAll(".confetti")).length===0&&!document.querySelector(".party-container")){const Y=document.createElement("div");Y.className="party-container",Y.style.position="fixed",Y.style.inset="0",Y.style.pointerEvents="none",Y.style.overflow="visible",Y.style.zIndex="2147483647";for(const R of i){const q=document.createElement("span");q.className=`confetti confetti--${R.side}`,q.setAttribute("aria-hidden","true"),q.style.display="none",q.style.position="fixed",q.style.left="0px",q.style.top="0px",q.style.width=`${R.size}px`,q.style.height=`${Math.max(4,R.size*.6)}px`,q.style.background=R.color,q.style.borderRadius=R.borderRadius,q.style.transform="translate3d(0,0,0)",q.style.opacity="0",Y.appendChild(q),c.current[R.id]=q}(document.body||m.current).appendChild(Y),p.current=Y}}catch{}},300);return()=>{if(d.current&&cancelAnimationFrame(d.current),clearTimeout(I),p.current){try{p.current.remove()}catch{}p.current=null}}},[e,a,l,i]),!e)return null;const y=n.jsx("div",{className:"party-container",ref:u,children:i.map(C=>n.jsx("span",{"aria-hidden":!0,ref:f=>{c.current[C.id]=f},className:`confetti confetti--${C.side}`,style:{width:`${C.size}px`,height:`${Math.max(4,C.size*.6)}px`,background:C.color,borderRadius:C.borderRadius}},`${C.id}-${l}`))});return typeof document<"u"?hn.createPortal(y,m.current||document.body):y}const Ls=e=>typeof e=="number"&&Number.isFinite(e)&&e>0?e:void 0;function uw({trigger:e=0,active:t=!1}){const[a,r]=o.useState(null);o.useEffect(()=>{if(typeof window>"u")return;const l=i=>{const u=i.detail??{};r(c=>({n:(c?.n??0)+1,count:Ls(u.count),strength:Ls(u.strength),duration:Ls(u.duration)}))};return window.addEventListener("party:trigger",l),()=>window.removeEventListener("party:trigger",l)},[]);const s=o.useCallback(()=>r(null),[]);return n.jsxs(n.Fragment,{children:[n.jsx(Ms,{active:t,trigger:e}),a&&n.jsx(Ms,{active:!0,trigger:a.n,count:a.count,strength:a.strength,duration:a.duration,onComplete:s})]})}function cw({title:e,sub:t,rightAction:a,titleAction:r,badge:s,badgeVariant:l="default",documentTitle:i,onBack:u,backLabel:c,wrap:d=!1}){const{t:h}=_e.useTranslation();Dy(typeof e=="string"?e:i??null);const p=c??h("common.back","\uB4A4\uB85C");return n.jsxs("div",{className:d?"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(fe,{htmlType:"button",className:"page-title__back",size:48,type:"dot",icon:"chevron-left",iconSize:"large",useBorder:!1,iconColor:"var(--color-text-primary)",ariaLabel:p,showTooltipInfo:p,onClick:u}),n.jsx("h1",{className:"page-title__title h1",children:e}),s&&n.jsx("div",{className:"page-title__badge",children:n.jsx(ln,{label:s,size:"small",variant:l,fill:"outline"})}),r?n.jsx("div",{className:"page-title__title-action",children:r}):null]}),t&&n.jsx("p",{className:"page-title__sub body-2",children:t})]}),a?n.jsx("div",{className:"page-title__action",children:a}):null]})}function dw(e){return e??""}const _d=o.createContext({words:[],loading:!1});function pw(){return o.useContext(_d)}function hw({words:e,loading:t,error:a,statusMessage:r,localVersion:s,remoteVersion:l,progress:i,clearAndRefetch:u,checkRemoteVersion:c,children:d}){const h=o.useMemo(()=>({words:e,loading:t,error:a,statusMessage:r,localVersion:s,remoteVersion:l,progress:i,clearAndRefetch:u,checkRemoteVersion:c}),[e,t,a,r,s,l,i,u,c]);return n.jsx(_d.Provider,{value:h,children:d})}function mw({items:e,actions:t,columns:a,flat:r=!1,className:s,style:l}){const i=a??e.length;return n.jsx("section",{className:Be("summary-strip",r&&"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 Cw=(e,t)=>`${e} / ${t}`;function fw({blocks:e,sectionTitles:t,logo:a,footer:r,pageLabel:s=Cw,pageWidth:l,pageHeight:i,margin:u,className:c,style:d}){const{t:h}=_e.useTranslation(),p=o.useRef(null),m=o.useRef(null),g=o.useRef(null),y=o.useRef(null),[C,f]=o.useState(null),[_,b]=o.useState(!1);o.useEffect(()=>{const M=p.current;if(!M)return;const P=()=>b(M.scrollWidth>M.clientWidth+1);if(P(),typeof ResizeObserver>"u")return;const T=new ResizeObserver(P);return T.observe(M),()=>T.disconnect()},[C]);const w=e.map(M=>`${M.id}\0${M.section??""}\0${M.group??""}`).join(""),v=C&&C.shape===w?C.pages:null,[k,x]=o.useState(0);o.useEffect(()=>{const M=y.current;if(!M||typeof ResizeObserver>"u")return;const P=new ResizeObserver(()=>x(M.offsetHeight));return P.observe(M),()=>P.disconnect()},[]);const[A,B]=o.useState(0);o.useEffect(()=>{const M=m.current;if(!M||typeof ResizeObserver>"u")return;let P=null;const T=typeof requestAnimationFrame=="function"?I=>requestAnimationFrame(I):I=>setTimeout(I,16),ee=typeof cancelAnimationFrame=="function"?cancelAnimationFrame:I=>clearTimeout(I),te=new ResizeObserver(()=>{P==null&&(P=T(()=>{P=null,B(I=>I+1)}))});return Array.from(M.children).forEach(I=>te.observe(I)),()=>{te.disconnect(),P!=null&&ee(P)}},[w]),o.useLayoutEffect(()=>{const M=m.current,P=y.current;if(!M||!P)return;const T=j=>j.getBoundingClientRect().height||j.offsetHeight,ee=new Map;g.current?.querySelectorAll("[data-chrome-section]").forEach(j=>{ee.set(j.dataset.chromeSection??"",T(j))});const te=j=>T(P)-(ee.get(j??"")??0),I=Array.from(M.children).map(j=>T(j)),Y=[];e.forEach((j,F)=>{const O=Y[Y.length-1],G=O?e[O[0]]:void 0;G&&j.group!=null&&G.group===j.group&&G.section===j.section?O.push(F):Y.push([F])});const R=[];let q=[],Z=0;const z=()=>{q.length&&R.push(q),q=[],Z=0};Y.forEach(j=>{const F=j.reduce((G,ie)=>G+I[ie],0),O=te(e[j[0]].section);q.length&&e[q[0]].section!==e[j[0]].section&&z(),F>O?j.forEach(G=>{q.length&&Z+I[G]>O+.01&&z(),q.push(G),Z+=I[G]}):(q.length&&Z+F>O+.01&&z(),j.forEach(G=>q.push(G)),Z+=F)}),z(),f(j=>j&&j.shape===w&&JSON.stringify(j.pages)===JSON.stringify(R)?j:{shape:w,pages:R})},[w,k,l,i,u,A]);const E=$o,D=E,N=r??n.jsxs(n.Fragment,{children:[n.jsx("img",{src:D,alt:"IHAB",className:"report-doc__logo"}),"\xA9 IHAB, Inc. All rights reserved."]}),$=(M,P,T)=>({header:n.jsxs("div",{className:"report-doc__header",children:[n.jsx("h2",{className:"report-doc__title h3b",children:T!=null&&t?.[T]||null}),a]}),footer:n.jsxs("div",{className:"report-doc__footer caption-1",children:[n.jsx("span",{className:"report-doc__footer-left",children:N}),n.jsx("span",{className:"report-doc__page-no",children:s(M,P)})]})}),L=Array.from(new Set(e.map(M=>M.section??""))),U={...l?{"--report-page-w":l}:null,...i?{"--report-page-h":i}:null,...u?{"--report-margin":u}:null,...d};return n.jsxs("div",{ref:p,className:Be("report-doc",c),style:U,tabIndex:_?0:void 0,role:_?"group":void 0,"aria-label":_?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:y,className:"report-doc__ruler"}),n.jsx("div",{ref:g,children:L.map(M=>{const P=$(1,1,M||void 0);return n.jsxs("div",{"data-chrome-section":M,children:[P.header,P.footer]},M)})}),n.jsx("div",{ref:m,className:"report-doc__measure-blocks",children:e.map(M=>n.jsx("div",{children:M.content},M.id))})]}),v&&n.jsx("div",{className:"report-doc__pages",children:v.map((M,P)=>{const{header:T,footer:ee}=$(P+1,v.length,e[M[0]].section);return n.jsxs("section",{className:"report-doc__page",children:[T,M.map(te=>n.jsx("div",{children:e[te].content},e[te].id)),ee]},P)})})]})}function bw({title:e,fields:t,columns:a=4,className:r,style:s}){return n.jsxs("div",{className:Be("report-info",r),style:{"--report-info-cols":String(a),...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 ia=new Map;let Ir=null;const gw=12;function yw(e){for(let t=e.parentElement;t&&t!==document.body;t=t.parentElement){const a=window.getComputedStyle(t);if(a.transform&&a.transform!=="none"||a.filter&&a.filter!=="none"||a.perspective&&a.perspective!=="none"||/paint|layout|strict|content/.test(a.contain||""))return t}return document}function Or(){const e=new Map;for(const t of ia.keys()){if(!t.isConnected)continue;const a=yw(t),r=e.get(a)??[];r.push(t),e.set(a,r)}for(const t of e.values()){t.sort((r,s)=>r.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1);let a=0;for(const r of t){a>0?r.style.setProperty("--update-alert-stack-offset",`${a}px`):r.style.removeProperty("--update-alert-stack-offset");const s=r.getBoundingClientRect().height;s>0&&(a+=s+gw)}}}function vw(e){return typeof window>"u"?()=>{}:(ia.set(e,(ia.get(e)??0)+1),ia.get(e)===1&&typeof ResizeObserver<"u"&&(Ir??(Ir=new ResizeObserver(()=>Or())),Ir.observe(e)),Or(),()=>{const t=(ia.get(e)??1)-1;if(t>0){ia.set(e,t),Or();return}ia.delete(e),Ir?.unobserve(e),e.style.removeProperty("--update-alert-stack-offset"),Or()})}function _w({title:e,message:t,actionLabel:a,onAction:r,icon:s,onClose:l,className:i=""}){const{t:u}=_e.useTranslation(),c=a??u("common.update","\uC5C5\uB370\uC774\uD2B8"),d=o.useRef(null),h=o.useRef(!1);return o.useLayoutEffect(()=>{const p=d.current,m=p?.parentElement?.closest(".update-alert-stack")??p,g=m?vw(m):null;return()=>{g?.(),h.current&&p&&p.contains(document.activeElement)&&mr(p)}},[]),n.jsxs("div",{ref:d,className:Be("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(Us,{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})]})]}),r&&n.jsx(fe,{htmlType:"button",size:32,variant:"main",shape:"pill",className:"update-alert__action",onClick:r,children:c})]})}function xw({title:e,titleLevel:t=3,description:a,topActions:r,children:s,footerLeft:l,footerRight:i,ariaLabel:u,onClick:c,draggable:d,onDragStart:h,onDragEnd:p,className:m}){const g=t?`h${t}`:"div",y=l!=null||i!=null,C=s!=null&&s!==!1,f=o.useCallback(_=>{c&&_.target===_.currentTarget&&(_.key==="Enter"||_.key===" ")&&(_.preventDefault(),c())},[c]);return n.jsxs("div",{className:Be("training-card",c?"training-card--clickable":"",m),onClick:c,onKeyDown:c?f:void 0,role:c?"button":void 0,"aria-label":c?u??(typeof e=="string"?e:void 0):void 0,tabIndex:c?0:void 0,draggable:d,onDragStart:h,onDragEnd:p,children:[n.jsxs("div",{className:"training-card__header",children:[n.jsxs("div",{className:"training-card__title-row",children:[typeof e=="string"?n.jsx(g,{className:"training-card__title h4",children:e}):e,r!=null&&n.jsx("div",{className:"training-card__top-actions",onClick:_=>_.stopPropagation(),children:r})]}),a!=null?typeof a=="string"?n.jsx("p",{className:"training-card__description body-3",children:a}):a:n.jsx("p",{className:"training-card__description body-3","aria-hidden":"true",children:" "})]}),C&&n.jsx("div",{className:"training-card__body",children:s}),y&&n.jsxs("div",{className:"training-card__footer",children:[l!=null&&n.jsx("div",{className:"training-card__footer-left",children:l}),i!=null&&n.jsx("div",{className:"training-card__meta",children:i})]})]})}function ww({title:e,titleLevel:t=3,count:a,collapsed:r=!1,onToggle:s,beforeSort:l,sort:i,actions:u,empty:c=!1,emptyContent:d,dragOver:h=!1,onDragOver:p,onDragLeave:m,onDrop:g,children:y,className:C}){const{t:f}=_e.useTranslation(),_=o.useId(),b=t?`h${t}`:"span",w=s!=null,v=Be("training-card-group",h&&"training-card-group--dragover",r&&"training-card-group--collapsed",w&&"training-card-group--collapsible",C);return n.jsxs("div",{className:v,onDragOver:p,onDragLeave:m,onDrop:g,role:typeof e=="string"&&e?"group":void 0,"aria-labelledby":typeof e=="string"&&e?_:void 0,children:[n.jsxs("header",{className:"training-card-group__header",children:[w&&n.jsx(fe,{htmlType:"button",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:r?"chevron-right":"chevron-down",ariaLabel:typeof e=="string"&&e?r?f("common.expandFor",{name:e}):f("common.collapseFor",{name:e}):r?f("common.expand","\uD3BC\uCE58\uAE30"):f("common.collapse","\uC811\uAE30"),className:"training-card-group__chevron","aria-expanded":!r,onClick:s}),typeof e=="string"?n.jsx(b,{id:_,className:"training-card-group__title h5b",children:e}):e,a!==void 0&&n.jsx("span",{className:"training-card-group__count body-3b",children:a}),(l!=null||i||u!=null)&&n.jsxs("span",{className:"training-card-group__actions",onClick:k=>k.stopPropagation(),children:[l,i&&n.jsx(_n,{size:40,options:i.options,value:i.value,placeholder:i.placeholder,onChange:i.onChange,ariaLabel:typeof e=="string"&&e?f("common.sortFor",{name:e}):void 0}),u]})]}),!r&&(c?n.jsx("div",{className:"training-card-group__empty body-3",children:d}):n.jsx("div",{className:"training-card-group__grid",children:y}))]})}const Bw="speechear:saved_word_tables";function kw(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 Aw(){try{const e=localStorage.getItem(Bw);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(kw):[]}catch{return[]}}function xd(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 $s(e){return e.map(t=>t.homonum!=null?`${t.word}#${t.homonum}`:t.word).join("|")}function Nw(e){const t=new Set;return e.map(a=>{let r=a.id;for(let s=2;t.has(r);s++)r=`${a.id}~${s}`;return t.add(r),r===a.id?a:{...a,id:r}})}function Ew({title:e,titleIcon:t,disc:a,filterTitle:r,filterCollapsible:s,filterDefaultCollapsed:l,filterCollapsed:i,onFilterCollapsedChange:u,filterHeaderSummary:c,brand:d,code:h,baseItem:p,baseContentTypes:m,cellCapacity:g,maxItemsPerPage:y,items:C,onSaveComplete:f,onLoad:_,onRemoveItem:b,onCopyItem:w,onReplaceItem:v,onPickForm:k,onReset:x,resetLabel:A,saveButtonLabel:B,secondarySaveButtonLabel:E,onReorder:D,showCellCount:N,onAddItem:$,className:L,renderSavePopup:U,renderWordSearch:M,hideControls:P,saveOnly:T,tableName:ee,nameValue:te,onNameChange:I,descriptionValue:Y,onDescriptionChange:R,namePlaceholder:q,descriptionPlaceholder:Z,existingNames:z,editingName:j,onCancel:F,initialItemsPerPage:O,renderCellAction:G,actionsLeftExtra:ie}){const{t:K}=_e.useTranslation(),pe=A??K("wordPrint.clearAllSelection","\uBAA8\uB450 \uC120\uD0DD \uD574\uC81C"),X=C===void 0,H=!!I,[ne,V]=o.useState([]),W=(te??"").trim(),oe=W||(q??"").trim(),xe=(Y??"").trim()||(Z??"").trim(),be=(z??[]).map(he=>he.trim().toLowerCase()),me=[j?.trim().toLowerCase(),...ne].filter(he=>!!he),ke=[...be];for(const he of me){const Pe=ke.indexOf(he);Pe!==-1&&ke.splice(Pe,1)}const Le=W!==""&&ke.includes(W.toLowerCase()),[Me,le]=o.useState(Array(4).fill(null)),[ve,$e]=o.useState(4),[Ae,Ie]=o.useState(null),ze=Me.slice(0,ve),dt=!!d?.show,[st,et]=o.useState(!0),[gt,Se]=o.useState(!0),Ge=d&&{...d,top:st,bottom:gt},[we,qe]=o.useState("landscape"),[Ye,mt]=o.useState([...bc]),[wt,yt]=o.useState("show"),[Et,at]=o.useState(!0),[rt,Dt]=o.useState(!0),Bt=o.useRef(null),Lt=o.useRef([]),[It,xt]=o.useState(O==="all"?Number.POSITIVE_INFINITY:O??8),[lt,Ct]=o.useState("right"),[it,_t]=o.useState(!1),[ut,St]=o.useState(!1),{toastMessage:ue,toastType:Te,showWarning:De,clearToast:tt}=Gi("warning"),pt=o.useCallback(()=>Ie(null),[Ie]);$&&!X&&!N&&!g&&At("word-table-block-add-without-cell-count",'[WordTableBlock] \uD45C\uC2DC \uBAA8\uB4DC\uC5D0\uC11C onAddItem \uC740 cellCapacity \uB098 showCellCount \uC640 \uD568\uAED8 \uC918\uC57C "\uCD94\uAC00\uD558\uAE30" \uCE78\uC774 \uC0DD\uAE34\uB2E4.'),p&&X&&At("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[jt,je]=o.useState(()=>Math.max(C?.length??1,1)),nt=Math.max(g??0,C?.length??0,1),ae=X?ve:N?Math.max(jt,C?.length??1,1):nt,{width:ye,height:He}=aa[we],Ke=!X&&!N,vt=Math.max(1,Math.min(nt,y??nt)),Ue=Math.min(It,vt),ht=Ke?Ue:ae,cn=Math.ceil((C?.length??0)/Math.max(1,ht)),dn=(C?.length??0)<nt?Math.floor((C?.length??0)/Math.max(1,ht))+1:0,zt=Ke?Math.max(1,cn,dn):0,qt=Ke?Array.from({length:zt},(he,Pe)=>(C??[]).slice(Pe*ht,(Pe+1)*ht)):null,Ht=!!qt&&qt.length>1,Nt=X?ze.some(he=>he!==null&&he.length>1):(C??[]).some(he=>(he.words??[]).length>1),An=ee?.trim()||`${Yl(Fa())} ${Nt?K("wordTable.printFileNamePair","\uB300\uB9BD\uC30D\uD45C"):K("wordTable.printFileNameSingle","\uB2E8\uC5B4\uD45C")}`,an=o.useCallback(()=>Ht?Lt.current.filter(he=>he!==null):Bt.current?[Bt.current]:[],[Ht]),{print:$t,openNewWindow:Pt,downloadHtml:Ut}=hs({getElements:an,paperW:ye,paperH:He,fileName:An,onPopupBlocked:()=>{De(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."))}}),Jt=he=>{$e(he),le(Pe=>Pe.length>=he?Pe:[...Pe,...Array(he-Pe.length).fill(null)]),Ie(null)},gn=he=>{le(Pe=>{const Qe=[...Pe];return Qe[he]=null,Qe}),Ae===he&&Ie(null)},Zt=he=>{if(Ae===null)return;const Pe=Ae;le(kt=>{const Tt=[...kt];return Tt[Pe]=he.length>0?he:null,Tt});const Qe=ze.findIndex((kt,Tt)=>Tt>Pe&&kt===null);Ie(Qe!==-1?Qe:null)},xn=X?ze.some(he=>he?.some(Pe=>!!Pe.colloquialPronunciation)):(C??[]).some(he=>(he.words??[]).some(Pe=>!!Pe.colloquialLabel)),pn=!X&&gc([...p?[p]:[],...C??[]]),Qt=o.useMemo(()=>pa()?X?Me.slice(0,ve).flatMap(he=>(he??[]).map(Pe=>[Pe.word,Pe.homonum])):(he=>he.flatMap(Pe=>(Pe.words??[]).map(Qe=>[Qe.label,Qe.homonum])))([...p?[p]:[],...C??[]]):[],[X,Me,ve,C,p]),[Gt,Nn]=o.useState(!1);o.useEffect(()=>{if(Qt.length===0)return;let he=!1;return Promise.all(Qt.map(([Pe,Qe])=>Ml(Pe,Qe))).then(Pe=>{he||Nn(Pe.some(Boolean))},()=>{}),()=>{he=!0}},[Qt]);const de=Qt.length>0&&Gt,Ne=o.useMemo(()=>[...X||N?[{label:K("wordTable.filter.columns","\uCE78 \uC218"),items:U4.map(he=>({value:`${he}\uCE78`,displayLabel:K("wordTable.filter.column",{count:he})})),display:"segmented"}]:[],...Ke&&(C?.length??0)>0?[Ac(K,{hasPairs:Nt,itemCount:nt,max:y})]:[],...Ht?[K4(K)]:[]],[K,X,N,Ke,C?.length,Nt,nt,y,Ht]),Fe={...X||N?{[K("wordTable.filter.columns","\uCE78 \uC218")]:`${ae}\uCE78`}:{},...Ke&&(C?.length??0)>0?{[K(Nt?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")]:`${Ue}\uAC1C`}:{},...Ht?{[K("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")]:lt}:{}},Ze=(he,Pe)=>{Pe===K("wordTable.filter.columns","\uCE78 \uC218")?X?Jt(parseInt(he)):je(parseInt(he)):Pe===K(Nt?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")?xt(Nc(parseInt(he),nt)):Pe===K("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")&&Ct(Ec(he))},Oe=X?Nw(ze.filter(he=>he!==null&&he.length>0).map(he=>({id:$s(he),words:he.map(xd)}))):C??[],J=()=>{X&&le(he=>he.length>ve?he.slice(0,ve):he)},ce=(he=!1)=>{if(St(he),H&&f){const Pe=oe.trim().toLowerCase();Pe&&V(Qe=>Qe.includes(Pe)?Qe:[...Qe,Pe]),f(oe,Oe,xe||void 0,he),J();return}if(T&&f){f("",Oe,void 0,he),J();return}if(f){_t(!0);return}Ut()},[Ee,Ve]=o.useState(!1),[Xe,Je]=o.useState(""),ct=Xe.trim(),ft=ct!==""&&be.includes(ct.toLowerCase()),ge=()=>{Je(oe?K("wordTable.save.copyName",{name:oe,defaultValue:"{{name}} (\uBCF5\uC0AC)"}):""),Ve(!0)},S=()=>{!ct||ft||!f||(f(ct,Oe,xe||void 0,!0),J(),Ve(!1))},Q=Oe.length===0,Ce=Q||H&&(oe===""||Le),Re=()=>{if(Q){De(K("wordTable.emptyItems","\uB2E8\uC5B4\uB97C 1\uAC1C \uC774\uC0C1 \uCD94\uAC00\uD574\uC8FC\uC138\uC694."));return}if(H&&oe===""){De(K("wordTable.save.nameRequired","\uD45C \uC774\uB984\uC744 \uC785\uB825\uD574 \uC8FC\uC138\uC694."));return}H&&Le&&De(K("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."))},We=n.jsx(xa,{items:Oe,orientation:we,contentTypes:Ye,baseItem:p,baseContentTypes:m,cutLine:wt,showOutline:Et,showDivLine:rt,count:ae});return n.jsxs(n.Fragment,{children:[n.jsxs(_a,{type:"page",icon:t,title:e,disc:a,className:Be("word-table-block",L),children:[Ee&&n.jsx(Pn,{size:"small",title:E??K("wordTable.saveAsNewButton","\uB2E4\uB978 \uC774\uB984\uC73C\uB85C \uC800\uC7A5"),onClose:()=>Ve(!1),footer:({closeWithAnimation:he})=>n.jsxs(n.Fragment,{children:[n.jsx(fe,{htmlType:"button",size:48,type:"bar",label:K("common.cancel","\uCDE8\uC18C"),onClick:he}),n.jsx(fe,{htmlType:"button",size:48,type:"bar",variant:"main",label:K("common.save","\uC800\uC7A5"),disabled:!ct||ft,onClick:S})]}),children:n.jsx(Kn,{label:K("wordTable.save.nameLabel","\uC774\uB984"),value:Xe,onChange:Je,placeholder:K("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:S,error:ft?K("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."):void 0})}),it&&f&&U?.({defaultName:typeof e=="string"?e:K("wordTable.defaultName","\uB2E8\uC5B4 \uD45C"),preview:We,previewW:ye,previewH:He,items:Oe,existingNames:Aw().map(he=>he.name),saveAsNew:ut,onSave:(he,Pe)=>{f(he,Oe,Pe,ut),J(),_t(!1)},onCancel:()=>_t(!1)}),(X||$)&&Ae!==null&&M?.({cellIndex:Ae,onConfirm:X?Zt:he=>{if($){const Pe=he[0];if(Pe){const Qe=new Set((C??[]).map(Tt=>Tt.id));let kt=$s([Pe]);for(let Tt=2;Qe.has(kt);Tt++)kt=`${$s([Pe])}~${Tt}`;$({id:kt,words:[xd(Pe)]})}}Ie(null)},onClose:pt}),!P&&n.jsx(us,{title:r,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c,hasImage:de,hasColloquial:xn,hasCaption:pn,contentTypes:Ye,orientation:we,showOutline:Et,cutLine:wt,showDivLine:rt,setters:{setContentTypes:mt,setOrientation:qe,setShowOutline:at,setCutLine:yt,setShowDivLine:Dt,setShowTopInfo:et,setShowBottomInfo:Se},showCutLine:(Ke?ht:ae)>1,showDivLine2:Nt,middleSections:Ne,extraSelected:Fe,onExtraSelect:Ze,showPaperBands:dt,showTopInfo:st,showBottomInfo:gt}),Ht&&qt?n.jsx("div",{className:"word-table-block__pages",children:qt.map((he,Pe)=>n.jsx(xa,{orientation:we,contentTypes:Ye,cutLine:wt,showOutline:Et,showDivLine:rt,count:ht,items:he,baseItem:p,baseContentTypes:m,onRemoveItem:b,onCopyItem:w,onReplaceItem:v,onPickForm:k,onReorder:D&&((Qe,kt)=>D(Qe+Pe*ht,kt+Pe*ht)),indexOffset:Pe*ht,totalCount:C?.length??0,renderCellAction:G&&((Qe,kt)=>G(Qe+Pe*ht,kt)),showFillerAdd:!!$,onActivateCell:$?(Qe=>Ie(Qe+Pe*ht)):void 0,addableCount:Math.max(0,Math.min(ht,nt-Pe*ht)),brand:Ge,code:h,contentRef:Qe=>{Lt.current[Pe]=Qe},pageNumber:{current:Pe+1,total:qt.length},pageNumberPosition:lt},Pe))}):n.jsx(xa,{orientation:we,contentTypes:Ye,cutLine:wt,showOutline:Et,showDivLine:rt,count:ae,items:X?void 0:C??[],baseItem:X?void 0:p,baseContentTypes:m,editCells:X?ze:void 0,activeCell:Ae,onActivateCell:X||$?Ie:void 0,onRemoveCell:X?gn:void 0,onRemoveItem:X?void 0:b,onCopyItem:X?void 0:w,onReplaceItem:X?void 0:v,onPickForm:X?void 0:k,onReorder:X?void 0:D,renderCellAction:X?void 0:G,brand:Ge,code:h,showFillerAdd:!!$,contentRef:Bt}),!P&&!T&&ie!=null&&n.jsx("div",{className:"word-table-block__table-actions",children:ie}),H&&!P&&n.jsxs(Qa,{size:"medium",labelWidth:64,useBorder:!1,useRowBorder:!1,className:"word-table-block__meta",children:[n.jsx(un,{variant:"custom",label:K("wordTable.save.nameLabel","\uC774\uB984"),required:!0,align:"vertical",useFullWidth:!0,children:n.jsx(Kn,{required:!0,value:te??"",onChange:I,placeholder:q?q+K("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)"):K("wordTable.save.placeholder","\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694."),ariaLabel:K("wordTable.save.nameLabel","\uC774\uB984"),maxLength:40,size:48,fullWidth:!0,error:Le?K("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."):void 0,onKeyDown:he=>{(he.key==="Tab"&&!he.shiftKey||he.key===" ")&&!(te??"").trim()&&(q??"").trim()&&(he.preventDefault(),I?.(q??""))}})}),n.jsx(un,{variant:"custom",label:K("wordTable.save.descriptionLabel","\uC124\uBA85"),align:"vertical",useFullWidth:!0,children:n.jsx(Kn,{value:Y??"",onChange:R,placeholder:Z?Z+K("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)"):K("wordTable.save.descriptionPlaceholder","\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC124\uBA85\uC744 \uC785\uB825\uD558\uC138\uC694."),ariaLabel:K("wordTable.save.descriptionLabel","\uC124\uBA85"),maxLength:200,multiline:!0,rows:2,fullWidth:!0,onKeyDown:he=>{(he.key==="Tab"&&!he.shiftKey||he.key===" ")&&!(Y??"").trim()&&(Z??"").trim()&&(he.preventDefault(),R?.(Z??""))}})})]})]}),!P&&n.jsxs("div",{className:"word-table-block__actions",children:[n.jsxs("div",{className:"word-table-block__actions-left",children:[!T&&_&&n.jsx(fe,{htmlType:"button",size:40,type:"bar",label:K("wordTable.load","\uBD88\uB7EC\uC624\uAE30"),onClick:_}),!T&&x&&n.jsx(fe,{htmlType:"button",size:40,type:"bar",label:pe,onClick:x}),!T&&n.jsx(fe,{htmlType:"button",size:40,type:"bar",label:K("wordTable.openNewWindow","\uC0C8 \uCC3D\uC73C\uB85C \uBCF4\uAE30"),onClick:Pt})]}),n.jsxs("div",{className:"word-table-block__actions-right",children:[F&&n.jsx(fe,{htmlType:"button",size:"56",type:"bar",label:K("common.cancel","\uCDE8\uC18C"),onClick:F}),!T&&n.jsx(fe,{htmlType:"button",size:"56",type:"bar",label:K("wordTable.print","\uC778\uC1C4\uD558\uAE30"),onClick:$t}),E&&n.jsx(fe,{htmlType:"button",size:"56",type:"bar",label:E,onClick:()=>H?ge():ce(!0),disabled:Q,onDisabledClick:()=>{De(K("wordTable.emptyItems","\uB2E8\uC5B4\uB97C 1\uAC1C \uC774\uC0C1 \uCD94\uAC00\uD574\uC8FC\uC138\uC694."))}}),n.jsx(fe,{htmlType:"button",size:"56",type:"bar",variant:"main",label:B??K("wordTable.saveButton","\uC800\uC7A5\uD558\uAE30"),onClick:()=>ce(!1),disabled:Ce,onDisabledClick:Re})]})]}),n.jsx(va,{message:ue,type:Te,onClose:tt})]})}const Dw=8;function wd({items:e,className:t}){const{t:a}=_e.useTranslation(),r=o.useRef(null),[s,l]=o.useState(null),i=o.useCallback(()=>l(r.current?.getBoundingClientRect()??null),[]),u=o.useCallback(()=>l(null),[]),c=fr(!!s,b=>{b?i():u()},r),d=e.length,h=d<=3?1:2,p=Dw,m=d>p,g=e.slice(0,m?p-1:p),y=d-g.length,C=e.slice(g.length).map(b=>b.words?.length?b.words.map(w=>w.label).join(" / "):b.id),f=Math.ceil(Math.min(d,p)/h)||1,_=h*f;return n.jsx("div",{className:Be("word-table-thumb",t),style:{gridTemplateColumns:`repeat(${h}, 1fr)`},children:Array.from({length:_},(b,w)=>{if(m&&w===p-1)return n.jsxs("div",{ref:r,className:"word-table-thumb__cell word-table-thumb__cell--more",tabIndex:0,"aria-label":a("wordTable.thumbMoreAria",{count:y,words:C.join(", "),defaultValue:"\uADF8 \uBC16 {{count}}\uCE78: {{words}}"}),onPointerEnter:k=>{Un(k)||i()},onPointerLeave:k=>{Un(k)||u()},onFocus:()=>{ea()||i()},onBlur:u,onClick:k=>{k.stopPropagation(),c.touchPress()},children:[n.jsx("span",{className:"word-table-thumb__more body-3",children:a("wordTable.thumbMore",{count:y,defaultValue:"+{{count}}"})}),s&&C.length>0&&n.jsx(qn,{anchorRect:s,items:C,showIndex:!1,closeOnOutsideClick:!1})]},w);const v=g[w];return v?n.jsx("div",{className:"word-table-thumb__cell",children:(v.words?.length?v.words:[{label:v.id}]).map((k,x)=>n.jsxs(o.Fragment,{children:[x>0&&n.jsx("span",{className:"word-table-thumb__divider"}),n.jsx("span",{className:"word-table-thumb__word body-3",children:k.label})]},x))},w):n.jsx("div",{className:"word-table-thumb__cell word-table-thumb__cell--empty"},w)})})}function Sw({items:e,name:t,description:a,createdAt:r,code:s,published:l,publishedLabel:i,shared:u,sharedLabel:c,isNew:d,publisherName:h,publishedAt:p,likeCount:m,downloadCount:g,onPublisherClick:y,selected:C,onClick:f,onMore:_,titleNode:b,className:w}){const{t:v}=_e.useTranslation(),k=b!=null,x=h!=null||p!=null||m!=null||g!=null,A=B=>{B.target===B.currentTarget&&!k&&(B.key==="Enter"||B.key===" ")&&(B.preventDefault(),f?.())};return n.jsxs("div",{className:Be("word-table-button",C?"word-table-button--selected":"",x?"":"word-table-button--no-footer",w),role:"button",tabIndex:0,"aria-label":s?`${t} (${s})`:t,onClick:k?void 0:f,onKeyDown:A,children:[d&&n.jsx("span",{className:"word-table-button__new-dot","aria-label":v("myWordTable.newBadge","\uC0C8\uB85C \uB9CC\uB4E0 \uD45C")}),n.jsx(wd,{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:[b??n.jsx("div",{className:"word-table-button__title h4",children:t}),a&&n.jsx("div",{className:"word-table-button__desc body-3",children:a})]}),_&&!k&&n.jsx(fe,{htmlType:"button",className:"word-table-button__more",size:32,type:"dot",variant:"transparent-gray",useBorder:!1,icon:"ellipsis",ariaLabel:v("common.moreFor",{name:t}),onClick:B=>{B.stopPropagation(),_(B)}})]}),(s||r||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:r?Kl(r,v):""})}),n.jsxs("span",{className:"word-table-button__meta-right",children:[(l||u)&&n.jsxs("span",{className:"word-table-button__badges",children:[l&&n.jsx(ln,{className:"word-table-button__badge",size:"small",variant:"main",fill:"soft",iconLeft:"book-marked",label:i??v("myWordTable.publishedBadge","\uBC1C\uD589\uB428")}),u&&n.jsx(ln,{className:"word-table-button__badge",size:"small",fill:"soft",iconLeft:"link",label:c??v("myWordTable.sharedBadge","\uACF5\uC720 \uC911")})]}),s&&n.jsx("span",{className:"word-table-button__code caption-1",children:s})]})]}),x&&n.jsxs("div",{className:"word-table-button__footer",children:[n.jsxs("span",{className:"word-table-button__store-by",children:[h&&(y?n.jsx("button",{className:"training-card__publisher body-4",type:"button","aria-label":v("wordTable.publisherFilter",{name:h,defaultValue:"{{name}} \uAC8C\uC2DC\uD55C \uAC83\uB9CC \uBCF4\uAE30"}),onClick:B=>{B.stopPropagation(),y()},children:h}):n.jsx("span",{className:"training-card__publisher training-card__publisher--static body-4",children:h})),p&&n.jsx("span",{className:"training-card__date body-4",children:Kl(p,v)})]}),n.jsxs("span",{className:"word-table-button__store-stats",children:[m!=null&&n.jsx(ln,{size:"small",fill:"soft",variant:"like",iconLeft:"heart",label:String(m),"aria-label":v("common.likeCount",{count:m,defaultValue:`\uC88B\uC544\uC694 ${m}`})}),g!=null&&n.jsx(ln,{size:"small",fill:"soft",variant:"main",iconLeft:"download",label:String(g),"aria-label":v("common.downloadCount",{count:g,defaultValue:`\uAC00\uC838\uAC04 \uC218 ${g}`})})]})]})]})}/**
1043
+ `).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:$o,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:[r," \xA0 ",s]})]})]})]}),n.jsx("div",{className:"site-footer__copyright footer-copyright caption-1",children:"\xA9 IHAB, Inc. All rights reserved."})]})})}function S_({logo:e,logoAlt:t="",logoHref:a,links:r=[],actions:s,className:l,containerClassName:i,renderLink:u,menuLabel:c}){const{t:d}=_e.useTranslation(),h=c??{open:d("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),close:d("header.menuClose","\uBA54\uB274 \uB2EB\uAE30")},[p,m]=o.useState(!1),b=o.useId(),v=o.useRef(null);o.useEffect(()=>{if(!p)return;const x=Qn(()=>{const y=document.getElementById(b);y&&y.contains(document.activeElement)&&v.current?.focus(),m(!1)}),g=typeof window<"u"&&window.matchMedia?window.matchMedia("(min-width: 961px)"):null,w=y=>{y.matches&&m(!1)};return g&&(g.matches&&m(!1),g.addEventListener?.("change",w)),()=>{x(),g?.removeEventListener?.("change",w)}},[p,b]);const C=i?`${i} landing-header__inner`:"landing-header__inner",f=(x,g)=>u?u(x,{onClick:g}):n.jsx("a",{href:x.href,onClick:g,"aria-current":x.current?"page":void 0,children:x.label});return n.jsxs("header",{className:l?`landing-header ${l}`:"landing-header",children:[n.jsxs("div",{className:C,children:[e!=null&&(()=>{const x=typeof e=="string"?n.jsx("img",{src:e,alt:t,className:"landing-header__logo"}):e;return a?n.jsx("a",{href:a,className:"landing-header__brand",children:x}):n.jsx("div",{className:"landing-header__brand",children:x})})(),r.length>0&&n.jsx("nav",{className:"landing-header__links",children:r.map((x,g)=>n.jsx("span",{children:f(x)},`${g}:${x.href}`))}),n.jsxs("div",{className:"landing-header__actions",children:[s,r.length>0&&n.jsx("button",{ref:v,type:"button",onClick:()=>m(x=>!x),"aria-expanded":p,"aria-controls":b,"aria-label":p?h.close:h.open,className:p?"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",{})]})})]})]}),r.length>0&&n.jsx("nav",{id:b,hidden:!p,className:"landing-header__drawer",children:n.jsx("div",{className:i??void 0,children:r.map((x,g)=>n.jsx("span",{className:"landing-header__drawer-item",children:f(x,()=>m(!1))},`${g}:${x.href}`))})})]})}function j_({children:e,action:t,onClick:a,className:r}){const s=a?"bottom-sticky__inner bottom-sticky__inner--clickable":"bottom-sticky__inner";return n.jsx("div",{className:r?`bottom-sticky ${r}`:"bottom-sticky",children:n.jsxs("div",{className:s,onClick:a,...tc(a),children:[n.jsx("div",{className:"bottom-sticky__content",children:e}),t]})})}function T_({mountedRef:e}){const t=o.useRef({phase:"sound",at:0}),a=o.useRef(0),r=o.useRef(null),s=o.useRef(null),l=o.useCallback(()=>{const C=t.current,f=C.phase!=="sound"&&C.at>0;s.current=f?{phase:C.phase,elapsed:Math.max(0,Date.now()-C.at)}:null},[]),i=o.useCallback(()=>{const C=s.current;return s.current=null,C},[]),u=o.useCallback(()=>{a.current+=1,t.current={phase:"sound",at:0}},[]),c=o.useCallback((C,f,x=0)=>{if(!(C>0))return Promise.resolve(!0);const g=a.current;return t.current={phase:f,at:Date.now()-Math.max(0,x)},new Promise(w=>{const y=setTimeout(()=>{r.current===y&&(r.current=null),w(!!e.current&&g===a.current)},C);r.current=y})},[e]),d=o.useCallback(()=>{t.current={phase:"sound",at:Date.now()}},[]),h=o.useCallback(()=>{t.current={phase:"sound",at:0}},[]),p=o.useCallback(()=>{const C=t.current;return C.phase!=="sound"&&C.at>0},[]),m=o.useCallback(()=>a.current,[]),b=o.useCallback(C=>C===a.current,[]),v=o.useCallback(()=>{a.current+=1},[]);return o.useEffect(()=>()=>{r.current&&(clearTimeout(r.current),r.current=null)},[]),o.useMemo(()=>({positionRef:t,isRunning:p,generation:m,isCurrent:b,abort:u,waitPad:c,enterSound:d,leave:h,pause:l,resume:i,__bumpGenerationForTest:v}),[p,m,b,u,c,d,h,l,i,v])}const Ba=9,M_=e=>Math.round(Math.min(Ba,Math.max(0,e))/Ba*100),L_=e=>e/100*Ba,ar=2,$c=.1,$_=e=>Math.min(ar,Math.max(0,e)),R_=.1,P_=e=>Math.round(e*1e6)/1e6;function rr(e){const{noiseRatio:t}=e;if(typeof t=="number"&&Number.isFinite(t))return $_(t);const a=Math.min(Ba,Math.max(0,Number(e.level)||0))/Ba,r=Number(e.mainVolume);return r>0?a>0?P_(Math.min(ar,Math.max(R_,a/r))):0:1}const Rc=e=>Math.min(1,Math.max(0,Number(e.mainVolume)||0));function Pc(e){return Rc(e)}function fs(e){return Rc(e)*rr(e)}function bs(e,t=W1()){const a=Number.isFinite(t)&&t>0?t:1;return Math.min(1,fs(e)/a)}function ra(e,t){const a={...e,...t??{}};return t&&"level"in t&&typeof t.noiseRatio!="number"&&(a.noiseRatio=rr({level:a.level,mainVolume:a.mainVolume})),a}const oa={enabled:!0,type:"defaultNoise",level:4.5,noiseRatio:1,speed:1,mainVolume:1,mainSpeed:1},gs=o.createContext(null);function Er(){return o.useContext(gs)}const ys=e=>`${z1()}/${e}`,Fc=e=>Array.from({length:10},(t,a)=>ys(`${e}-${String(a+1).padStart(2,"0")}.mp3`)),Dr={get defaultNoise(){return ys("noise1.mp3")},get street(){return Fc("noise2")},get restaurant(){return Fc("noise3")},get buzz(){return ys("noise4.mp3")}};function F_(e){const t=Math.floor(Math.random()*10);switch(e){case"defaultNoise":return Dr.defaultNoise;case"street":return Dr.street[t];case"restaurant":return Dr.restaurant[t];case"buzz":return Dr.buzz;default:return null}}function I_({noisePlayer:e,audioRef:t,playbackStateRef:a,sequencer:r}){const s=o.useRef(e?.registerAnalyser);s.current=e?.registerAnalyser;const l=o.useRef(null),[i,u]=o.useState(null),c=o.useRef(null),d=o.useRef(null),h=o.useRef(null),p=o.useRef(null),m=o.useRef(0),b=o.useRef(null),v=o.useCallback(()=>!!r?.isRunning(),[r]),C=o.useCallback(()=>{p.current!==null&&(cancelAnimationFrame(p.current),p.current=null),b.current!==null&&(clearTimeout(b.current),b.current=null)},[]),f=o.useCallback((k,_=250)=>{const A=l.current;if(!A)return;const B=d.current;if(B){d.current=null;try{A.pause()}catch{}A.src=B,A.load()}if(!A.src)return;m.current+=1,C();try{oo(),lr(A).then($=>{if(l.current===A)try{s.current?.("noise",$)}catch{}})}catch{}const E=A.paused?0:ir(A);A.paused&&Vn(A,0),A.play().catch(()=>{});const D=performance.now(),N=()=>{const $=Math.min(1,(performance.now()-D)/_);try{Vn(A,E+(k-E)*$)}catch{}$<1?p.current=requestAnimationFrame(N):p.current=null};p.current=requestAnimationFrame(N)},[C]),x=o.useCallback((k=250,_)=>{const A=l.current;if(!A||A.paused){_?.();return}const B=++m.current;C();const E=performance.now(),D=ir(A),N=()=>{const $=Math.min(1,(performance.now()-E)/k);try{Vn(A,D*(1-$))}catch{}if($<1)p.current=requestAnimationFrame(N);else{p.current=null,b.current!==null&&(clearTimeout(b.current),b.current=null);try{A.pause()}catch{}_?.()}};p.current=requestAnimationFrame(N),b.current=setTimeout(()=>{if(b.current=null,m.current===B){p.current!==null&&(cancelAnimationFrame(p.current),p.current=null);try{A.paused||(Vn(A,0),A.pause(),_?.())}catch{}}},k+150)},[C]);o.useEffect(()=>{const k=document.createElement("audio");return k.loop=!0,k.crossOrigin="anonymous",l.current=k,()=>{C();try{k.pause(),k.removeAttribute("src"),k.load()}catch{}l.current=null,c.current=null,d.current=null}},[C]);const g=e?bs(e.settings):0,w=!!e?.settings.enabled&&g>0;o.useEffect(()=>{if(!w)return;let k=0;const _=setInterval(()=>{const A=l.current;if(!A||A.paused){k=0;return}const B=t.current;if(B&&!B.paused&&!B.ended||v()||a.current==="playing"){k=0;return}k+=1,k>=2&&(k=0,x())},400);return()=>clearInterval(_)},[x,w,t,a,v]),o.useEffect(()=>{const k=()=>{const _=l.current;if(document.hidden){if(_&&!_.paused){C();try{_.pause()}catch{}}return}if(!_||!_.paused)return;const A=t.current,B=!!A&&!A.paused&&!A.ended||v()||a.current==="playing",E=h.current;B&&E?.enabled&&E.volume>0&&f(E.volume)};return document.addEventListener("visibilitychange",k),()=>document.removeEventListener("visibilitychange",k)},[C,f,t,a,v]),o.useEffect(()=>{h.current=e?{enabled:e.settings.enabled,volume:g,type:e.settings.type}:null},[e,e?.settings.enabled,g,e?.settings.type]);const y=o.useRef(null);return o.useEffect(()=>()=>{y.current?.(),y.current=null},[]),o.useEffect(()=>{const k=e?.settings,_=l.current;if(!_)return;const A=k?bs(k):0;if(!k||!k.enabled||A===0){x();return}if(c.current!==k.type){const B=F_(k.type);B&&(c.current=k.type,u(B),d.current=B,x(150,()=>{if(d.current!==B)return;d.current=null,_.src=B,_.load();const E=t.current;if(E&&!E.paused||v()){y.current?.();const D=()=>{_.removeEventListener("canplay",D),y.current===N&&(y.current=null);const $=t.current,L=h.current;($&&!$.paused&&!$.ended||v())&&L?.enabled&&L.volume>0&&f(L.volume)},N=()=>_.removeEventListener("canplay",D);y.current=N,_.addEventListener("canplay",D)}}))}else{const B=t.current,E=!!B&&!B.paused&&!B.ended||v()||a.current==="playing";if(E&&d.current)f(A);else if(E&&_.paused&&_.src)f(A);else if(!_.paused)if(!E)x();else{C();const D=ir(_),N=performance.now(),$=()=>{const L=Math.min(1,(performance.now()-N)/150);try{Vn(_,D+(A-D)*L)}catch{}L<1?p.current=requestAnimationFrame($):p.current=null};p.current=requestAnimationFrame($)}}},[e?.settings,e?.settings.enabled,g,e?.settings.type,C,f,x,t,a,h,v]),o.useEffect(()=>{const k=l.current;if(k)try{k.playbackRate=Math.min(1.25,Math.max(.75,e?.settings.speed??1))}catch{}},[e?.settings.speed]),{noiseAudioRef:l,activeNoiseUrl:i,noiseSettingsRef:h,cancelNoiseFade:C,fadeInNoise:f,fadeOutNoise:x}}function O_({ttsText:e,playbackRate:t,mainVolume:a,fillRef:r,waveProgressRef:s,setProgress:l,setPlaybackState:i,setStateLocal:u,fadeInNoise:c,fadeOutNoise:d,noiseSettingsRef:h,onDoneRef:p,handleEndRef:m}){const b=o.useRef(null),v=o.useRef(0),C=o.useRef(null),f=o.useRef(0),x=o.useRef(!1);o.useEffect(()=>()=>{f.current++;try{if(C.current&&(cancelAnimationFrame(C.current),C.current=null),x.current&&window.speechSynthesis){try{window.speechSynthesis.cancel()}catch{}x.current=!1}}catch{}},[]);const g=(k,_=1)=>{try{const A=(k||"").trim().split(/\s+/).filter(Boolean).length||Math.max(1,(k||"").length);return Math.max(700,Math.round(A*300/Math.max(.25,_)))}catch{return 1200}},w=o.useCallback(k=>{if(typeof window>"u"||!window.speechSynthesis){try{typeof p.current=="function"&&p.current(!1)}catch{}return}const _=window.speechSynthesis,A=++f.current;try{try{_.cancel()}catch{}const B=k??e,E=Array.isArray(B)?B.filter(M=>!!M):[B||""];E.length===0&&E.push("");const D=Math.max(.3,Math.min(3,t));v.current=E.reduce((M,P)=>M+g(P,D||1),0),b.current=performance.now(),l(0),i("playing"),u("playMode");const N=h.current;N?.enabled&&(N?.volume??0)>0&&c(N.volume);const $=()=>{try{const M=b.current||performance.now(),P=performance.now()-M,T=v.current||1200,ee=Math.min(1,P/T);try{r.current&&(r.current.style.left=`${ee*100}%`),s.current&&s.current.style.setProperty("--progress",String(ee))}catch{}ee<1&&(C.current=requestAnimationFrame($))}catch{}},L=()=>{if(A===f.current)try{C.current&&(cancelAnimationFrame(C.current),C.current=null),l(1),i("stopped");try{m.current?.()}catch{try{typeof p.current=="function"&&p.current(!0)}catch{}}}catch{}},U=M=>{const P=new SpeechSynthesisUtterance(E[M]);try{P.rate=D}catch{}try{P.volume=Math.max(0,Math.min(1,a))}catch{}P.onend=()=>{if(A===f.current){if(M<E.length-1){try{U(M+1)}catch{L()}return}L()}},P.onerror=()=>{L()},P.onstart=()=>{if(!(M>0))try{C.current&&(cancelAnimationFrame(C.current),C.current=null),C.current=requestAnimationFrame($)}catch{}},x.current=!0,_.speak(P)};try{U(0)}catch{try{typeof p.current=="function"&&p.current(!0)}catch{}}}catch{try{typeof p.current=="function"&&p.current(!0)}catch{}}},[e,t,a,c,r,s,l,i,u,h,p,m]),y=o.useCallback(()=>{f.current++;try{if(window.speechSynthesis)try{window.speechSynthesis.cancel()}catch{}C.current&&(cancelAnimationFrame(C.current),C.current=null),d(),b.current=null}catch{}i("stopped"),u("active"),l(0)},[d,i,u,l]);return{startTTS:w,stopTTS:y}}const z_=.01,W_=.3;async function H_(e,t,a,r=!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(r){const b=Math.floor(W_*i.sampleRate),v=Math.min(u.length,b);for(;c<v&&Math.abs(u[c])<=z_;)c++;c>=v&&(c=0)}const d=u.length-c,h=a&&a>0?Math.min(d,Math.floor(a*i.sampleRate)):d,p=Math.max(t,h),m=Math.floor(p/t)||1;return new Array(t).fill(0).map((b,v)=>{const C=c+v*m,f=Math.min(C+m,c+p,u.length);let x=0;for(let g=C;g<f;g++){const w=Math.abs(u[g]);w>x&&(x=w)}return x})}catch{return null}finally{try{s?.close?.()}catch{}}}async function Ic(e,t,a,r=!1){try{const s=await fetch(e);if(s.ok===!1)return null;const l=await s.arrayBuffer();return await H_(l,t,a,r)}catch(s){try{const l=zl(s)}catch{}return null}}const vs=45,V_=74,q_=2;function Sr(e){const t=Math.min(2,Math.max(0,Number(e)||0));return t<=1?t*45:45+(t-1)*29}function jr(e){return Sr(e)/45}const U_=e=>Math.max(0,(typeof e=="number"&&Number.isFinite(e)?e:0)*1e3),Oc=e=>Math.max(0,typeof e=="number"&&Number.isFinite(e)?e:0);function zc({durationsSec:e,leadInMs:t=0,tailMs:a=0}){const r=Oc(t),s=Oc(a),l=[];let i=0;return e.forEach((u,c)=>{for(const[d,h]of[["lead",r],["sound",U_(u)],["tail",s]])l.push({kind:d,track:c,startMs:i,durMs:h}),i+=h}),{segments:l,totalMs:i,trackCount:e.length}}function Wc(e,t){const a=(t|0)*3;if(t<0||a+2>=e.segments.length)return null;const[r,s,l]=[e.segments[a],e.segments[a+1],e.segments[a+2]];return{lead:r,sound:s,tail:l,totalMs:r.durMs+s.durMs+l.durMs}}function G_(e,t){const a=Wc(e,t.track);if(!a||!(a.totalMs>0))return 0;const r=a[t.kind],s=Math.min(Math.max(0,Number.isFinite(t.elapsedMs)?t.elapsedMs:0),r.durMs);return Math.max(0,Math.min(1,(r.startMs-a.lead.startMs+s)/a.totalMs))}function K_(e,t,a){const r=Math.max(0,Math.floor(a)),s=Wc(e,t);if(!s||r===0||!(s.totalMs>0)||s.lead.durMs===0&&s.tail.durMs===0||!(s.sound.durMs>0))return{lead:0,sound:r,tail:0};const l=Math.round(s.lead.durMs/s.totalMs*r),i=Math.round(s.tail.durMs/s.totalMs*r),u=Math.max(1,r-l-i),c=l+u+i-r;return{lead:Math.max(0,l-Math.ceil(c/2)),sound:u,tail:Math.max(0,i-Math.floor(c/2))}}function Y_({currentTime:e,sources:t,index:a,audioDuration:r}){const s=a||0,l=Array.isArray(t)&&t.length>0?t[s]:void 0,i=l?l.duration||r||0:r||0;if(!(i>0))return 0;const u=Number.isFinite(e)?e:0;return Math.max(0,Math.min(1,u/i))}function Z_({phase:e,phaseElapsedMs:t,currentTime:a,trackDurationSec:r,leadInMs:s,tailMs:l}){const i=zc({durationsSec:[r],leadInMs:s,tailMs:l});return G_(i,{track:0,kind:e,elapsedMs:e==="sound"?(Number.isFinite(a)?a:0)*1e3:t})}function X_({bars:e,trackDurationSec:t,leadInMs:a,tailMs:r}){return K_(zc({durationsSec:[t],leadInMs:a,tailMs:r}),0,e)}function J_(e,t){if(!Array.isArray(e))return null;const a=t||0;return a<e.length-1?a+1:null}function Q_({ended:e,completedByEnd:t}){return!!e||!!t}function ex(e){return e.map((t,a)=>({src:t.src,label:String(a+1),color:void 0,duration:t.duration||0}))}function tx(e){return e.reduce((t,a)=>t+(a.duration||0),0)}function nx(e,t,a){const r=Array.isArray(e)?e:e?[e]:[],s=[];for(const l of r)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=a(i,t);u&&s.push({code:i,resolvedPath:u})}}return s}function ax(e,t){if(!t||e.readyState<1)return!0;const a=e.currentSrc||e.src;return a?Hc(a)!==Hc(t):!0}function Hc(e){try{return new URL(e,typeof location>"u"?"http://localhost/":location.href).href}catch{return e}}const Vc=4,rx=jr(Vc/vs);function ox(e){const{src:t,segments:a,progress:r=0,waveProgressRef:s,noiseSrc:l,noiseRatio:i=0,noiseSpeed:u=1,totalDuration:c=0,mainVolume:d=1,onReadyChange:h,showSoundWaveForm:p=!0,leadInMs:m=0,tailMs:b=0,trackDurationSec:v=0}=e,C=o.useRef(null),f=o.useRef(null),[x,g]=o.useState(null),[w,y]=o.useState(!1),[k,_]=o.useState(null),[A,B]=o.useState(2),[E,D]=o.useState(0),[N,$]=o.useState(null),[L,U]=o.useState(!1),[M,P]=o.useState(!1),T=3,ee=3,te=1,I=300,Y=o.useRef(0),R=o.useCallback(()=>{const be=C.current,me=f&&f.current?f.current:be?be.closest(".audio-player__wave"):null,ke=me?me.getBoundingClientRect():be?be.getBoundingClientRect():null,Le=ke?ke.width:0,Me=ke?Math.max(100,ke.width):320,le=ke?ke.height:0,ve=Math.max(te,Math.min(I,Math.floor((Me+ee)/(T+ee)))),$e=ve*T,Ae=Math.max(0,ve-1),Ie=Math.max(0,Ae>0?(Me-$e)/Ae:ee);return{bars:ve,gap:Ie,height:le,width:Le}},[]),q=o.useRef(void 0),Z=o.useRef(null),z=o.useCallback(async(be,me,{quiet:ke=!1}={})=>{const Le=++Y.current,Me=()=>Y.current===Le;try{if(ke||y(!1),q.current=be,!be){Me()&&g(null);return}let le=me;if(!le)try{for(let Ae=0;Ae<4&&!(C.current||f.current);Ae++)await new Promise(Ie=>requestAnimationFrame(Ie));await new Promise(Ae=>requestAnimationFrame(Ae));const $e=R();$e.height>0&&D($e.height),le=$e.bars,B($e.gap)}catch{le=120}Z.current=le;const ve=await Ic(be,le);if(!Me())return;if(!ve){g(null),y(!1);return}g(ve),_(le),y(!0)}catch{if(!Me())return;g(null),y(!1)}},[y,g,D,B,_,R]);o.useEffect(()=>{const be=f.current;if(!be||typeof ResizeObserver>"u")return;let me=null;const ke=new ResizeObserver(()=>{me!==null&&cancelAnimationFrame(me),me=requestAnimationFrame(()=>{me=null;try{const Le=R();if(Le.width<=0||(Le.height>0&&D(Le.height),Z.current===null||Le.bars===Z.current))return;const Me=q.current;B(Le.gap),Me?z(Me,Le.bars,{quiet:!0}).catch(()=>{}):Z.current=Le.bars}catch{}})});return ke.observe(be),()=>{ke.disconnect(),me!==null&&cancelAnimationFrame(me)}},[R,z]),o.useEffect(()=>{const be=a&&a[0]&&a[0].src||t||a&&a.length===1&&a[0]&&a[0].src;z(typeof be=="string"?be:void 0).catch(()=>{}),P(!1)},[t,a,z]),o.useEffect(()=>{let be=!1;if(U(!1),$(null),!l||!k)return;const me=c>0?c*(u||1):void 0;return Ic(l,k,me,!0).then(ke=>{be||($(ke),ke||U(!0))}).catch(()=>{be||($(null),U(!0))}),()=>{be=!0}},[l,k,c,u]);const j=Math.max(0,Math.min(1,d)),F=o.useMemo(()=>x&&x.length&&Math.max(...x)||1,[x]),O=k||40,G=o.useMemo(()=>X_({bars:O,trackDurationSec:v,leadInMs:m,tailMs:b}),[O,v,m,b]),ie=o.useMemo(()=>Array.from({length:O}).map((be,me)=>{const ke=me>=G.lead&&me<G.lead+G.sound,Le=G.sound>0&&ke?Math.min(O-1,Math.round((me-G.lead)/G.sound*O)):-1,Me=ke?x&&x[Le]!=null?x[Le]:null:x?0:null,le=Me==null?null:Math.min(1,Me/F*j),ve=le!=null&&E>0&&Sr(le)<=Vc,$e=le==null?.15:ve?0:jr(le),Ae=ve,Ie=O>1?me/(O-1):0;return n.jsx("div",{className:Ae?"audio-player__bar audio-player__bar--hidden":"audio-player__bar",style:{"--val":$e,"--i":me,"--mix":Ie}},me)}),[O,x,F,j,E,G]),K={"--progress":String(Math.max(0,Math.min(1,r)))},pe=o.useMemo(()=>N&&N.length&&Math.max(...N.map(be=>Number.isFinite(be)?Math.abs(be):0))||1,[N]),X=j*Math.max(0,i),H=!l||!N||!N.length?1:Math.max(1,X),ne={"--bar-gap":`${A}px`,"--wave-h":`${Sr(H)}px`,"--wave-h1":`${vs}px`},V=w&&(l?!!N||L:!0);o.useEffect(()=>{V&&P(!0)},[V]);const W=M?w:V;o.useEffect(()=>{h?.(W)},[W,h]);const oe=k||40,xe=o.useMemo(()=>Array.from({length:oe}).map((be,me)=>{const ke=N&&N[me]!=null?N[me]:null,Le=ke==null?0:Math.abs(ke)/pe*X,Me=Math.max(rx,jr(Le)),le=oe>1?me/(oe-1):0;return n.jsx("div",{className:"audio-player__bar",style:{"--val":Me,"--i":me,"--mix":le}},me)}),[oe,N,pe,X,E]);return n.jsxs("div",{className:"audio-player__wave",ref:f,style:ne,children:[l&&n.jsx("div",{className:`audio-player__wave-noise ${V?"is-ready":""}`,"aria-hidden":"true",children:xe}),p&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:`audio-player__wave-inner audio-player__wave-unplayed ${W?"is-ready":""}`,ref:C,children:ie}),n.jsx("div",{className:`audio-player__wave-inner audio-player__wave-played ${W?"is-ready":""}`,ref:s,style:K,children:ie})]})]})}const qc={idle:!1,synthesizing:!0,resolving:!0,checking_exists:!0,getting_signed_url:!0,downloading:!0,measuring_duration:!0,ready:!1,error:!0};function _s(e,t){return new Promise((a,r)=>{const s=document.createElement("audio");let l=!1;const i=()=>{try{s.removeAttribute("src"),s.load()}catch{}},u=()=>{if(l)return;l=!0;const d=isFinite(s.duration)&&s.duration||0;i(),a(d)},c=d=>{l||(l=!0,i(),t.rejectOnError?r(new Error(d)):a(0))};s.addEventListener("loadedmetadata",u),s.addEventListener("error",()=>c("audio load failed")),setTimeout(()=>c("audio load timeout"),t.timeoutMs),s.src=e})}const sx=2e3;function Uc(e,t=sx){return new Promise(a=>{let r=!1;const s=()=>{r||(r=!0,a())};e.addEventListener("canplay",s,{once:!0}),e.addEventListener("error",s,{once:!0}),setTimeout(s,t)})}function lx({showSoundWaveForm:e,showNoiseWaveForm:t,timeoutMs:a=2500}){const r=o.useRef(!1),s=o.useRef([]),l=o.useCallback(c=>{if(r.current=c,!c||!s.current.length)return;const d=s.current;s.current=[];for(const h of d)h(!0)},[]),i=o.useCallback(()=>{r.current=!1},[]),u=o.useCallback(()=>!e&&!t||r.current?Promise.resolve(!0):new Promise(c=>{const d=p=>{clearTimeout(h),s.current=s.current.filter(m=>m!==d),c(p)},h=setTimeout(()=>d(!0),a);s.current.push(d)}),[e,t,a]);return o.useEffect(()=>()=>{const c=s.current;s.current=[];for(const d of c)d(!1)},[]),{onReadyChange:l,waitForReady:u,markNotReady:i}}function ix(){const e=o.useRef([]),t=o.useCallback(s=>(e.current.push(s),s),[]),a=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})},[]),r=o.useCallback(()=>{a([])},[a]);return o.useEffect(()=>()=>{for(const s of e.current)try{URL.revokeObjectURL(s)}catch{}e.current=[]},[]),{track:t,keepOnly:a,revokeAll:r}}function ux({offsetY:e=8}={}){const t=o.useRef(null),[a,r]=o.useState(null),s=o.useCallback(()=>r(null),[]),l=o.useCallback(()=>{try{const i=t.current?.getBoundingClientRect();if(!i)return;r({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(a)return document.addEventListener("mousedown",s),()=>document.removeEventListener("mousedown",s)},[a,s]),{ref:t,rect:a,show:l,hide:s}}function cx(e){if(!e)return 0;const t=e.duration;if(Number.isFinite(t)&&t>0)return t;if(t===0)return 0;try{const a=e.seekable;if(a&&a.length>0){const r=a.end(a.length-1);if(Number.isFinite(r)&&r>0)return r}}catch{}return null}const dx=400,px=2e3,Gc=5;function hx({audioRef:e,fillRef:t,waveProgressRef:a,sourcesRef:r,currentIndexRef:s,sequencer:l,leadInMs:i=0,tailMs:u=0}){const c=o.useRef(null),d=o.useRef(0),h=o.useRef(null),p=o.useCallback(()=>{c.current!==null&&(cancelAnimationFrame(c.current),c.current=null)},[]),m=o.useCallback(()=>{if(c.current!==null)return;let v=0;const C=()=>{if(zn){const f=typeof performance<"u"&&performance.now?performance.now():Date.now();if(v>0&&f-v>dx){const x=h.current===null||f-h.current>px;if(h.current=f,x&&d.current<Gc){d.current+=1;const g=d.current;let w=null;try{w=typeof document<"u"?document.visibilityState:null}catch{}At(`progress-ticker-slow-frames#${g}`,`[ihab-core] \uC9C4\uD589 \uC0AC\uC2AC\uC758 \uD2C0 \uC0AC\uC774\uAC00 ${Math.round(f-v)}ms \uC785\uB2C8\uB2E4(\uBCF4\uD1B5 16ms).`,w==="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.",g>=Gc?`(${g}\uBC88\uC9F8 \u2014 \uB354\uB294 \uC548 \uC54C\uB9BD\uB2C8\uB2E4)`:`(${g}\uBC88\uC9F8)`)}}v=f}try{const f=e.current,x=Array.isArray(r.current)?r.current[s.current||0]:void 0,g=!!x&&Number.isFinite(x.duration)&&(x.duration??0)>0,w=g?0:cx(f),y=t.current,k=(i||0)>0||(u||0)>0,_=k&&(l?.positionRef.current?.phase??"sound")!=="sound";if(w===null&&!_)try{y&&y.style.visibility!=="hidden"&&(y.style.visibility="hidden")}catch{}else{const A=g?x.duration:w||0;zn&&_&&!(A>0)&&At("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 B=k?Z_({phase:l?.positionRef.current?.phase??"sound",phaseElapsedMs:l?.positionRef.current?Math.max(0,Date.now()-l.positionRef.current.at):0,currentTime:f&&typeof f.currentTime=="number"?f.currentTime:0,trackDurationSec:A,leadInMs:i||0,tailMs:u||0}):Y_({currentTime:f&&typeof f.currentTime=="number"?f.currentTime:0,sources:r.current,index:s.current,audioDuration:w??0});try{y&&(y.style.visibility&&(y.style.visibility=""),y.style.left=`${B*100}%`)}catch{}try{a.current?.style.setProperty("--progress",String(B))}catch{}}}catch{}c.current=requestAnimationFrame(C)};c.current=requestAnimationFrame(C)},[e,t,a,r,s,l,i,u]),b=o.useCallback(v=>{p();try{t.current&&(t.current.style.visibility="",t.current.style.left=`${v*100}%`)}catch{}try{a.current?.style.setProperty("--progress",String(v))}catch{}},[p,t,a]);return o.useEffect(()=>p,[p]),{start:m,stop:p,settleTo:b}}function xs({btnLabel:e,soundSrc:t,bucketPath:a,onDone:r,disabled:s=!1,ttsText:l=null,className:i,showSoundWaveForm:u=!0,showNoiseWaveForm:c=!0,leadInMs:d=0,tailMs:h=0}){const{t:p}=_e.useTranslation(),m=e,b=Er(),v=o.useRef(b?.registerAnalyser);o.useEffect(()=>{v.current=b?.registerAnalyser});const C=o.useRef(null),f=o.useRef(null),x=o.useRef(null),g=ix(),w=o.useRef(null),y=o.useRef(!1),k=o.useRef(null),{ref:_,rect:A,show:B,hide:E}=ux();o.useEffect(()=>()=>{v.current?.("main",null),v.current?.("noise",null)},[]);const[D,N]=o.useState(!1),[$,L]=o.useState("idle"),[U,M]=o.useState("stopped"),P=o.useRef("stopped");o.useEffect(()=>{P.current=U},[U]);const[T,ee]=o.useState(0),[te,I]=o.useState("active"),Y=o.useRef(!1);o.useEffect(()=>{if(te!=="playMode"||!Y.current)return;Y.current=!1;const J=typeof document<"u"?document.activeElement:null;if(J&&J!==document.body)return;const ce=x.current?.querySelectorAll("button")[1];try{ce?.focus()}catch{}},[te]);const[R,q]=o.useState(null),[Z,z]=o.useState(null),[j,F]=o.useState(0),[O,G]=o.useState(!1),[ie,K]=o.useState(0),pe=b?.playbackRate??1,X=b?.mainVolume??1,H=b?fs(b.settings):0,ne=b?Pc(b.settings):X,[V,W]=o.useState("idle"),[oe,xe]=o.useState(""),[be]=o.useState("top"),me=o.useRef(null),ke=o.useRef(0),Le=o.useRef(null),Me=o.useRef(!0),le=T_({mountedRef:Me}),ve=o.useRef(null),$e=o.useRef(d),Ae=o.useRef(h);o.useEffect(()=>{$e.current=Math.max(0,d||0)},[d]),o.useEffect(()=>{Ae.current=Math.max(0,h||0)},[h]);const{start:Ie,stop:ze,settleTo:dt}=hx({audioRef:C,fillRef:f,waveProgressRef:Le,sourcesRef:me,currentIndexRef:ke,sequencer:le,leadInMs:d,tailMs:h}),{onReadyChange:st,waitForReady:et,markNotReady:gt}=lx({showSoundWaveForm:u,showNoiseWaveForm:c}),Se=o.useRef(null),Ge=o.useRef(s),we=o.useRef(r),qe=o.useRef(null),Ye=o.useRef(!1),[mt,wt]=o.useState(!1),yt=o.useCallback(J=>{Ye.current=J,wt(J)},[]),Et=o.useRef(null),{activeNoiseUrl:at,noiseSettingsRef:rt,fadeInNoise:Dt,fadeOutNoise:Bt}=I_({noisePlayer:b,audioRef:C,playbackStateRef:P,sequencer:le}),{startTTS:Lt,stopTTS:It}=O_({ttsText:l,playbackRate:pe,mainVolume:ne,fillRef:f,waveProgressRef:Le,setProgress:ee,setPlaybackState:M,setStateLocal:I,fadeInNoise:Dt,fadeOutNoise:Bt,noiseSettingsRef:rt,onDoneRef:we,handleEndRef:Et});o.useEffect(()=>{St.current=It});const xt=J=>{if(typeof window>"u"||!window.speechSynthesis){try{xe(p("training.ttsUnavailable","\uC774 \uAE30\uAE30\uC5D0\uC11C\uB294 \uC74C\uC131\uC744 \uB4E4\uB824\uC904 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."))}catch{}Lt(J);return}tt("tts"),Lt(J)},lt=Array.isArray(t)?t.filter(Boolean):t?[t]:[],Ct=(!lt||lt.length===0)&&!!l,it=Array.isArray(R)&&R.length>0?R:Array.isArray(Z)&&Z.length>0?Z:null,_t=Math.max(Array.isArray(it)?it.length:0,lt.length);o.useEffect(()=>(Me.current=!0,()=>{Me.current=!1}),[]);const ut=()=>{le.abort()},St=o.useRef(null),ue=o.useRef(null),Te=o.useRef(null),Ne=o.useRef(null);Ne.current||(Ne.current=()=>{Te.current=null;const J=C.current;if(ue.current==="audio"&&J&&(!J.paused||le.isRunning())){ut();try{J.pause()}catch{}Me.current&&(M("paused"),ze(),Bt())}else if(ue.current==="tts")try{St.current?.()}catch{}});const tt=J=>{ue.current=J,Te.current=Ka(Ne.current)},pt=()=>{Te.current?.(),Te.current=null};o.useEffect(()=>()=>{Ne.current&&_r(Ne.current)},[]);const jt=o.useRef(pe);o.useEffect(()=>{jt.current=pe||1},[pe]);const je=o.useCallback(J=>{const ce=jt.current||1;try{J.defaultPlaybackRate=ce}catch{}try{J.playbackRate=ce}catch{}},[]),nt=o.useCallback((J,ce)=>{if(!ax(J,ce)){try{J.currentTime=0}catch{}je(J);return}J.src=ce,je(J),J.load(),je(J)},[je]),ae=o.useCallback(()=>{qe.current&&(clearTimeout(qe.current),qe.current=null),W("idle")},[]),ye=o.useCallback(async(J,ce=3,De=50,Ve=0)=>{ae();const Xe=le.generation(),Je=!!J&&J.currentTime>0&&!J.ended,ct=Math.max(0,$e.current-Math.max(0,Ve));if(ct>0&&!Je){tt("audio"),Ie(),M("playing");const ft=rt.current;if(ft?.enabled&&(ft.volume??0)>0)try{Dt(ft.volume)}catch{}if(!await le.waitPad(ct,"lead",Ve)||!Me.current||!le.isCurrent(Xe))return!1}le.enterSound();for(let ft=0;ft<ce;ft++){if(!Me.current||!le.isCurrent(Xe))return!1;try{return tt("audio"),await J.play(),!0}catch(ge){if((ge instanceof Error||typeof ge=="object"&&ge&&"name"in ge?ge.name:void 0)==="AbortError"){if(!le.isCurrent(Xe))return!1;await new Promise(S=>setTimeout(S,De));continue}try{xe(p("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}return!1}}try{xe(p("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}return!1},[p,Ie,le,Dt,rt,ae]),He=o.useCallback(J=>{const ce=le.generation(),De=Math.max(0,Ae.current-Math.max(0,J));Ie();const Ve=rt.current;if(Ve?.enabled&&(Ve.volume??0)>0)try{Dt(Ve.volume)}catch{}const Xe=()=>{try{ve.current?.()}catch{}};if(De<=0){le.leave(),Xe();return}le.waitPad(De,"tail",J).then(Je=>{le.leave(),Je&&le.isCurrent(ce)&&Xe()}).catch(()=>{})},[le,Ie,Dt,rt]),Ke=o.useCallback(()=>{const J=C.current;if(!J)return;const ce=()=>{M("playing"),I("playMode"),G(!0),Ie();try{oo(),lr(J).then(Je=>{if(Me.current)try{v.current?.("main",Je)}catch{}})}catch{}const Xe=rt.current;Xe?.enabled&&(Xe?.volume??0)>0&&Dt(Xe.volume)},De=()=>{Q_({ended:!!J?.ended,completedByEnd:Ye.current})||(M("paused"),ze(),Bt())},Ve=()=>{const Xe=()=>{try{const Je=me.current,ct=J_(Je,ke.current);if(ct!==null){ke.current=ct,F(ct),G(!0);const ft=Je?.[ct]&&Je[ct].src;if(ft&&J){nt(J,ft),ye(J).catch(()=>{});return}}}catch{}M("stopped"),ee(1);try{if(J)try{J.currentTime=0}catch{}}catch{}ze(),G(!1),Bt();try{!Ge.current&&Et.current&&Et.current()}catch{}};if(ve.current=Xe,Ae.current>0){Ie(),le.waitPad(Ae.current,"tail").then(Je=>{le.leave(),Je&&Xe()}).catch(()=>{});return}Xe()};return J.addEventListener("play",ce),J.addEventListener("pause",De),J.addEventListener("ended",Ve),()=>{try{J.removeEventListener("play",ce),J.removeEventListener("pause",De),J.removeEventListener("ended",Ve),ze()}catch{}}},[Dt,Bt,ye,rt,Ie,ze,le]);o.useEffect(()=>Ke(),[Ke]),o.useEffect(()=>{Ge.current=s},[s]),o.useEffect(()=>{we.current=r},[r]),o.useEffect(()=>{if(s||te!=="active")return;const J=k.current;if(!J)return;let ce=null;const De=requestAnimationFrame(()=>{try{const Ve=J.getTotalLength();if(!Ve)return;const Xe=Ve*.2;J.style.strokeDasharray=`${Ve-Xe} ${Xe}`;const Je="triFlow_"+Math.random().toString(36).slice(2);ce=document.createElement("style"),ce.textContent=`@keyframes ${Je}{from{stroke-dashoffset:0}to{stroke-dashoffset:-${Ve}}}`,document.head.appendChild(ce),J.style.animation=`${Je} 2.4s linear infinite`}catch{}});return()=>{cancelAnimationFrame(De),ce?.remove()}},[te,s]),o.useEffect(()=>{me.current=R},[R]),o.useEffect(()=>{ke.current=j},[j]),o.useEffect(()=>{const J=x.current,ce=w.current;if(!J||!ce)return;let De=null;const Ve=32,Xe=60,Je=()=>{try{const ft=Array.from(J.querySelectorAll(":scope > .button"));let ge=0;ft.forEach(We=>{if(We===ce)return;const he=We.getBoundingClientRect();ge+=he.width});const S=J.getBoundingClientRect().width,Q=Math.max(0,Math.floor(S-ge-8)),Ce=_t;if(!Ce||Q<=0){Array.from(ce.children).forEach(We=>{try{We.style.width=""}catch{}});return}let Re=Math.floor(Q/Ce);Re>Xe&&(Re=Xe),Re<Ve&&(Re=Math.max(Ve,Math.floor(Q/Ce))),Array.from(ce.querySelectorAll(".button")).forEach(We=>{try{We.style.width=`${Re}px`}catch{}})}catch{}},ct=requestAnimationFrame(Je);try{De=new ResizeObserver(()=>{requestAnimationFrame(Je)}),De.observe(J),De.observe(ce),window.addEventListener("resize",Je)}catch{}return()=>{try{cancelAnimationFrame(ct)}catch{}try{De&&(De.disconnect(),De=null)}catch{}try{window.removeEventListener("resize",Je)}catch{}}},[R,Z,_t]),o.useEffect(()=>()=>{try{Se.current&&(clearTimeout(Se.current),Se.current=null),qe.current&&(clearTimeout(qe.current),qe.current=null)}catch{}},[]);const vt=(J,ce)=>{q(J),K(ce),gt(),z(ex(J)),me.current=J},Ue=()=>{I("playMode"),F(0),G(!0)},ht=async(J,ce)=>{yt(!1),y.current=!1,nt(J,ce),await Uc(J),await et()!==!1&&(N(!1),Ue(),await ye(J))},cn=async(J,ce=!1)=>{const De=C.current;N(!0),L("measuring_duration");try{const Ve=await _s(J,{timeoutMs:1e4,rejectOnError:!0});vt([{src:J,objectUrl:null,duration:Ve}],Ve),L("ready"),ce&&De&&await ht(De,J)}finally{y.current=!1,N(!1)}},dn=async(J,ce=!1)=>{const De=C.current;N(!0),L("measuring_duration");try{const Ve=await Promise.all(J.map(Je=>_s(Je,{timeoutMs:1e4})));if(!Me.current)return;const Xe=J.map((Je,ct)=>({src:Je,objectUrl:null,duration:Ve[ct]||0}));vt(Xe,tx(Xe)),L("ready"),ce&&De&&Xe.length>0&&await ht(De,Xe[0].src)}finally{y.current=!1,N(!1)}},zt=async(J=!1,ce=!0)=>{const De=C.current,Ve=t?Array.isArray(t)?t:[t]:[];if(!Ve||Ve.length===0||!Ve.some(Boolean))return!1;if(y.current)return null;y.current=!0,ce&&N(!0),L("resolving");try{const Xe=nx(t,a,kl),Je=[];let ct=0;for(const ft of Xe){let ge=ft.src??null,S=null;if(!ge&&ft.resolvedPath){try{L("getting_signed_url"),ge=await Al(ft.resolvedPath)}catch{ge=null}if(!Me.current)return!1;if(!ge)try{L("downloading");const Ce=await Nl(ft.resolvedPath);if(!Me.current)return!1;if(Ce){const Re=Ce instanceof Blob?Ce:new Blob([Ce]);S=g.track(URL.createObjectURL(Re)),ge=S}}catch{L("error");try{xe(p("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.")),I("active")}catch{}}}if(!ge)continue;let Q=0;try{L("measuring_duration"),Q=await _s(ge,{timeoutMs:3e3})}catch{Q=0}if(!Me.current){if(S)try{URL.revokeObjectURL(S)}catch{}for(const Ce of Je)if(Ce.objectUrl)try{URL.revokeObjectURL(Ce.objectUrl)}catch{}return!1}ct+=Q||0,Je.push({...ft,src:ge,objectUrl:S,duration:Q})}if(vt(Je,ct),Je.length>0&&J&&De){const ft=Je[0];yt(!1);try{g.keepOnly(Je.map(ge=>ge.objectUrl))}catch{}if(L("ready"),y.current=!1,ft.src&&De)try{if(nt(De,ft.src),await Uc(De),await et()===!1)return!1;ce&&N(!1),Ue(),De&&await ye(De)}catch{ce&&N(!1)}else ce&&N(!1);I("playMode"),F(0),G(!0)}return Je.length>0}finally{y.current=!1,ce&&N(!1),L(Xe=>Xe==="ready"?"ready":"idle")}},qt=async J=>{const ce=le.isRunning();if(J.paused&&!ce){if(Ye.current){await Nt();return}const De=le.resume();if(De){if(M("playing"),De.phase==="tail"){He(De.elapsed);return}await ye(J,3,50,De.elapsed);return}await ye(J),M("playing")}else le.pause(),ut(),J.pause(),M("paused"),ce&&(ze(),Bt())},Ht=async()=>{const J=C.current;if(!(!J&&!Ct)){if(Ct){const ce=window.speechSynthesis;if(te==="active"){const De=ja(),Ve=Array.isArray(l)?l.filter(Boolean):l?[l]:[];if(De&&Ve.length>0){if(y.current)return;I("load"),N(!0),L("synthesizing"),y.current=!0;try{const Xe=await Promise.all(Ve.map(Je=>Promise.resolve(De(Je))));Xe.length>1?await dn(Xe,!0):await cn(Xe[0],!0)}catch{y.current=!1,N(!1),I("active"),xt(Ve.length>0?Ve:void 0)}return}xt(Ve.length>0?Ve:void 0);return}if(te==="playMode"){const De=!!ce&&(ce.speaking||ce.paused)&&!(J&&(J.currentSrc||J.getAttribute("src")));if(J&&!De){await qt(J);return}try{if(ce&&ce.paused)try{tt("tts"),ce.resume(),M("playing")}catch{}else try{ce.pause(),M("paused")}catch{}}catch{}}return}if(te==="active"){if(s&&Array.isArray(me.current)&&me.current.length>0){const De=me.current[0];try{if(De.src&&J)try{nt(J,De.src),Ue(),J&&await ye(J)}catch{}Ue();return}catch{}}I("load");let ce;try{ce=await zt(!0)}catch{ce=!1}if(ce===!1&&Me.current){try{xe(p("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}I("active")}return}if(te!=="load"&&(te==="playMode"||te==="active"))try{J&&await qt(J)}catch(ce){(ce instanceof Error||typeof ce=="object"&&ce&&"name"in ce)&&ce.name}}},Nt=async()=>{const J=C.current;if(J)try{const ce=me.current;if(Array.isArray(ce)&&ce.length>1){await gn(0);return}yt(!1);try{J.currentTime=0}catch{}J&&await ye(J),M("playing"),I("playMode")}catch{}},An=()=>{ut(),pt(),St.current?.();const J=C.current;try{if(J){try{J.pause()}catch{}try{J.currentTime=0}catch{}}}catch{}Bt(),M("stopped"),I("active"),ee(0),G(!1)},an=async(J,{sameSegment:ce=!1}={})=>{ut();const De=le.generation(),Ve=C.current,Xe=me.current?.[J]?.src;try{if(yt(!1),F(J),G(!0),ke.current=J,!Xe||!Ve||(ce||gt(),nt(Ve,Xe),!ce&&await et()===!1)||!le.isCurrent(De)||(await ye(Ve),!le.isCurrent(De)))return;M("playing"),I("playMode")}catch{}},$t=async()=>{const J=me.current,ce=ke.current||0;if(!J||ce<=0){await Nt();return}await an(ce-1)},Pt=async()=>{const J=me.current,ce=ke.current||0;if(!J||ce>=J.length-1){An();return}await an(ce+1)},Ut=()=>{if(Ye.current)return;const J=200,ce=340;yt(!0),ut(),pt();try{ee(1)}catch{}dt(1);try{W("hold")}catch{}try{const De=C.current,Ve=Ct&&!!De?.src;if(!Ct||Ve){if(De){De.pause();try{De.currentTime=0}catch{}}}else It();Bt()}catch{}try{M("stopped")}catch{}if(G(!1),!Ge.current)try{qe.current&&(clearTimeout(qe.current),qe.current=null),qe.current=setTimeout(()=>{try{W("out")}catch{}qe.current=setTimeout(()=>{try{typeof we.current=="function"&&we.current(!0)}catch{}try{W("idle")}catch{}qe.current=null},ce)},J)}catch{}};o.useEffect(()=>{Et.current=Ut});const Jt=o.useCallback(()=>xe(""),[]),gn=async J=>{(me.current||[])[J]&&await an(J,{sameSegment:J===ke.current})},Zt=U==="playing",xn=o.useMemo(()=>{if(!Z||Z.length<=1)return Z;const J=Z[j];return J?[J]:Z},[Z,j]),pn=s===!0;o.useEffect(()=>{try{const J=C.current;J&&typeof J.playbackRate=="number"&&je(J)}catch{}},[pe,je]);const Qt=o.useRef({raf:null,timer:null});o.useEffect(()=>{const J=C.current;if(!J)return;const ce=Math.max(0,Math.min(1,ne)),De=Qt.current,Ve=()=>{De.raf!==null&&(cancelAnimationFrame(De.raf),De.raf=null),De.timer!==null&&(clearTimeout(De.timer),De.timer=null)};Ve();const Xe=ir(J);if(J.paused||Math.abs(Xe-ce)<.001||typeof requestAnimationFrame!="function"){try{Vn(J,ce)}catch{}return}const Je=performance.now(),ct=()=>{const ft=Math.min(1,(performance.now()-Je)/150);try{Vn(J,Xe+(ce-Xe)*ft)}catch{}De.raf=ft<1?requestAnimationFrame(ct):null};return De.raf=requestAnimationFrame(ct),De.timer=setTimeout(()=>{Ve();try{Vn(J,ce)}catch{}},200),Ve},[ne]);const Gt=V==="hold",Nn=V==="out",de=te==="playMode"&&!D&&!mt||Gt||Nn,Ee=U!=="stopped"||Gt||Nn,Fe=U==="paused",Ze=Math.max(0,Math.min(100,(T||0)*100)),Oe=Be("audio-player__fill",de?"is-visible":"",Ee?"is-expanded":"",Fe?"is-paused":"",Nn?"is-out":"");return n.jsxs("div",{className:`audio-player ${pn?"is-disabled":""}${i?` ${i}`:""}`,role:"group","aria-label":typeof m=="string"?m:void 0,children:[n.jsxs("div",{className:`audio-player__panel ${Zt?"is-playing":""} ${D?"is-loading":""} ${te!=="default"?"is-revealed":""}`,children:[D?n.jsxs("div",{className:"audio-player__loading",role:qc[$]?"status":void 0,"aria-live":qc[$]?"polite":"off",children:[n.jsx("span",{className:"audio-player__loading-spinner","aria-hidden":"true"}),n.jsx("span",{className:"audio-player__loading-text",children:p("training.audioStatus.preparing",{defaultValue:"\uC18C\uB9AC\uB97C \uC900\uBE44\uD558\uACE0 \uC788\uC2B5\uB2C8\uB2E4\u2026"})})]}):null,te==="active"?n.jsx("button",{className:"audio-player__button",type:"button",disabled:pn,onClick:()=>{Y.current=wr(),E(),Ht()},"aria-label":typeof m=="string"?m:p("training.listen","\uB4E3\uAE30"),onMouseEnter:B,onMouseLeave:E,onFocus:B,onBlur:E,children:n.jsx("span",{ref:_,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:k,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,A&&n.jsx(Mn,{anchorRect:A,text:typeof m=="string"&&m?m:p("training.listenLabel","\uBB38\uC7A5 \uB4E3\uAE30"),offset:8}),n.jsxs("div",{className:`audio-player__play ${te==="playMode"||Zt?"is-visible":""}`,inert:!(te==="playMode"||Zt)||void 0,children:[n.jsxs("div",{ref:x,className:"audio-player__buttons",children:[n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"skip-back",onClick:$t,ariaLabel:p("training.prev","\uC774\uC804"),width:"60px",variant:"transparent-white","aria-hidden":"true",tabIndex:-1,disabled:te!=="playMode"}),n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:Zt?"pause":"play",onClick:Ht,ariaLabel:p("common.playPause","\uC7AC\uC0DD / \uBA48\uCDA4"),"aria-pressed":Zt,width:"60px",variant:"transparent-white",disabled:te!=="playMode"}),n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"square",onClick:An,ariaLabel:p("training.stop","\uC815\uC9C0"),width:"60px",variant:"transparent-white","aria-hidden":"true",tabIndex:-1,disabled:te!=="playMode"}),_t>1?n.jsx("div",{ref:w,className:"audio-player__source-buttons",children:Array.from({length:_t}).map((J,ce)=>n.jsx(fe,{htmlType:"button",size:32,type:"dot",shape:"pill",useBorder:!1,label:String(ce+1),onClick:()=>{try{gn(ce)}catch{}},ariaLabel:p("training.sourcePlay",{n:ce+1}),variant:"transparent-white",selected:O&&j===ce,disabled:te!=="playMode"||!(Array.isArray(R)&&R[ce]),showTooltipInfo:!0},ce))}):null,!Array.isArray(R)||R.length<=1?n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"repeat",onClick:Nt,ariaLabel:p("common.replay","\uB2E4\uC2DC\uB4E3\uAE30"),width:"60px",variant:"transparent-white",disabled:te!=="playMode"}):null,n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"skip-forward",onClick:Pt,ariaLabel:p("training.next","\uB2E4\uC74C"),width:"60px",variant:"transparent-white","aria-hidden":!0,tabIndex:-1,disabled:te!=="playMode"}),n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"check",onClick:Ut,ariaLabel:p("common.done","\uC644\uB8CC"),width:"60px",variant:"transparent-white",disabled:te!=="playMode"})]}),n.jsxs("div",{className:"audio-player__slider",children:[n.jsx("div",{className:Oe,ref:f,style:{left:`${Ze}%`},"aria-hidden":"true"}),(u||c)&&n.jsx(ox,{segments:xn,progress:T,totalDuration:ie,waveProgressRef:Le,showSoundWaveForm:u,leadInMs:d,tailMs:h,trackDurationSec:R?.[j]?.duration??0,noiseSrc:c&&b?.settings.enabled&&H>0?at:null,noiseRatio:b?rr(b.settings):0,noiseSpeed:b?.settings.speed??1,mainVolume:X,onReadyChange:st})]})]}),n.jsx("audio",{ref:C,crossOrigin:"anonymous",preload:"auto"})]}),!u&&n.jsxs("p",{className:"audio-player__no-waveform caption-1",children:[n.jsx(ot,{icon:"triangle-alert",size:14}),p("training.noSoundWaveform","\uC18C\uB9AC \uBE44\uAD50 \uBB38\uC81C\uB294 \uC6E8\uC774\uBE0C\uD3FC\uC744 \uD45C\uD604\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.")]}),n.jsx(va,{message:oe,position:be,onClose:Jt})]})}function Tr(e){const{t}=_e.useTranslation(),{text:a,label:r,anchorRect:s=null,onClose:l,closeOnOutsideClick:i=!0,isMobilePopup:u=!1}=e||{},[c,d]=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:p,canIncrease:m,canDecrease:b,fontSize:v,lineHeight:C}=Oi({storageKey:"tooltip-fontScale"}),f=o.useCallback(()=>d(k=>k==="dark"?"light":"dark"),[]),x=o.useCallback(k=>{try{k.stopPropagation()}catch{}try{typeof l=="function"&&l()}catch{}},[l]),g=Array.isArray(a)?a:typeof a>"u"||a===null?[]:[a],w={fontSize:`${v}px`,lineHeight:`${C}px`,"--tt-line-height":`${C}px`,"--tt-marker-size":"28px"},y=n.jsxs("div",{className:se(`text-box-tooltip__root ${c==="dark"?"is-dark":""}`),children:[n.jsxs("div",{className:se("text-box-tooltip__box"),children:[r&&n.jsx("div",{className:se("text-box-tooltip__label body-2b"),children:r}),n.jsx("div",{className:se("text-box-tooltip__text body-1"),style:w,children:g.map((k,_)=>n.jsxs("div",{className:se("text-box-tooltip__line"),children:[g.length>1?n.jsx("div",{className:se("text-box-tooltip__marker"),children:n.jsx("span",{className:se("text-box-tooltip__line-number button-1"),children:_+1})}):null,n.jsx("span",{className:se("text-box-tooltip__line-text"),children:k})]},_))})]}),n.jsxs("div",{className:se("text-box-tooltip__buttons"),children:[n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:"minus",onClick:p,ariaLabel:t("training.fontSizeDecrease","\uAE00\uC790 \uD06C\uAE30 \uAC10\uC18C"),variant:c==="dark"?"transparent-white":"transparent-gray",disabled:!b}),n.jsx(fe,{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(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:c==="dark"?"moon":"sun-medium",onClick:f,ariaLabel:t("training.toggleBackground","\uBC30\uACBD \uC804\uD658"),variant:c==="dark"?"transparent-white":"transparent-gray"}),n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:"x",onClick:x,ariaLabel:t("common.close","\uB2EB\uAE30"),variant:c==="dark"?"transparent-white":"transparent-gray"})]})]});return s?n.jsx(Bn,{anchorRect:s,className:se(`text-box-tooltip ${c==="dark"?"is-dark":""}`),onClose:l,closeOnOutsideClick:i,isMobilePopup:u,ariaLabel:r||t("tooltip.textbox","\uBCF8\uBB38"),children:y}):n.jsx("div",{className:se(`text-box-tooltip ${c==="dark"?"is-dark":""}`),children:y})}function Kc({state:e="disabled"}){const{t}=_e.useTranslation();return n.jsxs("div",{className:`ts-bullet ts-bullet--${e}`,"aria-hidden":!0,children:[n.jsx("div",{className:"bullet__dot",children:n.jsx(ot,{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 Yc(e,t,a){const r=o.useRef(t),s=o.useRef(a);o.useEffect(()=>{r.current=t,s.current=a}),o.useEffect(()=>{if(!e||typeof document>"u")return;let l=null,i=10;const u=()=>{l=null;const c=r.current(),d=c?Array.from(c.querySelectorAll(En)).find(h=>!h.closest('[aria-hidden="true"]')):void 0;if(d){try{d.focus()}catch{}if(document.activeElement===d)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 d=s.current();if(d)try{d.focus()}catch{}}}},[e])}function Zc({title:e,children:t,className:a="",state:r="disabled",usePreviewTextBtn:s=!1,onPreviewTextBtn:l,previewText:i=null,useFaded:u,usePlayAllBtn:c=!1,onPlayAll:d,playAllActive:h=!1}){const{t:p}=_e.useTranslation(),m=yn("(max-width: 767px)"),b=`training-step__title h4 ${u&&r==="disabled"?"training-step__title--faded":""} ${a}`.trim(),v=`training-step__title-row training-step__title-row--${r}`.trim(),C=o.useRef(null),[f,x]=o.useState(!1),[g,w]=o.useState(null),[y,k]=o.useState(null);Yc(f&&!!g,()=>{if(typeof document>"u")return null;const D=Array.from(document.querySelectorAll(".tooltip__content"));for(let N=D.length-1;N>=0;N--)if(D[N].querySelector(".text-box-tooltip__root"))return D[N];return null},()=>C.current?.querySelector("button")??null);const _=o.useRef(l);o.useEffect(()=>{_.current=l});const A=o.useMemo(()=>i==null?"":typeof i=="string"||typeof i=="number"?String(i):Array.isArray(i)&&i.every(D=>typeof D=="string"||typeof D=="number")?i.join(""):"",[i]),B=o.useCallback(()=>{x(!1),w(null),k(null)},[]);o.useEffect(()=>{if(!f)return;let D;try{typeof _.current=="function"&&(D=_.current())}catch{}if(D===!1){B();return}k(typeof D<"u"&&D!==null?D:null)},[A]);const E=o.useCallback(()=>{let D;try{typeof l=="function"&&(D=l())}catch{}if(D!==!1){if(k(typeof D<"u"&&D!==null?D:i),!C.current){x(N=>!N);return}if(f)x(!1),w(null),k(null);else{const N=C.current.getBoundingClientRect();w(N),x(!0)}}},[l,i,f]);return n.jsxs("div",{className:v,children:[n.jsx("p",{className:b,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(fe,{htmlType:"button",size:32,type:m?"dot":"bar",icon:"play-circle",label:m?void 0:p("training.playAll","\uBAA8\uB450 \uB4E3\uAE30"),ariaLabel:p("training.playAll","\uBAA8\uB450 \uB4E3\uAE30"),selected:h,onClick:d,variant:r==="disabled"?"disabled":"default",disabled:r==="disabled"||h,onDisabledClick:h&&r!=="disabled"?()=>{}:void 0}),s&&n.jsx("div",{ref:C,children:n.jsx(fe,{htmlType:"button",size:32,type:m?"dot":"bar",icon:"eye",label:m?void 0:p("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),ariaLabel:p("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),onClick:E,className:f?"is-selected":void 0,"aria-expanded":f,"aria-haspopup":"dialog",variant:r==="disabled"?"disabled":"default",disabled:!i&&typeof l!="function"})})]}),f&&n.jsx(Tr,{text:y??i,label:p("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),anchorRect:g,onClose:B,closeOnOutsideClick:!1,isMobilePopup:!0})]}):null]})}function ws(e,t){return typeof t!="number"||typeof e!="number"?"disabled":e<t?"done":e===t?"active":"disabled"}function sa({index:e,stepIndex:t,isLast:a=!1,title:r="",titleProps:s={},children:l,className:i="",onDone:u=void 0,useTitleFaded:c=void 0,lockedHint:d}){const{t:h}=_e.useTranslation(),[p,m]=o.useState(()=>ws(e,t));o.useEffect(()=>{const _=ws(e,t);if(_!==p){const A=setTimeout(()=>m(_),0);return()=>clearTimeout(A)}},[e,t,p]);const b=o.useCallback((..._)=>{ws(e,t)==="done"||p==="done"||typeof u=="function"&&u(..._)},[e,t,p,u]),[v,C]=o.useState(!1),[f,x]=o.useState({text:"",label:"\uBB38\uC7A5 \uB4E3\uAE30",anchorRect:null,backdrop:!1,alignX:null,alignY:null}),g=o.useCallback(_=>{if(!_)return null;try{const A=_;if(typeof _=="object"&&(A.currentTarget||A.target)&&(A.nativeEvent||A.type)){const D=A.currentTarget??A.target;if(D&&typeof D.getBoundingClientRect=="function")return D.getBoundingClientRect()}if(_ instanceof DOMRect)return _;const B=_;if(B&&typeof B.getBoundingClientRect=="function")return B.getBoundingClientRect();const E=_?.current;return E&&typeof E.getBoundingClientRect=="function"?E.getBoundingClientRect():null}catch{return null}},[]),w=o.useCallback((_,{text:A="",label:B="\uBB38\uC7A5 \uB4E3\uAE30",backdrop:E=!1,alignX:D="center",alignY:N="top"}={})=>{const $=g(_);x({text:A,label:B,anchorRect:$,backdrop:E,alignX:D,alignY:N}),C(!0)},[g]),y=o.useCallback(()=>{C(!1),x(_=>({..._,anchorRect:null}))},[]),k=o.Children.map(l,_=>{if(o.isValidElement(_)){const A=_;if(typeof A.type=="string")return A;const B=A.props??{},E=typeof B.onDone=="function"?B.onDone:b,D=typeof B.disabled=="boolean";let N=p==="disabled";return D&&(N=!!B.disabled),o.cloneElement(A,{onDone:E,disabled:N,showTooltip:w,hideTooltip:y})}return _});return n.jsxs("div",{className:`training-step training-step--${p} ${a?"training-step--last":""} ${i}`,"aria-current":p==="active",children:[n.jsx(Kc,{state:p}),n.jsxs("div",{className:"training-step__content",children:[n.jsx(Zc,{state:p,title:r,...s,useFaded:c}),p==="disabled"&&d&&typeof e=="number"&&typeof t=="number"&&e===t+1&&n.jsx("p",{className:"training-step__locked-hint caption-1",role:"status",children:d}),k]}),v?n.jsx(Bn,{anchorRect:f.anchorRect,backdrop:f.backdrop,onClose:y,ariaLabel:h("tooltip.textbox","\uBCF8\uBB38"),children:n.jsx(Tr,{text:f.text,onClose:y})}):null]})}function Xc({context:e,state:t="disabled",theme:a="light"}){const{t:r}=_e.useTranslation(),[s,l]=o.useState("disabled"),[i,u]=o.useState(()=>{try{return localStorage.getItem("tooltip-theme")||a}catch{return a}});o.useEffect(()=>{try{localStorage.setItem("tooltip-theme",i)}catch{}},[i]);const c=()=>u(L=>L==="dark"?"light":"dark"),{increase:d,decrease:h,canIncrease:p,canDecrease:m,fontSize:b,lineHeight:v}=Oi({storageKey:"textbox_fontScale"}),[C,f]=o.useState(""),x=o.useRef(null),g=o.useRef(!1),w=o.useCallback(()=>{g.current=wr()&&!!x.current&&x.current.contains(document.activeElement),l("active")},[]),y=o.useCallback(()=>f(""),[]),k=L=>{try{f(L)}catch{}},_=typeof navigator<"u"&&/Mobi|Android/i.test(navigator.userAgent||"");o.useEffect(()=>{if(t!=="disabled"){const L=setTimeout(()=>l(t),0);return()=>clearTimeout(L)}},[t]);const A=o.useMemo(()=>e&&typeof e=="object"?String(e.sentence??e.text??""):typeof e=="string"?e:"",[e]),[B,E]=o.useState(A);B!==A&&(E(A),l("disabled"));const D=t==="disabled"?s:t,N=D==="disabled"?"training-text-box--disabled":D==="active"?"training-text-box--active":D==="done"?"training-text-box--done":"",$=o.useMemo(()=>({fontSize:`${b}px`,lineHeight:`${v}px`}),[b,v]);return o.useEffect(()=>{if(D==="disabled"||!g.current)return;g.current=!1;const L=document.activeElement;L&&L!==document.body||x.current?.querySelector(".training-text-box__buttons button")?.focus()},[D]),n.jsxs("div",{ref:x,className:`training-text-box ${N} ${D!=="disabled"&&i==="dark"?"is-dark":""}`,children:[D==="disabled"&&n.jsx("div",{className:"training-text-box__preview",children:n.jsx(fe,{htmlType:"button",size:48,type:"bar",onClick:w,icon:"eye",ariaLabel:r("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),label:r("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),useBorder:!1})}),n.jsx("div",{className:"training-text-box__area","aria-hidden":D==="disabled",children:n.jsx("span",{className:"training-text-box__inner h3",style:$,children:A})}),D!=="disabled"&&n.jsxs("div",{className:"training-text-box__buttons","aria-hidden":D==="disabled",children:[n.jsx(fe,{htmlType:"button",size:32,type:"dot",onClick:h,onDisabledClick:()=>k(r("training.fontSizeMin","\uAE00\uC528 \uD06C\uAE30\uAC00 \uCD5C\uC18C\uC785\uB2C8\uB2E4.")),ariaLabel:r("training.fontSizeDecrease","\uAE00\uC790 \uD06C\uAE30 \uAC10\uC18C"),icon:"minus",variant:i==="dark"?"transparent-white":"transparent-gray",disabled:!m,useBorder:!1,showTooltipInfo:!0,...!_&&{width:"60px"}}),n.jsx(fe,{htmlType:"button",size:32,type:"dot",onClick:d,onDisabledClick:()=>k(r("training.fontSizeMax","\uAE00\uC528 \uD06C\uAE30\uAC00 \uCD5C\uB300\uC785\uB2C8\uB2E4.")),ariaLabel:r("training.fontSizeIncrease","\uAE00\uC790 \uD06C\uAE30 \uC99D\uAC00"),icon:"plus",variant:i==="dark"?"transparent-white":"transparent-gray",disabled:!p,useBorder:!1,showTooltipInfo:!0,...!_&&{width:"60px"}}),n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:i==="dark"?"moon":"sun-medium",onClick:c,ariaLabel:r("training.toggleBackground","\uBC30\uACBD \uC804\uD658"),variant:i==="dark"?"transparent-white":"transparent-gray"})]}),n.jsx(va,{message:C,position:"top",onClose:y})]})}function la(e){return e==="active"||e==="done"}function Bs({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,useTitleFaded:l,onDone:i,onChange:u,answer:c,wrongAnswers:d,choices:h,multiSelect:p=!1,correctCount:m=0,useDisabledCovered:b=!1,choiceIcons:v,shuffleChoices:C=!0}){const{t:f}=_e.useTranslation(),x=s??f("training.selectConfirm","\uBB38\uC81C\uB97C \uBCF4\uACE0 \uD574\uB2F9\uD558\uB294 \uB0B4\uC6A9\uC744 \uC120\uD0DD\uD558\uC138\uC694."),g=typeof e=="number"?e:-1,w=typeof t!="number"?"disabled":g<t?"done":g===t?"active":"disabled",y=Array.isArray(h)&&h.length?h:typeof c<"u"?[c].concat(Array.isArray(d)?d:[]):void 0,k=d?d.join("||"):"",_=h?h.join("||"):"",[A,B]=o.useState(()=>Array.isArray(y)?C?Ra(y):y.slice():void 0);o.useEffect(()=>{Array.isArray(y)&&y.length?B(C?Ra(y):y.slice()):B(void 0)},[c,k,_,C]);const[E,D]=o.useState(null),[N,$]=o.useState(()=>new Set);o.useEffect(()=>{D(null),$(new Set)},[_,c,k]);const L=o.useRef(void 0);o.useEffect(()=>{const P=L.current;typeof P=="number"&&typeof t=="number"&&typeof e=="number"&&P>=e&&t<e&&(D(null),$(new Set)),L.current=t},[t,e]);const U=o.useCallback(P=>{if(!la(w))return;const T=A?.[P];if(T==null)return;const ee=T;if(p){const te=new Set(N);te.has(ee)?te.delete(ee):te.add(ee),$(te),typeof u=="function"&&u({selectedValues:[...te],__ts:Date.now()}),typeof i=="function"&&i({selectedValues:[...te],__ts:Date.now()})}else D(ee),typeof u=="function"&&u({selectedIndex:P,selectedValue:ee,__ts:Date.now()}),typeof i=="function"&&i({selectedIndex:P,selectedValue:ee,__ts:Date.now()})},[A,w,p,u,N]),M=`training-step__buttons${Array.isArray(A)&&A.length>3?" training-step__buttons--wrap-3":""}`;return n.jsx(sa,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:x,useTitleFaded:l,children:n.jsx("div",{className:M,children:Array.isArray(A)&&A.length>0?A.map((P,T)=>n.jsx(fe,{htmlType:"button",size:56,type:"bar",onClick:()=>U(T),ariaLabel:String(P),label:P,useLabel:!0,icon:v?v[String(P)]:void 0,variant:"default",disabled:w==="disabled",selected:p?N.has(P):E===P,useDisabledCovered:b,minWidth:0},String(P))):null})})}function ks({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,onDone:l,onChange:i,context:u,demoSelected:c}){const{t:d}=_e.useTranslation(),h=s??d("training.confirmTitle","\uBB38\uC7A5\uC744 \uD655\uC778\uD558\uACE0 \uC798 \uB4E4\uB838\uB294\uC9C0 \uC120\uD0DD\uD558\uC138\uC694."),p=typeof e=="number"?e:-1,m=typeof t!="number"?"disabled":p<t?"done":p===t?"active":"disabled",b=u&&typeof u=="object"?u.sentence||"":typeof u=="string"?u:"",v=u&&typeof u=="object"?u.choices:void 0,[C,f]=o.useState(c??null),x=`${String(b)}\0${JSON.stringify(v??null)}`,[g,w]=o.useState(x);g!==x&&(w(x),c==null&&f(null));const[y,k]=o.useState(c);Object.is(y,c)||(k(c),f(c??null));const _=o.useRef(void 0);o.useEffect(()=>{const D=_.current;typeof D=="number"&&typeof t=="number"&&typeof e=="number"&&D>=e&&t<e&&c==null&&f(null),_.current=t},[t,e,c]);const A=o.useCallback(D=>{const N=typeof D=="object"&&D!==null?Object.assign({},D,{__ts:Date.now()}):{value:D,__ts:Date.now()};typeof i=="function"&&i(N),la(m)&&typeof l=="function"&&l(N)},[i,m,l]),B=o.useCallback(()=>{la(m)&&(f(!1),A(!1))},[A,m]),E=o.useCallback(()=>{la(m)&&(f(!0),A(!0))},[A,m]);return n.jsxs(sa,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:h,onDone:l,useTitleFaded:!1,children:[n.jsx(Xc,{context:u,state:m}),n.jsx("div",{className:"training-step__buttons",children:Array.isArray(v)&&v.length>0?v.slice(0,6).map((D,N)=>n.jsx(fe,{htmlType:"button",size:56,type:"bar",onClick:()=>{la(m)&&(f(N),A&&A(N))},disabled:m==="disabled",ariaLabel:String(D),label:D,variant:m,selected:C===N},N)):n.jsxs(n.Fragment,{children:[n.jsx(fe,{htmlType:"button",size:56,type:"bar",onClick:B,disabled:m==="disabled",icon:"x",ariaLabel:d("training.notHeard","\uC548 \uB4E4\uB838\uC5B4\uC694."),label:d("training.notHeard","\uC548 \uB4E4\uB838\uC5B4\uC694."),variant:"default",selected:C===!1}),n.jsx(fe,{htmlType:"button",size:56,type:"bar",onClick:E,disabled:m==="disabled",icon:"circle",ariaLabel:d("training.heardWell","\uC798 \uB4E4\uB838\uC5B4\uC694."),label:d("training.heardWell","\uC798 \uB4E4\uB838\uC5B4\uC694."),variant:"default",selected:C===!0})]})})]})}function As({index:e,stepIndex:t,isLast:a=!1,title:r,onDone:s,btnLabel:l,soundSrc:i,bucketPath:u,usePreviewTextBtn:c,previewText:d=null,onPreviewTextBtn:h,disabled:p,_pageIndex:m,showSoundWaveForm:b,showNoiseWaveForm:v,leadInMs:C,tailMs:f}){const{t:x}=_e.useTranslation(),g=r??x("training.listenTitle","\uC81C\uC2DC\uD558\uB294 \uBB38\uC7A5\uC744 \uB4E4\uC5B4\uC8FC\uC138\uC694."),w=p??(typeof t=="number"&&typeof e=="number"?e>t:!1);return n.jsx(sa,{index:e,stepIndex:t,isLast:a,title:g,onDone:s,titleProps:{usePreviewTextBtn:c,previewText:d,onPreviewTextBtn:h},children:n.jsx(xs,{soundSrc:i,ttsText:i?null:d??g,bucketPath:u,btnLabel:l||x("training.listenButton","\uBB38\uC7A5 \uB4E3\uAE30"),disabled:w,className:"training-step__listen-sticky",showSoundWaveForm:b,showNoiseWaveForm:v,leadInMs:C,tailMs:f},`audio-p${m??0}-s${e}`)})}const mx=[];function Ns({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,onDone:l,onChange:i,context:u=mx}){const{t:c}=_e.useTranslation(),d=s??c("training.orderListDefault","\uBB38\uC7A5\uC744 \uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uBC30\uCE58\uD558\uC138\uC694."),h=z=>typeof z=="string"?z:z&&(z.context||z.sentence||z.question||"")||"",[p,m]=o.useState(Array.isArray(u)?u:[]),[b,v]=o.useState(()=>(p||[]).map((z,j)=>({id:j,text:h(z)}))),C=o.useMemo(()=>typeof t!="number"||typeof e!="number"?"disabled":e<t?"done":e===t?"active":"disabled",[t,e]),f=C!=="disabled",x=o.useRef(void 0),g=o.useRef(void 0);o.useEffect(()=>{if(x.current===u)return;x.current=u;const z=Array.isArray(u)?u:[];m(z);const j=(F=>{const O=(F||[]).map((pe,X)=>({id:X,text:h(pe)}));if(O.length<=1)return O;const G=(pe,X)=>{if(pe.length!==X.length)return!1;for(let H=0;H<pe.length;H++)if(pe[H].text!==X[H].text)return!1;return!0};let ie=Ra(O),K=0;for(;G(ie,O)&&K<20;)ie=Ra(O),K+=1;return ie})(z);v(j);try{if(typeof i=="function"){const F=j.filter((O,G)=>O.text===h(z[G])).length;i({shuffled:j,score:F,total:(z||[]).length,initial:!0,__ts:Date.now()})}if(typeof l=="function"&&C==="active"){const F=j.filter((O,G)=>O.text===h(z[G])).length;g.current=u,l({shuffled:j,score:F,total:(z||[]).length,initial:!0,__ts:Date.now()})}}catch{}},[u]),o.useEffect(()=>{if(C!=="active"||g.current===u||(g.current=u,typeof l!="function"))return;const z=Array.isArray(u)?u:[],j=b.filter((F,O)=>F.text===h(z[O])).length;l({shuffled:b,score:j,total:z.length,initial:!0,__ts:Date.now()})},[C,u]);const w=(z,j)=>{const F=[...b],O=z+j;if(O<0||O>=F.length)return;const G=F[O];F[O]=F[z],F[z]=G,ee(F);try{if(typeof l=="function"&&C==="active"){const ie=F.filter((K,pe)=>K.text===h(p[pe])).length;l({shuffled:F,score:ie,total:(p||[]).length,__ts:Date.now()})}}catch{}},[y,k]=o.useState(null),_=o.useRef(null),A=o.useRef(null),B=o.useRef(null),E=o.useRef(null),D=o.useRef(null),N=o.useRef({x:0,y:0}),$=o.useRef(null),L=o.useRef({dx:0,dy:0}),U=()=>{if($.current!==null)return;const z=()=>{if(!_.current){$.current=null;return}$.current=requestAnimationFrame(z);const j=N.current,F=L.current||{dx:0,dy:0};_.current&&(_.current.style.transform=`translate3d(${j.x-F.dx}px, ${j.y-F.dy}px, 0)`)};$.current=requestAnimationFrame(z)},M=o.useRef(new Map),P=o.useRef(new Map),T=()=>{const z=new Map;return M.current.forEach((j,F)=>{j&&j.getBoundingClientRect&&z.set(F,j.getBoundingClientRect())}),z},ee=z=>{const j=T();v(z);try{if(typeof i=="function"){const F=z.filter((O,G)=>O.text===h(p[G])).length;i({shuffled:z,score:F,total:(p||[]).length,__ts:Date.now()})}}catch{}requestAnimationFrame(()=>{const F=T();z.forEach(O=>{const G=j.get(O.id),ie=F.get(O.id),K=M.current.get(O.id);if(!K||!G||!ie)return;const pe=G.top-ie.top;pe&&(K.style.transition="none",K.style.transform=`translateY(${pe}px)`,requestAnimationFrame(()=>{K.style.transition="transform 420ms cubic-bezier(.22,.9,.39,1)",K.style.transform="";const X=()=>{K.style.transition="",K.removeEventListener("transitionend",X)};K.addEventListener("transitionend",X)}))})})},te=(z,j)=>{try{try{j.dataTransfer?.setData("text/plain",String(z))}catch{}try{j.dataTransfer&&(j.dataTransfer.effectAllowed="move")}catch{}try{const F=document.createElement("div");F.style.cssText="position:absolute;top:-9999px;left:-9999px;width:1px;height:1px;opacity:0;pointer-events:none;",document.body.appendChild(F),j.dataTransfer?.setDragImage(F,0,0),requestAnimationFrame(()=>{try{document.body.removeChild(F)}catch{}})}catch{}}catch{}k(z);try{const F=b[z],O=document.createElement("div");O.className="order-list__dragging-object order-list__dragging-object--visible",O.textContent=F&&F.text?F.text:"",document.body.appendChild(O),_.current=O;const G=M.current.get(F.id);let ie=j.clientX||0,K=j.clientY||0;try{if(G&&G.getBoundingClientRect){const W=G.getBoundingClientRect();ie=W.left+W.width/2,K=W.top+W.height/2}}catch{}const pe=O.getBoundingClientRect(),X=pe.width/2,H=pe.height/2;L.current={dx:X,dy:H},O.style.transition="none",N.current={x:ie,y:K},O.style.transform=`translate3d(${ie-X}px, ${K-H}px, 0)`,requestAnimationFrame(()=>{try{O.style.transition=""}catch{}U()});const ne=W=>{const oe=W;N.current={x:oe.clientX,y:oe.clientY},U()};B.current=ne,document.addEventListener("mousemove",ne);const V=W=>{const oe=W;N.current={x:oe.clientX,y:oe.clientY},U()};A.current=V,document.addEventListener("dragover",V);try{j.dataTransfer?.setData("text/plain",String(z));try{j.dataTransfer?.setData("application/json",JSON.stringify({idx:z}))}catch{}}catch{}}catch{}},I=(z,j)=>{j.preventDefault();try{j.dataTransfer&&(j.dataTransfer.dropEffect="move")}catch{}try{D.current!==null&&(clearTimeout(D.current),D.current=null);const F=j.currentTarget&&j.currentTarget.closest?j.currentTarget.closest(".order-list__item"):null;if(F&&E.current!==F){if(E.current)try{E.current.classList.remove("drag-over")}catch{}try{F.classList.add("drag-over")}catch{}E.current=F}}catch{}},Y=(z,j)=>{j.preventDefault();const F=j.dataTransfer?.getData("text/plain")||"",O=F?parseInt(F,10):y,G=z;if(typeof O!="number"||isNaN(O)||O===G){k(null),Z(),R();return}const ie=Ef(b,O,G);ee(ie),k(null),R();try{if(typeof l=="function"&&C==="active"){const K=ie.filter((pe,X)=>pe.text===h(p[X])).length;l({shuffled:ie,score:K,total:(p||[]).length,__ts:Date.now()})}}catch{}try{requestAnimationFrame(()=>{const K=document.querySelectorAll(".order-list .order-list__item")[G];if(!K)return;const pe=K.querySelector(".order-list__slot")||K;try{pe.classList.add("pulse"),pe.offsetHeight,pe.classList.add("to-dark");const X=()=>{pe.classList.remove("pulse","to-dark"),pe.removeEventListener("transitionend",X)};pe.addEventListener("transitionend",X)}catch{}})}catch{}Z()},R=()=>{if(_.current){try{document.body.removeChild(_.current)}catch{}_.current=null}A.current&&(document.removeEventListener("dragover",A.current),A.current=null),B.current&&(document.removeEventListener("mousemove",B.current),B.current=null),$.current!==null&&(cancelAnimationFrame($.current),$.current=null)},q=()=>{k(null),Z(),R()};o.useEffect(()=>()=>R(),[]);const Z=()=>{try{if(D.current!==null&&(clearTimeout(D.current),D.current=null),E.current){try{E.current.classList.remove("drag-over")}catch{}E.current=null}document.querySelectorAll(".order-list .order-list__item").forEach(z=>z.classList.remove("drag-over"))}catch{}};return o.useEffect(()=>{try{const z=Math.max(1,(b||[]).length);b.forEach((j,F)=>{const O=P.current.get(j.id);if(!O)return;let G=50;z>1&&(G=Math.round(F/(z-1)*100));try{O.style.setProperty("--marker-pos",G+"%")}catch{}})}catch{}},[b]),o.useEffect(()=>()=>{R(),D.current!==null&&(clearTimeout(D.current),D.current=null)},[]),n.jsx(sa,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:d,children:n.jsx("div",{className:"order-list",children:b.map((z,j)=>{const F=Math.max(1,(b||[]).length),O=F>1?Math.round(j/(F-1)*100):50;return n.jsx("div",{className:"order-list__item",children:n.jsxs("div",{className:"order-list__slot","data-disabled":C==="disabled","aria-disabled":C==="disabled",children:[C!=="disabled"?n.jsx("div",{className:"order-list__marker caption-1",style:{"--marker-pos":O+"%"},ref:G=>{const ie=P.current;G?ie.set(z.id,G):ie.delete(z.id)},children:n.jsx("span",{className:"order-list__slot-number button-1",children:j+1})}):null,n.jsxs("div",{ref:G=>{const ie=M.current;G?ie.set(z.id,G):ie.delete(z.id)},className:`order-list__draggable ${y===j?"dragging":""}`,"data-disabled":C==="disabled","aria-disabled":C==="disabled",tabIndex:C==="disabled"?-1:0,draggable:f,onDragStart:f?G=>te(j,G):void 0,onDragEnter:f?G=>I(j,G):void 0,onDragOver:f?G=>I(j,G):void 0,onDragLeave:f?()=>{try{D.current!==null&&clearTimeout(D.current),D.current=setTimeout(()=>{try{const G=document.querySelectorAll(".order-list .order-list__item");G&&G[j]&&(G[j].classList.remove("drag-over"),E.current===G[j]&&(E.current=null))}catch{}},80)}catch{}}:void 0,onDrop:f?G=>Y(j,G):void 0,onDragEnd:f?q:void 0,children:[n.jsx("span",{className:"order-list__item-text body-2",children:z.text}),f?n.jsxs("span",{className:"order-list__item-buttons",children:[n.jsx(fe,{htmlType:"button",size:32,type:"dot",onClick:()=>w(j,-1),ariaLabel:c("training.up"),icon:"chevron-up",variant:"transparent-gray",width:48,useFaded:"true",disabled:j===0,useBorder:!1,useDisabledInvisible:!0}),n.jsx(fe,{htmlType:"button",size:32,type:"dot",onClick:()=>w(j,1),ariaLabel:c("training.down"),icon:"chevron-down",variant:"transparent-gray",width:48,useFaded:"true",disabled:j===b.length-1,useBorder:!1,useDisabledInvisible:!0})]}):null]})]})},z.id)})})})}const Cx=8e3;function fx(e,t){return new Promise(a=>{let r=!1;const s=()=>{r||(r=!0,a())};e.then(s,s),setTimeout(s,t)})}function Jc({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,onDone:l,onChange:i,context:u=[],selectable:c=!1,hideLabel:d=!1,hideAudio:h=!1,maxCards:p,playAllGapMs:m=0}){const{t:b}=_e.useTranslation(),v=s??b("training.cardInstructions","\uB0B1\uB9D0 \uCE74\uB4DC\uB97C \uBCF4\uACE0 \uC18C\uB9AC\uB97C \uB4E3\uACE0 \uD655\uC778\uD558\uC138\uC694."),C=o.useMemo(()=>Array.isArray(u)?u:u&&u.items||[],[u]),f=p??3,x=(C||[]).slice(0,f);(C||[]).length>f&&console.warn(`TrainingStepCard: ${C.length} items passed but only ${f} shown`);const g=typeof e=="number"?e:-1,w=typeof t!="number"?"disabled":g<t?"done":g===t?"active":"disabled",[y,k]=o.useState(null),_=o.useRef([]),[A,B]=o.useState(!1),E=o.useRef(null),D=o.useRef(!0);o.useEffect(()=>(D.current=!0,()=>{D.current=!1}),[]);const N=o.useMemo(()=>C.map(T=>T?.id??T?.word??"").join("|"),[C]);o.useEffect(()=>{k(null)},[N]);const $=o.useRef(void 0);o.useEffect(()=>{const T=$.current;typeof T=="number"&&typeof t=="number"&&typeof e=="number"&&T>=e&&t<e&&k(null),$.current=t},[t,e]);const L=o.useCallback((T,ee)=>{if(c)return;const te={item:T,index:ee,__ts:Date.now()};try{typeof i=="function"&&i(te)}catch{}if(w==="active"&&typeof l=="function")try{l(te)}catch{}},[c,i,w,l]),U=o.useRef(m);o.useEffect(()=>{U.current=Math.max(0,m||0)},[m]);const M=o.useCallback(async()=>{if(A||w==="disabled")return;B(!0);let T=!1;const ee=new Promise(te=>{E.current=()=>{T=!0,te()}});try{for(let te=0;te<x.length&&!(!D.current||T);te++){const I=_.current[te];if(!I)continue;await Promise.race([fx(I.play(),Cx),ee]);const Y=Math.max(0,U.current||0);Y>0&&te<x.length-1&&!T&&D.current&&await Promise.race([new Promise(R=>{setTimeout(R,Y)}),ee])}}finally{E.current=null,B(!1)}},[A,w,x.length]),P=o.useCallback((T,ee)=>{if(!la(w))return;k(ee);const te={selectedValue:T.word||T.title||"",selectedIndex:ee,item:T,__ts:Date.now()};try{typeof i=="function"&&i(te)}catch{}if(typeof l=="function")try{l(te)}catch{}},[i,w,l]);return n.jsx(sa,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:v,onDone:l,titleProps:{usePlayAllBtn:!h&&x.length>0,onPlayAll:M,playAllActive:A},children:n.jsx("div",{className:"training-step__cards",onClickCapture:T=>{const ee=E.current;if(!ee)return;const te=T.target;te&&typeof te.closest=="function"&&te.closest(".training-word-card__bottom")&&ee()},children:x.length===0?n.jsx("div",{className:"training-step__empty",children:b("training.noCards","\uCE74\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}):x.map((T,ee)=>n.jsx(ns,{ref:te=>{_.current[ee]=te},item:T,disabled:w==="disabled",onPlayDone:()=>L(T,ee),selectable:c,selected:c&&y===ee,onSelect:c?()=>P(T,ee):void 0,flipDelay:ee*120,hideLabel:d,hideAudio:h},T&&T.id||ee))})})}const bx=160;function gx(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 Qc(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"}]}gx(Kt.t.bind(Kt)),Qc(Kt.t.bind(Kt));const Mr="none",yx=.5,vx=1.5,_x=.25;function Es({title:e,valueLabel:t,value:a,min:r,max:s,step:l,tickStep:i,size:u,disabled:c,onChange:d}){return n.jsxs(un,{variant:"custom",label:e,useFullWidth:!0,children:[n.jsx(Gu,{value:a,onChange:d,min:r,max:s,step:l,size:u,showBgTick:!0,tickStep:i,ariaLabel:e,disabled:c,className:se("noise-settings-tooltip__slider-input")}),n.jsx("div",{className:se(Be("noise-settings-tooltip__value","button-1",c?"noise-settings-tooltip__value--disabled":"")),children:t})]})}function ed({anchorRect:e,onClose:t,hideNoiseRows:a=!1}){const{t:r}=_e.useTranslation(),s=yn("(max-width: 767px)")?40:24,l=Er(),i=rr(l?.settings??oa),u=l?.settings.type??"defaultNoise",c=l?.settings.enabled??!0,d=l?.playbackRate??1,h=l?.mainVolume??1,p=Math.round(h*100),m=o.useCallback(x=>{try{l?.setMainVolume(Math.max(0,Math.min(1,x/100)))}catch{}},[l]),b=o.useCallback(x=>{try{l?.setPlaybackRate(x)}catch{}},[l]),v=o.useCallback(x=>{const g=Math.min(ar,Math.max(0,Math.round(x*10)/10));try{l?.setSettings({noiseRatio:g})}catch{}},[l]),C=o.useCallback(x=>{try{x===Mr?l?.setSettings({enabled:!1}):l?.setSettings({type:x,enabled:!0})}catch{}},[l]),f=[{key:Mr,label:r("training.noise.type.none","\uC5C6\uC74C")},...Qc(r).map(x=>({key:x.value,label:x.label}))];return n.jsx(Bn,{anchorRect:e,offset:12,onClose:t,ariaLabel:r("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815"),isMobilePopup:!1,closeOnOutsideClick:!1,header:n.jsxs("div",{className:se("noise-settings-tooltip__header"),children:[n.jsx("span",{children:r("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815")}),n.jsx(fe,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,ariaLabel:r("common.close","\uB2EB\uAE30"),onClick:t})]}),children:n.jsxs(Qa,{className:se("noise-settings-tooltip"),useBorder:!1,labelWidth:72,children:[n.jsx(Es,{title:r("training.playVolumeTitle","\uC804\uCCB4 \uC18C\uB9AC"),valueLabel:`${p}%`,value:p,min:0,max:100,step:10,size:s,onChange:m}),n.jsx(Es,{title:r("training.playSpeedTitle","\uC7AC\uC0DD \uC18D\uB3C4"),valueLabel:`${d.toFixed(2)}x`,value:d,min:yx,max:vx,step:_x,size:s,onChange:b}),!a&&n.jsxs(n.Fragment,{children:[n.jsx(un,{variant:"custom",label:r("training.noiseTypeTitle","\uC18C\uC74C \uC885\uB958"),useFullWidth:!0,children:n.jsx(vn,{ariaLabel:r("training.noiseTypeTitle","\uC18C\uC74C \uC885\uB958"),size:40,shape:"rounded",options:f,value:c?u:Mr,onChange:C})}),n.jsx(Es,{title:r("training.noiseRatioTitle","\uC18C\uC74C \uBE44\uC728"),valueLabel:r("training.noiseRatioValue","{{ratio}}\uBC30",{ratio:i.toFixed(1)}),value:i,min:0,max:ar,step:$c,size:s,disabled:!c,onChange:v})]}),a&&n.jsx("div",{className:se("noise-settings-tooltip__width-ghost"),"aria-hidden":"true",inert:!0,children:n.jsx(un,{variant:"custom",label:"\xA0",useFullWidth:!0,children:n.jsx(vn,{ariaLabel:"width-ghost",size:40,shape:"rounded",options:f,value:Mr,onChange:()=>{}})})})]})})}function td({useNoiseSettingBtn:e=!1,onSettings:t,onNext:a,onResult:r,stepIndex:s=0,stepCount:l=0,pageIndex:i=0,pageCount:u=1,resultOpen:c=!1,hideNoiseRows:d=!1}){const{t:h}=_e.useTranslation(),[p,m]=o.useState(!1),[b,v]=o.useState(null),[C,f]=o.useState(!1),x=o.useRef(null),g=o.useRef(null),w=Er(),y=u>0,k=y&&i<u-1,_=!y||i>=u-1,A=s===Math.max(0,l);o.useEffect(()=>{e||(m(!1),v(null))},[e]);const B=o.useCallback(()=>{m(!1),v(null)},[]),E=o.useCallback(()=>{if(p){m(!1),v(null);return}const ee=x?.current?.getBoundingClientRect();ee&&v(ee),t?.(),m(!0)},[p,t]),D=o.useCallback(()=>{if(p){m(!1),v(null);return}const ee=g?.current?.getBoundingClientRect();ee&&v(ee),t?.(),m(!0)},[p,t]),N=yn("(max-width: 767px)"),$=o.useRef(null),[L,U]=o.useState(null),M=o.useCallback(()=>{f(ee=>{const te=!ee;return U(te?$.current?.getBoundingClientRect()??null:null),te})},[]),P=o.useCallback(()=>{f(!1),U(null)},[]);o.useEffect(()=>{c&&(f(!1),U(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(Xo,{analyser:w?.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(Xo,{analyser:w?.noiseAnalyser??null,orientation:"horizontal",length:112,label:"db",labelPos:"left",ariaLabel:h("training.meter.noise","\uC18C\uC74C")})]})]});return Yc(e&&p,()=>typeof document<"u"?document.querySelector(".noise-settings-tooltip__header")?.closest(".tooltip__content")??null:null,()=>[x.current,g.current].map(ee=>ee?.querySelector("button")??null).find(ee=>!!ee&&ee.getClientRects().length>0)??x.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:x,className:"pp-bottom__tooltip-trigger","data-tooltip-ignore":!0,children:n.jsx(fe,{htmlType:"button",size:56,type:"bar",icon:"settings",onClick:E,className:p?"is-selected":void 0,"aria-expanded":p,"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:g,className:"pp-bottom__tooltip-trigger","data-tooltip-ignore":!0,children:n.jsx(fe,{htmlType:"button",size:56,type:"dot",shape:"pill",icon:"settings",onClick:D,className:p?"is-selected":void 0,"aria-expanded":p,"aria-haspopup":"dialog",ariaLabel:h("training.settings","\uC124\uC815")})})})]}):null,e&&n.jsx("div",{ref:$,className:"pp-bottom__meter-trigger","data-tooltip-ignore":!0,children:n.jsx(fe,{htmlType:"button",size:40,type:"dot",shape:"pill",icon:"audio-lines",onClick:M,selected:C,"aria-expanded":N?C:void 0,ariaLabel:h("training.meter.toggle","\uC624\uB514\uC624 \uBBF8\uD130 \uD45C\uC2DC")})}),e&&C&&!N&&n.jsx("div",{className:"pp-bottom__meters",children:T})]}),e&&C&&N&&L&&n.jsx(Bn,{anchorRect:L,onClose:P,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:[_&&n.jsx(fe,{htmlType:"button",size:56,type:"bar",icon:"check",onClick:typeof r=="function"?r:a,ariaLabel:h("training.viewResult","\uACB0\uACFC\uBCF4\uAE30"),label:h("training.viewResult","\uACB0\uACFC\uBCF4\uAE30"),variant:"main",disabled:!A}),k&&n.jsx(fe,{htmlType:"button",size:56,type:"bar",rightIcon:"chevron-right",align:"right",onClick:a,ariaLabel:h("training.nextQuestion","\uB2E4\uC74C \uBB38\uC81C"),label:h("training.nextQuestion","\uB2E4\uC74C \uBB38\uC81C"),variant:"main",disabled:!A})]}),e&&p&&n.jsx(ed,{anchorRect:b,onClose:B,hideNoiseRows:d})]})}function nd({title:e,subtitle:t,desc:a,depth:r,icon:s,wrapperStyle:l,iconTooltip:i,pageIndex:u,pageCount:c,progressMax:d,progressIndex:h,onBack:p,onClose:m}){const{t:b}=_e.useTranslation(),v=yn("(max-width: 767px)"),C=Number.isInteger(h)?h:u||0,f=Number.isInteger(d)?d:c||0,x=p||m,g=Array.isArray(r)?v?r[r.length-1]:r.join(" / "):r,w=typeof e=="string"?e.trim():e,y=typeof t=="string"?t.trim():t,k=!!(w||y),_=k?w||y:b("common.emptyTrainingName","\uD6C8\uB828 \uC774\uB984\uC774 \uBE44\uC5B4 \uC788\uC2B5\uB2C8\uB2E4."),A=g||(w?t:void 0),B=v&&typeof A=="string"&&(A.includes(" \xB7 ")||A.includes(" / "))?A.split(/\s[·/]\s/).pop():A,E=o.useMemo(()=>{const D=l&&typeof l=="object"?{...l}:{};return!("width"in D)&&!("height"in D)&&(D.width="40px",D.height="40px"),D},[l]);return n.jsxs("header",{className:"pp-title training-popup-title",children:[n.jsxs("div",{className:"pp-title__left",children:[x?n.jsx(fe,{htmlType:"button",size:48,type:"dot",icon:"chevron-left",ariaLabel:b("common.back","\uB4A4\uB85C"),onClick:x,useBorder:!1,iconSize:"large",iconColor:"--color-black",variant:"transparent-gray"}):null,n.jsx("div",{children:s?n.jsx(gu,{icon:s,label:e,tooltip:i,wrapperStyle:E}):null}),n.jsxs("div",{className:"pp-title__text",children:[B?n.jsx("span",{className:"pp-title__depth caption-1",children:B}):null,n.jsx("span",{className:`pp-title__title h2${k?"":" pp-title__title--empty"}`,children:_}),a?n.jsx("span",{className:"pp-title__description caption-1",children:a}):null]})]}),n.jsx(Xu,{max:Math.max(0,f??0),index:Math.max(0,C??0)})]})}function xx(){typeof window<"u"&&window.dispatchEvent(new CustomEvent("speechear.popup.close"))}function wx(e){return!e&&e!==0?[]:Array.isArray(e)?e.flatMap(t=>typeof t=="string"?t.split("|").map(a=>a.trim()).filter(Boolean):t||t===0?[String(t)]:[]):typeof e=="string"?e.split("|").map(t=>t.trim()).filter(Boolean):[String(e)]}const ad=(e,t)=>{if(!t)return t;const a=typeof Kt?.t=="function"?Kt.t(e,{defaultValue:t}):void 0;return typeof a=="string"&&a?a:t};function rd(e,t,a){const r=e,s=r?.title||r?.name||(Array.isArray(t)?t[t.length-1]:void 0)||a||"\uD6C8\uB828",l=Xl().find(u=>u.key===(r?.category_0||r?.category_main_code)),i=l?.subs?.find(u=>u.key===(r?.category_1||r?.category_sub_code));return{title:s,label:r?.title||s,depth:t,icon:l?.icon,wrapperStyle:l?.color?{"--t-item-fg":l.color}:void 0,iconTooltip:[l?ad(`topic.${l.key}`,l.label):void 0,i?ad(`topic.sub.${i.key}`,i.label):void 0].filter(Boolean).join(" / ")||void 0}}function Ds(e){return e&&typeof e=="object"&&typeof e.__ts=="number"?e.__ts:0}function od(e,t,a){if(!e||typeof e!="object"||Array.isArray(e))return e;const r=e,s=typeof a=="number"&&a>0?a:Date.now();return{...r,...r.shownAt===void 0&&t?{shownAt:t}:{},...r.answeredAt===void 0?{answeredAt:new Date(s).toISOString()}:{}}}function Bx(e){const t=e;return Array.isArray(t?.items)?t.items:Array.isArray(e)?e:e?[e]:[]}function kx({idPrefix:e,trainingData:t,depth:a,fallbackTitle:r="\uD6C8\uB828",pages:s=[],emptyMessage:l,buildResults:i,metaPatch:u}){const c=rd(t,a,r),d=typeof u=="function"?u(c)||{}:u||{},h=t?.id||t?.title||s.length;return{id:`${e}:${h}`,meta:{...c,...d},pages:s,emptyMessage:l,buildResults:i}}function Ax(e){if(typeof e=="string")return e;if(e&&typeof e=="object"){const t=e;return t.context||t.sentence||t.question||""||""}return""}function Nx(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 Ex(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 sd(e,t){if(!(!e||typeof e!="object"))return e[`step-${t}`]}function Dx(e,t,a,r){return sd(e,t*a+r)}function Sx({payload:e,selected:t,choices:a=[],correctAnswers:r=[]}){if(e&&typeof e=="object"){const s=e;if(Array.isArray(s.selectedValues))return r.every(l=>s.selectedValues.includes(l))&&s.selectedValues.every(l=>r.includes(l));if(typeof s.correct=="boolean")return s.correct}if(r.length){if(typeof t=="number"&&Array.isArray(a)&&a.length)return r.some(s=>String(s)===String(a[t]));if(typeof t<"u")return r.some(s=>String(s)===String(t))}}function jx(e){return e?Array.isArray(e.items)?e.items.map(t=>{const a=t;return typeof t=="string"?{sentence:t}:{sentence:a.context||a.sentence||"",contextCode:a.contextCode||a.context_code}}):Array.isArray(e.sentences)?e.sentences.map(t=>{const a=t;return typeof t=="string"?{sentence:t}:{sentence:a.sentence||a.context||"",contextCode:a.contextCode}}):Array.isArray(e.contexts)?e.contexts:e.contextCode?[{contextCode:e.contextCode}]:[]:[]}const ld=o.createContext(null);function Tx(){const e=o.useContext(ld);if(!e)throw new Error("useTrainingPagePopupContext must be used inside TrainingPagePopup");return e}function Mx({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,choices:l=[],onDone:i,onChange:u}){const{t:c}=_e.useTranslation(),d=typeof e=="number"?e:-1,h=typeof t!="number"?"disabled":d<t?"done":d===t?"active":"disabled",[p,m]=o.useState(()=>l.map(()=>null)),b=JSON.stringify(l),v=l.length;o.useEffect(()=>{m(Array.from({length:v},()=>null))},[b]);const C=o.useRef(void 0);o.useEffect(()=>{const w=C.current;typeof w=="number"&&typeof t=="number"&&typeof e=="number"&&w>=e&&t<e&&m(Array.from({length:v},()=>null)),C.current=t},[t,e,v]);const f=o.useMemo(()=>p.filter(w=>w!==null).length+1,[p]),x=o.useCallback(w=>{if(!la(h))return;const y=p;let k;if(y[w]!=null){const A=y[w];k=y.map(B=>B!==null&&B>=A?null:B)}else k=[...y],k[w]=f;m(k);const _={selectedOrder:k,words:l,__ts:Date.now()};try{typeof u=="function"&&u(_)}catch{}if(y[w]==null&&k.length>0&&k.every(A=>A!==null))try{typeof i=="function"&&i(_)}catch{}},[h,p,f,u,i,l]),g=s??c("training.selectInOrder","\uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uCE74\uB4DC\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return n.jsx(sa,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:g,onDone:i,children:n.jsx("div",{className:"training-step__cards",children:l.map((w,y)=>n.jsx(ns,{item:{word:w},disabled:h==="disabled",selectable:!0,selected:p[y]!==null,orderRank:p[y],onSelect:()=>x(y),flipDelay:y*120,hideLabel:!1,hideAudio:!0},`${w}-${y}`))})})}function Lr(e){return null}Lr.__isTrainingPage=!0;function ka(e,t){const a=Tx();return{ctx:a,index:e,stepIndex:a.currentStepIndex,isLast:typeof e=="number"&&typeof t=="number"?e===t-1:!1,onDone:r=>a.handleStepDone(r,e),onChange:r=>a.handleStepChange(r,e)}}function id({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i}=ka(e,t);return n.jsx(As,{...a,index:r,stepIndex:s,isLast:l,onDone:i})}function ud({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=ka(e,t);return n.jsx(Bs,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}function cd({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=ka(e,t);return n.jsx(ks,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}function dd({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=ka(e,t);return n.jsx(Ns,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}function pd({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=ka(e,t);return n.jsx(Jc,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}function Lx({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=ka(e,t);return n.jsx(Mx,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}const hd=3e4,$x=/^(https?:|blob:|data:audio|\/|\.\/)/;function md(e){return typeof e=="string"&&$x.test(e)?e:null}const Rx=e=>typeof e=="string"&&e.trim()!==""?e:null,Ss=Symbol("timed-out");function Px(e,t){if(t<=0)return Promise.resolve(Ss);let a;return Promise.race([Promise.resolve(e),new Promise(r=>{a=setTimeout(()=>r(Ss),t)})]).finally(()=>clearTimeout(a))}function Fx(e){return e?ja()||sr()?!0:typeof window<"u"&&!!window.speechSynthesis:!1}function Ix(e,t){const a=[],r=md(t);r&&a.push({kind:"raw",resolve:async()=>r});const s=(e??"").trim();if(!s)return a;for(const[l,i]of[["urlResolver",ja()],["fallbackUrlResolver",sr()]])i&&a.push({kind:l,resolve:async u=>{let c;try{c=await Px(i(s),u)}catch(h){return At(`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===Ss?(At(`question-sound-slow-${l}`,`[core] configureTTS \uC758 ${l} \uAC00 ${hd}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):Rx(c)||(At(`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 a}function Ox(){return Date.now()+hd}const zx=(e,t)=>Math.max(0,e-Date.now())/Math.max(1,t);function Wx(e){At("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 $r(...e){for(const t of e)if(typeof t=="string"){const a=t.trim();if(a.length)return a}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 a=t,r=[a.text,a.label,a.value];for(const s of r){if(typeof s=="string"&&s.trim().length)return s.trim();if(typeof s=="number"||typeof s=="boolean")return String(s)}}}return null}function Hx(e){return $r(e?.question,e?.q,e?.sentence,e?.text,e?.prompt,e?.wording)}function Vx(e){return md($r(e?.questionSound,e?.soundSrc,e?.audioSrc,e?.sound,e?.audio,e?.src))}function Cd(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=$r(e?.status,e?.result,e?.judge,e?.note);if(t){const a=t.toLowerCase();if(["ok","true","\uB9DE\uC74C","\uC815\uB2F5"].some(r=>a.includes(r)))return!0;if(["ng","false","\uD2C0\uB9BC","\uC624\uB2F5"].some(r=>a.includes(r)))return!1}}function fd(e){const{score:t,contextsLength:a,results:r=[],subtitle:s,onReplay:l,onClose:i,inline:u=!1,pending:c=!1}=e||{},{t:d}=_e.useTranslation(),h=o.useId(),p=o.useCallback(()=>!c,[c]);o.useEffect(()=>{const D=a??0;if(t!=null&&D>0&&t/D>.5){const N=window.setTimeout(()=>{window.dispatchEvent(new CustomEvent("party:trigger",{detail:{count:140,strength:1.6,duration:2200}}))},0);return()=>window.clearTimeout(N)}},[t,a]);const m=o.useCallback(D=>{const N=Cd(D),$=$r(D?.wording,D?.label);return N===!0?{variant:"main",label:$??d("training.result.heardWell","\uC798 \uB4E4\uC5C8\uC5B4\uC694")}:N===!1?{variant:"danger",label:$??d("training.result.notHeard","\uBABB \uB4E4\uC5C8\uC5B4\uC694")}:{variant:"disabled",label:$??d("training.result.notJudged","\uBBF8\uD310\uC815")}},[d]),b=a??0,v=t??0,C=o.useMemo(()=>Array.isArray(r)?r:[],[r]),f=o.useRef(null),[x,g]=o.useState(null),w=o.useCallback(()=>{f.current?.(),f.current=null,g(null)},[]);o.useEffect(()=>w,[w]);const y=o.useRef(0),k=(D,N)=>{if(!zn)return;const $=Math.round(performance.now()-y.current);console.debug(`[core][\uB2E4\uC2DC\uB4E3\uAE30] +${$}ms ${D}`,N??"")},_=o.useRef(0),A=o.useCallback((D,N,$)=>{w();const L=++_.current,U=()=>_.current===L;y.current=zn?performance.now():0,k(`\uB20C\uB800\uB2E4 \u2014 \uC904 ${D}`,{text:N,rawUrl:$}),g(D),f.current=()=>{k("\uBA48\uCD94\uAC1C\uAC00 \uBD88\uB838\uB2E4(\uC8FC\uC18C \uC5BB\uAE30 \uC804)"),_.current++,to()};const M=te=>{k("\uD2BC\uB2E4",te);const I=Ya(te,Y=>{k(`\uB05D\uB0AC\uB2E4 \u2014 ${Y?"\uB05D\uAE4C\uC9C0 \uB4E4\uC5C8\uB2E4":"\uBABB \uD2C0\uC5C8\uAC70\uB098 \uBA48\uCDC4\uB2E4"}`,{mine:U()}),Y&&U()&&(f.current=null,g(null))});return f.current=()=>{k("\uBA48\uCD94\uAC1C\uAC00 \uBD88\uB838\uB2E4(\uD2B8\uB294 \uC911)"),_.current++,I.stop(),to()},I.done},P=Ix(N,$);k("\uCC28\uB840",P.map(te=>te.kind));const T=P[0]?.kind==="raw",ee=T?M($):Promise.resolve(!1);(async()=>{if(await ee||!U())return;const te=Ox(),I=T?P.slice(1):P;for(let Y=0;Y<I.length;Y++){if(!U())return;k(`${I[Y].kind} \uC5D0\uAC8C \uBB3B\uB294\uB2E4`);const R=await I[Y].resolve(zx(te,I.length-Y));if(k(`${I[Y].kind} \uAC00 \uB2F5\uD588\uB2E4`,R),!U()||R&&(await M(R)||!U()))return}U()&&(k("\uC8FC\uC18C\uB97C \uD558\uB098\uB3C4 \uBABB \uC5BB\uC5C8\uB2E4 \u2014 \uB0AD\uB3C5\uC73C\uB85C \uAC04\uB2E4"),Wx(N),f.current=()=>{_.current++,to()},k("\uB0AD\uB3C5\uD55C\uB2E4"),$1(N,{onEnd:()=>{U()&&(f.current=null,g(null))}}))})()},[w]),B=o.useMemo(()=>C.map(D=>{const N=D??{},$=Hx(N)||d("training.result.noContent","(\uB0B4\uC6A9\uC5C6\uC74C)"),{variant:L,label:U}=m(N),M=Array.isArray(N.corrects)?N.corrects:[],P=M.length?M.join(", "):N.answer!=null&&N.answer!==""?String(N.answer):null,T=typeof N.selectedText=="string"?N.selectedText:null,ee=Cd(N)===!0,te=Vx(N),I=!!te||Fx($);return{problem:$,variant:L,label:U,answer:P,selectedText:T,isCorrect:ee,sound:te,canHear:I}}),[C,m,d]),E=o.useMemo(()=>B.some(D=>D.answer!==null||D.selectedText!==null),[B]);return n.jsx(Pn,{onClose:i,closeOnBackdrop:!1,inline:u,ariaLabel:d("training.result.title","\uD6C8\uB828\uC744 \uBAA8\uB450 \uB9C8\uCCE4\uC2B5\uB2C8\uB2E4."),className:"popup--training-result",beforeClose:p,footerClassName:"trp-result__foot",footer:({animateThen:D,closeWithAnimation:N})=>n.jsxs(n.Fragment,{children:[c&&n.jsx("p",{id:h,className:"trp-actions__reason caption-1",role:"status",children:d("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(fe,{htmlType:"button",size:56,type:"bar",label:d("training.result.replay","\uB2E4\uC2DC\uD558\uAE30"),onClick:()=>D(l)}),n.jsx(fe,{htmlType:"button",size:56,type:"bar",label:d("training.result.done","\uC644\uB8CC"),variant:"main",onClick:N,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:d("training.result.eyebrow","\uD6C8\uB828 \uC644\uB8CC")}),n.jsx("h1",{className:"trp-result__title h2",children:d("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":d("training.result.scoreAria",{correct:v,total:b}),children:[n.jsx("span",{className:"trp-score__big",children:v}),n.jsx("span",{className:"trp-score__sep",children:"/"}),n.jsx("span",{className:"trp-score__total",children:b})]})})]}),B.length>0&&n.jsx("section",{className:"trp-result__body",children:n.jsxs("div",{className:`result-table${E?" result-table--answer":""}`,role:"table","aria-label":d("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:d("common.col.problem","\uBB38\uC81C")}),E&&n.jsx("span",{role:"columnheader",children:d("training.result.colAnswerSelected","\uC815\uB2F5 \xB7 \uC120\uD0DD")}),n.jsx("span",{className:"col-right",role:"columnheader",children:d("training.result.colJudge","\uD310\uC815")})]}),B.map((D,N)=>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(N+1).padStart(2,"0")}),n.jsx("div",{className:"trp-row__q body-2",children:D.problem}),D.canHear&&n.jsx(fe,{htmlType:"button",size:32,type:"dot",useBorder:!1,icon:x===N?"square":"volume-2",className:"trp-row__replay",ariaLabel:x===N?d("training.result.replaySoundStop",{no:N+1,defaultValue:"{{no}}\uBC88 \uB4E3\uAE30 \uBA48\uCDA4"}):d("training.result.replaySound",{no:N+1,defaultValue:"{{no}}\uBC88 \uB2E4\uC2DC \uB4E3\uAE30"}),onClick:()=>x===N?w():A(N,D.problem,D.sound)})]}),E&&n.jsxs("div",{className:"trp-row__answers",children:[D.answer!==null&&n.jsxs("div",{className:"trp-row__answer-line",children:[n.jsx("span",{className:"trp-row__answer-label answer-correct caption-1",children:d("training.result.colAnswer","\uC815\uB2F5")}),n.jsx("span",{className:"trp-row__answer-value body-2",children:D.answer})]}),n.jsxs("div",{className:"trp-row__answer-line",children:[n.jsx("span",{className:`trp-row__answer-label answer-selected caption-1 ${D.isCorrect?"is-correct":"is-wrong"}`,children:d("training.result.colSelected","\uC120\uD0DD")}),n.jsx("span",{className:`trp-row__answer-value body-2 ${D.isCorrect?"is-correct":"is-wrong"}`,children:D.selectedText??"\u2014"})]})]}),n.jsx("div",{className:"trp-row__judge",children:n.jsx(ln,{variant:D.variant,label:D.label,fill:"soft",minWidth:80})})]},N))]})})]})})}const js=new Set;function qx(e){o.useEffect(()=>{if(!e||js.has(e))return;js.add(e);const t=()=>typeof document>"u"||document.visibilityState!=="hidden";let a=null,r=null,s=0,l=0;const i=()=>{const h=Date.now();a==null&&(a=h),r==null&&(r=h)},u=()=>{r!=null&&(s+=Date.now()-r,r=null)};t()&&i();const c=()=>{if(u(),a==null)return;const h=s-l;if(h<1e3||l===0&&s<5e3)return;const p=Date.now(),m=p-h;l=s,jf({trainingType:e,startedAt:new Date(m).toISOString(),endedAt:new Date(p).toISOString()})},d=()=>{t()?i():c()};return typeof document<"u"&&document.addEventListener("visibilitychange",d),typeof window<"u"&&window.addEventListener("pagehide",c),()=>{typeof document<"u"&&document.removeEventListener("visibilitychange",d),typeof window<"u"&&window.removeEventListener("pagehide",c),c(),js.delete(e)}},[e])}function Rr(e,t){return e&&e.id||`page-${t??0}`}function Pr(e,t){return e&&e.key||`step-${t??0}`}function Fr(){return{pageIndex:0,stepIndex:0,answersByPage:{}}}function Ux(e,t){return typeof e?.props=="function"?e.props(t)||{}:e?.props||{}}const Gx=300,Kx=()=>{try{return typeof window<"u"&&!!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches}catch{return!1}},On=Object.freeze({}),bd=new Set(["LISTEN_IN_NOISE","SHORT_STORY","LONG_STORY","ORDERING_SENTENCE"]);function Ts(e){const t=e,a=t?.results||t?.answers||[],r=Array.isArray(a)&&a.length>0?a.length:null,s=Array.isArray(a)?a.filter(l=>l?.correct===!0||l?.isCorrect===!0||l?.score===1||l?.heard===!0||l?.judgement===!0).length:null;return{results:a,correct:r!=null?s:null,total:r}}const Yx=e=>n.jsx(fd,{score:e.score,contextsLength:e.contextsLength,results:e.results,onReplay:e.onReplay,onClose:e.onClose,pending:e.pending});function Zx(e){const{scenario:t,title:a,subTitle:r,depth:s,icon:l,wrapperStyle:i,iconTooltip:u,pageIndex:c,pageCount:d,stepIndex:h,stepCount:p,onBack:m,onComplete:b,onRoundFinished:v,onNext:C,onSettings:f,useNoiseSetting:x=!0,children:g,ariaLabel:w,label:y,buildResults:k,onResult:_,typeKey:A,entryPoint:B,dailyTotal:E,itemRef:D,renderResultPopup:N,noiseOverride:$,hideNoiseRows:L=!1}=e;qx(A&&!bd.has(A)?A:"");const U=o.useRef(0);o.useEffect(()=>{U.current=Date.now()},[]);const{t:M}=_e.useTranslation(),P=_,T=!!t,ee=t?.id||null,te=t?.meta||{},I=Array.isArray(t?.pages)?t.pages:[],Y=Array.isArray(g)||o.isValidElement(g)&&typeof g!="function"?o.Children.toArray(g).filter(o.isValidElement):[],R=Y.length>0,q=de=>de===Lr||de?.__isTrainingPage===!0,Z=R&&Y.some(de=>q(de.type)),z=Z?Y.filter(de=>q(de.type)).map((de,Ee)=>{const Fe=de.props||{};return{id:`children-page-${Ee}`,steps:o.Children.toArray(Fe.children).filter(o.isValidElement),pageTop:Fe.pageTop||Fe.top||null,pageBottom:Fe.pageBottom||Fe.bottom||null}}):[{id:"children-page-0",steps:Y}],j=R&&!T&&typeof g!="function",F=j?Math.max(1,z.length):0;o.useEffect(()=>{if(!(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(typeof document>"u"||!document.body)return;const de=document.body;return de.dataset.ihabTrainingPopupCount=String(Number(de.dataset.ihabTrainingPopupCount||"0")+1),de.classList.add("ihab-training-popup-open"),()=>{const Ee=Number(de.dataset.ihabTrainingPopupCount||"1")-1;Ee>0?de.dataset.ihabTrainingPopupCount=String(Ee):(delete de.dataset.ihabTrainingPopupCount,de.classList.remove("ihab-training-popup-open"))}},[]),o.useEffect(()=>{if(!(typeof document>"u"||!document.body))return hv()},[]);const[O,G]=o.useState({...oa,enabled:!1}),ie=o.useRef(O);o.useEffect(()=>{ie.current=O},[O]);const K=o.useRef($),pe=o.useRef(!1),X=o.useRef(null);o.useEffect(()=>{let de=!1;const Ee=Fe=>{if(de)return;pe.current=!0;const Ze=Fe?ra({...oa,enabled:!1},Fe):{...oa},Oe=X.current;X.current=null;const J=Oe?ra(Ze,Oe):Ze;ie.current=J,G(J),Oe&&!K.current&&mo(J),pr(J);const ce=K.current;if(ce){const De=typeof ce=="function"?ce(J):ce,Ve=ra(J,De);ie.current=Ve,G(Ve),pr(Ve)}};return Wf().then(Fe=>{if(de){const Ze=X.current;if(X.current=null,Ze&&!K.current){const Oe=Fe?ra({...oa,enabled:!1},Fe):{...oa};mo(ra(Oe,Ze))}return}Ee(Fe)}),()=>{de=!0}},[]);const[H,ne]=o.useState(null),[V,W]=o.useState(null),oe=o.useCallback((de,Ee)=>{de==="main"?ne(Ee):W(Ee)},[]),xe=o.useRef(null),be=o.useRef(null),me=o.useCallback(()=>{be.current!==null&&(clearTimeout(be.current),be.current=null);const de=xe.current;xe.current=null,de&&mo(de)},[]);o.useEffect(()=>{if(typeof window>"u")return;const de=()=>{document.visibilityState==="hidden"&&me()};return window.addEventListener("pagehide",me),document.addEventListener("visibilitychange",de),()=>{window.removeEventListener("pagehide",me),document.removeEventListener("visibilitychange",de),me()}},[me]);const ke=o.useCallback(de=>{const Ee=ra(ie.current,de);if(ie.current=Ee,G(Ee),!pe.current){X.current={...X.current??{},...de},pr(Ee);return}K.current||(xe.current=Ee,be.current!==null&&clearTimeout(be.current),be.current=setTimeout(me,Gx)),pr(Ee)},[me]),Le=O.mainSpeed,Me=O.mainVolume,le=o.useCallback(de=>ke({mainSpeed:de}),[ke]),ve=o.useCallback(de=>ke({mainVolume:de}),[ke]),$e=o.useMemo(()=>({settings:O,setSettings:ke,registerAnalyser:oe,mainAnalyser:H,noiseAnalyser:V,playbackRate:Le,setPlaybackRate:le,mainVolume:Me,setMainVolume:ve}),[O,ke,oe,H,V,Le,le,Me,ve]),Ae=o.useRef(null),[Ie,ze]=o.useState(0),dt=o.useRef([]),[st,et]=o.useState("center"),[gt,Se]=o.useState(!1),Ge=o.useRef(!1),we=o.useRef(null),qe=o.useCallback(de=>{Ge.current||(Ge.current=!0,Se(!0),we.current=setTimeout(()=>{try{de()}catch{Ge.current=!1,Se(!1)}},Kx()?0:bx))},[]);o.useEffect(()=>()=>{we.current&&clearTimeout(we.current)},[]);const Ye=o.useRef(m);o.useEffect(()=>{Ye.current=m});const mt=o.useRef(typeof document>"u"?null:document.activeElement);o.useEffect(()=>{const de=Ae.current,Ee=mt.current;if(yo(de,Ee),de){const Fe=Array.from(de.querySelectorAll(En)).filter(Ze=>!Ze.closest('[aria-hidden="true"]'))[0];if(Fe)try{Fe.focus()}catch{}}return()=>{const Fe=document.activeElement;if(!Fe||Fe===document.body||de&&de.contains(Fe))try{vo(Ee)?.focus?.()}catch{}}},[]),o.useEffect(()=>Qn(()=>qe(()=>{const de=Ye.current;typeof de=="function"&&de()})),[qe]),bo(Ae,!0);const[wt,yt]=o.useState(!1),Et=o.useRef(!1),[at,rt]=o.useState(null),Dt=o.useRef(0),Bt=o.useRef(0),Lt=()=>{Dt.current+=1,Bt.current+=1,rt(null)},[It,xt]=o.useState(""),[lt,Ct]=o.useState(()=>Fr()),it=o.useRef(typeof c=="number"?c:null);o.useEffect(()=>{!T&&!j||(Ct(Fr()),Lt())},[T,ee,j]),o.useEffect(()=>{j&&Ct(de=>{const Ee=Math.max(0,Math.min(de.pageIndex,Math.max(0,F-1)));return Ee!==de.pageIndex?{...de,pageIndex:Ee,stepIndex:0}:de})},[j,F]);const _t=j?Math.max(0,Math.min(lt.pageIndex,F-1)):0,ut=j?z[_t]:null,St=j&&ut&&Array.isArray(ut.steps)?ut.steps:[],ue=T?lt.pageIndex:j?_t:typeof c=="number"?c:0,Te=T?I[Math.max(0,Math.min(lt.pageIndex,Math.max(0,I.length-1)))]:null,Ne=T&&Te&&Array.isArray(Te.steps)?Te.steps:[],tt=T?Ne.length:j?St.length:typeof p=="number"?p:0,pt=T||j?Math.max(0,Math.min(lt.stepIndex,Math.max(0,tt))):typeof h=="number"?h:0,jt=T?I.length:j?F:typeof d=="number"?d:0;o.useEffect(()=>{if(!T&&!j)return;const de=T?Rr(Te,ue):ut?.id||`children-page-${ue??0}`,Ee=new Date().toISOString();for(let Fe=0;Fe<=pt;Fe+=1){const Ze=T?Pr(Ne[Fe],Fe):`step-${Fe}`,Oe=ye(de,Ze);ae.current.has(Oe)||ae.current.set(Oe,Ee)}},[T,j,ue,pt,ut?.id]),o.useLayoutEffect(()=>{const de=it.current;if(typeof ue=="number"&&de!==null&&ue!==de&&ue>de)try{xt(M("training.problemNotice",{n:ue+1}))}catch{}it.current=typeof ue=="number"?ue:it.current},[ue,c,M]),o.useLayoutEffect(()=>{const de=Ae.current;if(!de)return;const Ee=()=>de.querySelector(".page-popup__scroll");let Fe=null,Ze=null,Oe=null;const J=Je=>{const ct=Ee();if(!ct)return;const ft=ct.scrollHeight<=ct.clientHeight;if(et(ft?"center":"top"),Je&&!Et.current){Et.current=!0;try{yt(!0)}catch{}try{Ve.disconnect()}catch{}}},ce=()=>{Fe!==null&&cancelAnimationFrame(Fe),Fe=requestAnimationFrame(()=>{Ze!==null&&clearTimeout(Ze),Ze=setTimeout(()=>J(!0),60)})},De=()=>{Oe!==null&&cancelAnimationFrame(Oe),Oe=requestAnimationFrame(()=>J(!1))};ce(),window.addEventListener("resize",De);const Ve=new MutationObserver(ce);Ve.observe(de,{childList:!0,subtree:!0,attributes:!0});const Xe=setTimeout(()=>{Et.current||J(!0)},400);return()=>{window.removeEventListener("resize",De),Fe!==null&&cancelAnimationFrame(Fe),Ze!==null&&clearTimeout(Ze),Oe!==null&&cancelAnimationFrame(Oe),clearTimeout(Xe);try{Ve.disconnect()}catch{}}},[Ae]);const je=o.useCallback(de=>{Ae.current&&(Ae.current._childOnNext=de)},[]),nt=o.useCallback(de=>{Ae.current&&(Ae.current._childOnResult=de)},[]),ae=o.useRef(new Map),ye=(de,Ee)=>`${de}\0${Ee}`,He=o.useCallback((de,Ee,Fe)=>{Ct(Ze=>{const Oe=Ze.answersByPage[de]||{},J=Oe[Ee],ce=Ds(Fe),De=Ds(J);if(J&&De>ce)return Ze;const Ve=od(Fe,ae.current.get(ye(de,Ee)),ce);return{...Ze,answersByPage:{...Ze.answersByPage,[de]:{...Oe,[Ee]:Ve}}}})},[Ct]),Ke=o.useCallback((de,Ee,Fe)=>{const Ze=Rr(Te,ue),Oe=Pr(de,Ee);He(Ze,Oe,Fe)},[Te,ue,He]),vt=o.useCallback((de,Ee,Fe)=>{const Ze=Rr(Te,ue),Oe=Pr(de,Ee);He(Ze,Oe,Fe),!Fe?.allowChange&&de?.autoAdvance!==!1&&Ct(J=>({...J,stepIndex:Math.max(J.stepIndex,Ee+1)}))},[Te,ue,He,Ct]),Ue=o.useCallback((de,Ee)=>{const Fe=ut?.id||`children-page-${ue??0}`,Ze=typeof Ee=="number"?Ee:pt??0,Oe=`step-${Ze}`;He(Fe,Oe,de),de?.allowChange||Ct(J=>({...J,stepIndex:Math.max(J.stepIndex,Ze+1)}))},[ut,ue,pt,He,Ct]),ht=o.useCallback((de,Ee)=>{const Fe=ut?.id||`children-page-${ue??0}`,Ze=`step-${typeof Ee=="number"?Ee:pt??0}`;He(Fe,Ze,de)},[ut,ue,pt,He]),cn=j?{currentPageIndex:ue??0,currentStepIndex:pt??0,totalStepsInPage:St.length,handleStepDone:Ue,handleStepChange:ht}:null,dn=async()=>{const de=typeof t?.buildResults=="function"?await Promise.resolve(t.buildResults({scenario:t,pages:I,flowState:lt,answersByPage:lt.answersByPage})):null;return typeof P=="function"&&await Promise.resolve(P(de))||de},zt=async()=>{const de=ut?.id||`children-page-${lt.pageIndex}`,Ee=lt.answersByPage[de]||{},Fe=Z?(()=>{const J={};let ce=0;return z.forEach(De=>{const Ve=lt.answersByPage[De.id]||{},Xe=Array.isArray(De.steps)?De.steps.length:0;for(let Je=0;Je<Xe;Je+=1){const ct=Ve[`step-${Je}`];typeof ct<"u"&&(J[`step-${ce+Je}`]=ct)}ce+=Xe}),J})():Ee;if(typeof k=="function"){const J=await Promise.resolve(k(Fe,{pageAnswers:Ee,answersByPage:lt.answersByPage,pages:z,currentPageId:de}));return typeof P=="function"&&await Promise.resolve(P(J))||J}const Ze=Object.entries(Ee).map(([J,ce],De)=>({index:De,key:J,payload:ce})),Oe={results:Ze,answers:Ze,score:0};return typeof P=="function"&&await Promise.resolve(P(Oe))||Oe},qt=()=>{const de=++Dt.current,Ee=()=>de!==Dt.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(T){const Oe=dn();rt(On);const J=Oe;Promise.resolve(J).then(ce=>{Ee()||rt(ce||{isEmpty:!0})}).catch(ce=>{!Ee()&&rt({isEmpty:!0})});return}if(j){const Oe=zt();rt(On);const J=Oe;Promise.resolve(J).then(ce=>{Ee()||rt(ce||{isEmpty:!0})}).catch(ce=>{!Ee()&&rt({isEmpty:!0})});return}const Fe=Ae.current&&Ae.current._childOnResult,Ze=Oe=>{try{return Oe?Oe():void 0}catch{return}};if(typeof Fe=="function"){const Oe=Ze(Fe);try{typeof document>"u"?require("url").pathToFileURL(__filename).href:Tn&&Tn.tagName.toUpperCase()==="SCRIPT"&&Tn.src||new URL("components.cjs.js",document.baseURI).href}catch{}Oe&&typeof Oe.then!="function"?rt(Oe):rt(Oe&&typeof Oe.then=="function"?On:{});const J=()=>{Ee()||rt(ce=>ce===On?{}:ce)};Promise.resolve(Oe).then(ce=>{ce&&!Ee()?rt(ce):J()}).catch(ce=>{J()});return}if(typeof P=="function"){const Oe=Ze(P);try{typeof document>"u"?require("url").pathToFileURL(__filename).href:Tn&&Tn.tagName.toUpperCase()==="SCRIPT"&&Tn.src||new URL("components.cjs.js",document.baseURI).href}catch{}Oe&&typeof Oe.then!="function"?rt(Oe):rt(Oe&&typeof Oe.then=="function"?On:{});const J=()=>{Ee()||rt(ce=>ce===On?{}:ce)};Promise.resolve(Oe).then(ce=>{try{typeof document>"u"?require("url").pathToFileURL(__filename).href:Tn&&Tn.tagName.toUpperCase()==="SCRIPT"&&Tn.src||new URL("components.cjs.js",document.baseURI).href}catch{}ce&&!Ee()?rt(ce):J()}).catch(ce=>{console.error("viewResults external handler failed",ce),J()});return}},Ht=()=>{if(T){if(typeof ue=="number"&&typeof jt=="number"&&ue<jt-1){Ct(Ee=>({...Ee,pageIndex:Ee.pageIndex+1,stepIndex:0}));return}return qt()}if(j){const Ee=St.length;if(typeof pt=="number"&&pt<Ee-1){Ct(Fe=>({...Fe,stepIndex:Fe.stepIndex+1}));return}if(typeof ue=="number"&&typeof jt=="number"&&ue<jt-1){Ct(Fe=>({...Fe,pageIndex:Fe.pageIndex+1,stepIndex:0}));return}return qt()}if(typeof C=="function"){try{C()}catch{}return}const de=Ae.current&&Ae.current._childOnNext;if(typeof de=="function"){try{de()}catch{}return}},Nt=T?te.title||te.label||w||M("common.popup","\uD31D\uC5C5"):a||y||(Array.isArray(s)?s[s.length-1]:void 0)||w||M("common.popup","\uD31D\uC5C5"),An=w||Nt,an=T?te.title??te.label??Nt:a??y??Nt,$t=(de,Ee)=>{const Fe=Rr(Te,ue),Ze=Pr(de,Ee),Oe=lt.answersByPage[Fe]?.[Ze],J=Ux(de,{page:Te,pageIndex:ue,step:de,stepIndex:Ee,storedPayload:Oe,answersByPage:lt.answersByPage,flowState:lt}),ce={key:Ze,index:Ee,stepIndex:pt,isLast:Ee===Ne.length-1};switch(de?.type){case"listen":return n.jsx(As,{...ce,...J,onDone:De=>vt(de,Ee,De)});case"confirm":return n.jsx(Bs,{...ce,...J,onDone:De=>vt(de,Ee,De),onChange:De=>Ke(de,Ee,De)});case"confirmWithText":return n.jsx(ks,{...ce,...J,onDone:De=>vt(de,Ee,De),onChange:De=>Ke(de,Ee,De)});case"orderList":return n.jsx(Ns,{...ce,...J,onDone:De=>vt(de,Ee,De),onChange:De=>Ke(de,Ee,De)});default:return null}},Pt=o.useRef(void 0);o.useEffect(()=>{const de=Pt.current;if(Pt.current=ue,de===void 0||de===ue||!wr())return;const Ee=Ae.current;if(!Ee)return;const Fe=document.activeElement;if(!(!Fe||Fe===document.body||!Ee.contains(Fe)||Fe.disabled===!0))return;const Ze=Ee.querySelector(`.training-steps ${En.split(", ").join(", .training-steps ")}`)??Array.from(Ee.querySelectorAll(En)).find(Oe=>!Oe.closest('[aria-hidden="true"]'));try{Ze?.focus()}catch{}},[ue]);const Ut=T?I.length>0?n.jsx("div",{className:"training-steps",children:Ne.map((de,Ee)=>$t(de,Ee))},`replay-${Ie}`):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||M("training.noQuestions","\uBB38\uC81C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")})}):null,Jt=j?n.jsxs(ld.Provider,{value:cn,children:[ut?.pageTop?n.jsx("div",{className:"training-page-top",children:ut.pageTop}):null,n.jsx("div",{className:"training-steps",children:St.map((de,Ee)=>{const Fe=de;return o.cloneElement(Fe,{...Fe.props,_stepIndex:Ee,_totalSteps:St.length,_stepKey:`step-${Ee}`,_pageIndex:ue})})},`replay-${Ie}`),ut?.pageBottom?n.jsx("div",{className:"training-page-bottom",children:ut.pageBottom}):null]}):null,gn=o.useRef(-1),Zt=o.useCallback(()=>{if(!A)return;const de=at,{results:Ee,correct:Fe,total:Ze}=Ts(at),Oe={correct:Fe,total:Ze,attempt:dt.current.length+1,previousAttempts:[...dt.current]};if(gn.current===Bt.current)return Oe;gn.current=Bt.current,Tf({items:zf(Ee),category:bd.has(A)?"sentence":"word",trainingType:A,entryPoint:B??"sentence",itemRef:D??null,correct:Fe,total:Ze,score:typeof de?.score=="number"?de.score:null,durationSeconds:Math.max(0,Math.round((Date.now()-U.current)/1e3)),dailyTotal:E??null});try{v?.(Oe)}catch{}return Oe},[A,B,E,D,at,v]);o.useEffect(()=>{!at||at===On||at?.isEmpty||(Ts(at).total??0)>0&&Zt()},[at,Zt]);const xn=o.useCallback(()=>{const de=Zt();Lt(),qe(()=>{typeof b=="function"&&b(de),typeof m=="function"&&m()})},[b,m,Zt,rt,qe]),pn=o.useCallback(()=>xt(""),[xt]),Qt=o.useCallback(()=>{qe(()=>{typeof m=="function"&&m()})},[m,qe]),Gt=n.jsxs("div",{className:`page-popup${gt?" page-popup--closing":""}`,role:"dialog","aria-modal":"true","aria-label":An,children:[n.jsxs("div",{ref:Ae,className:`page-popup__panel ${wt?"":"page-popup__panel--measuring"} ${st==="center"?"page-popup__panel--center":st==="top"?"page-popup__panel--top":""}`,children:[n.jsx(nd,{title:an,subtitle:T?te.subtitle||te.label:Array.isArray(s)?s.join(" / "):void 0,desc:T?void 0:r,depth:T?te.depth:s,icon:T?te.icon:l,wrapperStyle:T?te.wrapperStyle:i,iconTooltip:T?te.iconTooltip:u,progressMax:jt,progressIndex:ue,pageIndex:ue,pageCount:jt,onBack:Qt,onClose:Qt}),n.jsx("div",{className:"page-popup__scroll",children:n.jsx("div",{className:`page-popup__content ${st==="center"?"page-popup__content--center":"page-popup__content--top"}${e.contentFull?" page-popup__content--full":""}`,children:j?Jt:T?Ut:typeof g=="function"?g({registerOnNext:je,registerOnResult:nt,panelRef:Ae,setResultOverlay:rt}):g})}),n.jsx(td,{onSettings:f,onNext:Ht,onResult:qt,useNoiseSettingBtn:!!(T?te.useNoiseSetting??!0:x),stepIndex:pt,stepCount:tt,pageIndex:ue,pageCount:jt,resultOpen:!!(at&&!at.isEmpty),hideNoiseRows:L})]}),at&&!at.isEmpty&&(N??Yx)({score:at.score,results:at.results||at.answers||[],contextsLength:at.results?at.results.length:at.answers?at.answers.length:0,onReplay:()=>{if(U.current=Date.now(),at!==On){const{correct:de,total:Ee}=Ts(at);dt.current.push({correct:de,total:Ee})}if(Lt(),ze(de=>de+1),T){if(Ct(Fr()),typeof t?.onReplay=="function")try{t.onReplay()}catch{}return}if(j){Ct(Fr());return}try{const de=Ae.current&&Ae.current._childOnResult;typeof de=="function"&&de({replay:!0})}catch{}},onClose:xn,pending:at===On}),at?.isEmpty&&n.jsx("div",{className:"page-popup page-popup--result-empty",role:"dialog","aria-modal":"true","aria-label":M("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:M("training.result.eyebrow","\uD6C8\uB828 \uC644\uB8CC")})})}),n.jsx("div",{className:"page-popup__bottom",children:n.jsx(fe,{htmlType:"button",variant:"main",size:48,onClick:xn,label:M("training.result.done","\uC644\uB8CC")})})]})}),n.jsx(va,{message:It,position:"top",onClose:pn})]}),Nn=n.jsx(gs.Provider,{value:$e,children:Gt});return typeof document<"u"&&document.body?hn.createPortal(Nn,document.body):Nn}const Yn=Zx;Yn.Page=Lr,Yn.ListenStep=id,Yn.ConfirmStep=ud,Yn.ConfirmWithTextStep=cd,Yn.OrderListStep=dd,Yn.CardStep=pd,Yn.CardOrderStep=Lx;function Xx({label:e,homonum:t}){const a=pa()?.(e,t)??"",{imgRef:r,loading:s,hasImage:l,onLoad:i,onError:u}=ts(a);return l?n.jsxs("div",{className:se("word-image-tooltip__cell"),children:[s&&n.jsx("div",{className:se("word-image-tooltip__spinner")}),n.jsx("img",{ref:r,src:a,alt:e,draggable:!1,style:{opacity:s?0:1},onLoad:i,onError:u})]}):n.jsx("div",{className:se("word-image-tooltip__cell word-image-tooltip__cell--text h3"),children:n.jsx("span",{children:e})})}function gd({words:e,anchorRect:t}){const a=o.useRef(null),[r,s]=o.useState(null);return o.useLayoutEffect(()=>{if(!t||!a.current)return;const{offsetWidth:l,offsetHeight:i}=a.current,u=window.innerWidth;let c=t.left+t.width/2-l/2,d=t.top-i-8;d<8&&(d=t.bottom+8),c=Math.max(8,Math.min(c,u-l-8)),s({left:c,top:d})},[t]),!t||e.length===0?null:hn.createPortal(n.jsx("div",{ref:a,className:se("word-image-tooltip"),style:{visibility:r?"visible":"hidden",left:r?.left??0,top:r?.top??-9999},children:n.jsx("div",{className:se("word-image-tooltip__cells"),children:e.map(l=>n.jsx(Xx,{label:l.label,homonum:l.homonum},`${l.label}_${l.homonum??1}`))})}),document.body)}function Jx({titleIcon:e,resultCount:t,resultUnit:a,searchQuery:r,items:s,groups:l,selected:i=[],onSelect:u,maxSelect:c,onClearSelection:d,onPrint:h,onPrintEmpty:p,className:m,emptyHint:b,showEmptyText:v=!0,sectionType:C="page",disc:f}){const{t:x,i18n:g}=_e.useTranslation(),w=g.language?.startsWith("ko")??!1,{anchorRect:y,openAt:k,close:_}=za(),[A,B]=o.useState(null),E=o.useCallback(()=>{_(),B(null)},[_]);Hy(E,!!A);const D=(r??"").trim(),N=/^[^,[\]\s]+$/.test(D)?D:"",$=N.length>0,L=r===void 0&&t===void 0,U=$?"match":L?"original":"ganada",[M,P]=o.useState(()=>U),[T,ee]=o.useState("50"),[te,I]=o.useState(1),[Y,R]=o.useState($);Y!==$&&(R($),P(U));const q=M==="match"&&!$||M==="original"&&!L?U:M,Z=o.useMemo(()=>[...$?[{value:"match",label:x("wordSearch.sort.match",{defaultValue:"\uC2DC\uC791 \uC6B0\uC120"})}]:[],...L?[{value:"original",label:x("wordSearch.sort.original",{defaultValue:"\uBC1B\uC740 \uC21C\uC11C"})}]:[],{value:"ganada",label:x("wordSearch.sort.ganada",{defaultValue:"\uAC00\uB098\uB2E4\uC21C \u2191"})},{value:"ganada_desc",label:x("wordSearch.sort.ganadaDesc",{defaultValue:"\uAC00\uB098\uB2E4\uC21C \u2193"})},{value:"syllable",label:x("wordSearch.sort.syllable",{defaultValue:"\uC74C\uC808 \uC218 \u2191"})},{value:"syllable_desc",label:x("wordSearch.sort.syllableDesc",{defaultValue:"\uC74C\uC808 \uC218 \u2193"})},{value:"grade",label:x("wordSearch.sort.grade",{defaultValue:"\uB4F1\uAE09\uC21C \u2191"})},{value:"grade_desc",label:x("wordSearch.sort.gradeDesc",{defaultValue:"\uB4F1\uAE09\uC21C \u2193"})}],[x,$,L]),z=o.useMemo(()=>["10","25","50","100"].map(le=>({value:le,label:x("wordSearch.pageSize",{count:Number(le),defaultValue:`${le}\uAC1C\uC529 \uBCF4\uAE30`})})),[x]),j=le=>le.words?.[0],F=o.useMemo(()=>{const le=[...N].length,ve=mf(N),$e=new Map;return Ae=>{let Ie=$e.get(Ae);return Ie===void 0&&(Ie=ve((Ae.words?.[0]?.label??"").slice(0,le))?0:1,$e.set(Ae,Ie)),Ie}},[N]),O=o.useCallback((le,ve)=>{const $e=ze=>j(ze)?.label??"",Ae=ze=>j(ze)?.syllables??[...$e(ze)].length,Ie=ze=>(ze.words??[]).reduce((dt,st)=>{const et=parseInt(st.grade??"",10);return Number.isFinite(et)&&et<dt?et:dt},999);switch(q){case"match":return F(le)-F(ve)||fn($e(le),$e(ve));case"ganada":return fn($e(le),$e(ve));case"ganada_desc":return fn($e(ve),$e(le));case"syllable":return Ae(le)-Ae(ve)||fn($e(le),$e(ve));case"syllable_desc":return Ae(ve)-Ae(le)||fn($e(le),$e(ve));case"grade":return Ie(le)-Ie(ve)||fn($e(le),$e(ve));case"grade_desc":return Ie(ve)-Ie(le)||fn($e(le),$e(ve));default:return 0}},[q,F]),G=o.useMemo(()=>s.slice().sort(O),[s,O]),ie=Number(T)||10,K=o.useMemo(()=>(l??[]).flatMap(le=>le.items.slice().sort(O).map(ve=>({item:ve,label:le.label}))),[l,O]),pe=l?K.length:G.length,X=Math.max(1,Math.ceil(pe/ie)),H=Math.min(te,X),ne=o.useMemo(()=>G.slice((H-1)*ie,H*ie),[G,H,ie]),V=o.useId(),W=o.useMemo(()=>{if(!l)return null;const le=K.slice((H-1)*ie,H*ie),ve=new Map;for(const{item:$e,label:Ae}of le)ve.has(Ae)||ve.set(Ae,[]),ve.get(Ae).push($e);return[...ve.entries()].map(([$e,Ae])=>({label:$e,items:Ae}))},[l,K,H,ie]);o.useEffect(()=>{I(1)},[M,T,pe,r]);const oe=pe>0?n.jsxs("div",{className:"word-search-result-block__toolbar",children:[n.jsx(_n,{size:40,options:Z,value:q,onChange:P,ariaLabel:x("wordSearch.sort.aria",{defaultValue:"\uC815\uB82C"})}),n.jsx(_n,{size:40,options:z,value:T,onChange:ee,ariaLabel:x("wordSearch.pageSizeAria",{defaultValue:"\uD398\uC774\uC9C0 \uD06C\uAE30"})}),n.jsx(zo,{page:H,totalPages:X,onChange:I})]}):void 0,xe=le=>{u&&u(le)},be=t!==void 0&&a?n.jsxs(n.Fragment,{children:[x("wordSearch.resultTitlePrefix","\uCD1D "),n.jsx("span",{style:{color:"var(--color-main)"},children:t}),x("wordSearch.resultTitleSuffix",{unit:w?kf(a):a})]}):void 0,me=t!==void 0&&t>0&&c!==void 0&&a?x("wordSearch.resultDisc",{unit:w?Nf(a):a,max:c,selected:i.length}):void 0,ke=f??me,Le=l?l.length===0:s.length===0,Me=Le&&!v&&!b;return n.jsxs(_a,{type:C,className:Be("word-search-result-block",m),children:[n.jsxs("div",{className:Be("word-search-result-block__inner",Me&&"word-search-result-block__inner--head-only"),children:[(be||oe||ke)&&n.jsxs("div",{className:"word-search-result-block__head",children:[n.jsxs("div",{className:"word-search-result-block__head-main",children:[e&&n.jsx(ot,{icon:e,className:"word-search-result-block__head-icon"}),be&&n.jsx("span",{className:"word-search-result-block__title h3",children:be})]}),oe&&n.jsx("div",{className:"word-search-result-block__head-actions",children:oe}),ke&&n.jsx("div",{className:"word-search-result-block__head-disc body-3",children:ke})]}),Le&&(v||b)&&n.jsxs("div",{className:"word-search-result-block__empty-wrap",children:[v&&n.jsx("p",{className:"word-search-result-block__empty body-3",children:x("wordSearch.emptyResult","\uAC80\uC0C9 \uACB0\uACFC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}),b&&n.jsx("p",{className:"word-search-result-block__empty-hint body-3",children:b})]}),l?(W??[]).map(le=>n.jsxs("div",{className:"word-search-result-block__group",role:"group","aria-labelledby":`${V}-${le.label}`,children:[n.jsx("div",{className:"word-search-result-block__group-label caption-1b",id:`${V}-${le.label}`,children:le.label}),n.jsx("div",{className:"word-search-result-block__items",children:le.items.map(ve=>{const $e=i.includes(ve.id);return n.jsx("div",{onMouseEnter:Ae=>{k(Ae.currentTarget),B(ve.words??[])},onMouseLeave:E,children:n.jsx(fe,{htmlType:"button",size:"word",align:"grid",label:(ve.words??[]).map(Ae=>Ae.label),subLabel:(ve.words??[]).some(Ae=>Ae.subLabel)?(ve.words??[]).map(Ae=>Ae.subLabel):void 0,selected:$e,onClick:()=>xe(ve.id),minWidth:200})},ve.id)})})]},le.label)):n.jsx("div",{className:"word-search-result-block__items",children:ne.map(le=>{const ve=i.includes(le.id);return n.jsx("div",{onMouseEnter:$e=>{k($e.currentTarget),B(le.words??[])},onMouseLeave:E,children:n.jsx(fe,{htmlType:"button",size:"word",align:"grid",label:(le.words??[]).map($e=>$e.label),subLabel:(le.words??[]).some($e=>$e.subLabel)?(le.words??[]).map($e=>$e.subLabel):void 0,selected:ve,onClick:()=>xe(le.id),minWidth:200})},le.id)})}),A&&y&&n.jsx(gd,{words:A,anchorRect:y})]}),(d||h)&&n.jsxs("div",{className:"word-search-result-block__actions",children:[d&&n.jsx(fe,{htmlType:"button",size:"56",type:"bar",label:x("common.resetSelection","\uC120\uD0DD \uCD08\uAE30\uD654"),selected:!1,disabled:i.length===0,onClick:i.length===0?void 0:d}),h&&n.jsx("div",{onClick:i.length===0?p:void 0,children:n.jsx(fe,{htmlType:"button",size:"56",type:"bar",variant:"main",label:x("wordTable.title","\uB2E8\uC5B4 \uD45C \uB9CC\uB4E4\uAE30"),disabled:i.length===0,onClick:i.length===0?void 0:h})})]})]})}function Qx(e,t){return t.map(a=>{const r=typeof a=="string"?a:a.label,s=typeof a=="string"?void 0:a.displayLabel;return{label:r,value:e[r]??"",displayLabel:s}})}function ew({sections:e,selectedList:t,count:a,onCountChange:r,maxCount:s=4,minCount:l=1,combinationSections:i,combinationSectionsForSlot:u,onSelect:c,placeholder:d="-",className:h,title:p,titleIcon:m,disc:b,showInfoButton:v=!0,onClearPhoneme:C,onSearch:f,onSearchEmpty:x,searchDisabled:g=!1,searchLabel:w,searchChecking:y=!1,pairMode:k=!1,sectionType:_="page",beforeSearchContent:A,beforeContent:B,afterContent:E,hideCountControl:D=!1,ordinal:N=!1}){const{t:$}=_e.useTranslation(),L=o.useMemo(()=>$("wordPairs.infoNotes",{returnObjects:!0}),[$]),U=o.useMemo(()=>Array.from({length:s-l+1},(j,F)=>{const O=l+F;return{key:String(O),label:$("wordPairs.count",{n:O})}}),[$,s,l]),M=o.useMemo(()=>$("wordPairs.ordinals",{returnObjects:!0}),[$]),P=o.useCallback(j=>N?$("wordPairs.phonemeOrdinalLabel",{ordinal:M[j-1]??j}):a===1?$("wordPairs.phonemeSingleLabel","\uC74C\uC808"):$("wordPairs.phonemeN",{n:j}),[N,M,a,$]),T=o.useCallback(j=>N?$("wordPairs.phonemeContrastOrdinalLabel",{ordinal:M[j-1]??j}):a===1?$("wordPairs.phonemeContrastSingleLabel","\uB300\uB9BD \uC74C\uC808"):$("wordPairs.phonemeContrast",{n:j}),[N,M,a,$]),ee=o.useCallback((j,F)=>F?n.jsxs(n.Fragment,{children:[j,n.jsx("span",{className:"phoneme-select-block__required",children:"*"})]}):j,[]),{anchorRect:te,toggleAt:I,close:Y}=za(),R=o.useCallback(j=>r(Number(j)),[r]),q=yn("(max-width: 767px)"),Z=o.useCallback(j=>Qx(j,e).map(({label:F,value:O,displayLabel:G})=>{const ie=!!O&&O!=="\uC5C6\uC74C";return n.jsxs("span",{className:Be("phoneme-select-block__cell-jamo-part",O?"":"phoneme-select-block__cell-jamo-part--empty",ie?"":"phoneme-select-block__cell-jamo-part--no-label"),children:[n.jsx("span",{className:`phoneme-select-block__cell-jamo-char h1${O==="\uC5C6\uC74C"?" phoneme-select-block__cell-jamo-char--excluded":""}`,children:O==="\uC5C6\uC74C"?"x":O||d}),ie&&n.jsx("span",{className:"phoneme-select-block__cell-jamo-label caption-2",children:G??F})]},F)}),[e,d]),z=n.jsxs(n.Fragment,{children:[n.jsx("div",{"data-tooltip-ignore":!0,children:n.jsx(fe,{htmlType:"button",size:40,type:q?"dot":void 0,icon:"info",label:q?void 0:$("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),ariaLabel:$("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),className:te?"is-selected":void 0,"aria-expanded":!!te,"aria-haspopup":"dialog",onClick:j=>I(j.currentTarget)})}),te&&n.jsx(qn,{title:$("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),items:L,anchorRect:te,onClose:Y})]});return n.jsxs(_a,{type:_,title:p,icon:m,disc:b,action:v?z:void 0,className:Be("phoneme-select-block",h),children:[B,!D&&n.jsx("div",{className:"phoneme-select-block__controls",children:n.jsx(vn,{options:U,value:String(a),onChange:R,size:40,ariaLabel:$("wordPairs.countLabel","\uC74C\uC18C \uAC1C\uC218"),className:"phoneme-select-block__count-control"})}),n.jsx("div",{className:"phoneme-select-block__cells",children:k?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"phoneme-select-block__cell-group",children:Array.from({length:a}).map((j,F)=>{const O=t[F*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:Z(O)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:P(F+1)})]},F)})}),n.jsx("span",{className:"phoneme-select-block__cell-vs h3",children:$("wordPairs.phonemeSelect.vs","\uB300")}),n.jsx("div",{className:"phoneme-select-block__cell-group",children:Array.from({length:a}).map((j,F)=>{const O=t[F*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:Z(O)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:T(F+1)})]},F)})})]}):t.map((j,F)=>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:Z(j)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:P(F+1)})]},F))}),(i||u)&&n.jsx("div",{className:"phoneme-select-block__panels",children:n.jsx("div",{className:"phoneme-select-block__detail",children:k?n.jsxs("div",{className:"phoneme-select-block__pair-panels",children:[n.jsx("div",{className:"phoneme-select-block__panel-group",children:Array.from({length:a}).map((j,F)=>{const O=t[F*2]??{};return n.jsx(In,{title:ee(P(F+1),F===0),sections:u?u(O,F*2):i,selected:O,onSelect:c?.(F*2),align:"newline"},F)})}),n.jsx("div",{className:"phoneme-select-block__panel-group",children:Array.from({length:a}).map((j,F)=>{const O=t[F*2+1]??{};return n.jsx(In,{title:T(F+1),sections:u?u(O,F*2+1):i,selected:O,onSelect:c?.(F*2+1),align:"newline"},F)})})]}):t.map((j,F)=>n.jsx(In,{title:ee(P(F+1),F===0),sections:u?u(j,F):i,selected:j,onSelect:c?.(F),align:"newline"},F))})}),A&&n.jsx("div",{className:"phoneme-select-block__before-search",children:A}),(C||f||y)&&(()=>{const j=t.every(F=>{const O=cf(F);return Object.entries(O).every(([G,ie])=>!ie||G==="coda"&&ie===Pl)});return n.jsxs("div",{className:"phoneme-select-block__search-row",onClick:j?x:void 0,children:[C&&n.jsx(fe,{htmlType:"button",size:"56",type:"bar",label:$("wordPairs.resetOptions","\uAC80\uC0C9 \uC635\uC158 \uCD08\uAE30\uD654"),selected:!1,disabled:j,onClick:j?void 0:C}),f?n.jsx(fe,{htmlType:"button",size:"56",type:"bar",variant:"main",icon:y?n.jsx("span",{className:"phoneme-select-block__spinner","aria-hidden":"true"}):void 0,label:w??$("wordSearch.searchButton","\uAC80\uC0C9\uD558\uAE30"),disabled:j||g||y,onDisabledClick:y?()=>{}:void 0,"aria-busy":y||void 0,onClick:f}):y?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:w??$("wordSearch.searchButton","\uAC80\uC0C9\uD558\uAE30")})]}):null]})})(),E]})}function tw({title:e,sections:t,selected:a,onSelect:r,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c,headerAction:d,className:h}){const{t:p}=_e.useTranslation();return n.jsx(In,{className:h,title:e??p("wordSearch.filterTitle","\uB2E8\uC5B4 \uAC80\uC0C9 \uC124\uC815"),sections:t,selected:a,onSelect:r,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c,headerAction:d,align:"inline"})}function nw({title:e,headerAction:t,sections:a,selected:r,onSelect:s,className:l}){const{t:i}=_e.useTranslation();return a.length===0?null:n.jsx(In,{className:l,title:e??i("training.filter.phonemeGroup",{defaultValue:"\uD6C8\uB828 \uC74C\uC808"}),headerAction:t,sections:a,selected:r,onSelect:s,align:"newline"})}function aw({title:e,mode:t,onModeChange:a,matchMode:r,onMatchModeChange:s,positionCount:l,onPositionCountChange:i,inputMode:u,onInputModeChange:c,className:d}){const{t:h}=_e.useTranslation(),p={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=f=>h("wordPairs.count",{n:f}),b=[{label:p.searchMode,items:[p.include,p.pick,p.explicit],display:"segmented",labelAction:n.jsx(Ga,{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:p.phonemeOrder,items:[p.orderAny,p.orderMatch],display:"segmented",labelAction:n.jsx(Ga,{items:h("wordPairs.filter.phonemeOrderInfo",{returnObjects:!0})})},{label:p.count,items:[m(1),m(2)],display:"segmented"},{label:p.inputMode,items:[p.charInput,p.pronInput],display:"segmented",labelAction:n.jsx(Ga,{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.")]})}],v={[p.searchMode]:t==="explicit"?p.explicit:t==="pick"?p.pick:p.include,[p.phonemeOrder]:r==="ordered"?p.orderMatch:p.orderAny,[p.count]:m(l),[p.inputMode]:u==="phoneme"?p.pronInput:p.charInput},C=(f,x)=>{x===p.searchMode?a(f===p.explicit?"explicit":f===p.pick?"pick":"include"):x===p.phonemeOrder?s(f===p.orderMatch?"ordered":"unordered"):x===p.count?i(f===m(2)?2:1):x===p.inputMode&&c(f===p.pronInput?"phoneme":"word")};return n.jsx(In,{className:d,title:e??h("wordPairs.filter.searchOptionsTitle","\uB300\uB9BD \uC124\uC815"),sections:b,selected:v,onSelect:C,align:"inline"})}function rw(e){const{title:t,items:a,columns:r,resizeStorageKey:s,gridTemplateColumns:l,mobileGridTemplateColumns:i,searchPlaceholder:u,searchFn:c,defaultSortKey:d,defaultSortAsc:h=!0,selectedId:p,selectedIds:m,onSelect:b,onClose:v,pageSizeOptions:C=[10,25,50,100],initialPageSize:f,emptyText:x,noMatchText:g,countLabel:w,topContent:y,className:k=""}=e,{t:_}=_e.useTranslation(),A=u??_("common.search","\uAC80\uC0C9"),B=x??_("common.emptyList","\uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."),E=g??_("common.noMatches","\uB9DE\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"),[D,N]=o.useState(""),[$,L]=o.useState(d??r[0]?.key??""),[U,M]=o.useState(h),[P,T]=o.useState(String(f??C[0]??10)),[ee,te]=o.useState(1);o.useEffect(()=>{te(1)},[D,P]);const I=c!==null,Y=o.useCallback((K,pe)=>{if(!pe)return!0;const X=pe.toLowerCase();return r.some(H=>{const ne=K[H.key];return ne==null?!1:String(ne).toLowerCase().includes(X)})},[r]),R=c??Y,q=o.useMemo(()=>{const K=I?a.filter(pe=>R(pe,D)):a;return $?[...K].sort((pe,X)=>{const H=pe[$],ne=X[$];return H===ne?0:gr(H,ne,U)}):K},[a,D,$,U,I,R]),Z=Math.max(1,Math.ceil(q.length/Number(P)));ee>Z&&te(Z);const z=Math.min(ee,Z),j=q.slice((z-1)*Number(P),z*Number(P)),F=o.useCallback(K=>{$===K?M(pe=>!pe):(L(K),M(!0)),te(1)},[$]),O=o.useMemo(()=>{if(typeof w=="function"){const K=q.length,pe=w(K);if(typeof pe=="string"){const X=pe.lastIndexOf(String(K));if(X>=0)return{prefix:pe.slice(0,X),suffix:pe.slice(X+String(K).length)}}return{label:pe}}if(typeof w=="string"&&w.includes("{n}")){const[K,pe]=w.split("{n}");return{prefix:K,suffix:pe}}return{prefix:_("common.totalCountPrefix","\uCD1D "),suffix:_("common.totalCountSuffix","\uAC1C")}},[w,q.length,_]),G=o.useMemo(()=>r.map(K=>({label:K.label,onClick:K.sortable!==!1?()=>F(K.key):void 0,className:K.className,sortDir:K.sortable!==!1&&$===K.key?U?"asc":"desc":null})),[r,$,U,F]),ie=o.useMemo(()=>C.map(K=>({value:String(K),label:_("common.pageSizeLabel",{n:K})})),[C,_]);return n.jsxs(Pn,{className:`popup-list ${k}`,title:t,onClose:v,children:[y,"label"in O&&n.jsx("p",{className:"toolbar__count body-1",children:O.label}),n.jsx(Wo,{count:"label"in O?void 0:{value:q.length,prefix:O.prefix,suffix:O.suffix},search:I?{value:D,onChange:N,placeholder:A}:void 0,pageSize:{options:ie,value:P,onChange:T},pagination:{page:z,total:Z,onChange:te}}),n.jsx(Qo,{size:"medium",gridTemplateColumns:l,mobileGridTemplateColumns:i,resizable:!0,resizeStorageKey:s,fields:G,items:j,onRowClick:b,renderRow:K=>{const pe=m!=null?K.id!=null&&m.has(K.id):p!=null&&K.id===p;return r.map(X=>({content:X.render?X.render(K):K[X.key]??"",className:Be(X.className,pe&&"popup-list__row--selected")}))},empty:I&&D!==""&&a.length>0?E:B})]})}function yd(e){const{title:t,message:a,topContent:r,details:s,children:l,confirmLabel:i,cancelLabel:u,hideCancel:c=!1,extraAction:d,confirmVariant:h="main",confirmDisabled:p=!1,onConfirm:m,closeOnConfirm:b=!0,onClose:v,inline:C,size:f="small",className:x,initialFocus:g="close"}=e,{t:w}=_e.useTranslation(),y=o.useRef(null);o.useEffect(()=>{if(C||g==="close")return;const D=y.current?.closest(".popup-panel"),N=Array.from(D?.querySelectorAll(".popup-footer--buttons button")??[]),$=g==="confirm"?N[N.length-1]:c?void 0:N[d?1:0];$&&!$.disabled&&$.focus()},[]);const k=o.useRef(!1),[_,A]=o.useState(!1),B=D=>{let N=!1;return{close:()=>{N=!0,D()},didClose:()=>N}},E=async D=>{if(k.current)return;k.current=!0;const N=typeof document<"u"?document.activeElement:null;A(!0);let $=!1;try{$=await D()}catch(L){typeof console<"u"&&console.error(L)}finally{$||(k.current=!1,A(!1),requestAnimationFrame(()=>{const L=document.activeElement;(!L||L===document.body)&&N?.isConnected&&N.focus()}))}};return n.jsxs(Pn,{title:t,onClose:v,closeDisabled:_,inline:C,size:f,className:Be("confirm-popup",r!=null&&"confirm-popup--has-top",x),buttons:[...d?[{label:d.label,variant:d.variant??"default",disabled:d.disabled||_,onClick:async({closeWithAnimation:D})=>{await E(async()=>{const N=B(D);await d.onClick(N.close);const $=d.closeOnClick??!0;return $&&D(),$||N.didClose()})}}]:[],...c?[]:[{label:u??w("common.cancel","\uCDE8\uC18C"),variant:"default",disabled:_,onClick:({closeWithAnimation:D})=>D()}],{label:i??w("common.confirm","\uD655\uC778"),variant:h,disabled:p||_,onClick:async({closeWithAnimation:D})=>{await E(async()=>{const N=B(D);return await m(N.close),b&&D(),b||N.didClose()})}}],children:[r!=null&&n.jsx("div",{className:"confirm-popup__top",children:r}),s&&s.length>0&&n.jsx(Qa,{children:s.map((D,N)=>n.jsx(un,{label:D.label,children:n.jsx("span",{className:"panel-row__text body-2",children:D.value})},N))}),n.jsx("p",{ref:y,className:"body-2 confirm-popup__message",children:a}),l]})}function ow(e,t,a={}){const{t:r}=_e.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]),d=s?n.jsx(yd,{title:a.title??r("common.discardConfirm.title","\uC785\uB825\uC744 \uCDE8\uC18C\uD560\uAE4C\uC694?"),message:a.message??r("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:a.confirmLabel??r("common.discardConfirm.confirm","\uC785\uB825 \uCDE8\uC18C"),confirmVariant:"danger",onConfirm:()=>{l(!1),t()},onClose:()=>l(!1)}):null;return{beforeClose:c,discardPopup:d,allowClose:u}}function sw({onApply:e,onCancel:t}){const{t:a}=_e.useTranslation(),[r,s]=o.useState(""),[l,i]=o.useState(!1),[u,c]=o.useState(null),d=o.useRef(null),h=o.useId();o.useEffect(()=>{d.current?.focus()},[]);const p=o.useCallback(async v=>{const C=r.trim();if(C){i(!0),c(null);try{await e(C),v()}catch(f){c(zl(f)),i(!1),requestAnimationFrame(()=>d.current?.focus())}}},[r,e]),m=o.useCallback((v,C)=>{v.key==="Enter"&&!v.nativeEvent.isComposing&&p(C)},[p]),b=v=>{s(v.target.value),c(null)};return n.jsx(Pn,{className:"coupon-input-popup",title:a("usage.couponButton","\uCFE0\uD3F0 \uC785\uB825"),size:"small",onClose:t,closeDisabled:l,buttons:[{label:a("common.cancel","\uCDE8\uC18C"),variant:"default",disabled:l,onClick:({closeWithAnimation:v})=>v()},{label:a("coupons.applyButton","\uC801\uC6A9"),variant:"main",disabled:!r.trim()||l,onClick:({closeWithAnimation:v})=>{p(v)}}],children:({closeWithAnimation:v})=>n.jsxs(n.Fragment,{children:[n.jsx("input",{ref:d,className:"coupon-input-popup__input body-2","aria-label":a("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:a("coupons.input.placeholder","\uCFE0\uD3F0 \uCF54\uB4DC \uC785\uB825"),value:r,onChange:b,onKeyDown:C=>m(C,v),disabled:l,autoComplete:"off",spellCheck:!1}),u&&n.jsx("p",{id:h,className:"coupon-input-popup__error caption-1",role:"alert",children:u})]})})}const vd=["var(--color-main)","var(--color-sub)"],lw=2e3;function iw(e,t){if(!t.startsWith("var("))return t;try{const a=t.slice(4,-1).trim();return getComputedStyle(e).getPropertyValue(a).trim()||null}catch{return null}}function Ms({active:e=!1,count:t=40,duration:a=2e3,strength:r=1,onComplete:s,trigger:l=0}){const i=o.useMemo(()=>{const C=Math.floor(t/2),f=t-C,x=(g,w)=>Array.from({length:g}).map((y,k)=>{const _=6+Math.random()*12,A=Math.round(Math.min(18,_*Math.min(1.5,1+r*.4))),B=vd[Math.floor(Math.random()*vd.length)],E=Math.random()*300,D=(360+Math.random()*260)*r*1.2,N=(w==="left"?-95+Math.random()*40:-85-Math.random()*40)*Math.PI/180,$=Math.cos(N)*D,L=Math.sin(N)*D*1.35,U=Math.random()*720-360,M=(1200+Math.random()*3e3)*Math.min(1.6,1+r*.3),P=Math.random()>.7?"50%":"3px";return{id:`${w}-${k}`,side:w,size:A,color:B,delay:E,vx:$,vy:L,angularVel:U,life:M,borderRadius:P}});return[...x(C,"left"),...x(f,"right")]},[t,r]),u=o.useRef(null),c=o.useRef({}),d=o.useRef(null),h=o.useRef(s);o.useEffect(()=>{h.current=s},[s]);const p=o.useRef(null),m=o.useRef(null),b=()=>{if(typeof document>"u")return null;let C=document.querySelector("[data-ihab-effect-root]");return C||(C=document.createElement("div"),C.className="app-effect",C.dataset.ihabEffectRoot="",C.style.position="fixed",C.style.inset="0",C.style.pointerEvents="none",C.style.zIndex="99998",document.body.appendChild(C)),C};if(typeof document<"u"&&m.current==null&&(m.current=b()),o.useEffect(()=>{if(!e)return;if(typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches){const Y=setTimeout(()=>h.current?.(),0);return()=>clearTimeout(Y)}const C=1200,f=performance.now(),x=m.current&&m.current!==document.body?m.current.getBoundingClientRect():null,g=Math.max(60,(window.innerHeight||800)*.05),w=Y=>Math.max(40,(Y||window.innerWidth)*.02),y=x?.width||window.innerWidth||375,k=x?.height||window.innerHeight||812,_=Y=>{const R=[...Y].sort((q,Z)=>q-Z);return R[Math.floor(R.length/2)]||1},A=_(i.map(Y=>Math.abs(Y.vy))),B=_(i.map(Y=>Math.abs(Y.vx))),E=Math.sqrt(2*C*(k*.72+g))/A,D=A*E/C,N=y*.5/(B*D),$=(Y,R,q)=>Math.min(q,Math.max(R,Y)),L=$(E,.8,2.4),U=$(N,.7,2.2),M=a>0?a/lw:1,P=i.map(Y=>({...Y,life:Y.life*M,vx:Y.vx*U,vy:Y.vy*L,startTime:f+Y.delay,ended:!1})),T=x?{x:x.left-w(x.width),y:x.top+x.height+g}:{x:-w(window.innerWidth),y:window.innerHeight+g},ee=x?{x:x.left+x.width+w(x.width),y:x.top+x.height+g}:{x:window.innerWidth+w(window.innerWidth),y:window.innerHeight+g},te=Y=>{let R=!1;for(const q of P){const Z=c.current[q.id];if(!Z||!Z)continue;if(Y<q.startTime){Z.style.display="none",R=!0;continue}if(!q._inited){const H=q.side==="left"?T.x:ee.x,ne=q.side==="left"?T.y:ee.y;Z.style.left=`${H}px`,Z.style.top=`${ne}px`,Z.style.transform="translate3d(0px, 0px, 0)",Z.style.display="block",Z.style.zIndex="100000",typeof q.color=="string"&&q.color.startsWith("var(")&&(Z.style.background=iw(Z,q.color)??"#FF0060"),q._inited=!0}const z=(Y-q.startTime)/1e3;if(z<0)continue;const j=q.life/1e3;if(z>=j){Z.style.opacity="0",Z.style.display="none",q.ended=!0;continue}R=!0;const F=q.side==="left"?T.x:ee.x,O=q.side==="left"?T.y:ee.y,G=F+q.vx*z,ie=O+q.vy*z+.5*C*z*z,K=(q.angularVel||0)*z,pe=G-F,X=ie-O;Z.style.transform=`translate3d(${pe}px, ${X}px, 0) rotate(${K}deg)`,Z.style.opacity=`${Math.max(0,1-z/j)}`}R?d.current=requestAnimationFrame(te):h.current?.()};d.current=requestAnimationFrame(te);const I=setTimeout(()=>{try{if((m.current?m.current.querySelectorAll(".confetti"):document.querySelectorAll(".confetti")).length===0&&!document.querySelector(".party-container")){const Y=document.createElement("div");Y.className="party-container",Y.style.position="fixed",Y.style.inset="0",Y.style.pointerEvents="none",Y.style.overflow="visible",Y.style.zIndex="2147483647";for(const R of i){const q=document.createElement("span");q.className=`confetti confetti--${R.side}`,q.setAttribute("aria-hidden","true"),q.style.display="none",q.style.position="fixed",q.style.left="0px",q.style.top="0px",q.style.width=`${R.size}px`,q.style.height=`${Math.max(4,R.size*.6)}px`,q.style.background=R.color,q.style.borderRadius=R.borderRadius,q.style.transform="translate3d(0,0,0)",q.style.opacity="0",Y.appendChild(q),c.current[R.id]=q}(document.body||m.current).appendChild(Y),p.current=Y}}catch{}},300);return()=>{if(d.current&&cancelAnimationFrame(d.current),clearTimeout(I),p.current){try{p.current.remove()}catch{}p.current=null}}},[e,a,l,i]),!e)return null;const v=n.jsx("div",{className:"party-container",ref:u,children:i.map(C=>n.jsx("span",{"aria-hidden":!0,ref:f=>{c.current[C.id]=f},className:`confetti confetti--${C.side}`,style:{width:`${C.size}px`,height:`${Math.max(4,C.size*.6)}px`,background:C.color,borderRadius:C.borderRadius}},`${C.id}-${l}`))});return typeof document<"u"?hn.createPortal(v,m.current||document.body):v}const Ls=e=>typeof e=="number"&&Number.isFinite(e)&&e>0?e:void 0;function uw({trigger:e=0,active:t=!1}){const[a,r]=o.useState(null);o.useEffect(()=>{if(typeof window>"u")return;const l=i=>{const u=i.detail??{};r(c=>({n:(c?.n??0)+1,count:Ls(u.count),strength:Ls(u.strength),duration:Ls(u.duration)}))};return window.addEventListener("party:trigger",l),()=>window.removeEventListener("party:trigger",l)},[]);const s=o.useCallback(()=>r(null),[]);return n.jsxs(n.Fragment,{children:[n.jsx(Ms,{active:t,trigger:e}),a&&n.jsx(Ms,{active:!0,trigger:a.n,count:a.count,strength:a.strength,duration:a.duration,onComplete:s})]})}function cw({title:e,sub:t,rightAction:a,titleAction:r,badge:s,badgeVariant:l="default",documentTitle:i,onBack:u,backLabel:c,wrap:d=!1}){const{t:h}=_e.useTranslation();Dy(typeof e=="string"?e:i??null);const p=c??h("common.back","\uB4A4\uB85C");return n.jsxs("div",{className:d?"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(fe,{htmlType:"button",className:"page-title__back",size:48,type:"dot",icon:"chevron-left",iconSize:"large",useBorder:!1,iconColor:"var(--color-text-primary)",ariaLabel:p,showTooltipInfo:p,onClick:u}),n.jsx("h1",{className:"page-title__title h1",children:e}),s&&n.jsx("div",{className:"page-title__badge",children:n.jsx(ln,{label:s,size:"small",variant:l,fill:"outline"})}),r?n.jsx("div",{className:"page-title__title-action",children:r}):null]}),t&&n.jsx("p",{className:"page-title__sub body-2",children:t})]}),a?n.jsx("div",{className:"page-title__action",children:a}):null]})}function dw(e){return e??""}const _d=o.createContext({words:[],loading:!1});function pw(){return o.useContext(_d)}function hw({words:e,loading:t,error:a,statusMessage:r,localVersion:s,remoteVersion:l,progress:i,clearAndRefetch:u,checkRemoteVersion:c,children:d}){const h=o.useMemo(()=>({words:e,loading:t,error:a,statusMessage:r,localVersion:s,remoteVersion:l,progress:i,clearAndRefetch:u,checkRemoteVersion:c}),[e,t,a,r,s,l,i,u,c]);return n.jsx(_d.Provider,{value:h,children:d})}function mw({items:e,actions:t,columns:a,flat:r=!1,className:s,style:l}){const i=a??e.length;return n.jsx("section",{className:Be("summary-strip",r&&"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 Cw=(e,t)=>`${e} / ${t}`;function fw({blocks:e,sectionTitles:t,logo:a,footer:r,pageLabel:s=Cw,pageWidth:l,pageHeight:i,margin:u,className:c,style:d}){const{t:h}=_e.useTranslation(),p=o.useRef(null),m=o.useRef(null),b=o.useRef(null),v=o.useRef(null),[C,f]=o.useState(null),[x,g]=o.useState(!1);o.useEffect(()=>{const M=p.current;if(!M)return;const P=()=>g(M.scrollWidth>M.clientWidth+1);if(P(),typeof ResizeObserver>"u")return;const T=new ResizeObserver(P);return T.observe(M),()=>T.disconnect()},[C]);const w=e.map(M=>`${M.id}\0${M.section??""}\0${M.group??""}`).join(""),y=C&&C.shape===w?C.pages:null,[k,_]=o.useState(0);o.useEffect(()=>{const M=v.current;if(!M||typeof ResizeObserver>"u")return;const P=new ResizeObserver(()=>_(M.offsetHeight));return P.observe(M),()=>P.disconnect()},[]);const[A,B]=o.useState(0);o.useEffect(()=>{const M=m.current;if(!M||typeof ResizeObserver>"u")return;let P=null;const T=typeof requestAnimationFrame=="function"?I=>requestAnimationFrame(I):I=>setTimeout(I,16),ee=typeof cancelAnimationFrame=="function"?cancelAnimationFrame:I=>clearTimeout(I),te=new ResizeObserver(()=>{P==null&&(P=T(()=>{P=null,B(I=>I+1)}))});return Array.from(M.children).forEach(I=>te.observe(I)),()=>{te.disconnect(),P!=null&&ee(P)}},[w]),o.useLayoutEffect(()=>{const M=m.current,P=v.current;if(!M||!P)return;const T=j=>j.getBoundingClientRect().height||j.offsetHeight,ee=new Map;b.current?.querySelectorAll("[data-chrome-section]").forEach(j=>{ee.set(j.dataset.chromeSection??"",T(j))});const te=j=>T(P)-(ee.get(j??"")??0),I=Array.from(M.children).map(j=>T(j)),Y=[];e.forEach((j,F)=>{const O=Y[Y.length-1],G=O?e[O[0]]:void 0;G&&j.group!=null&&G.group===j.group&&G.section===j.section?O.push(F):Y.push([F])});const R=[];let q=[],Z=0;const z=()=>{q.length&&R.push(q),q=[],Z=0};Y.forEach(j=>{const F=j.reduce((G,ie)=>G+I[ie],0),O=te(e[j[0]].section);q.length&&e[q[0]].section!==e[j[0]].section&&z(),F>O?j.forEach(G=>{q.length&&Z+I[G]>O+.01&&z(),q.push(G),Z+=I[G]}):(q.length&&Z+F>O+.01&&z(),j.forEach(G=>q.push(G)),Z+=F)}),z(),f(j=>j&&j.shape===w&&JSON.stringify(j.pages)===JSON.stringify(R)?j:{shape:w,pages:R})},[w,k,l,i,u,A]);const E=$o,D=E,N=r??n.jsxs(n.Fragment,{children:[n.jsx("img",{src:D,alt:"IHAB",className:"report-doc__logo"}),"\xA9 IHAB, Inc. All rights reserved."]}),$=(M,P,T)=>({header:n.jsxs("div",{className:"report-doc__header",children:[n.jsx("h2",{className:"report-doc__title h3b",children:T!=null&&t?.[T]||null}),a]}),footer:n.jsxs("div",{className:"report-doc__footer caption-1",children:[n.jsx("span",{className:"report-doc__footer-left",children:N}),n.jsx("span",{className:"report-doc__page-no",children:s(M,P)})]})}),L=Array.from(new Set(e.map(M=>M.section??""))),U={...l?{"--report-page-w":l}:null,...i?{"--report-page-h":i}:null,...u?{"--report-margin":u}:null,...d};return n.jsxs("div",{ref:p,className:Be("report-doc",c),style:U,tabIndex:x?0:void 0,role:x?"group":void 0,"aria-label":x?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:v,className:"report-doc__ruler"}),n.jsx("div",{ref:b,children:L.map(M=>{const P=$(1,1,M||void 0);return n.jsxs("div",{"data-chrome-section":M,children:[P.header,P.footer]},M)})}),n.jsx("div",{ref:m,className:"report-doc__measure-blocks",children:e.map(M=>n.jsx("div",{children:M.content},M.id))})]}),y&&n.jsx("div",{className:"report-doc__pages",children:y.map((M,P)=>{const{header:T,footer:ee}=$(P+1,y.length,e[M[0]].section);return n.jsxs("section",{className:"report-doc__page",children:[T,M.map(te=>n.jsx("div",{children:e[te].content},e[te].id)),ee]},P)})})]})}function bw({title:e,fields:t,columns:a=4,className:r,style:s}){return n.jsxs("div",{className:Be("report-info",r),style:{"--report-info-cols":String(a),...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 ia=new Map;let Ir=null;const gw=12;function yw(e){for(let t=e.parentElement;t&&t!==document.body;t=t.parentElement){const a=window.getComputedStyle(t);if(a.transform&&a.transform!=="none"||a.filter&&a.filter!=="none"||a.perspective&&a.perspective!=="none"||/paint|layout|strict|content/.test(a.contain||""))return t}return document}function Or(){const e=new Map;for(const t of ia.keys()){if(!t.isConnected)continue;const a=yw(t),r=e.get(a)??[];r.push(t),e.set(a,r)}for(const t of e.values()){t.sort((r,s)=>r.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1);let a=0;for(const r of t){a>0?r.style.setProperty("--update-alert-stack-offset",`${a}px`):r.style.removeProperty("--update-alert-stack-offset");const s=r.getBoundingClientRect().height;s>0&&(a+=s+gw)}}}function vw(e){return typeof window>"u"?()=>{}:(ia.set(e,(ia.get(e)??0)+1),ia.get(e)===1&&typeof ResizeObserver<"u"&&(Ir??(Ir=new ResizeObserver(()=>Or())),Ir.observe(e)),Or(),()=>{const t=(ia.get(e)??1)-1;if(t>0){ia.set(e,t),Or();return}ia.delete(e),Ir?.unobserve(e),e.style.removeProperty("--update-alert-stack-offset"),Or()})}function _w({title:e,message:t,actionLabel:a,onAction:r,icon:s,onClose:l,className:i=""}){const{t:u}=_e.useTranslation(),c=a??u("common.update","\uC5C5\uB370\uC774\uD2B8"),d=o.useRef(null),h=o.useRef(!1);return o.useLayoutEffect(()=>{const p=d.current,m=p?.parentElement?.closest(".update-alert-stack")??p,b=m?vw(m):null;return()=>{b?.(),h.current&&p&&p.contains(document.activeElement)&&mr(p)}},[]),n.jsxs("div",{ref:d,className:Be("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(Us,{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})]})]}),r&&n.jsx(fe,{htmlType:"button",size:32,variant:"main",shape:"pill",className:"update-alert__action",onClick:r,children:c})]})}function xw({title:e,titleLevel:t=3,description:a,topActions:r,children:s,footerLeft:l,footerRight:i,ariaLabel:u,onClick:c,draggable:d,onDragStart:h,onDragEnd:p,className:m}){const b=t?`h${t}`:"div",v=l!=null||i!=null,C=s!=null&&s!==!1,f=o.useCallback(x=>{c&&x.target===x.currentTarget&&(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),c())},[c]);return n.jsxs("div",{className:Be("training-card",c?"training-card--clickable":"",m),onClick:c,onKeyDown:c?f:void 0,role:c?"button":void 0,"aria-label":c?u??(typeof e=="string"?e:void 0):void 0,tabIndex:c?0:void 0,draggable:d,onDragStart:h,onDragEnd:p,children:[n.jsxs("div",{className:"training-card__header",children:[n.jsxs("div",{className:"training-card__title-row",children:[typeof e=="string"?n.jsx(b,{className:"training-card__title h4",children:e}):e,r!=null&&n.jsx("div",{className:"training-card__top-actions",onClick:x=>x.stopPropagation(),children:r})]}),a!=null?typeof a=="string"?n.jsx("p",{className:"training-card__description body-3",children:a}):a:n.jsx("p",{className:"training-card__description body-3","aria-hidden":"true",children:" "})]}),C&&n.jsx("div",{className:"training-card__body",children:s}),v&&n.jsxs("div",{className:"training-card__footer",children:[l!=null&&n.jsx("div",{className:"training-card__footer-left",children:l}),i!=null&&n.jsx("div",{className:"training-card__meta",children:i})]})]})}function ww({title:e,titleLevel:t=3,count:a,collapsed:r=!1,onToggle:s,beforeSort:l,sort:i,actions:u,empty:c=!1,emptyContent:d,dragOver:h=!1,onDragOver:p,onDragLeave:m,onDrop:b,children:v,className:C}){const{t:f}=_e.useTranslation(),x=o.useId(),g=t?`h${t}`:"span",w=s!=null,y=Be("training-card-group",h&&"training-card-group--dragover",r&&"training-card-group--collapsed",w&&"training-card-group--collapsible",C);return n.jsxs("div",{className:y,onDragOver:p,onDragLeave:m,onDrop:b,role:typeof e=="string"&&e?"group":void 0,"aria-labelledby":typeof e=="string"&&e?x:void 0,children:[n.jsxs("header",{className:"training-card-group__header",children:[w&&n.jsx(fe,{htmlType:"button",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:r?"chevron-right":"chevron-down",ariaLabel:typeof e=="string"&&e?r?f("common.expandFor",{name:e}):f("common.collapseFor",{name:e}):r?f("common.expand","\uD3BC\uCE58\uAE30"):f("common.collapse","\uC811\uAE30"),className:"training-card-group__chevron","aria-expanded":!r,onClick:s}),typeof e=="string"?n.jsx(g,{id:x,className:"training-card-group__title h5b",children:e}):e,a!==void 0&&n.jsx("span",{className:"training-card-group__count body-3b",children:a}),(l!=null||i||u!=null)&&n.jsxs("span",{className:"training-card-group__actions",onClick:k=>k.stopPropagation(),children:[l,i&&n.jsx(_n,{size:40,options:i.options,value:i.value,placeholder:i.placeholder,onChange:i.onChange,ariaLabel:typeof e=="string"&&e?f("common.sortFor",{name:e}):void 0}),u]})]}),!r&&(c?n.jsx("div",{className:"training-card-group__empty body-3",children:d}):n.jsx("div",{className:"training-card-group__grid",children:v}))]})}const Bw="speechear:saved_word_tables";function kw(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 Aw(){try{const e=localStorage.getItem(Bw);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(kw):[]}catch{return[]}}function xd(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 $s(e){return e.map(t=>t.homonum!=null?`${t.word}#${t.homonum}`:t.word).join("|")}function Nw(e){const t=new Set;return e.map(a=>{let r=a.id;for(let s=2;t.has(r);s++)r=`${a.id}~${s}`;return t.add(r),r===a.id?a:{...a,id:r}})}function Ew({title:e,titleIcon:t,disc:a,filterTitle:r,filterCollapsible:s,filterDefaultCollapsed:l,filterCollapsed:i,onFilterCollapsedChange:u,filterHeaderSummary:c,brand:d,code:h,baseItem:p,baseContentTypes:m,cellCapacity:b,maxItemsPerPage:v,items:C,onSaveComplete:f,onLoad:x,onRemoveItem:g,onCopyItem:w,onReplaceItem:y,onPickForm:k,onReset:_,resetLabel:A,saveButtonLabel:B,secondarySaveButtonLabel:E,onReorder:D,showCellCount:N,onAddItem:$,className:L,renderSavePopup:U,renderWordSearch:M,hideControls:P,saveOnly:T,tableName:ee,nameValue:te,onNameChange:I,descriptionValue:Y,onDescriptionChange:R,namePlaceholder:q,descriptionPlaceholder:Z,existingNames:z,editingName:j,onCancel:F,initialItemsPerPage:O,renderCellAction:G,actionsLeftExtra:ie}){const{t:K}=_e.useTranslation(),pe=A??K("wordPrint.clearAllSelection","\uBAA8\uB450 \uC120\uD0DD \uD574\uC81C"),X=C===void 0,H=!!I,[ne,V]=o.useState([]),W=(te??"").trim(),oe=W||(q??"").trim(),xe=(Y??"").trim()||(Z??"").trim(),be=(z??[]).map(he=>he.trim().toLowerCase()),me=[j?.trim().toLowerCase(),...ne].filter(he=>!!he),ke=[...be];for(const he of me){const Pe=ke.indexOf(he);Pe!==-1&&ke.splice(Pe,1)}const Le=W!==""&&ke.includes(W.toLowerCase()),[Me,le]=o.useState(Array(4).fill(null)),[ve,$e]=o.useState(4),[Ae,Ie]=o.useState(null),ze=Me.slice(0,ve),dt=!!d?.show,[st,et]=o.useState(!0),[gt,Se]=o.useState(!0),Ge=d&&{...d,top:st,bottom:gt},[we,qe]=o.useState("landscape"),[Ye,mt]=o.useState([...bc]),[wt,yt]=o.useState("show"),[Et,at]=o.useState(!0),[rt,Dt]=o.useState(!0),Bt=o.useRef(null),Lt=o.useRef([]),[It,xt]=o.useState(O==="all"?Number.POSITIVE_INFINITY:O??8),[lt,Ct]=o.useState("right"),[it,_t]=o.useState(!1),[ut,St]=o.useState(!1),{toastMessage:ue,toastType:Te,showWarning:Ne,clearToast:tt}=Gi("warning"),pt=o.useCallback(()=>Ie(null),[Ie]);$&&!X&&!N&&!b&&At("word-table-block-add-without-cell-count",'[WordTableBlock] \uD45C\uC2DC \uBAA8\uB4DC\uC5D0\uC11C onAddItem \uC740 cellCapacity \uB098 showCellCount \uC640 \uD568\uAED8 \uC918\uC57C "\uCD94\uAC00\uD558\uAE30" \uCE78\uC774 \uC0DD\uAE34\uB2E4.'),p&&X&&At("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[jt,je]=o.useState(()=>Math.max(C?.length??1,1)),nt=Math.max(b??0,C?.length??0,1),ae=X?ve:N?Math.max(jt,C?.length??1,1):nt,{width:ye,height:He}=aa[we],Ke=!X&&!N,vt=Math.max(1,Math.min(nt,v??nt)),Ue=Math.min(It,vt),ht=Ke?Ue:ae,cn=Math.ceil((C?.length??0)/Math.max(1,ht)),dn=(C?.length??0)<nt?Math.floor((C?.length??0)/Math.max(1,ht))+1:0,zt=Ke?Math.max(1,cn,dn):0,qt=Ke?Array.from({length:zt},(he,Pe)=>(C??[]).slice(Pe*ht,(Pe+1)*ht)):null,Ht=!!qt&&qt.length>1,Nt=X?ze.some(he=>he!==null&&he.length>1):(C??[]).some(he=>(he.words??[]).length>1),An=ee?.trim()||`${Yl(Fa())} ${Nt?K("wordTable.printFileNamePair","\uB300\uB9BD\uC30D\uD45C"):K("wordTable.printFileNameSingle","\uB2E8\uC5B4\uD45C")}`,an=o.useCallback(()=>Ht?Lt.current.filter(he=>he!==null):Bt.current?[Bt.current]:[],[Ht]),{print:$t,openNewWindow:Pt,downloadHtml:Ut}=hs({getElements:an,paperW:ye,paperH:He,fileName:An,onPopupBlocked:()=>{Ne(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."))}}),Jt=he=>{$e(he),le(Pe=>Pe.length>=he?Pe:[...Pe,...Array(he-Pe.length).fill(null)]),Ie(null)},gn=he=>{le(Pe=>{const Qe=[...Pe];return Qe[he]=null,Qe}),Ae===he&&Ie(null)},Zt=he=>{if(Ae===null)return;const Pe=Ae;le(kt=>{const Tt=[...kt];return Tt[Pe]=he.length>0?he:null,Tt});const Qe=ze.findIndex((kt,Tt)=>Tt>Pe&&kt===null);Ie(Qe!==-1?Qe:null)},xn=X?ze.some(he=>he?.some(Pe=>!!Pe.colloquialPronunciation)):(C??[]).some(he=>(he.words??[]).some(Pe=>!!Pe.colloquialLabel)),pn=!X&&gc([...p?[p]:[],...C??[]]),Qt=o.useMemo(()=>pa()?X?Me.slice(0,ve).flatMap(he=>(he??[]).map(Pe=>[Pe.word,Pe.homonum])):(he=>he.flatMap(Pe=>(Pe.words??[]).map(Qe=>[Qe.label,Qe.homonum])))([...p?[p]:[],...C??[]]):[],[X,Me,ve,C,p]),[Gt,Nn]=o.useState(!1);o.useEffect(()=>{if(Qt.length===0)return;let he=!1;return Promise.all(Qt.map(([Pe,Qe])=>Ml(Pe,Qe))).then(Pe=>{he||Nn(Pe.some(Boolean))},()=>{}),()=>{he=!0}},[Qt]);const de=Qt.length>0&&Gt,Ee=o.useMemo(()=>[...X||N?[{label:K("wordTable.filter.columns","\uCE78 \uC218"),items:U4.map(he=>({value:`${he}\uCE78`,displayLabel:K("wordTable.filter.column",{count:he})})),display:"segmented"}]:[],...Ke&&(C?.length??0)>0?[Ac(K,{hasPairs:Nt,itemCount:nt,max:v})]:[],...Ht?[K4(K)]:[]],[K,X,N,Ke,C?.length,Nt,nt,v,Ht]),Fe={...X||N?{[K("wordTable.filter.columns","\uCE78 \uC218")]:`${ae}\uCE78`}:{},...Ke&&(C?.length??0)>0?{[K(Nt?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")]:`${Ue}\uAC1C`}:{},...Ht?{[K("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")]:lt}:{}},Ze=(he,Pe)=>{Pe===K("wordTable.filter.columns","\uCE78 \uC218")?X?Jt(parseInt(he)):je(parseInt(he)):Pe===K(Nt?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")?xt(Nc(parseInt(he),nt)):Pe===K("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")&&Ct(Ec(he))},Oe=X?Nw(ze.filter(he=>he!==null&&he.length>0).map(he=>({id:$s(he),words:he.map(xd)}))):C??[],J=()=>{X&&le(he=>he.length>ve?he.slice(0,ve):he)},ce=(he=!1)=>{if(St(he),H&&f){const Pe=oe.trim().toLowerCase();Pe&&V(Qe=>Qe.includes(Pe)?Qe:[...Qe,Pe]),f(oe,Oe,xe||void 0,he),J();return}if(T&&f){f("",Oe,void 0,he),J();return}if(f){_t(!0);return}Ut()},[De,Ve]=o.useState(!1),[Xe,Je]=o.useState(""),ct=Xe.trim(),ft=ct!==""&&be.includes(ct.toLowerCase()),ge=()=>{Je(oe?K("wordTable.save.copyName",{name:oe,defaultValue:"{{name}} (\uBCF5\uC0AC)"}):""),Ve(!0)},S=()=>{!ct||ft||!f||(f(ct,Oe,xe||void 0,!0),J(),Ve(!1))},Q=Oe.length===0,Ce=Q||H&&(oe===""||Le),Re=()=>{if(Q){Ne(K("wordTable.emptyItems","\uB2E8\uC5B4\uB97C 1\uAC1C \uC774\uC0C1 \uCD94\uAC00\uD574\uC8FC\uC138\uC694."));return}if(H&&oe===""){Ne(K("wordTable.save.nameRequired","\uD45C \uC774\uB984\uC744 \uC785\uB825\uD574 \uC8FC\uC138\uC694."));return}H&&Le&&Ne(K("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."))},We=n.jsx(xa,{items:Oe,orientation:we,contentTypes:Ye,baseItem:p,baseContentTypes:m,cutLine:wt,showOutline:Et,showDivLine:rt,count:ae});return n.jsxs(n.Fragment,{children:[n.jsxs(_a,{type:"page",icon:t,title:e,disc:a,className:Be("word-table-block",L),children:[De&&n.jsx(Pn,{size:"small",title:E??K("wordTable.saveAsNewButton","\uB2E4\uB978 \uC774\uB984\uC73C\uB85C \uC800\uC7A5"),onClose:()=>Ve(!1),footer:({closeWithAnimation:he})=>n.jsxs(n.Fragment,{children:[n.jsx(fe,{htmlType:"button",size:48,type:"bar",label:K("common.cancel","\uCDE8\uC18C"),onClick:he}),n.jsx(fe,{htmlType:"button",size:48,type:"bar",variant:"main",label:K("common.save","\uC800\uC7A5"),disabled:!ct||ft,onClick:S})]}),children:n.jsx(Kn,{label:K("wordTable.save.nameLabel","\uC774\uB984"),value:Xe,onChange:Je,placeholder:K("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:S,error:ft?K("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."):void 0})}),it&&f&&U?.({defaultName:typeof e=="string"?e:K("wordTable.defaultName","\uB2E8\uC5B4 \uD45C"),preview:We,previewW:ye,previewH:He,items:Oe,existingNames:Aw().map(he=>he.name),saveAsNew:ut,onSave:(he,Pe)=>{f(he,Oe,Pe,ut),J(),_t(!1)},onCancel:()=>_t(!1)}),(X||$)&&Ae!==null&&M?.({cellIndex:Ae,onConfirm:X?Zt:he=>{if($){const Pe=he[0];if(Pe){const Qe=new Set((C??[]).map(Tt=>Tt.id));let kt=$s([Pe]);for(let Tt=2;Qe.has(kt);Tt++)kt=`${$s([Pe])}~${Tt}`;$({id:kt,words:[xd(Pe)]})}}Ie(null)},onClose:pt}),!P&&n.jsx(us,{title:r,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c,hasImage:de,hasColloquial:xn,hasCaption:pn,contentTypes:Ye,orientation:we,showOutline:Et,cutLine:wt,showDivLine:rt,setters:{setContentTypes:mt,setOrientation:qe,setShowOutline:at,setCutLine:yt,setShowDivLine:Dt,setShowTopInfo:et,setShowBottomInfo:Se},showCutLine:(Ke?ht:ae)>1,showDivLine2:Nt,middleSections:Ee,extraSelected:Fe,onExtraSelect:Ze,showPaperBands:dt,showTopInfo:st,showBottomInfo:gt}),Ht&&qt?n.jsx("div",{className:"word-table-block__pages",children:qt.map((he,Pe)=>n.jsx(xa,{orientation:we,contentTypes:Ye,cutLine:wt,showOutline:Et,showDivLine:rt,count:ht,items:he,baseItem:p,baseContentTypes:m,onRemoveItem:g,onCopyItem:w,onReplaceItem:y,onPickForm:k,onReorder:D&&((Qe,kt)=>D(Qe+Pe*ht,kt+Pe*ht)),indexOffset:Pe*ht,totalCount:C?.length??0,renderCellAction:G&&((Qe,kt)=>G(Qe+Pe*ht,kt)),showFillerAdd:!!$,onActivateCell:$?(Qe=>Ie(Qe+Pe*ht)):void 0,addableCount:Math.max(0,Math.min(ht,nt-Pe*ht)),brand:Ge,code:h,contentRef:Qe=>{Lt.current[Pe]=Qe},pageNumber:{current:Pe+1,total:qt.length},pageNumberPosition:lt},Pe))}):n.jsx(xa,{orientation:we,contentTypes:Ye,cutLine:wt,showOutline:Et,showDivLine:rt,count:ae,items:X?void 0:C??[],baseItem:X?void 0:p,baseContentTypes:m,editCells:X?ze:void 0,activeCell:Ae,onActivateCell:X||$?Ie:void 0,onRemoveCell:X?gn:void 0,onRemoveItem:X?void 0:g,onCopyItem:X?void 0:w,onReplaceItem:X?void 0:y,onPickForm:X?void 0:k,onReorder:X?void 0:D,renderCellAction:X?void 0:G,brand:Ge,code:h,showFillerAdd:!!$,contentRef:Bt}),!P&&!T&&ie!=null&&n.jsx("div",{className:"word-table-block__table-actions",children:ie}),H&&!P&&n.jsxs(Qa,{size:"medium",labelWidth:64,useBorder:!1,useRowBorder:!1,className:"word-table-block__meta",children:[n.jsx(un,{variant:"custom",label:K("wordTable.save.nameLabel","\uC774\uB984"),required:!0,align:"vertical",useFullWidth:!0,children:n.jsx(Kn,{required:!0,value:te??"",onChange:I,placeholder:q?q+K("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)"):K("wordTable.save.placeholder","\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694."),ariaLabel:K("wordTable.save.nameLabel","\uC774\uB984"),maxLength:40,size:48,fullWidth:!0,error:Le?K("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."):void 0,onKeyDown:he=>{(he.key==="Tab"&&!he.shiftKey||he.key===" ")&&!(te??"").trim()&&(q??"").trim()&&(he.preventDefault(),I?.(q??""))}})}),n.jsx(un,{variant:"custom",label:K("wordTable.save.descriptionLabel","\uC124\uBA85"),align:"vertical",useFullWidth:!0,children:n.jsx(Kn,{value:Y??"",onChange:R,placeholder:Z?Z+K("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)"):K("wordTable.save.descriptionPlaceholder","\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC124\uBA85\uC744 \uC785\uB825\uD558\uC138\uC694."),ariaLabel:K("wordTable.save.descriptionLabel","\uC124\uBA85"),maxLength:200,multiline:!0,rows:2,fullWidth:!0,onKeyDown:he=>{(he.key==="Tab"&&!he.shiftKey||he.key===" ")&&!(Y??"").trim()&&(Z??"").trim()&&(he.preventDefault(),R?.(Z??""))}})})]})]}),!P&&n.jsxs("div",{className:"word-table-block__actions",children:[n.jsxs("div",{className:"word-table-block__actions-left",children:[!T&&x&&n.jsx(fe,{htmlType:"button",size:40,type:"bar",label:K("wordTable.load","\uBD88\uB7EC\uC624\uAE30"),onClick:x}),!T&&_&&n.jsx(fe,{htmlType:"button",size:40,type:"bar",label:pe,onClick:_}),!T&&n.jsx(fe,{htmlType:"button",size:40,type:"bar",label:K("wordTable.openNewWindow","\uC0C8 \uCC3D\uC73C\uB85C \uBCF4\uAE30"),onClick:Pt})]}),n.jsxs("div",{className:"word-table-block__actions-right",children:[F&&n.jsx(fe,{htmlType:"button",size:"56",type:"bar",label:K("common.cancel","\uCDE8\uC18C"),onClick:F}),!T&&n.jsx(fe,{htmlType:"button",size:"56",type:"bar",label:K("wordTable.print","\uC778\uC1C4\uD558\uAE30"),onClick:$t}),E&&n.jsx(fe,{htmlType:"button",size:"56",type:"bar",label:E,onClick:()=>H?ge():ce(!0),disabled:Q,onDisabledClick:()=>{Ne(K("wordTable.emptyItems","\uB2E8\uC5B4\uB97C 1\uAC1C \uC774\uC0C1 \uCD94\uAC00\uD574\uC8FC\uC138\uC694."))}}),n.jsx(fe,{htmlType:"button",size:"56",type:"bar",variant:"main",label:B??K("wordTable.saveButton","\uC800\uC7A5\uD558\uAE30"),onClick:()=>ce(!1),disabled:Ce,onDisabledClick:Re})]})]}),n.jsx(va,{message:ue,type:Te,onClose:tt})]})}const Dw=8;function wd({items:e,className:t}){const{t:a}=_e.useTranslation(),r=o.useRef(null),[s,l]=o.useState(null),i=o.useCallback(()=>l(r.current?.getBoundingClientRect()??null),[]),u=o.useCallback(()=>l(null),[]),c=fr(!!s,w=>{w?i():u()},r),d=e.length,h=d<=3?1:2,p=Dw,m=d>p,b=e.slice(0,m?p-1:p),v=d-b.length,C=e.slice(b.length).map(w=>w.words?.length?w.words.map(y=>y.label).join(" / "):w.id),f=Math.min(5,Math.ceil(C.length/25)),x=Math.ceil(Math.min(d,p)/h)||1,g=h*x;return n.jsx("div",{className:Be("word-table-thumb",t),style:{gridTemplateColumns:`repeat(${h}, 1fr)`},children:Array.from({length:g},(w,y)=>{if(m&&y===p-1)return n.jsxs("div",{ref:r,className:"word-table-thumb__cell word-table-thumb__cell--more",tabIndex:0,"aria-label":a("wordTable.thumbMoreAria",{count:v,words:C.join(", "),defaultValue:"\uADF8 \uBC16 {{count}}\uCE78: {{words}}"}),onPointerEnter:_=>{Un(_)||i()},onPointerLeave:_=>{Un(_)||u()},onFocus:()=>{ea()||i()},onBlur:u,onClick:_=>{_.stopPropagation(),c.touchPress()},children:[n.jsx("span",{className:"word-table-thumb__more body-3",children:a("wordTable.thumbMore",{count:v,defaultValue:"+{{count}}"})}),s&&C.length>0&&n.jsx(qn,{anchorRect:s,items:C,showIndex:!1,closeOnOutsideClick:!1,columns:f})]},y);const k=b[y];return k?n.jsx("div",{className:"word-table-thumb__cell",children:(k.words?.length?k.words:[{label:k.id}]).map((_,A)=>n.jsxs(o.Fragment,{children:[A>0&&n.jsx("span",{className:"word-table-thumb__divider"}),n.jsx("span",{className:"word-table-thumb__word body-3",children:_.label})]},A))},y):n.jsx("div",{className:"word-table-thumb__cell word-table-thumb__cell--empty"},y)})})}function Sw({items:e,name:t,description:a,createdAt:r,code:s,published:l,publishedLabel:i,shared:u,sharedLabel:c,isNew:d,publisherName:h,publishedAt:p,likeCount:m,downloadCount:b,onPublisherClick:v,selected:C,onClick:f,onMore:x,titleNode:g,className:w}){const{t:y}=_e.useTranslation(),k=g!=null,_=h!=null||p!=null||m!=null||b!=null,A=B=>{B.target===B.currentTarget&&!k&&(B.key==="Enter"||B.key===" ")&&(B.preventDefault(),f?.())};return n.jsxs("div",{className:Be("word-table-button",C?"word-table-button--selected":"",_?"":"word-table-button--no-footer",w),role:"button",tabIndex:0,"aria-label":s?`${t} (${s})`:t,onClick:k?void 0:f,onKeyDown:A,children:[d&&n.jsx("span",{className:"word-table-button__new-dot","aria-label":y("myWordTable.newBadge","\uC0C8\uB85C \uB9CC\uB4E0 \uD45C")}),n.jsx(wd,{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:[g??n.jsx("div",{className:"word-table-button__title h4",children:t}),a&&n.jsx("div",{className:"word-table-button__desc body-3",children:a})]}),x&&!k&&n.jsx(fe,{htmlType:"button",className:"word-table-button__more",size:32,type:"dot",variant:"transparent-gray",useBorder:!1,icon:"ellipsis",ariaLabel:y("common.moreFor",{name:t}),onClick:B=>{B.stopPropagation(),x(B)}})]}),(s||r||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:r?Kl(r,y):""})}),n.jsxs("span",{className:"word-table-button__meta-right",children:[(l||u)&&n.jsxs("span",{className:"word-table-button__badges",children:[l&&n.jsx(ln,{className:"word-table-button__badge",size:"small",variant:"main",fill:"soft",iconLeft:"book-marked",label:i??y("myWordTable.publishedBadge","\uBC1C\uD589\uB428")}),u&&n.jsx(ln,{className:"word-table-button__badge",size:"small",fill:"soft",iconLeft:"link",label:c??y("myWordTable.sharedBadge","\uACF5\uC720 \uC911")})]}),s&&n.jsx("span",{className:"word-table-button__code caption-1",children:s})]})]}),_&&n.jsxs("div",{className:"word-table-button__footer",children:[n.jsxs("span",{className:"word-table-button__store-by",children:[h&&(v?n.jsx("button",{className:"training-card__publisher body-4",type:"button","aria-label":y("wordTable.publisherFilter",{name:h,defaultValue:"{{name}} \uAC8C\uC2DC\uD55C \uAC83\uB9CC \uBCF4\uAE30"}),onClick:B=>{B.stopPropagation(),v()},children:h}):n.jsx("span",{className:"training-card__publisher training-card__publisher--static body-4",children:h})),p&&n.jsx("span",{className:"training-card__date body-4",children:Kl(p,y)})]}),n.jsxs("span",{className:"word-table-button__store-stats",children:[m!=null&&n.jsx(ln,{size:"small",fill:"soft",variant:"like",iconLeft:"heart",label:String(m),"aria-label":y("common.likeCount",{count:m,defaultValue:`\uC88B\uC544\uC694 ${m}`})}),b!=null&&n.jsx(ln,{size:"small",fill:"soft",variant:"main",iconLeft:"download",label:String(b),"aria-label":y("common.downloadCount",{count:b,defaultValue:`\uAC00\uC838\uAC04 \uC218 ${b}`})})]})]})]})}/**
1044
1044
  * @license lucide-react v1.38.0 - ISC
1045
1045
  *
1046
1046
  * This source code is licensed under the ISC license.
@@ -1050,4 +1050,4 @@ ${v.badge}`:v.badge:void 0;if(x&&c(v.code))return null;if(!v.badge&&!h)return p(
1050
1050
  *
1051
1051
  * This source code is licensed under the ISC license.
1052
1052
  * See the LICENSE file in the root directory of this source tree.
1053
- */const Mw=[["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"}]],Lw=re("circle-x",Mw);function $w(e){return{idle:0,"word-download":1,"image-list":2,"image-match":2,"pair-build":3,done:4}[e]??0}function Rs({icon:e,label:t,state:a,pct:r,subText:s}){const{t:l}=_e.useTranslation(),i=a==="done",u=a==="pending",c=a==="error",d=i?100:r??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(Zs,{size:22,color:"white",strokeWidth:2.5}):c?n.jsx(Lw,{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(ln,{variant:"sub",fill:"soft",size:"small",label:l("common.done","\uC644\uB8CC")}):c?n.jsx(ln,{variant:"danger",fill:"soft",size:"small",label:l("common.failed","\uC2E4\uD328")}):(s||r!==void 0)&&n.jsxs("span",{className:"wdup-phase-card__sub body-3",children:[s,s&&r!==void 0?` \xB7 ${r}%`:r!==void 0?`${r}%`:""]})]}),!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":""}${a==="active"&&r===void 0?" wdup-bar__fill--indeterminate":""}`,style:{width:r!==void 0||i||c?`${c?100:d}%`:void 0}})})]})]})}function Rw({title:e,progress:t,onDone:a,onRetry:r,onClose:s,inline:l}){const{t:i}=_e.useTranslation(),{phase:u,error:c,wordCount:d,imagePage:h,imageDone:p,imageTotal:m,pairPercent:g}=t,y=$w(u),C=u==="done",f=!!c;function _(A){return f&&y===A?"error":y>A?"done":y===A?"active":"pending"}const b=_(1),w=_(2),v=_(3),k=u==="image-match"&&m?Math.round((p??0)/m*100):void 0,x=o.useMemo(()=>{if(w!=="done"){if(u==="image-list")return i("wordData.checkingPage",{page:h??1});if(u==="image-match"&&m)return i("wordData.imageCount",{done:Co(p),total:Co(m)})}},[w,u,h,m,p,i]);return n.jsx(Pn,{inline:l,className:"popup--word-data-update",title:e,footer:f&&r?n.jsx(fe,{htmlType:"button",size:56,variant:"main",onClick:r,children:i("common.retry","\uB2E4\uC2DC \uC2DC\uB3C4")}):f?n.jsx(fe,{htmlType:"button",size:56,variant:"main",onClick:s??a,children:i("common.close","\uB2EB\uAE30")}):n.jsx(fe,{htmlType:"button",size:56,variant:"main",disabled:!C,onClick:a,children:i("common.done","\uC644\uB8CC")}),children:n.jsxs("div",{className:"wdup-cards",children:[n.jsx(Rs,{icon:n.jsx(qs,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:i("wordData.phaseWordDownload","\uB2E8\uC5B4 \uB370\uC774\uD130 \uB2E4\uC6B4\uB85C\uB4DC"),state:b,subText:b==="active"?i("wordData.downloadingCount",{n:Co(d),count:d}):void 0}),n.jsx(Rs,{icon:n.jsx(Tw,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:i("wordData.phaseImageCheck","\uC774\uBBF8\uC9C0 \uD655\uC778"),state:w,pct:k,subText:x}),n.jsx(Rs,{icon:n.jsx(Ks,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:i("wordData.phasePairAnalysis","\uB2E8\uC5B4\uC30D \uBD84\uC11D"),state:v,pct:v==="active"?g??0:void 0,subText:void 0})]})})}function Pw({enabled:e=!1,renderResultPopup:t}={}){const{t:a}=_e.useTranslation(),[r,s]=o.useState(null),[l,i]=o.useState(null),u=g=>{let y=null;g==="noise"?y={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}]}:g==="short"?y={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}]}:g==="long"?y={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}]}:g==="order"&&(y={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(y),s(g)},c=o.useCallback(()=>{s(null),i(null)},[]),d=o.useCallback(()=>u("noise"),[]),h=o.useCallback(()=>u("short"),[]),p=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:d,children:a("debug.showResult",{type:"Noise",defaultValue:"{{type}} \uACB0\uACFC\uBCF4\uAE30"})}),n.jsx("button",{type:"button",className:"debug-button",onClick:h,children:a("debug.showResult",{type:"ShortStory",defaultValue:"{{type}} \uACB0\uACFC\uBCF4\uAE30"})}),n.jsx("button",{type:"button",className:"debug-button",onClick:p,children:a("debug.showResult",{type:"LongStory",defaultValue:"{{type}} \uACB0\uACFC\uBCF4\uAE30"})}),n.jsx("button",{type:"button",className:"debug-button",onClick:m,children:a("debug.showResult",{type:"Order",defaultValue:"{{type}} \uACB0\uACFC\uBCF4\uAE30"})})]}),r&&l?t?.({score:l.score,contextsLength:l.contextsLength,results:l.results,onReplay:c,onClose:c}):null]}):null}exports.Accordion=n2,exports.ActionCard=my,exports.Alert=q2,exports.AppHeader=i2,exports.AudioMeter=Xo,exports.AudioPlayer=xs,exports.Avatar=J2,exports.Badge=ln,exports.BarChart=Zv,exports.BarChartControls=zu,exports.Board=fv,exports.BottomNav=Xi,exports.BrandIdentity=nu,exports.BrandLogo=Hv,exports.Breadcrumb=tv,exports.BulkBar=Iv,exports.Button=fe,exports.CONSENT_KINDS=$u,exports.CORE_VERSION=ry,exports.Calendar=v4,exports.CardStep=pd,exports.ChartLegend=Ho,exports.ChartSection=Vo,exports.ChartTotal=tr,exports.Checkbox=Oo,exports.ChoiceChips=E_,exports.CircleBadge=Dn,exports.CodeBox=Fv,exports.ColorPicker=sv,exports.CompanyMeta=xv,exports.ConfirmPopup=yd,exports.ConfirmStep=ud,exports.ConfirmWithTextStep=cd,exports.ConsentRecordPopup=Mv,exports.ContrastFilterPanel=aw,exports.CoreScope=Cy,exports.CountTile=pv,exports.CouponInputPopup=sw,exports.DEFAULT_NOISE_SETTINGS=oa,exports.DatePicker=Lu,exports.DebugResultLauncher=Pw,exports.DescriptionTooltip=qn,exports.DeviceSideTable=b4,exports.Dialog=Cv,exports.Divider=W2,exports.Dropdown=_n,exports.EffectPartyPopper=Ms,exports.EffectPartyPopperHost=uw,exports.EmptyState=py,exports.ErrorState=hy,exports.FILTER_ALL_VALUE=kn,exports.FileUpload=ev,exports.FilterPanel=In,exports.FilterSectionInfo=Ga,exports.Footer=D_,exports.GameIntro=Qv,exports.Header=au,exports.Icon=ot,exports.IconGridMenu=N_,exports.IconRenderer=ot,exports.InfoTooltip=Mn,exports.ItemActions=zv,exports.LEVEL_MAX=Ba,exports.LINE_CHART_HOVER_DELAY_MS=Wu,exports.LandingBottomSticky=j_,exports.LandingHeader=S_,exports.LineChart=Jv,exports.ListPopup=rw,exports.ListenStep=id,exports.Loader=Ca,exports.MARKS=Ar,exports.MARK_ICON=oc,exports.MARK_VARIANT=sc,exports.MediaQueryOverrideContext=si,exports.MenuTooltip=Va,exports.NOISE_RATIO_MAX=ar,exports.NOISE_RATIO_STEP=$c,exports.NoisePlayerContext=gs,exports.NoiseSettingsTooltip=ed,exports.NoticeBox=by,exports.NotifyTextPreview=Wv,exports.OrderListStep=dd,exports.PASS_CARD_BG_VARS=na,exports.POS_LABEL=uc,exports.PROMO_BANNER_BG_COMPONENTS=Ii,exports.PROMO_BANNER_BG_OPTIONS=Ny,exports.PROMO_BANNER_BG_VARS=Oa,exports.Page=Lr,exports.PageTitle=cw,exports.Pagination=zo,exports.Panel=Qa,exports.PanelGrid=Nv,exports.PanelRow=un,exports.PanelRowDevice=Av,exports.PassCard=hu,exports.PassCardBg=F2,exports.PassCardBgIHAB=I2,exports.PassCardBgLeftColorGrid=O2,exports.PassCardBgTwoCircle=iu,exports.PaymentPlan=P2,exports.PersonCard=bv,exports.PhonemeFilterPanel=nw,exports.PhonemeSelectBlock=ew,exports.Popup=Pn,exports.ProgressBar=s4,exports.ProgressIndicator=Xu,exports.PromoBanner=Qy,exports.PromoBannerBgDark=Bi,exports.PromoBannerBgDeep=gi,exports.PromoBannerBgDiagonal=Ei,exports.PromoBannerBgDots=Si,exports.PromoBannerBgInstagram=Fi,exports.PromoBannerBgMain=pi,exports.PromoBannerBgNaver=Ri,exports.PromoBannerBgOutline=Ti,exports.PromoBannerBgRadial=Ai,exports.PromoBannerBgSoft=mi,exports.PromoBannerBgSoftSub=vi,exports.PromoBannerBgSub=fi,exports.PromoBannerBgSuccess=Li,exports.PromoBannerBgWarm=xi,exports.PublicationCard=yv,exports.Radio=bu,exports.RadioGroup=H2,exports.Rating=av,exports.ReportDocument=fw,exports.ReportInfoPanel=bw,exports.RingChart=t4,exports.SENTENCE_TRAINING_TYPES=ms,exports.SearchSummary=K2,exports.Section=_a,exports.SectionHeadFloat=Pu,exports.SectionHeader=_v,exports.SegmentedControl=vn,exports.ShortcutBadge=fu,exports.SideNav=tu,exports.Slider=Gu,exports.SoundCompass=z2,exports.SplashLogo=vv,exports.StatChart=n4,exports.SummaryStrip=mw,exports.TRAINING_TOOLTIP_HOVER_DELAY_MS=yu,exports.Table=Qo,exports.TableFilterPanel=us,exports.Tabs=Y2,exports.TextBoxTooltip=Tr,exports.TextField=Kn,exports.Timeline=gv,exports.Toast=va,exports.Toggle=Bu,exports.Toolbar=Wo,exports.Tooltip=Bn,exports.TooltipInfo=Mn,exports.TooltipTextBox=Tr,exports.TopBanner=e2,exports.TrainingBlock=x4,exports.TrainingBlockButton=Ro,exports.TrainingBlockGrid=B4,exports.TrainingCard=xw,exports.TrainingCardGroup=ww,exports.TrainingPagePopup=Yn,exports.TrainingPagePopupBottom=td,exports.TrainingPagePopupTitle=nd,exports.TrainingResultPopup=fd,exports.TrainingStep=sa,exports.TrainingStepAudioPlayer=xs,exports.TrainingStepBullet=Kc,exports.TrainingStepCard=Jc,exports.TrainingStepConfirm=Bs,exports.TrainingStepConfirmWithText=ks,exports.TrainingStepListen=As,exports.TrainingStepOrderList=Ns,exports.TrainingStepTextBox=Xc,exports.TrainingStepTitle=Zc,exports.TrainingTooltip=vu,exports.TrainingWordCard=ns,exports.UpdateAlert=_w,exports.WAVE_A_MAX=q_,exports.WAVE_H1_PX=vs,exports.WAVE_HMAX_PX=V_,exports.WORD_LABEL_I18N_KEYS=L4,exports.WORD_TABLE_PAPER=aa,exports.WORD_TYPE_LABEL=cc,exports.WordDataProvider=hw,exports.WordDataUpdatePopup=Rw,exports.WordImageTooltip=gd,exports.WordSearchFilterPanel=tw,exports.WordSearchResultBlock=Jx,exports.WordTable=xa,exports.WordTableBlock=Ew,exports.WordTableButton=Sw,exports.WordTablePopup=Q4,exports.WordTableThumbnail=wd,exports.buildMonthChartData=qv,exports.cellKey=l_,exports.cellLabel=s_,exports.cellsForLabels=y_,exports.clearPassCardBgTheme=Rn,exports.clearPromoBannerBgTheme=nn,exports.closeTrainingPopup=xx,exports.companyTypeLabel=dw,exports.createTrainingScenario=kx,exports.cx=Be,exports.deriveNoiseContexts=jx,exports.derivePassCard=ou,exports.draftValues=k_,exports.effectiveNoiseVolume=fs,exports.effectiveSpeechVolume=Pc,exports.expandSlashLabel=ss,exports.formatDuration=v_,exports.getControlDateRange=e4,exports.getPayloadTimestamp=Ds,exports.getPromoBannerBgTheme=Bo,exports.getSelectedFromPayload=Nx,exports.getSelectedText=Ex,exports.getStepPayload=sd,exports.getSteppedPayload=Dx,exports.injectPassCardBgTheme=$n,exports.injectPromoBannerBgTheme=tn,exports.isSelectionCorrect=Sx,exports.labelOfCellKey=Mc,exports.labelsForSave=o_,exports.levelToPct=M_,exports.markAfterClick=rc,exports.marksForSave=as,exports.mergeNoiseSettings=ra,exports.missesByType=C_,exports.monthKeyOf=nr,exports.monthKeyOfDate=qo,exports.nextFocus=d_,exports.nextMisses=m_,exports.noiseElementVolume=bs,exports.noiseRatioOf=rr,exports.pageStartIndexes=lc,exports.parseMonthKey=ya,exports.passCardBgIhabTheme=mu,exports.passCardBgLeftColorGridTheme=Cu,exports.passCardBgTwoCircleTheme=lu,exports.pctToLevel=L_,exports.posLabels=dc,exports.printWordTable=D4,exports.promoBannerBgDarkTheme=wi,exports.promoBannerBgDeepTheme=bi,exports.promoBannerBgDiagonalTheme=Ni,exports.promoBannerBgDotsTheme=Di,exports.promoBannerBgInstagramTheme=Pi,exports.promoBannerBgMainTheme=di,exports.promoBannerBgNaverTheme=$i,exports.promoBannerBgOutlineTheme=ji,exports.promoBannerBgRadialTheme=ki,exports.promoBannerBgSoftSubTheme=yi,exports.promoBannerBgSoftTheme=hi,exports.promoBannerBgSubTheme=Ci,exports.promoBannerBgSuccessTheme=Mi,exports.promoBannerBgWarmTheme=_i,exports.recommendTables=b_,exports.regenerateUnpinned=B_,exports.removeItem=w_,exports.resolveTrainingItems=Bx,exports.resolveTrainingPopupMeta=rd,exports.reviewCells=t_,exports.reviewMeta=r_,exports.reviewSetPlan=f_,exports.reviewTableName=a_,exports.scoreKey=kr,exports.scoreSheetHeader=i_,exports.shouldConfirmDiscard=E4,exports.splitTrainingVariants=wx,exports.summarize=N4,exports.summarizeMisses=h_,exports.tableTrends=c_,exports.toDraft=__,exports.toTrainingText=Ax,exports.togglePin=x_,exports.uncoveredLabels=g_,exports.useAnchoredMenu=Ha,exports.useBarChartControl=Ou,exports.useCalendarMonth=Tu,exports.useComboboxSuggestions=Du,exports.useDiscardGuard=ow,exports.useFitScale=Cc,exports.useNoisePlayer=Er,exports.useSoundCompassExam=qy,exports.useToastLifecycle=Yu,exports.useWordData=pw,exports.useWordTableDisplaySettings=jc,exports.useWordTablePrint=hs,exports.waveBarPx=Sr,exports.waveBarVal=jr,exports.weakItems=u_,exports.weekValueOf=Uo,exports.withStepTimes=od,exports.wordTypeLabels=pc;
1053
+ */const Mw=[["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"}]],Lw=re("circle-x",Mw);function $w(e){return{idle:0,"word-download":1,"image-list":2,"image-match":2,"pair-build":3,done:4}[e]??0}function Rs({icon:e,label:t,state:a,pct:r,subText:s}){const{t:l}=_e.useTranslation(),i=a==="done",u=a==="pending",c=a==="error",d=i?100:r??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(Zs,{size:22,color:"white",strokeWidth:2.5}):c?n.jsx(Lw,{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(ln,{variant:"sub",fill:"soft",size:"small",label:l("common.done","\uC644\uB8CC")}):c?n.jsx(ln,{variant:"danger",fill:"soft",size:"small",label:l("common.failed","\uC2E4\uD328")}):(s||r!==void 0)&&n.jsxs("span",{className:"wdup-phase-card__sub body-3",children:[s,s&&r!==void 0?` \xB7 ${r}%`:r!==void 0?`${r}%`:""]})]}),!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":""}${a==="active"&&r===void 0?" wdup-bar__fill--indeterminate":""}`,style:{width:r!==void 0||i||c?`${c?100:d}%`:void 0}})})]})]})}function Rw({title:e,progress:t,onDone:a,onRetry:r,onClose:s,inline:l}){const{t:i}=_e.useTranslation(),{phase:u,error:c,wordCount:d,imagePage:h,imageDone:p,imageTotal:m,pairPercent:b}=t,v=$w(u),C=u==="done",f=!!c;function x(A){return f&&v===A?"error":v>A?"done":v===A?"active":"pending"}const g=x(1),w=x(2),y=x(3),k=u==="image-match"&&m?Math.round((p??0)/m*100):void 0,_=o.useMemo(()=>{if(w!=="done"){if(u==="image-list")return i("wordData.checkingPage",{page:h??1});if(u==="image-match"&&m)return i("wordData.imageCount",{done:Co(p),total:Co(m)})}},[w,u,h,m,p,i]);return n.jsx(Pn,{inline:l,className:"popup--word-data-update",title:e,footer:f&&r?n.jsx(fe,{htmlType:"button",size:56,variant:"main",onClick:r,children:i("common.retry","\uB2E4\uC2DC \uC2DC\uB3C4")}):f?n.jsx(fe,{htmlType:"button",size:56,variant:"main",onClick:s??a,children:i("common.close","\uB2EB\uAE30")}):n.jsx(fe,{htmlType:"button",size:56,variant:"main",disabled:!C,onClick:a,children:i("common.done","\uC644\uB8CC")}),children:n.jsxs("div",{className:"wdup-cards",children:[n.jsx(Rs,{icon:n.jsx(qs,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:i("wordData.phaseWordDownload","\uB2E8\uC5B4 \uB370\uC774\uD130 \uB2E4\uC6B4\uB85C\uB4DC"),state:g,subText:g==="active"?i("wordData.downloadingCount",{n:Co(d),count:d}):void 0}),n.jsx(Rs,{icon:n.jsx(Tw,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:i("wordData.phaseImageCheck","\uC774\uBBF8\uC9C0 \uD655\uC778"),state:w,pct:k,subText:_}),n.jsx(Rs,{icon:n.jsx(Ks,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:i("wordData.phasePairAnalysis","\uB2E8\uC5B4\uC30D \uBD84\uC11D"),state:y,pct:y==="active"?b??0:void 0,subText:void 0})]})})}function Pw({enabled:e=!1,renderResultPopup:t}={}){const{t:a}=_e.useTranslation(),[r,s]=o.useState(null),[l,i]=o.useState(null),u=b=>{let v=null;b==="noise"?v={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}]}:b==="short"?v={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}]}:b==="long"?v={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}]}:b==="order"&&(v={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(v),s(b)},c=o.useCallback(()=>{s(null),i(null)},[]),d=o.useCallback(()=>u("noise"),[]),h=o.useCallback(()=>u("short"),[]),p=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:d,children:a("debug.showResult",{type:"Noise",defaultValue:"{{type}} \uACB0\uACFC\uBCF4\uAE30"})}),n.jsx("button",{type:"button",className:"debug-button",onClick:h,children:a("debug.showResult",{type:"ShortStory",defaultValue:"{{type}} \uACB0\uACFC\uBCF4\uAE30"})}),n.jsx("button",{type:"button",className:"debug-button",onClick:p,children:a("debug.showResult",{type:"LongStory",defaultValue:"{{type}} \uACB0\uACFC\uBCF4\uAE30"})}),n.jsx("button",{type:"button",className:"debug-button",onClick:m,children:a("debug.showResult",{type:"Order",defaultValue:"{{type}} \uACB0\uACFC\uBCF4\uAE30"})})]}),r&&l?t?.({score:l.score,contextsLength:l.contextsLength,results:l.results,onReplay:c,onClose:c}):null]}):null}exports.Accordion=n2,exports.ActionCard=my,exports.Alert=q2,exports.AppHeader=i2,exports.AudioMeter=Xo,exports.AudioPlayer=xs,exports.Avatar=J2,exports.Badge=ln,exports.BarChart=Zv,exports.BarChartControls=zu,exports.Board=fv,exports.BottomNav=Xi,exports.BrandIdentity=nu,exports.BrandLogo=Hv,exports.Breadcrumb=tv,exports.BulkBar=Iv,exports.Button=fe,exports.CONSENT_KINDS=$u,exports.CORE_VERSION=ry,exports.Calendar=v4,exports.CardStep=pd,exports.ChartLegend=Ho,exports.ChartSection=Vo,exports.ChartTotal=tr,exports.Checkbox=Oo,exports.ChoiceChips=E_,exports.CircleBadge=Dn,exports.CodeBox=Fv,exports.ColorPicker=sv,exports.CompanyMeta=xv,exports.ConfirmPopup=yd,exports.ConfirmStep=ud,exports.ConfirmWithTextStep=cd,exports.ConsentRecordPopup=Mv,exports.ContrastFilterPanel=aw,exports.CoreScope=Cy,exports.CountTile=pv,exports.CouponInputPopup=sw,exports.DEFAULT_NOISE_SETTINGS=oa,exports.DatePicker=Lu,exports.DebugResultLauncher=Pw,exports.DescriptionTooltip=qn,exports.DeviceSideTable=b4,exports.Dialog=Cv,exports.Divider=W2,exports.Dropdown=_n,exports.EffectPartyPopper=Ms,exports.EffectPartyPopperHost=uw,exports.EmptyState=py,exports.ErrorState=hy,exports.FILTER_ALL_VALUE=kn,exports.FileUpload=ev,exports.FilterPanel=In,exports.FilterSectionInfo=Ga,exports.Footer=D_,exports.GameIntro=Qv,exports.Header=au,exports.Icon=ot,exports.IconGridMenu=N_,exports.IconRenderer=ot,exports.InfoTooltip=Mn,exports.ItemActions=zv,exports.LEVEL_MAX=Ba,exports.LINE_CHART_HOVER_DELAY_MS=Wu,exports.LandingBottomSticky=j_,exports.LandingHeader=S_,exports.LineChart=Jv,exports.ListPopup=rw,exports.ListenStep=id,exports.Loader=Ca,exports.MARKS=Ar,exports.MARK_ICON=oc,exports.MARK_VARIANT=sc,exports.MediaQueryOverrideContext=si,exports.MenuTooltip=Va,exports.NOISE_RATIO_MAX=ar,exports.NOISE_RATIO_STEP=$c,exports.NoisePlayerContext=gs,exports.NoiseSettingsTooltip=ed,exports.NoticeBox=by,exports.NotifyTextPreview=Wv,exports.OrderListStep=dd,exports.PASS_CARD_BG_VARS=na,exports.POS_LABEL=uc,exports.PROMO_BANNER_BG_COMPONENTS=Ii,exports.PROMO_BANNER_BG_OPTIONS=Ny,exports.PROMO_BANNER_BG_VARS=Oa,exports.Page=Lr,exports.PageTitle=cw,exports.Pagination=zo,exports.Panel=Qa,exports.PanelGrid=Nv,exports.PanelRow=un,exports.PanelRowDevice=Av,exports.PassCard=hu,exports.PassCardBg=F2,exports.PassCardBgIHAB=I2,exports.PassCardBgLeftColorGrid=O2,exports.PassCardBgTwoCircle=iu,exports.PaymentPlan=P2,exports.PersonCard=bv,exports.PhonemeFilterPanel=nw,exports.PhonemeSelectBlock=ew,exports.Popup=Pn,exports.ProgressBar=s4,exports.ProgressIndicator=Xu,exports.PromoBanner=Qy,exports.PromoBannerBgDark=Bi,exports.PromoBannerBgDeep=gi,exports.PromoBannerBgDiagonal=Ei,exports.PromoBannerBgDots=Si,exports.PromoBannerBgInstagram=Fi,exports.PromoBannerBgMain=pi,exports.PromoBannerBgNaver=Ri,exports.PromoBannerBgOutline=Ti,exports.PromoBannerBgRadial=Ai,exports.PromoBannerBgSoft=mi,exports.PromoBannerBgSoftSub=vi,exports.PromoBannerBgSub=fi,exports.PromoBannerBgSuccess=Li,exports.PromoBannerBgWarm=xi,exports.PublicationCard=yv,exports.Radio=bu,exports.RadioGroup=H2,exports.Rating=av,exports.ReportDocument=fw,exports.ReportInfoPanel=bw,exports.RingChart=t4,exports.SENTENCE_TRAINING_TYPES=ms,exports.SearchSummary=K2,exports.Section=_a,exports.SectionHeadFloat=Pu,exports.SectionHeader=_v,exports.SegmentedControl=vn,exports.ShortcutBadge=fu,exports.SideNav=tu,exports.Slider=Gu,exports.SoundCompass=z2,exports.SplashLogo=vv,exports.StatChart=n4,exports.SummaryStrip=mw,exports.TRAINING_TOOLTIP_HOVER_DELAY_MS=yu,exports.Table=Qo,exports.TableFilterPanel=us,exports.Tabs=Y2,exports.TextBoxTooltip=Tr,exports.TextField=Kn,exports.Timeline=gv,exports.Toast=va,exports.Toggle=Bu,exports.Toolbar=Wo,exports.Tooltip=Bn,exports.TooltipInfo=Mn,exports.TooltipTextBox=Tr,exports.TopBanner=e2,exports.TrainingBlock=x4,exports.TrainingBlockButton=Ro,exports.TrainingBlockGrid=B4,exports.TrainingCard=xw,exports.TrainingCardGroup=ww,exports.TrainingPagePopup=Yn,exports.TrainingPagePopupBottom=td,exports.TrainingPagePopupTitle=nd,exports.TrainingResultPopup=fd,exports.TrainingStep=sa,exports.TrainingStepAudioPlayer=xs,exports.TrainingStepBullet=Kc,exports.TrainingStepCard=Jc,exports.TrainingStepConfirm=Bs,exports.TrainingStepConfirmWithText=ks,exports.TrainingStepListen=As,exports.TrainingStepOrderList=Ns,exports.TrainingStepTextBox=Xc,exports.TrainingStepTitle=Zc,exports.TrainingTooltip=vu,exports.TrainingWordCard=ns,exports.UpdateAlert=_w,exports.WAVE_A_MAX=q_,exports.WAVE_H1_PX=vs,exports.WAVE_HMAX_PX=V_,exports.WORD_LABEL_I18N_KEYS=L4,exports.WORD_TABLE_PAPER=aa,exports.WORD_TYPE_LABEL=cc,exports.WordDataProvider=hw,exports.WordDataUpdatePopup=Rw,exports.WordImageTooltip=gd,exports.WordSearchFilterPanel=tw,exports.WordSearchResultBlock=Jx,exports.WordTable=xa,exports.WordTableBlock=Ew,exports.WordTableButton=Sw,exports.WordTablePopup=Q4,exports.WordTableThumbnail=wd,exports.buildMonthChartData=qv,exports.cellKey=l_,exports.cellLabel=s_,exports.cellsForLabels=y_,exports.clearPassCardBgTheme=Rn,exports.clearPromoBannerBgTheme=nn,exports.closeTrainingPopup=xx,exports.companyTypeLabel=dw,exports.createTrainingScenario=kx,exports.cx=Be,exports.deriveNoiseContexts=jx,exports.derivePassCard=ou,exports.draftValues=k_,exports.effectiveNoiseVolume=fs,exports.effectiveSpeechVolume=Pc,exports.expandSlashLabel=ss,exports.formatDuration=v_,exports.getControlDateRange=e4,exports.getPayloadTimestamp=Ds,exports.getPromoBannerBgTheme=Bo,exports.getSelectedFromPayload=Nx,exports.getSelectedText=Ex,exports.getStepPayload=sd,exports.getSteppedPayload=Dx,exports.injectPassCardBgTheme=$n,exports.injectPromoBannerBgTheme=tn,exports.isSelectionCorrect=Sx,exports.labelOfCellKey=Mc,exports.labelsForSave=o_,exports.levelToPct=M_,exports.markAfterClick=rc,exports.marksForSave=as,exports.mergeNoiseSettings=ra,exports.missesByType=C_,exports.monthKeyOf=nr,exports.monthKeyOfDate=qo,exports.nextFocus=d_,exports.nextMisses=m_,exports.noiseElementVolume=bs,exports.noiseRatioOf=rr,exports.pageStartIndexes=lc,exports.parseMonthKey=ya,exports.passCardBgIhabTheme=mu,exports.passCardBgLeftColorGridTheme=Cu,exports.passCardBgTwoCircleTheme=lu,exports.pctToLevel=L_,exports.posLabels=dc,exports.printWordTable=D4,exports.promoBannerBgDarkTheme=wi,exports.promoBannerBgDeepTheme=bi,exports.promoBannerBgDiagonalTheme=Ni,exports.promoBannerBgDotsTheme=Di,exports.promoBannerBgInstagramTheme=Pi,exports.promoBannerBgMainTheme=di,exports.promoBannerBgNaverTheme=$i,exports.promoBannerBgOutlineTheme=ji,exports.promoBannerBgRadialTheme=ki,exports.promoBannerBgSoftSubTheme=yi,exports.promoBannerBgSoftTheme=hi,exports.promoBannerBgSubTheme=Ci,exports.promoBannerBgSuccessTheme=Mi,exports.promoBannerBgWarmTheme=_i,exports.recommendTables=b_,exports.regenerateUnpinned=B_,exports.removeItem=w_,exports.resolveTrainingItems=Bx,exports.resolveTrainingPopupMeta=rd,exports.reviewCells=t_,exports.reviewMeta=r_,exports.reviewSetPlan=f_,exports.reviewTableName=a_,exports.scoreKey=kr,exports.scoreSheetHeader=i_,exports.shouldConfirmDiscard=E4,exports.splitTrainingVariants=wx,exports.summarize=N4,exports.summarizeMisses=h_,exports.tableTrends=c_,exports.toDraft=__,exports.toTrainingText=Ax,exports.togglePin=x_,exports.uncoveredLabels=g_,exports.useAnchoredMenu=Ha,exports.useBarChartControl=Ou,exports.useCalendarMonth=Tu,exports.useComboboxSuggestions=Du,exports.useDiscardGuard=ow,exports.useFitScale=Cc,exports.useNoisePlayer=Er,exports.useSoundCompassExam=qy,exports.useToastLifecycle=Yu,exports.useWordData=pw,exports.useWordTableDisplaySettings=jc,exports.useWordTablePrint=hs,exports.waveBarPx=Sr,exports.waveBarVal=jr,exports.weakItems=u_,exports.weekValueOf=Uo,exports.withStepTimes=od,exports.wordTypeLabels=pc;